@rekayasa/erica-bubble 1.0.9 → 1.0.11
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/index.cjs +17 -70
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +2585 -47208
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -2
package/dist/index.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let u=require(`react`);u=l(u);let d=require(`@copilotkit/react-core`),f=require(`@copilotkit/react-core/v2`),p=require(`@copilotkit/react-ui`),m=require(`react/jsx-runtime`);var
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let u=require(`react`);u=l(u);let d=require(`@copilotkit/react-core`),f=require(`@copilotkit/react-core/v2`),p=require(`@copilotkit/react-ui`),m=require(`react/jsx-runtime`),h=require(`echarts`);h=l(h);var g=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),_=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),v=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),y=e=>{let t=v(e);return t.charAt(0).toUpperCase()+t.slice(1)},b={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},x=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},S=(0,u.createContext)({}),C=()=>(0,u.useContext)(S),w=(0,u.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:d=2,absoluteStrokeWidth:f=!1,color:p=`currentColor`,className:m=``}=C()??{},h=r??f?Number(n??d)*24/Number(t??l):n??d;return(0,u.createElement)(`svg`,{ref:c,...b,width:t??l??b.width,height:t??l??b.height,stroke:e??p,strokeWidth:h,className:g(`lucide`,m,i),...!a&&!x(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,u.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),T=(e,t)=>{let n=(0,u.forwardRef)(({className:n,...r},i)=>(0,u.createElement)(w,{ref:i,iconNode:t,className:g(`lucide-${_(y(e))}`,`lucide-${e}`,n),...r}));return n.displayName=y(e),n},E=T(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),ee=T(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),D=T(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),te=T(`paperclip`,[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]),ne=T(`square-pen`,[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`,key:`1m0v6g`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`,key:`ohrbg2`}]]),re=T(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),ie=(e,t,n)=>{typeof n==`string`||n instanceof Blob?e.append(t,n):n instanceof Date?e.append(t,n.toISOString()):e.append(t,JSON.stringify(n))},ae={bodySerializer:e=>{let t=new FormData;return Object.entries(e).forEach(([e,n])=>{n!=null&&(Array.isArray(n)?n.forEach(n=>ie(t,e,n)):ie(t,e,n))}),t}},oe={bodySerializer:e=>JSON.stringify(e,(e,t)=>typeof t==`bigint`?t.toString():t)};Object.entries({$body_:`body`,$headers_:`headers`,$path_:`path`,$query_:`query`});function se({onRequest:e,onSseError:t,onSseEvent:n,responseTransformer:r,responseValidator:i,sseDefaultRetryDelay:a,sseMaxRetryAttempts:o,sseMaxRetryDelay:s,sseSleepFn:c,url:l,...u}){let d,f=c??(e=>new Promise(t=>setTimeout(t,e)));return{stream:async function*(){let c=a??3e3,p=0,m=u.signal??new AbortController().signal;for(;!m.aborted;){p++;let a=u.headers instanceof Headers?u.headers:new Headers(u.headers);d!==void 0&&a.set(`Last-Event-ID`,d);try{let t={redirect:`follow`,...u,body:u.serializedBody,headers:a,signal:m},o=new Request(l,t);e&&(o=await e(l,t));let s=await(u.fetch??globalThis.fetch)(o);if(!s.ok)throw Error(`SSE failed: ${s.status} ${s.statusText}`);if(!s.body)throw Error(`No body in SSE response`);let f=s.body.pipeThrough(new TextDecoderStream).getReader(),p=``,h=()=>{try{f.cancel()}catch{}};m.addEventListener(`abort`,h);try{for(;;){let{done:e,value:t}=await f.read();if(e)break;p+=t,p=p.replace(/\r\n?/g,`
|
|
2
2
|
`);let a=p.split(`
|
|
3
3
|
|
|
4
4
|
`);p=a.pop()??``;for(let e of a){let t=e.split(`
|
|
5
5
|
`),a=[],o;for(let e of t)if(e.startsWith(`data:`))a.push(e.replace(/^data:\s*/,``));else if(e.startsWith(`event:`))o=e.replace(/^event:\s*/,``);else if(e.startsWith(`id:`))d=e.replace(/^id:\s*/,``);else if(e.startsWith(`retry:`)){let t=Number.parseInt(e.replace(/^retry:\s*/,``),10);Number.isNaN(t)||(c=t)}let s,l=!1;if(a.length){let e=a.join(`
|
|
6
|
-
`);try{s=JSON.parse(e),l=!0}catch{s=e}}l&&(i&&await i(s),r&&(s=await r(s))),n?.({data:s,event:o,id:d,retry:c}),a.length&&(yield s)}}}finally{m.removeEventListener(`abort`,h),f.releaseLock()}break}catch(e){if(t?.(e),o!==void 0&&p>=o)break;await f(Math.min(c*2**(p-1),s??3e4))}}}()}}var re=e=>{switch(e){case`label`:return`.`;case`matrix`:return`;`;case`simple`:return`,`;default:return`&`}},ie=e=>{switch(e){case`form`:return`,`;case`pipeDelimited`:return`|`;case`spaceDelimited`:return`%20`;default:return`,`}},ae=e=>{switch(e){case`label`:return`.`;case`matrix`:return`;`;case`simple`:return`,`;default:return`&`}},oe=({allowReserved:e,explode:t,name:n,style:r,value:i})=>{if(!t){let t=(e?i:i.map(e=>encodeURIComponent(e))).join(ie(r));switch(r){case`label`:return`.${t}`;case`matrix`:return`;${n}=${t}`;case`simple`:return t;default:return`${n}=${t}`}}let a=re(r),o=i.map(t=>r===`label`||r===`simple`?e?t:encodeURIComponent(t):se({allowReserved:e,name:n,value:t})).join(a);return r===`label`||r===`matrix`?a+o:o},se=({allowReserved:e,name:t,value:n})=>{if(n==null)return``;if(typeof n==`object`)throw Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${t}=${e?n:encodeURIComponent(n)}`},ce=({allowReserved:e,explode:t,name:n,style:r,value:i,valueOnly:a})=>{if(i instanceof Date)return a?i.toISOString():`${n}=${i.toISOString()}`;if(r!==`deepObject`&&!t){let t=[];Object.entries(i).forEach(([n,r])=>{t=[...t,n,e?r:encodeURIComponent(r)]});let a=t.join(`,`);switch(r){case`form`:return`${n}=${a}`;case`label`:return`.${a}`;case`matrix`:return`;${n}=${a}`;default:return a}}let o=ae(r),s=Object.entries(i).map(([t,i])=>se({allowReserved:e,name:r===`deepObject`?`${n}[${t}]`:t,value:i})).join(o);return r===`label`||r===`matrix`?o+s:s},le=/\{[^{}]+\}/g,ue=({path:e,url:t})=>{let n=t,r=t.match(le);if(r)for(let t of r){let r=!1,i=t.substring(1,t.length-1),a=`simple`;i.endsWith(`*`)&&(r=!0,i=i.substring(0,i.length-1)),i.startsWith(`.`)?(i=i.substring(1),a=`label`):i.startsWith(`;`)&&(i=i.substring(1),a=`matrix`);let o=e[i];if(o==null)continue;if(Array.isArray(o)){n=n.replace(t,oe({explode:r,name:i,style:a,value:o}));continue}if(typeof o==`object`){n=n.replace(t,ce({explode:r,name:i,style:a,value:o,valueOnly:!0}));continue}if(a===`matrix`){n=n.replace(t,`;${se({name:i,value:o})}`);continue}let s=encodeURIComponent(a===`label`?`.${o}`:o);n=n.replace(t,s)}return n},de=({baseUrl:e,path:t,query:n,querySerializer:r,url:i})=>{let a=i.startsWith(`/`)?i:`/${i}`,o=(e??``)+a;t&&(o=ue({path:t,url:o}));let s=n?r(n):``;return s.startsWith(`?`)&&(s=s.substring(1)),s&&(o+=`?${s}`),o};function fe(e){let t=e.body!==void 0;if(t&&e.bodySerializer)return`serializedBody`in e?e.serializedBody!==void 0&&e.serializedBody!==``?e.serializedBody:null:e.body===``?null:e.body;if(t)return e.body}var pe=async(e,t)=>{let n=typeof t==`function`?await t(e):t;if(n)return e.scheme===`bearer`?`Bearer ${n}`:e.scheme===`basic`?`Basic ${btoa(n)}`:n},me=({parameters:e={},...t}={})=>n=>{let r=[];if(n&&typeof n==`object`)for(let i in n){let a=n[i];if(a==null)continue;let o=e[i]||t;if(Array.isArray(a)){let e=oe({allowReserved:o.allowReserved,explode:!0,name:i,style:`form`,value:a,...o.array});e&&r.push(e)}else if(typeof a==`object`){let e=ce({allowReserved:o.allowReserved,explode:!0,name:i,style:`deepObject`,value:a,...o.object});e&&r.push(e)}else{let e=se({allowReserved:o.allowReserved,name:i,value:a});e&&r.push(e)}}return r.join(`&`)},he=e=>{if(!e)return`stream`;let t=e.split(`;`)[0]?.trim();if(t){if(t.startsWith(`application/json`)||t.endsWith(`+json`))return`json`;if(t===`multipart/form-data`)return`formData`;if([`application/`,`audio/`,`image/`,`video/`].some(e=>t.startsWith(e)))return`blob`;if(t.startsWith(`text/`))return`text`}},ge=(e,t)=>t?!!(e.headers.has(t)||e.query?.[t]||e.headers.get(`Cookie`)?.includes(`${t}=`)):!1,_e=async({security:e,...t})=>{for(let n of e){if(ge(t,n.name))continue;let e=await pe(n,t.auth);if(!e)continue;let r=n.name??`Authorization`;switch(n.in){case`query`:t.query||={},t.query[r]=e;break;case`cookie`:t.headers.append(`Cookie`,`${r}=${e}`);break;default:t.headers.set(r,e);break}}},ve=e=>de({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer==`function`?e.querySerializer:me(e.querySerializer),url:e.url}),ye=(e,t)=>{let n={...e,...t};return n.baseUrl?.endsWith(`/`)&&(n.baseUrl=n.baseUrl.substring(0,n.baseUrl.length-1)),n.headers=xe(e.headers,t.headers),n},be=e=>{let t=[];return e.forEach((e,n)=>{t.push([n,e])}),t},xe=(...e)=>{let t=new Headers;for(let n of e){if(!n)continue;let e=n instanceof Headers?be(n):Object.entries(n);for(let[n,r]of e)if(r===null)t.delete(n);else if(Array.isArray(r))for(let e of r)t.append(n,e);else r!==void 0&&t.set(n,typeof r==`object`?JSON.stringify(r):r)}return t},Se=class{fns=[];clear(){this.fns=[]}eject(e){let t=this.getInterceptorIndex(e);this.fns[t]&&(this.fns[t]=null)}exists(e){let t=this.getInterceptorIndex(e);return!!this.fns[t]}getInterceptorIndex(e){return typeof e==`number`?this.fns[e]?e:-1:this.fns.indexOf(e)}update(e,t){let n=this.getInterceptorIndex(e);return this.fns[n]?(this.fns[n]=t,e):!1}use(e){return this.fns.push(e),this.fns.length-1}},Ce=()=>({error:new Se,request:new Se,response:new Se}),we=me({allowReserved:!1,array:{explode:!0,style:`form`},object:{explode:!0,style:`deepObject`}}),Te={"Content-Type":`application/json`},Ee=(e={})=>({...te,headers:Te,parseAs:`auto`,querySerializer:we,...e}),De=((e={})=>{let t=ye(Ee(),e),n=()=>({...t}),r=e=>(t=ye(t,e),n()),i=Ce(),a=async e=>{let n={...t,...e,fetch:e.fetch??t.fetch??globalThis.fetch,headers:xe(t.headers,e.headers),serializedBody:void 0};n.security&&await _e({...n,security:n.security}),n.requestValidator&&await n.requestValidator(n),n.body!==void 0&&n.bodySerializer&&(n.serializedBody=n.bodySerializer(n.body)),(n.body===void 0||n.serializedBody===``)&&n.headers.delete(`Content-Type`);let r=n;return{opts:r,url:ve(r)}},o=async e=>{let{opts:t,url:n}=await a(e),r={redirect:`follow`,...t,body:fe(t)},o=new Request(n,r);for(let e of i.request.fns)e&&(o=await e(o,t));let s=t.fetch,c;try{c=await s(o)}catch(e){let n=e;for(let r of i.error.fns)r&&(n=await r(e,void 0,o,t));if(n||={},t.throwOnError)throw n;return t.responseStyle===`data`?void 0:{error:n,request:o,response:void 0}}for(let e of i.response.fns)e&&(c=await e(c,o,t));let l={request:o,response:c};if(c.ok){let e=(t.parseAs===`auto`?he(c.headers.get(`Content-Type`)):t.parseAs)??`json`;if(c.status===204||c.headers.get(`Content-Length`)===`0`){let n;switch(e){case`arrayBuffer`:case`blob`:case`text`:n=await c[e]();break;case`formData`:n=new FormData;break;case`stream`:n=c.body;break;default:n={};break}return t.responseStyle===`data`?n:{data:n,...l}}let n;switch(e){case`arrayBuffer`:case`blob`:case`formData`:case`text`:n=await c[e]();break;case`json`:{let e=await c.text();n=e?JSON.parse(e):{};break}case`stream`:return t.responseStyle===`data`?c.body:{data:c.body,...l}}return e===`json`&&(t.responseValidator&&await t.responseValidator(n),t.responseTransformer&&(n=await t.responseTransformer(n))),t.responseStyle===`data`?n:{data:n,...l}}let u=await c.text(),d;try{d=JSON.parse(u)}catch{}let f=d??u,p=f;for(let e of i.error.fns)e&&(p=await e(f,c,o,t));if(p||={},t.throwOnError)throw p;return t.responseStyle===`data`?void 0:{error:p,...l}},s=e=>t=>o({...t,method:e}),c=e=>async t=>{let{opts:n,url:r}=await a(t);return ne({...n,body:n.body,headers:n.headers,method:e,onRequest:async(e,t)=>{let r=new Request(e,t);for(let e of i.request.fns)e&&(r=await e(r,n));return r},serializedBody:fe(n),url:r})};return{buildUrl:e=>ve({...t,...e}),connect:s(`CONNECT`),delete:s(`DELETE`),get:s(`GET`),getConfig:n,head:s(`HEAD`),interceptors:i,options:s(`OPTIONS`),patch:s(`PATCH`),post:s(`POST`),put:s(`PUT`),request:o,setConfig:r,sse:{connect:c(`CONNECT`),delete:c(`DELETE`),get:c(`GET`),head:c(`HEAD`),options:c(`OPTIONS`),patch:c(`PATCH`),post:c(`POST`),put:c(`PUT`),trace:c(`TRACE`)},trace:s(`TRACE`)}})(Ee({baseUrl:`http://localhost:9000/api/widget`}));function Oe(e,t){De.setConfig({baseUrl:e,headers:t?{Authorization:`Bearer ${t}`}:void 0})}var ke=e=>(e?.client??De).get({security:[{scheme:`bearer`,type:`http`}],url:`/threads`,...e}),Ae=e=>(e.client??De).post({security:[{scheme:`bearer`,type:`http`}],url:`/query-sql`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),eee=e=>(e.client??De).get({security:[{scheme:`bearer`,type:`http`}],url:`/threads/{threadUid}`,...e}),je=e=>(e.client??De).post({...ee,security:[{scheme:`bearer`,type:`http`}],url:`/attachments/upload`,...e,headers:{"Content-Type":null,...e.headers}}),tee=e=>(e.client??De).get({security:[{scheme:`bearer`,type:`http`}],url:`/attachments/{filename}`,...e}),Me={upload:async(e,t,n)=>{let{data:r}=await je({body:{file:e,prefix:t,ocr:n},throwOnError:!0});return r.data},download:async(e,t)=>{let n=e.split(`/`),r=n[n.length-1],i=n.slice(-3,-1).join(`/`),{data:a}=await tee({path:{filename:r},query:i?{prefix:i}:{},parseAs:`blob`,throwOnError:!0}),o=URL.createObjectURL(a),s=document.createElement(`a`);s.href=o,s.download=t,document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(o)}};function nee({onSend:e,inProgress:t,threadId:n}){let[r,i]=(0,u.useState)(``),[a,o]=(0,u.useState)([]),[s,c]=(0,u.useState)(!1),[l,d]=(0,u.useState)(null),f=(0,u.useRef)(null),p=(0,u.useRef)(null),h=(0,u.useRef)(0);(0,u.useEffect)(()=>{let e=f.current;if(e){e.style.height=`auto`;let t=e.scrollHeight;e.style.height=`${t}px`}},[r]);async function g(e){let t=`${e.name}-${Date.now()}`;o(n=>[...n,{id:t,name:e.name,mimeType:e.type||`application/octet-stream`,status:`uploading`}]);try{let r=await Me.upload(e,`thread/${n||crypto.randomUUID()}`,!0);o(e=>e.map(e=>e.id===t?{...e,status:`done`,response:r}:e))}catch(e){let n=e instanceof Error?e.message:`Upload failed`;o(e=>e.map(e=>e.id===t?{...e,status:`error`,errorMessage:n}:e))}}function _(e){let t=e.target.files;if(!t||t.length===0)return;let n=new Set(a.map(e=>e.name));Array.from(t).filter(e=>!n.has(e.name)).forEach(g),e.target.value=``}function v(e){o(t=>t.filter(t=>t.id!==e))}async function y(e){if(e.response){d(e.id);try{await Me.download(e.response.file_path,e.response.original_name)}catch(t){console.error(`Download failed:`,t),alert(`Failed to download ${e.name}`)}finally{d(null)}}}function b(e){e.preventDefault(),h.current+=1,e.dataTransfer.types.includes(`Files`)&&c(!0)}function x(e){e.preventDefault(),--h.current,h.current===0&&c(!1)}function S(e){e.preventDefault()}function C(e){e.preventDefault(),h.current=0,c(!1);let t=Array.from(e.dataTransfer.files);if(t.length===0)return;let n=new Set(a.map(e=>e.name));t.filter(e=>!n.has(e.name)).forEach(g)}function w(){if(!r.trim()&&a.length===0)return;let t=a.filter(e=>e.status===`done`).filter(e=>e.response!==null).map(e=>e.response).map(({ocr_result:e,...t})=>({...t,ocr_result:e?.markdown_files})),n=r;t.length>0&&(n+=`\n\n\`\`\`attachments\n${JSON.stringify(t,null,2)}\n\`\`\``),e(n),i(``),o([])}function T(e){e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),w())}function D(){f.current?.focus()}return(0,m.jsxs)(`div`,{className:`copilotKitInputContainer relative`,onDragEnter:b,onDragLeave:x,onDragOver:S,onDrop:C,children:[s&&(0,m.jsx)(`div`,{className:`erica-drag-overlay`,children:(0,m.jsx)(`p`,{className:`erica-drag-overlay-text`,children:`Drop files to attach`})}),a.length>0&&(0,m.jsx)(`div`,{className:`erica-file-list`,children:a.map(e=>(0,m.jsxs)(`div`,{className:`erica-file-item ${e.status===`error`?`erica-file-item--error`:e.status===`done`?`erica-file-item--done`:`erica-file-item--uploading`}`,children:[(0,m.jsxs)(`div`,{className:`erica-file-content ${e.status===`done`?`erica-file-content--clickable`:``}`,onClick:()=>e.status===`done`&&y(e),role:e.status===`done`?`button`:void 0,tabIndex:e.status===`done`?0:void 0,children:[e.status===`uploading`?(0,m.jsx)(`div`,{className:`erica-spinner erica-spinner--gray`}):l===e.id?(0,m.jsx)(`div`,{className:`erica-spinner erica-spinner--green`}):e.status===`done`?(0,m.jsx)(O,{className:`erica-icon-sm erica-icon-green`}):(0,m.jsx)(O,{className:`erica-icon-sm erica-icon-red`}),(0,m.jsxs)(`div`,{className:`erica-file-info`,children:[(0,m.jsxs)(`div`,{className:`erica-file-name ${e.status===`error`?`erica-file-name--error`:e.status===`done`?`erica-file-name--done`:`erica-file-name--uploading`}`,children:[e.name,l===e.id&&(0,m.jsx)(`span`,{className:`erica-downloading-badge`,children:`Downloading...`})]}),(0,m.jsxs)(`div`,{className:`erica-file-status`,children:[e.status===`uploading`&&`Uploading...`,e.status===`done`&&`Ready · Click to download`,e.status===`error`&&(e.errorMessage||`Upload failed`)]})]}),e.status===`done`&&!l&&(0,m.jsx)(E,{className:`erica-download-icon`})]}),(0,m.jsx)(`button`,{onClick:t=>{t.stopPropagation(),v(e.id)},disabled:e.status===`uploading`,className:`erica-remove-button`,"aria-label":`Remove ${e.name}`,children:(0,m.jsx)(A,{className:`erica-icon-sm erica-icon-gray`})})]},e.id))}),(0,m.jsxs)(`div`,{className:`copilotKitInput`,onClick:D,children:[(0,m.jsx)(`textarea`,{ref:f,value:r,onChange:e=>i(e.target.value),onKeyDown:T,placeholder:a.length>0?`Ask about ${a.length} file${a.length>1?`s`:``}...`:`Type a message or attach files...`,className:`erica-textarea`,rows:1,disabled:t}),(0,m.jsxs)(`div`,{className:`copilotKitInputControls`,children:[(0,m.jsx)(`input`,{ref:p,type:`file`,onChange:_,className:`erica-file-input`,disabled:t,multiple:!0}),(0,m.jsx)(`button`,{onClick:()=>p.current?.click(),disabled:t,className:`copilotKitInputControlButton erica-attach-button`,"aria-label":`Attach files`,title:`Attach files (drag & drop supported)`,children:(0,m.jsx)(O,{className:`erica-icon-md`})}),(0,m.jsx)(`div`,{className:`erica-spacer`}),(0,m.jsx)(`button`,{onClick:w,disabled:t||!r.trim()&&a.filter(e=>e.status===`done`).length===0,"data-copilotkit-in-progress":t,className:`copilotKitInputControlButton`,children:(0,m.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:`1.5`,stroke:`currentColor`,width:`24`,height:`24`,children:(0,m.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M12 19V5m0 0l-7 7m7-7l7 7`})})})]})]})]})}var Ne=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Pe=new class extends Ne{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},ree={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Fe=new class{#e=ree;#t=!1;setTimeoutProvider(e){process.env.NODE_ENV!==`production`&&this.#t&&e!==this.#e&&console.error(`[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.`,{previous:this.#e,provider:e}),this.#e=e,process.env.NODE_ENV!==`production`&&(this.#t=!1)}setTimeout(e,t){return process.env.NODE_ENV!==`production`&&(this.#t=!0),this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return process.env.NODE_ENV!==`production`&&(this.#t=!0),this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function Ie(e){setTimeout(e,0)}var Le=typeof window>`u`||`Deno`in globalThis;function Re(){}function ze(e,t){return typeof e==`function`?e(t):e}function Be(e){return typeof e==`number`&&e>=0&&e!==1/0}function Ve(e,t){return Math.max(e+(t||0)-Date.now(),0)}function He(e,t){return typeof e==`function`?e(t):e}function Ue(e,t){return typeof e==`function`?e(t):e}function We(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==Ke(o,t.options))return!1}else if(!Je(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function Ge(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(qe(t.options.mutationKey)!==qe(a))return!1}else if(!Je(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Ke(e,t){return(t?.queryKeyHashFn||qe)(e)}function qe(e){return JSON.stringify(e,(e,t)=>Qe(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function Je(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>Je(e[n],t[n])):!1}var iee=Object.prototype.hasOwnProperty;function Ye(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=Ze(e)&&Ze(t);if(!r&&!(Qe(e)&&Qe(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:iee.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=Ye(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function Xe(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function Ze(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Qe(e){if(!$e(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!$e(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function $e(e){return Object.prototype.toString.call(e)===`[object Object]`}function aee(e){return new Promise(t=>{Fe.setTimeout(t,e)})}function et(e,t,n){if(typeof n.structuralSharing==`function`)return n.structuralSharing(e,t);if(n.structuralSharing!==!1){if(process.env.NODE_ENV!==`production`)try{return Ye(e,t)}catch(e){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${e}`),e}return Ye(e,t)}return t}function oee(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function see(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var tt=Symbol();function nt(e,t){return process.env.NODE_ENV!==`production`&&e.queryFn===tt&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===tt?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function rt(e,t){return typeof e==`function`?e(...t):!!e}function it(e,t,n){let r=!1,i;return Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var at=(()=>{let e=()=>Le;return{isServer(){return e()},setIsServer(t){e=t}}})();function ot(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var st=Ie;function ct(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=st,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var lt=ct(),ut=new class extends Ne{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function dt(e){return Math.min(1e3*2**e,3e4)}function ft(e){return(e??`online`)===`online`?ut.isOnline():!0}var pt=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function mt(e){let t=!1,n=0,r,i=ot(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new pt(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>Pe.isFocused()&&(e.networkMode===`always`||ut.isOnline())&&e.canRun(),u=()=>ft(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},f=e=>{a()||(r?.(),i.reject(e))},p=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),m=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(d).catch(r=>{if(a())return;let i=e.retry??(at.isServer()?0:3),o=e.retryDelay??dt,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){f(r);return}n++,e.onFail?.(n,r),aee(s).then(()=>l()?void 0:p()).then(()=>{t?f(r):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?m():p().then(m),i)}}var ht=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Be(this.gcTime)&&(this.#e=Fe.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(at.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(Fe.clearTimeout(this.#e),this.#e=void 0)}},cee=class extends ht{#e;#t;#n;#r;#i;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#n=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=vt(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#i?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=vt(this.options);e.data!==void 0&&(this.setState(_t(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#n.remove(this)}setData(e,t){let n=et(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#c({type:`setState`,state:e,setStateOptions:t})}cancel(e){let t=this.#i?.promise;return this.#i?.cancel(e),t?t.then(Re).catch(Re):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#e}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Ue(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===tt||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>He(e.options.staleTime,this)===`static`):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!Ve(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#i&&(this.#o||this.#s()?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#n.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#s(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#i?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}process.env.NODE_ENV!==`production`&&(Array.isArray(this.options.queryKey)||console.error(`As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']`));let n=new AbortController,r=e=>{Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},i=()=>{let e=nt(this.options,t),n=(()=>{let e={client:this.#r,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#o=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:i};return r(e),e})();this.options.behavior?.onFetch(a,this),this.#t=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta}),this.#i=mt({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof pt&&e.revert&&this.setState({...this.#t,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#i.start();if(e===void 0)throw process.env.NODE_ENV!==`production`&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#n.config.onSuccess?.(e,this),this.#n.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof pt){if(e.silent)return this.#i.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#n.config.onError?.(e,this),this.#n.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#c(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...gt(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,..._t(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}})(this.state),lt.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#n.notify({query:this,type:`updated`,action:e})})}};function gt(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ft(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function _t(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function vt(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var yt=class extends Ne{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=ot(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),xt(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return St(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return St(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof Ue(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!Xe(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Ct(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||Ue(this.options.enabled,this.#t)!==Ue(t.enabled,this.#t)||He(this.options.staleTime,this.#t)!==He(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||Ue(this.options.enabled,this.#t)!==Ue(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Tt(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Re)),t}#g(){this.#b();let e=He(this.options.staleTime,this.#t);if(at.isServer()||this.#r.isStale||!Be(e))return;let t=Ve(this.#r.dataUpdatedAt,e)+1;this.#d=Fe.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(at.isServer()||Ue(this.options.enabled,this.#t)===!1||!Be(this.#p)||this.#p===0)&&(this.#f=Fe.setInterval(()=>{(this.options.refetchIntervalInBackground||Pe.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d!==void 0&&(Fe.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#f!==void 0&&(Fe.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&xt(e,t),o=i&&Ct(e,n,t,r);(a||o)&&(l={...l,...gt(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=et(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=et(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0,x={status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:wt(e,t),refetch:this.refetch,promise:this.#o,isEnabled:Ue(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=x.data!==void 0,r=x.status===`error`&&!t,i=e=>{r?e.reject(x.error):t&&e.resolve(x.data)},a=()=>{i(this.#o=x.promise=ot())},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||x.data!==o.value)&&a();break;case`rejected`:(!r||x.error!==o.reason)&&a();break}}return x}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!Xe(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){lt.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function bt(e,t){return Ue(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&t.retryOnMount===!1)}function xt(e,t){return bt(e,t)||e.state.data!==void 0&&St(e,t,t.refetchOnMount)}function St(e,t,n){if(Ue(t.enabled,e)!==!1&&He(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&wt(e,t)}return!1}function Ct(e,t,n,r){return(e!==t||Ue(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&wt(e,n)}function wt(e,t){return Ue(t.enabled,e)!==!1&&e.isStaleByTime(He(t.staleTime,e))}function Tt(e,t){return!Xe(e.getCurrentResult(),t)}function Et(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{it(e,()=>t.signal,()=>n=!0)},u=nt(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject();if(r==null&&e.pages.length)return Promise.resolve(e);let a=await u((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})()),{maxPages:o}=t.options,s=i?see:oee;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?Ot:Dt,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:Dt(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function Dt(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Ot(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var kt=class extends ht{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||At(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=mt({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}})(this.state),lt.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function At(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var jt=class extends Ne{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new kt({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=Mt(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=Mt(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=Mt(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=Mt(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){lt.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Ge(t,e))}findAll(e={}){return this.getAll().filter(t=>Ge(e,t))}notify(e){lt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return lt.batch(()=>Promise.all(e.map(e=>e.continue().catch(Re))))}};function Mt(e){return e.options.scope?.id}var Nt=class extends Ne{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??Ke(r,t),a=this.get(i);return a||(a=new cee({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){lt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>We(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>We(e,t)):t}notify(e){lt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){lt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){lt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Pt=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Nt,this.#t=e.mutationCache||new jt,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=Pe.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=ut.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(He(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=ze(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return lt.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;lt.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return lt.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=lt.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(Re).catch(Re)}invalidateQueries(e,t={}){return lt.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=lt.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(Re)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(Re)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(He(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Re).catch(Re)}fetchInfiniteQuery(e){return e.behavior=Et(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Re).catch(Re)}ensureInfiniteQueryData(e){return e.behavior=Et(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return ut.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(qe(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{Je(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(qe(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{Je(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=Ke(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===tt&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Ft=u.createContext(void 0),It=e=>{let t=u.useContext(Ft);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},lee=({client:e,children:t})=>(u.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,m.jsx)(Ft.Provider,{value:e,children:t})),Lt=u.createContext(!1),uee=()=>u.useContext(Lt);Lt.Provider;function dee(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var fee=u.createContext(dee()),pee=()=>u.useContext(fee),mee=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?rt(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},hee=e=>{u.useEffect(()=>{e.clearReset()},[e])},gee=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||rt(n,[e.error,r])),_ee=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},vee=(e,t)=>e.isLoading&&e.isFetching&&!t,yee=(e,t)=>e?.suspense&&t.isPending,Rt=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function bee(e,t,n){if(process.env.NODE_ENV!==`production`&&(typeof e!=`object`||Array.isArray(e)))throw Error(`Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object`);let r=uee(),i=pee(),a=It(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash);process.env.NODE_ENV!==`production`&&(o.queryFn||console.error(`[${o.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),o._optimisticResults=r?`isRestoring`:`optimistic`,_ee(o),mee(o,i,s),hee(i);let c=!a.getQueryCache().get(o.queryHash),[l]=u.useState(()=>new t(a,o)),d=l.getOptimisticResult(o),f=!r&&e.subscribed!==!1;if(u.useSyncExternalStore(u.useCallback(e=>{let t=f?l.subscribe(lt.batchCalls(e)):Re;return l.updateResult(),t},[l,f]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),u.useEffect(()=>{l.setOptions(o)},[o,l]),yee(o,d))throw Rt(o,l,i);if(gee({result:d,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw d.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,d),o.experimental_prefetchInRender&&!at.isServer()&&vee(d,r)&&(c?Rt(o,l,i):s?.promise)?.catch(Re).finally(()=>{l.updateResult()}),o.notifyOnChangeProps?d:l.trackResult(d)}function zt(e,t){return bee(e,yt,t)}var xee={list:async(e=15)=>{let{data:t}=await ke({query:{page:1,page_size:e},throwOnError:!0});return t.data??[]},get:async e=>{let{data:t}=await eee({path:{threadUid:e},throwOnError:!0});return t.data}},See={all:()=>[`widget-threads`],detail:e=>[`widget-threads`,e]},Cee=(e=15)=>zt({queryKey:See.all(),queryFn:()=>xee.list(e),staleTime:15e3,refetchOnWindowFocus:!0});function wee(e){if(!e)return``;let t=e.split(`:`);return(t.length>1?t.slice(1).join(` `):e).replace(/[-_]/g,` `).replace(/\b\w/g,e=>e.toUpperCase())}function Tee(e){if(!e)return``;let t=Date.now()-new Date(e).getTime(),n=Math.floor(t/6e4),r=Math.floor(n/60),i=Math.floor(r/24);return n<1?`just now`:n<60?`${n}m ago`:r<24?`${r}h ago`:i<7?`${i}d ago`:new Date(e).toLocaleDateString()}function Eee({onNewChat:e,onThreadSelect:t}){let[n,r]=(0,u.useState)(!1),i=(0,u.useRef)(null);(0,f.useCopilotChatConfiguration)();let{data:a=[],isLoading:o}=Cee();(0,u.useEffect)(()=>{function e(e){i.current&&!i.current.contains(e.target)&&r(!1)}if(n)return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[n]);function s(e){r(!1),t?.(e)}return(0,m.jsxs)(`div`,{className:`erica-header`,children:[(0,m.jsx)(`h2`,{className:`erica-header-title`,children:`Erica Assistant`}),(0,m.jsxs)(`div`,{className:`erica-header-controls`,ref:i,children:[(0,m.jsx)(`button`,{onClick:e,className:`erica-new-chat-button`,title:`Start new chat`,children:(0,m.jsx)(k,{className:`erica-icon-sm`})}),(0,m.jsxs)(`button`,{onClick:()=>r(!n),className:`erica-threads-toggle`,title:`Recent threads`,children:[(0,m.jsxs)(`span`,{className:`erica-threads-toggle-text`,children:[`Threads `,a.length>0&&`(${a.length})`]}),(0,m.jsx)(T,{className:`erica-threads-toggle-icon ${n?`erica-threads-toggle-icon--open`:``}`})]}),n&&(0,m.jsx)(`div`,{className:`erica-threads-dropdown`,children:(0,m.jsxs)(`div`,{className:`erica-threads-dropdown-content`,children:[(0,m.jsx)(`div`,{className:`erica-threads-dropdown-header`,children:`Recent Threads`}),o&&(0,m.jsx)(`div`,{className:`erica-threads-empty`,children:`Loading threads...`}),!o&&a.length===0&&(0,m.jsx)(`div`,{className:`erica-threads-empty`,children:`No conversations yet`}),!o&&a.map(e=>{let t=wee(e.agent),n=Tee(e.last_run_at??e.created_at);return(0,m.jsx)(`button`,{onClick:()=>s(e.uid),className:`erica-thread-item`,children:(0,m.jsxs)(`div`,{className:`erica-thread-item-content`,children:[(0,m.jsx)(`span`,{className:`erica-thread-title`,children:typeof e.thread_metadata?.title==`string`?e.thread_metadata.title:e.last_message??`New conversation`}),(0,m.jsxs)(`div`,{className:`erica-thread-meta`,children:[t&&(0,m.jsx)(`span`,{className:`erica-thread-agent`,children:t}),n&&(0,m.jsx)(`span`,{className:`erica-thread-time`,children:n})]})]})},e.uid)})]})})]})]})}Object.freeze({status:`aborted`});function M(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,`_zod`,{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,`name`,{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,`init`,{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,`name`,{value:e}),o}var Bt=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Vt=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},Ht={};function Ut(e){return e&&Object.assign(Ht,e),Ht}function Wt(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function Gt(e,t){return typeof t==`bigint`?t.toString():t}function Kt(e){return{get value(){{let t=e();return Object.defineProperty(this,`value`,{value:t}),t}throw Error(`cached value already set`)}}}function qt(e){return e==null}function Jt(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}var Yt=Symbol(`evaluating`);function Xt(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Yt)return r===void 0&&(r=Yt,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Zt(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Qt(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function $t(e){return JSON.stringify(e)}function Dee(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var en=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function tn(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Oee=Kt(()=>{if(typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function nn(e){if(tn(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(tn(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function rn(e){return nn(e)?{...e}:Array.isArray(e)?[...e]:e}var kee=new Set([`string`,`number`,`symbol`]);function an(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function on(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function sn(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function cn(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}-Number.MAX_VALUE,Number.MAX_VALUE;function ln(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return on(e,Qt(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return Zt(this,`shape`,e),e},checks:[]}))}function un(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return on(e,Qt(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return Zt(this,`shape`,r),r},checks:[]}))}function Aee(e,t){if(!nn(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return on(e,Qt(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Zt(this,`shape`,n),n}}))}function dn(e,t){if(!nn(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return on(e,Qt(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Zt(this,`shape`,n),n}}))}function fn(e,t){return on(e,Qt(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return Zt(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:[]}))}function pn(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return on(t,Qt(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return Zt(this,`shape`,i),i},checks:[]}))}function mn(e,t,n){return on(t,Qt(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return Zt(this,`shape`,i),i}}))}function hn(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function gn(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function _n(e){return typeof e==`string`?e:e?.message}function vn(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=_n(e.inst?._zod.def?.error?.(e))??_n(t?.error?.(e))??_n(n.customError?.(e))??_n(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function yn(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function bn(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var xn=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,`_zod`,{value:e._zod,enumerable:!1}),Object.defineProperty(e,`issues`,{value:t,enumerable:!1}),e.message=JSON.stringify(t,Gt,2),Object.defineProperty(e,`toString`,{value:()=>e.message,enumerable:!1})},Sn=M(`$ZodError`,xn),Cn=M(`$ZodError`,xn,{Parent:Error});function jee(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Mee(e,t=e=>e.message){let n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`&&i.errors.length)i.errors.map(e=>r({issues:e}));else if(i.code===`invalid_key`)r({issues:i.issues});else if(i.code===`invalid_element`)r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(e),n}var wn=e=>(t,n,r,i)=>{let a=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new Bt;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>vn(e,a,Ut())));throw en(t,i?.callee),t}return o.value},Tn=e=>async(t,n,r,i)=>{let a=r?Object.assign(r,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>vn(e,a,Ut())));throw en(t,i?.callee),t}return o.value},En=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new Bt;return a.issues.length?{success:!1,error:new(e??Sn)(a.issues.map(e=>vn(e,i,Ut())))}:{success:!0,data:a.value}},Dn=En(Cn),On=e=>async(t,n,r)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>vn(e,i,Ut())))}:{success:!0,data:a.value}},kn=On(Cn),An=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return wn(e)(t,n,i)},jn=e=>(t,n,r)=>wn(e)(t,n,r),Mn=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return Tn(e)(t,n,i)},Nn=e=>async(t,n,r)=>Tn(e)(t,n,r),Pn=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return En(e)(t,n,i)},Fn=e=>(t,n,r)=>En(e)(t,n,r),In=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return On(e)(t,n,i)},Ln=e=>async(t,n,r)=>On(e)(t,n,r),Rn=/^[cC][^\s-]{8,}$/,zn=/^[0-9a-z]+$/,Bn=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Vn=/^[0-9a-vA-V]{20}$/,Hn=/^[A-Za-z0-9]{27}$/,Un=/^[a-zA-Z0-9_-]{21}$/,Nee=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Pee=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Wn=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Fee=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Iee=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function Gn(){return new RegExp(Iee,`u`)}var Kn=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,qn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Jn=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Yn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Xn=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Zn=/^[A-Za-z0-9_-]*$/,Qn=/^\+[1-9]\d{6,14}$/,$n=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,er=RegExp(`^${$n}$`);function tr(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function nr(e){return RegExp(`^${tr(e)}$`)}function rr(e){let t=tr({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${$n}T(?:${r})$`)}var ir=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},ar=/^[^A-Z]*$/,or=/^[^a-z]*$/,sr=M(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),cr=M(`$ZodCheckMaxLength`,(e,t)=>{var n;sr.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!qt(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=yn(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),lr=M(`$ZodCheckMinLength`,(e,t)=>{var n;sr.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!qt(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=yn(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),ur=M(`$ZodCheckLengthEquals`,(e,t)=>{var n;sr.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!qt(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=yn(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),dr=M(`$ZodCheckStringFormat`,(e,t)=>{var n,r;sr.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),fr=M(`$ZodCheckRegex`,(e,t)=>{dr.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),pr=M(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=ar,dr.init(e,t)}),Lee=M(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=or,dr.init(e,t)}),Ree=M(`$ZodCheckIncludes`,(e,t)=>{sr.init(e,t);let n=an(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),zee=M(`$ZodCheckStartsWith`,(e,t)=>{sr.init(e,t);let n=RegExp(`^${an(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Bee=M(`$ZodCheckEndsWith`,(e,t)=>{sr.init(e,t);let n=RegExp(`.*${an(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Vee=M(`$ZodCheckOverwrite`,(e,t)=>{sr.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Hee=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
6
|
+
`);try{s=JSON.parse(e),l=!0}catch{s=e}}l&&(i&&await i(s),r&&(s=await r(s))),n?.({data:s,event:o,id:d,retry:c}),a.length&&(yield s)}}}finally{m.removeEventListener(`abort`,h),f.releaseLock()}break}catch(e){if(t?.(e),o!==void 0&&p>=o)break;await f(Math.min(c*2**(p-1),s??3e4))}}}()}}var ce=e=>{switch(e){case`label`:return`.`;case`matrix`:return`;`;case`simple`:return`,`;default:return`&`}},le=e=>{switch(e){case`form`:return`,`;case`pipeDelimited`:return`|`;case`spaceDelimited`:return`%20`;default:return`,`}},ue=e=>{switch(e){case`label`:return`.`;case`matrix`:return`;`;case`simple`:return`,`;default:return`&`}},de=({allowReserved:e,explode:t,name:n,style:r,value:i})=>{if(!t){let t=(e?i:i.map(e=>encodeURIComponent(e))).join(le(r));switch(r){case`label`:return`.${t}`;case`matrix`:return`;${n}=${t}`;case`simple`:return t;default:return`${n}=${t}`}}let a=ce(r),o=i.map(t=>r===`label`||r===`simple`?e?t:encodeURIComponent(t):fe({allowReserved:e,name:n,value:t})).join(a);return r===`label`||r===`matrix`?a+o:o},fe=({allowReserved:e,name:t,value:n})=>{if(n==null)return``;if(typeof n==`object`)throw Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${t}=${e?n:encodeURIComponent(n)}`},pe=({allowReserved:e,explode:t,name:n,style:r,value:i,valueOnly:a})=>{if(i instanceof Date)return a?i.toISOString():`${n}=${i.toISOString()}`;if(r!==`deepObject`&&!t){let t=[];Object.entries(i).forEach(([n,r])=>{t=[...t,n,e?r:encodeURIComponent(r)]});let a=t.join(`,`);switch(r){case`form`:return`${n}=${a}`;case`label`:return`.${a}`;case`matrix`:return`;${n}=${a}`;default:return a}}let o=ue(r),s=Object.entries(i).map(([t,i])=>fe({allowReserved:e,name:r===`deepObject`?`${n}[${t}]`:t,value:i})).join(o);return r===`label`||r===`matrix`?o+s:s},me=/\{[^{}]+\}/g,he=({path:e,url:t})=>{let n=t,r=t.match(me);if(r)for(let t of r){let r=!1,i=t.substring(1,t.length-1),a=`simple`;i.endsWith(`*`)&&(r=!0,i=i.substring(0,i.length-1)),i.startsWith(`.`)?(i=i.substring(1),a=`label`):i.startsWith(`;`)&&(i=i.substring(1),a=`matrix`);let o=e[i];if(o==null)continue;if(Array.isArray(o)){n=n.replace(t,de({explode:r,name:i,style:a,value:o}));continue}if(typeof o==`object`){n=n.replace(t,pe({explode:r,name:i,style:a,value:o,valueOnly:!0}));continue}if(a===`matrix`){n=n.replace(t,`;${fe({name:i,value:o})}`);continue}let s=encodeURIComponent(a===`label`?`.${o}`:o);n=n.replace(t,s)}return n},ge=({baseUrl:e,path:t,query:n,querySerializer:r,url:i})=>{let a=i.startsWith(`/`)?i:`/${i}`,o=(e??``)+a;t&&(o=he({path:t,url:o}));let s=n?r(n):``;return s.startsWith(`?`)&&(s=s.substring(1)),s&&(o+=`?${s}`),o};function _e(e){let t=e.body!==void 0;if(t&&e.bodySerializer)return`serializedBody`in e?e.serializedBody!==void 0&&e.serializedBody!==``?e.serializedBody:null:e.body===``?null:e.body;if(t)return e.body}var ve=async(e,t)=>{let n=typeof t==`function`?await t(e):t;if(n)return e.scheme===`bearer`?`Bearer ${n}`:e.scheme===`basic`?`Basic ${btoa(n)}`:n},ye=({parameters:e={},...t}={})=>n=>{let r=[];if(n&&typeof n==`object`)for(let i in n){let a=n[i];if(a==null)continue;let o=e[i]||t;if(Array.isArray(a)){let e=de({allowReserved:o.allowReserved,explode:!0,name:i,style:`form`,value:a,...o.array});e&&r.push(e)}else if(typeof a==`object`){let e=pe({allowReserved:o.allowReserved,explode:!0,name:i,style:`deepObject`,value:a,...o.object});e&&r.push(e)}else{let e=fe({allowReserved:o.allowReserved,name:i,value:a});e&&r.push(e)}}return r.join(`&`)},be=e=>{if(!e)return`stream`;let t=e.split(`;`)[0]?.trim();if(t){if(t.startsWith(`application/json`)||t.endsWith(`+json`))return`json`;if(t===`multipart/form-data`)return`formData`;if([`application/`,`audio/`,`image/`,`video/`].some(e=>t.startsWith(e)))return`blob`;if(t.startsWith(`text/`))return`text`}},xe=(e,t)=>t?!!(e.headers.has(t)||e.query?.[t]||e.headers.get(`Cookie`)?.includes(`${t}=`)):!1,Se=async({security:e,...t})=>{for(let n of e){if(xe(t,n.name))continue;let e=await ve(n,t.auth);if(!e)continue;let r=n.name??`Authorization`;switch(n.in){case`query`:t.query||={},t.query[r]=e;break;case`cookie`:t.headers.append(`Cookie`,`${r}=${e}`);break;default:t.headers.set(r,e);break}}},Ce=e=>ge({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer==`function`?e.querySerializer:ye(e.querySerializer),url:e.url}),we=(e,t)=>{let n={...e,...t};return n.baseUrl?.endsWith(`/`)&&(n.baseUrl=n.baseUrl.substring(0,n.baseUrl.length-1)),n.headers=Ee(e.headers,t.headers),n},Te=e=>{let t=[];return e.forEach((e,n)=>{t.push([n,e])}),t},Ee=(...e)=>{let t=new Headers;for(let n of e){if(!n)continue;let e=n instanceof Headers?Te(n):Object.entries(n);for(let[n,r]of e)if(r===null)t.delete(n);else if(Array.isArray(r))for(let e of r)t.append(n,e);else r!==void 0&&t.set(n,typeof r==`object`?JSON.stringify(r):r)}return t},De=class{fns=[];clear(){this.fns=[]}eject(e){let t=this.getInterceptorIndex(e);this.fns[t]&&(this.fns[t]=null)}exists(e){let t=this.getInterceptorIndex(e);return!!this.fns[t]}getInterceptorIndex(e){return typeof e==`number`?this.fns[e]?e:-1:this.fns.indexOf(e)}update(e,t){let n=this.getInterceptorIndex(e);return this.fns[n]?(this.fns[n]=t,e):!1}use(e){return this.fns.push(e),this.fns.length-1}},Oe=()=>({error:new De,request:new De,response:new De}),ke=ye({allowReserved:!1,array:{explode:!0,style:`form`},object:{explode:!0,style:`deepObject`}}),Ae={"Content-Type":`application/json`},je=(e={})=>({...oe,headers:Ae,parseAs:`auto`,querySerializer:ke,...e}),Me=((e={})=>{let t=we(je(),e),n=()=>({...t}),r=e=>(t=we(t,e),n()),i=Oe(),a=async e=>{let n={...t,...e,fetch:e.fetch??t.fetch??globalThis.fetch,headers:Ee(t.headers,e.headers),serializedBody:void 0};n.security&&await Se({...n,security:n.security}),n.requestValidator&&await n.requestValidator(n),n.body!==void 0&&n.bodySerializer&&(n.serializedBody=n.bodySerializer(n.body)),(n.body===void 0||n.serializedBody===``)&&n.headers.delete(`Content-Type`);let r=n;return{opts:r,url:Ce(r)}},o=async e=>{let{opts:t,url:n}=await a(e),r={redirect:`follow`,...t,body:_e(t)},o=new Request(n,r);for(let e of i.request.fns)e&&(o=await e(o,t));let s=t.fetch,c;try{c=await s(o)}catch(e){let n=e;for(let r of i.error.fns)r&&(n=await r(e,void 0,o,t));if(n||={},t.throwOnError)throw n;return t.responseStyle===`data`?void 0:{error:n,request:o,response:void 0}}for(let e of i.response.fns)e&&(c=await e(c,o,t));let l={request:o,response:c};if(c.ok){let e=(t.parseAs===`auto`?be(c.headers.get(`Content-Type`)):t.parseAs)??`json`;if(c.status===204||c.headers.get(`Content-Length`)===`0`){let n;switch(e){case`arrayBuffer`:case`blob`:case`text`:n=await c[e]();break;case`formData`:n=new FormData;break;case`stream`:n=c.body;break;default:n={};break}return t.responseStyle===`data`?n:{data:n,...l}}let n;switch(e){case`arrayBuffer`:case`blob`:case`formData`:case`text`:n=await c[e]();break;case`json`:{let e=await c.text();n=e?JSON.parse(e):{};break}case`stream`:return t.responseStyle===`data`?c.body:{data:c.body,...l}}return e===`json`&&(t.responseValidator&&await t.responseValidator(n),t.responseTransformer&&(n=await t.responseTransformer(n))),t.responseStyle===`data`?n:{data:n,...l}}let u=await c.text(),d;try{d=JSON.parse(u)}catch{}let f=d??u,p=f;for(let e of i.error.fns)e&&(p=await e(f,c,o,t));if(p||={},t.throwOnError)throw p;return t.responseStyle===`data`?void 0:{error:p,...l}},s=e=>t=>o({...t,method:e}),c=e=>async t=>{let{opts:n,url:r}=await a(t);return se({...n,body:n.body,headers:n.headers,method:e,onRequest:async(e,t)=>{let r=new Request(e,t);for(let e of i.request.fns)e&&(r=await e(r,n));return r},serializedBody:_e(n),url:r})};return{buildUrl:e=>Ce({...t,...e}),connect:s(`CONNECT`),delete:s(`DELETE`),get:s(`GET`),getConfig:n,head:s(`HEAD`),interceptors:i,options:s(`OPTIONS`),patch:s(`PATCH`),post:s(`POST`),put:s(`PUT`),request:o,setConfig:r,sse:{connect:c(`CONNECT`),delete:c(`DELETE`),get:c(`GET`),head:c(`HEAD`),options:c(`OPTIONS`),patch:c(`PATCH`),post:c(`POST`),put:c(`PUT`),trace:c(`TRACE`)},trace:s(`TRACE`)}})(je({baseUrl:`http://localhost:9000/api/widget`}));function Ne(e,t){Me.setConfig({baseUrl:e,headers:t?{Authorization:`Bearer ${t}`}:void 0})}var Pe=e=>(e?.client??Me).get({security:[{scheme:`bearer`,type:`http`}],url:`/threads`,...e}),Fe=e=>(e.client??Me).post({security:[{scheme:`bearer`,type:`http`}],url:`/query-sql`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Ie=e=>(e.client??Me).get({security:[{scheme:`bearer`,type:`http`}],url:`/threads/{threadUid}`,...e}),Le=e=>(e.client??Me).post({...ae,security:[{scheme:`bearer`,type:`http`}],url:`/attachments/upload`,...e,headers:{"Content-Type":null,...e.headers}}),Re=e=>(e.client??Me).get({security:[{scheme:`bearer`,type:`http`}],url:`/attachments/{filename}`,...e}),ze={upload:async(e,t,n)=>{let{data:r}=await Le({body:{file:e,prefix:t,ocr:n},throwOnError:!0});return r.data},download:async(e,t)=>{let n=e.split(`/`),r=n[n.length-1],i=n.slice(-3,-1).join(`/`),{data:a}=await Re({path:{filename:r},query:i?{prefix:i}:{},parseAs:`blob`,throwOnError:!0}),o=URL.createObjectURL(a),s=document.createElement(`a`);s.href=o,s.download=t,document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(o)}};function Be({onSend:e,inProgress:t,threadId:n}){let[r,i]=(0,u.useState)(``),[a,o]=(0,u.useState)([]),[s,c]=(0,u.useState)(!1),[l,d]=(0,u.useState)(null),f=(0,u.useRef)(null),p=(0,u.useRef)(null),h=(0,u.useRef)(0);(0,u.useEffect)(()=>{let e=f.current;if(e){e.style.height=`auto`;let t=e.scrollHeight;e.style.height=`${t}px`}},[r]);async function g(e){let t=`${e.name}-${Date.now()}`;o(n=>[...n,{id:t,name:e.name,mimeType:e.type||`application/octet-stream`,status:`uploading`}]);try{let r=await ze.upload(e,`thread/${n||crypto.randomUUID()}`,!0);o(e=>e.map(e=>e.id===t?{...e,status:`done`,response:r}:e))}catch(e){let n=e instanceof Error?e.message:`Upload failed`;o(e=>e.map(e=>e.id===t?{...e,status:`error`,errorMessage:n}:e))}}function _(e){let t=e.target.files;if(!t||t.length===0)return;let n=new Set(a.map(e=>e.name));Array.from(t).filter(e=>!n.has(e.name)).forEach(g),e.target.value=``}function v(e){o(t=>t.filter(t=>t.id!==e))}async function y(e){if(e.response){d(e.id);try{await ze.download(e.response.file_path,e.response.original_name)}catch(t){console.error(`Download failed:`,t),alert(`Failed to download ${e.name}`)}finally{d(null)}}}function b(e){e.preventDefault(),h.current+=1,e.dataTransfer.types.includes(`Files`)&&c(!0)}function x(e){e.preventDefault(),--h.current,h.current===0&&c(!1)}function S(e){e.preventDefault()}function C(e){e.preventDefault(),h.current=0,c(!1);let t=Array.from(e.dataTransfer.files);if(t.length===0)return;let n=new Set(a.map(e=>e.name));t.filter(e=>!n.has(e.name)).forEach(g)}function w(){if(!r.trim()&&a.length===0)return;let t=a.filter(e=>e.status===`done`).filter(e=>e.response!==null).map(e=>e.response).map(({ocr_result:e,...t})=>({...t,ocr_result:e?.markdown_files})),n=r;t.length>0&&(n+=`\n\n\`\`\`attachments\n${JSON.stringify(t,null,2)}\n\`\`\``),e(n),i(``),o([])}function T(e){e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),w())}function E(){f.current?.focus()}return(0,m.jsxs)(`div`,{className:`copilotKitInputContainer relative`,onDragEnter:b,onDragLeave:x,onDragOver:S,onDrop:C,children:[s&&(0,m.jsx)(`div`,{className:`erica-drag-overlay`,children:(0,m.jsx)(`p`,{className:`erica-drag-overlay-text`,children:`Drop files to attach`})}),a.length>0&&(0,m.jsx)(`div`,{className:`erica-file-list`,children:a.map(e=>(0,m.jsxs)(`div`,{className:`erica-file-item ${e.status===`error`?`erica-file-item--error`:e.status===`done`?`erica-file-item--done`:`erica-file-item--uploading`}`,children:[(0,m.jsxs)(`div`,{className:`erica-file-content ${e.status===`done`?`erica-file-content--clickable`:``}`,onClick:()=>e.status===`done`&&y(e),role:e.status===`done`?`button`:void 0,tabIndex:e.status===`done`?0:void 0,children:[e.status===`uploading`?(0,m.jsx)(`div`,{className:`erica-spinner erica-spinner--gray`}):l===e.id?(0,m.jsx)(`div`,{className:`erica-spinner erica-spinner--green`}):e.status===`done`?(0,m.jsx)(te,{className:`erica-icon-sm erica-icon-green`}):(0,m.jsx)(te,{className:`erica-icon-sm erica-icon-red`}),(0,m.jsxs)(`div`,{className:`erica-file-info`,children:[(0,m.jsxs)(`div`,{className:`erica-file-name ${e.status===`error`?`erica-file-name--error`:e.status===`done`?`erica-file-name--done`:`erica-file-name--uploading`}`,children:[e.name,l===e.id&&(0,m.jsx)(`span`,{className:`erica-downloading-badge`,children:`Downloading...`})]}),(0,m.jsxs)(`div`,{className:`erica-file-status`,children:[e.status===`uploading`&&`Uploading...`,e.status===`done`&&`Ready · Click to download`,e.status===`error`&&(e.errorMessage||`Upload failed`)]})]}),e.status===`done`&&!l&&(0,m.jsx)(ee,{className:`erica-download-icon`})]}),(0,m.jsx)(`button`,{onClick:t=>{t.stopPropagation(),v(e.id)},disabled:e.status===`uploading`,className:`erica-remove-button`,"aria-label":`Remove ${e.name}`,children:(0,m.jsx)(re,{className:`erica-icon-sm erica-icon-gray`})})]},e.id))}),(0,m.jsxs)(`div`,{className:`copilotKitInput`,onClick:E,children:[(0,m.jsx)(`textarea`,{ref:f,value:r,onChange:e=>i(e.target.value),onKeyDown:T,placeholder:a.length>0?`Ask about ${a.length} file${a.length>1?`s`:``}...`:`Type a message or attach files...`,className:`erica-textarea`,rows:1,disabled:t}),(0,m.jsxs)(`div`,{className:`copilotKitInputControls`,children:[(0,m.jsx)(`input`,{ref:p,type:`file`,onChange:_,className:`erica-file-input`,disabled:t,multiple:!0}),(0,m.jsx)(`button`,{onClick:()=>p.current?.click(),disabled:t,className:`copilotKitInputControlButton erica-attach-button`,"aria-label":`Attach files`,title:`Attach files (drag & drop supported)`,children:(0,m.jsx)(te,{className:`erica-icon-md`})}),(0,m.jsx)(`div`,{className:`erica-spacer`}),(0,m.jsx)(`button`,{onClick:w,disabled:t||!r.trim()&&a.filter(e=>e.status===`done`).length===0,"data-copilotkit-in-progress":t,className:`copilotKitInputControlButton`,children:(0,m.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:`1.5`,stroke:`currentColor`,width:`24`,height:`24`,children:(0,m.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M12 19V5m0 0l-7 7m7-7l7 7`})})})]})]})]})}var Ve=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},He=new class extends Ve{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},Ue={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},We=new class{#e=Ue;#t=!1;setTimeoutProvider(e){process.env.NODE_ENV!==`production`&&this.#t&&e!==this.#e&&console.error(`[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.`,{previous:this.#e,provider:e}),this.#e=e,process.env.NODE_ENV!==`production`&&(this.#t=!1)}setTimeout(e,t){return process.env.NODE_ENV!==`production`&&(this.#t=!0),this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return process.env.NODE_ENV!==`production`&&(this.#t=!0),this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function Ge(e){setTimeout(e,0)}var Ke=typeof window>`u`||`Deno`in globalThis;function O(){}function qe(e,t){return typeof e==`function`?e(t):e}function Je(e){return typeof e==`number`&&e>=0&&e!==1/0}function Ye(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Xe(e,t){return typeof e==`function`?e(t):e}function Ze(e,t){return typeof e==`function`?e(t):e}function Qe(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==et(o,t.options))return!1}else if(!nt(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function $e(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(tt(t.options.mutationKey)!==tt(a))return!1}else if(!nt(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function et(e,t){return(t?.queryKeyHashFn||tt)(e)}function tt(e){return JSON.stringify(e,(e,t)=>st(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function nt(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>nt(e[n],t[n])):!1}var rt=Object.prototype.hasOwnProperty;function it(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=ot(e)&&ot(t);if(!r&&!(st(e)&&st(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:rt.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=it(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function at(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function ot(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function st(e){if(!ct(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!ct(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function ct(e){return Object.prototype.toString.call(e)===`[object Object]`}function lt(e){return new Promise(t=>{We.setTimeout(t,e)})}function ut(e,t,n){if(typeof n.structuralSharing==`function`)return n.structuralSharing(e,t);if(n.structuralSharing!==!1){if(process.env.NODE_ENV!==`production`)try{return it(e,t)}catch(e){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${e}`),e}return it(e,t)}return t}function dt(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function ft(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var pt=Symbol();function mt(e,t){return process.env.NODE_ENV!==`production`&&e.queryFn===pt&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===pt?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function ht(e,t){return typeof e==`function`?e(...t):!!e}function gt(e,t,n){let r=!1,i;return Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var _t=(()=>{let e=()=>Ke;return{isServer(){return e()},setIsServer(t){e=t}}})();function vt(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var yt=Ge;function bt(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=yt,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var k=bt(),xt=new class extends Ve{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function St(e){return Math.min(1e3*2**e,3e4)}function Ct(e){return(e??`online`)===`online`?xt.isOnline():!0}var wt=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function Tt(e){let t=!1,n=0,r,i=vt(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new wt(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>He.isFocused()&&(e.networkMode===`always`||xt.isOnline())&&e.canRun(),u=()=>Ct(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},f=e=>{a()||(r?.(),i.reject(e))},p=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),m=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(d).catch(r=>{if(a())return;let i=e.retry??(_t.isServer()?0:3),o=e.retryDelay??St,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){f(r);return}n++,e.onFail?.(n,r),lt(s).then(()=>l()?void 0:p()).then(()=>{t?f(r):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?m():p().then(m),i)}}var Et=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Je(this.gcTime)&&(this.#e=We.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(_t.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(We.clearTimeout(this.#e),this.#e=void 0)}},Dt=class extends Et{#e;#t;#n;#r;#i;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#n=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=At(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#i?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=At(this.options);e.data!==void 0&&(this.setState(kt(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#n.remove(this)}setData(e,t){let n=ut(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#c({type:`setState`,state:e,setStateOptions:t})}cancel(e){let t=this.#i?.promise;return this.#i?.cancel(e),t?t.then(O).catch(O):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#e}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Ze(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===pt||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Xe(e.options.staleTime,this)===`static`):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!Ye(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#i&&(this.#o||this.#s()?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#n.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#s(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#i?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}process.env.NODE_ENV!==`production`&&(Array.isArray(this.options.queryKey)||console.error(`As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']`));let n=new AbortController,r=e=>{Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},i=()=>{let e=mt(this.options,t),n=(()=>{let e={client:this.#r,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#o=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:i};return r(e),e})();this.options.behavior?.onFetch(a,this),this.#t=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta}),this.#i=Tt({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof wt&&e.revert&&this.setState({...this.#t,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#i.start();if(e===void 0)throw process.env.NODE_ENV!==`production`&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#n.config.onSuccess?.(e,this),this.#n.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof wt){if(e.silent)return this.#i.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#n.config.onError?.(e,this),this.#n.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#c(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...Ot(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...kt(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}})(this.state),k.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#n.notify({query:this,type:`updated`,action:e})})}};function Ot(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ct(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function kt(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function At(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var jt=class extends Ve{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=vt(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Nt(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Pt(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Pt(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof Ze(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!at(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Ft(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||Ze(this.options.enabled,this.#t)!==Ze(t.enabled,this.#t)||Xe(this.options.staleTime,this.#t)!==Xe(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||Ze(this.options.enabled,this.#t)!==Ze(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Lt(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(O)),t}#g(){this.#b();let e=Xe(this.options.staleTime,this.#t);if(_t.isServer()||this.#r.isStale||!Je(e))return;let t=Ye(this.#r.dataUpdatedAt,e)+1;this.#d=We.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(_t.isServer()||Ze(this.options.enabled,this.#t)===!1||!Je(this.#p)||this.#p===0)&&(this.#f=We.setInterval(()=>{(this.options.refetchIntervalInBackground||He.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d!==void 0&&(We.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#f!==void 0&&(We.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&Nt(e,t),o=i&&Ft(e,n,t,r);(a||o)&&(l={...l,...Ot(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=ut(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=ut(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0,x={status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:It(e,t),refetch:this.refetch,promise:this.#o,isEnabled:Ze(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=x.data!==void 0,r=x.status===`error`&&!t,i=e=>{r?e.reject(x.error):t&&e.resolve(x.data)},a=()=>{i(this.#o=x.promise=vt())},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||x.data!==o.value)&&a();break;case`rejected`:(!r||x.error!==o.reason)&&a();break}}return x}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!at(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){k.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function Mt(e,t){return Ze(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&t.retryOnMount===!1)}function Nt(e,t){return Mt(e,t)||e.state.data!==void 0&&Pt(e,t,t.refetchOnMount)}function Pt(e,t,n){if(Ze(t.enabled,e)!==!1&&Xe(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&It(e,t)}return!1}function Ft(e,t,n,r){return(e!==t||Ze(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&It(e,n)}function It(e,t){return Ze(t.enabled,e)!==!1&&e.isStaleByTime(Xe(t.staleTime,e))}function Lt(e,t){return!at(e.getCurrentResult(),t)}function Rt(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{gt(e,()=>t.signal,()=>n=!0)},u=mt(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject();if(r==null&&e.pages.length)return Promise.resolve(e);let a=await u((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})()),{maxPages:o}=t.options,s=i?ft:dt;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?Bt:zt,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:zt(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function zt(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Bt(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Vt=class extends Et{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Ht(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=Tt({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}})(this.state),k.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function Ht(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Ut=class extends Ve{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new Vt({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=Wt(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=Wt(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=Wt(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=Wt(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){k.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>$e(t,e))}findAll(e={}){return this.getAll().filter(t=>$e(e,t))}notify(e){k.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return k.batch(()=>Promise.all(e.map(e=>e.continue().catch(O))))}};function Wt(e){return e.options.scope?.id}var Gt=class extends Ve{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??et(r,t),a=this.get(i);return a||(a=new Dt({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){k.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Qe(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>Qe(e,t)):t}notify(e){k.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){k.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){k.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Kt=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Gt,this.#t=e.mutationCache||new Ut,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=He.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=xt.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Xe(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=qe(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return k.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;k.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return k.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=k.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(O).catch(O)}invalidateQueries(e,t={}){return k.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=k.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(O)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(O)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(Xe(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(O).catch(O)}fetchInfiniteQuery(e){return e.behavior=Rt(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(O).catch(O)}ensureInfiniteQueryData(e){return e.behavior=Rt(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return xt.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(tt(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{nt(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(tt(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{nt(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=et(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===pt&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},qt=u.createContext(void 0),Jt=e=>{let t=u.useContext(qt);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},Yt=({client:e,children:t})=>(u.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,m.jsx)(qt.Provider,{value:e,children:t})),Xt=u.createContext(!1),Zt=()=>u.useContext(Xt);Xt.Provider;function Qt(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var $t=u.createContext(Qt()),en=()=>u.useContext($t),tn=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?ht(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},nn=e=>{u.useEffect(()=>{e.clearReset()},[e])},rn=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||ht(n,[e.error,r])),an=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},on=(e,t)=>e.isLoading&&e.isFetching&&!t,sn=(e,t)=>e?.suspense&&t.isPending,cn=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function ln(e,t,n){if(process.env.NODE_ENV!==`production`&&(typeof e!=`object`||Array.isArray(e)))throw Error(`Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object`);let r=Zt(),i=en(),a=Jt(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash);process.env.NODE_ENV!==`production`&&(o.queryFn||console.error(`[${o.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),o._optimisticResults=r?`isRestoring`:`optimistic`,an(o),tn(o,i,s),nn(i);let c=!a.getQueryCache().get(o.queryHash),[l]=u.useState(()=>new t(a,o)),d=l.getOptimisticResult(o),f=!r&&e.subscribed!==!1;if(u.useSyncExternalStore(u.useCallback(e=>{let t=f?l.subscribe(k.batchCalls(e)):O;return l.updateResult(),t},[l,f]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),u.useEffect(()=>{l.setOptions(o)},[o,l]),sn(o,d))throw cn(o,l,i);if(rn({result:d,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw d.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,d),o.experimental_prefetchInRender&&!_t.isServer()&&on(d,r)&&(c?cn(o,l,i):s?.promise)?.catch(O).finally(()=>{l.updateResult()}),o.notifyOnChangeProps?d:l.trackResult(d)}function un(e,t){return ln(e,jt,t)}var dn={list:async(e=15)=>{let{data:t}=await Pe({query:{page:1,page_size:e},throwOnError:!0});return t.data??[]},get:async e=>{let{data:t}=await Ie({path:{threadUid:e},throwOnError:!0});return t.data}},fn={all:()=>[`widget-threads`],detail:e=>[`widget-threads`,e]},pn=(e=15)=>un({queryKey:fn.all(),queryFn:()=>dn.list(e),staleTime:15e3,refetchOnWindowFocus:!0});function mn(e){if(!e)return``;let t=e.split(`:`);return(t.length>1?t.slice(1).join(` `):e).replace(/[-_]/g,` `).replace(/\b\w/g,e=>e.toUpperCase())}function hn(e){if(!e)return``;let t=Date.now()-new Date(e).getTime(),n=Math.floor(t/6e4),r=Math.floor(n/60),i=Math.floor(r/24);return n<1?`just now`:n<60?`${n}m ago`:r<24?`${r}h ago`:i<7?`${i}d ago`:new Date(e).toLocaleDateString()}function gn({onNewChat:e,onThreadSelect:t}){let[n,r]=(0,u.useState)(!1),i=(0,u.useRef)(null);(0,f.useCopilotChatConfiguration)();let{data:a=[],isLoading:o}=pn();(0,u.useEffect)(()=>{function e(e){i.current&&!i.current.contains(e.target)&&r(!1)}if(n)return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[n]);function s(e){r(!1),t?.(e)}return(0,m.jsxs)(`div`,{className:`erica-header`,children:[(0,m.jsx)(`h2`,{className:`erica-header-title`,children:`Erica Assistant`}),(0,m.jsxs)(`div`,{className:`erica-header-controls`,ref:i,children:[(0,m.jsx)(`button`,{onClick:e,className:`erica-new-chat-button`,title:`Start new chat`,children:(0,m.jsx)(ne,{className:`erica-icon-sm`})}),(0,m.jsxs)(`button`,{onClick:()=>r(!n),className:`erica-threads-toggle`,title:`Recent threads`,children:[(0,m.jsxs)(`span`,{className:`erica-threads-toggle-text`,children:[`Threads `,a.length>0&&`(${a.length})`]}),(0,m.jsx)(E,{className:`erica-threads-toggle-icon ${n?`erica-threads-toggle-icon--open`:``}`})]}),n&&(0,m.jsx)(`div`,{className:`erica-threads-dropdown`,children:(0,m.jsxs)(`div`,{className:`erica-threads-dropdown-content`,children:[(0,m.jsx)(`div`,{className:`erica-threads-dropdown-header`,children:`Recent Threads`}),o&&(0,m.jsx)(`div`,{className:`erica-threads-empty`,children:`Loading threads...`}),!o&&a.length===0&&(0,m.jsx)(`div`,{className:`erica-threads-empty`,children:`No conversations yet`}),!o&&a.map(e=>{let t=mn(e.agent),n=hn(e.last_run_at??e.created_at);return(0,m.jsx)(`button`,{onClick:()=>s(e.uid),className:`erica-thread-item`,children:(0,m.jsxs)(`div`,{className:`erica-thread-item-content`,children:[(0,m.jsx)(`span`,{className:`erica-thread-title`,children:typeof e.thread_metadata?.title==`string`?e.thread_metadata.title:e.last_message??`New conversation`}),(0,m.jsxs)(`div`,{className:`erica-thread-meta`,children:[t&&(0,m.jsx)(`span`,{className:`erica-thread-agent`,children:t}),n&&(0,m.jsx)(`span`,{className:`erica-thread-time`,children:n})]})]})},e.uid)})]})})]})]})}Object.freeze({status:`aborted`});function A(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,`_zod`,{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,`name`,{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,`init`,{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,`name`,{value:e}),o}var _n=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},vn=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},yn={};function bn(e){return e&&Object.assign(yn,e),yn}function xn(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function Sn(e,t){return typeof t==`bigint`?t.toString():t}function Cn(e){return{get value(){{let t=e();return Object.defineProperty(this,`value`,{value:t}),t}throw Error(`cached value already set`)}}}function wn(e){return e==null}function Tn(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}var En=Symbol(`evaluating`);function j(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==En)return r===void 0&&(r=En,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Dn(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function On(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function kn(e){return JSON.stringify(e)}function An(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var jn=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function Mn(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Nn=Cn(()=>{if(typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function Pn(e){if(Mn(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(Mn(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function Fn(e){return Pn(e)?{...e}:Array.isArray(e)?[...e]:e}var In=new Set([`string`,`number`,`symbol`]);function Ln(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Rn(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function M(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function zn(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}-Number.MAX_VALUE,Number.MAX_VALUE;function Bn(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return Rn(e,On(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return Dn(this,`shape`,e),e},checks:[]}))}function Vn(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return Rn(e,On(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return Dn(this,`shape`,r),r},checks:[]}))}function Hn(e,t){if(!Pn(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return Rn(e,On(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Dn(this,`shape`,n),n}}))}function Un(e,t){if(!Pn(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return Rn(e,On(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Dn(this,`shape`,n),n}}))}function Wn(e,t){return Rn(e,On(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return Dn(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:[]}))}function Gn(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return Rn(t,On(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return Dn(this,`shape`,i),i},checks:[]}))}function Kn(e,t,n){return Rn(t,On(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return Dn(this,`shape`,i),i}}))}function qn(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Jn(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Yn(e){return typeof e==`string`?e:e?.message}function Xn(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=Yn(e.inst?._zod.def?.error?.(e))??Yn(t?.error?.(e))??Yn(n.customError?.(e))??Yn(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Zn(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Qn(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var $n=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,`_zod`,{value:e._zod,enumerable:!1}),Object.defineProperty(e,`issues`,{value:t,enumerable:!1}),e.message=JSON.stringify(t,Sn,2),Object.defineProperty(e,`toString`,{value:()=>e.message,enumerable:!1})},er=A(`$ZodError`,$n),tr=A(`$ZodError`,$n,{Parent:Error});function nr(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function rr(e,t=e=>e.message){let n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`&&i.errors.length)i.errors.map(e=>r({issues:e}));else if(i.code===`invalid_key`)r({issues:i.issues});else if(i.code===`invalid_element`)r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(e),n}var ir=e=>(t,n,r,i)=>{let a=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new _n;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>Xn(e,a,bn())));throw jn(t,i?.callee),t}return o.value},ar=e=>async(t,n,r,i)=>{let a=r?Object.assign(r,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>Xn(e,a,bn())));throw jn(t,i?.callee),t}return o.value},or=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new _n;return a.issues.length?{success:!1,error:new(e??er)(a.issues.map(e=>Xn(e,i,bn())))}:{success:!0,data:a.value}},sr=or(tr),cr=e=>async(t,n,r)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>Xn(e,i,bn())))}:{success:!0,data:a.value}},lr=cr(tr),ur=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return ir(e)(t,n,i)},dr=e=>(t,n,r)=>ir(e)(t,n,r),fr=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return ar(e)(t,n,i)},pr=e=>async(t,n,r)=>ar(e)(t,n,r),mr=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return or(e)(t,n,i)},hr=e=>(t,n,r)=>or(e)(t,n,r),gr=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return cr(e)(t,n,i)},_r=e=>async(t,n,r)=>cr(e)(t,n,r),vr=/^[cC][^\s-]{8,}$/,yr=/^[0-9a-z]+$/,br=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,xr=/^[0-9a-vA-V]{20}$/,Sr=/^[A-Za-z0-9]{27}$/,Cr=/^[a-zA-Z0-9_-]{21}$/,wr=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Tr=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Er=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Dr=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Or=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function kr(){return new RegExp(Or,`u`)}var Ar=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,jr=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Mr=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Nr=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Pr=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Fr=/^[A-Za-z0-9_-]*$/,Ir=/^\+[1-9]\d{6,14}$/,Lr=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,Rr=RegExp(`^${Lr}$`);function zr(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Br(e){return RegExp(`^${zr(e)}$`)}function Vr(e){let t=zr({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${Lr}T(?:${r})$`)}var Hr=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},Ur=/^[^A-Z]*$/,Wr=/^[^a-z]*$/,Gr=A(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Kr=A(`$ZodCheckMaxLength`,(e,t)=>{var n;Gr.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!wn(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=Zn(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),qr=A(`$ZodCheckMinLength`,(e,t)=>{var n;Gr.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!wn(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=Zn(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Jr=A(`$ZodCheckLengthEquals`,(e,t)=>{var n;Gr.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!wn(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=Zn(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Yr=A(`$ZodCheckStringFormat`,(e,t)=>{var n,r;Gr.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Xr=A(`$ZodCheckRegex`,(e,t)=>{Yr.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Zr=A(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Ur,Yr.init(e,t)}),Qr=A(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Wr,Yr.init(e,t)}),$r=A(`$ZodCheckIncludes`,(e,t)=>{Gr.init(e,t);let n=Ln(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),ei=A(`$ZodCheckStartsWith`,(e,t)=>{Gr.init(e,t);let n=RegExp(`^${Ln(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),ti=A(`$ZodCheckEndsWith`,(e,t)=>{Gr.init(e,t);let n=RegExp(`.*${Ln(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),ni=A(`$ZodCheckOverwrite`,(e,t)=>{Gr.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),ri=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
7
7
|
`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
|
|
8
|
-
`))}},
|
|
8
|
+
`))}},ii={major:4,minor:3,patch:6},N=A(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=ii;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=qn(e),i;for(let a of t){if(a._zod.def.when){if(!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new _n;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=qn(e,t))});else{if(e.issues.length===t)continue;r||=qn(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(qn(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new _n;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new _n;return o.then(e=>t(e,r,a))}return t(o,r,a)}}j(e,`~standard`,()=>({validate:t=>{try{let n=sr(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return lr(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),ai=A(`$ZodString`,(e,t)=>{N.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Hr(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),P=A(`$ZodStringFormat`,(e,t)=>{Yr.init(e,t),ai.init(e,t)}),oi=A(`$ZodGUID`,(e,t)=>{t.pattern??=Tr,P.init(e,t)}),si=A(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=Er(e)}else t.pattern??=Er();P.init(e,t)}),ci=A(`$ZodEmail`,(e,t)=>{t.pattern??=Dr,P.init(e,t)}),li=A(`$ZodURL`,(e,t)=>{P.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),ui=A(`$ZodEmoji`,(e,t)=>{t.pattern??=kr(),P.init(e,t)}),di=A(`$ZodNanoID`,(e,t)=>{t.pattern??=Cr,P.init(e,t)}),fi=A(`$ZodCUID`,(e,t)=>{t.pattern??=vr,P.init(e,t)}),pi=A(`$ZodCUID2`,(e,t)=>{t.pattern??=yr,P.init(e,t)}),mi=A(`$ZodULID`,(e,t)=>{t.pattern??=br,P.init(e,t)}),hi=A(`$ZodXID`,(e,t)=>{t.pattern??=xr,P.init(e,t)}),gi=A(`$ZodKSUID`,(e,t)=>{t.pattern??=Sr,P.init(e,t)}),_i=A(`$ZodISODateTime`,(e,t)=>{t.pattern??=Vr(t),P.init(e,t)}),vi=A(`$ZodISODate`,(e,t)=>{t.pattern??=Rr,P.init(e,t)}),yi=A(`$ZodISOTime`,(e,t)=>{t.pattern??=Br(t),P.init(e,t)}),bi=A(`$ZodISODuration`,(e,t)=>{t.pattern??=wr,P.init(e,t)}),xi=A(`$ZodIPv4`,(e,t)=>{t.pattern??=Ar,P.init(e,t),e._zod.bag.format=`ipv4`}),Si=A(`$ZodIPv6`,(e,t)=>{t.pattern??=jr,P.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),Ci=A(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Mr,P.init(e,t)}),wi=A(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Nr,P.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function Ti(e){if(e===``)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var Ei=A(`$ZodBase64`,(e,t)=>{t.pattern??=Pr,P.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{Ti(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function Di(e){if(!Fr.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Ti(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var Oi=A(`$ZodBase64URL`,(e,t)=>{t.pattern??=Fr,P.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{Di(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),ki=A(`$ZodE164`,(e,t)=>{t.pattern??=Ir,P.init(e,t)});function Ai(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var ji=A(`$ZodJWT`,(e,t)=>{P.init(e,t),e._zod.check=n=>{Ai(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),Mi=A(`$ZodUnknown`,(e,t)=>{N.init(e,t),e._zod.parse=e=>e}),Ni=A(`$ZodNever`,(e,t)=>{N.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function Pi(e,t,n){e.issues.length&&t.issues.push(...Jn(n,e.issues)),t.value[n]=e.value}var Fi=A(`$ZodArray`,(e,t)=>{N.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>Pi(t,n,e))):Pi(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function Ii(e,t,n,r,i){if(e.issues.length){if(i&&!(n in r))return;t.issues.push(...Jn(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function Li(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=zn(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Ri(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optout===`optional`;for(let i in t){if(s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>Ii(e,n,i,t,u))):Ii(a,n,i,t,u)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var zi=A(`$ZodObject`,(e,t)=>{if(N.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,`shape`,{get:()=>{let n={...e};return Object.defineProperty(t,`shape`,{value:n}),n}})}let n=Cn(()=>Li(t));j(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=Mn,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optout===`optional`,i=n._zod.run({value:s[e],issues:[]},o);i instanceof Promise?c.push(i.then(n=>Ii(n,t,e,s,r))):Ii(i,t,e,s,r)}return i?Ri(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),Bi=A(`$ZodObjectJIT`,(e,t)=>{zi.init(e,t);let n=e._zod.parse,r=Cn(()=>Li(t)),i=e=>{let t=new ri([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=kn(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=kn(r),s=e[r]?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),s?t.write(`
|
|
9
9
|
if (${n}.issues.length) {
|
|
10
10
|
if (${o} in input) {
|
|
11
11
|
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
@@ -39,82 +39,29 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.
|
|
|
39
39
|
newResult[${o}] = ${n}.value;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=tn,s=!Ht.jitless,c=s&&Oee.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?Jr([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function Zr(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!hn(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>vn(e,r,Ut())))}),t)}var Qr=M(`$ZodUnion`,(e,t)=>{mr.init(e,t),Xt(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),Xt(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),Xt(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),Xt(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>Jt(e.source)).join(`|`)})$`)}});let n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,a)=>{if(n)return r(i,a);let o=!1,s=[];for(let e of t.options){let t=e._zod.run({value:i.value,issues:[]},a);if(t instanceof Promise)s.push(t),o=!0;else{if(t.issues.length===0)return t;s.push(t)}}return o?Promise.all(s).then(t=>Zr(t,i,e,a)):Zr(s,i,e,a)}}),$r=M(`$ZodIntersection`,(e,t)=>{mr.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>ti(e,t,n)):ti(e,i,a)}});function ei(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(nn(e)&&nn(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=ei(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=ei(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function ti(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),hn(e))return e;let o=ei(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var ni=M(`$ZodEnum`,(e,t)=>{mr.init(e,t);let n=Wt(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>kee.has(typeof e)).map(e=>typeof e==`string`?an(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),ri=M(`$ZodTransform`,(e,t)=>{mr.init(e,t),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Vt(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new Bt;return n.value=i,n}});function ii(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var ai=M(`$ZodOptional`,(e,t)=>{mr.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,Xt(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Xt(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Jt(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>ii(t,e.value)):ii(r,e.value)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),oi=M(`$ZodExactOptional`,(e,t)=>{ai.init(e,t),Xt(e._zod,`values`,()=>t.innerType._zod.values),Xt(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),si=M(`$ZodNullable`,(e,t)=>{mr.init(e,t),Xt(e._zod,`optin`,()=>t.innerType._zod.optin),Xt(e._zod,`optout`,()=>t.innerType._zod.optout),Xt(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Jt(e.source)}|null)$`):void 0}),Xt(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),ci=M(`$ZodDefault`,(e,t)=>{mr.init(e,t),e._zod.optin=`optional`,Xt(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>li(e,t)):li(r,t)}});function li(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var ui=M(`$ZodPrefault`,(e,t)=>{mr.init(e,t),e._zod.optin=`optional`,Xt(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),di=M(`$ZodNonOptional`,(e,t)=>{mr.init(e,t),Xt(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>fi(t,e)):fi(i,e)}});function fi(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var pi=M(`$ZodCatch`,(e,t)=>{mr.init(e,t),Xt(e._zod,`optin`,()=>t.innerType._zod.optin),Xt(e._zod,`optout`,()=>t.innerType._zod.optout),Xt(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>vn(e,n,Ut()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>vn(e,n,Ut()))},input:e.value}),e.issues=[]),e)}}),mi=M(`$ZodPipe`,(e,t)=>{mr.init(e,t),Xt(e._zod,`values`,()=>t.in._zod.values),Xt(e._zod,`optin`,()=>t.in._zod.optin),Xt(e._zod,`optout`,()=>t.out._zod.optout),Xt(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>hi(e,t.in,n)):hi(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>hi(e,t.out,n)):hi(r,t.out,n)}});function hi(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var gi=M(`$ZodReadonly`,(e,t)=>{mr.init(e,t),Xt(e._zod,`propValues`,()=>t.innerType._zod.propValues),Xt(e._zod,`values`,()=>t.innerType._zod.values),Xt(e._zod,`optin`,()=>t.innerType?._zod?.optin),Xt(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(_i):_i(r)}});function _i(e){return e.value=Object.freeze(e.value),e}var vi=M(`$ZodCustom`,(e,t)=>{sr.init(e,t),mr.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>yi(t,n,r,e));yi(i,n,r,e)}});function yi(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(bn(e))}}var bi,xi=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Si(){return new xi}(bi=globalThis).__zod_globalRegistry??(bi.__zod_globalRegistry=Si());var Ci=globalThis.__zod_globalRegistry;function wi(e,t){return new e({type:`string`,...sn(t)})}function Ti(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...sn(t)})}function Ei(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...sn(t)})}function Di(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...sn(t)})}function Oi(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...sn(t)})}function ki(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...sn(t)})}function Ai(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...sn(t)})}function ji(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...sn(t)})}function Mi(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...sn(t)})}function Ni(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...sn(t)})}function Pi(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...sn(t)})}function Fi(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...sn(t)})}function Ii(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...sn(t)})}function Li(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...sn(t)})}function Ri(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...sn(t)})}function zi(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...sn(t)})}function Bi(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...sn(t)})}function Vi(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...sn(t)})}function Hi(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...sn(t)})}function Ui(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...sn(t)})}function Gee(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...sn(t)})}function Kee(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...sn(t)})}function qee(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...sn(t)})}function Jee(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...sn(t)})}function Yee(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...sn(t)})}function Xee(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...sn(t)})}function Zee(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...sn(t)})}function Qee(e){return new e({type:`unknown`})}function $ee(e,t){return new e({type:`never`,...sn(t)})}function Wi(e,t){return new cr({check:`max_length`,...sn(t),maximum:e})}function Gi(e,t){return new lr({check:`min_length`,...sn(t),minimum:e})}function Ki(e,t){return new ur({check:`length_equals`,...sn(t),length:e})}function ete(e,t){return new fr({check:`string_format`,format:`regex`,...sn(t),pattern:e})}function tte(e){return new pr({check:`string_format`,format:`lowercase`,...sn(e)})}function nte(e){return new Lee({check:`string_format`,format:`uppercase`,...sn(e)})}function rte(e,t){return new Ree({check:`string_format`,format:`includes`,...sn(t),includes:e})}function ite(e,t){return new zee({check:`string_format`,format:`starts_with`,...sn(t),prefix:e})}function ate(e,t){return new Bee({check:`string_format`,format:`ends_with`,...sn(t),suffix:e})}function qi(e){return new Vee({check:`overwrite`,tx:e})}function ote(e){return qi(t=>t.normalize(e))}function ste(){return qi(e=>e.trim())}function Ji(){return qi(e=>e.toLowerCase())}function Yi(){return qi(e=>e.toUpperCase())}function Xi(){return qi(e=>Dee(e))}function Zi(e,t,n){return new e({type:`array`,element:t,...sn(n)})}function Qi(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...sn(n)})}function $i(e){let t=ea(n=>(n.addIssue=e=>{if(typeof e==`string`)n.issues.push(bn(e,n.value,t._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=n.value,r.inst??=t,r.continue??=!t._zod.def.abort,n.issues.push(bn(r))}},e(n.value,n)));return t}function ea(e,t){let n=new sr({check:`custom`,...sn(t)});return n._zod.check=e,n}function ta(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??Ci,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function na(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,na(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&aa(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&o.schema._prefault&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function ra(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
42
|
+
`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=Mn,s=!yn.jitless,c=s&&Nn.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?Ri([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function Vi(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!qn(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Xn(e,r,bn())))}),t)}var Hi=A(`$ZodUnion`,(e,t)=>{N.init(e,t),j(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),j(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),j(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),j(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>Tn(e.source)).join(`|`)})$`)}});let n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,a)=>{if(n)return r(i,a);let o=!1,s=[];for(let e of t.options){let t=e._zod.run({value:i.value,issues:[]},a);if(t instanceof Promise)s.push(t),o=!0;else{if(t.issues.length===0)return t;s.push(t)}}return o?Promise.all(s).then(t=>Vi(t,i,e,a)):Vi(s,i,e,a)}}),Ui=A(`$ZodIntersection`,(e,t)=>{N.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>Gi(e,t,n)):Gi(e,i,a)}});function Wi(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Pn(e)&&Pn(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=Wi(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=Wi(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Gi(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),qn(e))return e;let o=Wi(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var Ki=A(`$ZodEnum`,(e,t)=>{N.init(e,t);let n=xn(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>In.has(typeof e)).map(e=>typeof e==`string`?Ln(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),qi=A(`$ZodTransform`,(e,t)=>{N.init(e,t),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new vn(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new _n;return n.value=i,n}});function Ji(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var Yi=A(`$ZodOptional`,(e,t)=>{N.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,j(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),j(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Tn(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>Ji(t,e.value)):Ji(r,e.value)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),Xi=A(`$ZodExactOptional`,(e,t)=>{Yi.init(e,t),j(e._zod,`values`,()=>t.innerType._zod.values),j(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Zi=A(`$ZodNullable`,(e,t)=>{N.init(e,t),j(e._zod,`optin`,()=>t.innerType._zod.optin),j(e._zod,`optout`,()=>t.innerType._zod.optout),j(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Tn(e.source)}|null)$`):void 0}),j(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),Qi=A(`$ZodDefault`,(e,t)=>{N.init(e,t),e._zod.optin=`optional`,j(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>$i(e,t)):$i(r,t)}});function $i(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var ea=A(`$ZodPrefault`,(e,t)=>{N.init(e,t),e._zod.optin=`optional`,j(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),ta=A(`$ZodNonOptional`,(e,t)=>{N.init(e,t),j(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>na(t,e)):na(i,e)}});function na(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var ra=A(`$ZodCatch`,(e,t)=>{N.init(e,t),j(e._zod,`optin`,()=>t.innerType._zod.optin),j(e._zod,`optout`,()=>t.innerType._zod.optout),j(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Xn(e,n,bn()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Xn(e,n,bn()))},input:e.value}),e.issues=[]),e)}}),ia=A(`$ZodPipe`,(e,t)=>{N.init(e,t),j(e._zod,`values`,()=>t.in._zod.values),j(e._zod,`optin`,()=>t.in._zod.optin),j(e._zod,`optout`,()=>t.out._zod.optout),j(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>aa(e,t.in,n)):aa(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>aa(e,t.out,n)):aa(r,t.out,n)}});function aa(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var oa=A(`$ZodReadonly`,(e,t)=>{N.init(e,t),j(e._zod,`propValues`,()=>t.innerType._zod.propValues),j(e._zod,`values`,()=>t.innerType._zod.values),j(e._zod,`optin`,()=>t.innerType?._zod?.optin),j(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(sa):sa(r)}});function sa(e){return e.value=Object.freeze(e.value),e}var ca=A(`$ZodCustom`,(e,t)=>{Gr.init(e,t),N.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>la(t,n,r,e));la(i,n,r,e)}});function la(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Qn(e))}}var ua,da=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function fa(){return new da}(ua=globalThis).__zod_globalRegistry??(ua.__zod_globalRegistry=fa());var pa=globalThis.__zod_globalRegistry;function ma(e,t){return new e({type:`string`,...M(t)})}function ha(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...M(t)})}function ga(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...M(t)})}function _a(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...M(t)})}function va(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...M(t)})}function ya(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...M(t)})}function ba(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...M(t)})}function xa(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...M(t)})}function Sa(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...M(t)})}function Ca(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...M(t)})}function wa(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...M(t)})}function Ta(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...M(t)})}function Ea(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...M(t)})}function Da(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...M(t)})}function Oa(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...M(t)})}function ka(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...M(t)})}function Aa(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...M(t)})}function ja(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...M(t)})}function Ma(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...M(t)})}function Na(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...M(t)})}function Pa(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...M(t)})}function Fa(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...M(t)})}function Ia(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...M(t)})}function La(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...M(t)})}function Ra(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...M(t)})}function za(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...M(t)})}function Ba(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...M(t)})}function Va(e){return new e({type:`unknown`})}function Ha(e,t){return new e({type:`never`,...M(t)})}function Ua(e,t){return new Kr({check:`max_length`,...M(t),maximum:e})}function Wa(e,t){return new qr({check:`min_length`,...M(t),minimum:e})}function Ga(e,t){return new Jr({check:`length_equals`,...M(t),length:e})}function Ka(e,t){return new Xr({check:`string_format`,format:`regex`,...M(t),pattern:e})}function qa(e){return new Zr({check:`string_format`,format:`lowercase`,...M(e)})}function Ja(e){return new Qr({check:`string_format`,format:`uppercase`,...M(e)})}function Ya(e,t){return new $r({check:`string_format`,format:`includes`,...M(t),includes:e})}function Xa(e,t){return new ei({check:`string_format`,format:`starts_with`,...M(t),prefix:e})}function Za(e,t){return new ti({check:`string_format`,format:`ends_with`,...M(t),suffix:e})}function Qa(e){return new ni({check:`overwrite`,tx:e})}function $a(e){return Qa(t=>t.normalize(e))}function eo(){return Qa(e=>e.trim())}function to(){return Qa(e=>e.toLowerCase())}function no(){return Qa(e=>e.toUpperCase())}function ro(){return Qa(e=>An(e))}function io(e,t,n){return new e({type:`array`,element:t,...M(n)})}function ao(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...M(n)})}function oo(e){let t=so(n=>(n.addIssue=e=>{if(typeof e==`string`)n.issues.push(Qn(e,n.value,t._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=n.value,r.inst??=t,r.continue??=!t._zod.def.abort,n.issues.push(Qn(r))}},e(n.value,n)));return t}function so(e,t){let n=new Gr({check:`custom`,...M(t)});return n._zod.check=e,n}function co(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??pa,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function F(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,F(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&I(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&o.schema._prefault&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function lo(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
43
43
|
|
|
44
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function ia(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(a[e.defId]=e.def)}e.external||Object.keys(a).length>0&&(e.target===`draft-2020-12`?i.$defs=a:i.definitions=a);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,`~standard`,{value:{...t[`~standard`],jsonSchema:{input:sa(t,`input`,e.processors),output:sa(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function aa(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return aa(r.element,n);if(r.type===`set`)return aa(r.valueType,n);if(r.type===`lazy`)return aa(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type===`default`||r.type===`prefault`)return aa(r.innerType,n);if(r.type===`intersection`)return aa(r.left,n)||aa(r.right,n);if(r.type===`record`||r.type===`map`)return aa(r.keyType,n)||aa(r.valueType,n);if(r.type===`pipe`)return aa(r.in,n)||aa(r.out,n);if(r.type===`object`){for(let e in r.shape)if(aa(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(aa(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(aa(e,n))return!0;return!!(r.rest&&aa(r.rest,n))}return!1}var oa=(e,t={})=>n=>{let r=ta({...n,processors:t});return na(e,r),ra(r,e),ia(r,e)},sa=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=ta({...i??{},target:a,io:t,processors:n});return na(e,o),ra(o,e),ia(o,e)},ca={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},la=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=ca[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},ua=(e,t,n,r)=>{n.not={}},da=(e,t,n,r)=>{let i=e._zod.def,a=Wt(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},fa=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},pa=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},ma=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=na(a.element,t,{...r,path:[...r.path,`items`]})},ha=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=na(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=na(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},ga=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>na(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},_a=(e,t,n,r)=>{let i=e._zod.def,a=na(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=na(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},va=(e,t,n,r)=>{let i=e._zod.def,a=na(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},ya=(e,t,n,r)=>{let i=e._zod.def;na(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},ba=(e,t,n,r)=>{let i=e._zod.def;na(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},xa=(e,t,n,r)=>{let i=e._zod.def;na(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},Sa=(e,t,n,r)=>{let i=e._zod.def;na(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},Ca=(e,t,n,r)=>{let i=e._zod.def,a=t.io===`input`?i.in._zod.def.type===`transform`?i.out:i.in:i.out;na(a,t,r);let o=t.seen.get(e);o.ref=a},wa=(e,t,n,r)=>{let i=e._zod.def;na(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Ta=(e,t,n,r)=>{let i=e._zod.def;na(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Ea=M(`ZodISODateTime`,(e,t)=>{Dr.init(e,t),Qa.init(e,t)});function Da(e){return Jee(Ea,e)}var Oa=M(`ZodISODate`,(e,t)=>{Or.init(e,t),Qa.init(e,t)});function ka(e){return Yee(Oa,e)}var Aa=M(`ZodISOTime`,(e,t)=>{kr.init(e,t),Qa.init(e,t)});function ja(e){return Xee(Aa,e)}var Ma=M(`ZodISODuration`,(e,t)=>{Ar.init(e,t),Qa.init(e,t)});function Na(e){return Zee(Ma,e)}var Pa=(e,t)=>{Sn.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>Mee(e,t)},flatten:{value:t=>jee(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Gt,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Gt,2)}},isEmpty:{get(){return e.issues.length===0}}})};M(`ZodError`,Pa);var Fa=M(`ZodError`,Pa,{Parent:Error}),Ia=wn(Fa),La=Tn(Fa),Ra=En(Fa),za=On(Fa),Ba=An(Fa),Va=jn(Fa),Ha=Mn(Fa),Ua=Nn(Fa),Wa=Pn(Fa),Ga=Fn(Fa),Ka=In(Fa),qa=Ln(Fa),Ja=M(`ZodType`,(e,t)=>(mr.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:sa(e,`input`),output:sa(e,`output`)}}),e.toJSONSchema=oa(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.check=(...n)=>e.clone(Qt(t,{checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>on(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>Ia(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Ra(e,t,n),e.parseAsync=async(t,n)=>La(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>za(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>Ba(e,t,n),e.decode=(t,n)=>Va(e,t,n),e.encodeAsync=async(t,n)=>Ha(e,t,n),e.decodeAsync=async(t,n)=>Ua(e,t,n),e.safeEncode=(t,n)=>Wa(e,t,n),e.safeDecode=(t,n)=>Ga(e,t,n),e.safeEncodeAsync=async(t,n)=>Ka(e,t,n),e.safeDecodeAsync=async(t,n)=>qa(e,t,n),e.refine=(t,n)=>e.check(es(t,n)),e.superRefine=t=>e.check(ts(t)),e.overwrite=t=>e.check(qi(t)),e.optional=()=>Io(e),e.exactOptional=()=>Ro(e),e.nullable=()=>Bo(e),e.nullish=()=>Io(Bo(e)),e.nonoptional=t=>Ko(e,t),e.array=()=>wo(e),e.or=t=>Oo([e,t]),e.and=t=>Ao(e,t),e.transform=t=>Xo(e,Po(t)),e.default=t=>Ho(e,t),e.prefault=t=>Wo(e,t),e.catch=t=>Jo(e,t),e.pipe=t=>Xo(e,t),e.readonly=()=>Qo(e),e.describe=t=>{let n=e.clone();return Ci.add(n,{description:t}),n},Object.defineProperty(e,`description`,{get(){return Ci.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return Ci.get(e);let n=e.clone();return Ci.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),Ya=M(`_ZodString`,(e,t)=>{hr.init(e,t),Ja.init(e,t),e._zod.processJSONSchema=(t,n,r)=>la(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(ete(...t)),e.includes=(...t)=>e.check(rte(...t)),e.startsWith=(...t)=>e.check(ite(...t)),e.endsWith=(...t)=>e.check(ate(...t)),e.min=(...t)=>e.check(Gi(...t)),e.max=(...t)=>e.check(Wi(...t)),e.length=(...t)=>e.check(Ki(...t)),e.nonempty=(...t)=>e.check(Gi(1,...t)),e.lowercase=t=>e.check(tte(t)),e.uppercase=t=>e.check(nte(t)),e.trim=()=>e.check(ste()),e.normalize=(...t)=>e.check(ote(...t)),e.toLowerCase=()=>e.check(Ji()),e.toUpperCase=()=>e.check(Yi()),e.slugify=()=>e.check(Xi())}),Xa=M(`ZodString`,(e,t)=>{hr.init(e,t),Ya.init(e,t),e.email=t=>e.check(Ti($a,t)),e.url=t=>e.check(ji(no,t)),e.jwt=t=>e.check(qee(vo,t)),e.emoji=t=>e.check(Mi(ro,t)),e.guid=t=>e.check(Ei(eo,t)),e.uuid=t=>e.check(Di(to,t)),e.uuidv4=t=>e.check(Oi(to,t)),e.uuidv6=t=>e.check(ki(to,t)),e.uuidv7=t=>e.check(Ai(to,t)),e.nanoid=t=>e.check(Ni(io,t)),e.guid=t=>e.check(Ei(eo,t)),e.cuid=t=>e.check(Pi(ao,t)),e.cuid2=t=>e.check(Fi(oo,t)),e.ulid=t=>e.check(Ii(so,t)),e.base64=t=>e.check(Ui(ho,t)),e.base64url=t=>e.check(Gee(go,t)),e.xid=t=>e.check(Li(co,t)),e.ksuid=t=>e.check(Ri(lo,t)),e.ipv4=t=>e.check(zi(uo,t)),e.ipv6=t=>e.check(Bi(fo,t)),e.cidrv4=t=>e.check(Vi(po,t)),e.cidrv6=t=>e.check(Hi(mo,t)),e.e164=t=>e.check(Kee(_o,t)),e.datetime=t=>e.check(Da(t)),e.date=t=>e.check(ka(t)),e.time=t=>e.check(ja(t)),e.duration=t=>e.check(Na(t))});function Za(e){return wi(Xa,e)}var Qa=M(`ZodStringFormat`,(e,t)=>{gr.init(e,t),Ya.init(e,t)}),$a=M(`ZodEmail`,(e,t)=>{vr.init(e,t),Qa.init(e,t)}),eo=M(`ZodGUID`,(e,t)=>{Wee.init(e,t),Qa.init(e,t)}),to=M(`ZodUUID`,(e,t)=>{_r.init(e,t),Qa.init(e,t)}),no=M(`ZodURL`,(e,t)=>{yr.init(e,t),Qa.init(e,t)}),ro=M(`ZodEmoji`,(e,t)=>{br.init(e,t),Qa.init(e,t)}),io=M(`ZodNanoID`,(e,t)=>{xr.init(e,t),Qa.init(e,t)}),ao=M(`ZodCUID`,(e,t)=>{Sr.init(e,t),Qa.init(e,t)}),oo=M(`ZodCUID2`,(e,t)=>{Cr.init(e,t),Qa.init(e,t)}),so=M(`ZodULID`,(e,t)=>{wr.init(e,t),Qa.init(e,t)}),co=M(`ZodXID`,(e,t)=>{Tr.init(e,t),Qa.init(e,t)}),lo=M(`ZodKSUID`,(e,t)=>{Er.init(e,t),Qa.init(e,t)}),uo=M(`ZodIPv4`,(e,t)=>{jr.init(e,t),Qa.init(e,t)}),fo=M(`ZodIPv6`,(e,t)=>{Mr.init(e,t),Qa.init(e,t)}),po=M(`ZodCIDRv4`,(e,t)=>{Nr.init(e,t),Qa.init(e,t)}),mo=M(`ZodCIDRv6`,(e,t)=>{Pr.init(e,t),Qa.init(e,t)}),ho=M(`ZodBase64`,(e,t)=>{Ir.init(e,t),Qa.init(e,t)}),go=M(`ZodBase64URL`,(e,t)=>{Rr.init(e,t),Qa.init(e,t)}),_o=M(`ZodE164`,(e,t)=>{zr.init(e,t),Qa.init(e,t)}),vo=M(`ZodJWT`,(e,t)=>{Vr.init(e,t),Qa.init(e,t)}),yo=M(`ZodUnknown`,(e,t)=>{Hr.init(e,t),Ja.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function bo(){return Qee(yo)}var xo=M(`ZodNever`,(e,t)=>{Ur.init(e,t),Ja.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ua(e,t,n,r)});function So(e){return $ee(xo,e)}var Co=M(`ZodArray`,(e,t)=>{Gr.init(e,t),Ja.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ma(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(Gi(t,n)),e.nonempty=t=>e.check(Gi(1,t)),e.max=(t,n)=>e.check(Wi(t,n)),e.length=(t,n)=>e.check(Ki(t,n)),e.unwrap=()=>e.element});function wo(e,t){return Zi(Co,e,t)}var To=M(`ZodObject`,(e,t)=>{Xr.init(e,t),Ja.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ha(e,t,n,r),Xt(e,`shape`,()=>t.shape),e.keyof=()=>Mo(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:bo()}),e.loose=()=>e.clone({...e._zod.def,catchall:bo()}),e.strict=()=>e.clone({...e._zod.def,catchall:So()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>Aee(e,t),e.safeExtend=t=>dn(e,t),e.merge=t=>fn(e,t),e.pick=t=>ln(e,t),e.omit=t=>un(e,t),e.partial=(...t)=>pn(Fo,e,t[0]),e.required=(...t)=>mn(Go,e,t[0])});function Eo(e,t){return new To({type:`object`,shape:e??{},...sn(t)})}var Do=M(`ZodUnion`,(e,t)=>{Qr.init(e,t),Ja.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ga(e,t,n,r),e.options=t.options});function Oo(e,t){return new Do({type:`union`,options:e,...sn(t)})}var ko=M(`ZodIntersection`,(e,t)=>{$r.init(e,t),Ja.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_a(e,t,n,r)});function Ao(e,t){return new ko({type:`intersection`,left:e,right:t})}var jo=M(`ZodEnum`,(e,t)=>{ni.init(e,t),Ja.init(e,t),e._zod.processJSONSchema=(t,n,r)=>da(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new jo({...t,checks:[],...sn(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new jo({...t,checks:[],...sn(r),entries:i})}});function Mo(e,t){return new jo({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...sn(t)})}var No=M(`ZodTransform`,(e,t)=>{ri.init(e,t),Ja.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pa(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Vt(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(bn(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(bn(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Po(e){return new No({type:`transform`,transform:e})}var Fo=M(`ZodOptional`,(e,t)=>{ai.init(e,t),Ja.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ta(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Io(e){return new Fo({type:`optional`,innerType:e})}var Lo=M(`ZodExactOptional`,(e,t)=>{oi.init(e,t),Ja.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ta(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ro(e){return new Lo({type:`optional`,innerType:e})}var zo=M(`ZodNullable`,(e,t)=>{si.init(e,t),Ja.init(e,t),e._zod.processJSONSchema=(t,n,r)=>va(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Bo(e){return new zo({type:`nullable`,innerType:e})}var Vo=M(`ZodDefault`,(e,t)=>{ci.init(e,t),Ja.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ba(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Ho(e,t){return new Vo({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():rn(t)}})}var Uo=M(`ZodPrefault`,(e,t)=>{ui.init(e,t),Ja.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xa(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Wo(e,t){return new Uo({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():rn(t)}})}var Go=M(`ZodNonOptional`,(e,t)=>{di.init(e,t),Ja.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ya(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ko(e,t){return new Go({type:`nonoptional`,innerType:e,...sn(t)})}var qo=M(`ZodCatch`,(e,t)=>{pi.init(e,t),Ja.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Sa(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Jo(e,t){return new qo({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var Yo=M(`ZodPipe`,(e,t)=>{mi.init(e,t),Ja.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ca(e,t,n,r),e.in=t.in,e.out=t.out});function Xo(e,t){return new Yo({type:`pipe`,in:e,out:t})}var Zo=M(`ZodReadonly`,(e,t)=>{gi.init(e,t),Ja.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wa(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Qo(e){return new Zo({type:`readonly`,innerType:e})}var $o=M(`ZodCustom`,(e,t)=>{vi.init(e,t),Ja.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fa(e,t,n,r)});function es(e,t={}){return Qi($o,e,t)}function ts(e){return $i(e)}var ns=[`bar`,`line`,`pie`,`bignumber`,`table`,`scatter`,`funnel`],rs=/(\w+)=(?:"([^"]*)"|'([^']*)'|(true|false|-?(?:\d+\.?\d*|\.\d+)))/g;function is(e){let t={},n=new RegExp(rs.source,rs.flags),r;for(;(r=n.exec(e))!==null;)t[r[1]]=r[2]??r[3]??r[4]??``;return t}function as(e){if(e!==void 0)return e===`true`}function os(e){if(e===void 0)return;let t=Number(e);return Number.isNaN(t)?void 0:t}var ss=/\{%\s*(\w+)\s+((?:(?!\/%\})[\s\S])*)\/%\}/g;function cs(e){let t=[],n=0,r=new RegExp(ss.source,ss.flags),i;for(;(i=r.exec(e))!==null;){let[r,a,o]=i,s=i.index;s>n&&t.push({kind:`text`,content:e.slice(n,s)});let c=a.toLowerCase();if(ns.includes(c)){let e={type:c,attrs:is(o),raw:r};t.push({kind:`chart`,node:e})}else t.push({kind:`text`,content:r});n=s+r.length}return n<e.length&&t.push({kind:`text`,content:e.slice(n)}),t}function ls(e,t){let n=[];switch(e){case`bar`:case`line`:t.sql||n.push({field:`sql`,message:`sql is required`}),t.x||n.push({field:`x`,message:`x is required`}),t.y||n.push({field:`y`,message:`y is required`});break;case`pie`:t.sql||n.push({field:`sql`,message:`sql is required`}),t.name||n.push({field:`name`,message:`name is required`}),t.value||n.push({field:`value`,message:`value is required`});break;case`bignumber`:t.sql||n.push({field:`sql`,message:`sql is required`}),t.value||n.push({field:`value`,message:`value is required`});break;case`table`:t.sql||n.push({field:`sql`,message:`sql is required`});break;case`scatter`:t.sql||n.push({field:`sql`,message:`sql is required`}),t.x||n.push({field:`x`,message:`x is required`}),t.y||n.push({field:`y`,message:`y is required`});break;case`funnel`:t.sql||n.push({field:`sql`,message:`sql is required`}),t.name||n.push({field:`name`,message:`name is required`}),t.value||n.push({field:`value`,message:`value is required`});break}return n.length>0?{valid:!1,errors:n}:{valid:!0}}var us=function(e,t){return us=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])},us(e,t)};function N(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);us(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var ds=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),fs=new(function(){function e(){this.browser=new ds,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<`u`}return e}());typeof wx==`object`&&typeof wx.getSystemInfoSync==`function`?(fs.wxa=!0,fs.touchEventsSupported=!0):typeof document>`u`&&typeof self<`u`?fs.worker=!0:!fs.hasGlobalWindow||`Deno`in window||typeof navigator<`u`&&typeof navigator.userAgent==`string`&&navigator.userAgent.indexOf(`Node.js`)>-1?(fs.node=!0,fs.svgSupported=!0):ps(navigator.userAgent,fs);function ps(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 ms=`12px sans-serif`,hs=20,gs=100,_s=`007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N`;function cte(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)-hs)/gs}return t}var lte=cte(_s),vs={createCanvas:function(){return typeof document<`u`&&document.createElement(`canvas`)},measureText:(function(){var e,t;return function(n,r){if(!e){var i=vs.createCanvas();e=i&&i.getContext(`2d`)}if(e)return t!==r&&(t=e.font=r||`12px sans-serif`),e.measureText(n);n||=``,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=lte[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}},ys=Ps([`Function`,`RegExp`,`Date`,`Error`,`CanvasGradient`,`CanvasPattern`,`Image`,`Canvas`],function(e,t){return e[`[object `+t+`]`]=!0,e},{}),bs=Ps([`Int8`,`Uint8`,`Uint8Clamped`,`Int16`,`Uint16`,`Int32`,`Uint32`,`Float32`,`Float64`],function(e,t){return e[`[object `+t+`Array]`]=!0,e},{}),xs=Object.prototype.toString,Ss=Array.prototype,ute=Ss.forEach,dte=Ss.filter,Cs=Ss.slice,fte=Ss.map,ws=function(){}.constructor,Ts=ws?ws.prototype:null,Es=`__proto__`,pte=2311;function Ds(){return pte++}function Os(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];typeof console<`u`&&console.error.apply(console,e)}function P(e){if(typeof e!=`object`||!e)return e;var t=e,n=xs.call(e);if(n===`[object Array]`){if(!ec(e)){t=[];for(var r=0,i=e.length;r<i;r++)t[r]=P(e[r])}}else if(bs[n]){if(!ec(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(!ys[n]&&!ec(e)&&!Us(e))for(var o in t={},e)e.hasOwnProperty(o)&&o!==Es&&(t[o]=P(e[o]));return t}function ks(e,t,n){if(!U(t)||!U(e))return n?P(t):e;for(var r in t)if(t.hasOwnProperty(r)&&r!==Es){var i=e[r],a=t[r];U(a)&&U(i)&&!B(a)&&!B(i)&&!Us(a)&&!Us(i)&&!Vs(a)&&!Vs(i)&&!ec(a)&&!ec(i)?ks(i,a,n):(n||!(r in e))&&(e[r]=P(t[r]))}return e}function As(e,t){for(var n=e[0],r=1,i=e.length;r<i;r++)n=ks(n,e[r],t);return n}function F(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==Es&&(e[n]=t[n]);return e}function I(e,t,n){for(var r=Ls(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}vs.createCanvas;function js(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 mte(e,t){var n=e.prototype;function r(){}for(var i in r.prototype=t.prototype,e.prototype=new r,n)n.hasOwnProperty(i)&&(e.prototype[i]=n[i]);e.prototype.constructor=e,e.superClass=t}function Ms(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 I(e,t,n)}function Ns(e){return!e||typeof e==`string`?!1:typeof e.length==`number`}function L(e,t,n){if(e&&t)if(e.forEach&&e.forEach===ute)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)}function R(e,t,n){if(!e)return[];if(!t)return Ys(e);if(e.map&&e.map===fte)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}function Ps(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 Fs(e,t,n){if(!e)return[];if(!t)return Ys(e);if(e.filter&&e.filter===dte)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 Is(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 Ls(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 hte(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return function(){return e.apply(t,n.concat(Cs.call(arguments)))}}var z=Ts&&V(Ts.bind)?Ts.call.bind(Ts.bind):hte;function Rs(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){return e.apply(this,t.concat(Cs.call(arguments)))}}function B(e){return Array.isArray?Array.isArray(e):xs.call(e)===`[object Array]`}function V(e){return typeof e==`function`}function H(e){return typeof e==`string`}function zs(e){return xs.call(e)===`[object String]`}function Bs(e){return typeof e==`number`}function U(e){var t=typeof e;return t===`function`||!!e&&t===`object`}function Vs(e){return!!ys[xs.call(e)]}function Hs(e){return!!bs[xs.call(e)]}function Us(e){return typeof e==`object`&&typeof e.nodeType==`number`&&typeof e.ownerDocument==`object`}function Ws(e){return e.colorStops!=null}function gte(e){return e.image!=null}function Gs(e){return xs.call(e)===`[object RegExp]`}function Ks(e){return e!==e}function qs(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e.length;n<r;n++)if(e[n]!=null)return e[n]}function W(e,t){return e??t}function Js(e,t,n){return e??t??n}function Ys(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return Cs.apply(e,t)}function Xs(e){if(typeof e==`number`)return[e,e,e,e];var t=e.length;return t===2?[e[0],e[1],e[0],e[1]]:t===3?[e[0],e[1],e[2],e[1]]:e}function G(e,t){if(!e)throw Error(t)}function Zs(e){return e==null?null:typeof e.trim==`function`?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``)}var Qs=`__ec_primitive__`;function $s(e){e[Qs]=!0}function ec(e){return e[Qs]}var _te=function(){function e(){this.data={}}return e.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},e.prototype.has=function(e){return this.data.hasOwnProperty(e)},e.prototype.get=function(e){return this.data[e]},e.prototype.set=function(e,t){return this.data[e]=t,this},e.prototype.keys=function(){return Ls(this.data)},e.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},e}(),tc=typeof Map==`function`;function vte(){return tc?new Map:new _te}var yte=function(){function e(t){var n=B(t);this.data=vte();var r=this;t instanceof e?t.each(i):t&&L(t,i);function i(e,t){n?r.set(e,t):r.set(t,e)}}return e.prototype.hasKey=function(e){return this.data.has(e)},e.prototype.get=function(e){return this.data.get(e)},e.prototype.set=function(e,t){return this.data.set(e,t),t},e.prototype.each=function(e,t){this.data.forEach(function(n,r){e.call(t,n,r)})},e.prototype.keys=function(){var e=this.data.keys();return tc?Array.from(e):e},e.prototype.removeKey=function(e){this.data.delete(e)},e}();function K(e){return new yte(e)}function nc(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 rc(e,t){var n;if(Object.create)n=Object.create(e);else{var r=function(){};r.prototype=e,n=new r}return t&&F(n,t),n}function ic(e){var t=e.style;t.webkitUserSelect=`none`,t.userSelect=`none`,t.webkitTapHighlightColor=`rgba(0,0,0,0)`,t[`-webkit-touch-callout`]=`none`}function q(e,t){return e.hasOwnProperty(t)}function ac(){}var oc=180/Math.PI,sc=function(e,t){return sc=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])},sc(e,t)};function cc(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);sc(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function lc(e,t){return e??=0,t??=0,[e,t]}function uc(e,t){return e[0]=t[0],e[1]=t[1],e}function dc(e){return[e[0],e[1]]}function fc(e,t,n){return e[0]=t,e[1]=n,e}function pc(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function mc(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e}function hc(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function gc(e){return Math.sqrt(_c(e))}function _c(e){return e[0]*e[0]+e[1]*e[1]}function vc(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function yc(e,t){var n=gc(t);return n===0?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e}function bc(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var xc=bc;function Sc(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var Cc=Sc;function wc(e,t,n,r){return e[0]=t[0]+r*(n[0]-t[0]),e[1]=t[1]+r*(n[1]-t[1]),e}function Tc(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}function Ec(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function Dc(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var Oc=function(){function e(e,t){this.target=e,this.topTarget=t&&t.topTarget}return e}(),kc=function(){function e(e){this.handler=e,e.on(`mousedown`,this._dragStart,this),e.on(`mousemove`,this._drag,this),e.on(`mouseup`,this._dragEnd,this)}return e.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 Oc(t,e),`dragstart`,e.event))},e.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 Oc(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 Oc(s,e),`dragleave`,e.event),o&&o!==s&&this.handler.dispatchToElement(new Oc(o,e),`dragenter`,e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new Oc(t,e),`dragend`,e.event),this._dropTarget&&this.handler.dispatchToElement(new Oc(this._dropTarget,e),`drop`,e.event),this._draggingTarget=null,this._dropTarget=null},e}(),Ac=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,r){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},e.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},e.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},e.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var r=this._$handlers[e],i=this._$eventProcessor;if(r)for(var a=t.length,o=r.length,s=0;s<o;s++){var c=r[s];if(!(i&&i.filter&&c.query!=null&&!i.filter(e,c.query)))switch(a){case 0:c.h.call(c.ctx);break;case 1:c.h.call(c.ctx,t[0]);break;case 2:c.h.call(c.ctx,t[0],t[1]);break;default:c.h.apply(c.ctx,t);break}}return i&&i.afterTrigger&&i.afterTrigger(e),this},e.prototype.triggerWithContext=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var r=this._$handlers[e],i=this._$eventProcessor;if(r)for(var a=t.length,o=t[a-1],s=r.length,c=0;c<s;c++){var l=r[c];if(!(i&&i.filter&&l.query!=null&&!i.filter(e,l.query)))switch(a){case 0:l.h.call(o);break;case 1:l.h.call(o,t[0]);break;case 2:l.h.call(o,t[0],t[1]);break;default:l.h.apply(o,t.slice(1,a-1));break}}return i&&i.afterTrigger&&i.afterTrigger(e),this},e}(),jc=Math.log(2);function Mc(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)/jc);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]*Mc(e,t-1,u,l,i|m,a),p++)}return a[o]=d,d}function Nc(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=Mc(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)*Mc(n,7,+(o===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 Pc=`___zrEVENTSAVED`,Fc=[];function Ic(e,t,n,r,i){return Rc(Fc,t,r,i,!0)&&Rc(e,n,Fc[0],Fc[1])}function Lc(e,t){e&&n(e),t&&n(t);function n(e){var t=e[Pc];t&&(t.clearMarkers&&t.clearMarkers(),delete e[Pc])}}function Rc(e,t,n,r,i){if(t.getBoundingClientRect&&fs.domSupported&&!Vc(t)){var a=t[Pc]||(t[Pc]={}),o=Bc(zc(t,a),a,i);if(o)return o(e,n,r),!0}return!1}function zc(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(){L(n,function(e){e.parentNode&&e.parentNode.removeChild(e)})},n}function Bc(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?Nc(s,o):Nc(o,s))}function Vc(e){return e.nodeName.toUpperCase()===`CANVAS`}var Hc=/([&<>"'])/g,Uc={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function Wc(e){return e==null?``:(e+``).replace(Hc,function(e,t){return Uc[t]})}var Gc=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Kc=[],qc=fs.browser.firefox&&+fs.browser.version.split(`.`)[0]<39;function Jc(e,t,n,r){return n||={},r?Yc(e,t,n):qc&&t.layerX!=null&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):t.offsetX==null?Yc(e,t,n):(n.zrX=t.offsetX,n.zrY=t.offsetY),n}function Yc(e,t,n){if(fs.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(Vc(e)){var a=e.getBoundingClientRect();n.zrX=r-a.left,n.zrY=i-a.top;return}else if(Rc(Kc,e,r,i)){n.zrX=Kc[0],n.zrY=Kc[1];return}}n.zrX=n.zrY=0}function Xc(e){return e||window.event}function Zc(e,t,n){if(t=Xc(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&&Jc(e,i,t,n)}else{Jc(e,t,t,n);var a=Qc(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return t.which==null&&o!==void 0&&Gc.test(t.type)&&(t.which=o&1?1:o&2?3:o&4?2:0),t}function Qc(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=Math.abs(r===0?n:r),a=r>0?-1:r<0?1:n>0?-1:1;return 3*i*a}function $c(e,t,n,r){e.addEventListener(t,n,r)}function el(e,t,n,r){e.removeEventListener(t,n,r)}var tl=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function nl(e){return e.which===2||e.which===3}var rl=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.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=Jc(n,s,{});i.points.push([c.zrX,c.zrY]),i.touches.push(s)}this._track.push(i)}},e.prototype._recognize=function(e){for(var t in ol)if(ol.hasOwnProperty(t)){var n=ol[t](this._track,e);if(n)return n}},e}();function il(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}function al(e){return[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]}var ol={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=il(r)/il(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=al(r);return t.pinchX=o[0],t.pinchY=o[1],{type:`pinch`,target:e[0].target,event:t}}}}};function sl(){return[1,0,0,1,0,0]}function cl(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function ll(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 ul(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 dl(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 fl(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 pl(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 ml(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}function bte(e){var t=sl();return ll(t,e),t}var J=function(){function e(e,t){this.x=e||0,this.y=t||0}return e.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(e,t){return this.x=e,this.y=t,this},e.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},e.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.scale=function(e){this.x*=e,this.y*=e},e.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},e.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},e.prototype.dot=function(e){return this.x*e.x+this.y*e.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},e.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},e.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.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}},e.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},e.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},e.set=function(e,t,n){e.x=t,e.y=n},e.copy=function(e,t){e.x=t.x,e.y=t.y},e.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},e.lenSquare=function(e){return e.x*e.x+e.y*e.y},e.dot=function(e,t){return e.x*t.x+e.y*t.y},e.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},e.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},e.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},e.scaleAndAdd=function(e,t,n,r){e.x=t.x+n.x*r,e.y=t.y+n.y*r},e.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},e}(),hl=Math.min,gl=Math.max,_l=Math.abs,vl=[`x`,`y`],yl=[`width`,`height`],bl=new J,xl=new J,Sl=new J,Cl=new J,wl=Ml(),Tl=wl.minTv,El=wl.maxTv,Dl=[0,0],Ol=function(){function e(t,n,r,i){e.set(this,t,n,r,i)}return e.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},e.prototype.union=function(e){var t=hl(e.x,this.x),n=hl(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=gl(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=gl(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=t,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(e){var t=this,n=e.width/t.width,r=e.height/t.height,i=sl();return dl(i,i,[-t.x,-t.y]),pl(i,i,[n,r]),dl(i,i,[e.x,e.y]),i},e.prototype.intersect=function(t,n,r){return e.intersect(this,t,n,r)},e.intersect=function(t,n,r,i){r&&J.set(r,0,0);var a=i&&i.outIntersectRect||null,o=i&&i.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!t||!n)return!1;t instanceof e||(t=e.set(kl,t.x,t.y,t.width,t.height)),n instanceof e||(n=e.set(Al,n.x,n.y,n.width,n.height));var s=!!r;wl.reset(i,s);var c=wl.touchThreshold,l=t.x+c,u=t.x+t.width-c,d=t.y+c,f=t.y+t.height-c,p=n.x+c,m=n.x+n.width-c,h=n.y+c,g=n.y+n.height-c;if(l>u||d>f||p>m||h>g)return!1;var _=!(u<p||m<l||f<h||g<d);return(s||a)&&(Dl[0]=1/0,Dl[1]=0,jl(l,u,p,m,0,s,a,o),jl(d,f,h,g,1,s,a,o),s&&J.copy(r,_?wl.useDir?wl.dirMinTv:Tl:El)),_},e.contain=function(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},e.prototype.contain=function(t,n){return e.contain(this,t,n)},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(t){e.copy(this,t)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return this.width===0||this.height===0},e.create=function(t){return new e(t.x,t.y,t.width,t.height)},e.copy=function(e,t){return e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e},e.applyTransform=function(t,n,r){if(!r){t!==n&&e.copy(t,n);return}if(r[1]<1e-5&&r[1]>-1e-5&&r[2]<1e-5&&r[2]>-1e-5){var i=r[0],a=r[3],o=r[4],s=r[5];t.x=n.x*i+o,t.y=n.y*a+s,t.width=n.width*i,t.height=n.height*a,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}bl.x=Sl.x=n.x,bl.y=Cl.y=n.y,xl.x=Cl.x=n.x+n.width,xl.y=Sl.y=n.y+n.height,bl.transform(r),Cl.transform(r),xl.transform(r),Sl.transform(r),t.x=hl(bl.x,xl.x,Sl.x,Cl.x),t.y=hl(bl.y,xl.y,Sl.y,Cl.y);var c=gl(bl.x,xl.x,Sl.x,Cl.x),l=gl(bl.y,xl.y,Sl.y,Cl.y);t.width=c-t.x,t.height=l-t.y},e}(),kl=new Ol(0,0,0,0),Al=new Ol(0,0,0,0);function jl(e,t,n,r,i,a,o,s){var c=_l(t-n),l=_l(r-e),u=hl(c,l),d=vl[i],f=vl[1-i],p=yl[i];t<n||r<e?c<l?(a&&(El[d]=-c),s&&(o[d]=t,o[p]=0)):(a&&(El[d]=l),s&&(o[d]=e,o[p]=0)):(o&&(o[d]=gl(e,n),o[p]=hl(t,r)-o[d]),a&&(u<Dl[0]||wl.useDir)&&(Dl[0]=hl(u,Dl[0]),(c<l||!wl.bidirectional)&&(Tl[d]=c,Tl[f]=0,wl.useDir&&wl.calcDirMTV()),(c>=l||!wl.bidirectional)&&(Tl[d]=-l,Tl[f]=0,wl.useDir&&wl.calcDirMTV())))}function Ml(){var e=0,t=new J,n=new J,r={minTv:new J,maxTv:new J,useDir:!1,dirMinTv:new J,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,a){r.touchThreshold=0,i&&i.touchThreshold!=null&&(r.touchThreshold=gl(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 a=r.minTv,o=r.dirMinTv,s=a.y*a.y+a.x*a.x,c=Math.sin(e),l=Math.cos(e),u=c*a.y+l*a.x;if(i(u)){i(a.x)&&i(a.y)&&o.set(0,0);return}if(n.x=s*l/u,n.y=s*c/u,i(n.x)&&i(n.y)){o.set(0,0);return}(r.bidirectional||t.dot(n)>0)&&n.len()<o.len()&&o.copy(n)}};function i(e){return _l(e)<1e-10}return r}var Nl=`silent`;function Pl(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:Fl}}function Fl(){tl(this.event)}var Il=function(e){cc(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.handler=null,t}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(Ac),Ll=function(){function e(e,t){this.x=e,this.y=t}return e}(),Rl=[`click`,`dblclick`,`mousewheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],zl=new Ol(0,0,0,0),Bl=function(e){cc(t,e);function t(t,n,r,i,a){var o=e.call(this)||this;return o._hovered=new Ll(0,0),o.storage=t,o.painter=n,o.painterRoot=i,o._pointerSize=a,r||=new Il,o.proxy=null,o.setHandlerProxy(r),o._draggingMgr=new kc(o),o}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(L(Rl,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var t=e.zrX,n=e.zrY,r=Ul(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 Ll(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)},t.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})},t.prototype.resize=function(){this._hovered=new Ll(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){e||={};var r=e.target;if(!(r&&r.silent)){for(var i=`on`+t,a=Pl(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)}))}},t.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),i=new Ll(e,t);if(Hl(r,i,e,t,n),this._pointerSize&&!i.target){for(var a=[],o=this._pointerSize,s=o/2,c=new Ol(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)&&(zl.copy(u.getBoundingRect()),u.transform&&zl.applyTransform(u.transform),zl.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(Hl(a,i,e+m*Math.cos(h),t+m*Math.sin(h),n),i.target)return i}}return i},t.prototype.processGesture=function(e,t){this._gestureMgr||=new rl;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 Ll;a.target=r.target,this.dispatchToElement(a,i,r.event)}},t}(Ac);L([`click`,`mousedown`,`mouseup`,`mousewheel`,`dblclick`,`contextmenu`],function(e){Bl.prototype[e]=function(t){var n=t.zrX,r=t.zrY,i=Ul(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||xc(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function Vl(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?Nl:!0}return!1}function Hl(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=Vl(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==Nl)){t.target=o;break}}}function Ul(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var Wl=32,Gl=7;function Kl(e){for(var t=0;e>=Wl;)t|=e&1,e>>=1;return e+t}function ql(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++;Jl(e,t,i)}else for(;i<n&&r(e[i],e[i-1])>=0;)i++;return i-t}function Jl(e,t,n){for(n--;t<n;){var r=e[t];e[t++]=e[n],e[n--]=r}}function Yl(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 Xl(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 Zl(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 Ql(e,t){var n=Gl,r,i,a=0,o=[];r=[],i=[];function s(e,t){r[a]=e,i[a]=t,a+=1}function c(){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;u(e)}}function l(){for(;a>1;){var e=a-2;e>0&&i[e-1]<i[e+1]&&e--,u(e)}}function u(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=Zl(e[c],e,o,s,0,t);o+=u,s-=u,s!==0&&(l=Xl(e[o+s-1],e,c,l,l-1,t),l!==0&&(s<=l?d(o,s,c,l):f(o,s,c,l)))}function d(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=Zl(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=Xl(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>=Gl||m>=Gl);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 f(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-Zl(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-Xl(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>=Gl||g>=Gl);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:c,forceMergeRuns:l,pushRun:s}}function $l(e,t,n,r){n||=0,r||=e.length;var i=r-n;if(!(i<2)){var a=0;if(i<Wl){a=ql(e,n,r,t),Yl(e,n,r,n+a,t);return}var o=Ql(e,t),s=Kl(i);do{if(a=ql(e,n,r,t),a<s){var c=i;c>s&&(c=s),Yl(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 eu=!1;function tu(){eu||(eu=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function nu(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var ru=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=nu}return e.prototype.traverse=function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},e.prototype.getDisplayList=function(e,t){t||=!1;var n=this._displayList;return(e||!n.length)&&this.updateDisplayList(t),n},e.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,$l(n,nu)},e.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||=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)&&(tu(),p.z=0),isNaN(p.z2)&&(tu(),p.z2=0),isNaN(p.zlevel)&&(tu(),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)}},e.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},e.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=js(this._roots,e);r>=0&&this._roots.splice(r,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),iu=fs.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)},au={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-au.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?au.bounceIn(e*2)*.5:au.bounceOut(e*2-1)*.5+.5}},ou=Math.pow,su=Math.sqrt,cu=1e-8,lu=1e-4,uu=su(3),du=1/3,fu=lc(),pu=lc(),mu=lc();function hu(e){return e>-cu&&e<cu}function gu(e){return e>cu||e<-cu}function _u(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 vu(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)}function yu(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(hu(u)&&hu(d))if(hu(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(hu(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=su(h),y=u*s+1.5*o*(-d+v),b=u*s+1.5*o*(-d-v);y=y<0?-ou(-y,du):ou(y,du),b=b<0?-ou(-b,du):ou(b,du);var m=(-s-(y+b))/(3*o);m>=0&&m<=1&&(a[p++]=m)}else{var x=(2*u*s-3*o*d)/(2*su(u*u*u)),S=Math.acos(x)/3,C=su(u),w=Math.cos(S),m=(-s-2*C*w)/(3*o),_=(-s+C*(w+uu*Math.sin(S)))/(3*o),T=(-s+C*(w-uu*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 bu(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(hu(o)){if(gu(a)){var l=-s/a;l>=0&&l<=1&&(i[c++]=l)}}else{var u=a*a-4*o*s;if(hu(u))i[0]=-a/(2*o);else if(u>0){var d=su(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 xu(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 Su(e,t,n,r,i,a,o,s,c,l,u){var d,f=.005,p=1/0,m,h,g,_;fu[0]=c,fu[1]=l;for(var v=0;v<1;v+=.05)pu[0]=_u(e,n,i,o,v),pu[1]=_u(t,r,a,s,v),g=Cc(fu,pu),g<p&&(d=v,p=g);p=1/0;for(var y=0;y<32&&!(f<lu);y++)m=d-f,h=d+f,pu[0]=_u(e,n,i,o,m),pu[1]=_u(t,r,a,s,m),g=Cc(pu,fu),m>=0&&g<p?(d=m,p=g):(mu[0]=_u(e,n,i,o,h),mu[1]=_u(t,r,a,s,h),_=Cc(mu,fu),h<=1&&_<p?(d=h,p=_):f*=.5);return u&&(u[0]=_u(e,n,i,o,d),u[1]=_u(t,r,a,s,d)),su(p)}function xte(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=_u(e,n,i,o,m),g=_u(t,r,a,s,m),_=h-l,v=g-u;d+=Math.sqrt(_*_+v*v),l=h,u=g}return d}function Cu(e,t,n,r){var i=1-r;return i*(i*e+2*r*t)+r*r*n}function wu(e,t,n,r){return 2*((1-r)*(t-e)+r*(n-t))}function Ste(e,t,n,r,i){var a=e-2*t+n,o=2*(t-e),s=e-r,c=0;if(hu(a)){if(gu(o)){var l=-s/o;l>=0&&l<=1&&(i[c++]=l)}}else{var u=o*o-4*a*s;if(hu(u)){var l=-o/(2*a);l>=0&&l<=1&&(i[c++]=l)}else if(u>0){var d=su(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 Tu(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function Eu(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 Du(e,t,n,r,i,a,o,s,c){var l,u=.005,d=1/0;fu[0]=o,fu[1]=s;for(var f=0;f<1;f+=.05){pu[0]=Cu(e,n,i,f),pu[1]=Cu(t,r,a,f);var p=Cc(fu,pu);p<d&&(l=f,d=p)}d=1/0;for(var m=0;m<32&&!(u<lu);m++){var h=l-u,g=l+u;pu[0]=Cu(e,n,i,h),pu[1]=Cu(t,r,a,h);var p=Cc(pu,fu);if(h>=0&&p<d)l=h,d=p;else{mu[0]=Cu(e,n,i,g),mu[1]=Cu(t,r,a,g);var _=Cc(mu,fu);g<=1&&_<d?(l=g,d=_):u*=.5}}return c&&(c[0]=Cu(e,n,i,l),c[1]=Cu(t,r,a,l)),su(d)}function Cte(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=Cu(e,n,i,f),m=Cu(t,r,a,f),h=p-s,g=m-c;l+=Math.sqrt(h*h+g*g),s=p,c=m}return l}var Ou=/cubic-bezier\(([0-9,\.e ]+)\)/;function ku(e){var t=e&&Ou.exec(e);if(t){var n=t[1].split(`,`),r=+Zs(n[0]),i=+Zs(n[1]),a=+Zs(n[2]),o=+Zs(n[3]);if(isNaN(r+i+a+o))return;var s=[];return function(e){return e<=0?0:e>=1?1:yu(0,r,a,1,e,s)&&_u(0,i,o,1,s[0])}}}var Au=function(){function e(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||ac,this.ondestroy=e.ondestroy||ac,this.onrestart=e.onrestart||ac,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||=(this._startTime=e+this._delay,!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},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=V(e)?e:au[e]||ku(e)},e}(),ju=function(){function e(e){this.value=e}return e}(),Mu=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new ju(e);return this.insertEntry(t),t},e.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++},e.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--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),Nu=function(){function e(e){this._list=new Mu,this._maxSize=10,this._map={},this._maxSize=e}return e.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 ju(t),o.key=e,n.insertEntry(o),r[e]=o}return i},e.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},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),Pu={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 Fu(e){return e=Math.round(e),e<0?0:e>255?255:e}function Iu(e){return e=Math.round(e),e<0?0:e>360?360:e}function Lu(e){return e<0?0:e>1?1:e}function Ru(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?Fu(parseFloat(t)/100*255):Fu(parseInt(t,10))}function zu(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?Lu(parseFloat(t)/100):Lu(parseFloat(t))}function Bu(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 Vu(e,t,n){return e+(t-e)*n}function Hu(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function Uu(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var Wu=new Nu(20),Gu=null;function Ku(e,t){Gu&&Uu(Gu,t),Gu=Wu.put(e,Gu||t.slice())}function qu(e,t){if(e){t||=[];var n=Wu.get(e);if(n)return Uu(t,n);e+=``;var r=e.replace(/ /g,``).toLowerCase();if(r in Pu)return Uu(t,Pu[r]),Ku(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)){Hu(t,0,0,0,1);return}return Hu(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),Ku(e,t),t}else if(i===7||i===9){var a=parseInt(r.slice(1,7),16);if(!(a>=0&&a<=16777215)){Hu(t,0,0,0,1);return}return Hu(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(r.slice(7),16)/255:1),Ku(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?Hu(t,+l[0],+l[1],+l[2],1):Hu(t,0,0,0,1);u=zu(l.pop());case`rgb`:if(l.length>=3)return Hu(t,Ru(l[0]),Ru(l[1]),Ru(l[2]),l.length===3?u:zu(l[3])),Ku(e,t),t;Hu(t,0,0,0,1);return;case`hsla`:if(l.length!==4){Hu(t,0,0,0,1);return}return l[3]=zu(l[3]),Ju(l,t),Ku(e,t),t;case`hsl`:if(l.length!==3){Hu(t,0,0,0,1);return}return Ju(l,t),Ku(e,t),t;default:return}}Hu(t,0,0,0,1)}}function Ju(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=zu(e[1]),i=zu(e[2]),a=i<=.5?i*(r+1):i+r-i*r,o=i*2-a;return t||=[],Hu(t,Fu(Bu(o,a,n+1/3)*255),Fu(Bu(o,a,n)*255),Fu(Bu(o,a,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function Yu(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 Xu(e,t){var n=qu(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 td(n,n.length===4?`rgba`:`rgb`)}}function Zu(e,t,n){if(!(!(t&&t.length)||!(e>=0&&e<=1))){n||=[];var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=t[i],s=t[a],c=r-i;return n[0]=Fu(Vu(o[0],s[0],c)),n[1]=Fu(Vu(o[1],s[1],c)),n[2]=Fu(Vu(o[2],s[2],c)),n[3]=Lu(Vu(o[3],s[3],c)),n}}function Qu(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=qu(t[i]),s=qu(t[a]),c=r-i,l=td([Fu(Vu(o[0],s[0],c)),Fu(Vu(o[1],s[1],c)),Fu(Vu(o[2],s[2],c)),Lu(Vu(o[3],s[3],c))],`rgba`);return n?{color:l,leftIndex:i,rightIndex:a,value:r}:l}}function $u(e,t,n,r){var i=qu(e);if(e)return i=Yu(i),t!=null&&(i[0]=Iu(V(t)?t(i[0]):t)),n!=null&&(i[1]=zu(V(n)?n(i[1]):n)),r!=null&&(i[2]=zu(V(r)?r(i[2]):r)),td(Ju(i),`rgba`)}function ed(e,t){var n=qu(e);if(n&&t!=null)return n[3]=Lu(t),td(n,`rgba`)}function td(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 nd(e,t){var n=qu(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var rd=new Nu(100);function id(e){if(H(e)){var t=rd.get(e);return t||(t=Xu(e,-.1),rd.put(e,t)),t}else if(Ws(e)){var n=F({},e);return n.colorStops=R(e.colorStops,function(e){return{offset:e.offset,color:Xu(e.color,-.1)}}),n}return e}var ad=Math.round;function od(e){var t;if(!e||e===`transparent`)e=`none`;else if(typeof e==`string`&&e.indexOf(`rgba`)>-1){var n=qu(e);n&&(e=`rgb(`+n[0]+`,`+n[1]+`,`+n[2]+`)`,t=n[3])}return{color:e,opacity:t??1}}var sd=1e-4;function cd(e){return e<sd&&e>-sd}function ld(e){return ad(e*1e3)/1e3}function ud(e){return ad(e*1e4)/1e4}function dd(e){return`matrix(`+ld(e[0])+`,`+ld(e[1])+`,`+ld(e[2])+`,`+ld(e[3])+`,`+ud(e[4])+`,`+ud(e[5])+`)`}var fd={left:`start`,right:`end`,center:`middle`,middle:`middle`};function pd(e,t,n){return n===`top`?e+=t/2:n===`bottom`&&(e-=t/2),e}function md(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}function hd(e){var t=e.style,n=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(`,`)}function gd(e){return e&&!!e.image}function _d(e){return e&&!!e.svgElement}function vd(e){return gd(e)||_d(e)}function yd(e){return e.type===`linear`}function bd(e){return e.type===`radial`}function xd(e){return e&&(e.type===`linear`||e.type===`radial`)}function Sd(e){return`url(#`+e+`)`}function Cd(e){var t=e.getGlobalScale(),n=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function wd(e){var t=e.x||0,n=e.y||0,r=(e.rotation||0)*oc,i=W(e.scaleX,1),a=W(e.scaleY,1),o=e.skewX||0,s=e.skewY||0,c=[];return(t||n)&&c.push(`translate(`+t+`px,`+n+`px)`),r&&c.push(`rotate(`+r+`)`),(i!==1||a!==1)&&c.push(`scale(`+i+`,`+a+`)`),(o||s)&&c.push(`skew(`+ad(o*oc)+`deg, `+ad(s*oc)+`deg)`),c.join(` `)}var Td=(function(){return fs.hasGlobalWindow&&V(window.btoa)?function(e){return window.btoa(unescape(encodeURIComponent(e)))}:typeof Buffer<`u`?function(e){return Buffer.from(e).toString(`base64`)}:function(e){return process.env.NODE_ENV!==`production`&&Os(`Base64 isn't natively supported in the current environment.`),null}})(),Ed=Array.prototype.slice;function Dd(e,t,n){return(t-e)*n+e}function Od(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=Dd(t[a],n[a],r);return e}function kd(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]=Dd(t[o][s],n[o][s],r)}return e}function Ad(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=t[a]+n[a]*r;return e}function jd(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 Md(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 Nd(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]:Ed.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 Pd(e){if(Ns(e)){var t=e.length;if(Ns(e[0])){for(var n=[],r=0;r<t;r++)n.push(Ed.call(e[r]));return n}return Ed.call(e)}return e}function Fd(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 Id(e){return Ns(e&&e[0])?2:1}var Ld=0,Rd=1,zd=2,Bd=3,Vd=4,Hd=5,Ud=6;function Wd(e){return e===Vd||e===Hd}function Gd(e){return e===Rd||e===zd}var Kd=[0,0,0,0],qd=function(){function e(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return e.prototype.isFinished=function(){return this._finished},e.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},e.prototype.needsAnimate=function(){return this.keyframes.length>=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,i=r.length,a=!1,o=Ud,s=t;if(Ns(t)){var c=Id(t);o=c,(c===1&&!Bs(t[0])||c===2&&!Bs(t[0][0]))&&(a=!0)}else if(Bs(t)&&!Ks(t))o=Ld;else if(H(t))if(!isNaN(+t))o=Ld;else{var l=qu(t);l&&(s=l,o=Bd)}else if(Ws(t)){var u=F({},s);u.colorStops=R(t.colorStops,function(e){return{offset:e.offset,color:qu(e.color)}}),yd(t)?o=Vd:bd(t)&&(o=Hd),s=u}i===0?this.valType=o:(o!==this.valType||o===Ud)&&(a=!0),this.discrete=this.discrete||a;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=V(n)?n:au[n]||ku(n)),r.push(d),d},e.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=Gd(r),c=Wd(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?Nd(d,f,r):c&&Md(d.colorStops,f.colorStops))}if(!o&&r!==Hd&&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===Ld?n[l].additiveValue=n[l].value-p:r===Bd?n[l].additiveValue=Ad([],n[l].value,p,-1):Gd(r)&&(n[l].additiveValue=r===Rd?Ad([],n[l].value,p,-1):jd([],n[l].value,p,-1))}},e.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===Bd,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?Kd:e[s];if((Gd(i)||c)&&!g&&(g=this._additiveValue=[]),this.discrete)e[s]=h<1?f.rawValue:p.rawValue;else if(Gd(i))i===Rd?Od(g,f[r],p[r],h):kd(g,f[r],p[r],h);else if(Wd(i)){var _=f[r],v=p[r],y=i===Vd;e[s]={type:y?`linear`:`radial`,x:Dd(_.x,v.x,h),y:Dd(_.y,v.y,h),colorStops:R(_.colorStops,function(e,t){var n=v.colorStops[t];return{offset:Dd(e.offset,n.offset,h),color:Fd(Od([],e.color,n.color,h))}}),global:v.global},y?(e[s].x2=Dd(_.x2,v.x2,h),e[s].y2=Dd(_.y2,v.y2,h)):e[s].r=Dd(_.r,v.r,h)}else if(c)Od(g,f[r],p[r],h),n||(e[s]=Fd(g));else{var b=Dd(f[r],p[r],h);n?this._additiveValue=b:e[s]=b}n&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,r=this._additiveValue;t===Ld?e[n]=e[n]+r:t===Bd?(qu(e[n],Kd),Ad(Kd,Kd,r,1),e[n]=Fd(Kd)):t===Rd?Ad(e[n],e[n],r,1):t===zd&&jd(e[n],e[n],r,1)},e}(),Jd=function(){function e(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){Os(`Can' use additive animation on looped animation.`);return}this._additiveAnimators=r,this._allowDiscrete=n}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,Ls(t),n)},e.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 qd(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===Bd&&c&&(c=Fd(c))}else c=this._target[o];if(c==null)continue;e>0&&s.addKeyframe(0,Pd(c),r),this._trackKeys.push(o)}s.addKeyframe(e,Pd(t[o]),r)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.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)},e.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)},e.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,n=0;n<t.length;n++)e[t[n]].setFinished()},e.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},e.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 Au({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}},e.prototype.stop=function(e){if(this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},e.prototype.delay=function(e){return this._delay=e,this},e.prototype.during=function(e){return e&&(this._onframeCbs||=[],this._onframeCbs.push(e)),this},e.prototype.done=function(e){return e&&(this._doneCbs||=[],this._doneCbs.push(e)),this},e.prototype.aborted=function(e){return e&&(this._abortedCbs||=[],this._abortedCbs.push(e)),this},e.prototype.getClip=function(){return this._clip},e.prototype.getTrack=function(e){return this._tracks[e]},e.prototype.getTracks=function(){var e=this;return R(this._trackKeys,function(t){return e._tracks[t]})},e.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},e.prototype.saveTo=function(e,t,n){if(e){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]=Pd(s.rawValue))}}}},e.prototype.__changeFinalValue=function(e,t){t||=Ls(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())}}}},e}();function Yd(){return new Date().getTime()}var Xd=function(e){cc(t,e);function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t||={},n.stage=t.stage||{},n}return t.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},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.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}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=Yd()-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())},t.prototype._startLoop=function(){var e=this;this._running=!0;function t(){e._running&&(iu(t),!e._paused&&e.update())}iu(t)},t.prototype.start=function(){this._running||(this._time=Yd(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||=(this._pauseStart=Yd(),!0)},t.prototype.resume=function(){this._paused&&=(this._pausedTime+=Yd()-this._pauseStart,!1)},t.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},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,t){t||={},this.start();var n=new Jd(e,t.loop);return this.addAnimator(n),n},t}(Ac),Zd=300,Qd=fs.domSupported,$d=(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:R(e,function(e){var t=e.replace(`mouse`,`pointer`);return n.hasOwnProperty(t)?t:e})}})(),ef={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},tf=!1;function nf(e){var t=e.pointerType;return t===`pen`||t===`touch`}function rf(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 af(e){e&&(e.zrByTouch=!0)}function of(e,t){return Zc(e.dom,new cf(e,t),!0)}function sf(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 cf=function(){function e(e,t){this.stopPropagation=ac,this.stopImmediatePropagation=ac,this.preventDefault=ac,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return e}(),lf={mousedown:function(e){e=Zc(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove:function(e){e=Zc(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=Zc(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout:function(e){e=Zc(this.dom,e);var t=e.toElement||e.relatedTarget;sf(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel:function(e){tf=!0,e=Zc(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel:function(e){tf||(e=Zc(this.dom,e),this.trigger(`mousewheel`,e))},touchstart:function(e){e=Zc(this.dom,e),af(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,`start`),lf.mousemove.call(this,e),lf.mousedown.call(this,e)},touchmove:function(e){e=Zc(this.dom,e),af(e),this.handler.processGesture(e,`change`),lf.mousemove.call(this,e)},touchend:function(e){e=Zc(this.dom,e),af(e),this.handler.processGesture(e,`end`),lf.mouseup.call(this,e),new Date-+this.__lastTouchMoment<Zd&&lf.click.call(this,e)},pointerdown:function(e){lf.mousedown.call(this,e)},pointermove:function(e){nf(e)||lf.mousemove.call(this,e)},pointerup:function(e){lf.mouseup.call(this,e)},pointerout:function(e){nf(e)||lf.mouseout.call(this,e)}};L([`click`,`dblclick`,`contextmenu`],function(e){lf[e]=function(t){t=Zc(this.dom,t),this.trigger(e,t)}});var uf={pointermove:function(e){nf(e)||uf.mousemove.call(this,e)},pointerup:function(e){uf.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 df(e,t){var n=t.domHandlers;fs.pointerEventsSupported?L($d.pointer,function(r){pf(t,r,function(t){n[r].call(e,t)})}):(fs.touchEventsSupported&&L($d.touch,function(r){pf(t,r,function(i){n[r].call(e,i),rf(t)})}),L($d.mouse,function(r){pf(t,r,function(i){i=Xc(i),t.touching||n[r].call(e,i)})}))}function ff(e,t){fs.pointerEventsSupported?L(ef.pointer,n):fs.touchEventsSupported||L(ef.mouse,n);function n(n){function r(r){r=Xc(r),sf(e,r.target)||(r=of(e,r),t.domHandlers[n].call(e,r))}pf(t,n,r,{capture:!0})}}function pf(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,$c(e.domTarget,t,n,r)}function mf(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&el(e.domTarget,n,t[n],e.listenerOpts[n]);e.mounted={}}var hf=function(){function e(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}return e}(),gf=function(e){cc(t,e);function t(t,n){var r=e.call(this)||this;return r.__pointerCapturing=!1,r.dom=t,r.painterRoot=n,r._localHandlerScope=new hf(t,lf),Qd&&(r._globalHandlerScope=new hf(document,uf)),df(r,r._localHandlerScope),r}return t.prototype.dispose=function(){mf(this._localHandlerScope),Qd&&mf(this._globalHandlerScope)},t.prototype.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||`default`)},t.prototype.__togglePointerCapture=function(e){if(this.__mayPointerCapture=null,Qd&&this.__pointerCapturing^+e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?ff(this,t):mf(t)}},t}(Ac),_f=1;fs.hasGlobalWindow&&(_f=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var vf=_f,yf=.4,bf=`#333`,xf=`#ccc`,Sf=`#eee`,Cf=cl,wf=5e-5;function Tf(e){return e>wf||e<-wf}var Ef=[],Df=[],Of=sl(),kf=Math.abs,Af=function(){function e(){}return e.prototype.getLocalTransform=function(t){return e.getLocalTransform(this,t)},e.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},e.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},e.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},e.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},e.prototype.needLocalTransform=function(){return Tf(this.rotation)||Tf(this.x)||Tf(this.y)||Tf(this.scaleX-1)||Tf(this.scaleY-1)||Tf(this.skewX)||Tf(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(Cf(n),this.invTransform=null);return}n||=sl(),t?this.getLocalTransform(n):Cf(n),e&&(t?ul(n,e,n):ll(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(Ef);var n=Ef[0]<0?-1:1,r=Ef[1]<0?-1:1,i=((Ef[0]-n)*t+n)/Ef[0]||0,a=((Ef[1]-r)*t+r)/Ef[1]||0;e[0]*=i,e[1]*=i,e[2]*=a,e[3]*=a}this.invTransform=this.invTransform||sl(),ml(this.invTransform,e)},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.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}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||sl(),ul(Df,e.invTransform,t),t=Df);var n=this.originX,r=this.originY;(n||r)&&(Of[4]=n,Of[5]=r,ul(Df,t,Of),Df[4]-=n,Df[5]-=r,t=Df),this.setLocalTransform(t)}},e.prototype.getGlobalScale=function(e){var t=this.transform;return 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)},e.prototype.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&Tc(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&Tc(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&kf(e[0]-1)>1e-10&&kf(e[3]-1)>1e-10?Math.sqrt(kf(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){Mf(this,e)},e.getLocalTransform=function(e,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&&fl(t,t,c),t[4]+=n+l,t[5]+=r+u,t},e.initDefaultProps=(function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0})(),e}(),jf=[`x`,`y`,`originX`,`originY`,`anchorX`,`anchorY`,`rotation`,`scaleX`,`scaleY`,`skewX`,`skewY`];function Mf(e,t){for(var n=0;n<jf.length;n++){var r=jf[n];e[r]=t[r]}}function Nf(e){Pf||=new Nu(100),e||=`12px sans-serif`;var t=Pf.get(e);return t||(t={font:e,strWidthCache:new Nu(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:vs.measureText(`国`,e).width,asciiCharWidth:vs.measureText(`a`,e).width},Pf.put(e,t)),t}var Pf;function Ff(e){if(!(If>=Lf)){e||=`12px sans-serif`;for(var t=[],n=+new Date,r=0;r<=127;r++)t[r]=vs.measureText(String.fromCharCode(r),e).width;var i=+new Date-n;return i>16?If=Lf:i>2&&If++,t}}var If=0,Lf=5;function Rf(e,t){return e.asciiWidthMapTried||=(e.asciiWidthMap=Ff(e.font),!0),0<=t&&t<=127?e.asciiWidthMap==null?e.asciiCharWidth:e.asciiWidthMap[t]:e.stWideCharWidth}function zf(e,t){var n=e.strWidthCache,r=n.get(t);return r??(r=vs.measureText(t,e.font).width,n.put(t,r)),r}function Bf(e,t,n,r){var i=zf(Nf(t),e),a=Wf(t);return new Ol(Hf(0,i,n),Uf(0,a,r),i,a)}function Vf(e,t,n,r){var i=((e||``)+``).split(`
|
|
45
|
-
`);if(i.length===1)return Bf(i[0],t,n,r);for(var a=new Ol(0,0,0,0),o=0;o<i.length;o++){var s=Bf(i[o],t,n,r);o===0?a.copy(s):a.union(s)}return a}function Hf(e,t,n,r){return n===`right`?r?e+=t:e-=t:n===`center`&&(r?e+=t/2:e-=t/2),e}function Uf(e,t,n,r){return n===`middle`?r?e+=t/2:e-=t/2:n===`bottom`&&(r?e+=t:e-=t),e}function Wf(e){return Nf(e).stWideCharWidth}function Gf(e,t){return typeof e==`string`?e.lastIndexOf(`%`)>=0?parseFloat(e)/100*t:parseFloat(e):e}function Kf(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+=Gf(r[0],n.width),l+=Gf(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.x=c,e.y=l,e.align=u,e.verticalAlign=d,e}var qf=`__zr_normal__`,Jf=jf.concat([`ignore`]),Yf=Ps(jf,function(e,t){return e[t]=!0,e},{ignore:!1}),Xf={},Zf=new Ol(0,0,0,0),Qf=[],$f=function(){function e(e){this.id=Ds(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return e.prototype._init=function(e){this.attr(e)},e.prototype.drift=function(e,t,n){switch(this.draggable){case`horizontal`:t=0;break;case`vertical`:e=0;break}var r=this.transform;r||=this.transform=[1,0,0,1,0,0],r[4]+=e,r[5]+=t,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){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=Zf,n.layoutRect?d.copy(n.layoutRect):d.copy(this.getBoundingRect()),r||d.applyTransform(this.transform)),l){this.calculateTextPosition?this.calculateTextPosition(Xf,n,d):Kf(Xf,n,d),i.x=Xf.x,i.y=Xf.y,a=Xf.align,o=Xf.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=Gf(f[0],d.width),m=Gf(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||={};if(u){var _=g.overflowRect=g.overflowRect||new Ol(0,0,0,0);i.getLocalTransform(Qf),ml(Qf,Qf),Ol.copy(_,d),_.applyTransform(Qf)}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||=`#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)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return`#fff`},e.prototype.getInsideTextStroke=function(e){return`#000`},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?xf:bf},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t==`string`&&qu(t);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,td(n,`rgba`)},e.prototype.traverse=function(e,t){},e.prototype.attrKV=function(e,t){e===`textConfig`?this.setTextConfig(t):e===`textContent`?this.setTextContent(t):e===`clipPath`?this.setClipPath(t):e===`extra`?(this.extra=this.extra||{},F(this.extra,t)):this[e]=t},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(e,t){if(typeof e==`string`)this.attrKV(e,t);else if(U(e))for(var n=Ls(e),r=0;r<n.length;r++){var i=n[r];this.attrKV(i,e[i])}return this.markRedraw(),this},e.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)}}},e.prototype._innerSaveToNormal=function(e){var t=this._normalState;t||=this._normalState={},e.textConfig&&!t.textConfig&&(t.textConfig=this.textConfig),this._savePrimaryToNormal(e,t,Jf)},e.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])}},e.prototype.hasState=function(){return this.currentStates.length>0},e.prototype.getState=function(e){return this.states[e]},e.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},e.prototype.clearStates=function(e){this.useState(qf,!1,e)},e.prototype.useState=function(e,t,n,r){var i=e===qf;if(!(!this.hasState()&&i)){var a=this.currentStates,o=this.stateTransition;if(!(js(a,e)>=0&&(t||a.length===1))){var s;if(this.stateProxy&&!i&&(s=this.stateProxy(e)),s||=this.states&&this.states[e],!s&&!i){Os(`State `+e+` not exists.`);return}i||this.saveCurrentToNormalState(s);var c=!!(s&&s.hoverLayer||r);c&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,s,this._normalState,t,!n&&!this.__inHover&&o&&o.duration>0,o);var l=this._textContent,u=this._textGuide;return l&&l.useState(e,t,n,c),u&&u.useState(e,t,n,c),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2),s}}},e.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||=this.states[c],l&&r.push(l)}var u=r[a-1],d=!!(u&&u.hoverLayer||n);d&&this._toggleHoverLayerFlag(!0);var f=this._mergeStates(r),p=this.stateTransition;this.saveCurrentToNormalState(f),this._applyStateObj(e.join(`,`),f,this._normalState,!1,!t&&!this.__inHover&&p&&p.duration>0,p);var m=this._textContent,h=this._textGuide;m&&m.useStates(e,t,d),h&&h.useStates(e,t,d),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!d&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2)}},e.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},e.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var t=this.animators[e];t.targetName&&t.changeTarget(this[t.targetName])}},e.prototype.removeState=function(e){var t=js(this.currentStates,e);if(t>=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},e.prototype.replaceState=function(e,t,n){var r=this.currentStates.slice(),i=js(r,e),a=js(r,t)>=0;i>=0?a?r.splice(i,1):r[i]=t:n&&!a&&r.push(t),this.useStates(r)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t={},n,r=0;r<e.length;r++){var i=e[r];F(t,i),i.textConfig&&(n||={},F(n,i.textConfig))}return n&&(t.textConfig=n),t},e.prototype._applyStateObj=function(e,t,n,r,i,a){var o=!(t&&r);t&&t.textConfig?(this.textConfig=F({},r?this.textConfig:n.textConfig),F(this.textConfig,t.textConfig)):o&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},c=!1,l=0;l<Jf.length;l++){var u=Jf[l],d=i&&Yf[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)},e.prototype._attachComponent=function(e){if(e.__zr&&!e.__hostTarget){if(process.env.NODE_ENV!==`production`)throw Error(`Text element has been added to zrender.`);return}if(e===this){if(process.env.NODE_ENV!==`production`)throw Error(`Recursive component attachment.`);return}var t=this.__zr;t&&e.addSelfToZr(t),e.__zr=t,e.__hostTarget=this},e.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},e.prototype.getClipPath=function(){return this._clipPath},e.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},e.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},e.prototype.getTextContent=function(){return this._textContent},e.prototype.setTextContent=function(e){var t=this._textContent;if(t!==e){if(t&&t!==e&&this.removeTextContent(),process.env.NODE_ENV!==`production`&&e.__zr&&!e.__hostTarget)throw Error(`Text element has been added to zrender.`);e.innerTransformable=new Af,this._attachComponent(e),this._textContent=e,this.markRedraw()}},e.prototype.setTextConfig=function(e){this.textConfig||={},F(this.textConfig,e),this.markRedraw()},e.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},e.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},e.prototype.getTextGuideLine=function(){return this._textGuide},e.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},e.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},e.prototype.markRedraw=function(){this.__dirty|=1;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},e.prototype.dirty=function(){this.markRedraw()},e.prototype._toggleHoverLayerFlag=function(e){this.__inHover=e;var t=this._textContent,n=this._textGuide;t&&(t.__inHover=e),n&&(n.__inHover=e)},e.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)}},e.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)}},e.prototype.animate=function(e,t,n){var r=e?this[e]:this;if(process.env.NODE_ENV!==`production`&&!r){Os(`Property "`+e+`" is not existed in element `+this.id);return}var i=new Jd(r,t,n);return e&&(i.targetName=e),this.addAnimator(i,e),i},e.prototype.addAnimator=function(e,t){var n=this.__zr,r=this;e.during(function(){r.updateDuringAnimation(t)}).done(function(){var t=r.animators,n=js(t,e);n>=0&&t.splice(n,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(e){this.markRedraw()},e.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},e.prototype.animateTo=function(e,t,n){ep(this,e,t,n)},e.prototype.animateFrom=function(e,t,n){ep(this,e,t,n,!0)},e.prototype._transitionState=function(e,t,n,r){for(var i=ep(this,t,n,r),a=0;a<i.length;a++)i[a].__fromStateTransition=e},e.prototype.getBoundingRect=function(){return null},e.prototype.getPaintRect=function(){return null},e.initDefaultProps=(function(){var t=e.prototype;t.type=`element`,t.name=``,t.ignore=t.silent=t.ignoreHostSilent=t.isGroup=t.draggable=t.dragging=t.ignoreClip=t.__inHover=!1,t.__dirty=1;var n={};function r(e,t,r){n[e+t+r]||(console.warn(`DEPRECATED: '`+e+`' has been deprecated. use '`+t+`', '`+r+`' instead`),n[e+t+r]=!0)}function i(e,n,i,a){Object.defineProperty(t,e,{get:function(){if(process.env.NODE_ENV!==`production`&&r(e,i,a),!this[n]){var t=this[n]=[];o(this,t)}return this[n]},set:function(t){process.env.NODE_ENV!==`production`&&r(e,i,a),this[i]=t[0],this[a]=t[1],this[n]=t,o(this,t)}});function o(e,t){Object.defineProperty(t,0,{get:function(){return e[i]},set:function(t){e[i]=t}}),Object.defineProperty(t,1,{get:function(){return e[a]},set:function(t){e[a]=t}})}}Object.defineProperty&&(i(`position`,`_legacyPos`,`x`,`y`),i(`scale`,`_legacyScale`,`scaleX`,`scaleY`),i(`origin`,`_legacyOrigin`,`originX`,`originY`))})(),e}();Ms($f,Ac),Ms($f,Af);function ep(e,t,n,r,i){n||={};var a=[];op(e,``,e,t,n,r,a,i);var o=a.length,s=!1,c=n.done,l=n.aborted,u=function(){s=!0,o--,o<=0&&(s?c&&c():l&&l())},d=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 f=0;f<a.length;f++){var p=a[f];u&&p.done(u),d&&p.aborted(d),n.force&&p.duration(n.duration),p.start(n.easing)}return a}function tp(e,t,n){for(var r=0;r<n;r++)e[r]=t[r]}function np(e){return Ns(e[0])}function rp(e,t,n){if(Ns(t[n]))if(Ns(e[n])||(e[n]=[]),Hs(t[n])){var r=t[n].length;e[n].length!==r&&(e[n]=new t[n].constructor(r),tp(e[n],t[n],r))}else{var i=t[n],a=e[n],o=i.length;if(np(i))for(var s=i[0].length,c=0;c<o;c++)a[c]?tp(a[c],i[c],s):a[c]=Array.prototype.slice.call(i[c]);else tp(a,i,o);a.length=i.length}else e[n]=t[n]}function ip(e,t){return e===t||Ns(e)&&Ns(t)&&ap(e,t)}function ap(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 op(e,t,n,r,i,a,o,s){for(var c=Ls(r),l=i.duration,u=i.delay,d=i.additive,f=i.setToFinal,p=!U(a),m=e.animators,h=[],g=0;g<c.length;g++){var _=c[g],v=r[_];if(v!=null&&n[_]!=null&&(p||a[_]))if(U(v)&&!Ns(v)&&!Ws(v)){if(t){s||(n[_]=v,e.updateDuringAnimation(t));continue}op(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=js(m,x);m.splice(S,1)}}if(i.force||(h=Fs(h,function(e){return!ip(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[_]=Pd(n[_]),rp(n,r,_)}}var x=new Jd(n,!1,!1,d?Fs(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)}}var Y=function(e){cc(t,e);function t(t){var n=e.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(t),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var t=this._children,n=0;n<t.length;n++)if(t[n].name===e)return t[n]},t.prototype.childCount=function(){return this._children.length},t.prototype.add=function(e){if(e&&(e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),process.env.NODE_ENV!==`production`&&e.__hostTarget))throw`This elemenet has been used as an attachment`;return this},t.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},t.prototype.replace=function(e,t){var n=js(this._children,e);return n>=0&&this.replaceAt(t,n),this},t.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},t.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()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,r=js(n,e);return r<0?this:(n.splice(r,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh(),this)},t.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},t.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},t.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},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].addSelfToZr(t)},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].removeSelfFromZr(t)},t.prototype.getBoundingRect=function(e){for(var t=new Ol(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?(Ol.applyTransform(t,s,c),i||=t.clone(),i.union(t)):(i||=s.clone(),i.union(s))}}return i||t},t}($f);Y.prototype.type=`group`;var sp={},cp={};function lp(e){delete cp[e]}function up(e){if(!e)return!1;if(typeof e==`string`)return nd(e,1)<yf;if(e.colorStops){for(var t=e.colorStops,n=0,r=t.length,i=0;i<r;i++)n+=nd(t[i].color,1);return n/=r,n<yf}return!1}var dp=function(){function e(e,t,n){var r=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n||={},this.dom=t,this.id=e;var i=new ru,a=n.renderer||`canvas`;if(sp[a]||(a=Ls(sp)[0]),process.env.NODE_ENV!==`production`&&!sp[a])throw Error(`Renderer '`+a+`' is not imported. Please import it first.`);n.useDirtyRect=n.useDirtyRect==null?!1:n.useDirtyRect;var o=new sp[a](t,i,n,e),s=n.ssr||o.ssrOnly;this.storage=i,this.painter=o;var c=!fs.node&&!fs.worker&&!s?new gf(o.getViewportRoot(),o.root):null,l=n.useCoarsePointer,u=l==null||l===`auto`?fs.touchEventsSupported:!!l,d=44,f;u&&(f=W(n.pointerSize,d)),this.handler=new Bl(i,o,c,o.root,f),this.animation=new Xd({stage:{update:s?null:function(){return r._flush(!0)}}}),s||this.animation.start()}return e.prototype.add=function(e){this._disposed||!e||(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},e.prototype.remove=function(e){this._disposed||!e||(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},e.prototype.configLayer=function(e,t){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh())},e.prototype.setBackgroundColor=function(e){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=up(e))},e.prototype.getBackgroundColor=function(){return this._backgroundColor},e.prototype.setDarkMode=function(e){this._darkMode=e},e.prototype.isDarkMode=function(){return this._darkMode},e.prototype.refreshImmediately=function(e){this._disposed||(e||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},e.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},e.prototype.flush=function(){this._disposed||this._flush(!1)},e.prototype._flush=function(e){var t,n=Yd();this._needsRefresh&&(t=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately());var r=Yd();t?(this._stillFrameAccum=0,this.trigger(`rendered`,{elapsedTime:r-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()===`canvas`&&this.painter.refreshHover())},e.prototype.resize=function(e){this._disposed||(e||={},this.painter.resize(e.width,e.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},e.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},e.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof Y&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},e.prototype.dispose=function(){this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,lp(this.id))},e}();function fp(e,t){var n=new dp(Ds(),e,t);return cp[n.id]=n,n}function pp(e,t){sp[e]=t}var mp;function hp(e){if(typeof mp==`function`)return mp(e)}function gp(e){mp=e}var _p=1e-4,vp=20;function wte(e){return e.replace(/^\s+|\s+$/g,``)}var yp=Math.min,bp=Math.max,xp=Math.abs;function Sp(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 X=Tte;function Tte(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 Cp(e,t,n)}function Cp(e,t,n){return H(e)?wte(e).match(/%$/)?parseFloat(e)/100*t+(n||0):parseFloat(e):e==null?NaN:+e}function wp(e,t,n){return t??=10,t=Math.min(Math.max(0,t),vp),e=(+e).toFixed(t),n?e:+e}function Tp(e){return e.sort(function(e,t){return e-t}),e}function Ep(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,n=0;n<15;n++,t*=10)if(Math.round(e*t)/t===e)return n}return Dp(e)}function Dp(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(`.`),o=a<0?0:i-1-a;return Math.max(0,o-r)}function Op(e,t){var n=Math.log,r=Math.LN10,i=Math.floor(n(e[1]-e[0])/r),a=Math.round(n(xp(t[1]-t[0]))/r),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20}function Ete(e,t){var n=Ps(e,function(e,t){return e+(isNaN(t)?0:t)},0);if(n===0)return[];for(var r=10**t,i=R(e,function(e){return(isNaN(e)?0:e)/n*r*100}),a=r*100,o=R(i,function(e){return Math.floor(e)}),s=Ps(o,function(e,t){return e+t},0),c=R(i,function(e,t){return e-o[t]});s<a;){for(var l=-1/0,u=null,d=0,f=c.length;d<f;++d)c[d]>l&&(l=c[d],u=d);++o[u],c[u]=0,++s}return R(o,function(e){return e/r})}function Dte(e,t){var n=Math.max(Ep(e),Ep(t)),r=e+t;return n>vp?r:wp(r,n)}function kp(e){var t=Math.PI*2;return(e%t+t)%t}function Ap(e){return e>-_p&&e<_p}var Ote=/^(?:(\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 jp(e){if(e instanceof Date)return e;if(H(e)){var t=Ote.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(Math.round(e))}function kte(e){return 10**Mp(e)}function Mp(e){if(e===0)return 0;var t=Math.floor(Math.log(e)/Math.LN10);return e/10**t>=10&&t++,t}function Np(e,t){var n=Mp(e),r=10**n,i=e/r;return e=(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,n>=-20?+e.toFixed(n<0?-n:0):e}function Pp(e,t){var n=(e.length-1)*t+1,r=Math.floor(n),i=+e[r-1],a=n-r;return a?i+a*(e[r]-i):i}function Fp(e){e.sort(function(e,t){return s(e,t,0)?-1:1});for(var t=-1/0,n=1,r=0;r<e.length;){for(var i=e[r].interval,a=e[r].close,o=0;o<2;o++)i[o]<=t&&(i[o]=t,a[o]=o?1:1-n),t=i[o],n=a[o];i[0]===i[1]&&a[0]*a[1]!==1?e.splice(r,1):r++}return e;function s(e,t,n){return e.interval[n]<t.interval[n]||e.interval[n]===t.interval[n]&&(e.close[n]-t.close[n]===(n?-1:1)||!n&&s(e,t,1))}}function Ip(e){var t=parseFloat(e);return t==e&&(t!==0||!H(e)||e.indexOf(`x`)<=0)?t:NaN}function Lp(e){return!isNaN(Ip(e))}function Rp(){return Math.round(Math.random()*9)}function zp(e,t){return t===0?e:zp(t,e%t)}function Bp(e,t){return e==null?t:t==null?e:e*t/zp(e,t)}var Ate=`[ECharts] `,Vp={},jte=typeof console<`u`&&console.warn&&console.log;function Hp(e,t,n){if(jte){if(n){if(Vp[t])return;Vp[t]=!0}console[e](Ate+t)}}function Up(e,t){Hp(`log`,e,t)}function Wp(e,t){Hp(`warn`,e,t)}function Gp(e,t){Hp(`error`,e,t)}function Kp(e){process.env.NODE_ENV!==`production`&&Hp(`warn`,`DEPRECATED: `+e,!0)}function qp(e,t,n){process.env.NODE_ENV!==`production`&&Kp((n?`[`+n+`]`:``)+(e+` is deprecated; use `+t+` instead.`))}function Jp(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=``;if(process.env.NODE_ENV!==`production`){var r=function(e){return e===void 0?`undefined`:e===1/0?`Infinity`:e===-1/0?`-Infinity`:Ks(e)?`NaN`:e instanceof Date?`Date(`+e.toISOString()+`)`:V(e)?`function () { ... }`:Gs(e)?e+``:null};n=R(e,function(e){if(H(e))return e;var t=r(e);if(t!=null)return t;if(typeof JSON<`u`&&JSON.stringify)try{return JSON.stringify(e,function(e,t){return r(t)??t})}catch{return`?`}else return`?`}).join(` `)}return n}function Yp(e){throw Error(e)}function Xp(e,t,n){return(t-e)*n+e}var Zp=`series\0`,Qp=`\0_ec_\0`;function $p(e){return e instanceof Array?e:e==null?[]:[e]}function em(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 tm=`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 nm(e){return U(e)&&!B(e)&&!(e instanceof Date)?e.value:e}function rm(e){return U(e)&&!(e instanceof Array)}function im(e,t,n){var r=n===`normalMerge`,i=n===`replaceMerge`,a=n===`replaceAll`;e||=[],t=(t||[]).slice();var o=K();L(t,function(e,n){if(!U(e)){t[n]=null;return}process.env.NODE_ENV!==`production`&&(e.id!=null&&!hm(e.id)&&mm(e.id),e.name!=null&&!hm(e.name)&&mm(e.name))});var s=am(e,o,n);return(r||i)&&om(s,e,o,t),r&&sm(s,t),r||i?cm(s,t,i):a&&lm(s,t),um(s),s}function am(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`||_m(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return r}function om(e,t,n,r){L(r,function(i,a){if(!(!i||i.id==null)){var o=fm(i.id),s=n.get(o);if(s!=null){var c=e[s];G(!c.newOption,`Duplicated option on id "`+o+`".`),c.newOption=i,c.existing=t[s],r[a]=null}}})}function sm(e,t){L(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)&&!_m(n)&&!_m(a)&&dm(`name`,a,n)){e[i].newOption=n,t[r]=null;return}}})}function cm(e,t,n){L(t,function(t){if(t){for(var r,i=0;(r=e[i])&&(r.newOption||_m(r.existing)||r.existing&&t.id!=null&&!dm(`id`,t,r.existing));)i++;r?(r.newOption=t,r.brandNew=n):e.push({newOption:t,brandNew:n,existing:null,keyInfo:null}),i++}})}function lm(e,t){L(t,function(t){e.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})}function um(e){var t=K();L(e,function(e){var n=e.existing;n&&t.set(n.id,e)}),L(e,function(e){var n=e.newOption;G(!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={})}),L(e,function(e,n){var r=e.existing,i=e.newOption,a=e.keyInfo;if(U(i)){if(a.name=i.name==null?r?r.name:Zp+n:fm(i.name),r)a.id=fm(r.id);else if(i.id!=null)a.id=fm(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 dm(e,t,n){var r=pm(t[e],null),i=pm(n[e],null);return r!=null&&i!=null&&r===i}function fm(e){if(process.env.NODE_ENV!==`production`&&e==null)throw Error();return pm(e,``)}function pm(e,t){return e==null?t:H(e)?e:Bs(e)||zs(e)?e+``:t}function mm(e){process.env.NODE_ENV!==`production`&&Wp("`"+e+"` is invalid id or name. Must be a string or number.")}function hm(e){return zs(e)||Lp(e)}function gm(e){var t=e.name;return!!(t&&t.indexOf(Zp))}function _m(e){return e&&e.id!=null&&fm(e.id).indexOf(Qp)===0}function vm(e){return Qp+e}function ym(e,t,n){L(e,function(e){var r=e.newOption;U(r)&&(e.keyInfo.mainType=t,e.keyInfo.subType=bm(t,r,e.existing,n))})}function bm(e,t,n,r){return t.type?t.type:n?n.subType:r.determineSubType(e,t)}function xm(e,t){var n={},r={};return i(e||[],n),i(t||[],r,n),[a(n),a(r)];function i(e,t,n){for(var r=0,i=e.length;r<i;r++){var a=pm(e[r].seriesId,null);if(a==null)return;for(var o=$p(e[r].dataIndex),s=n&&n[a],c=0,l=o.length;c<l;c++){var u=o[c];s&&s[u]?s[u]=null:(t[a]||(t[a]={}))[u]=1}}}function a(e,t){var n=[];for(var r in e)if(e.hasOwnProperty(r)&&e[r]!=null)if(t)n.push(+r);else{var i=a(e[r],!0);i.length&&n.push({seriesId:r,dataIndex:i})}return n}}function Sm(e,t){if(t.dataIndexInside!=null)return t.dataIndexInside;if(t.dataIndex!=null)return B(t.dataIndex)?R(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex);if(t.name!=null)return B(t.name)?R(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name)}function Cm(){var e=`__ec_inner_`+ wm++;return function(t){return t[e]||(t[e]={})}}var wm=Rp();function Tm(e,t,n){var r=Em(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=km(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 Em(e,t){var n;if(H(e)){var r={};r[e+`Index`]=0,n=r}else n=e;var i=K(),a={},o=!1;return L(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&&js(t.includeMainTypes,s)<0)){o||=!!s;var l=i.get(s)||i.set(s,{});l[c]=e}}),{mainTypeSpecified:o,queryOptionMap:i,others:a}}var Dm={useDefault:!0,enableAll:!1,enableNone:!1},Om={useDefault:!1,enableAll:!0,enableNone:!0};function km(e,t,n,r){r||=Dm;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;process.env.NODE_ENV!==`production`&&Gp('`"none"` or `false` is not a valid value on index option.'),i=-1}return i===`all`&&(r.enableAll?i=a=o=null:(process.env.NODE_ENV!==`production`&&Gp('`"all"` is not a valid value on index option.'),i=-1)),s.models=e.queryComponents({mainType:t,index:i,id:a,name:o}),s}function Am(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n}function jm(e,t){return e.getAttribute?e.getAttribute(t):e[t]}function Mm(e){return e===`auto`?fs.domSupported?`html`:`richText`:e||`html`}function Nm(e,t){var n=K(),r=[];return L(e,function(e){var i=t(e);(n.get(i)||(r.push(i),n.set(i,[]))).push(e)}),{keys:r,buckets:n}}function Pm(e,t,n,r,i){var a=t==null||t===`auto`;if(r==null)return r;if(Bs(r)){var o=Xp(n||0,r,i);return wp(o,a?Math.max(Ep(n||0),Ep(r)):t)}else if(H(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=Xp(p,m,i);s[d]=wp(o,a?Math.max(Ep(p),Ep(m)):t)}}return s}}var Fm=function(){function e(){}return e.prototype.reset=function(e,t,n,r){return this._list=e,this._step=r||=1,this._idx=t,this._end=n??(r>0?e.length:0),this.item=null,this.key=NaN,this},e.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},e}();function Im(e){e.option=e.parentModel=e.ecModel=null}var Lm=`.`,Rm=`___EC__COMPONENT__CONTAINER___`,zm=`___EC__EXTENDED_CLASS___`;function Bm(e){var t={main:``,sub:``};if(e){var n=e.split(Lm);t.main=n[0]||``,t.sub=n[1]||``}return t}function Vm(e){G(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),`componentType "`+e+`" illegal`)}function Hm(e){return!!(e&&e[zm])}function Um(e,t){e.$constructor=e,e.extend=function(e){process.env.NODE_ENV!==`production`&&L(t,function(t){e[t]||console.warn("Method `"+t+"` should be implemented"+(e.type?` in `+e.type:``)+`.`)});var n=this,r;return Wm(n)?r=function(e){N(t,e);function t(){return e.apply(this,arguments)||this}return t}(n):(r=function(){(e.$constructor||n).apply(this,arguments)},mte(r,this)),F(r.prototype,e),r[zm]=!0,r.extend=this.extend,r.superCall=Jm,r.superApply=Ym,r.superClass=n,r}}function Wm(e){return V(e)&&/^class\s/.test(Function.prototype.toString.call(e))}function Gm(e,t){e.extend=t.extend}var Km=Math.round(Math.random()*10);function qm(e){var t=[`__\0is_clz`,Km++].join(`_`);e.prototype[t]=!0,process.env.NODE_ENV!==`production`&&G(!e.isInstance,`The method "is" can not be defined.`),e.isInstance=function(e){return!!(e&&e[t])}}function Jm(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return this.superClass.prototype[t].apply(e,n)}function Ym(e,t,n){return this.superClass.prototype[t].apply(e,n)}function Xm(e){var t={};e.registerClass=function(e){var r=e.type||e.prototype.type;if(r){Vm(r),e.prototype.type=r;var i=Bm(r);if(!i.sub)process.env.NODE_ENV!==`production`&&t[i.main]&&console.warn(i.main+` exists.`),t[i.main]=e;else if(i.sub!==Rm){var a=n(i);a[i.sub]=e}}return e},e.getClass=function(e,n,r){var i=t[e];if(i&&i[Rm]&&(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=Bm(e),r=[],i=t[n.main];return i&&i[Rm]?L(i,function(e,t){t!==Rm&&r.push(e)}):r.push(i),r},e.hasClass=function(e){return!!t[Bm(e).main]},e.getAllClassMainTypes=function(){var e=[];return L(t,function(t,n){e.push(n)}),e},e.hasSubTypes=function(e){var n=t[Bm(e).main];return n&&n[Rm]};function n(e){var n=t[e.main];return(!n||!n[Rm])&&(n=t[e.main]={},n[Rm]=!0),n}}function Zm(e,t){for(var n=0;n<e.length;n++)e[n][1]||(e[n][1]=e[n][0]);return t||=!1,function(n,r,i){for(var a={},o=0;o<e.length;o++){var s=e[o][1];if(!(r&&js(r,s)>=0||i&&js(i,s)<0)){var c=n.getShallow(s,t);c!=null&&(a[e[o][0]]=c)}}return a}}var Qm=Zm([[`fill`,`color`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`opacity`],[`shadowColor`]]),$m=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return Qm(this,e,t)},e}(),eh=new Nu(50);function th(e){if(typeof e==`string`){var t=eh.get(e);return t&&t.image}else return e}function nh(e,t,n,r,i){if(!e)return t;if(typeof e==`string`){if(t&&t.__zrImageSrc===e||!n)return t;var a=eh.get(e),o={hostEl:n,cb:r,cbPayload:i};return a?(t=a.image,!ih(t)&&a.pending.push(o)):(t=vs.loadImage(e,rh,rh),t.__zrImageSrc=e,eh.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}else return e}function rh(){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 ih(e){return e&&e.width&&e.height}var ah=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function oh(e,t,n,r,i,a){if(!n){e.text=``,e.isTruncated=!1;return}var o=(t+``).split(`
|
|
46
|
-
`);a=sh(n,r,i,a);for(var s=!1,c={},l=0,u=o.length;l<u;l++)ch(c,o[l],a),o[l]=c.textLine,s||=c.isTruncated;e.text=o.join(`
|
|
47
|
-
`),e.isTruncated=s}function sh(e,t,n,r){r||={};var i=F({},r);n=W(n,`...`),i.maxIterations=W(r.maxIterations,2);var a=i.minChar=W(r.minChar,0),o=i.fontMeasureInfo=Nf(t),s=o.asciiCharWidth;i.placeholder=W(r.placeholder,``);for(var c=e=Math.max(0,e-1),l=0;l<a&&c>=s;l++)c-=s;var u=zf(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 ch(e,t,n){var r=n.containerWidth,i=n.contentWidth,a=n.fontMeasureInfo;if(!r){e.textLine=``,e.isTruncated=!1;return}var o=zf(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?lh(t,i,a):o>0?Math.floor(t.length*i/o):0;t=t.substr(0,c),o=zf(a,t)}t===``&&(t=n.placeholder),e.textLine=t,e.isTruncated=!0}function lh(e,t,n){for(var r=0,i=0,a=e.length;i<a&&r<t;i++)r+=Rf(n,e.charCodeAt(i));return i}function uh(e,t,n,r){var i=Ch(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=Wf(l),f=W(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?yh(i,t.font,h,a===`breakAll`,0).lines:[]:i?i.split(`
|
|
48
|
-
`):[],v=_.length*f;if(g??=v,v>g&&p){var y=Math.floor(g/f);m||=_.length>y,_=_.slice(0,y),v=_.length*f}if(i&&u&&h!=null)for(var b=sh(h,l,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),x={},S=0;S<_.length;S++)ch(x,_[S],b),_[S]=x.textLine,m||=x.isTruncated;for(var C=g,w=0,T=Nf(l),S=0;S<_.length;S++)w=Math.max(zf(T,_[S]),w);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 dh=function(){function e(){}return e}(),fh=function(){function e(e){this.tokens=[],e&&(this.tokens=e)}return e}(),ph=function(){function e(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return e}();function mh(e,t,n,r,i){var a=new ph,o=Ch(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=ah.lastIndex=0,h;(h=ah.exec(o))!=null;){var g=h.index;g>m&&hh(a,o.substring(m,g),t,p),hh(a,h[2],t,p,h[1]),m=ah.lastIndex}m<o.length&&hh(a,o.substring(m,o.length),t,p);var _=[],v=0,y=0,b=f===`truncate`,x=t.lineOverflow===`truncate`,S={};function C(e,t,n){e.width=t,e.lineHeight=n,v+=n,y=Math.max(y,t)}outer:for(var w=0;w<a.lines.length;w++){for(var T=a.lines[w],E=0,D=0,O=0;O<T.tokens.length;O++){var k=T.tokens[O],A=k.styleName&&t.rich[k.styleName]||{},j=k.textPadding=A.padding,ee=j?j[1]+j[3]:0,te=k.font=A.font||t.font;k.contentHeight=Wf(te);var ne=W(A.height,k.contentHeight);if(k.innerHeight=ne,j&&(ne+=j[0]+j[2]),k.height=ne,k.lineHeight=Js(A.lineHeight,t.lineHeight,ne),k.align=A&&A.align||i,k.verticalAlign=A&&A.verticalAlign||`middle`,x&&d!=null&&v+k.lineHeight>d){var re=a.lines.length;O>0?(T.tokens=T.tokens.slice(0,O),C(T,D,E),a.lines=a.lines.slice(0,w+1)):a.lines=a.lines.slice(0,w),a.isTruncated=a.isTruncated||a.lines.length<re;break outer}var ie=A.width,ae=ie==null||ie===`auto`;if(typeof ie==`string`&&ie.charAt(ie.length-1)===`%`)k.percentWidth=ie,_.push(k),k.contentWidth=zf(Nf(te),k.text);else{if(ae){var oe=A.backgroundColor,se=oe&&oe.image;se&&(se=th(se),ih(se)&&(k.width=Math.max(k.width,se.width*ne/se.height)))}var ce=b&&u!=null?u-D:null;ce!=null&&ce<k.width?!ae||ce<ee?(k.text=``,k.width=k.contentWidth=0):(oh(S,k.text,ce-ee,te,t.ellipsis,{minChar:t.truncateMinChar}),k.text=S.text,a.isTruncated=a.isTruncated||S.isTruncated,k.width=k.contentWidth=zf(Nf(te),k.text)):k.contentWidth=zf(Nf(te),k.text)}k.width+=ee,D+=k.width,A&&(E=Math.max(E,k.lineHeight))}C(T,D,E)}a.outerWidth=a.width=W(u,y),a.outerHeight=a.height=W(d,v),a.contentHeight=v,a.contentWidth=y,a.outerWidth+=c,a.outerHeight+=l;for(var w=0;w<_.length;w++){var k=_[w],le=k.percentWidth;k.width=parseInt(le,10)/100*a.width}return a}function hh(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=Gf(o.width,r.width)+p;s.length>0&&m+r.accumWidth>r.width&&(u=t.split(`
|
|
49
|
-
`),l=!0),r.accumWidth=m}else{var h=yh(t,c,r.width,r.breakAll,r.accumWidth);r.accumWidth=h.accumWidth+p,d=h.linesWidths,u=h.lines}}u||=t.split(`
|
|
50
|
-
`);for(var g=Nf(c),_=0;_<u.length;_++){var v=u[_],y=new dh;if(y.styleName=i,y.text=v,y.isLineHolder=!v&&!a,typeof o.width==`number`?y.width=o.width:y.width=d?d[_]:zf(g,v),!_&&!l){var b=(s[s.length-1]||(s[0]=new fh)).tokens,x=b.length;x===1&&b[0].isLineHolder?b[0]=y:(v||!x||a)&&b.push(y)}else s.push(new fh([y]))}}function gh(e){var t=e.charCodeAt(0);return t>=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var _h=Ps(`,&?/;] `.split(``),function(e,t){return e[t]=!0,e},{});function vh(e){return gh(e)?!!_h[e]:!0}function yh(e,t,n,r,i){for(var a=[],o=[],s=``,c=``,l=0,u=0,d=Nf(t),f=0;f<e.length;f++){var p=e.charAt(f);if(p===`
|
|
51
|
-
`){c&&(s+=c,u+=l),a.push(s),o.push(u),s=``,c=``,l=0,u=0;continue}var m=Rf(d,p.charCodeAt(0)),h=r?!1:!vh(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 bh(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;Ol.set(xh,Hf(n,o,i),Uf(r,s,a),o,s),Ol.intersect(t,xh,null,Sh);var c=Sh.outIntersectRect;e.outerWidth=c.width,e.outerHeight=c.height,e.baseX=Hf(c.x,c.width,i,!0),e.baseY=Uf(c.y,c.height,a,!0)}}var xh=new Ol(0,0,0,0),Sh={outIntersectRect:{},clamp:!0};function Ch(e){return e==null?e=``:e+=``}function wh(e){var t=Ch(e.text),n=e.font;return Th(e,zf(Nf(n),t),Wf(n),null)}function Th(e,t,n,r){var i=new Ol(Hf(e.x||0,t,e.textAlign),Uf(e.y||0,n,e.textBaseline),t,n),a=r??(Eh(e)?e.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function Eh(e){var t=e.stroke;return t!=null&&t!==`none`&&e.lineWidth>0}var Dh=`__zr_style_`+Math.round(Math.random()*10),Oh={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:`#000`,opacity:1,blend:`source-over`},kh={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Oh[Dh]=!0;var Ah=[`z`,`z2`,`invisible`],jh=[`invisible`],Mh=function(e){cc(t,e);function t(t){return e.call(this,t)||this}return t.prototype._init=function(t){for(var n=Ls(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({})},t.prototype.beforeBrush=function(){},t.prototype.afterBrush=function(){},t.prototype.innerBeforeBrush=function(){},t.prototype.innerAfterBrush=function(){},t.prototype.shouldBePainted=function(e,t,n,r){var i=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&Fh(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},t.prototype.contain=function(e,t){return this.rectContain(e,t)},t.prototype.traverse=function(e,t){e.call(t,this)},t.prototype.rectContain=function(e,t){var n=this.transformCoordToLocal(e,t);return this.getBoundingRect().contain(n[0],n[1])},t.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||=new Ol(0,0,0,0),t?Ol.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},t.prototype.setPrevPaintRect=function(e){e?(this._prevPaintRect=this._prevPaintRect||new Ol(0,0,0,0),this._prevPaintRect.copy(e)):this._prevPaintRect=null},t.prototype.getPrevPaintRect=function(){return this._prevPaintRect},t.prototype.animateStyle=function(e){return this.animate(`style`,e)},t.prototype.updateDuringAnimation=function(e){e===`style`?this.dirtyStyle():this.markRedraw()},t.prototype.attrKV=function(t,n){t===`style`?this.style?this.setStyle(n):this.useStyle(n):e.prototype.attrKV.call(this,t,n)},t.prototype.setStyle=function(e,t){return typeof e==`string`?this.style[e]=t:F(this.style,e),this.dirtyStyle(),this},t.prototype.dirtyStyle=function(e){e||this.markRedraw(),this.__dirty|=2,this._rect&&=null},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(this.__dirty&2)},t.prototype.styleUpdated=function(){this.__dirty&=-3},t.prototype.createStyle=function(e){return rc(Oh,e)},t.prototype.useStyle=function(e){e[Dh]||(e=this.createStyle(e)),this.__inHover?this.__hoverStyle=e:this.style=e,this.dirtyStyle()},t.prototype.isStyleObject=function(e){return e[Dh]},t.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,Ah)},t.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;if(n&&n.style?a?i?c=n.style:(c=this._mergeStyle(this.createStyle(),r.style),this._mergeStyle(c,n.style)):(c=this._mergeStyle(this.createStyle(),i?this.style:r.style),this._mergeStyle(c,n.style)):s&&(c=r.style),c)if(a){var l=this.style;if(this.style=this.createStyle(s?{}:l),s)for(var u=Ls(l),d=0;d<u.length;d++){var f=u[d];f in c&&(c[f]=c[f],this.style[f]=l[f])}for(var p=Ls(c),d=0;d<p.length;d++){var f=p[d];this.style[f]=this.style[f]}this._transitionState(t,{style:c},o,this.getAnimationStyleProps())}else this.useStyle(c);for(var m=this.__inHover?jh:Ah,d=0;d<m.length;d++){var f=m[d];n&&n[f]!=null?this[f]=n[f]:s&&r[f]!=null&&(this[f]=r[f])}},t.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||={},this._mergeStyle(r,a.style))}return r&&(n.style=r),n},t.prototype._mergeStyle=function(e,t){return F(e,t),e},t.prototype.getAnimationStyleProps=function(){return kh},t.initDefaultProps=(function(){var e=t.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=!1,e._rect=null,e.dirtyRectTolerance=0,e.__dirty=3})(),t}($f),Nh=new Ol(0,0,0,0),Ph=new Ol(0,0,0,0);function Fh(e,t,n){return Nh.copy(e.getBoundingRect()),e.transform&&Nh.applyTransform(e.transform),Ph.width=t,Ph.height=n,!Nh.intersect(Ph)}var Ih=Math.min,Lh=Math.max,Rh=Math.sin,zh=Math.cos,Bh=Math.PI*2,Vh=lc(),Hh=lc(),Uh=lc();function Wh(e,t,n){if(e.length!==0){for(var r=e[0],i=r[0],a=r[0],o=r[1],s=r[1],c=1;c<e.length;c++)r=e[c],i=Ih(i,r[0]),a=Lh(a,r[0]),o=Ih(o,r[1]),s=Lh(s,r[1]);t[0]=i,t[1]=o,n[0]=a,n[1]=s}}function Gh(e,t,n,r,i,a){i[0]=Ih(e,n),i[1]=Ih(t,r),a[0]=Lh(e,n),a[1]=Lh(t,r)}var Kh=[],qh=[];function Jh(e,t,n,r,i,a,o,s,c,l){var u=bu,d=_u,f=u(e,n,i,o,Kh);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,Kh[p]);c[0]=Ih(m,c[0]),l[0]=Lh(m,l[0])}f=u(t,r,a,s,qh);for(var p=0;p<f;p++){var h=d(t,r,a,s,qh[p]);c[1]=Ih(h,c[1]),l[1]=Lh(h,l[1])}c[0]=Ih(e,c[0]),l[0]=Lh(e,l[0]),c[0]=Ih(o,c[0]),l[0]=Lh(o,l[0]),c[1]=Ih(t,c[1]),l[1]=Lh(t,l[1]),c[1]=Ih(s,c[1]),l[1]=Lh(s,l[1])}function Yh(e,t,n,r,i,a,o,s){var c=Tu,l=Cu,u=Lh(Ih(c(e,n,i),1),0),d=Lh(Ih(c(t,r,a),1),0),f=l(e,n,i,u),p=l(t,r,a,d);o[0]=Ih(e,i,f),o[1]=Ih(t,a,p),s[0]=Lh(e,i,f),s[1]=Lh(t,a,p)}function Xh(e,t,n,r,i,a,o,s,c){var l=Ec,u=Dc,d=Math.abs(i-a);if(d%Bh<1e-4&&d>1e-4){s[0]=e-n,s[1]=t-r,c[0]=e+n,c[1]=t+r;return}if(Vh[0]=zh(i)*n+e,Vh[1]=Rh(i)*r+t,Hh[0]=zh(a)*n+e,Hh[1]=Rh(a)*r+t,l(s,Vh,Hh),u(c,Vh,Hh),i%=Bh,i<0&&(i+=Bh),a%=Bh,a<0&&(a+=Bh),i>a&&!o?a+=Bh:i<a&&o&&(i+=Bh),o){var f=a;a=i,i=f}for(var p=0;p<a;p+=Math.PI/2)p>i&&(Uh[0]=zh(p)*n+e,Uh[1]=Rh(p)*r+t,l(s,Uh,s),u(c,Uh,c))}var Zh={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Qh=[],$h=[],eg=[],tg=[],ng=[],rg=[],ig=Math.min,ag=Math.max,og=Math.cos,sg=Math.sin,cg=Math.abs,lg=Math.PI,ug=lg*2,dg=typeof Float32Array<`u`,fg=[];function pg(e){return Math.round(e/lg*1e8)/1e8%2*lg}function mg(e,t){var n=pg(e[0]);n<0&&(n+=ug);var r=n-e[0],i=e[1];i+=r,!t&&i-n>=ug?i=n+ug:t&&n-i>=ug?i=n-ug:!t&&n>i?i=n+(ug-pg(n-i)):t&&n<i&&(i=n-(ug-pg(i-n))),e[0]=n,e[1]=i}var hg=function(){function e(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 e.prototype.increaseVersion=function(){this._version++},e.prototype.getVersion=function(){return this._version},e.prototype.setScale=function(e,t,n){n||=0,n>0&&(this._ux=cg(n/vf/e)||0,this._uy=cg(n/vf/t)||0)},e.prototype.setDPR=function(e){this.dpr=e},e.prototype.setContext=function(e){this._ctx=e},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(Zh.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},e.prototype.lineTo=function(e,t){var n=cg(e-this._xi),r=cg(t-this._yi),i=n>this._ux||r>this._uy;if(this.addData(Zh.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},e.prototype.bezierCurveTo=function(e,t,n,r,i,a){return this._drawPendingPt(),this.addData(Zh.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},e.prototype.quadraticCurveTo=function(e,t,n,r){return this._drawPendingPt(),this.addData(Zh.Q,e,t,n,r),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,r),this._xi=n,this._yi=r,this},e.prototype.arc=function(e,t,n,r,i,a){this._drawPendingPt(),fg[0]=r,fg[1]=i,mg(fg,a),r=fg[0],i=fg[1];var o=i-r;return this.addData(Zh.A,e,t,n,n,r,o,0,+!a),this._ctx&&this._ctx.arc(e,t,n,r,i,a),this._xi=og(i)*n+e,this._yi=sg(i)*n+t,this},e.prototype.arcTo=function(e,t,n,r,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,r,i),this},e.prototype.rect=function(e,t,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,r),this.addData(Zh.R,e,t,n,r),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(Zh.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},e.prototype.fill=function(e){e&&e.fill(),this.toStatic()},e.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(e){if(this._saveData){var t=e.length;!(this.data&&this.data.length===t)&&dg&&(this.data=new Float32Array(t));for(var n=0;n<t;n++)this.data[n]=e[n];this._len=t}},e.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(dg&&(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}},e.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]}},e.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t<this._len;t++)e[t]=this.data[t];this.data=e}},e.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var e=this.data;e instanceof Array&&(e.length=this._len,dg&&this._len>11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){eg[0]=eg[1]=ng[0]=ng[1]=Number.MAX_VALUE,tg[0]=tg[1]=rg[0]=rg[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 Zh.M:t=r=e[a++],n=i=e[a++],ng[0]=r,ng[1]=i,rg[0]=r,rg[1]=i;break;case Zh.L:Gh(t,n,e[a],e[a+1],ng,rg),t=e[a++],n=e[a++];break;case Zh.C:Jh(t,n,e[a++],e[a++],e[a++],e[a++],e[a],e[a+1],ng,rg),t=e[a++],n=e[a++];break;case Zh.Q:Yh(t,n,e[a++],e[a++],e[a],e[a+1],ng,rg),t=e[a++],n=e[a++];break;case Zh.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=og(f)*u+c,i=sg(f)*d+l),Xh(c,l,u,d,f,p,m,ng,rg),t=og(p)*u+c,n=sg(p)*d+l;break;case Zh.R:r=t=e[a++],i=n=e[a++];var h=e[a++],g=e[a++];Gh(r,i,r+h,i+g,ng,rg);break;case Zh.Z:t=r,n=i;break}Ec(eg,eg,ng),Dc(tg,tg,rg)}return a===0&&(eg[0]=eg[1]=tg[0]=tg[1]=0),new Ol(eg[0],eg[1],tg[0]-eg[0],tg[1]-eg[1])},e.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||=[];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 Zh.M:i=o=e[d++],a=s=e[d++];break;case Zh.L:var h=e[d++],g=e[d++],_=h-i,v=g-a;(cg(_)>n||cg(v)>r||d===t-1)&&(m=Math.sqrt(_*_+v*v),i=h,a=g);break;case Zh.C:var y=e[d++],b=e[d++],h=e[d++],g=e[d++],x=e[d++],S=e[d++];m=xte(i,a,y,b,h,g,x,S,10),i=x,a=S;break;case Zh.Q:var y=e[d++],b=e[d++],h=e[d++],g=e[d++];m=Cte(i,a,y,b,h,g,10),i=h,a=g;break;case Zh.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=og(D)*T+C,s=sg(D)*E+w),m=ag(T,E)*ig(ug,Math.abs(O)),i=og(k)*T+C,a=sg(k)*E+w;break;case Zh.R:o=i=e[d++],s=a=e[d++];var A=e[d++],j=e[d++];m=A*2+j*2;break;case Zh.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},e.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!==Zh.L&&v>0&&(e.lineTo(y,b),v=0),S){case Zh.M:o=c=n[x++],s=l=n[x++],e.moveTo(c,l);break;case Zh.L:u=n[x++],d=n[x++];var w=cg(u-c),T=cg(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 Zh.C:var k=n[x++],A=n[x++],j=n[x++],ee=n[x++],te=n[x++],ne=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;xu(c,k,j,te,D,Qh),xu(l,A,ee,ne,D,$h),e.bezierCurveTo(Qh[1],$h[1],Qh[2],$h[2],Qh[3],$h[3]);break lo}h+=E}e.bezierCurveTo(k,A,j,ee,te,ne),c=te,l=ne;break;case Zh.Q:var k=n[x++],A=n[x++],j=n[x++],ee=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;Eu(c,k,j,D,Qh),Eu(l,A,ee,D,$h),e.quadraticCurveTo(Qh[1],$h[1],Qh[2],$h[2]);break lo}h+=E}e.quadraticCurveTo(k,A,j,ee),c=j,l=ee;break;case Zh.A:var re=n[x++],ie=n[x++],ae=n[x++],oe=n[x++],se=n[x++],ce=n[x++],le=n[x++],ue=!n[x++],de=ae>oe?ae:oe,fe=cg(ae-oe)>.001,pe=se+ce,me=!1;if(f){var E=p[g++];h+E>_&&(pe=se+ce*(_-h)/E,me=!0),h+=E}if(fe&&e.ellipse?e.ellipse(re,ie,ae,oe,le,se,pe,ue):e.arc(re,ie,de,se,pe,ue),me)break lo;C&&(o=og(se)*ae+re,s=sg(se)*oe+ie),c=og(pe)*ae+re,l=sg(pe)*oe+ie;break;case Zh.R:o=c=n[x],s=l=n[x+1],u=n[x++],d=n[x++];var he=n[x++],ge=n[x++];if(f){var E=p[g++];if(h+E>_){var _e=_-h;e.moveTo(u,d),e.lineTo(u+ig(_e,he),d),_e-=he,_e>0&&e.lineTo(u+he,d+ig(_e,ge)),_e-=ge,_e>0&&e.lineTo(u+ag(he-_e,0),d+ge),_e-=he,_e>0&&e.lineTo(u,d+ag(ge-_e,0));break lo}h+=E}e.rect(u,d,he,ge);break;case Zh.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}}},e.prototype.clone=function(){var t=new e,n=this.data;return t.data=n.slice?n.slice():Array.prototype.slice.call(n),t._len=this._len,t},e.prototype.canSave=function(){return!!this._saveData},e.CMD=Zh,e.initDefaultProps=(function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0})(),e}();function gg(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}function _g(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:Su(e,t,n,r,i,a,o,s,l,u,null)<=d/2}function vg(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:Du(e,t,n,r,i,a,s,c,null)<=l/2}var yg=Math.PI*2;function bg(e){return e%=yg,e<0&&(e+=yg),e}var xg=Math.PI*2;function Sg(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)%xg<1e-4)return!0;if(a){var d=r;r=bg(i),i=bg(d)}else r=bg(r),i=bg(i);r>i&&(i+=xg);var f=Math.atan2(c,s);return f<0&&(f+=xg),f>=r&&f<=i||f+xg>=r&&f+xg<=i}function Cg(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 wg=hg.CMD,Tg=Math.PI*2,Eg=1e-4;function Dg(e,t){return Math.abs(e-t)<Eg}var Og=[-1,-1,-1],kg=[-1,-1];function Ag(){var e=kg[0];kg[0]=kg[1],kg[1]=e}function jg(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=yu(t,r,a,s,l,Og);if(u===0)return 0;for(var d=0,f=-1,p=void 0,m=void 0,h=0;h<u;h++){var g=Og[h],_=g===0||g===1?.5:1;_u(e,n,i,o,g)<c||(f<0&&(f=bu(t,r,a,s,kg),kg[1]<kg[0]&&f>1&&Ag(),p=_u(t,r,a,s,kg[0]),f>1&&(m=_u(t,r,a,s,kg[1]))),f===2?g<kg[0]?d+=p<t?_:-_:g<kg[1]?d+=m<p?_:-_:d+=s<m?_:-_:g<kg[0]?d+=p<t?_:-_:d+=s<p?_:-_)}return d}function Mg(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=Ste(t,r,a,s,Og);if(c===0)return 0;var l=Tu(t,r,a);if(l>=0&&l<=1){for(var u=0,d=Cu(t,r,a,l),f=0;f<c;f++){var p=Og[f]===0||Og[f]===1?.5:1,m=Cu(e,n,i,Og[f]);m<o||(Og[f]<l?u+=d<t?p:-p:u+=a<d?p:-p)}return u}else{var p=Og[0]===0||Og[0]===1?.5:1,m=Cu(e,n,i,Og[0]);return m<o?0:a<t?p:-p}}function Ng(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);Og[0]=-c,Og[1]=c;var l=Math.abs(r-i);if(l<1e-4)return 0;if(l>=Tg-1e-4){r=0,i=Tg;var u=a?1:-1;return o>=Og[0]+e&&o<=Og[1]+e?u:0}if(r>i){var d=r;r=i,i=d}r<0&&(r+=Tg,i+=Tg);for(var f=0,p=0;p<2;p++){var m=Og[p];if(m+e>o){var h=Math.atan2(s,m),u=a?1:-1;h<0&&(h=Tg+h),(h>=r&&h<=i||h+Tg>=r&&h+Tg<=i)&&(h>Math.PI/2&&h<Math.PI*1.5&&(u=-u),f+=u)}}return f}function Pg(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===wg.M&&m>1&&(n||(s+=Cg(c,l,u,d,r,i))),g&&(c=a[m],l=a[m+1],u=c,d=l),h){case wg.M:u=a[m++],d=a[m++],c=u,l=d;break;case wg.L:if(n){if(gg(c,l,a[m],a[m+1],t,r,i))return!0}else s+=Cg(c,l,a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case wg.C:if(n){if(_g(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=jg(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 wg.Q:if(n){if(vg(c,l,a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=Mg(c,l,a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case wg.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+=Cg(c,l,f,p,r,i);var w=(r-_)*b/y+_;if(n){if(Sg(_,v,b,x,x+S,C,t,w,i))return!0}else s+=Ng(_,v,b,x,x+S,C,w,i);c=Math.cos(x+S)*y+_,l=Math.sin(x+S)*b+v;break;case wg.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(gg(u,d,f,d,t,r,i)||gg(f,d,f,p,t,r,i)||gg(f,p,u,p,t,r,i)||gg(u,p,u,d,t,r,i))return!0}else s+=Cg(f,d,f,p,r,i),s+=Cg(u,p,u,d,r,i);break;case wg.Z:if(n){if(gg(c,l,u,d,t,r,i))return!0}else s+=Cg(c,l,u,d,r,i);c=u,l=d;break}}return!n&&!Dg(l,d)&&(s+=Cg(c,l,u,d,r,i)||0),s!==0}function Fg(e,t,n){return Pg(e,0,!1,t,n)}function Ig(e,t,n,r){return Pg(e,t,!0,n,r)}var Lg=I({fill:`#000`,stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:`butt`,miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Oh),Rg={style:I({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},kh.style)},zg=jf.concat([`invisible`,`culling`,`z`,`z2`,`zlevel`,`parent`]),Bg=function(e){cc(t,e);function t(t){return e.call(this,t)||this}return t.prototype.update=function(){var n=this;e.prototype.update.call(this);var r=this.style;if(r.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(e){n.buildPath(e,n.shape)}),i.silent=!0;var a=i.style;for(var o in r)a[o]!==r[o]&&(a[o]=r[o]);a.fill=r.fill?r.decal:null,a.decal=null,a.shadowColor=null,r.strokeFirst&&(a.stroke=null);for(var s=0;s<zg.length;++s)i[zg[s]]=this[zg[s]];i.__dirty|=1}else this._decalEl&&=null},t.prototype.getDecalElement=function(){return this._decalEl},t.prototype._init=function(t){var n=Ls(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?F(this.style,o):this.useStyle(o):a===`shape`?F(this.shape,o):e.prototype.attrKV.call(this,a,o)}this.style||this.useStyle({})},t.prototype.getDefaultStyle=function(){return null},t.prototype.getDefaultShape=function(){return{}},t.prototype.canBeInsideText=function(){return this.hasFill()},t.prototype.getInsideTextFill=function(){var e=this.style.fill;if(e!==`none`){if(H(e)){var t=nd(e,0);return t>.5?bf:t>.2?Sf:xf}else if(e)return xf}return bf},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(H(t)){var n=this.__zr;if(!!(n&&n.isDarkMode())==nd(e,0)<.4)return t}},t.prototype.buildPath=function(e,t,n){},t.prototype.pathUpdated=function(){this.__dirty&=-5},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new hg(!1)},t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style.fill;return e!=null&&e!==`none`},t.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||=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},t.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)),Ig(a,o/s,e,t)))return!0}if(this.hasFill())return Fg(a,e,t)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&=null,this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate(`shape`,e)},t.prototype.updateDuringAnimation=function(e){e===`style`?this.dirtyStyle():e===`shape`?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(t,n){t===`shape`?this.setShape(n):e.prototype.attrKV.call(this,t,n)},t.prototype.setShape=function(e,t){var n=this.shape;return n||=this.shape={},typeof e==`string`?n[e]=t:F(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&4)},t.prototype.createStyle=function(e){return rc(Lg,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=F({},this.shape))},t.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;if(n&&n.shape?a?i?c=n.shape:(c=F({},r.shape),F(c,n.shape)):(c=F({},i?this.shape:r.shape),F(c,n.shape)):s&&(c=r.shape),c)if(a){this.shape=F({},this.shape);for(var l={},u=Ls(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()},t.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||={},this._mergeStyle(r,a.shape))}return r&&(n.shape=r),n},t.prototype.getAnimationStyleProps=function(){return Rg},t.prototype.isZeroArea=function(){return!1},t.extend=function(e){var n=function(t){cc(n,t);function n(n){var r=t.call(this,n)||this;return e.init&&e.init.call(r,n),r}return n.prototype.getDefaultStyle=function(){return P(e.style)},n.prototype.getDefaultShape=function(){return P(e.shape)},n}(t);for(var r in e)typeof e[r]==`function`&&(n.prototype[r]=e[r]);return n},t.initDefaultProps=(function(){var e=t.prototype;e.type=`path`,e.strokeContainThreshold=5,e.segmentIgnoreThreshold=0,e.subPixelOptimize=!1,e.autoBatch=!1,e.__dirty=7})(),t}(Mh),Vg=I({strokeFirst:!0,font:ms,x:0,y:0,textAlign:`left`,textBaseline:`top`,miterLimit:2},Lg),Hg=function(e){cc(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.hasStroke=function(){return Eh(this.style)},t.prototype.hasFill=function(){var e=this.style.fill;return e!=null&&e!==`none`},t.prototype.createStyle=function(e){return rc(Vg,e)},t.prototype.setBoundingRect=function(e){this._rect=e},t.prototype.getBoundingRect=function(){return this._rect||=wh(this.style),this._rect},t.initDefaultProps=(function(){var e=t.prototype;e.dirtyRectTolerance=10})(),t}(Mh);Hg.prototype.type=`tspan`;var Ug=I({x:0,y:0},Oh),Wg={style:I({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},kh.style)};function Gg(e){return!!(e&&typeof e!=`string`&&e.width&&e.height)}var Kg=function(e){cc(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createStyle=function(e){return rc(Ug,e)},t.prototype._getSize=function(e){var t=this.style,n=t[e];if(n!=null)return n;var r=Gg(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},t.prototype.getWidth=function(){return this._getSize(`width`)},t.prototype.getHeight=function(){return this._getSize(`height`)},t.prototype.getAnimationStyleProps=function(){return Wg},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||=new Ol(e.x||0,e.y||0,this.getWidth(),this.getHeight()),this._rect},t}(Mh);Kg.prototype.type=`image`;function qg(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)}var Jg=Math.round;function Yg(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?(Jg(r*2)===Jg(i*2)&&(e.x1=e.x2=Zg(r,s,!0)),Jg(a*2)===Jg(o*2)&&(e.y1=e.y2=Zg(a,s,!0)),e):e}}function Xg(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=Zg(r,s,!0),e.y=Zg(i,s,!0),e.width=Math.max(Zg(r+a,s,!1)-e.x,a===0?0:1),e.height=Math.max(Zg(i+o,s,!1)-e.y,o===0?0:1),e):e}}function Zg(e,t,n){if(!t)return e;var r=Jg(e*2);return(r+Jg(t))%2==0?r/2:(r+(n?1:-1))/2}var Qg=function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e}(),$g={},e_=function(e){cc(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Qg},t.prototype.buildPath=function(e,t){var n,r,i,a;if(this.subPixelOptimize){var o=Xg($g,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?qg(e,t):e.rect(n,r,i,a)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(Bg);e_.prototype.type=`rect`;var t_={fill:`#000`},n_=2,r_={},i_={style:I({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},kh.style)},a_=function(e){cc(t,e);function t(t){var n=e.call(this)||this;return n.type=`text`,n._children=[],n._defaultStyle=t_,n.attr(t),n}return t.prototype.childrenRef=function(){return this._children},t.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}},t.prototype.updateTransform=function(){var t=this.innerTransformable;t?(t.updateTransform(),t.transform&&(this.transform=t.transform)):e.prototype.updateTransform.call(this)},t.prototype.getLocalTransform=function(t){var n=this.innerTransformable;return n?n.getLocalTransform(t):e.prototype.getLocalTransform.call(this,t)},t.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),e.prototype.getComputedTransform.call(this)},t.prototype._updateSubTexts=function(){this._childCursor=0,f_(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=t},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=null},t.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var e=new Ol(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||=e.clone(),r.union(e)):(r||=o.clone(),r.union(o))}this._rect=r||e}return this._rect},t.prototype.setDefaultTextStyle=function(e){this._defaultStyle=e||t_},t.prototype.setTextContent=function(e){if(process.env.NODE_ENV!==`production`)throw Error(`Can't attach text on another text`)},t.prototype._mergeStyle=function(e,t){if(!t)return e;var n=t.rich,r=e.rich||n&&{};return F(e,t),n&&r?(this._mergeRich(r,n),e.rich=r):r&&(e.rich=r),e},t.prototype._mergeRich=function(e,t){for(var n=Ls(t),r=0;r<n.length;r++){var i=n[r];e[i]=e[i]||{},F(e[i],t[i])}},t.prototype.getAnimationStyleProps=function(){return i_},t.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},t.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`;bh(r_,r.overflowRect,i,a,o,s),i=r_.baseX,a=r_.baseY;var c=uh(__(e),e,r_.outerWidth,r_.outerHeight),l=v_(e),u=!!e.backgroundColor,d=c.outerHeight,f=c.outerWidth,p=c.lines,m=c.lineHeight;this.isTruncated=!!c.isTruncated;var h=i,g=Uf(a,c.contentHeight,s);if(l||n){var _=Hf(i,f,o),v=Uf(a,d,s);l&&this._renderBackground(e,e,_,v,f,d)}g+=m/2,n&&(h=g_(i,o,n),s===`top`?g+=n[0]:s===`bottom`&&(g-=n[2]));for(var y=0,b=!1,x=!1,S=h_(`fill`in e?e.fill:(x=!0,r.fill)),C=m_(`stroke`in e?e.stroke:!u&&(!r.autoStroke||x)?(y=n_,b=!0,r.stroke):null),w=e.textShadowBlur>0,T=0;T<p.length;T++){var E=this._getOrCreateChild(Hg),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,u_(D,e),g+=m,E.setBoundingRect(Th(D,c.contentWidth,c.calculatedLineHeight,b?0:null))}},t.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;bh(r_,t.overflowRect,i,a,n,r),i=r_.baseX,a=r_.baseY;var o=mh(__(e),e,r_.outerWidth,r_.outerHeight,n),s=o.width,c=o.outerWidth,l=o.outerHeight,u=e.padding;this.isTruncated=!!o.isTruncated;var d=Hf(i,c,n),f=Uf(a,l,r),p=d,m=f;u&&(p+=u[3],m+=u[0]);var h=p+s;v_(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}},t.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&&v_(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=g_(i,a,d),l-=e.height/2-d[0]-e.innerHeight/2);var f=this._getOrCreateChild(Hg),p=f.createStyle();f.useStyle(p);var m=this._defaultStyle,h=!1,g=0,_=!1,v=h_(`fill`in s?s.fill:`fill`in t?t.fill:(h=!0,m.fill)),y=m_(`stroke`in s?s.stroke:`stroke`in t?t.stroke:!u&&!o&&(!m.autoStroke||h)?(g=n_,_=!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=Js(s.opacity,t.opacity,1),u_(p,s),y&&(p.lineWidth=Js(s.lineWidth,t.lineWidth,g),p.lineDash=W(s.lineDash,t.lineDash),p.lineDashOffset=t.lineDashOffset||0,p.stroke=y),v&&(p.fill=v),f.setBoundingRect(Th(p,e.contentWidth,e.contentHeight,_?0:null))},t.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(e_),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=W(e.fillOpacity,1)}else if(l){m=this._getOrCreateChild(Kg),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=W(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=Js(e.opacity,t.opacity,1)},t.makeFont=function(e){var t=``;return d_(e)&&(t=[e.fontStyle,e.fontWeight,l_(e.fontSize),e.fontFamily||`sans-serif`].join(` `)),t&&Zs(t)||e.textFont||e.font},t}(Mh),o_={left:!0,right:1,center:1},s_={top:1,bottom:1,middle:1},c_=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`];function l_(e){return typeof e==`string`&&(e.indexOf(`px`)!==-1||e.indexOf(`rem`)!==-1||e.indexOf(`em`)!==-1)?e:isNaN(+e)?`12px`:e+`px`}function u_(e,t){for(var n=0;n<c_.length;n++){var r=c_[n],i=t[r];i!=null&&(e[r]=i)}}function d_(e){return e.fontSize!=null||e.fontFamily||e.fontWeight}function f_(e){return p_(e),L(e.rich,p_),e}function p_(e){if(e){e.font=a_.makeFont(e);var t=e.align;t===`middle`&&(t=`center`),e.align=t==null||o_[t]?t:`left`;var n=e.verticalAlign;n===`center`&&(n=`middle`),e.verticalAlign=n==null||s_[n]?n:`top`,e.padding&&=Xs(e.padding)}}function m_(e,t){return e==null||t<=0||e===`transparent`||e===`none`?null:e.image||e.colorStops?`#000`:e}function h_(e){return e==null||e===`none`?null:e.image||e.colorStops?`#000`:e}function g_(e,t,n){return t===`right`?e-n[1]:t===`center`?e+n[3]/2-n[1]/2:e+n[3]}function __(e){var t=e.text;return t!=null&&(t+=``),t}function v_(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}var y_=Cm(),b_=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`})}},x_=1,S_={},C_=Cm(),w_=Cm(),T_=[`emphasis`,`blur`,`select`],E_=[`normal`,`emphasis`,`blur`,`select`],D_=`highlight`,O_=`downplay`,k_=`select`,A_=`unselect`,j_=`toggleSelect`,M_=`selectchanged`;function N_(e){return e!=null&&e!==`none`}function P_(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function F_(e){P_(e,`emphasis`,2)}function I_(e){e.hoverState===2&&P_(e,`normal`,0)}function L_(e){P_(e,`blur`,1)}function R_(e){e.hoverState===1&&P_(e,`normal`,0)}function z_(e){e.selected=!0}function B_(e){e.selected=!1}function V_(e,t,n){t(e,n)}function H_(e,t,n){V_(e,t,n),e.isGroup&&e.traverse(function(e){V_(e,t,n)})}function U_(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 W_(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 G_(e,t,n,r){var i=n&&js(n,`select`)>=0,a=!1;if(e instanceof Bg){var o=C_(e),s=i&&o.selectFill||o.normalFill,c=i&&o.selectStroke||o.normalStroke;if(N_(s)||N_(c)){r||={};var l=r.style||{};l.fill===`inherit`?(a=!0,r=F({},r),l=F({},l),l.fill=s):!N_(l.fill)&&N_(s)?(a=!0,r=F({},r),l=F({},l),l.fill=id(s)):!N_(l.stroke)&&N_(c)&&(a||(r=F({},r),l=F({},l)),l.stroke=id(c)),r.style=l}}if(r&&r.z2==null){a||(r=F({},r));var u=e.z2EmphasisLift;r.z2=e.z2+(u??10)}return r}function K_(e,t,n){if(n&&n.z2==null){n=F({},n);var r=e.z2SelectLift;n.z2=e.z2+(r??9)}return n}function q_(e,t,n){var r=js(e.currentStates,t)>=0,i=e.style.opacity,a=r?null:W_(e,[`opacity`],t,{opacity:1});n||={};var o=n.style||{};return o.opacity??(n=F({},n),o=F({opacity:r?i:a.opacity*.1},o),n.style=o),n}function J_(e,t){var n=this.states[e];if(this.style){if(e===`emphasis`)return G_(this,e,t,n);if(e===`blur`)return q_(this,e,n);if(e===`select`)return K_(this,e,n)}return n}function Y_(e){e.stateProxy=J_;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=J_),n&&(n.stateProxy=J_)}function X_(e,t){!iv(e,t)&&!e.__highByOuter&&H_(e,F_)}function Z_(e,t){!iv(e,t)&&!e.__highByOuter&&H_(e,I_)}function Q_(e,t){e.__highByOuter|=1<<(t||0),H_(e,F_)}function $_(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&H_(e,I_)}function ev(e){H_(e,L_)}function tv(e){H_(e,R_)}function nv(e){H_(e,z_)}function rv(e){H_(e,B_)}function iv(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function av(e){var t=e.getModel(),n=[],r=[];t.eachComponent(function(t,i){var a=w_(i),o=t===`series`,s=o?e.getViewOfSeriesModel(i):e.getViewOfComponentModel(i);!o&&r.push(s),a.isBlured&&(s.group.traverse(function(e){R_(e)}),o&&n.push(i)),a.isBlured=!1}),L(r,function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)})}function ov(e,t,n,r){var i=r.getModel();n||=`coordinateSystem`;function a(e,t){for(var n=0;n<t.length;n++){var r=e.getItemGraphicEl(t[n]);r&&tv(r)}}if(e!=null&&!(!t||t===`none`)){var o=i.getSeriesByIndex(e),s=o.coordinateSystem;s&&s.master&&(s=s.master);var c=[];i.eachSeries(function(e){var i=o===e,l=e.coordinateSystem;if(l&&l.master&&(l=l.master),!(n===`series`&&!i||n===`coordinateSystem`&&!(l&&s?l===s:i)||t===`series`&&i)){if(r.getViewOfSeriesModel(e).group.traverse(function(e){e.__highByOuter&&i&&t===`self`||L_(e)}),Ns(t))a(e.getData(),t);else if(U(t))for(var u=Ls(t),d=0;d<u.length;d++)a(e.getData(u[d]),t[u[d]]);c.push(e),w_(e).isBlured=!0}}),i.eachComponent(function(e,t){if(e!==`series`){var n=r.getViewOfComponentModel(t);n&&n.toggleBlurSeries&&n.toggleBlurSeries(c,!0,i)}})}}function sv(e,t,n){if(!(e==null||t==null)){var r=n.getModel().getComponent(e,t);if(r){w_(r).isBlured=!0;var i=n.getViewOfComponentModel(r);!i||!i.focusBlurEnabled||i.group.traverse(function(e){L_(e)})}}}function cv(e,t,n){var r=e.seriesIndex,i=e.getData(t.dataType);if(!i){process.env.NODE_ENV!==`production`&&Gp(`Unknown dataType `+t.dataType);return}var a=Sm(i,t);a=(B(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);ov(r,l.focus,l.blurScope,n)}else{var u=e.get([`emphasis`,`focus`]),d=e.get([`emphasis`,`blurScope`]);u!=null&&ov(r,u,d,n)}}function lv(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(process.env.NODE_ENV!==`production`&&!Cv(s[l])&&Gp(`param should be highDownDispatcher`),y_(s[l]).focus===`self`){c=!0;break}return{focusSelf:c,dispatchers:s}}function uv(e,t,n){process.env.NODE_ENV!==`production`&&!Cv(e)&&Gp(`param should be highDownDispatcher`);var r=y_(e),i=lv(r.componentMainType,r.componentIndex,r.componentHighDownName,n),a=i.dispatchers,o=i.focusSelf;a?(o&&sv(r.componentMainType,r.componentIndex,n),L(a,function(e){return X_(e,t)})):(ov(r.seriesIndex,r.focus,r.blurScope,n),r.focus===`self`&&sv(r.componentMainType,r.componentIndex,n),X_(e,t))}function dv(e,t,n){process.env.NODE_ENV!==`production`&&!Cv(e)&&Gp(`param should be highDownDispatcher`),av(n);var r=y_(e),i=lv(r.componentMainType,r.componentIndex,r.componentHighDownName,n).dispatchers;i?L(i,function(e){return Z_(e,t)}):Z_(e,t)}function fv(e,t,n){if(Ev(t)){var r=t.dataType,i=Sm(e.getData(r),t);B(i)||(i=[i]),e[t.type===`toggleSelect`?`toggleSelect`:t.type===`select`?`select`:`unselect`](i,r)}}function pv(e){L(e.getAllData(),function(t){var n=t.data,r=t.type;n.eachItemGraphicEl(function(t,n){e.isSelected(n,r)?nv(t):rv(t)})})}function mv(e){var t=[];return e.eachSeries(function(e){L(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 hv(e,t,n){Sv(e,!0),H_(e,Y_),vv(e,t,n)}function gv(e){Sv(e,!1)}function _v(e,t,n,r){r?gv(e):hv(e,t,n)}function vv(e,t,n){var r=y_(e);t==null?r.focus&&=null:(r.focus=t,r.blurScope=n)}var yv=[`emphasis`,`blur`,`select`],bv={itemStyle:`getItemStyle`,lineStyle:`getLineStyle`,areaStyle:`getAreaStyle`};function xv(e,t,n,r){n||=`itemStyle`;for(var i=0;i<yv.length;i++){var a=yv[i],o=t.getModel([a,n]),s=e.ensureState(a);s.style=r?r(o):o[bv[n]]()}}function Sv(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 Cv(e){return!!(e&&e.__highDownDispatcher)}function wv(e,t,n){var r=y_(e);r.componentMainType=t.mainType,r.componentIndex=t.componentIndex,r.componentHighDownName=n}function Tv(e){var t=S_[e];return t==null&&x_<=32&&(t=S_[e]=x_++),t}function Ev(e){var t=e.type;return t===`select`||t===`unselect`||t===`toggleSelect`}function Dv(e){var t=e.type;return t===`highlight`||t===`downplay`}function Ov(e){var t=C_(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 kv=hg.CMD,Av=[[],[],[]],jv=Math.sqrt,Mv=Math.atan2;function Nv(e,t){if(t){var n=e.data,r=e.len(),i,a,o,s,c,l,u=kv.M,d=kv.C,f=kv.L,p=kv.R,m=kv.A,h=kv.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=jv(t[0]*t[0]+t[1]*t[1]),y=jv(t[2]*t[2]+t[3]*t[3]),b=Mv(-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++],Tc(l,l,t),n[s++]=l[0],n[s++]=l[1],l[0]+=n[o++],l[1]+=n[o++],Tc(l,l,t),n[s++]=l[0],n[s++]=l[1]}for(c=0;c<a;c++){var x=Av[c];x[0]=n[o++],x[1]=n[o++],Tc(x,x,t),n[s++]=x[0],n[s++]=x[1]}}e.increaseVersion()}}var Pv=Math.sqrt,Fv=Math.sin,Iv=Math.cos,Lv=Math.PI;function Rv(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function zv(e,t){return(e[0]*t[0]+e[1]*t[1])/(Rv(e)*Rv(t))}function Bv(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(zv(e,t))}function Vv(e,t,n,r,i,a,o,s,c,l,u){var d=Lv/180*c,f=Iv(d)*(e-n)/2+Fv(d)*(t-r)/2,p=-1*Fv(d)*(e-n)/2+Iv(d)*(t-r)/2,m=f*f/(o*o)+p*p/(s*s);m>1&&(o*=Pv(m),s*=Pv(m));var h=(i===a?-1:1)*Pv((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+Iv(d)*g-Fv(d)*_,y=(t+r)/2+Fv(d)*g+Iv(d)*_,b=Bv([1,0],[(f-g)/o,(p-_)/s]),x=[(f-g)/o,(p-_)/s],S=[(-1*f-g)/o,(-1*p-_)/s],C=Bv(x,S);if(zv(x,S)<=-1&&(C=Lv),zv(x,S)>=1&&(C=0),C<0){var w=Math.round(C/Lv*1e6)/1e6;C=Lv*2+w%2*Lv}u.addData(l,v,y,o,s,b,C,d,a)}var Hv=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Uv=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Wv(e){var t=new hg;if(!e)return t;var n=0,r=0,i=n,a=r,o,s=hg.CMD,c=e.match(Hv);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(Uv)||[],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,Vv(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,Vv(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 Gv=function(e){cc(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.applyTransform=function(e){},t}(Bg);function Kv(e){return e.setData!=null}function qv(e,t){var n=Wv(e),r=F({},t);return r.buildPath=function(e){var t=Kv(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){Nv(n,e),this.dirtyShape()},r}function Jv(e,t){return new Gv(qv(e,t))}function Yv(e,t){var n=qv(e,t);return function(e){cc(t,e);function t(t){var r=e.call(this,t)||this;return r.applyTransform=n.applyTransform,r.buildPath=n.buildPath,r}return t}(Gv)}function Xv(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 Bg(t);return o.createPathProxy(),o.buildPath=function(e){if(Kv(e)){e.appendPath(n);var t=e.getContext();t&&e.rebuildPath(t,1)}},o}function Zv(e,t){t||={};var n=new Bg;return e.shape&&n.setShape(e.shape),n.setStyle(e.style),t.bakeTransform?Nv(n.path,e.getComputedTransform()):t.toLocal?n.setLocalTransform(e.getComputedTransform()):n.copyTransform(e),n.buildPath=e.buildPath,n.applyTransform=n.applyTransform,n.z=e.z,n.z2=e.z2,n.zlevel=e.zlevel,n}var Qv=function(){function e(){this.cx=0,this.cy=0,this.r=0}return e}(),$v=function(e){cc(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Qv},t.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)},t}(Bg);$v.prototype.type=`circle`;var ey=function(){function e(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return e}(),ty=function(e){cc(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new ey},t.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()},t}(Bg);ty.prototype.type=`ellipse`;var ny=Math.PI,ry=ny*2,iy=Math.sin,ay=Math.cos,oy=Math.acos,sy=Math.atan2,cy=Math.abs,ly=Math.sqrt,uy=Math.max,dy=Math.min,fy=1e-4;function py(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<fy))return f=(u*(t-a)-d*(e-i))/f,[e+f*c,t+f*l]}function my(e,t,n,r,i,a,o){var s=e-n,c=t-r,l=(o?a:-a)/ly(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)*ly(uy(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 hy(e){var t;if(B(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 gy(e,t){var n,r=uy(t.r,0),i=uy(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=cy(c-s),p=f>ry&&f%ry;if(p>fy&&(f=p),!(r>fy))e.moveTo(l,u);else if(f>ry-fy)e.moveTo(l+r*ay(s),u+r*iy(s)),e.arc(l,u,r,s,c,!d),i>fy&&(e.moveTo(l+i*ay(c),u+i*iy(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*ay(s),j=r*iy(s),ee=i*ay(c),te=i*iy(c),ne=f>fy;if(ne){var re=t.cornerRadius;re&&(n=hy(re),m=n[0],h=n[1],g=n[2],_=n[3]);var ie=cy(r-i)/2;if(v=dy(ie,g),y=dy(ie,_),b=dy(ie,m),x=dy(ie,h),w=S=uy(v,y),T=C=uy(b,x),(S>fy||C>fy)&&(E=r*ay(c),D=r*iy(c),O=i*ay(s),k=i*iy(s),f<ny)){var ae=py(A,j,O,k,E,D,ee,te);if(ae){var oe=A-ae[0],se=j-ae[1],ce=E-ae[0],le=D-ae[1],ue=1/iy(oy((oe*ce+se*le)/(ly(oe*oe+se*se)*ly(ce*ce+le*le)))/2),de=ly(ae[0]*ae[0]+ae[1]*ae[1]);w=dy(S,(r-de)/(ue+1)),T=dy(C,(i-de)/(ue-1))}}}if(!ne)e.moveTo(l+A,u+j);else if(w>fy){var fe=dy(g,w),pe=dy(_,w),me=my(O,k,A,j,r,fe,d),he=my(E,D,ee,te,r,pe,d);e.moveTo(l+me.cx+me.x0,u+me.cy+me.y0),w<S&&fe===pe?e.arc(l+me.cx,u+me.cy,w,sy(me.y0,me.x0),sy(he.y0,he.x0),!d):(fe>0&&e.arc(l+me.cx,u+me.cy,fe,sy(me.y0,me.x0),sy(me.y1,me.x1),!d),e.arc(l,u,r,sy(me.cy+me.y1,me.cx+me.x1),sy(he.cy+he.y1,he.cx+he.x1),!d),pe>0&&e.arc(l+he.cx,u+he.cy,pe,sy(he.y1,he.x1),sy(he.y0,he.x0),!d))}else e.moveTo(l+A,u+j),e.arc(l,u,r,s,c,!d);if(!(i>fy)||!ne)e.lineTo(l+ee,u+te);else if(T>fy){var fe=dy(m,T),pe=dy(h,T),me=my(ee,te,E,D,i,-pe,d),he=my(A,j,O,k,i,-fe,d);e.lineTo(l+me.cx+me.x0,u+me.cy+me.y0),T<C&&fe===pe?e.arc(l+me.cx,u+me.cy,T,sy(me.y0,me.x0),sy(he.y0,he.x0),!d):(pe>0&&e.arc(l+me.cx,u+me.cy,pe,sy(me.y0,me.x0),sy(me.y1,me.x1),!d),e.arc(l,u,i,sy(me.cy+me.y1,me.cx+me.x1),sy(he.cy+he.y1,he.cx+he.x1),d),fe>0&&e.arc(l+he.cx,u+he.cy,fe,sy(he.y1,he.x1),sy(he.y0,he.x0),!d))}else e.lineTo(l+ee,u+te),e.arc(l,u,i,c,s,d)}e.closePath()}}}var _y=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return e}(),vy=function(e){cc(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new _y},t.prototype.buildPath=function(e,t){gy(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(Bg);vy.prototype.type=`sector`;var yy=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e}(),by=function(e){cc(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new yy},t.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)},t}(Bg);by.prototype.type=`ring`;function Mte(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++)Ec(u,u,e[f]),Dc(d,d,e[f]);Ec(u,u,r[0]),Dc(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(dc(e[f]));continue}else c=e[f-1],l=e[f+1];hc(a,l,c),vc(a,a,t);var h=bc(m,c),g=bc(m,l),_=h+g;_!==0&&(h/=_,g/=_),vc(o,a,-h),vc(s,a,g);var v=pc([],m,o),y=pc([],m,s);r&&(Dc(v,v,u),Ec(v,v,d),Dc(y,y,u),Ec(y,y,d)),i.push(v),i.push(y)}return n&&i.push(i.shift()),i}function xy(e,t,n){var r=t.smooth,i=t.points;if(i&&i.length>=2){if(r){var a=Mte(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 Nte=function(){function e(){this.points=null,this.smooth=0,this.smoothConstraint=null}return e}(),Sy=function(e){cc(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Nte},t.prototype.buildPath=function(e,t){xy(e,t,!0)},t}(Bg);Sy.prototype.type=`polygon`;var Pte=function(){function e(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return e}(),Cy=function(e){cc(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultStyle=function(){return{stroke:`#000`,fill:null}},t.prototype.getDefaultShape=function(){return new Pte},t.prototype.buildPath=function(e,t){xy(e,t,!1)},t}(Bg);Cy.prototype.type=`polyline`;var Fte={},Ite=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return e}(),wy=function(e){cc(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultStyle=function(){return{stroke:`#000`,fill:null}},t.prototype.getDefaultShape=function(){return new Ite},t.prototype.buildPath=function(e,t){var n,r,i,a;if(this.subPixelOptimize){var o=Yg(Fte,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))},t.prototype.pointAt=function(e){var t=this.shape;return[t.x1*(1-e)+t.x2*e,t.y1*(1-e)+t.y2*e]},t}(Bg);wy.prototype.type=`line`;var Ty=[],Lte=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return e}();function Ey(e,t,n){var r=e.cpx2,i=e.cpy2;return r!=null||i!=null?[(n?vu:_u)(e.x1,e.cpx1,e.cpx2,e.x2,t),(n?vu:_u)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(n?wu:Cu)(e.x1,e.cpx1,e.x2,t),(n?wu:Cu)(e.y1,e.cpy1,e.y2,t)]}var Dy=function(e){cc(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultStyle=function(){return{stroke:`#000`,fill:null}},t.prototype.getDefaultShape=function(){return new Lte},t.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&&(Eu(n,o,i,u,Ty),o=Ty[1],i=Ty[2],Eu(r,s,a,u,Ty),s=Ty[1],a=Ty[2]),e.quadraticCurveTo(o,s,i,a)):(u<1&&(xu(n,o,c,i,u,Ty),o=Ty[1],c=Ty[2],i=Ty[3],xu(r,s,l,a,u,Ty),s=Ty[1],l=Ty[2],a=Ty[3]),e.bezierCurveTo(o,s,c,l,i,a)))},t.prototype.pointAt=function(e){return Ey(this.shape,e,!1)},t.prototype.tangentAt=function(e){var t=Ey(this.shape,e,!0);return yc(t,t)},t}(Bg);Dy.prototype.type=`bezier-curve`;var Rte=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),Oy=function(e){cc(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultStyle=function(){return{stroke:`#000`,fill:null}},t.prototype.getDefaultShape=function(){return new Rte},t.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)},t}(Bg);Oy.prototype.type=`arc`;var ky=function(e){cc(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`compound`,t}return t.prototype._updatePathDirty=function(){for(var e=this.shape.paths,t=this.shapeChanged(),n=0;n<e.length;n++)t||=e[n].shapeChanged();t&&this.dirtyShape()},t.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)},t.prototype.buildPath=function(e,t){for(var n=t.paths||[],r=0;r<n.length;r++)n[r].buildPath(e,n[r].shape,!0)},t.prototype.afterBrush=function(){for(var e=this.shape.paths||[],t=0;t<e.length;t++)e[t].pathUpdated()},t.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),Bg.prototype.getBoundingRect.call(this)},t}(Bg),Ay=function(){function e(e){this.colorStops=e||[]}return e.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},e}(),jy=function(e){cc(t,e);function t(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 t}(Ay),My=function(e){cc(t,e);function t(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 t}(Ay),Ny=Math.min,zte=Math.max,Py=Math.abs,Fy=[0,0],Iy=[0,0],Ly=Ml(),Ry=Ly.minTv,zy=Ly.maxTv,By=function(){function e(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new J;for(var n=0;n<2;n++)this._axes[n]=new J;e&&this.fromBoundingRect(e,t)}return e.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);J.sub(r[0],n[1],n[0]),J.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])},e.prototype.intersect=function(e,t,n){var r=!0,i=!t;return t&&J.set(t,0,0),Ly.reset(n,!i),!this._intersectCheckOneSide(this,e,i,1)&&(r=!1,i)||!this._intersectCheckOneSide(e,this,i,-1)&&(r=!1,i)||!i&&!Ly.negativeSize&&J.copy(t,r?Ly.useDir?Ly.dirMinTv:Ry:zy),r},e.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,Fy),e._getProjMinMaxOnAxis(a,t._corners,Iy),Ly.negativeSize||Fy[1]<Iy[0]||Fy[0]>Iy[1]){if(i=!1,Ly.negativeSize||n)return i;var s=Py(Iy[0]-Fy[1]),c=Py(Fy[0]-Iy[1]);Ny(s,c)>zy.len()&&(s<c?J.scale(zy,o,-s*r):J.scale(zy,o,c*r))}else if(!n){var s=Py(Iy[0]-Fy[1]),c=Py(Fy[0]-Iy[1]);(Ly.useDir||Ny(s,c)<Ry.len())&&((s<c||!Ly.bidirectional)&&(J.scale(Ry,o,s*r),Ly.useDir&&Ly.calcDirMTV()),(s>=c||!Ly.bidirectional)&&(J.scale(Ry,o,-c*r),Ly.useDir&&Ly.calcDirMTV()))}}return i},e.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=Ny(l,o),s=zte(l,s)}n[0]=o+Ly.touchThreshold,n[1]=s-Ly.touchThreshold,Ly.negativeSize=n[1]<n[0]},e}(),Bte=[],Vte=function(e){cc(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.notClear=!0,t.incremental=!0,t._displayables=[],t._temporaryDisplayables=[],t._cursor=0,t}return t.prototype.traverse=function(e,t){e.call(t,this)},t.prototype.useStyle=function(){this.style={}},t.prototype.getCursor=function(){return this._cursor},t.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},t.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},t.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},t.prototype.addDisplayable=function(e,t){t?this._temporaryDisplayables.push(e):this._displayables.push(e),this.markRedraw()},t.prototype.addDisplayables=function(e,t){t||=!1;for(var n=0;n<e.length;n++)this.addDisplayable(e[n],t)},t.prototype.getDisplayables=function(){return this._displayables},t.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},t.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])},t.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}},t.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new Ol(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(Bte)),e.union(r)}this._rect=e}return this._rect},t.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},t}(Mh),Vy=Cm();function Hy(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=W(r.duration,200),u=W(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)),V(d)&&(d=d(n,i)),V(l)&&(l=l(n)),{duration:l||0,delay:d,easing:u}}else return null}function Uy(e,t,n,r,i,a,o){var s=!1,c;V(i)?(o=a,a=i,i=null):U(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=Hy(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 Wy(e,t,n,r,i,a){Uy(`update`,e,t,n,r,i,a)}function Gy(e,t,n,r,i,a){Uy(`enter`,e,t,n,r,i,a)}function Ky(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 qy(e,t,n,r,i,a){Ky(e)||Uy(`leave`,e,t,n,r,i,a)}function Jy(e,t,n,r){e.removeTextContent(),e.removeTextGuideLine(),qy(e,{style:{opacity:0}},t,n,r)}function Yy(e,t,n){function r(){e.parent&&e.parent.remove(e)}e.isGroup?e.traverse(function(e){e.isGroup||Jy(e,t,n,r)}):Jy(e,t,n,r)}function Xy(e){Vy(e).oldStyle=e.style}function Hte(e){return Vy(e).oldStyle}var Zy=s({Arc:()=>Oy,BezierCurve:()=>Dy,BoundingRect:()=>Ol,Circle:()=>$v,CompoundPath:()=>ky,Ellipse:()=>ty,Group:()=>Y,Image:()=>Kg,IncrementalDisplayable:()=>Vte,Line:()=>wy,LinearGradient:()=>jy,OrientedBoundingRect:()=>By,Path:()=>Bg,Point:()=>J,Polygon:()=>Sy,Polyline:()=>Cy,RadialGradient:()=>My,Rect:()=>e_,Ring:()=>by,Sector:()=>vy,Text:()=>a_,WH:()=>eb,XY:()=>$y,applyTransform:()=>db,calcZ2Range:()=>jb,clipPointsByRect:()=>hb,clipRectByRect:()=>Jte,createIcon:()=>gb,ensureCopyRect:()=>Ob,ensureCopyTransform:()=>kb,expandOrShrinkRect:()=>bb,extendPath:()=>Gte,extendShape:()=>Ute,getShapeClass:()=>nb,getTransform:()=>ub,groupTransition:()=>mb,initProps:()=>Gy,isBoundingRectAxisAligned:()=>Eb,isElementRemoved:()=>Ky,lineLineIntersect:()=>vb,linePolygonIntersect:()=>_b,makeImage:()=>ib,makePath:()=>rb,mergePath:()=>ob,registerShape:()=>tb,removeElement:()=>qy,removeElementWithFadeOut:()=>Yy,resizePath:()=>sb,retrieveZInfo:()=>Ab,setTooltipConfig:()=>Cb,subPixelOptimize:()=>lb,subPixelOptimizeLine:()=>cb,subPixelOptimizeRect:()=>Kte,transformDirection:()=>fb,traverseElements:()=>Tb,traverseUpdateZ:()=>Mb,updateProps:()=>Wy}),Qy={},$y=[`x`,`y`],eb=[`width`,`height`];function Ute(e){return Bg.extend(e)}var Wte=Yv;function Gte(e,t){return Wte(e,t)}function tb(e,t){Qy[e]=t}function nb(e){if(Qy.hasOwnProperty(e))return Qy[e]}function rb(e,t,n,r){var i=Jv(e,t);return n&&(r===`center`&&(n=ab(n,i.getBoundingRect())),sb(i,n)),i}function ib(e,t,n){var r=new Kg({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(ab(t,i))}}});return r}function ab(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 ob=Xv;function sb(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function cb(e,t){return Yg(e,e,{lineWidth:t}),e}function Kte(e,t){return Xg(e,e,t),e}var lb=Zg;function ub(e,t){for(var n=cl([]);e&&e!==t;)ul(n,e.getLocalTransform(),n),e=e.parent;return n}function db(e,t,n){return t&&!Ns(t)&&(t=Af.getLocalTransform(t)),n&&(t=ml([],t)),Tc([],e,t)}function fb(e,t,n){var r=t[4]===0||t[5]===0||t[0]===0?1:xp(2*t[4]/t[0]),i=t[4]===0||t[5]===0||t[2]===0?1:xp(2*t[4]/t[2]),a=[e===`left`?-r:e===`right`?r:0,e===`top`?-i:e===`bottom`?i:0];return a=db(a,t,n),xp(a[0])>xp(a[1])?a[0]>0?`right`:`left`:a[1]>0?`bottom`:`top`}function pb(e){return!e.isGroup}function qte(e){return e.shape!=null}function mb(e,t,n){if(!e||!t)return;function r(e){var t={};return e.traverse(function(e){pb(e)&&e.anid&&(t[e.anid]=e)}),t}function i(e){var t={x:e.x,y:e.y,rotation:e.rotation};return qte(e)&&(t.shape=P(e.shape)),t}var a=r(e);t.traverse(function(e){if(pb(e)&&e.anid){var t=a[e.anid];if(t){var r=i(e);e.attr(i(t)),Wy(e,r,n,y_(e).dataIndex)}}})}function hb(e,t){return R(e,function(e){var n=e[0];n=bp(n,t.x),n=yp(n,t.x+t.width);var r=e[1];return r=bp(r,t.y),r=yp(r,t.y+t.height),[n,r]})}function Jte(e,t){var n=bp(e.x,t.x),r=yp(e.x+e.width,t.x+t.width),i=bp(e.y,t.y),a=yp(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 gb(e,t,n){var r=F({rectHover:!0},t),i=r.style={strokeNoScale:!0};if(n||={x:-1,y:-1,width:2,height:2},e)return e.indexOf(`image://`)===0?(i.image=e.slice(8),I(i,n),new Kg(r)):rb(e.replace(`path://`,``),r,n,`center`)}function _b(e,t,n,r,i){for(var a=0,o=i[i.length-1];a<i.length;a++){var s=i[a];if(vb(e,t,n,r,s[0],s[1],o[0],o[1]))return!0;o=s}}function vb(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=yb(u,d,c,l);if(Yte(f))return!1;var p=e-i,m=t-a,h=yb(p,m,c,l)/f;if(h<0||h>1)return!1;var g=yb(p,m,u,d)/f;return!(g<0||g>1)}function yb(e,t,n,r){return e*r-n*t}function Yte(e){return e<=1e-6&&e>=-1e-6}function bb(e,t,n,r,i){return t==null?e:(Bs(t)?xb[0]=xb[1]=xb[2]=xb[3]=t:(process.env.NODE_ENV!==`production`&&G(t.length===4),xb[0]=t[0],xb[1]=t[1],xb[2]=t[2],xb[3]=t[3]),r&&(xb[0]=bp(0,xb[0]),xb[1]=bp(0,xb[1]),xb[2]=bp(0,xb[2]),xb[3]=bp(0,xb[3])),n&&(xb[0]=-xb[0],xb[1]=-xb[1],xb[2]=-xb[2],xb[3]=-xb[3]),Sb(e,xb,`x`,`width`,3,1,i&&i[0]||0),Sb(e,xb,`y`,`height`,0,2,i&&i[1]||0),e)}var xb=[0,0,0,0];function Sb(e,t,n,r,i,a,o){var s=t[a]+t[i],c=e[r];e[r]+=s,o=bp(0,yp(o,c)),e[r]<o?(e[r]=o,e[n]+=t[i]>=0?-t[i]:t[a]>=0?c+t[a]:xp(s)>1e-8?(c-o)*t[i]/s:0):e[n]-=t[i]}function Cb(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,i=H(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&&L(Ls(c),function(e){q(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:I({content:r,encodeHTMLContent:!0,formatterParams:s},i)}}function wb(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function Tb(e,t){if(e)if(B(e))for(var n=0;n<e.length;n++)wb(e[n],t);else wb(e,t)}function Eb(e){return!e||xp(e[1])<Db&&xp(e[2])<Db||xp(e[0])<Db&&xp(e[3])<Db}var Db=1e-5;function Ob(e,t){return e?Ol.copy(e,t):t.clone()}function kb(e,t){return t?ll(e||sl(),t):void 0}function Ab(e){return{z:e.get(`z`)||0,zlevel:e.get(`zlevel`)||0}}function jb(e){var t=-1/0,n=1/0;wb(e,function(e){r(e),r(e.getTextContent()),r(e.getTextGuideLine())});function r(e){if(!(!e||e.isGroup)){var t=e.currentStates;if(t.length)for(var n=0;n<t.length;n++)i(e.states[t[n]]);i(e)}}function i(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 Mb(e,t,n){Nb(e,t,n,-1/0)}function Nb(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=bp(Nb(o[s],t,n,r),r);else e.z=t,e.zlevel=n,r=bp(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}tb(`circle`,$v),tb(`ellipse`,ty),tb(`sector`,vy),tb(`ring`,by),tb(`polygon`,Sy),tb(`polyline`,Cy),tb(`rect`,e_),tb(`line`,wy),tb(`bezierCurve`,Dy),tb(`arc`,Oy);var Pb={};function Fb(e,t){for(var n=0;n<T_.length;n++){var r=T_[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 Ib(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??=V(e.defaultText)?e.defaultText(i,e,n):e.defaultText;for(var c={normal:s},l=0;l<T_.length;l++){var u=T_[l],d=t[u];c[u]=W(r?r.getFormattedLabel(i,u,null,a,d&&d.get(`formatter`)):null,s)}return c}function Lb(e,t,n,r){n||=Pb;for(var i=e instanceof a_,a=!1,o=0;o<E_.length;o++){var s=t[E_[o]];if(s&&s.getShallow(`show`)){a=!0;break}}var c=i?e:e.getTextContent();if(a){i||(c||(c=new a_,e.setTextContent(c)),e.stateProxy&&(c.stateProxy=e.stateProxy));var l=Ib(n,t),u=t.normal,d=!!u.getShallow(`show`),f=zb(u,r&&r.normal,n,!1,!i);f.text=l.normal,i||e.setTextConfig(Bb(u,n,!1));for(var o=0;o<T_.length;o++){var p=T_[o],s=t[p];if(s){var m=c.ensureState(p),h=!!W(s.getShallow(`show`),d);if(h!==d&&(m.ignore=!h),m.style=zb(s,r&&r[p],n,!0,!i),m.style.text=l[p],!i){var g=e.ensureState(p);g.textConfig=Bb(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&&(Kb(c).setLabelText=function(e){var r=Ib(n,t,e);Fb(c,r)})}else c&&(c.ignore=!0);e.dirty()}function Rb(e,t){t||=`label`;for(var n={normal:e.getModel(t)},r=0;r<T_.length;r++){var i=T_[r];n[i]=e.getModel([i,t])}return n}function zb(e,t,n,r,i){var a={};return Xte(a,e,n,r,i),t&&F(a,t),a}function Bb(e,t,n){t||={};var r={},i,a=e.getShallow(`rotate`),o=W(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 Xte(e,t,n,r,i){n||=Pb;var a=t.ecModel,o=a&&a.option.textStyle,s=Zte(t),c;if(s){c={};var l=`richInheritPlainLabel`,u=W(t.get(l),a?a.get(l):void 0);for(var d in s)if(s.hasOwnProperty(d)){var f=t.getModel([`rich`,d]);Wb(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=Bs(g)?g/2:0,h.margin=[g,g,g,g],h.__marginType=Yb.minMargin;else{var _=t.get(`textMargin`);_!=null&&(h.margin=Xs(_),h.__marginType=Yb.textMargin)}Wb(e,t,o,null,null,n,r,i,!0,!1)}function Zte(e){for(var t;e&&e!==e.ecModel;){var n=(e.option||Pb).rich;if(n){t||={};for(var r=Ls(n),i=0;i<r.length;i++){var a=r[i];t[a]=1}}e=e.parentModel}return t}var Vb=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`,`textShadowColor`,`textShadowBlur`,`textShadowOffsetX`,`textShadowOffsetY`],Hb=[`align`,`lineHeight`,`width`,`height`,`tag`,`verticalAlign`,`ellipsis`],Ub=[`padding`,`borderWidth`,`borderRadius`,`borderDashOffset`,`backgroundColor`,`borderColor`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`];function Wb(e,t,n,r,i,a,o,s,c,l){n=!o&&n||Pb;var u=a&&a.inheritColor,d=t.getShallow(`color`),f=t.getShallow(`textBorderColor`),p=W(t.getShallow(`opacity`),n.opacity);(d===`inherit`||d===`auto`)&&(process.env.NODE_ENV!==`production`&&d===`auto`&&qp(`color: 'auto'`,`color: 'inherit'`),d=u||null),(f===`inherit`||f===`auto`)&&(process.env.NODE_ENV!==`production`&&f===`auto`&&qp(`color: 'auto'`,`color: 'inherit'`),f=u||null),s||(d||=n.color,f||=n.textBorderColor),d!=null&&(e.fill=d),f!=null&&(e.stroke=f);var m=W(t.getShallow(`textBorderWidth`),n.textBorderWidth);m!=null&&(e.lineWidth=m);var h=W(t.getShallow(`textBorderType`),n.textBorderType);h!=null&&(e.lineDash=h);var g=W(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;_<Vb.length;_++){var v=Vb[_],y=i!==!1&&r?Js(t.getShallow(v),r.getShallow(v),n[v]):W(t.getShallow(v),n[v]);y!=null&&(e[v]=y)}for(var _=0;_<Hb.length;_++){var v=Hb[_],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;_<Ub.length;_++){var v=Ub[_],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&&(process.env.NODE_ENV!==`production`&&e.backgroundColor===`auto`&&qp(`backgroundColor: 'auto'`,`backgroundColor: 'inherit'`),e.backgroundColor=u),(e.borderColor===`auto`||e.borderColor===`inherit`)&&u&&(process.env.NODE_ENV!==`production`&&e.borderColor===`auto`&&qp(`borderColor: 'auto'`,`borderColor: 'inherit'`),e.borderColor=u)}}function Gb(e,t){var n=t&&t.getModel(`textStyle`);return Zs([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 Kb=Cm();function qb(e,t,n,r){if(e){var i=Kb(e);i.prevValue=i.value,i.value=n;var a=t.normal;i.valueAnimation=a.get(`valueAnimation`),i.valueAnimation&&(i.precision=a.get(`precision`),i.defaultInterpolatedText=r,i.statesModels=t)}}function Jb(e,t,n,r,i){var a=Kb(e);if(!a.valueAnimation||a.prevValue===a.value)return;var o=a.defaultInterpolatedText,s=W(a.interpolatedValue,a.prevValue),c=a.value;function l(r){var l=Pm(n,a.precision,s,c,r);a.interpolatedValue=r===1?null:l,Fb(e,Ib({labelDataIndex:t,labelFetcher:i,defaultText:o?o(l):l+``},a.statesModels,l))}e.percent=0,(a.prevValue==null?Gy:Wy)(e,{percent:1},r,t,null,l)}var Yb={minMargin:1,textMargin:2},Qte=[`textStyle`,`color`],Xb=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`,`padding`,`lineHeight`,`rich`,`width`,`height`,`overflow`],Zb=new a_,$te=function(){function e(){}return e.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow(`color`)||(!e&&t?t.get(Qte):null)},e.prototype.getFont=function(){return Gb({fontStyle:this.getShallow(`fontStyle`),fontWeight:this.getShallow(`fontWeight`),fontSize:this.getShallow(`fontSize`),fontFamily:this.getShallow(`fontFamily`)},this.ecModel)},e.prototype.getTextRect=function(e){for(var t={text:e,verticalAlign:this.getShallow(`verticalAlign`)||this.getShallow(`baseline`)},n=0;n<Xb.length;n++)t[Xb[n]]=this.getShallow(Xb[n]);return Zb.useStyle(t),Zb.update(),Zb.getBoundingRect()},e}(),Qb=[[`lineWidth`,`width`],[`stroke`,`color`],[`opacity`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`shadowColor`],[`lineDash`,`type`],[`lineDashOffset`,`dashOffset`],[`lineCap`,`cap`],[`lineJoin`,`join`],[`miterLimit`]],ene=Zm(Qb),tne=function(){function e(){}return e.prototype.getLineStyle=function(e){return ene(this,e)},e}(),$b=[[`fill`,`color`],[`stroke`,`borderColor`],[`lineWidth`,`borderWidth`],[`opacity`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`shadowColor`],[`lineDash`,`borderType`],[`lineDashOffset`,`borderDashOffset`],[`lineCap`,`borderCap`],[`lineJoin`,`borderJoin`],[`miterLimit`,`borderMiterLimit`]],nne=Zm($b),rne=function(){function e(){}return e.prototype.getItemStyle=function(e,t){return nne(this,e,t)},e}(),ex=function(){function e(e,t,n){this.parentModel=t,this.ecModel=n,this.option=e}return e.prototype.init=function(e,t,n){for(var r=[],i=3;i<arguments.length;i++)r[i-3]=arguments[i]},e.prototype.mergeOption=function(e,t){ks(this.option,e,!0)},e.prototype.get=function(e,t){return e==null?this.option:this._doGet(this.parsePath(e),!t&&this.parentModel)},e.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},e.prototype.getModel=function(t,n){var r=t!=null,i=r?this.parsePath(t):null,a=r?this._doGet(i):this.option;return n||=this.parentModel&&this.parentModel.getModel(this.resolveParentPath(i)),new e(a,n,this.ecModel)},e.prototype.isEmpty=function(){return this.option==null},e.prototype.restoreData=function(){},e.prototype.clone=function(){var e=this.constructor;return new e(P(this.option))},e.prototype.parsePath=function(e){return typeof e==`string`?e.split(`.`):e},e.prototype.resolveParentPath=function(e){return e},e.prototype.isAnimationEnabled=function(){if(!fs.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},e.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},e}();Um(ex),qm(ex),Ms(ex,tne),Ms(ex,rne),Ms(ex,$m),Ms(ex,$te);var tx=Math.round(Math.random()*10);function nx(e){return[e||``,tx++].join(`_`)}function rx(e){var t={};e.registerSubTypeDefaulter=function(e,n){var r=Bm(e);t[r.main]=n},e.determineSubType=function(n,r){var i=r.type;if(!i){var a=Bm(n).main;e.hasSubTypes(n)&&t[a]&&(i=t[a](r))}return i}}function ix(e,t){e.topologicalTravel=function(e,t,r,i){if(!e.length)return;var a=n(t),o=a.graph,s=a.noEntryList,c={};for(L(e,function(e){c[e]=!0});s.length;){var l=s.pop(),u=o[l],d=!!c[l];d&&(r.call(i,l,u.originalDeps.slice()),delete c[l]),L(u.successor,d?p:f)}L(c,function(){var n=``;throw process.env.NODE_ENV!==`production`&&(n=Jp(`Circular dependency may exists: `,c,e,t)),Error(n)});function f(e){o[e].entryCount--,o[e].entryCount===0&&s.push(e)}function p(e){c[e]=!0,f(e)}};function n(e){var n={},a=[];return L(e,function(o){var s=r(n,o),c=i(s.originalDeps=t(o),e);s.entryCount=c.length,s.entryCount===0&&a.push(o),L(c,function(e){js(s.predecessor,e)<0&&s.predecessor.push(e);var t=r(n,e);js(t.successor,e)<0&&t.successor.push(o)})}),{graph:n,noEntryList:a}}function r(e,t){return e[t]||(e[t]={predecessor:[],successor:[]}),e[t]}function i(e,t){var n=[];return L(e,function(e){js(t,e)>=0&&n.push(e)}),n}}function ax(e,t){return ks(ks({},e,!0),t,!0)}var ox={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:`. `}}}},sx={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:``}}}},cx=`ZH`,lx=`EN`,ux=lx,dx={},fx={},px=fs.domSupported?function(){return(document.documentElement.lang||navigator.language||navigator.browserLanguage||ux).toUpperCase().indexOf(cx)>-1?cx:ux}():ux;function mx(e,t){e=e.toUpperCase(),fx[e]=new ex(t),dx[e]=t}function hx(e){if(H(e)){var t=dx[e.toUpperCase()]||{};return e===cx||e===lx?P(t):ks(P(t),P(dx[ux]),!1)}else return ks(P(e),P(dx[ux]),!1)}function gx(e){return fx[e]}function _x(){return fx[ux]}mx(lx,ox),mx(cx,sx);var vx=null;function yx(e){vx||=e}function bx(){return vx}var xx=1e3,Sx=xx*60,Cx=Sx*60,Tx=Cx*24,Ex=Tx*365,Dx={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})/},Ox={year:`{yyyy}`,month:`{MMM}`,day:`{d}`,hour:`{HH}:{mm}`,minute:`{HH}:{mm}`,second:`{HH}:{mm}:{ss}`,millisecond:`{HH}:{mm}:{ss} {SSS}`},kx=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}`,Ax=`{yyyy}-{MM}-{dd}`,jx={year:`{yyyy}`,month:`{yyyy}-{MM}`,day:Ax,hour:Ax+` `+Ox.hour,minute:Ax+` `+Ox.minute,second:Ax+` `+Ox.second,millisecond:kx},Mx=[`year`,`month`,`day`,`hour`,`minute`,`second`,`millisecond`],Nx=[`year`,`half-year`,`quarter`,`month`,`week`,`half-week`,`day`,`half-day`,`quarter-day`,`hour`,`minute`,`second`,`millisecond`];function Px(e){return!H(e)&&!V(e)?Fx(e):e}function Fx(e){e||={};var t={},n=!0;return L(Mx,function(t){n&&=e[t]==null}),L(Mx,function(r,i){var a=e[r];t[r]={};for(var o=null,s=i;s>=0;s--){var c=Mx[s],l=U(a)&&!B(a)?a[c]:a,u=void 0;B(l)?(u=l.slice(),o=u[0]||``):H(l)?(o=l,u=[o]):(o==null?o=Ox[r]:Dx[c].test(o)||(o=t[c][c][0]+` `+o),u=[o],n&&(u[1]=`{primary|`+o+`}`)),t[r][c]=u}}),t}function Ix(e,t){return e+=``,`0000`.substr(0,t-e.length)+e}function Lx(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 Rx(e){return e===Lx(e)}function zx(e){switch(e){case`year`:case`month`:return`day`;case`millisecond`:return`millisecond`;default:return`second`}}function Bx(e,t,n,r){var i=jp(e),a=i[Wx(n)](),o=i[Gx(n)]()+1,s=Math.floor((o-1)/3)+1,c=i[Kx(n)](),l=i[`get`+(n?`UTC`:``)+`Day`](),u=i[qx(n)](),d=(u-1)%12+1,f=i[Jx(n)](),p=i[Yx(n)](),m=i[Xx(n)](),h=u>=12?`pm`:`am`,g=h.toUpperCase(),_=(r instanceof ex?r:gx(r||px)||_x()).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,Ix(a%100+``,2)).replace(/{Q}/g,s+``).replace(/{MMMM}/g,v[o-1]).replace(/{MMM}/g,y[o-1]).replace(/{MM}/g,Ix(o,2)).replace(/{M}/g,o+``).replace(/{dd}/g,Ix(c,2)).replace(/{d}/g,c+``).replace(/{eeee}/g,b[l]).replace(/{ee}/g,x[l]).replace(/{e}/g,l+``).replace(/{HH}/g,Ix(u,2)).replace(/{H}/g,u+``).replace(/{hh}/g,Ix(d+``,2)).replace(/{h}/g,d+``).replace(/{mm}/g,Ix(f,2)).replace(/{m}/g,f+``).replace(/{ss}/g,Ix(p,2)).replace(/{s}/g,p+``).replace(/{SSS}/g,Ix(m,3)).replace(/{S}/g,m+``)}function Vx(e,t,n,r,i){var a=null;if(H(n))a=n;else if(V(n)){var o={time:e.time,level:e.time.level},s=bx();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=Hx(e.value,i);a=n[u][u][0]}}return Bx(new Date(e.value),a,i,r)}function Hx(e,t){var n=jp(e),r=n[Gx(t)]()+1,i=n[Kx(t)](),a=n[qx(t)](),o=n[Jx(t)](),s=n[Yx(t)](),c=n[Xx(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 Ux(e,t,n){switch(t){case`year`:e[Zx(n)](0);case`month`:e[Qx(n)](1);case`day`:e[$x(n)](0);case`hour`:e[eS(n)](0);case`minute`:e[tS(n)](0);case`second`:e[nS(n)](0)}return e}function Wx(e){return e?`getUTCFullYear`:`getFullYear`}function Gx(e){return e?`getUTCMonth`:`getMonth`}function Kx(e){return e?`getUTCDate`:`getDate`}function qx(e){return e?`getUTCHours`:`getHours`}function Jx(e){return e?`getUTCMinutes`:`getMinutes`}function Yx(e){return e?`getUTCSeconds`:`getSeconds`}function Xx(e){return e?`getUTCMilliseconds`:`getMilliseconds`}function ine(e){return e?`setUTCFullYear`:`setFullYear`}function Zx(e){return e?`setUTCMonth`:`setMonth`}function Qx(e){return e?`setUTCDate`:`setDate`}function $x(e){return e?`setUTCHours`:`setHours`}function eS(e){return e?`setUTCMinutes`:`setMinutes`}function tS(e){return e?`setUTCSeconds`:`setSeconds`}function nS(e){return e?`setUTCMilliseconds`:`setMilliseconds`}function rS(e){if(!Lp(e))return H(e)?e:`-`;var t=(e+``).split(`.`);return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,`$1,`)+(t.length>1?`.`+t[1]:``)}function iS(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 aS=Xs;function oS(e,t,n){var r=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}`;function i(e){return e&&Zs(e)?e:`-`}function a(e){return!!(e!=null&&!isNaN(e)&&isFinite(e))}var o=t===`time`,s=e instanceof Date;if(o||s){var c=o?jp(e):e;if(!isNaN(+c))return Bx(c,r,n);if(s)return`-`}if(t===`ordinal`)return zs(e)?i(e):Bs(e)&&a(e)?e+``:`-`;var l=Ip(e);return a(l)?rS(l):zs(e)?i(e):typeof e==`boolean`?e+``:`-`}var sS=[`a`,`b`,`c`,`d`,`e`,`f`,`g`],cS=function(e,t){return`{`+e+(t??``)+`}`};function lS(e,t,n){B(t)||(t=[t]);var r=t.length;if(!r)return``;for(var i=t[0].$vars||[],a=0;a<i.length;a++){var o=sS[a];e=e.replace(cS(o),cS(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(cS(sS[c],s),n?Wc(l):l)}return e}function uS(e,t,n){return L(t,function(t,r){e=e.replace(`{`+r+`}`,n?Wc(t):t)}),e}function dS(e,t){var n=H(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:`+Wc(r)+`;`+(t||``)+`"></span>`:`<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:`+Wc(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 fS(e,t){return t||=`transparent`,H(e)?e:U(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function pS(e,t){if(t===`_blank`||t===`blank`){var n=window.open();n.opener=null,n.location.href=e}else window.open(e,t)}var mS={},hS={},gS=function(){function e(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return e.prototype.create=function(e,t){this._nonSeriesBoxMasterList=n(mS,!0),this._normalMasterList=n(hS,!1);function n(n,r){var i=[];return L(n,function(n,a){var o=n.create(e,t);i=i.concat(o||[]),process.env.NODE_ENV!==`production`&&r&&L(o,function(e){return G(!e.update)})}),i}},e.prototype.update=function(e,t){L(this._normalMasterList,function(n){n.update&&n.update(e,t)})},e.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},e.register=function(e,t){if(e===`matrix`||e===`calendar`){mS[e]=t;return}hS[e]=t},e.get=function(e){return hS[e]||mS[e]},e}();function _S(e){return!!mS[e]}var vS={coord:1,coord2:2};function yS(e){process.env.NODE_ENV!==`production`&&G(!bS.get(e.fullType)),bS.set(e.fullType,{getCoord2:void 0}).getCoord2=e.getCoord2}var bS=K();function xS(e){var t=e.getShallow(`coord`,!0),n=vS.coord;if(t==null){var r=bS.get(e.type);r&&r.getCoord2&&(n=vS.coord2,t=r.getCoord2(e))}return{coord:t,from:n}}var SS={none:0,dataCoordSys:1,boxCoordSys:2};function CS(e,t){var n=e.getShallow(`coordinateSystem`),r=e.getShallow(`coordinateSystemUsage`,!0),i=r!=null,a=SS.none;if(n){var o=e.mainType===`series`;r??=o?`data`:`box`,r===`data`?(a=SS.dataCoordSys,o||(process.env.NODE_ENV!==`production`&&i&&t&&Gp(`coordinateSystemUsage "data" is not supported in non-series components.`),a=SS.none)):r===`box`&&(a=SS.boxCoordSys,!o&&!_S(n)&&(process.env.NODE_ENV!==`production`&&i&&t&&Gp(`coordinateSystem "`+n+`" cannot be used`+(` as coordinateSystemUsage "box" for "`+e.type+`" yet.`)),a=SS.none))}return{coordSysType:n,kind:a}}function wS(e){var t=e.targetModel,n=e.coordSysType,r=e.coordSysProvider,i=e.isDefaultDataCoordSys,a=e.allowNotFound;process.env.NODE_ENV!==`production`&&G(!!n);var o=CS(t,!0),s=o.kind,c=o.coordSysType;if(i&&s!==SS.dataCoordSys&&(s=SS.dataCoordSys,c=n),s===SS.none||c!==n)return!1;var l=r(n,t);return l?(s===SS.dataCoordSys?(process.env.NODE_ENV!==`production`&&G(t.mainType===`series`),t.coordinateSystem=l):t.boxCoordinateSystem=l,!0):(process.env.NODE_ENV!==`production`&&(a||Gp(n+` cannot be found for`+(` `+t.type+` (index: `+t.componentIndex+`).`))),!1)}var TS=function(e,t){var n=t.getReferringComponents(e,Dm).models[0];return n&&n.coordinateSystem},ES=L,DS=[`left`,`right`,`top`,`bottom`,`width`,`height`],OS=[[`width`,`left`,`right`],[`height`,`top`,`bottom`]];function kS(e,t,n,r,i){var a=0,o=0;r??=1/0,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 AS=kS;Rs(kS,`vertical`),Rs(kS,`horizontal`);function jS(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 MS(e,t){var n=LS(e,t,{enableLayoutOnlyByCenter:!0}),r=e.getBoxLayoutParams(),i,a;if(n.type===IS.point)a=n.refPoint,i=PS(r,{width:t.getWidth(),height:t.getHeight()});else{var o=e.get(`center`),s=B(o)?o:[o,o];i=PS(r,n.refContainer),a=n.boxCoordFrom===vS.coord2?n.refPoint:[X(s[0],i.width)+i.x,X(s[1],i.height)+i.y]}return{viewRect:i,center:a}}function NS(e,t){var n=MS(e,t),r=n.viewRect,i=n.center,a=e.get(`radius`);B(a)||(a=[0,a]);var o=X(r.width,t.getWidth()),s=X(r.height,t.getHeight()),c=Math.min(o,s),l=X(a[0],c/2),u=X(a[1],c/2);return{cx:i[0],cy:i[1],r0:l,r:u,viewRect:r}}function PS(e,t,n){n=aS(n||0);var r=t.width,i=t.height,a=X(e.left,r),o=X(e.top,i),s=X(e.right,r),c=X(e.bottom,i),l=X(e.width,r),u=X(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||=0,o||=0,isNaN(l)&&(l=r-f-a-(s||0)),isNaN(u)&&(u=i-d-o-(c||0));var m=new Ol((t.x||0)+a+n[3],(t.y||0)+o+n[0],l,u);return m.margin=n,m}function FS(e,t,n){var r=e.getShallow(`preserveAspect`,!0);if(!r)return t;var i=t.width/t.height;if(Math.abs(Math.atan(n)-Math.atan(i))<1e-9)return t;var a=e.getShallow(`preserveAspectAlign`,!0),o=e.getShallow(`preserveAspectVerticalAlign`,!0),s={width:t.width,height:t.height},c=r===`cover`;return i>n&&!c||i<n&&c?(s.width=t.height*n,a===`left`?s.left=0:a===`right`?s.right=0:s.left=`center`):(s.height=t.width/n,o===`top`?s.top=0:o===`bottom`?s.bottom=0:s.top=`middle`),PS(s,t)}var IS={rect:1,point:2};function LS(e,t,n){var r,i,a,o=e.boxCoordinateSystem,s;if(o){var c=xS(e),l=c.coord,u=c.from;if(o.dataToLayout){a=IS.rect,s=u;var d=o.dataToLayout(l);r=d.contentRect||d.rect}else n&&n.enableLayoutOnlyByCenter&&o.dataToPoint?(a=IS.point,s=u,i=o.dataToPoint(l)):process.env.NODE_ENV!==`production`&&Gp(e.type+`[`+e.componentIndex+`]`+(` layout based on `+o.type+` is not supported.`))}return a??=IS.rect,a===IS.rect&&(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 RS(e,t,n,r,i,a){var o=!i||!i.hv||i.hv[0],s=!i||!i.hv||i.hv[1],c=i&&i.boundingMode||`all`;if(a||=e,a.x=e.x,a.y=e.y,!o&&!s)return!1;var l;if(c===`raw`)l=e.type===`group`?new Ol(0,0,+t.width||0,+t.height||0):e.getBoundingRect();else if(l=e.getBoundingRect(),e.needLocalTransform()){var u=e.getLocalTransform();l=l.clone(),l.applyTransform(u)}var d=PS(I({width:l.width,height:l.height},t),n,r),f=o?d.x-l.x:0,p=s?d.y-l.y:0;return c===`raw`?(a.x=f,a.y=p):(a.x+=f,a.y+=p),a===e&&e.markRedraw(),!0}function zS(e,t){return e[OS[t][0]]!=null||e[OS[t][1]]!=null&&e[OS[t][2]]!=null}function BS(e){var t=e.layoutMode||e.constructor.layoutMode;return U(t)?t:t?{type:t}:null}function VS(e,t,n){var r=n&&n.ignoreSize;!B(r)&&(r=[r,r]);var i=o(OS[0],0),a=o(OS[1],1);c(OS[0],e,i),c(OS[1],e,a);function o(n,i){var a={},o=0,c={},l=0,u=2;if(ES(n,function(t){c[t]=e[t]}),ES(n,function(e){q(t,e)&&(a[e]=c[e]=t[e]),s(a,e)&&o++,s(c,e)&&l++}),r[i])return s(t,n[1])?c[n[2]]=null:s(t,n[2])&&(c[n[1]]=null),c;if(l===u||!o)return c;if(o>=u)return a;for(var d=0;d<n.length;d++){var f=n[d];if(!q(a,f)&&q(e,f)){a[f]=e[f];break}}return a}function s(e,t){return e[t]!=null&&e[t]!==`auto`}function c(e,t,n){ES(e,function(e){t[e]=n[e]})}}function HS(e){return US({},e)}function US(e,t){return t&&e&&ES(DS,function(n){q(t,n)&&(e[n]=t[n])}),e}var WS=Cm(),GS=function(e){N(t,e);function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.uid=nx(`ec_cpt_model`),i}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=BS(this),r=n?HS(e):{};ks(e,t.getTheme().get(this.mainType)),ks(e,this.getDefaultOption()),n&&VS(e,r,n)},t.prototype.mergeOption=function(e,t){ks(this.option,e,!0);var n=BS(this);n&&VS(this.option,e,n)},t.prototype.optionUpdated=function(e,t){},t.prototype.getDefaultOption=function(){var e=this.constructor;if(!Hm(e))return e.defaultOption;var t=WS(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=ks(a,n[o],!0);t.defaultOption=a}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+`Index`,r=e+`Id`;return km(this.ecModel,e,{index:this.get(n,!0),id:this.get(r,!0)},t)},t.prototype.getBoxLayoutParams=function(){return jS(this,!1)},t.prototype.getZLevelKey=function(){return``},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=function(){var e=t.prototype;e.type=`component`,e.id=``,e.name=``,e.mainType=``,e.subType=``,e.componentIndex=0}(),t}(ex);Gm(GS,ex),Xm(GS),rx(GS),ix(GS,KS);function KS(e){var t=[];return L(GS.getClassesByMainType(e),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=R(t,function(e){return Bm(e).main}),e!==`dataset`&&js(t,`dataset`)<=0&&t.unshift(`dataset`),t}var Z={color:{},darkColor:{},size:{}},qS=Z.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 JS in F(qS,{primary:qS.neutral80,secondary:qS.neutral70,tertiary:qS.neutral60,quaternary:qS.neutral50,disabled:qS.neutral20,border:qS.neutral30,borderTint:qS.neutral20,borderShade:qS.neutral40,background:qS.neutral05,backgroundTint:`rgba(234,237,245,0.5)`,backgroundTransparent:`rgba(255,255,255,0)`,backgroundShade:qS.neutral10,shadow:`rgba(0,0,0,0.2)`,shadowTint:`rgba(129,130,136,0.2)`,axisLine:qS.neutral70,axisLineTint:qS.neutral40,axisTick:qS.neutral70,axisTickMinor:qS.neutral60,axisLabel:qS.neutral70,axisSplitLine:qS.neutral15,axisMinorSplitLine:qS.neutral05}),qS)if(qS.hasOwnProperty(JS)){var YS=qS[JS];JS===`theme`?Z.darkColor.theme=qS.theme.slice():JS===`highlight`?Z.darkColor.highlight=`rgba(255,231,130,0.4)`:JS.indexOf(`accent`)===0?Z.darkColor[JS]=$u(YS,null,function(e){return e*.5},function(e){return Math.min(1,1.3-e)}):Z.darkColor[JS]=$u(YS,null,function(e){return e*.9},function(e){return 1-e**1.5})}Z.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var XS=``;typeof navigator<`u`&&(XS=navigator.platform||``);var ZS=`rgba(0, 0, 0, 0.2)`,QS=Z.color.theme[0],$S=$u(QS,null,null,.9),eC={darkMode:`auto`,colorBy:`series`,color:Z.color.theme,gradientColor:[$S,QS],aria:{decal:{decals:[{color:ZS,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:ZS,symbol:`circle`,dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:ZS,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:ZS,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:ZS,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:ZS,symbol:`triangle`,dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:XS.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},tC=K([`tooltip`,`label`,`itemName`,`itemId`,`itemGroupId`,`itemChildGroupId`,`seriesName`]),nC=`original`,rC=`arrayRows`,iC=`objectRows`,aC=`keyedColumns`,oC=`typedArray`,sC=`unknown`,cC=`column`,lC={Must:1,Might:2,Not:3},uC=Cm();function dC(e){uC(e).datasetMap=K()}function fC(e,t,n){var r={},i=mC(t);if(!i||!e)return r;var a=[],o=[],s=t.ecModel,c=uC(s).datasetMap,l=i.uid+`_`+n.seriesLayoutBy,u,d;e=e.slice(),L(e,function(t,n){var i=U(t)?t:e[n]={name:t};i.type===`ordinal`&&u==null&&(u=n,d=m(i)),r[i.name]=[]});var f=c.get(l)||c.set(l,{categoryWayDim:d,valueWayDim:0});L(e,function(e,t){var n=e.name,i=m(e);if(u==null){var s=f.valueWayDim;p(r[n],s,i),p(o,s,i),f.valueWayDim+=i}else if(u===t)p(r[n],0,i),p(a,0,i);else{var s=f.categoryWayDim;p(r[n],s,i),p(o,s,i),f.categoryWayDim+=i}});function p(e,t,n){for(var r=0;r<n;r++)e.push(t+r)}function m(e){var t=e.dimsDef;return t?t.length:1}return a.length&&(r.itemName=a),o.length&&(r.seriesName=o),r}function pC(e,t,n){var r={};if(!mC(e))return r;var i=t.sourceFormat,a=t.dimensionsDefine,o;(i===`objectRows`||i===`keyedColumns`)&&L(a,function(e,t){(U(e)?e.name:e)===`name`&&(o=t)});var s=function(){for(var e={},r={},s=[],c=0,l=Math.min(5,n);c<l;c++){var u=_C(t.data,i,t.seriesLayoutBy,a,t.startIndex,c);s.push(u);var d=u===lC.Not;if(d&&e.v==null&&c!==o&&(e.v=c),(e.n==null||e.n===e.v||!d&&s[e.n]===lC.Not)&&(e.n=c),f(e)&&s[e.n]!==lC.Not)return e;d||(u===lC.Might&&r.v==null&&c!==o&&(r.v=c),(r.n==null||r.n===r.v)&&(r.n=c))}function f(e){return e.v!=null&&e.n!=null}return f(e)?e:f(r)?r:null}();if(s){r.value=[s.v];var c=o??s.n;r.itemName=[c],r.seriesName=[c]}return r}function mC(e){if(!e.get(`data`,!0))return km(e.ecModel,`dataset`,{index:e.get(`datasetIndex`,!0),id:e.get(`datasetId`,!0)},Dm).models[0]}function hC(e){return!e.get(`transform`,!0)&&!e.get(`fromTransformResult`,!0)?[]:km(e.ecModel,`dataset`,{index:e.get(`fromDatasetIndex`,!0),id:e.get(`fromDatasetId`,!0)},Dm).models}function gC(e,t){return _C(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}function _C(e,t,n,r,i,a){var o,s=5;if(Hs(e))return lC.Not;var c,l;if(r){var u=r[a];U(u)?(c=u.name,l=u.type):H(u)&&(c=u)}if(l!=null)return l===`ordinal`?lC.Must:lC.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=b(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=b(m[a]))!=null)return o}}else if(t===`objectRows`){var h=e;if(!c)return lC.Not;for(var p=0;p<h.length&&p<s;p++){var g=h[p];if(g&&(o=b(g[c]))!=null)return o}}else if(t===`keyedColumns`){var _=e;if(!c)return lC.Not;var f=_[c];if(!f||Hs(f))return lC.Not;for(var p=0;p<f.length&&p<s;p++)if((o=b(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=nm(g);if(!B(y))return lC.Not;if((o=b(y[a]))!=null)return o}function b(e){var t=H(e);if(e!=null&&Number.isFinite(Number(e))&&e!==``)return t?lC.Might:lC.Not;if(t&&e!==`-`)return lC.Must}return lC.Not}var vC=K();function ane(e,t){G(vC.get(e)==null&&t),vC.set(e,t)}function one(e,t,n){var r=vC.get(t);if(!r)return n;var i=r(e);if(!i)return n;if(process.env.NODE_ENV!==`production`)for(var a=0;a<i.length;a++)G(_m(i[a]));return n.concat(i)}var yC=Cm(),sne=Cm(),bC=function(){function e(){}return e.prototype.getColorFromPalette=function(e,t,n){var r=$p(this.get(`color`,!0)),i=this.get(`colorLayer`,!0);return SC(this,yC,r,i,e,t,n)},e.prototype.clearColorPalette=function(){lne(this,yC)},e}();function xC(e,t,n,r){return SC(e,sne,$p(e.get([`aria`,`decal`,`decals`])),null,t,n,r)}function cne(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 SC(e,t,n,r,i,a,o){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:cne(r,o);if(u||=n,!(!u||!u.length)){var d=u[c];return i&&(l[i]=d),s.paletteIdx=(c+1)%u.length,d}}function lne(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var CC,wC,TC,EC=`\0_ec_inner`,DC=1,une={grid:`GridComponent`,polar:`PolarComponent`,geo:`GeoComponent`,singleAxis:`SingleAxisComponent`,parallel:`ParallelComponent`,calendar:`CalendarComponent`,matrix:`MatrixComponent`,graphic:`GraphicComponent`,toolbox:`ToolboxComponent`,tooltip:`TooltipComponent`,axisPointer:`AxisPointerComponent`,brush:`BrushComponent`,title:`TitleComponent`,timeline:`TimelineComponent`,markPoint:`MarkPointComponent`,markLine:`MarkLineComponent`,markArea:`MarkAreaComponent`,legend:`LegendComponent`,dataZoom:`DataZoomComponent`,visualMap:`VisualMapComponent`,xAxis:`GridComponent`,yAxis:`GridComponent`,angleAxis:`PolarComponent`,radiusAxis:`PolarComponent`},dne={line:`LineChart`,bar:`BarChart`,pie:`PieChart`,scatter:`ScatterChart`,radar:`RadarChart`,map:`MapChart`,tree:`TreeChart`,treemap:`TreemapChart`,graph:`GraphChart`,chord:`ChordChart`,gauge:`GaugeChart`,funnel:`FunnelChart`,parallel:`ParallelChart`,sankey:`SankeyChart`,boxplot:`BoxplotChart`,candlestick:`CandlestickChart`,effectScatter:`EffectScatterChart`,lines:`LinesChart`,heatmap:`HeatmapChart`,pictorialBar:`PictorialBarChart`,themeRiver:`ThemeRiverChart`,sunburst:`SunburstChart`,custom:`CustomChart`},OC={};function kC(e){L(e,function(e,t){if(!GS.hasClass(t)){var n=une[t];n&&!OC[n]&&(Gp(`Component `+t+` is used but not imported.
|
|
52
|
-
import { `+n+` } from 'echarts/components';
|
|
53
|
-
echarts.use([`+n+`]);`),OC[n]=!0)}})}var AC=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(e,t,n,r,i,a){r||={},this.option=null,this._theme=new ex(r),this._locale=new ex(i),this._optionManager=a},t.prototype.setOption=function(e,t,n){process.env.NODE_ENV!==`production`&&(G(e!=null,`option is null/undefined`),G(e[EC]!==DC,`please use chart.getOption()`));var r=FC(t);this._optionManager.setOption(e,n,r),this._resetOption(null,r)},t.prototype.resetOption=function(e,t){return this._resetOption(e,FC(t))},t.prototype._resetOption=function(e,t){var n=!1,r=this._optionManager;if(!e||e===`recreate`){var i=r.mountOption(e===`recreate`);process.env.NODE_ENV!==`production`&&kC(i),!this.option||e===`recreate`?TC(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&&L(o,function(e){n=!0,this._mergeOption(e,t)},this)}return n},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,t){var n=this.option,r=this._componentsMap,i=this._componentsCount,a=[],o=K(),s=t&&t.replaceMergeMainTypeMap;dC(this),L(e,function(e,t){e!=null&&(GS.hasClass(t)?t&&(a.push(t),o.set(t,!0)):n[t]=n[t]==null?P(e):ks(n[t],e,!0))}),s&&s.each(function(e,t){GS.hasClass(t)&&!o.get(t)&&(a.push(t),o.set(t,!0))}),GS.topologicalTravel(a,GS.getAllClassMainTypes(),c,this);function c(t){var a=one(this,t,$p(e[t])),o=r.get(t),c=im(o,a,o?s&&s.get(t)?`replaceMerge`:`normalMerge`:`replaceAll`);ym(c,t,GS),n[t]=null,r.set(t,null),i.set(t,0);var l=[],u=[],d=0,f,p;L(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=GS.getClass(t,e.keyInfo.subType,!a);if(!o){if(process.env.NODE_ENV!==`production`){var s=e.keyInfo.subType,c=dne[s];OC[s]||(OC[s]=!0,Gp(c?`Series `+s+` is used but not imported.
|
|
54
|
-
import { `+c+` } from 'echarts/charts';
|
|
55
|
-
echarts.use([`+c+`]);`:`Unknown series `+s))}return}if(t===`tooltip`){if(f){process.env.NODE_ENV!==`production`&&(p||=(Wp(`Currently only one tooltip component is allowed.`),!0));return}f=!0}if(r&&r.constructor===o)r.name=e.keyInfo.name,r.mergeOption(i,this),r.optionUpdated(i,!1);else{var m=F({componentIndex:n},e.keyInfo);r=new o(i,this,this,m),F(r,m),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`&&CC(this)}this._seriesIndices||CC(this)},t.prototype.getOption=function(){var e=P(this.option);return L(e,function(t,n){if(GS.hasClass(n)){for(var r=$p(t),i=r.length,a=!1,o=i-1;o>=0;o--)r[o]&&!_m(r[o])?a=!0:(r[o]=null,!a&&i--);r.length=i,e[n]=r}}),delete e[EC],e},t.prototype.setTheme=function(e){this._theme=new ex(e),this._resetOption(`recreate`,null)},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.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]}}},t.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?Fs(a,function(e){return!!e}):NC(`name`,i,a):NC(`id`,r,a):(o=[],L($p(n),function(e){a[e]&&o.push(a[e])})),PC(o,e)},t.prototype.findComponents=function(e){var t=e.query,n=e.mainType,r=i(t);return a(PC(r?this.queryComponents(r):Fs(this._componentsMap.get(n),function(e){return!!e}),e));function i(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 a(t){return e.filter?Fs(t,e.filter):t}},t.prototype.eachComponent=function(e,t,n){var r=this._componentsMap;if(V(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=H(e)?r.get(e):U(e)?this.findComponents(e):null,s=0;o&&s<o.length;s++){var c=o[s];c&&t.call(n,c,c.componentIndex)}},t.prototype.getSeriesByName=function(e){var t=pm(e,null);return Fs(this._componentsMap.get(`series`),function(e){return!!e&&t!=null&&e.name===t})},t.prototype.getSeriesByIndex=function(e){return this._componentsMap.get(`series`)[e]},t.prototype.getSeriesByType=function(e){return Fs(this._componentsMap.get(`series`),function(t){return!!t&&t.subType===e})},t.prototype.getSeries=function(){return Fs(this._componentsMap.get(`series`),function(e){return!!e})},t.prototype.getSeriesCount=function(){return this._componentsCount.get(`series`)},t.prototype.eachSeries=function(e,t){wC(this),L(this._seriesIndices,function(n){var r=this._componentsMap.get(`series`)[n];e.call(t,r,n)},this)},t.prototype.eachRawSeries=function(e,t){L(this._componentsMap.get(`series`),function(n){n&&e.call(t,n,n.componentIndex)})},t.prototype.eachSeriesByType=function(e,t,n){wC(this),L(this._seriesIndices,function(r){var i=this._componentsMap.get(`series`)[r];i.subType===e&&t.call(n,i,r)},this)},t.prototype.eachRawSeriesByType=function(e,t,n){return L(this.getSeriesByType(e),t,n)},t.prototype.isSeriesFiltered=function(e){return wC(this),this._seriesIndicesMap.get(e.componentIndex)==null},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(e,t){wC(this);var n=[];L(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=K(n)},t.prototype.restoreData=function(e){CC(this);var t=this._componentsMap,n=[];t.each(function(e,t){GS.hasClass(t)&&n.push(t)}),GS.topologicalTravel(n,GS.getAllClassMainTypes(),function(n){L(t.get(n),function(t){t&&(n!==`series`||!jC(t,e))&&t.restoreData()})})},t.internalField=function(){CC=function(e){var t=e._seriesIndices=[];L(e._componentsMap.get(`series`),function(e){e&&t.push(e.componentIndex)}),e._seriesIndicesMap=K(t)},wC=function(e){if(process.env.NODE_ENV!==`production`&&!e._seriesIndices)throw Error(`Option should contains series.`)},TC=function(e,t){e.option={},e.option[EC]=DC,e._componentsMap=K({series:[]}),e._componentsCount=K();var n=t.aria;U(n)&&n.enabled==null&&(n.enabled=!0),MC(t,e._theme.option),ks(t,eC,!1),e._mergeOption(t,null)}}(),t}(ex);function jC(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 MC(e,t){var n=e.color&&!e.colorLayer;L(t,function(t,r){r===`colorLayer`&&n||r===`color`&&e.color||GS.hasClass(r)||(typeof t==`object`?e[r]=e[r]?ks(e[r],t,!1):P(t):e[r]??(e[r]=t))})}function NC(e,t,n){if(B(t)){var r=K();return L(t,function(e){e!=null&&pm(e,null)!=null&&r.set(e,!0)}),Fs(n,function(t){return t&&r.get(t[e])})}else{var i=pm(t,null);return Fs(n,function(t){return t&&i!=null&&t[e]===i})}}function PC(e,t){return t.hasOwnProperty(`subType`)?Fs(e,function(e){return e&&e.subType===t.subType}):e}function FC(e){var t=K();return e&&L($p(e.replaceMerge),function(e){process.env.NODE_ENV!==`production`&&G(GS.hasClass(e),`"`+e+`" is not valid component main type in "replaceMerge"`),t.set(e,!0)}),{replaceMergeMainTypeMap:t}}Ms(AC,bC);var IC=[`getDom`,`getZr`,`getWidth`,`getHeight`,`getDevicePixelRatio`,`dispatchAction`,`isSSR`,`isDisposed`,`on`,`off`,`getDataURL`,`getConnectedDataURL`,`getOption`,`getId`,`updateLabelLayout`],LC=function(){function e(e){L(IC,function(t){this[t]=z(e[t],e)},this)}return e}(),RC=/^(min|max)?(.+)$/,zC=function(){function e(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return e.prototype.setOption=function(e,t,n){e&&(L($p(e.series),function(e){e&&e.data&&Hs(e.data)&&$s(e.data)}),L($p(e.dataset),function(e){e&&e.source&&Hs(e.source)&&$s(e.source)})),e=P(e);var r=this._optionBackup,i=BC(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},e.prototype.mountOption=function(e){var t=this._optionBackup;return this._timelineOptions=t.timelineOptions,this._mediaList=t.mediaList,this._mediaDefault=t.mediaDefault,this._currentMediaIndices=[],P(e?t.baseOption:this._newBaseOption)},e.prototype.getTimelineOption=function(e){var t,n=this._timelineOptions;if(n.length){var r=e.getComponent(`timeline`);r&&(t=P(n[r.getCurrentIndex()]))}return t},e.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++)VC(r[s].query,t,n)&&a.push(s);return!a.length&&i&&(a=[-1]),a.length&&!UC(a,this._currentMediaIndices)&&(o=R(a,function(e){return P(e===-1?i.option:r[e].option)})),this._currentMediaIndices=a,o},e}();function BC(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||=s):((d||u)&&(e.options=e.media=null),a=e),u&&(B(l)?L(l,function(e){process.env.NODE_ENV!==`production`&&e&&!e.option&&U(e.query)&&U(e.query.option)&&Gp(`Illegal media option. Must be like { media: [ { query: {}, option: {} } ] }`),e&&e.option&&(e.query?r.push(e):i||=e)}):process.env.NODE_ENV!==`production`&&Gp(`Illegal media option. Must be an array. Like { media: [ {...}, {...} ] }`)),f(a),L(c,function(e){return f(e)}),L(r,function(e){return f(e.option)});function f(e){L(t,function(t){t(e,n)})}return{baseOption:a,timelineOptions:c||[],mediaDefault:i,mediaList:r}}function VC(e,t,n){var r={width:t,height:n,aspectratio:t/n},i=!0;return L(e,function(e,t){var n=t.match(RC);if(!(!n||!n[1]||!n[2])){var a=n[1];HC(r[n[2].toLowerCase()],e,a)||(i=!1)}}),i}function HC(e,t,n){return n===`min`?e>=t:n===`max`?e<=t:e===t}function UC(e,t){return e.join(`,`)===t.join(`,`)}var WC=L,GC=U,KC=[`areaStyle`,`lineStyle`,`nodeStyle`,`linkStyle`,`chordStyle`,`label`,`labelLine`];function qC(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=KC.length;n<r;n++){var i=KC[n],a=t.normal,o=t.emphasis;a&&a[i]&&(process.env.NODE_ENV!==`production`&&qp(`itemStyle.normal.`+i,i),e[i]=e[i]||{},e[i].normal?ks(e[i].normal,a[i]):e[i].normal=a[i],a[i]=null),o&&o[i]&&(process.env.NODE_ENV!==`production`&&qp(`itemStyle.emphasis.`+i,`emphasis.`+i),e[i]=e[i]||{},e[i].emphasis?ks(e[i].emphasis,o[i]):e[i].emphasis=o[i],o[i]=null)}}function JC(e,t,n){if(e&&e[t]&&(e[t].normal||e[t].emphasis)){var r=e[t].normal,i=e[t].emphasis;r&&(process.env.NODE_ENV!==`production`&&Kp(`'normal' hierarchy in `+t+` has been removed since 4.0. All style properties are configured in `+t+` directly now.`),n?(e[t].normal=e[t].emphasis=null,I(e[t],r)):e[t]=r),i&&(process.env.NODE_ENV!==`production`&&Kp(t+`.emphasis has been changed to emphasis.`+t+` since 4.0`),e.emphasis=e.emphasis||{},e.emphasis[t]=i,i.focus&&(e.emphasis.focus=i.focus),i.blurScope&&(e.emphasis.blurScope=i.blurScope))}}function YC(e){JC(e,`itemStyle`),JC(e,`lineStyle`),JC(e,`areaStyle`),JC(e,`label`),JC(e,`labelLine`),JC(e,`upperLabel`),JC(e,`edgeLabel`)}function XC(e,t){var n=GC(e)&&e[t],r=GC(n)&&n.textStyle;if(r){process.env.NODE_ENV!==`production`&&Kp(`textStyle hierarchy in `+t+` has been removed since 4.0. All textStyle properties are configured in `+t+` directly now.`);for(var i=0,a=tm.length;i<a;i++){var o=tm[i];r.hasOwnProperty(o)&&(n[o]=r[o])}}}function ZC(e){e&&(YC(e),XC(e,`label`),e.emphasis&&XC(e.emphasis,`label`))}function QC(e){if(GC(e)){qC(e),YC(e),XC(e,`label`),XC(e,`upperLabel`),XC(e,`edgeLabel`),e.emphasis&&(XC(e.emphasis,`label`),XC(e.emphasis,`upperLabel`),XC(e.emphasis,`edgeLabel`));var t=e.markPoint;t&&(qC(t),ZC(t));var n=e.markLine;n&&(qC(n),ZC(n));var r=e.markArea;r&&ZC(r);var i=e.data;if(e.type===`graph`){i||=e.nodes;var a=e.links||e.edges;if(a&&!Hs(a))for(var o=0;o<a.length;o++)ZC(a[o]);L(e.categories,function(e){YC(e)})}if(i&&!Hs(i))for(var o=0;o<i.length;o++)ZC(i[o]);if(t=e.markPoint,t&&t.data)for(var s=t.data,o=0;o<s.length;o++)ZC(s[o]);if(n=e.markLine,n&&n.data)for(var c=n.data,o=0;o<c.length;o++)B(c[o])?(ZC(c[o][0]),ZC(c[o][1])):ZC(c[o]);e.type===`gauge`?(XC(e,`axisLabel`),XC(e,`title`),XC(e,`detail`)):e.type===`treemap`?(JC(e.breadcrumb,`itemStyle`),L(e.levels,function(e){YC(e)})):e.type===`tree`&&YC(e.leaves)}}function $C(e){return B(e)?e:e?[e]:[]}function ew(e){return(B(e)?e[0]:e)||{}}function tw(e,t){WC($C(e.series),function(e){GC(e)&&QC(e)});var n=[`xAxis`,`yAxis`,`radiusAxis`,`angleAxis`,`singleAxis`,`parallelAxis`,`radar`];t&&n.push(`valueAxis`,`categoryAxis`,`logAxis`,`timeAxis`),WC(n,function(t){WC($C(e[t]),function(e){e&&(XC(e,`axisLabel`),XC(e.axisPointer,`label`))})}),WC($C(e.parallel),function(e){var t=e&&e.parallelAxisDefault;XC(t,`axisLabel`),XC(t&&t.axisPointer,`label`)}),WC($C(e.calendar),function(e){JC(e,`itemStyle`),XC(e,`dayLabel`),XC(e,`monthLabel`),XC(e,`yearLabel`)}),WC($C(e.radar),function(e){XC(e,`name`),e.name&&e.axisName==null&&(e.axisName=e.name,delete e.name,process.env.NODE_ENV!==`production`&&Kp(`name property in radar component has been changed to axisName`)),e.nameGap!=null&&e.axisNameGap==null&&(e.axisNameGap=e.nameGap,delete e.nameGap,process.env.NODE_ENV!==`production`&&Kp(`nameGap property in radar component has been changed to axisNameGap`)),process.env.NODE_ENV!==`production`&&WC(e.indicator,function(e){e.text&&qp(`text`,`name`,`radar.indicator`)})}),WC($C(e.geo),function(e){GC(e)&&(ZC(e),WC($C(e.regions),function(e){ZC(e)}))}),WC($C(e.timeline),function(e){ZC(e),JC(e,`label`),JC(e,`itemStyle`),JC(e,`controlStyle`,!0);var t=e.data;B(t)&&L(t,function(e){U(e)&&(JC(e,`label`),JC(e,`itemStyle`))})}),WC($C(e.toolbox),function(e){JC(e,`iconStyle`),WC(e.feature,function(e){JC(e,`iconStyle`)})}),XC(ew(e.axisPointer),`label`),XC(ew(e.tooltip).axisPointer,`label`)}function nw(e,t){for(var n=t.split(`,`),r=e,i=0;i<n.length&&(r&&=r[n[i]],r!=null);i++);return r}function rw(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 iw(e){e&&L(aw,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}var aw=[[`x`,`left`],[`y`,`top`],[`x2`,`right`],[`y2`,`bottom`]],ow=[`grid`,`geo`,`parallel`,`legend`,`toolbox`,`title`,`visualMap`,`dataZoom`,`timeline`],sw=[[`borderRadius`,`barBorderRadius`],[`borderColor`,`barBorderColor`],[`borderWidth`,`barBorderWidth`]];function cw(e){var t=e&&e.itemStyle;if(t)for(var n=0;n<sw.length;n++){var r=sw[n][1],i=sw[n][0];t[r]!=null&&(t[i]=t[r],process.env.NODE_ENV!==`production`&&qp(r,i))}}function lw(e){e&&e.alignTo===`edge`&&e.margin!=null&&e.edgeDistance==null&&(process.env.NODE_ENV!==`production`&&qp(`label.margin`,`label.edgeDistance`,`pie`),e.edgeDistance=e.margin)}function uw(e){e&&e.downplay&&!e.blur&&(e.blur=e.downplay,process.env.NODE_ENV!==`production`&&qp(`downplay`,`blur`,`sunburst`))}function dw(e){e&&e.focusNodeAdjacency!=null&&(e.emphasis=e.emphasis||{},e.emphasis.focus??(process.env.NODE_ENV!==`production`&&qp(`focusNodeAdjacency`,`emphasis: { focus: 'adjacency'}`,`graph/sankey`),e.emphasis.focus=`adjacency`))}function fw(e,t){if(e)for(var n=0;n<e.length;n++)t(e[n]),e[n]&&fw(e[n].children,t)}function pw(e,t){tw(e,t),e.series=$p(e.series),L(e.series,function(e){if(U(e)){var t=e.type;if(t===`line`)e.clipOverflow!=null&&(e.clip=e.clipOverflow,process.env.NODE_ENV!==`production`&&qp(`clipOverflow`,`clip`,`line`));else if(t===`pie`||t===`gauge`){e.clockWise!=null&&(e.clockwise=e.clockWise,process.env.NODE_ENV!==`production`&&qp(`clockWise`,`clockwise`)),lw(e.label);var n=e.data;if(n&&!Hs(n))for(var r=0;r<n.length;r++)lw(n[r]);e.hoverOffset!=null&&(e.emphasis=e.emphasis||{},(e.emphasis.scaleSize=null)&&(process.env.NODE_ENV!==`production`&&qp(`hoverOffset`,`emphasis.scaleSize`),e.emphasis.scaleSize=e.hoverOffset))}else if(t===`gauge`){var i=nw(e,`pointer.color`);i!=null&&rw(e,`itemStyle.color`,i)}else if(t===`bar`){cw(e),cw(e.backgroundStyle),cw(e.emphasis);var n=e.data;if(n&&!Hs(n))for(var r=0;r<n.length;r++)typeof n[r]==`object`&&(cw(n[r]),cw(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,process.env.NODE_ENV!==`production`&&qp(`highlightPolicy`,`emphasis.focus`,`sunburst`))),uw(e),fw(e.data,uw)}else t===`graph`||t===`sankey`?dw(e):t===`map`&&(e.mapType&&!e.map&&(process.env.NODE_ENV!==`production`&&qp(`mapType`,`map`,`map`),e.map=e.mapType),e.mapLocation&&(process.env.NODE_ENV!==`production`&&Kp("`mapLocation` is not used anymore."),I(e,e.mapLocation)));e.hoverAnimation!=null&&(e.emphasis=e.emphasis||{},e.emphasis&&e.emphasis.scale==null&&(process.env.NODE_ENV!==`production`&&qp(`hoverAnimation`,`emphasis.scale`),e.emphasis.scale=e.hoverAnimation)),iw(e)}}),e.dataRange&&(e.visualMap=e.dataRange),L(ow,function(t){var n=e[t];n&&(B(n)||(n=[n]),L(n,function(e){iw(e)}))})}function mw(e){var t=K();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(),L(e,function(t,n){t.data.setCalculationInfo(`stackedOnSeries`,n>0?e[n-1].seriesModel:null)}),hw(e))})}function hw(e){L(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=Dte(d,_),m=_;break}}}return r[0]=d,r[1]=m,r})})}var gw=function(){function e(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&&gC(this,n)===lC.Must&&(r.type=`ordinal`)}}return e}();function _w(e){return e instanceof gw}function vw(e,t,n){n||=xw(e);var r=t.seriesLayoutBy,i=Sw(e,n,r,t.sourceHeader,t.dimensions);return new gw({data:e,sourceFormat:n,seriesLayoutBy:r,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:P(t)})}function yw(e){return new gw({data:e,sourceFormat:Hs(e)?oC:nC})}function bw(e){return new gw({data:e.data,sourceFormat:e.sourceFormat,seriesLayoutBy:e.seriesLayoutBy,dimensionsDefine:P(e.dimensionsDefine),startIndex:e.startIndex,dimensionsDetectedCount:e.dimensionsDetectedCount})}function xw(e){var t=sC;if(Hs(e))t=oC;else if(B(e)){e.length===0&&(t=rC);for(var n=0,r=e.length;n<r;n++){var i=e[n];if(i!=null){if(B(i)||Hs(i)){t=rC;break}else if(U(i)){t=iC;break}}}}else if(U(e)){for(var a in e)if(q(e,a)&&Ns(e[a])){t=aC;break}}return t}function Sw(e,t,n,r,i){var a,o;if(!e)return{dimensionsDefine:ww(i),startIndex:o,dimensionsDetectedCount:a};if(t===`arrayRows`){var s=e;r===`auto`||r==null?Tw(function(e){e!=null&&e!==`-`&&(H(e)?o??=1:o=0)},n,s,10):o=Bs(r)?r:+!!r,!i&&o===1&&(i=[],Tw(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||=Cw(e);else if(t===`keyedColumns`)i||(i=[],L(e,function(e,t){i.push(t)}));else if(t===`original`){var c=nm(e[0]);a=B(c)&&c.length||1}else t===`typedArray`&&process.env.NODE_ENV!==`production`&&G(!!i,`dimensions must be given if data is TypedArray.`);return{startIndex:o,dimensionsDefine:ww(i),dimensionsDetectedCount:a}}function Cw(e){for(var t=0,n;t<e.length&&!(n=e[t++]););if(n)return Ls(n)}function ww(e){if(e){var t=K();return R(e,function(e,n){e=U(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.name;var i=t.get(r.name);return i?r.name+=`-`+ i.count++:t.set(r.name,{count:1}),r})}}function Tw(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 Ew(e){var t=e.sourceFormat;return t===`objectRows`||t===`keyedColumns`}var Dw,Ow,kw,Aw,jw,Mw,Nw=function(){function e(e,t){var n=_w(e)?e:yw(e);this._source=n;var r=this._data=n.data,i=n.sourceFormat,a=n.seriesLayoutBy;if(i===`typedArray`){if(process.env.NODE_ENV!==`production`&&t==null)throw Error(`Typed array data must specify dimension size`);this._offset=0,this._dimSize=t,this._data=r}if(process.env.NODE_ENV!==`production`){var o=Fw[Gw(i,a)];o&&o(r,n.dimensionsDefine)}Mw(this,r,n)}return e.prototype.getSource=function(){return this._source},e.prototype.count=function(){return 0},e.prototype.getItem=function(e,t){},e.prototype.appendData=function(e){},e.prototype.clean=function(){},e.protoInitialize=function(){var t=e.prototype;t.pure=!1,t.persistent=!0}(),e.internalField=function(){var e;Mw=function(e,i,a){var o=a.sourceFormat,s=a.seriesLayoutBy,c=a.startIndex,l=a.dimensionsDefine,u=jw[Gw(o,s)];process.env.NODE_ENV!==`production`&&G(u,`Invalide sourceFormat: `+o),F(e,u),o===`typedArray`?(e.getItem=t,e.count=r,e.fillStorage=n):(e.getItem=z(Rw(o,s),null,i,c,l),e.count=z(Vw(o,s),null,i,c,l))};var t=function(e,t){e-=this._offset,t||=[];for(var n=this._data,r=this._dimSize,i=r*e,a=0;a<r;a++)t[a]=n[i+a];return t},n=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}},r=function(){return this._data?this._data.length/this._dimSize:0};jw=(e={},e[rC+`_`+cC]={pure:!0,appendData:i},e[rC+`_row`]={pure:!0,appendData:function(){throw Error(`Do not support appendData when set seriesLayoutBy: "row".`)}},e[iC]={pure:!0,appendData:i},e[aC]={pure:!0,appendData:function(e){var t=this._data;L(e,function(e,n){for(var r=t[n]||(t[n]=[]),i=0;i<(e||[]).length;i++)r.push(e[i])})}},e[nC]={appendData:i},e[oC]={persistent:!1,pure:!0,appendData:function(e){process.env.NODE_ENV!==`production`&&G(Hs(e),`Added data must be TypedArray if data in initialization is TypedArray`),this._data=e},clean:function(){this._offset+=this.count(),this._data=null}},e);function i(e){for(var t=0;t<e.length;t++)this._data.push(e[t])}}(),e}(),Pw=function(e){B(e)||Gp(`series.data or dataset.source must be an array.`)},Fw=(Dw={},Dw[rC+`_`+cC]=Pw,Dw[rC+`_row`]=Pw,Dw[iC]=Pw,Dw[aC]=function(e,t){for(var n=0;n<t.length;n++)t[n].name??Gp(`dimension name must not be null/undefined.`)},Dw[nC]=Pw,Dw),Iw=function(e,t,n,r){return e[r]},Lw=(Ow={},Ow[rC+`_`+cC]=function(e,t,n,r){return e[r+t]},Ow[rC+`_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},Ow[iC]=Iw,Ow[aC]=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},Ow[nC]=Iw,Ow);function Rw(e,t){var n=Lw[Gw(e,t)];return process.env.NODE_ENV!==`production`&&G(n,`Do not support get item on "`+e+`", "`+t+`".`),n}var zw=function(e,t,n){return e.length},Bw=(kw={},kw[rC+`_`+cC]=function(e,t,n){return Math.max(0,e.length-t)},kw[rC+`_row`]=function(e,t,n){var r=e[0];return r?Math.max(0,r.length-t):0},kw[iC]=zw,kw[aC]=function(e,t,n){var r=n[0].name,i=r==null?null:e[r];return i?i.length:0},kw[nC]=zw,kw);function Vw(e,t){var n=Bw[Gw(e,t)];return process.env.NODE_ENV!==`production`&&G(n,`Do not support count on "`+e+`", "`+t+`".`),n}var Hw=function(e,t,n){return e[t]},Uw=(Aw={},Aw[rC]=Hw,Aw[iC]=function(e,t,n){return e[n]},Aw[aC]=Hw,Aw[nC]=function(e,t,n){var r=nm(e);return r instanceof Array?r[t]:r},Aw[oC]=Hw,Aw);function Ww(e){var t=Uw[e];return process.env.NODE_ENV!==`production`&&G(t,`Do not support get value on "`+e+`".`),t}function Gw(e,t){return e===`arrayRows`?e+`_`+t:e}function Kw(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 Ww(a)(r,o,s)}else{var c=r;return a===`original`&&(c=nm(r)),c}}}}var qw=/\{@(.+?)\}/g,Jw=function(){function e(){}return e.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`]}},e.prototype.getFormattedLabel=function(e,t,n,r,i,a){t||=`normal`;var o=this.getData(n),s=this.getDataParams(e,n);if(a&&(s.value=a.interpolatedValue),r!=null&&B(s.value)&&(s.value=s.value[r]),i||=o.getItemModel(e).get(t===`normal`?[`label`,`formatter`]:[t,`label`,`formatter`]),V(i))return s.status=t,s.dimensionIndex=r,i(s);if(H(i))return lS(i,s).replace(qw,function(t,n){var r=n.length,i=n;i.charAt(0)===`[`&&i.charAt(r-1)===`]`&&(i=+i.slice(1,r-1),process.env.NODE_ENV!==`production`&&isNaN(i)&&Gp(`Invalide label formatter: @`+n+`, only support @[0], @[1], @[2], ...`));var s=Kw(o,e,i);if(a&&B(a.interpolatedValue)){var c=o.getDimensionIndex(i);c>=0&&(s=a.interpolatedValue[c])}return s==null?``:s+``})},e.prototype.getRawValue=function(e,t){return Kw(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function Yw(e){var t,n;return U(e)?e.type?n=e:process.env.NODE_ENV!==`production`&&console.warn("The return type of `formatTooltip` is not supported: "+Jp(e)):t=e,{text:t,frag:n}}function Xw(e){return new Zw(e)}var Zw=function(){function e(e){e||={},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return e.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=l(this._modBy),o=this._modDataCount||0,s=l(e&&e.modBy),c=e&&e.modDataCount||0;(a!==s||o!==c)&&(i=`reset`);function l(e){return!(e>=1)&&(e=1),e}var u;(this._dirty||i===`reset`)&&(this._dirty=!1,u=this._doReset(n)),this._modBy=s,this._modDataCount=c;var d=e&&e.step;if(t?(process.env.NODE_ENV!==`production`&&G(t._outputDueEnd!=null),this._dueEnd=t._outputDueEnd):(process.env.NODE_ENV!==`production`&&G(!this._progress||this._count),this._dueEnd=this._count?this._count(this.context):1/0),this._progress){var f=this._dueIndex,p=Math.min(d==null?1/0:this._dueIndex+d,this._dueEnd);if(!n&&(u||f<p)){var m=this._progress;if(B(m))for(var h=0;h<m.length;h++)this._doProgress(m[h],f,p,s,c);else this._doProgress(m,f,p,s,c)}this._dueIndex=p;var g=this._settedOutputEnd==null?p:this._settedOutputEnd;process.env.NODE_ENV!==`production`&&G(g>=this._outputDueEnd),this._outputDueEnd=g}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd==null?this._dueEnd:this._settedOutputEnd;return this.unfinished()},e.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},e.prototype._doProgress=function(e,t,n,r,i){Qw.reset(t,n,r,i),this._callingProgress=e,this._callingProgress({start:t,end:n,count:n-t,next:Qw.next},this.context)},e.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),B(t)&&!t.length&&(t=null)),this._progress=t,this._modBy=this._modDataCount=null;var r=this._downstream;return r&&r.dirty(),n},e.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},e.prototype.pipe=function(e){process.env.NODE_ENV!==`production`&&G(e&&!e._disposed&&e!==this),(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},e.prototype.dispose=function(){this._disposed||=(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,!0)},e.prototype.getUpstream=function(){return this._upstream},e.prototype.getDownstream=function(){return this._downstream},e.prototype.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},e}(),Qw=function(){var e,t,n,r,i,a={reset:function(c,l,u,d){t=c,e=l,n=u,r=d,i=Math.ceil(r/n),a.next=n>1&&r>0?s:o}};return a;function o(){return t<e?t++:null}function s(){var a=t%i*n+Math.ceil(t/i),o=t>=e?null:a<r?a:t;return t++,o}}();function $w(e,t){var n=t&&t.type;return n===`ordinal`?e:(n===`time`&&!Bs(e)&&e!=null&&e!==`-`&&(e=+jp(e)),e==null||e===``?NaN:Number(e))}var eT=K({number:function(e){return parseFloat(e)},time:function(e){return+jp(e)},trim:function(e){return H(e)?Zs(e):e}});function tT(e){return eT.get(e)}var nT={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}},rT=function(){function e(e,t){if(!Bs(t)){var n=``;process.env.NODE_ENV!==`production`&&(n=`rvalue of "<", ">", "<=", ">=" can only be number in filter.`),Yp(n)}this._opFn=nT[e],this._rvalFloat=Ip(t)}return e.prototype.evaluate=function(e){return Bs(e)?this._opFn(e,this._rvalFloat):this._opFn(Ip(e),this._rvalFloat)},e}(),iT=function(){function e(e,t){var n=e===`desc`;this._resultLT=n?1:-1,t??=n?`min`:`max`,this._incomparable=t===`min`?-1/0:1/0}return e.prototype.evaluate=function(e,t){var n=Bs(e)?e:Ip(e),r=Bs(t)?t:Ip(t),i=isNaN(n),a=isNaN(r);if(i&&(n=this._incomparable),a&&(r=this._incomparable),i&&a){var o=H(e),s=H(t);o&&(n=s?e:0),s&&(r=o?t:0)}return n<r?this._resultLT:n>r?-this._resultLT:0},e}(),aT=function(){function e(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=Ip(t)}return e.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n!==this._rvalTypeof&&(n===`number`||this._rvalTypeof===`number`)&&(t=Ip(e)===this._rvalFloat)}return this._isEQ?t:!t},e}();function oT(e,t){return e===`eq`||e===`ne`?new aT(e===`eq`,t):q(nT,e)?new rT(e,t):null}var sT=function(){function e(){}return e.prototype.getRawData=function(){throw Error(`not supported`)},e.prototype.getRawDataItem=function(e){throw Error(`not supported`)},e.prototype.cloneRawData=function(){},e.prototype.getDimensionInfo=function(e){},e.prototype.cloneAllDimensionInfo=function(){},e.prototype.count=function(){},e.prototype.retrieveValue=function(e,t){},e.prototype.retrieveValueFromItem=function(e,t){},e.prototype.convertValue=function(e,t){return $w(e,t)},e}();function cT(e,t){var n=new sT,r=e.data,i=n.sourceFormat=e.sourceFormat,a=e.startIndex,o=``;e.seriesLayoutBy!==`column`&&(process.env.NODE_ENV!==`production`&&(o='`seriesLayoutBy` of upstream dataset can only be "column" in data transform.'),Yp(o));var s=[],c={},l=e.dimensionsDefine;if(l)L(l,function(e,t){var n=e.name,r={index:t,name:n,displayName:e.displayName};if(s.push(r),n!=null){var i=``;q(c,n)&&(process.env.NODE_ENV!==`production`&&(i=`dimension name "`+n+`" duplicated.`),Yp(i)),c[n]=r}});else for(var u=0;u<e.dimensionsDetectedCount;u++)s.push({index:u});var d=Rw(i,cC);t.__isBuiltIn&&(n.getRawDataItem=function(e){return d(r,a,s,e)},n.getRawData=z(lT,null,e)),n.cloneRawData=z(uT,null,e),n.count=z(Vw(i,cC),null,r,a,s);var f=Ww(i);n.retrieveValue=function(e,t){return p(d(r,a,s,e),t)};var p=n.retrieveValueFromItem=function(e,t){if(e!=null){var n=s[t];if(n)return f(e,t,n.name)}};return n.getDimensionInfo=z(dT,null,s,c),n.cloneAllDimensionInfo=z(fT,null,s),n}function lT(e){var t=e.sourceFormat;if(!_T(t)){var n=``;process.env.NODE_ENV!==`production`&&(n="`getRawData` is not supported in source format "+t),Yp(n)}return e.data}function uT(e){var t=e.sourceFormat,n=e.data;if(!_T(t)){var r=``;process.env.NODE_ENV!==`production`&&(r="`cloneRawData` is not supported in source format "+t),Yp(r)}if(t===`arrayRows`){for(var i=[],a=0,o=n.length;a<o;a++)i.push(n[a].slice());return i}else if(t===`objectRows`){for(var i=[],a=0,o=n.length;a<o;a++)i.push(F({},n[a]));return i}}function dT(e,t,n){if(n!=null){if(Bs(n)||!isNaN(n)&&!q(t,n))return e[n];if(q(t,n))return t[n]}}function fT(e){return P(e)}var pT=K();function mT(e){e=P(e);var t=e.type,n=``;t||(process.env.NODE_ENV!==`production`&&(n="Must have a `type` when `registerTransform`."),Yp(n));var r=t.split(`:`);r.length!==2&&(process.env.NODE_ENV!==`production`&&(n=`Name must include namespace like "ns:regression".`),Yp(n));var i=!1;r[0]===`echarts`&&(t=r[1],i=!0),e.__isBuiltIn=i,pT.set(t,e)}function hT(e,t,n){var r=$p(e),i=r.length,a=``;i||(process.env.NODE_ENV!==`production`&&(a="If `transform` declared, it should at least contain one transform."),Yp(a));for(var o=0,s=i;o<s;o++){var c=r[o];t=gT(c,t,n,i===1?null:o),o!==s-1&&(t.length=Math.max(t.length,1))}return t}function gT(e,t,n,r){var i=``;t.length||(process.env.NODE_ENV!==`production`&&(i=`Must have at least one upstream dataset.`),Yp(i)),U(e)||(process.env.NODE_ENV!==`production`&&(i=`transform declaration must be an object rather than `+typeof e+`.`),Yp(i));var a=e.type,o=pT.get(a);o||(process.env.NODE_ENV!==`production`&&(i=`Can not find transform on type "`+a+`".`),Yp(i));var s=R(t,function(e){return cT(e,o)}),c=$p(o.transform({upstream:s[0],upstreamList:s,config:P(e.config)}));return process.env.NODE_ENV!==`production`&&e.print&&Up(R(c,function(e){var t=r==null?``:` === pipe index: `+r;return[`=== dataset index: `+n.datasetIndex+t+` ===`,`- transform result data:`,Jp(e.data),`- transform result dimensions:`,Jp(e.dimensions)].join(`
|
|
56
|
-
`)}).join(`
|
|
57
|
-
`)),R(c,function(e,n){var r=``;U(e)||(process.env.NODE_ENV!==`production`&&(r=`A transform should not return some empty results.`),Yp(r)),e.data||(process.env.NODE_ENV!==`production`&&(r=`Transform result data should be not be null or undefined`),Yp(r)),_T(xw(e.data))||(process.env.NODE_ENV!==`production`&&(r=`Transform result data should be array rows or object rows.`),Yp(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:cC,sourceHeader:o,dimensions:a.metaRawOption.dimensions}}else i={seriesLayoutBy:cC,sourceHeader:0,dimensions:e.dimensions};return vw(e.data,i,null)})}function _T(e){return e===`arrayRows`||e===`objectRows`}var vT=`undefined`,yT=typeof Uint32Array===vT?Array:Uint32Array,bT=typeof Uint16Array===vT?Array:Uint16Array,xT=typeof Int32Array===vT?Array:Int32Array,ST=typeof Float64Array===vT?Array:Float64Array,CT={float:ST,int:xT,ordinal:Array,number:Array,time:ST},wT;function TT(e){return e>65535?yT:bT}function ET(){return[1/0,-1/0]}function DT(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function OT(e,t,n,r,i){var a=CT[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 kT=function(){function e(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=K()}return e.prototype.initData=function(e,t,n){process.env.NODE_ENV!==`production`&&G(V(e.getItem)&&V(e.count),`Invalid data provider.`),this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var r=e.getSource(),i=this.defaultDimValueGetter=wT[r.sourceFormat];this._dimValueGetter=n||i,this._rawExtent=[];var a=Ew(r);this._dimensions=R(t,function(e){return process.env.NODE_ENV!==`production`&&a&&G(e.property!=null),{type:e.type,property:e.property}}),this._initDataFromProvider(0,e.count())},e.prototype.getProvider=function(){return this._provider},e.prototype.getSource=function(){return this._provider.getSource()},e.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 CT[t||`float`](this._rawCount),this._rawExtent[i]=ET(),i},e.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]=ET());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`},e.prototype.getOrdinalMeta=function(e){return this._dimensions[e].ordinalMeta},e.prototype.getDimensionProperty=function(e){var t=this._dimensions[e];return t&&t.property},e.prototype.appendData=function(e){process.env.NODE_ENV!==`production`&&G(!this._indices,`appendData can only be called on raw data.`);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]},e.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];OT(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=wT.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}},e.prototype._initDataFromProvider=function(e,t,n){for(var r=this._provider,i=this._chunks,a=this._dimensions,o=a.length,s=this._rawExtent,c=R(a,function(e){return e.property}),l=0;l<o;l++){var u=a[l];s[l]||(s[l]=ET()),OT(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=[]},e.prototype.count=function(){return this._count},e.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},e.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},e.prototype.getByRawIndex=function(e,t){if(!(t>=0&&t<this._rawCount))return NaN;var n=this._chunks[e];return n?n[t]:NaN},e.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},e.prototype.getMedian=function(e){var t=[];this.each([e],function(e){isNaN(e)||t.push(e)});var n=t.sort(function(e,t){return e-t}),r=this.count();return r===0?0:r%2==1?n[(r-1)/2]:(n[r/2]+n[r/2-1])/2},e.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},e.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=TT(this._rawCount);e=new n(this.count());for(var i=0;i<e.length;i++)e[i]=i}return e},e.prototype.filter=function(e,t){if(!this._count)return this;for(var n=this.clone(),r=n.count(),i=new(TT(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},e.prototype.selectRange=function(e){var t=this.clone(),n=t._count;if(!n)return this;var r=Ls(e),i=r.length;if(!i)return this;var a=t.count(),o=new(TT(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},e.prototype.map=function(e,t){var n=this.clone(e);return this._updateDims(n,e,t),n},e.prototype.modify=function(e,t){this._updateDims(this,e,t)},e.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]]=ET();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)}}}},e.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(TT(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},e.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(TT(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},e.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]=ET(),d=new(TT(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},e.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)}}},e.prototype.getDataExtent=function(e){var t=this._chunks[e],n=ET();if(!t)return n;var r=this.count(),i=!this._indices,a;if(i)return this._rawExtent[e].slice();if(a=this._extent[e],a)return a.slice();a=n;for(var o=a[0],s=a[1],c=0;c<r;c++){var l=t[this.getRawIndex(c)];l<o&&(o=l),l>s&&(s=l)}return a=[o,s],this._extent[e]=a,a},e.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},e.prototype.clone=function(t,n){var r=new e,i=this._chunks,a=t&&Ps(t,function(e,t){return e[t]=!0,e},{});if(a)for(var o=0;o<i.length;o++)r._chunks[o]=a[o]?DT(i[o]):i[o];else r._chunks=i;return this._copyCommonProps(r),n||(r._indices=this._cloneIndices()),r._updateGetRawIdx(),r},e.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=P(this._extent),e._rawExtent=P(this._rawExtent)},e.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},e.prototype._getRawIdxIdentity=function(e){return e},e.prototype._getRawIdx=function(e){return e<this._count&&e>=0?this._indices[e]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function e(e,t,n,r){return $w(e[r],this._dimensions[r])}wT={arrayRows:e,objectRows:function(e,t,n,r){return $w(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var i=e&&(e.value==null?e:e.value);return $w(i instanceof Array?i[r]:i,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}(),AT=function(){function e(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return e.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},e.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+`_`+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),n=!!t.length,r,i;if(MT(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=Hs(o)?oC:nC,i=[];var u=this._getSourceMetaRawOption()||{},d=c&&c.metaRawOption||{},f=W(u.seriesLayoutBy,d.seriesLayoutBy)||null,p=W(u.sourceHeader,d.sourceHeader),m=W(u.dimensions,d.dimensions);r=f!==d.seriesLayoutBy||!!p!=!!d.sourceHeader||m?[vw(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=[vw(h.get(`source`,!0),this._getSourceMetaRawOption(),null)],i=[]}process.env.NODE_ENV!==`production`&&G(r&&i),this._setLocalSource(r,i)},e.prototype._applyTransform=function(e){var t=this._sourceHost,n=t.get(`transform`,!0),r=t.get(`fromTransformResult`,!0);if(process.env.NODE_ENV!==`production`&&G(r!=null||n!=null),r!=null){var i=``;e.length!==1&&(process.env.NODE_ENV!==`production`&&(i="When using `fromTransformResult`, there should be only one upstream dataset"),NT(i))}var a,o=[],s=[];return L(e,function(e){e.prepareSource();var t=e.getSource(r||0),n=``;r!=null&&!t&&(process.env.NODE_ENV!==`production`&&(n="Can not retrieve result by `fromTransformResult`: "+r),NT(n)),o.push(t),s.push(e._getVersionSign())}),n?a=hT(n,o,{datasetIndex:t.componentIndex}):r!=null&&(a=[bw(o[0])]),{sourceList:a,upstreamSignList:s}},e.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}},e.prototype.getSource=function(e){e||=0;var t=this._sourceList[e];if(!t){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(e)}return t},e.prototype.getSharedDataStore=function(e){process.env.NODE_ENV!==`production`&&G(MT(this._sourceHost),`Can only call getDataStore on series source manager.`);var t=e.makeStoreSchema();return this._innerGetDataStore(t.dimensions,e.source,t.hash)},e.prototype._innerGetDataStore=function(e,t,n){var r=0,i=this._storeList,a=i[r];a||=i[r]={};var o=a[n];if(!o){var s=this._getUpstreamSourceManagers()[0];MT(this._sourceHost)&&s?o=s._innerGetDataStore(e,t,n):(o=new kT,o.initData(new Nw(t,e.length),e)),a[n]=o}return o},e.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(MT(e)){var t=mC(e);return t?[t.getSourceManager()]:[]}else return R(hC(e),function(e){return e.getSourceManager()})},e.prototype._getSourceMetaRawOption=function(){var e=this._sourceHost,t,n,r;if(MT(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}},e}();function jT(e){e.option.transform&&$s(e.option.transform)}function MT(e){return e.mainType===`series`}function NT(e){throw Error(e)}var PT=`line-height:1`;function FT(e){var t=e.lineHeight;return t==null?PT:`line-height:`+Wc(t+``)+`px`}function IT(e,t){var n=e.color||Z.color.tertiary,r=e.fontSize||12,i=e.fontWeight||`400`,a=e.color||Z.color.secondary,o=e.fontSize||14,s=e.fontWeight||`900`;return t===`html`?{nameStyle:`font-size:`+Wc(r+``)+`px;color:`+Wc(n)+`;font-weight:`+Wc(i+``),valueStyle:`font-size:`+Wc(o+``)+`px;color:`+Wc(a)+`;font-weight:`+Wc(s+``)}:{nameStyle:{fontSize:r,fill:n,fontWeight:i},valueStyle:{fontSize:o,fill:a,fontWeight:s}}}var LT=[0,10,20,30],RT=[``,`
|
|
58
|
-
`,`
|
|
59
|
-
|
|
60
|
-
`,`
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
`];function zT(e,t){return t.type=e,t}function BT(e){return e.type===`section`}function VT(e){return BT(e)?UT:WT}function HT(e){if(BT(e)){var t=0,n=e.blocks.length,r=n>1||n>0&&!e.noHeader;return L(e.blocks,function(e){var n=HT(e);n>=t&&(t=n+ +(r&&(!n||BT(e)&&!e.noHeader)))}),t}return 0}function UT(e,t,n,r){var i=t.noHeader,a=KT(HT(t)),o=[],s=t.blocks||[];G(!s||B(s)),s||=[];var c=e.orderMode;if(t.sortBlocks&&c){s=s.slice();var l={valueAsc:`asc`,valueDesc:`desc`};if(q(l,c)){var u=new iT(l[c],null);s.sort(function(e,t){return u.evaluate(e.sortParam,t.sortParam)})}else c===`seriesDesc`&&s.reverse()}L(s,function(n,i){var s=t.valueFormatter,c=VT(n)(s?F(F({},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):qT(r,o.join(``),i?n:a.html);if(i)return d;var f=oS(t.header,`ordinal`,e.useUTC),p=IT(r,e.renderMode).nameStyle,m=FT(r);return e.renderMode===`richText`?XT(e,f,p)+a.richText+d:qT(r,`<div style="`+p+`;`+m+`;">`+Wc(f)+`</div>`+d,n)}function WT(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=B(e)?e:[e],R(e,function(e,t){return oS(e,B(p)?p[t]:p,l)})};if(!(a&&o)){var d=s?``:e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||Z.color.secondary,i),f=a?``:oS(c,`ordinal`,l),p=t.valueType,m=o?[]:u(t.value,t.dataIndex),h=!s||!a,g=!s&&a,_=IT(r,i),v=_.nameStyle,y=_.valueStyle;return i===`richText`?(s?``:d)+(a?``:XT(e,f,v))+(o?``:ZT(e,m,h,g,y)):qT(r,(s?``:d)+(a?``:JT(f,!s,v))+(o?``:YT(m,h,g,y)),n)}}function GT(e,t,n,r,i,a){if(e)return VT(e)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,a)}function KT(e){return{html:LT[e],richText:RT[e]}}function qT(e,t,n){var r=`<div style="clear:both"></div>`,i=`margin: `+n+`px 0 0`,a=FT(e);return`<div style="`+i+`;`+a+`;">`+t+r+`</div>`}function JT(e,t,n){var r=t?`margin-left:2px`:``;return`<span style="`+n+`;`+r+`">`+Wc(e)+`</span>`}function YT(e,t,n,r){var i=t?`float:right;margin-left:`+(n?`10px`:`20px`):``;return e=B(e)?e:[e],`<span style="`+i+`;`+r+`">`+R(e,function(e){return Wc(e)}).join(` `)+`</span>`}function XT(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function ZT(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(B(t)?t.join(` `):t,a)}function QT(e,t){var n=e.getData().getItemVisual(t,`style`)[e.visualDrawType];return fS(n)}function $T(e,t){return e.get(`padding`)??(t===`richText`?[8,10]:10)}var eE=function(){function e(){this.richTextStyles={},this._nextStyleNameId=Rp()}return e.prototype._generateStyleName=function(){return`__EC_aUTo_`+ this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var r=n===`richText`?this._generateStyleName():null,i=dS({color:t,type:e,renderMode:n,markerId:r});return H(i)?i:(process.env.NODE_ENV!==`production`&&G(r),this.richTextStyles[r]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};B(t)?L(t,function(e){return F(n,e)}):F(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,`{`+r+`|`+e+`}`},e}();function tE(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=B(s),l=QT(t,n),u,d,f,p;if(o>1||c&&!o){var m=nE(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=Kw(i,n,a[0]),d=h.type}else p=u=c?s[0]:s;var g=gm(t),_=g&&t.name||``,v=i.getName(n),y=r?_:v;return zT(`section`,{header:_,noHeader:r||!g,sortParam:p,blocks:[zT(`nameValue`,{markerType:`item`,markerColor:l,name:y,noName:!Zs(y),value:u,valueType:d,dataIndex:n})].concat(f||[])})}function nE(e,t,n,r,i){var a=t.getData(),o=Ps(e,function(e,t,n){var r=a.getDimensionInfo(n);return e||=r&&r.tooltip!==!1&&r.displayName!=null},!1),s=[],c=[],l=[];r.length?L(r,function(e){u(Kw(a,n,e),e)}):L(e,u);function u(e,t){var n=a.getDimensionInfo(t);!n||n.otherDims.tooltip===!1||(o?l.push(zT(`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 rE=Cm();function iE(e,t){return e.getName(t)||e.getId(t)}var aE=`__universalTransitionEnabled`,oE=function(e){N(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return t.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=Xw({count:lE,reset:uE}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(rE(this).sourceManager=new AT(this)).prepareSource();var r=this.getInitialData(e,n);fE(r,this),this.dataTask.context.data=r,process.env.NODE_ENV!==`production`&&G(r,`getInitialData returned invalid data.`),rE(this).dataBeforeProcessed=r,sE(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=BS(this),r=n?HS(e):{},i=this.subType;GS.hasClass(i)&&(i+=`Series`),ks(e,t.getTheme().get(this.subType)),ks(e,this.getDefaultOption()),em(e,`label`,[`show`]),this.fillDataTextStyle(e.data),n&&VS(e,r,n)},t.prototype.mergeOption=function(e,t){e=ks(this.option,e,!0),this.fillDataTextStyle(e.data);var n=BS(this);n&&VS(this.option,e,n);var r=rE(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(e,t);fE(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,rE(this).dataBeforeProcessed=i,sE(this),this._initSelectedMapFromData(i)},t.prototype.fillDataTextStyle=function(e){if(e&&!Hs(e))for(var t=[`show`],n=0;n<e.length;n++)e[n]&&e[n].label&&em(e[n],`label`,t)},t.prototype.getInitialData=function(e,t){},t.prototype.appendData=function(e){this.getRawData().appendData(e.data)},t.prototype.getData=function(e){var t=mE(this);if(t){var n=t.context.data;return e==null||!n.getLinkedData?n:n.getLinkedData(e)}else return rE(this).data},t.prototype.getAllData=function(){var e=this.getData();return e&&e.getLinkedDataAll?e.getLinkedDataAll():[{data:e}]},t.prototype.setData=function(e){var t=mE(this);if(t){var n=t.context;n.outputData=e,t!==this.dataTask&&(n.data=e)}rE(this).data=e},t.prototype.getEncode=function(){var e=this.get(`encode`,!0);if(e)return K(e)},t.prototype.getSourceManager=function(){return rE(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return rE(this).dataBeforeProcessed},t.prototype.getColorBy=function(){return this.get(`colorBy`)||`series`},t.prototype.isColorBySeries=function(){return this.getColorBy()===`series`},t.prototype.getBaseAxis=function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},t.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??=1/0;var c=[],l=1/0,u=-1,d=0;return i.each(t,function(e,t){var n=s-o.dataToCoord(e),i=Math.abs(n);i<=r&&((i<l||i===l&&n>=0&&u<0)&&(l=i,u=n,d=0),n===u&&(c[d++]=t))}),c.length=d,c},t.prototype.formatTooltip=function(e,t,n){return tE({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(fs.node&&!(e&&e.ssr))return!1;var t=this.getShallow(`animation`);return t&&this.getData().count()>this.getShallow(`animationThreshold`)&&(t=!1),!!t},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,t,n){var r=this.ecModel,i=bC.prototype.getColorFromPalette.call(this,e,t,n);return i||=r.getColorFromPalette(e,t,n),i},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get(`progressive`)},t.prototype.getProgressiveThreshold=function(){return this.get(`progressiveThreshold`)},t.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},t.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=iE(i,o);n[s]=!1,this._selectedDataIndicesMap[s]=-1}}},t.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)},t.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap===`all`)return[].slice.call(this.getData().getIndices());for(var e=this._selectedDataIndicesMap,t=Ls(e),n=[],r=0;r<t.length;r++){var i=e[t[r]];i>=0&&n.push(i)}return n},t.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var r=this.getData(t);return(n===`all`||n[iE(r,e)])&&!r.getItemModel(e).get([`select`,`disabled`])},t.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var e=this.option.universalTransition;return e?e===!0?!0:e&&e.enabled:!1},t.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`){U(i.selectedMap)||(i.selectedMap={});for(var s=i.selectedMap,c=0;c<o;c++){var l=t[c],u=iE(e,l);s[u]=!0,this._selectedDataIndicesMap[u]=e.getRawIndex(l)}}else if(a===`single`||a===!0){var d=t[o-1],u=iE(e,d);i.selectedMap=(n={},n[u]=!0,n),this._selectedDataIndicesMap=(r={},r[u]=e.getRawIndex(d),r)}}},t.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)}},t.registerClass=function(e){return GS.registerClass(e)},t.protoInitialize=function(){var e=t.prototype;e.type=`series.__base__`,e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol=`circle`,e.visualStyleAccessPath=`itemStyle`,e.visualDrawType=`fill`}(),t}(GS);Ms(oE,Jw),Ms(oE,bC),Gm(oE,GS);function sE(e){var t=e.name;gm(e)||(e.name=cE(e)||t)}function cE(e){var t=e.getRawData(),n=t.mapDimensionsAll(`seriesName`),r=[];return L(n,function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)}),r.join(` `)}function lE(e){return e.model.getRawData().count()}function uE(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),dE}function dE(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function fE(e,t){L(nc(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,Rs(pE,t))})}function pE(e,t){var n=mE(e);return n&&n.setOutputEnd((t||this).count()),t}function mE(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 hE=function(){function e(){this.group=new Y,this.uid=nx(`viewComponent`)}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){},e.prototype.updateLayout=function(e,t,n,r){},e.prototype.updateVisual=function(e,t,n,r){},e.prototype.toggleBlurSeries=function(e,t,n){},e.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},e}();Um(hE),Xm(hE);function gE(){var e=Cm();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 _E=Cm(),vE=gE(),yE=function(){function e(){this.group=new Y,this.uid=nx(`viewChart`),this.renderTask=Xw({plan:SE,reset:CE}),this.renderTask.context={view:this}}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){if(process.env.NODE_ENV!==`production`)throw Error(`render method must been implemented`)},e.prototype.highlight=function(e,t,n,r){var i=e.getData(r&&r.dataType);if(!i){process.env.NODE_ENV!==`production`&&Gp(`Unknown dataType `+r.dataType);return}xE(i,r,`emphasis`)},e.prototype.downplay=function(e,t,n,r){var i=e.getData(r&&r.dataType);if(!i){process.env.NODE_ENV!==`production`&&Gp(`Unknown dataType `+r.dataType);return}xE(i,r,`normal`)},e.prototype.remove=function(e,t){this.group.removeAll()},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.updateLayout=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.updateVisual=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.eachRendered=function(e){Tb(this.group,e)},e.markUpdateMethod=function(e,t){_E(e).updateMethod=t},e.protoInitialize=function(){var t=e.prototype;t.type=`chart`}(),e}();function bE(e,t,n){e&&Cv(e)&&(t===`emphasis`?Q_:$_)(e,n)}function xE(e,t,n){var r=Sm(e,t),i=t&&t.highlightKey!=null?Tv(t.highlightKey):null;r==null?e.eachItemGraphicEl(function(e){bE(e,n,i)}):L($p(r),function(t){bE(e.getItemGraphicEl(t),n,i)})}Um(yE,[`dispose`]),Xm(yE);function SE(e){return vE(e.model)}function CE(e){var t=e.model,n=e.ecModel,r=e.api,i=e.payload,a=t.pipelineContext.progressiveRender,o=e.view,s=i&&_E(i).updateMethod,c=a?`incrementalPrepareRender`:s&&o[s]?s:`render`;return c!==`render`&&o[c](t,n,r,i),wE[c]}var wE={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)}}},TE=`\0__throttleOriginMethod`,EE=`\0__throttleRate`,DE=`\0__throttleType`;function OE(e,t,n){var r,i=0,a=0,o=null,s,c,l,u;t||=0;function d(){a=new Date().getTime(),o=null,e.apply(c,l||[])}var f=function(){for(var e=[],f=0;f<arguments.length;f++)e[f]=arguments[f];r=new Date().getTime(),c=this,l=e;var p=u||t,m=u||n;u=null,s=r-(m?i:a)-p,clearTimeout(o),m?o=setTimeout(d,p):s>=0?d():o=setTimeout(d,-s),i=r};return f.clear=function(){o&&=(clearTimeout(o),null)},f.debounceNextCall=function(e){u=e},f}function kE(e,t,n,r){var i=e[t];if(i){var a=i[TE]||i,o=i[DE];if(i[EE]!==n||o!==r){if(n==null||!r)return e[t]=a;i=e[t]=OE(a,n,r===`debounce`),i[TE]=a,i[DE]=r,i[EE]=n}return i}}function AE(e,t){var n=e[t];n&&n[TE]&&(n.clear&&n.clear(),e[t]=n[TE])}var jE=Cm(),ME={itemStyle:Zm($b,!0),lineStyle:Zm(Qb,!0)},NE={lineStyle:`stroke`,itemStyle:`fill`};function PE(e,t){return e.visualStyleMapper||ME[t]||(console.warn(`Unknown style type '`+t+`'.`),ME.itemStyle)}function FE(e,t){return e.visualDrawType||NE[t]||(console.warn(`Unknown style type '`+t+`'.`),`fill`)}var fne={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=e.getModel(r),a=PE(e,r)(i),o=i.getShallow(`decal`);o&&(n.setVisual(`decal`,o),o.dirty=!0);var s=FE(e,r),c=a[s],l=V(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`||V(a.fill)?d:a.fill,a.stroke=a.stroke===`auto`||V(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=F({},a);i[s]=l(r),t.setItemVisual(n,`style`,i)}}}},IE=new ex,pne={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!(e.ignoreStyleOnData||t.isSeriesFiltered(e))){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=PE(e,r),a=n.getVisual(`drawType`);return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){IE.option=n[r];var o=i(IE);F(e.ensureUniqueItemVisual(t,`style`),o),IE.option.decal&&(e.setItemVisual(t,`decal`,IE.option.decal),IE.option.decal.dirty=!0),a in o&&e.setItemVisual(t,`colorFromPalette`,!1)}}:null}}}},mne={performRawSeries:!0,overallReset:function(e){var t=K();e.eachSeries(function(e){var n=e.getColorBy();if(!e.isColorBySeries()){var r=e.type+`-`+n,i=t.get(r);i||(i={},t.set(r,i)),jE(e).scope=i}}),e.eachSeries(function(t){if(!(t.isColorBySeries()||e.isSeriesFiltered(t))){var n=t.getRawData(),r={},i=t.getData(),a=jE(t).scope,o=FE(t,t.visualStyleAccessPath||`itemStyle`);i.each(function(e){var t=i.getRawIndex(e);r[t]=e}),n.each(function(e){var s=r[e];if(i.getItemVisual(s,`colorFromPalette`)){var c=i.ensureUniqueItemVisual(s,`style`),l=n.getName(e)||e+``,u=n.count();c[o]=t.getColorFromPalette(l,a,u)}})}})}},LE=Math.PI;function hne(e,t){t||={},I(t,{text:`loading`,textColor:Z.color.primary,fontSize:12,fontWeight:`normal`,fontStyle:`normal`,fontFamily:`sans-serif`,maskColor:`rgba(255,255,255,0.8)`,showSpinner:!0,color:Z.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var n=new Y,r=new e_({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var i=new a_({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 e_({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 Oy({shape:{startAngle:-LE/2,endAngle:-LE/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:LE*3/2}).start(`circularInOut`),o.animateShape(!0).when(1e3,{startAngle:LE*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 RE=function(){function e(e,t,n,r){this._stageTaskMap=K(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(e){var t=e.overallTask;t&&t.dirty()})},e.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}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid),r=e.getData().count(),i=n.progressiveEnabled&&t.incrementalPrepareRender&&r>=n.threshold,a=e.get(`large`)&&r>=e.get(`largeThreshold`);e.pipelineContext=n.context={progressiveRender:i,modDataCount:e.get(`progressiveChunkMode`)===`mod`?r:null,large:a}},e.prototype.restorePipelines=function(e){var t=this,n=t._pipelineMap=K();e.eachSeries(function(e){var r=e.getProgressive(),i=e.uid;n.set(i,{id:i,head:null,tail:null,threshold:e.getProgressiveThreshold(),progressiveEnabled:r&&!(e.preventIncremental&&e.preventIncremental()),blockIndex:-1,step:Math.round(r||700),count:0}),t._pipe(e,e.dataTask)})},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;L(this._allHandlers,function(r){var i=e.get(r.uid)||e.set(r.uid,{}),a=``;process.env.NODE_ENV!==`production`&&(a=`"reset" and "overallReset" must not be both specified.`),G(!(r.reset&&r.overallReset),a),r.reset&&this._createSeriesStageTask(r,i,t,n),r.overallReset&&this._createOverallStageTask(r,i,t,n)},this)},e.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)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,r){r||={};var i=!1,a=this;L(e,function(e,s){if(!(r.visualType&&r.visualType!==e.visualType)){var c=a._stageTaskMap.get(e.uid),l=c.seriesTaskMap,u=c.overallTask;if(u){var d,f=u.agentStubMap;f.each(function(e){o(r,e)&&(e.dirty(),d=!0)}),d&&u.dirty(),a.updatePayload(u,n);var p=a.getPerformArgs(u,r.block);f.each(function(e){e.perform(p)}),u.perform(p)&&(i=!0)}else l&&l.each(function(s,c){o(r,s)&&s.dirty();var l=a.getPerformArgs(s,r.block);l.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),a.updatePayload(s,n),s.perform(l)&&(i=!0)})}});function o(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}this.unfinished=i||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(e){t=e.dataTask.perform()||t}),this.unfinished=t||this.unfinished},e.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)})},e.prototype.updatePayload=function(e,t){t!==`remain`&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,r){var i=this,a=t.seriesTaskMap,o=t.seriesTaskMap=K(),s=e.seriesType,c=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(l):s?n.eachRawSeriesByType(s,l):c&&c(n,r).each(l);function l(t){var s=t.uid,c=o.set(s,a&&a.get(s)||Xw({plan:bne,reset:xne,count:Cne}));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)}},e.prototype._createOverallStageTask=function(e,t,n,r){var i=this,a=t.overallTask=t.overallTask||Xw({reset:gne});a.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};var o=a.agentStubMap,s=a.agentStubMap=K(),c=e.seriesType,l=e.getTargetSeries,u=!0,d=!1,f=``;process.env.NODE_ENV!==`production`&&(f=`"createOnAllSeries" is not supported for "overallReset", because it will block all streams.`),G(!e.createOnAllSeries,f),c?n.eachRawSeriesByType(c,p):l?l(n,r).each(p):(u=!1,L(n.getSeries(),p));function p(e){var t=e.uid,n=s.set(t,o&&o.get(t)||(d=!0,Xw({reset:_ne,onDirty:yne})));n.context={model:e,overallProgress:u},n.agent=a,n.__block=u,i._pipe(e,n)}d&&a.dirty()},e.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},e.wrapStageHandler=function(e,t){return V(e)&&(e={overallReset:e,seriesType:wne(e)}),e.uid=nx(`stageHandler`),t&&(e.visualType=t),e},e}();function gne(e){e.overallReset(e.ecModel,e.api,e.payload)}function _ne(e){return e.overallProgress&&vne}function vne(){this.agent.dirty(),this.getDownstream().dirty()}function yne(){this.agent&&this.agent.dirty()}function bne(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function xne(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=$p(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?R(t,function(e,t){return zE(t)}):Sne}var Sne=zE(0);function zE(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 Cne(e){return e.data.count()}function wne(e){HE=null;try{e(BE,VE)}catch{}return HE}var BE={},VE={},HE;UE(BE,AC),UE(VE,LC),BE.eachSeriesByType=BE.eachRawSeriesByType=function(e){HE=e},BE.eachComponent=function(e){e.mainType===`series`&&e.subType&&(HE=e.subType)};function UE(e,t){for(var n in t.prototype)e[n]=ac}var Q=Z.darkColor,Tne=Q.background,WE=function(){return{axisLine:{lineStyle:{color:Q.axisLine}},splitLine:{lineStyle:{color:Q.axisSplitLine}},splitArea:{areaStyle:{color:[Q.backgroundTint,Q.backgroundTransparent]}},minorSplitLine:{lineStyle:{color:Q.axisMinorSplitLine}},axisLabel:{color:Q.axisLabel},axisName:{}}},GE={label:{color:Q.secondary},itemStyle:{borderColor:Q.borderTint},dividerLineStyle:{color:Q.border}},KE={darkMode:!0,color:Q.theme,backgroundColor:Tne,axisPointer:{lineStyle:{color:Q.border},crossStyle:{color:Q.borderShade},label:{color:Q.tertiary}},legend:{textStyle:{color:Q.secondary},pageTextStyle:{color:Q.tertiary}},textStyle:{color:Q.secondary},title:{textStyle:{color:Q.primary},subtextStyle:{color:Q.quaternary}},toolbox:{iconStyle:{borderColor:Q.accent50}},tooltip:{backgroundColor:Q.neutral20,defaultBorderColor:Q.border,textStyle:{color:Q.tertiary}},dataZoom:{borderColor:Q.accent10,textStyle:{color:Q.tertiary},brushStyle:{color:Q.backgroundTint},handleStyle:{color:Q.neutral00,borderColor:Q.accent20},moveHandleStyle:{color:Q.accent40},emphasis:{handleStyle:{borderColor:Q.accent50}},dataBackground:{lineStyle:{color:Q.accent30},areaStyle:{color:Q.accent20}},selectedDataBackground:{lineStyle:{color:Q.accent50},areaStyle:{color:Q.accent30}}},visualMap:{textStyle:{color:Q.secondary},handleStyle:{borderColor:Q.neutral30}},timeline:{lineStyle:{color:Q.accent10},label:{color:Q.tertiary},controlStyle:{color:Q.accent30,borderColor:Q.accent30}},calendar:{itemStyle:{color:Q.neutral00,borderColor:Q.neutral20},dayLabel:{color:Q.tertiary},monthLabel:{color:Q.secondary},yearLabel:{color:Q.secondary}},matrix:{x:GE,y:GE,backgroundColor:{borderColor:Q.axisLine},body:{itemStyle:{borderColor:Q.borderTint}}},timeAxis:WE(),logAxis:WE(),valueAxis:WE(),categoryAxis:WE(),line:{symbol:`circle`},graph:{color:Q.theme},gauge:{title:{color:Q.secondary},axisLine:{lineStyle:{color:[[1,Q.neutral05]]}},axisLabel:{color:Q.axisLabel},detail:{color:Q.primary}},candlestick:{itemStyle:{color:`#f64e56`,color0:`#54ea92`,borderColor:`#f64e56`,borderColor0:`#54ea92`}},funnel:{itemStyle:{borderColor:Q.background}},radar:function(){var e=WE();return e.axisName={color:Q.axisLabel},e.axisLine.lineStyle.color=Q.neutral20,e}(),treemap:{breadcrumb:{itemStyle:{color:Q.neutral20,textStyle:{color:Q.secondary}},emphasis:{itemStyle:{color:Q.neutral30}}}},sunburst:{itemStyle:{borderColor:Q.background}},map:{itemStyle:{borderColor:Q.border,areaColor:Q.neutral10},label:{color:Q.tertiary},emphasis:{label:{color:Q.primary},itemStyle:{areaColor:Q.highlight}},select:{label:{color:Q.primary},itemStyle:{areaColor:Q.highlight}}},geo:{itemStyle:{borderColor:Q.border,areaColor:Q.neutral10},emphasis:{label:{color:Q.primary},itemStyle:{areaColor:Q.highlight}},select:{label:{color:Q.primary},itemStyle:{color:Q.highlight}}}};KE.categoryAxis.splitLine.show=!1;var Ene=function(){function e(){}return e.prototype.normalizeQuery=function(e){var t={},n={},r={};if(H(e)){var i=Bm(e);t.mainType=i.main||null,t.subType=i.sub||null}else{var a=[`Index`,`Name`,`Id`],o={name:1,dataIndex:1,dataType:1};L(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}},e.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 l(s,a,`mainType`)&&l(s,a,`subType`)&&l(s,a,`index`,`componentIndex`)&&l(s,a,`name`)&&l(s,a,`id`)&&l(c,i,`name`)&&l(c,i,`dataIndex`)&&l(c,i,`dataType`)&&(!o.filterForExposedEvent||o.filterForExposedEvent(e,t.otherQuery,r,i));function l(e,t,n,r){return e[n]==null||t[r||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),qE=[`symbol`,`symbolSize`,`symbolRotate`,`symbolOffset`],JE=qE.concat([`symbolKeepAspect`]),Dne={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<qE.length;o++){var s=qE[o],c=e.get(s);V(c)?(a=!0,i[s]=c):r[s]=c}if(r.symbol=r.symbol||e.defaultSymbol,n.setVisual(F({legendIcon:e.legendIcon||r.symbol,symbolKeepAspect:e.get(`symbolKeepAspect`)},r)),t.isSeriesFiltered(e))return;var l=Ls(i);function u(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?u:null}}},One={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!e.hasSymbolVisual||t.isSeriesFiltered(e))return;var n=e.getData();function r(e,t){for(var n=e.getItemModel(t),r=0;r<JE.length;r++){var i=JE[r],a=n.getShallow(i,!0);a!=null&&e.setItemVisual(t,i,a)}}return{dataEach:n.hasItemOption?r:null}}};function YE(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:process.env.NODE_ENV!==`production`&&console.warn(`Unknown visual type `+n)}}function XE(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:process.env.NODE_ENV!==`production`&&console.warn(`Unknown visual type `+t)}}function ZE(e,t,n,r){switch(n){case`color`:var i=e.ensureUniqueItemVisual(t,`style`);i[e.getVisual(`drawType`)]=r,e.setItemVisual(t,`colorFromPalette`,!1);break;case`opacity`:e.ensureUniqueItemVisual(t,`style`).opacity=r;break;case`symbol`:case`symbolSize`:case`liftZ`:e.setItemVisual(t,n,r);break;default:process.env.NODE_ENV!==`production`&&console.warn(`Unknown visual type `+n)}}function QE(e,t){function n(t,n){var r=[];return t.eachComponent({mainType:`series`,subType:e,query:n},function(e){r.push(e.seriesIndex)}),r}L([[e+`ToggleSelect`,`toggleSelect`],[e+`Select`,`select`],[e+`UnSelect`,`unselect`]],function(e){t(e[0],function(t,r,i){t=F({},t),process.env.NODE_ENV!==`production`&&qp(t.type,e[1]),i.dispatchAction(F(t,{type:e[1],seriesIndex:n(r,t)}))})})}function $E(e,t,n,r,i){var a=e+t;n.isSilent(a)||(process.env.NODE_ENV!==`production`&&Kp(`event `+a+` is deprecated.`),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=Sm(c,i.fromActionPayload);n.trigger(a,{type:a,seriesId:e.id,name:B(l)?c.getName(l[0]):c.getName(l),selected:H(r)?r:F({},r)})}}))}function kne(e,t,n){e.on(`selectchanged`,function(e){var r=n.getModel();e.isFromClick?($E(`map`,`selectchanged`,t,r,e),$E(`pie`,`selectchanged`,t,r,e)):e.fromAction===`select`?($E(`map`,`selected`,t,r,e),$E(`pie`,`selected`,t,r,e)):e.fromAction===`unselect`&&($E(`map`,`unselected`,t,r,e),$E(`pie`,`unselected`,t,r,e))})}function eD(e,t,n){for(var r;e&&!(t(e)&&(r=e,n));)e=e.__hostTarget||e.parent;return r}var Ane=Math.round(Math.random()*9),jne=typeof Object.defineProperty==`function`,Mne=function(){function e(){this._id=`__ec_inner_`+ Ane++}return e.prototype.get=function(e){return this._guard(e)[this._id]},e.prototype.set=function(e,t){var n=this._guard(e);return jne?Object.defineProperty(n,this._id,{value:t,enumerable:!1,configurable:!0}):n[this._id]=t,this},e.prototype.delete=function(e){return this.has(e)?(delete this._guard(e)[this._id],!0):!1},e.prototype.has=function(e){return!!this._guard(e)[this._id]},e.prototype._guard=function(e){if(e!==Object(e))throw TypeError(`Value of WeakMap is not a non-null object.`);return e},e}(),Nne=Bg.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()}}),Pne={line:wy,rect:e_,roundRect:e_,square:e_,circle:$v,diamond:Bg.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:Bg.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:Bg.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:Nne},Fne={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}},tD={};L(Pne,function(e,t){tD[t]=new e});var Ine=Bg.extend({type:`symbol`,shape:{symbolType:``,x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var r=Kf(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=tD[r];i||=(r=`rect`,tD[r]),Fne[r](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,n)}}});function Lne(e,t){if(this.type!==`image`){var n=this.style;this.__isEmptyBrush?(n.stroke=e,n.fill=t||Z.color.neutral00,n.lineWidth=2):this.shape.symbolType===`line`?n.stroke=e:n.fill=e,this.markRedraw()}}function nD(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?ib(e.slice(8),new Ol(t,n,r,i),o?`center`:`cover`):e.indexOf(`path://`)===0?rb(e.slice(7),{},new Ol(t,n,r,i),o?`center`:`cover`):new Ine({shape:{symbolType:e,x:t,y:n,width:r,height:i}});return c.__isEmptyBrush=s,c.setColor=Lne,a&&c.setColor(a),c}function rD(e){return B(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function iD(e,t){if(e!=null)return B(e)||(e=[e,e]),[X(e[0],t[0])||0,X(W(e[1],e[0]),t[1])||0]}function aD(e){return isFinite(e)}function Rne(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=aD(r)?r:0,i=aD(i)?i:1,a=aD(a)?a:0,o=aD(o)?o:0,e.createLinearGradient(r,a,i,o)}function zne(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=aD(o)?o:.5,s=aD(s)?s:.5,c=c>=0&&aD(c)?c:.5,e.createRadialGradient(o,s,0,o,s,c)}function oD(e,t,n){for(var r=t.type===`radial`?zne(e,t,n):Rne(e,t,n),i=t.colorStops,a=0;a<i.length;a++)r.addColorStop(i[a].offset,i[a].color);return r}function Bne(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 sD(e){return parseInt(e,10)}function cD(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]||sD(s[r])||sD(e.style[r]))-(sD(s[a])||0)-(sD(s[o])||0)|0}function Vne(e,t){return!e||e===`solid`||!(t>0)?null:e===`dashed`?[4*t,2*t]:e===`dotted`?[t]:Bs(e)?[e]:B(e)?e:null}function lD(e){var t=e.style,n=t.lineDash&&t.lineWidth>0&&Vne(t.lineDash,t.lineWidth),r=t.lineDashOffset;if(n){var i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(n=R(n,function(e){return e/i}),r/=i)}return[n,r]}var uD=new hg(!0);function dD(e){var t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))}function fD(e){return typeof e==`string`&&e!==`none`}function pD(e){var t=e.fill;return t!=null&&t!==`none`}function mD(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 hD(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 gD(e,t,n){var r=nh(t.image,t.__image,n);if(ih(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)*oc),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function _D(e,t,n,r){var i,a=dD(n),o=pD(n),s=n.strokePercent,c=s<1,l=!t.path;(!t.silent||c)&&l&&t.createPathProxy();var u=t.path||uD,d=t.__dirty;if(!r){var f=n.fill,p=n.stroke,m=o&&!!f.colorStops,h=a&&!!p.colorStops,g=o&&!!f.image,_=a&&!!p.image,v=void 0,y=void 0,b=void 0,x=void 0,S=void 0;(m||h)&&(S=t.getBoundingRect()),m&&(v=d?oD(e,f,S):t.__canvasFillGradient,t.__canvasFillGradient=v),h&&(y=d?oD(e,p,S):t.__canvasStrokeGradient,t.__canvasStrokeGradient=y),g&&(b=d||!t.__canvasFillPattern?gD(e,f,t):t.__canvasFillPattern,t.__canvasFillPattern=b),_&&(x=d||!t.__canvasStrokePattern?gD(e,p,t):t.__canvasStrokePattern,t.__canvasStrokePattern=x),m?e.fillStyle=v:g&&(b?e.fillStyle=b:o=!1),h?e.strokeStyle=y:_&&(x?e.strokeStyle=x:a=!1)}var C=t.getGlobalScale();u.setScale(C[0],C[1],t.segmentIgnoreThreshold);var w,T;e.setLineDash&&n.lineDash&&(i=lD(t),w=i[0],T=i[1]);var E=!0;(l||d&4)&&(u.setDPR(e.dpr),c?u.setContext(null):(u.setContext(e),E=!1),u.reset(),t.buildPath(u,t.shape,r),u.toStatic(),t.pathUpdated()),E&&u.rebuildPath(e,c?s:1),w&&(e.setLineDash(w),e.lineDashOffset=T),r||(n.strokeFirst?(a&&hD(e,n),o&&mD(e,n)):(o&&mD(e,n),a&&hD(e,n))),w&&e.setLineDash([])}function vD(e,t,n){var r=t.__image=nh(n.image,t.__image,t,t.onload);if(!(!r||!ih(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 yD(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=lD(t),a=r[0],o=r[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),n.strokeFirst?(dD(n)&&e.strokeText(i,n.x,n.y),pD(n)&&e.fillText(i,n.x,n.y)):(pD(n)&&e.fillText(i,n.x,n.y),dD(n)&&e.strokeText(i,n.x,n.y)),a&&e.setLineDash([])}}var bD=[`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],xD=[[`lineCap`,`butt`],[`lineJoin`,`miter`],[`miterLimit`,10]];function SD(e,t,n,r,i){var a=!1;if(!r&&(n||={},t===n))return!1;if(r||t.opacity!==n.opacity){ND(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?Oh.opacity:o}(r||t.blend!==n.blend)&&(a||=(ND(e,i),!0),e.globalCompositeOperation=t.blend||Oh.blend);for(var s=0;s<bD.length;s++){var c=bD[s];(r||t[c]!==n[c])&&(a||=(ND(e,i),!0),e[c]=e.dpr*(t[c]||0))}return(r||t.shadowColor!==n.shadowColor)&&(a||=(ND(e,i),!0),e.shadowColor=t.shadowColor||Oh.shadowColor),a}function CD(e,t,n,r,i){var a=PD(t,i.inHover),o=r?null:n&&PD(n,i.inHover)||{};if(a===o)return!1;var s=SD(e,a,o,r,i);if((r||a.fill!==o.fill)&&(s||=(ND(e,i),!0),fD(a.fill)&&(e.fillStyle=a.fill)),(r||a.stroke!==o.stroke)&&(s||=(ND(e,i),!0),fD(a.stroke)&&(e.strokeStyle=a.stroke)),(r||a.opacity!==o.opacity)&&(s||=(ND(e,i),!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||=(ND(e,i),!0),e.lineWidth=c)}for(var l=0;l<xD.length;l++){var u=xD[l],d=u[0];(r||a[d]!==o[d])&&(s||=(ND(e,i),!0),e[d]=a[d]||u[1])}return s}function wD(e,t,n,r,i){return SD(e,PD(t,i.inHover),n&&PD(n,i.inHover),r,i)}function TD(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 ED(e,t,n){for(var r=!1,i=0;i<e.length;i++){var a=e[i];r||=a.isZeroArea(),TD(t,a),t.beginPath(),a.buildPath(t,a.shape),t.clip()}n.allClipped=r}function DD(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 OD=1,kD=2,AD=3,jD=4;function MD(e){var t=pD(e),n=dD(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 ND(e,t){t.batchFill&&e.fill(),t.batchStroke&&e.stroke(),t.batchFill=``,t.batchStroke=``}function PD(e,t){return t&&e.__hoverStyle||e.style}function FD(e,t){ID(e,t,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function ID(e,t,n,r){var i=t.transform;if(!t.shouldBePainted(n.viewWidth,n.viewHeight,!1,!1)){t.__dirty&=-2,t.__isRendered=!1;return}var a=t.__clipPaths,o=n.prevElClipPaths,s=!1,c=!1;if((!o||Bne(a,o))&&(o&&o.length&&(ND(e,n),e.restore(),c=s=!0,n.prevElClipPaths=null,n.allClipped=!1,n.prevEl=null),a&&a.length&&(ND(e,n),e.save(),ED(a,e,n),s=!0),n.prevElClipPaths=a),n.allClipped){t.__isRendered=!1;return}t.beforeBrush&&t.beforeBrush(),t.innerBeforeBrush();var l=n.prevEl;l||(c=s=!0);var u=t instanceof Bg&&t.autoBatch&&MD(t.style);s||DD(i,l.transform)?(ND(e,n),TD(e,t)):u||ND(e,n);var d=PD(t,n.inHover);t instanceof Bg?(n.lastDrawType!==OD&&(c=!0,n.lastDrawType=OD),CD(e,t,l,c,n),(!u||!n.batchFill&&!n.batchStroke)&&e.beginPath(),_D(e,t,d,u),u&&(n.batchFill=d.fill||``,n.batchStroke=d.stroke||``)):t instanceof Hg?(n.lastDrawType!==AD&&(c=!0,n.lastDrawType=AD),CD(e,t,l,c,n),yD(e,t,d)):t instanceof Kg?(n.lastDrawType!==kD&&(c=!0,n.lastDrawType=kD),wD(e,t,l,c,n),vD(e,t,d)):t.getTemporalDisplayables&&(n.lastDrawType!==jD&&(c=!0,n.lastDrawType=jD),LD(e,t,n)),u&&r&&ND(e,n),t.innerAfterBrush(),t.afterBrush&&t.afterBrush(),n.prevEl=t,t.__dirty=0,t.__isRendered=!0}function LD(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},o,s;for(o=t.getCursor(),s=r.length;o<s;o++){var c=r[o];c.beforeBrush&&c.beforeBrush(),c.innerBeforeBrush(),ID(e,c,a,o===s-1),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),a.prevEl=c}for(var l=0,u=i.length;l<u;l++){var c=i[l];c.beforeBrush&&c.beforeBrush(),c.innerBeforeBrush(),ID(e,c,a,l===u-1),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),a.prevEl=c}t.clearTemporalDisplayables(),t.notClear=!0,e.restore()}var RD=new Mne,zD=new Nu(100),BD=[`symbol`,`symbolSize`,`symbolKeepAspect`,`color`,`backgroundColor`,`dashArrayX`,`dashArrayY`,`maxTileWidth`,`maxTileHeight`];function VD(e,t){if(e===`none`)return null;var n=t.getDevicePixelRatio(),r=t.getZr(),i=r.painter.type===`svg`;e.dirty&&RD.delete(e);var a=RD.get(e);if(a)return a;var o=I(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 c(s),s.rotation=o.rotation,s.scaleX=s.scaleY=i?1:1/n,RD.set(e,s),e.dirty=!1,s;function c(e){for(var t=[n],a=!0,s=0;s<BD.length;++s){var c=o[BD[s]];if(c!=null&&!B(c)&&!H(c)&&!Bs(c)&&typeof c!=`boolean`){a=!1;break}t.push(c)}var l;if(a){l=t.join(`,`)+(i?`-svg`:``);var u=zD.get(l);u&&(i?e.svgElement=u:e.image=u)}var d=UD(o.dashArrayX),f=WD(o.dashArrayY),p=HD(o.symbol),m=GD(d),h=KD(f),g=!i&&vs.createCanvas(),_=i&&{tag:`g`,attrs:{},key:`dcl`,children:[]},v=b(),y;g&&(g.width=v.width*n,g.height=v.height*n,y=g.getContext(`2d`)),x(),a&&zD.put(l,g||_),e.image=g,e.svgElement=_,e.svgWidth=v.width,e.svgHeight=v.height;function b(){for(var e=1,t=0,n=m.length;t<n;++t)e=Bp(e,m[t]);for(var r=1,t=0,n=p.length;t<n;++t)r=Bp(r,p[t].length);e*=r;var i=h*m.length*p.length;if(process.env.NODE_ENV!==`production`){var a=function(e){console.warn(`Calculated decal size is greater than `+e+` due to decal option settings so `+e+` is used for the decal size. Please consider changing the decal option to make a smaller decal or set `+e+` to be larger to avoid incontinuity.`)};e>o.maxTileWidth&&a(`maxTileWidth`),i>o.maxTileHeight&&a(`maxTileHeight`)}return{width:Math.max(1,Math.min(e,o.maxTileWidth)),height:Math.max(1,Math.min(i,o.maxTileHeight))}}function x(){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;k(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 k(e,t,a,s,c){var l=i?1:n,u=nD(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 FD(y,u)}}}}function HD(e){if(!e||e.length===0)return[[`rect`]];if(H(e))return[[e]];for(var t=!0,n=0;n<e.length;++n)if(!H(e[n])){t=!1;break}if(t)return HD([e]);for(var r=[],n=0;n<e.length;++n)H(e[n])?r.push([e[n]]):r.push(e[n]);return r}function UD(e){if(!e||e.length===0)return[[0,0]];if(Bs(e)){var t=Math.ceil(e);return[[t,t]]}for(var n=!0,r=0;r<e.length;++r)if(!Bs(e[r])){n=!1;break}if(n)return UD([e]);for(var i=[],r=0;r<e.length;++r)if(Bs(e[r])){var t=Math.ceil(e[r]);i.push([t,t])}else{var t=R(e[r],function(e){return Math.ceil(e)});t.length%2==1?i.push(t.concat(t)):i.push(t)}return i}function WD(e){if(!e||typeof e==`object`&&e.length===0)return[0,0];if(Bs(e)){var t=Math.ceil(e);return[t,t]}var n=R(e,function(e){return Math.ceil(e)});return e.length%2?n.concat(n):n}function GD(e){return R(e,function(e){return KD(e)})}function KD(e){for(var t=0,n=0;n<e.length;++n)t+=e[n];return e.length%2==1?t*2:t}function qD(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=VD(n,t)}});var i=r.getVisual(`decal`);if(i){var a=r.getVisual(`style`);a.decal=VD(i,t)}}})}var JD=new Ac,YD={};function XD(e,t){process.env.NODE_ENV!==`production`&&YD[e]&&Gp(`Already has an implementation of `+e+`.`),YD[e]=t}function ZD(e){return process.env.NODE_ENV!==`production`&&(YD[e]||Gp(`Implementation of `+e+` doesn't exists.`)),YD[e]}var QD={};function $D(e,t){QD[e]=t}function eO(e){return QD[e]}var tO=1,nO=800,rO=900,iO=1e3,aO=2e3,oO=5e3,sO=1e3,cO=1100,lO=2e3,uO=3e3,dO=4e3,fO=4500,pO=4600,mO=5e3,hO=6e3,gO=7e3,_O={PROCESSOR:{FILTER:iO,SERIES_FILTER:nO,STATISTIC:oO},VISUAL:{LAYOUT:sO,PROGRESSIVE_LAYOUT:cO,GLOBAL:lO,CHART:uO,POST_CHART_LAYOUT:pO,COMPONENT:dO,BRUSH:mO,CHART_ITEM:fO,ARIA:hO,DECAL:gO}},vO=`__flagInMainProcess`,yO=`__mainProcessVersion`,bO=`__pendingUpdate`,xO=`__needsUpdateStatus`,SO=/^[a-zA-Z0-9_]+$/,CO=`__connectUpdateStatus`,wO=0,TO=1,EO=2;function DO(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(this.isDisposed()){ek(this.id);return}return kO(this,e,t)}}function OO(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return kO(this,e,t)}}function kO(e,t,n){return n[0]=n[0]&&n[0].toLowerCase(),Ac.prototype[t].apply(e,n)}var AO=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Ac),jO=AO.prototype;jO.on=OO(`on`),jO.off=OO(`off`);var MO,NO,PO,FO,IO,LO,RO,zO,BO,VO,HO,UO,WO,GO,KO,qO,JO,YO,XO,ZO=function(e){N(t,e);function t(t,n,r){var i=e.call(this,new Ene)||this;i._chartsViews=[],i._chartsMap={},i._componentsViews=[],i._componentsMap={},i._pendingActions=[],r||={},i._dom=t;var a=`canvas`,o=`auto`,s=!1;if(i[yO]=1,process.env.NODE_ENV!==`production`){var c=fs.hasGlobalWindow?window:global;c&&(a=W(c.__ECHARTS__DEFAULT__RENDERER__,a),o=W(c.__ECHARTS__DEFAULT__COARSE_POINTER,o),s=W(c.__ECHARTS__DEFAULT__USE_DIRTY_RECT__,s))}r.ssr&&gp(function(e){var t=y_(e),n=t.dataIndex;if(n!=null){var r=K();return r.set(`series_index`,t.seriesIndex),r.set(`data_index`,n),t.ssrType&&r.set(`ssr_type`,t.ssrType),r}});var l=i._zr=fp(t,{renderer:r.renderer||a,devicePixelRatio:r.devicePixelRatio,width:r.width,height:r.height,ssr:r.ssr,useDirtyRect:W(r.useDirtyRect,s),useCoarsePointer:W(r.useCoarsePointer,o),pointerSize:r.pointerSize});i._ssr=r.ssr,i._throttledZrFlush=OE(z(l.flush,l),17),i._updateTheme(n),i._locale=hx(r.locale||px),i._coordSysMgr=new gS;var u=i._api=KO(i);function d(e,t){return e.__prio-t.__prio}return $l(ok,d),$l(ik,d),i._scheduler=new RE(i,u,ik,ok),i._messageCenter=new AO,i._initEvents(),i.resize=z(i.resize,i),l.animation.on(`frame`,i._onframe,i),VO(l,i),HO(l,i),$s(i),i}return t.prototype._onframe=function(){if(!this._disposed){YO(this);var e=this._scheduler;if(this[bO]){var t=this[bO].silent;this[vO]=!0,XO(this);try{MO(this),FO.update.call(this,null,this[bO].updateParams)}catch(e){throw this[vO]=!1,this[bO]=null,e}this._zr.flush(),this[vO]=!1,this[bO]=null,zO.call(this,t),BO.call(this,t)}else if(e.unfinished){var n=tO,r=this._model,i=this._api;e.unfinished=!1;do{var a=+new Date;e.performSeriesTasks(r),e.performDataProcessorTasks(r),LO(this,r),e.performVisualTasks(r),GO(this,this._model,i,`remain`,{}),n-=+new Date-a}while(n>0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,t,n){if(this[vO]){process.env.NODE_ENV!==`production`&&Gp("`setOption` should not be called during main process.");return}if(this._disposed){ek(this.id);return}var r,i,a;if(U(t)&&(n=t.lazyUpdate,r=t.silent,i=t.replaceMerge,a=t.transition,t=t.notMerge),this[vO]=!0,XO(this),!this._model||t){var o=new zC(this._api),s=this._theme,c=this._model=new AC;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,s,this._locale,o)}this._model.setOption(e,{replaceMerge:i},ak);var l={seriesTransition:a,optionChanged:!0};if(n)this[bO]={silent:r,updateParams:l},this[vO]=!1,this.getZr().wakeUp();else{try{MO(this),FO.update.call(this,null,l)}catch(e){throw this[bO]=null,this[vO]=!1,e}this._ssr||this._zr.flush(),this[bO]=null,this[vO]=!1,zO.call(this,r),BO.call(this,r)}},t.prototype.setTheme=function(e,t){if(this[vO]){process.env.NODE_ENV!==`production`&&Gp("`setTheme` should not be called during main process.");return}if(this._disposed){ek(this.id);return}var n=this._model;if(n){var r=t&&t.silent,i=null;this[bO]&&(r??=this[bO].silent,i=this[bO].updateParams,this[bO]=null),this[vO]=!0,XO(this);try{this._updateTheme(e),n.setTheme(this._theme),MO(this),FO.update.call(this,{type:`setTheme`},i)}catch(e){throw this[vO]=!1,e}this[vO]=!1,zO.call(this,r),BO.call(this,r)}},t.prototype._updateTheme=function(e){H(e)&&(e=sk[e]),e&&(e=P(e),e&&pw(e,!0),this._theme=e)},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||fs.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return process.env.NODE_ENV!==`production`&&qp(`getRenderedCanvas`,`renderToCanvas`),this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){e||={};var t=this._zr.painter;if(process.env.NODE_ENV!==`production`&&t.type!==`canvas`)throw Error(`renderToCanvas can only be used in the canvas renderer.`);return t.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get(`backgroundColor`),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){e||={};var t=this._zr.painter;if(process.env.NODE_ENV!==`production`&&t.type!==`svg`)throw Error(`renderToSVGString can only be used in the svg renderer.`);return t.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){var e=this._zr;return L(e.storage.getDisplayList(),function(e){e.stopAnimation(null,!0)}),e.painter.toDataURL()},t.prototype.getDataURL=function(e){if(this._disposed){ek(this.id);return}e||={};var t=e.excludeComponents,n=this._model,r=[],i=this;L(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 L(r,function(e){e.group.ignore=!1}),a},t.prototype.getConnectedDataURL=function(e){if(this._disposed){ek(this.id);return}var t=e.type===`svg`,n=this.group,r=Math.min,i=Math.max,a=1/0;if(uk[n]){var o=a,s=a,c=-a,l=-a,u=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();L(lk,function(a,d){if(a.group===n){var f=t?a.getZr().painter.getSvgDom().innerHTML:a.renderToCanvas(P(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=vs.createCanvas(),h=fp(m,{renderer:t?`svg`:`canvas`});if(h.resize({width:f,height:p}),t){var g=``;return L(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 e_({shape:{x:0,y:0,width:f,height:p},style:{fill:e.connectedBackgroundColor}})),L(u,function(e){var t=new Kg({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)},t.prototype.convertToPixel=function(e,t,n){return IO(this,`convertToPixel`,e,t,n)},t.prototype.convertToLayout=function(e,t,n){return IO(this,`convertToLayout`,e,t,n)},t.prototype.convertFromPixel=function(e,t,n){return IO(this,`convertFromPixel`,e,t,n)},t.prototype.containPixel=function(e,t){if(this._disposed){ek(this.id);return}var n=this._model,r;return L(Tm(n,e),function(e,n){n.indexOf(`Models`)>=0&&L(e,function(e){var i=e.coordinateSystem;if(i&&i.containPoint)r||=!!i.containPoint(t);else if(n===`seriesModels`){var a=this._chartsMap[e.__viewId];a&&a.containPoint?r||=a.containPoint(t,e):process.env.NODE_ENV!==`production`&&Wp(n+`: `+(a?`The found component do not support containPoint.`:`No view mapping to the found component.`))}else process.env.NODE_ENV!==`production`&&Wp(n+`: containPoint is not supported`)},this)},this),!!r},t.prototype.getVisual=function(e,t){var n=this._model,r=Tm(n,e,{defaultMainType:`series`}),i=r.seriesModel;process.env.NODE_ENV!==`production`&&(i||Wp(`There is no specified series model`));var a=i.getData(),o=r.hasOwnProperty(`dataIndexInside`)?r.dataIndexInside:r.hasOwnProperty(`dataIndex`)?a.indexOfRawIndex(r.dataIndex):null;return o==null?XE(a,t):YE(a,o,t)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;L($O,function(t){var n=function(n){var r=e.getModel(),i=n.target,a,o=t===`globalout`;if(o?a={}:i&&eD(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=F({},t.eventData),!0},!0),a){var s=a.componentType,c=a.componentIndex;(s===`markLine`||s===`markPoint`||s===`markArea`)&&(s=`series`,c=a.seriesIndex);var l=s&&c!=null&&r.getComponent(s,c),u=l&&e[l.mainType===`series`?`_chartsMap`:`_componentsMap`][l.__viewId];process.env.NODE_ENV!==`production`&&!o&&!(l&&u)&&Wp(`model or view can not be found by params`),a.event=n,a.type=t,e._$eventProcessor.eventInfo={targetEl:i,packedEvent:a,model:l,view:u},e.trigger(t,a)}};n.zrEventfulCallAtLast=!0,e._zr.on(t,n,e)});var t=this._messageCenter;L(rk,function(n,r){t.on(r,function(t){e.trigger(r,t)})}),kne(t,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){ek(this.id);return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){ek(this.id);return}this._disposed=!0,this.getDom()&&Am(this.getDom(),fk,``);var e=this,t=e._api,n=e._model;L(e._componentsViews,function(e){e.dispose(n,t)}),L(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 lk[e.id]},t.prototype.resize=function(e){if(this[vO]){process.env.NODE_ENV!==`production`&&Gp("`resize` should not be called during main process.");return}if(this._disposed){ek(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[bO]&&(r??=this[bO].silent,n=!0,this[bO]=null),this[vO]=!0,XO(this);try{n&&MO(this),FO.update.call(this,{type:`resize`,animation:F({duration:0},e&&e.animation)})}catch(e){throw this[vO]=!1,e}this[vO]=!1,zO.call(this,r),BO.call(this,r)}},t.prototype.showLoading=function(e,t){if(this._disposed){ek(this.id);return}if(U(e)&&(t=e,e=``),e||=`default`,this.hideLoading(),!ck[e]){process.env.NODE_ENV!==`production`&&Wp(`Loading effects `+e+` not exists.`);return}var n=ck[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)},t.prototype.hideLoading=function(){if(this._disposed){ek(this.id);return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var t=F({},e);return t.type=nk[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed){ek(this.id);return}if(U(t)||(t={silent:!!t}),tk[e.type]&&this._model){if(this[vO]){this._pendingActions.push(e);return}var n=t.silent;RO.call(this,e,n);var r=t.flush;r?this._zr.flush():r!==!1&&fs.browser.weChat&&this._throttledZrFlush(),zO.call(this,n),BO.call(this,n)}},t.prototype.updateLabelLayout=function(){JD.trigger(`series:layoutlabels`,this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){ek(this.id);return}var t=e.seriesIndex,n=this.getModel().getSeriesByIndex(t);process.env.NODE_ENV!==`production`&&G(e.data&&n),n.appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){MO=function(e){var t=e._scheduler;t.restorePipelines(e._model),t.prepareStageTasks(),NO(e,!0),NO(e,!1),t.plan()},NO=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`&&l(t)}):n.eachSeries(l);function l(e){var c=e.__requireNewView;e.__requireNewView=!1;var l=`_ec_`+e.id+`_`+e.type,u=!c&&a[l];if(!u){var d=Bm(e.type),f=t?hE.getClass(d.main,d.sub):yE.getClass(d.sub);process.env.NODE_ENV!==`production`&&G(f,d.sub+` does not exist.`),u=new f,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 u=i[c];u.__alive?c++:(!t&&u.renderTask.dispose(),o.remove(u.group),u.dispose(n,s),i.splice(c,1),a[u.__id]===u&&delete a[u.__id],u.__id=u.group.__ecComponentInfo=null)}},PO=function(e,t,n,r,i){var a=e._model;if(a.setUpdatePayload(n),!r){L([].concat(e._componentsViews,e._chartsViews),u);return}var o={};o[r+`Id`]=n[r+`Id`],o[r+`Index`]=n[r+`Index`],o[r+`Name`]=n[r+`Name`];var s={mainType:r,query:o};i&&(s.subType=i);var c=n.excludeSeriesId,l;c!=null&&(l=K(),L($p(c),function(e){var t=pm(e,null);t!=null&&l.set(t,!0)})),a&&a.eachComponent(s,function(t){if(!(l&&l.get(t.id)!=null))if(Dv(n))if(t instanceof oE)n.type===`highlight`&&!n.notBlur&&!t.get([`emphasis`,`disabled`])&&cv(t,n,e._api);else{var r=lv(t.mainType,t.componentIndex,n.name,e._api),i=r.focusSelf,a=r.dispatchers;n.type===`highlight`&&i&&!n.notBlur&&sv(t.mainType,t.componentIndex,e._api),a&&L(a,function(e){n.type===`highlight`?Q_(e):$_(e)})}else Ev(n)&&t instanceof oE&&(fv(t,n,e._api),pv(t),JO(e))},e),a&&a.eachComponent(s,function(t){l&&l.get(t.id)!=null||u(e[r===`series`?`_chartsMap`:`_componentsMap`][t.__viewId])},e);function u(r){r&&r.__alive&&r[t]&&r[t](r.__model,a,e._api,n)}},FO={prepareAndUpdate:function(e){MO(this),FO.update.call(this,e,e&&{optionChanged:e.newOption!=null})},update:function(e,n){var r=this._model,i=this._api,a=this._zr,o=this._coordSysMgr,s=this._scheduler;if(r){r.setUpdatePayload(e),s.restoreData(r,e),s.performSeriesTasks(r),o.create(r,i),s.performDataProcessorTasks(r,e),LO(this,r),o.update(r,i),t(r),s.performVisualTasks(r,e);var c=r.get(`backgroundColor`)||`transparent`;a.setBackgroundColor(c);var l=r.get(`darkMode`);l!=null&&l!==`auto`&&a.setDarkMode(l),UO(this,r,i,e,n),JD.trigger(`afterupdate`,r,i)}},updateTransform:function(e){var n=this,r=this._model,i=this._api;if(r){r.setUpdatePayload(e);var a=[];r.eachComponent(function(t,o){if(t!==`series`){var s=n.getViewOfComponentModel(o);if(s&&s.__alive)if(s.updateTransform){var c=s.updateTransform(o,r,i,e);c&&c.update&&a.push(s)}else a.push(s)}});var o=K();r.eachSeries(function(t){var a=n._chartsMap[t.__viewId];if(a.updateTransform){var s=a.updateTransform(t,r,i,e);s&&s.update&&o.set(t.uid,1)}else o.set(t.uid,1)}),t(r),this._scheduler.performVisualTasks(r,e,{setDirty:!0,dirtyMap:o}),GO(this,r,i,e,{},o),JD.trigger(`afterupdate`,r,i)}},updateView:function(e){var n=this._model;n&&(n.setUpdatePayload(e),yE.markUpdateMethod(e,`updateView`),t(n),this._scheduler.performVisualTasks(n,e,{setDirty:!0}),UO(this,n,this._api,e,{}),JD.trigger(`afterupdate`,n,this._api))},updateVisual:function(e){var n=this,r=this._model;r&&(r.setUpdatePayload(e),r.eachSeries(function(e){e.getData().clearAllVisual()}),yE.markUpdateMethod(e,`updateVisual`),t(r),this._scheduler.performVisualTasks(r,e,{visualType:`visual`,setDirty:!0}),r.eachComponent(function(t,i){if(t!==`series`){var a=n.getViewOfComponentModel(i);a&&a.__alive&&a.updateVisual(i,r,n._api,e)}}),r.eachSeries(function(t){n._chartsMap[t.__viewId].updateVisual(t,r,n._api,e)}),JD.trigger(`afterupdate`,r,this._api))},updateLayout:function(e){FO.update.call(this,e)}};function e(e,t,n,r,i){if(e._disposed){ek(e.id);return}for(var a=e._model,o=e._coordSysMgr.getCoordinateSystems(),s,c=Tm(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}process.env.NODE_ENV!==`production`&&Wp(`No coordinate system that supports `+t+` found by the given finder.`)}IO=e,LO=function(e,t){var n=e._chartsMap,r=e._scheduler;t.eachSeries(function(e){r.updateStreamModes(e,n[e.__viewId])})},RO=function(e,t){var n=this,r=this.getModel(),i=e.type,a=e.escapeConnect,o=tk[i],s=(o.update||`update`).split(`:`),c=s.pop(),l=s[0]!=null&&Bm(s[0]);this[vO]=!0,XO(this);var u=[e],d=!1;e.batch&&(d=!0,u=R(e.batch,function(t){return t=I(F({},t),e),t.batch=null,t}));var f=[],p,m=[],h=o.nonRefinedEventType,g=Ev(e),_=Dv(e);if(_&&av(this._api),L(u,function(t){var i=o.action(t,r,n._api);if(o.refineEvent?m.push(i):p=i,p||=F({},t),p.type=h,f.push(p),_){var a=Em(e),s=a.queryOptionMap,u=a.mainTypeSpecified?s.keys()[0]:`series`;PO(n,c,t,u),JO(n)}else g?(PO(n,c,t,`series`),JO(n)):l&&PO(n,c,t,l.main,l.sub)}),c!==`none`&&!_&&!g&&!l)try{this[bO]?(MO(this),FO.update.call(this,e),this[bO]=null):FO[c].call(this,e)}catch(e){throw this[vO]=!1,e}if(p=d?{type:h,escapeConnect:a,batch:f}:f[0],this[vO]=!1,!t){var v=void 0;if(o.refineEvent){var y=o.refineEvent(m,e,r,this._api).eventContent;G(U(y)),v=I({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)}},zO=function(e){for(var t=this._pendingActions;t.length;){var n=t.shift();RO.call(this,n,e)}},BO=function(e){!e&&this.trigger(`updated`)},VO=function(e,t){e.on(`rendered`,function(n){t.trigger(`rendered`,n),e.animation.isFinished()&&!t[bO]&&!t._scheduler.unfinished&&!t._pendingActions.length&&t.trigger(`finished`)})},HO=function(e,t){e.on(`mouseover`,function(e){var n=e.target,r=eD(n,Cv);r&&(uv(r,e,t._api),JO(t))}).on(`mouseout`,function(e){var n=e.target,r=eD(n,Cv);r&&(dv(r,e,t._api),JO(t))}).on(`click`,function(e){var n=e.target,r=eD(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 t(e){e.clearColorPalette(),e.eachSeries(function(e){e.clearColorPalette()})}function n(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||=!!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;$l(i,function(e,t){return e.zlevel===t.zlevel?e.z-t.z:e.zlevel-t.zlevel}),L(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++,``),a=r,n.setZLevel(r)})}}UO=function(e,t,r,i,a){n(t),WO(e,t,r,i,a),L(e._chartsViews,function(e){e.__alive=!1}),GO(e,t,r,i,a),L(e._chartsViews,function(e){e.__alive||e.remove(t,r)})},WO=function(e,t,n,r,i,a){L(a||e._componentsViews,function(e){var i=e.__model;s(i,e),e.render(i,t,n,r),o(i,e),c(i,e)})},GO=function(e,t,n,r,l,u){var d=e._scheduler;l=F(l||{},{updatedSeries:t.getSeries()}),JD.trigger(`series:beforeupdate`,t,n,l);var f=!1;t.eachSeries(function(t){var n=e._chartsMap[t.__viewId];n.__alive=!0;var i=n.renderTask;d.updatePayload(i,r),s(t,n),u&&u.get(t.uid)&&i.dirty(),i.perform(d.getPerformArgs(i))&&(f=!0),n.group.silent=!!t.get(`silent`),a(t,n),pv(t)}),d.unfinished=f||d.unfinished,JD.trigger(`series:layoutlabels`,t,n,l),JD.trigger(`series:transition`,t,n,l),t.eachSeries(function(t){var n=e._chartsMap[t.__viewId];o(t,n),c(t,n)}),i(e,t),JD.trigger(`series:afterupdate`,t,n,l)},JO=function(e){e[xO]=!0,e.getZr().wakeUp()},XO=function(e){e[yO]=(e[yO]+1)%1e3},YO=function(e){e[xO]&&(e.getZr().storage.traverse(function(e){Ky(e)||r(e)}),e[xO]=!1)};function r(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 i(e,t){var n=e._zr.storage,r=0;n.traverse(function(e){e.isGroup||r++}),r>t.get(`hoverLayerThreshold`)&&!fs.node&&!fs.worker&&t.eachSeries(function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered(function(e){e.states.emphasis&&(e.states.emphasis.hoverLayer=!0)})}})}function a(e,t){var n=e.get(`blendMode`)||null;t.eachRendered(function(e){e.isGroup||(e.style.blend=n)})}function o(e,t){if(!e.preventAutoZ){var n=Ab(e);t.eachRendered(function(e){return Mb(e,n.z,n.zlevel),!0})}}function s(e,t){t.eachRendered(function(e){if(!Ky(e)){var t=e.getTextContent(),n=e.getTextGuideLine();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&&=null}})}function c(e,t){var n=e.getModel(`stateAnimation`),i=e.isAnimationEnabled(),a=n.get(`duration`),o=a>0?{duration:a,delay:n.get(`delay`),easing:n.get(`easing`)}:null;t.eachRendered(function(e){if(e.states&&e.states.emphasis){if(Ky(e))return;if(e instanceof Bg&&Ov(e),e.__dirty){var t=e.prevStates;t&&e.useStates(t)}if(i){e.stateTransition=o;var n=e.getTextContent(),a=e.getTextGuideLine();n&&(n.stateTransition=o),a&&(a.stateTransition=o)}e.__dirty&&r(e)}})}KO=function(e){return new(function(t){N(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(t){for(;t;){var n=t.__ecComponentInfo;if(n!=null)return e._model.getComponent(n.mainType,n.index);t=t.parent}},n.prototype.enterEmphasis=function(t,n){Q_(t,n),JO(e)},n.prototype.leaveEmphasis=function(t,n){$_(t,n),JO(e)},n.prototype.enterBlur=function(t){ev(t),JO(e)},n.prototype.leaveBlur=function(t){tv(t),JO(e)},n.prototype.enterSelect=function(t){nv(t),JO(e)},n.prototype.leaveSelect=function(t){rv(t),JO(e)},n.prototype.getModel=function(){return e.getModel()},n.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},n.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},n.prototype.getMainProcessVersion=function(){return e[yO]},n}(LC))(e)},qO=function(e){function t(e,t){for(var n=0;n<e.length;n++){var r=e[n];r[CO]=t}}L(nk,function(n,r){e._messageCenter.on(r,function(n){if(uk[e.group]&&e[CO]!==wO){if(n&&n.escapeConnect)return;var r=e.makeActionFromEvent(n),i=[];L(lk,function(t){t!==e&&t.group===e.group&&i.push(t)}),t(i,wO),L(i,function(e){e[CO]!==TO&&e.dispatchAction(r)}),t(i,EO)}})})}}(),t}(Ac),QO=ZO.prototype;QO.on=DO(`on`),QO.off=DO(`off`),QO.one=function(e,t,n){var r=this;Kp(`ECharts#one is deprecated.`);function i(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];t&&t.apply&&t.apply(this,n),r.off(e,i)}this.on.call(this,e,i,n)};var $O=[`click`,`dblclick`,`mouseover`,`mouseout`,`mousemove`,`mousedown`,`mouseup`,`globalout`,`contextmenu`];function ek(e){process.env.NODE_ENV!==`production`&&Wp(`Instance `+e+` has been disposed`)}var tk={},nk={},rk={},ik=[],ak=[],ok=[],sk={},ck={},lk={},uk={},dk=new Date-0;new Date-0;var fk=`_echarts_instance_`;function pk(e,t,n){var r=!(n&&n.ssr);if(r){if(process.env.NODE_ENV!==`production`&&!e)throw Error(`Initialize failed: invalid dom.`);var i=mk(e);if(i)return process.env.NODE_ENV!==`production`&&Wp(`There is a chart instance already initialized on the dom.`),i;process.env.NODE_ENV!==`production`&&Us(e)&&e.nodeName.toUpperCase()!==`CANVAS`&&(!e.clientWidth&&(!n||n.width==null)||!e.clientHeight&&(!n||n.height==null))&&Wp(`Can't get DOM width or height. Please check dom.clientWidth and dom.clientHeight. They should not be 0.For example, you may need to call this in the callback of window.onload.`)}var a=new ZO(e,t,n);return a.id=`ec_`+ dk++,lk[a.id]=a,r&&Am(e,fk,a.id),qO(a),JD.trigger(`afterinit`,a),a}function mk(e){return lk[jm(e,fk)]}function hk(e,t){sk[e]=t}function gk(e){js(ak,e)<0&&ak.push(e)}function _k(e,t){Ek(ik,e,t,aO)}function vk(e){bk(`afterinit`,e)}function yk(e){bk(`afterupdate`,e)}function bk(e,t){JD.on(e,t)}function xk(e,t,n){var r,i,a,o,s;V(t)&&(n=t,t=``),U(e)?(r=e.type,i=e.event,o=e.update,s=e.publishNonRefinedEvent,n||=e.action,a=e.refineEvent):(r=e,i=t);function c(e){return e.toLowerCase()}i=c(i||r);var l=a?c(r):i;tk[r]||(G(SO.test(r)&&SO.test(i)),a&&G(i!==r),tk[r]={actionType:r,refinedEventType:i,nonRefinedEventType:l,update:o,action:n,refineEvent:a},rk[i]=1,a&&s&&(rk[l]=1),process.env.NODE_ENV!==`production`&&nk[l]&&Gp(l+` must not be shared; use "refineEvent" if you intend to share an event name.`),nk[l]=r)}function Sk(e,t){gS.register(e,t)}function Ck(e,t){Ek(ok,e,t,sO,`layout`)}function wk(e,t){Ek(ok,e,t,uO,`visual`)}var Tk=[];function Ek(e,t,n,r,i){if((V(t)||U(t))&&(n=t,t=r),process.env.NODE_ENV!==`production`){if(isNaN(t)||t==null)throw Error(`Illegal priority`);L(e,function(e){G(e.__raw!==n)})}if(!(js(Tk,n)>=0)){Tk.push(n);var a=RE.wrapStageHandler(n,i);a.__prio=t,a.__raw=n,e.push(a)}}function Dk(e,t){ck[e]=t}function Ok(e,t,n){var r=ZD(`registerMap`);r&&r(e,t,n)}var kk=mT;wk(lO,fne),wk(fO,pne),wk(fO,mne),wk(lO,Dne),wk(fO,One),wk(gO,qD),gk(pw),_k(rO,mw),Dk(`default`,hne),xk({type:D_,event:D_,update:D_},ac),xk({type:O_,event:O_,update:O_},ac),xk({type:k_,event:M_,update:k_,action:ac,refineEvent:Ak,publishNonRefinedEvent:!0}),xk({type:A_,event:M_,update:A_,action:ac,refineEvent:Ak,publishNonRefinedEvent:!0}),xk({type:j_,event:M_,update:j_,action:ac,refineEvent:Ak,publishNonRefinedEvent:!0});function Ak(e,t,n,r){return{eventContent:{selected:mv(n),isFromClick:t.isFromClick||!1}}}hk(`default`,{}),hk(`dark`,KE);var jk=[],Mk={registerPreprocessor:gk,registerProcessor:_k,registerPostInit:vk,registerPostUpdate:yk,registerUpdateLifecycle:bk,registerAction:xk,registerCoordinateSystem:Sk,registerLayout:Ck,registerVisual:wk,registerTransform:kk,registerLoading:Dk,registerMap:Ok,registerImpl:XD,PRIORITY:_O,ComponentModel:GS,ComponentView:hE,SeriesModel:oE,ChartView:yE,registerComponentModel:function(e){GS.registerClass(e)},registerComponentView:function(e){hE.registerClass(e)},registerSeriesModel:function(e){oE.registerClass(e)},registerChartView:function(e){yE.registerClass(e)},registerCustomSeries:function(e,t){$D(e,t)},registerSubTypeDefaulter:function(e,t){GS.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){pp(e,t)}};function Nk(e){if(B(e)){L(e,function(e){Nk(e)});return}js(jk,e)>=0||(jk.push(e),V(e)&&(e={install:e}),e.install(Mk))}function Pk(e){return e==null?0:e.length||1}function Fk(e){return e}var Ik=function(){function e(e,t,n,r,i,a){this._old=e,this._new=t,this._oldKeyGetter=n||Fk,this._newKeyGetter=r||Fk,this.context=i,this._diffModeMultiple=a===`multiple`}return e.prototype.add=function(e){return this._add=e,this},e.prototype.update=function(e){return this._update=e,this},e.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},e.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},e.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},e.prototype.remove=function(e){return this._remove=e,this},e.prototype.execute=function(){this[this._diffModeMultiple?`_executeMultiple`:`_executeOneToOne`]()},e.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=Pk(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)},e.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=Pk(c),d=Pk(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)},e.prototype._performRestAdd=function(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=t[r],a=Pk(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}},e.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=Pk(s);c===0?(t[o]=a,i&&n.push(o)):c===1?t[o]=[s,a]:s.push(a)}}},e}(),Lk=function(){function e(e,t){this._encode=e,this._schema=t}return e.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},e.prototype._getFullDimensionNames=function(){return this._cachedDimNames||=this._schema?this._schema.makeOutputDimensionNames():[],this._cachedDimNames},e}();function Rk(e,t){var n={},r=n.encode={},i=K(),a=[],o=[],s={};L(e.dimensions,function(t){var n=e.getDimensionInfo(t),c=n.coordDim;if(c){process.env.NODE_ENV!==`production`&&G(tC.get(c)==null);var l=n.coordDimIndex;zk(r,c)[l]=t,n.isExtraCoord||(i.set(c,1),Vk(n.type)&&(a[0]=t),zk(s,c)[l]=e.getDimensionIndex(n.name)),n.defaultTooltip&&o.push(t)}tC.each(function(e,t){var i=zk(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=R(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 Lk(s,t),n}function zk(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}function Bk(e){return e===`category`?`ordinal`:e===`time`?`time`:`float`}function Vk(e){return!(e===`ordinal`||e===`time`)}var Hk=function(){function e(e){this.otherDims={},e!=null&&F(this,e)}return e}(),Uk=Cm(),Wk={float:`f`,int:`i`,ordinal:`o`,number:`n`,time:`t`},Gk=function(){function e(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return e.prototype.isDimensionOmitted=function(){return this._dimOmitted},e.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||=Jk(this.source))},e.prototype.getSourceDimensionIndex=function(e){return W(this._dimNameMap.get(e),-1)},e.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},e.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=Ew(this.source),n=!Yk(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+=Wk[c]||`f`,l&&(r+=l.uid),r+=`$`}var f=this.source;return{dimensions:i,hash:[f.seriesLayoutBy,f.startIndex,r].join(`$$`)}},e.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},e.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},e}();function Kk(e){return e instanceof Gk}function qk(e){for(var t=K(),n=0;n<(e||[]).length;n++){var r=e[n],i=U(r)?r.name:r;i!=null&&t.get(i)==null&&t.set(i,n)}return t}function Jk(e){var t=Uk(e);return t.dimNameMap||=qk(e.dimensionsDefine)}function Yk(e){return e>30}var Xk=U,Zk=R,Qk=typeof Int32Array>`u`?Array:Int32Array,$k=`e\0\0`,eA=-1,tA=[`hasItemOption`,`_nameList`,`_idList`,`_invertedIndicesMap`,`_dimSummary`,`userOutput`,`_rawData`,`_dimValueGetter`,`_nameDimIdx`,`_idDimIdx`,`_nameRepeatCount`],nA=[`_approximateExtent`],rA,iA,aA,oA,sA,cA,lA,uA=function(){function e(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;Kk(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(r=!0,n=e),n||=[`x`,`y`];for(var i={},a=[],o={},s=!1,c={},l=0;l<n.length;l++){var u=n[l],d=H(u)?new Hk({name:u}):u instanceof Hk?u:new Hk(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]=[]);var m=l;Bs(d.storeDimIndex)&&(m=d.storeDimIndex),p.itemName===0&&(this._nameDimIdx=m),p.itemId===0&&(this._idDimIdx=m),process.env.NODE_ENV!==`production`&&G(r||d.storeDimIndex>=0),r&&(d.storeDimIndex=l)}if(this.dimensions=a,this._dimInfos=i,this._initGetDimensionInfo(s),this.hostModel=t,this._invertedIndicesMap=o,this._dimOmitted){var h=this._dimIdxToName=K();L(a,function(e){h.set(i[e].storeDimIndex,e)})}}return e.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},e.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},e.prototype._recognizeDimIndex=function(e){if(Bs(e)||e!=null&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},e.prototype._getStoreDimIndex=function(e){var t=this.getDimensionIndex(e);if(process.env.NODE_ENV!==`production`&&t==null)throw Error(`Unknown dimension `+e);return t},e.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},e.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]}},e.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},e.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},e.prototype.mapDimensionsAll=function(e){return(this._dimSummary.encode[e]||[]).slice()},e.prototype.getStore=function(){return this._store},e.prototype.initData=function(e,t,n){var r=this,i;if(e instanceof kT&&(i=e),!i){var a=this.dimensions,o=_w(e)||Ns(e)?new Nw(e,a.length):e;i=new kT;var s=Zk(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=Rk(this,this._schema),this.userOutput=this._dimSummary.userOutput},e.prototype.appendData=function(e){var t=this._store.appendData(e);this._doInit(t[0],t[1])},e.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&&lA(this,o)}},e.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)}},e.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return this._idDimIdx==null&&e.getSource().sourceFormat!==`typedArray`&&!e.fillStorage},e.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&&rm(s)&&(this.hasItemOption=!0),s){var c=s.name;r[o]==null&&c!=null&&(r[o]=pm(c,null));var l=s.id;i[o]==null&&l!=null&&(i[o]=pm(l,null))}}if(this._shouldMakeIdFromName())for(var o=e;o<t;o++)lA(this,o);rA(this)}},e.prototype.getApproximateExtent=function(e){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e))},e.prototype.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},e.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},e.prototype.setCalculationInfo=function(e,t){Xk(e)?F(this._calculationInfo,e):this._calculationInfo[e]=t},e.prototype.getName=function(e){var t=this.getRawIndex(e),n=this._nameList[t];return n==null&&this._nameDimIdx!=null&&(n=aA(this,this._nameDimIdx,t)),n??=``,n},e.prototype._getCategory=function(e,t){var n=this._store.get(e,t),r=this._store.getOrdinalMeta(e);return r?r.categories[n]:n},e.prototype.getId=function(e){return iA(this,this.getRawIndex(e))},e.prototype.count=function(){return this._store.count()},e.prototype.get=function(e,t){var n=this._store,r=this._dimInfos[e];if(r)return n.get(r.storeDimIndex,t)},e.prototype.getByRawIndex=function(e,t){var n=this._store,r=this._dimInfos[e];if(r)return n.getByRawIndex(r.storeDimIndex,t)},e.prototype.getIndices=function(){return this._store.getIndices()},e.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e))},e.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},e.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},e.prototype.getValues=function(e,t){var n=this,r=this._store;return B(e)?r.getValues(Zk(e,function(e){return n._getStoreDimIndex(e)}),t):r.getValues(e)},e.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},e.prototype.indexOfName=function(e){for(var t=0,n=this._store.count();t<n;t++)if(this.getName(t)===e)return t;return-1},e.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},e.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},e.prototype.rawIndexOf=function(e,t){var n=e&&this._invertedIndicesMap[e];if(process.env.NODE_ENV!==`production`&&!n)throw Error(`Do not supported yet`);var r=n&&n[t];return r==null||isNaN(r)?eA:r},e.prototype.each=function(e,t,n){"use strict";V(e)&&(n=t,t=e,e=[]);var r=n||this,i=Zk(oA(e),this._getStoreDimIndex,this);this._store.each(i,r?z(t,r):t)},e.prototype.filterSelf=function(e,t,n){"use strict";V(e)&&(n=t,t=e,e=[]);var r=n||this,i=Zk(oA(e),this._getStoreDimIndex,this);return this._store=this._store.filter(i,r?z(t,r):t),this},e.prototype.selectRange=function(e){"use strict";var t=this,n={},r=Ls(e),i=[];return L(r,function(r){var a=t._getStoreDimIndex(r);n[a]=e[r],i.push(a)}),this._store=this._store.selectRange(n),this},e.prototype.mapArray=function(e,t,n){"use strict";V(e)&&(n=t,t=e,e=[]),n||=this;var r=[];return this.each(e,function(){r.push(t&&t.apply(this,arguments))},n),r},e.prototype.map=function(e,t,n,r){"use strict";var i=n||r||this,a=Zk(oA(e),this._getStoreDimIndex,this),o=cA(this);return o._store=this._store.map(a,i?z(t,i):t),o},e.prototype.modify=function(e,t,n,r){var i=this,a=n||r||this;process.env.NODE_ENV!==`production`&&L(oA(e),function(e){i.getDimensionInfo(e).isCalculationCoord||console.error(`Danger: only stack dimension can be modified`)});var o=Zk(oA(e),this._getStoreDimIndex,this);this._store.modify(o,a?z(t,a):t)},e.prototype.downSample=function(e,t,n,r){var i=cA(this);return i._store=this._store.downSample(this._getStoreDimIndex(e),t,n,r),i},e.prototype.minmaxDownSample=function(e,t){var n=cA(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(e),t),n},e.prototype.lttbDownSample=function(e,t){var n=cA(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(e),t),n},e.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},e.prototype.getItemModel=function(e){var t=this.hostModel;return new ex(this.getRawDataItem(e),t,t&&t.ecModel)},e.prototype.diff=function(e){var t=this;return new Ik(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(t){return iA(e,t)},function(e){return iA(t,e)})},e.prototype.getVisual=function(e){var t=this._visual;return t&&t[e]},e.prototype.setVisual=function(e,t){this._visual=this._visual||{},Xk(e)?F(this._visual,e):this._visual[e]=t},e.prototype.getItemVisual=function(e,t){var n=this._itemVisuals[e];return(n&&n[t])??this.getVisual(t)},e.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,r=n[e];r||=n[e]={};var i=r[t];return i??(i=this.getVisual(t),B(i)?i=i.slice():Xk(i)&&(i=F({},i)),r[t]=i),i},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,Xk(t)?F(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){Xk(e)?F(this._layout,e):this._layout[e]=t},e.prototype.getLayout=function(e){return this._layout[e]},e.prototype.getItemLayout=function(e){return this._itemLayouts[e]},e.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?F(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){b_(this.hostModel&&this.hostModel.seriesIndex,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){L(this._graphicEls,function(n,r){n&&e&&e.call(t,n,r)})},e.prototype.cloneShallow=function(t){return t||=new e(this._schema?this._schema:Zk(this.dimensions,this._getDimInfo,this),this.hostModel),sA(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];V(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(Ys(arguments)))})},e.internalField=function(){rA=function(e){var t=e._invertedIndicesMap;L(t,function(n,r){var i=e._dimInfos[r],a=i.ordinalMeta,o=e._store;if(a){n=t[r]=new Qk(a.categories.length);for(var s=0;s<n.length;s++)n[s]=eA;for(var s=0;s<o.count();s++)n[o.get(i.storeDimIndex,s)]=s}})},aA=function(e,t,n){return pm(e._getCategory(t,n),null)},iA=function(e,t){var n=e._idList[t];return n==null&&e._idDimIdx!=null&&(n=aA(e,e._idDimIdx,t)),n??=$k+t,n},oA=function(e){return B(e)||(e=e==null?[]:[e]),e},cA=function(t){var n=new e(t._schema?t._schema:Zk(t.dimensions,t._getDimInfo,t),t.hostModel);return sA(n,t),n},sA=function(e,t){L(tA.concat(t.__wrappedMethods||[]),function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e.__wrappedMethods=t.__wrappedMethods,L(nA,function(n){e[n]=P(t[n])}),e._calculationInfo=F({},t._calculationInfo)},lA=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=aA(e,i,t)),s==null&&a!=null&&(r[t]=s=aA(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}}}(),e}();function dA(e,t){_w(e)||(e=yw(e)),t||={};var n=t.coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],i=K(),a=[],o=pA(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&Yk(o),c=r===e.dimensionsDefine,l=c?Jk(e):qk(r),u=t.encodeDefine;!u&&t.encodeDefaulter&&(u=t.encodeDefaulter(e,o));for(var d=K(u),f=new xT(o),p=0;p<f.length;p++)f[p]=-1;function m(e){var t=f[e];if(t<0){var n=r[e],i=U(n)?n:{name:n},o=new Hk,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++)m(p);d.each(function(e,t){var n=$p(e).slice();if(n.length===1&&!H(n[0])&&n[0]<0){d.set(t,!1);return}var r=d.set(t,[]);L(n,function(e,n){var i=H(e)?l.get(e):e;i!=null&&i<o&&(r[n]=i,g(m(i),t,n))})});var h=0;L(n,function(e){var t,n,r,i;if(H(e))t=e,i={};else{i=e,t=i.name;var a=i.ordinalMeta;i.ordinalMeta=null,i=F({},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=$p(s),!s.length)for(var l=0;l<(n&&n.length||1);l++){for(;h<o&&m(h).coordDim!=null;)h++;h<o&&s.push(h++)}L(s,function(e,a){var o=m(e);if(c&&i.type!=null&&(o.type=i.type),g(I(o,i),t,a),o.name==null&&n){var s=n[a];!U(s)&&(s={name:s}),o.name=o.displayName=s.name,o.defaultTooltip=s.defaultTooltip}r&&I(o.otherDims,r)})}});function g(e,t,n){tC.get(t)==null?(e.coordDim=t,e.coordDimIndex=n,i.set(t,!0)):e.otherDims[t]=n}var _=t.generateCoord,v=t.generateCoordCount,y=v!=null;v=_?v||1:0;var b=_||`value`;function x(e){e.name??=e.coordDim}if(s)L(a,function(e){x(e)}),a.sort(function(e,t){return e.storeDimIndex-t.storeDimIndex});else for(var S=0;S<o;S++){var C=m(S);C.coordDim??(C.coordDim=mA(b,i,y),C.coordDimIndex=0,(!_||v<=0)&&(C.isExtraCoord=!0),v--),x(C),C.type==null&&(gC(e,S)===lC.Must||C.isExtraCoord&&(C.otherDims.itemName!=null||C.otherDims.seriesName!=null))&&(C.type=`ordinal`)}return fA(a),new Gk({source:e,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function fA(e){for(var t=K(),n=0;n<e.length;n++){var r=e[n],i=r.name,a=t.get(i)||0;a>0&&(r.name=i+(a-1)),a++,t.set(i,a)}}function pA(e,t,n,r){var i=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return L(t,function(e){var t;U(e)&&(t=e.dimsDef)&&(i=Math.max(i,t.length))}),i}function mA(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 hA=function(){function e(e){this.coordSysDims=[],this.axisMap=K(),this.categoryAxisMap=K(),this.coordSysName=e}return e}();function gA(e){var t=e.get(`coordinateSystem`),n=new hA(t),r=_A[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}var _A={cartesian2d:function(e,t,n,r){var i=e.getReferringComponents(`xAxis`,Dm).models[0],a=e.getReferringComponents(`yAxis`,Dm).models[0];if(process.env.NODE_ENV!==`production`){if(!i)throw Error(`xAxis "`+qs(e.get(`xAxisIndex`),e.get(`xAxisId`),0)+`" not found`);if(!a)throw Error(`yAxis "`+qs(e.get(`xAxisIndex`),e.get(`yAxisId`),0)+`" not found`)}t.coordSysDims=[`x`,`y`],n.set(`x`,i),n.set(`y`,a),vA(i)&&(r.set(`x`,i),t.firstCategoryDimIndex=0),vA(a)&&(r.set(`y`,a),t.firstCategoryDimIndex??=1)},singleAxis:function(e,t,n,r){var i=e.getReferringComponents(`singleAxis`,Dm).models[0];if(process.env.NODE_ENV!==`production`&&!i)throw Error(`singleAxis should be specified.`);t.coordSysDims=[`single`],n.set(`single`,i),vA(i)&&(r.set(`single`,i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var i=e.getReferringComponents(`polar`,Dm).models[0],a=i.findAxisModel(`radiusAxis`),o=i.findAxisModel(`angleAxis`);if(process.env.NODE_ENV!==`production`){if(!o)throw Error(`angleAxis option not found`);if(!a)throw Error(`radiusAxis option not found`)}t.coordSysDims=[`radius`,`angle`],n.set(`radius`,a),n.set(`angle`,o),vA(a)&&(r.set(`radius`,a),t.firstCategoryDimIndex=0),vA(o)&&(r.set(`angle`,o),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();L(a.parallelAxisIndex,function(e,a){var s=i.getComponent(`parallelAxis`,e),c=o[a];n.set(c,s),vA(s)&&(r.set(c,s),t.firstCategoryDimIndex??=a)})},matrix:function(e,t,n,r){var i=e.getReferringComponents(`matrix`,Dm).models[0];if(process.env.NODE_ENV!==`production`&&!i)throw Error(`matrix coordinate system should be specified.`);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 vA(e){return e.get(`type`)===`category`}function yA(e,t,n){n||={};var r=n.byIndex,i=n.stackedCoordDimension,a,o,s;bA(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var c=!!(e&&e.get(`stack`)),l,u,d,f;if(L(a,function(e,t){H(e)&&(a[t]=e={name:e}),c&&!e.isExtraCoord&&(!r&&!l&&e.ordinalMeta&&(l=e),!u&&e.type!==`ordinal`&&e.type!==`time`&&(!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 p=u.coordDim,m=u.type,h=0;L(a,function(e){e.coordDim===p&&h++});var g={name:d,coordDim:p,coordDimIndex:h,type:m,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},_={name:f,coordDim:f,coordDimIndex:h+1,type:m,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(f,m),_.storeDimIndex=s.ensureCalculationDimension(d,m)),o.appendCalculationDimension(g),o.appendCalculationDimension(_)):(a.push(g),a.push(_))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:r,stackedOverDimension:f,stackResultDimension:d}}function bA(e){return!Kk(e.schema)}function xA(e,t){return!!t&&t===e.getCalculationInfo(`stackedDimension`)}function SA(e,t){return xA(e,t)?e.getCalculationInfo(`stackResultDimension`):t}function CA(e,t){var n=e.get(`coordinateSystem`),r=gS.get(n),i;return t&&t.coordSysDims&&(i=R(t.coordSysDims,function(e){var n={name:e},r=t.axisMap.get(e);return r&&(n.type=Bk(r.get(`type`))),n})),i||=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||[`x`,`y`],i}function wA(e,t,n){var r,i;return n&&L(e,function(e,a){var o=e.coordDim,s=n.categoryAxisMap.get(o);s&&(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 TA(e,t,n){n||={};var r=t.getSourceManager(),i,a=!1;e?(a=!0,i=yw(e)):(i=r.getSource(),a=i.sourceFormat===nC);var o=gA(t),s=CA(t,o),c=n.useEncodeDefaulter,l=V(c)?c:c?Rs(fC,s,t):null,u={coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:l,canOmitUnusedDimensions:!a},d=dA(i,u),f=wA(d.dimensions,n.createInvertedIndices,o),p=a?null:r.getSharedDataStore(d),m=yA(t,{schema:d,store:p}),h=new uA(d,t);h.setCalculationInfo(m);var g=f!=null&&EA(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 EA(e){if(e.sourceFormat===`original`)return!B(nm(DA(e.data||[])))}function DA(e){for(var t=0;t<e.length&&e[t]==null;)t++;return e[t]}function OA(e){var t=10**Mp(Math.abs(e)),n=Math.abs(e/t);return n===0||n===1||n===2||n===3||n===5}function kA(e){return e.type===`interval`||e.type===`log`}function AA(e,t,n,r,i){var a={},o=a.interval=Np(t/n,!0);r!=null&&o<r&&(o=a.interval=r),i!=null&&o>i&&(o=a.interval=i);var s=a.intervalPrecision=MA(o);return PA(a.niceTickExtent=[wp(Math.ceil(e[0]/o)*o,s),wp(Math.floor(e[1]/o)*o,s)],e),a}function jA(e){var t=10**Mp(e),n=e/t;return n?n===2?n=3:n===3?n=5:n*=2:n=1,wp(n*t)}function MA(e){return Ep(e)+2}function NA(e,t,n){e[t]=Math.max(Math.min(e[t],n[1]),n[0])}function PA(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),NA(e,0,t),NA(e,1,t),e[0]>e[1]&&(e[0]=e[1])}function FA(e,t){return e>=t[0]&&e<=t[1]}var IA=function(){function e(){this.normalize=LA,this.scale=RA}return e.prototype.updateMethods=function(e){e.hasBreaks()?(this.normalize=z(e.normalize,e),this.scale=z(e.scale,e)):(this.normalize=LA,this.scale=RA)},e}();function LA(e,t){return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])}function RA(e,t){return e*(t[1]-t[0])+t[0]}function zA(e,t,n){var r=Math.log(e);return[Math.log(n?t[0]:Math.max(0,t[0]))/r,Math.log(n?t[1]:Math.max(0,t[1]))/r]}var BA=function(){function e(e){this._calculator=new IA,this._setting=e||{},this._extent=[1/0,-1/0];var t=bx();t&&(this._brkCtx=t.createScaleBreakContext(),this._brkCtx.update(this._extent))}return e.prototype.getSetting=function(e){return this._setting[e]},e.prototype._innerUnionExtent=function(e){var t=this._extent;this._innerSetExtent(e[0]<t[0]?e[0]:t[0],e[1]>t[1]?e[1]:t[1])},e.prototype.unionExtentFromData=function(e,t){this._innerUnionExtent(e.getApproximateExtent(t))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){this._innerSetExtent(e,t)},e.prototype._innerSetExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(t)||(n[1]=t),this._brkCtx&&this._brkCtx.update(n)},e.prototype.setBreaksFromOption=function(e){var t=bx();t&&this._innerSetBreak(t.parseAxisBreakOption(e,z(this.parse,this)))},e.prototype._innerSetBreak=function(e){this._brkCtx&&(this._brkCtx.setBreaks(e),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},e.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},e.prototype.hasBreaks=function(){return this._brkCtx?this._brkCtx.hasBreaks():!1},e.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},e.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(e){this._isBlank=e},e}();Xm(BA);var VA=0,HA=function(){function e(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++VA,this._onCollect=e.onCollect}return e.createByAxisModel=function(t){var n=t.option,r=n.data,i=r&&R(r,UA);return new e({categories:i,needCollect:!i,deduplication:n.dedplication!==!1})},e.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},e.prototype.parseAndCollect=function(e){var t,n=this._needCollect;if(!H(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},e.prototype._getOrCreateMap=function(){return this._map||=K(this.categories)},e}();function UA(e){return U(e)&&e.value!=null?e.value:e+``}var WA=function(e){N(t,e);function t(t){var n=e.call(this,t)||this;n.type=`ordinal`;var r=n.getSetting(`ordinalMeta`);return r||=new HA({}),B(r)&&(r=new HA({categories:R(r,function(e){return U(e)?e.value:e})})),n._ordinalMeta=r,n._extent=n.getSetting(`extent`)||[0,r.categories.length-1],n}return t.prototype.parse=function(e){return e==null?NaN:H(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return FA(e,this._extent)&&e>=0&&e<this._ordinalMeta.categories.length},t.prototype.normalize=function(e){return e=this._getTickNumber(e),this._calculator.normalize(e,this._extent)},t.prototype.scale=function(e){return e=Math.round(this._calculator.scale(e,this._extent)),this.getRawOrdinalNumber(e)},t.prototype.getTicks=function(){for(var e=[],t=this._extent,n=t[0];n<=t[1];)e.push({value:n}),n++;return e},t.prototype.getMinorTicks=function(e){},t.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=Math.min(a,t.length);i<o;++i){var s=t[i];n[i]=s,r[s]=i}for(var c=0;i<a;++i){for(;r[c]!=null;)c++;n.push(c),r[c]=i}},t.prototype._getTickNumber=function(e){var t=this._ticksByOrdinalNumber;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getRawOrdinalNumber=function(e){var t=this._ordinalNumbersByTick;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getLabel=function(e){if(!this.isBlank()){var t=this.getRawOrdinalNumber(e.value),n=this._ordinalMeta.categories[t];return n==null?``:n+``}},t.prototype.count=function(){return this._extent[1]-this._extent[0]+1},t.prototype.isInExtentRange=function(e){return e=this._getTickNumber(e),this._extent[0]<=e&&this._extent[1]>=e},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type=`ordinal`,t}(BA);BA.registerClass(WA);var GA=wp,KA=function(e){N(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`interval`,t._interval=0,t._intervalPrecision=2,t}return t.prototype.parse=function(e){return e==null||e===``?NaN:Number(e)},t.prototype.contain=function(e){return FA(e,this._extent)},t.prototype.normalize=function(e){return this._calculator.normalize(e,this._extent)},t.prototype.scale=function(e){return this._calculator.scale(e,this._extent)},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=MA(e)},t.prototype.getTicks=function(e){e||={};var t=this._interval,n=this._extent,r=this._niceExtent,i=this._intervalPrecision,a=bx(),o=[];if(!t)return o;if(e.breakTicks===`only_break`&&a)return a.addBreaksToTicks(o,this._brkCtx.breaks,this._extent),o;var s=1e4;n[0]<r[0]&&(e.expandToNicedExtent?o.push({value:GA(r[0]-t,i)}):o.push({value:n[0]}));for(var c=function(e,n){return Math.round((n-e)/t)},l=r[0];l<=r[1];){if(o.push({value:l}),l=GA(l+t,i),this._brkCtx){var u=this._brkCtx.calcNiceTickMultiple(l,c);u>=0&&(l=GA(l+u*t,i))}if(o.length>0&&l===o[o.length-1].value)break;if(o.length>s)return[]}var d=o.length?o[o.length-1].value:r[1];return n[1]>d&&(e.expandToNicedExtent?o.push({value:GA(d+t,i)}):o.push({value:n[1]})),a&&a.pruneTicksByBreak(e.pruneByBreak,o,this._brkCtx.breaks,function(e){return e.value},this._interval,this._extent),e.breakTicks!==`none`&&a&&a.addBreaksToTicks(o,this._brkCtx.breaks,this._extent),o},t.prototype.getMinorTicks=function(e){for(var t=this.getTicks({expandToNicedExtent:!0}),n=[],r=this.getExtent(),i=1;i<t.length;i++){var a=t[i],o=t[i-1];if(!(o.break||a.break)){for(var s=0,c=[],l=(a.value-o.value)/e,u=MA(l);s<e-1;){var d=GA(o.value+(s+1)*l,u);d>r[0]&&d<r[1]&&c.push(d),s++}var f=bx();f&&f.pruneTicksByBreak(`auto`,c,this._getNonTransBreaks(),function(e){return e},this._interval,r),n.push(c)}}return n},t.prototype._getNonTransBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},t.prototype.getLabel=function(e,t){if(e==null)return``;var n=t&&t.precision;return n==null?n=Ep(e.value)||0:n===`auto`&&(n=this._intervalPrecision),rS(GA(e.value,n,!0))},t.prototype.calcNiceTicks=function(e,t,n){e||=5;var r=this._extent.slice(),i=this._getExtentSpanWithBreaks();if(isFinite(i)){i<0&&(i=-i,r.reverse(),this._innerSetExtent(r[0],r[1]),r=this._extent.slice());var a=AA(r,i,e,t,n);this._intervalPrecision=a.intervalPrecision,this._interval=a.interval,this._niceExtent=a.niceTickExtent}},t.prototype.calcNiceExtent=function(e){var t=this._extent.slice();if(t[0]===t[1])if(t[0]!==0){var n=Math.abs(t[0]);e.fixMax||(t[1]+=n/2),t[0]-=n/2}else t[1]=1;var r=t[1]-t[0];isFinite(r)||(t[0]=0,t[1]=1),this._innerSetExtent(t[0],t[1]),t=this._extent.slice(),this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval);var i=this._interval,a=this._intervalPrecision;e.fixMin||(t[0]=GA(Math.floor(t[0]/i)*i,a)),e.fixMax||(t[1]=GA(Math.ceil(t[1]/i)*i,a)),this._innerSetExtent(t[0],t[1])},t.prototype.setNiceExtent=function(e,t){this._niceExtent=[e,t]},t.type=`interval`,t}(BA);BA.registerClass(KA);var qA=typeof Float32Array<`u`,JA=qA?Float32Array:Array;function YA(e){return B(e)?qA?new Float32Array(e):e:new JA(e)}var XA=`__ec_stack_`;function ZA(e){return e.get(`stack`)||XA+e.seriesIndex}function QA(e){return e.dim+e.index}function $A(e){var t=[],n=e.axis,r=`axis0`;if(n.type===`category`){for(var i=n.getBandWidth(),a=0;a<e.count;a++)t.push(I({bandWidth:i,axisKey:r,stackId:XA+a},e));for(var o=rj(t),s=[],a=0;a<e.count;a++){var c=o[r][XA+a];c.offsetCenter=c.offset+c.width/2,s.push(c)}return s}}function ej(e,t){var n=[];return t.eachSeriesByType(e,function(e){sj(e)&&n.push(e)}),n}function tj(e){var t={};L(e,function(e){var n=e.coordinateSystem.getBaseAxis();if(!(n.type!==`time`&&n.type!==`value`))for(var r=e.getData(),i=n.dim+`_`+n.index,a=r.getDimensionIndex(r.mapDimension(n.dim)),o=r.getStore(),s=0,c=o.count();s<c;++s){var l=o.get(a,s);t[i]?t[i].push(l):t[i]=[l]}});var n={};for(var r in t)if(t.hasOwnProperty(r)){var i=t[r];if(i){i.sort(function(e,t){return e-t});for(var a=null,o=1;o<i.length;++o){var s=i[o]-i[o-1];s>0&&(a=a===null?s:Math.min(a,s))}n[r]=a}}return n}function nj(e){var t=tj(e),n=[];return L(e,function(e){var r=e.coordinateSystem.getBaseAxis(),i=r.getExtent(),a;if(r.type===`category`)a=r.getBandWidth();else if(r.type===`value`||r.type===`time`){var o=t[r.dim+`_`+r.index],s=Math.abs(i[1]-i[0]),c=r.scale.getExtent(),l=Math.abs(c[1]-c[0]);a=o?s/l*o:s}else{var u=e.getData();a=Math.abs(i[1]-i[0])/u.count()}var d=X(e.get(`barWidth`),a),f=X(e.get(`barMaxWidth`),a),p=X(e.get(`barMinWidth`)||(cj(e)?.5:1),a),m=e.get(`barGap`),h=e.get(`barCategoryGap`),g=e.get(`defaultBarGap`);n.push({bandWidth:a,barWidth:d,barMaxWidth:f,barMinWidth:p,barGap:m,barCategoryGap:h,defaultBarGap:g,axisKey:QA(r),stackId:ZA(e)})}),rj(n)}function rj(e){var t={};L(e,function(e,n){var r=e.axisKey,i=e.bandWidth,a=t[r]||{bandWidth:i,remainedWidth:i,autoWidthCount:0,categoryGap:null,gap:e.defaultBarGap||0,stacks:{}},o=a.stacks;t[r]=a;var s=e.stackId;o[s]||a.autoWidthCount++,o[s]=o[s]||{width:0,maxWidth:0};var c=e.barWidth;c&&!o[s].width&&(o[s].width=c,c=Math.min(a.remainedWidth,c),a.remainedWidth-=c);var l=e.barMaxWidth;l&&(o[s].maxWidth=l);var u=e.barMinWidth;u&&(o[s].minWidth=u);var d=e.barGap;d!=null&&(a.gap=d);var f=e.barCategoryGap;f!=null&&(a.categoryGap=f)});var n={};return L(t,function(e,t){n[t]={};var r=e.stacks,i=e.bandWidth,a=e.categoryGap;if(a==null){var o=Ls(r).length;a=Math.max(35-o*4,15)+`%`}var s=X(a,i),c=X(e.gap,1),l=e.remainedWidth,u=e.autoWidthCount,d=(l-s)/(u+(u-1)*c);d=Math.max(d,0),L(r,function(e){var t=e.maxWidth,n=e.minWidth;if(e.width){var r=e.width;t&&(r=Math.min(r,t)),n&&(r=Math.max(r,n)),e.width=r,l-=r+c*r,u--}else{var r=d;t&&t<r&&(r=Math.min(t,l)),n&&n>r&&(r=n),r!==d&&(e.width=r,l-=r+c*r,u--)}}),d=(l-s)/(u+(u-1)*c),d=Math.max(d,0);var f=0,p;L(r,function(e,t){e.width||=d,p=e,f+=e.width*(1+c)}),p&&(f-=p.width*c);var m=-f/2;L(r,function(e,r){n[t][r]=n[t][r]||{bandWidth:i,offset:m,width:e.width},m+=e.width*(1+c)})}),n}function ij(e,t,n){if(e&&t){var r=e[QA(t)];return r!=null&&n!=null?r[ZA(n)]:r}}function aj(e,t){var n=ej(e,t),r=nj(n);L(n,function(e){var t=e.getData(),n=e.coordinateSystem.getBaseAxis(),i=ZA(e),a=r[QA(n)][i],o=a.offset,s=a.width;t.setLayout({bandWidth:a.bandWidth,offset:o,size:s})})}function oj(e){return{seriesType:e,plan:gE(),reset:function(e){if(sj(e)){var t=e.getData(),n=e.coordinateSystem,r=n.getBaseAxis(),i=n.getOtherAxis(r),a=t.getDimensionIndex(t.mapDimension(i.dim)),o=t.getDimensionIndex(t.mapDimension(r.dim)),s=e.get(`showBackground`,!0),c=t.mapDimension(i.dim),l=t.getCalculationInfo(`stackResultDimension`),u=xA(t,c)&&!!t.getCalculationInfo(`stackedOnSeries`),d=i.isHorizontal(),f=lj(r,i),p=cj(e),m=e.get(`barMinHeight`)||0,h=l&&t.getDimensionIndex(l),g=t.getLayout(`size`),_=t.getLayout(`offset`);return{progress:function(e,t){for(var r=e.count,i=p&&YA(r*3),c=p&&s&&YA(r*3),l=p&&YA(r),v=n.master.getRect(),y=d?v.width:v.height,b,x=t.getStore(),S=0;(b=e.next())!=null;){var C=x.get(u?h:a,b),w=x.get(o,b),T=f,E=void 0;u&&(E=+C-x.get(a,b));var D=void 0,O=void 0,k=void 0,A=void 0;if(d){var j=n.dataToPoint([C,w]);if(u){var ee=n.dataToPoint([E,w]);T=ee[0]}D=T,O=j[1]+_,k=j[0]-T,A=g,Math.abs(k)<m&&(k=(k<0?-1:1)*m)}else{var j=n.dataToPoint([w,C]);if(u){var ee=n.dataToPoint([w,E]);T=ee[1]}D=j[0]+_,O=T,k=g,A=j[1]-T,Math.abs(A)<m&&(A=(A<=0?-1:1)*m)}p?(i[S]=D,i[S+1]=O,i[S+2]=d?k:A,c&&(c[S]=d?v.x:D,c[S+1]=d?O:v.y,c[S+2]=y),l[b]=b):t.setItemLayout(b,{x:D,y:O,width:k,height:A}),S+=3}p&&t.setLayout({largePoints:i,largeDataIndices:l,largeBackgroundPoints:c,valueAxisHorizontal:d})}}}}}}function sj(e){return e.coordinateSystem&&e.coordinateSystem.type===`cartesian2d`}function cj(e){return e.pipelineContext&&e.pipelineContext.large}function lj(e,t){var n=t.model.get(`startValue`);return n||=0,t.toGlobalCoord(t.dataToCoord(t.type===`log`?n>0?n:1:n))}var uj=function(e,t,n,r){for(;n<r;){var i=n+r>>>1;e[i][1]<t?n=i+1:r=i}return n},dj=function(e){N(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`time`,n}return t.prototype.getLabel=function(e){var t=this.getSetting(`useUTC`);return Bx(e.value,jx[zx(Lx(this._minLevelUnit))]||jx.second,t,this.getSetting(`locale`))},t.prototype.getFormattedLabel=function(e,t,n){var r=this.getSetting(`useUTC`);return Vx(e,t,n,this.getSetting(`locale`),r)},t.prototype.getTicks=function(e){e||={};var t=this._interval,n=this._extent,r=bx(),i=[];if(!t)return i;var a=this.getSetting(`useUTC`);if(r&&e.breakTicks===`only_break`)return bx().addBreaksToTicks(i,this._brkCtx.breaks,this._extent),i;var o=Hx(n[1],a);i.push({value:n[0],time:{level:0,upperTimeUnit:o,lowerTimeUnit:o}});var s=xj(this._minLevelUnit,this._approxInterval,a,n,this._getExtentSpanWithBreaks(),this._brkCtx);i=i.concat(s);var c=Hx(n[1],a);i.push({value:n[1],time:{level:0,upperTimeUnit:c,lowerTimeUnit:c}});var l=this.getSetting(`useUTC`),u=Mx.length-1,d=0;return L(i,function(e){u=Math.min(u,js(Mx,e.time.upperTimeUnit)),d=Math.max(d,e.time.level)}),r&&bx().pruneTicksByBreak(e.pruneByBreak,i,this._brkCtx.breaks,function(e){return e.value},this._approxInterval,this._extent),r&&e.breakTicks!==`none`&&bx().addBreaksToTicks(i,this._brkCtx.breaks,this._extent,function(e){for(var t=Math.max(js(Mx,Hx(e.vmin,l)),js(Mx,Hx(e.vmax,l))),n=0,r=0;r<Mx.length;r++)if(!pj(Mx[r],e.vmin,e.vmax,l)){n=r;break}var i=Math.min(n,u);return{level:d,lowerTimeUnit:Mx[Math.max(i,t)],upperTimeUnit:Mx[i]}}),i},t.prototype.calcNiceExtent=function(e){var t=this.getExtent();if(t[0]===t[1]&&(t[0]-=Tx,t[1]+=Tx),t[1]===-1/0&&t[0]===1/0){var n=new Date;t[1]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()),t[0]=t[1]-Tx}this._innerSetExtent(t[0],t[1]),this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval)},t.prototype.calcNiceTicks=function(e,t,n){e||=10,this._approxInterval=this._getExtentSpanWithBreaks()/e,t!=null&&this._approxInterval<t&&(this._approxInterval=t),n!=null&&this._approxInterval>n&&(this._approxInterval=n);var r=fj.length,i=Math.min(uj(fj,this._approxInterval,0,r),r-1);this._interval=fj[i][1],this._intervalPrecision=MA(this._interval),this._minLevelUnit=fj[Math.max(i-1,0)][0]},t.prototype.parse=function(e){return Bs(e)?e:+jp(e)},t.prototype.contain=function(e){return FA(e,this._extent)},t.prototype.normalize=function(e){return this._calculator.normalize(e,this._extent)},t.prototype.scale=function(e){return this._calculator.scale(e,this._extent)},t.type=`time`,t}(KA),fj=[[`second`,xx],[`minute`,Sx],[`hour`,Cx],[`quarter-day`,Cx*6],[`half-day`,Cx*12],[`day`,Tx*1.2],[`half-week`,Tx*3.5],[`week`,Tx*7],[`month`,Tx*31],[`quarter`,Tx*95],[`half-year`,Ex/2],[`year`,Ex]];function pj(e,t,n,r){return Ux(new Date(t),e,r).getTime()===Ux(new Date(n),e,r).getTime()}function mj(e,t){return e/=Tx,e>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function hj(e){var t=30*Tx;return e/=t,e>6?6:e>3?3:e>2?2:1}function gj(e){return e/=Cx,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function _j(e,t){return e/=t?Sx:xx,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function vj(e){return Np(e,!0)}function yj(e,t,n){var r=Math.max(0,js(Mx,t)-1);return Ux(new Date(e),Mx[r],n).getTime()}function bj(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 xj(e,t,n,r,i,a){var o=1e4,s=Nx,c=0;function l(e,t,n,i,s,l,u){for(var d=bj(s,e),f=t,p=new Date(f);f<n&&f<=r[1];){if(u.push({value:f}),c++>o){process.env.NODE_ENV!==`production`&&Wp(`Exceed safe limit in time scale.`);break}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:!0})}function u(e,i,a){var o=[],s=!i.length;if(!pj(Lx(e),r[0],r[1],n)){s&&(i=[{value:yj(r[0],e,n)},{value:r[1]}]);for(var c=0;c<i.length-1;c++){var u=i[c].value,d=i[c+1].value;if(u!==d){var f=void 0,p=void 0,m=void 0,h=!1;switch(e){case`year`:f=Math.max(1,Math.round(t/Tx/365)),p=Wx(n),m=ine(n);break;case`half-year`:case`quarter`:case`month`:f=hj(t),p=Gx(n),m=Zx(n);break;case`week`:case`half-week`:case`day`:f=mj(t,31),p=Kx(n),m=Qx(n),h=!0;break;case`half-day`:case`quarter-day`:case`hour`:f=gj(t),p=qx(n),m=$x(n);break;case`minute`:f=_j(t,!0),p=Jx(n),m=eS(n);break;case`second`:f=_j(t,!1),p=Yx(n),m=tS(n);break;case`millisecond`:f=vj(t),p=Xx(n),m=nS(n);break}d>=r[0]&&u<=r[1]&&l(f,u,d,p,m,h,o),e===`year`&&a.length>1&&c===0&&a.unshift({value:a[0].value-f})}}for(var c=0;c<o.length;c++)a.push(o[c])}}for(var d=[],f=[],p=0,m=0,h=0;h<s.length;++h){var g=Lx(s[h]);if(Rx(s[h])&&(u(s[h],d[d.length-1]||[],f),g!==(s[h+1]?Lx(s[h+1]):null))){if(f.length){m=p,f.sort(function(e,t){return e.value-t.value});for(var _=[],v=0;v<f.length;++v){var y=f[v].value;(v===0||f[v-1].value!==y)&&(_.push(f[v]),y>=r[0]&&y<=r[1]&&p++)}var b=i/t;if(p>b*1.5&&m>b/1.5||(d.push(_),p>b||e===s[h]))break}f=[]}}for(var x=Fs(R(d,function(e){return Fs(e,function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd})}),function(e){return e.length>0}),S=[],C=x.length-1,h=0;h<x.length;++h)for(var w=x[h],T=0;T<w.length;++T){var E=Hx(w[T].value,n);S.push({value:w[T].value,time:{level:C-h,upperTimeUnit:E,lowerTimeUnit:E}})}S.sort(function(e,t){return e.value-t.value});for(var D=[],h=0;h<S.length;++h)(h===0||S[h].value!==S[h-1].value)&&D.push(S[h]);return D}BA.registerClass(dj);var Sj=wp,Cj=Math.floor,wj=Math.ceil,Tj=Math.pow,Ej=Math.log,Dj=function(e){N(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`log`,t.base=10,t._originalScale=new KA,t}return t.prototype.getTicks=function(t){t||={};var n=this._extent.slice(),r=this._originalScale.getExtent(),i=e.prototype.getTicks.call(this,t),a=this.base,o=this._originalScale._innerGetBreaks(),s=bx();return R(i,function(e){var t=e.value,i=null,c=Tj(a,t);t===n[0]&&this._fixMin?i=r[0]:t===n[1]&&this._fixMax&&(i=r[1]);var l;if(s){var u=s.getTicksLogTransformBreak(e,a,o,Oj);l=u.vBreak,i??=u.brkRoundingCriterion}return i!=null&&(c=Oj(c,i)),{value:c,break:l}},this)},t.prototype._getNonTransBreaks=function(){return this._originalScale._innerGetBreaks()},t.prototype.setExtent=function(t,n){this._originalScale.setExtent(t,n);var r=zA(this.base,[t,n]);e.prototype.setExtent.call(this,r[0],r[1])},t.prototype.getExtent=function(){var t=this.base,n=e.prototype.getExtent.call(this);n[0]=Tj(t,n[0]),n[1]=Tj(t,n[1]);var r=this._originalScale.getExtent();return this._fixMin&&(n[0]=Oj(n[0],r[0])),this._fixMax&&(n[1]=Oj(n[1],r[1])),n},t.prototype.unionExtentFromData=function(e,t){this._originalScale.unionExtentFromData(e,t);var n=zA(this.base,e.getApproximateExtent(t),!0);this._innerUnionExtent(n)},t.prototype.calcNiceTicks=function(e){e||=10;var t=this._extent.slice(),n=this._getExtentSpanWithBreaks();if(!(!isFinite(n)||n<=0)){var r=kte(n);for(e/n*r<=.5&&(r*=10);!isNaN(r)&&Math.abs(r)<1&&Math.abs(r)>0;)r*=10;var i=[Sj(wj(t[0]/r)*r),Sj(Cj(t[1]/r)*r)];this._interval=r,this._intervalPrecision=MA(r),this._niceExtent=i}},t.prototype.calcNiceExtent=function(t){e.prototype.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},t.prototype.contain=function(t){return t=Ej(t)/Ej(this.base),e.prototype.contain.call(this,t)},t.prototype.normalize=function(t){return t=Ej(t)/Ej(this.base),e.prototype.normalize.call(this,t)},t.prototype.scale=function(t){return t=e.prototype.scale.call(this,t),Tj(this.base,t)},t.prototype.setBreaksFromOption=function(e){var t=bx();if(t){var n=t.logarithmicParseBreaksFromOption(e,this.base,z(this.parse,this)),r=n.parsedOriginal,i=n.parsedLogged;this._originalScale._innerSetBreak(r),this._innerSetBreak(i)}},t.type=`log`,t}(KA);function Oj(e,t){return Sj(e,Ep(t))}BA.registerClass(Dj);var kj=function(){function e(e,t,n){this._prepareParams(e,t,n)}return e.prototype._prepareParams=function(e,t,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var r=this._isOrdinal=e.type===`ordinal`;this._needCrossZero=e.type===`interval`&&t.getNeedCrossZero&&t.getNeedCrossZero();var i=t.get(`min`,!0);i??=t.get(`startValue`,!0);var a=this._modelMinRaw=i;V(a)?this._modelMinNum=Nj(e,a({min:n[0],max:n[1]})):a!==`dataMin`&&(this._modelMinNum=Nj(e,a));var o=this._modelMaxRaw=t.get(`max`,!0);if(V(o)?this._modelMaxNum=Nj(e,o({min:n[0],max:n[1]})):o!==`dataMax`&&(this._modelMaxNum=Nj(e,o)),r)this._axisDataLen=t.getCategories().length;else{var s=t.get(`boundaryGap`),c=B(s)?s:[s||0,s||0];typeof c[0]==`boolean`||typeof c[1]==`boolean`?(process.env.NODE_ENV!==`production`&&console.warn(`Boolean type for boundaryGap is only allowed for ordinal axis. Please use string in percentage instead, e.g., "20%". Currently, boundaryGap is set to be 0.`),this._boundaryGapInner=[0,0]):this._boundaryGapInner=[Gf(c[0],1),Gf(c[1],1)]}},e.prototype.calculate=function(){var e=this._isOrdinal,t=this._dataMin,n=this._dataMax,r=this._axisDataLen,i=this._boundaryGapInner,a=e?null:n-t||Math.abs(t),o=this._modelMinRaw===`dataMin`?t:this._modelMinNum,s=this._modelMaxRaw===`dataMax`?n:this._modelMaxNum,c=o!=null,l=s!=null;o??=e?r?0:NaN:t-i[0]*a,s??=e?r?r-1:NaN:n+i[1]*a,(o==null||!isFinite(o))&&(o=NaN),(s==null||!isFinite(s))&&(s=NaN);var u=Ks(o)||Ks(s)||e&&!r;this._needCrossZero&&(o>0&&s>0&&!c&&(o=0),o<0&&s<0&&!l&&(s=0));var d=this._determinedMin,f=this._determinedMax;return d!=null&&(o=d,c=!0),f!=null&&(s=f,l=!0),{min:o,max:s,minFixed:c,maxFixed:l,isBlank:u}},e.prototype.modifyDataMinMax=function(e,t){process.env.NODE_ENV!==`production`&&G(!this.frozen),this[jj[e]]=t},e.prototype.setDeterminedMinMax=function(e,t){var n=Aj[e];process.env.NODE_ENV!==`production`&&G(!this.frozen&&this[n]==null),this[n]=t},e.prototype.freeze=function(){this.frozen=!0},e}(),Aj={min:`_determinedMin`,max:`_determinedMax`},jj={min:`_dataMin`,max:`_dataMax`};function Mj(e,t,n){var r=e.rawExtentInfo;return r||(r=new kj(e,t,n),e.rawExtentInfo=r,r)}function Nj(e,t){return t==null?null:Ks(t)?NaN:e.parse(t)}function Pj(e,t){var n=e.type,r=Mj(e,t,e.getExtent()).calculate();e.setBlank(r.isBlank);var i=r.min,a=r.max,o=t.ecModel;if(o&&n===`time`){var s=ej(`bar`,o),c=!1;if(L(s,function(e){c||=e.getBaseAxis()===t.axis}),c){var l=nj(s),u=Fj(i,a,t,l);i=u.min,a=u.max}}return{extent:[i,a],fixMin:r.minFixed,fixMax:r.maxFixed}}function Fj(e,t,n,r){var i=n.axis.getExtent(),a=Math.abs(i[1]-i[0]),o=ij(r,n.axis);if(o===void 0)return{min:e,max:t};var s=1/0;L(o,function(e){s=Math.min(e.offset,s)});var c=-1/0;L(o,function(e){c=Math.max(e.offset+e.width,c)}),s=Math.abs(s),c=Math.abs(c);var l=s+c,u=t-e,d=u/(1-(s+c)/a)-u;return t+=c/l*d,e-=s/l*d,{min:e,max:t}}function Ij(e,t){var n=t,r=Pj(e,n),i=r.extent,a=n.get(`splitNumber`);e instanceof Dj&&(e.base=n.get(`logBase`));var o=e.type,s=n.get(`interval`),c=o===`interval`||o===`time`;e.setBreaksFromOption(qj(n)),e.setExtent(i[0],i[1]),e.calcNiceExtent({splitNumber:a,fixMin:r.fixMin,fixMax:r.fixMax,minInterval:c?n.get(`minInterval`):null,maxInterval:c?n.get(`maxInterval`):null}),s!=null&&e.setInterval&&e.setInterval(s)}function Lj(e,t){if(t||=e.get(`type`),t)switch(t){case`category`:return new WA({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:[1/0,-1/0]});case`time`:return new dj({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get(`useUTC`)});default:return new((BA.getClass(t))||KA)}}function Rj(e){var t=e.scale.getExtent(),n=t[0],r=t[1];return!(n>0&&r>0||n<0&&r<0)}function zj(e){var t=e.getLabelModel().get(`formatter`);if(e.type===`time`){var n=Px(t);return function(t,r){return e.scale.getFormattedLabel(t,r,n)}}else if(H(t))return function(n){var r=e.scale.getLabel(n);return t.replace(`{value}`,r??``)};else if(V(t)){if(e.type===`category`)return function(n,r){return t(Bj(e,n),n.value-e.scale.getExtent()[0],null)};var r=bx();return function(n,i){var a=null;return r&&(a=r.makeAxisLabelFormatterParamBreak(a,n.break)),t(Bj(e,n),i,a)}}else return function(t){return e.scale.getLabel(t)}}function Bj(e,t){return e.type===`category`?e.scale.getLabel(t):t.value}function Vj(e){return e.get(`interval`)??`auto`}function Hj(e){return e.type===`category`&&Vj(e.getLabelModel())===0}function Uj(e,t){var n={};return L(e.mapDimensionsAll(t),function(t){n[SA(e,t)]=!0}),Ls(n)}function Wj(e,t,n){t&&L(Uj(t,n),function(n){var r=t.getApproximateExtent(n);r[0]<e[0]&&(e[0]=r[0]),r[1]>e[1]&&(e[1]=r[1])})}function Gj(e){return e===`middle`||e===`center`}function Kj(e){return e.getShallow(`show`)}function qj(e){var t=e.get(`breaks`,!0);if(t!=null){if(!bx()){process.env.NODE_ENV!==`production`&&Gp('Must `import {AxisBreak} from "echarts/features.js"; use(AxisBreak);` first if using breaks option.');return}if(!Jj(e.axis)){process.env.NODE_ENV!==`production`&&Gp(`Axis '`+e.axis.dim+`'-'`+e.axis.type+`' does not support break.`);return}return t}}function Jj(e){return(e.dim===`x`||e.dim===`y`||e.dim===`z`||e.dim===`single`)&&e.type!==`category`}var Yj=function(){function e(){}return e.prototype.getNeedCrossZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),Xj=1e-8;function Zj(e,t){return Math.abs(e-t)<Xj}function Qj(e,t,n){var r=0,i=e[0];if(!i)return!1;for(var a=1;a<e.length;a++){var o=e[a];r+=Cg(i[0],i[1],o[0],o[1],t,n),i=o}var s=e[0];return(!Zj(i[0],s[0])||!Zj(i[1],s[1]))&&(r+=Cg(i[0],i[1],s[0],s[1],t,n)),r!==0}var $j=[];function eM(e,t){for(var n=0;n<e.length;n++)Tc(e[n],e[n],t)}function tM(e,t,n,r){for(var i=0;i<e.length;i++){var a=e[i];r&&(a=r.project(a)),a&&isFinite(a[0])&&isFinite(a[1])&&(Ec(t,t,a),Dc(n,n,a))}}function nM(e){for(var t=0,n=0,r=0,i=e.length,a=e[i-1][0],o=e[i-1][1],s=0;s<i;s++){var c=e[s][0],l=e[s][1],u=a*l-c*o;t+=u,n+=(a+c)*u,r+=(o+l)*u,a=c,o=l}return t?[n/t/3,r/t/3,t]:[e[0][0]||0,e[0][1]||0]}var rM=function(){function e(e){this.name=e}return e.prototype.setCenter=function(e){this._center=e},e.prototype.getCenter=function(){var e=this._center;return e||=this._center=this.calcCenter(),e},e}(),iM=function(){function e(e,t){this.type=`polygon`,this.exterior=e,this.interiors=t}return e}(),aM=function(){function e(e){this.type=`linestring`,this.points=e}return e}(),oM=function(e){N(t,e);function t(t,n,r){var i=e.call(this,t)||this;return i.type=`geoJSON`,i.geometries=n,i._center=r&&[r[0],r[1]],i}return t.prototype.calcCenter=function(){for(var e=this.geometries,t,n=0,r=0;r<e.length;r++){var i=e[r],a=i.exterior,o=a&&a.length;o>n&&(t=i,n=o)}if(t)return nM(t.exterior);var s=this.getBoundingRect();return[s.x+s.width/2,s.y+s.height/2]},t.prototype.getBoundingRect=function(e){var t=this._rect;if(t&&!e)return t;var n=[1/0,1/0],r=[-1/0,-1/0],i=this.geometries;return L(i,function(t){t.type===`polygon`?tM(t.exterior,n,r,e):L(t.points,function(t){tM(t,n,r,e)})}),isFinite(n[0])&&isFinite(n[1])&&isFinite(r[0])&&isFinite(r[1])||(n[0]=n[1]=r[0]=r[1]=0),t=new Ol(n[0],n[1],r[0]-n[0],r[1]-n[1]),e||(this._rect=t),t},t.prototype.contain=function(e){var t=this.getBoundingRect(),n=this.geometries;if(!t.contain(e[0],e[1]))return!1;loopGeo:for(var r=0,i=n.length;r<i;r++){var a=n[r];if(a.type===`polygon`){var o=a.exterior,s=a.interiors;if(Qj(o,e[0],e[1])){for(var c=0;c<(s?s.length:0);c++)if(Qj(s[c],e[0],e[1]))continue loopGeo;return!0}}}return!1},t.prototype.transformTo=function(e,t,n,r){var i=this.getBoundingRect(),a=i.width/i.height;n?r||=n/a:n=a*r;for(var o=new Ol(e,t,n,r),s=i.calculateTransform(o),c=this.geometries,l=0;l<c.length;l++){var u=c[l];u.type===`polygon`?(eM(u.exterior,s),L(u.interiors,function(e){eM(e,s)})):L(u.points,function(e){eM(e,s)})}i=this._rect,i.copy(o),this._center=[i.x+i.width/2,i.y+i.height/2]},t.prototype.cloneShallow=function(e){e??=this.name;var n=new t(e,this.geometries,this._center);return n._rect=this._rect,n.transformTo=null,n},t}(rM),sM=function(e){N(t,e);function t(t,n){var r=e.call(this,t)||this;return r.type=`geoSVG`,r._elOnlyForCalculate=n,r}return t.prototype.calcCenter=function(){for(var e=this._elOnlyForCalculate,t=e.getBoundingRect(),n=[t.x+t.width/2,t.y+t.height/2],r=cl($j),i=e;i&&!i.isGeoSVGGraphicRoot;)ul(r,i.getLocalTransform(),r),i=i.parent;return ml(r,r),Tc(n,n,r),n},t}(rM);function cM(e){if(!e.UTF8Encoding)return e;var t=e,n=t.UTF8Scale;n??=1024;var r=t.features;return L(r,function(e){var t=e.geometry,r=t.encodeOffsets,i=t.coordinates;if(r)switch(t.type){case`LineString`:t.coordinates=uM(i,r,n);break;case`Polygon`:lM(i,r,n);break;case`MultiLineString`:lM(i,r,n);break;case`MultiPolygon`:L(i,function(e,t){return lM(e,r[t],n)})}}),t.UTF8Encoding=!1,t}function lM(e,t,n){for(var r=0;r<e.length;r++)e[r]=uM(e[r],t[r],n)}function uM(e,t,n){for(var r=[],i=t[0],a=t[1],o=0;o<e.length;o+=2){var s=e.charCodeAt(o)-64,c=e.charCodeAt(o+1)-64;s=s>>1^-(s&1),c=c>>1^-(c&1),s+=i,c+=a,i=s,a=c,r.push([s/n,c/n])}return r}function dM(e,t){return e=cM(e),R(Fs(e.features,function(e){return e.geometry&&e.properties&&e.geometry.coordinates.length>0}),function(e){var n=e.properties,r=e.geometry,i=[];switch(r.type){case`Polygon`:var a=r.coordinates;i.push(new iM(a[0],a.slice(1)));break;case`MultiPolygon`:L(r.coordinates,function(e){e[0]&&i.push(new iM(e[0],e.slice(1)))});break;case`LineString`:i.push(new aM([r.coordinates]));break;case`MultiLineString`:i.push(new aM(r.coordinates))}var o=new oM(n[t||`name`],i,n.cp);return o.properties=n,o})}var fM=Cm(),pM=Cm(),mM={estimate:1,determine:2};function hM(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function gM(e,t){var n=R(t,function(t){return e.scale.parse(t)});return e.type===`time`&&n.length>0&&(n.sort(),n.unshift(n[0]),n.push(n[n.length-1])),n}function _M(e,t){var n=e.getLabelModel().get(`customValues`);if(n){var r=zj(e),i=e.scale.getExtent();return{labels:R(Fs(gM(e,n),function(e){return e>=i[0]&&e<=i[1]}),function(t){var n={value:t};return{formattedLabel:r(n),rawLabel:e.scale.getLabel(n),tickValue:t,time:void 0,break:void 0}})}}return e.type===`category`?yM(e,t):SM(e)}function vM(e,t,n){var r=e.getTickModel().get(`customValues`);if(r){var i=e.scale.getExtent();return{ticks:Fs(gM(e,r),function(e){return e>=i[0]&&e<=i[1]})}}return e.type===`category`?xM(e,t):{ticks:R(e.scale.getTicks(n),function(e){return e.value})}}function yM(e,t){var n=e.getLabelModel(),r=bM(e,n,t);return!n.get(`show`)||e.scale.isBlank()?{labels:[]}:r}function bM(e,t,n){var r=wM(e),i=Vj(t),a=n.kind===mM.estimate;if(!a){var o=EM(r,i);if(o)return o}var s,c;V(i)?s=PM(e,i):(c=i===`auto`?OM(e,n):i,s=NM(e,c));var l={labels:s,labelCategoryInterval:c};return a?n.out.noPxChangeTryDetermine.push(function(){return DM(r,i,l),!0}):DM(r,i,l),l}function xM(e,t){var n=CM(e),r=Vj(t),i=EM(n,r);if(i)return i;var a,o;if((!t.get(`show`)||e.scale.isBlank())&&(a=[]),V(r))a=PM(e,r,!0);else if(r===`auto`){var s=bM(e,e.getLabelModel(),hM(mM.determine));o=s.labelCategoryInterval,a=R(s.labels,function(e){return e.tickValue})}else o=r,a=NM(e,o,!0);return DM(n,r,{ticks:a,tickCategoryInterval:o})}function SM(e){var t=e.scale.getTicks(),n=zj(e);return{labels:R(t,function(t,r){return{formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tickValue:t.value,time:t.time,break:t.break}})}}var CM=TM(`axisTick`),wM=TM(`axisLabel`);function TM(e){return function(t){return pM(t)[e]||(pM(t)[e]={list:[]})}}function EM(e,t){for(var n=0;n<e.list.length;n++)if(e.list[n].key===t)return e.list[n].value}function DM(e,t,n){return e.list.push({key:t,value:n}),n}function OM(e,t){if(t.kind===mM.estimate){var n=e.calculateCategoryInterval(t);return t.out.noPxChangeTryDetermine.push(function(){return pM(e).autoInterval=n,!0}),n}return pM(e).autoInterval??(pM(e).autoInterval=e.calculateCategoryInterval(t))}function kM(e,t){var n=t.kind,r=MM(e),i=zj(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=Vf(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===mM.estimate?(t.out.noPxChangeTryDetermine.push(z(AM,null,e,S,c)),S):jM(e,S,c)??S}function AM(e,t,n){return jM(e,t,n)==null}function jM(e,t,n){var r=fM(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 MM(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 NM(e,t,n){var r=zj(e),i=e.scale,a=i.getExtent(),o=e.getLabelModel(),s=[],c=Math.max((t||0)+1,1),l=a[0],u=i.count();l!==0&&c>1&&u/c>2&&(l=Math.round(Math.ceil(l/c)*c));var d=Hj(e),f=o.get(`showMinLabel`)||d,p=o.get(`showMaxLabel`)||d;f&&l!==a[0]&&h(a[0]);for(var m=l;m<=a[1];m+=c)h(m);p&&m-c!==a[1]&&h(a[1]);function h(e){var t={value:e};s.push(n?e:{formattedLabel:r(t),rawLabel:i.getLabel(t),tickValue:e,time:void 0,break:void 0})}return s}function PM(e,t,n){var r=e.scale,i=zj(e),a=[];return L(r.getTicks(),function(e){var o=r.getLabel(e),s=e.value;t(e.value,o)&&a.push(n?s:{formattedLabel:i(e),rawLabel:o,tickValue:s,time:void 0,break:void 0})}),a}var FM=[0,1],IM=function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.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},e.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.getPixelPrecision=function(e){return Op(e||this.scale.getExtent(),this._extent)},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this._extent,r=this.scale;return e=r.normalize(r.parse(e)),this.onBand&&r.type===`ordinal`&&(n=n.slice(),LM(n,r.count())),Sp(e,FM,n,t)},e.prototype.coordToData=function(e,t){var n=this._extent,r=this.scale;this.onBand&&r.type===`ordinal`&&(n=n.slice(),LM(n,r.count()));var i=Sp(e,n,FM,t);return this.scale.scale(i)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){e||={};var t=e.tickModel||this.getTickModel(),n=vM(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}).ticks,r=R(n,function(e){return{coord:this.dataToCoord(this.scale.type===`ordinal`?this.scale.getRawOrdinalNumber(e):e),tickValue:e}},this),i=t.get(`alignWithLabel`);return RM(this,r,i,e.clamp),r},e.prototype.getMinorTicksCoords=function(){if(this.scale.type===`ordinal`)return[];var e=this.model.getModel(`minorTick`).get(`splitNumber`);return e>0&&e<100||(e=5),R(this.scale.getMinorTicks(e),function(e){return R(e,function(e){return{coord:this.dataToCoord(e),tickValue:e}},this)},this)},e.prototype.getViewLabels=function(e){return e||=hM(mM.determine),_M(this,e).labels},e.prototype.getLabelModel=function(){return this.model.getModel(`axisLabel`)},e.prototype.getTickModel=function(){return this.model.getModel(`axisTick`)},e.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),n=t[1]-t[0]+ +!!this.onBand;n===0&&(n=1);var r=Math.abs(e[1]-e[0]);return Math.abs(r)/n},e.prototype.calculateCategoryInterval=function(e){return e||=hM(mM.determine),kM(this,e)},e}();function LM(e,t){var n=(e[1]-e[0])/t/2;e[0]+=n,e[1]-=n}function RM(e,t,n,r){var i=t.length;if(!e.onBand||n||!i)return;var a=e.getExtent(),o,s;if(i===1)t[0].coord=a[0],t[0].onBand=!0,o=t[1]={coord:a[1],tickValue:t[0].tickValue,onBand:!0};else{var c=t[i-1].tickValue-t[0].tickValue,l=(t[i-1].coord-t[0].coord)/c;L(t,function(e){e.coord-=l/2,e.onBand=!0});var u=e.scale.getExtent();s=1+u[1]-t[i-1].tickValue,o={coord:t[i-1].coord+l*s,tickValue:u[1]+1,onBand:!0},t.push(o)}var d=a[0]>a[1];f(t[0].coord,a[0])&&(r?t[0].coord=a[0]:t.shift()),r&&f(a[0],t[0].coord)&&t.unshift({coord:a[0],onBand:!0}),f(a[1],o.coord)&&(r?o.coord=a[1]:t.pop()),r&&f(o.coord,a[1])&&t.push({coord:a[1],onBand:!0});function f(e,t){return e=wp(e),t=wp(t),d?e>t:e<t}}var zM=Math.PI*2,BM=hg.CMD,VM=[`top`,`right`,`bottom`,`left`];function HM(e,t,n,r,i){var a=n.width,o=n.height;switch(e){case`top`:r.set(n.x+a/2,n.y-t),i.set(0,-1);break;case`bottom`:r.set(n.x+a/2,n.y+o+t),i.set(0,1);break;case`left`:r.set(n.x-t,n.y+o/2),i.set(-1,0);break;case`right`:r.set(n.x+a+t,n.y+o/2),i.set(1,0);break}}function UM(e,t,n,r,i,a,o,s,c){o-=e,s-=t;var l=Math.sqrt(o*o+s*s);o/=l,s/=l;var u=o*n+e,d=s*n+t;if(Math.abs(r-i)%zM<1e-4)return c[0]=u,c[1]=d,l-n;if(a){var f=r;r=bg(i),i=bg(f)}else r=bg(r),i=bg(i);r>i&&(i+=zM);var p=Math.atan2(s,o);if(p<0&&(p+=zM),p>=r&&p<=i||p+zM>=r&&p+zM<=i)return c[0]=u,c[1]=d,l-n;var m=n*Math.cos(r)+e,h=n*Math.sin(r)+t,g=n*Math.cos(i)+e,_=n*Math.sin(i)+t,v=(m-o)*(m-o)+(h-s)*(h-s),y=(g-o)*(g-o)+(_-s)*(_-s);return v<y?(c[0]=m,c[1]=h,Math.sqrt(v)):(c[0]=g,c[1]=_,Math.sqrt(y))}function WM(e,t,n,r,i,a,o,s){var c=i-e,l=a-t,u=n-e,d=r-t,f=Math.sqrt(u*u+d*d);u/=f,d/=f;var p=(c*u+l*d)/f;s&&(p=Math.min(Math.max(p,0),1)),p*=f;var m=o[0]=e+p*u,h=o[1]=t+p*d;return Math.sqrt((m-i)*(m-i)+(h-a)*(h-a))}function GM(e,t,n,r,i,a,o){n<0&&(e+=n,n=-n),r<0&&(t+=r,r=-r);var s=e+n,c=t+r,l=o[0]=Math.min(Math.max(i,e),s),u=o[1]=Math.min(Math.max(a,t),c);return Math.sqrt((l-i)*(l-i)+(u-a)*(u-a))}var KM=[];function qM(e,t,n){var r=GM(t.x,t.y,t.width,t.height,e.x,e.y,KM);return n.set(KM[0],KM[1]),r}function JM(e,t,n){for(var r=0,i=0,a=0,o=0,s,c,l=1/0,u=t.data,d=e.x,f=e.y,p=0;p<u.length;){var m=u[p++];p===1&&(r=u[p],i=u[p+1],a=r,o=i);var h=l;switch(m){case BM.M:a=u[p++],o=u[p++],r=a,i=o;break;case BM.L:h=WM(r,i,u[p],u[p+1],d,f,KM,!0),r=u[p++],i=u[p++];break;case BM.C:h=Su(r,i,u[p++],u[p++],u[p++],u[p++],u[p],u[p+1],d,f,KM),r=u[p++],i=u[p++];break;case BM.Q:h=Du(r,i,u[p++],u[p++],u[p],u[p+1],d,f,KM),r=u[p++],i=u[p++];break;case BM.A:var g=u[p++],_=u[p++],v=u[p++],y=u[p++],b=u[p++],x=u[p++];p+=1;var S=!!(1-u[p++]);s=Math.cos(b)*v+g,c=Math.sin(b)*y+_,p<=1&&(a=s,o=c);var C=(d-g)*y/v+g;h=UM(g,_,y,b,b+x,S,C,f,KM),r=Math.cos(b+x)*v+g,i=Math.sin(b+x)*y+_;break;case BM.R:a=r=u[p++],o=i=u[p++];var w=u[p++],T=u[p++];h=GM(a,o,w,T,d,f,KM);break;case BM.Z:h=WM(r,i,a,o,d,f,KM,!0),r=a,i=o;break}h<l&&(l=h,n.set(KM[0],KM[1]))}return l}var YM=new J,XM=new J,ZM=new J,QM=new J,$M=new J;function eN(e,t){if(e){var n=e.getTextGuideLine(),r=e.getTextContent();if(r&&n){var i=e.textGuideLineConfig||{},a=[[0,0],[0,0],[0,0]],o=i.candidates||VM,s=r.getBoundingRect().clone();s.applyTransform(r.getComputedTransform());var c=1/0,l=i.anchor,u=e.getComputedTransform(),d=u&&ml([],u),f=t.get(`length2`)||0;l&&ZM.copy(l);for(var p=0;p<o.length;p++){var m=o[p];HM(m,0,s,YM,QM),J.scaleAndAdd(XM,YM,QM,f),XM.transform(d);var h=e.getBoundingRect(),g=l?l.distance(XM):e instanceof Bg?JM(XM,e.path,ZM):qM(XM,h,ZM);g<c&&(c=g,XM.transform(u),ZM.transform(u),ZM.toArray(a[0]),XM.toArray(a[1]),YM.toArray(a[2]))}rN(a,t.get(`minTurnAngle`)),n.setShape({points:a})}}}var tN=[],nN=new J;function rN(e,t){if(t<=180&&t>0){t=t/180*Math.PI,YM.fromArray(e[0]),XM.fromArray(e[1]),ZM.fromArray(e[2]),J.sub(QM,YM,XM),J.sub($M,ZM,XM);var n=QM.len(),r=$M.len();if(!(n<.001||r<.001)){QM.scale(1/n),$M.scale(1/r);var i=QM.dot($M);if(Math.cos(t)<i){var a=WM(XM.x,XM.y,ZM.x,ZM.y,YM.x,YM.y,tN,!1);nN.fromArray(tN),nN.scaleAndAdd($M,a/Math.tan(Math.PI-t));var o=ZM.x===XM.x?(nN.y-XM.y)/(ZM.y-XM.y):(nN.x-XM.x)/(ZM.x-XM.x);if(isNaN(o))return;o<0?J.copy(nN,XM):o>1&&J.copy(nN,ZM),nN.toArray(e[1])}}}}function iN(e,t,n){if(n<=180&&n>0){n=n/180*Math.PI,YM.fromArray(e[0]),XM.fromArray(e[1]),ZM.fromArray(e[2]),J.sub(QM,XM,YM),J.sub($M,ZM,XM);var r=QM.len(),i=$M.len();if(!(r<.001||i<.001)&&(QM.scale(1/r),$M.scale(1/i),QM.dot(t)<Math.cos(n))){var a=WM(XM.x,XM.y,ZM.x,ZM.y,YM.x,YM.y,tN,!1);nN.fromArray(tN);var o=Math.PI/2,s=o+Math.acos($M.dot(t))-n;if(s>=o)J.copy(nN,ZM);else{nN.scaleAndAdd($M,a/Math.tan(Math.PI/2-s));var c=ZM.x===XM.x?(nN.y-XM.y)/(ZM.y-XM.y):(nN.x-XM.x)/(ZM.x-XM.x);if(isNaN(c))return;c<0?J.copy(nN,XM):c>1&&J.copy(nN,ZM)}nN.toArray(e[1])}}}function aN(e,t,n,r){var i=n===`normal`,a=i?e:e.ensureState(n);a.ignore=t;var o=r.get(`smooth`);o&&o===!0&&(o=.3),a.shape=a.shape||{},o>0&&(a.shape.smooth=o);var s=r.getModel(`lineStyle`).getLineStyle();i?e.useStyle(s):a.style=s}function oN(e,t){var n=t.smooth,r=t.points;if(r)if(e.moveTo(r[0][0],r[0][1]),n>0&&r.length>=3){var i=xc(r[0],r[1]),a=xc(r[1],r[2]);if(!i||!a){e.lineTo(r[1][0],r[1][1]),e.lineTo(r[2][0],r[2][1]);return}var o=Math.min(i,a)*n,s=wc([],r[1],r[0],o/i),c=wc([],r[1],r[2],o/a),l=wc([],s,c,.5);e.bezierCurveTo(s[0],s[1],s[0],s[1],l[0],l[1]),e.bezierCurveTo(c[0],c[1],c[0],c[1],r[2][0],r[2][1])}else for(var u=1;u<r.length;u++)e.lineTo(r[u][0],r[u][1])}function sN(e,t,n){var r=e.getTextGuideLine(),i=e.getTextContent();if(!i){r&&e.removeTextGuideLine();return}for(var a=t.normal,o=a.get(`show`),s=i.ignore,c=0;c<E_.length;c++){var l=E_[c],u=t[l],d=l===`normal`;if(u){var f=u.get(`show`);if((d?s:W(i.states[l]&&i.states[l].ignore,s))||!W(f,o)){var p=d?r:r&&r.states[l];p&&(p.ignore=!0),r&&aN(r,!0,l,u);continue}r||(r=new Cy,e.setTextGuideLine(r),!d&&(s||!o)&&aN(r,!0,`normal`,t.normal),e.stateProxy&&(r.stateProxy=e.stateProxy)),aN(r,!1,l,u)}}if(r){I(r.style,n),r.style.fill=null;var m=a.get(`showAbove`),h=e.textGuideLineConfig=e.textGuideLineConfig||{};h.showAbove=m||!1,r.buildPath=oN}}function cN(e,t){t||=`labelLine`;for(var n={normal:e.getModel(t)},r=0;r<T_.length;r++){var i=T_[r];n[i]=e.getModel([i,t])}return n}var lN=[`label`,`labelLine`,`layoutOption`,`priority`,`defaultAttr`,`marginForce`,`minMarginForce`,`marginDefault`,`suggestIgnore`],uN=1,dN=2,fN=uN|dN;function pN(e,t,n){n||=fN,t?e.dirty|=n:e.dirty&=~n}function mN(e,t){return t||=fN,e.dirty==null||!!(e.dirty&t)}function hN(e){if(e)return mN(e)&&gN(e,e.label,e),e}function gN(e,t,n){var r=t.getComputedTransform();e.transform=kb(e.transform,r);var i=e.localRect=Ob(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=Yb.textMargin);for(var d=0;d<4;d++)_N[d]=u===Yb.minMargin&&c&&c[d]!=null?c[d]:s&&s[d]!=null?s[d]:o?o[d]:0;u===Yb.textMargin&&bb(i,_N,!1,!1);var f=e.rect=Ob(e.rect,i);return r&&f.applyTransform(r),u===Yb.minMargin&&bb(f,_N,!1,!1),e.axisAligned=Eb(r),(e.label=e.label||{}).ignore=t.ignore,pN(e,!1),pN(e,!0,dN),e}var _N=[0,0,0,0];function vN(e,t,n){return e.transform=kb(e.transform,n),e.localRect=Ob(e.localRect,t),e.rect=Ob(e.rect,t),n&&e.rect.applyTransform(n),e.axisAligned=Eb(n),e.obb=void 0,(e.label=e.label||{}).ignore=!1,e}function yN(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 bN(e,t){for(var n=0;n<lN.length;n++){var r=lN[n];e[r]??(e[r]=t[r])}return hN(e)}function xN(e){var t=e.obb;return(!t||mN(e,dN))&&(e.obb=t||=new By,t.fromBoundingRect(e.localRect,e.transform),pN(e,!1,dN)),t}function SN(e,t,n,r,i){var a=e.length,o=$y[t],s=eb[t];if(a<2)return!1;e.sort(function(e,t){return e.rect[o]-t.rect[o]});for(var c=0,l,u=!1,d=0,f=0;f<a;f++){var p=e[f],m=p.rect;l=m[o]-c,l<0&&(m[o]-=l,p.label[o]-=l,u=!0);var h=Math.max(-l,0);d+=h,c=m[o]+m[s]}d>0&&i&&S(-d/a,0,a);var g=e[0],_=e[a-1],v,y;b(),v<0&&C(-v,.8),y<0&&C(y,.8),b(),x(v,y,1),x(y,v,-1),b(),v<0&&w(-v),y<0&&w(y);function b(){v=g.rect[o]-n,y=r-_.rect[o]-_.rect[s]}function x(e,t,n){if(e<0){var r=Math.min(t,-e);if(r>0){S(r*n,0,a);var i=r+e;i<0&&C(-i*n,1)}else C(-e*n,1)}}function S(t,n,r){t!==0&&(u=!0);for(var i=n;i<r;i++){var a=e[i],s=a.rect;s[o]+=t,a.label[o]+=t}}function C(t,n){for(var r=[],i=0,c=1;c<a;c++){var l=e[c-1].rect,u=Math.max(e[c].rect[o]-l[o]-l[s],0);r.push(u),i+=u}if(i){var d=Math.min(Math.abs(t)/i,n);if(t>0)for(var c=0;c<a-1;c++){var f=r[c]*d;S(f,0,c+1)}else for(var c=a-1;c>0;c--){var f=r[c-1]*d;S(-f,c,a)}}}function w(e){var t=e<0?-1:1;e=Math.abs(e);for(var n=Math.ceil(e/(a-1)),r=0;r<a-1;r++)if(t>0?S(n,0,r+1):S(-n,a-r-1,a),e-=n,e<=0)return}return u}function CN(e){for(var t=0;t<e.length;t++){var n=e[t],r=n.defaultAttr,i=n.labelLine;n.label.attr(`ignore`,r.ignore),i&&i.attr(`ignore`,r.labelGuideIgnore)}}function wN(e){var t=[];e.sort(function(e,t){return!!t.suggestIgnore-+!!e.suggestIgnore||t.priority-e.priority});function n(e){if(!e.ignore){var t=e.ensureState(`emphasis`);t.ignore??=!1}e.ignore=!0}for(var r=0;r<e.length;r++){var i=hN(e[r]);if(!i.label.ignore){for(var a=i.label,o=i.labelLine,s=!1,c=0;c<t.length;c++)if(TN(i,t[c],null,{touchThreshold:.05})){s=!0;break}s?(n(a),o&&n(o)):t.push(i)}}}function TN(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:xN(e).intersect(xN(t),n,r)}function EN(e){if(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n].slice());return t}}function DN(e,t){var n=e.label,r=t&&t.getTextGuideLine();return{dataIndex:e.dataIndex,dataType:e.dataType,seriesIndex:e.seriesModel.seriesIndex,text:e.label.style.text,rect:e.hostRect,labelRect:e.rect,align:n.style.align,verticalAlign:n.style.verticalAlign,labelLinePoints:EN(r&&r.shape.points)}}var ON=[`align`,`verticalAlign`,`width`,`height`,`fontSize`],kN=new Af,AN=Cm(),jN=Cm();function MN(e,t,n){for(var r=0;r<n.length;r++){var i=n[r];t[i]!=null&&(e[i]=t[i])}}var NN=[`x`,`y`,`rotation`],PN=function(){function e(){this._labelList=[],this._chartViewList=[]}return e.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},e.prototype._addLabel=function(e,t,n,r,i){var a=r.style,o=r.__hostTarget.textConfig||{},s=r.getComputedTransform(),c=r.getBoundingRect().plain();Ol.applyTransform(c,c,s),s?kN.setLocalTransform(s):(kN.x=kN.y=kN.rotation=kN.originX=kN.originY=0,kN.scaleX=kN.scaleY=1),kN.rotation=bg(kN.rotation);var l=r.__hostTarget,u;if(l){u=l.getBoundingRect().plain();var d=l.getComputedTransform();Ol.applyTransform(u,u,d)}var f=u&&l.getTextGuideLine();this._labelList.push({label:r,labelLine:f,seriesModel:n,dataIndex:e,dataType:t,layoutOptionOrCb:i,layoutOption:null,rect:c,hostRect:u,priority:u?u.width*u.height:0,defaultAttr:{ignore:r.ignore,labelGuideIgnore:f&&f.ignore,x:kN.x,y:kN.y,scaleX:kN.scaleX,scaleY:kN.scaleY,rotation:kN.rotation,style:{x:a.x,y:a.y,align:a.align,verticalAlign:a.verticalAlign,width:a.width,height:a.height,fontSize:a.fontSize},cursor:r.cursor,attachedPos:o.position,attachedRot:o.rotation}})},e.prototype.addLabelsOfSeries=function(e){var t=this;this._chartViewList.push(e);var n=e.__model,r=n.get(`labelLayout`);(V(r)||Ls(r).length)&&e.group.traverse(function(e){if(e.ignore)return!0;var i=e.getTextContent(),a=y_(e);i&&!i.disableLabelLayout&&t._addLabel(a.dataIndex,a.dataType,n,i,r)})},e.prototype.updateLayoutConfig=function(e){var t=e.getWidth(),n=e.getHeight();function r(e,t){return function(){eN(e,t)}}for(var i=0;i<this._labelList.length;i++){var a=this._labelList[i],o=a.label,s=o.__hostTarget,c=a.defaultAttr,l=void 0;l=V(a.layoutOptionOrCb)?a.layoutOptionOrCb(DN(a,s)):a.layoutOptionOrCb,l||={},a.layoutOption=l;var u=Math.PI/180;s&&s.setTextConfig({local:!1,position:l.x!=null||l.y!=null?null:c.attachedPos,rotation:l.rotate==null?c.attachedRot:l.rotate*u,offset:[l.dx||0,l.dy||0]});var d=!1;if(l.x==null?(o.x=c.x,o.setStyle(`x`,c.style.x)):(o.x=X(l.x,t),o.setStyle(`x`,0),d=!0),l.y==null?(o.y=c.y,o.setStyle(`y`,c.style.y)):(o.y=X(l.y,n),o.setStyle(`y`,0),d=!0),l.labelLinePoints){var f=s.getTextGuideLine();f&&(f.setShape({points:l.labelLinePoints}),d=!1)}var p=AN(o);p.needsUpdateLabelLine=d,o.rotation=l.rotate==null?c.rotation:l.rotate*u,o.scaleX=c.scaleX,o.scaleY=c.scaleY;for(var m=0;m<ON.length;m++){var h=ON[m];o.setStyle(h,l[h]==null?c.style[h]:l[h])}if(l.draggable){if(o.draggable=!0,o.cursor=`move`,s){var g=a.seriesModel;a.dataIndex!=null&&(g=a.seriesModel.getData(a.dataType).getItemModel(a.dataIndex)),o.on(`drag`,r(s,g.getModel(`labelLine`)))}}else o.off(`drag`),o.cursor=c.cursor}},e.prototype.layout=function(e){var t=e.getWidth(),n=e.getHeight(),r=[];L(this._labelList,function(e){e.defaultAttr.ignore||r.push(bN({},e))});var i=Fs(r,function(e){return e.layoutOption.moveOverlap===`shiftX`}),a=Fs(r,function(e){return e.layoutOption.moveOverlap===`shiftY`});SN(i,0,0,t),SN(a,1,0,n);var o=Fs(r,function(e){return e.layoutOption.hideOverlap});CN(o),wN(o)},e.prototype.processLabelsOverall=function(){var e=this;L(this._chartViewList,function(t){var n=t.__model,r=t.ignoreLabelLineUpdate,i=n.isAnimationEnabled();t.group.traverse(function(t){if(t.ignore&&!t.forceLabelAnimation)return!0;var a=!r,o=t.getTextContent();!a&&o&&(a=AN(o).needsUpdateLabelLine),a&&e._updateLabelLine(t,n),i&&e._animateLabels(t,n)})})},e.prototype._updateLabelLine=function(e,t){var n=e.getTextContent(),r=y_(e),i=r.dataIndex;if(n&&i!=null){var a=t.getData(r.dataType),o=a.getItemModel(i),s={},c=a.getItemVisual(i,`style`);c&&(s.stroke=c[a.getVisual(`drawType`)]);var l=o.getModel(`labelLine`);sN(e,cN(o),s),eN(e,l)}},e.prototype._animateLabels=function(e,t){var n=e.getTextContent(),r=e.getTextGuideLine();if(n&&(e.forceLabelAnimation||!n.ignore&&!n.invisible&&!e.disableLabelAnimation&&!Ky(e))){var i=AN(n),a=i.oldLayout,o=y_(e),s=o.dataIndex,c={x:n.x,y:n.y,rotation:n.rotation},l=t.getData(o.dataType);if(a){n.attr(a);var u=e.prevStates;u&&(js(u,`select`)>=0&&n.attr(i.oldLayoutSelect),js(u,`emphasis`)>=0&&n.attr(i.oldLayoutEmphasis)),Wy(n,c,t,s)}else if(n.attr(c),!Kb(n).valueAnimation){var d=W(n.style.opacity,1);n.style.opacity=0,Gy(n,{style:{opacity:d}},t,s)}if(i.oldLayout=c,n.states.select){var f=i.oldLayoutSelect={};MN(f,c,NN),MN(f,n.states.select,NN)}if(n.states.emphasis){var p=i.oldLayoutEmphasis={};MN(p,c,NN),MN(p,n.states.emphasis,NN)}Jb(n,s,l,t,t)}if(r&&!r.ignore&&!r.invisible){var i=jN(r),a=i.oldLayout,m={points:r.shape.points};a?(r.attr({shape:a}),Wy(r,{shape:m},t)):(r.setShape(m),r.style.strokePercent=0,Gy(r,{style:{strokePercent:1}},t)),i.oldLayout=m}},e}(),FN=Cm();function IN(e){e.registerUpdateLifecycle(`series:beforeupdate`,function(e,t,n){var r=FN(t).labelManager;r||=FN(t).labelManager=new PN,r.clearLabels()}),e.registerUpdateLifecycle(`series:layoutlabels`,function(e,t,n){var r=FN(t).labelManager;n.updatedSeries.forEach(function(e){r.addLabelsOfSeries(t.getViewOfSeriesModel(e))}),r.updateLayoutConfig(t),r.layout(t),r.processLabelsOverall()})}var LN=Math.sin,RN=Math.cos,zN=Math.PI,BN=Math.PI*2,VN=180/zN,HN=function(){function e(){}return e.prototype.reset=function(e){this._start=!0,this._d=[],this._str=``,this._p=10**(e||4)},e.prototype.moveTo=function(e,t){this._add(`M`,e,t)},e.prototype.lineTo=function(e,t){this._add(`L`,e,t)},e.prototype.bezierCurveTo=function(e,t,n,r,i,a){this._add(`C`,e,t,n,r,i,a)},e.prototype.quadraticCurveTo=function(e,t,n,r){this._add(`Q`,e,t,n,r)},e.prototype.arc=function(e,t,n,r,i,a){this.ellipse(e,t,n,n,0,r,i,a)},e.prototype.ellipse=function(e,t,n,r,i,a,o,s){var c=o-a,l=!s,u=Math.abs(c),d=cd(u-BN)||(l?c>=BN:-c>=BN),f=c>0?c%BN:c%BN+BN,p=!1;p=d?!0:cd(u)?!1:f>=zN==!!l;var m=e+n*RN(a),h=t+r*LN(a);this._start&&this._add(`M`,m,h);var g=Math.round(i*VN);if(d){var _=1/this._p,v=(l?1:-1)*(BN-_);this._add(`A`,n,r,g,1,+l,e+n*RN(a+v),t+r*LN(a+v)),_>.01&&this._add(`A`,n,r,g,0,+l,m,h)}else{var y=e+n*RN(o),b=t+r*LN(o);this._add(`A`,n,r,g,+p,+l,y,b)}},e.prototype.rect=function(e,t,n,r){this._add(`M`,e,t),this._add(`l`,n,0),this._add(`l`,0,r),this._add(`l`,-n,0),this._add(`Z`)},e.prototype.closePath=function(){this._d.length>0&&this._add(`Z`)},e.prototype._add=function(e,t,n,r,i,a,o,s,c){for(var l=[],u=this._p,d=1;d<arguments.length;d++){var f=arguments[d];if(isNaN(f)){this._invalid=!0;return}l.push(Math.round(f*u)/u)}this._d.push(e+l.join(` `)),this._start=e===`Z`},e.prototype.generateStr=function(){this._str=this._invalid?``:this._d.join(``),this._d=[]},e.prototype.getStr=function(){return this._str},e}(),UN=`none`,Hne=Math.round;function WN(e){var t=e.fill;return t!=null&&t!==UN}function GN(e){var t=e.stroke;return t!=null&&t!==UN}var KN=[`lineCap`,`miterLimit`,`lineJoin`],qN=R(KN,function(e){return`stroke-`+e.toLowerCase()});function JN(e,t,n,r){var i=t.opacity==null?1:t.opacity;if(n instanceof Kg){e(`opacity`,i);return}if(WN(t)){var a=od(t.fill);e(`fill`,a.color);var o=t.fillOpacity==null?a.opacity*i:t.fillOpacity*a.opacity*i;(r||o<1)&&e(`fill-opacity`,o)}else e(`fill`,UN);if(GN(t)){var s=od(t.stroke);e(`stroke`,s.color);var c=t.strokeNoScale?n.getLineScale():1,l=c?(t.lineWidth||0)/c:0,u=t.strokeOpacity==null?s.opacity*i:t.strokeOpacity*s.opacity*i,d=t.strokeFirst;if((r||l!==1)&&e(`stroke-width`,l),(r||d)&&e(`paint-order`,d?`stroke`:`fill`),(r||u<1)&&e(`stroke-opacity`,u),t.lineDash){var f=lD(n),p=f[0],m=f[1];p&&(m=Hne(m||0),e(`stroke-dasharray`,p.join(`,`)),(m||r)&&e(`stroke-dashoffset`,m))}else r&&e(`stroke-dasharray`,UN);for(var h=0;h<KN.length;h++){var g=KN[h];if(r||t[g]!==Lg[g]){var _=t[g]||Lg[g];_&&e(qN[h],_)}}}else r&&e(`stroke`,UN)}var YN=`http://www.w3.org/2000/svg`,XN=`http://www.w3.org/1999/xlink`,ZN=`http://www.w3.org/2000/xmlns/`,QN=`http://www.w3.org/XML/1998/namespace`,$N=`ecmeta_`;function eP(e){return document.createElementNS(YN,e)}function tP(e,t,n,r,i){return{tag:e,attrs:n||{},children:r,text:i,key:t}}function nP(e,t){var n=[];if(t)for(var r in t){var i=t[r],a=r;i!==!1&&(i!==!0&&i!=null&&(a+=`="`+i+`"`),n.push(a))}return`<`+e+` `+n.join(` `)+`>`}function rP(e){return`</`+e+`>`}function iP(e,t){t||={};var n=t.newline?`
|
|
64
|
-
`:``;function r(e){var t=e.children,i=e.tag,a=e.attrs,o=e.text;return nP(i,a)+(i===`style`?o||``:Wc(o))+(t?``+n+R(t,function(e){return r(e)}).join(n)+n:``)+rP(i)}return r(e)}function aP(e,t,n){n||={};var r=n.newline?`
|
|
65
|
-
`:``,i=` {`+r,a=r+`}`,o=R(Ls(e),function(t){return t+i+R(Ls(e[t]),function(n){return n+`:`+e[t][n]+`;`}).join(r)+a}).join(r),s=R(Ls(t),function(e){return`@keyframes `+e+i+R(Ls(t[e]),function(n){return n+i+R(Ls(t[e][n]),function(r){var i=t[e][n][r];return r===`d`&&(i=`path("`+i+`")`),r+`:`+i+`;`}).join(r)+a}).join(r)+a}).join(r);return!o&&!s?``:[`<![CDATA[`,o,s,`]]>`].join(r)}function oP(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function sP(e,t,n,r){return tP(`svg`,`root`,{width:e,height:t,xmlns:YN,"xmlns:xlink":XN,version:`1.1`,baseProfile:`full`,viewBox:r?`0 0 `+e+` `+t:!1},n)}var cP=0;function lP(){return cP++}var uP={cubicIn:`0.32,0,0.67,0`,cubicOut:`0.33,1,0.68,1`,cubicInOut:`0.65,0,0.35,1`,quadraticIn:`0.11,0,0.5,0`,quadraticOut:`0.5,1,0.89,1`,quadraticInOut:`0.45,0,0.55,1`,quarticIn:`0.5,0,0.75,0`,quarticOut:`0.25,1,0.5,1`,quarticInOut:`0.76,0,0.24,1`,quinticIn:`0.64,0,0.78,0`,quinticOut:`0.22,1,0.36,1`,quinticInOut:`0.83,0,0.17,1`,sinusoidalIn:`0.12,0,0.39,0`,sinusoidalOut:`0.61,1,0.88,1`,sinusoidalInOut:`0.37,0,0.63,1`,exponentialIn:`0.7,0,0.84,0`,exponentialOut:`0.16,1,0.3,1`,exponentialInOut:`0.87,0,0.13,1`,circularIn:`0.55,0,1,0.45`,circularOut:`0,0.55,0.45,1`,circularInOut:`0.85,0,0.15,1`},dP=`transform-origin`;function fP(e,t,n){var r=F({},e.shape);F(r,t),e.buildPath(n,r);var i=new HN;return i.reset(Cd(e)),n.rebuildPath(i,1),i.generateStr(),i.getStr()}function pP(e,t){var n=t.originX,r=t.originY;(n||r)&&(e[dP]=n+`px `+r+`px`)}var mP={fill:`fill`,opacity:`opacity`,lineWidth:`stroke-width`,lineDashOffset:`stroke-dashoffset`};function hP(e,t){var n=t.zrId+`-ani-`+ t.cssAnimIdx++;return t.cssAnims[n]=e,n}function gP(e,t,n){var r=e.shape.paths,i={},a,o;if(L(r,function(e){var t=oP(n.zrId);t.animation=!0,vP(e,{},t,!0);var r=t.cssAnims,s=t.cssNodes,c=Ls(r),l=c.length;if(l){o=c[l-1];var u=r[o];for(var d in u){var f=u[d];i[d]=i[d]||{d:``},i[d].d+=f.d||``}for(var p in s){var m=s[p].animation;m.indexOf(o)>=0&&(a=m)}}}),a){t.d=!1;var s=hP(i,n);return a.replace(o,s)}}function _P(e){return H(e)?uP[e]?`cubic-bezier(`+uP[e]+`)`:ku(e)?e:``:``}function vP(e,t,n,r){var i=e.animators,a=i.length,o=[];if(e instanceof ky){var s=gP(e,t,n);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var c={},l=0;l<a;l++){var u=i[l],d=[u.getMaxTime()/1e3+`s`],f=_P(u.getClip().easing),p=u.getDelay();f?d.push(f):d.push(`linear`),p&&d.push(p/1e3+`s`),u.getLoop()&&d.push(`infinite`);var m=d.join(` `);c[m]=c[m]||[m,[]],c[m][1].push(u)}function h(i){var a=i[1],o=a.length,s={},c={},l={},u=`animation-timing-function`;function d(e,t,n){for(var r=e.getTracks(),i=e.getMaxTime(),a=0;a<r.length;a++){var o=r[a];if(o.needsAnimate()){var s=o.keyframes,c=o.propName;if(n&&(c=n(c)),c)for(var l=0;l<s.length;l++){var d=s[l],f=Math.round(d.time/i*100)+`%`,p=_P(d.easing),m=d.rawValue;(H(m)||Bs(m))&&(t[f]=t[f]||{},t[f][c]=d.rawValue,p&&(t[f][u]=p))}}}}for(var f=0;f<o;f++){var p=a[f],m=p.targetName;m?m===`shape`&&d(p,c):!r&&d(p,s)}for(var h in s){var g={};Mf(g,e),F(g,s[h]);var _=wd(g),v=s[h][u];l[h]=_?{transform:_}:{},pP(l[h],g),v&&(l[h][u]=v)}var y,b=!0;for(var h in c){l[h]=l[h]||{};var x=!y,v=c[h][u];x&&(y=new hg);var S=y.len();y.reset(),l[h].d=fP(e,c[h],y);var C=y.len();if(!x&&S!==C){b=!1;break}v&&(l[h][u]=v)}if(!b)for(var h in l)delete l[h].d;if(!r)for(var f=0;f<o;f++){var p=a[f],m=p.targetName;m===`style`&&d(p,l,function(e){return mP[e]})}for(var w=Ls(l),T=!0,E,f=1;f<w.length;f++){var D=w[f-1],O=w[f];if(l[D][dP]!==l[O][dP]){T=!1;break}E=l[D][dP]}if(T&&E){for(var h in l)l[h][dP]&&delete l[h][dP];t[dP]=E}if(Fs(w,function(e){return Ls(l[e]).length>0}).length)return hP(l,n)+` `+i[0]+` both`}for(var g in c){var s=h(c[g]);s&&o.push(s)}if(o.length){var _=n.zrId+`-cls-`+lP();n.cssNodes[`.`+_]={animation:o.join(`,`)},t.class=_}}function yP(e,t,n){if(!e.ignore)if(e.isSilent()){var r={"pointer-events":`none`};bP(r,t,n,!0)}else{var i=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},a=i.fill;if(!a){var o=e.style&&e.style.fill,s=e.states.select&&e.states.select.style&&e.states.select.style.fill,c=e.currentStates.indexOf(`select`)>=0&&s||o;c&&(a=id(c))}var l=i.lineWidth;if(l){var u=!i.strokeNoScale&&e.transform?e.transform[0]:1;l/=u}var r={cursor:`pointer`};a&&(r.fill=a),i.stroke&&(r.stroke=i.stroke),l&&(r[`stroke-width`]=l),bP(r,t,n,!0)}}function bP(e,t,n,r){var i=JSON.stringify(e),a=n.cssStyleCache[i];a||(a=n.zrId+`-cls-`+lP(),n.cssStyleCache[i]=a,n.cssNodes[`.`+a+(r?`:hover`:``)]=e),t.class=t.class?t.class+` `+a:a}var xP=Math.round;function SP(e){return e&&H(e.src)}function CP(e){return e&&V(e.toDataURL)}function wP(e,t,n,r){JN(function(i,a){var o=i===`fill`||i===`stroke`;o&&xd(a)?zP(t,e,i,r):o&&vd(a)?BP(n,e,i,r):e[i]=a,o&&r.ssr&&a===`none`&&(e[`pointer-events`]=`visible`)},t,n,!1),RP(n,e,r)}function TP(e,t){var n=hp(t);n&&(n.each(function(t,n){t!=null&&(e[(`ecmeta_`+n).toLowerCase()]=t+``)}),t.isSilent()&&(e[$N+`silent`]=`true`))}function EP(e){return cd(e[0]-1)&&cd(e[1])&&cd(e[2])&&cd(e[3]-1)}function DP(e){return cd(e[4])&&cd(e[5])}function OP(e,t,n){if(t&&!(DP(t)&&EP(t))){var r=n?10:1e4;e.transform=EP(t)?`translate(`+xP(t[4]*r)/r+` `+xP(t[5]*r)/r+`)`:dd(t)}}function kP(e,t,n){for(var r=e.points,i=[],a=0;a<r.length;a++)i.push(xP(r[a][0]*n)/n),i.push(xP(r[a][1]*n)/n);t.points=i.join(` `)}function AP(e){return!e.smooth}function jP(e){var t=R(e,function(e){return typeof e==`string`?[e,e]:e});return function(e,n,r){for(var i=0;i<t.length;i++){var a=t[i],o=e[a[0]];o!=null&&(n[a[1]]=xP(o*r)/r)}}}var MP={circle:[jP([`cx`,`cy`,`r`])],polyline:[kP,AP],polygon:[kP,AP]};function NP(e){for(var t=e.animators,n=0;n<t.length;n++)if(t[n].targetName===`shape`)return!0;return!1}function PP(e,t){var n=e.style,r=e.shape,i=MP[e.type],a={},o=t.animation,s=`path`,c=e.style.strokePercent,l=t.compress&&Cd(e)||4;if(i&&!t.willUpdate&&!(i[1]&&!i[1](r))&&!(o&&NP(e))&&!(c<1)){s=e.type;var u=10**l;i[0](r,a,u)}else{var d=!e.path||e.shapeChanged();e.path||e.createPathProxy();var f=e.path;d&&(f.beginPath(),e.buildPath(f,e.shape),e.pathUpdated());var p=f.getVersion(),m=e,h=m.__svgPathBuilder;(m.__svgPathVersion!==p||!h||c!==m.__svgPathStrokePercent)&&(h||=m.__svgPathBuilder=new HN,h.reset(l),f.rebuildPath(h,c),h.generateStr(),m.__svgPathVersion=p,m.__svgPathStrokePercent=c),a.d=h.getStr()}return OP(a,e.transform),wP(a,n,e,t),TP(a,e),t.animation&&vP(e,a,t),t.emphasis&&yP(e,a,t),tP(s,e.id+``,a)}function FP(e,t){var n=e.style,r=n.image;if(r&&!H(r)&&(SP(r)?r=r.src:CP(r)&&(r=r.toDataURL())),r){var i=n.x||0,a=n.y||0,o=n.width,s=n.height,c={href:r,width:o,height:s};return i&&(c.x=i),a&&(c.y=a),OP(c,e.transform),wP(c,n,e,t),TP(c,e),t.animation&&vP(e,c,t),tP(`image`,e.id+``,c)}}function IP(e,t){var n=e.style,r=n.text;if(r!=null&&(r+=``),!(!r||isNaN(n.x)||isNaN(n.y))){var i=n.font||`12px sans-serif`,a=n.x||0,o=pd(n.y||0,Wf(i),n.textBaseline),s={"dominant-baseline":`central`,"text-anchor":fd[n.textAlign]||n.textAlign};if(d_(n)){var c=``,l=n.fontStyle,u=l_(n.fontSize);if(!parseFloat(u))return;var d=n.fontFamily||`sans-serif`,f=n.fontWeight;c+=`font-size:`+u+`;font-family:`+d+`;`,l&&l!==`normal`&&(c+=`font-style:`+l+`;`),f&&f!==`normal`&&(c+=`font-weight:`+f+`;`),s.style=c}else s.style=`font: `+i;return r.match(/\s/)&&(s[`xml:space`]=`preserve`),a&&(s.x=a),o&&(s.y=o),OP(s,e.transform),wP(s,n,e,t),TP(s,e),t.animation&&vP(e,s,t),tP(`text`,e.id+``,s,void 0,r)}}function LP(e,t){if(e instanceof Bg)return PP(e,t);if(e instanceof Kg)return FP(e,t);if(e instanceof Hg)return IP(e,t)}function RP(e,t,n){var r=e.style;if(md(r)){var i=hd(e),a=n.shadowCache,o=a[i];if(!o){var s=e.getGlobalScale(),c=s[0],l=s[1];if(!c||!l)return;var u=r.shadowOffsetX||0,d=r.shadowOffsetY||0,f=r.shadowBlur,p=od(r.shadowColor),m=p.opacity,h=p.color,g=f/2/c,_=f/2/l,v=g+` `+_;o=n.zrId+`-s`+ n.shadowIdx++,n.defs[o]=tP(`filter`,o,{id:o,x:`-100%`,y:`-100%`,width:`300%`,height:`300%`},[tP(`feDropShadow`,``,{dx:u/c,dy:d/l,stdDeviation:v,"flood-color":h,"flood-opacity":m})]),a[i]=o}t.filter=Sd(o)}}function zP(e,t,n,r){var i=e[n],a,o={gradientUnits:i.global?`userSpaceOnUse`:`objectBoundingBox`};if(yd(i))a=`linearGradient`,o.x1=i.x,o.y1=i.y,o.x2=i.x2,o.y2=i.y2;else if(bd(i))a=`radialGradient`,o.cx=W(i.x,.5),o.cy=W(i.y,.5),o.r=W(i.r,.5);else{process.env.NODE_ENV!==`production`&&Os(`Illegal gradient type.`);return}for(var s=i.colorStops,c=[],l=0,u=s.length;l<u;++l){var d=ud(s[l].offset)*100+`%`,f=s[l].color,p=od(f),m=p.color,h=p.opacity,g={offset:d};g[`stop-color`]=m,h<1&&(g[`stop-opacity`]=h),c.push(tP(`stop`,l+``,g))}var _=iP(tP(a,``,o,c)),v=r.gradientCache,y=v[_];y||(y=r.zrId+`-g`+ r.gradientIdx++,v[_]=y,o.id=y,r.defs[y]=tP(a,y,o,c)),t[n]=Sd(y)}function BP(e,t,n,r){var i=e.style[n],a=e.getBoundingRect(),o={},s=i.repeat,c=s===`no-repeat`,l=s===`repeat-x`,u=s===`repeat-y`,d;if(gd(i)){var f=i.imageWidth,p=i.imageHeight,m=void 0,h=i.image;if(H(h)?m=h:SP(h)?m=h.src:CP(h)&&(m=h.toDataURL()),typeof Image>`u`){var g=`Image width/height must been given explictly in svg-ssr renderer.`;G(f,g),G(p,g)}else if(f==null||p==null){var _=function(e,t){if(e){var n=e.elm,r=f||t.width,i=p||t.height;e.tag===`pattern`&&(l?(i=1,r/=a.width):u&&(r=1,i/=a.height)),e.attrs.width=r,e.attrs.height=i,n&&(n.setAttribute(`width`,r),n.setAttribute(`height`,i))}},v=nh(m,null,e,function(e){c||_(S,e),_(d,e)});v&&v.width&&v.height&&(f||=v.width,p||=v.height)}d=tP(`image`,`img`,{href:m,width:f,height:p}),o.width=f,o.height=p}else i.svgElement&&(d=P(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(d){var y,b;c?y=b=1:l?(b=1,y=o.width/a.width):u?(y=1,b=o.height/a.height):o.patternUnits=`userSpaceOnUse`,y!=null&&!isNaN(y)&&(o.width=y),b!=null&&!isNaN(b)&&(o.height=b);var x=wd(i);x&&(o.patternTransform=x);var S=tP(`pattern`,``,o,[d]),C=iP(S),w=r.patternCache,T=w[C];T||(T=r.zrId+`-p`+ r.patternIdx++,w[C]=T,o.id=T,S=r.defs[T]=tP(`pattern`,T,o,[d])),t[n]=Sd(T)}}function VP(e,t,n){var r=n.clipPathCache,i=n.defs,a=r[e.id];if(!a){a=n.zrId+`-c`+ n.clipPathIdx++;var o={id:a};r[e.id]=a,i[a]=tP(`clipPath`,a,o,[PP(e,n)])}t[`clip-path`]=Sd(a)}function HP(e){return document.createTextNode(e)}function UP(e,t,n){e.insertBefore(t,n)}function WP(e,t){e.removeChild(t)}function GP(e,t){e.appendChild(t)}function KP(e){return e.parentNode}function qP(e){return e.nextSibling}function JP(e,t){e.textContent=t}var YP=58,XP=120,ZP=tP(``,``);function QP(e){return e===void 0}function $P(e){return e!==void 0}function eF(e,t,n){for(var r={},i=t;i<=n;++i){var a=e[i].key;a!==void 0&&(process.env.NODE_ENV!==`production`&&r[a]!=null&&console.error(`Duplicate key `+a),r[a]=i)}return r}function tF(e,t){var n=e.key===t.key;return e.tag===t.tag&&n}function nF(e){var t,n=e.children,r=e.tag;if($P(r)){var i=e.elm=eP(r);if(aF(ZP,e),B(n))for(t=0;t<n.length;++t){var a=n[t];a!=null&&GP(i,nF(a))}else $P(e.text)&&!U(e.text)&&GP(i,HP(e.text))}else e.elm=HP(e.text);return e.elm}function rF(e,t,n,r,i){for(;r<=i;++r){var a=n[r];a!=null&&UP(e,nF(a),t)}}function iF(e,t,n,r){for(;n<=r;++n){var i=t[n];i!=null&&($P(i.tag)?WP(KP(i.elm),i.elm):WP(e,i.elm))}}function aF(e,t){var n,r=t.elm,i=e&&e.attrs||{},a=t.attrs||{};if(i!==a){for(n in a){var o=a[n];i[n]!==o&&(o===!0?r.setAttribute(n,``):o===!1?r.removeAttribute(n):n===`style`?r.style.cssText=o:n.charCodeAt(0)===XP?n===`xmlns:xlink`||n===`xmlns`?r.setAttributeNS(ZN,n,o):n.charCodeAt(3)===YP?r.setAttributeNS(QN,n,o):n.charCodeAt(5)===YP?r.setAttributeNS(XN,n,o):r.setAttribute(n,o):r.setAttribute(n,o))}for(n in i)n in a||r.removeAttribute(n)}}function Une(e,t,n){for(var r=0,i=0,a=t.length-1,o=t[0],s=t[a],c=n.length-1,l=n[0],u=n[c],d,f,p,m;r<=a&&i<=c;)o==null?o=t[++r]:s==null?s=t[--a]:l==null?l=n[++i]:u==null?u=n[--c]:tF(o,l)?(oF(o,l),o=t[++r],l=n[++i]):tF(s,u)?(oF(s,u),s=t[--a],u=n[--c]):tF(o,u)?(oF(o,u),UP(e,o.elm,qP(s.elm)),o=t[++r],u=n[--c]):tF(s,l)?(oF(s,l),UP(e,s.elm,o.elm),s=t[--a],l=n[++i]):(QP(d)&&(d=eF(t,r,a)),f=d[l.key],QP(f)?UP(e,nF(l),o.elm):(p=t[f],p.tag===l.tag?(oF(p,l),t[f]=void 0,UP(e,p.elm,o.elm)):UP(e,nF(l),o.elm)),l=n[++i]);(r<=a||i<=c)&&(r>a?(m=n[c+1]==null?null:n[c+1].elm,rF(e,m,n,i,c)):iF(e,t,r,a))}function oF(e,t){var n=t.elm=e.elm,r=e.children,i=t.children;e!==t&&(aF(e,t),QP(t.text)?$P(r)&&$P(i)?r!==i&&Une(n,r,i):$P(i)?($P(e.text)&&JP(n,``),rF(n,null,i,0,i.length-1)):$P(r)?iF(n,r,0,r.length-1):$P(e.text)&&JP(n,``):e.text!==t.text&&($P(r)&&iF(n,r,0,r.length-1),JP(n,t.text)))}function Wne(e,t){if(tF(e,t))oF(e,t);else{var n=e.elm,r=KP(n);nF(t),r!==null&&(UP(r,t.elm,qP(n)),iF(r,[e],0,0))}return t}var Gne=0,Kne=function(){function e(e,t,n){if(this.type=`svg`,this.refreshHover=sF(`refreshHover`),this.configLayer=sF(`configLayer`),this.storage=t,this._opts=n=F({},n),this.root=e,this._id=`zr`+ Gne++,this._oldVNode=sP(n.width,n.height),e&&!n.ssr){var r=this._viewport=document.createElement(`div`);r.style.cssText=`position:relative;overflow:hidden`;var i=this._svgDom=this._oldVNode.elm=eP(`svg`);aF(null,this._oldVNode),r.appendChild(i),e.appendChild(r)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style=`position:absolute;left:0;top:0;user-select:none`,Wne(this._oldVNode,e),this._oldVNode=e}},e.prototype.renderOneToVNode=function(e){return LP(e,oP(this._id))},e.prototype.renderToVNode=function(e){e||={};var t=this.storage.getDisplayList(!0),n=this._width,r=this._height,i=oP(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress,i.emphasis=e.emphasis,i.ssr=this._opts.ssr;var a=[],o=this._bgVNode=qne(n,r,this._backgroundColor,i);o&&a.push(o);var s=e.compress?null:this._mainVNode=tP(`g`,`main`,{},[]);this._paintList(t,i,s?s.children:a),s&&a.push(s);var c=R(Ls(i.defs),function(e){return i.defs[e]});if(c.length&&a.push(tP(`defs`,`defs`,{},c)),e.animation){var l=aP(i.cssNodes,i.cssAnims,{newline:!0});if(l){var u=tP(`style`,`stl`,{},[],l);a.push(u)}}return sP(n,r,a,e.useViewBox)},e.prototype.renderToString=function(e){return e||={},iP(this.renderToVNode({animation:W(e.cssAnimation,!0),emphasis:W(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:W(e.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(e,t,n){for(var r=e.length,i=[],a=0,o,s,c=0,l=0;l<r;l++){var u=e[l];if(!u.invisible){var d=u.__clipPaths,f=d&&d.length||0,p=s&&s.length||0,m=void 0;for(m=Math.max(f-1,p-1);m>=0&&!(d&&s&&d[m]===s[m]);m--);for(var h=p-1;h>m;h--)a--,o=i[a-1];for(var g=m+1;g<f;g++){var _={};VP(d[g],_,t);var v=tP(`g`,`clip-g-`+ c++,_,[]);(o?o.children:n).push(v),i[a++]=v,o=v}s=d;var y=LP(u,t);y&&(o?o.children:n).push(y)}}},e.prototype.resize=function(e,t){var n=this._opts,r=this.root,i=this._viewport;if(e!=null&&(n.width=e),t!=null&&(n.height=t),r&&i&&(i.style.display=`none`,e=cD(r,0,n),t=cD(r,1,n),i.style.display=``),this._width!==e||this._height!==t){if(this._width=e,this._height=t,i){var a=i.style;a.width=e+`px`,a.height=t+`px`}if(vd(this._backgroundColor))this.refresh();else{var o=this._svgDom;o&&(o.setAttribute(`width`,e),o.setAttribute(`height`,t));var s=this._bgVNode&&this._bgVNode.elm;s&&(s.setAttribute(`width`,e),s.setAttribute(`height`,t))}}},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e.prototype.dispose=function(){this.root&&(this.root.innerHTML=``),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},e.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},e.prototype.toDataURL=function(e){var t=this.renderToString(),n=`data:image/svg+xml;`;return e?(t=Td(t),t&&n+`base64,`+t):n+`charset=UTF-8,`+encodeURIComponent(t)},e}();function sF(e){return function(){process.env.NODE_ENV!==`production`&&Os(`In SVG mode painter not support method "`+e+`"`)}}function qne(e,t,n,r){var i;if(n&&n!==`none`)if(i=tP(`rect`,`bg`,{width:e,height:t,x:`0`,y:`0`}),xd(n))zP({fill:n},i.attrs,`fill`,r);else if(vd(n))BP({style:{fill:n},dirty:ac,getBoundingRect:function(){return{width:e,height:t}}},i.attrs,`fill`,r);else{var a=od(n),o=a.color,s=a.opacity;i.attrs.fill=o,s<1&&(i.attrs[`fill-opacity`]=s)}return i}function Jne(e){e.registerPainter(`svg`,Kne)}function cF(e,t,n){var r=vs.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}var lF=function(e){cc(t,e);function t(t,n,r){var i=e.call(this)||this;i.motionBlur=!1,i.lastFrameAlpha=.7,i.dpr=1,i.virtual=!1,i.config={},i.incremental=!1,i.zlevel=0,i.maxRepaintRectCount=5,i.__dirty=!0,i.__firstTimePaint=!0,i.__used=!1,i.__drawIndex=0,i.__startIndex=0,i.__endIndex=0,i.__prevStartIndex=null,i.__prevEndIndex=null;var a;r||=vf,typeof t==`string`?a=cF(t,n,r):U(t)&&(a=t,t=a.id),i.id=t,i.dom=a;var o=a.style;return o&&(ic(a),a.onselectstart=function(){return!1},o.padding=`0`,o.margin=`0`,o.borderWidth=`0`),i.painter=n,i.dpr=r,i}return t.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},t.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},t.prototype.initContext=function(){this.ctx=this.dom.getContext(`2d`),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var e=this.dpr;this.domBack=cF(`back-`+this.id,this.painter,e),this.ctxBack=this.domBack.getContext(`2d`),e!==1&&this.ctxBack.scale(e,e)},t.prototype.createRepaintRects=function(e,t,n,r){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var i=[],a=this.maxRepaintRectCount,o=!1,s=new Ol(0,0,0,0);function c(e){if(!(!e.isFinite()||e.isZero()))if(i.length===0){var t=new Ol(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 Ol(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 Ol(0,0,0,0);t.copy(e),i.push(t)}o||=i.length>=a}}for(var l=this.__startIndex;l<this.__endIndex;++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&&c(f);var p=d&&(u.__dirty&1||!u.__isRendered)?u.getPaintRect():null;p&&c(p)}}for(var l=this.__prevStartIndex;l<this.__prevEndIndex;++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&&c(f)}}var m;do{m=!1;for(var l=0;l<i.length;){if(i[l].isZero()){i.splice(l,1);continue}for(var h=l+1;h<i.length;)i[l].intersect(i[h])?(m=!0,i[l].union(i[h]),i.splice(h,1)):h++;l++}}while(m);return this._paintRects=i,i},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.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))},t.prototype.clear=function(e,t,n){var r=this.dom,i=this.ctx,a=r.width,o=r.height;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 f(e,n,r,a){if(i.clearRect(e,n,r,a),t&&t!==`transparent`){var o=void 0;Ws(t)?(o=(t.global||t.__width===r&&t.__height===a)&&t.__canvasGradient||oD(i,t,{x:0,y:0,width:r,height:a}),t.__canvasGradient=o,t.__width=r,t.__height=a):gte(t)&&(t.scaleX=t.scaleX||l,t.scaleY=t.scaleY||l,o=gD(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?f(0,0,a,o):n.length&&L(n,function(e){f(e.x*l,e.y*l,e.width*l,e.height*l)})},t}(Ac),uF=1e5,dF=314159,fF=.01,Yne=.001;function Xne(e){return e?e.__builtin__?!0:!(typeof e.resize!=`function`||typeof e.refresh!=`function`):!1}function Zne(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}var Qne=function(){function e(e,t,n,r){this.type=`canvas`,this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type=`canvas`;var i=!e.nodeName||e.nodeName.toUpperCase()===`CANVAS`;this._opts=n=F({},n||{}),this.dpr=n.devicePixelRatio||vf,this._singleCanvas=i,this.root=e,e.style&&(ic(e),e.innerHTML=``),this.storage=t;var a=this._zlevelList;this._prevDisplayList=[];var o=this._layers;if(i){var s=e,c=s.width,l=s.height;n.width!=null&&(c=n.width),n.height!=null&&(l=n.height),this.dpr=n.devicePixelRatio||1,s.width=c*this.dpr,s.height=l*this.dpr,this._width=c,this._height=l;var u=new lF(s,this,this.dpr);u.__builtin__=!0,u.initContext(),o[dF]=u,u.zlevel=dF,a.push(dF),this._domRoot=e}else{this._width=cD(e,0,n),this._height=cD(e,1,n);var d=this._domRoot=Zne(this._width,this._height);e.appendChild(d)}}return e.prototype.getType=function(){return`canvas`},e.prototype.isSingleCanvas=function(){return this._singleCanvas},e.prototype.getViewportRoot=function(){return this._domRoot},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.refresh=function(e){var t=this.storage.getDisplayList(!0),n=this._prevDisplayList,r=this._zlevelList;this._redrawId=Math.random(),this._paintList(t,n,e,this._redrawId);for(var i=0;i<r.length;i++){var a=r[i],o=this._layers[a];if(!o.__builtin__&&o.refresh){var s=i===0?this._backgroundColor:null;o.refresh(s)}}return this._opts.useDirtyRect&&(this._prevDisplayList=t.slice()),this},e.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},e.prototype._paintHoverList=function(e){var t=e.length,n=this._hoverlayer;if(n&&n.clear(),t){for(var r={inHover:!0,viewWidth:this._width,viewHeight:this._height},i,a=0;a<t;a++){var o=e[a];o.__inHover&&(n||=this._hoverlayer=this.getLayer(uF),i||(i=n.ctx,i.save()),ID(i,o,r,a===t-1))}i&&i.restore()}},e.prototype.getHoverLayer=function(){return this.getLayer(uF)},e.prototype.paintOne=function(e,t){FD(e,t)},e.prototype._paintList=function(e,t,n,r){if(this._redrawId===r){n||=!1,this._updateLayerStatus(e);var i=this._doPaintList(e,t,n),a=i.finished,o=i.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),o&&this._paintHoverList(e),a)this.eachLayer(function(e){e.afterBrush&&e.afterBrush()});else{var s=this;iu(function(){s._paintList(e,t,n,r)})}}},e.prototype._compositeManually=function(){var e=this.getLayer(dF).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),this.eachBuiltinLayer(function(r){r.virtual&&e.drawImage(r.dom,0,0,t,n)})},e.prototype._doPaintList=function(e,t,n){for(var r=this,i=[],a=this._opts.useDirtyRect,o=0;o<this._zlevelList.length;o++){var s=this._zlevelList[o],c=this._layers[s];c.__builtin__&&c!==this._hoverlayer&&(c.__dirty||n)&&i.push(c)}for(var l=!0,u=!1,d=function(o){var s=i[o],c=s.ctx,d=a&&s.createRepaintRects(e,t,f._width,f._height),p=n?s.__startIndex:s.__drawIndex,m=!n&&s.incremental&&Date.now,h=m&&Date.now(),g=s.zlevel===f._zlevelList[0]?f._backgroundColor:null;if(s.__startIndex===s.__endIndex)s.clear(!1,g,d);else if(p===s.__startIndex){var _=e[p];(!_.incremental||!_.notClear||n)&&s.clear(!1,g,d)}p===-1&&(console.error(`For some unknown reason. drawIndex is -1`),p=s.__startIndex);var v,y=function(t){var n={inHover:!1,allClipped:!1,prevEl:null,viewWidth:r._width,viewHeight:r._height};for(v=p;v<s.__endIndex;v++){var i=e[v];if(i.__inHover&&(u=!0),r._doPaintEl(i,s,a,t,n,v===s.__endIndex-1),m&&Date.now()-h>15)break}n.prevElClipPaths&&c.restore()};if(d)if(d.length===0)v=s.__endIndex;else for(var b=f.dpr,x=0;x<d.length;++x){var S=d[x];c.save(),c.beginPath(),c.rect(S.x*b,S.y*b,S.width*b,S.height*b),c.clip(),y(S),c.restore()}else c.save(),y(),c.restore();s.__drawIndex=v,s.__drawIndex<s.__endIndex&&(l=!1)},f=this,p=0;p<i.length;p++)d(p);return fs.wxa&&L(this._layers,function(e){e&&e.ctx&&e.ctx.draw&&e.ctx.draw()}),{finished:l,needsRefreshHover:u}},e.prototype._doPaintEl=function(e,t,n,r,i,a){var o=t.ctx;if(n){var s=e.getPaintRect();(!r||s&&s.intersect(r))&&(ID(o,e,i,a),e.setPrevPaintRect(s))}else ID(o,e,i,a)},e.prototype.getLayer=function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=dF);var n=this._layers[e];return n||(n=new lF(`zr_`+e,this,this.dpr),n.zlevel=e,n.__builtin__=!0,this._layerConfig[e]?ks(n,this._layerConfig[e],!0):this._layerConfig[e-fF]&&ks(n,this._layerConfig[e-fF],!0),t&&(n.virtual=t),this.insertLayer(e,n),n.initContext()),n},e.prototype.insertLayer=function(e,t){var n=this._layers,r=this._zlevelList,i=r.length,a=this._domRoot,o=null,s=-1;if(n[e]){process.env.NODE_ENV!==`production`&&Os(`ZLevel `+e+` has been used already`);return}if(!Xne(t)){process.env.NODE_ENV!==`production`&&Os(`Layer of zlevel `+e+` is not valid`);return}if(i>0&&e>r[0]){for(s=0;s<i-1&&!(r[s]<e&&r[s+1]>e);s++);o=n[r[s]]}if(r.splice(s+1,0,e),n[e]=t,!t.virtual)if(o){var c=o.dom;c.nextSibling?a.insertBefore(t.dom,c.nextSibling):a.appendChild(t.dom)}else a.firstChild?a.insertBefore(t.dom,a.firstChild):a.appendChild(t.dom);t.painter||=this},e.prototype.eachLayer=function(e,t){for(var n=this._zlevelList,r=0;r<n.length;r++){var i=n[r];e.call(t,this._layers[i],i)}},e.prototype.eachBuiltinLayer=function(e,t){for(var n=this._zlevelList,r=0;r<n.length;r++){var i=n[r],a=this._layers[i];a.__builtin__&&e.call(t,a,i)}},e.prototype.eachOtherLayer=function(e,t){for(var n=this._zlevelList,r=0;r<n.length;r++){var i=n[r],a=this._layers[i];a.__builtin__||e.call(t,a,i)}},e.prototype.getLayers=function(){return this._layers},e.prototype._updateLayerStatus=function(e){this.eachBuiltinLayer(function(e,t){e.__dirty=e.__used=!1});function t(e){i&&(i.__endIndex!==e&&(i.__dirty=!0),i.__endIndex=e)}if(this._singleCanvas)for(var n=1;n<e.length;n++){var r=e[n];if(r.zlevel!==e[n-1].zlevel||r.incremental){this._needsManuallyCompositing=!0;break}}var i=null,a=0,o,s;for(s=0;s<e.length;s++){var r=e[s],c=r.zlevel,l=void 0;o!==c&&(o=c,a=0),r.incremental?(l=this.getLayer(c+Yne,this._needsManuallyCompositing),l.incremental=!0,a=1):l=this.getLayer(c+(a>0?fF:0),this._needsManuallyCompositing),l.__builtin__||Os(`ZLevel `+c+` has been used by unkown layer `+l.id),l!==i&&(l.__used=!0,l.__startIndex!==s&&(l.__dirty=!0),l.__startIndex=s,l.incremental?l.__drawIndex=-1:l.__drawIndex=s,t(s),i=l),r.__dirty&1&&!r.__inHover&&(l.__dirty=!0,l.incremental&&l.__drawIndex<0&&(l.__drawIndex=s))}t(s),this.eachBuiltinLayer(function(e,t){!e.__used&&e.getElementCount()>0&&(e.__dirty=!0,e.__startIndex=e.__endIndex=e.__drawIndex=0),e.__dirty&&e.__drawIndex<0&&(e.__drawIndex=e.__startIndex)})},e.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},e.prototype._clearLayer=function(e){e.clear()},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e,L(this._layers,function(e){e.setUnpainted()})},e.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?ks(n[e],t,!0):n[e]=t;for(var r=0;r<this._zlevelList.length;r++){var i=this._zlevelList[r];if(i===e||i===e+fF){var a=this._layers[i];ks(a,n[e],!0)}}}},e.prototype.delLayer=function(e){var t=this._layers,n=this._zlevelList,r=t[e];r&&(r.dom.parentNode.removeChild(r.dom),delete t[e],n.splice(js(n,e),1))},e.prototype.resize=function(e,t){if(this._domRoot.style){var n=this._domRoot;n.style.display=`none`;var r=this._opts,i=this.root;if(e!=null&&(r.width=e),t!=null&&(r.height=t),e=cD(i,0,r),t=cD(i,1,r),n.style.display=``,this._width!==e||t!==this._height){for(var a in n.style.width=e+`px`,n.style.height=t+`px`,this._layers)this._layers.hasOwnProperty(a)&&this._layers[a].resize(e,t);this.refresh(!0)}this._width=e,this._height=t}else{if(e==null||t==null)return;this._width=e,this._height=t,this.getLayer(dF).resize(e,t)}return this},e.prototype.clearLayer=function(e){var t=this._layers[e];t&&t.clear()},e.prototype.dispose=function(){this.root.innerHTML=``,this.root=this.storage=this._domRoot=this._layers=null},e.prototype.getRenderedCanvas=function(e){if(e||={},this._singleCanvas&&!this._compositeManually)return this._layers[dF].dom;var t=new lF(`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;this.eachLayer(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},o=this.storage.getDisplayList(!0),s=0,c=o.length;s<c;s++){var l=o[s];ID(n,l,a,s===c-1)}return t.dom},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e}();function $ne(e){e.registerPainter(`canvas`,Qne)}var ere=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return t.prototype.getInitialData=function(e){if(process.env.NODE_ENV!==`production`){var t=e.coordinateSystem;if(t!==`polar`&&t!==`cartesian2d`)throw Error(`Line not support coordinateSystem besides cartesian and polar`)}return TA(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var t=new Y,n=nD(`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=nD(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=Z.color.neutral00,s.style.lineWidth=2),t},t.type=`series.line`,t.dependencies=[`grid`,`polar`],t.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},t}(oE);function pF(e,t){var n=e.mapDimensionsAll(`defaultedLabel`),r=n.length;if(r===1){var i=Kw(e,t,n[0]);return i==null?null:i+``}else if(r){for(var a=[],o=0;o<n.length;o++)a.push(Kw(e,t,n[o]));return a.join(` `)}}function mF(e,t){var n=e.mapDimensionsAll(`defaultedLabel`);if(!B(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 hF=function(e){N(t,e);function t(t,n,r,i){var a=e.call(this)||this;return a.updateData(t,n,r,i),a}return t.prototype._createSymbol=function(e,t,n,r,i,a){this.removeAll();var o=nD(e,-1,-1,2,2,null,a);o.attr({z2:W(i,100),culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),o.drift=tre,this._symbolType=e,this.add(o)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){Q_(this.childAt(0))},t.prototype.downplay=function(){$_(this.childAt(0))},t.prototype.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},t.prototype.setDraggable=function(e,t){var n=this.childAt(0);n.draggable=e,n.cursor=!t&&e?`move`:n.cursor},t.prototype.updateData=function(e,n,r,i){this.silent=!1;var a=e.getItemVisual(n,`symbol`)||`circle`,o=e.hostModel,s=t.getSymbolSize(e,n),c=t.getSymbolZ2(e,n),l=a!==this._symbolType,u=i&&i.disableAnimation;if(l){var d=e.getItemVisual(n,`symbolKeepAspect`);this._createSymbol(a,e,n,s,c,d)}else{var f=this.childAt(0);f.silent=!1;var p={scaleX:s[0]/2,scaleY:s[1]/2};u?f.attr(p):Wy(f,p,o,n),Xy(f)}if(this._updateCommon(e,n,s,r,i),l){var f=this.childAt(0);if(!u){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:f.style.opacity}};f.scaleX=f.scaleY=0,f.style.opacity=0,Gy(f,p,o,n)}}u&&this.childAt(0).stopAnimation(`leave`)},t.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=Rb(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=iD(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 Kg){var S=a.style;a.useStyle(F({image:S.image,x:S.x,y:S.y,width:S.width,height:S.height},b))}else a.__isEmptyBrush?a.useStyle(F({},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;Lb(a,p,{labelFetcher:o,labelDataIndex:t,defaultText:E,inheritColor:x,defaultOpacity:b.opacity});function E(t){return T?e.getName(t):pF(e,t)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var D=a.ensureState(`emphasis`);D.style=s,a.ensureState(`select`).style=l,a.ensureState(`blur`).style=c;var O=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;D.scaleX=this._sizeX*O,D.scaleY=this._sizeY*O,this.setSymbolScale(1),_v(this,u,d,f)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.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&&qy(o,{style:{opacity:0}},t,{dataIndex:i,removeOpt:a,cb:function(){r.removeTextContent()}})}else r.removeTextContent();qy(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:a})},t.getSymbolSize=function(e,t){return rD(e.getItemVisual(t,`symbolSize`))},t.getSymbolZ2=function(e,t){return e.getItemVisual(t,`z2`)},t}(Y);function tre(e,t){this.parent.drift(e,t)}function gF(e,t,n,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r.isIgnore&&r.isIgnore(n))&&!(r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&e.getItemVisual(n,`symbol`)!==`none`}function _F(e){return e!=null&&!U(e)&&(e={isIgnore:e}),e||{}}function vF(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:Rb(t),cursorStyle:t.get(`cursor`)}}var yF=function(){function e(e){this.group=new Y,this._SymbolCtor=e||hF}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=_F(t);var n=this.group,r=e.hostModel,i=this._data,a=this._SymbolCtor,o=t.disableAnimation,s=vF(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);if(gF(e,i,r,t)){var o=new a(e,r,s,c);o.setPosition(i),e.setItemGraphicEl(r,o),n.add(o)}}).update(function(u,d){var f=i.getItemGraphicEl(d),p=l(u);if(!gF(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):Wy(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},e.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl(function(t,n){var r=e._getSymbolPoint(n);t.setPosition(r),t.markRedraw()})},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=vF(e),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n){this._progressiveEls=[],n=_F(n);function r(e){e.isGroup||(e.incremental=!0,e.ensureState(`emphasis`).hoverLayer=!0)}for(var i=e.start;i<e.end;i++){var a=t.getItemLayout(i);if(gF(t,a,i,n)){var o=new this._SymbolCtor(t,i,this._seriesScope);o.traverse(r),o.setPosition(a),this.group.add(o),t.setItemGraphicEl(i,o),this._progressiveEls.push(o)}}},e.prototype.eachRendered=function(e){Tb(this._progressiveEls||this.group,e)},e.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()},e}();function bF(e,t,n){var r=e.getBaseAxis(),i=e.getOtherAxis(r),a=nre(i,n),o=r.dim,s=i.dim,c=t.mapDimension(s),l=t.mapDimension(o),u=+(s===`x`||s===`radius`),d=R(e.dimensions,function(e){return t.mapDimension(e)}),f=!1,p=t.getCalculationInfo(`stackResultDimension`);return xA(t,d[0])&&(f=!0,d[0]=p),xA(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 nre(e,t){var n=0,r=e.scale.getExtent();return t===`start`?n=r[0]:t===`end`?n=r[1]:Bs(t)&&!isNaN(t)?n=t:r[0]>0?n=r[0]:r[1]<0&&(n=r[1]),n}function xF(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 rre(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 ire(e,t,n,r,i,a,o,s){for(var c=rre(e,t),l=[],u=[],d=[],f=[],p=[],m=[],h=[],g=bF(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=xF(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 ee=l.length,te=YA(ee),ne=YA(ee),re=YA(ee),ie=YA(ee),ae=[],y=0;y<m.length;y++){var oe=m[y],se=y*2,ce=oe*2;te[se]=l[ce],te[se+1]=l[ce+1],ne[se]=u[ce],ne[se+1]=u[ce+1],re[se]=d[ce],re[se+1]=d[ce+1],ie[se]=f[ce],ie[se+1]=f[ce+1],ae[y]=p[oe]}return{current:te,next:ne,stackedOnCurrent:re,stackedOnNext:ie,status:ae}}var SF=Math.min,CF=Math.max;function wF(e,t){return isNaN(e)||isNaN(t)}function TF(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(wF(_,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(;wF(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||wF(S,C))p=_,m=v;else{E=S-l,D=C-u;var A=_-l,j=S-_,ee=v-u,te=C-v,ne=void 0,re=void 0;if(s===`x`){ne=Math.abs(A),re=Math.abs(j);var ie=E>0?1:-1;p=_-ie*ne*o,m=v,O=_+ie*re*o,k=v}else if(s===`y`){ne=Math.abs(ee),re=Math.abs(te);var ae=D>0?1:-1;p=_,m=v-ae*ne*o,O=_,k=v+ae*re*o}else ne=Math.sqrt(A*A+ee*ee),re=Math.sqrt(j*j+te*te),T=re/(re+ne),p=_-E*o*(1-T),m=v-D*o*(1-T),O=_+E*o*T,k=v+D*o*T,O=SF(O,CF(S,_)),k=SF(k,CF(C,v)),O=CF(O,SF(S,_)),k=CF(k,SF(C,v)),E=O-_,D=k-v,p=_-E*ne/re,m=v-D*ne/re,p=SF(p,CF(l,_)),m=SF(m,CF(u,v)),p=CF(p,SF(l,_)),m=CF(m,SF(u,v)),E=_-p,D=v-m,O=_+E*re/ne,k=v+D*re/ne}e.bezierCurveTo(d,f,p,m,_,v),d=O,f=k}else e.lineTo(_,v)}l=_,u=v,h+=a}return g}var EF=function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e}(),are=function(e){N(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-polyline`,n}return t.prototype.getDefaultStyle=function(){return{stroke:Z.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new EF},t.prototype.buildPath=function(e,t){var n=t.points,r=0,i=n.length/2;if(t.connectNulls){for(;i>0&&wF(n[i*2-2],n[i*2-1]);i--);for(;r<i&&wF(n[r*2],n[r*2+1]);r++);}for(;r<i;)r+=TF(e,n,r,i,i,1,t.smooth,t.smoothMonotone,t.connectNulls)+1},t.prototype.getPointOn=function(e,t){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var n=this.path.data,r=hg.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?yu(i,u,f,m,e,s):yu(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?_u(a,d,p,h,b):_u(i,u,f,m,b);return o?[e,_]:[_,e]}}i=m,a=h;break}}},t}(Bg),ore=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(EF),DF=function(e){N(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-polygon`,n}return t.prototype.getDefaultShape=function(){return new ore},t.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&&wF(n[a*2-2],n[a*2-1]);a--);for(;i<a&&wF(n[i*2],n[i*2+1]);i++);}for(;i<a;){var s=TF(e,n,i,a,a,1,t.smooth,o,t.connectNulls);TF(e,r,i+s-1,s,a,-1,t.stackedOnSmooth,o,t.connectNulls),i+=s+1,e.closePath()}},t}(Bg);function OF(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 e_({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=V(i)?function(e){i(e,d)}:null;Gy(d,{shape:{width:c,height:l,x:o,y:s}},n,null,r,h)}return d}function kF(e,t,n){var r=e.getArea(),i=wp(r.r0,1),a=wp(r.r,1),o=new vy({shape:{cx:wp(e.cx,1),cy:wp(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,Gy(o,{shape:{endAngle:r.endAngle,r:a}},n)),o}function AF(e,t,n,r,i){return e?e.type===`polar`?kF(e,t,n):e.type===`cartesian2d`?OF(e,t,n,r,i):null:null}function jF(e,t){return e.type===t}function MF(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return;return!0}}function NF(e){for(var t=1/0,n=1/0,r=-1/0,i=-1/0,a=0;a<e.length;){var o=e[a++],s=e[a++];isNaN(o)||(t=Math.min(o,t),r=Math.max(o,r)),isNaN(s)||(n=Math.min(s,n),i=Math.max(s,i))}return[[t,n],[r,i]]}function PF(e,t){var n=NF(e),r=n[0],i=n[1],a=NF(t),o=a[0],s=a[1];return Math.max(Math.abs(r[0]-o[0]),Math.abs(r[1]-o[1]),Math.abs(i[0]-s[0]),Math.abs(i[1]-s[1]))}function FF(e){return Bs(e)?e:e?.5:0}function sre(e,t,n){if(!n.valueDim)return[];for(var r=t.count(),i=YA(r*2),a=0;a<r;a++){var o=xF(n,e,t,a);i[a*2]=o[0],i[a*2+1]=o[1]}return i}function IF(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;!isNaN(p[c])&&!isNaN(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 cre(e,t){var n=[],r=e.length,i,a;function o(e,t,n){var r=e.coord;return{coord:n,color:Qu((n-r)/(t.coord-r),[e.color,t.color])}}for(var s=0;s<r;s++){var c=e[s],l=c.coord;if(l<0)i=c;else if(l>t){a?n.push(o(a,c,t)):i&&n.push(o(i,c,0),o(i,c,t));break}else i&&=(n.push(o(i,c,0)),null),n.push(c),a=c}return n}function lre(e,t,n){var r=e.getVisual(`visualMeta`);if(!(!r||!r.length||!e.count())){if(t.type!==`cartesian2d`){process.env.NODE_ENV!==`production`&&console.warn(`Visual map on line style is only supported on 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){process.env.NODE_ENV!==`production`&&console.warn(`Visual map on line style only support x or y dimension.`);return}var c=t.getAxis(i),l=R(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=cre(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`;L(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 jy(0,0,0,0,f,!0);return v[i]=h,v[i+`2`]=g,v}}function ure(e,t,n){var r=e.get(`showAllSymbol`),i=r===`auto`;if(!(r&&!i)){var a=n.getAxesByScale(`ordinal`)[0];if(a&&!(i&&dre(a,t))){var o=t.mapDimension(a.dim),s={};return L(a.getViewLabels(),function(e){var t=a.scale.getRawOrdinalNumber(e.tickValue);s[t]=1}),function(e){return!s.hasOwnProperty(t.get(o,e))}}}}function dre(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(hF.getSymbolSize(t,o)[+!!e.isHorizontal()]*1.5>r)return!1;return!0}function fre(e,t){return isNaN(e)||isNaN(t)}function pre(e){for(var t=e.length/2;t>0&&fre(e[t*2-2],e[t*2-1]);t--);return t-1}function LF(e,t){return[e[t*2],e[t*2+1]]}function mre(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],!(isNaN(o)||isNaN(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 RF(e){if(e.get([`endLabel`,`show`]))return!0;for(var t=0;t<T_.length;t++)if(e.get([T_[t],`endLabel`,`show`]))return!0;return!1}function zF(e,t,n,r){if(jF(t,`cartesian2d`)){var i=r.getModel(`endLabel`),a=i.get(`valueAnimation`),o=r.getData(),s={lastFrameIndex:0},c=RF(r)?function(n,r){e._endLabelOnDuring(n,r,o,s,a,i,t)}:null,l=t.getBaseAxis().isHorizontal(),u=OF(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 process.env.NODE_ENV!==`production`&&r.get([`endLabel`,`show`])&&console.warn(`endLabel is not supported for lines in polar systems.`),kF(t,n,r)}function hre(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 gre=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(){var e=new Y,t=new yF;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e,this._changePolyState=z(this._changePolyState,this)},t.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=bF(r,a,_),y=g&&sre(r,a,v),b=e.get(`showSymbol`),x=e.get(`connectNulls`),S=b&&!l&&ure(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=lre(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&&=IF(y,c,r,w,x),c=IF(c,null,r,w,x)),f=this._newPolyline(c),g?p=this._newPolygon(c,y):p&&=(m.remove(p),this._polygon=null),l||this._initOrUpdateEndLabel(e,r,fS(E)),m.setClipPath(zF(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,fS(E));var D=m.getClipPath();D?Gy(D,{shape:zF(this,r,!1,e).shape},e):m.setClipPath(zF(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]]}}),(!MF(this._stackedOnPoints,y)||!MF(this._points,c))&&(h?this._doUpdateAnimation(a,y,r,n,w,_,x):(w&&(y&&=IF(y,c,r,w,x),c=IF(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(I(o.getLineStyle(),{fill:`none`,stroke:E,lineJoin:`bevel`})),xv(f,e,`lineStyle`),f.style.lineWidth>0&&e.get([`emphasis`,`lineStyle`,`width`])===`bolder`){var ee=f.getState(`emphasis`).style;ee.lineWidth=+f.style.lineWidth+1}y_(f).seriesIndex=e.seriesIndex,_v(f,k,A,j);var te=FF(e.get(`smooth`)),ne=e.get(`smoothMonotone`);if(f.setShape({smooth:te,smoothMonotone:ne,connectNulls:x}),p){var re=a.getCalculationInfo(`stackedOnSeries`),ie=0;p.useStyle(I(s.getAreaStyle(),{fill:E,opacity:.7,lineJoin:`bevel`,decal:a.getVisual(`style`).decal})),re&&(ie=FF(re.get(`smooth`))),p.setShape({smooth:te,stackedOnSmooth:ie,smoothMonotone:ne,connectNulls:x}),xv(p,e,`areaStyle`),y_(p).seriesIndex=e.seriesIndex,_v(p,k,A,j)}var ae=this._changePolyState;a.eachItemGraphicEl(function(e){e&&(e.onHoverStateChange=ae)}),this._polyline.onHoverStateChange=ae,this._data=a,this._coordSys=r,this._stackedOnPoints=y,this._points=c,this._step=w,this._valueOrigin=_,e.get(`triggerLineEvent`)&&(this.packEventData(e,f),p&&this.packEventData(e,p))},t.prototype.packEventData=function(e,t){y_(t).eventData={componentType:`series`,componentSubType:`line`,componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:`line`}},t.prototype.highlight=function(e,t,n,r){var i=e.getData(),a=Sm(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(isNaN(c)||isNaN(l)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,l))return;var u=e.get(`zlevel`)||0,d=e.get(`z`)||0;s=new hF(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 yE.prototype.highlight.call(this,e,t,n,r)},t.prototype.downplay=function(e,t,n,r){var i=e.getData(),a=Sm(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 yE.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;U_(this._polyline,e),t&&U_(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new are({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t},t.prototype._newPolygon=function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new DF({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.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`);V(c)&&(c=c(null));var l=s.get(`animationDelay`)||0,u=V(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=V(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}})},t.prototype._initOrUpdateEndLabel=function(e,t,n){var r=e.getModel(`endLabel`);if(RF(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 a_({z2:200}),s.ignoreClip=!0,a.setTextContent(this._endLabel),a.disableLabelAnimation=!0);var c=pre(o);c>=0&&(Lb(a,Rb(e,`endLabel`),{inheritColor:n,labelFetcher:e,labelDataIndex:c,defaultText:function(e,t,n){return n==null?pF(i,e):mF(i,n)},enableTextSetter:!0},hre(r,t)),a.textConfig.position=null)}else this._endLabel&&=(this._polyline.removeTextContent(),null)},t.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=mre(l,v,x),C=S.range,w=C[1]-C[0],T=void 0;if(w>=1){if(w>1&&!d){var E=LF(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=Pm(n,f,D,O,S.t))}r.lastFrameIndex=C[0]}else{var k=e===1||r.lastFrameIndex>0?C[0]:0,E=LF(l,k);i&&(T=u.getRawValue(k)),s.attr({x:E[0]+y,y:E[1]+b})}if(i){var A=Kb(s);typeof A.setLabelText==`function`&&A.setLabelText(T)}}},t.prototype._doUpdateAnimation=function(e,t,n,r,i,a,o){var s=this._polyline,c=this._polygon,l=e.hostModel,u=ire(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=IF(u.stackedOnCurrent,u.current,n,i,o),d=IF(u.current,null,n,i,o),m=IF(u.stackedOnNext,u.next,n,i,o),p=IF(u.next,null,n,i,o)),PF(d,p)>3e3||c&&PF(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(),Wy(s,h,l),c&&(c.setShape({points:d,stackedOnPoints:f}),c.stopAnimation(),Wy(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()}})},t.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},t.type=`line`,t}(yE);function BF(e,t){return{seriesType:e,plan:gE(),reset:function(e){var n=e.getData(),r=e.coordinateSystem,i=e.pipelineContext,a=t||i.large;if(r){var o=R(r.dimensions,function(e){return n.mapDimension(e)}).slice(0,2),s=o.length,c=n.getCalculationInfo(`stackResultDimension`);xA(n,o[0])&&(o[0]=c),xA(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&&YA(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)}}}}}}var _re={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]}},vre=function(e){return Math.round(e.length/2)};function VF(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;H(i)?p=_re[i]:V(i)&&(p=i),p&&e.setData(r.downSample(r.mapDimension(c.dim),1/f,p,vre))}}}}}function yre(e){e.registerChartView(gre),e.registerSeriesModel(ere),e.registerLayout(BF(`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,VF(`line`))}var HF=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(e,t){return TA(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,t,n){var r=this.coordinateSystem;if(r&&r.clampData){var i=r.clampData(e),a=r.dataToPoint(i);if(n)L(r.getAxes(),function(e,n){if(e.type===`category`&&t!=null){var r=e.getTicksCoords(),o=e.getTickModel().get(`alignWithLabel`),s=i[n],c=t[n]===`x1`||t[n]===`y1`;if(c&&!o&&(s+=1),r.length<2)return;if(r.length===2){a[n]=e.toGlobalCoord(e.getExtent()[+!!c]);return}for(var l=void 0,u=void 0,d=1,f=0;f<r.length;f++){var p=r[f].coord,m=f===r.length-1?r[f-1].tickValue+d:r[f].tickValue;if(m===s){u=p;break}else if(m<s)l=p;else if(l!=null&&m>s){u=(p+l)/2;break}f===1&&(d=m-r[0].tickValue)}u??(l?l&&(u=r[r.length-1].coord):u=r[0].coord),a[n]=e.toGlobalCoord(u)}});else{var o=this.getData(),s=o.getLayout(`offset`),c=o.getLayout(`size`),l=+!r.getBaseAxis().isHorizontal();a[l]+=s+c/2}return a}return[NaN,NaN]},t.type=`series.__base_bar__`,t.defaultOption={z:2,coordinateSystem:`cartesian2d`,legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:`mod`,defaultBarGap:`10%`},t}(oE);oE.registerClass(HF);var bre=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(){return TA(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get(`realtimeSort`,!0)||null})},t.prototype.getProgressive=function(){return this.get(`large`)?this.get(`progressive`):!1},t.prototype.getProgressiveThreshold=function(){var e=this.get(`progressiveThreshold`),t=this.get(`largeThreshold`);return t>e&&(e=t),e},t.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},t.type=`series.bar`,t.dependencies=[`grid`,`polar`],t.defaultOption=ax(HF.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:`rgba(180, 180, 180, 0.2)`,borderColor:null,borderWidth:0,borderType:`solid`,borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:Z.color.primary,borderWidth:2}},realtimeSort:!1}),t}(HF),xre=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),UF=function(e){N(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`sausage`,n}return t.prototype.getDefaultShape=function(){return new xre},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r0||0,0),a=Math.max(t.r,0),o=(a-i)*.5,s=i+o,c=t.startAngle,l=t.endAngle,u=t.clockwise,d=Math.PI*2,f=u?l-c<d:c-l<d;f||(c=l-(u?d:-d));var p=Math.cos(c),m=Math.sin(c),h=Math.cos(l),g=Math.sin(l);f?(e.moveTo(p*i+n,m*i+r),e.arc(p*s+n,m*s+r,o,-Math.PI+c,c,!u)):e.moveTo(p*a+n,m*a+r),e.arc(n,r,a,c,l,!u),e.arc(h*s+n,g*s+r,o,l-Math.PI*2,l-Math.PI,!u),i!==0&&e.arc(n,r,i,l,c,u)},t}(Bg);function Sre(e,t){t||={};var n=t.isRoundCap;return function(t,r,i){var a=r.position;if(!a||a instanceof Array)return Kf(t,r,i);var o=e(a),s=r.distance==null?5:r.distance,c=this.shape,l=c.cx,u=c.cy,d=c.r,f=c.r0,p=(d+f)/2,m=c.startAngle,h=c.endAngle,g=(m+h)/2,_=n?Math.abs(d-f)/2:0,v=Math.cos,y=Math.sin,b=l+d*v(m),x=u+d*y(m),S=`left`,C=`top`;switch(o){case`startArc`:b=l+(f-s)*v(g),x=u+(f-s)*y(g),S=`center`,C=`top`;break;case`insideStartArc`:b=l+(f+s)*v(g),x=u+(f+s)*y(g),S=`center`,C=`bottom`;break;case`startAngle`:b=l+p*v(m)+WF(m,s+_,!1),x=u+p*y(m)+GF(m,s+_,!1),S=`right`,C=`middle`;break;case`insideStartAngle`:b=l+p*v(m)+WF(m,-s+_,!1),x=u+p*y(m)+GF(m,-s+_,!1),S=`left`,C=`middle`;break;case`middle`:b=l+p*v(g),x=u+p*y(g),S=`center`,C=`middle`;break;case`endArc`:b=l+(d+s)*v(g),x=u+(d+s)*y(g),S=`center`,C=`bottom`;break;case`insideEndArc`:b=l+(d-s)*v(g),x=u+(d-s)*y(g),S=`center`,C=`top`;break;case`endAngle`:b=l+p*v(h)+WF(h,s+_,!0),x=u+p*y(h)+GF(h,s+_,!0),S=`left`,C=`middle`;break;case`insideEndAngle`:b=l+p*v(h)+WF(h,-s+_,!0),x=u+p*y(h)+GF(h,-s+_,!0),S=`right`,C=`middle`;break;default:return Kf(t,r,i)}return t||={},t.x=b,t.y=x,t.align=S,t.verticalAlign=C,t}}function Cre(e,t,n,r){if(Bs(r)){e.setTextConfig({rotation:r});return}else if(B(t)){e.setTextConfig({rotation:0});return}var i=e.shape,a=i.clockwise?i.startAngle:i.endAngle,o=i.clockwise?i.endAngle:i.startAngle,s=(a+o)/2,c,l=n(t);switch(l){case`startArc`:case`insideStartArc`:case`middle`:case`insideEndArc`:case`endArc`:c=s;break;case`startAngle`:case`insideStartAngle`:c=a;break;case`endAngle`:case`insideEndAngle`:c=o;break;default:e.setTextConfig({rotation:0});return}var u=Math.PI*1.5-c;l===`middle`&&u>Math.PI/2&&u<Math.PI*1.5&&(u-=Math.PI),e.setTextConfig({rotation:u})}function WF(e,t,n){return t*Math.sin(e)*(n?-1:1)}function GF(e,t,n){return t*Math.cos(e)*(n?1:-1)}function KF(e,t,n){var r=e.get(`borderRadius`);if(r==null)return n?{cornerRadius:0}:null;B(r)||(r=[r,r,r,r]);var i=Math.abs(t.r||0-t.r0||0);return{cornerRadius:R(r,function(e){return Gf(e,i)})}}var qF=Math.max,JF=Math.min;function wre(e,t){var n=e.getArea&&e.getArea();if(jF(e,`cartesian2d`)){var r=e.getBaseAxis();if(r.type!==`category`||!r.onBand){var i=t.getLayout(`bandWidth`);r.isHorizontal()?(n.x-=i,n.width+=i*2):(n.y-=i,n.height+=i*2)}}return n}var Tre=function(e){N(t,e);function t(){var n=e.call(this)||this;return n.type=t.type,n._isFirstFrame=!0,n}return t.prototype.render=function(e,t,n,r){this._model=e,this._removeOnRenderedListener(n),this._updateDrawMode(e);var i=e.get(`coordinateSystem`);i===`cartesian2d`||i===`polar`?(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,t,n):this._renderNormal(e,t,n,r)):process.env.NODE_ENV!==`production`&&Wp(`Only cartesian2d and polar supported for bar.`)},t.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},t.prototype.incrementalRender=function(e,t){this._progressiveEls=[],this._incrementalRenderLarge(e,t)},t.prototype.eachRendered=function(e){Tb(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;(this._isLargeDraw==null||t!==this._isLargeDraw)&&(this._isLargeDraw=t,this._clear())},t.prototype._renderNormal=function(e,t,n,r){var i=this.group,a=e.getData(),o=this._data,s=e.coordinateSystem,c=s.getBaseAxis(),l;s.type===`cartesian2d`?l=c.isHorizontal():s.type===`polar`&&(l=c.dim===`angle`);var u=e.isAnimationEnabled()?e:null,d=Ere(e,s);d&&this._enableRealtimeSort(d,a,n);var f=e.get(`clip`,!0)||d,p=wre(s,a);i.removeClipPath();var m=e.get(`roundCap`,!0),h=e.get(`showBackground`,!0),g=e.getModel(`backgroundStyle`),_=g.get(`borderRadius`)||0,v=[],y=this._backgroundEls,b=r&&r.isInitSort,x=r&&r.type===`changeAxisOrder`;function S(e){var t=eI[s.type](a,e);if(!t)return null;var n=Nre(s,l,t);return n.useStyle(g.getItemStyle()),s.type===`cartesian2d`?n.setShape(`r`,_):n.setShape(`cornerRadius`,_),v[e]=n,n}a.diff(o).add(function(t){var n=a.getItemModel(t),r=eI[s.type](a,t,n);if(r&&(h&&S(t),!(!a.hasValue(t)||!$F[s.type](r)))){var o=!1;f&&(o=YF[s.type](p,r));var g=XF[s.type](e,a,t,r,l,u,c.model,!1,m);d&&(g.forceLabelAnimation=!0),nI(g,a,t,n,r,e,l,s.type===`polar`),b?g.attr({shape:r}):d?ZF(d,u,g,r,t,l,!1,!1):Gy(g,{shape:r},e,t),a.setItemGraphicEl(t,g),i.add(g),g.ignore=o}}).update(function(t,n){var r=a.getItemModel(t),C=eI[s.type](a,t,r);if(C){if(h){var w=void 0;y.length===0?w=S(n):(w=y[n],w.useStyle(g.getItemStyle()),s.type===`cartesian2d`?w.setShape(`r`,_):w.setShape(`cornerRadius`,_),v[t]=w);var T=eI[s.type](a,t),E=oI(l,T,s);Wy(w,{shape:E},u,t)}var D=o.getItemGraphicEl(n);if(!a.hasValue(t)||!$F[s.type](C)){i.remove(D);return}var O=!1;if(f&&(O=YF[s.type](p,C),O&&i.remove(D)),D&&(D.type===`sector`&&m||D.type===`sausage`&&!m)&&(D&&Yy(D,e,n),D=null),D?Xy(D):D=XF[s.type](e,a,t,C,l,u,c.model,!0,m),d&&(D.forceLabelAnimation=!0),x){var k=D.getTextContent();if(k){var A=Kb(k);A.prevValue!=null&&(A.prevValue=A.value)}}else nI(D,a,t,r,C,e,l,s.type===`polar`);b?D.attr({shape:C}):d?ZF(d,u,D,C,t,l,!0,x):Wy(D,{shape:C},e,t,null),a.setItemGraphicEl(t,D),D.ignore=O,i.add(D)}}).remove(function(t){var n=o.getItemGraphicEl(t);n&&Yy(n,e,t)}).execute();var C=this._backgroundGroup||=new Y;C.removeAll();for(var w=0;w<v.length;++w)C.add(v[w]);i.add(C),this._backgroundEls=v,this._data=a},t.prototype._renderLarge=function(e,t,n){this._clear(),iI(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,t){this._removeBackground(),iI(t,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var t=e.get(`clip`,!0)&&AF(e.coordinateSystem,!1,e),n=this.group;t?n.setClipPath(t):n.removeClipPath()},t.prototype._enableRealtimeSort=function(e,t,n){var r=this;if(t.count()){var i=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(t,e,n),this._isFirstFrame=!1;else{var a=function(e){var n=t.getItemGraphicEl(e),r=n&&n.shape;return r&&Math.abs(i.isHorizontal()?r.height:r.width)||0};this._onRendered=function(){r._updateSortWithinSameData(t,a,i,n)},n.getZr().on(`rendered`,this._onRendered)}}},t.prototype._dataSort=function(e,t,n){var r=[];return e.each(e.mapDimension(t.dim),function(e,t){var i=n(t);i??=NaN,r.push({dataIndex:t,mappedValue:i,ordinalNumber:e})}),r.sort(function(e,t){return t.mappedValue-e.mappedValue}),{ordinalNumbers:R(r,function(e){return e.ordinalNumber})}},t.prototype._isOrderChangedWithinSameData=function(e,t,n){for(var r=n.scale,i=e.mapDimension(n.dim),a=Number.MAX_VALUE,o=0,s=r.getOrdinalMeta().categories.length;o<s;++o){var c=e.rawIndexOf(i,r.getRawOrdinalNumber(o)),l=c<0?Number.MIN_VALUE:t(e.indexOfRawIndex(c));if(l>a)return!0;a=l}return!1},t.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,r=n.getExtent(),i=Math.max(0,r[0]),a=Math.min(r[1],n.getOrdinalMeta().categories.length-1);i<=a;++i)if(e.ordinalNumbers[i]!==n.getRawOrdinalNumber(i))return!0},t.prototype._updateSortWithinSameData=function(e,t,n,r){if(this._isOrderChangedWithinSameData(e,t,n)){var i=this._dataSort(e,n,t);this._isOrderDifferentInView(i,n)&&(this._removeOnRenderedListener(r),r.dispatchAction({type:`changeAxisOrder`,componentType:n.dim+`Axis`,axisId:n.index,sortInfo:i}))}},t.prototype._dispatchInitSort=function(e,t,n){var r=t.baseAxis,i=this._dataSort(e,r,function(n){return e.get(e.mapDimension(t.otherAxis.dim),n)});n.dispatchAction({type:`changeAxisOrder`,componentType:r.dim+`Axis`,isInitSort:!0,axisId:r.index,sortInfo:i})},t.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},t.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&=(e.getZr().off(`rendered`,this._onRendered),null)},t.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(t){Yy(t,e,y_(t).dataIndex)})):t.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type=`bar`,t}(yE),YF={cartesian2d:function(e,t){var n=t.width<0?-1:1,r=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,a=e.y+e.height,o=qF(t.x,e.x),s=JF(t.x+t.width,i),c=qF(t.y,e.y),l=JF(t.y+t.height,a),u=s<o,d=l<c;return t.x=u&&o>i?s:o,t.y=d&&c>a?l:c,t.width=u?0:s-o,t.height=d?0:l-c,n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),u||d},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}var i=JF(t.r,e.r),a=qF(t.r0,e.r0);t.r=i,t.r0=a;var o=i-a<0;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}return o}},XF={cartesian2d:function(e,t,n,r,i,a,o,s,c){var l=new e_({shape:F({},r),z2:1});if(l.__dataIndex=n,l.name=`item`,a){var u=l.shape,d=i?`height`:`width`;u[d]=0}return l},polar:function(e,t,n,r,i,a,o,s,c){var l=!i&&c?UF:vy,u=new l({shape:r,z2:1});if(u.name=`item`,u.calculateTextPosition=Sre(tI(i),{isRoundCap:l===UF}),a){var d=u.shape,f=i?`r`:`endAngle`,p={};d[f]=i?r.r0:r.startAngle,p[f]=r[f],(s?Wy:Gy)(u,{shape:p},a)}return u}};function Ere(e,t){var n=e.get(`realtimeSort`,!0),r=t.getBaseAxis();if(process.env.NODE_ENV!==`production`&&n&&(r.type!==`category`&&Wp("`realtimeSort` will not work because this bar series is not based on a category axis."),t.type!==`cartesian2d`&&Wp("`realtimeSort` will not work because this bar series is not on cartesian2d.")),n&&r.type===`category`&&t.type===`cartesian2d`)return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}function ZF(e,t,n,r,i,a,o,s){var c,l;a?(l={x:r.x,width:r.width},c={y:r.y,height:r.height}):(l={y:r.y,height:r.height},c={x:r.x,width:r.width}),s||(o?Wy:Gy)(n,{shape:c},t,i,null);var u=t?e.baseAxis.model:null;(o?Wy:Gy)(n,{shape:l},u,i)}function QF(e,t){for(var n=0;n<t.length;n++)if(!isFinite(e[t[n]]))return!0;return!1}var Dre=[`x`,`y`,`width`,`height`],Ore=[`cx`,`cy`,`r`,`startAngle`,`endAngle`],$F={cartesian2d:function(e){return!QF(e,Dre)},polar:function(e){return!QF(e,Ore)}},eI={cartesian2d:function(e,t,n){var r=e.getItemLayout(t);if(!r)return null;var i=n?Are(n,r):0,a=r.width>0?1:-1,o=r.height>0?1:-1;return{x:r.x+a*i/2,y:r.y+o*i/2,width:r.width-a*i,height:r.height-o*i}},polar:function(e,t,n){var r=e.getItemLayout(t);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function kre(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function tI(e){return function(e){var t=e?`Arc`:`Angle`;return function(e){switch(e){case`start`:case`insideStart`:case`end`:case`insideEnd`:return e+t;default:return e}}}(e)}function nI(e,t,n,r,i,a,o,s){var c=t.getItemVisual(n,`style`);if(!s){var l=r.get([`itemStyle`,`borderRadius`])||0;e.setShape(`r`,l)}else if(!a.get(`roundCap`)){var u=e.shape;F(u,KF(r.getModel(`itemStyle`),u,!0)),e.setShape(u)}e.useStyle(c);var d=r.getShallow(`cursor`);d&&e.attr(`cursor`,d);var f=s?o?i.r>=i.r0?`endArc`:`startArc`:i.endAngle>=i.startAngle?`endAngle`:`startAngle`:o?i.height>=0?`bottom`:`top`:i.width>=0?`right`:`left`,p=Rb(r);Lb(e,p,{labelFetcher:a,labelDataIndex:n,defaultText:pF(a.getData(),n),inheritColor:c.fill,defaultOpacity:c.opacity,defaultOutsidePosition:f});var m=e.getTextContent();if(s&&m){var h=r.get([`label`,`position`]);e.textConfig.inside=h===`middle`?!0:null,Cre(e,h===`outside`?f:h,tI(o),r.get([`label`,`rotate`]))}qb(m,p,a.getRawValue(n),function(e){return mF(t,e)});var g=r.getModel([`emphasis`]);_v(e,g.get(`focus`),g.get(`blurScope`),g.get(`disabled`)),xv(e,r),kre(i)&&(e.style.fill=`none`,e.style.stroke=`none`,L(e.states,function(e){e.style&&(e.style.fill=e.style.stroke=`none`)}))}function Are(e,t){var n=e.get([`itemStyle`,`borderColor`]);if(!n||n===`none`)return 0;var r=e.get([`itemStyle`,`borderWidth`])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(r,i,a)}var jre=function(){function e(){}return e}(),rI=function(e){N(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`largeBar`,n}return t.prototype.getDefaultShape=function(){return new jre},t.prototype.buildPath=function(e,t){for(var n=t.points,r=this.baseDimIdx,i=1-this.baseDimIdx,a=[],o=[],s=this.barWidth,c=0;c<n.length;c+=3)o[r]=s,o[i]=n[c+2],a[r]=n[c+r],a[i]=n[c+i],e.rect(a[0],a[1],o[0],o[1])},t}(Bg);function iI(e,t,n,r){var i=e.getData(),a=+!!i.getLayout(`valueAxisHorizontal`),o=i.getLayout(`largeDataIndices`),s=i.getLayout(`size`),c=e.getModel(`backgroundStyle`),l=i.getLayout(`largeBackgroundPoints`);if(l){var u=new rI({shape:{points:l},incremental:!!r,silent:!0,z2:0});u.baseDimIdx=a,u.largeDataIndices=o,u.barWidth=s,u.useStyle(c.getItemStyle()),t.add(u),n&&n.push(u)}var d=new rI({shape:{points:i.getLayout(`largePoints`)},incremental:!!r,ignoreCoarsePointer:!0,z2:1});d.baseDimIdx=a,d.largeDataIndices=o,d.barWidth=s,t.add(d),d.useStyle(i.getVisual(`style`)),d.style.stroke=null,y_(d).seriesIndex=e.seriesIndex,e.get(`silent`)||(d.on(`mousedown`,aI),d.on(`mousemove`,aI)),n&&n.push(d)}var aI=OE(function(e){var t=this,n=Mre(t,e.offsetX,e.offsetY);y_(t).dataIndex=n>=0?n:null},30,!1);function Mre(e,t,n){for(var r=e.baseDimIdx,i=1-r,a=e.shape.points,o=e.largeDataIndices,s=[],c=[],l=e.barWidth,u=0,d=a.length/3;u<d;u++){var f=u*3;if(c[r]=l,c[i]=a[f+2],s[r]=a[f+r],s[i]=a[f+i],c[i]<0&&(s[i]+=c[i],c[i]=-c[i]),t>=s[0]&&t<=s[0]+c[0]&&n>=s[1]&&n<=s[1]+c[1])return o[u]}return-1}function oI(e,t,n){if(jF(n,`cartesian2d`)){var r=t,i=n.getArea();return{x:e?r.x:i.x,y:e?i.y:r.y,width:e?r.width:i.width,height:e?i.height:r.height}}else{var i=n.getArea(),a=t;return{cx:i.cx,cy:i.cy,r0:e?i.r0:a.r0,r:e?i.r:a.r,startAngle:e?a.startAngle:0,endAngle:e?a.endAngle:Math.PI*2}}}function Nre(e,t,n){return new(e.type===`polar`?vy:e_)({shape:oI(t,n,e),silent:!0,z2:0})}function Pre(e){e.registerChartView(Tre),e.registerSeriesModel(bre),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,Rs(aj,`bar`)),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,oj(`bar`)),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,VF(`bar`)),e.registerAction({type:`changeAxisOrder`,event:`changeAxisOrder`,update:`update`},function(e,t){var n=e.componentType||`series`;t.eachComponent({mainType:n,query:e},function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)})})}var sI=Math.PI*2,cI=Math.PI/180;function Fre(e,t,n){t.eachSeriesByType(e,function(e){var t=e.getData(),r=t.mapDimension(`value`),i=NS(e,n),a=i.cx,o=i.cy,s=i.r,c=i.r0,l=i.viewRect,u=-e.get(`startAngle`)*cI,d=e.get(`endAngle`),f=e.get(`padAngle`)*cI;d=d===`auto`?u-sI:-d*cI;var p=e.get(`minAngle`)*cI+f,m=0;t.each(r,function(e){!isNaN(e)&&m++});var h=t.getSum(r),g=Math.PI/(h||m)*2,_=e.get(`clockwise`),v=e.get(`roseType`),y=e.get(`stillShowZeroSum`),b=t.getDataExtent(r);b[0]=0;var x=_?1:-1,S=[u,d],C=x*f/2;mg(S,!_),u=S[0],d=S[1];var w=lI(e);w.startAngle=u,w.endAngle=d,w.clockwise=_,w.cx=a,w.cy=o,w.r=s,w.r0=c;var T=Math.abs(d-u),E=T,D=0,O=u;if(t.setLayout({viewRect:l,r:s}),t.each(r,function(e,n){var r;if(isNaN(e)){t.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:_,cx:a,cy:o,r0:c,r:v?NaN:s});return}r=v===`area`?T/m:h===0&&y?g:e*g,r<p?(r=p,E-=p):D+=e;var i=O+x*r,l=0,u=0;f>r?(l=O+x*r/2,u=l):(l=O+C,u=i-C),t.setItemLayout(n,{angle:r,startAngle:l,endAngle:u,clockwise:_,cx:a,cy:o,r0:c,r:v?Sp(e,b,[c,s]):s}),O=i}),E<sI&&m)if(E<=.001){var k=T/m;t.each(r,function(e,n){if(!isNaN(e)){var r=t.getItemLayout(n);r.angle=k;var i=0,a=0;k<f?(i=u+x*(n+1/2)*k,a=i):(i=u+x*n*k+C,a=u+x*(n+1)*k-C),r.startAngle=i,r.endAngle=a}})}else g=E/D,O=u,t.each(r,function(e,n){if(!isNaN(e)){var r=t.getItemLayout(n),i=r.angle===p?p:e*g,a=0,o=0;i<f?(a=O+x*i/2,o=a):(a=O+C,o=O+x*i-C),r.startAngle=a,r.endAngle=o,O+=x*i}})})}var lI=Cm();function uI(e){return{seriesType:e,reset:function(e,t){var n=t.findComponents({mainType:`legend`});if(!(!n||!n.length)){var r=e.getData();r.filterSelf(function(e){for(var t=r.getName(e),i=0;i<n.length;i++)if(!n[i].isSelected(t))return!1;return!0})}}}}var Ire=Math.PI/180;function dI(e,t,n,r,i,a,o,s,c,l){if(e.length<2)return;function u(e){for(var a=e.rB,o=a*a,s=0;s<e.list.length;s++){var c=e.list[s],l=Math.abs(c.label.y-n),u=r+c.len,d=u*u,f=t+(Math.sqrt(Math.abs((1-l*l/o)*d))+c.len2)*i,p=f-c.label.x;fI(c,c.targetTextWidth-p*i,!0),c.label.x=f}}function d(e){for(var a={list:[],maxY:0},o={list:[],maxY:0},s=0;s<e.length;s++)if(e[s].labelAlignTo===`none`){var c=e[s],l=c.label.y>n?o:a,d=Math.abs(c.label.y-n);if(d>=l.maxY){var f=c.label.x-t-c.len2*i,p=r+c.len;l.rB=Math.abs(f)<p?Math.sqrt(d*d/(1-f*f/p/p)):p,l.maxY=d}l.list.push(c)}u(a),u(o)}for(var f=e.length,p=0;p<f;p++)if(e[p].position===`outer`&&e[p].labelAlignTo===`labelLine`){var m=e[p].label.x-l;e[p].linePoints[1][0]+=m,e[p].label.x=l}SN(e,1,c,c+o)&&d(e)}function Lre(e,t,n,r,i,a,o,s){for(var c=[],l=[],u=Number.MAX_VALUE,d=-Number.MAX_VALUE,f=0;f<e.length;f++){var p=e[f].label;hI(e[f])||(p.x<t?(u=Math.min(u,p.x),c.push(e[f])):(d=Math.max(d,p.x),l.push(e[f])))}for(var f=0;f<e.length;f++){var m=e[f];if(!hI(m)&&m.linePoints){if(m.labelStyleWidth!=null)continue;var p=m.label,h=m.linePoints,g=void 0;g=m.labelAlignTo===`edge`?p.x<t?h[2][0]-m.labelDistance-o-m.edgeDistance:o+i-m.edgeDistance-h[2][0]-m.labelDistance:m.labelAlignTo===`labelLine`?p.x<t?u-o-m.bleedMargin:o+i-d-m.bleedMargin:p.x<t?p.x-o-m.bleedMargin:o+i-p.x-m.bleedMargin,m.targetTextWidth=g,fI(m,g,!1)}}dI(l,t,n,r,1,i,a,o,s,d),dI(c,t,n,r,-1,i,a,o,s,u);for(var f=0;f<e.length;f++){var m=e[f];if(!hI(m)&&m.linePoints){var p=m.label,h=m.linePoints,_=m.labelAlignTo===`edge`,v=p.style.padding,y=v?v[1]+v[3]:0,b=p.style.backgroundColor?0:y,x=m.rect.width+b,S=h[1][0]-h[2][0];_?p.x<t?h[2][0]=o+m.edgeDistance+x+m.labelDistance:h[2][0]=o+i-m.edgeDistance-x-m.labelDistance:(p.x<t?h[2][0]=p.x+m.labelDistance:h[2][0]=p.x-m.labelDistance,h[1][0]=h[2][0]+S),h[1][1]=h[2][1]=p.y}}}function fI(e,t,n){if(e.labelStyleWidth==null){var r=e.label,i=r.style,a=e.rect,o=i.backgroundColor,s=i.padding,c=s?s[1]+s[3]:0,l=i.overflow,u=a.width+(o?0:c);if(t<u||n){if(l&&l.match(`break`)){r.setStyle(`backgroundColor`,null),r.setStyle(`width`,t-c);var d=r.getBoundingRect();r.setStyle(`width`,Math.ceil(d.width)),r.setStyle(`backgroundColor`,o)}else{var f=t-c,p=t<u?f:n?f>e.unconstrainedWidth?null:f:null;r.setStyle(`width`,p)}pI(a,r)}}}function pI(e,t){mI.rect=e,gN(mI,t,Rre)}var Rre={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},mI={};function hI(e){return e.position===`center`}function zre(e){var t=e.getData(),n=[],r,i,a=!1,o=(e.get(`minShowLabelAngle`)||0)*Ire,s=t.getLayout(`viewRect`),c=t.getLayout(`r`),l=s.width,u=s.x,d=s.y,f=s.height;function p(e){e.ignore=!0}function m(e){if(!e.ignore)return!0;for(var t in e.states)if(e.states[t].ignore===!1)return!0;return!1}t.each(function(e){var s=t.getItemGraphicEl(e),d=s.shape,h=s.getTextContent(),g=s.getTextGuideLine(),_=t.getItemModel(e),v=_.getModel(`label`),y=v.get(`position`)||_.get([`emphasis`,`label`,`position`]),b=v.get(`distanceToLabelLine`),x=v.get(`alignTo`),S=X(v.get(`edgeDistance`),l),C=v.get(`bleedMargin`);C??=Math.min(l,f)>200?10:2;var w=_.getModel(`labelLine`),T=w.get(`length`);T=X(T,l);var E=w.get(`length2`);if(E=X(E,l),Math.abs(d.endAngle-d.startAngle)<o){L(h.states,p),h.ignore=!0,g&&(L(g.states,p),g.ignore=!0);return}if(m(h)){var D=(d.startAngle+d.endAngle)/2,O=Math.cos(D),k=Math.sin(D),A,j,ee,te;r=d.cx,i=d.cy;var ne=y===`inside`||y===`inner`;if(y===`center`)A=d.cx,j=d.cy,te=`center`;else{var re=(ne?(d.r+d.r0)/2*O:d.r*O)+r,ie=(ne?(d.r+d.r0)/2*k:d.r*k)+i;if(A=re+O*3,j=ie+k*3,!ne){var ae=re+O*(T+c-d.r),oe=ie+k*(T+c-d.r),se=ae+(O<0?-1:1)*E,ce=oe;A=x===`edge`?O<0?u+S:u+l-S:se+(O<0?-b:b),j=ce,ee=[[re,ie],[ae,oe],[se,ce]]}te=ne?`center`:x===`edge`?O>0?`right`:`left`:O>0?`left`:`right`}var le=Math.PI,ue=0,de=v.get(`rotate`);if(Bs(de))ue=le/180*de;else if(y===`center`)ue=0;else if(de===`radial`||de===!0)ue=O<0?-D+le:-D;else if(de===`tangential`&&y!==`outside`&&y!==`outer`){var fe=Math.atan2(O,k);fe<0&&(fe=le*2+fe),k>0&&(fe=le+fe),ue=fe-le}if(a=!!ue,h.x=A,h.y=j,h.rotation=ue,h.setStyle({verticalAlign:`middle`}),ne){h.setStyle({align:te});var pe=h.states.select;pe&&(pe.x+=h.x,pe.y+=h.y)}else{var me=new Ol(0,0,0,0);pI(me,h),n.push({label:h,labelLine:g,position:y,len:T,len2:E,minTurnAngle:w.get(`minTurnAngle`),maxSurfaceAngle:w.get(`maxSurfaceAngle`),surfaceNormal:new J(O,k),linePoints:ee,textAlign:te,labelDistance:b,labelAlignTo:x,edgeDistance:S,bleedMargin:C,rect:me,unconstrainedWidth:me.width,labelStyleWidth:h.style.width})}s.setTextConfig({inside:ne})}}),!a&&e.get(`avoidLabelOverlap`)&&Lre(n,r,i,c,l,f,u,d);for(var h=0;h<n.length;h++){var g=n[h],_=g.label,v=g.labelLine,y=isNaN(_.x)||isNaN(_.y);if(_){_.setStyle({align:g.textAlign}),y&&(L(_.states,p),_.ignore=!0);var b=_.states.select;b&&(b.x+=_.x,b.y+=_.y)}if(v){var x=g.linePoints;y||!x?(L(v.states,p),v.ignore=!0):(rN(x,g.minTurnAngle),iN(x,g.surfaceNormal,g.maxSurfaceAngle),v.setShape({points:x}),_.__hostTarget.textGuideLineConfig={anchor:new J(x[0][0],x[0][1])})}}}var Bre=function(e){N(t,e);function t(t,n,r){var i=e.call(this)||this;i.z2=2;var a=new a_;return i.setTextContent(a),i.updateData(t,n,r,!0),i}return t.prototype.updateData=function(e,t,n,r){var i=this,a=e.hostModel,o=e.getItemModel(t),s=o.getModel(`emphasis`),c=e.getItemLayout(t),l=F(KF(o.getModel(`itemStyle`),c,!0),c);if(isNaN(l.startAngle)){i.setShape(l);return}if(r){i.setShape(l);var u=a.getShallow(`animationType`);a.ecModel.ssr?(Gy(i,{scaleX:0,scaleY:0},a,{dataIndex:t,isFrom:!0}),i.originX=l.cx,i.originY=l.cy):u===`scale`?(i.shape.r=c.r0,Gy(i,{shape:{r:c.r}},a,t)):n==null?(i.shape.endAngle=c.startAngle,Wy(i,{shape:{endAngle:c.endAngle}},a,t)):(i.setShape({startAngle:n,endAngle:n}),Gy(i,{shape:{startAngle:c.startAngle,endAngle:c.endAngle}},a,t))}else Xy(i),Wy(i,{shape:l},a,t);i.useStyle(e.getItemVisual(t,`style`)),xv(i,o);var d=(c.startAngle+c.endAngle)/2,f=a.get(`selectedOffset`),p=Math.cos(d)*f,m=Math.sin(d)*f,h=o.getShallow(`cursor`);h&&i.attr(`cursor`,h),this._updateLabel(a,e,t),i.ensureState(`emphasis`).shape=F({r:c.r+(s.get(`scale`)&&s.get(`scaleSize`)||0)},KF(s.getModel(`itemStyle`),c)),F(i.ensureState(`select`),{x:p,y:m,shape:KF(o.getModel([`select`,`itemStyle`]),c)}),F(i.ensureState(`blur`),{shape:KF(o.getModel([`blur`,`itemStyle`]),c)});var g=i.getTextGuideLine(),_=i.getTextContent();g&&F(g.ensureState(`select`),{x:p,y:m}),F(_.ensureState(`select`),{x:p,y:m}),_v(this,s.get(`focus`),s.get(`blurScope`),s.get(`disabled`))},t.prototype._updateLabel=function(e,t,n){var r=this,i=t.getItemModel(n),a=i.getModel(`labelLine`),o=t.getItemVisual(n,`style`),s=o&&o.fill,c=o&&o.opacity;Lb(r,Rb(i),{labelFetcher:t.hostModel,labelDataIndex:n,inheritColor:s,defaultOpacity:c,defaultText:e.getFormattedLabel(n,`normal`)||t.getName(n)});var l=r.getTextContent();r.setTextConfig({position:null,rotation:null}),l.attr({z2:10});var u=i.get([`label`,`position`]);if(u!==`outside`&&u!==`outer`)r.removeTextGuideLine();else{var d=this.getTextGuideLine();d||(d=new Cy,this.setTextGuideLine(d)),sN(this,cN(i),{stroke:s,opacity:Js(a.get([`lineStyle`,`opacity`]),c,1)})}},t}(vy),Vre=function(e){N(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.ignoreLabelLineUpdate=!0,t}return t.prototype.render=function(e,t,n,r){var i=e.getData(),a=this._data,o=this.group,s;if(!a&&i.count()>0){for(var c=i.getItemLayout(0),l=1;isNaN(c&&c.startAngle)&&l<i.count();++l)c=i.getItemLayout(l);c&&(s=c.startAngle)}if(this._emptyCircleSector&&o.remove(this._emptyCircleSector),i.count()===0&&e.get(`showEmptyCircle`)){var u=new vy({shape:P(lI(e))});u.useStyle(e.getModel(`emptyCircleStyle`).getItemStyle()),this._emptyCircleSector=u,o.add(u)}i.diff(a).add(function(e){var t=new Bre(i,e,s);i.setItemGraphicEl(e,t),o.add(t)}).update(function(e,t){var n=a.getItemGraphicEl(t);n.updateData(i,e,s),n.off(`click`),o.add(n),i.setItemGraphicEl(e,n)}).remove(function(t){Yy(a.getItemGraphicEl(t),e,t)}).execute(),zre(e),e.get(`animationTypeUpdate`)!==`expansion`&&(this._data=i)},t.prototype.dispose=function(){},t.prototype.containPoint=function(e,t){var n=t.getData().getItemLayout(0);if(n){var r=e[0]-n.cx,i=e[1]-n.cy,a=Math.sqrt(r*r+i*i);return a<=n.r&&a>=n.r0}},t.type=`pie`,t}(yE);function gI(e,t,n){t=B(t)&&{coordDimensions:t}||F({encodeDefine:e.getEncode()},t);var r=e.getSource(),i=dA(r,t).dimensions,a=new uA(i,e);return a.initData(r,n),a}var _I=function(){function e(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return e.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},e.prototype.containName=function(e){return this._getRawData().indexOfName(e)>=0},e.prototype.indexOfName=function(e){return this._getDataWithEncodedVisual().indexOfName(e)},e.prototype.getItemVisual=function(e,t){return this._getDataWithEncodedVisual().getItemVisual(e,t)},e}(),Hre=Cm(),vI=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new _I(z(this.getData,this),z(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return gI(this,{coordDimensions:[`value`],encodeDefaulter:Rs(pC,this)})},t.prototype.getDataParams=function(t){var n=this.getData(),r=Hre(n),i=r.seats;if(!i){var a=[];n.each(n.mapDimension(`value`),function(e){a.push(e)}),i=r.seats=Ete(a,n.hostModel.get(`percentPrecision`))}var o=e.prototype.getDataParams.call(this,t);return o.percent=i[t]||0,o.$vars.push(`percent`),o},t.prototype._defaultLabelLine=function(e){em(e,`labelLine`,[`show`]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.type=`series.pie`,t.defaultOption={z:2,legendHoverLink:!0,colorBy:`data`,center:[`50%`,`50%`],radius:[0,`50%`],clockwise:!0,startAngle:90,endAngle:`auto`,padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:`box`,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:`truncate`,position:`outer`,alignTo:`none`,edgeDistance:`25%`,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:`solid`}},itemStyle:{borderWidth:1,borderJoin:`round`},showEmptyCircle:!0,emptyCircleStyle:{color:`lightgray`,opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:`expansion`,animationDuration:1e3,animationTypeUpdate:`transition`,animationEasingUpdate:`cubicInOut`,animationDurationUpdate:500,animationEasing:`cubicInOut`},t}(oE);yS({fullType:vI.type,getCoord2:function(e){return e.getShallow(`center`)}});function Ure(e){return{seriesType:e,reset:function(e,t){var n=e.getData();n.filterSelf(function(e){var t=n.mapDimension(`value`),r=n.get(t,e);return!(Bs(r)&&!isNaN(r)&&r<0)})}}}function Wre(e){e.registerChartView(Vre),e.registerSeriesModel(vI),QE(`pie`,e.registerAction),e.registerLayout(Rs(Fre,`pie`)),e.registerProcessor(uI(`pie`)),e.registerProcessor(Ure(`pie`))}var Gre=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return t.prototype.getInitialData=function(e,t){return TA(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){return this.option.progressive??(this.option.large?5e3:this.get(`progressive`))},t.prototype.getProgressiveThreshold=function(){return this.option.progressiveThreshold??(this.option.large?1e4:this.get(`progressiveThreshold`))},t.prototype.brushSelector=function(e,t,n){return n.point(t.getItemLayout(e))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:``},t.type=`series.scatter`,t.dependencies=[`grid`,`polar`,`geo`,`singleAxis`,`calendar`,`matrix`],t.defaultOption={coordinateSystem:`cartesian2d`,z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:Z.color.primary}},universalTransition:{divideShape:`clone`}},t}(oE),yI=4,Kre=function(){function e(){}return e}(),qre=function(e){N(t,e);function t(t){var n=e.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return t.prototype.getDefaultShape=function(){return new Kre},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.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]<yI,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)},t.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)}},t.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},t.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)},t.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 Ol(o-i/2,s-a/2,c-o+i,l-s+a)}return e},t}(Bg),Jre=function(){function e(){this.group=new Y}return e.prototype.updateData=function(e,t){this._clear();var n=this._create();n.setShape({points:e.getLayout(`points`)}),this._setCommon(n,e,t)},e.prototype.updateLayout=function(e){var t=e.getLayout(`points`);this.group.eachChild(function(e){if(e.startIndex!=null){var n=(e.endIndex-e.startIndex)*2,r=e.startIndex*4*2;t=new Float32Array(t.buffer,r,n)}e.setShape(`points`,t),e.reset()})},e.prototype.incrementalPrepareUpdate=function(e){this._clear()},e.prototype.incrementalUpdate=function(e,t,n){var r=this._newAdded[0],i=t.getLayout(`points`),a=r&&r.shape.points;if(a&&a.length<2e4){var o=a.length,s=new Float32Array(o+i.length);s.set(a),s.set(i,o),r.endIndex=e.end,r.setShape({points:s})}else{this._newAdded=[];var c=this._create();c.startIndex=e.start,c.endIndex=e.end,c.incremental=!0,c.setShape({points:i}),this._setCommon(c,t,n)}},e.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},e.prototype._create=function(){var e=new qre({cursor:`default`});return e.ignoreCoarsePointer=!0,this.group.add(e),this._newAdded.push(e),e},e.prototype._setCommon=function(e,t,n){var r=t.hostModel;n||={};var i=t.getVisual(`symbolSize`);e.setShape(`size`,i instanceof Array?i:[i,i]),e.softClipShape=n.clipShape||null,e.symbolProxy=nD(t.getVisual(`symbol`),0,0,0,0),e.setColor=e.symbolProxy.setColor;var a=e.shape.size[0]<yI;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))})},e.prototype.remove=function(){this._clear()},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),Yre=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=e.getData();this._updateSymbolDraw(r,e).updateData(r,{clipShape:this._getClipShape(e)}),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,t,n){var r=e.getData();this._updateSymbolDraw(r,e).incrementalPrepareUpdate(r),this._finished=!1},t.prototype.incrementalRender=function(e,t,n){this._symbolDraw.incrementalUpdate(e,t.getData(),{clipShape:this._getClipShape(t)}),this._finished=e.end===t.getData().count()},t.prototype.updateTransform=function(e,t,n){var r=e.getData();if(this.group.dirty(),!this._finished||r.count()>1e4)return{update:!0};var i=BF(``).reset(e,t,n);i.progress&&i.progress({start:0,end:r.count(),count:r.count()},r),this._symbolDraw.updateLayout(r)},t.prototype.eachRendered=function(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)},t.prototype._getClipShape=function(e){if(e.get(`clip`,!0)){var t=e.coordinateSystem;return t&&t.getArea&&t.getArea(.1)}},t.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 Jre:new yF,this._isLargeDraw=r,this.group.removeAll()),this.group.add(n.group),n},t.prototype.remove=function(e,t){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type=`scatter`,t}(yE),bI={left:0,right:0,top:0,bottom:0},xI=[`25%`,`25%`],Xre=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(t,n){var r=HS(t.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),r&&t.outerBounds&&VS(t.outerBounds,r)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&VS(this.option.outerBounds,t.outerBounds)},t.type=`grid`,t.dependencies=[`xAxis`,`yAxis`],t.layoutMode=`box`,t.defaultOption={show:!1,z:0,left:`15%`,top:65,right:`10%`,bottom:80,containLabel:!1,outerBoundsMode:`auto`,outerBounds:bI,outerBoundsContain:`all`,outerBoundsClampWidth:xI[0],outerBoundsClampHeight:xI[1],backgroundColor:Z.color.transparent,borderWidth:1,borderColor:Z.color.neutral30},t}(GS),SI=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents(`grid`,Dm).models[0]},t.type=`cartesian2dAxis`,t}(GS);Ms(SI,Yj);var CI={show:!0,z:0,inverse:!1,name:``,nameLocation:`end`,nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:`...`,placeholder:`.`},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:Z.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:Z.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:Z.color.axisSplitLine,width:1,type:`solid`}},splitArea:{show:!1,areaStyle:{color:[Z.color.backgroundTint,Z.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:Z.color.neutral00,borderColor:Z.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:`auto`}},Zre=ks({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:`auto`,show:`auto`},axisLabel:{interval:`auto`}},CI),wI=ks({boundaryGap:[0,0],axisLine:{show:`auto`},axisTick:{show:`auto`},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:Z.color.axisMinorSplitLine,width:1}}},CI),TI={category:Zre,value:wI,time:ks({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:`bold`}}},splitLine:{show:!1}},wI),log:I({logBase:10},wI)},Qre={value:1,category:1,time:1,log:1},EI=null;function $re(e){EI||=e}function DI(){return EI}function OI(e,t,n,r){L(Qre,function(i,a){var o=ks(ks({},TI[a],!0),r,!0),s=function(e){N(n,e);function n(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t+`Axis.`+a,n}return n.prototype.mergeDefaultAndTheme=function(e,t){var n=BS(this),r=n?HS(e):{};ks(e,t.getTheme().get(a+`Axis`)),ks(e,this.getDefaultOption()),e.type=kI(e),n&&VS(e,r,n)},n.prototype.optionUpdated=function(){this.option.type===`category`&&(this.__ordinalMeta=HA.createByAxisModel(this))},n.prototype.getCategories=function(e){var t=this.option;if(t.type===`category`)return e?t.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.prototype.updateAxisBreaks=function(e){var t=DI();return t?t.updateModelAxisBreak(this,e):{breaks:[]}},n.type=t+`Axis.`+a,n.defaultOption=o,n}(n);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+`Axis`,kI)}function kI(e){return e.type||(e.data?`category`:`value`)}var eie=function(){function e(e){this.type=`cartesian`,this._dimList=[],this._axes={},this.name=e||``}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return R(this._dimList,function(e){return this._axes[e]},this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),Fs(this.getAxes(),function(t){return t.scale.type===e})},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}(),AI=[`x`,`y`];function jI(e){return(e.type===`interval`||e.type===`time`)&&!e.hasBreaks()}var tie=function(e){N(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`cartesian2d`,t.dimensions=AI,t}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis(`x`).scale,t=this.getAxis(`y`).scale;if(!(!jI(e)||!jI(t))){var n=e.getExtent(),r=t.getExtent(),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=ml([],this._transform=[c,0,0,l,i[0]-n[0]*c,i[1]-r[0]*l])}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale(`ordinal`)[0]||this.getAxesByScale(`time`)[0]||this.getAxis(`x`)},t.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]))},t.prototype.containData=function(e){return this.getAxis(`x`).containData(e[0])&&this.getAxis(`y`).containData(e[1])},t.prototype.containZone=function(e,t){var n=this.dataToPoint(e),r=this.dataToPoint(t),i=this.getArea(),a=new Ol(n[0],n[1],r[0]-n[0],r[1]-n[1]);return i.intersect(a)},t.prototype.dataToPoint=function(e,t,n){n||=[];var r=e[0],i=e[1];if(this._transform&&r!=null&&isFinite(r)&&i!=null&&isFinite(i))return Tc(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},t.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[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},t.prototype.pointToData=function(e,t,n){if(n||=[],this._invTransform)return Tc(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},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim===`x`?`y`:`x`)},t.prototype.getArea=function(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 Ol(r,i,Math.max(t[0],t[1])-r+e,Math.max(n[0],n[1])-i+e)},t}(eie),MI=function(e){N(t,e);function t(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 t.prototype.isHorizontal=function(){var e=this.position;return e===`top`||e===`bottom`},t.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},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e[this.dim===`x`?0:1]),t)},t.prototype.setCategorySortInfo=function(e){if(this.type!==`category`)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(IM),NI=`expandAxisBreak`,nie=`collapseAxisBreak`,rie=`toggleAxisBreak`,PI=`axisbreakchanged`,iie={type:NI,event:PI,update:`update`,refineEvent:FI},aie={type:nie,event:PI,update:`update`,refineEvent:FI},oie={type:rie,event:PI,update:`update`,refineEvent:FI};function FI(e,t,n,r){var i=[];return L(e,function(e){i=i.concat(e.eventBreaks)}),{eventContent:{breaks:i}}}function II(e){e.registerAction(iie,t),e.registerAction(aie,t),e.registerAction(oie,t);function t(e,t){var n=[],r=Tm(t,e);function i(t,i){L(r[t],function(t){L(t.updateAxisBreaks(e).breaks,function(e){var r;n.push(I((r={},r[i]=t.componentIndex,r),e))})})}return i(`xAxisModels`,`xAxisIndex`),i(`yAxisModels`,`yAxisIndex`),i(`singleAxisModels`,`singleAxisIndex`),{eventBreaks:n}}}var LI=Math.PI,RI=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],zI=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],BI=Cm(),VI=Cm(),HI=function(){function e(e){this.recordMap={},this.resolveAxisNameOverlap=e}return e.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:{}})},e}();function UI(e,t,n,r){var i=n.axis,a=t.ensureRecord(n),o=[],s,c=pL(e.axisName)&&Gj(e.nameLocation);L(r,function(e){var t=hN(e);if(!(!t||t.label.ignore)){o.push(t);var n=a.transGroup;c&&(n.transform?ml(WI,n.transform):cl(WI),t.transform&&ul(WI,WI,t.transform),Ol.copy(GI,t.localRect),GI.applyTransform(WI),s?s.union(GI):Ol.copy(s=new Ol(0,0,0,0),GI))}});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 Ol(f,0,p,1))}a.stOccupiedRect=s,a.labelInfoList=o}var WI=sl(),GI=new Ol(0,0,0,0),KI=function(e,t,n,r,i,a){if(Gj(e.nameLocation)){var o=a.stOccupiedRect;o&&qI(vN({},o,a.transGroup.transform),r,i)}else JI(a.labelInfoList,a.dirVec,r,i)};function qI(e,t,n){var r=new J;TN(e,t,r,{direction:Math.atan2(n.y,n.x),bidirectional:!1,touchThreshold:.05})&&yN(t,r)}function JI(e,t,n,r){for(var i=J.dot(r,t)>=0,a=0,o=e.length;a<o;a++){var s=e[i?a:o-1-a];s.label.ignore||qI(s,n,r)}}var YI=function(){function e(e,t,n,r){this.group=new Y,this._axisModel=e,this._api=t,this._local={},this._shared=r||new HI(KI),this._resetCfgDetermined(n)}return e.prototype.updateCfg=function(e){if(process.env.NODE_ENV!==`production`){var t=this._shared.ensureRecord(this._axisModel).ready;G(!t.axisLine&&!t.axisTickLabelDetermine),t.axisName=t.axisTickLabelEstimate=!1}var n=this._cfg.raw;n.position=e.position,n.labelOffset=e.labelOffset,this._resetCfgDetermined(n)},e.prototype.__getRawCfg=function(){return this._cfg.raw},e.prototype._resetCfgDetermined=function(e){var t=this._axisModel,n=t.getDefaultOption?t.getDefaultOption():{},r=W(e.axisName,t.get(`name`)),i=t.get(`nameMoveOverlap`);(i==null||i===`auto`)&&(i=W(e.defaultNameMoveOverlap,!0));var a={raw:e,position:e.position,rotation:e.rotation,nameDirection:W(e.nameDirection,1),tickDirection:W(e.tickDirection,1),labelDirection:W(e.labelDirection,1),labelOffset:W(e.labelOffset,0),silent:W(e.silent,!0),axisName:r,nameLocation:Js(t.get(`nameLocation`),n.nameLocation,`end`),shouldNameMoveOverlap:pL(r)&&i,optionHideOverlap:t.get([`axisLabel`,`hideOverlap`]),showMinorTicks:t.get([`minorTick`,`show`])};process.env.NODE_ENV!==`production`&&(G(a.position!=null),G(a.rotation!=null)),this._cfg=a;var o=new Y({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 J(Math.cos(-a.rotation),Math.sin(-a.rotation))},e.prototype.build=function(e,t){var n=this;return e||={axisLine:!0,axisTickLabelEstimate:!1,axisTickLabelDetermine:!0,axisName:!0},L(XI,function(r){e[r]&&ZI[r](n._cfg,n._local,n._shared,n._axisModel,n.group,n._transformGroup,n._api,t||{})}),this},e.innerTextLayout=function(e,t,n){var r=kp(t-e),i,a;return Ap(r)?(a=n>0?`top`:`bottom`,i=`center`):Ap(r-LI)?(a=n>0?`bottom`:`top`,i=`center`):(a=`middle`,i=r>0&&r<LI?n>0?`right`:`left`:n>0?`left`:`right`),{rotation:r,textAlign:i,textVerticalAlign:a}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+`Index`]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get(`tooltip`);return e.get(`silent`)||!(e.get(`triggerEvent`)||t&&t.show)},e}(),XI=[`axisLine`,`axisTickLabelEstimate`,`axisTickLabelDetermine`,`axisName`],ZI={axisLine:function(e,t,n,r,i,a,o){if(process.env.NODE_ENV!==`production`){var s=n.ensureRecord(r).ready;G(!s.axisLine),s.axisLine=!0}var c=r.get([`axisLine`,`show`]);if(c===`auto`&&(c=!0,e.raw.axisLineAutoShow!=null&&(c=!!e.raw.axisLineAutoShow)),c){var l=r.axis.getExtent(),u=a.transform,d=[l[0],0],f=[l[1],0],p=d[0]>f[0];u&&(Tc(d,d,u),Tc(f,f,u));var m=F({lineCap:`round`},r.getModel([`axisLine`,`lineStyle`]).getLineStyle()),h={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:m};if(r.get([`axisLine`,`breakLine`])&&r.axis.scale.hasBreaks())DI().buildAxisBreakLine(r,i,a,h);else{var g=new wy(F({shape:{x1:d[0],y1:d[1],x2:f[0],y2:f[1]}},h));cb(g.shape,g.style.lineWidth),g.anid=`line`,i.add(g)}var _=r.get([`axisLine`,`symbol`]);if(_!=null){var v=r.get([`axisLine`,`symbolSize`]);H(_)&&(_=[_,_]),(H(v)||Bs(v))&&(v=[v,v]);var y=iD(r.get([`axisLine`,`symbolOffset`])||0,v),b=v[0],x=v[1];L([{rotate:e.rotation+Math.PI/2,offset:y[0],r:0},{rotate:e.rotation-Math.PI/2,offset:y[1],r:Math.sqrt((d[0]-f[0])*(d[0]-f[0])+(d[1]-f[1])*(d[1]-f[1]))}],function(t,n){if(_[n]!==`none`&&_[n]!=null){var r=nD(_[n],-b/2,-x/2,b,x,m.stroke,!0),a=t.r+t.offset,o=p?f:d;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){if(process.env.NODE_ENV!==`production`){var c=n.ensureRecord(r).ready;G(!c.axisTickLabelDetermine),c.axisTickLabelEstimate=!0}oL(t,i,s)&&QI(e,t,n,r,i,a,o,mM.estimate)},axisTickLabelDetermine:function(e,t,n,r,i,a,o,s){if(process.env.NODE_ENV!==`production`){var c=n.ensureRecord(r).ready;c.axisTickLabelDetermine=!0}oL(t,i,s)&&QI(e,t,n,r,i,a,o,mM.determine);var l=iL(e,i,a,r);tL(e,t.labelLayoutList,l),aL(e,i,a,r,e.tickDirection)},axisName:function(e,t,n,r,i,a,o,s){var c=n.ensureRecord(r);if(process.env.NODE_ENV!==`production`){var l=c.ready;G(l.axisTickLabelEstimate||l.axisTickLabelDetermine),l.axisName=!0}t.nameEl&&=(i.remove(t.nameEl),c.nameLayout=c.nameLocation=null);var u=e.axisName;if(pL(u)){var d=e.nameLocation,f=e.nameDirection,p=r.getModel(`nameTextStyle`),m=r.get(`nameGap`)||0,h=r.axis.getExtent(),g=r.axis.inverse?-1:1,_=new J(0,0),v=new J(0,0);d===`start`?(_.x=h[0]-g*m,v.x=-g):d===`end`?(_.x=h[1]+g*m,v.x=g):(_.x=(h[0]+h[1])/2,_.y=e.labelOffset+f*m,v.y=f);var y=sl();v.transform(fl(y,y,e.rotation));var b=r.get(`nameRotate`);b!=null&&(b=b*LI/180);var x,S;Gj(d)?x=YI.innerTextLayout(e.rotation,b??e.rotation,f):(x=$I(e.rotation,d,b||0,h),S=e.raw.axisNameAvailableWidth,S!=null&&(S=Math.abs(S/Math.sin(x.rotation)),!isFinite(S)&&(S=null)));var C=p.getFont(),w=r.get(`nameTruncate`,!0)||{},T=w.ellipsis,E=qs(e.raw.nameTruncateMaxWidth,w.maxWidth,S),D=s.nameMarginLevel||0,O=new a_({x:_.x,y:_.y,rotation:x.rotation,silent:YI.isLabelSilent(r),style:zb(p,{text:u,font:C,overflow:`truncate`,width:E,ellipsis:T,fill:p.getTextColor()||r.get([`axisLine`,`lineStyle`,`color`]),align:p.get(`align`)||x.textAlign,verticalAlign:p.get(`verticalAlign`)||x.textVerticalAlign}),z2:1});if(Cb({el:O,componentModel:r,itemName:u}),O.__fullText=u,O.anid=`name`,r.get(`triggerEvent`)){var k=YI.makeAxisEventDataBase(r);k.targetType=`axisName`,k.name=u,y_(O).eventData=k}a.add(O),O.updateTransform(),t.nameEl=O;var A=c.nameLayout=hN({label:O,priority:O.z2,defaultAttr:{ignore:O.ignore},marginDefault:Gj(d)?RI[D]:zI[D]});if(c.nameLocation=d,i.add(O),O.decomposeTransform(),e.shouldNameMoveOverlap&&A){var j=n.ensureRecord(r);process.env.NODE_ENV!==`production`&&G(j.labelInfoList),n.resolveAxisNameOverlap(e,n,r,A,v,j)}}}};function QI(e,t,n,r,i,a,o,s){cL(t)||sL(e,t,i,s,r,o);var c=t.labelLayoutList;uL(e,r,c,a),hL(r,e.rotation,c);var l=e.optionHideOverlap;eL(r,c,l),l&&wN(Fs(c,function(e){return e&&!e.label.ignore})),UI(e,n,r,c)}function $I(e,t,n,r){var i=kp(n-e),a,o,s=r[0]>r[1],c=t===`start`&&!s||t!==`start`&&s;return Ap(i-LI/2)?(o=c?`bottom`:`top`,a=`center`):Ap(i-LI*1.5)?(o=c?`top`:`bottom`,a=`center`):(o=`middle`,a=i<LI*1.5&&i>LI/2?c?`left`:`right`:c?`right`:`left`),{rotation:i,textAlign:a,textVerticalAlign:o}}function eL(e,t,n){if(Hj(e.axis))return;function r(e,r,i){var a=hN(t[r]),o=hN(t[i]);if(!(!a||!o)){if(e===!1||a.suggestIgnore){nL(a.label);return}if(o.suggestIgnore){nL(o.label);return}var s=.1;if(!n){var c=[0,0,0,0];a=bN({marginForce:c},a),o=bN({marginForce:c},o)}TN(a,o,null,{touchThreshold:s})&&nL(e?o.label:a.label)}}var i=e.get([`axisLabel`,`showMinLabel`]),a=e.get([`axisLabel`,`showMaxLabel`]),o=t.length;r(i,0,1),r(a,o-1,o-2)}function tL(e,t,n){e.showMinorTicks||L(t,function(e){if(e&&e.label.ignore)for(var t=0;t<n.length;t++){var r=n[t],i=VI(r),a=BI(e.label);if(i.tickValue!=null&&!i.onBand&&i.tickValue===a.tickValue){nL(r);return}}})}function nL(e){e&&(e.ignore=!0)}function rL(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&&(Tc(o,o,t),Tc(s,s,t));var u=new wy({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:r,z2:2,autoBatch:!0,silent:!0});cb(u.shape,u.style.lineWidth),u.anid=i+`_`+e[c].tickValue,a.push(u);var d=VI(u);d.onBand=!!e[c].onBand,d.tickValue=e[c].tickValue}return a}function iL(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=rL(i.getTicksCoords(),n.transform,c,I(s.getLineStyle(),{stroke:r.get([`axisLine`,`lineStyle`,`color`])}),`ticks`),u=0;u<l.length;u++)t.add(l[u]);return l}function aL(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=I(c.getLineStyle(),I(r.getModel(`axisTick`).getLineStyle(),{stroke:r.get([`axisLine`,`lineStyle`,`color`])})),d=0;d<s.length;d++)for(var f=rL(s[d],n.transform,l,u,`minorticks_`+d),p=0;p<f.length;p++)t.add(f[p])}}function oL(e,t,n){if(cL(e)){var r=e.axisLabelsCreationContext;process.env.NODE_ENV!==`production`&&G(e.labelGroup&&r);var i=r.out.noPxChangeTryDetermine;if(n.noPxChange){for(var a=!0,o=0;o<i.length;o++)a&&=i[o]();if(a)return!1}i.length&&(t.remove(e.labelGroup),lL(e,null,null,null))}return!0}function sL(e,t,n,r,i,a){var o=i.axis,s=qs(e.raw.axisLabelShow,i.get([`axisLabel`,`show`])),c=new Y;n.add(c);var l=hM(r);if(!s||o.scale.isBlank()){lL(t,[],c,l);return}var u=i.getModel(`axisLabel`),d=o.getViewLabels(l),f=(qs(e.raw.labelRotate,u.get(`rotate`))||0)*LI/180,p=YI.innerTextLayout(e.rotation,f,e.labelDirection),m=i.getCategories&&i.getCategories(!0),h=[],g=i.get(`triggerEvent`),_=1/0,v=-1/0;L(d,function(e,t){var n=o.scale.type===`ordinal`?o.scale.getRawOrdinalNumber(e.tickValue):e.tickValue,r=e.formattedLabel,s=e.rawLabel,l=u;if(m&&m[n]){var f=m[n];U(f)&&f.textStyle&&(l=new ex(f.textStyle,u,i.ecModel))}var y=l.getTextColor()||i.get([`axisLine`,`lineStyle`,`color`]),b=l.getShallow(`align`,!0)||p.textAlign,x=W(l.getShallow(`alignMinLabel`,!0),b),S=W(l.getShallow(`alignMaxLabel`,!0),b),C=l.getShallow(`verticalAlign`,!0)||l.getShallow(`baseline`,!0)||p.textVerticalAlign,w=W(l.getShallow(`verticalAlignMinLabel`,!0),C),T=W(l.getShallow(`verticalAlignMaxLabel`,!0),C),E=10+(e.time?.level||0);_=Math.min(_,E),v=Math.max(v,E);var D=new a_({x:0,y:0,rotation:0,silent:YI.isLabelSilent(i),z2:E,style:zb(l,{text:r,align:t===0?x:t===d.length-1?S:b,verticalAlign:t===0?w:t===d.length-1?T:C,fill:V(y)?y(o.type===`category`?s:o.type===`value`?n+``:n,t):y})});D.anid=`label_`+n;var O=BI(D);if(O.break=e.break,O.tickValue=n,O.layoutRotation=p.rotation,Cb({el:D,componentModel:i,itemName:r,formatterParamsExtra:{isTruncated:function(){return D.isTruncated},value:s,tickIndex:t}}),g){var k=YI.makeAxisEventDataBase(i);k.targetType=`axisLabel`,k.value=s,k.tickIndex=t,e.break&&(k.break={start:e.break.parsedBreak.vmin,end:e.break.parsedBreak.vmax}),o.type===`category`&&(k.dataIndex=n),y_(D).eventData=k,e.break&&mL(i,a,D,e.break)}h.push(D),c.add(D)}),lL(t,R(h,function(e){return{label:e,priority:BI(e).break?e.z2+(v-_+1):e.z2,defaultAttr:{ignore:e.ignore}}}),c,l)}function cL(e){return!!e.labelLayoutList}function lL(e,t,n,r){e.labelLayoutList=t,e.labelGroup=n,e.axisLabelsCreationContext=r}function uL(e,t,n,r){var i=t.get([`axisLabel`,`margin`]);L(n,function(n,a){var o=hN(n);if(o){var s=o.label,c=BI(s);o.suggestIgnore=s.ignore,s.ignore=!1,Mf(dL,fL),dL.x=t.axis.dataToCoord(c.tickValue),dL.y=e.labelOffset+e.labelDirection*i,dL.rotation=c.layoutRotation,r.add(dL),dL.updateTransform(),r.remove(dL),dL.decomposeTransform(),Mf(s,dL),s.markRedraw(),pN(o,!0),hN(o)}})}var dL=new e_,fL=new e_;function pL(e){return!!e}function mL(e,t,n,r){n.on(`click`,function(n){var i={type:NI,breaks:[{start:r.parsedBreak.breakOption.start,end:r.parsedBreak.breakOption.end}]};i[e.axis.dim+`AxisIndex`]=e.componentIndex,t.dispatchAction(i)})}function hL(e,t,n){var r=bx();if(r){var i=r.retrieveAxisBreakPairs(n,function(e){return e&&BI(e.label).break},!0),a=e.get([`breakLabelLayout`,`moveOverlap`],!0);(a===!0||a===`auto`)&&L(i,function(r){DI().adjustBreakLabelPair(e.axis.inverse,t,[hN(n[r[0]]),hN(n[r[1]])])})}}function gL(e,t,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),qs(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 _L(e){return e.coordinateSystem&&e.coordinateSystem.type===`cartesian2d`}function vL(e){var t={xAxisModel:null,yAxisModel:null};return L(t,function(n,r){var i=r.replace(/Model$/,``),a=e.getReferringComponents(i,Dm).models[0];if(process.env.NODE_ENV!==`production`&&!a)throw Error(i+` "`+Js(e.get(i+`Index`),e.get(i+`Id`),0)+`" not found`);t[r]=a}),t}function yL(e,t,n,r,i,a){for(var o=gL(e,n),s=!1,c=!1,l=0;l<t.length;l++)kA(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 YI(n,r,o,i)}function bL(e,t,n){var r=gL(t,n);if(process.env.NODE_ENV!==`production`){var i=e.__getRawCfg();L(Ls(r),function(e){e!==`position`&&e!==`labelOffset`&&G(r[e]===i[e])})}e.updateCfg(r)}function xL(e,t,n){var r=KA.prototype,i=r.getTicks.call(n),a=r.getTicks.call(n,{expandToNicedExtent:!0}),o=i.length-1,s=r.getInterval.call(n),c=Pj(e,t),l=c.extent,u=c.fixMin,d=c.fixMax;e.type===`log`&&(l=zA(e.base,l,!0)),e.setBreaksFromOption(qj(t)),e.setExtent(l[0],l[1]),e.calcNiceExtent({splitNumber:o,fixMin:u,fixMax:d});var f=r.getExtent.call(e);u&&(l[0]=f[0]),d&&(l[1]=f[1]);var p=r.getInterval.call(e),m=l[0],h=l[1];if(u&&d)p=(h-m)/o;else if(u)for(h=l[0]+p*o;h<l[1]&&isFinite(h)&&isFinite(l[1]);)p=jA(p),h=l[0]+p*o;else if(d)for(m=l[1]-p*o;m>l[0]&&isFinite(m)&&isFinite(l[0]);)p=jA(p),m=l[1]-p*o;else{e.getTicks().length-1>o&&(p=jA(p));var g=p*o;h=Math.ceil(l[1]/p)*p,m=wp(h-g),m<0&&l[0]>=0?(m=0,h=wp(g)):h>0&&l[1]<=0&&(h=0,m=-wp(g))}var _=(i[0].value-a[0].value)/s,v=(i[o].value-a[o].value)/s;if(r.setExtent.call(e,m+p*_,h+p*v),r.setInterval.call(e,p),(_||v)&&r.setNiceExtent.call(e,m+p,h-p),process.env.NODE_ENV!==`production`){var y=r.getTicks.call(e);y[1]&&(!OA(p)||Dp(y[1].value)>Dp(p))&&Wp(`The ticks may be not readable when set min: `+t.get(`min`)+`, max: `+t.get(`max`)+(` and alignTicks: true. (`+t.axis?.dim+`AxisIndex: `+t.componentIndex+`)`),!0)}}var SL=[[3,1],[0,2]],CL=function(){function e(e,t,n){this.type=`grid`,this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=AI,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;this._updateScale(e,this.model);function r(e){var t,n=Ls(e),r=n.length;if(r){for(var i=[],a=r-1;a>=0;a--){var o=e[+n[a]],s=o.model,c=o.scale;kA(c)&&s.get(`alignTicks`)&&s.get(`interval`)==null?i.push(o):(Ij(c,s),kA(c)&&(t=o))}i.length&&(t||(t=i.pop(),Ij(t.scale,t.model)),L(i,function(e){xL(e.scale,e.model,t.scale)}))}}r(n.x),r(n.y);var i={};L(n.x,function(e){TL(n,`y`,e,i)}),L(n.y,function(e){TL(n,`x`,e,i)}),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=LS(e,t),i=this._rect=PS(e.getBoxLayoutParams(),r.refContainer),a=this._axesMap,o=this._coordsList,s=e.get(`containLabel`);if(OL(a,i),!n){var c=NL(i,o,a,s,t),l=void 0;if(s)AL?(AL(this._axesList,i),OL(a,i)):(process.env.NODE_ENV!==`production`&&Up("Specified `grid.containLabel` but no `use(LegacyGridContainLabel)`;use `grid.outerBounds` instead.",!0),l=ML(i.clone(),`axisLabel`,null,i,a,c,r));else{var u=FL(e,i,r),d=u.outerBoundsRect,f=u.parsedOuterBoundsContain,p=u.outerBoundsClamp;d&&(l=ML(d,f,p,i,a,c,r))}PL(i,a,mM.determine,null,l,r)}L(this._coordsList,function(e){e.calcAffineTransform()})},e.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(n!=null)return n[t||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var n=`x`+e+`y`+t;return this._coordsMap[n]}U(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]},e.prototype.getCartesians=function(){return this._coordsList.slice()},e.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},e.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},e.prototype._findConvertTarget=function(e){var t=e.seriesModel,n=e.xAxisModel||t&&t.getReferringComponents(`xAxis`,Dm).models[0],r=e.yAxisModel||t&&t.getReferringComponents(`yAxis`,Dm).models[0],i=e.gridModel,a=this._coordsList,o,s;return t?(o=t.coordinateSystem,js(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}},e.prototype.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},e.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`,c(`x`),this),t.eachComponent(`yAxis`,c(`y`),this),!s.x||!s.y){this._axesMap={},this._axesList=[];return}this._axesMap=o,L(o.x,function(t,n){L(o.y,function(i,a){var o=`x`+n+`y`+a,s=new tie(o);s.master=r,s.model=e,r._coordsMap[o]=s,r._coordsList.push(s),s.addAxis(t),s.addAxis(i)})});function c(t){return function(n,r){if(wL(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=new MI(t,Lj(n),[0,0],n.get(`type`),c);l.onBand=l.type===`category`&&n.get(`boundaryGap`),l.inverse=n.get(`inverse`),n.axis=l,l.model=n,l.grid=i,l.index=r,i._axesList.push(l),o[t][r]=l,s[t]++}}}},e.prototype._updateScale=function(e,t){L(this._axesList,function(e){if(e.scale.setExtent(1/0,-1/0),e.type===`category`){var t=e.model.get(`categorySortInfo`);e.scale.setSortInfo(t)}}),e.eachSeries(function(e){if(_L(e)){var r=vL(e),i=r.xAxisModel,a=r.yAxisModel;if(!wL(i,t)||!wL(a,t))return;var o=this.getCartesian(i.componentIndex,a.componentIndex),s=e.getData(),c=o.getAxis(`x`),l=o.getAxis(`y`);n(s,c),n(s,l)}},this);function n(e,t){L(Uj(e,t.dim),function(n){t.scale.unionExtentFromData(e,n)})}},e.prototype.getTooltipAxes=function(e){var t=[],n=[];return L(this.getCartesians(),function(r){var i=e!=null&&e!==`auto`?r.getAxis(e):r.getBaseAxis(),a=r.getOtherAxis(i);js(t,i)<0&&t.push(i),js(n,a)<0&&n.push(a)}),{baseAxes:t,otherAxes:n}},e.create=function(t,n){var r=[];return t.eachComponent(`grid`,function(i,a){var o=new e(i,t,n);o.name=`grid_`+a,o.resize(i,n,!0),i.coordinateSystem=o,r.push(o)}),t.eachSeries(function(e){wS({targetModel:e,coordSysType:`cartesian2d`,coordSysProvider:t});function t(){var t=vL(e),n=t.xAxisModel,r=t.yAxisModel,i=n.getCoordSysModel();if(process.env.NODE_ENV!==`production`){if(!i)throw Error(`Grid "`+Js(n.get(`gridIndex`),n.get(`gridId`),0)+`" not found`);if(n.getCoordSysModel()!==r.getCoordSysModel())throw Error(`xAxis and yAxis must use the same grid`)}return i.coordinateSystem.getCartesian(n.componentIndex,r.componentIndex)}}),r},e.dimensions=AI,e}();function wL(e,t){return e.getCoordSysModel()===t}function TL(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)EL(i[c])&&(a=i[c]);else for(var l in i)if(i.hasOwnProperty(l)&&EL(i[l])&&!r[u(i[l])]){a=i[l];break}a&&(r[u(a)]=!0);function u(e){return e.dim+`_`+e.index}}function EL(e){return e&&e.type!==`category`&&e.type!==`time`&&Rj(e)}function DL(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 OL(e,t){L(e.x,function(e){return kL(e,t.x,t.width)}),L(e.y,function(e){return kL(e,t.y,t.height)})}function kL(e,t,n){var r=[0,n],i=+!!e.inverse;e.setExtent(r[i],r[1-i]),DL(e,t)}var AL;function jL(e){AL=e}function ML(e,t,n,r,i,a,o){process.env.NODE_ENV!==`production`&&G(t===`all`||t===`axisLabel`),PL(r,i,mM.estimate,t,!1,o);var s=[0,0,0,0];l(0),l(1),u(r,0,NaN),u(r,1,NaN);var c=Is(s,function(e){return e>0})==null;return bb(r,s,!0,!0,n),OL(i,r),c;function l(e){L(i[$y[e]],function(t){if(Kj(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(BI(o.label).tickValue);s=e===1?1-s:s,u(o.rect,e,s),u(o.rect,1-e,NaN)}var c=n.nameLayout;if(c){var s=Gj(n.nameLocation)?.5:NaN;u(c.rect,e,s),u(c.rect,1-e,NaN)}}})}function u(t,n,r){var i=e[$y[n]]-t[$y[n]],a=t[eb[n]]+t[$y[n]]-(e[eb[n]]+e[$y[n]]);i=d(i,1-r),a=d(a,r);var o=SL[n][0],c=SL[n][1];s[o]=bp(s[o],i),s[c]=bp(s[c],a)}function d(e,t){return e>0&&!Ks(t)&&t>1e-4&&(e/=t),e}}function NL(e,t,n,r,i){var a=new HI(IL);return L(n,function(n){return L(n,function(n){if(Kj(n.model)){var o=!r;n.axisBuilder=yL(e,t,n.model,i,a,o)}})}),a}function PL(e,t,n,r,i,a){var o=n===mM.determine;L(t,function(t){return L(t,function(t){Kj(t.model)&&(bL(t.axisBuilder,e,t.model),t.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};c(0),c(1);function c(t){s[$y[1-t]]=e[eb[t]]<=a.refContainer[eb[t]]*.5?0:1-t==1?2:1}L(t,function(e,t){return L(e,function(e){Kj(e.model)&&((r===`all`||o)&&e.axisBuilder.build({axisName:!0},{nameMarginLevel:s[t]}),o&&e.axisBuilder.build({axisLine:!0}))})})}function FL(e,t,n){var r,i=e.get(`outerBoundsMode`,!0);i===`same`?r=t.clone():i==null||i===`auto`?r=PS(e.get(`outerBounds`,!0)||bI,n.refContainer):i!==`none`&&process.env.NODE_ENV!==`production`&&Gp(`Invalid grid[`+e.componentIndex+`].outerBoundsMode.`);var a=e.get(`outerBoundsContain`,!0),o;a==null||a===`auto`?o=`all`:js([`all`,`axisLabel`],a)<0?(process.env.NODE_ENV!==`production`&&Gp(`Invalid grid[`+e.componentIndex+`].outerBoundsContain.`),o=`all`):o=a;var s=[Cp(W(e.get(`outerBoundsClampWidth`,!0),xI[0]),t.width),Cp(W(e.get(`outerBoundsClampHeight`,!0),xI[1]),t.height)];return{outerBoundsRect:r,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var IL=function(e,t,n,r,i,a){var o=n.axis.dim===`x`?`y`:`x`;KI(e,t,n,r,i,a),Gj(e.nameLocation)||L(t.recordMap[o],function(e){e&&e.labelInfoList&&e.dirVec&&JI(e.labelInfoList,e.dirVec,r,i)})};function LL(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return RL(n,e,t),n.seriesInvolved&&BL(n,e),n}function RL(e,t,n){var r=t.getComponent(`tooltip`),i=t.getComponent(`axisPointer`),a=i.get(`link`,!0)||[],o=[];L(n.getCoordinateSystems(),function(n){if(!n.axisPointerEnabled)return;var s=qL(n.model),c=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var l=n.model.getModel(`tooltip`,r);if(L(n.getAxes(),Rs(p,!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)&&L(f.baseAxes,Rs(p,d?`cross`:!0,u)),d&&L(f.otherAxes,Rs(p,`cross`,!1))}function p(r,s,u){var d=u.model.getModel(`axisPointer`,i),f=d.get(`show`);if(!(!f||f===`auto`&&!r&&!KL(d))){s??=d.get(`triggerTooltip`),d=r?zL(u,l,i,t,r,s):d;var p=d.get(`snap`),m=d.get(`triggerEmphasis`),h=qL(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:KL(d),seriesModels:[],linkGroup:null};c[h]=_,e.seriesInvolved=e.seriesInvolved||g;var v=VL(a,u);if(v!=null){var y=o[v]||(o[v]={axesInfo:{}});y.axesInfo[h]=_,y.mapper=a[v].mapper,_.linkGroup=y}}}})}function zL(e,t,n,r,i,a){var o=t.getModel(`axisPointer`),s=[`type`,`snap`,`lineStyle`,`shadowStyle`,`label`,`animation`,`animationDurationUpdate`,`animationEasingUpdate`,`z`],c={};L(s,function(e){c[e]=P(o.get(e))}),c.snap=e.type!==`category`&&!!a,o.get(`type`)===`cross`&&(c.type=`line`);var l=c.label||={};if(l.show??=!1,i===`cross`&&(l.show=o.get([`label`,`show`])??!0,!a)){var u=c.lineStyle=o.get(`crossStyle`);u&&I(l,u.textStyle)}return e.model.getModel(`axisPointer`,new ex(c,n,r))}function BL(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||L(e.coordSysAxesInfo[qL(n.model)],function(e){var r=e.axis;n.getAxis(r.dim)===r&&(e.seriesModels.push(t),e.seriesDataCount??=0,e.seriesDataCount+=t.getData().count())})})}function VL(e,t){for(var n=t.model,r=t.dim,i=0;i<e.length;i++){var a=e[i]||{};if(HL(a[r+`AxisId`],n.id)||HL(a[r+`AxisIndex`],n.componentIndex)||HL(a[r+`AxisName`],n.name))return i}}function HL(e,t){return e===`all`||B(e)&&js(e,t)>=0||e===t}function UL(e){var t=WL(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=KL(n);a??(i.status=s?`show`:`hide`);var c=r.getExtent().slice();c[0]>c[1]&&c.reverse(),(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 WL(e){var t=(e.ecModel.getComponent(`axisPointer`)||{}).coordSysAxesInfo;return t&&t.axesInfo[qL(e)]}function GL(e){var t=WL(e);return t&&t.axisPointerModel}function KL(e){return!!e.get([`handle`,`show`])}function qL(e){return e.type+`||`+e.id}var JL={},YL=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(t,n,r,i){this.axisPointerClass&&UL(t),e.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,r,!0)},t.prototype.updateAxisPointer=function(e,t,n,r){this._doUpdateAxisPointerClass(e,n,!1)},t.prototype.remove=function(e,t){var n=this._axisPointer;n&&n.remove(t)},t.prototype.dispose=function(t,n){this._disposeAxisPointer(n),e.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(e,n,r){var i=t.getAxisPointerClass(this.axisPointerClass);if(i){var a=GL(e);a?(this._axisPointer||=new i).render(e,a,n,r):this._disposeAxisPointer(n)}},t.prototype._disposeAxisPointer=function(e){this._axisPointer&&this._axisPointer.dispose(e),this._axisPointer=null},t.registerAxisPointerClass=function(e,t){if(process.env.NODE_ENV!==`production`&&JL[e])throw Error(`axisPointer `+e+` exists`);JL[e]=t},t.getAxisPointerClass=function(e){return e&&JL[e]},t.type=`axis`,t}(hE),XL=Cm();function ZL(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,clamp:!0,breakTicks:`none`,pruneByBreak:`preserve_extent_bound`});if(l.length){var u=s.length,d=XL(e).splitAreaColors,f=K(),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=B(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 e_({anid:C==null?null:`area_`+C,shape:{x:y,y:b,width:x,height:S},style:I({fill:s[p]},_),autoBatch:!0,silent:!0})),p=(p+1)%u}XL(e).splitAreaColors=f}}}function QL(e){XL(e).splitAreaColors=null}var $L=[`splitArea`,`splitLine`,`minorSplitLine`,`breakArea`],eR=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass=`CartesianAxisPointer`,n}return t.prototype.render=function(t,n,r,i){this.group.removeAll();var a=this._axisGroup;this._axisGroup=new Y,this.group.add(this._axisGroup),Kj(t)&&(this._axisGroup.add(t.axis.axisBuilder.group),L($L,function(e){t.get([e,`show`])&&tR[e](this,this._axisGroup,t,t.getCoordSysModel(),r)},this),i&&i.type===`changeAxisOrder`&&i.isInitSort||mb(a,this._axisGroup,t),e.prototype.render.call(this,t,n,r,i))},t.prototype.remove=function(){QL(this)},t.type=`cartesianAxis`,t}(YL),tR={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=B(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 wy({anid:b==null?null:`line_`+b,autoBatch:!0,shape:{x1:h[0],y1:h[1],x2:g[0],y2:g[1]},style:I({stroke:c[x]},_),silent:!0});cb(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 wy({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});cb(g.shape,f.lineWidth),t.add(g)}},splitArea:function(e,t,n,r,i){ZL(e,t,n,r)},breakArea:function(e,t,n,r,i){var a=DI(),o=n.axis.scale;a&&o.type!==`ordinal`&&a.rectCoordBuildBreakAxis(t,e,n,r.coordinateSystem.getRect(),i)}},nR=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`xAxis`,t}(eR),rR=function(e){N(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=nR.type,t}return t.type=`yAxis`,t}(eR),iR=function(e){N(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`grid`,t}return t.prototype.render=function(e,t){this.group.removeAll(),e.get(`show`)&&this.group.add(new e_({shape:e.coordinateSystem.getRect(),style:I({fill:e.get(`backgroundColor`)},e.getItemStyle()),silent:!0,z2:-1}))},t.type=`grid`,t}(hE),aR={offset:0};function oR(e){e.registerComponentView(iR),e.registerComponentModel(Xre),e.registerCoordinateSystem(`cartesian2d`,CL),OI(e,`x`,SI,aR),OI(e,`y`,SI,aR),e.registerComponentView(nR),e.registerComponentView(rR),e.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}function sR(e,t){var n=e.coordinateSystem,r=n&&n.type,i=n&&n.getBaseAxis&&n.getBaseAxis(),a=i&&i.scale&&i.scale.type,o=r===`cartesian2d`&&a===`ordinal`||r===`single`,s=t.model.get(`jitter`)>0;return o&&s}var cR=Cm();function lR(e,t,n,r){if(e instanceof MI){var i=e.scale.type;if(i!==`category`&&i!==`ordinal`)return n}var a=e.model,o=a.get(`jitter`),s=a.get(`jitterOverlap`),c=a.get(`jitterMargin`)||0,l=e.scale.type===`ordinal`?e.getBandWidth():null;return o>0?s?uR(n,o,l,r):dR(e,t,n,r,o,c):n}function uR(e,t,n,r){if(n===null)return e+(Math.random()-.5)*t;var i=n-r*2,a=Math.min(Math.max(0,t),i);return e+(Math.random()-.5)*a}function dR(e,t,n,r,i,a){var o=cR(e);o.items||=[];var s=o.items,c=fR(s,t,n,r,i,a,1),l=fR(s,t,n,r,i,a,-1),u=Math.abs(c-n)<Math.abs(l-n)?c:l,d=e.scale.type===`ordinal`?e.getBandWidth():null,f=Math.abs(u-n);return f>i/2||d&&f>d/2-r?uR(n,i,d,r):(s.push({fixedCoord:t,floatCoord:u,r}),u)}function fR(e,t,n,r,i,a,o){for(var s=n,c=0;c<e.length;c++){var l=e[c],u=t-l.fixedCoord,d=s-l.floatCoord,f=u*u+d*d,p=r+l.r+a;if(f<p*p){var m=l.floatCoord+Math.sqrt(p*p-u*u)*o;if(Math.abs(m-n)>i/2)return Number.MAX_VALUE;if(o===1&&m>s||o===-1&&m<s){s=m,c=-1;continue}}}return s}function pR(e){e.eachSeriesByType(`scatter`,function(e){var t=e.coordinateSystem;if(t&&(t.type===`cartesian2d`||t.type===`single`)){var n=t.getBaseAxis?t.getBaseAxis():null;if(n&&sR(e,n)){var r=e.getData();r.each(function(e){var t=n.dim,i=n.orient,a=i===`horizontal`&&n.type!==`category`||i===`vertical`&&n.type===`category`,o=r.getItemLayout(e),s=r.getItemVisual(e,`symbolSize`),c=s instanceof Array?(s[1]+s[0])/2:s;if(t===`y`||t===`single`&&a){var l=lR(n,o[0],o[1],c/2);r.setItemLayout(e,[o[0],l])}else if(t===`x`||t===`single`&&!a){var l=lR(n,o[1],o[0],c/2);r.setItemLayout(e,[l,o[1]])}})}}})}function mR(e){Nk(oR),e.registerSeriesModel(Gre),e.registerChartView(Yre),e.registerLayout(BF(`scatter`))}function hR(e){e.registerLayout(e.PRIORITY.VISUAL.POST_CHART_LAYOUT,pR)}function gR(e){e.eachSeriesByType(`radar`,function(e){var t=e.getData(),n=[],r=e.coordinateSystem;if(r){var i=r.getIndicatorAxes();L(i,function(e,a){t.each(t.mapDimension(i[a].dim),function(e,t){n[t]=n[t]||[];var i=r.dataToPoint(e,a);n[t][a]=_R(i)?i:vR(r)})}),t.each(function(e){var i=Is(n[e],function(e){return _R(e)})||vR(r);n[e].push(i.slice()),t.setItemLayout(e,n[e])})}})}function _R(e){return!isNaN(e[0])&&!isNaN(e[1])}function vR(e){return[e.cx,e.cy]}function yR(e){var t=e.polar;if(t){B(t)||(t=[t]);var n=[];L(t,function(t,r){t.indicator?(t.type&&!t.shape&&(t.shape=t.type),e.radar=e.radar||[],B(e.radar)||(e.radar=[e.radar]),e.radar.push(t)):n.push(t)}),e.polar=n}L(e.series,function(e){e&&e.type===`radar`&&e.polarIndex&&(e.radarIndex=e.polarIndex)})}var bR=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=e.coordinateSystem,i=this.group,a=e.getData(),o=this._data;function s(e,t){var n=e.getItemVisual(t,`symbol`)||`circle`;if(n!==`none`){var r=rD(e.getItemVisual(t,`symbolSize`)),i=nD(n,-1,-1,2,2),a=e.getItemVisual(t,`symbolRotate`)||0;return i.attr({style:{strokeNoScale:!0},z2:100,scaleX:r[0]/2,scaleY:r[1]/2,rotation:a*Math.PI/180||0}),i}}function c(t,n,r,i,a,o){r.removeAll();for(var c=0;c<n.length-1;c++){var l=s(i,a);l&&(l.__dimIdx=c,t[c]?(l.setPosition(t[c]),Zy[o?`initProps`:`updateProps`](l,{x:n[c][0],y:n[c][1]},e,a)):l.setPosition(n[c]),r.add(l))}}function l(e){return R(e,function(e){return[r.cx,r.cy]})}a.diff(o).add(function(t){var n=a.getItemLayout(t);if(n){var r=new Sy,i=new Cy,o={shape:{points:n}};r.shape.points=l(n),i.shape.points=l(n),Gy(r,o,e,t),Gy(i,o,e,t);var s=new Y,u=new Y;s.add(i),s.add(r),s.add(u),c(i.shape.points,n,u,a,t,!0),a.setItemGraphicEl(t,s)}}).update(function(t,n){var r=o.getItemGraphicEl(n),i=r.childAt(0),s=r.childAt(1),l=r.childAt(2),u={shape:{points:a.getItemLayout(t)}};u.shape.points&&(c(i.shape.points,u.shape.points,l,a,t,!1),Xy(s),Xy(i),Wy(i,u,e),Wy(s,u,e),a.setItemGraphicEl(t,r))}).remove(function(e){i.remove(o.getItemGraphicEl(e))}).execute(),a.eachItemGraphicEl(function(e,t){var n=a.getItemModel(t),r=e.childAt(0),o=e.childAt(1),s=e.childAt(2),c=a.getItemVisual(t,`style`),l=c.fill;i.add(e),r.useStyle(I(n.getModel(`lineStyle`).getLineStyle(),{fill:`none`,stroke:l})),xv(r,n,`lineStyle`),xv(o,n,`areaStyle`);var u=n.getModel(`areaStyle`),d=u.isEmpty()&&u.parentModel.isEmpty();o.ignore=d,L([`emphasis`,`select`,`blur`],function(e){var t=n.getModel([e,`areaStyle`]),i=t.isEmpty()&&t.parentModel.isEmpty();o.ensureState(e).ignore=i&&d;var a=n.getModel([e,`lineStyle`]).getLineStyle();r.ensureState(e).style=a;var c=t.getAreaStyle();o.ensureState(e).style=c;var l=n.getModel([e,`itemStyle`]).getItemStyle();s.eachChild(function(t){t.ensureState(e).style=P(l)})}),o.useStyle(I(n.getModel(`areaStyle`).getAreaStyle(),{fill:l,opacity:.7,decal:c.decal}));var f=n.getModel(`emphasis`);s.eachChild(function(e){if(e instanceof Kg){var r=e.style;e.useStyle(F({image:r.image,x:r.x,y:r.y,width:r.width,height:r.height},c))}else e.useStyle(c),e.setColor(l),e.style.strokeNoScale=!0;var i=a.getStore().get(a.getDimensionIndex(e.__dimIdx),t);(i==null||isNaN(i))&&(i=``),Lb(e,Rb(n),{labelFetcher:a.hostModel,labelDataIndex:t,labelDimIndex:e.__dimIdx,defaultText:i,inheritColor:l,defaultOpacity:c.opacity})}),_v(e,f.get(`focus`),f.get(`blurScope`),f.get(`disabled`))}),this._data=a},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.type=`radar`,t}(yE),xR=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new _I(z(this.getData,this),z(this.getRawData,this))},t.prototype.getInitialData=function(e,t){return gI(this,{generateCoord:`indicator_`,generateCoordCount:1/0})},t.prototype.formatTooltip=function(e,t,n){var r=this.getData(),i=this.coordinateSystem.getIndicatorAxes(),a=this.getData().getName(e),o=a===``?this.name:a,s=QT(this,e);return zT(`section`,{header:o,sortBlocks:!0,blocks:R(i,function(t){var n=r.get(r.mapDimension(t.dim),e);return zT(`nameValue`,{markerType:`subItem`,markerColor:s,name:t.name,value:n,sortParam:n})})})},t.prototype.getTooltipPosition=function(e){if(e!=null){for(var t=this.getData(),n=this.coordinateSystem,r=t.getValues(R(n.dimensions,function(e){return t.mapDimension(e)}),e),i=0,a=r.length;i<a;i++)if(!isNaN(r[i])){var o=n.getIndicatorAxes();return n.coordToPoint(o[i].dataToCoord(r[i]),i)}}},t.type=`series.radar`,t.dependencies=[`radar`],t.defaultOption={z:2,colorBy:`data`,coordinateSystem:`radar`,legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:`solid`,join:`round`},label:{position:`top`},symbolSize:8},t}(oE),SR=TI.value;function CR(e,t){return I({show:t},e)}var wR=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.optionUpdated=function(){var e=this.get(`boundaryGap`),t=this.get(`splitNumber`),n=this.get(`scale`),r=this.get(`axisLine`),i=this.get(`axisTick`),a=this.get(`axisLabel`),o=this.get(`axisName`),s=this.get([`axisName`,`show`]),c=this.get([`axisName`,`formatter`]),l=this.get(`axisNameGap`),u=this.get(`triggerEvent`);this._indicatorModels=R(this.get(`indicator`)||[],function(d){d.max!=null&&d.max>0&&!d.min?d.min=0:d.min!=null&&d.min<0&&!d.max&&(d.max=0);var f=o;d.color!=null&&(f=I({color:d.color},o));var p=ks(P(d),{boundaryGap:e,splitNumber:t,scale:n,axisLine:r,axisTick:i,axisLabel:a,name:d.text,showName:s,nameLocation:`end`,nameGap:l,nameTextStyle:f,triggerEvent:u},!1);if(H(c)){var m=p.name;p.name=c.replace(`{value}`,m??``)}else V(c)&&(p.name=c(p.name,p));var h=new ex(p,null,this.ecModel);return Ms(h,Yj.prototype),h.mainType=`radar`,h.componentIndex=this.componentIndex,h},this)},t.prototype.getIndicatorModels=function(){return this._indicatorModels},t.type=`radar`,t.defaultOption={z:0,center:[`50%`,`50%`],radius:`50%`,startAngle:90,axisName:{show:!0,color:Z.color.axisLabel},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:`polygon`,axisLine:ks({lineStyle:{color:Z.color.neutral20}},SR.axisLine),axisLabel:CR(SR.axisLabel,!1),axisTick:CR(SR.axisTick,!1),splitLine:CR(SR.splitLine,!0),splitArea:CR(SR.splitArea,!0),indicator:[]},t}(GS),TR=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){this.group.removeAll(),this._buildAxes(e,n),this._buildSplitLineAndArea(e)},t.prototype._buildAxes=function(e,t){var n=e.coordinateSystem;L(R(n.getIndicatorAxes(),function(e){var r=e.model.get(`showName`)?e.name:``;return new YI(e.model,t,{axisName:r,position:[n.cx,n.cy],rotation:e.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}),function(e){e.build(),this.group.add(e.group)},this)},t.prototype._buildSplitLineAndArea=function(e){var t=e.coordinateSystem,n=t.getIndicatorAxes();if(!n.length)return;var r=e.get(`shape`),i=e.getModel(`splitLine`),a=e.getModel(`splitArea`),o=i.getModel(`lineStyle`),s=a.getModel(`areaStyle`),c=i.get(`show`),l=a.get(`show`),u=o.get(`color`),d=s.get(`color`),f=B(u)?u:[u],p=B(d)?d:[d],m=[],h=[];function g(e,t,n){var r=n%t.length;return e[r]=e[r]||[],r}if(r===`circle`)for(var _=n[0].getTicksCoords(),v=t.cx,y=t.cy,b=0;b<_.length;b++){if(c){var x=g(m,f,b);m[x].push(new $v({shape:{cx:v,cy:y,r:_[b].coord}}))}if(l&&b<_.length-1){var x=g(h,p,b);h[x].push(new by({shape:{cx:v,cy:y,r0:_[b].coord,r:_[b+1].coord}}))}}else for(var S,C=R(n,function(e,n){var r=e.getTicksCoords();return S=S==null?r.length-1:Math.min(r.length-1,S),R(r,function(e){return t.coordToPoint(e.coord,n)})}),w=[],b=0;b<=S;b++){for(var T=[],E=0;E<n.length;E++)T.push(C[E][b]);if(T[0]?T.push(T[0].slice()):process.env.NODE_ENV!==`production`&&console.error(`Can't draw value axis `+b),c){var x=g(m,f,b);m[x].push(new Cy({shape:{points:T}}))}if(l&&w){var x=g(h,p,b-1);h[x].push(new Sy({shape:{points:T.concat(w)}}))}w=T.slice().reverse()}var D=o.getLineStyle(),O=s.getAreaStyle();L(h,function(e,t){this.group.add(ob(e,{style:I({stroke:`none`,fill:p[t%p.length]},O),silent:!0}))},this),L(m,function(e,t){this.group.add(ob(e,{style:I({fill:`none`,stroke:f[t%f.length]},D),silent:!0}))},this)},t.type=`radar`,t}(hE),ER=function(e){N(t,e);function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.type=`value`,i.angle=0,i.name=``,i}return t}(IM),DR=function(){function e(e,t,n){this.dimensions=[],this._model=e,this._indicatorAxes=R(e.getIndicatorModels(),function(e,t){var n=`indicator_`+t,r=new ER(n,new KA);return r.name=e.get(`name`),r.model=e,e.axis=r,this.dimensions.push(n),r},this),this.resize(e,n)}return e.prototype.getIndicatorAxes=function(){return this._indicatorAxes},e.prototype.dataToPoint=function(e,t){var n=this._indicatorAxes[t];return this.coordToPoint(n.dataToCoord(e),t)},e.prototype.coordToPoint=function(e,t){var n=this._indicatorAxes[t].angle;return[this.cx+e*Math.cos(n),this.cy-e*Math.sin(n)]},e.prototype.pointToData=function(e){var t=e[0]-this.cx,n=e[1]-this.cy,r=Math.sqrt(t*t+n*n);t/=r,n/=r;for(var i=Math.atan2(-n,t),a=1/0,o,s=-1,c=0;c<this._indicatorAxes.length;c++){var l=this._indicatorAxes[c],u=Math.abs(i-l.angle);u<a&&(o=l,s=c,a=u)}return[s,+(o&&o.coordToData(r))]},e.prototype.resize=function(e,t){var n=LS(e,t).refContainer,r=e.get(`center`),i=Math.min(n.width,n.height)/2;this.cx=X(r[0],n.width)+n.x,this.cy=X(r[1],n.height)+n.y,this.startAngle=e.get(`startAngle`)*Math.PI/180;var a=e.get(`radius`);(H(a)||Bs(a))&&(a=[0,a]),this.r0=X(a[0],i),this.r=X(a[1],i),L(this._indicatorAxes,function(e,t){e.setExtent(this.r0,this.r);var n=this.startAngle+t*Math.PI*2/this._indicatorAxes.length;n=Math.atan2(Math.sin(n),Math.cos(n)),e.angle=n},this)},e.prototype.update=function(e,t){var n=this._indicatorAxes,r=this._model;L(n,function(e){e.scale.setExtent(1/0,-1/0)}),e.eachSeriesByType(`radar`,function(t,i){if(!(t.get(`coordinateSystem`)!==`radar`||e.getComponent(`radar`,t.get(`radarIndex`))!==r)){var a=t.getData();L(n,function(e){e.scale.unionExtentFromData(a,a.mapDimension(e.dim))})}},this);var i=r.get(`splitNumber`),a=new KA;a.setExtent(0,i),a.setInterval(1),L(n,function(e,t){xL(e.scale,e.model,a)})},e.prototype.convertToPixel=function(e,t,n){return console.warn(`Not implemented.`),null},e.prototype.convertFromPixel=function(e,t,n){return console.warn(`Not implemented.`),null},e.prototype.containPoint=function(e){return console.warn(`Not implemented.`),!1},e.create=function(t,n){var r=[];return t.eachComponent(`radar`,function(i){var a=new e(i,t,n);r.push(a),i.coordinateSystem=a}),t.eachSeriesByType(`radar`,function(e){e.get(`coordinateSystem`)===`radar`&&(e.coordinateSystem=r[e.get(`radarIndex`)||0])}),r},e.dimensions=[],e}();function OR(e){e.registerCoordinateSystem(`radar`,DR),e.registerComponentModel(wR),e.registerComponentView(TR),e.registerVisual({seriesType:`radar`,reset:function(e){var t=e.getData();t.each(function(e){t.setItemVisual(e,`legendIcon`,`roundRect`)}),t.setVisual(`legendIcon`,`roundRect`)}})}function kR(e){Nk(OR),e.registerChartView(bR),e.registerSeriesModel(xR),e.registerLayout(gR),e.registerProcessor(uI(`radar`)),e.registerPreprocessor(yR)}var AR=Cm();function jR(e,t,n){AR(e)[t]=n}function MR(e,t,n){var r=AR(e);r[t]===n&&(r[t]=null)}function NR(e,t){return!!AR(e)[t]}xk({type:`takeGlobalCursor`,event:`globalCursorTaken`,update:`update`},ac);var PR={axisPointer:1,tooltip:1,brush:1};function FR(e,t,n){var r=t.getComponentByElement(e.topTarget);if(!r||r===n||PR.hasOwnProperty(r.mainType))return!1;var i=r.coordinateSystem;if(!i||i.model===n)return!1;var a=Ab(r),o=Ab(n);return!((a.zlevel-o.zlevel||a.z-o.z)<=0)}var IR=function(e){N(t,e);function t(t){var n=e.call(this)||this;n._zr=t;var r=z(n._mousedownHandler,n),i=z(n._mousemoveHandler,n),a=z(n._mouseupHandler,n),o=z(n._mousewheelHandler,n),s=z(n._pinchHandler,n);return n.enable=function(e,n){var c=n.zInfo,l=Ab(c.component),u=l.z,d=l.zlevel,f={component:c.component,z:u,zlevel:d,z2:W(c.z2,-1/0)},p=F({},n.triggerInfo);this._opt=I(F({},n),{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0,zInfoParsed:f,triggerInfo:p}),e??=!0,(!this._enabled||this._controlType!==e)&&(this._enabled=!0,this.disable(),(e===!0||e===`move`||e===`pan`)&&(BR(t,`mousedown`,r,f),BR(t,`mousemove`,i,f),BR(t,`mouseup`,a,f)),(e===!0||e===`scale`||e===`zoom`)&&(BR(t,`mousewheel`,o,f),BR(t,`pinch`,s,f)))},n.disable=function(){this._enabled=!1,VR(t,`mousedown`,r),VR(t,`mousemove`,i),VR(t,`mouseup`,a),VR(t,`mousewheel`,o),VR(t,`pinch`,s)},n}return t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype._checkPointer=function(e,t,n){var r=this._opt,i=r.zInfoParsed;if(FR(e,r.api,i.component))return!1;var a=r.triggerInfo,o=a.roamTrigger,s=!1;return o===`global`&&(s=!0),s||=a.isInSelf(e,t,n),s&&a.isInClip&&!a.isInClip(e,t,n)&&(s=!1),s},t.prototype._decideCursorStyle=function(e,t,n,r){var i=e.target;if(!i&&this._checkPointer(e,t,n))return`grab`;if(r)return i&&i.cursor||`default`},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(e){if(!(nl(e)||LR(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)}},t.prototype._mousemoveHandler=function(e){var t=this._zr;if(!(e.gestureEvent===`pinch`||NR(t,`globalPan`)||LR(e))){var n=e.offsetX,r=e.offsetY;if(!this._dragging||!GR(`moveOnMouseMove`,e,this._opt)){var i=this._decideCursorStyle(e,n,r,!1);i&&t.setCursorStyle(i);return}t.setCursorStyle(`grabbing`);var a=this._x,o=this._y,s=n-a,c=r-o;this._x=n,this._y=r,this._opt.preventDefaultMouseMove&&tl(e.event),e.__ecRoamConsumed=!0,WR(this,`pan`,`moveOnMouseMove`,e,{dx:s,dy:c,oldX:a,oldY:o,newX:n,newY:r,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(e){if(!LR(e)){var t=this._zr;if(!nl(e)){this._dragging=!1;var n=this._decideCursorStyle(e,e.offsetX,e.offsetY,!0);n&&t.setCursorStyle(n)}}},t.prototype._mousewheelHandler=function(e){if(!LR(e)){var t=GR(`zoomOnMouseWheel`,e,this._opt),n=GR(`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})}}}},t.prototype._pinchHandler=function(e){if(!(NR(this._zr,`globalPan`)||LR(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})}},t.prototype._checkTriggerMoveZoom=function(e,t,n,r,i){e._checkPointer(r,i.originX,i.originY)&&(tl(r.event),r.__ecRoamConsumed=!0,WR(e,t,n,r,i))},t}(Ac);function LR(e){return e.__ecRoamConsumed}var RR=Cm();function zR(e){var t=RR(e);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function BR(e,t,n,r){for(var i=zR(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}),HR(e,t)}function VR(e,t,n){for(var r=zR(e).roam[t]||[],i=0;i<r.length;i++)if(r[i].listener===n){r.splice(i,1),r.length||UR(e,t);return}}function HR(e,t){var n=zR(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 UR(e,t){var n=zR(e).uniform;n[t]&&(e.off(t,n[t]),n[t]=null)}function WR(e,t,n,r,i){i.isAvailableBehavior=z(GR,null,n,r),e.trigger(t,i)}function GR(e,t,n){var r=n[e];return!e||r&&(!H(r)||t.event[r+`Key`])}function KR(e,t,n){var r=e.target;r.x+=t,r.y+=n,r.dirty()}function qR(e,t,n,r){var i=e.target,a=e.zoomLimit,o=e.zoom=e.zoom||1;o*=t,o=QR(o,a);var s=o/e.zoom;e.zoom=o,ZR(i,n,r,s),i.dirty()}function JR(e,t,n,r,i,a){var o=new Ol(0,0,0,0);r.enable(e.get(`roam`),{api:t,zInfo:{component:e},triggerInfo:{roamTrigger:e.get(`roamTrigger`),isInSelf:function(e,t,r){return o.copy(n.getBoundingRect()),o.applyTransform(n.getComputedTransform()),o.contain(t,r)},isInClip:function(e,t,n){return!a||a.contain(t,n)}}}),i.zoomLimit=e.get(`scaleLimit`);var s=e.coordinateSystem;i.zoom=s?s.getZoom():1;var c=e.subType+`Roam`;r.off(`pan`).off(`zoom`).on(`pan`,function(n){KR(i,n.dx,n.dy),t.dispatchAction({seriesId:e.id,type:c,dx:n.dx,dy:n.dy})}).on(`zoom`,function(n){qR(i,n.scale,n.originX,n.originY),t.dispatchAction({seriesId:e.id,type:c,zoom:n.scale,originX:n.originX,originY:n.originY}),t.updateLabelLayout()})}function YR(e,t){return e.pointToProjected?e.pointToProjected(t):e.pointToData(t)}function XR(e,t,n){var r=e.getZoom(),i=e.getCenter(),a=t.zoom,o=e.projectedToPoint?e.projectedToPoint(i):e.dataToPoint(i);return t.dx!=null&&t.dy!=null&&(o[0]-=t.dx,o[1]-=t.dy,e.setCenter(YR(e,o))),a!=null&&(a=QR(r*a,n)/r,ZR(e,t.originX,t.originY,a),e.updateTransform(),e.setCenter(YR(e,o)),e.setZoom(a*r)),{center:e.getCenter(),zoom:e.getZoom()}}function ZR(e,t,n,r){e.x-=(t-e.x)*(r-1),e.y-=(n-e.y)*(r-1),e.scaleX*=r,e.scaleY*=r}function QR(e,t){if(t){var n=t.min||0,r=t.max||1/0;e=Math.max(Math.min(r,e),n)}return e}function $R(e){H(e)&&(e=new DOMParser().parseFromString(e,`text/xml`));var t=e;for(t.nodeType===9&&(t=t.firstChild);t.nodeName.toLowerCase()!==`svg`||t.nodeType!==1;)t=t.nextSibling;return t}var ez,tz={fill:`fill`,stroke:`stroke`,"stroke-width":`lineWidth`,opacity:`opacity`,"fill-opacity":`fillOpacity`,"stroke-opacity":`strokeOpacity`,"stroke-dasharray":`lineDash`,"stroke-dashoffset":`lineDashOffset`,"stroke-linecap":`lineCap`,"stroke-linejoin":`lineJoin`,"stroke-miterlimit":`miterLimit`,"font-family":`fontFamily`,"font-size":`fontSize`,"font-style":`fontStyle`,"font-weight":`fontWeight`,"text-anchor":`textAlign`,visibility:`visibility`,display:`display`},nz=Ls(tz),rz={"alignment-baseline":`textBaseline`,"stop-color":`stopColor`},iz=Ls(rz),az=function(){function e(){this._defs={},this._root=null}return e.prototype.parse=function(e,t){t||={};var n=$R(e);if(process.env.NODE_ENV!==`production`&&!n)throw Error(`Illegal svg`);this._defsUsePending=[];var r=new Y;this._root=r;var i=[],a=n.getAttribute(`viewBox`)||``,o=parseFloat(n.getAttribute(`width`)||t.width),s=parseFloat(n.getAttribute(`height`)||t.height);isNaN(o)&&(o=null),isNaN(s)&&(s=null),dz(n,r,null,!0,!1);for(var c=n.firstChild;c;)this._parseNode(c,r,i,null,!1,!1),c=c.nextSibling;hz(this._defs,this._defsUsePending),this._defsUsePending=[];var l,u;if(a){var d=_z(a);d.length>=4&&(l={x:parseFloat(d[0]||0),y:parseFloat(d[1]||0),width:parseFloat(d[2]),height:parseFloat(d[3])})}if(l&&o!=null&&s!=null&&(u=wz(l,{x:0,y:0,width:o,height:s}),!t.ignoreViewBox)){var f=r;r=new Y,r.add(f),f.scaleX=f.scaleY=u.scale,f.x=u.x,f.y=u.y}return!t.ignoreRootClip&&o!=null&&s!=null&&r.setClipPath(new e_({shape:{x:0,y:0,width:o,height:s}})),{root:r,width:o,height:s,viewBoxRect:l,viewBoxTransform:u,named:i}},e.prototype._parseNode=function(e,t,n,r,i,a){var o=e.nodeName.toLowerCase(),s,c=r;if(o===`defs`&&(i=!0),o===`text`&&(a=!0),o===`defs`||o===`switch`)s=t;else{if(!i){var l=ez[o];if(l&&q(ez,o)){s=l.call(this,e,t);var u=e.getAttribute(`name`);if(u){var d={name:u,namedFrom:null,svgNodeTagLower:o,el:s};n.push(d),o===`g`&&(c=d)}else r&&n.push({name:r.name,namedFrom:r,svgNodeTagLower:o,el:s});t.add(s)}}var f=oz[o];if(f&&q(oz,o)){var p=f.call(this,e),m=e.getAttribute(`id`);m&&(this._defs[m]=p)}}if(s&&s.isGroup)for(var h=e.firstChild;h;)h.nodeType===1?this._parseNode(h,s,n,c,i,a):h.nodeType===3&&a&&this._parseText(h,s),h=h.nextSibling},e.prototype._parseText=function(e,t){var n=new Hg({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});lz(t,n),dz(e,n,this._defsUsePending,!1,!1),fz(n,t);var r=n.style,i=r.fontSize;i&&i<9&&(r.fontSize=9,n.scaleX*=i/9,n.scaleY*=i/9),r.font=(r.fontSize||r.fontFamily)&&[r.fontStyle,r.fontWeight,(r.fontSize||12)+`px`,r.fontFamily||`sans-serif`].join(` `);var a=n.getBoundingRect();return this._textX+=a.width,t.add(n),n},e.internalField=(function(){ez={g:function(e,t){var n=new Y;return lz(t,n),dz(e,n,this._defsUsePending,!1,!1),n},rect:function(e,t){var n=new e_;return lz(t,n),dz(e,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(e.getAttribute(`x`)||`0`),y:parseFloat(e.getAttribute(`y`)||`0`),width:parseFloat(e.getAttribute(`width`)||`0`),height:parseFloat(e.getAttribute(`height`)||`0`)}),n.silent=!0,n},circle:function(e,t){var n=new $v;return lz(t,n),dz(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute(`cx`)||`0`),cy:parseFloat(e.getAttribute(`cy`)||`0`),r:parseFloat(e.getAttribute(`r`)||`0`)}),n.silent=!0,n},line:function(e,t){var n=new wy;return lz(t,n),dz(e,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(e.getAttribute(`x1`)||`0`),y1:parseFloat(e.getAttribute(`y1`)||`0`),x2:parseFloat(e.getAttribute(`x2`)||`0`),y2:parseFloat(e.getAttribute(`y2`)||`0`)}),n.silent=!0,n},ellipse:function(e,t){var n=new ty;return lz(t,n),dz(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute(`cx`)||`0`),cy:parseFloat(e.getAttribute(`cy`)||`0`),rx:parseFloat(e.getAttribute(`rx`)||`0`),ry:parseFloat(e.getAttribute(`ry`)||`0`)}),n.silent=!0,n},polygon:function(e,t){var n=e.getAttribute(`points`),r;n&&(r=uz(n));var i=new Sy({shape:{points:r||[]},silent:!0});return lz(t,i),dz(e,i,this._defsUsePending,!1,!1),i},polyline:function(e,t){var n=e.getAttribute(`points`),r;n&&(r=uz(n));var i=new Cy({shape:{points:r||[]},silent:!0});return lz(t,i),dz(e,i,this._defsUsePending,!1,!1),i},image:function(e,t){var n=new Kg;return lz(t,n),dz(e,n,this._defsUsePending,!1,!1),n.setStyle({image:e.getAttribute(`xlink:href`)||e.getAttribute(`href`),x:+e.getAttribute(`x`),y:+e.getAttribute(`y`),width:+e.getAttribute(`width`),height:+e.getAttribute(`height`)}),n.silent=!0,n},text:function(e,t){var n=e.getAttribute(`x`)||`0`,r=e.getAttribute(`y`)||`0`,i=e.getAttribute(`dx`)||`0`,a=e.getAttribute(`dy`)||`0`;this._textX=parseFloat(n)+parseFloat(i),this._textY=parseFloat(r)+parseFloat(a);var o=new Y;return lz(t,o),dz(e,o,this._defsUsePending,!1,!0),o},tspan:function(e,t){var n=e.getAttribute(`x`),r=e.getAttribute(`y`);n!=null&&(this._textX=parseFloat(n)),r!=null&&(this._textY=parseFloat(r));var i=e.getAttribute(`dx`)||`0`,a=e.getAttribute(`dy`)||`0`,o=new Y;return lz(t,o),dz(e,o,this._defsUsePending,!1,!0),this._textX+=parseFloat(i),this._textY+=parseFloat(a),o},path:function(e,t){var n=Jv(e.getAttribute(`d`)||``);return lz(t,n),dz(e,n,this._defsUsePending,!1,!1),n.silent=!0,n}}})(),e}(),oz={lineargradient:function(e){var t=new jy(parseInt(e.getAttribute(`x1`)||`0`,10),parseInt(e.getAttribute(`y1`)||`0`,10),parseInt(e.getAttribute(`x2`)||`10`,10),parseInt(e.getAttribute(`y2`)||`0`,10));return sz(e,t),cz(e,t),t},radialgradient:function(e){var t=new My(parseInt(e.getAttribute(`cx`)||`0`,10),parseInt(e.getAttribute(`cy`)||`0`,10),parseInt(e.getAttribute(`r`)||`0`,10));return sz(e,t),cz(e,t),t}};function sz(e,t){e.getAttribute(`gradientUnits`)===`userSpaceOnUse`&&(t.global=!0)}function cz(e,t){for(var n=e.firstChild;n;){if(n.nodeType===1&&n.nodeName.toLocaleLowerCase()===`stop`){var r=n.getAttribute(`offset`),i=void 0;i=r&&r.indexOf(`%`)>0?parseInt(r,10)/100:r?parseFloat(r):0;var a={};Sz(n,a,a);var o=a.stopColor||n.getAttribute(`stop-color`)||`#000000`,s=a.stopOpacity||n.getAttribute(`stop-opacity`);if(s){var c=qu(o);c&&c[3]&&(c[3]*=zu(s),o=td(c,`rgba`))}t.colorStops.push({offset:i,color:o})}n=n.nextSibling}}function lz(e,t){e&&e.__inheritedStyle&&(t.__inheritedStyle||={},I(t.__inheritedStyle,e.__inheritedStyle))}function uz(e){for(var t=_z(e),n=[],r=0;r<t.length;r+=2){var i=parseFloat(t[r]),a=parseFloat(t[r+1]);n.push([i,a])}return n}function dz(e,t,n,r,i){var a=t,o=a.__inheritedStyle=a.__inheritedStyle||{},s={};e.nodeType===1&&(bz(e,t),Sz(e,o,s),r||Cz(e,o,s)),a.style=a.style||{},o.fill!=null&&(a.style.fill=mz(a,`fill`,o.fill,n)),o.stroke!=null&&(a.style.stroke=mz(a,`stroke`,o.stroke,n)),L([`lineWidth`,`opacity`,`fillOpacity`,`strokeOpacity`,`miterLimit`,`fontSize`],function(e){o[e]!=null&&(a.style[e]=parseFloat(o[e]))}),L([`lineDashOffset`,`lineCap`,`lineJoin`,`fontWeight`,`fontFamily`,`fontStyle`,`textAlign`],function(e){o[e]!=null&&(a.style[e]=o[e])}),i&&(a.__selfStyle=s),o.lineDash&&(a.style.lineDash=R(_z(o.lineDash),function(e){return parseFloat(e)})),(o.visibility===`hidden`||o.visibility===`collapse`)&&(a.invisible=!0),o.display===`none`&&(a.ignore=!0)}function fz(e,t){var n=t.__selfStyle;if(n){var r=n.textBaseline,i=r;!r||r===`auto`||r===`baseline`?i=`alphabetic`:r===`before-edge`||r===`text-before-edge`?i=`top`:r===`after-edge`||r===`text-after-edge`?i=`bottom`:(r===`central`||r===`mathematical`)&&(i=`middle`),e.style.textBaseline=i}var a=t.__inheritedStyle;if(a){var o=a.textAlign,s=o;o&&(o===`middle`&&(s=`center`),e.style.textAlign=s)}}var pz=/^url\(\s*#(.*?)\)/;function mz(e,t,n,r){var i=n&&n.match(pz);if(i){var a=Zs(i[1]);r.push([e,t,a]);return}return n===`none`&&(n=null),n}function hz(e,t){for(var n=0;n<t.length;n++){var r=t[n];r[0].style[r[1]]=e[r[2]]}}var gz=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function _z(e){return e.match(gz)||[]}var vz=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,yz=Math.PI/180;function bz(e,t){var n=e.getAttribute(`transform`);if(n){n=n.replace(/,/g,` `);var r=[],i=null;n.replace(vz,function(e,t,n){return r.push(t,n),``});for(var a=r.length-1;a>0;a-=2){var o=r[a],s=r[a-1],c=_z(o);switch(i||=sl(),s){case`translate`:dl(i,i,[parseFloat(c[0]),parseFloat(c[1]||`0`)]);break;case`scale`:pl(i,i,[parseFloat(c[0]),parseFloat(c[1]||c[0])]);break;case`rotate`:fl(i,i,-parseFloat(c[0])*yz,[parseFloat(c[1]||`0`),parseFloat(c[2]||`0`)]);break;case`skewX`:var l=Math.tan(parseFloat(c[0])*yz);ul(i,[1,0,l,1,0,0],i);break;case`skewY`:var u=Math.tan(parseFloat(c[0])*yz);ul(i,[1,u,0,1,0,0],i);break;case`matrix`:i[0]=parseFloat(c[0]),i[1]=parseFloat(c[1]),i[2]=parseFloat(c[2]),i[3]=parseFloat(c[3]),i[4]=parseFloat(c[4]),i[5]=parseFloat(c[5]);break}}t.setLocalTransform(i)}}var xz=/([^\s:;]+)\s*:\s*([^:;]+)/g;function Sz(e,t,n){var r=e.getAttribute(`style`);if(r){xz.lastIndex=0;for(var i;(i=xz.exec(r))!=null;){var a=i[1],o=q(tz,a)?tz[a]:null;o&&(t[o]=i[2]);var s=q(rz,a)?rz[a]:null;s&&(n[s]=i[2])}}}function Cz(e,t,n){for(var r=0;r<nz.length;r++){var i=nz[r],a=e.getAttribute(i);a!=null&&(t[tz[i]]=a)}for(var r=0;r<iz.length;r++){var i=iz[r],a=e.getAttribute(i);a!=null&&(n[rz[i]]=a)}}function wz(e,t){var n=t.width/e.width,r=t.height/e.height,i=Math.min(n,r);return{scale:i,x:-(e.x+e.width/2)*i+(t.x+t.width/2),y:-(e.y+e.height/2)*i+(t.y+t.height/2)}}function Tz(e,t){return new az().parse(e,t)}var Ez=K([`rect`,`circle`,`line`,`ellipse`,`polygon`,`polyline`,`path`,`text`,`tspan`,`g`]),Dz=function(){function e(e,t){this.type=`geoSVG`,this._usedGraphicMap=K(),this._freedGraphics=[],this._mapName=e,this._parsedXML=$R(t)}return e.prototype.load=function(){var e=this._firstGraphic;if(!e){e=this._firstGraphic=this._buildGraphic(this._parsedXML),this._freedGraphics.push(e),this._boundingRect=this._firstGraphic.boundingRect.clone();var t=kz(e.named),n=t.regions,r=t.regionsMap;this._regions=n,this._regionsMap=r}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},e.prototype._buildGraphic=function(e){var t,n;try{t=e&&Tz(e,{ignoreViewBox:!0,ignoreRootClip:!0})||{},n=t.root,G(n!=null)}catch(e){throw Error(`Invalid svg format
|
|
66
|
-
`+e.message)}var r=new Y;r.add(n),r.isGeoSVGGraphicRoot=!0;var i=t.width,a=t.height,o=t.viewBoxRect,s=this._boundingRect;if(!s){var c=void 0,l=void 0,u=void 0,d=void 0;if(i==null?o&&(c=o.x,u=o.width):(c=0,u=i),a==null?o&&(l=o.y,d=o.height):(l=0,d=a),c==null||l==null){var f=n.getBoundingRect();c??(c=f.x,u=f.width),l??(l=f.y,d=f.height)}s=this._boundingRect=new Ol(c,l,u,d)}if(o){var p=wz(o,s);n.scaleX=n.scaleY=p.scale,n.x=p.x,n.y=p.y}r.setClipPath(new e_({shape:s.plain()}));var m=[];return L(t.named,function(e){Ez.get(e.svgNodeTagLower)!=null&&(m.push(e),Oz(e.el))}),{root:r,boundingRect:s,named:m}},e.prototype.useGraphic=function(e){var t=this._usedGraphicMap,n=t.get(e);return n||(n=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),t.set(e,n),n)},e.prototype.freeGraphic=function(e){var t=this._usedGraphicMap,n=t.get(e);n&&(t.removeKey(e),this._freedGraphics.push(n))},e}();function Oz(e){e.silent=!1,e.isGroup&&e.traverse(function(e){e.silent=!1})}function kz(e){var t=[],n=K();return L(e,function(e){if(e.namedFrom==null){var r=new sM(e.name,e.el);t.push(r),n.set(e.name,r)}}),{regions:t,regionsMap:n}}for(var Az=[126,25],jz=`南海诸岛`,Mz=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],Nz=0;Nz<Mz.length;Nz++)for(var Pz=0;Pz<Mz[Nz].length;Pz++)Mz[Nz][Pz][0]/=10.5,Mz[Nz][Pz][1]/=-10.5/.75,Mz[Nz][Pz][0]+=Az[0],Mz[Nz][Pz][1]+=Az[1];function Fz(e,t){if(e===`china`){for(var n=0;n<t.length;n++)if(t[n].name===jz)return;t.push(new oM(jz,R(Mz,function(e){return{type:`polygon`,exterior:e}}),Az))}}var Iz={南海诸岛:[32,80],广东:[0,-10],香港:[10,5],澳门:[-10,10],天津:[5,5]};function Lz(e,t){if(e===`china`){var n=Iz[t.name];if(n){var r=t.getCenter();r[0]+=n[0]/10.5,r[1]+=-n[1]/(10.5/.75),t.setCenter(r)}}}var Rz=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];function zz(e,t){e===`china`&&t.name===`台湾`&&t.geometries.push({type:`polygon`,exterior:Rz[0]})}var Bz=`name`,Vz=function(){function e(e,t,n){this.type=`geoJSON`,this._parsedMap=K(),this._mapName=e,this._specialAreas=n,this._geoJSON=Uz(t)}return e.prototype.load=function(e,t){t||=Bz;var n=this._parsedMap.get(t);if(!n){var r=this._parseToRegions(t);n=this._parsedMap.set(t,{regions:r,boundingRect:Hz(r)})}var i=K(),a=[];return L(n.regions,function(t){var n=t.name;e&&q(e,n)&&(t=t.cloneShallow(n=e[n])),a.push(t),i.set(n,t)}),{regions:a,boundingRect:n.boundingRect||new Ol(0,0,0,0),regionsMap:i}},e.prototype._parseToRegions=function(e){var t=this._mapName,n=this._geoJSON,r;try{r=n?dM(n,e):[]}catch(e){throw Error(`Invalid geoJson format
|
|
67
|
-
`+e.message)}return Fz(t,r),L(r,function(e){var n=e.name;Lz(t,e),zz(t,e);var r=this._specialAreas&&this._specialAreas[n];r&&e.transformTo(r.left,r.top,r.width,r.height)},this),r},e.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},e}();function Hz(e){for(var t,n=0;n<e.length;n++){var r=e[n].getBoundingRect();t||=r.clone(),t.union(r)}return t}function Uz(e){return H(e)?typeof JSON<`u`&&JSON.parse?JSON.parse(e):Function(`return (`+e+`);`)():e}var Wz=K(),Gz={registerMap:function(e,t,n){if(t.svg){var r=new Dz(e,t.svg);Wz.set(e,r)}else{var i=t.geoJson||t.geoJSON;i&&!t.features?n=t.specialAreas:i=t;var r=new Vz(e,i,n);Wz.set(e,r)}},getGeoResource:function(e){return Wz.get(e)},getMapForUser:function(e){var t=Wz.get(e);return t&&t.type===`geoJSON`&&t.getMapForUser()},load:function(e,t,n){var r=Wz.get(e);if(!r){process.env.NODE_ENV!==`production`&&console.error(`Map `+e+` not exists. The GeoJSON of the map must be provided.`);return}return r.load(t,n)}},Kz=[`rect`,`circle`,`line`,`ellipse`,`polygon`,`polyline`,`path`],qz=K(Kz),Jz=K(Kz.concat([`g`])),Yz=K(Kz.concat([`g`])),Xz=Cm();function Zz(e){var t=e.getItemStyle(),n=e.get(`areaColor`);return n!=null&&(t.fill=n),t}function Qz(e){var t=e.style;t&&(t.stroke=t.stroke||t.fill,t.fill=null)}var $z=function(){function e(e){var t=this.group=new Y,n=this._transformGroup=new Y;t.add(n),this.uid=nx(`ec_map_draw`),this._controller=new IR(e.getZr()),this._controllerHost={target:n},n.add(this._regionsGroup=new Y),n.add(this._svgGroup=new Y)}return e.prototype.draw=function(e,t,n,r,i){var a=e.mainType===`geo`,o=e.getData&&e.getData();a&&t.eachComponent({mainType:`series`,subType:`map`},function(t){!o&&t.getHostGeoModel()===e&&(o=t.getData())});var s=e.coordinateSystem,c=this._regionsGroup,l=this._transformGroup,u=s.getTransformInfo(),d=u.raw,f=u.roam,p=!c.childAt(0)||i,m=e.getShallow(`clip`,!0),h;m?(h=s.getViewRect().clone(),this.group.setClipPath(new e_({shape:h.clone()}))):this.group.removeClipPath(),p?(l.x=f.x,l.y=f.y,l.scaleX=f.scaleX,l.scaleY=f.scaleY,l.dirty()):Wy(l,f,e);var g=o&&o.getVisual(`visualMeta`)&&o.getVisual(`visualMeta`).length>0,_={api:n,geo:s,mapOrGeoModel:e,data:o,isVisualEncodedByVisualMap:g,isGeo:a,transformInfoRaw:d};s.resourceType===`geoJSON`?this._buildGeoJSON(_):s.resourceType===`geoSVG`&&this._buildSVG(_),this._updateController(e,h,t,n),this._updateMapSelectHandler(e,c,n,r)},e.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=K(),n=K(),r=this._regionsGroup,i=e.transformInfoRaw,a=e.mapOrGeoModel,o=e.data,s=e.geo.projection,c=s&&s.stream;function l(e,t){return t&&(e=t(e)),e&&[e[0]*i.scaleX+i.x,e[1]*i.scaleY+i.y]}function u(e){for(var t=[],n=!c&&s&&s.project,r=0;r<e.length;++r){var i=l(e[r],n);i&&t.push(i)}return t}function d(e){return{shape:{points:u(e)}}}r.removeAll(),L(e.geo.regions,function(i){var u=i.name,f=t.get(u),p=n.get(u)||{},m=p.dataIdx,h=p.regionModel;if(!f){f=t.set(u,new Y),r.add(f),m=o?o.indexOfName(u):null,h=e.isGeo?a.getRegionModel(u):o?o.getItemModel(m):null;var g=h.get(`silent`,!0);g!=null&&(f.silent=g),n.set(u,{dataIdx:m,regionModel:h})}var _=[],v=[];L(i.geometries,function(e){if(e.type===`polygon`){var t=[e.exterior].concat(e.interiors||[]);c&&(t=aB(t,c)),L(t,function(e){_.push(new Sy(d(e)))})}else{var n=e.points;c&&(n=aB(n,c,!0)),L(n,function(e){v.push(new Cy(d(e)))})}});var y=l(i.getCenter(),s&&s.project);function b(t,n){if(t.length){var r=new ky({culling:!0,segmentIgnoreThreshold:1,shape:{paths:t}});f.add(r),eB(e,r,m,h),tB(e,r,u,h,a,m,y),n&&(Qz(r),L(r.states,Qz))}}b(_),b(v,!0)}),t.each(function(t,r){var i=n.get(r),o=i.dataIdx,s=i.regionModel;nB(e,t,r,s,a,o),rB(e,t,r,s,a),iB(e,t,r,s,a)},this)},e.prototype._buildSVG=function(e){var t=e.geo.map,n=e.transformInfoRaw;this._svgGroup.x=n.x,this._svgGroup.y=n.y,this._svgGroup.scaleX=n.scaleX,this._svgGroup.scaleY=n.scaleY,this._svgResourceChanged(t)&&(this._freeSVG(),this._useSVG(t));var r=this._svgDispatcherMap=K(),i=!1;L(this._svgGraphicRecord.named,function(t){var n=t.name,a=e.mapOrGeoModel,o=e.data,s=t.svgNodeTagLower,c=t.el,l=o?o.indexOfName(n):null,u=a.getRegionModel(n);qz.get(s)!=null&&c instanceof Mh&&eB(e,c,l,u),c instanceof Mh&&(c.culling=!0);var d=u.get(`silent`,!0);d!=null&&(c.silent=d),c.z2EmphasisLift=0,t.namedFrom||(Yz.get(s)!=null&&tB(e,c,n,u,a,l,null),nB(e,c,n,u,a,l),rB(e,c,n,u,a),Jz.get(s)!=null&&(iB(e,c,n,u,a)===`self`&&(i=!0),(r.get(n)||r.set(n,[])).push(c)))},this),this._enableBlurEntireSVG(i,e)},e.prototype._enableBlurEntireSVG=function(e,t){if(e&&t.isGeo){var n=t.mapOrGeoModel.getModel([`blur`,`itemStyle`]).getItemStyle().opacity;this._svgGraphicRecord.root.traverse(function(e){if(!e.isGroup){Y_(e);var t=e.ensureState(`blur`).style||{};t.opacity==null&&n!=null&&(t.opacity=n),e.ensureState(`emphasis`)}})}},e.prototype.remove=function(){this._regionsGroup.removeAll(),this._regionsGroupByName=null,this._svgGroup.removeAll(),this._freeSVG(),this._controller.dispose(),this._controllerHost=null},e.prototype.findHighDownDispatchers=function(e,t){if(e==null)return[];var n=t.coordinateSystem;if(n.resourceType===`geoJSON`){var r=this._regionsGroupByName;if(r){var i=r.get(e);return i?[i]:[]}}else if(n.resourceType===`geoSVG`)return this._svgDispatcherMap&&this._svgDispatcherMap.get(e)||[]},e.prototype._svgResourceChanged=function(e){return this._svgMapName!==e},e.prototype._useSVG=function(e){var t=Gz.getGeoResource(e);if(t&&t.type===`geoSVG`){var n=t.useGraphic(this.uid);this._svgGroup.add(n.root),this._svgGraphicRecord=n,this._svgMapName=e}},e.prototype._freeSVG=function(){var e=this._svgMapName;if(e!=null){var t=Gz.getGeoResource(e);t&&t.type===`geoSVG`&&t.freeGraphic(this.uid),this._svgGraphicRecord=null,this._svgDispatcherMap=null,this._svgGroup.removeAll(),this._svgMapName=null}},e.prototype._updateController=function(e,t,n,r){var i=e.coordinateSystem,a=this._controller,o=this._controllerHost;o.zoomLimit=e.get(`scaleLimit`),o.zoom=i.getZoom(),a.enable(e.get(`roam`)||!1,{api:r,zInfo:{component:e},triggerInfo:{roamTrigger:e.get(`roamTrigger`),isInSelf:function(e,t,n){return i.containPoint([t,n])},isInClip:function(e,n,r){return!t||t.contain(n,r)}}});var s=e.mainType;function c(){var t={type:`geoRoam`,componentType:s};return t[s+`Id`]=e.id,t}a.off(`pan`).on(`pan`,function(e){this._mouseDownFlag=!1,KR(o,e.dx,e.dy),r.dispatchAction(F(c(),{dx:e.dx,dy:e.dy,animation:{duration:0}}))},this),a.off(`zoom`).on(`zoom`,function(e){this._mouseDownFlag=!1,qR(o,e.scale,e.originX,e.originY),r.dispatchAction(F(c(),{totalZoom:o.zoom,zoom:e.scale,originX:e.originX,originY:e.originY,animation:{duration:0}}))},this)},e.prototype.resetForLabelLayout=function(){this.group.traverse(function(e){var t=e.getTextContent();t&&(t.ignore=Xz(t).ignore)})},e.prototype._updateMapSelectHandler=function(e,t,n,r){var i=this;t.off(`mousedown`),t.off(`click`),e.get(`selectedMode`)&&(t.on(`mousedown`,function(){i._mouseDownFlag=!0}),t.on(`click`,function(e){i._mouseDownFlag&&=!1}))},e}();function eB(e,t,n,r){var i=r.getModel(`itemStyle`),a=r.getModel([`emphasis`,`itemStyle`]),o=r.getModel([`blur`,`itemStyle`]),s=r.getModel([`select`,`itemStyle`]),c=Zz(i),l=Zz(a),u=Zz(s),d=Zz(o),f=e.data;if(f){var p=f.getItemVisual(n,`style`),m=f.getItemVisual(n,`decal`);e.isVisualEncodedByVisualMap&&p.fill&&(c.fill=p.fill),m&&(c.decal=VD(m,e.api))}t.setStyle(c),t.style.strokeNoScale=!0,t.ensureState(`emphasis`).style=l,t.ensureState(`select`).style=u,t.ensureState(`blur`).style=d,Y_(t)}function tB(e,t,n,r,i,a,o){var s=e.data,c=e.isGeo,l=s&&isNaN(s.get(s.mapDimension(`value`),a)),u=s&&s.getItemLayout(a);if(c||l||u&&u.showLabel){var d=c?n:a,f=void 0;(!s||a>=0)&&(f=i);var p=o?{normal:{align:`center`,verticalAlign:`middle`}}:null;Lb(t,Rb(r),{labelFetcher:f,labelDataIndex:d,defaultText:n},p);var m=t.getTextContent();if(m&&(Xz(m).ignore=m.ignore,t.textConfig&&o)){var h=t.getBoundingRect().clone();t.textConfig.layoutRect=h,t.textConfig.position=[(o[0]-h.x)/h.width*100+`%`,(o[1]-h.y)/h.height*100+`%`]}t.disableLabelAnimation=!0}else t.removeTextContent(),t.removeTextConfig(),t.disableLabelAnimation=null}function nB(e,t,n,r,i,a){e.data?e.data.setItemGraphicEl(a,t):y_(t).eventData={componentType:`geo`,componentIndex:i.componentIndex,geoIndex:i.componentIndex,name:n,region:r&&r.option||{}}}function rB(e,t,n,r,i){e.data||Cb({el:t,componentModel:i,itemName:n,itemTooltipOption:r.get(`tooltip`)})}function iB(e,t,n,r,i){t.highDownSilentOnTouch=!!i.get(`selectedMode`);var a=r.getModel(`emphasis`),o=a.get(`focus`);return _v(t,o,a.get(`blurScope`),a.get(`disabled`)),e.isGeo&&wv(t,i,n),o}function aB(e,t,n){var r=[],i;function a(){i=[]}function o(){i.length&&(r.push(i),i=[])}var s=t({polygonStart:a,polygonEnd:o,lineStart:a,lineEnd:o,point:function(e,t){isFinite(e)&&isFinite(t)&&i.push([e,t])},sphere:function(){}});return!n&&s.polygonStart(),L(e,function(e){s.lineStart();for(var t=0;t<e.length;t++)s.point(e[t][0],e[t][1]);s.lineEnd()}),!n&&s.polygonEnd(),r}var oB=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n,r){if(!(r&&r.type===`mapToggleSelect`&&r.from===this.uid)){var i=this.group;if(i.removeAll(),!e.getHostGeoModel()){if(this._mapDraw&&r&&r.type===`geoRoam`&&this._mapDraw.resetForLabelLayout(),r&&r.type===`geoRoam`&&r.componentType===`series`&&r.seriesId===e.id){var a=this._mapDraw;a&&i.add(a.group)}else if(e.needsDrawMap){var a=this._mapDraw||new $z(n);i.add(a.group),a.draw(e,t,n,this,r),this._mapDraw=a}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;e.get(`showLegendSymbol`)&&t.getComponent(`legend`)&&this._renderSymbols(e,t,n)}}},t.prototype.remove=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},t.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},t.prototype._renderSymbols=function(e,t,n){var r=e.originalData,i=this.group;r.each(r.mapDimension(`value`),function(t,n){if(!isNaN(t)){var a=r.getItemLayout(n);if(!(!a||!a.point)){var o=a.point,s=a.offset,c=new $v({style:{fill:e.getData().getVisual(`style`).fill},shape:{cx:o[0]+s*9,cy:o[1],r:3},silent:!0,z2:8+(s?0:11)});if(!s){var l=e.mainSeries.getData(),u=r.getName(n),d=l.indexOfName(u),f=r.getItemModel(n),p=f.getModel(`label`),m=l.getItemGraphicEl(d);Lb(c,Rb(f),{labelFetcher:{getFormattedLabel:function(t,n){return e.getFormattedLabel(d,n)}},defaultText:u}),c.disableLabelAnimation=!0,p.get(`position`)||c.setTextConfig({position:`bottom`}),m.onHoverStateChange=function(e){U_(c,e)}}i.add(c)}}})},t.type=`map`,t}(yE),sB=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.needsDrawMap=!1,n.seriesGroup=[],n.getTooltipPosition=function(e){if(e!=null){var t=this.getData().getName(e),n=this.coordinateSystem,r=n.getRegion(t);return r&&n.dataToPoint(r.getCenter())}},n}return t.prototype.getInitialData=function(e){for(var t=gI(this,{coordDimensions:[`value`],encodeDefaulter:Rs(pC,this)}),n=K(),r=[],i=0,a=t.count();i<a;i++){var o=t.getName(i);n.set(o,i)}return L(Gz.load(this.getMapType(),this.option.nameMap,this.option.nameProperty).regions,function(e){var i=e.name,a=n.get(i),o=e.properties&&e.properties.echartsStyle,s;a==null?(s={name:i},r.push(s)):s=t.getRawDataItem(a),o&&ks(s,o)}),t.appendData(r),t},t.prototype.getHostGeoModel=function(){if(CS(this).kind!==SS.boxCoordSys)return this.getReferringComponents(`geo`,{useDefault:!1,enableAll:!1,enableNone:!1}).models[0]},t.prototype.getMapType=function(){return(this.getHostGeoModel()||this).option.map},t.prototype.getRawValue=function(e){var t=this.getData();return t.get(t.mapDimension(`value`),e)},t.prototype.getRegionModel=function(e){var t=this.getData();return t.getItemModel(t.indexOfName(e))},t.prototype.formatTooltip=function(e,t,n){for(var r=this.getData(),i=this.getRawValue(e),a=r.getName(e),o=this.seriesGroup,s=[],c=0;c<o.length;c++){var l=o[c].originalData.indexOfName(a),u=r.mapDimension(`value`);isNaN(o[c].originalData.get(u,l))||s.push(o[c].name)}return zT(`section`,{header:s.join(`, `),noHeader:!s.length,blocks:[zT(`nameValue`,{name:a,value:i})]})},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.getLegendIcon=function(e){var t=e.icon||`roundRect`,n=nD(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill);return n.setStyle(e.itemStyle),n.style.stroke=`none`,t.indexOf(`empty`)>-1&&(n.style.stroke=n.style.fill,n.style.fill=Z.color.neutral00,n.style.lineWidth=2),n},t.type=`series.map`,t.dependencies=[`geo`],t.layoutMode=`box`,t.defaultOption={z:2,coordinateSystem:`geo`,map:``,left:`center`,top:`center`,aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:Z.color.tertiary},itemStyle:{borderWidth:.5,borderColor:Z.color.border,areaColor:Z.color.background},emphasis:{label:{show:!0,color:Z.color.primary},itemStyle:{areaColor:Z.color.highlight}},select:{label:{show:!0,color:Z.color.primary},itemStyle:{color:Z.color.highlight}},nameProperty:`name`},t}(oE);function cB(e,t){var n={};return L(e,function(e){e.each(e.mapDimension(`value`),function(t,r){var i=`ec-`+e.getName(r);n[i]=n[i]||[],isNaN(t)||n[i].push(t)})}),e[0].map(e[0].mapDimension(`value`),function(r,i){for(var a=`ec-`+e[0].getName(i),o=0,s=1/0,c=-1/0,l=n[a].length,u=0;u<l;u++)s=Math.min(s,n[a][u]),c=Math.max(c,n[a][u]),o+=n[a][u];var d=t===`min`?s:t===`max`?c:t===`average`?o/l:o;return l===0?NaN:d})}function lB(e){var t={};e.eachSeriesByType(`map`,function(e){var n=e.getHostGeoModel(),r=n?`o`+n.id:`i`+e.getMapType();(t[r]=t[r]||[]).push(e)}),L(t,function(e,t){for(var n=cB(R(e,function(e){return e.getData()}),e[0].get(`mapValueCalculation`)),r=0;r<e.length;r++)e[r].originalData=e[r].getData();for(var r=0;r<e.length;r++)e[r].seriesGroup=e,e[r].needsDrawMap=r===0&&!e[r].getHostGeoModel(),e[r].setData(n.cloneShallow()),e[r].mainSeries=e[0]})}function uB(e){var t={};e.eachSeriesByType(`map`,function(n){var r=n.getMapType();if(!(n.getHostGeoModel()||t[r])){var i={};L(n.seriesGroup,function(t){var n=t.coordinateSystem,r=t.originalData;t.get(`showLegendSymbol`)&&e.getComponent(`legend`)&&r.each(r.mapDimension(`value`),function(e,t){var a=r.getName(t),o=n.getRegion(a);if(!(!o||isNaN(e))){var s=i[a]||0,c=n.dataToPoint(o.getCenter());i[a]=s+1,r.setItemLayout(t,{point:c,offset:s})}})});var a=n.getData();a.each(function(e){var t=a.getName(e),n=a.getItemLayout(e)||{};n.showLabel=!i[t],a.setItemLayout(e,n)}),t[r]=!0}})}var dB=Tc,fB=function(e){N(t,e);function t(t,n){var r=e.call(this)||this;return r.type=`view`,r.dimensions=[`x`,`y`],r._roamTransformable=new Af,r._rawTransformable=new Af,r.name=t,r._opt=n,r}return t.prototype.setBoundingRect=function(e,t,n,r){return this._rect=new Ol(e,t,n,r),this._updateCenterAndZoom(),this._rect},t.prototype.getBoundingRect=function(){return this._rect},t.prototype.setViewRect=function(e,t,n,r){this._transformTo(e,t,n,r),this._viewRect=new Ol(e,t,n,r)},t.prototype._transformTo=function(e,t,n,r){var i=this.getBoundingRect(),a=this._rawTransformable;a.transform=i.calculateTransform(new Ol(e,t,n,r));var o=a.parent;a.parent=null,a.decomposeTransform(),a.parent=o,this._updateTransform()},t.prototype.setCenter=function(e){var t=this._opt;t&&t.api&&t.ecModel&&t.ecModel.getShallow(`legacyViewCoordSysCenterBase`)&&e&&(e=[X(e[0],t.api.getWidth()),X(e[1],t.api.getWidth())]),this._centerOption=P(e),this._updateCenterAndZoom()},t.prototype.setZoom=function(e){this._zoom=QR(e||1,this.zoomLimit),this._updateCenterAndZoom()},t.prototype.getDefaultCenter=function(){var e=this.getBoundingRect();return[e.x+e.width/2,e.y+e.height/2]},t.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},t.prototype.getZoom=function(){return this._zoom||1},t.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},t.prototype._updateCenterAndZoom=function(){var e=this._centerOption,t=this._rect;e&&t&&(this._center=[X(e[0],t.width,t.x),X(e[1],t.height,t.y)]);var n=this._rawTransformable.getLocalTransform(),r=this._roamTransformable,i=this.getDefaultCenter(),a=this.getCenter(),o=this.getZoom();a=Tc([],a,n),i=Tc([],i,n),r.originX=a[0],r.originY=a[1],r.x=i[0]-a[0],r.y=i[1]-a[1],r.scaleX=r.scaleY=o,this._updateTransform()},t.prototype._updateTransform=function(){var e=this._roamTransformable,t=this._rawTransformable;t.parent=e,e.updateTransform(),t.updateTransform(),ll(this.transform||=[],t.transform||sl()),this._rawTransform=t.getLocalTransform(),this.invTransform=this.invTransform||[],ml(this.invTransform,this.transform),this.decomposeTransform()},t.prototype.getTransformInfo=function(){var e=this._rawTransformable,t=this._roamTransformable,n=new Af;return n.transform=t.transform,n.decomposeTransform(),{roam:{x:n.x,y:n.y,scaleX:n.scaleX,scaleY:n.scaleY},raw:{x:e.x,y:e.y,scaleX:e.scaleX,scaleY:e.scaleY}}},t.prototype.getViewRect=function(){return this._viewRect},t.prototype.getViewRectAfterRoam=function(){var e=this.getBoundingRect().clone();return e.applyTransform(this.transform),e},t.prototype.dataToPoint=function(e,t,n){var r=t?this._rawTransform:this.transform;return n||=[],r?dB(n,e,r):uc(n,e)},t.prototype.pointToData=function(e,t,n){n||=[];var r=this.invTransform;return r?dB(n,e,r):(n[0]=e[0],n[1]=e[1],n)},t.prototype.convertToPixel=function(e,t,n){var r=pB(t);return r===this?r.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,t,n){var r=pB(t);return r===this?r.pointToData(n):null},t.prototype.containPoint=function(e){return this.getViewRectAfterRoam().contain(e[0],e[1])},t.dimensions=[`x`,`y`],t}(Af);function pB(e){var t=e.seriesModel;return t?t.coordinateSystem:null}var mB={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},hB=[`lng`,`lat`],gB=function(e){N(t,e);function t(t,n,r){var i=e.call(this,t,{api:r.api,ecModel:r.ecModel})||this;i.dimensions=hB,i.type=`geo`,i._nameCoordMap=K(),i.map=n;var a=r.projection,o=Gz.load(n,r.nameMap,r.nameProperty),s=Gz.getGeoResource(n),c=i.resourceType=s?s.type:null,l=i.regions=o.regions,u=mB[s.type];i._regionsMap=o.regionsMap,i.regions=o.regions,process.env.NODE_ENV!==`production`&&a&&(c===`geoSVG`&&(process.env.NODE_ENV!==`production`&&Wp(`Map `+n+` with SVG source can't use projection. Only GeoJSON source supports projection.`),a=null),a.project&&a.unproject||(process.env.NODE_ENV!==`production`&&Wp(`project and unproject must be both provided in the projeciton.`),a=null)),i.projection=a;var d;if(a)for(var f=0;f<l.length;f++){var p=l[f].getBoundingRect(a);d||=p.clone(),d.union(p)}else d=o.boundingRect;return i.setBoundingRect(d.x,d.y,d.width,d.height),i.aspectScale=a?1:W(r.aspectScale,u.aspectScale),i._invertLongitute=a?!1:u.invertLongitute,i}return t.prototype._transformTo=function(e,t,n,r){var i=this.getBoundingRect(),a=this._invertLongitute;i=i.clone(),a&&(i.y=-i.y-i.height);var o=this._rawTransformable;o.transform=i.calculateTransform(new Ol(e,t,n,r));var s=o.parent;o.parent=null,o.decomposeTransform(),o.parent=s,a&&(o.scaleY=-o.scaleY),this._updateTransform()},t.prototype.getRegion=function(e){return this._regionsMap.get(e)},t.prototype.getRegionByCoord=function(e){for(var t=this.regions,n=0;n<t.length;n++){var r=t[n];if(r.type===`geoJSON`&&r.contain(e))return t[n]}},t.prototype.addGeoCoord=function(e,t){this._nameCoordMap.set(e,t)},t.prototype.getGeoCoord=function(e){var t=this._regionsMap.get(e);return this._nameCoordMap.get(e)||t&&t.getCenter()},t.prototype.dataToPoint=function(e,t,n){if(H(e)&&(e=this.getGeoCoord(e)),e){var r=this.projection;return r&&(e=r.project(e)),e&&this.projectedToPoint(e,t,n)}},t.prototype.pointToData=function(e,t,n){var r=this.projection;return r&&(e=r.unproject(e)),e&&this.pointToProjected(e,n)},t.prototype.pointToProjected=function(t,n){return e.prototype.pointToData.call(this,t,0,n)},t.prototype.projectedToPoint=function(t,n,r){return e.prototype.dataToPoint.call(this,t,n,r)},t.prototype.convertToPixel=function(e,t,n){var r=_B(t);return r===this?r.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,t,n){var r=_B(t);return r===this?r.pointToData(n):null},t}(fB);Ms(gB,fB);function _B(e){var t=e.geoModel,n=e.seriesModel;return t?t.coordinateSystem:n?n.coordinateSystem||(n.getReferringComponents(`geo`,Dm).models[0]||{}).coordinateSystem:null}function vB(e,t){var n=e.get(`boundingCoords`);if(n!=null){var r=n[0],i=n[1];if(!(isFinite(r[0])&&isFinite(r[1])&&isFinite(i[0])&&isFinite(i[1])))process.env.NODE_ENV!==`production`&&console.error(`Invalid boundingCoords`);else{var a=this.projection;if(a){var o=r[0],s=r[1],c=i[0],l=i[1];r=[1/0,1/0],i=[-1/0,-1/0];var u=function(e,t,n,o){for(var s=n-e,c=o-t,l=0;l<=100;l++){var u=l/100,d=a.project([e+s*u,t+c*u]);Ec(r,r,d),Dc(i,i,d)}};u(o,s,c,s),u(c,s,c,l),u(c,l,o,l),u(o,l,c,s)}this.setBoundingRect(r[0],r[1],i[0]-r[0],i[1]-r[1])}}var d=this.getBoundingRect(),f=e.get(`layoutCenter`),p=e.get(`layoutSize`),m=LS(e,t).refContainer,h=d.width/d.height*this.aspectScale,g=!1,_,v;f&&p&&(_=[X(f[0],m.width)+m.x,X(f[1],m.height)+m.y],v=X(p,Math.min(m.width,m.height)),!isNaN(_[0])&&!isNaN(_[1])&&!isNaN(v)?g=!0:process.env.NODE_ENV!==`production`&&console.warn(`Given layoutCenter or layoutSize data are invalid. Use left/top/width/height instead.`));var y;if(g)y={},h>1?(y.width=v,y.height=v/h):(y.height=v,y.width=v*h),y.y=_[1]-y.height/2,y.x=_[0]-y.width/2;else{var b=e.getBoxLayoutParams();b.aspect=h,y=PS(b,m),y=FS(e,y,h)}this.setViewRect(y.x,y.y,y.width,y.height),this.setCenter(e.get(`center`)),this.setZoom(e.get(`zoom`))}function yB(e,t){L(t.get(`geoCoord`),function(t,n){e.addGeoCoord(n,t)})}var bB=new(function(){function e(){this.dimensions=hB}return e.prototype.create=function(e,t){var n=[];function r(e){return{nameProperty:e.get(`nameProperty`),aspectScale:e.get(`aspectScale`),projection:e.get(`projection`)}}e.eachComponent(`geo`,function(i,a){var o=i.get(`map`),s=new gB(o+a,o,F({nameMap:i.get(`nameMap`),api:t,ecModel:e},r(i)));s.zoomLimit=i.get(`scaleLimit`),n.push(s),i.coordinateSystem=s,s.model=i,s.resize=vB,s.resize(i,t)}),e.eachSeries(function(e){wS({targetModel:e,coordSysType:`geo`,coordSysProvider:function(){var t=e.subType===`map`?e.getHostGeoModel():e.getReferringComponents(`geo`,Dm).models[0];return t&&t.coordinateSystem},allowNotFound:!0})});var i={};return e.eachSeriesByType(`map`,function(e){if(!e.getHostGeoModel()){var t=e.getMapType();i[t]=i[t]||[],i[t].push(e)}}),L(i,function(i,a){var o=new gB(a,a,F({nameMap:As(R(i,function(e){return e.get(`nameMap`)})),api:t,ecModel:e},r(i[0])));o.zoomLimit=qs.apply(null,R(i,function(e){return e.get(`scaleLimit`)})),n.push(o),o.resize=vB,o.resize(i[0],t),L(i,function(e){e.coordinateSystem=o,yB(o,e)})}),n},e.prototype.getFilledRegions=function(e,t,n,r){for(var i=(e||[]).slice(),a=K(),o=0;o<i.length;o++)a.set(i[o].name,i[o]);return L(Gz.load(t,n,r).regions,function(e){var t=e.name,n=a.get(t),r=e.properties&&e.properties.echartsStyle;n||(n={name:t},i.push(n)),r&&ks(n,r)}),i},e}()),xB=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n);var r=Gz.getGeoResource(e.map);if(r&&r.type===`geoJSON`){var i=e.itemStyle=e.itemStyle||{};`color`in i||(i.color=e.defaultItemStyleColor||Z.color.backgroundTint)}em(e,`label`,[`show`])},t.prototype.optionUpdated=function(){var e=this,t=this.option;t.regions=bB.getFilledRegions(t.regions,t.map,t.nameMap,t.nameProperty);var n={};this._optionModelMap=Ps(t.regions||[],function(t,r){var i=r.name;return i&&(t.set(i,new ex(r,e,e.ecModel)),r.selected&&(n[i]=!0)),t},K()),t.selectedMap||=n},t.prototype.getRegionModel=function(e){return this._optionModelMap.get(e)||new ex(null,this,this.ecModel)},t.prototype.getFormattedLabel=function(e,t){var n=this.getRegionModel(e),r=t===`normal`?n.get([`label`,`formatter`]):n.get([`emphasis`,`label`,`formatter`]),i={name:e};if(V(r))return i.status=t,r(i);if(H(r))return r.replace(`{a}`,e??``)},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.select=function(e){var t=this.option,n=t.selectedMode;if(n){n!==`multiple`&&(t.selectedMap=null);var r=t.selectedMap||={};r[e]=!0}},t.prototype.unSelect=function(e){var t=this.option.selectedMap;t&&(t[e]=!1)},t.prototype.toggleSelected=function(e){this[this.isSelected(e)?`unSelect`:`select`](e)},t.prototype.isSelected=function(e){var t=this.option.selectedMap;return!!(t&&t[e])},t.type=`geo`,t.layoutMode=`box`,t.defaultOption={z:0,show:!0,left:`center`,top:`center`,aspectScale:null,silent:!1,map:``,boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:Z.color.tertiary},itemStyle:{borderWidth:.5,borderColor:Z.color.border},emphasis:{label:{show:!0,color:Z.color.primary},itemStyle:{color:Z.color.highlight}},select:{label:{show:!0,color:Z.color.primary},itemStyle:{color:Z.color.highlight}},regions:[]},t}(GS),SB=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.focusBlurEnabled=!0,n}return t.prototype.init=function(e,t){this._api=t},t.prototype.render=function(e,t,n,r){if(this._model=e,!e.get(`show`)){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;return}this._mapDraw||=new $z(n);var i=this._mapDraw;i.draw(e,t,n,this,r),i.group.on(`click`,this._handleRegionClick,this),i.group.silent=e.get(`silent`),this.group.add(i.group),this.updateSelectStatus(e,t,n)},t.prototype._handleRegionClick=function(e){var t;eD(e.target,function(e){return(t=y_(e).eventData)!=null},!0),t&&this._api.dispatchAction({type:`geoToggleSelect`,geoId:this._model.id,name:t.name})},t.prototype.updateSelectStatus=function(e,t,n){var r=this;this._mapDraw.group.traverse(function(e){var t=y_(e).eventData;if(t)return r._model.isSelected(t.name)?n.enterSelect(e):n.leaveSelect(e),!0})},t.prototype.findHighDownDispatchers=function(e){return this._mapDraw&&this._mapDraw.findHighDownDispatchers(e,this._model)},t.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove()},t.type=`geo`,t}(hE);function CB(e,t,n){Gz.registerMap(e,t,n)}function wB(e){e.registerCoordinateSystem(`geo`,bB),e.registerComponentModel(xB),e.registerComponentView(SB),e.registerImpl(`registerMap`,CB),e.registerImpl(`getMap`,function(e){return Gz.getMapForUser(e)});function t(t,n){n.update=`geo:updateSelectStatus`,e.registerAction(n,function(e,n){var r={},i=[];return n.eachComponent({mainType:`geo`,query:e},function(n){n[t](e.name);var a=n.coordinateSystem;L(a.regions,function(e){r[e.name]=n.isSelected(e.name)||!1});var o=[];L(r,function(e,t){r[t]&&o.push(t)}),i.push({geoIndex:n.componentIndex,name:o})}),{selected:r,allSelected:i,name:e.name}})}t(`toggleSelected`,{type:`geoToggleSelect`,event:`geoselectchanged`}),t(`select`,{type:`geoSelect`,event:`geoselected`}),t(`unSelect`,{type:`geoUnSelect`,event:`geounselected`}),e.registerAction({type:`geoRoam`,event:`geoRoam`,update:`updateTransform`},function(e,t,n){var r=e.componentType;r||(e.geoId==null?e.seriesId!=null&&(r=`series`):r=`geo`),r||=`series`,t.eachComponent({mainType:r,query:e},function(t){var n=t.coordinateSystem;if(n.type===`geo`){var i=XR(n,e,t.get(`scaleLimit`));t.setCenter&&t.setCenter(i.center),t.setZoom&&t.setZoom(i.zoom),r===`series`&&L(t.seriesGroup,function(e){e.setCenter(i.center),e.setZoom(i.zoom)})}})})}function TB(e){Nk(wB),e.registerChartView(oB),e.registerSeriesModel(sB),e.registerLayout(uB),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,lB),QE(`map`,e.registerAction)}function EB(e){var t=e;t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var n=[t],r,i;r=n.pop();)if(i=r.children,r.isExpand&&i.length)for(var a=i.length-1;a>=0;a--){var o=i[a];o.hierNode={defaultAncestor:null,ancestor:o,prelim:0,modifier:0,change:0,shift:0,i:a,thread:null},n.push(o)}}function DB(e,t){var n=e.isExpand?e.children:[],r=e.parentNode.children,i=e.hierNode.i?r[e.hierNode.i-1]:null;if(n.length){jB(e);var a=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2;i?(e.hierNode.prelim=i.hierNode.prelim+t(e,i),e.hierNode.modifier=e.hierNode.prelim-a):e.hierNode.prelim=a}else i&&(e.hierNode.prelim=i.hierNode.prelim+t(e,i));e.parentNode.hierNode.defaultAncestor=MB(e,i,e.parentNode.hierNode.defaultAncestor||r[0],t)}function OB(e){var t=e.hierNode.prelim+e.parentNode.hierNode.modifier;e.setLayout({x:t},!0),e.hierNode.modifier+=e.parentNode.hierNode.modifier}function kB(e){return arguments.length?e:LB}function AB(e,t){return e-=Math.PI/2,{x:t*Math.cos(e),y:t*Math.sin(e)}}function jB(e){for(var t=e.children,n=t.length,r=0,i=0;--n>=0;){var a=t[n];a.hierNode.prelim+=r,a.hierNode.modifier+=r,i+=a.hierNode.change,r+=a.hierNode.shift+i}}function MB(e,t,n,r){if(t){for(var i=e,a=e,o=a.parentNode.children[0],s=t,c=i.hierNode.modifier,l=a.hierNode.modifier,u=o.hierNode.modifier,d=s.hierNode.modifier;s=NB(s),a=PB(a),s&&a;){i=NB(i),o=PB(o),i.hierNode.ancestor=e;var f=s.hierNode.prelim+d-a.hierNode.prelim-l+r(s,a);f>0&&(IB(FB(s,e,n),e,f),l+=f,c+=f),d+=s.hierNode.modifier,l+=a.hierNode.modifier,c+=i.hierNode.modifier,u+=o.hierNode.modifier}s&&!NB(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=d-c),a&&!PB(o)&&(o.hierNode.thread=a,o.hierNode.modifier+=l-u,n=e)}return n}function NB(e){var t=e.children;return t.length&&e.isExpand?t[t.length-1]:e.hierNode.thread}function PB(e){var t=e.children;return t.length&&e.isExpand?t[0]:e.hierNode.thread}function FB(e,t,n){return e.hierNode.ancestor.parentNode===t.parentNode?e.hierNode.ancestor:n}function IB(e,t,n){var r=n/(t.hierNode.i-e.hierNode.i);t.hierNode.change-=r,t.hierNode.shift+=n,t.hierNode.modifier+=n,t.hierNode.prelim+=n,e.hierNode.change+=r}function LB(e,t){return e.parentNode===t.parentNode?1:2}var RB=function(){function e(){this.parentPoint=[],this.childPoints=[]}return e}(),zB=function(e){N(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultStyle=function(){return{stroke:Z.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new RB},t.prototype.buildPath=function(e,t){var n=t.childPoints,r=n.length,i=t.parentPoint,a=n[0],o=n[r-1];if(r===1){e.moveTo(i[0],i[1]),e.lineTo(a[0],a[1]);return}var s=t.orient,c=s===`TB`||s===`BT`?0:1,l=1-c,u=X(t.forkPosition,1),d=[];d[c]=i[c],d[l]=i[l]+(o[l]-i[l])*u,e.moveTo(i[0],i[1]),e.lineTo(d[0],d[1]),e.moveTo(a[0],a[1]),d[c]=a[c],e.lineTo(d[0],d[1]),d[c]=o[c],e.lineTo(d[0],d[1]),e.lineTo(o[0],o[1]);for(var f=1;f<r-1;f++){var p=n[f];e.moveTo(p[0],p[1]),d[c]=p[c],e.lineTo(d[0],d[1])}},t}(Bg),BB=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._mainGroup=new Y,n}return t.prototype.init=function(e,t){this._controller=new IR(t.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},t.prototype.render=function(e,t,n){var r=e.getData(),i=e.layoutInfo,a=this._mainGroup;e.get(`layout`)===`radial`?(a.x=i.x+i.width/2,a.y=i.y+i.height/2):(a.x=i.x,a.y=i.y),this._updateViewCoordSys(e,n),this._updateController(e,null,t,n);var o=this._data;r.diff(o).add(function(t){VB(r,t)&&HB(r,t,null,a,e)}).update(function(t,n){var i=o.getItemGraphicEl(n);if(!VB(r,t)){i&&KB(o,n,i,a,e);return}HB(r,t,i,a,e)}).remove(function(t){var n=o.getItemGraphicEl(t);n&&KB(o,t,n,a,e)}).execute(),this._nodeScaleRatio=e.get(`nodeScaleRatio`),this._updateNodeAndLinkScale(e),e.get(`expandAndCollapse`)===!0&&r.eachItemGraphicEl(function(t,r){t.off(`click`).on(`click`,function(){n.dispatchAction({type:`treeExpandAndCollapse`,seriesId:e.id,dataIndex:r})})}),this._data=r},t.prototype._updateViewCoordSys=function(e,t){var n=e.getData(),r=[];n.each(function(e){var t=n.getItemLayout(e);t&&!isNaN(t.x)&&!isNaN(t.y)&&r.push([+t.x,+t.y])});var i=[],a=[];Wh(r,i,a);var o=this._min,s=this._max;a[0]-i[0]===0&&(i[0]=o?o[0]:i[0]-1,a[0]=s?s[0]:a[0]+1),a[1]-i[1]===0&&(i[1]=o?o[1]:i[1]-1,a[1]=s?s[1]:a[1]+1);var c=e.coordinateSystem=new fB(null,{api:t,ecModel:e.ecModel});c.zoomLimit=e.get(`scaleLimit`),c.setBoundingRect(i[0],i[1],a[0]-i[0],a[1]-i[1]),c.setCenter(e.get(`center`)),c.setZoom(e.get(`zoom`)),this.group.attr({x:c.x,y:c.y,scaleX:c.scaleX,scaleY:c.scaleY}),this._min=i,this._max=a},t.prototype._updateController=function(e,t,n,r){var i=this;JR(e,r,this.group,this._controller,this._controllerHost,t),this._controller.on(`zoom`,function(t){i._updateNodeAndLinkScale(e)})},t.prototype._updateNodeAndLinkScale=function(e){var t=e.getData(),n=this._getNodeGlobalScale(e);t.eachItemGraphicEl(function(e,t){e.setSymbolScale(n)})},t.prototype._getNodeGlobalScale=function(e){var t=e.coordinateSystem;if(t.type!==`view`)return 1;var n=this._nodeScaleRatio,r=t.scaleX||1;return((t.getZoom()-1)*n+1)/r},t.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype.remove=function(){this._mainGroup.removeAll(),this._data=null},t.type=`tree`,t}(yE);function VB(e,t){var n=e.getItemLayout(t);return n&&!isNaN(n.x)&&!isNaN(n.y)}function HB(e,t,n,r,i){var a=!n,o=e.tree.getNodeByDataIndex(t),s=o.getModel(),c=o.getVisual(`style`).fill,l=o.isExpand===!1&&o.children.length!==0?c:Z.color.neutral00,u=e.tree.root,d=o.parentNode===u?o:o.parentNode||o,f=e.getItemGraphicEl(d.dataIndex),p=d.getLayout(),m=f?{x:f.__oldX,y:f.__oldY,rawX:f.__radialOldRawX,rawY:f.__radialOldRawY}:p,h=o.getLayout();a?(n=new hF(e,t,null,{symbolInnerColor:l,useNameLabel:!0}),n.x=m.x,n.y=m.y):n.updateData(e,t,null,{symbolInnerColor:l,useNameLabel:!0}),n.__radialOldRawX=n.__radialRawX,n.__radialOldRawY=n.__radialRawY,n.__radialRawX=h.rawX,n.__radialRawY=h.rawY,r.add(n),e.setItemGraphicEl(t,n),n.__oldX=n.x,n.__oldY=n.y,Wy(n,{x:h.x,y:h.y},i);var g=n.getSymbolPath();if(i.get(`layout`)===`radial`){var _=u.children[0],v=_.getLayout(),y=_.children.length,b=void 0,x=void 0;if(h.x===v.x&&o.isExpand===!0&&_.children.length){var S={x:(_.children[0].getLayout().x+_.children[y-1].getLayout().x)/2,y:(_.children[0].getLayout().y+_.children[y-1].getLayout().y)/2};b=Math.atan2(S.y-v.y,S.x-v.x),b<0&&(b=Math.PI*2+b),x=S.x<v.x,x&&(b-=Math.PI)}else b=Math.atan2(h.y-v.y,h.x-v.x),b<0&&(b=Math.PI*2+b),o.children.length===0||o.children.length!==0&&o.isExpand===!1?(x=h.x<v.x,x&&(b-=Math.PI)):(x=h.x>v.x,x||(b-=Math.PI));var C=x?`left`:`right`,w=s.getModel(`label`),T=w.get(`rotate`),E=Math.PI/180*T,D=g.getTextContent();D&&(g.setTextConfig({position:w.get(`position`)||C,rotation:T==null?-b:E,origin:`center`}),D.setStyle(`verticalAlign`,`middle`))}var O=s.get([`emphasis`,`focus`]),k=O===`relative`?nc(o.getAncestorsIndices(),o.getDescendantIndices()):O===`ancestor`?o.getAncestorsIndices():O===`descendant`?o.getDescendantIndices():null;k&&(y_(n).focus=k),UB(i,o,u,n,m,p,h,r),n.__edge&&(n.onHoverStateChange=function(t){if(t!==`blur`){var r=o.parentNode&&e.getItemGraphicEl(o.parentNode.dataIndex);r&&r.hoverState===1||U_(n.__edge,t)}})}function UB(e,t,n,r,i,a,o,s){var c=t.getModel(),l=e.get(`edgeShape`),u=e.get(`layout`),d=e.getOrient(),f=e.get([`lineStyle`,`curveness`]),p=e.get(`edgeForkPosition`),m=c.getModel(`lineStyle`).getLineStyle(),h=r.__edge;if(l===`curve`)t.parentNode&&t.parentNode!==n&&(h||=r.__edge=new Dy({shape:qB(u,d,f,i,i)}),Wy(h,{shape:qB(u,d,f,a,o)},e));else if(l===`polyline`){if(u===`orthogonal`){if(t!==n&&t.children&&t.children.length!==0&&t.isExpand===!0){for(var g=t.children,_=[],v=0;v<g.length;v++){var y=g[v].getLayout();_.push([y.x,y.y])}h||=r.__edge=new zB({shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]],orient:d,forkPosition:p}}),Wy(h,{shape:{parentPoint:[o.x,o.y],childPoints:_}},e)}}else if(process.env.NODE_ENV!==`production`)throw Error(`The polyline edgeShape can only be used in orthogonal layout`)}h&&!(l===`polyline`&&!t.isExpand)&&(h.useStyle(I({strokeNoScale:!0,fill:null},m)),xv(h,c,`lineStyle`),Y_(h),s.add(h))}function WB(e,t,n,r,i){var a=t.tree.root,o=GB(a,e),s=o.source,c=o.sourceLayout,l=t.getItemGraphicEl(e.dataIndex);if(l){var u=t.getItemGraphicEl(s.dataIndex).__edge,d=l.__edge||(s.isExpand===!1||s.children.length===1?u:void 0),f=r.get(`edgeShape`),p=r.get(`layout`),m=r.get(`orient`),h=r.get([`lineStyle`,`curveness`]);d&&(f===`curve`?qy(d,{shape:qB(p,m,h,c,c),style:{opacity:0}},r,{cb:function(){n.remove(d)},removeOpt:i}):f===`polyline`&&r.get(`layout`)===`orthogonal`&&qy(d,{shape:{parentPoint:[c.x,c.y],childPoints:[[c.x,c.y]]},style:{opacity:0}},r,{cb:function(){n.remove(d)},removeOpt:i}))}}function GB(e,t){for(var n=t.parentNode===e?t:t.parentNode||t,r;r=n.getLayout(),r==null;)n=n.parentNode===e?n:n.parentNode||n;return{source:n,sourceLayout:r}}function KB(e,t,n,r,i){var a=e.tree.getNodeByDataIndex(t),o=e.tree.root,s=GB(o,a).sourceLayout,c={duration:i.get(`animationDurationUpdate`),easing:i.get(`animationEasingUpdate`)};qy(n,{x:s.x+1,y:s.y+1},i,{cb:function(){r.remove(n),e.setItemGraphicEl(t,null)},removeOpt:c}),n.fadeOut(null,e.hostModel,{fadeLabel:!0,animation:c}),a.children.forEach(function(t){WB(t,e,r,i,c)}),WB(a,e,r,i,c)}function qB(e,t,n,r,i){var a,o,s,c,l,u,d,f;if(e===`radial`){l=r.rawX,d=r.rawY,u=i.rawX,f=i.rawY;var p=AB(l,d),m=AB(l,d+(f-d)*n),h=AB(u,f+(d-f)*n),g=AB(u,f);return{x1:p.x||0,y1:p.y||0,x2:g.x||0,y2:g.y||0,cpx1:m.x||0,cpy1:m.y||0,cpx2:h.x||0,cpy2:h.y||0}}else l=r.x,d=r.y,u=i.x,f=i.y,(t===`LR`||t===`RL`)&&(a=l+(u-l)*n,o=d,s=u+(l-u)*n,c=f),(t===`TB`||t===`BT`)&&(a=l,o=d+(f-d)*n,s=u,c=f+(d-f)*n);return{x1:l,y1:d,x2:u,y2:f,cpx1:a,cpy1:o,cpx2:s,cpy2:c}}var JB=Cm();function YB(e){var t=e.mainData,n=e.datas;n||(n={main:t},e.datasAttr={main:`data`}),e.datas=e.mainData=null,nV(t,n,e),L(n,function(n){L(t.TRANSFERABLE_METHODS,function(t){n.wrapMethod(t,Rs(XB,e))})}),t.wrapMethod(`cloneShallow`,Rs(QB,e)),L(t.CHANGABLE_METHODS,function(n){t.wrapMethod(n,Rs(ZB,e))}),G(n[t.dataType]===t)}function XB(e,t){if(tV(this)){var n=F({},JB(this).datas);n[this.dataType]=t,nV(t,n,e)}else rV(t,this.dataType,JB(this).mainData,e);return t}function ZB(e,t){return e.struct&&e.struct.update(),t}function QB(e,t){return L(JB(t).datas,function(n,r){n!==t&&rV(n.cloneShallow(),r,t,e)}),t}function $B(e){var t=JB(this).mainData;return e==null||t==null?t:JB(t).datas[e]}function eV(){var e=JB(this).mainData;return e==null?[{data:e}]:R(Ls(JB(e).datas),function(t){return{type:t,data:JB(e).datas[t]}})}function tV(e){return JB(e).mainData===e}function nV(e,t,n){JB(e).datas={},L(t,function(t,r){rV(t,r,e,n)})}function rV(e,t,n,r){JB(n).datas[t]=e,JB(e).mainData=n,e.dataType=t,r.struct&&(e[r.structAttr]=r.struct,r.struct[r.datasAttr[t]]=e),e.getLinkedData=$B,e.getLinkedDataAll=eV}var iV=function(){function e(e,t){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=e||``,this.hostTree=t}return e.prototype.isRemoved=function(){return this.dataIndex<0},e.prototype.eachNode=function(e,t,n){V(e)&&(n=t,t=e,e=null),e||={},H(e)&&(e={order:e});var r=e.order||`preorder`,i=this[e.attr||`children`],a;r===`preorder`&&(a=t.call(n,this));for(var o=0;!a&&o<i.length;o++)i[o].eachNode(e,t,n);r===`postorder`&&t.call(n,this)},e.prototype.updateDepthAndHeight=function(e){var t=0;this.depth=e;for(var n=0;n<this.children.length;n++){var r=this.children[n];r.updateDepthAndHeight(e+1),r.height>t&&(t=r.height)}this.height=t+1},e.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,n=this.children,r=n.length;t<r;t++){var i=n[t].getNodeById(e);if(i)return i}},e.prototype.contains=function(e){if(e===this)return!0;for(var t=0,n=this.children,r=n.length;t<r;t++){var i=n[t].contains(e);if(i)return i}},e.prototype.getAncestors=function(e){for(var t=[],n=e?this:this.parentNode;n;)t.push(n),n=n.parentNode;return t.reverse(),t},e.prototype.getAncestorsIndices=function(){for(var e=[],t=this;t;)e.push(t.dataIndex),t=t.parentNode;return e.reverse(),e},e.prototype.getDescendantIndices=function(){var e=[];return this.eachNode(function(t){e.push(t.dataIndex)}),e},e.prototype.getValue=function(e){var t=this.hostTree.data;return t.getStore().get(t.getDimensionIndex(e||`value`),this.dataIndex)},e.prototype.setLayout=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},e.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(e)},e.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},e.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},e.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},e.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},e.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},e.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t<e.length;++t)if(e[t]===this)return t;return-1}return-1},e.prototype.isAncestorOf=function(e){for(var t=e.parentNode;t;){if(t===this)return!0;t=t.parentNode}return!1},e.prototype.isDescendantOf=function(e){return e!==this&&e.isAncestorOf(this)},e}(),aV=function(){function e(e){this.type=`tree`,this._nodes=[],this.hostModel=e}return e.prototype.eachNode=function(e,t,n){this.root.eachNode(e,t,n)},e.prototype.getNodeByDataIndex=function(e){var t=this.data.getRawIndex(e);return this._nodes[t]},e.prototype.getNodeById=function(e){return this.root.getNodeById(e)},e.prototype.update=function(){for(var e=this.data,t=this._nodes,n=0,r=t.length;n<r;n++)t[n].dataIndex=-1;for(var n=0,r=e.count();n<r;n++)t[e.getRawIndex(n)].dataIndex=n},e.prototype.clearLayouts=function(){this.data.clearItemLayouts()},e.createTree=function(t,n,r){var i=new e(n),a=[],o=1;s(t);function s(e,t){var n=e.value;o=Math.max(o,B(n)?n.length:1),a.push(e);var r=new iV(pm(e.name,``),i);t?oV(r,t):i.root=r,i._nodes.push(r);var c=e.children;if(c)for(var l=0;l<c.length;l++)s(c[l],r)}i.root.updateDepthAndHeight(0);var c=dA(a,{coordDimensions:[`value`],dimensionsCount:o}).dimensions,l=new uA(c,n);return l.initData(a),r&&r(l),YB({mainData:l,struct:i,structAttr:`tree`}),i.update(),i},e}();function oV(e,t){var n=t.children;e.parentNode!==t&&(n.push(e),e.parentNode=t)}function sV(e,t,n){if(e&&js(t,e.type)>=0){var r=n.getData().tree.root,i=e.targetNode;if(H(i)&&(i=r.getNodeById(i)),i&&r.contains(i))return{node:i};var a=e.targetNodeId;if(a!=null&&(i=r.getNodeById(a)))return{node:i}}}function cV(e){for(var t=[];e;)e=e.parentNode,e&&t.push(e);return t.reverse()}function lV(e,t){return js(cV(e),t)>=0}function uV(e,t){for(var n=[];e;){var r=e.dataIndex;n.push({name:e.name,dataIndex:r,value:t.getRawValue(r)}),e=e.parentNode}return n.reverse(),n}var dV=function(e){N(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return t.prototype.getInitialData=function(e){var t={name:e.name,children:e.data},n=new ex(e.leaves||{},this,this.ecModel),r=aV.createTree(t,this,i);function i(e){e.wrapMethod(`getItemModel`,function(e,t){var i=r.getNodeByDataIndex(t);return i&&i.children.length&&i.isExpand||(e.parentModel=n),e})}var a=0;r.eachNode(`preorder`,function(e){e.depth>a&&(a=e.depth)});var o=e.expandAndCollapse&&e.initialTreeDepth>=0?e.initialTreeDepth:a;return r.root.eachNode(`preorder`,function(e){var t=e.hostTree.data.getRawDataItem(e.dataIndex);e.isExpand=t&&t.collapsed!=null?!t.collapsed:e.depth<=o}),r.data},t.prototype.getOrient=function(){var e=this.get(`orient`);return e===`horizontal`?e=`LR`:e===`vertical`&&(e=`TB`),e},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.formatTooltip=function(e,t,n){for(var r=this.getData().tree,i=r.root.children[0],a=r.getNodeByDataIndex(e),o=a.getValue(),s=a.name;a&&a!==i;)s=a.parentNode.name+`.`+s,a=a.parentNode;return zT(`nameValue`,{name:s,value:o,noValue:isNaN(o)||o==null})},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments),r=this.getData().tree.getNodeByDataIndex(t);return n.treeAncestors=uV(r,this),n.collapsed=!r.isExpand,n},t.type=`series.tree`,t.layoutMode=`box`,t.defaultOption={z:2,coordinateSystemUsage:`box`,left:`12%`,top:`12%`,right:`12%`,bottom:`12%`,layout:`orthogonal`,edgeShape:`curve`,edgeForkPosition:`50%`,roam:!1,roamTrigger:`global`,nodeScaleRatio:.4,center:null,zoom:1,orient:`LR`,symbol:`emptyCircle`,symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:Z.color.borderTint,width:1.5,curveness:.5},itemStyle:{color:`lightsteelblue`,borderWidth:1.5},label:{show:!0},animationEasing:`linear`,animationDuration:700,animationDurationUpdate:500},t}(oE);function fV(e,t,n){for(var r=[e],i=[],a;a=r.pop();)if(i.push(a),a.isExpand){var o=a.children;if(o.length)for(var s=0;s<o.length;s++)r.push(o[s])}for(;a=i.pop();)t(a,n)}function pV(e,t){for(var n=[e],r;r=n.pop();)if(t(r),r.isExpand){var i=r.children;if(i.length)for(var a=i.length-1;a>=0;a--)n.push(i[a])}}function mV(e,t){e.eachSeriesByType(`tree`,function(e){hV(e,t)})}function hV(e,t){var n=LS(e,t).refContainer,r=PS(e.getBoxLayoutParams(),n);e.layoutInfo=r;var i=e.get(`layout`),a=0,o=0,s=null;i===`radial`?(a=2*Math.PI,o=Math.min(r.height,r.width)/2,s=kB(function(e,t){return(e.parentNode===t.parentNode?1:2)/e.depth})):(a=r.width,o=r.height,s=kB());var c=e.getData().tree.root,l=c.children[0];if(l){EB(c),fV(l,DB,s),c.hierNode.modifier=-l.hierNode.prelim,pV(l,OB);var u=l,d=l,f=l;pV(l,function(e){var t=e.getLayout().x;t<u.getLayout().x&&(u=e),t>d.getLayout().x&&(d=e),e.depth>f.depth&&(f=e)});var p=u===d?1:s(u,d)/2,m=p-u.getLayout().x,h=0,g=0,_=0,v=0;if(i===`radial`)h=a/(d.getLayout().x+p+m),g=o/(f.depth-1||1),pV(l,function(e){_=(e.getLayout().x+m)*h,v=(e.depth-1)*g;var t=AB(_,v);e.setLayout({x:t.x,y:t.y,rawX:_,rawY:v},!0)});else{var y=e.getOrient();y===`RL`||y===`LR`?(g=o/(d.getLayout().x+p+m),h=a/(f.depth-1||1),pV(l,function(e){v=(e.getLayout().x+m)*g,_=y===`LR`?(e.depth-1)*h:a-(e.depth-1)*h,e.setLayout({x:_,y:v},!0)})):(y===`TB`||y===`BT`)&&(h=a/(d.getLayout().x+p+m),g=o/(f.depth-1||1),pV(l,function(e){_=(e.getLayout().x+m)*h,v=y===`TB`?(e.depth-1)*g:o-(e.depth-1)*g,e.setLayout({x:_,y:v},!0)}))}}}function gV(e){e.eachSeriesByType(`tree`,function(e){var t=e.getData();t.tree.eachNode(function(e){var n=e.getModel().getModel(`itemStyle`).getItemStyle();F(t.ensureUniqueItemVisual(e.dataIndex,`style`),n)})})}function _V(e){e.registerAction({type:`treeExpandAndCollapse`,event:`treeExpandAndCollapse`,update:`update`},function(e,t){t.eachComponent({mainType:`series`,subType:`tree`,query:e},function(t){var n=e.dataIndex,r=t.getData().tree.getNodeByDataIndex(n);r.isExpand=!r.isExpand})}),e.registerAction({type:`treeRoam`,event:`treeRoam`,update:`none`},function(e,t,n){t.eachComponent({mainType:`series`,subType:`tree`,query:e},function(t){var n=t.coordinateSystem,r=XR(n,e,t.get(`scaleLimit`));t.setCenter(r.center),t.setZoom(r.zoom)})})}function vV(e){e.registerChartView(BB),e.registerSeriesModel(dV),e.registerLayout(mV),e.registerVisual(gV),_V(e)}var yV=[`treemapZoomToNode`,`treemapRender`,`treemapMove`];function bV(e){for(var t=0;t<yV.length;t++)e.registerAction({type:yV[t],update:`updateView`},ac);e.registerAction({type:`treemapRootToNode`,update:`updateView`},function(e,t){t.eachComponent({mainType:`series`,subType:`treemap`,query:e},n);function n(t,n){var r=sV(e,[`treemapZoomToNode`,`treemapRootToNode`],t);if(r){var i=t.getViewRoot();i&&(e.direction=lV(i,r.node)?`rollUp`:`drillDown`),t.resetViewRoot(r.node)}}})}function xV(e){var t=e.getData().tree,n={};t.eachNode(function(t){for(var r=t;r&&r.depth>1;)r=r.parentNode;var i=xC(e.ecModel,r.name||r.dataIndex+``,n);t.setVisual(`decal`,i)})}var SV=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.preventUsingHoverLayer=!0,n}return t.prototype.getInitialData=function(e,t){var n={name:e.name,children:e.data};CV(n);var r=e.levels||[],i=new ex({itemStyle:this.designatedVisualItemStyle={}},this,t);r=e.levels=wV(r,t);var a=R(r||[],function(e){return new ex(e,i,t)},this),o=aV.createTree(n,this,s);function s(e){e.wrapMethod(`getItemModel`,function(e,t){var n=o.getNodeByDataIndex(t);return e.parentModel=(n?a[n.depth]:null)||i,e})}return o.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(e,t,n){var r=this.getData(),i=this.getRawValue(e);return zT(`nameValue`,{name:r.getName(e),value:i})},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments);return n.treeAncestors=uV(this.getData().tree.getNodeByDataIndex(t),this),n.treePathInfo=n.treeAncestors,n},t.prototype.setLayoutInfo=function(e){this.layoutInfo=this.layoutInfo||{},F(this.layoutInfo,e)},t.prototype.mapIdToIndex=function(e){var t=this._idIndexMap;t||(t=this._idIndexMap=K(),this._idIndexMapCount=0);var n=t.get(e);return n??t.set(e,n=this._idIndexMapCount++),n},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;(!e||e!==t&&!t.contains(e))&&(this._viewRoot=t)},t.prototype.enableAriaDecal=function(){xV(this)},t.type=`series.treemap`,t.layoutMode=`box`,t.defaultOption={progressive:0,coordinateSystemUsage:`box`,left:Z.size.l,top:Z.size.xxxl,right:Z.size.l,bottom:Z.size.xxxl,sort:!0,clipWindow:`origin`,squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:`▶`,zoomToNodeRatio:.32*.32,scaleLimit:{max:5,min:.2},roam:!0,roamTrigger:`global`,nodeClick:`zoomToNode`,animation:!0,animationDurationUpdate:900,animationEasing:`quinticInOut`,breadcrumb:{show:!0,height:22,left:`center`,bottom:Z.size.m,emptyItemWidth:25,itemStyle:{color:Z.color.backgroundShade,textStyle:{color:Z.color.secondary}},emphasis:{itemStyle:{color:Z.color.background}}},label:{show:!0,distance:0,padding:5,position:`inside`,color:Z.color.neutral00,overflow:`truncate`},upperLabel:{show:!1,position:[0,`50%`],height:20,overflow:`truncate`,verticalAlign:`middle`},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:Z.color.neutral00,borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,`50%`],overflow:`truncate`,verticalAlign:`middle`}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:`index`,visibleMin:10,childrenVisibleMin:null,levels:[]},t}(oE);function CV(e){var t=0;L(e.children,function(e){CV(e);var n=e.value;B(n)&&(n=n[0]),t+=n});var n=e.value;B(n)&&(n=n[0]),(n==null||isNaN(n))&&(n=t),n<0&&(n=0),B(e.value)?e.value[0]=n:e.value=n}function wV(e,t){var n=$p(t.get(`color`)),r=$p(t.get([`aria`,`decal`,`decals`]));if(n){e||=[];var i,a;L(e,function(e){var t=new ex(e),n=t.get(`color`),r=t.get(`decal`);(t.get([`itemStyle`,`color`])||n&&n!==`none`)&&(i=!0),(t.get([`itemStyle`,`decal`])||r&&r!==`none`)&&(a=!0)});var o=e[0]||={};return i||(o.color=n.slice()),!a&&r&&(o.decal=r.slice()),e}}var TV=8,EV=8,DV=5,OV=function(){function e(e){this.group=new Y,e.add(this.group)}return e.prototype.render=function(e,t,n,r){var i=e.getModel(`breadcrumb`),a=this.group;if(a.removeAll(),!(!i.get(`show`)||!n)){var o=i.getModel(`itemStyle`),s=i.getModel(`emphasis`),c=o.getModel(`textStyle`),l=s.getModel([`itemStyle`,`textStyle`]),u=LS(e,t).refContainer,d={left:i.get(`left`),right:i.get(`right`),top:i.get(`top`),bottom:i.get(`bottom`)},f={emptyItemWidth:i.get(`emptyItemWidth`),totalWidth:0,renderList:[]},p=PS(d,u);this._prepare(n,f,c),this._renderContent(e,f,p,o,s,c,l,r),RS(a,d,u)}},e.prototype._prepare=function(e,t,n){for(var r=e;r;r=r.parentNode){var i=pm(r.getModel().get(`name`),``),a=n.getTextRect(i),o=Math.max(a.width+TV*2,t.emptyItemWidth);t.totalWidth+=o+EV,t.renderList.push({node:r,text:i,width:o})}},e.prototype._renderContent=function(e,t,n,r,i,a,o,s){for(var c=0,l=t.emptyItemWidth,u=e.get([`breadcrumb`,`height`]),d=t.totalWidth,f=t.renderList,p=i.getModel(`itemStyle`).getItemStyle(),m=f.length-1;m>=0;m--){var h=f[m],g=h.node,_=h.width,v=h.text;d>n.width&&(d-=_-l,_=l,v=null);var y=new Sy({shape:{points:kV(c,0,_,u,m===f.length-1,m===0)},style:I(r.getItemStyle(),{lineJoin:`bevel`}),textContent:new a_({style:zb(a,{text:v})}),textConfig:{position:`inside`},z2:10*1e4,onclick:Rs(s,g)});y.disableLabelAnimation=!0,y.getTextContent().ensureState(`emphasis`).style=zb(o,{text:v}),y.ensureState(`emphasis`).style=p,_v(y,i.get(`focus`),i.get(`blurScope`),i.get(`disabled`)),this.group.add(y),AV(y,e,g),c+=_+EV}},e.prototype.remove=function(){this.group.removeAll()},e}();function kV(e,t,n,r,i,a){var o=[[i?e:e-DV,t],[e+n,t],[e+n,t+r],[i?e:e-DV,t+r]];return!a&&o.splice(2,0,[e+n+DV,t+r/2]),!i&&o.push([e,t+r/2]),o}function AV(e,t,n){y_(e).eventData={componentType:`series`,componentSubType:`treemap`,componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:`treemap`,selfType:`breadcrumb`,nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&uV(n,t)}}var jV=function(){function e(){this._storage=[],this._elExistsMap={}}return e.prototype.add=function(e,t,n,r,i){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:n,delay:r,easing:i}),!0)},e.prototype.finished=function(e){return this._finishedCallback=e,this},e.prototype.start=function(){for(var e=this,t=this._storage.length,n=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},r=0,i=this._storage.length;r<i;r++){var a=this._storage[r];a.el.animateTo(a.target,{duration:a.duration,delay:a.delay,easing:a.easing,setToFinal:!0,done:n,aborted:n})}return this},e}();function MV(){return new jV}var NV=Y,PV=e_,FV=3,IV=`label`,LV=`upperLabel`,RV=100,zV=20,BV=30,VV=Zm([[`fill`,`color`],[`stroke`,`strokeColor`],[`lineWidth`,`strokeWidth`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`shadowColor`]]),HV=function(e){var t=VV(e);return t.stroke=t.fill=t.lineWidth=null,t},UV=Cm(),WV=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._state=`ready`,n._storage=GV(),n}return t.prototype.render=function(e,t,n,r){if(!(js(t.findComponents({mainType:`series`,subType:`treemap`,query:r}),e)<0)){this.seriesModel=e,this.api=n,this.ecModel=t;var i=sV(r,[`treemapZoomToNode`,`treemapRootToNode`],e),a=r&&r.type,o=e.layoutInfo,s=!this._oldTree,c=this._storage,l=a===`treemapRootToNode`&&i&&c?{rootNodeGroup:c.nodeGroup[i.node.getRawIndex()],direction:r.direction}:null,u=this._giveContainerGroup(o),d=e.get(`animation`),f=this._doRender(u,e,l);d&&!s&&(!a||a===`treemapZoomToNode`||a===`treemapRootToNode`)?this._doAnimation(u,f,e,l):f.renderFinally(),this._resetController(n),this._renderBreadcrumb(e,n,i)}},t.prototype._giveContainerGroup=function(e){var t=this._containerGroup;return t||(t=this._containerGroup=new NV,this._initEvents(t),this.group.add(t)),t.x=e.x,t.y=e.y,t},t.prototype._doRender=function(e,t,n){var r=t.getData().tree,i=this._oldTree,a=GV(),o=GV(),s=this._storage,c=[];function l(e,r,i,l){return KV(t,o,s,n,a,c,e,r,i,l)}p(r.root?[r.root]:[],i&&i.root?[i.root]:[],e,r===i||!i,0);var u=m(s);if(this._oldTree=r,this._storage=o,this._controllerHost){var d=this.seriesModel.layoutInfo,f=r.root.getLayout();f.width===d.width&&f.height===d.height&&(this._controllerHost.zoom=1)}return{lastsForAnimation:a,willDeleteEls:u,renderFinally:h};function p(e,t,n,r,i){r?(t=e,L(e,function(e,t){!e.isRemoved()&&o(t,t)})):new Ik(t,e,a,a).add(o).update(o).remove(Rs(o,null)).execute();function a(e){return e.getId()}function o(a,o){var s=a==null?null:e[a],c=o==null?null:t[o],u=l(s,c,n,i);u&&p(s&&s.viewChildren||[],c&&c.viewChildren||[],u,r,i+1)}}function m(e){var t=GV();return e&&L(e,function(e,n){var r=t[n];L(e,function(e){e&&(r.push(e),UV(e).willDelete=!0)})}),t}function h(){L(u,function(e){L(e,function(e){e.parent&&e.parent.remove(e)})}),L(c,function(e){e.invisible=!0,e.dirty()})}},t.prototype._doAnimation=function(e,t,n,r){var i=n.get(`animationDurationUpdate`),a=n.get(`animationEasing`),o=(V(i)?0:i)||0,s=(V(a)?null:a)||`cubicOut`,c=MV();L(t.willDeleteEls,function(e,t){L(e,function(e,n){if(!e.invisible){var i=e.parent,a,l=UV(i);if(r&&r.direction===`drillDown`)a=i===r.rootNodeGroup?{shape:{x:0,y:0,width:l.nodeWidth,height:l.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var u=0,d=0;l.willDelete||(u=l.nodeWidth/2,d=l.nodeHeight/2),a=t===`nodeGroup`?{x:u,y:d,style:{opacity:0}}:{shape:{x:u,y:d,width:0,height:0},style:{opacity:0}}}a&&c.add(e,a,o,0,s)}})}),L(this._storage,function(e,n){L(e,function(e,r){var i=t.lastsForAnimation[n][r],a={};i&&(e instanceof Y?i.oldX!=null&&(a.x=e.x,a.y=e.y,e.x=i.oldX,e.y=i.oldY):(i.oldShape&&(a.shape=F({},e.shape),e.setShape(i.oldShape)),i.fadein?(e.setStyle(`opacity`,0),a.style={opacity:1}):e.style.opacity!==1&&(a.style={opacity:1})),c.add(e,a,o,0,s))})},this),this._state=`animating`,c.finished(z(function(){this._state=`ready`,t.renderFinally()},this)).start()},t.prototype._resetController=function(e){var t=this,n=this._controller,r=this._controllerHost;r||=(this._controllerHost={target:this.group},this._controllerHost);var i=this.seriesModel;n||(n=this._controller=new IR(e.getZr()),n.on(`pan`,z(this._onPan,this)),n.on(`zoom`,z(this._onZoom,this))),n.enable(i.get(`roam`),{api:e,zInfo:{component:i},triggerInfo:{roamTrigger:i.get(`roamTrigger`),isInSelf:function(e,n,r){var i=t._containerGroup;return i?i.getBoundingRect().contain(n-i.x,r-i.y):!1}}}),r.zoomLimit=i.get(`scaleLimit`),r.zoom=i.get(`zoom`)},t.prototype._clearController=function(){var e=this._controller;this._controllerHost=null,e&&=(e.dispose(),null)},t.prototype._onPan=function(e){if(this._state!==`animating`&&(Math.abs(e.dx)>FV||Math.abs(e.dy)>FV)){var t=this.seriesModel.getData().tree.root;if(!t)return;var n=t.getLayout();if(!n)return;this.api.dispatchAction({type:`treemapMove`,from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+e.dx,y:n.y+e.dy,width:n.width,height:n.height}})}},t.prototype._onZoom=function(e){var t=e.originX,n=e.originY,r=e.scale;if(this._state!==`animating`){var i=this.seriesModel.getData().tree.root;if(!i)return;var a=i.getLayout();if(!a)return;var o=new Ol(a.x,a.y,a.width,a.height),s=null,c=this._controllerHost;s=c.zoomLimit;var l=c.zoom=c.zoom||1;if(l*=r,s){var u=s.min||0,d=s.max||1/0;l=Math.max(Math.min(d,l),u)}var f=l/c.zoom;c.zoom=l;var p=this.seriesModel.layoutInfo;t-=p.x,n-=p.y;var m=sl();dl(m,m,[-t,-n]),pl(m,m,[f,f]),dl(m,m,[t,n]),o.applyTransform(m),this.api.dispatchAction({type:`treemapRender`,from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:o.x,y:o.y,width:o.width,height:o.height}})}},t.prototype._initEvents=function(e){var t=this;e.on(`click`,function(e){if(t._state===`ready`){var n=t.seriesModel.get(`nodeClick`,!0);if(n){var r=t.findTarget(e.offsetX,e.offsetY);if(r){var i=r.node;if(i.getLayout().isLeafRoot)t._rootToNode(r);else if(n===`zoomToNode`)t._zoomToNode(r);else if(n===`link`){var a=i.hostTree.data.getItemModel(i.dataIndex),o=a.get(`link`,!0),s=a.get(`target`,!0)||`blank`;o&&pS(o,s)}}}}},this)},t.prototype._renderBreadcrumb=function(e,t,n){var r=this;n||(n=e.get(`leafDepth`,!0)==null?this.findTarget(t.getWidth()/2,t.getHeight()/2):{node:e.getViewRoot()},n||={node:e.getData().tree.root}),(this._breadcrumb||=new OV(this.group)).render(e,t,n.node,function(t){r._state!==`animating`&&(lV(e.getViewRoot(),t)?r._rootToNode({node:t}):r._zoomToNode({node:t}))})},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=GV(),this._state=`ready`,this._breadcrumb&&this._breadcrumb.remove()},t.prototype.dispose=function(){this._clearController()},t.prototype._zoomToNode=function(e){this.api.dispatchAction({type:`treemapZoomToNode`,from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype._rootToNode=function(e){this.api.dispatchAction({type:`treemapRootToNode`,from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype.findTarget=function(e,t){var n;return this.seriesModel.getViewRoot().eachNode({attr:`viewChildren`,order:`preorder`},function(r){var i=this._storage.background[r.getRawIndex()];if(i){var a=i.transformCoordToLocal(e,t),o=i.shape;if(o.x<=a[0]&&a[0]<=o.x+o.width&&o.y<=a[1]&&a[1]<=o.y+o.height)n={node:r,offsetX:a[0],offsetY:a[1]};else return!1}},this),n},t.type=`treemap`,t}(yE);function GV(){return{nodeGroup:[],background:[],content:[]}}function KV(e,t,n,r,i,a,o,s,c,l){if(!o)return;var u=o.getLayout(),d=e.getData(),f=o.getModel();if(d.setItemGraphicEl(o.dataIndex,null),!u||!u.isInView)return;var p=u.width,m=u.height,h=u.borderWidth,g=u.invisible,_=o.getRawIndex(),v=s&&s.getRawIndex(),y=o.viewChildren,b=u.upperHeight,x=y&&y.length,S=f.getModel(`itemStyle`),C=f.getModel([`emphasis`,`itemStyle`]),w=f.getModel([`blur`,`itemStyle`]),T=f.getModel([`select`,`itemStyle`]),E=S.get(`borderRadius`)||0,D=le(`nodeGroup`,NV);if(!D)return;if(c.add(D),D.x=u.x||0,D.y=u.y||0,D.markRedraw(),UV(D).nodeWidth=p,UV(D).nodeHeight=m,u.isAboveViewRoot)return D;var O=le(`background`,PV,l,zV);O&&ie(D,O,x&&u.upperLabelHeight);var k=f.getModel(`emphasis`),A=k.get(`focus`),j=k.get(`blurScope`),ee=k.get(`disabled`),te=A===`ancestor`?o.getAncestorsIndices():A===`descendant`?o.getDescendantIndices():A;if(x)Cv(D)&&Sv(D,!1),O&&(Sv(O,!ee),d.setItemGraphicEl(o.dataIndex,O),vv(O,te,j));else{var ne=le(`content`,PV,l,BV);ne&&ae(D,ne),O.disableMorphing=!0,O&&Cv(O)&&Sv(O,!1),Sv(D,!ee),d.setItemGraphicEl(o.dataIndex,D);var re=f.getShallow(`cursor`);re&&ne.attr(`cursor`,re),vv(D,te,j)}return D;function ie(t,n,r){var i=y_(n);if(i.dataIndex=o.dataIndex,i.seriesIndex=e.seriesIndex,n.setShape({x:0,y:0,width:p,height:m,r:E}),g)oe(n);else{n.invisible=!1;var a=o.getVisual(`style`),s=a.stroke,c=HV(S);c.fill=s;var l=VV(C);l.fill=C.get(`borderColor`);var u=VV(w);u.fill=w.get(`borderColor`);var d=VV(T);if(d.fill=T.get(`borderColor`),r){var f=p-2*h;se(n,s,a.opacity,{x:h,y:0,width:f,height:b})}else n.removeTextContent();n.setStyle(c),n.ensureState(`emphasis`).style=l,n.ensureState(`blur`).style=u,n.ensureState(`select`).style=d,Y_(n)}t.add(n)}function ae(t,n){var r=y_(n);r.dataIndex=o.dataIndex,r.seriesIndex=e.seriesIndex;var i=Math.max(p-2*h,0),a=Math.max(m-2*h,0);if(n.culling=!0,n.setShape({x:h,y:h,width:i,height:a,r:E}),g)oe(n);else{n.invisible=!1;var s=o.getVisual(`style`),c=s.fill,l=HV(S);l.fill=c,l.decal=s.decal;var u=VV(C),d=VV(w),f=VV(T);se(n,c,s.opacity,null),n.setStyle(l),n.ensureState(`emphasis`).style=u,n.ensureState(`blur`).style=d,n.ensureState(`select`).style=f,Y_(n)}t.add(n)}function oe(e){!e.invisible&&a.push(e)}function se(t,n,r,i){var a=f.getModel(i?LV:IV),s=pm(f.get(`name`),null),c=a.getShallow(`show`);Lb(t,Rb(f,i?LV:IV),{defaultText:c?s:null,inheritColor:n,defaultOpacity:r,labelFetcher:e,labelDataIndex:o.dataIndex});var l=t.getTextContent();if(l){var d=l.style,p=Xs(d.padding||0);i&&(t.setTextConfig({layoutRect:i}),l.disableLabelLayout=!0),l.beforeUpdate=function(){var e=Math.max((i?i.width:t.shape.width)-p[1]-p[3],0),n=Math.max((i?i.height:t.shape.height)-p[0]-p[2],0);(d.width!==e||d.height!==n)&&l.setStyle({width:e,height:n})},d.truncateMinChar=2,d.lineOverflow=`truncate`,ce(d,i,u);var m=l.getState(`emphasis`);ce(m?m.style:null,i,u)}}function ce(t,n,r){var i=t?t.text:null;if(!n&&r.isLeafRoot&&i!=null){var a=e.get(`drillDownIcon`,!0);t.text=a?a+` `+i:i}}function le(e,r,a,o){var s=v!=null&&n[e][v],c=i[e];return s?(n[e][v]=null,ue(c,s)):g||(s=new r,s instanceof Mh&&(s.z2=qV(a,o)),de(c,s)),t[e][_]=s}function ue(e,t){var n=e[_]={};t instanceof NV?(n.oldX=t.x,n.oldY=t.y):n.oldShape=F({},t.shape)}function de(e,t){var n=e[_]={},a=o.parentNode,s=t instanceof Y;if(a&&(!r||r.direction===`drillDown`)){var c=0,l=0,u=i.background[a.getRawIndex()];!r&&u&&u.oldShape&&(c=u.oldShape.width,l=u.oldShape.height),s?(n.oldX=0,n.oldY=l):n.oldShape={x:c,y:l,width:0,height:0}}n.fadein=!s}}function qV(e,t){return e*RV+t}var JV=L,YV=U,XV=-1,ZV=function(){function e(t){var n=t.mappingMethod,r=t.type,i=this.option=P(t);this.type=r,this.mappingMethod=n,this._normalizeData=lH[n];var a=e.visualHandlers[r];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[n],n===`piecewise`?(eH(i),QV(i)):n===`category`?i.categories?$V(i):eH(i,!0):(G(n!==`linear`||i.dataExtent),eH(i))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return z(this._normalizeData,this)},e.listVisualTypes=function(){return Ls(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(e,t,n){U(e)?L(e,t,n):t.call(n,e)},e.mapVisual=function(t,n,r){var i,a=B(t)?[]:U(t)?{}:(i=!0,null);return e.eachVisual(t,function(e,t){var o=n.call(r,e,t);i?a=o:a[t]=o}),a},e.retrieveVisuals=function(t){var n={},r;return t&&JV(e.visualHandlers,function(e,i){t.hasOwnProperty(i)&&(n[i]=t[i],r=!0)}),r?n:null},e.prepareVisualTypes=function(e){if(B(e))e=e.slice();else if(YV(e)){var t=[];JV(e,function(e,n){t.push(n)}),e=t}else return[];return e.sort(function(e,t){return t===`color`&&e!==`color`&&e.indexOf(`color`)===0?1:-1}),e},e.dependsOn=function(e,t){return t===`color`?!!(e&&e.indexOf(t)===0):e===t},e.findPieceIndex=function(e,t,n){for(var r,i=1/0,a=0,o=t.length;a<o;a++){var s=t[a].value;if(s!=null){if(s===e||H(s)&&s===e+``)return a;n&&d(s,a)}}for(var a=0,o=t.length;a<o;a++){var c=t[a],l=c.interval,u=c.close;if(l){if(l[0]===-1/0){if(uH(u[1],e,l[1]))return a}else if(l[1]===1/0){if(uH(u[0],l[0],e))return a}else if(uH(u[0],l[0],e)&&uH(u[1],e,l[1]))return a;n&&d(l[0],a),n&&d(l[1],a)}}if(n)return e===1/0?t.length-1:e===-1/0?0:r;function d(t,n){var a=Math.abs(t-e);a<i&&(i=a,r=n)}},e.visualHandlers={color:{applyVisual:rH(`color`),getColorMapper:function(){var e=this.option;return z(e.mappingMethod===`category`?function(e,t){return!t&&(e=this._normalizeData(e)),iH.call(this,e)}:function(t,n,r){var i=!!r;return!n&&(t=this._normalizeData(t)),r=Zu(t,e.parsedVisual,r),i?r:td(r,`rgba`)},this)},_normalizedToVisual:{linear:function(e){return td(Zu(e,this.option.parsedVisual),`rgba`)},category:iH,piecewise:function(e,t){var n=sH.call(this,t);return n??=td(Zu(e,this.option.parsedVisual),`rgba`),n},fixed:aH}},colorHue:tH(function(e,t){return $u(e,t)}),colorSaturation:tH(function(e,t){return $u(e,null,t)}),colorLightness:tH(function(e,t){return $u(e,null,null,t)}),colorAlpha:tH(function(e,t){return ed(e,t)}),decal:{applyVisual:rH(`decal`),_normalizedToVisual:{linear:null,category:iH,piecewise:null,fixed:null}},opacity:{applyVisual:rH(`opacity`),_normalizedToVisual:oH([0,1])},liftZ:{applyVisual:rH(`liftZ`),_normalizedToVisual:{linear:aH,category:aH,piecewise:aH,fixed:aH}},symbol:{applyVisual:function(e,t,n){n(`symbol`,this.mapValueToVisual(e))},_normalizedToVisual:{linear:nH,category:iH,piecewise:function(e,t){var n=sH.call(this,t);return n??=nH.call(this,e),n},fixed:aH}},symbolSize:{applyVisual:rH(`symbolSize`),_normalizedToVisual:oH([0,1])}},e}();function QV(e){var t=e.pieceList;e.hasSpecialVisual=!1,L(t,function(t,n){t.originIndex=n,t.visual!=null&&(e.hasSpecialVisual=!0)})}function $V(e){var t=e.categories,n=e.categoryMap={},r=e.visual;if(JV(t,function(e,t){n[e]=t}),!B(r)){var i=[];U(r)?JV(r,function(e,t){var r=n[t];i[r??XV]=e}):i[XV]=r,r=cH(e,i)}for(var a=t.length-1;a>=0;a--)r[a]??(delete n[t[a]],t.pop())}function eH(e,t){var n=e.visual,r=[];U(n)?JV(n,function(e){r.push(e)}):n!=null&&r.push(n),!t&&r.length===1&&!{color:1,symbol:1}.hasOwnProperty(e.type)&&(r[1]=r[0]),cH(e,r)}function tH(e){return{applyVisual:function(t,n,r){var i=this.mapValueToVisual(t);r(`color`,e(n(`color`),i))},_normalizedToVisual:oH([0,1])}}function nH(e){var t=this.option.visual;return t[Math.round(Sp(e,[0,1],[0,t.length-1],!0))]||{}}function rH(e){return function(t,n,r){r(e,this.mapValueToVisual(t))}}function iH(e){var t=this.option.visual;return t[this.option.loop&&e!==XV?e%t.length:e]}function aH(){return this.option.visual[0]}function oH(e){return{linear:function(t){return Sp(t,e,this.option.visual,!0)},category:iH,piecewise:function(t,n){var r=sH.call(this,n);return r??=Sp(t,e,this.option.visual,!0),r},fixed:aH}}function sH(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var r=n[ZV.findPieceIndex(e,n)];if(r&&r.visual)return r.visual[this.type]}}function cH(e,t){return e.visual=t,e.type===`color`&&(e.parsedVisual=R(t,function(e){var t=qu(e);return!t&&process.env.NODE_ENV!==`production`&&Wp(`'`+e+`' is an illegal color, fallback to '#000000'`,!0),t||[0,0,0,1]})),t}var lH={linear:function(e){return Sp(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=ZV.findPieceIndex(e,t,!0);if(n!=null)return Sp(n,[0,t.length-1],[0,1],!0)},category:function(e){return(this.option.categories?this.option.categoryMap[e]:e)??XV},fixed:ac};function uH(e,t,n){return e?t<=n:t<n}var dH=`itemStyle`,fH=Cm(),pH={seriesType:`treemap`,reset:function(e){var t=e.getData().tree.root;t.isRemoved()||mH(t,{},e.getViewRoot().getAncestors(),e)}};function mH(e,t,n,r){var i=e.getModel(),a=e.getLayout(),o=e.hostTree.data;if(!(!a||a.invisible||!a.isInView)){var s=i.getModel(dH),c=hH(s,t,r),l=o.ensureUniqueItemVisual(e.dataIndex,`style`),u=s.get(`borderColor`),d=s.get(`borderColorSaturation`),f;d!=null&&(f=gH(c),u=_H(d,f)),l.stroke=u;var p=e.viewChildren;if(!p||!p.length)f=gH(c),l.fill=f;else{var m=yH(e,i,a,s,c,p);L(p,function(e,t){(e.depth>=n.length||e===n[e.depth])&&mH(e,xH(i,c,e,t,m,r),n,r)})}}}function hH(e,t,n){var r=F({},t),i=n.designatedVisualItemStyle;return L([`color`,`colorAlpha`,`colorSaturation`],function(n){i[n]=t[n];var a=e.get(n);i[n]=null,a!=null&&(r[n]=a)}),r}function gH(e){var t=vH(e,`color`);if(t){var n=vH(e,`colorAlpha`),r=vH(e,`colorSaturation`);return r&&(t=$u(t,null,null,r)),n&&(t=ed(t,n)),t}}function _H(e,t){return t==null?null:$u(t,null,null,e)}function vH(e,t){var n=e[t];if(n!=null&&n!==`none`)return n}function yH(e,t,n,r,i,a){if(!(!a||!a.length)){var o=bH(t,`color`)||i.color!=null&&i.color!==`none`&&(bH(t,`colorAlpha`)||bH(t,`colorSaturation`));if(o){var s=t.get(`visualMin`),c=t.get(`visualMax`),l=n.dataExtent.slice();s!=null&&s<l[0]&&(l[0]=s),c!=null&&c>l[1]&&(l[1]=c);var u=t.get(`colorMappingBy`),d={type:o.name,dataExtent:l,visual:o.range};d.type===`color`&&(u===`index`||u===`id`)?(d.mappingMethod=`category`,d.loop=!0):d.mappingMethod=`linear`;var f=new ZV(d);return fH(f).drColorMappingBy=u,f}}}function bH(e,t){var n=e.get(t);return B(n)&&n.length?{name:t,range:n}:null}function xH(e,t,n,r,i,a){var o=F({},t);if(i){var s=i.type,c=s===`color`&&fH(i).drColorMappingBy,l=c===`index`?r:c===`id`?a.mapIdToIndex(n.getId()):n.getValue(e.get(`visualDimension`));o[s]=i.mapValueToVisual(l)}return o}var SH=Math.max,CH=Math.min,wH=qs,TH=L,EH=[`itemStyle`,`borderWidth`],DH=[`itemStyle`,`gapWidth`],OH=[`upperLabel`,`show`],kH=[`upperLabel`,`height`],AH={seriesType:`treemap`,reset:function(e,t,n,r){var i=e.option,a=LS(e,n).refContainer,o=PS(e.getBoxLayoutParams(),a),s=i.size||[],c=X(wH(o.width,s[0]),a.width),l=X(wH(o.height,s[1]),a.height),u=r&&r.type,d=sV(r,[`treemapZoomToNode`,`treemapRootToNode`],e),f=u===`treemapRender`||u===`treemapMove`?r.rootRect:null,p=e.getViewRoot(),m=cV(p);if(u!==`treemapMove`){var h=u===`treemapZoomToNode`?RH(e,d,p,c,l):f?[f.width,f.height]:[c,l],g=i.sort;g&&g!==`asc`&&g!==`desc`&&(g=`desc`);var _={squareRatio:i.squareRatio,sort:g,leafDepth:i.leafDepth};p.hostTree.clearLayouts();var v={x:0,y:0,width:h[0],height:h[1],area:h[0]*h[1]};p.setLayout(v),jH(p,_,!1,0),v=p.getLayout(),TH(m,function(e,t){var n=(m[t+1]||p).getValue();e.setLayout(F({dataExtent:[n,n],borderWidth:0,upperHeight:0},v))})}var y=e.getData().tree.root;y.setLayout(zH(o,f,d),!0),e.setLayoutInfo(o),BH(y,new Ol(-o.x,-o.y,n.getWidth(),n.getHeight()),m,p,0)}};function jH(e,t,n,r){var i,a;if(!e.isRemoved()){var o=e.getLayout();i=o.width,a=o.height;var s=e.getModel(),c=s.get(EH),l=s.get(DH)/2,u=VH(s),d=Math.max(c,u),f=c-l,p=d-l;e.setLayout({borderWidth:c,upperHeight:d,upperLabelHeight:u},!0),i=SH(i-2*f,0),a=SH(a-f-p,0);var m=i*a,h=MH(e,s,m,t,n,r);if(h.length){var g={x:f,y:p,width:i,height:a},_=CH(i,a),v=1/0,y=[];y.area=0;for(var b=0,x=h.length;b<x;){var S=h[b];y.push(S),y.area+=S.getLayout().area;var C=IH(y,_,t.squareRatio);C<=v?(b++,v=C):(y.area-=y.pop().getLayout().area,LH(y,_,g,l,!1),_=CH(g.width,g.height),y.length=y.area=0,v=1/0)}if(y.length&&LH(y,_,g,l,!0),!n){var w=s.get(`childrenVisibleMin`);w!=null&&m<w&&(n=!0)}for(var b=0,x=h.length;b<x;b++)jH(h[b],t,n,r+1)}}}function MH(e,t,n,r,i,a){var o=e.children||[],s=r.sort;s!==`asc`&&s!==`desc`&&(s=null);var c=r.leafDepth!=null&&r.leafDepth<=a;if(i&&!c)return e.viewChildren=[];o=Fs(o,function(e){return!e.isRemoved()}),PH(o,s);var l=FH(t,o,s);if(l.sum===0||(l.sum=NH(t,n,l.sum,s,o),l.sum===0))return e.viewChildren=[];for(var u=0,d=o.length;u<d;u++){var f=o[u].getValue()/l.sum*n;o[u].setLayout({area:f})}return c&&(o.length&&e.setLayout({isLeafRoot:!0},!0),o.length=0),e.viewChildren=o,e.setLayout({dataExtent:l.dataExtent},!0),o}function NH(e,t,n,r,i){if(!r)return n;for(var a=e.get(`visibleMin`),o=i.length,s=o,c=o-1;c>=0;c--){var l=i[r===`asc`?o-c-1:c].getValue();l/n*t<a&&(s=c,n-=l)}return r===`asc`?i.splice(0,o-s):i.splice(s,o-s),n}function PH(e,t){return t&&e.sort(function(e,n){var r=t===`asc`?e.getValue()-n.getValue():n.getValue()-e.getValue();return r===0?t===`asc`?e.dataIndex-n.dataIndex:n.dataIndex-e.dataIndex:r}),e}function FH(e,t,n){for(var r=0,i=0,a=t.length;i<a;i++)r+=t[i].getValue();var o=e.get(`visualDimension`),s;return!t||!t.length?s=[NaN,NaN]:o===`value`&&n?(s=[t[t.length-1].getValue(),t[0].getValue()],n===`asc`&&s.reverse()):(s=[1/0,-1/0],TH(t,function(e){var t=e.getValue(o);t<s[0]&&(s[0]=t),t>s[1]&&(s[1]=t)})),{sum:r,dataExtent:s}}function IH(e,t,n){for(var r=0,i=1/0,a=0,o=void 0,s=e.length;a<s;a++)o=e[a].getLayout().area,o&&(o<i&&(i=o),o>r&&(r=o));var c=e.area*e.area,l=t*t*n;return c?SH(l*r/c,c/(l*i)):1/0}function LH(e,t,n,r,i){var a=t===n.width?0:1,o=1-a,s=[`x`,`y`],c=[`width`,`height`],l=n[s[a]],u=t?e.area/t:0;(i||u>n[c[o]])&&(u=n[c[o]]);for(var d=0,f=e.length;d<f;d++){var p=e[d],m={},h=u?p.getLayout().area/u:0,g=m[c[o]]=SH(u-2*r,0),_=n[s[a]]+n[c[a]]-l,v=d===f-1||_<h?_:h,y=m[c[a]]=SH(v-2*r,0);m[s[o]]=n[s[o]]+CH(r,g/2),m[s[a]]=l+CH(r,y/2),l+=v,p.setLayout(m,!0)}n[s[o]]+=u,n[c[o]]-=u}function RH(e,t,n,r,i){var a=(t||{}).node,o=[r,i];if(!a||a===n)return o;for(var s,c=r*i,l=c*e.option.zoomToNodeRatio;s=a.parentNode;){for(var u=0,d=s.children,f=0,p=d.length;f<p;f++)u+=d[f].getValue();var m=a.getValue();if(m===0)return o;l*=u/m;var h=s.getModel(),g=h.get(EH),_=Math.max(g,VH(h));l+=4*g*g+(3*g+_)*l**.5,l>9007199254740991&&(l=9007199254740991),a=s}l<c&&(l=c);var v=(l/c)**.5;return[r*v,i*v]}function zH(e,t,n){if(t)return{x:t.x,y:t.y};var r={x:0,y:0};if(!n)return r;var i=n.node,a=i.getLayout();if(!a)return r;for(var o=[a.width/2,a.height/2],s=i;s;){var c=s.getLayout();o[0]+=c.x,o[1]+=c.y,s=s.parentNode}return{x:e.width/2-o[0],y:e.height/2-o[1]}}function BH(e,t,n,r,i){var a=e.getLayout(),o=n[i],s=o&&o===e;if(!(o&&!s||i===n.length&&e!==r)){e.setLayout({isInView:!0,invisible:!s&&!t.intersect(a),isAboveViewRoot:s},!0);var c=new Ol(t.x-a.x,t.y-a.y,t.width,t.height);TH(e.viewChildren||[],function(e){BH(e,c,n,r,i+1)})}}function VH(e){return e.get(OH)?e.get(kH):0}function HH(e){e.registerSeriesModel(SV),e.registerChartView(WV),e.registerVisual(pH),e.registerLayout(AH),bV(e)}function UH(e){var t=e.findComponents({mainType:`legend`});!t||!t.length||e.eachSeriesByType(`graph`,function(e){var n=e.getCategoriesData(),r=e.getGraph().data,i=n.mapArray(n.getName);r.filterSelf(function(e){var n=r.getItemModel(e).getShallow(`category`);if(n!=null){Bs(n)&&(n=i[n]);for(var a=0;a<t.length;a++)if(!t[a].isSelected(n))return!1}return!0})})}function WH(e){var t={};e.eachSeriesByType(`graph`,function(e){var n=e.getCategoriesData(),r=e.getData(),i={};n.each(function(r){var a=n.getName(r);i[`ec-`+a]=r;var o=n.getItemModel(r),s=o.getModel(`itemStyle`).getItemStyle();s.fill||=e.getColorFromPalette(a,t),n.setItemVisual(r,`style`,s);for(var c=[`symbol`,`symbolSize`,`symbolKeepAspect`],l=0;l<c.length;l++){var u=o.getShallow(c[l],!0);u!=null&&n.setItemVisual(r,c[l],u)}}),n.count()&&r.each(function(e){var t=r.getItemModel(e).getShallow(`category`);if(t!=null){H(t)&&(t=i[`ec-`+t]);var a=n.getItemVisual(t,`style`);F(r.ensureUniqueItemVisual(e,`style`),a);for(var o=[`symbol`,`symbolSize`,`symbolKeepAspect`],s=0;s<o.length;s++)r.setItemVisual(e,o[s],n.getItemVisual(t,o[s]))}})})}function GH(e){return e instanceof Array||(e=[e,e]),e}function KH(e){e.eachSeriesByType(`graph`,function(e){var t=e.getGraph(),n=e.getEdgeData(),r=GH(e.get(`edgeSymbol`)),i=GH(e.get(`edgeSymbolSize`));n.setVisual(`fromSymbol`,r&&r[0]),n.setVisual(`toSymbol`,r&&r[1]),n.setVisual(`fromSymbolSize`,i&&i[0]),n.setVisual(`toSymbolSize`,i&&i[1]),n.setVisual(`style`,e.getModel(`lineStyle`).getLineStyle()),n.each(function(e){var r=n.getItemModel(e),i=t.getEdgeByIndex(e),a=GH(r.getShallow(`symbol`,!0)),o=GH(r.getShallow(`symbolSize`,!0)),s=r.getModel(`lineStyle`).getLineStyle(),c=n.ensureUniqueItemVisual(e,`style`);switch(F(c,s),c.stroke){case`source`:var l=i.node1.getVisual(`style`);c.stroke=l&&l.fill;break;case`target`:var l=i.node2.getVisual(`style`);c.stroke=l&&l.fill;break}a[0]&&i.setVisual(`fromSymbol`,a[0]),a[1]&&i.setVisual(`toSymbol`,a[1]),o[0]&&i.setVisual(`fromSymbolSize`,o[0]),o[1]&&i.setVisual(`toSymbolSize`,o[1])})})}var qH=`-->`,JH=function(e){return e.get(`autoCurveness`)||null},YH=function(e,t){var n=JH(e),r=20,i=[];if(Bs(n))r=n;else if(B(n)){e.__curvenessList=n;return}t>r&&(r=t);var a=r%2?r+2:r+3;i=[];for(var o=0;o<a;o++)i.push((o%2?o+1:o)/10*(o%2?-1:1));e.__curvenessList=i},XH=function(e,t,n){var r=[e.id,e.dataIndex].join(`.`),i=[t.id,t.dataIndex].join(`.`);return[n.uid,r,i].join(qH)},ZH=function(e){var t=e.split(qH);return[t[0],t[2],t[1]].join(qH)},QH=function(e,t){var n=XH(e.node1,e.node2,t);return t.__edgeMap[n]},$H=function(e,t){return eU(XH(e.node1,e.node2,t),t)+eU(XH(e.node2,e.node1,t),t)},eU=function(e,t){var n=t.__edgeMap;return n[e]?n[e].length:0};function tU(e){JH(e)&&(e.__curvenessList=[],e.__edgeMap={},YH(e))}function nU(e,t,n,r){if(JH(n)){var i=XH(e,t,n),a=n.__edgeMap,o=a[ZH(i)];a[i]&&!o?a[i].isForward=!0:o&&a[i]&&(o.isForward=!0,a[i].isForward=!1),a[i]=a[i]||[],a[i].push(r)}}function rU(e,t,n,r){var i=JH(t),a=B(i);if(!i)return null;var o=QH(e,t);if(!o)return null;for(var s=-1,c=0;c<o.length;c++)if(o[c]===n){s=c;break}var l=$H(e,t);YH(t,l),e.lineStyle=e.lineStyle||{};var u=XH(e.node1,e.node2,t),d=t.__curvenessList,f=a||l%2?0:1;if(o.isForward)return d[f+s];var p=eU(ZH(u),t),m=d[s+p+f];return r?a?i&&i[0]===0?(p+f)%2?m:-m:((p%2?0:1)+f)%2?m:-m:(p+f)%2?m:-m:d[s+p+f]}function iU(e){var t=e.coordinateSystem;if(!(t&&t.type!==`view`)){var n=e.getGraph();n.eachNode(function(e){var t=e.getModel();e.setLayout([+t.get(`x`),+t.get(`y`)])}),aU(n,e)}}function aU(e,t){e.eachEdge(function(e,n){var r=Js(e.getModel().get([`lineStyle`,`curveness`]),-rU(e,t,n,!0),0),i=dc(e.node1.getLayout()),a=dc(e.node2.getLayout()),o=[i,a];+r&&o.push([(i[0]+a[0])/2-(i[1]-a[1])*r,(i[1]+a[1])/2-(a[0]-i[0])*r]),e.setLayout(o)})}function oU(e,t){e.eachSeriesByType(`graph`,function(e){var t=e.get(`layout`),n=e.coordinateSystem;if(n&&n.type!==`view`){var r=e.getData(),i=[];L(n.dimensions,function(e){i=i.concat(r.mapDimensionsAll(e))});for(var a=0;a<r.count();a++){for(var o=[],s=!1,c=0;c<i.length;c++){var l=r.get(i[c],a);isNaN(l)||(s=!0),o.push(l)}s?r.setItemLayout(a,n.dataToPoint(o)):r.setItemLayout(a,[NaN,NaN])}aU(r.graph,e)}else (!t||t===`none`)&&iU(e)})}function sU(e){var t=e.coordinateSystem;if(t.type!==`view`)return 1;var n=e.option.nodeScaleRatio,r=t.scaleX;return((t.getZoom()-1)*n+1)/r}function cU(e){var t=e.getVisual(`symbolSize`);return t instanceof Array&&(t=(t[0]+t[1])/2),+t}var lU=Math.PI,uU=[];function dU(e,t,n,r){var i=e.coordinateSystem;if(!(i&&i.type!==`view`)){var a=i.getBoundingRect(),o=e.getData(),s=o.graph,c=a.width/2+a.x,l=a.height/2+a.y,u=Math.min(a.width,a.height)/2,d=o.count();if(o.setLayout({cx:c,cy:l}),d){if(n){var f=i.pointToData(r),p=f[0],m=f[1],h=[p-c,m-l];yc(h,h),vc(h,h,u),n.setLayout([c+h[0],l+h[1]],!0),pU(n,e.get([`circular`,`rotateLabel`]),c,l)}fU[t](e,s,o,u,c,l,d),s.eachEdge(function(t,n){var r=Js(t.getModel().get([`lineStyle`,`curveness`]),rU(t,e,n),0),i=dc(t.node1.getLayout()),a=dc(t.node2.getLayout()),o,s=(i[0]+a[0])/2,u=(i[1]+a[1])/2;+r&&(r*=3,o=[c*r+s*(1-r),l*r+u*(1-r)]),t.setLayout([i,a,o])})}}}var fU={value:function(e,t,n,r,i,a,o){var s=0,c=n.getSum(`value`),l=Math.PI*2/(c||o);t.eachNode(function(e){var t=e.getValue(`value`),n=l*(c?t:1)/2;s+=n,e.setLayout([r*Math.cos(s)+i,r*Math.sin(s)+a]),s+=n})},symbolSize:function(e,t,n,r,i,a,o){var s=0;uU.length=o;var c=sU(e);t.eachNode(function(e){var t=cU(e);isNaN(t)&&(t=2),t<0&&(t=0),t*=c;var n=Math.asin(t/2/r);isNaN(n)&&(n=lU/2),uU[e.dataIndex]=n,s+=n*2});var l=(2*lU-s)/o/2,u=0;t.eachNode(function(e){var t=l+uU[e.dataIndex];u+=t,(!e.getLayout()||!e.getLayout().fixed)&&e.setLayout([r*Math.cos(u)+i,r*Math.sin(u)+a]),u+=t})}};function pU(e,t,n,r){var i=e.getGraphicEl();if(i){var a=e.getModel().get([`label`,`rotate`])||0,o=i.getSymbolPath();if(t){var s=e.getLayout(),c=Math.atan2(s[1]-r,s[0]-n);c<0&&(c=Math.PI*2+c);var l=s[0]<n;l&&(c-=Math.PI);var u=l?`left`:`right`;o.setTextConfig({rotation:-c,position:u,origin:`center`});var d=o.ensureState(`emphasis`);F(d.textConfig||={},{position:u})}else o.setTextConfig({rotation:a*=Math.PI/180})}}function mU(e){e.eachSeriesByType(`graph`,function(e){e.get(`layout`)===`circular`&&dU(e,`symbolSize`)})}var hU=mc;function gU(e,t,n){for(var r=e,i=t,a=n.rect,o=a.width,s=a.height,c=[a.x+o/2,a.y+s/2],l=n.gravity==null?.1:n.gravity,u=0;u<r.length;u++){var d=r[u];d.p||=lc(o*(Math.random()-.5)+c[0],s*(Math.random()-.5)+c[1]),d.pp=dc(d.p),d.edges=null}var f=n.friction==null?.6:n.friction,p=f,m,h;return{warmUp:function(){p=f*.8},setFixed:function(e){r[e].fixed=!0},setUnfixed:function(e){r[e].fixed=!1},beforeStep:function(e){m=e},afterStep:function(e){h=e},step:function(e){m&&m(r,i);for(var t=[],n=r.length,a=0;a<i.length;a++){var o=i[a];if(!o.ignoreForceLayout){var s=o.n1,u=o.n2;hc(t,u.p,s.p);var d=gc(t)-o.d,f=u.w/(s.w+u.w);isNaN(f)&&(f=0),yc(t,t),!s.fixed&&hU(s.p,s.p,t,f*d*p),!u.fixed&&hU(u.p,u.p,t,-(1-f)*d*p)}}for(var a=0;a<n;a++){var g=r[a];g.fixed||(hc(t,c,g.p),hU(g.p,g.p,t,l*p))}for(var a=0;a<n;a++)for(var s=r[a],_=a+1;_<n;_++){var u=r[_];hc(t,u.p,s.p);var d=gc(t);d===0&&(fc(t,Math.random()-.5,Math.random()-.5),d=1);var v=(s.rep+u.rep)/d/d;!s.fixed&&hU(s.pp,s.pp,t,v),!u.fixed&&hU(u.pp,u.pp,t,-v)}for(var y=[],a=0;a<n;a++){var g=r[a];g.fixed||(hc(y,g.p,g.pp),hU(g.p,g.p,y,p),uc(g.pp,g.p))}p*=.992;var b=p<.01;h&&h(r,i,b),e&&e(b)}}}function _U(e){e.eachSeriesByType(`graph`,function(e){var t=e.coordinateSystem;if(!(t&&t.type!==`view`))if(e.get(`layout`)===`force`){var n=e.preservedPoints||{},r=e.getGraph(),i=r.data,a=r.edgeData,o=e.getModel(`force`),s=o.get(`initLayout`);e.preservedPoints?i.each(function(e){var t=i.getId(e);i.setItemLayout(e,n[t]||[NaN,NaN])}):!s||s===`none`?iU(e):s===`circular`&&dU(e,`value`);var c=i.getDataExtent(`value`),l=a.getDataExtent(`value`),u=o.get(`repulsion`),d=o.get(`edgeLength`),f=B(u)?u:[u,u],p=B(d)?d:[d,d];p=[p[1],p[0]];var m=i.mapArray(`value`,function(e,t){var n=i.getItemLayout(t),r=Sp(e,c,f);return isNaN(r)&&(r=(f[0]+f[1])/2),{w:r,rep:r,fixed:i.getItemModel(t).get(`fixed`),p:!n||isNaN(n[0])||isNaN(n[1])?null:n}}),h=gU(m,a.mapArray(`value`,function(t,n){var i=r.getEdgeByIndex(n),a=Sp(t,l,p);isNaN(a)&&(a=(p[0]+p[1])/2);var o=i.getModel(),s=Js(i.getModel().get([`lineStyle`,`curveness`]),-rU(i,e,n,!0),0);return{n1:m[i.node1.dataIndex],n2:m[i.node2.dataIndex],d:a,curveness:s,ignoreForceLayout:o.get(`ignoreForceLayout`)}}),{rect:t.getBoundingRect(),gravity:o.get(`gravity`),friction:o.get(`friction`)});h.beforeStep(function(e,t){for(var n=0,i=e.length;n<i;n++)e[n].fixed&&uc(e[n].p,r.getNodeByIndex(n).getLayout())}),h.afterStep(function(e,t,a){for(var o=0,s=e.length;o<s;o++)e[o].fixed||r.getNodeByIndex(o).setLayout(e[o].p),n[i.getId(o)]=e[o].p;for(var o=0,s=t.length;o<s;o++){var c=t[o],l=r.getEdgeByIndex(o),u=c.n1.p,d=c.n2.p,f=l.getLayout();f=f?f.slice():[],f[0]=f[0]||[],f[1]=f[1]||[],uc(f[0],u),uc(f[1],d),+c.curveness&&(f[2]=[(u[0]+d[0])/2-(u[1]-d[1])*c.curveness,(u[1]+d[1])/2-(d[0]-u[0])*c.curveness]),l.setLayout(f)}}),e.forceLayout=h,e.preservedPoints=n,h.step()}else e.forceLayout=null})}function vU(e,t,n){var r=LS(e,t);return FS(e,PS(F(e.getBoxLayoutParams(),{aspect:n}),r.refContainer),n)}function yU(e,t){var n=[];return e.eachSeriesByType(`graph`,function(r){wS({targetModel:r,coordSysType:`view`,coordSysProvider:i,isDefaultDataCoordSys:!0});function i(){var i=r.getData(),a=i.mapArray(function(e){var t=i.getItemModel(e);return[+t.get(`x`),+t.get(`y`)]}),o=[],s=[];Wh(a,o,s),s[0]-o[0]===0&&(s[0]+=1,--o[0]),s[1]-o[1]===0&&(s[1]+=1,--o[1]);var c=(s[0]-o[0])/(s[1]-o[1]),l=vU(r,t,c);isNaN(c)&&(o=[l.x,l.y],s=[l.x+l.width,l.y+l.height]);var u=s[0]-o[0],d=s[1]-o[1],f=new fB(null,{api:t,ecModel:e});return f.zoomLimit=r.get(`scaleLimit`),f.setBoundingRect(o[0],o[1],u,d),f.setViewRect(l.x,l.y,l.width,l.height),f.setCenter(r.get(`center`)),f.setZoom(r.get(`zoom`)),n.push(f),f}}),n}var bU=wy.prototype,xU=Dy.prototype,SU=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return e}();(function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t})(SU);function CU(e){return isNaN(+e.cpx1)||isNaN(+e.cpy1)}var wU=function(e){N(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-line`,n}return t.prototype.getDefaultStyle=function(){return{stroke:Z.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new SU},t.prototype.buildPath=function(e,t){CU(t)?bU.buildPath.call(this,e,t):xU.buildPath.call(this,e,t)},t.prototype.pointAt=function(e){return CU(this.shape)?bU.pointAt.call(this,e):xU.pointAt.call(this,e)},t.prototype.tangentAt=function(e){var t=this.shape,n=CU(t)?[t.x2-t.x1,t.y2-t.y1]:xU.tangentAt.call(this,e);return yc(n,n)},t}(Bg),TU=[`fromSymbol`,`toSymbol`];function EU(e){return`_`+e+`Type`}function DU(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=rD(i),l=iD(o||0,c);return r+c+l+(a||``)+(s||``)}function OU(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=rD(i),l=iD(o||0,c),u=nD(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 kU(e){var t=new wU({name:`line`,subPixelOptimize:!0});return AU(t.shape,e),t}function AU(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 jU=function(e){N(t,e);function t(t,n,r){var i=e.call(this)||this;return i._createLine(t,n,r),i}return t.prototype._createLine=function(e,t,n){var r=e.hostModel,i=e.getItemLayout(t),a=e.getItemVisual(t,`z2`),o=kU(i);o.shape.percent=0,Gy(o,{z2:W(a,0),shape:{percent:1}},r,t),this.add(o),L(TU,function(n){var r=OU(n,e,t);this.add(r),this[EU(n)]=DU(n,e,t)},this),this._updateCommonStl(e,t,n)},t.prototype.updateData=function(e,t,n){var r=e.hostModel,i=this.childOfName(`line`),a=e.getItemLayout(t),o={shape:{}};AU(o.shape,a),Wy(i,o,r,t),L(TU,function(n){var r=DU(n,e,t),i=EU(n);if(this[i]!==r){this.remove(this.childOfName(n));var a=OU(n,e,t);this.add(a)}this[i]=r},this),this._updateCommonStl(e,t,n)},t.prototype.getLinePath=function(){return this.childAt(0)},t.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=Rb(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,L(TU,function(e){var t=this.childOfName(e);if(t){t.setColor(h),t.style.opacity=m.opacity;for(var n=0;n<T_.length;n++){var r=T_[n],a=i.getState(r);if(a){var o=a.style||{},s=t.ensureState(r),c=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);Lb(this,c,{labelDataIndex:t,labelFetcher:{getFormattedLabel:function(t,n){return r.getFormattedLabel(t,n,e.dataType)}},inheritColor:h||Z.color.neutral99,defaultOpacity:m.opacity,defaultText:(g==null?e.getName(t):isFinite(g)?wp(g):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`);B(y)||(y=[y,y]),_.__labelDistance=y}this.setTextConfig({position:null,local:!0,inside:!1}),_v(this,u,d,l)},t.prototype.highlight=function(){Q_(this)},t.prototype.downplay=function(){$_(this)},t.prototype.updateLayout=function(e,t){this.setLinePoints(e.getItemLayout(t))},t.prototype.setLinePoints=function(e){var t=this.childOfName(`line`);AU(t.shape,e),t.dirty()},t.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=hc([],l,c);yc(u,u);function d(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),d(t,0),t.scaleX=t.scaleY=i*s,t.markRedraw()),n&&(n.setPosition(l),d(n,1),n.scaleX=n.scaleY=i*s,n.markRedraw()),r&&!r.ignore){r.x=r.y=0,r.originX=r.originY=0;var f=void 0,p=void 0,m=r.__labelDistance,h=m[0]*i,g=m[1]*i,_=s/2,v=o.tangentAt(_),y=[v[1],-v[0]],b=o.pointAt(_);y[1]>0&&(y[0]=-y[0],y[1]=-y[1]);var x=v[0]<0?-1:1;if(r.__position!==`start`&&r.__position!==`end`){var S=-Math.atan2(v[1],v[0]);l[0]<c[0]&&(S=Math.PI+S),r.rotation=S}var C=void 0;switch(r.__position){case`insideStartTop`:case`insideMiddleTop`:case`insideEndTop`:case`middle`:C=-g,p=`bottom`;break;case`insideStartBottom`:case`insideMiddleBottom`:case`insideEndBottom`:C=g,p=`top`;break;default:C=0,p=`middle`}switch(r.__position){case`end`:r.x=u[0]*h+l[0],r.y=u[1]*g+l[1],f=u[0]>.8?`left`:u[0]<-.8?`right`:`center`,p=u[1]>.8?`top`:u[1]<-.8?`bottom`:`middle`;break;case`start`:r.x=-u[0]*h+c[0],r.y=-u[1]*g+c[1],f=u[0]>.8?`right`:u[0]<-.8?`left`:`center`,p=u[1]>.8?`bottom`:u[1]<-.8?`top`:`middle`;break;case`insideStartTop`:case`insideStart`:case`insideStartBottom`:r.x=h*x+c[0],r.y=c[1]+C,f=v[0]<0?`right`:`left`,r.originX=-h*x,r.originY=-C;break;case`insideMiddleTop`:case`insideMiddle`:case`insideMiddleBottom`:case`middle`:r.x=b[0],r.y=b[1]+C,f=`center`,r.originY=-C;break;case`insideEndTop`:case`insideEnd`:case`insideEndBottom`:r.x=-h*x+l[0],r.y=l[1]+C,f=v[0]>=0?`right`:`left`,r.originX=h*x,r.originY=-C;break}r.scaleX=r.scaleY=i,r.setStyle({verticalAlign:r.__verticalAlign||p,align:r.__align||f})}},t}(Y),MU=function(){function e(e){this.group=new Y,this._LineCtor=e||jU}return e.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=PU(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()},e.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,n){t.updateLayout(e,n)},this)},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=PU(e),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function n(e){!e.isGroup&&!NU(e)&&(e.incremental=!0,e.ensureState(`emphasis`).hoverLayer=!0)}for(var r=e.start;r<e.end;r++)if(IU(t.getItemLayout(r))){var i=new this._LineCtor(t,r,this._seriesScope);i.traverse(n),this.group.add(i),t.setItemGraphicEl(r,i),this._progressiveEls.push(i)}},e.prototype.remove=function(){this.group.removeAll()},e.prototype.eachRendered=function(e){Tb(this._progressiveEls||this.group,e)},e.prototype._doAdd=function(e,t,n){if(IU(e.getItemLayout(t))){var r=new this._LineCtor(e,t,n);e.setItemGraphicEl(t,r),this.group.add(r)}},e.prototype._doUpdate=function(e,t,n,r,i){var a=e.getItemGraphicEl(n);if(!IU(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)},e}();function NU(e){return e.animators&&e.animators.length>0}function PU(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:Rb(t)}}function FU(e){return isNaN(e[0])||isNaN(e[1])}function IU(e){return e&&!FU(e[0])&&!FU(e[1])}var LU=[],RU=[],zU=[],BU=Cu,VU=Cc,HU=Math.abs;function UU(e,t,n){for(var r=e[0],i=e[1],a=e[2],o=1/0,s,c=n*n,l=.1,u=.1;u<=.9;u+=.1){LU[0]=BU(r[0],i[0],a[0],u),LU[1]=BU(r[1],i[1],a[1],u);var d=HU(VU(LU,t)-c);d<o&&(o=d,s=u)}for(var f=0;f<32;f++){var p=s+l;RU[0]=BU(r[0],i[0],a[0],s),RU[1]=BU(r[1],i[1],a[1],s),zU[0]=BU(r[0],i[0],a[0],p),zU[1]=BU(r[1],i[1],a[1],p);var d=VU(RU,t)-c;if(HU(d)<.01)break;var m=VU(zU,t)-c;l/=2,d<0?m>=0?s+=l:s-=l:m>=0?s-=l:s+=l}return s}function WU(e,t){var n=[],r=Eu,i=[[],[],[]],a=[[],[]],o=[];t/=2,e.eachEdge(function(e,s){var c=e.getLayout(),l=e.getVisual(`fromSymbol`),u=e.getVisual(`toSymbol`);c.__original||(c.__original=[dc(c[0]),dc(c[1])],c[2]&&c.__original.push(dc(c[2])));var d=c.__original;if(c[2]!=null){if(uc(i[0],d[0]),uc(i[1],d[2]),uc(i[2],d[1]),l&&l!==`none`){var f=cU(e.node1),p=UU(i,d[0],f*t);r(i[0][0],i[1][0],i[2][0],p,n),i[0][0]=n[3],i[1][0]=n[4],r(i[0][1],i[1][1],i[2][1],p,n),i[0][1]=n[3],i[1][1]=n[4]}if(u&&u!==`none`){var f=cU(e.node2),p=UU(i,d[1],f*t);r(i[0][0],i[1][0],i[2][0],p,n),i[1][0]=n[1],i[2][0]=n[2],r(i[0][1],i[1][1],i[2][1],p,n),i[1][1]=n[1],i[2][1]=n[2]}uc(c[0],i[0]),uc(c[1],i[2]),uc(c[2],i[1])}else{if(uc(a[0],d[0]),uc(a[1],d[1]),hc(o,a[1],a[0]),yc(o,o),l&&l!==`none`){var f=cU(e.node1);mc(a[0],a[0],o,f*t)}if(u&&u!==`none`){var f=cU(e.node2);mc(a[1],a[1],o,-f*t)}uc(c[0],a[0]),uc(c[1],a[1])}})}var GU=Cm();function KU(e){if(e)return GU(e).bridge}function qU(e,t){e&&(GU(e).bridge=t)}function JU(e){return e.type===`view`}var YU=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(e,t){var n=new yF,r=new MU,i=this.group,a=new Y;this._controller=new IR(t.getZr()),this._controllerHost={target:a},a.add(n.group),a.add(r.group),i.add(a),this._symbolDraw=n,this._lineDraw=r,this._mainGroup=a,this._firstRender=!0},t.prototype.render=function(e,t,n){var r=this,i=e.coordinateSystem,a=!1;this._model=e,this._api=n,this._active=!0;var o=this._getThumbnailInfo();o&&o.bridge.reset(n);var s=this._symbolDraw,c=this._lineDraw;if(JU(i)){var l={x:i.x,y:i.y,scaleX:i.scaleX,scaleY:i.scaleY};this._firstRender?this._mainGroup.attr(l):Wy(this._mainGroup,l,e)}WU(e.getGraph(),sU(e));var u=e.getData();s.updateData(u);var d=e.getEdgeData();c.updateData(d),this._updateNodeAndLinkScale(),this._updateController(null,e,n),clearTimeout(this._layoutTimeout);var f=e.forceLayout,p=e.get([`force`,`layoutAnimation`]);f&&(a=!0,this._startForceLayoutIteration(f,n,p));var m=e.get(`layout`);u.graph.eachNode(function(t){var i=t.dataIndex,a=t.getGraphicEl(),o=t.getModel();if(a){a.off(`drag`).off(`dragend`);var s=o.get(`draggable`);s&&a.on(`drag`,function(o){switch(m){case`force`:f.warmUp(),!r._layouting&&r._startForceLayoutIteration(f,n,p),f.setFixed(i),u.setItemLayout(i,[a.x,a.y]);break;case`circular`:u.setItemLayout(i,[a.x,a.y]),t.setLayout({fixed:!0},!0),dU(e,`symbolSize`,t,[o.offsetX,o.offsetY]),r.updateLayout(e);break;default:u.setItemLayout(i,[a.x,a.y]),aU(e.getGraph(),e),r.updateLayout(e);break}}).on(`dragend`,function(){f&&f.setUnfixed(i)}),a.setDraggable(s,!!o.get(`cursor`)),o.get([`emphasis`,`focus`])===`adjacency`&&(y_(a).focus=t.getAdjacentDataIndices())}}),u.graph.eachEdge(function(e){var t=e.getGraphicEl(),n=e.getModel().get([`emphasis`,`focus`]);t&&n===`adjacency`&&(y_(t).focus={edge:[e.dataIndex],node:[e.node1.dataIndex,e.node2.dataIndex]})});var h=e.get(`layout`)===`circular`&&e.get([`circular`,`rotateLabel`]),g=u.getLayout(`cx`),_=u.getLayout(`cy`);u.graph.eachNode(function(e){pU(e,h,g,_)}),this._firstRender=!1,a||this._renderThumbnail(e,n,this._symbolDraw,this._lineDraw)},t.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype._startForceLayoutIteration=function(e,t,n){var r=this,i=!1;(function a(){e.step(function(e){r.updateLayout(r._model),(e||!i)&&(i=!0,r._renderThumbnail(r._model,t,r._symbolDraw,r._lineDraw)),(r._layouting=!e)&&(n?r._layoutTimeout=setTimeout(a,16):a())})})()},t.prototype._updateController=function(e,t,n){var r=this._controller,i=this._controllerHost,a=t.coordinateSystem;if(!JU(a)){r.disable();return}r.enable(t.get(`roam`),{api:n,zInfo:{component:t},triggerInfo:{roamTrigger:t.get(`roamTrigger`),isInSelf:function(e,t,n){return a.containPoint([t,n])},isInClip:function(t,n,r){return!e||e.contain(n,r)}}}),i.zoomLimit=t.get(`scaleLimit`),i.zoom=a.getZoom(),r.off(`pan`).off(`zoom`).on(`pan`,function(e){n.dispatchAction({seriesId:t.id,type:`graphRoam`,dx:e.dx,dy:e.dy})}).on(`zoom`,function(e){n.dispatchAction({seriesId:t.id,type:`graphRoam`,zoom:e.scale,originX:e.originX,originY:e.originY})})},t.prototype.updateViewOnPan=function(e,t,n){this._active&&(KR(this._controllerHost,n.dx,n.dy),this._updateThumbnailWindow())},t.prototype.updateViewOnZoom=function(e,t,n){this._active&&(qR(this._controllerHost,n.zoom,n.originX,n.originY),this._updateNodeAndLinkScale(),WU(e.getGraph(),sU(e)),this._lineDraw.updateLayout(),t.updateLabelLayout(),this._updateThumbnailWindow())},t.prototype._updateNodeAndLinkScale=function(){var e=this._model,t=e.getData(),n=sU(e);t.eachItemGraphicEl(function(e,t){e&&e.setSymbolScale(n)})},t.prototype.updateLayout=function(e){this._active&&(WU(e.getGraph(),sU(e)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())},t.prototype.remove=function(){this._active=!1,clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove(),this._controller&&this._controller.disable()},t.prototype._getThumbnailInfo=function(){var e=this._model,t=e.coordinateSystem;if(t.type===`view`){var n=KU(e);if(n)return{bridge:n,coordSys:t}}},t.prototype._updateThumbnailWindow=function(){var e=this._getThumbnailInfo();e&&e.bridge.updateWindow(e.coordSys.transform,this._api)},t.prototype._renderThumbnail=function(e,t,n,r){var i=this._getThumbnailInfo();if(i){var a=new Y,o=n.group.children(),s=r.group.children(),c=new Y,l=new Y;a.add(l),a.add(c);for(var u=0;u<o.length;u++){var d=o[u],f=d.children()[0],p=d.x,m=d.y,h=F(P(f.shape),{width:f.scaleX,height:f.scaleY,x:p-f.scaleX/2,y:m-f.scaleY/2}),g=P(f.style),_=new f.constructor({shape:h,style:g,z2:151});l.add(_)}for(var u=0;u<s.length;u++){var d=s[u],v=d.children()[0],g=P(v.style),h=P(v.shape),y=new wU({style:g,shape:h,z2:151});c.add(y)}i.bridge.renderContent({api:t,roamType:e.get(`roam`),viewportRect:null,group:a,targetTrans:i.coordSys.transform})}},t.type=`graph`,t}(yE);function XU(e){return`_EC_`+e}var ZU=function(){function e(e){this.type=`graph`,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return e.prototype.isDirected=function(){return this._directed},e.prototype.addNode=function(e,t){e=e==null?``+t:``+e;var n=this._nodesMap;if(n[XU(e)]){process.env.NODE_ENV!==`production`&&console.error(`Graph nodes have duplicate name or id`);return}var r=new QU(e,t);return r.hostGraph=this,this.nodes.push(r),n[XU(e)]=r,r},e.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},e.prototype.getNodeById=function(e){return this._nodesMap[XU(e)]},e.prototype.addEdge=function(e,t,n){var r=this._nodesMap,i=this._edgesMap;if(Bs(e)&&(e=this.nodes[e]),Bs(t)&&(t=this.nodes[t]),e instanceof QU||(e=r[XU(e)]),t instanceof QU||(t=r[XU(t)]),!(!e||!t)){var a=e.id+`-`+t.id,o=new $U(e,t,n);return o.hostGraph=this,this._directed&&(e.outEdges.push(o),t.inEdges.push(o)),e.edges.push(o),e!==t&&t.edges.push(o),this.edges.push(o),i[a]=o,o}},e.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},e.prototype.getEdge=function(e,t){e instanceof QU&&(e=e.id),t instanceof QU&&(t=t.id);var n=this._edgesMap;return this._directed?n[e+`-`+t]:n[e+`-`+t]||n[t+`-`+e]},e.prototype.eachNode=function(e,t){for(var n=this.nodes,r=n.length,i=0;i<r;i++)n[i].dataIndex>=0&&e.call(t,n[i],i)},e.prototype.eachEdge=function(e,t){for(var n=this.edges,r=n.length,i=0;i<r;i++)n[i].dataIndex>=0&&n[i].node1.dataIndex>=0&&n[i].node2.dataIndex>=0&&e.call(t,n[i],i)},e.prototype.breadthFirstTraverse=function(e,t,n,r){if(t instanceof QU||(t=this._nodesMap[XU(t)]),t){for(var i=n===`out`?`outEdges`:n===`in`?`inEdges`:`edges`,a=0;a<this.nodes.length;a++)this.nodes[a].__visited=!1;if(!e.call(r,t,null))for(var o=[t];o.length;)for(var s=o.shift(),c=s[i],a=0;a<c.length;a++){var l=c[a],u=l.node1===s?l.node2:l.node1;if(!u.__visited){if(e.call(r,u,s))return;o.push(u),u.__visited=!0}}}},e.prototype.update=function(){for(var e=this.data,t=this.edgeData,n=this.nodes,r=this.edges,i=0,a=n.length;i<a;i++)n[i].dataIndex=-1;for(var i=0,a=e.count();i<a;i++)n[e.getRawIndex(i)].dataIndex=i;t.filterSelf(function(e){var n=r[t.getRawIndex(e)];return n.node1.dataIndex>=0&&n.node2.dataIndex>=0});for(var i=0,a=r.length;i<a;i++)r[i].dataIndex=-1;for(var i=0,a=t.count();i<a;i++)r[t.getRawIndex(i)].dataIndex=i},e.prototype.clone=function(){for(var t=new e(this._directed),n=this.nodes,r=this.edges,i=0;i<n.length;i++)t.addNode(n[i].id,n[i].dataIndex);for(var i=0;i<r.length;i++){var a=r[i];t.addEdge(a.node1.id,a.node2.id,a.dataIndex)}return t},e}(),QU=function(){function e(e,t){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=e??``,this.dataIndex=t??-1}return e.prototype.degree=function(){return this.edges.length},e.prototype.inDegree=function(){return this.inEdges.length},e.prototype.outDegree=function(){return this.outEdges.length},e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostGraph.data.getItemModel(this.dataIndex).getModel(e)},e.prototype.getAdjacentDataIndices=function(){for(var e={edge:[],node:[]},t=0;t<this.edges.length;t++){var n=this.edges[t];n.dataIndex<0||(e.edge.push(n.dataIndex),e.node.push(n.node1.dataIndex,n.node2.dataIndex))}return e},e.prototype.getTrajectoryDataIndices=function(){for(var e=K(),t=K(),n=0,r=this.edges.length;n<r;n++){var i=this.edges[n];if(!(i.dataIndex<0)){e.set(i.dataIndex,!0);for(var a=[i.node1],o=[i.node2],s=0;s<a.length;){var c=a[s];s++,t.set(c.dataIndex,!0);for(var l=c.inEdges,u=0,d=l.length,f=void 0,p=void 0;u<d;u++)f=l[u],p=f.dataIndex,p>=0&&!e.hasKey(p)&&(e.set(p,!0),a.push(f.node1))}for(s=0;s<o.length;){var m=o[s];s++,t.set(m.dataIndex,!0);for(var h=m.outEdges,u=0,g=h.length,_=void 0,v=void 0;u<g;u++)_=h[u],v=_.dataIndex,v>=0&&!e.hasKey(v)&&(e.set(v,!0),o.push(_.node2))}}}return{edge:e.keys(),node:t.keys()}},e}(),$U=function(){function e(e,t,n){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=n??-1}return e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(e)},e.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},e.prototype.getTrajectoryDataIndices=function(){var e=K(),t=K();e.set(this.dataIndex,!0);for(var n=[this.node1],r=[this.node2],i=0;i<n.length;){var a=n[i];i++,t.set(a.dataIndex,!0);for(var o=a.inEdges,s=0,c=o.length,l=void 0,u=void 0;s<c;s++)l=a.inEdges[s],u=l.dataIndex,u>=0&&!e.hasKey(u)&&(e.set(u,!0),n.push(l.node1))}for(i=0;i<r.length;){var d=r[i];i++,t.set(d.dataIndex,!0);for(var f=d.outEdges,s=0,c=f.length,p=void 0,m=void 0;s<c;s++)p=d.outEdges[s],m=p.dataIndex,m>=0&&!e.hasKey(m)&&(e.set(m,!0),r.push(p.node2))}return{edge:e.keys(),node:t.keys()}},e}();function eW(e,t){return{getValue:function(n){var r=this[e][t];return r.getStore().get(r.getDimensionIndex(n||`value`),this.dataIndex)},setVisual:function(n,r){this.dataIndex>=0&&this[e][t].setItemVisual(this.dataIndex,n,r)},getVisual:function(n){return this[e][t].getItemVisual(this.dataIndex,n)},setLayout:function(n,r){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,n,r)},getLayout:function(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[e][t].getRawIndex(this.dataIndex)}}}Ms(QU,eW(`hostGraph`,`data`)),Ms($U,eW(`hostGraph`,`edgeData`));function tW(e,t,n,r,i){for(var a=new ZU(r),o=0;o<e.length;o++)a.addNode(qs(e[o].id,e[o].name,o),o);for(var s=[],c=[],l=0,o=0;o<t.length;o++){var u=t[o],d=u.source,f=u.target;a.addEdge(d,f,l)&&(c.push(u),s.push(qs(pm(u.id,null),d+` > `+f)),l++)}var p=n.get(`coordinateSystem`),m;if(p===`cartesian2d`||p===`polar`||p===`matrix`)m=TA(e,n);else{var h=gS.get(p),g=h&&h.dimensions||[];js(g,`value`)<0&&g.concat([`value`]);var _=dA(e,{coordDimensions:g,encodeDefine:n.getEncode()}).dimensions;m=new uA(_,n),m.initData(e)}var v=new uA([`value`],n);return v.initData(c,s),i&&i(m,v),YB({mainData:m,struct:a,structAttr:`graph`,datas:{node:m,edge:v},datasAttr:{node:`data`,edge:`edgeData`}}),a.update(),a}var nW=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return t.prototype.init=function(t){e.prototype.init.apply(this,arguments);var n=this;function r(){return n._categoriesData}this.legendVisualProvider=new _I(r,r),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},t.prototype.mergeDefaultAndTheme=function(t){e.prototype.mergeDefaultAndTheme.apply(this,arguments),em(t,`edgeLabel`,[`show`])},t.prototype.getInitialData=function(e,t){var n=e.edges||e.links||[],r=e.data||e.nodes||[],i=this;if(r&&n){tU(this);var a=tW(r,n,this,!0,o);return L(a.edges,function(e){nU(e.node1,e.node2,this,e.dataIndex)},this),a.data}function o(e,t){e.wrapMethod(`getItemModel`,function(e){var t=i._categoriesModels[e.getShallow(`category`)];return t&&(t.parentModel=e.parentModel,e.parentModel=t),e});var n=ex.prototype.getModel;function r(e,t){var r=n.call(this,e,t);return r.resolveParentPath=a,r}t.wrapMethod(`getItemModel`,function(e){return e.resolveParentPath=a,e.getModel=r,e});function a(e){if(e&&(e[0]===`label`||e[1]===`label`)){var t=e.slice();return e[0]===`label`?t[0]=`edgeLabel`:e[1]===`label`&&(t[1]=`edgeLabel`),t}return e}}},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.getCategoriesData=function(){return this._categoriesData},t.prototype.formatTooltip=function(e,t,n){if(n===`edge`){var r=this.getData(),i=this.getDataParams(e,n),a=r.graph.getEdgeByIndex(e),o=r.getName(a.node1.dataIndex),s=r.getName(a.node2.dataIndex),c=[];return o!=null&&c.push(o),s!=null&&c.push(s),zT(`nameValue`,{name:c.join(` > `),value:i.value,noValue:i.value==null})}return tE({series:this,dataIndex:e,multipleSeries:t})},t.prototype._updateCategoriesData=function(){var e=R(this.option.categories||[],function(e){return e.value==null?F({value:0},e):e}),t=new uA([`value`],this);t.initData(e),this._categoriesData=t,this._categoriesModels=t.mapArray(function(e){return t.getItemModel(e)})},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.isAnimationEnabled=function(){return e.prototype.isAnimationEnabled.call(this)&&!(this.get(`layout`)===`force`&&this.get([`force`,`layoutAnimation`]))},t.type=`series.graph`,t.dependencies=[`grid`,`polar`,`geo`,`singleAxis`,`calendar`],t.defaultOption={z:2,coordinateSystem:`view`,legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:`center`,top:`center`,symbol:`circle`,symbolSize:10,edgeSymbol:[`none`,`none`],edgeSymbolSize:10,edgeLabel:{position:`middle`,distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:`{b}`},itemStyle:{},lineStyle:{color:Z.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:Z.color.primary}}},t}(oE);function rW(e){e.registerChartView(YU),e.registerSeriesModel(nW),e.registerProcessor(UH),e.registerVisual(WH),e.registerVisual(KH),e.registerLayout(oU),e.registerLayout(e.PRIORITY.VISUAL.POST_CHART_LAYOUT,mU),e.registerLayout(_U),e.registerCoordinateSystem(`graphView`,{dimensions:fB.dimensions,create:yU}),e.registerAction({type:`focusNodeAdjacency`,event:`focusNodeAdjacency`,update:`series:focusNodeAdjacency`},ac),e.registerAction({type:`unfocusNodeAdjacency`,event:`unfocusNodeAdjacency`,update:`series:unfocusNodeAdjacency`},ac),e.registerAction({type:`graphRoam`,event:`graphRoam`,update:`none`},function(e,t,n){t.eachComponent({mainType:`series`,query:e},function(t){var r=n.getViewOfSeriesModel(t);r&&(e.dx!=null&&e.dy!=null&&r.updateViewOnPan(t,n,e),e.zoom!=null&&e.originX!=null&&e.originY!=null&&r.updateViewOnZoom(t,n,e));var i=t.coordinateSystem,a=XR(i,e,t.get(`scaleLimit`));t.setCenter&&t.setCenter(a.center),t.setZoom&&t.setZoom(a.zoom)})})}var iW=function(e){N(t,e);function t(t,n,r){var i=e.call(this)||this;y_(i).dataType=`node`,i.z2=2;var a=new a_;return i.setTextContent(a),i.updateData(t,n,r,!0),i}return t.prototype.updateData=function(e,t,n,r){var i=this,a=e.graph.getNodeByIndex(t),o=e.hostModel,s=a.getModel(),c=s.getModel(`emphasis`),l=e.getItemLayout(t),u=F(KF(s.getModel(`itemStyle`),l,!0),l),d=this;if(isNaN(u.startAngle)){d.setShape(u);return}r?d.setShape(u):Wy(d,{shape:u},o,t);var f=F(KF(s.getModel(`itemStyle`),l,!0),l);i.setShape(f),i.useStyle(e.getItemVisual(t,`style`)),xv(i,s),this._updateLabel(o,s,a),e.setItemGraphicEl(t,d),xv(d,s,`itemStyle`);var p=c.get(`focus`);_v(this,p===`adjacency`?a.getAdjacentDataIndices():p,c.get(`blurScope`),c.get(`disabled`))},t.prototype._updateLabel=function(e,t,n){var r=this.getTextContent(),i=n.getLayout(),a=(i.startAngle+i.endAngle)/2,o=Math.cos(a),s=Math.sin(a),c=t.getModel(`label`);r.ignore=!c.get(`show`);var l=Rb(t),u=n.getVisual(`style`);Lb(r,l,{labelFetcher:{getFormattedLabel:function(n,r,i,a,o,s){return e.getFormattedLabel(n,r,`node`,a,Js(o,l.normal&&l.normal.get(`formatter`),t.get(`name`)),s)}},labelDataIndex:n.dataIndex,defaultText:n.dataIndex+``,inheritColor:u.fill,defaultOpacity:u.opacity,defaultOutsidePosition:`startArc`});var d=c.get(`position`)||`outside`,f=c.get(`distance`)||0,p=d===`outside`?i.r+f:(i.r+i.r0)/2;this.textConfig={inside:d!==`outside`};var m=d===`outside`?o>0?`left`:`right`:c.get(`align`)||`center`,h=d===`outside`?s>0?`top`:`bottom`:c.get(`verticalAlign`)||`middle`;r.attr({x:o*p+i.cx,y:s*p+i.cy,rotation:0,style:{align:m,verticalAlign:h}})},t}(vy);(function(){function e(){this.s1=[0,0],this.s2=[0,0],this.sStartAngle=0,this.sEndAngle=0,this.t1=[0,0],this.t2=[0,0],this.tStartAngle=0,this.tEndAngle=0,this.cx=0,this.cy=0,this.r=0,this.clockwise=!0}return e})();var aW=function(e){N(t,e);function t(t,n,r,i){var a=e.call(this)||this;return y_(a).dataType=`edge`,a.updateData(t,n,r,i,!0),a}return t.prototype.buildPath=function(e,t){e.moveTo(t.s1[0],t.s1[1]);var n=.7,r=t.clockwise;e.arc(t.cx,t.cy,t.r,t.sStartAngle,t.sEndAngle,!r),e.bezierCurveTo((t.cx-t.s2[0])*n+t.s2[0],(t.cy-t.s2[1])*n+t.s2[1],(t.cx-t.t1[0])*n+t.t1[0],(t.cy-t.t1[1])*n+t.t1[1],t.t1[0],t.t1[1]),e.arc(t.cx,t.cy,t.r,t.tStartAngle,t.tEndAngle,!r),e.bezierCurveTo((t.cx-t.t2[0])*n+t.t2[0],(t.cy-t.t2[1])*n+t.t2[1],(t.cx-t.s1[0])*n+t.s1[0],(t.cy-t.s1[1])*n+t.s1[1],t.s1[0],t.s1[1]),e.closePath()},t.prototype.updateData=function(e,t,n,r,i){var a=e.hostModel,o=t.graph.getEdgeByIndex(n),s=o.getLayout(),c=o.node1.getModel(),l=t.getItemModel(o.dataIndex),u=l.getModel(`lineStyle`),d=l.getModel(`emphasis`),f=d.get(`focus`),p=F(KF(c.getModel(`itemStyle`),s,!0),s),m=this;if(isNaN(p.sStartAngle)||isNaN(p.tStartAngle)){m.setShape(p);return}i?(m.setShape(p),oW(m,o,e,u)):(Xy(m),oW(m,o,e,u),Wy(m,{shape:p},a,n)),_v(this,f===`adjacency`?o.getAdjacentDataIndices():f,d.get(`blurScope`),d.get(`disabled`)),xv(m,l,`lineStyle`),t.setItemGraphicEl(o.dataIndex,m)},t}(Bg);function oW(e,t,n,r){var i=t.node1,a=t.node2,o=e.style;switch(e.setStyle(r.getLineStyle()),r.get(`color`)){case`source`:o.fill=n.getItemVisual(i.dataIndex,`style`).fill,o.decal=i.getVisual(`style`).decal;break;case`target`:o.fill=n.getItemVisual(a.dataIndex,`style`).fill,o.decal=a.getVisual(`style`).decal;break;case`gradient`:var s=n.getItemVisual(i.dataIndex,`style`).fill,c=n.getItemVisual(a.dataIndex,`style`).fill;if(H(s)&&H(c)){var l=e.shape;o.fill=new jy((l.s1[0]+l.s2[0])/2,(l.s1[1]+l.s2[1])/2,(l.t1[0]+l.t2[0])/2,(l.t1[1]+l.t2[1])/2,[{offset:0,color:s},{offset:1,color:c}],!0)}break}}var sW=Math.PI/180,cW=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(e,t){},t.prototype.render=function(e,t,n){var r=e.getData(),i=this._data,a=this.group,o=-e.get(`startAngle`)*sW;if(r.diff(i).add(function(e){if(r.getItemLayout(e)){var t=new iW(r,e,o);y_(t).dataIndex=e,a.add(t)}}).update(function(t,n){var s=i.getItemGraphicEl(n);if(!r.getItemLayout(t)){s&&Yy(s,e,n);return}s?s.updateData(r,t,o):s=new iW(r,t,o),a.add(s)}).remove(function(t){var n=i.getItemGraphicEl(t);n&&Yy(n,e,t)}).execute(),!i){var s=e.get(`center`);this.group.scaleX=.01,this.group.scaleY=.01,this.group.originX=X(s[0],n.getWidth()),this.group.originY=X(s[1],n.getHeight()),Gy(this.group,{scaleX:1,scaleY:1},e)}this._data=r,this.renderEdges(e,o)},t.prototype.renderEdges=function(e,t){var n=e.getData(),r=e.getEdgeData(),i=this._edgeData,a=this.group;r.diff(i).add(function(e){var i=new aW(n,r,e,t);y_(i).dataIndex=e,a.add(i)}).update(function(e,o){var s=i.getItemGraphicEl(o);s.updateData(n,r,e,t),a.add(s)}).remove(function(t){var n=i.getItemGraphicEl(t);n&&Yy(n,e,t)}).execute(),this._edgeData=r},t.prototype.dispose=function(){},t.type=`chord`,t}(yE),lW=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this.legendVisualProvider=new _I(z(this.getData,this),z(this.getRawData,this))},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links)},t.prototype.getInitialData=function(e,t){var n=e.edges||e.links||[],r=e.data||e.nodes||[];if(r&&n)return tW(r,n,this,!0,i).data;function i(e,t){var n=ex.prototype.getModel;function r(e,t){var r=n.call(this,e,t);return r.resolveParentPath=i,r}t.wrapMethod(`getItemModel`,function(e){return e.resolveParentPath=i,e.getModel=r,e});function i(e){if(e&&(e[0]===`label`||e[1]===`label`)){var t=e.slice();return e[0]===`label`?t[0]=`edgeLabel`:e[1]===`label`&&(t[1]=`edgeLabel`),t}return e}}},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(e,t,n){var r=this.getDataParams(e,n);if(n===`edge`){var i=this.getData(),a=i.graph.getEdgeByIndex(e),o=i.getName(a.node1.dataIndex),s=i.getName(a.node2.dataIndex),c=[];return o!=null&&c.push(o),s!=null&&c.push(s),zT(`nameValue`,{name:c.join(` > `),value:r.value,noValue:r.value==null})}return zT(`nameValue`,{name:r.name,value:r.value,noValue:r.value==null})},t.prototype.getDataParams=function(t,n){var r=e.prototype.getDataParams.call(this,t,n);if(n===`node`){var i=this.getData(),a=this.getGraph().getNodeByIndex(t);r.name??=i.getName(t),r.value??=a.getLayout().value}return r},t.type=`series.chord`,t.defaultOption={z:2,coordinateSystem:`none`,legendHoverLink:!0,colorBy:`data`,left:0,top:0,right:0,bottom:0,width:null,height:null,center:[`50%`,`50%`],radius:[`70%`,`80%`],clockwise:!0,startAngle:90,endAngle:`auto`,minAngle:0,padAngle:3,itemStyle:{borderRadius:[0,0,5,5]},lineStyle:{width:0,color:`source`,opacity:.2},label:{show:!0,position:`outside`,distance:5},emphasis:{focus:`adjacency`,lineStyle:{opacity:.5}}},t}(oE),uW=Math.PI/180;function dW(e,t){e.eachSeriesByType(`chord`,function(e){fW(e,t)})}function fW(e,t){var n=e.getData(),r=n.graph,i=e.getEdgeData();if(i.count()){var a=NS(e,t),o=a.cx,s=a.cy,c=a.r,l=a.r0,u=Math.max((e.get(`padAngle`)||0)*uW,0),d=Math.max((e.get(`minAngle`)||0)*uW,0),f=-e.get(`startAngle`)*uW,p=f+Math.PI*2,m=e.get(`clockwise`),h=m?1:-1,g=[f,p];mg(g,!m);var _=g[0],v=g[1]-_,y=n.getSum(`value`)===0&&i.getSum(`value`)===0,b=[],x=0;r.eachEdge(function(e){var t=y?1:e.getValue(`value`);y&&(t>0||d)&&(x+=2);var n=e.node1.dataIndex,r=e.node2.dataIndex;b[n]=(b[n]||0)+t,b[r]=(b[r]||0)+t});var S=0;if(r.eachNode(function(e){var t=e.getValue(`value`);isNaN(t)||(b[e.dataIndex]=Math.max(t,b[e.dataIndex]||0)),!y&&(b[e.dataIndex]>0||d)&&x++,S+=b[e.dataIndex]||0}),!(x===0||S===0)){u*x>=Math.abs(v)&&(u=Math.max(0,(Math.abs(v)-d*x)/x)),(u+d)*x>=Math.abs(v)&&(d=(Math.abs(v)-u*x)/x);var C=(v-u*x*h)/S,w=0,T=0,E=0,D=1/0;r.eachNode(function(e){var t=b[e.dataIndex]||0,n=C*(S?t:1)*h;Math.abs(n)<d?w+=d-Math.abs(n):(D=Math.min(D,Math.abs(n)-d),T+=Math.abs(n)-d,E+=Math.abs(n)),e.setLayout({angle:n,value:t})});var O=!1;if(w>T){var k=w/T;r.eachNode(function(e){var t=e.getLayout().angle;Math.abs(t)>=d?e.setLayout({angle:t*k,ratio:k},!0):e.setLayout({angle:d,ratio:d===0?1:t/d},!0)})}else r.eachNode(function(e){if(!O){var t=e.getLayout().angle;t-Math.min(t/E,1)*w<d&&(O=!0)}});var A=w;r.eachNode(function(e){if(!(A<=0)){var t=e.getLayout().angle;if(t>d&&d>0){var n=O?1:Math.min(t/E,1),r=t-d,i=Math.min(r,Math.min(A,w*n));A-=i,e.setLayout({angle:t-i,ratio:(t-i)/t},!0)}else d>0&&e.setLayout({angle:d,ratio:t===0?1:d/t},!0)}});var j=_,ee=[];r.eachNode(function(e){var t=Math.max(e.getLayout().angle,d);e.setLayout({cx:o,cy:s,r0:l,r:c,startAngle:j,endAngle:j+t*h,clockwise:m},!0),ee[e.dataIndex]=j,j+=(t+u)*h}),r.eachEdge(function(e){var t=y?1:e.getValue(`value`),n=C*(S?t:1)*h,r=e.node1.dataIndex,i=ee[r]||0,a=i+Math.abs((e.node1.getLayout().ratio||1)*n)*h,c=[o+l*Math.cos(i),s+l*Math.sin(i)],u=[o+l*Math.cos(a),s+l*Math.sin(a)],d=e.node2.dataIndex,f=ee[d]||0,p=f+Math.abs((e.node2.getLayout().ratio||1)*n)*h,g=[o+l*Math.cos(f),s+l*Math.sin(f)],_=[o+l*Math.cos(p),s+l*Math.sin(p)];e.setLayout({s1:c,s2:u,sStartAngle:i,sEndAngle:a,t1:g,t2:_,tStartAngle:f,tEndAngle:p,cx:o,cy:s,r:l,value:t,clockwise:m}),ee[r]=a,ee[d]=p})}}}function pW(e){e.registerChartView(cW),e.registerSeriesModel(lW),e.registerLayout(e.PRIORITY.VISUAL.POST_CHART_LAYOUT,dW),e.registerProcessor(uI(`chord`))}var mW=function(){function e(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return e}(),hW=function(e){N(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`pointer`,n}return t.prototype.getDefaultShape=function(){return new mW},t.prototype.buildPath=function(e,t){var n=Math.cos,r=Math.sin,i=t.r,a=t.width,o=t.angle,s=t.x-n(o)*a*(a>=i/3?1:2),c=t.y-r(o)*a*(a>=i/3?1:2);o=t.angle-Math.PI/2,e.moveTo(s,c),e.lineTo(t.x+n(o)*a,t.y+r(o)*a),e.lineTo(t.x+n(t.angle)*i,t.y+r(t.angle)*i),e.lineTo(t.x-n(o)*a,t.y-r(o)*a),e.lineTo(s,c)},t}(Bg);function gW(e,t){var n=e.get(`center`),r=t.getWidth(),i=t.getHeight(),a=Math.min(r,i);return{cx:X(n[0],t.getWidth()),cy:X(n[1],t.getHeight()),r:X(e.get(`radius`),a/2)}}function _W(e,t){var n=e==null?``:e+``;return t&&(H(t)?n=t.replace(`{value}`,n):V(t)&&(n=t(e))),n}var vW=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){this.group.removeAll();var r=e.get([`axisLine`,`lineStyle`,`color`]),i=gW(e,n);this._renderMain(e,t,n,r,i),this._data=e.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(e,t,n,r,i){var a=this.group,o=e.get(`clockwise`),s=-e.get(`startAngle`)/180*Math.PI,c=-e.get(`endAngle`)/180*Math.PI,l=e.getModel(`axisLine`),u=l.get(`roundCap`)?UF:vy,d=l.get(`show`),f=l.getModel(`lineStyle`),p=f.get(`width`),m=[s,c];mg(m,!o),s=m[0],c=m[1];for(var h=c-s,g=s,_=[],v=0;d&&v<r.length;v++){var y=Math.min(Math.max(r[v][0],0),1);c=s+h*y;var b=new u({shape:{startAngle:g,endAngle:c,cx:i.cx,cy:i.cy,clockwise:o,r0:i.r-p,r:i.r},silent:!0});b.setStyle({fill:r[v][1]}),b.setStyle(f.getLineStyle([`color`,`width`])),_.push(b),g=c}_.reverse(),L(_,function(e){return a.add(e)});var x=function(e){if(e<=0)return r[0][1];var t;for(t=0;t<r.length;t++)if(r[t][0]>=e&&(t===0?0:r[t-1][0])<e)return r[t][1];return r[t-1][1]};this._renderTicks(e,t,n,x,i,s,c,o,p),this._renderTitleAndDetail(e,t,n,x,i),this._renderAnchor(e,i),this._renderPointer(e,t,n,x,i,s,c,o,p)},t.prototype._renderTicks=function(e,t,n,r,i,a,o,s,c){for(var l=this.group,u=i.cx,d=i.cy,f=i.r,p=+e.get(`min`),m=+e.get(`max`),h=e.getModel(`splitLine`),g=e.getModel(`axisTick`),_=e.getModel(`axisLabel`),v=e.get(`splitNumber`),y=g.get(`splitNumber`),b=X(h.get(`length`),f),x=X(g.get(`length`),f),S=a,C=(o-a)/v,w=C/y,T=h.getModel(`lineStyle`).getLineStyle(),E=g.getModel(`lineStyle`).getLineStyle(),D=h.get(`distance`),O,k,A=0;A<=v;A++){if(O=Math.cos(S),k=Math.sin(S),h.get(`show`)){var j=D?D+c:c,ee=new wy({shape:{x1:O*(f-j)+u,y1:k*(f-j)+d,x2:O*(f-b-j)+u,y2:k*(f-b-j)+d},style:T,silent:!0});T.stroke===`auto`&&ee.setStyle({stroke:r(A/v)}),l.add(ee)}if(_.get(`show`)){var j=_.get(`distance`)+D,te=_W(wp(A/v*(m-p)+p),_.get(`formatter`)),ne=r(A/v),re=O*(f-b-j)+u,ie=k*(f-b-j)+d,ae=_.get(`rotate`),oe=0;ae===`radial`?(oe=-S+2*Math.PI,oe>Math.PI/2&&(oe+=Math.PI)):ae===`tangential`?oe=-S-Math.PI/2:Bs(ae)&&(oe=ae*Math.PI/180),oe===0?l.add(new a_({style:zb(_,{text:te,x:re,y:ie,verticalAlign:k<-.8?`top`:k>.8?`bottom`:`middle`,align:O<-.4?`left`:O>.4?`right`:`center`},{inheritColor:ne}),silent:!0})):l.add(new a_({style:zb(_,{text:te,x:re,y:ie,verticalAlign:`middle`,align:`center`},{inheritColor:ne}),silent:!0,originX:re,originY:ie,rotation:oe}))}if(g.get(`show`)&&A!==v){var j=g.get(`distance`);j=j?j+c:c;for(var se=0;se<=y;se++){O=Math.cos(S),k=Math.sin(S);var ce=new wy({shape:{x1:O*(f-j)+u,y1:k*(f-j)+d,x2:O*(f-x-j)+u,y2:k*(f-x-j)+d},silent:!0,style:E});E.stroke===`auto`&&ce.setStyle({stroke:r((A+se/y)/v)}),l.add(ce),S+=w}S-=w}else S+=C}},t.prototype._renderPointer=function(e,t,n,r,i,a,o,s,c){var l=this.group,u=this._data,d=this._progressEls,f=[],p=e.get([`pointer`,`show`]),m=e.getModel(`progress`),h=m.get(`show`),g=e.getData(),_=g.mapDimension(`value`),v=+e.get(`min`),y=+e.get(`max`),b=[v,y],x=[a,o];function S(t,n){var r=g.getItemModel(t).getModel(`pointer`),a=X(r.get(`width`),i.r),o=X(r.get(`length`),i.r),s=e.get([`pointer`,`icon`]),c=r.get(`offsetCenter`),l=X(c[0],i.r),u=X(c[1],i.r),d=r.get(`keepAspect`),f=s?nD(s,l-a/2,u-o,a,o,null,d):new hW({shape:{angle:-Math.PI/2,width:a,r:o,x:l,y:u}});return f.rotation=-(n+Math.PI/2),f.x=i.cx,f.y=i.cy,f}function C(e,t){var n=m.get(`roundCap`)?UF:vy,r=m.get(`overlap`),o=r?m.get(`width`):c/g.count(),l=r?i.r-o:i.r-(e+1)*o,u=r?i.r:i.r-e*o,d=new n({shape:{startAngle:a,endAngle:t,cx:i.cx,cy:i.cy,clockwise:s,r0:l,r:u}});return r&&(d.z2=Sp(g.get(_,e),[v,y],[100,0],!0)),d}(h||p)&&(g.diff(u).add(function(t){var n=g.get(_,t);if(p){var r=S(t,a);Gy(r,{rotation:-((isNaN(+n)?x[0]:Sp(n,b,x,!0))+Math.PI/2)},e),l.add(r),g.setItemGraphicEl(t,r)}if(h){var i=C(t,a);Gy(i,{shape:{endAngle:Sp(n,b,x,m.get(`clip`))}},e),l.add(i),b_(e.seriesIndex,g.dataType,t,i),f[t]=i}}).update(function(t,n){var r=g.get(_,t);if(p){var i=u.getItemGraphicEl(n),o=i?i.rotation:a,s=S(t,o);s.rotation=o,Wy(s,{rotation:-((isNaN(+r)?x[0]:Sp(r,b,x,!0))+Math.PI/2)},e),l.add(s),g.setItemGraphicEl(t,s)}if(h){var c=d[n],v=C(t,c?c.shape.endAngle:a);Wy(v,{shape:{endAngle:Sp(r,b,x,m.get(`clip`))}},e),l.add(v),b_(e.seriesIndex,g.dataType,t,v),f[t]=v}}).execute(),g.each(function(e){var t=g.getItemModel(e),n=t.getModel(`emphasis`),i=n.get(`focus`),a=n.get(`blurScope`),o=n.get(`disabled`);if(p){var s=g.getItemGraphicEl(e),c=g.getItemVisual(e,`style`),l=c.fill;if(s instanceof Kg){var u=s.style;s.useStyle(F({image:u.image,x:u.x,y:u.y,width:u.width,height:u.height},c))}else s.useStyle(c),s.type!==`pointer`&&s.setColor(l);s.setStyle(t.getModel([`pointer`,`itemStyle`]).getItemStyle()),s.style.fill===`auto`&&s.setStyle(`fill`,r(Sp(g.get(_,e),b,[0,1],!0))),s.z2EmphasisLift=0,xv(s,t),_v(s,i,a,o)}if(h){var d=f[e];d.useStyle(g.getItemVisual(e,`style`)),d.setStyle(t.getModel([`progress`,`itemStyle`]).getItemStyle()),d.z2EmphasisLift=0,xv(d,t),_v(d,i,a,o)}}),this._progressEls=f)},t.prototype._renderAnchor=function(e,t){var n=e.getModel(`anchor`);if(n.get(`show`)){var r=n.get(`size`),i=n.get(`icon`),a=n.get(`offsetCenter`),o=n.get(`keepAspect`),s=nD(i,t.cx-r/2+X(a[0],t.r),t.cy-r/2+X(a[1],t.r),r,r,null,o);s.z2=+!!n.get(`showAbove`),s.setStyle(n.getModel(`itemStyle`).getItemStyle()),this.group.add(s)}},t.prototype._renderTitleAndDetail=function(e,t,n,r,i){var a=this,o=e.getData(),s=o.mapDimension(`value`),c=+e.get(`min`),l=+e.get(`max`),u=new Y,d=[],f=[],p=e.isAnimationEnabled(),m=e.get([`pointer`,`showAbove`]);o.diff(this._data).add(function(e){d[e]=new a_({silent:!0}),f[e]=new a_({silent:!0})}).update(function(e,t){d[e]=a._titleEls[t],f[e]=a._detailEls[t]}).execute(),o.each(function(t){var n=o.getItemModel(t),a=o.get(s,t),h=new Y,g=r(Sp(a,[c,l],[0,1],!0)),_=n.getModel(`title`);if(_.get(`show`)){var v=_.get(`offsetCenter`),y=i.cx+X(v[0],i.r),b=i.cy+X(v[1],i.r),x=d[t];x.attr({z2:m?0:2,style:zb(_,{x:y,y:b,text:o.getName(t),align:`center`,verticalAlign:`middle`},{inheritColor:g})}),h.add(x)}var S=n.getModel(`detail`);if(S.get(`show`)){var C=S.get(`offsetCenter`),w=i.cx+X(C[0],i.r),T=i.cy+X(C[1],i.r),E=X(S.get(`width`),i.r),D=X(S.get(`height`),i.r),O=e.get([`progress`,`show`])?o.getItemVisual(t,`style`).fill:g,x=f[t],k=S.get(`formatter`);x.attr({z2:m?0:2,style:zb(S,{x:w,y:T,text:_W(a,k),width:isNaN(E)?null:E,height:isNaN(D)?null:D,align:`center`,verticalAlign:`middle`},{inheritColor:O})}),qb(x,{normal:S},a,function(e){return _W(e,k)}),p&&Jb(x,t,o,e,{getFormattedLabel:function(e,t,n,r,i,o){return _W(o?o.interpolatedValue:a,k)}}),h.add(x)}u.add(h)}),this.group.add(u),this._titleEls=d,this._detailEls=f},t.type=`gauge`,t}(yE),yW=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.visualStyleAccessPath=`itemStyle`,n}return t.prototype.getInitialData=function(e,t){return gI(this,[`value`])},t.type=`series.gauge`,t.defaultOption={z:2,colorBy:`data`,center:[`50%`,`50%`],legendHoverLink:!0,radius:`75%`,startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,Z.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:Z.color.axisTick,width:3,type:`solid`}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:Z.color.axisTickMinor,width:1,type:`solid`}},axisLabel:{show:!0,distance:15,color:Z.color.axisLabel,fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:`60%`,width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:`circle`,offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:Z.color.neutral00,borderWidth:0,borderColor:Z.color.theme[0]}},title:{show:!0,offsetCenter:[0,`20%`],color:Z.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:Z.color.transparent,borderWidth:0,borderColor:Z.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,`40%`],color:Z.color.primary,fontSize:30,fontWeight:`bold`,lineHeight:30,valueAnimation:!1}},t}(oE);function bW(e){e.registerChartView(vW),e.registerSeriesModel(yW)}var xW=[`itemStyle`,`opacity`],SW=function(e){N(t,e);function t(t,n){var r=e.call(this)||this,i=r,a=new Cy,o=new a_;return i.setTextContent(o),r.setTextGuideLine(a),r.updateData(t,n,!0),r}return t.prototype.updateData=function(e,t,n){var r=this,i=e.hostModel,a=e.getItemModel(t),o=e.getItemLayout(t),s=a.getModel(`emphasis`),c=a.get(xW);c??=1,n||Xy(r),r.useStyle(e.getItemVisual(t,`style`)),r.style.lineJoin=`round`,n?(r.setShape({points:o.points}),r.style.opacity=0,Gy(r,{style:{opacity:c}},i,t)):Wy(r,{style:{opacity:c},shape:{points:o.points}},i,t),xv(r,a),this._updateLabel(e,t),_v(this,s.get(`focus`),s.get(`blurScope`),s.get(`disabled`))},t.prototype._updateLabel=function(e,t){var n=this,r=this.getTextGuideLine(),i=n.getTextContent(),a=e.hostModel,o=e.getItemModel(t),s=e.getItemLayout(t).label,c=e.getItemVisual(t,`style`),l=c.fill;Lb(i,Rb(o),{labelFetcher:e.hostModel,labelDataIndex:t,defaultOpacity:c.opacity,defaultText:e.getName(t)},{normal:{align:s.textAlign,verticalAlign:s.verticalAlign}});var u=o.getModel(`label`).get(`color`)===`inherit`?l:null;n.setTextConfig({local:!0,inside:!!s.inside,insideStroke:u,outsideFill:u});var d=s.linePoints;r.setShape({points:d}),n.textGuideLineConfig={anchor:d?new J(d[0][0],d[0][1]):null},Wy(i,{style:{x:s.x,y:s.y}},a,t),i.attr({rotation:s.rotation,originX:s.x,originY:s.y,z2:10}),sN(n,cN(o),{stroke:l})},t}(Sy),CW=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.ignoreLabelLineUpdate=!0,n}return t.prototype.render=function(e,t,n){var r=e.getData(),i=this._data,a=this.group;r.diff(i).add(function(e){var t=new SW(r,e);r.setItemGraphicEl(e,t),a.add(t)}).update(function(e,t){var n=i.getItemGraphicEl(t);n.updateData(r,e),a.add(n),r.setItemGraphicEl(e,n)}).remove(function(t){Yy(i.getItemGraphicEl(t),e,t)}).execute(),this._data=r},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.prototype.dispose=function(){},t.type=`funnel`,t}(yE),wW=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new _I(z(this.getData,this),z(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.getInitialData=function(e,t){return gI(this,{coordDimensions:[`value`],encodeDefaulter:Rs(pC,this)})},t.prototype._defaultLabelLine=function(e){em(e,`labelLine`,[`show`]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.prototype.getDataParams=function(t){var n=this.getData(),r=e.prototype.getDataParams.call(this,t),i=n.mapDimension(`value`),a=n.getSum(i);return r.percent=a?+(n.get(i,t)/a*100).toFixed(2):0,r.$vars.push(`percent`),r},t.type=`series.funnel`,t.defaultOption={coordinateSystemUsage:`box`,z:2,legendHoverLink:!0,colorBy:`data`,left:80,top:60,right:80,bottom:65,minSize:`0%`,maxSize:`100%`,sort:`descending`,orient:`vertical`,gap:0,funnelAlign:`center`,label:{show:!0,position:`outer`},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:Z.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:Z.color.primary}}},t}(oE);function TW(e,t){for(var n=e.mapDimension(`value`),r=e.mapArray(n,function(e){return e}),i=[],a=t===`ascending`,o=0,s=e.count();o<s;o++)i[o]=o;return V(t)?i.sort(t):t!==`none`&&i.sort(function(e,t){return a?r[e]-r[t]:r[t]-r[e]}),i}function EW(e){var t=e.hostModel.get(`orient`);e.each(function(n){var r=e.getItemModel(n),i=r.getModel(`label`).get(`position`),a=r.getModel(`labelLine`),o=e.getItemLayout(n),s=o.points,c=i===`inner`||i===`inside`||i===`center`||i===`insideLeft`||i===`insideRight`,l,u,d,f;if(c)i===`insideLeft`?(u=(s[0][0]+s[3][0])/2+5,d=(s[0][1]+s[3][1])/2,l=`left`):i===`insideRight`?(u=(s[1][0]+s[2][0])/2-5,d=(s[1][1]+s[2][1])/2,l=`right`):(u=(s[0][0]+s[1][0]+s[2][0]+s[3][0])/4,d=(s[0][1]+s[1][1]+s[2][1]+s[3][1])/4,l=`center`),f=[[u,d],[u,d]];else{var p=void 0,m=void 0,h=void 0,g=void 0,_=a.get(`length`);process.env.NODE_ENV!==`production`&&(t===`vertical`&&[`top`,`bottom`].indexOf(i)>-1&&(i=`left`,console.warn(`Position error: Funnel chart on vertical orient dose not support top and bottom.`)),t===`horizontal`&&[`left`,`right`].indexOf(i)>-1&&(i=`bottom`,console.warn(`Position error: Funnel chart on horizontal orient dose not support left and right.`))),i===`left`?(p=(s[3][0]+s[0][0])/2,m=(s[3][1]+s[0][1])/2,h=p-_,u=h-5,l=`right`):i===`right`?(p=(s[1][0]+s[2][0])/2,m=(s[1][1]+s[2][1])/2,h=p+_,u=h+5,l=`left`):i===`top`?(p=(s[3][0]+s[0][0])/2,m=(s[3][1]+s[0][1])/2,g=m-_,d=g-5,l=`center`):i===`bottom`?(p=(s[1][0]+s[2][0])/2,m=(s[1][1]+s[2][1])/2,g=m+_,d=g+5,l=`center`):i===`rightTop`?(p=t===`horizontal`?s[3][0]:s[1][0],m=t===`horizontal`?s[3][1]:s[1][1],t===`horizontal`?(g=m-_,d=g-5,l=`center`):(h=p+_,u=h+5,l=`top`)):i===`rightBottom`?(p=s[2][0],m=s[2][1],t===`horizontal`?(g=m+_,d=g+5,l=`center`):(h=p+_,u=h+5,l=`bottom`)):i===`leftTop`?(p=s[0][0],m=t===`horizontal`?s[0][1]:s[1][1],t===`horizontal`?(g=m-_,d=g-5,l=`center`):(h=p-_,u=h-5,l=`right`)):i===`leftBottom`?(p=t===`horizontal`?s[1][0]:s[3][0],m=t===`horizontal`?s[1][1]:s[2][1],t===`horizontal`?(g=m+_,d=g+5,l=`center`):(h=p-_,u=h-5,l=`right`)):(p=(s[1][0]+s[2][0])/2,m=(s[1][1]+s[2][1])/2,t===`horizontal`?(g=m+_,d=g+5,l=`center`):(h=p+_,u=h+5,l=`left`)),t===`horizontal`?(h=p,u=h):(g=m,d=g),f=[[p,m],[h,g]]}o.label={linePoints:f,x:u,y:d,verticalAlign:`middle`,textAlign:l,inside:c}})}function DW(e,t){e.eachSeriesByType(`funnel`,function(e){var n=e.getData(),r=n.mapDimension(`value`),i=e.get(`sort`),a=LS(e,t),o=PS(e.getBoxLayoutParams(),a.refContainer),s=e.get(`orient`),c=o.width,l=o.height,u=TW(n,i),d=o.x,f=o.y,p=s===`horizontal`?[X(e.get(`minSize`),l),X(e.get(`maxSize`),l)]:[X(e.get(`minSize`),c),X(e.get(`maxSize`),c)],m=n.getDataExtent(r),h=e.get(`min`),g=e.get(`max`);h??=Math.min(m[0],0),g??=m[1];var _=e.get(`funnelAlign`),v=e.get(`gap`),y=((s===`horizontal`?c:l)-v*(n.count()-1))/n.count(),b=function(e,t){if(s===`horizontal`){var i=Sp(n.get(r,e)||0,[h,g],p,!0),a=void 0;switch(_){case`top`:a=f;break;case`center`:a=f+(l-i)/2;break;case`bottom`:a=f+(l-i);break}return[[t,a],[t,a+i]]}var o=Sp(n.get(r,e)||0,[h,g],p,!0),u;switch(_){case`left`:u=d;break;case`center`:u=d+(c-o)/2;break;case`right`:u=d+c-o;break}return[[u,t],[u+o,t]]};i===`ascending`&&(y=-y,v=-v,s===`horizontal`?d+=c:f+=l,u=u.reverse());for(var x=0;x<u.length;x++){var S=u[x],C=u[x+1],w=n.getItemModel(S);if(s===`horizontal`){var T=w.get([`itemStyle`,`width`]);T==null?T=y:(T=X(T,c),i===`ascending`&&(T=-T));var E=b(S,d),D=b(C,d+T);d+=T+v,n.setItemLayout(S,{points:E.concat(D.slice().reverse())})}else{var O=w.get([`itemStyle`,`height`]);O==null?O=y:(O=X(O,l),i===`ascending`&&(O=-O));var E=b(S,f),D=b(C,f+O);f+=O+v,n.setItemLayout(S,{points:E.concat(D.slice().reverse())})}}EW(n)})}function OW(e){e.registerChartView(CW),e.registerSeriesModel(wW),e.registerLayout(DW),e.registerProcessor(uI(`funnel`))}var kW=.3,AW=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._dataGroup=new Y,n._initialized=!1,n}return t.prototype.init=function(){this.group.add(this._dataGroup)},t.prototype.render=function(e,t,n,r){this._progressiveEls=null;var i=this._dataGroup,a=e.getData(),o=this._data,s=e.coordinateSystem,c=s.dimensions,l=PW(e);a.diff(o).add(u).update(d).remove(f).execute();function u(e){FW(NW(a,i,e,c,s),a,e,l)}function d(t,n){var r=o.getItemGraphicEl(n),i=MW(a,t,c,s);a.setItemGraphicEl(t,r),Wy(r,{shape:{points:i}},e,t),Xy(r),FW(r,a,t,l)}function f(e){var t=o.getItemGraphicEl(e);i.remove(t)}if(!this._initialized){this._initialized=!0;var p=jW(s,e,function(){setTimeout(function(){i.removeClipPath()})});i.setClipPath(p)}this._data=a},t.prototype.incrementalPrepareRender=function(e,t,n){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},t.prototype.incrementalRender=function(e,t,n){for(var r=t.getData(),i=t.coordinateSystem,a=i.dimensions,o=PW(t),s=this._progressiveEls=[],c=e.start;c<e.end;c++){var l=NW(r,this._dataGroup,c,a,i);l.incremental=!0,FW(l,r,c,o),s.push(l)}},t.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},t.type=`parallel`,t}(yE);function jW(e,t,n){var r=e.model,i=e.getRect(),a=new e_({shape:{x:i.x,y:i.y,width:i.width,height:i.height}}),o=r.get(`layout`)===`horizontal`?`width`:`height`;return a.setShape(o,0),Gy(a,{shape:{width:i.width,height:i.height}},t,n),a}function MW(e,t,n,r){for(var i=[],a=0;a<n.length;a++){var o=n[a],s=e.get(e.mapDimension(o),t);IW(s,r.getAxis(o).type)||i.push(r.dataToPoint(s,o))}return i}function NW(e,t,n,r,i){var a=new Cy({shape:{points:MW(e,n,r,i)},z2:10});return t.add(a),e.setItemGraphicEl(n,a),a}function PW(e){var t=e.get(`smooth`,!0);return t===!0&&(t=kW),t=Ip(t),Ks(t)&&(t=0),{smooth:t}}function FW(e,t,n,r){e.useStyle(t.getItemVisual(n,`style`)),e.style.fill=null,e.setShape(`smooth`,r.smooth);var i=t.getItemModel(n),a=i.getModel(`emphasis`);xv(e,i,`lineStyle`),_v(e,a.get(`focus`),a.get(`blurScope`),a.get(`disabled`))}function IW(e,t){return t===`category`?e==null:e==null||isNaN(e)}var LW=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.visualStyleAccessPath=`lineStyle`,n.visualDrawType=`stroke`,n}return t.prototype.getInitialData=function(e,t){return TA(null,this,{useEncodeDefaulter:z(RW,null,this)})},t.prototype.getRawIndicesByActiveState=function(e){var t=this.coordinateSystem,n=this.getData(),r=[];return t.eachActiveState(n,function(t,i){e===t&&r.push(n.getRawIndex(i))}),r},t.type=`series.parallel`,t.dependencies=[`parallel`],t.defaultOption={z:2,coordinateSystem:`parallel`,parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:`solid`},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:`linear`},t}(oE);function RW(e){var t=e.ecModel.getComponent(`parallel`,e.get(`parallelIndex`));if(t){var n={};return L(t.dimensions,function(e){n[e]=zW(e)}),n}}function zW(e){return+e.replace(`dim`,``)}var BW=[`lineStyle`,`opacity`],VW={seriesType:`parallel`,reset:function(e,t){var n=e.coordinateSystem,r={normal:e.get([`lineStyle`,`opacity`]),active:e.get(`activeOpacity`),inactive:e.get(`inactiveOpacity`)};return{progress:function(e,t){n.eachActiveState(t,function(e,n){var i=r[e];if(e===`normal`&&t.hasItemOption){var a=t.getItemModel(n).get(BW,!0);a!=null&&(i=a)}var o=t.ensureUniqueItemVisual(n,`style`);o.opacity=i},e.start,e.end)}}}};function HW(e){UW(e),WW(e)}function UW(e){if(!e.parallel){var t=!1;L(e.series,function(e){e&&e.type===`parallel`&&(t=!0)}),t&&(e.parallel=[{}])}}function WW(e){L($p(e.parallelAxis),function(t){if(U(t)){var n=t.parallelIndex||0,r=$p(e.parallel)[n];r&&r.parallelAxisDefault&&ks(t,r.parallelAxisDefault,!1)}})}var GW=5,KW=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){this._model=e,this._api=n,this._handlers||(this._handlers={},L(qW,function(e,t){n.getZr().on(t,this._handlers[t]=z(e,this))},this)),kE(this,`_throttledDispatchExpand`,e.get(`axisExpandRate`),`fixRate`)},t.prototype.dispose=function(e,t){AE(this,`_throttledDispatchExpand`),L(this._handlers,function(e,n){t.getZr().off(n,e)}),this._handlers=null},t.prototype._throttledDispatchExpand=function(e){this._dispatchExpand(e)},t.prototype._dispatchExpand=function(e){e&&this._api.dispatchAction(F({type:`parallelAxisExpand`},e))},t.type=`parallel`,t}(hE),qW={mousedown:function(e){JW(this,`click`)&&(this._mouseDownPoint=[e.offsetX,e.offsetY])},mouseup:function(e){var t=this._mouseDownPoint;if(JW(this,`click`)&&t){var n=[e.offsetX,e.offsetY];if((t[0]-n[0])**2+(t[1]-n[1])**2>GW)return;var r=this._model.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]);r.behavior!==`none`&&this._dispatchExpand({axisExpandWindow:r.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(e){if(!(this._mouseDownPoint||!JW(this,`mousemove`))){var t=this._model,n=t.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]),r=n.behavior;r===`jump`&&this._throttledDispatchExpand.debounceNextCall(t.get(`axisExpandDebounce`)),this._throttledDispatchExpand(r===`none`?null:{axisExpandWindow:n.axisExpandWindow,animation:r===`jump`?null:{duration:0}})}}};function JW(e,t){var n=e._model;return n.get(`axisExpandable`)&&n.get(`axisExpandTriggerOn`)===t}var YW=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(){e.prototype.init.apply(this,arguments),this.mergeOption({})},t.prototype.mergeOption=function(e){var t=this.option;e&&ks(t,e,!0),this._initDimensions()},t.prototype.contains=function(e,t){var n=e.get(`parallelIndex`);return n!=null&&t.getComponent(`parallel`,n)===this},t.prototype.setAxisExpand=function(e){L([`axisExpandable`,`axisExpandCenter`,`axisExpandCount`,`axisExpandWidth`,`axisExpandWindow`],function(t){e.hasOwnProperty(t)&&(this.option[t]=e[t])},this)},t.prototype._initDimensions=function(){var e=this.dimensions=[],t=this.parallelAxisIndex=[];L(Fs(this.ecModel.queryComponents({mainType:`parallelAxis`}),function(e){return(e.get(`parallelIndex`)||0)===this.componentIndex},this),function(n){e.push(`dim`+n.get(`dim`)),t.push(n.componentIndex)})},t.type=`parallel`,t.dependencies=[`parallelAxis`],t.layoutMode=`box`,t.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:`horizontal`,axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:`click`,parallelAxisDefault:null},t}(GS),XW=function(e){N(t,e);function t(t,n,r,i,a){var o=e.call(this,t,n,r)||this;return o.type=i||`value`,o.axisIndex=a,o}return t.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get(`layout`)!==`horizontal`},t}(IM);function ZW(e,t,n,r,i,a){e||=0;var o=n[1]-n[0];if(i!=null&&(i=$W(i,[0,o])),a!=null&&(a=Math.max(a,i??0)),r===`all`){var s=Math.abs(t[1]-t[0]);s=$W(s,[0,o]),i=a=$W(s,[i,a]),r=0}t[0]=$W(t[0],n),t[1]=$W(t[1],n);var c=QW(t,r);t[r]+=e;var l=i||0,u=n.slice();c.sign<0?u[0]+=l:u[1]-=l,t[r]=$W(t[r],u);var d=QW(t,r);return i!=null&&(d.sign!==c.sign||d.span<i)&&(t[1-r]=t[r]+c.sign*i),d=QW(t,r),a!=null&&d.span>a&&(t[1-r]=t[r]+d.sign*a),t}function QW(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 $W(e,t){return Math.min(t[1]==null?1/0:t[1],Math.max(t[0]==null?-1/0:t[0],e))}var eG=L,tG=Math.min,nG=Math.max,rG=Math.floor,iG=Math.ceil,aG=wp,oG=Math.PI,sG=function(){function e(e,t,n){this.type=`parallel`,this._axesMap=K(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,n)}return e.prototype._init=function(e,t,n){var r=e.dimensions,i=e.parallelAxisIndex;eG(r,function(e,n){var r=i[n],a=t.getComponent(`parallelAxis`,r),o=this._axesMap.set(e,new XW(e,Lj(a),[0,0],a.get(`type`),r));o.onBand=o.type===`category`&&a.get(`boundaryGap`),o.inverse=a.get(`inverse`),a.axis=o,o.model=a,o.coordinateSystem=a.coordinateSystem=this},this)},e.prototype.update=function(e,t){this._updateAxesFromSeries(this._model,e)},e.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),n=t.axisBase,r=t.layoutBase,i=t.pixelDimIndex,a=e[1-i],o=e[i];return a>=n&&a<=n+t.axisLength&&o>=r&&o<=r+t.layoutLength},e.prototype.getModel=function(){return this._model},e.prototype._updateAxesFromSeries=function(e,t){t.eachSeries(function(n){if(e.contains(n,t)){var r=n.getData();eG(this.dimensions,function(e){var t=this._axesMap.get(e);t.scale.unionExtentFromData(r,r.mapDimension(e)),Ij(t.scale,t.model)},this)}},this)},e.prototype.resize=function(e,t){var n=LS(e,t).refContainer;this._rect=PS(e.getBoxLayoutParams(),n),this._layoutAxes()},e.prototype.getRect=function(){return this._rect},e.prototype._makeLayoutInfo=function(){var e=this._model,t=this._rect,n=[`x`,`y`],r=[`width`,`height`],i=e.get(`layout`),a=i===`horizontal`?0:1,o=t[r[a]],s=[0,o],c=this.dimensions.length,l=cG(e.get(`axisExpandWidth`),s),u=cG(e.get(`axisExpandCount`)||0,[0,c]),d=e.get(`axisExpandable`)&&c>3&&c>u&&u>1&&l>0&&o>0,f=e.get(`axisExpandWindow`),p;f?(p=cG(f[1]-f[0],s),f[1]=f[0]+p):(p=cG(l*(u-1),s),f=[l*(e.get(`axisExpandCenter`)||rG(c/2))-p/2],f[1]=f[0]+p);var m=(o-p)/(c-u);m<3&&(m=0);var h=[rG(aG(f[0]/l,1))+1,iG(aG(f[1]/l,1))-1],g=m/l*f[0];return{layout:i,pixelDimIndex:a,layoutBase:t[n[a]],layoutLength:o,axisBase:t[n[1-a]],axisLength:t[r[1-a]],axisExpandable:d,axisExpandWidth:l,axisCollapseWidth:m,axisExpandWindow:f,axisCount:c,winInnerIndices:h,axisExpandWindow0Pos:g}},e.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,n=this.dimensions,r=this._makeLayoutInfo(),i=r.layout;t.each(function(e){var t=[0,r.axisLength],n=+!!e.inverse;e.setExtent(t[n],t[1-n])}),eG(n,function(t,n){var a=(r.axisExpandable?uG:lG)(n,r),o={horizontal:{x:a.position,y:r.axisLength},vertical:{x:0,y:a.position}},s={horizontal:oG/2,vertical:0},c=[o[i].x+e.x,o[i].y+e.y],l=s[i],u=sl();fl(u,u,l),dl(u,u,c),this._axesLayout[t]={position:c,rotation:l,transform:u,axisNameAvailableWidth:a.axisNameAvailableWidth,axisLabelShow:a.axisLabelShow,nameTruncateMaxWidth:a.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},e.prototype.getAxis=function(e){return this._axesMap.get(e)},e.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},e.prototype.eachActiveState=function(e,t,n,r){n??=0,r??=e.count();var i=this._axesMap,a=this.dimensions,o=[],s=[];L(a,function(t){o.push(e.mapDimension(t)),s.push(i.get(t).model)});for(var c=this.hasAxisBrushed(),l=n;l<r;l++){var u=void 0;if(!c)u=`normal`;else{u=`active`;for(var d=e.getValues(o,l),f=0,p=a.length;f<p;f++)if(s[f].getActiveState(d[f])===`inactive`){u=`inactive`;break}}t(u,l)}},e.prototype.hasAxisBrushed=function(){for(var e=this.dimensions,t=this._axesMap,n=!1,r=0,i=e.length;r<i;r++)t.get(e[r]).model.getActiveState()!==`normal`&&(n=!0);return n},e.prototype.axisCoordToPoint=function(e,t){var n=this._axesLayout[t];return db([e,0],n.transform)},e.prototype.getAxisLayout=function(e){return P(this._axesLayout[e])},e.prototype.getSlidedAxisExpandWindow=function(e){var t=this._makeLayoutInfo(),n=t.pixelDimIndex,r=t.axisExpandWindow.slice(),i=r[1]-r[0],a=[0,t.axisExpandWidth*(t.axisCount-1)];if(!this.containPoint(e))return{behavior:`none`,axisExpandWindow:r};var o=e[n]-t.layoutBase-t.axisExpandWindow0Pos,s,c=`slide`,l=t.axisCollapseWidth,u=this._model.get(`axisExpandSlideTriggerArea`),d=u[0]!=null;if(l)d&&l&&o<i*u[0]?(c=`jump`,s=o-i*u[2]):d&&l&&o>i*(1-u[0])?(c=`jump`,s=o-i*(1-u[2])):(s=o-i*u[1])>=0&&(s=o-i*(1-u[1]))<=0&&(s=0),s*=t.axisExpandWidth/l,s?ZW(s,r,a,`all`):c=`none`;else{var f=r[1]-r[0];r=[nG(0,a[1]*o/f-f/2)],r[1]=tG(a[1],r[0]+f),r[0]=r[1]-f}return{axisExpandWindow:r,behavior:c}},e}();function cG(e,t){return tG(nG(e,t[0]),t[1])}function lG(e,t){var n=t.layoutLength/(t.axisCount-1);return{position:n*e,axisNameAvailableWidth:n,axisLabelShow:!0}}function uG(e,t){var n=t.layoutLength,r=t.axisExpandWidth,i=t.axisCount,a=t.axisCollapseWidth,o=t.winInnerIndices,s,c=a,l=!1,u;return e<o[0]?(s=e*a,u=a):e<=o[1]?(s=t.axisExpandWindow0Pos+e*r-t.axisExpandWindow[0],c=r,l=!0):(s=n-(i-1-e)*a,u=a),{position:s,axisNameAvailableWidth:c,axisLabelShow:l,nameTruncateMaxWidth:u}}function dG(e,t){var n=[];return e.eachComponent(`parallel`,function(r,i){var a=new sG(r,e,t);a.name=`parallel_`+i,a.resize(r,t),r.coordinateSystem=a,a.model=r,n.push(a)}),e.eachSeries(function(e){e.get(`coordinateSystem`)===`parallel`&&(e.coordinateSystem=e.getReferringComponents(`parallel`,Dm).models[0].coordinateSystem)}),n}var fG={create:dG},pG=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.activeIntervals=[],n}return t.prototype.getAreaSelectStyle=function(){return Zm([[`fill`,`color`],[`lineWidth`,`borderWidth`],[`stroke`,`borderColor`],[`width`,`width`],[`opacity`,`opacity`]])(this.getModel(`areaSelectStyle`))},t.prototype.setActiveIntervals=function(e){var t=this.activeIntervals=P(e);if(t)for(var n=t.length-1;n>=0;n--)Tp(t[n])},t.prototype.getActiveState=function(e){var t=this.activeIntervals;if(!t.length)return`normal`;if(e==null||isNaN(+e))return`inactive`;if(t.length===1){var n=t[0];if(n[0]<=e&&e<=n[1])return`active`}else for(var r=0,i=t.length;r<i;r++)if(t[r][0]<=e&&e<=t[r][1])return`active`;return`inactive`},t}(GS);Ms(pG,Yj);var mG=!0,hG=Math.min,gG=Math.max,_G=Math.pow,vG=1e4,yG=6,bG=6,xG=`globalPan`,SG={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},CG={w:`ew`,e:`ew`,n:`ns`,s:`ns`,ne:`nesw`,sw:`nesw`,nw:`nwse`,se:`nwse`},wG={brushStyle:{lineWidth:2,stroke:Z.color.backgroundTint,fill:Z.color.borderTint},transformable:!0,brushMode:`single`,removeOnClick:!1},TG=0,EG=function(e){N(t,e);function t(t){var n=e.call(this)||this;return n._track=[],n._covers=[],n._handlers={},process.env.NODE_ENV!==`production`&&G(t),n._zr=t,n.group=new Y,n._uid=`brushController_`+ TG++,L(iK,function(e,t){this._handlers[t]=z(e,this)},n),n}return t.prototype.enableBrush=function(e){return process.env.NODE_ENV!==`production`&&G(this._mounted),this._brushType&&this._doDisableBrush(),e.brushType&&this._doEnableBrush(e),this},t.prototype._doEnableBrush=function(e){var t=this._zr;this._enableGlobalPan||jR(t,xG,this._uid),L(this._handlers,function(e,n){t.on(n,e)}),this._brushType=e.brushType,this._brushOption=ks(P(wG),e,!0)},t.prototype._doDisableBrush=function(){var e=this._zr;MR(e,xG,this._uid),L(this._handlers,function(t,n){e.off(n,t)}),this._brushType=this._brushOption=null},t.prototype.setPanels=function(e){if(e&&e.length){var t=this._panels={};L(e,function(e){t[e.panelId]=P(e)})}else this._panels=null;return this},t.prototype.mount=function(e){e||={},process.env.NODE_ENV!==`production`&&(this._mounted=!0),this._enableGlobalPan=e.enableGlobalPan;var t=this.group;return this._zr.add(t),t.attr({x:e.x||0,y:e.y||0,rotation:e.rotation||0,scaleX:e.scaleX||1,scaleY:e.scaleY||1}),this._transform=t.getLocalTransform(),this},t.prototype.updateCovers=function(e){process.env.NODE_ENV!==`production`&&G(this._mounted),e=R(e,function(e){return ks(P(wG),e,!0)});var t=`\0-brush-index-`,n=this._covers,r=this._covers=[],i=this,a=this._creatingCover;return new Ik(n,e,s,o).add(c).update(c).remove(l).execute(),this;function o(e,n){return(e.id==null?t+n:e.id)+`-`+e.brushType}function s(e,t){return o(e.__brushOption,t)}function c(t,o){var s=e[t];o!=null&&n[o]===a?r[t]=n[o]:jG(i,r[t]=o==null?OG(i,DG(i,s)):(n[o].__brushOption=s,n[o]))}function l(e){n[e]!==a&&i.group.remove(n[e])}},t.prototype.unmount=function(){if(!(process.env.NODE_ENV!==`production`&&!this._mounted))return this.enableBrush(!1),FG(this),this._zr.remove(this.group),process.env.NODE_ENV!==`production`&&(this._mounted=!1),this},t.prototype.dispose=function(){this.unmount(),this.off()},t}(Ac);function DG(e,t){var n=sK[t.brushType].createCover(e,t);return n.__brushOption=t,AG(n,t),e.group.add(n),n}function OG(e,t){var n=MG(t);return n.endCreating&&(n.endCreating(e,t),AG(t,t.__brushOption)),t}function kG(e,t){var n=t.__brushOption;MG(t).updateCoverShape(e,t,n.range,n)}function AG(e,t){var n=t.z;n??=vG,e.traverse(function(e){e.z=n,e.z2=n})}function jG(e,t){MG(t).updateCommon(e,t),kG(e,t)}function MG(e){return sK[e.__brushOption.brushType]}function NG(e,t,n){var r=e._panels;if(!r)return mG;var i,a=e._transform;return L(r,function(e){e.isTargetByCursor(t,n,a)&&(i=e)}),i}function PG(e,t){var n=e._panels;if(!n)return mG;var r=t.__brushOption.panelId;return r==null?mG:n[r]}function FG(e){var t=e._covers,n=t.length;return L(t,function(t){e.group.remove(t)},e),t.length=0,!!n}function IG(e,t){var n=R(e._covers,function(e){var t=e.__brushOption,n=P(t.range);return{brushType:t.brushType,panelId:t.panelId,range:n}});e.trigger(`brush`,{areas:n,isEnd:!!t.isEnd,removeOnClick:!!t.removeOnClick})}function LG(e){var t=e._track;if(!t.length)return!1;var n=t[t.length-1],r=t[0],i=n[0]-r[0],a=n[1]-r[1];return _G(i*i+a*a,.5)>yG}function RG(e){var t=e.length-1;return t<0&&(t=0),[e[0],e[t]]}function zG(e,t,n,r){var i=new Y;return i.add(new e_({name:`main`,style:UG(n),silent:!0,draggable:!0,cursor:`move`,drift:Rs(JG,e,t,i,[`n`,`s`,`w`,`e`]),ondragend:Rs(IG,t,{isEnd:!0})})),L(r,function(n){i.add(new e_({name:n.join(``),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Rs(JG,e,t,i,n),ondragend:Rs(IG,t,{isEnd:!0})}))}),i}function BG(e,t,n,r){var i=r.brushStyle.lineWidth||0,a=gG(i,bG),o=n[0][0],s=n[1][0],c=o-i/2,l=s-i/2,u=n[0][1],d=n[1][1],f=u-a+i/2,p=d-a+i/2,m=u-o,h=d-s,g=m+i,_=h+i;HG(e,t,`main`,o,s,m,h),r.transformable&&(HG(e,t,`w`,c,l,a,_),HG(e,t,`e`,f,l,a,_),HG(e,t,`n`,c,l,g,a),HG(e,t,`s`,c,p,g,a),HG(e,t,`nw`,c,l,a,a),HG(e,t,`ne`,f,l,a,a),HG(e,t,`sw`,c,p,a,a),HG(e,t,`se`,f,p,a,a))}function VG(e,t){var n=t.__brushOption,r=n.transformable,i=t.childAt(0);i.useStyle(UG(n)),i.attr({silent:!r,cursor:r?`move`:`default`}),L([[`w`],[`e`],[`n`],[`s`],[`s`,`e`],[`s`,`w`],[`n`,`e`],[`n`,`w`]],function(n){var i=t.childOfName(n.join(``)),a=n.length===1?KG(e,n[0]):qG(e,n);i&&i.attr({silent:!r,invisible:!r,cursor:r?CG[a]+`-resize`:null})})}function HG(e,t,n,r,i,a,o){var s=t.childOfName(n);s&&s.setShape(QG(ZG(e,t,[[r,i],[r+a,i+o]])))}function UG(e){return I({strokeNoScale:!0},e.brushStyle)}function WG(e,t,n,r){var i=[hG(e,n),hG(t,r)],a=[gG(e,n),gG(t,r)];return[[i[0],a[0]],[i[1],a[1]]]}function GG(e){return ub(e.group)}function KG(e,t){return{left:`w`,right:`e`,top:`n`,bottom:`s`}[fb({w:`left`,e:`right`,n:`top`,s:`bottom`}[t],GG(e))]}function qG(e,t){var n=[KG(e,t[0]),KG(e,t[1])];return(n[0]===`e`||n[0]===`w`)&&n.reverse(),n.join(``)}function JG(e,t,n,r,i,a){var o=n.__brushOption,s=e.toRectRange(o.range),c=XG(t,i,a);L(r,function(e){var t=SG[e];s[t[0]][t[1]]+=c[t[0]]}),o.range=e.fromRectRange(WG(s[0][0],s[1][0],s[0][1],s[1][1])),jG(t,n),IG(t,{isEnd:!1})}function YG(e,t,n,r){var i=t.__brushOption.range,a=XG(e,n,r);L(i,function(e){e[0]+=a[0],e[1]+=a[1]}),jG(e,t),IG(e,{isEnd:!1})}function XG(e,t,n){var r=e.group,i=r.transformCoordToLocal(t,n),a=r.transformCoordToLocal(0,0);return[i[0]-a[0],i[1]-a[1]]}function ZG(e,t,n){var r=PG(e,t);return r&&r!==mG?r.clipPath(n,e._transform):P(n)}function QG(e){var t=hG(e[0][0],e[1][0]),n=hG(e[0][1],e[1][1]),r=gG(e[0][0],e[1][0]),i=gG(e[0][1],e[1][1]);return{x:t,y:n,width:r-t,height:i-n}}function $G(e,t,n){if(!(!e._brushType||oK(e,t.offsetX,t.offsetY))){var r=e._zr,i=e._covers,a=NG(e,t,n);if(!e._dragging)for(var o=0;o<i.length;o++){var s=i[o].__brushOption;if(a&&(a===mG||s.panelId===a.panelId)&&sK[s.brushType].contain(i[o],n[0],n[1]))return}a&&r.setCursorStyle(`crosshair`)}}function eK(e){var t=e.event;t.preventDefault&&t.preventDefault()}function tK(e,t,n){return e.childOfName(`main`).contain(t,n)}function nK(e,t,n,r){var i=e._creatingCover,a=e._creatingPanel,o=e._brushOption,s;if(e._track.push(n.slice()),LG(e)||i){if(a&&!i){o.brushMode===`single`&&FG(e);var c=P(o);c.brushType=rK(c.brushType,a),c.panelId=a===mG?null:a.panelId,i=e._creatingCover=DG(e,c),e._covers.push(i)}if(i){var l=sK[rK(e._brushType,a)],u=i.__brushOption;u.range=l.getCreatingRange(ZG(e,i,e._track)),r&&(OG(e,i),l.updateCommon(e,i)),kG(e,i),s={isEnd:r}}}else r&&o.brushMode===`single`&&o.removeOnClick&&NG(e,t,n)&&FG(e)&&(s={isEnd:r,removeOnClick:!0});return s}function rK(e,t){return e===`auto`?(process.env.NODE_ENV!==`production`&&G(t&&t.defaultBrushType,`MUST have defaultBrushType when brushType is "atuo"`),t.defaultBrushType):e}var iK={mousedown:function(e){if(this._dragging)aK(this,e);else if(!e.target||!e.target.draggable){eK(e);var t=this.group.transformCoordToLocal(e.offsetX,e.offsetY);this._creatingCover=null,(this._creatingPanel=NG(this,e,t))&&(this._dragging=!0,this._track=[t.slice()])}},mousemove:function(e){var t=e.offsetX,n=e.offsetY,r=this.group.transformCoordToLocal(t,n);if($G(this,e,r),this._dragging){eK(e);var i=nK(this,e,r,!1);i&&IG(this,i)}},mouseup:function(e){aK(this,e)}};function aK(e,t){if(e._dragging){eK(t);var n=t.offsetX,r=t.offsetY,i=nK(e,t,e.group.transformCoordToLocal(n,r),!0);e._dragging=!1,e._track=[],e._creatingCover=null,i&&IG(e,i)}}function oK(e,t,n){var r=e._zr;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var sK={lineX:cK(0),lineY:cK(1),rect:{createCover:function(e,t){function n(e){return e}return zG({toRectRange:n,fromRectRange:n},e,t,[[`w`],[`e`],[`n`],[`s`],[`s`,`e`],[`s`,`w`],[`n`,`e`],[`n`,`w`]])},getCreatingRange:function(e){var t=RG(e);return WG(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(e,t,n,r){BG(e,t,n,r)},updateCommon:VG,contain:tK},polygon:{createCover:function(e,t){var n=new Y;return n.add(new Cy({name:`main`,style:UG(t),silent:!0})),n},getCreatingRange:function(e){return e},endCreating:function(e,t){t.remove(t.childAt(0)),t.add(new Sy({name:`main`,draggable:!0,drift:Rs(YG,e,t),ondragend:Rs(IG,e,{isEnd:!0})}))},updateCoverShape:function(e,t,n,r){t.childAt(0).setShape({points:ZG(e,t,n)})},updateCommon:VG,contain:tK}};function cK(e){return{createCover:function(t,n){return zG({toRectRange:function(t){var n=[t,[0,100]];return e&&n.reverse(),n},fromRectRange:function(t){return t[e]}},t,n,[[[`w`],[`e`]],[[`n`],[`s`]]][e])},getCreatingRange:function(t){var n=RG(t);return[hG(n[0][e],n[1][e]),gG(n[0][e],n[1][e])]},updateCoverShape:function(t,n,r,i){var a,o=PG(t,n);if(o!==mG&&o.getLinearBrushOtherExtent)a=o.getLinearBrushOtherExtent(e);else{var s=t._zr;a=[0,[s.getWidth(),s.getHeight()][1-e]]}var c=[r,a];e&&c.reverse(),BG(t,n,c,i)},updateCommon:VG,contain:tK}}function lK(e){return e=fK(e),function(t){return hb(t,e)}}function uK(e,t){return e=fK(e),function(n){var r=t??n,i=r?e.width:e.height,a=r?e.x:e.y;return[a,a+(i||0)]}}function dK(e,t,n){var r=fK(e);return function(e,i){return r.contain(i[0],i[1])&&!FR(e,t,n)}}function fK(e){return Ol.create(e)}var pK=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(t,n){e.prototype.init.apply(this,arguments),(this._brushController=new EG(n.getZr())).on(`brush`,z(this._onBrush,this))},t.prototype.render=function(e,t,n,r){if(!mK(e,t,r)){this.axisModel=e,this.api=n,this.group.removeAll();var i=this._axisGroup;if(this._axisGroup=new Y,this.group.add(this._axisGroup),e.get(`show`)){var a=gK(e,t),o=a.coordinateSystem,s=e.getAreaSelectStyle(),c=s.width,l=e.axis.dim,u=o.getAxisLayout(l),d=F({strokeContainThreshold:c},u),f=new YI(e,n,d);f.build(),this._axisGroup.add(f.group),this._refreshBrushController(d,s,e,a,c,n),mb(i,this._axisGroup,e)}}},t.prototype._refreshBrushController=function(e,t,n,r,i,a){var o=n.axis.getExtent(),s=o[1]-o[0],c=Math.min(30,Math.abs(s)*.1),l=Ol.create({x:o[0],y:-i/2,width:s,height:i});l.x-=c,l.width+=2*c,this._brushController.mount({enableGlobalPan:!0,rotation:e.rotation,x:e.position[0],y:e.position[1]}).setPanels([{panelId:`pl`,clipPath:lK(l),isTargetByCursor:dK(l,a,r),getLinearBrushOtherExtent:uK(l,0)}]).enableBrush({brushType:`lineX`,brushStyle:t,removeOnClick:!0}).updateCovers(hK(n))},t.prototype._onBrush=function(e){var t=e.areas,n=this.axisModel,r=n.axis,i=R(t,function(e){return[r.coordToData(e.range[0],!0),r.coordToData(e.range[1],!0)]});(!n.option.realtime===e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:`axisAreaSelect`,parallelAxisId:n.id,intervals:i})},t.prototype.dispose=function(){this._brushController.dispose()},t.type=`parallelAxis`,t}(hE);function mK(e,t,n){return n&&n.type===`axisAreaSelect`&&t.findComponents({mainType:`parallelAxis`,query:n})[0]===e}function hK(e){var t=e.axis;return R(e.activeIntervals,function(e){return{brushType:`lineX`,panelId:`pl`,range:[t.dataToCoord(e[0],!0),t.dataToCoord(e[1],!0)]}})}function gK(e,t){return t.getComponent(`parallel`,e.get(`parallelIndex`))}var _K={type:`axisAreaSelect`,event:`axisAreaSelected`};function vK(e){e.registerAction(_K,function(e,t){t.eachComponent({mainType:`parallelAxis`,query:e},function(t){t.axis.model.setActiveIntervals(e.intervals)})}),e.registerAction(`parallelAxisExpand`,function(e,t){t.eachComponent({mainType:`parallel`,query:e},function(t){t.setAxisExpand(e)})})}var yK={type:`value`,areaSelectStyle:{width:20,borderWidth:1,borderColor:`rgba(160,197,232)`,color:`rgba(160,197,232)`,opacity:.3},realtime:!0,z:10};function bK(e){e.registerComponentView(KW),e.registerComponentModel(YW),e.registerCoordinateSystem(`parallel`,fG),e.registerPreprocessor(HW),e.registerComponentModel(pG),e.registerComponentView(pK),OI(e,`parallel`,pG,yK),vK(e)}function xK(e){Nk(bK),e.registerChartView(AW),e.registerSeriesModel(LW),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,VW)}var SK=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return e}(),CK=function(e){N(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new SK},t.prototype.buildPath=function(e,t){var n=t.extent;e.moveTo(t.x1,t.y1),e.bezierCurveTo(t.cpx1,t.cpy1,t.cpx2,t.cpy2,t.x2,t.y2),t.orient===`vertical`?(e.lineTo(t.x2+n,t.y2),e.bezierCurveTo(t.cpx2+n,t.cpy2,t.cpx1+n,t.cpy1,t.x1+n,t.y1)):(e.lineTo(t.x2,t.y2+n),e.bezierCurveTo(t.cpx2,t.cpy2+n,t.cpx1,t.cpy1+n,t.x1,t.y1+n)),e.closePath()},t.prototype.highlight=function(){Q_(this)},t.prototype.downplay=function(){$_(this)},t}(Bg),wK=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._mainGroup=new Y,n._focusAdjacencyDisabled=!1,n}return t.prototype.init=function(e,t){this._controller=new IR(t.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},t.prototype.render=function(e,t,n){var r=this,i=e.getGraph(),a=this._mainGroup,o=e.layoutInfo,s=o.width,c=o.height,l=e.getData(),u=e.getData(`edge`),d=e.get(`orient`);this._model=e,a.removeAll(),a.x=o.x,a.y=o.y,this._updateViewCoordSys(e,n),JR(e,n,a,this._controller,this._controllerHost,null),i.eachEdge(function(t){var n=new CK,r=y_(n);r.dataIndex=t.dataIndex,r.seriesIndex=e.seriesIndex,r.dataType=`edge`;var i=t.getModel(),o=i.getModel(`lineStyle`),l=o.get(`curveness`),f=t.node1.getLayout(),p=t.node1.getModel(),m=p.get(`localX`),h=p.get(`localY`),g=t.node2.getLayout(),_=t.node2.getModel(),v=_.get(`localX`),y=_.get(`localY`),b=t.getLayout(),x,S,C,w,T,E,D,O;n.shape.extent=Math.max(1,b.dy),n.shape.orient=d,d===`vertical`?(x=(m==null?f.x:m*s)+b.sy,S=(h==null?f.y:h*c)+f.dy,C=(v==null?g.x:v*s)+b.ty,w=y==null?g.y:y*c,T=x,E=S*(1-l)+w*l,D=C,O=S*l+w*(1-l)):(x=(m==null?f.x:m*s)+f.dx,S=(h==null?f.y:h*c)+b.sy,C=v==null?g.x:v*s,w=(y==null?g.y:y*c)+b.ty,T=x*(1-l)+C*l,E=S,D=x*l+C*(1-l),O=w),n.setShape({x1:x,y1:S,x2:C,y2:w,cpx1:T,cpy1:E,cpx2:D,cpy2:O}),n.useStyle(o.getItemStyle()),TK(n.style,d,t);var k=``+i.get(`value`),A=Rb(i,`edgeLabel`);Lb(n,A,{labelFetcher:{getFormattedLabel:function(t,n,r,i,a,o){return e.getFormattedLabel(t,n,`edge`,i,Js(a,A.normal&&A.normal.get(`formatter`),k),o)}},labelDataIndex:t.dataIndex,defaultText:k}),n.setTextConfig({position:`inside`});var j=i.getModel(`emphasis`);xv(n,i,`lineStyle`,function(e){var n=e.getItemStyle();return TK(n,d,t),n}),a.add(n),u.setItemGraphicEl(t.dataIndex,n);var ee=j.get(`focus`);_v(n,ee===`adjacency`?t.getAdjacentDataIndices():ee===`trajectory`?t.getTrajectoryDataIndices():ee,j.get(`blurScope`),j.get(`disabled`))}),i.eachNode(function(t){var n=t.getLayout(),r=t.getModel(),i=r.get(`localX`),o=r.get(`localY`),u=r.getModel(`emphasis`),d=r.get([`itemStyle`,`borderRadius`])||0,f=new e_({shape:{x:i==null?n.x:i*s,y:o==null?n.y:o*c,width:n.dx,height:n.dy,r:d},style:r.getModel(`itemStyle`).getItemStyle(),z2:10});Lb(f,Rb(r),{labelFetcher:{getFormattedLabel:function(t,n){return e.getFormattedLabel(t,n,`node`)}},labelDataIndex:t.dataIndex,defaultText:t.id}),f.disableLabelAnimation=!0,f.setStyle(`fill`,t.getVisual(`color`)),f.setStyle(`decal`,t.getVisual(`style`).decal),xv(f,r),a.add(f),l.setItemGraphicEl(t.dataIndex,f),y_(f).dataType=`node`;var p=u.get(`focus`);_v(f,p===`adjacency`?t.getAdjacentDataIndices():p===`trajectory`?t.getTrajectoryDataIndices():p,u.get(`blurScope`),u.get(`disabled`))}),l.eachItemGraphicEl(function(t,i){l.getItemModel(i).get(`draggable`)&&(t.drift=function(t,a){r._focusAdjacencyDisabled=!0,this.shape.x+=t,this.shape.y+=a,this.dirty(),n.dispatchAction({type:`dragNode`,seriesId:e.id,dataIndex:l.getRawIndex(i),localX:this.shape.x/s,localY:this.shape.y/c})},t.ondragend=function(){r._focusAdjacencyDisabled=!1},t.draggable=!0,t.cursor=`move`)}),!this._data&&e.isAnimationEnabled()&&a.setClipPath(EK(a.getBoundingRect(),e,function(){a.removeClipPath()})),this._data=e.getData()},t.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype._updateViewCoordSys=function(e,t){var n=e.layoutInfo,r=n.width,i=n.height,a=e.coordinateSystem=new fB(null,{api:t,ecModel:e.ecModel});a.zoomLimit=e.get(`scaleLimit`),a.setBoundingRect(0,0,r,i),a.setCenter(e.get(`center`)),a.setZoom(e.get(`zoom`)),this._controllerHost.target.attr({x:a.x,y:a.y,scaleX:a.scaleX,scaleY:a.scaleY})},t.type=`sankey`,t}(yE);function TK(e,t,n){switch(e.fill){case`source`:e.fill=n.node1.getVisual(`color`),e.decal=n.node1.getVisual(`style`).decal;break;case`target`:e.fill=n.node2.getVisual(`color`),e.decal=n.node2.getVisual(`style`).decal;break;case`gradient`:var r=n.node1.getVisual(`color`),i=n.node2.getVisual(`color`);H(r)&&H(i)&&(e.fill=new jy(0,0,+(t===`horizontal`),+(t===`vertical`),[{color:r,offset:0},{color:i,offset:1}]))}}function EK(e,t,n){var r=new e_({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return Gy(r,{shape:{width:e.width+20}},t,n),r}var DK=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(e,t){var n=e.edges||e.links||[],r=e.data||e.nodes||[],i=e.levels||[];this.levelModels=[];for(var a=this.levelModels,o=0;o<i.length;o++)if(i[o].depth!=null&&i[o].depth>=0)a[i[o].depth]=new ex(i[o],this,t);else if(process.env.NODE_ENV!==`production`)throw Error(`levels[i].depth is mandatory and should be natural number`);return tW(r,n,this,!0,s).data;function s(e,t){e.wrapMethod(`getItemModel`,function(e,t){var n=e.parentModel,r=n.getData().getItemLayout(t);if(r){var i=r.depth,a=n.levelModels[i];a&&(e.parentModel=a)}return e}),t.wrapMethod(`getItemModel`,function(e,t){var n=e.parentModel,r=n.getGraph().getEdgeByIndex(t).node1.getLayout();if(r){var i=r.depth,a=n.levelModels[i];a&&(e.parentModel=a)}return e})}},t.prototype.setNodePosition=function(e,t){var n=(this.option.data||this.option.nodes)[e];n.localX=t[0],n.localY=t[1]},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(e,t,n){function r(e){return isNaN(e)||e==null}if(n===`edge`){var i=this.getDataParams(e,n),a=i.data,o=i.value;return zT(`nameValue`,{name:a.source+` -- `+a.target,value:o,noValue:r(o)})}else{var s=this.getGraph().getNodeByIndex(e).getLayout().value,c=this.getDataParams(e,n).data.name;return zT(`nameValue`,{name:c==null?null:c+``,value:s,noValue:r(s)})}},t.prototype.optionUpdated=function(){},t.prototype.getDataParams=function(t,n){var r=e.prototype.getDataParams.call(this,t,n);return r.value==null&&n===`node`&&(r.value=this.getGraph().getNodeByIndex(t).getLayout().value),r},t.type=`series.sankey`,t.layoutMode=`box`,t.defaultOption={z:2,coordinateSystemUsage:`box`,left:`5%`,top:`5%`,right:`20%`,bottom:`5%`,orient:`horizontal`,nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,roam:!1,roamTrigger:`global`,center:null,zoom:1,label:{show:!0,position:`right`,fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:`justify`,lineStyle:{color:Z.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:Z.color.primary}},animationEasing:`linear`,animationDuration:1e3},t}(oE);function OK(e,t){e.eachSeriesByType(`sankey`,function(e){var n=e.get(`nodeWidth`),r=e.get(`nodeGap`),i=LS(e,t).refContainer,a=PS(e.getBoxLayoutParams(),i);e.layoutInfo=a;var o=a.width,s=a.height,c=e.getGraph(),l=c.nodes,u=c.edges;AK(l),kK(l,u,n,r,o,s,Fs(l,function(e){return e.getLayout().value===0}).length===0?e.get(`layoutIterations`):0,e.get(`orient`),e.get(`nodeAlign`))})}function kK(e,t,n,r,i,a,o,s,c){jK(e,t,n,i,a,s,c),IK(e,t,a,i,r,o,s),YK(e,s)}function AK(e){L(e,function(e){var t=qK(e.outEdges,KK),n=qK(e.inEdges,KK),r=e.getValue()||0,i=Math.max(t,n,r);e.setLayout({value:i},!0)})}function jK(e,t,n,r,i,a,o){for(var s=[],c=[],l=[],u=[],d=0,f=0;f<t.length;f++)s[f]=1;for(var f=0;f<e.length;f++)c[f]=e[f].inEdges.length,c[f]===0&&l.push(e[f]);for(var p=-1;l.length;){for(var m=0;m<l.length;m++){var h=l[m],g=h.hostGraph.data.getRawDataItem(h.dataIndex),_=g.depth!=null&&g.depth>=0;_&&g.depth>p&&(p=g.depth),h.setLayout({depth:_?g.depth:d},!0),a===`vertical`?h.setLayout({dy:n},!0):h.setLayout({dx:n},!0);for(var v=0;v<h.outEdges.length;v++){var y=h.outEdges[v],b=t.indexOf(y);s[b]=0;var x=y.node2,S=e.indexOf(x);--c[S]===0&&u.indexOf(x)<0&&u.push(x)}}++d,l=u,u=[]}for(var f=0;f<s.length;f++)if(s[f]===1)throw Error(`Sankey is a DAG, the original data has cycle!`);var C=p>d-1?p:d-1;o&&o!==`left`&&NK(e,o,a,C),FK(e,a===`vertical`?(i-n)/C:(r-n)/C,a)}function MK(e){var t=e.hostGraph.data.getRawDataItem(e.dataIndex);return t.depth!=null&&t.depth>=0}function NK(e,t,n,r){if(t===`right`){for(var i=[],a=e,o=0;a.length;){for(var s=0;s<a.length;s++){var c=a[s];c.setLayout({skNodeHeight:o},!0);for(var l=0;l<c.inEdges.length;l++){var u=c.inEdges[l];i.indexOf(u.node1)<0&&i.push(u.node1)}}a=i,i=[],++o}L(e,function(e){MK(e)||e.setLayout({depth:Math.max(0,r-e.getLayout().skNodeHeight)},!0)})}else t===`justify`&&PK(e,r)}function PK(e,t){L(e,function(e){!MK(e)&&!e.outEdges.length&&e.setLayout({depth:t},!0)})}function FK(e,t,n){L(e,function(e){var r=e.getLayout().depth*t;n===`vertical`?e.setLayout({y:r},!0):e.setLayout({x:r},!0)})}function IK(e,t,n,r,i,a,o){var s=LK(e,o);RK(s,t,n,r,i,o),zK(s,i,n,r,o);for(var c=1;a>0;a--)c*=.99,BK(s,c,o),zK(s,i,n,r,o),JK(s,c,o),zK(s,i,n,r,o)}function LK(e,t){var n=[],r=t===`vertical`?`y`:`x`,i=Nm(e,function(e){return e.getLayout()[r]});return i.keys.sort(function(e,t){return e-t}),L(i.keys,function(e){n.push(i.buckets.get(e))}),n}function RK(e,t,n,r,i,a){var o=1/0;L(e,function(e){var t=e.length,s=0;L(e,function(e){s+=e.getLayout().value});var c=a===`vertical`?(r-(t-1)*i)/s:(n-(t-1)*i)/s;c<o&&(o=c)}),L(e,function(e){L(e,function(e,t){var n=e.getLayout().value*o;a===`vertical`?(e.setLayout({x:t},!0),e.setLayout({dx:n},!0)):(e.setLayout({y:t},!0),e.setLayout({dy:n},!0))})}),L(t,function(e){var t=+e.getValue()*o;e.setLayout({dy:t},!0)})}function zK(e,t,n,r,i){var a=i===`vertical`?`x`:`y`;L(e,function(e){e.sort(function(e,t){return e.getLayout()[a]-t.getLayout()[a]});for(var o,s,c,l=0,u=e.length,d=i===`vertical`?`dx`:`dy`,f=0;f<u;f++)s=e[f],c=l-s.getLayout()[a],c>0&&(o=s.getLayout()[a]+c,i===`vertical`?s.setLayout({x:o},!0):s.setLayout({y:o},!0)),l=s.getLayout()[a]+s.getLayout()[d]+t;var p=i===`vertical`?r:n;if(c=l-t-p,c>0){o=s.getLayout()[a]-c,i===`vertical`?s.setLayout({x:o},!0):s.setLayout({y:o},!0),l=o;for(var f=u-2;f>=0;--f)s=e[f],c=s.getLayout()[a]+s.getLayout()[d]+t-l,c>0&&(o=s.getLayout()[a]-c,i===`vertical`?s.setLayout({x:o},!0):s.setLayout({y:o},!0)),l=s.getLayout()[a]}})}function BK(e,t,n){L(e.slice().reverse(),function(e){L(e,function(e){if(e.outEdges.length){var r=qK(e.outEdges,VK,n)/qK(e.outEdges,KK);if(isNaN(r)){var i=e.outEdges.length;r=i?qK(e.outEdges,HK,n)/i:0}if(n===`vertical`){var a=e.getLayout().x+(r-GK(e,n))*t;e.setLayout({x:a},!0)}else{var o=e.getLayout().y+(r-GK(e,n))*t;e.setLayout({y:o},!0)}}})})}function VK(e,t){return GK(e.node2,t)*e.getValue()}function HK(e,t){return GK(e.node2,t)}function UK(e,t){return GK(e.node1,t)*e.getValue()}function WK(e,t){return GK(e.node1,t)}function GK(e,t){return t===`vertical`?e.getLayout().x+e.getLayout().dx/2:e.getLayout().y+e.getLayout().dy/2}function KK(e){return e.getValue()}function qK(e,t,n){for(var r=0,i=e.length,a=-1;++a<i;){var o=+t(e[a],n);isNaN(o)||(r+=o)}return r}function JK(e,t,n){L(e,function(e){L(e,function(e){if(e.inEdges.length){var r=qK(e.inEdges,UK,n)/qK(e.inEdges,KK);if(isNaN(r)){var i=e.inEdges.length;r=i?qK(e.inEdges,WK,n)/i:0}if(n===`vertical`){var a=e.getLayout().x+(r-GK(e,n))*t;e.setLayout({x:a},!0)}else{var o=e.getLayout().y+(r-GK(e,n))*t;e.setLayout({y:o},!0)}}})})}function YK(e,t){var n=t===`vertical`?`x`:`y`;L(e,function(e){e.outEdges.sort(function(e,t){return e.node2.getLayout()[n]-t.node2.getLayout()[n]}),e.inEdges.sort(function(e,t){return e.node1.getLayout()[n]-t.node1.getLayout()[n]})}),L(e,function(e){var t=0,n=0;L(e.outEdges,function(e){e.setLayout({sy:t},!0),t+=e.getLayout().dy}),L(e.inEdges,function(e){e.setLayout({ty:n},!0),n+=e.getLayout().dy})})}function XK(e){e.eachSeriesByType(`sankey`,function(e){var t=e.getGraph(),n=t.nodes,r=t.edges;if(n.length){var i=1/0,a=-1/0;L(n,function(e){var t=e.getLayout().value;t<i&&(i=t),t>a&&(a=t)}),L(n,function(t){var n=new ZV({type:`color`,mappingMethod:`linear`,dataExtent:[i,a],visual:e.get(`color`)}).mapValueToVisual(t.getLayout().value),r=t.getModel().get([`itemStyle`,`color`]);r==null?(t.setVisual(`color`,n),t.setVisual(`style`,{fill:n})):(t.setVisual(`color`,r),t.setVisual(`style`,{fill:r}))})}r.length&&L(r,function(e){var t=e.getModel().get(`lineStyle`);e.setVisual(`style`,t)})})}function ZK(e){e.registerChartView(wK),e.registerSeriesModel(DK),e.registerLayout(OK),e.registerVisual(XK),e.registerAction({type:`dragNode`,event:`dragnode`,update:`update`},function(e,t){t.eachComponent({mainType:`series`,subType:`sankey`,query:e},function(t){t.setNodePosition(e.dataIndex,[e.localX,e.localY])})}),e.registerAction({type:`sankeyRoam`,event:`sankeyRoam`,update:`none`},function(e,t,n){t.eachComponent({mainType:`series`,subType:`sankey`,query:e},function(t){var n=t.coordinateSystem,r=XR(n,e,t.get(`scaleLimit`));t.setCenter(r.center),t.setZoom(r.zoom)})})}var QK=function(){function e(){}return e.prototype._hasEncodeRule=function(e){var t=this.getEncode();return t&&t.get(e)!=null},e.prototype.getInitialData=function(e,t){var n,r=t.getComponent(`xAxis`,this.get(`xAxisIndex`)),i=t.getComponent(`yAxis`,this.get(`yAxisIndex`)),a=r.get(`type`),o=i.get(`type`),s;a===`category`?(e.layout=`horizontal`,n=r.getOrdinalMeta(),s=!this._hasEncodeRule(`x`)):o===`category`?(e.layout=`vertical`,n=i.getOrdinalMeta(),s=!this._hasEncodeRule(`y`)):e.layout=e.layout||`horizontal`;var c=[`x`,`y`],l=e.layout===`horizontal`?0:1,u=this._baseAxisDim=c[l],d=c[1-l],f=[r,i],p=f[l].get(`type`),m=f[1-l].get(`type`),h=e.data;if(h&&s){var g=[];L(h,function(e,t){var n;B(e)?(n=e.slice(),e.unshift(t)):B(e.value)?(n=F({},e),n.value=n.value.slice(),e.value.unshift(t)):n=e,g.push(n)}),e.data=g}var _=this.defaultValueDimensions,v=[{name:u,type:Bk(p),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:[`base`]},{name:d,type:Bk(m),dimsDef:_.slice()}];return gI(this,{coordDimensions:v,dimensionsCount:_.length+1,encodeDefaulter:Rs(fC,v,this)})},e.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+`Axis`,this.get(e+`AxisIndex`)).axis},e}(),$K=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.defaultValueDimensions=[{name:`min`,defaultTooltip:!0},{name:`Q1`,defaultTooltip:!0},{name:`median`,defaultTooltip:!0},{name:`Q3`,defaultTooltip:!0},{name:`max`,defaultTooltip:!0}],n.visualDrawType=`stroke`,n}return t.type=`series.boxplot`,t.dependencies=[`xAxis`,`yAxis`,`grid`],t.defaultOption={z:2,coordinateSystem:`cartesian2d`,legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:Z.color.neutral00,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:Z.color.shadow}},animationDuration:800},t}(oE);Ms($K,QK,!0);var eq=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=e.getData(),i=this.group,a=this._data;this._data||i.removeAll();var o=+(e.get(`layout`)===`horizontal`);r.diff(a).add(function(e){if(r.hasValue(e)){var t=rq(r.getItemLayout(e),r,e,o,!0);r.setItemGraphicEl(e,t),i.add(t)}}).update(function(e,t){var n=a.getItemGraphicEl(t);if(!r.hasValue(e)){i.remove(n);return}var s=r.getItemLayout(e);n?(Xy(n),iq(s,n,r,e)):n=rq(s,r,e,o),i.add(n),r.setItemGraphicEl(e,n)}).remove(function(e){var t=a.getItemGraphicEl(e);t&&i.remove(t)}).execute(),this._data=r},t.prototype.remove=function(e){var t=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl(function(e){e&&t.remove(e)})},t.type=`boxplot`,t}(yE),tq=function(){function e(){}return e}(),nq=function(e){N(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`boxplotBoxPath`,n}return t.prototype.getDefaultShape=function(){return new tq},t.prototype.buildPath=function(e,t){var n=t.points,r=0;for(e.moveTo(n[r][0],n[r][1]),r++;r<4;r++)e.lineTo(n[r][0],n[r][1]);for(e.closePath();r<n.length;r++)e.moveTo(n[r][0],n[r][1]),r++,e.lineTo(n[r][0],n[r][1])},t}(Bg);function rq(e,t,n,r,i){var a=e.ends,o=new nq({shape:{points:i?aq(a,r,e):a}});return iq(e,o,t,n,i),o}function iq(e,t,n,r,i){var a=n.hostModel,o=Zy[i?`initProps`:`updateProps`];o(t,{shape:{points:e.ends}},a,r),t.useStyle(n.getItemVisual(r,`style`)),t.style.strokeNoScale=!0,t.z2=100;var s=n.getItemModel(r),c=s.getModel(`emphasis`);xv(t,s),_v(t,c.get(`focus`),c.get(`blurScope`),c.get(`disabled`))}function aq(e,t,n){return R(e,function(e){return e=e.slice(),e[t]=n.initBaseline,e})}var oq=L;function sq(e){oq(cq(e),function(e){var t=e.seriesModels;t.length&&(lq(e),oq(t,function(t,n){uq(t,e.boxOffsetList[n],e.boxWidthList[n])}))})}function cq(e){var t=[],n=[];return e.eachSeriesByType(`boxplot`,function(e){var r=e.getBaseAxis(),i=js(n,r);i<0&&(i=n.length,n[i]=r,t[i]={axis:r,seriesModels:[]}),t[i].seriesModels.push(e)}),t}function lq(e){var t=e.axis,n=e.seriesModels,r=n.length,i=e.boxWidthList=[],a=e.boxOffsetList=[],o=[],s;if(t.type===`category`)s=t.getBandWidth();else{var c=0;oq(n,function(e){c=Math.max(c,e.getData().count())});var l=t.getExtent();s=Math.abs(l[1]-l[0])/c}oq(n,function(e){var t=e.get(`boxWidth`);B(t)||(t=[t,t]),o.push([X(t[0],s)||0,X(t[1],s)||0])});var u=s*.8-2,d=u/r*.3,f=(u-d*(r-1))/r,p=f/2-u/2;oq(n,function(e,t){a.push(p),p+=d+f,i.push(Math.min(Math.max(f,o[t][0]),o[t][1]))})}function uq(e,t,n){var r=e.coordinateSystem,i=e.getData(),a=n/2,o=e.get(`layout`)===`horizontal`?0:1,s=1-o,c=[`x`,`y`],l=i.mapDimension(c[o]),u=i.mapDimensionsAll(c[s]);if(l==null||u.length<5)return;for(var d=0;d<i.count();d++){var f=i.get(l,d),p=y(f,u[2],d),m=y(f,u[0],d),h=y(f,u[1],d),g=y(f,u[3],d),_=y(f,u[4],d),v=[];b(v,h,!1),b(v,g,!0),v.push(m,h,_,g),x(v,m),x(v,_),x(v,p),i.setItemLayout(d,{initBaseline:p[s],ends:v})}function y(e,n,a){var c=i.get(n,a),l=[];l[o]=e,l[s]=c;var u;return isNaN(e)||isNaN(c)?u=[NaN,NaN]:(u=r.dataToPoint(l),u[o]+=t),u}function b(e,t,n){var r=t.slice(),i=t.slice();r[o]+=a,i[o]-=a,n?e.push(r,i):e.push(i,r)}function x(e,t){var n=t.slice(),r=t.slice();n[o]-=a,r[o]+=a,e.push(n,r)}}function dq(e,t){t||={};for(var n=[],r=[],i=t.boundIQR,a=i===`none`||i===0,o=0;o<e.length;o++){var s=Tp(e[o].slice()),c=Pp(s,.25),l=Pp(s,.5),u=Pp(s,.75),d=s[0],f=s[s.length-1],p=(i??1.5)*(u-c),m=a?d:Math.max(d,c-p),h=a?f:Math.min(f,u+p),g=t.itemNameFormatter,_=V(g)?g({value:o}):H(g)?g.replace(`{value}`,o+``):o+``;n.push([_,m,c,l,u,h]);for(var v=0;v<s.length;v++){var y=s[v];if(y<m||y>h){var b=[_,y];r.push(b)}}}return{boxData:n,outliers:r}}var fq={type:`echarts:boxplot`,transform:function(e){var t=e.upstream;if(t.sourceFormat!==`arrayRows`){var n=``;process.env.NODE_ENV!==`production`&&(n=Jp(`source data is not applicable for this boxplot transform. Expect number[][].`)),Yp(n)}var r=dq(t.getRawData(),e.config);return[{dimensions:[`ItemName`,`Low`,`Q1`,`Q2`,`Q3`,`High`],data:r.boxData},{data:r.outliers}]}};function pq(e){e.registerSeriesModel($K),e.registerChartView(eq),e.registerLayout(sq),e.registerTransform(fq)}var mq=[`itemStyle`,`borderColor`],hq=[`itemStyle`,`borderColor0`],gq=[`itemStyle`,`borderColorDoji`],_q=[`itemStyle`,`color`],vq=[`itemStyle`,`color0`];function yq(e,t){return t.get(e>0?_q:vq)}function bq(e,t){return t.get(e===0?gq:e>0?mq:hq)}var xq={seriesType:`candlestick`,plan:gE(),performRawSeries:!0,reset:function(e,t){if(!t.isSeriesFiltered(e))return!e.pipelineContext.large&&{progress:function(e,t){for(var n;(n=e.next())!=null;){var r=t.getItemModel(n),i=t.getItemLayout(n).sign,a=r.getItemStyle();a.fill=yq(i,r),a.stroke=bq(i,r)||a.fill,F(t.ensureUniqueItemVisual(n,`style`),a)}}}}},Sq=[`color`,`borderColor`],Cq=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(e),this._isLargeDraw?this._renderLarge(e):this._renderNormal(e)},t.prototype.incrementalPrepareRender=function(e,t,n){this._clear(),this._updateDrawMode(e)},t.prototype.incrementalRender=function(e,t,n,r){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(e,t):this._incrementalRenderNormal(e,t)},t.prototype.eachRendered=function(e){Tb(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;(this._isLargeDraw==null||t!==this._isLargeDraw)&&(this._isLargeDraw=t,this._clear())},t.prototype._renderNormal=function(e){var t=e.getData(),n=this._data,r=this.group,i=t.getLayout(`isSimpleBox`),a=e.get(`clip`,!0),o=e.coordinateSystem,s=o.getArea&&o.getArea();this._data||r.removeAll(),t.diff(n).add(function(n){if(t.hasValue(n)){var o=t.getItemLayout(n);if(a&&Dq(s,o))return;var c=Eq(o,n,!0);Gy(c,{shape:{points:o.ends}},e,n),Oq(c,t,n,i),r.add(c),t.setItemGraphicEl(n,c)}}).update(function(o,c){var l=n.getItemGraphicEl(c);if(!t.hasValue(o)){r.remove(l);return}var u=t.getItemLayout(o);if(a&&Dq(s,u)){r.remove(l);return}l?(Wy(l,{shape:{points:u.ends}},e,o),Xy(l)):l=Eq(u,o),Oq(l,t,o,i),r.add(l),t.setItemGraphicEl(o,l)}).remove(function(e){var t=n.getItemGraphicEl(e);t&&r.remove(t)}).execute(),this._data=t},t.prototype._renderLarge=function(e){this._clear(),Mq(e,this.group);var t=e.get(`clip`,!0)?AF(e.coordinateSystem,!1,e):null;t?this.group.setClipPath(t):this.group.removeClipPath()},t.prototype._incrementalRenderNormal=function(e,t){for(var n=t.getData(),r=n.getLayout(`isSimpleBox`),i;(i=e.next())!=null;){var a=Eq(n.getItemLayout(i),i);Oq(a,n,i,r),a.incremental=!0,this.group.add(a),this._progressiveEls.push(a)}},t.prototype._incrementalRenderLarge=function(e,t){Mq(t,this.group,this._progressiveEls,!0)},t.prototype.remove=function(e){this._clear()},t.prototype._clear=function(){this.group.removeAll(),this._data=null},t.type=`candlestick`,t}(yE),wq=function(){function e(){}return e}(),Tq=function(e){N(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`normalCandlestickBox`,n}return t.prototype.getDefaultShape=function(){return new wq},t.prototype.buildPath=function(e,t){var n=t.points;this.__simpleBox?(e.moveTo(n[4][0],n[4][1]),e.lineTo(n[6][0],n[6][1])):(e.moveTo(n[0][0],n[0][1]),e.lineTo(n[1][0],n[1][1]),e.lineTo(n[2][0],n[2][1]),e.lineTo(n[3][0],n[3][1]),e.closePath(),e.moveTo(n[4][0],n[4][1]),e.lineTo(n[5][0],n[5][1]),e.moveTo(n[6][0],n[6][1]),e.lineTo(n[7][0],n[7][1]))},t}(Bg);function Eq(e,t,n){var r=e.ends;return new Tq({shape:{points:n?kq(r,e):r},z2:100})}function Dq(e,t){for(var n=!0,r=0;r<t.ends.length;r++)if(e.contain(t.ends[r][0],t.ends[r][1])){n=!1;break}return n}function Oq(e,t,n,r){var i=t.getItemModel(n);e.useStyle(t.getItemVisual(n,`style`)),e.style.strokeNoScale=!0,e.__simpleBox=r,xv(e,i);var a=t.getItemLayout(n).sign;L(e.states,function(e,t){var n=i.getModel(t),r=yq(a,n),o=bq(a,n)||r,s=e.style||={};r&&(s.fill=r),o&&(s.stroke=o)});var o=i.getModel(`emphasis`);_v(e,o.get(`focus`),o.get(`blurScope`),o.get(`disabled`))}function kq(e,t){return R(e,function(e){return e=e.slice(),e[1]=t.initBaseline,e})}var Aq=function(){function e(){}return e}(),jq=function(e){N(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`largeCandlestickBox`,n}return t.prototype.getDefaultShape=function(){return new Aq},t.prototype.buildPath=function(e,t){for(var n=t.points,r=0;r<n.length;)if(this.__sign===n[r++]){var i=n[r++];e.moveTo(i,n[r++]),e.lineTo(i,n[r++])}else r+=3},t}(Bg);function Mq(e,t,n,r){var i=e.getData(),a=i.getLayout(`largePoints`),o=new jq({shape:{points:a},__sign:1,ignoreCoarsePointer:!0});t.add(o);var s=new jq({shape:{points:a},__sign:-1,ignoreCoarsePointer:!0});t.add(s);var c=new jq({shape:{points:a},__sign:0,ignoreCoarsePointer:!0});t.add(c),Nq(1,o,e,i),Nq(-1,s,e,i),Nq(0,c,e,i),r&&(o.incremental=!0,s.incremental=!0),n&&n.push(o,s)}function Nq(e,t,n,r){var i=bq(e,n)||yq(e,n),a=n.getModel(`itemStyle`).getItemStyle(Sq);t.useStyle(a),t.style.fill=null,t.style.stroke=i}var Pq=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.defaultValueDimensions=[{name:`open`,defaultTooltip:!0},{name:`close`,defaultTooltip:!0},{name:`lowest`,defaultTooltip:!0},{name:`highest`,defaultTooltip:!0}],n}return t.prototype.getShadowDim=function(){return`open`},t.prototype.brushSelector=function(e,t,n){var r=t.getItemLayout(e);return r&&n.rect(r.brushRect)},t.type=`series.candlestick`,t.dependencies=[`xAxis`,`yAxis`,`grid`],t.defaultOption={z:2,coordinateSystem:`cartesian2d`,legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:`#eb5454`,color0:`#47b262`,borderColor:`#eb5454`,borderColor0:`#47b262`,borderColorDoji:null,borderWidth:1},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:`mod`,animationEasing:`linear`,animationDuration:300},t}(oE);Ms(Pq,QK,!0);function Fq(e){!e||!B(e.series)||L(e.series,function(e){U(e)&&e.type===`k`&&(e.type=`candlestick`)})}var Iq={seriesType:`candlestick`,plan:gE(),reset:function(e){var t=e.coordinateSystem,n=e.getData(),r=Rq(e,n),i=0,a=1,o=[`x`,`y`],s=n.getDimensionIndex(n.mapDimension(o[i])),c=R(n.mapDimensionsAll(o[a]),n.getDimensionIndex,n),l=c[0],u=c[1],d=c[2],f=c[3];if(n.setLayout({candleWidth:r,isSimpleBox:r<=1.3}),s<0||c.length<4)return;return{progress:e.pipelineContext.large?m:p};function p(e,n){for(var o,c=n.getStore();(o=e.next())!=null;){var p=c.get(s,o),m=c.get(l,o),h=c.get(u,o),g=c.get(d,o),_=c.get(f,o),v=Math.min(m,h),y=Math.max(m,h),b=E(v,p),x=E(y,p),S=E(g,p),C=E(_,p),w=[];D(w,x,0),D(w,b,1),w.push(k(C),k(x),k(S),k(b));var T=!!n.getItemModel(o).get([`itemStyle`,`borderColorDoji`]);n.setItemLayout(o,{sign:Lq(c,o,m,h,u,T),initBaseline:m>h?x[a]:b[a],ends:w,brushRect:O(g,_,p)})}function E(e,n){var r=[];return r[i]=n,r[a]=e,isNaN(n)||isNaN(e)?[NaN,NaN]:t.dataToPoint(r)}function D(e,t,n){var a=t.slice(),o=t.slice();a[i]=lb(a[i]+r/2,1,!1),o[i]=lb(o[i]-r/2,1,!0),n?e.push(a,o):e.push(o,a)}function O(e,t,n){var o=E(e,n),s=E(t,n);return o[i]-=r/2,s[i]-=r/2,{x:o[0],y:o[1],width:a?r:s[0]-o[0],height:a?s[1]-o[1]:r}}function k(e){return e[i]=lb(e[i],1),e}}function m(n,r){for(var o=YA(n.count*4),c=0,p,m=[],h=[],g,_=r.getStore(),v=!!e.get([`itemStyle`,`borderColorDoji`]);(g=n.next())!=null;){var y=_.get(s,g),b=_.get(l,g),x=_.get(u,g),S=_.get(d,g),C=_.get(f,g);if(isNaN(y)||isNaN(S)||isNaN(C)){o[c++]=NaN,c+=3;continue}o[c++]=Lq(_,g,b,x,u,v),m[i]=y,m[a]=S,p=t.dataToPoint(m,null,h),o[c++]=p?p[0]:NaN,o[c++]=p?p[1]:NaN,m[a]=C,p=t.dataToPoint(m,null,h),o[c++]=p?p[1]:NaN}r.setLayout(`largePoints`,o)}}};function Lq(e,t,n,r,i,a){return n>r?-1:n<r?1:a?0:t>0?e.get(i,t-1)<=r?1:-1:1}function Rq(e,t){var n=e.getBaseAxis(),r,i=n.type===`category`?n.getBandWidth():(r=n.getExtent(),Math.abs(r[1]-r[0])/t.count()),a=X(W(e.get(`barMaxWidth`),i),i),o=X(W(e.get(`barMinWidth`),1),i),s=e.get(`barWidth`);return s==null?Math.max(Math.min(i/2,a),o):X(s,i)}function zq(e){e.registerChartView(Cq),e.registerSeriesModel(Pq),e.registerPreprocessor(Fq),e.registerVisual(xq),e.registerLayout(Iq)}function Bq(e,t){var n=t.rippleEffectColor||t.color;e.eachChild(function(e){e.attr({z:t.z,zlevel:t.zlevel,style:{stroke:t.brushType===`stroke`?n:null,fill:t.brushType===`fill`?n:null}})})}var Vq=function(e){N(t,e);function t(t,n){var r=e.call(this)||this,i=new hF(t,n),a=new Y;return r.add(i),r.add(a),r.updateData(t,n),r}return t.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},t.prototype.startEffectAnimation=function(e){for(var t=e.symbolType,n=e.color,r=e.rippleNumber,i=this.childAt(1),a=0;a<r;a++){var o=nD(t,-1,-1,2,2,n);o.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var s=-a/r*e.period+e.effectOffset;o.animate(``,!0).when(e.period,{scaleX:e.rippleScale/2,scaleY:e.rippleScale/2}).delay(s).start(),o.animateStyle(!0).when(e.period,{opacity:0}).delay(s).start(),i.add(o)}Bq(i,e)},t.prototype.updateEffectAnimation=function(e){for(var t=this._effectCfg,n=this.childAt(1),r=[`symbolType`,`period`,`rippleScale`,`rippleNumber`],i=0;i<r.length;i++){var a=r[i];if(t[a]!==e[a]){this.stopEffectAnimation(),this.startEffectAnimation(e);return}}Bq(n,e)},t.prototype.highlight=function(){Q_(this)},t.prototype.downplay=function(){$_(this)},t.prototype.getSymbolType=function(){var e=this.childAt(0);return e&&e.getSymbolType()},t.prototype.updateData=function(e,t){var n=this,r=e.hostModel;this.childAt(0).updateData(e,t);var i=this.childAt(1),a=e.getItemModel(t),o=e.getItemVisual(t,`symbol`),s=rD(e.getItemVisual(t,`symbolSize`)),c=e.getItemVisual(t,`style`),l=c&&c.fill,u=a.getModel(`emphasis`);i.setScale(s),i.traverse(function(e){e.setStyle(`fill`,l)});var d=iD(e.getItemVisual(t,`symbolOffset`),s);d&&(i.x=d[0],i.y=d[1]),i.rotation=(e.getItemVisual(t,`symbolRotate`)||0)*Math.PI/180||0;var f={};f.showEffectOn=r.get(`showEffectOn`),f.rippleScale=a.get([`rippleEffect`,`scale`]),f.brushType=a.get([`rippleEffect`,`brushType`]),f.period=a.get([`rippleEffect`,`period`])*1e3,f.effectOffset=t/e.count(),f.z=r.getShallow(`z`)||0,f.zlevel=r.getShallow(`zlevel`)||0,f.symbolType=o,f.color=l,f.rippleEffectColor=a.get([`rippleEffect`,`color`]),f.rippleNumber=a.get([`rippleEffect`,`number`]),f.showEffectOn===`render`?(this._effectCfg?this.updateEffectAnimation(f):this.startEffectAnimation(f),this._effectCfg=f):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(e){e===`emphasis`?f.showEffectOn!==`render`&&n.startEffectAnimation(f):e===`normal`&&f.showEffectOn!==`render`&&n.stopEffectAnimation()}),this._effectCfg=f,_v(this,u.get(`focus`),u.get(`blurScope`),u.get(`disabled`))},t.prototype.fadeOut=function(e){e&&e()},t}(Y),Hq=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(){this._symbolDraw=new yF(Vq)},t.prototype.render=function(e,t,n){var r=e.getData(),i=this._symbolDraw;i.updateData(r,{clipShape:this._getClipShape(e)}),this.group.add(i.group)},t.prototype._getClipShape=function(e){var t=e.coordinateSystem,n=t&&t.getArea&&t.getArea();return e.get(`clip`,!0)?n:null},t.prototype.updateTransform=function(e,t,n){var r=e.getData();this.group.dirty();var i=BF(``).reset(e,t,n);i.progress&&i.progress({start:0,end:r.count(),count:r.count()},r),this._symbolDraw.updateLayout()},t.prototype._updateGroupTransform=function(e){var t=e.coordinateSystem;t&&t.getRoamTransform&&(this.group.transform=bte(t.getRoamTransform()),this.group.decomposeTransform())},t.prototype.remove=function(e,t){this._symbolDraw&&this._symbolDraw.remove(!0)},t.type=`effectScatter`,t}(yE),Uq=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return t.prototype.getInitialData=function(e,t){return TA(null,this,{useEncodeDefaulter:!0})},t.prototype.brushSelector=function(e,t,n){return n.point(t.getItemLayout(e))},t.type=`series.effectScatter`,t.dependencies=[`grid`,`polar`],t.defaultOption={coordinateSystem:`cartesian2d`,z:2,legendHoverLink:!0,effectType:`ripple`,progressive:0,showEffectOn:`render`,clip:!0,rippleEffect:{period:4,scale:2.5,brushType:`fill`,number:3},universalTransition:{divideShape:`clone`},symbolSize:10},t}(oE);function Wq(e){e.registerChartView(Hq),e.registerSeriesModel(Uq),e.registerLayout(BF(`effectScatter`))}var Gq=function(e){N(t,e);function t(t,n,r){var i=e.call(this)||this;return i.add(i.createLine(t,n,r)),i._updateEffectSymbol(t,n),i}return t.prototype.createLine=function(e,t,n){return new jU(e,t,n)},t.prototype._updateEffectSymbol=function(e,t){var n=e.getItemModel(t).getModel(`effect`),r=n.get(`symbolSize`),i=n.get(`symbol`);B(r)||(r=[r,r]);var a=e.getItemVisual(t,`style`),o=n.get(`color`)||a&&a.stroke,s=this.childAt(1);this._symbolType!==i&&(this.remove(s),s=nD(i,-.5,-.5,1,1,o),s.z2=100,s.culling=!0,this.add(s)),s&&(s.setStyle(`shadowColor`,o),s.setStyle(n.getItemStyle([`color`])),s.scaleX=r[0],s.scaleY=r[1],s.setColor(o),this._symbolType=i,this._symbolScale=r,this._updateEffectAnimation(e,n,t))},t.prototype._updateEffectAnimation=function(e,t,n){var r=this.childAt(1);if(r){var i=e.getItemLayout(n),a=t.get(`period`)*1e3,o=t.get(`loop`),s=t.get(`roundTrip`),c=t.get(`constantSpeed`),l=qs(t.get(`delay`),function(t){return t/e.count()*a/3});if(r.ignore=!0,this._updateAnimationPoints(r,i),c>0&&(a=this._getLineLength(r)/c*1e3),a!==this._period||o!==this._loop||s!==this._roundTrip){r.stopAnimation();var u=void 0;u=V(l)?l(n):l,r.__t>0&&(u=-a*r.__t),this._animateSymbol(r,a,u,o,s)}this._period=a,this._loop=o,this._roundTrip=s}},t.prototype._animateSymbol=function(e,t,n,r,i){if(t>0){e.__t=0;var a=this,o=e.animate(``,r).when(i?t*2:t,{__t:i?2:1}).delay(n).during(function(){a._updateSymbolPosition(e)});r||o.done(function(){a.remove(e)}),o.start()}},t.prototype._getLineLength=function(e){return xc(e.__p1,e.__cp1)+xc(e.__cp1,e.__p2)},t.prototype._updateAnimationPoints=function(e,t){e.__p1=t[0],e.__p2=t[1],e.__cp1=t[2]||[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]},t.prototype.updateData=function(e,t,n){this.childAt(0).updateData(e,t,n),this._updateEffectSymbol(e,t)},t.prototype._updateSymbolPosition=function(e){var t=e.__p1,n=e.__p2,r=e.__cp1,i=e.__t<1?e.__t:2-e.__t,a=[e.x,e.y],o=a.slice(),s=Cu,c=wu;a[0]=s(t[0],r[0],n[0],i),a[1]=s(t[1],r[1],n[1],i);var l=e.__t<1?c(t[0],r[0],n[0],i):c(n[0],r[0],t[0],1-i),u=e.__t<1?c(t[1],r[1],n[1],i):c(n[1],r[1],t[1],1-i);e.rotation=-Math.atan2(u,l)-Math.PI/2,(this._symbolType===`line`||this._symbolType===`rect`||this._symbolType===`roundRect`)&&(e.__lastT!==void 0&&e.__lastT<e.__t?(e.scaleY=xc(o,a)*1.05,i===1&&(a[0]=o[0]+(a[0]-o[0])/2,a[1]=o[1]+(a[1]-o[1])/2)):e.__lastT===1?e.scaleY=2*xc(t,a):e.scaleY=this._symbolScale[1]),e.__lastT=e.__t,e.ignore=!1,e.x=a[0],e.y=a[1]},t.prototype.updateLayout=function(e,t){this.childAt(0).updateLayout(e,t);var n=e.getItemModel(t).getModel(`effect`);this._updateEffectAnimation(e,n,t)},t}(Y),Kq=function(e){N(t,e);function t(t,n,r){var i=e.call(this)||this;return i._createPolyline(t,n,r),i}return t.prototype._createPolyline=function(e,t,n){var r=new Cy({shape:{points:e.getItemLayout(t)}});this.add(r),this._updateCommonStl(e,t,n)},t.prototype.updateData=function(e,t,n){var r=e.hostModel;Wy(this.childAt(0),{shape:{points:e.getItemLayout(t)}},r,t),this._updateCommonStl(e,t,n)},t.prototype._updateCommonStl=function(e,t,n){var r=this.childAt(0),i=e.getItemModel(t),a=n&&n.emphasisLineStyle,o=n&&n.focus,s=n&&n.blurScope,c=n&&n.emphasisDisabled;if(!n||e.hasItemOption){var l=i.getModel(`emphasis`);a=l.getModel(`lineStyle`).getLineStyle(),c=l.get(`disabled`),o=l.get(`focus`),s=l.get(`blurScope`)}r.useStyle(e.getItemVisual(t,`style`)),r.style.fill=null,r.style.strokeNoScale=!0;var u=r.ensureState(`emphasis`);u.style=a,_v(this,o,s,c)},t.prototype.updateLayout=function(e,t){this.childAt(0).setShape(`points`,e.getItemLayout(t))},t}(Y),qq=function(e){N(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t._lastFrame=0,t._lastFramePercent=0,t}return t.prototype.createLine=function(e,t,n){return new Kq(e,t,n)},t.prototype._updateAnimationPoints=function(e,t){this._points=t;for(var n=[0],r=0,i=1;i<t.length;i++){var a=t[i-1],o=t[i];r+=xc(a,o),n.push(r)}if(r===0){this._length=0;return}for(var i=0;i<n.length;i++)n[i]/=r;this._offsets=n,this._length=r},t.prototype._getLineLength=function(){return this._length},t.prototype._updateSymbolPosition=function(e){var t=e.__t<1?e.__t:2-e.__t,n=this._points,r=this._offsets,i=n.length;if(r){var a=this._lastFrame,o;if(t<this._lastFramePercent){for(o=Math.min(a+1,i-1);o>=0&&!(r[o]<=t);o--);o=Math.min(o,i-2)}else{for(o=a;o<i&&!(r[o]>t);o++);o=Math.min(o-1,i-2)}var s=(t-r[o])/(r[o+1]-r[o]),c=n[o],l=n[o+1];e.x=c[0]*(1-s)+s*l[0],e.y=c[1]*(1-s)+s*l[1];var u=e.__t<1?l[0]-c[0]:c[0]-l[0],d=e.__t<1?l[1]-c[1]:c[1]-l[1];e.rotation=-Math.atan2(d,u)-Math.PI/2,this._lastFrame=o,this._lastFramePercent=t,e.ignore=!1}},t}(Gq),Jq=function(){function e(){this.polyline=!1,this.curveness=0,this.segs=[]}return e}(),Yq=function(e){N(t,e);function t(t){var n=e.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.getDefaultStyle=function(){return{stroke:Z.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new Jq},t.prototype.buildPath=function(e,t){var n=t.segs,r=t.curveness,i;if(t.polyline)for(i=this._off;i<n.length;){var a=n[i++];if(a>0){e.moveTo(n[i++],n[i++]);for(var o=1;o<a;o++)e.lineTo(n[i++],n[i++])}}else for(i=this._off;i<n.length;){var s=n[i++],c=n[i++],l=n[i++],u=n[i++];if(e.moveTo(s,c),r>0){var d=(s+l)/2-(c-u)*r,f=(c+u)/2-(l-s)*r;e.quadraticCurveTo(d,f,l,u)}else e.lineTo(l,u)}this.incremental&&(this._off=i,this.notClear=!0)},t.prototype.findDataIndex=function(e,t){var n=this.shape,r=n.segs,i=n.curveness,a=this.style.lineWidth;if(n.polyline)for(var o=0,s=0;s<r.length;){var c=r[s++];if(c>0)for(var l=r[s++],u=r[s++],d=1;d<c;d++){var f=r[s++],p=r[s++];if(gg(l,u,f,p,a,e,t))return o}o++}else for(var o=0,s=0;s<r.length;){var l=r[s++],u=r[s++],f=r[s++],p=r[s++];if(i>0){if(vg(l,u,(l+f)/2-(u-p)*i,(u+p)/2-(f-l)*i,f,p,a,e,t))return o}else if(gg(l,u,f,p,a,e,t))return o;o++}return-1},t.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)},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var t=this.shape.segs,n=1/0,r=1/0,i=-1/0,a=-1/0,o=0;o<t.length;){var s=t[o++],c=t[o++];n=Math.min(s,n),i=Math.max(s,i),r=Math.min(c,r),a=Math.max(c,a)}e=this._rect=new Ol(n,r,i,a)}return e},t}(Bg),Xq=function(){function e(){this.group=new Y}return e.prototype.updateData=function(e){this._clear();var t=this._create();t.setShape({segs:e.getLayout(`linesPoints`)}),this._setCommon(t,e)},e.prototype.incrementalPrepareUpdate=function(e){this.group.removeAll(),this._clear()},e.prototype.incrementalUpdate=function(e,t){var n=this._newAdded[0],r=t.getLayout(`linesPoints`),i=n&&n.shape.segs;if(i&&i.length<2e4){var a=i.length,o=new Float32Array(a+r.length);o.set(i),o.set(r,a),n.setShape({segs:o})}else{this._newAdded=[];var s=this._create();s.incremental=!0,s.setShape({segs:r}),this._setCommon(s,t),s.__startIndex=e.start}},e.prototype.remove=function(){this._clear()},e.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},e.prototype._create=function(){var e=new Yq({cursor:`default`,ignoreCoarsePointer:!0});return this._newAdded.push(e),this.group.add(e),e},e.prototype._setCommon=function(e,t,n){var r=t.hostModel;e.setShape({polyline:r.get(`polyline`),curveness:r.get([`lineStyle`,`curveness`])}),e.useStyle(r.getModel(`lineStyle`).getLineStyle()),e.style.strokeNoScale=!0;var i=t.getVisual(`style`);i&&i.stroke&&e.setStyle(`stroke`,i.stroke),e.setStyle(`fill`,null);var a=y_(e);a.seriesIndex=r.seriesIndex,e.on(`mousemove`,function(t){a.dataIndex=null;var n=e.hoverDataIdx;n>0&&(a.dataIndex=n+e.__startIndex)})},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),Zq={seriesType:`lines`,plan:gE(),reset:function(e){var t=e.coordinateSystem;if(!t){process.env.NODE_ENV!==`production`&&Gp(`The lines series must have a coordinate system.`);return}var n=e.get(`polyline`),r=e.pipelineContext.large;return{progress:function(i,a){var o=[];if(r){var s=void 0,c=i.end-i.start;if(n){for(var l=0,u=i.start;u<i.end;u++)l+=e.getLineCoordsCount(u);s=new Float32Array(c+l*2)}else s=new Float32Array(c*4);for(var d=0,f=[],u=i.start;u<i.end;u++){var p=e.getLineCoords(u,o);n&&(s[d++]=p);for(var m=0;m<p;m++)f=t.dataToPoint(o[m],!1,f),s[d++]=f[0],s[d++]=f[1]}a.setLayout(`linesPoints`,s)}else for(var u=i.start;u<i.end;u++){var h=a.getItemModel(u),p=e.getLineCoords(u,o),g=[];if(n)for(var _=0;_<p;_++)g.push(t.dataToPoint(o[_]));else{g[0]=t.dataToPoint(o[0]),g[1]=t.dataToPoint(o[1]);var v=h.get([`lineStyle`,`curveness`]);+v&&(g[2]=[(g[0][0]+g[1][0])/2-(g[0][1]-g[1][1])*v,(g[0][1]+g[1][1])/2-(g[1][0]-g[0][0])*v])}a.setItemLayout(u,g)}}}}},Qq=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=e.getData(),i=this._updateLineDraw(r,e),a=e.get(`zlevel`),o=e.get([`effect`,`trailLength`]),s=n.getZr(),c=s.painter.getType()===`svg`;c||s.painter.getLayer(a).clear(!0),this._lastZlevel!=null&&!c&&s.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(e)&&o>0&&(c?process.env.NODE_ENV!==`production`&&console.warn(`SVG render mode doesn't support lines with trail effect`):s.configLayer(a,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(o/10+.9,1),0)})),i.updateData(r);var l=e.get(`clip`,!0)&&AF(e.coordinateSystem,!1,e);l?this.group.setClipPath(l):this.group.removeClipPath(),this._lastZlevel=a,this._finished=!0},t.prototype.incrementalPrepareRender=function(e,t,n){var r=e.getData();this._updateLineDraw(r,e).incrementalPrepareUpdate(r),this._clearLayer(n),this._finished=!1},t.prototype.incrementalRender=function(e,t,n){this._lineDraw.incrementalUpdate(e,t.getData()),this._finished=e.end===t.getData().count()},t.prototype.eachRendered=function(e){this._lineDraw&&this._lineDraw.eachRendered(e)},t.prototype.updateTransform=function(e,t,n){var r=e.getData(),i=e.pipelineContext;if(!this._finished||i.large||i.progressiveRender)return{update:!0};var a=Zq.reset(e,t,n);a.progress&&a.progress({start:0,end:r.count(),count:r.count()},r),this._lineDraw.updateLayout(),this._clearLayer(n)},t.prototype._updateLineDraw=function(e,t){var n=this._lineDraw,r=this._showEffect(t),i=!!t.get(`polyline`),a=t.pipelineContext.large;return process.env.NODE_ENV!==`production`&&r&&a&&console.warn(`Large lines not support effect`),(!n||r!==this._hasEffet||i!==this._isPolyline||a!==this._isLargeDraw)&&(n&&n.remove(),n=this._lineDraw=a?new Xq:new MU(i?r?qq:Kq:r?Gq:jU),this._hasEffet=r,this._isPolyline=i,this._isLargeDraw=a),this.group.add(n.group),n},t.prototype._showEffect=function(e){return!!e.get([`effect`,`show`])},t.prototype._clearLayer=function(e){var t=e.getZr();t.painter.getType()!==`svg`&&this._lastZlevel!=null&&t.painter.getLayer(this._lastZlevel).clear(!0)},t.prototype.remove=function(e,t){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(t)},t.prototype.dispose=function(e,t){this.remove(e,t)},t.type=`lines`,t}(yE),$q=typeof Uint32Array>`u`?Array:Uint32Array,eJ=typeof Float64Array>`u`?Array:Float64Array;function tJ(e){var t=e.data;t&&t[0]&&t[0][0]&&t[0][0].coord&&(process.env.NODE_ENV!==`production`&&console.warn(`Lines data configuration has been changed to { coords:[[1,2],[2,3]] }`),e.data=R(t,function(e){var t={coords:[e[0].coord,e[1].coord]};return e[0].name&&(t.fromName=e[0].name),e[1].name&&(t.toName=e[1].name),As([t,e[0],e[1]])}))}var nJ=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.visualStyleAccessPath=`lineStyle`,n.visualDrawType=`stroke`,n}return t.prototype.init=function(t){t.data=t.data||[],tJ(t);var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count)),e.prototype.init.apply(this,arguments)},t.prototype.mergeOption=function(t){if(tJ(t),t.data){var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count))}e.prototype.mergeOption.apply(this,arguments)},t.prototype.appendData=function(e){var t=this._processFlatCoordsArray(e.data);t.flatCoords&&(this._flatCoords?(this._flatCoords=nc(this._flatCoords,t.flatCoords),this._flatCoordsOffset=nc(this._flatCoordsOffset,t.flatCoordsOffset)):(this._flatCoords=t.flatCoords,this._flatCoordsOffset=t.flatCoordsOffset),e.data=new Float32Array(t.count)),this.getRawData().appendData(e.data)},t.prototype._getCoordsFromItemModel=function(e){var t=this.getData().getItemModel(e),n=t.option instanceof Array?t.option:t.getShallow(`coords`);if(process.env.NODE_ENV!==`production`&&!(n instanceof Array&&n.length>0&&n[0]instanceof Array))throw Error(`Invalid coords `+JSON.stringify(n)+`. Lines must have 2d coords array in data item.`);return n},t.prototype.getLineCoordsCount=function(e){return this._flatCoordsOffset?this._flatCoordsOffset[e*2+1]:this._getCoordsFromItemModel(e).length},t.prototype.getLineCoords=function(e,t){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[e*2],r=this._flatCoordsOffset[e*2+1],i=0;i<r;i++)t[i]=t[i]||[],t[i][0]=this._flatCoords[n+i*2],t[i][1]=this._flatCoords[n+i*2+1];return r}else{for(var a=this._getCoordsFromItemModel(e),i=0;i<a.length;i++)t[i]=t[i]||[],t[i][0]=a[i][0],t[i][1]=a[i][1];return a.length}},t.prototype._processFlatCoordsArray=function(e){var t=0;if(this._flatCoords&&(t=this._flatCoords.length),Bs(e[0])){for(var n=e.length,r=new $q(n),i=new eJ(n),a=0,o=0,s=0,c=0;c<n;){s++;var l=e[c++];r[o++]=a+t,r[o++]=l;for(var u=0;u<l;u++){var d=e[c++],f=e[c++];if(i[a++]=d,i[a++]=f,c>n&&process.env.NODE_ENV!==`production`)throw Error(`Invalid data format.`)}}return{flatCoordsOffset:new Uint32Array(r.buffer,0,o),flatCoords:i,count:s}}return{flatCoordsOffset:null,flatCoords:null,count:e.length}},t.prototype.getInitialData=function(e,t){if(process.env.NODE_ENV!==`production`&&!gS.get(e.coordinateSystem))throw Error(`Unknown coordinate system `+e.coordinateSystem);var n=new uA([`value`],this);return n.hasItemOption=!1,n.initData(e.data,[],function(e,t,r,i){if(e instanceof Array)return NaN;n.hasItemOption=!0;var a=e.value;if(a!=null)return a instanceof Array?a[i]:a}),n},t.prototype.formatTooltip=function(e,t,n){var r=this.getData().getItemModel(e),i=r.get(`name`);if(i)return i;var a=r.get(`fromName`),o=r.get(`toName`),s=[];return a!=null&&s.push(a),o!=null&&s.push(o),zT(`nameValue`,{name:s.join(` > `)})},t.prototype.preventIncremental=function(){return!!this.get([`effect`,`show`])},t.prototype.getProgressive=function(){return this.option.progressive??(this.option.large?1e4:this.get(`progressive`))},t.prototype.getProgressiveThreshold=function(){return this.option.progressiveThreshold??(this.option.large?2e4:this.get(`progressiveThreshold`))},t.prototype.getZLevelKey=function(){var e=this.getModel(`effect`),t=e.get(`trailLength`);return this.getData().count()>this.getProgressiveThreshold()?this.id:e.get(`show`)&&t>0?t+``:``},t.type=`series.lines`,t.dependencies=[`grid`,`polar`,`geo`,`calendar`],t.defaultOption={coordinateSystem:`geo`,z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:[`none`,`none`],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:`circle`,symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:`end`},lineStyle:{opacity:.5}},t}(oE);function rJ(e){return e instanceof Array||(e=[e,e]),e}var iJ={seriesType:`lines`,reset:function(e){var t=rJ(e.get(`symbol`)),n=rJ(e.get(`symbolSize`)),r=e.getData();r.setVisual(`fromSymbol`,t&&t[0]),r.setVisual(`toSymbol`,t&&t[1]),r.setVisual(`fromSymbolSize`,n&&n[0]),r.setVisual(`toSymbolSize`,n&&n[1]);function i(e,t){var n=e.getItemModel(t),r=rJ(n.getShallow(`symbol`,!0)),i=rJ(n.getShallow(`symbolSize`,!0));r[0]&&e.setItemVisual(t,`fromSymbol`,r[0]),r[1]&&e.setItemVisual(t,`toSymbol`,r[1]),i[0]&&e.setItemVisual(t,`fromSymbolSize`,i[0]),i[1]&&e.setItemVisual(t,`toSymbolSize`,i[1])}return{dataEach:r.hasItemOption?i:null}}};function aJ(e){e.registerChartView(Qq),e.registerSeriesModel(nJ),e.registerLayout(Zq),e.registerVisual(iJ)}var oJ=256,sJ=function(){function e(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null},this.canvas=vs.createCanvas()}return e.prototype.update=function(e,t,n,r,i,a){var o=this._getBrush(),s=this._getGradient(i,`inRange`),c=this._getGradient(i,`outOfRange`),l=this.pointSize+this.blurSize,u=this.canvas,d=u.getContext(`2d`),f=e.length;u.width=t,u.height=n;for(var p=0;p<f;++p){var m=e[p],h=m[0],g=m[1],_=m[2],v=r(_);d.globalAlpha=v,d.drawImage(o,h-l,g-l)}if(!u.width||!u.height)return u;for(var y=d.getImageData(0,0,u.width,u.height),b=y.data,x=0,S=b.length,C=this.minOpacity,w=this.maxOpacity-C;x<S;){var v=b[x+3]/256,T=Math.floor(v*(oJ-1))*4;if(v>0){var E=a(v)?s:c;v>0&&(v=v*w+C),b[x++]=E[T],b[x++]=E[T+1],b[x++]=E[T+2],b[x++]=E[T+3]*v*256}else x+=4}return d.putImageData(y,0,0),u},e.prototype._getBrush=function(){var e=this._brushCanvas||=vs.createCanvas(),t=this.pointSize+this.blurSize,n=t*2;e.width=n,e.height=n;var r=e.getContext(`2d`);return r.clearRect(0,0,n,n),r.shadowOffsetX=n,r.shadowBlur=this.blurSize,r.shadowColor=Z.color.neutral99,r.beginPath(),r.arc(-t,t,this.pointSize,0,Math.PI*2,!0),r.closePath(),r.fill(),e},e.prototype._getGradient=function(e,t){for(var n=this._gradientPixels,r=n[t]||(n[t]=new Uint8ClampedArray(256*4)),i=[0,0,0,0],a=0,o=0;o<256;o++)e[t](o/255,!0,i),r[a++]=i[0],r[a++]=i[1],r[a++]=i[2],r[a++]=i[3];return r},e}();function cJ(e,t,n){var r=e[1]-e[0];t=R(t,function(t){return{interval:[(t.interval[0]-e[0])/r,(t.interval[1]-e[0])/r]}});var i=t.length,a=0;return function(e){var r;for(r=a;r<i;r++){var o=t[r].interval;if(o[0]<=e&&e<=o[1]){a=r;break}}if(r===i)for(r=a-1;r>=0;r--){var o=t[r].interval;if(o[0]<=e&&e<=o[1]){a=r;break}}return r>=0&&r<i&&n[r]}}function lJ(e,t){var n=e[1]-e[0];return t=[(t[0]-e[0])/n,(t[1]-e[0])/n],function(e){return e>=t[0]&&e<=t[1]}}function uJ(e){var t=e.dimensions;return t[0]===`lng`&&t[1]===`lat`}var dJ=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r;if(t.eachComponent(`visualMap`,function(t){t.eachTargetSeries(function(n){n===e&&(r=t)})}),process.env.NODE_ENV!==`production`&&!r)throw Error(`Heatmap must use with visualMap`);this._progressiveEls=null,this.group.removeAll();var i=e.coordinateSystem;i.type===`cartesian2d`||i.type===`calendar`||i.type===`matrix`?this._renderOnGridLike(e,n,0,e.getData().count()):uJ(i)&&this._renderOnGeo(i,e,r,n)},t.prototype.incrementalPrepareRender=function(e,t,n){this.group.removeAll()},t.prototype.incrementalRender=function(e,t,n,r){var i=t.coordinateSystem;i&&(uJ(i)?this.render(t,n,r):(this._progressiveEls=[],this._renderOnGridLike(t,r,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){Tb(this._progressiveEls||this.group,e)},t.prototype._renderOnGridLike=function(e,t,n,r,i){var a=e.coordinateSystem,o=jF(a,`cartesian2d`),s=jF(a,`matrix`),c,l,u,d;if(o){var f=a.getAxis(`x`),p=a.getAxis(`y`);if(process.env.NODE_ENV!==`production`){if(!(f.type===`category`&&p.type===`category`))throw Error(`Heatmap on cartesian must have two category axes`);if(!(f.onBand&&p.onBand))throw Error(`Heatmap on cartesian must have two axes with boundaryGap true`)}c=f.getBandWidth()+.5,l=p.getBandWidth()+.5,u=f.scale.getExtent(),d=p.scale.getExtent()}for(var m=this.group,h=e.getData(),g=e.getModel([`emphasis`,`itemStyle`]).getItemStyle(),_=e.getModel([`blur`,`itemStyle`]).getItemStyle(),v=e.getModel([`select`,`itemStyle`]).getItemStyle(),y=e.get([`itemStyle`,`borderRadius`]),b=Rb(e),x=e.getModel(`emphasis`),S=x.get(`focus`),C=x.get(`blurScope`),w=x.get(`disabled`),T=o||s?[h.mapDimension(`x`),h.mapDimension(`y`),h.mapDimension(`value`)]:[h.mapDimension(`time`),h.mapDimension(`value`)],E=n;E<r;E++){var D=void 0,O=h.getItemVisual(E,`style`);if(o){var k=h.get(T[0],E),A=h.get(T[1],E);if(isNaN(h.get(T[2],E))||isNaN(k)||isNaN(A)||k<u[0]||k>u[1]||A<d[0]||A>d[1])continue;var j=a.dataToPoint([k,A]);D=new e_({shape:{x:j[0]-c/2,y:j[1]-l/2,width:c,height:l},style:O})}else if(s){var ee=a.dataToLayout([h.get(T[0],E),h.get(T[1],E)]).rect;if(Ks(ee.x))continue;D=new e_({z2:1,shape:ee,style:O})}else{if(isNaN(h.get(T[1],E)))continue;var te=a.dataToLayout([h.get(T[0],E)]),ee=te.contentRect||te.rect;if(Ks(ee.x)||Ks(ee.y))continue;D=new e_({z2:1,shape:ee,style:O})}if(h.hasItemOption){var ne=h.getItemModel(E),re=ne.getModel(`emphasis`);g=re.getModel(`itemStyle`).getItemStyle(),_=ne.getModel([`blur`,`itemStyle`]).getItemStyle(),v=ne.getModel([`select`,`itemStyle`]).getItemStyle(),y=ne.get([`itemStyle`,`borderRadius`]),S=re.get(`focus`),C=re.get(`blurScope`),w=re.get(`disabled`),b=Rb(ne)}D.shape.r=y;var ie=e.getRawValue(E),ae=`-`;ie&&ie[2]!=null&&(ae=ie[2]+``),Lb(D,b,{labelFetcher:e,labelDataIndex:E,defaultOpacity:O.opacity,defaultText:ae}),D.ensureState(`emphasis`).style=g,D.ensureState(`blur`).style=_,D.ensureState(`select`).style=v,_v(D,S,C,w),D.incremental=i,i&&(D.states.emphasis.hoverLayer=!0),m.add(D),h.setItemGraphicEl(E,D),this._progressiveEls&&this._progressiveEls.push(D)}},t.prototype._renderOnGeo=function(e,t,n,r){var i=n.targetVisuals.inRange,a=n.targetVisuals.outOfRange,o=t.getData(),s=this._hmLayer||this._hmLayer||new sJ;s.blurSize=t.get(`blurSize`),s.pointSize=t.get(`pointSize`),s.minOpacity=t.get(`minOpacity`),s.maxOpacity=t.get(`maxOpacity`);var c=e.getViewRect().clone(),l=e.getRoamTransform();c.applyTransform(l);var u=Math.max(c.x,0),d=Math.max(c.y,0),f=Math.min(c.width+c.x,r.getWidth()),p=Math.min(c.height+c.y,r.getHeight()),m=f-u,h=p-d,g=[o.mapDimension(`lng`),o.mapDimension(`lat`),o.mapDimension(`value`)],_=o.mapArray(g,function(t,n,r){var i=e.dataToPoint([t,n]);return i[0]-=u,i[1]-=d,i.push(r),i}),v=n.getExtent(),y=n.type===`visualMap.continuous`?lJ(v,n.option.range):cJ(v,n.getPieceList(),n.option.selected);s.update(_,m,h,i.color.getNormalizer(),{inRange:i.color.getColorMapper(),outOfRange:a.color.getColorMapper()},y);var b=new Kg({style:{width:m,height:h,x:u,y:d,image:s.canvas},silent:!0});this.group.add(b)},t.type=`heatmap`,t}(yE),fJ=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(e,t){return TA(null,this,{generateCoord:`value`})},t.prototype.preventIncremental=function(){var e=gS.get(this.get(`coordinateSystem`));if(e&&e.dimensions)return e.dimensions[0]===`lng`&&e.dimensions[1]===`lat`},t.type=`series.heatmap`,t.dependencies=[`grid`,`geo`,`calendar`,`matrix`],t.defaultOption={coordinateSystem:`cartesian2d`,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:Z.color.primary}}},t}(oE);function pJ(e){e.registerChartView(dJ),e.registerSeriesModel(fJ)}var mJ=[`itemStyle`,`borderWidth`],hJ=[{xy:`x`,wh:`width`,index:0,posDesc:[`left`,`right`]},{xy:`y`,wh:`height`,index:1,posDesc:[`top`,`bottom`]}],gJ=new $v,_J=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=this.group,i=e.getData(),a=this._data,o=e.coordinateSystem,s=o.getBaseAxis().isHorizontal(),c=o.master.getRect(),l={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:e,coordSys:o,coordSysExtent:[[c.x,c.x+c.width],[c.y,c.y+c.height]],isHorizontal:s,valueDim:hJ[+s],categoryDim:hJ[1-s]};i.diff(a).add(function(e){if(i.hasValue(e)){var t=vJ(i,e,kJ(i,e),l),n=MJ(i,l,t);i.setItemGraphicEl(e,n),r.add(n),RJ(n,l,t)}}).update(function(e,t){var n=a.getItemGraphicEl(t);if(!i.hasValue(e)){r.remove(n);return}var o=vJ(i,e,kJ(i,e),l),s=FJ(i,o);n&&s!==n.__pictorialShapeStr&&(r.remove(n),i.setItemGraphicEl(e,null),n=null),n?NJ(n,l,o):n=MJ(i,l,o,!0),i.setItemGraphicEl(e,n),n.__pictorialSymbolMeta=o,r.add(n),RJ(n,l,o)}).remove(function(e){var t=a.getItemGraphicEl(e);t&&PJ(a,e,t.__pictorialSymbolMeta.animationModel,t)}).execute();var u=e.get(`clip`,!0)?AF(e.coordinateSystem,!1,e):null;return u?r.setClipPath(u):r.removeClipPath(),this._data=i,this.group},t.prototype.remove=function(e,t){var n=this.group,r=this._data;e.get(`animation`)?r&&r.eachItemGraphicEl(function(t){PJ(r,y_(t).dataIndex,e,t)}):n.removeAll()},t.type=`pictorialBar`,t}(yE);function vJ(e,t,n,r){var i=e.getItemLayout(t),a=n.get(`symbolRepeat`),o=n.get(`symbolClip`),s=n.get(`symbolPosition`)||`start`,c=(n.get(`symbolRotate`)||0)*Math.PI/180||0,l=n.get(`symbolPatternSize`)||2,u=n.isAnimationEnabled(),d={dataIndex:t,layout:i,itemModel:n,symbolType:e.getItemVisual(t,`symbol`)||`circle`,style:e.getItemVisual(t,`style`),symbolClip:o,symbolRepeat:a,symbolRepeatDirection:n.get(`symbolRepeatDirection`),symbolPatternSize:l,rotation:c,animationModel:u?n:null,hoverScale:u&&n.get([`emphasis`,`scale`]),z2:n.getShallow(`z`,!0)||0};yJ(n,a,i,r,d),xJ(e,t,i,a,o,d.boundingLength,d.pxSign,l,r,d),SJ(n,d.symbolScale,c,r,d);var f=d.symbolSize;return CJ(n,f,i,a,o,iD(n.get(`symbolOffset`),f),s,d.valueLineWidth,d.boundingLength,d.repeatCutLength,r,d),d}function yJ(e,t,n,r,i){var a=r.valueDim,o=e.get(`symbolBoundingData`),s=r.coordSys.getOtherAxis(r.coordSys.getBaseAxis()),c=s.toGlobalCoord(s.dataToCoord(0)),l=1-(n[a.wh]<=0),u;if(B(o)){var d=[bJ(s,o[0])-c,bJ(s,o[1])-c];d[1]<d[0]&&d.reverse(),u=d[l]}else u=o==null?t?r.coordSysExtent[a.index][l]-c:n[a.wh]:bJ(s,o)-c;i.boundingLength=u,t&&(i.repeatCutLength=n[a.wh]);var f=a.xy===`x`,p=s.inverse;i.pxSign=f&&!p||!f&&p?u>=0?1:-1:u>0?1:-1}function bJ(e,t){return e.toGlobalCoord(e.dataToCoord(e.scale.parse(t)))}function xJ(e,t,n,r,i,a,o,s,c,l){var u=c.valueDim,d=c.categoryDim,f=Math.abs(n[d.wh]),p=e.getItemVisual(t,`symbolSize`),m=B(p)?p.slice():p==null?[`100%`,`100%`]:[p,p];m[d.index]=X(m[d.index],f),m[u.index]=X(m[u.index],r?f:Math.abs(a)),l.symbolSize=m;var h=l.symbolScale=[m[0]/s,m[1]/s];h[u.index]*=(c.isHorizontal?-1:1)*o}function SJ(e,t,n,r,i){var a=e.get(mJ)||0;a&&(gJ.attr({scaleX:t[0],scaleY:t[1],rotation:n}),gJ.updateTransform(),a/=gJ.getLineScale(),a*=t[r.valueDim.index]),i.valueLineWidth=a||0}function CJ(e,t,n,r,i,a,o,s,c,l,u,d){var f=u.categoryDim,p=u.valueDim,m=d.pxSign,h=Math.max(t[p.index]+s,0),g=h;if(r){var _=Math.abs(c),v=qs(e.get(`symbolMargin`),`15%`)+``,y=!1;v.lastIndexOf(`!`)===v.length-1&&(y=!0,v=v.slice(0,v.length-1));var b=X(v,t[p.index]),x=Math.max(h+b*2,0),S=y?0:b*2,C=Lp(r),w=C?r:zJ((_+S)/x);b=(_-w*h)/2/(y?w:Math.max(w-1,1)),x=h+b*2,S=y?0:b*2,!C&&r!==`fixed`&&(w=l?zJ((Math.abs(l)+S)/x):0),g=w*x-S,d.repeatTimes=w,d.symbolMargin=b}var T=g/2*m,E=d.pathPosition=[];E[f.index]=n[f.wh]/2,E[p.index]=o===`start`?T:o===`end`?c-T:c/2,a&&(E[0]+=a[0],E[1]+=a[1]);var D=d.bundlePosition=[];D[f.index]=n[f.xy],D[p.index]=n[p.xy];var O=d.barRectShape=F({},n);O[p.wh]=m*Math.max(Math.abs(n[p.wh]),Math.abs(E[p.index]+T)),O[f.wh]=n[f.wh];var k=d.clipShape={};k[f.xy]=-n[f.xy],k[f.wh]=u.ecSize[f.wh],k[p.xy]=0,k[p.wh]=n[p.wh]}function wJ(e){var t=e.symbolPatternSize,n=nD(e.symbolType,-t/2,-t/2,t,t);return n.attr({culling:!0}),n.type!==`image`&&n.setStyle({strokeNoScale:!0}),n}function TJ(e,t,n,r){var i=e.__pictorialBundle,a=n.symbolSize,o=n.valueLineWidth,s=n.pathPosition,c=t.valueDim,l=n.repeatTimes||0,u=0,d=a[t.valueDim.index]+o+n.symbolMargin*2;for(IJ(e,function(e){e.__pictorialAnimationIndex=u,e.__pictorialRepeatTimes=l,u<l?LJ(e,null,m(u),n,r):LJ(e,null,{scaleX:0,scaleY:0},n,r,function(){i.remove(e)}),u++});u<l;u++){var f=wJ(n);f.__pictorialAnimationIndex=u,f.__pictorialRepeatTimes=l,i.add(f);var p=m(u);LJ(f,{x:p.x,y:p.y,scaleX:0,scaleY:0},{scaleX:p.scaleX,scaleY:p.scaleY,rotation:p.rotation},n,r)}function m(e){var t=s.slice(),r=n.pxSign,i=e;return(n.symbolRepeatDirection===`start`?r>0:r<0)&&(i=l-1-e),t[c.index]=d*(i-l/2+.5)+s[c.index],{x:t[0],y:t[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation}}}function EJ(e,t,n,r){var i=e.__pictorialBundle,a=e.__pictorialMainPath;a?LJ(a,null,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation},n,r):(a=e.__pictorialMainPath=wJ(n),i.add(a),LJ(a,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:0,scaleY:0,rotation:n.rotation},{scaleX:n.symbolScale[0],scaleY:n.symbolScale[1]},n,r))}function DJ(e,t,n){var r=F({},t.barRectShape),i=e.__pictorialBarRect;i?LJ(i,null,{shape:r},t,n):(i=e.__pictorialBarRect=new e_({z2:2,shape:r,silent:!0,style:{stroke:`transparent`,fill:`transparent`,lineWidth:0}}),i.disableMorphing=!0,e.add(i))}function OJ(e,t,n,r){if(n.symbolClip){var i=e.__pictorialClipPath,a=F({},n.clipShape),o=t.valueDim,s=n.animationModel,c=n.dataIndex;if(i)Wy(i,{shape:a},s,c);else{a[o.wh]=0,i=new e_({shape:a}),e.__pictorialBundle.setClipPath(i),e.__pictorialClipPath=i;var l={};l[o.wh]=n.clipShape[o.wh],Zy[r?`updateProps`:`initProps`](i,{shape:l},s,c)}}}function kJ(e,t){var n=e.getItemModel(t);return n.getAnimationDelayParams=AJ,n.isAnimationEnabled=jJ,n}function AJ(e){return{index:e.__pictorialAnimationIndex,count:e.__pictorialRepeatTimes}}function jJ(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow(`animation`)}function MJ(e,t,n,r){var i=new Y,a=new Y;return i.add(a),i.__pictorialBundle=a,a.x=n.bundlePosition[0],a.y=n.bundlePosition[1],n.symbolRepeat?TJ(i,t,n):EJ(i,t,n),DJ(i,n,r),OJ(i,t,n,r),i.__pictorialShapeStr=FJ(e,n),i.__pictorialSymbolMeta=n,i}function NJ(e,t,n){var r=n.animationModel,i=n.dataIndex,a=e.__pictorialBundle;Wy(a,{x:n.bundlePosition[0],y:n.bundlePosition[1]},r,i),n.symbolRepeat?TJ(e,t,n,!0):EJ(e,t,n,!0),DJ(e,n,!0),OJ(e,t,n,!0)}function PJ(e,t,n,r){var i=r.__pictorialBarRect;i&&i.removeTextContent();var a=[];IJ(r,function(e){a.push(e)}),r.__pictorialMainPath&&a.push(r.__pictorialMainPath),r.__pictorialClipPath&&(n=null),L(a,function(e){qy(e,{scaleX:0,scaleY:0},n,t,function(){r.parent&&r.parent.remove(r)})}),e.setItemGraphicEl(t,null)}function FJ(e,t){return[e.getItemVisual(t.dataIndex,`symbol`)||`none`,!!t.symbolRepeat,!!t.symbolClip].join(`:`)}function IJ(e,t,n){L(e.__pictorialBundle.children(),function(r){r!==e.__pictorialBarRect&&t.call(n,r)})}function LJ(e,t,n,r,i,a){t&&e.attr(t),r.symbolClip&&!i?n&&e.attr(n):n&&Zy[i?`updateProps`:`initProps`](e,n,r.animationModel,r.dataIndex,a)}function RJ(e,t,n){var r=n.dataIndex,i=n.itemModel,a=i.getModel(`emphasis`),o=a.getModel(`itemStyle`).getItemStyle(),s=i.getModel([`blur`,`itemStyle`]).getItemStyle(),c=i.getModel([`select`,`itemStyle`]).getItemStyle(),l=i.getShallow(`cursor`),u=a.get(`focus`),d=a.get(`blurScope`),f=a.get(`scale`);IJ(e,function(e){if(e instanceof Kg){var t=e.style;e.useStyle(F({image:t.image,x:t.x,y:t.y,width:t.width,height:t.height},n.style))}else e.useStyle(n.style);var r=e.ensureState(`emphasis`);r.style=o,f&&(r.scaleX=e.scaleX*1.1,r.scaleY=e.scaleY*1.1),e.ensureState(`blur`).style=s,e.ensureState(`select`).style=c,l&&(e.cursor=l),e.z2=n.z2});var p=t.valueDim.posDesc[+(n.boundingLength>0)],m=e.__pictorialBarRect;m.ignoreClip=!0,Lb(m,Rb(i),{labelFetcher:t.seriesModel,labelDataIndex:r,defaultText:pF(t.seriesModel.getData(),r),inheritColor:n.style.fill,defaultOpacity:n.style.opacity,defaultOutsidePosition:p}),_v(e,u,d,a.get(`disabled`))}function zJ(e){var t=Math.round(e);return Math.abs(e-t)<1e-4?t:Math.ceil(e)}var BJ=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n.defaultSymbol=`roundRect`,n}return t.prototype.getInitialData=function(t){return t.stack=null,e.prototype.getInitialData.apply(this,arguments)},t.type=`series.pictorialBar`,t.dependencies=[`grid`],t.defaultOption=ax(HF.defaultOption,{symbol:`circle`,symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:`end`,symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:`-100%`,clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:Z.color.primary}}}),t}(HF);function VJ(e){e.registerChartView(_J),e.registerSeriesModel(BJ),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,Rs(aj,`pictorialBar`)),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,oj(`pictorialBar`))}var HJ=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._layers=[],n}return t.prototype.render=function(e,t,n){var r=e.getData(),i=this,a=this.group,o=e.getLayerSeries(),s=r.getLayout(`layoutInfo`),c=s.rect,l=s.boundaryGap;a.x=0,a.y=c.y+l[0];function u(e){return e.name}var d=new Ik(this._layersSeries||[],o,u,u),f=[];d.add(z(p,this,`add`)).update(z(p,this,`update`)).remove(z(p,this,`remove`)).execute();function p(t,n,s){var c=i._layers;if(t===`remove`){a.remove(c[n]);return}for(var l=[],u=[],d,p=o[n].indices,m=0;m<p.length;m++){var h=r.getItemLayout(p[m]),g=h.x,_=h.y0,v=h.y;l.push(g,_),u.push(g,_+v),d=r.getItemVisual(p[m],`style`)}var y,b=r.getItemLayout(p[0]),x=e.getModel(`label`).get(`margin`),S=e.getModel(`emphasis`);if(t===`add`){var C=f[n]=new Y;y=new DF({shape:{points:l,stackedOnPoints:u,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),C.add(y),a.add(C),e.isAnimationEnabled()&&y.setClipPath(UJ(y.getBoundingRect(),e,function(){y.removeClipPath()}))}else{var C=c[s];y=C.childAt(0),a.add(C),f[n]=C,Wy(y,{shape:{points:l,stackedOnPoints:u}},e),Xy(y)}Lb(y,Rb(e),{labelDataIndex:p[m-1],defaultText:r.getName(p[m-1]),inheritColor:d.fill},{normal:{verticalAlign:`middle`}}),y.setTextConfig({position:null,local:!0});var w=y.getTextContent();w&&(w.x=b.x-x,w.y=b.y0+b.y/2),y.useStyle(d),r.setItemGraphicEl(n,y),xv(y,e),_v(y,S.get(`focus`),S.get(`blurScope`),S.get(`disabled`))}this._layersSeries=o,this._layers=f},t.type=`themeRiver`,t}(yE);function UJ(e,t,n){var r=new e_({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return Gy(r,{shape:{x:e.x-50,width:e.width+100,height:e.height+20}},t,n),r}var WJ=2,GJ=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new _I(z(this.getData,this),z(this.getRawData,this))},t.prototype.fixData=function(e){var t=e.length,n={},r=Nm(e,function(e){return n.hasOwnProperty(e[0]+``)||(n[e[0]+``]=-1),e[2]}),i=[];r.buckets.each(function(e,t){i.push({name:t,dataList:e})});for(var a=i.length,o=0;o<a;++o){for(var s=i[o].name,c=0;c<i[o].dataList.length;++c){var l=i[o].dataList[c][0]+``;n[l]=o}for(var l in n)n.hasOwnProperty(l)&&n[l]!==o&&(n[l]=o,e[t]=[l,0,s],t++)}return e},t.prototype.getInitialData=function(e,t){for(var n=this.getReferringComponents(`singleAxis`,Dm).models[0].get(`type`),r=Fs(e.data,function(e){return e[2]!==void 0}),i=this.fixData(r||[]),a=[],o=this.nameMap=K(),s=0,c=0;c<i.length;++c)a.push(i[c][WJ]),o.get(i[c][WJ])||(o.set(i[c][WJ],s),s++);var l=dA(i,{coordDimensions:[`single`],dimensionsDefine:[{name:`time`,type:Bk(n)},{name:`value`,type:`float`},{name:`name`,type:`ordinal`}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,u=new uA(l,this);return u.initData(i),u},t.prototype.getLayerSeries=function(){for(var e=this.getData(),t=e.count(),n=[],r=0;r<t;++r)n[r]=r;var i=e.mapDimension(`single`),a=Nm(n,function(t){return e.get(`name`,t)}),o=[];return a.buckets.each(function(t,n){t.sort(function(t,n){return e.get(i,t)-e.get(i,n)}),o.push({name:n,indices:t})}),o},t.prototype.getAxisTooltipData=function(e,t,n){B(e)||(e=e?[e]:[]);for(var r=this.getData(),i=this.getLayerSeries(),a=[],o=i.length,s,c=0;c<o;++c){for(var l=Number.MAX_VALUE,u=-1,d=i[c].indices.length,f=0;f<d;++f){var p=r.get(e[0],i[c].indices[f]),m=Math.abs(p-t);m<=l&&(s=p,l=m,u=i[c].indices[f])}a.push(u)}return{dataIndices:a,nestestValue:s}},t.prototype.formatTooltip=function(e,t,n){var r=this.getData();return zT(`nameValue`,{name:r.getName(e),value:r.get(r.mapDimension(`value`),e)})},t.type=`series.themeRiver`,t.dependencies=[`singleAxis`],t.defaultOption={z:2,colorBy:`data`,coordinateSystem:`singleAxis`,boundaryGap:[`10%`,`10%`],singleAxisIndex:0,animationEasing:`linear`,label:{margin:4,show:!0,position:`left`,fontSize:11},emphasis:{label:{show:!0}}},t}(oE);function KJ(e,t){e.eachSeriesByType(`themeRiver`,function(e){var t=e.getData(),n=e.coordinateSystem,r={},i=n.getRect();r.rect=i;var a=e.get(`boundaryGap`),o=n.getAxis();r.boundaryGap=a,o.orient===`horizontal`?(a[0]=X(a[0],i.height),a[1]=X(a[1],i.height),qJ(t,e,i.height-a[0]-a[1])):(a[0]=X(a[0],i.width),a[1]=X(a[1],i.width),qJ(t,e,i.width-a[0]-a[1])),t.setLayout(`layoutInfo`,r)})}function qJ(e,t,n){if(e.count())for(var r=t.coordinateSystem,i=t.getLayerSeries(),a=e.mapDimension(`single`),o=e.mapDimension(`value`),s=R(i,function(t){return R(t.indices,function(t){var n=r.dataToPoint(e.get(a,t));return n[1]=e.get(o,t),n})}),c=JJ(s),l=c.y0,u=n/c.max,d=i.length,f=i[0].indices.length,p,m=0;m<f;++m){p=l[m]*u,e.setItemLayout(i[0].indices[m],{layerIndex:0,x:s[0][m][0],y0:p,y:s[0][m][1]*u});for(var h=1;h<d;++h)p+=s[h-1][m][1]*u,e.setItemLayout(i[h].indices[m],{layerIndex:h,x:s[h][m][0],y0:p,y:s[h][m][1]*u})}}function JJ(e){for(var t=e.length,n=e[0].length,r=[],i=[],a=0,o=0;o<n;++o){for(var s=0,c=0;c<t;++c)s+=e[c][o][1];s>a&&(a=s),r.push(s)}for(var l=0;l<n;++l)i[l]=(a-r[l])/2;a=0;for(var u=0;u<n;++u){var d=r[u]+i[u];d>a&&(a=d)}return{y0:i,max:a}}function YJ(e){e.registerChartView(HJ),e.registerSeriesModel(GJ),e.registerLayout(KJ),e.registerProcessor(uI(`themeRiver`))}var XJ=2,ZJ=4,QJ=function(e){N(t,e);function t(t,n,r,i){var a=e.call(this)||this;a.z2=XJ,a.textConfig={inside:!0},y_(a).seriesIndex=n.seriesIndex;var o=new a_({z2:ZJ,silent:t.getModel().get([`label`,`silent`])});return a.setTextContent(o),a.updateData(!0,t,n,r,i),a}return t.prototype.updateData=function(e,t,n,r,i){this.node=t,t.piece=this,n||=this._seriesModel,r||=this._ecModel;var a=this;y_(a).dataIndex=t.dataIndex;var o=t.getModel(),s=o.getModel(`emphasis`),c=t.getLayout(),l=F({},c);l.label=null;var u=t.getVisual(`style`);u.lineJoin=`bevel`;var d=t.getVisual(`decal`);d&&(u.decal=VD(d,i)),F(l,KF(o.getModel(`itemStyle`),l,!0)),L(T_,function(e){var t=a.ensureState(e),n=o.getModel([e,`itemStyle`]);t.style=n.getItemStyle();var r=KF(n,l);r&&(t.shape=r)}),e?(a.setShape(l),a.shape.r=c.r0,Gy(a,{shape:{r:c.r}},n,t.dataIndex)):(Wy(a,{shape:l},n),Xy(a)),a.useStyle(u),this._updateLabel(n);var f=o.getShallow(`cursor`);f&&a.attr(`cursor`,f),this._seriesModel=n||this._seriesModel,this._ecModel=r||this._ecModel;var p=s.get(`focus`),m=p===`relative`?nc(t.getAncestorsIndices(),t.getDescendantIndices()):p===`ancestor`?t.getAncestorsIndices():p===`descendant`?t.getDescendantIndices():p;_v(this,m,s.get(`blurScope`),s.get(`disabled`))},t.prototype._updateLabel=function(e){var t=this,n=this.node.getModel(),r=n.getModel(`label`),i=this.node.getLayout(),a=i.endAngle-i.startAngle,o=(i.startAngle+i.endAngle)/2,s=Math.cos(o),c=Math.sin(o),l=this,u=l.getTextContent(),d=this.node.dataIndex,f=r.get(`minAngle`)/180*Math.PI;u.ignore=!(r.get(`show`)&&!(f!=null&&Math.abs(a)<f)),L(E_,function(r){var f=r===`normal`?n.getModel(`label`):n.getModel([r,`label`]),m=r===`normal`,h=m?u:u.ensureState(r),g=e.getFormattedLabel(d,r);m&&(g||=t.node.name),h.style=zb(f,{},null,r!==`normal`,!0),g&&(h.style.text=g);var _=f.get(`show`);_!=null&&!m&&(h.ignore=!_);var v=p(f,`position`),y=m?l:l.states[r],b=y.style.fill;y.textConfig={outsideFill:f.get(`color`)===`inherit`?b:null,inside:v!==`outside`};var x,S=p(f,`distance`)||0,C=p(f,`align`),w=p(f,`rotate`),T=Math.PI*.5,E=Math.PI*1.5,D=bg(w===`tangential`?Math.PI/2-o:o),O=D>T&&!Ap(D-T)&&D<E;v===`outside`?(x=i.r+S,C=O?`right`:`left`):!C||C===`center`?(x=a===2*Math.PI&&i.r0===0?0:(i.r+i.r0)/2,C=`center`):C===`left`?(x=i.r0+S,C=O?`right`:`left`):C===`right`&&(x=i.r-S,C=O?`left`:`right`),h.style.align=C,h.style.verticalAlign=p(f,`verticalAlign`)||`middle`,h.x=x*s+i.cx,h.y=x*c+i.cy;var k=0;w===`radial`?k=bg(-o)+(O?Math.PI:0):w===`tangential`?k=bg(Math.PI/2-o)+(O?Math.PI:0):Bs(w)&&(k=w*Math.PI/180),h.rotation=bg(k)});function p(e,t){return e.get(t)??r.get(t)}u.dirtyStyle()},t}(vy),$J=`sunburstRootToNode`,eY=`sunburstHighlight`,tY=`sunburstUnhighlight`;function nY(e){e.registerAction({type:$J,update:`updateView`},function(e,t){t.eachComponent({mainType:`series`,subType:`sunburst`,query:e},n);function n(t,n){var r=sV(e,[$J],t);if(r){var i=t.getViewRoot();i&&(e.direction=lV(i,r.node)?`rollUp`:`drillDown`),t.resetViewRoot(r.node)}}}),e.registerAction({type:eY,update:`none`},function(e,t,n){e=F({},e),t.eachComponent({mainType:`series`,subType:`sunburst`,query:e},r);function r(t){var n=sV(e,[eY],t);n&&(e.dataIndex=n.node.dataIndex)}process.env.NODE_ENV!==`production`&&qp(`sunburstHighlight`,`highlight`),n.dispatchAction(F(e,{type:`highlight`}))}),e.registerAction({type:tY,update:`updateView`},function(e,t,n){e=F({},e),process.env.NODE_ENV!==`production`&&qp(`sunburstUnhighlight`,`downplay`),n.dispatchAction(F(e,{type:`downplay`}))})}var rY=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n,r){var i=this;this.seriesModel=e,this.api=n,this.ecModel=t;var a=e.getData(),o=a.tree.root,s=e.getViewRoot(),c=this.group,l=e.get(`renderLabelForZeroData`),u=[];s.eachNode(function(e){u.push(e)}),d(u,this._oldChildren||[]),m(o,s),this._initEvents(),this._oldChildren=u;function d(e,t){if(e.length===0&&t.length===0)return;new Ik(t,e,n,n).add(r).update(r).remove(Rs(r,null)).execute();function n(e){return e.getId()}function r(n,r){f(n==null?null:e[n],r==null?null:t[r])}}function f(r,i){if(!l&&r&&!r.getValue()&&(r=null),r!==o&&i!==o){if(i&&i.piece)r?(i.piece.updateData(!1,r,e,t,n),a.setItemGraphicEl(r.dataIndex,i.piece)):p(i);else if(r){var s=new QJ(r,e,t,n);c.add(s),a.setItemGraphicEl(r.dataIndex,s)}}}function p(e){e&&(e.piece&&=(c.remove(e.piece),null))}function m(r,a){a.depth>0?(i.virtualPiece?i.virtualPiece.updateData(!1,r,e,t,n):(i.virtualPiece=new QJ(r,e,t,n),c.add(i.virtualPiece)),a.piece.off(`click`),i.virtualPiece.on(`click`,function(e){i._rootToNode(a.parentNode)})):i.virtualPiece&&=(c.remove(i.virtualPiece),null)}},t.prototype._initEvents=function(){var e=this;this.group.off(`click`),this.group.on(`click`,function(t){var n=!1;e.seriesModel.getViewRoot().eachNode(function(r){if(!n&&r.piece&&r.piece===t.target){var i=r.getModel().get(`nodeClick`);if(i===`rootToNode`)e._rootToNode(r);else if(i===`link`){var a=r.getModel(),o=a.get(`link`);o&&pS(o,a.get(`target`,!0)||`_blank`)}n=!0}})})},t.prototype._rootToNode=function(e){e!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:$J,from:this.uid,seriesId:this.seriesModel.id,targetNode:e})},t.prototype.containPoint=function(e,t){var n=t.getData().getItemLayout(0);if(n){var r=e[0]-n.cx,i=e[1]-n.cy,a=Math.sqrt(r*r+i*i);return a<=n.r&&a>=n.r0}},t.type=`sunburst`,t}(yE),iY=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.ignoreStyleOnData=!0,n}return t.prototype.getInitialData=function(e,t){var n={name:e.name,children:e.data};aY(n);var r=this._levelModels=R(e.levels||[],function(e){return new ex(e,this,t)},this),i=aV.createTree(n,this,a);function a(e){e.wrapMethod(`getItemModel`,function(e,t){var n=r[i.getNodeByDataIndex(t).depth];return n&&(e.parentModel=n),e})}return i.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments);return n.treePathInfo=uV(this.getData().tree.getNodeByDataIndex(t),this),n},t.prototype.getLevelModel=function(e){return this._levelModels&&this._levelModels[e.depth]},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;(!e||e!==t&&!t.contains(e))&&(this._viewRoot=t)},t.prototype.enableAriaDecal=function(){xV(this)},t.type=`series.sunburst`,t.defaultOption={z:2,center:[`50%`,`50%`],radius:[0,`75%`],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:`rootToNode`,renderLabelForZeroData:!1,label:{rotate:`radial`,show:!0,opacity:1,align:`center`,position:`inside`,distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:`white`,borderType:`solid`,shadowBlur:0,shadowColor:`rgba(0, 0, 0, 0.2)`,shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:`descendant`},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:`expansion`,animationDuration:1e3,animationDurationUpdate:500,data:[],sort:`desc`},t}(oE);function aY(e){var t=0;L(e.children,function(e){aY(e);var n=e.value;B(n)&&(n=n[0]),t+=n});var n=e.value;B(n)&&(n=n[0]),(n==null||isNaN(n))&&(n=t),n<0&&(n=0),B(e.value)?e.value[0]=n:e.value=n}var oY=Math.PI/180;function sY(e,t,n){t.eachSeriesByType(e,function(e){var t=e.get(`center`),r=e.get(`radius`);B(r)||(r=[0,r]),B(t)||(t=[t,t]);var i=n.getWidth(),a=n.getHeight(),o=Math.min(i,a),s=X(t[0],i),c=X(t[1],a),l=X(r[0],o/2),u=X(r[1],o/2),d=-e.get(`startAngle`)*oY,f=e.get(`minAngle`)*oY,p=e.getData().tree.root,m=e.getViewRoot(),h=m.depth,g=e.get(`sort`);g!=null&&cY(m,g);var _=0;L(m.children,function(e){!isNaN(e.getValue())&&_++});var v=m.getValue(),y=Math.PI/(v||_)*2,b=m.depth>0,x=m.height-(b?-1:1),S=(u-l)/(x||1),C=e.get(`clockwise`),w=e.get(`stillShowZeroSum`),T=C?1:-1,E=function(t,n){if(t){var r=n;if(t!==p){var i=t.getValue(),a=v===0&&w?y:i*y;a<f&&(a=f),r=n+T*a;var u=t.depth-h-(b?-1:1),d=l+S*u,m=l+S*(u+1),g=e.getLevelModel(t);if(g){var _=g.get(`r0`,!0),x=g.get(`r`,!0),D=g.get(`radius`,!0);D!=null&&(_=D[0],x=D[1]),_!=null&&(d=X(_,o/2)),x!=null&&(m=X(x,o/2))}t.setLayout({angle:a,startAngle:n,endAngle:r,clockwise:C,cx:s,cy:c,r0:d,r:m})}if(t.children&&t.children.length){var O=0;L(t.children,function(e){O+=E(e,n+O)})}return r-n}};if(b){var D=l,O=l+S,k=Math.PI*2;p.setLayout({angle:k,startAngle:d,endAngle:d+k,clockwise:C,cx:s,cy:c,r0:D,r:O})}E(m,d)})}function cY(e,t){var n=e.children||[];e.children=lY(n,t),n.length&&L(e.children,function(e){cY(e,t)})}function lY(e,t){if(V(t)){var n=R(e,function(e,t){var n=e.getValue();return{params:{depth:e.depth,height:e.height,dataIndex:e.dataIndex,getValue:function(){return n}},index:t}});return n.sort(function(e,n){return t(e.params,n.params)}),R(n,function(t){return e[t.index]})}else{var r=t===`asc`;return e.sort(function(e,t){var n=(e.getValue()-t.getValue())*(r?1:-1);return n===0?(e.dataIndex-t.dataIndex)*(r?-1:1):n})}}function uY(e){var t={};function n(e,n,r){if(e.depth===0)return Z.color.neutral50;for(var i=e;i&&i.depth>1;)i=i.parentNode;var a=n.getColorFromPalette(i.name||i.dataIndex+``,t);return e.depth>1&&H(a)&&(a=Xu(a,(e.depth-1)/(r-1)*.5)),a}e.eachSeriesByType(`sunburst`,function(e){var t=e.getData(),r=t.tree;r.eachNode(function(i){var a=i.getModel().getModel(`itemStyle`).getItemStyle();a.fill||=n(i,e,r.root.height),F(t.ensureUniqueItemVisual(i.dataIndex,`style`),a)})})}function dY(e){e.registerChartView(rY),e.registerSeriesModel(iY),e.registerLayout(Rs(sY,`sunburst`)),e.registerProcessor(Rs(uI,`sunburst`)),e.registerVisual(uY),nY(e)}var fY={color:`fill`,borderColor:`stroke`},pY={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},mY=Cm(),hY=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.optionUpdated=function(){this.currentZLevel=this.get(`zlevel`,!0),this.currentZ=this.get(`z`,!0)},t.prototype.getInitialData=function(e,t){return TA(null,this)},t.prototype.getDataParams=function(t,n,r){var i=e.prototype.getDataParams.call(this,t,n);return r&&(i.info=mY(r).info),i},t.type=`series.custom`,t.dependencies=[`grid`,`polar`,`geo`,`singleAxis`,`calendar`,`matrix`],t.defaultOption={coordinateSystem:`cartesian2d`,z:2,legendHoverLink:!0,clip:!1},t}(oE);function gY(e,t){return t||=[0,0],R([`x`,`y`],function(n,r){var i=this.getAxis(n),a=t[r],o=e[r]/2;return i.type===`category`?i.getBandWidth():Math.abs(i.dataToCoord(a-o)-i.dataToCoord(a+o))},this)}function _Y(e){var t=e.master.getRect();return{coordSys:{type:`cartesian2d`,x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:z(gY,e)}}}function vY(e,t){return t||=[0,0],R([0,1],function(n){var r=t[n],i=e[n]/2,a=[],o=[];return a[n]=r-i,o[n]=r+i,a[1-n]=o[1-n]=t[1-n],Math.abs(this.dataToPoint(a)[n]-this.dataToPoint(o)[n])},this)}function yY(e){var t=e.getBoundingRect();return{coordSys:{type:`geo`,x:t.x,y:t.y,width:t.width,height:t.height,zoom:e.getZoom()},api:{coord:function(t){return e.dataToPoint(t)},size:z(vY,e)}}}function bY(e,t){var n=this.getAxis(),r=t instanceof Array?t[0]:t,i=(e instanceof Array?e[0]:e)/2;return n.type===`category`?n.getBandWidth():Math.abs(n.dataToCoord(r-i)-n.dataToCoord(r+i))}function xY(e){var t=e.getRect();return{coordSys:{type:`singleAxis`,x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:z(bY,e)}}}function SY(e,t){return t||=[0,0],R([`Radius`,`Angle`],function(n,r){var i=`get`+n+`Axis`,a=this[i](),o=t[r],s=e[r]/2,c=a.type===`category`?a.getBandWidth():Math.abs(a.dataToCoord(o-s)-a.dataToCoord(o+s));return n===`Angle`&&(c=c*Math.PI/180),c},this)}function CY(e){var t=e.getRadiusAxis(),n=e.getAngleAxis(),r=t.getExtent();return r[0]>r[1]&&r.reverse(),{coordSys:{type:`polar`,cx:e.cx,cy:e.cy,r:r[1],r0:r[0]},api:{coord:function(r){var i=t.dataToRadius(r[0]),a=n.dataToAngle(r[1]),o=e.coordToPoint([i,a]);return o.push(i,a*Math.PI/180),o},size:z(SY,e)}}}function wY(e){var t=e.getRect(),n=e.getRangeInfo();return{coordSys:{type:`calendar`,x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:e.getCellWidth(),cellHeight:e.getCellHeight(),rangeInfo:{start:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(t,n){return e.dataToPoint(t,n)},layout:function(t,n){return e.dataToLayout(t,n)}}}}function TY(e){var t=e.getRect();return{coordSys:{type:`matrix`,x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t,n){return e.dataToPoint(t,n)},layout:function(t,n){return e.dataToLayout(t,n)}}}}var EY={};function DY(e,t,n,r){return e&&(e.legacy||e.legacy!==!1&&!n&&!r&&t!==`tspan`&&(t===`text`||q(e,`text`)))}function OY(e,t,n){var r=e,i,a,o;if(t===`text`)o=r;else{o={},q(r,`text`)&&(o.text=r.text),q(r,`rich`)&&(o.rich=r.rich),q(r,`textFill`)&&(o.fill=r.textFill),q(r,`textStroke`)&&(o.stroke=r.textStroke),q(r,`fontFamily`)&&(o.fontFamily=r.fontFamily),q(r,`fontSize`)&&(o.fontSize=r.fontSize),q(r,`fontStyle`)&&(o.fontStyle=r.fontStyle),q(r,`fontWeight`)&&(o.fontWeight=r.fontWeight),a={type:`text`,style:o,silent:!0},i={};var s=q(r,`textPosition`);n?i.position=s?r.textPosition:`inside`:s&&(i.position=r.textPosition),q(r,`textPosition`)&&(i.position=r.textPosition),q(r,`textOffset`)&&(i.offset=r.textOffset),q(r,`textRotation`)&&(i.rotation=r.textRotation),q(r,`textDistance`)&&(i.distance=r.textDistance)}return kY(o,e),L(o.rich,function(e){kY(e,e)}),{textConfig:i,textContent:a}}function kY(e,t){t&&(t.font=t.textFont||t.font,q(t,`textStrokeWidth`)&&(e.lineWidth=t.textStrokeWidth),q(t,`textAlign`)&&(e.align=t.textAlign),q(t,`textVerticalAlign`)&&(e.verticalAlign=t.textVerticalAlign),q(t,`textLineHeight`)&&(e.lineHeight=t.textLineHeight),q(t,`textWidth`)&&(e.width=t.textWidth),q(t,`textHeight`)&&(e.height=t.textHeight),q(t,`textBackgroundColor`)&&(e.backgroundColor=t.textBackgroundColor),q(t,`textPadding`)&&(e.padding=t.textPadding),q(t,`textBorderColor`)&&(e.borderColor=t.textBorderColor),q(t,`textBorderWidth`)&&(e.borderWidth=t.textBorderWidth),q(t,`textBorderRadius`)&&(e.borderRadius=t.textBorderRadius),q(t,`textBoxShadowColor`)&&(e.shadowColor=t.textBoxShadowColor),q(t,`textBoxShadowBlur`)&&(e.shadowBlur=t.textBoxShadowBlur),q(t,`textBoxShadowOffsetX`)&&(e.shadowOffsetX=t.textBoxShadowOffsetX),q(t,`textBoxShadowOffsetY`)&&(e.shadowOffsetY=t.textBoxShadowOffsetY))}function AY(e,t,n){var r=e;r.textPosition=r.textPosition||n.position||`inside`,n.offset!=null&&(r.textOffset=n.offset),n.rotation!=null&&(r.textRotation=n.rotation),n.distance!=null&&(r.textDistance=n.distance);var i=r.textPosition.indexOf(`inside`)>=0,a=e.fill||Z.color.neutral99;jY(r,t);var o=r.textFill==null;return i?o&&(r.textFill=n.insideFill||Z.color.neutral00,!r.textStroke&&n.insideStroke&&(r.textStroke=n.insideStroke),!r.textStroke&&(r.textStroke=a),r.textStrokeWidth??=2):(o&&(r.textFill=e.fill||n.outsideFill||Z.color.neutral00),!r.textStroke&&n.outsideStroke&&(r.textStroke=n.outsideStroke)),r.text=t.text,r.rich=t.rich,L(t.rich,function(e){jY(e,e)}),r}function jY(e,t){t&&(q(t,`fill`)&&(e.textFill=t.fill),q(t,`stroke`)&&(e.textStroke=t.fill),q(t,`lineWidth`)&&(e.textStrokeWidth=t.lineWidth),q(t,`font`)&&(e.font=t.font),q(t,`fontStyle`)&&(e.fontStyle=t.fontStyle),q(t,`fontWeight`)&&(e.fontWeight=t.fontWeight),q(t,`fontSize`)&&(e.fontSize=t.fontSize),q(t,`fontFamily`)&&(e.fontFamily=t.fontFamily),q(t,`align`)&&(e.textAlign=t.align),q(t,`verticalAlign`)&&(e.textVerticalAlign=t.verticalAlign),q(t,`lineHeight`)&&(e.textLineHeight=t.lineHeight),q(t,`width`)&&(e.textWidth=t.width),q(t,`height`)&&(e.textHeight=t.height),q(t,`backgroundColor`)&&(e.textBackgroundColor=t.backgroundColor),q(t,`padding`)&&(e.textPadding=t.padding),q(t,`borderColor`)&&(e.textBorderColor=t.borderColor),q(t,`borderWidth`)&&(e.textBorderWidth=t.borderWidth),q(t,`borderRadius`)&&(e.textBorderRadius=t.borderRadius),q(t,`shadowColor`)&&(e.textBoxShadowColor=t.shadowColor),q(t,`shadowBlur`)&&(e.textBoxShadowBlur=t.shadowBlur),q(t,`shadowOffsetX`)&&(e.textBoxShadowOffsetX=t.shadowOffsetX),q(t,`shadowOffsetY`)&&(e.textBoxShadowOffsetY=t.shadowOffsetY),q(t,`textShadowColor`)&&(e.textShadowColor=t.textShadowColor),q(t,`textShadowBlur`)&&(e.textShadowBlur=t.textShadowBlur),q(t,`textShadowOffsetX`)&&(e.textShadowOffsetX=t.textShadowOffsetX),q(t,`textShadowOffsetY`)&&(e.textShadowOffsetY=t.textShadowOffsetY))}function MY(e,t){if(process.env.NODE_ENV!==`production`){var n=e+`^_^`+t;EY[n]||(console.warn(`[ECharts] DEPRECATED: "`+e+`" has been deprecated. `+t),EY[n]=!0)}}var NY={position:[`x`,`y`],scale:[`scaleX`,`scaleY`],origin:[`originX`,`originY`]},PY=Ls(NY),FY=Ps(jf,function(e,t){return e[t]=1,e},{}),IY=jf.join(`, `),LY=[``,`style`,`shape`,`extra`],RY=Cm();function zY(e,t,n,r,i){var a=e+`Animation`,o=Hy(e,r,i)||{},s=RY(t).userDuring;return o.duration>0&&(o.during=s?z(XY,{el:t,userDuring:s}):null,o.setToFinal=!0,o.scope=e),F(o,n[a]),o}function BY(e,t,n,r){r||={};var i=r.dataIndex,a=r.isInit,o=r.clearStyle,s=n.isAnimationEnabled(),c=RY(e),l=t.style;c.userDuring=t.during;var u={},d={};if(eX(e,t,d),e.type===`compound`)for(var f=e.shape.paths,p=t.shape.paths,m=0;m<p.length;m++){var h=p[m];QY(`shape`,h,f[m])}else QY(`shape`,t,d),QY(`extra`,t,d);if(!a&&s&&($Y(e,t,u),ZY(`shape`,e,t,u),ZY(`extra`,e,t,u),tX(e,t,l,u)),d.style=l,WY(e,d,o),KY(e,t),s)if(a){var g={};L(LY,function(e){var n=e?t[e]:t;n&&n.enterFrom&&(e&&(g[e]=g[e]||{}),F(e?g[e]:g,n.enterFrom))});var _=zY(`enter`,e,t,n,i);_.duration>0&&e.animateFrom(g,_)}else GY(e,t,i||0,n,u);VY(e,t),l?e.dirty():e.markRedraw()}function VY(e,t){for(var n=RY(e).leaveToProps,r=0;r<LY.length;r++){var i=LY[r],a=i?t[i]:t;a&&a.leaveTo&&(n||=RY(e).leaveToProps={},i&&(n[i]=n[i]||{}),F(i?n[i]:n,a.leaveTo))}}function HY(e,t,n,r){if(e){var i=e.parent,a=RY(e).leaveToProps;if(a){var o=zY(`update`,e,t,n,0);o.done=function(){i&&i.remove(e),r&&r()},e.animateTo(a,o)}else i&&i.remove(e),r&&r()}}function UY(e){return e===`all`}function WY(e,t,n){var r=t.style;if(!e.isGroup&&r){if(n){e.useStyle({});for(var i=e.animators,a=0;a<i.length;a++){var o=i[a];o.targetName===`style`&&o.changeTarget(e.style)}}e.setStyle(r)}t&&(t.style=null,t&&e.attr(t),t.style=r)}function GY(e,t,n,r,i){if(i){var a=zY(`update`,e,t,r,n);a.duration>0&&e.animateFrom(i,a)}}function KY(e,t){q(t,`silent`)&&(e.silent=t.silent),q(t,`ignore`)&&(e.ignore=t.ignore),e instanceof Mh&&q(t,`invisible`)&&(e.invisible=t.invisible),e instanceof Bg&&q(t,`autoBatch`)&&(e.autoBatch=t.autoBatch)}var qY={},JY={setTransform:function(e,t){return process.env.NODE_ENV!==`production`&&G(q(FY,e),`Only `+IY+" available in `setTransform`."),qY.el[e]=t,this},getTransform:function(e){return process.env.NODE_ENV!==`production`&&G(q(FY,e),`Only `+IY+" available in `getTransform`."),qY.el[e]},setShape:function(e,t){process.env.NODE_ENV!==`production`&&YY(e);var n=qY.el,r=n.shape||={};return r[e]=t,n.dirtyShape&&n.dirtyShape(),this},getShape:function(e){process.env.NODE_ENV!==`production`&&YY(e);var t=qY.el.shape;if(t)return t[e]},setStyle:function(e,t){process.env.NODE_ENV!==`production`&&YY(e);var n=qY.el,r=n.style;return r&&(process.env.NODE_ENV!==`production`&&Ks(t)&&Wp(`style.`+e+` must not be assigned with NaN.`),r[e]=t,n.dirtyStyle&&n.dirtyStyle()),this},getStyle:function(e){process.env.NODE_ENV!==`production`&&YY(e);var t=qY.el.style;if(t)return t[e]},setExtra:function(e,t){process.env.NODE_ENV!==`production`&&YY(e);var n=qY.el.extra||(qY.el.extra={});return n[e]=t,this},getExtra:function(e){process.env.NODE_ENV!==`production`&&YY(e);var t=qY.el.extra;if(t)return t[e]}};function YY(e){if(process.env.NODE_ENV!==`production`&&(e===`transition`||e===`enterFrom`||e===`leaveTo`))throw Error(`key must not be "`+e+`"`)}function XY(){var e=this,t=e.el;if(t){var n=RY(t).userDuring,r=e.userDuring;if(n!==r){e.el=e.userDuring=null;return}qY.el=t,r(JY)}}function ZY(e,t,n,r){var i=n[e];if(i){var a=t[e],o;if(a){var s=n.transition,c=i.transition;if(c)if(!o&&(o=r[e]={}),UY(c))F(o,a);else for(var l=$p(c),u=0;u<l.length;u++){var d=l[u],f=a[d];o[d]=f}else if(UY(s)||js(s,e)>=0){!o&&(o=r[e]={});for(var p=Ls(a),u=0;u<p.length;u++){var d=p[u],f=a[d];nX(i[d],f)&&(o[d]=f)}}}}}function QY(e,t,n){var r=t[e];if(r)for(var i=n[e]={},a=Ls(r),o=0;o<a.length;o++){var s=a[o];i[s]=Pd(r[s])}}function $Y(e,t,n){for(var r=t.transition,i=UY(r)?jf:$p(r||[]),a=0;a<i.length;a++){var o=i[a];if(!(o===`style`||o===`shape`||o===`extra`)){var s=e[o];process.env.NODE_ENV!==`production`&&rX(o,`el.transition`),n[o]=s}}}function eX(e,t,n){for(var r=0;r<PY.length;r++){var i=PY[r],a=NY[i],o=t[i];o&&(n[a[0]]=o[0],n[a[1]]=o[1])}for(var r=0;r<jf.length;r++){var s=jf[r];t[s]!=null&&(n[s]=t[s])}}function tX(e,t,n,r){if(n){var i=e.style,a;if(i){var o=n.transition,s=t.transition;if(o&&!UY(o)){var c=$p(o);!a&&(a=r.style={});for(var l=0;l<c.length;l++){var u=c[l],d=i[u];a[u]=d}}else if(e.getAnimationStyleProps&&(UY(s)||UY(o)||js(s,`style`)>=0)){var f=e.getAnimationStyleProps(),p=f?f.style:null;if(p){!a&&(a=r.style={});for(var m=Ls(n),l=0;l<m.length;l++){var u=m[l];if(p[u]){var d=i[u];a[u]=d}}}}}}}function nX(e,t){return Ns(e)?e!==t:e!=null&&isFinite(e)}var rX;process.env.NODE_ENV!==`production`&&(rX=function(e,t){q(FY,e)||Wp("Prop `"+e+"` is not a permitted in `"+t+"`. Only `"+Ls(FY).join("`, `")+"` are permitted.")});var iX=Cm(),aX=[`percent`,`easing`,`shape`,`style`,`extra`];function oX(e){e.stopAnimation(`keyframe`),e.attr(iX(e))}function sX(e,t,n){if(!(!n.isAnimationEnabled()||!t)){if(B(t)){L(t,function(t){sX(e,t,n)});return}var r=t.keyframes,i=t.duration;if(n&&i==null){var a=Hy(`enter`,n,0);i=a&&a.duration}if(!(!r||!i)){var o=iX(e);L(LY,function(n){if(!(n&&!e[n])){var a,s=!1;r.sort(function(e,t){return e.percent-t.percent}),L(r,function(r){var c=e.animators,l=n?r[n]:r;if(process.env.NODE_ENV!==`production`&&r.percent>=1&&(s=!0),l){var u=Ls(l);if(n||(u=Fs(u,function(e){return js(aX,e)<0})),u.length){a||(a=e.animate(n,t.loop,!0),a.scope=`keyframe`);for(var d=0;d<c.length;d++)c[d]!==a&&c[d].targetName===a.targetName&&c[d].stopTracks(u);n&&(o[n]=o[n]||{});var f=n?o[n]:o;L(u,function(t){f[t]=((n?e[n]:e)||{})[t]}),a.whenWithKeys(i*r.percent,l,u,r.easing)}}}),a&&(process.env.NODE_ENV!==`production`&&(s||Wp(`End frame with percent: 1 is missing in the keyframeAnimation.`,!0)),a.delay(t.delay||0).duration(i).start(t.easing))}})}}}var cX=`emphasis`,lX=`normal`,uX=`blur`,dX=`select`,fX=[lX,cX,uX,dX],pX={normal:[`itemStyle`],emphasis:[cX,`itemStyle`],blur:[uX,`itemStyle`],select:[dX,`itemStyle`]},mX={normal:[`label`],emphasis:[cX,`label`],blur:[uX,`label`],select:[dX,`label`]},hX=[`x`,`y`],gX=`e\0\0`,_X={normal:{},emphasis:{},blur:{},select:{}},vX={cartesian2d:_Y,geo:yY,single:xY,polar:CY,calendar:wY,matrix:TY};function yX(e){return e instanceof Bg}function bX(e){return e instanceof Mh}function xX(e,t){t.copyTransform(e),bX(t)&&bX(e)&&(t.setStyle(e.style),t.z=e.z,t.z2=e.z2,t.zlevel=e.zlevel,t.invisible=e.invisible,t.ignore=e.ignore,yX(t)&&yX(e)&&t.setShape(e.shape))}var SX=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n,r){this._progressiveEls=null;var i=this._data,a=e.getData(),o=this.group,s=OX(e,a,t,n);i||o.removeAll(),a.diff(i).add(function(t){AX(n,null,t,s(t,r),e,o,a)}).remove(function(t){var n=i.getItemGraphicEl(t);n&&HY(n,mY(n).option,e)}).update(function(t,c){AX(n,i.getItemGraphicEl(c),t,s(t,r),e,o,a)}).execute();var c=e.get(`clip`,!0)?AF(e.coordinateSystem,!1,e):null;c?o.setClipPath(c):o.removeClipPath(),this._data=a},t.prototype.incrementalPrepareRender=function(e,t,n){this.group.removeAll(),this._data=null},t.prototype.incrementalRender=function(e,t,n,r,i){var a=t.getData(),o=OX(t,a,n,r),s=this._progressiveEls=[];function c(e){e.isGroup||(e.incremental=!0,e.ensureState(`emphasis`).hoverLayer=!0)}for(var l=e.start;l<e.end;l++){var u=AX(null,null,l,o(l,i),t,this.group,a);u&&(u.traverse(c),s.push(u))}},t.prototype.eachRendered=function(e){Tb(this._progressiveEls||this.group,e)},t.prototype.filterForExposedEvent=function(e,t,n,r){var i=t.element;if(i==null||n.name===i)return!0;for(;(n=n.__hostTarget||n.parent)&&n!==this.group;)if(n.name===i)return!0;return!1},t.type=`custom`,t}(yE);function CX(e){var t=e.type,n;if(t===`path`){var r=e.shape,i=r.width!=null&&r.height!=null?{x:r.x||0,y:r.y||0,width:r.width,height:r.height}:null,a=WX(r);n=rb(a,null,i,r.layout||`center`),mY(n).customPathData=a}else if(t===`image`)n=new Kg({}),mY(n).customImagePath=e.style.image;else if(t===`text`)n=new a_({});else if(t===`group`)n=new Y;else if(t===`compoundPath`){var r=e.shape;if(!r||!r.paths){var o=``;process.env.NODE_ENV!==`production`&&(o=`shape.paths must be specified in compoundPath`),Yp(o)}n=new ky({shape:{paths:R(r.paths,function(e){if(e.type===`path`)return rb(e.shape.pathData,e,null);var n=nb(e.type);if(!n){var r=``;process.env.NODE_ENV!==`production`&&(r=`graphic type "`+t+`" can not be found.`),Yp(r)}return new n})}})}else{var s=nb(t);if(!s){var o=``;process.env.NODE_ENV!==`production`&&(o=`graphic type "`+t+`" can not be found.`),Yp(o)}n=new s}return mY(n).customGraphicType=t,n.name=e.name,n.z2EmphasisLift=1,n.z2SelectLift=1,n}function wX(e,t,n,r,i,a,o){oX(t);var s=i&&i.normal.cfg;s&&t.setTextConfig(s),r&&r.transition==null&&(r.transition=hX);var c=r&&r.style;if(c){if(t.type===`text`){var l=c;q(l,`textFill`)&&(l.fill=l.textFill),q(l,`textStroke`)&&(l.stroke=l.textStroke)}var u=void 0,d=yX(t)?c.decal:null;e&&d&&(d.dirty=!0,u=VD(d,e)),c.__decalPattern=u}if(bX(t)&&c){var u=c.__decalPattern;u&&(c.decal=u)}BY(t,r,a,{dataIndex:n,isInit:o,clearStyle:!0}),sX(t,r.keyframeAnimation,a)}function TX(e,t,n,r,i){var a=t.isGroup?null:t,o=i&&i[e].cfg;if(a){var s=a.ensureState(e);if(r===!1){var c=a.getState(e);c&&(c.style=null)}else s.style=r||null;o&&(s.textConfig=o),Y_(a)}}function EX(e,t,n){if(!e.isGroup){var r=e,i=n.currentZ,a=n.currentZLevel;r.z=i,r.zlevel=a;var o=t.z2;o!=null&&(r.z2=o||0);for(var s=0;s<fX.length;s++)DX(r,t,fX[s])}}function DX(e,t,n){var r=n===lX,i=r?t:IX(t,n),a=i?i.z2:null,o;a!=null&&(o=r?e:e.ensureState(n),o.z2=a||0)}function OX(e,t,n,r){var i=e.get(`renderItem`);if(typeof i==`string`){var a=eO(i);a?i=a:process.env.NODE_ENV!==`production`&&console.warn(`Custom series renderItem '`+i+`' not found.
|
|
68
|
-
Call 'echarts.registerCustomSeries' to register it.`)}var o=e.coordinateSystem,s={};o&&(process.env.NODE_ENV!==`production`&&(G(i,`series.render is required.`),G(o.prepareCustoms||vX[o.type],`This coordSys does not support custom series.`)),s=o.prepareCustoms?o.prepareCustoms(o):vX[o.type](o));for(var c=I({getWidth:r.getWidth,getHeight:r.getHeight,getZr:r.getZr,getDevicePixelRatio:r.getDevicePixelRatio,value:x,style:C,ordinalRawValue:S,styleEmphasis:w,visual:D,barLayout:O,currentSeriesIndices:k,font:A},s.api||{}),l={context:{},seriesId:e.id,seriesName:e.name,seriesIndex:e.seriesIndex,coordSys:s.coordSys,dataInsideLength:t.count(),encode:kX(e.getData()),itemPayload:e.get(`itemPayload`)||{}},u,d,f={},p={},m={},h={},g=0;g<fX.length;g++){var _=fX[g];m[_]=e.getModel(pX[_]),h[_]=e.getModel(mX[_])}function v(e){return e===u?d||=t.getItemModel(e):t.getItemModel(e)}function y(e,n){return t.hasItemOption?e===u?f[n]||(f[n]=v(e).getModel(pX[n])):v(e).getModel(pX[n]):m[n]}function b(e,n){return t.hasItemOption?e===u?p[n]||(p[n]=v(e).getModel(mX[n])):v(e).getModel(mX[n]):h[n]}return function(e,n){return u=e,d=null,f={},p={},i&&i(I({dataIndexInside:e,dataIndex:t.getRawIndex(e),actionType:n?n.type:null},l),c)};function x(e,n){return n??=u,t.getStore().get(t.getDimensionIndex(e||0),n)}function S(e,n){n??=u,e||=0;var r=t.getDimensionInfo(e);if(!r){var i=t.getDimensionIndex(e);return i>=0?t.getStore().get(i,n):void 0}var a=t.get(r.name,n),o=r&&r.ordinalMeta;return o?o.categories[a]:a}function C(n,r){process.env.NODE_ENV!==`production`&&MY(`api.style`,`Please write literal style directly instead.`),r??=u;var i=t.getItemVisual(r,`style`),a=i&&i.fill,o=i&&i.opacity,s=y(r,lX).getItemStyle();a!=null&&(s.fill=a),o!=null&&(s.opacity=o);var c={inheritColor:H(a)?a:Z.color.neutral99},l=b(r,lX),d=zb(l,null,c,!1,!0);d.text=l.getShallow(`show`)?W(e.getFormattedLabel(r,lX),pF(t,r)):null;var f=Bb(l,c,!1);return E(n,s),s=AY(s,d,f),n&&T(s,n),s.legacy=!0,s}function w(n,r){process.env.NODE_ENV!==`production`&&MY(`api.styleEmphasis`,`Please write literal style directly instead.`),r??=u;var i=y(r,cX).getItemStyle(),a=b(r,cX),o=zb(a,null,null,!0,!0);o.text=a.getShallow(`show`)?Js(e.getFormattedLabel(r,cX),e.getFormattedLabel(r,lX),pF(t,r)):null;var s=Bb(a,null,!0);return E(n,i),i=AY(i,o,s),n&&T(i,n),i.legacy=!0,i}function T(e,t){for(var n in t)q(t,n)&&(e[n]=t[n])}function E(e,t){e&&(e.textFill&&(t.textFill=e.textFill),e.textPosition&&(t.textPosition=e.textPosition))}function D(e,n){if(n??=u,q(fY,e)){var r=t.getItemVisual(n,`style`);return r?r[fY[e]]:null}if(q(pY,e))return t.getItemVisual(n,e)}function O(e){if(o.type===`cartesian2d`)return $A(I({axis:o.getBaseAxis()},e))}function k(){return n.getCurrentSeriesIndices()}function A(e){return Gb(e,n)}}function kX(e){var t={};return L(e.dimensions,function(n){var r=e.getDimensionInfo(n);if(!r.isExtraCoord){var i=r.coordDim,a=t[i]=t[i]||[];a[r.coordDimIndex]=e.getDimensionIndex(n)}}),t}function AX(e,t,n,r,i,a,o){if(!r){a.remove(t);return}var s=jX(e,t,n,r,i,a);return s&&o.setItemGraphicEl(n,s),s&&_v(s,r.focus,r.blurScope,r.emphasisDisabled),s}function jX(e,t,n,r,i,a){process.env.NODE_ENV!==`production`&&G(r,`should not have an null/undefined element setting`);var o=-1,s=t;t&&MX(t,r,i)&&(o=js(a.childrenRef(),t),t=null);var c=!t,l=t;l?l.clearStates():(l=CX(r),s&&xX(s,l)),r.morph===!1?l.disableMorphing=!0:l.disableMorphing&&=!1,r.tooltipDisabled&&(l.tooltipDisabled=!0),_X.normal.cfg=_X.normal.conOpt=_X.emphasis.cfg=_X.emphasis.conOpt=_X.blur.cfg=_X.blur.conOpt=_X.select.cfg=_X.select.conOpt=null,_X.isLegacy=!1,PX(l,n,r,i,c,_X),NX(l,n,r,i,c),wX(e,l,n,r,_X,i,c),q(r,`info`)&&(mY(l).info=r.info);for(var u=0;u<fX.length;u++){var d=fX[u];if(d!==lX){var f=IX(r,d),p=LX(r,f,d);TX(d,l,f,p,_X)}}return EX(l,r,i),r.type===`group`&&RX(e,l,n,r,i),o>=0?a.replaceAt(l,o):a.add(l),l}function MX(e,t,n){var r=mY(e),i=t.type,a=t.shape,o=t.style;return n.isUniversalTransitionEnabled()||i!=null&&i!==r.customGraphicType||i===`path`&&GX(a)&&WX(a)!==r.customPathData||i===`image`&&q(o,`image`)&&o.image!==r.customImagePath}function NX(e,t,n,r,i){var a=n.clipPath;if(a===!1)e&&e.getClipPath()&&e.removeClipPath();else if(a){var o=e.getClipPath();o&&MX(o,a,r)&&(o=null),o||(o=CX(a),process.env.NODE_ENV!==`production`&&G(yX(o),"Only any type of `path` can be used in `clipPath`, rather than "+o.type+`.`),e.setClipPath(o)),wX(null,o,t,a,null,r,i)}}function PX(e,t,n,r,i,a){if(!(e.isGroup||e.type===`compoundPath`)){FX(n,null,a),FX(n,cX,a);var o=a.normal.conOpt,s=a.emphasis.conOpt,c=a.blur.conOpt,l=a.select.conOpt;if(o!=null||s!=null||l!=null||c!=null){var u=e.getTextContent();if(o===!1)u&&e.removeTextContent();else{o=a.normal.conOpt=o||{type:`text`},u?u.clearStates():(u=CX(o),e.setTextContent(u)),wX(null,u,t,o,null,r,i);for(var d=o&&o.style,f=0;f<fX.length;f++){var p=fX[f];if(p!==lX){var m=a[p].conOpt;TX(p,u,m,LX(o,m,p),null)}}d?u.dirty():u.markRedraw()}}}}function FX(e,t,n){var r=t?IX(e,t):e,i=t?LX(e,r,cX):e.style,a=e.type,o=r?r.textConfig:null,s=e.textContent,c=s?t?IX(s,t):s:null;if(i&&(n.isLegacy||DY(i,a,!!o,!!c))){n.isLegacy=!0;var l=OY(i,a,!t);!o&&l.textConfig&&(o=l.textConfig),!c&&l.textContent&&(c=l.textContent)}if(!t&&c){var u=c;!u.type&&(u.type=`text`),process.env.NODE_ENV!==`production`&&G(u.type===`text`,`textContent.type must be "text"`)}var d=t?n[t]:n.normal;d.cfg=o,d.conOpt=c}function IX(e,t){return t?e?e[t]:null:e}function LX(e,t,n){var r=t&&t.style;return r==null&&n===cX&&e&&(r=e.styleEmphasis),r}function RX(e,t,n,r,i){var a=r.children,o=a?a.length:0,s=r.$mergeChildren,c=s===`byName`||r.diffChildrenByName,l=s===!1;if(!(!o&&!c&&!l)){if(c){BX({api:e,oldChildren:t.children()||[],newChildren:a||[],dataIndex:n,seriesModel:i,group:t});return}l&&t.removeAll();for(var u=0;u<o;u++){var d=a[u],f=t.childAt(u);d?(d.ignore??=!1,jX(e,f,n,d,i,t)):(process.env.NODE_ENV!==`production`&&G(f,`renderItem should not return a group containing elements as null/undefined/{} if they do not exist before.`),f.ignore=!0)}for(var p=t.childCount()-1;p>=u;p--)zX(t,t.childAt(p),i)}}function zX(e,t,n){t&&HY(t,mY(e).option,n)}function BX(e){new Ik(e.oldChildren,e.newChildren,VX,VX,e).add(HX).update(HX).remove(UX).execute()}function VX(e,t){return(e&&e.name)??gX+t}function HX(e,t){var n=this.context,r=e==null?null:n.newChildren[e],i=t==null?null:n.oldChildren[t];jX(n.api,i,n.dataIndex,r,n.seriesModel,n.group)}function UX(e){var t=this.context,n=t.oldChildren[e];n&&HY(n,mY(n).option,t.seriesModel)}function WX(e){return e&&(e.pathData||e.d)}function GX(e){return e&&(q(e,`pathData`)||q(e,`d`))}function KX(e){e.registerChartView(SX),e.registerSeriesModel(hY)}var qX=Cm(),JX=P,YX=z,XX=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.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 Y,this.createPointerEl(o,c,e,t),this.createLabelEl(o,c,e,t),n.getZr().add(o);else{var d=Rs(ZX,t,u);this.updatePointerEl(o,c,d),this.updateLabelEl(o,c,d,t)}tZ(o,t,!0),this._renderHandle(i)}},e.prototype.remove=function(e){this.clear(e)},e.prototype.dispose=function(e){this.clear(e)},e.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&&r.getBandWidth()>o)return!0;if(a){var s=WL(e).seriesDataCount,c=r.getExtent();return Math.abs(c[0]-c[1])/s>o}return!1}return n===!0},e.prototype.makeElOption=function(e,t,n,r,i){},e.prototype.createPointerEl=function(e,t,n,r){var i=t.pointer;if(i){var a=qX(e).pointerEl=new Zy[i.type](JX(t.pointer));e.add(a)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=qX(e).labelEl=new a_(JX(t.label));e.add(i),$X(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=qX(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),n(r,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,r){var i=qX(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),$X(i,r))},e.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=gb(i.get(`icon`),{cursor:`move`,draggable:!0,onmousemove:function(e){tl(e.event)},onmousedown:YX(this._onHandleDragMove,this,0,0),drift:YX(this._onHandleDragMove,this),ondragend:YX(this._onHandleDragEnd,this)}),n.add(r)),tZ(r,t,!1),r.setStyle(i.getItemStyle(null,[`color`,`borderColor`,`borderWidth`,`opacity`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`]));var s=i.get(`size`);B(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,kE(this,`_doDispatchAxisPointer`,i.get(`throttle`)||0,`fixRate`),this._moveHandleToValue(e,o)}},e.prototype._moveHandleToValue=function(e,t){ZX(this._axisPointerModel,!t&&this._moveAnimation,this._handle,eZ(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var r=this.updateHandleTransform(eZ(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(eZ(r)),qX(n).lastProp=null,this._doDispatchAxisPointer()}},e.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}]})}},e.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get(`value`);this._moveHandleToValue(e),this._api.dispatchAction({type:`hideTip`})}},e.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),AE(this,`_doDispatchAxisPointer`)},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}},e}();function ZX(e,t,n,r){QX(qX(n).lastProp,r)||(qX(n).lastProp=r,t?Wy(n,r,e):(n.stopAnimation(),n.attr(r)))}function QX(e,t){if(U(e)&&U(t)){var n=!0;return L(t,function(t,r){n&&=QX(e[r],t)}),!!n}else return e===t}function $X(e,t){e[t.get([`label`,`show`])?`show`:`hide`]()}function eZ(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function tZ(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 nZ(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 rZ(e,t,n,r,i){var a=aZ(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=aS(o.get(`padding`)||0),c=o.getFont(),l=Vf(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),iZ(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:zb(o,{text:a,font:c,fill:o.getTextColor(),padding:s,backgroundColor:h}),z2:10}}function iZ(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 aZ(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:Bj(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};L(r,function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,i=t&&t.getDataParams(r);i&&s.seriesData.push(i)}),H(o)?a=o.replace(`{value}`,a):V(o)&&(a=o(s))}return a}function oZ(e,t,n){var r=sl();return fl(r,r,n.rotation),dl(r,r,n.position),db([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}function sZ(e,t,n,r,i,a){var o=YI.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get([`label`,`margin`]),rZ(t,r,i,a,{position:oZ(r.axis,e,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function cZ(e,t,n){return n||=0,{x1:e[n],y1:e[1-n],x2:t[n],y2:t[1-n]}}function lZ(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}}function uZ(e,t,n,r,i,a){return{cx:e,cy:t,r0:n,r,startAngle:i,endAngle:a,clockwise:!0}}var dZ=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,t,n,r,i){var a=n.axis,o=a.grid,s=r.get(`type`),c=fZ(o,a).getOtherAxis(a).getGlobalExtent(),l=a.toGlobalCoord(a.dataToCoord(t,!0));if(s&&s!==`none`){var u=nZ(r),d=pZ[s](a,l,c);d.style=u,e.graphicKey=d.type,e.pointer=d}sZ(t,e,gL(o.getRect(),n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=gL(t.axis.grid.getRect(),t,{labelInside:!1});r.labelMargin=n.get([`handle`,`margin`]);var i=oZ(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var i=n.axis,a=i.grid,o=i.getGlobalExtent(!0),s=fZ(a,i).getOtherAxis(i).getGlobalExtent(),c=i.dim===`x`?0:1,l=[e.x,e.y];l[c]+=t[c],l[c]=Math.min(o[1],l[c]),l[c]=Math.max(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]}},t}(XX);function fZ(e,t){var n={};return n[t.dim+`AxisIndex`]=t.index,e.getCartesian(n)}var pZ={line:function(e,t,n){return{type:`Line`,subPixelOptimize:!0,shape:cZ([t,n[0]],[t,n[1]],mZ(e))}},shadow:function(e,t,n){var r=Math.max(1,e.getBandWidth()),i=n[1]-n[0];return{type:`Rect`,shape:lZ([t-r/2,n[0]],[r,i],mZ(e))}}};function mZ(e){return e.dim===`x`?0:1}var hZ=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`axisPointer`,t.defaultOption={show:`auto`,z:50,type:`line`,snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:Z.color.border,width:1,type:`dashed`},shadowStyle:{color:Z.color.shadowTint},label:{show:!0,formatter:null,precision:`auto`,margin:3,color:Z.color.neutral00,padding:[5,7,5,7],backgroundColor:Z.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:Z.color.accent40,throttle:40}},t}(GS),gZ=Cm(),_Z=L;function vZ(e,t,n){if(!fs.node){var r=t.getZr();gZ(r).records||(gZ(r).records={}),yZ(r,t);var i=gZ(r).records[e]||(gZ(r).records[e]={});i.handler=n}}function yZ(e,t){if(gZ(e).initialized)return;gZ(e).initialized=!0,n(`click`,Rs(SZ,`click`)),n(`mousemove`,Rs(SZ,`mousemove`)),n(`globalout`,xZ);function n(n,r){e.on(n,function(n){var i=CZ(t);_Z(gZ(e).records,function(e){e&&r(e,n,i.dispatchAction)}),bZ(i.pendings,t)})}}function bZ(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 xZ(e,t,n){e.handler(`leave`,null,n)}function SZ(e,t,n,r){t.handler(e,n,r)}function CZ(e){var t={showTip:[],hideTip:[]},n=function(r){var i=t[r.type];i?i.push(r):(r.dispatchAction=n,e.dispatchAction(r))};return{dispatchAction:n,pendings:t}}function wZ(e,t){if(!fs.node){var n=t.getZr();(gZ(n).records||{})[e]&&(gZ(n).records[e]=null)}}var TZ=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=t.getComponent(`tooltip`),i=e.get(`triggerOn`)||r&&r.get(`triggerOn`)||`mousemove|click`;vZ(`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})})},t.prototype.remove=function(e,t){wZ(`axisPointer`,t)},t.prototype.dispose=function(e,t){wZ(`axisPointer`,t)},t.type=`axisPointer`,t}(hE);function EZ(e,t){var n=[],r=e.seriesIndex,i;if(r==null||!(i=t.getSeriesByIndex(r)))return{point:[]};var a=i.getData(),o=Sm(a,e);if(o==null||o<0||B(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`),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(R(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 DZ=Cm();function OZ(e,t,n){var r=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||z(n.dispatchAction,n),s=t.getComponent(`axisPointer`).coordSysAxesInfo;if(s){RZ(i)&&(i=EZ({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var c=RZ(i),l=a.axesInfo,u=s.axesInfo,d=r===`leave`||RZ(i),f={},p={},m={list:[],map:{}},h={showPointer:Rs(jZ,p),showTooltip:Rs(MZ,m)};L(s.coordSysMap,function(e,t){var n=c||e.containPoint(i);L(s.coordSysAxesInfo[t],function(e,t){var r=e.axis,a=IZ(l,e);if(!d&&n&&(!l||a)){var o=a&&a.value;o==null&&!c&&(o=r.pointToData(i)),o!=null&&kZ(e,o,h,!1,f)}})});var g={};return L(u,function(e,t){var n=e.linkGroup;n&&!p[t]&&L(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,LZ(t),LZ(e)))),g[e.key]=a}})}),L(g,function(e,t){kZ(u[t],e,h,!0,f)}),NZ(p,u,f),PZ(m,i,e,o),FZ(u,o,n),f}}function kZ(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=AZ(t,e),s=o.payloadBatch,c=o.snapToValue;s[0]&&i.seriesIndex==null&&F(i,s[0]),!r&&e.snap&&a.containData(c)&&c!=null&&(t=c),n.showPointer(e,t,s),n.showTooltip(e,o,c)}}function AZ(e,t){var n=t.axis,r=n.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return L(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(!(u==null||!isFinite(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),L(d,function(e){a.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})}))}}),{payloadBatch:a,snapToValue:i}}function jZ(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function MZ(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=qL(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 NZ(e,t,n){var r=n.axesInfo=[];L(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 PZ(e,t,n,r){if(RZ(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 FZ(e,t,n){var r=n.getZr(),i=`axisPointerLastHighlights`,a=DZ(r)[i]||{},o=DZ(r)[i]={};L(e,function(e,t){var n=e.axisPointerModel.option;n.status===`show`&&e.triggerEmphasis&&L(n.seriesDataIndices,function(e){var t=e.seriesIndex+` | `+e.dataIndex;o[t]=e})});var s=[],c=[];L(a,function(e,t){!o[t]&&c.push(e)}),L(o,function(e,t){!a[t]&&s.push(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 IZ(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 LZ(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 RZ(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function zZ(e){YL.registerAxisPointerClass(`CartesianAxisPointer`,dZ),e.registerComponentModel(hZ),e.registerComponentView(TZ),e.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!B(t)&&(e.axisPointer.link=[t])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent(`axisPointer`).coordSysAxesInfo=LL(e,t)}),e.registerAction({type:`updateAxisPointer`,event:`updateAxisPointer`,update:`:updateAxisPointer`},OZ)}function BZ(e){Nk(oR),Nk(zZ)}var VZ=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,t,n,r,i){var a=n.axis;a.dim===`angle`&&(this.animationThreshold=Math.PI/18);var o=a.polar,s=o.getOtherAxis(a).getExtent(),c=a.dataToCoord(t),l=r.get(`type`);if(l&&l!==`none`){var u=nZ(r),d=UZ[l](a,o,c,s);d.style=u,e.graphicKey=d.type,e.pointer=d}rZ(e,n,r,i,HZ(t,n,r,o,r.get([`label`,`margin`])))},t}(XX);function HZ(e,t,n,r,i){var a=t.axis,o=a.dataToCoord(e),s=r.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var c=r.getRadiusAxis().getExtent(),l,u,d;if(a.dim===`radius`){var f=sl();fl(f,f,s),dl(f,f,[r.cx,r.cy]),l=db([o,-i],f);var p=t.getModel(`axisLabel`).get(`rotate`)||0,m=YI.innerTextLayout(s,p*Math.PI/180,-1);u=m.textAlign,d=m.textVerticalAlign}else{var h=c[1];l=r.coordToPoint([h+i,o]);var g=r.cx,_=r.cy;u=Math.abs(l[0]-g)/h<.3?`center`:l[0]>g?`left`:`right`,d=Math.abs(l[1]-_)/h<.3?`middle`:l[1]>_?`top`:`bottom`}return{position:l,align:u,verticalAlign:d}}var UZ={line:function(e,t,n,r){return e.dim===`angle`?{type:`Line`,shape:cZ(t.coordToPoint([r[0],n]),t.coordToPoint([r[1],n]))}:{type:`Circle`,shape:{cx:t.cx,cy:t.cy,r:n}}},shadow:function(e,t,n,r){var i=Math.max(1,e.getBandWidth()),a=Math.PI/180;return e.dim===`angle`?{type:`Sector`,shape:uZ(t.cx,t.cy,r[0],r[1],(-n-i/2)*a,(-n+i/2)*a)}:{type:`Sector`,shape:uZ(t.cx,t.cy,n-i/2,n+i/2,0,Math.PI*2)}}},WZ=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.findAxisModel=function(e){var t;return this.ecModel.eachComponent(e,function(e){e.getCoordSysModel()===this&&(t=e)},this),t},t.type=`polar`,t.dependencies=[`radiusAxis`,`angleAxis`],t.defaultOption={z:0,center:[`50%`,`50%`],radius:`80%`},t}(GS),GZ=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents(`polar`,Dm).models[0]},t.type=`polarAxis`,t}(GS);Ms(GZ,Yj);var KZ=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`angleAxis`,t}(GZ),qZ=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`radiusAxis`,t}(GZ),JZ=function(e){N(t,e);function t(t,n){return e.call(this,`radius`,t,n)||this}return t.prototype.pointToData=function(e,t){return this.polar.pointToData(e,t)[this.dim===`radius`?0:1]},t}(IM);JZ.prototype.dataToRadius=IM.prototype.dataToCoord,JZ.prototype.radiusToData=IM.prototype.coordToData;var YZ=Cm(),XZ=function(e){N(t,e);function t(t,n){return e.call(this,`angle`,t,n||[0,360])||this}return t.prototype.pointToData=function(e,t){return this.polar.pointToData(e,t)[this.dim===`radius`?0:1]},t.prototype.calculateCategoryInterval=function(){var e=this,t=e.getLabelModel(),n=e.scale,r=n.getExtent(),i=n.count();if(r[1]-r[0]<1)return 0;var a=r[0],o=e.dataToCoord(a+1)-e.dataToCoord(a),s=Math.abs(o),c=Vf(a==null?``:a+``,t.getFont(),`center`,`top`),l=Math.max(c.height,7)/s;isNaN(l)&&(l=1/0);var u=Math.max(0,Math.floor(l)),d=YZ(e.model),f=d.lastAutoInterval,p=d.lastTickCount;return f!=null&&p!=null&&Math.abs(f-u)<=1&&Math.abs(p-i)<=1&&f>u?u=f:(d.lastTickCount=i,d.lastAutoInterval=u),u},t}(IM);XZ.prototype.dataToAngle=IM.prototype.dataToCoord,XZ.prototype.angleToData=IM.prototype.coordToData;var ZZ=[`radius`,`angle`],QZ=function(){function e(e){this.dimensions=ZZ,this.type=`polar`,this.cx=0,this.cy=0,this._radiusAxis=new JZ,this._angleAxis=new XZ,this.axisPointerEnabled=!0,this.name=e||``,this._radiusAxis.polar=this._angleAxis.polar=this}return e.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},e.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},e.prototype.getAxis=function(e){var t=`_`+e+`Axis`;return this[t]},e.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},e.prototype.getAxesByScale=function(e){var t=[],n=this._angleAxis,r=this._radiusAxis;return n.scale.type===e&&t.push(n),r.scale.type===e&&t.push(r),t},e.prototype.getAngleAxis=function(){return this._angleAxis},e.prototype.getRadiusAxis=function(){return this._radiusAxis},e.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},e.prototype.getBaseAxis=function(){return this.getAxesByScale(`ordinal`)[0]||this.getAxesByScale(`time`)[0]||this.getAngleAxis()},e.prototype.getTooltipAxes=function(e){var t=e!=null&&e!==`auto`?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},e.prototype.dataToPoint=function(e,t,n){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)],n)},e.prototype.pointToData=function(e,t,n){n||=[];var r=this.pointToCoord(e);return n[0]=this._radiusAxis.radiusToData(r[0],t),n[1]=this._angleAxis.angleToData(r[1],t),n},e.prototype.pointToCoord=function(e){var t=e[0]-this.cx,n=e[1]-this.cy,r=this.getAngleAxis(),i=r.getExtent(),a=Math.min(i[0],i[1]),o=Math.max(i[0],i[1]);r.inverse?a=o-360:o=a+360;var s=Math.sqrt(t*t+n*n);t/=s,n/=s;for(var c=Math.atan2(-n,t)/Math.PI*180,l=c<a?1:-1;c<a||c>o;)c+=l*360;return[s,c]},e.prototype.coordToPoint=function(e,t){t||=[];var n=e[0],r=e[1]/180*Math.PI;return t[0]=Math.cos(r)*n+this.cx,t[1]=-Math.sin(r)*n+this.cy,t},e.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis().getExtent().slice();t[0]>t[1]&&t.reverse();var n=e.getExtent(),r=Math.PI/180,i=1e-4;return{cx:this.cx,cy:this.cy,r0:t[0],r:t[1],startAngle:-n[0]*r,endAngle:-n[1]*r,clockwise:e.inverse,contain:function(e,t){var n=e-this.cx,r=t-this.cy,a=n*n+r*r,o=this.r,s=this.r0;return o!==s&&a-i<=o*o&&a+i>=s*s},x:this.cx-t[1],y:this.cy-t[1],width:t[1]*2,height:t[1]*2}},e.prototype.convertToPixel=function(e,t,n){return $Z(t)===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(e,t,n){return $Z(t)===this?this.pointToData(n):null},e}();function $Z(e){var t=e.seriesModel,n=e.polarModel;return n&&n.coordinateSystem||t&&t.coordinateSystem}function eQ(e,t,n){var r=t.get(`center`),i=LS(t,n).refContainer;e.cx=X(r[0],i.width)+i.x,e.cy=X(r[1],i.height)+i.y;var a=e.getRadiusAxis(),o=Math.min(i.width,i.height)/2,s=t.get(`radius`);s==null?s=[0,`100%`]:B(s)||(s=[0,s]);var c=[X(s[0],o),X(s[1],o)];a.inverse?a.setExtent(c[1],c[0]):a.setExtent(c[0],c[1])}function tQ(e,t){var n=this,r=n.getAngleAxis(),i=n.getRadiusAxis();if(r.scale.setExtent(1/0,-1/0),i.scale.setExtent(1/0,-1/0),e.eachSeries(function(e){if(e.coordinateSystem===n){var t=e.getData();L(Uj(t,`radius`),function(e){i.scale.unionExtentFromData(t,e)}),L(Uj(t,`angle`),function(e){r.scale.unionExtentFromData(t,e)})}}),Ij(r.scale,r.model),Ij(i.scale,i.model),r.type===`category`&&!r.onBand){var a=r.getExtent(),o=360/r.scale.count();r.inverse?a[1]+=o:a[1]-=o,r.setExtent(a[0],a[1])}}function nQ(e){return e.mainType===`angleAxis`}function rQ(e,t){if(e.type=t.get(`type`),e.scale=Lj(t),e.onBand=t.get(`boundaryGap`)&&e.type===`category`,e.inverse=t.get(`inverse`),nQ(t)){e.inverse=e.inverse!==t.get(`clockwise`);var n=t.get(`startAngle`),r=t.get(`endAngle`)??n+(e.inverse?-360:360);e.setExtent(n,r)}t.axis=e,e.model=t}var iQ={dimensions:ZZ,create:function(e,t){var n=[];return e.eachComponent(`polar`,function(e,r){var i=new QZ(r+``);i.update=tQ;var a=i.getRadiusAxis(),o=i.getAngleAxis(),s=e.findAxisModel(`radiusAxis`),c=e.findAxisModel(`angleAxis`);rQ(a,s),rQ(o,c),eQ(i,e,t),n.push(i),e.coordinateSystem=i,i.model=e}),e.eachSeries(function(e){if(e.get(`coordinateSystem`)===`polar`){var t=e.getReferringComponents(`polar`,Dm).models[0];if(process.env.NODE_ENV!==`production`&&!t)throw Error(`Polar "`+qs(e.get(`polarIndex`),e.get(`polarId`),0)+`" not found`);e.coordinateSystem=t.coordinateSystem}}),n}},aQ=[`axisLine`,`axisLabel`,`axisTick`,`minorTick`,`splitLine`,`minorSplitLine`,`splitArea`];function oQ(e,t,n){t[1]>t[0]&&(t=t.slice().reverse());var r=e.coordToPoint([t[0],n]),i=e.coordToPoint([t[1],n]);return{x1:r[0],y1:r[1],x2:i[0],y2:i[1]}}function sQ(e){return+!e.getRadiusAxis().inverse}function cQ(e){var t=e[0],n=e[e.length-1];t&&n&&Math.abs(Math.abs(t.coord-n.coord)-360)<1e-4&&e.pop()}var lQ=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass=`PolarAxisPointer`,n}return t.prototype.render=function(e,t){if(this.group.removeAll(),e.get(`show`)){var n=e.axis,r=n.polar,i=r.getRadiusAxis().getExtent(),a=n.getTicksCoords({breakTicks:`none`}),o=n.getMinorTicksCoords(),s=R(n.getViewLabels(),function(e){e=P(e);var t=n.scale,r=t.type===`ordinal`?t.getRawOrdinalNumber(e.tickValue):e.tickValue;return e.coord=n.dataToCoord(r),e});cQ(s),cQ(a),L(aQ,function(t){e.get([t,`show`])&&(!n.scale.isBlank()||t===`axisLine`)&&uQ[t](this.group,e,r,a,o,i,s)},this)}},t.type=`angleAxis`,t}(YL),uQ={axisLine:function(e,t,n,r,i,a){var o=t.getModel([`axisLine`,`lineStyle`]),s=n.getAngleAxis(),c=Math.PI/180,l=s.getExtent(),u=sQ(n),d=+!u,f,p=Math.abs(l[1]-l[0])===360?`Circle`:`Arc`;f=a[d]===0?new Zy[p]({shape:{cx:n.cx,cy:n.cy,r:a[u],startAngle:-l[0]*c,endAngle:-l[1]*c,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):new by({shape:{cx:n.cx,cy:n.cy,r:a[u],r0:a[d]},style:o.getLineStyle(),z2:1,silent:!0}),f.style.fill=null,e.add(f)},axisTick:function(e,t,n,r,i,a){var o=t.getModel(`axisTick`),s=(o.get(`inside`)?-1:1)*o.get(`length`),c=a[sQ(n)],l=R(r,function(e){return new wy({shape:oQ(n,[c,c+s],e.coord)})});e.add(ob(l,{style:I(o.getModel(`lineStyle`).getLineStyle(),{stroke:t.get([`axisLine`,`lineStyle`,`color`])})}))},minorTick:function(e,t,n,r,i,a){if(i.length){for(var o=t.getModel(`axisTick`),s=t.getModel(`minorTick`),c=(o.get(`inside`)?-1:1)*s.get(`length`),l=a[sQ(n)],u=[],d=0;d<i.length;d++)for(var f=0;f<i[d].length;f++)u.push(new wy({shape:oQ(n,[l,l+c],i[d][f].coord)}));e.add(ob(u,{style:I(s.getModel(`lineStyle`).getLineStyle(),I(o.getLineStyle(),{stroke:t.get([`axisLine`,`lineStyle`,`color`])}))}))}},axisLabel:function(e,t,n,r,i,a,o){var s=t.getCategories(!0),c=t.getModel(`axisLabel`),l=c.get(`margin`),u=t.get(`triggerEvent`);L(o,function(r,i){var o=c,d=r.tickValue,f=a[sQ(n)],p=n.coordToPoint([f+l,r.coord]),m=n.cx,h=n.cy,g=Math.abs(p[0]-m)/f<.3?`center`:p[0]>m?`left`:`right`,_=Math.abs(p[1]-h)/f<.3?`middle`:p[1]>h?`top`:`bottom`;if(s&&s[d]){var v=s[d];U(v)&&v.textStyle&&(o=new ex(v.textStyle,c,c.ecModel))}var y=new a_({silent:YI.isLabelSilent(t),style:zb(o,{x:p[0],y:p[1],fill:o.getTextColor()||t.get([`axisLine`,`lineStyle`,`color`]),text:r.formattedLabel,align:g,verticalAlign:_})});if(e.add(y),Cb({el:y,componentModel:t,itemName:r.formattedLabel,formatterParamsExtra:{isTruncated:function(){return y.isTruncated},value:r.rawLabel,tickIndex:i}}),u){var b=YI.makeAxisEventDataBase(t);b.targetType=`axisLabel`,b.value=r.rawLabel,y_(y).eventData=b}},this)},splitLine:function(e,t,n,r,i,a){var o=t.getModel(`splitLine`).getModel(`lineStyle`),s=o.get(`color`),c=0;s=s instanceof Array?s:[s];for(var l=[],u=0;u<r.length;u++){var d=c++%s.length;l[d]=l[d]||[],l[d].push(new wy({shape:oQ(n,a,r[u].coord)}))}for(var u=0;u<l.length;u++)e.add(ob(l[u],{style:I({stroke:s[u%s.length]},o.getLineStyle()),silent:!0,z:t.get(`z`)}))},minorSplitLine:function(e,t,n,r,i,a){if(i.length){for(var o=t.getModel(`minorSplitLine`).getModel(`lineStyle`),s=[],c=0;c<i.length;c++)for(var l=0;l<i[c].length;l++)s.push(new wy({shape:oQ(n,a,i[c][l].coord)}));e.add(ob(s,{style:o.getLineStyle(),silent:!0,z:t.get(`z`)}))}},splitArea:function(e,t,n,r,i,a){if(r.length){var o=t.getModel(`splitArea`).getModel(`areaStyle`),s=o.get(`color`),c=0;s=s instanceof Array?s:[s];for(var l=[],u=Math.PI/180,d=-r[0].coord*u,f=Math.min(a[0],a[1]),p=Math.max(a[0],a[1]),m=t.get(`clockwise`),h=1,g=r.length;h<=g;h++){var _=h===g?r[0].coord:r[h].coord,v=c++%s.length;l[v]=l[v]||[],l[v].push(new vy({shape:{cx:n.cx,cy:n.cy,r0:f,r:p,startAngle:d,endAngle:-_*u,clockwise:m},silent:!0})),d=-_*u}for(var h=0;h<l.length;h++)e.add(ob(l[h],{style:I({fill:s[h%s.length]},o.getAreaStyle()),silent:!0}))}}},dQ=[`splitLine`,`splitArea`,`minorSplitLine`],fQ=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass=`PolarAxisPointer`,n}return t.prototype.render=function(e,t,n){if(this.group.removeAll(),e.get(`show`)){var r=this._axisGroup,i=this._axisGroup=new Y;this.group.add(i);var a=e.axis,o=a.polar,s=o.getAngleAxis(),c=a.getTicksCoords(),l=a.getMinorTicksCoords(),u=s.getExtent()[0],d=a.getExtent(),f=new YI(e,n,mQ(o,e,u));f.build(),i.add(f.group),mb(r,i,e),L(dQ,function(t){e.get([t,`show`])&&!a.scale.isBlank()&&pQ[t](this.group,e,o,u,d,c,l)},this)}},t.type=`radiusAxis`,t}(YL),pQ={splitLine:function(e,t,n,r,i,a){var o=t.getModel(`splitLine`).getModel(`lineStyle`),s=o.get(`color`),c=0,l=n.getAngleAxis(),u=Math.PI/180,d=l.getExtent(),f=Math.abs(d[1]-d[0])===360?`Circle`:`Arc`;s=s instanceof Array?s:[s];for(var p=[],m=0;m<a.length;m++){var h=c++%s.length;p[h]=p[h]||[],p[h].push(new Zy[f]({shape:{cx:n.cx,cy:n.cy,r:Math.max(a[m].coord,0),startAngle:-d[0]*u,endAngle:-d[1]*u,clockwise:l.inverse}}))}for(var m=0;m<p.length;m++)e.add(ob(p[m],{style:I({stroke:s[m%s.length],fill:null},o.getLineStyle()),silent:!0}))},minorSplitLine:function(e,t,n,r,i,a,o){if(o.length){for(var s=t.getModel(`minorSplitLine`).getModel(`lineStyle`),c=[],l=0;l<o.length;l++)for(var u=0;u<o[l].length;u++)c.push(new $v({shape:{cx:n.cx,cy:n.cy,r:o[l][u].coord}}));e.add(ob(c,{style:I({fill:null},s.getLineStyle()),silent:!0}))}},splitArea:function(e,t,n,r,i,a){if(a.length){var o=t.getModel(`splitArea`).getModel(`areaStyle`),s=o.get(`color`),c=0;s=s instanceof Array?s:[s];for(var l=[],u=a[0].coord,d=1;d<a.length;d++){var f=c++%s.length;l[f]=l[f]||[],l[f].push(new vy({shape:{cx:n.cx,cy:n.cy,r0:u,r:a[d].coord,startAngle:0,endAngle:Math.PI*2},silent:!0})),u=a[d].coord}for(var d=0;d<l.length;d++)e.add(ob(l[d],{style:I({fill:s[d%s.length]},o.getAreaStyle()),silent:!0}))}}};function mQ(e,t,n){return{position:[e.cx,e.cy],rotation:n/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:t.getModel(`axisLabel`).get(`rotate`),z2:1}}function hQ(e){return e.get(`stack`)||`__ec_stack_`+e.seriesIndex}function gQ(e,t){return t.dim+e.model.componentIndex}function _Q(e,t,n){var r={},i=vQ(Fs(t.getSeriesByType(e),function(e){return!t.isSeriesFiltered(e)&&e.coordinateSystem&&e.coordinateSystem.type===`polar`}));t.eachSeriesByType(e,function(e){if(e.coordinateSystem.type===`polar`){var t=e.getData(),n=e.coordinateSystem,a=n.getBaseAxis(),o=gQ(n,a),s=hQ(e),c=i[o][s],l=c.offset,u=c.width,d=n.getOtherAxis(a),f=e.coordinateSystem.cx,p=e.coordinateSystem.cy,m=e.get(`barMinHeight`)||0,h=e.get(`barMinAngle`)||0;r[s]=r[s]||[];for(var g=t.mapDimension(d.dim),_=t.mapDimension(a.dim),v=xA(t,g),y=a.dim!==`radius`||!e.get(`roundCap`,!0),b=d.model.get(`startValue`),x=d.dataToCoord(b||0),S=0,C=t.count();S<C;S++){var w=t.get(g,S),T=t.get(_,S),E=w>=0?`p`:`n`,D=x;v&&(r[s][T]||(r[s][T]={p:x,n:x}),D=r[s][T][E]);var O=void 0,k=void 0,A=void 0,j=void 0;if(d.dim===`radius`){var ee=d.dataToCoord(w)-x,te=a.dataToCoord(T);Math.abs(ee)<m&&(ee=(ee<0?-1:1)*m),O=D,k=D+ee,A=te-l,j=A-u,v&&(r[s][T][E]=k)}else{var ne=d.dataToCoord(w,y)-x,re=a.dataToCoord(T);Math.abs(ne)<h&&(ne=(ne<0?-1:1)*h),O=re+l,k=O+u,A=D,j=D+ne,v&&(r[s][T][E]=j)}t.setItemLayout(S,{cx:f,cy:p,r0:O,r:k,startAngle:-A*Math.PI/180,endAngle:-j*Math.PI/180,clockwise:A>=j})}}})}function vQ(e){var t={};L(e,function(e,n){var r=e.getData(),i=e.coordinateSystem,a=i.getBaseAxis(),o=gQ(i,a),s=a.getExtent(),c=a.type===`category`?a.getBandWidth():Math.abs(s[1]-s[0])/r.count(),l=t[o]||{bandWidth:c,remainedWidth:c,autoWidthCount:0,categoryGap:`20%`,gap:`30%`,stacks:{}},u=l.stacks;t[o]=l;var d=hQ(e);u[d]||l.autoWidthCount++,u[d]=u[d]||{width:0,maxWidth:0};var f=X(e.get(`barWidth`),c),p=X(e.get(`barMaxWidth`),c),m=e.get(`barGap`),h=e.get(`barCategoryGap`);f&&!u[d].width&&(f=Math.min(l.remainedWidth,f),u[d].width=f,l.remainedWidth-=f),p&&(u[d].maxWidth=p),m!=null&&(l.gap=m),h!=null&&(l.categoryGap=h)});var n={};return L(t,function(e,t){n[t]={};var r=e.stacks,i=e.bandWidth,a=X(e.categoryGap,i),o=X(e.gap,1),s=e.remainedWidth,c=e.autoWidthCount,l=(s-a)/(c+(c-1)*o);l=Math.max(l,0),L(r,function(e,t){var n=e.maxWidth;n&&n<l&&(n=Math.min(n,s),e.width&&(n=Math.min(n,e.width)),s-=n,e.width=n,c--)}),l=(s-a)/(c+(c-1)*o),l=Math.max(l,0);var u=0,d;L(r,function(e,t){e.width||=l,d=e,u+=e.width*(1+o)}),d&&(u-=d.width*o);var f=-u/2;L(r,function(e,r){n[t][r]=n[t][r]||{offset:f,width:e.width},f+=e.width*(1+o)})}),n}var yQ={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},bQ={splitNumber:5},xQ=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`polar`,t}(hE);function SQ(e){Nk(zZ),YL.registerAxisPointerClass(`PolarAxisPointer`,VZ),e.registerCoordinateSystem(`polar`,iQ),e.registerComponentModel(WZ),e.registerComponentView(xQ),OI(e,`angle`,KZ,yQ),OI(e,`radius`,qZ,bQ),e.registerComponentView(lQ),e.registerComponentView(fQ),e.registerLayout(Rs(_Q,`bar`))}function CQ(e,t){t||={};var n=e.coordinateSystem,r=e.axis,i={},a=r.position,o=r.orient,s=n.getRect(),c=[s.x,s.x+s.width,s.y,s.y+s.height],l={horizontal:{top:c[2],bottom:c[3]},vertical:{left:c[0],right:c[1]}};i.position=[o===`vertical`?l.vertical[a]:c[0],o===`horizontal`?l.horizontal[a]:c[3]],i.rotation=Math.PI/2*{horizontal:0,vertical:1}[o],i.labelDirection=i.tickDirection=i.nameDirection={top:-1,bottom:1,right:1,left:-1}[a],e.get([`axisTick`,`inside`])&&(i.tickDirection=-i.tickDirection),qs(t.labelInside,e.get([`axisLabel`,`inside`]))&&(i.labelDirection=-i.labelDirection);var u=e.get([`axisLabel`,`rotate`]);return i.labelRotate=a===`top`?-u:u,i.z2=1,i}var wQ=[`splitArea`,`splitLine`,`breakArea`],TQ=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass=`SingleAxisPointer`,n}return t.prototype.render=function(t,n,r,i){var a=this.group;a.removeAll();var o=this._axisGroup;this._axisGroup=new Y;var s=new YI(t,r,CQ(t));s.build(),a.add(this._axisGroup),a.add(s.group),L(wQ,function(e){t.get([e,`show`])&&EQ[e](this,this.group,this._axisGroup,t,r)},this),mb(o,this._axisGroup,t),e.prototype.render.call(this,t,n,r,i)},t.prototype.remove=function(){QL(this)},t.type=`singleAxis`,t}(YL),EQ={splitLine:function(e,t,n,r,i){var a=r.axis;if(!a.scale.isBlank()){var o=r.getModel(`splitLine`),s=o.getModel(`lineStyle`),c=s.get(`color`);c=c instanceof Array?c:[c];for(var l=s.get(`width`),u=r.coordinateSystem.getRect(),d=a.isHorizontal(),f=[],p=0,m=a.getTicksCoords({tickModel:o,breakTicks:`none`,pruneByBreak:`preserve_extent_bound`}),h=[],g=[],_=0;_<m.length;++_){var v=a.toGlobalCoord(m[_].coord);d?(h[0]=v,h[1]=u.y,g[0]=v,g[1]=u.y+u.height):(h[0]=u.x,h[1]=v,g[0]=u.x+u.width,g[1]=v);var y=new wy({shape:{x1:h[0],y1:h[1],x2:g[0],y2:g[1]},silent:!0});cb(y.shape,l);var b=p++%c.length;f[b]=f[b]||[],f[b].push(y)}for(var x=s.getLineStyle([`color`]),_=0;_<f.length;++_)t.add(ob(f[_],{style:I({stroke:c[_%c.length]},x),silent:!0}))}},splitArea:function(e,t,n,r,i){ZL(e,n,r,r)},breakArea:function(e,t,n,r,i){var a=DI(),o=r.axis.scale;a&&o.type!==`ordinal`&&a.rectCoordBuildBreakAxis(t,e,r,r.coordinateSystem.getRect(),i)}},DQ=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getCoordSysModel=function(){return this},t.type=`singleAxis`,t.layoutMode=`box`,t.defaultOption={left:`5%`,top:`5%`,right:`5%`,bottom:`5%`,type:`value`,position:`bottom`,orient:`horizontal`,axisLine:{show:!0,lineStyle:{width:1,type:`solid`}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:`auto`},splitLine:{show:!0,lineStyle:{type:`dashed`,opacity:.2}},jitter:0,jitterOverlap:!0,jitterMargin:2},t}(GS);Ms(DQ,Yj.prototype);var OQ=function(e){N(t,e);function t(t,n,r,i,a){var o=e.call(this,t,n,r)||this;return o.type=i||`value`,o.position=a||`bottom`,o}return t.prototype.isHorizontal=function(){var e=this.position;return e===`top`||e===`bottom`},t.prototype.pointToData=function(e,t){return this.coordinateSystem.pointToData(e)[0]},t}(IM),kQ=[`single`],AQ=function(){function e(e,t,n){this.type=`single`,this.dimension=`single`,this.dimensions=kQ,this.axisPointerEnabled=!0,this.model=e,this._init(e,t,n)}return e.prototype._init=function(e,t,n){var r=this.dimension,i=new OQ(r,Lj(e),[0,0],e.get(`type`),e.get(`position`));i.onBand=i.type===`category`&&e.get(`boundaryGap`),i.inverse=e.get(`inverse`),i.orient=e.get(`orient`),e.axis=i,i.model=e,i.coordinateSystem=this,this._axis=i},e.prototype.update=function(e,t){e.eachSeries(function(e){if(e.coordinateSystem===this){var t=e.getData();L(t.mapDimensionsAll(this.dimension),function(e){this._axis.scale.unionExtentFromData(t,e)},this),Ij(this._axis.scale,this._axis.model)}},this)},e.prototype.resize=function(e,t){var n=LS(e,t).refContainer;this._rect=PS(e.getBoxLayoutParams(),n),this._adjustAxis()},e.prototype.getRect=function(){return this._rect},e.prototype._adjustAxis=function(){var e=this._rect,t=this._axis,n=t.isHorizontal(),r=n?[0,e.width]:[0,e.height],i=+!!t.inverse;t.setExtent(r[i],r[1-i]),this._updateAxisTransform(t,n?e.x:e.y)},e.prototype._updateAxisTransform=function(e,t){var n=e.getExtent(),r=n[0]+n[1],i=e.isHorizontal();e.toGlobalCoord=i?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord=i?function(e){return e-t}:function(e){return r-e+t}},e.prototype.getAxis=function(){return this._axis},e.prototype.getBaseAxis=function(){return this._axis},e.prototype.getAxes=function(){return[this._axis]},e.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},e.prototype.containPoint=function(e){var t=this.getRect(),n=this.getAxis();return n.orient===`horizontal`?n.contain(n.toLocalCoord(e[0]))&&e[1]>=t.y&&e[1]<=t.y+t.height:n.contain(n.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},e.prototype.pointToData=function(e,t,n){n||=[];var r=this.getAxis();return n[0]=r.coordToData(r.toLocalCoord(e[r.orient===`horizontal`?0:1])),n},e.prototype.dataToPoint=function(e,t,n){var r=this.getAxis(),i=this.getRect();n||=[];var a=r.orient===`horizontal`?0:1;return e instanceof Array&&(e=e[0]),n[a]=r.toGlobalCoord(r.dataToCoord(+e)),n[1-a]=a===0?i.y+i.height/2:i.x+i.width/2,n},e.prototype.convertToPixel=function(e,t,n){return jQ(t)===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(e,t,n){return jQ(t)===this?this.pointToData(n):null},e}();function jQ(e){var t=e.seriesModel,n=e.singleAxisModel;return n&&n.coordinateSystem||t&&t.coordinateSystem}function MQ(e,t){var n=[];return e.eachComponent(`singleAxis`,function(r,i){var a=new AQ(r,e,t);a.name=`single_`+i,a.resize(r,t),r.coordinateSystem=a,n.push(a)}),e.eachSeries(function(e){if(e.get(`coordinateSystem`)===`singleAxis`){var t=e.getReferringComponents(`singleAxis`,Dm).models[0];e.coordinateSystem=t&&t.coordinateSystem}}),n}var NQ={create:MQ,dimensions:kQ},PQ=[`x`,`y`],FQ=[`width`,`height`],IQ=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,t,n,r,i){var a=n.axis,o=a.coordinateSystem,s=zQ(o,1-RQ(a)),c=o.dataToPoint(t)[0],l=r.get(`type`);if(l&&l!==`none`){var u=nZ(r),d=LQ[l](a,c,s);d.style=u,e.graphicKey=d.type,e.pointer=d}sZ(t,e,CQ(n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=CQ(t,{labelInside:!1});r.labelMargin=n.get([`handle`,`margin`]);var i=oZ(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var i=n.axis,a=i.coordinateSystem,o=RQ(i),s=zQ(a,o),c=[e.x,e.y];c[o]+=t[o],c[o]=Math.min(s[1],c[o]),c[o]=Math.max(s[0],c[o]);var l=zQ(a,1-o),u=(l[1]+l[0])/2,d=[u,u];return d[o]=c[o],{x:c[0],y:c[1],rotation:e.rotation,cursorPoint:d,tooltipOption:{verticalAlign:`middle`}}},t}(XX),LQ={line:function(e,t,n){return{type:`Line`,subPixelOptimize:!0,shape:cZ([t,n[0]],[t,n[1]],RQ(e))}},shadow:function(e,t,n){var r=e.getBandWidth(),i=n[1]-n[0];return{type:`Rect`,shape:lZ([t-r/2,n[0]],[r,i],RQ(e))}}};function RQ(e){return+!e.isHorizontal()}function zQ(e,t){var n=e.getRect();return[n[PQ[t]],n[PQ[t]]+n[FQ[t]]]}var BQ=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`single`,t}(hE);function VQ(e){Nk(zZ),YL.registerAxisPointerClass(`SingleAxisPointer`,IQ),e.registerComponentView(BQ),e.registerComponentView(TQ),e.registerComponentModel(DQ),OI(e,`single`,DQ,DQ.defaultOption),e.registerCoordinateSystem(`single`,NQ)}var HQ=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(t,n,r){var i=HS(t);e.prototype.init.apply(this,arguments),UQ(t,i)},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),UQ(this.option,t)},t.prototype.getCellSize=function(){return this.option.cellSize},t.type=`calendar`,t.layoutMode=`box`,t.defaultOption={z:2,left:80,top:60,cellSize:20,orient:`horizontal`,splitLine:{show:!0,lineStyle:{color:Z.color.axisLine,width:1,type:`solid`}},itemStyle:{color:Z.color.neutral00,borderWidth:1,borderColor:Z.color.neutral10},dayLabel:{show:!0,firstDay:0,position:`start`,margin:Z.size.s,color:Z.color.secondary},monthLabel:{show:!0,position:`start`,margin:Z.size.s,align:`center`,formatter:null,color:Z.color.secondary},yearLabel:{show:!0,position:null,margin:Z.size.xl,formatter:null,color:Z.color.quaternary,fontFamily:`sans-serif`,fontWeight:`bolder`,fontSize:20}},t}(GS);function UQ(e,t){var n=e.cellSize,r=B(n)?n:e.cellSize=[n,n];r.length===1&&(r[1]=r[0]),VS(e,t,{type:`box`,ignoreSize:R([0,1],function(e){return zS(t,e)&&(r[e]=`auto`),r[e]!=null&&r[e]!==`auto`})})}var WQ=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=this.group;r.removeAll();var i=e.coordinateSystem,a=i.getRangeInfo(),o=i.getOrient(),s=t.getLocaleModel();this._renderDayRect(e,a,r),this._renderLines(e,a,o,r),this._renderYearText(e,a,o,r),this._renderMonthText(e,s,o,r),this._renderWeekText(e,s,a,o,r)},t.prototype._renderDayRect=function(e,t,n){for(var r=e.coordinateSystem,i=e.getModel(`itemStyle`).getItemStyle(),a=r.getCellWidth(),o=r.getCellHeight(),s=t.start.time;s<=t.end.time;s=r.getNextNDay(s,1).time){var c=r.dataToCalendarLayout([s],!1).tl,l=new e_({shape:{x:c[0],y:c[1],width:a,height:o},cursor:`default`,style:i});n.add(l)}},t.prototype._renderLines=function(e,t,n,r){var i=this,a=e.coordinateSystem,o=e.getModel([`splitLine`,`lineStyle`]).getLineStyle(),s=e.get([`splitLine`,`show`]),c=o.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var l=t.start,u=0;l.time<=t.end.time;u++){f(l.formatedDate),u===0&&(l=a.getDateInfo(t.start.y+`-`+t.start.m));var d=l.date;d.setMonth(d.getMonth()+1),l=a.getDateInfo(d)}f(a.getNextNDay(t.end.time,1).formatedDate);function f(t){i._firstDayOfMonth.push(a.getDateInfo(t)),i._firstDayPoints.push(a.dataToCalendarLayout([t],!1).tl);var c=i._getLinePointsOfOneWeek(e,t,n);i._tlpoints.push(c[0]),i._blpoints.push(c[c.length-1]),s&&i._drawSplitline(c,o,r)}s&&this._drawSplitline(i._getEdgesPoints(i._tlpoints,c,n),o,r),s&&this._drawSplitline(i._getEdgesPoints(i._blpoints,c,n),o,r)},t.prototype._getEdgesPoints=function(e,t,n){var r=[e[0].slice(),e[e.length-1].slice()],i=n===`horizontal`?0:1;return r[0][i]=r[0][i]-t/2,r[1][i]=r[1][i]+t/2,r},t.prototype._drawSplitline=function(e,t,n){var r=new Cy({z2:20,shape:{points:e},style:t});n.add(r)},t.prototype._getLinePointsOfOneWeek=function(e,t,n){for(var r=e.coordinateSystem,i=r.getDateInfo(t),a=[],o=0;o<7;o++){var s=r.getNextNDay(i.time,o),c=r.dataToCalendarLayout([s.time],!1);a[2*s.day]=c.tl,a[2*s.day+1]=c[n===`horizontal`?`bl`:`tr`]}return a},t.prototype._formatterLabel=function(e,t){return H(e)&&e?uS(e,t):V(e)?e(t):t.nameMap},t.prototype._yearTextPositionControl=function(e,t,n,r,i){var a=t[0],o=t[1],s=[`center`,`bottom`];r===`bottom`?(o+=i,s=[`center`,`top`]):r===`left`?a-=i:r===`right`?(a+=i,s=[`center`,`top`]):o-=i;var c=0;return(r===`left`||r===`right`)&&(c=Math.PI/2),{rotation:c,x:a,y:o,style:{align:s[0],verticalAlign:s[1]}}},t.prototype._renderYearText=function(e,t,n,r){var i=e.getModel(`yearLabel`);if(i.get(`show`)){var a=i.get(`margin`),o=i.get(`position`);o||=n===`horizontal`?`left`:`top`;var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],c=(s[0][0]+s[1][0])/2,l=(s[0][1]+s[1][1])/2,u=n===`horizontal`?0:1,d={top:[c,s[u][1]],bottom:[c,s[1-u][1]],left:[s[1-u][0],l],right:[s[u][0],l]},f=t.start.y;+t.end.y>+t.start.y&&(f=f+`-`+t.end.y);var p=i.get(`formatter`),m={start:t.start.y,end:t.end.y,nameMap:f},h=new a_({z2:30,style:zb(i,{text:this._formatterLabel(p,m)}),silent:i.get(`silent`)});h.attr(this._yearTextPositionControl(h,d[o],n,o,a)),r.add(h)}},t.prototype._monthTextPositionControl=function(e,t,n,r,i){var a=`left`,o=`top`,s=e[0],c=e[1];return n===`horizontal`?(c+=i,t&&(a=`center`),r===`start`&&(o=`bottom`)):(s+=i,t&&(o=`middle`),r===`start`&&(a=`right`)),{x:s,y:c,align:a,verticalAlign:o}},t.prototype._renderMonthText=function(e,t,n,r){var i=e.getModel(`monthLabel`);if(i.get(`show`)){var a=i.get(`nameMap`),o=i.get(`margin`),s=i.get(`position`),c=i.get(`align`),l=[this._tlpoints,this._blpoints];(!a||H(a))&&(a&&(t=gx(a)||t),a=t.get([`time`,`monthAbbr`])||[]);var u=s===`start`?0:1,d=n===`horizontal`?0:1;o=s===`start`?-o:o;for(var f=c===`center`,p=i.get(`silent`),m=0;m<l[u].length-1;m++){var h=l[u][m].slice(),g=this._firstDayOfMonth[m];f&&(h[d]=(this._firstDayPoints[m][d]+l[0][m+1][d])/2);var _=i.get(`formatter`),v=a[g.m-1],y={yyyy:g.y,yy:(g.y+``).slice(2),MM:g.m,M:+g.m,nameMap:v},b=new a_({z2:30,style:F(zb(i,{text:this._formatterLabel(_,y)}),this._monthTextPositionControl(h,f,n,s,o)),silent:p});r.add(b)}}},t.prototype._weekTextPositionControl=function(e,t,n,r,i){var a=`center`,o=`middle`,s=e[0],c=e[1],l=n===`start`;return t===`horizontal`?(s=s+r+(l?1:-1)*i[0]/2,a=l?`right`:`left`):(c=c+r+(l?1:-1)*i[1]/2,o=l?`bottom`:`top`),{x:s,y:c,align:a,verticalAlign:o}},t.prototype._renderWeekText=function(e,t,n,r,i){var a=e.getModel(`dayLabel`);if(a.get(`show`)){var o=e.coordinateSystem,s=a.get(`position`),c=a.get(`nameMap`),l=a.get(`margin`),u=o.getFirstDayOfWeek();(!c||H(c))&&(c&&(t=gx(c)||t),c=t.get([`time`,`dayOfWeekShort`])||R(t.get([`time`,`dayOfWeekAbbr`]),function(e){return e[0]}));var d=o.getNextNDay(n.end.time,7-n.lweek).time,f=[o.getCellWidth(),o.getCellHeight()];l=X(l,Math.min(f[1],f[0])),s===`start`&&(d=o.getNextNDay(n.start.time,-(7+n.fweek)).time,l=-l);for(var p=a.get(`silent`),m=0;m<7;m++){var h=o.getNextNDay(d,m),g=o.dataToCalendarLayout([h.time],!1).center,_=m;_=Math.abs((m+u)%7);var v=new a_({z2:30,style:F(zb(a,{text:c[_]}),this._weekTextPositionControl(g,r,s,l,f)),silent:p});i.add(v)}}},t.type=`calendar`,t}(hE),GQ=864e5,KQ=function(){function e(t,n,r){this.type=`calendar`,this.dimensions=e.dimensions,this.getDimensionsInfo=e.getDimensionsInfo,this._model=t,this._update(n,r)}return e.getDimensionsInfo=function(){return[{name:`time`,type:`time`},`value`]},e.prototype.getRangeInfo=function(){return this._rangeInfo},e.prototype.getModel=function(){return this._model},e.prototype.getRect=function(){return this._rect},e.prototype.getCellWidth=function(){return this._sw},e.prototype.getCellHeight=function(){return this._sh},e.prototype.getOrient=function(){return this._orient},e.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},e.prototype.getDateInfo=function(e){e=jp(e);var t=e.getFullYear(),n=e.getMonth()+1,r=n<10?`0`+n:``+n,i=e.getDate(),a=i<10?`0`+i:``+i,o=e.getDay();return o=Math.abs((o+7-this.getFirstDayOfWeek())%7),{y:t+``,m:r,d:a,day:o,time:e.getTime(),formatedDate:t+`-`+r+`-`+a,date:e}},e.prototype.getNextNDay=function(e,t){return t||=0,t===0?this.getDateInfo(e):(e=new Date(this.getDateInfo(e).time),e.setDate(e.getDate()+t),this.getDateInfo(e))},e.prototype._update=function(e,t){this._firstDayOfWeek=+this._model.getModel(`dayLabel`).get(`firstDay`),this._orient=this._model.get(`orient`),this._lineWidth=this._model.getModel(`itemStyle`).getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var n=this._rangeInfo.weeks||1,r=[`width`,`height`],i=this._model.getCellSize().slice(),a=this._model.getBoxLayoutParams(),o=this._orient===`horizontal`?[n,7]:[7,n];L([0,1],function(e){c(i,e)&&(a[r[e]]=i[e]*o[e])});var s=this._rect=PS(a,{width:t.getWidth(),height:t.getHeight()});L([0,1],function(e){c(i,e)||(i[e]=s[r[e]]/o[e])});function c(e,t){return e[t]!=null&&e[t]!==`auto`}this._sw=i[0],this._sh=i[1]},e.prototype.dataToPoint=function(e,t,n){n||=[],B(e)&&(e=e[0]),t??=!0;var r=this.getDateInfo(e),i=this._rangeInfo,a=r.formatedDate;if(t&&!(r.time>=i.start.time&&r.time<i.end.time+GQ))return n[0]=n[1]=NaN,n;var o=r.day,s=this._getRangeInfo([i.start.time,a]).nthWeek;return this._orient===`vertical`?(n[0]=this._rect.x+o*this._sw+this._sw/2,n[1]=this._rect.y+s*this._sh+this._sh/2):(n[0]=this._rect.x+s*this._sw+this._sw/2,n[1]=this._rect.y+o*this._sh+this._sh/2),n},e.prototype.pointToData=function(e){var t=this.pointToDate(e);return t&&t.time},e.prototype.dataToLayout=function(e,t,n){n||={};var r=n.rect=n.rect||{},i=n.contentRect=n.contentRect||{},a=this.dataToPoint(e,t);return r.x=a[0]-this._sw/2,r.y=a[1]-this._sh/2,r.width=this._sw,r.height=this._sh,Ol.copy(i,r),bb(i,this._lineWidth/2,!0,!0),n},e.prototype.dataToCalendarLayout=function(e,t){var n=this.dataToPoint(e,t);return{center:n,tl:[n[0]-this._sw/2,n[1]-this._sh/2],tr:[n[0]+this._sw/2,n[1]-this._sh/2],br:[n[0]+this._sw/2,n[1]+this._sh/2],bl:[n[0]-this._sw/2,n[1]+this._sh/2]}},e.prototype.pointToDate=function(e){var t=Math.floor((e[0]-this._rect.x)/this._sw)+1,n=Math.floor((e[1]-this._rect.y)/this._sh)+1,r=this._rangeInfo.range;return this._orient===`vertical`?this._getDateByWeeksAndDay(n,t-1,r):this._getDateByWeeksAndDay(t,n-1,r)},e.prototype.convertToPixel=function(e,t,n){var r=qQ(t);return r===this?r.dataToPoint(n):null},e.prototype.convertToLayout=function(e,t,n){var r=qQ(t);return r===this?r.dataToLayout(n):null},e.prototype.convertFromPixel=function(e,t,n){var r=qQ(t);return r===this?r.pointToData(n):null},e.prototype.containPoint=function(e){return console.warn(`Not implemented.`),!1},e.prototype._initRangeOption=function(){var e=this._model.get(`range`),t;if(B(e)&&e.length===1&&(e=e[0]),B(e))t=e;else{var n=e.toString();if(/^\d{4}$/.test(n)&&(t=[n+`-01-01`,n+`-12-31`]),/^\d{4}[\/|-]\d{1,2}$/.test(n)){var r=this.getDateInfo(n),i=r.date;i.setMonth(i.getMonth()+1);var a=this.getNextNDay(i,-1);t=[r.formatedDate,a.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(n)&&(t=[n,n])}if(!t)return process.env.NODE_ENV!==`production`&&Os(`Invalid date range.`),e;var o=this._getRangeInfo(t);return o.start.time>o.end.time&&t.reverse(),t},e.prototype._getRangeInfo=function(e){var t=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],n;t[0].time>t[1].time&&(n=!0,t.reverse());var r=Math.floor(t[1].time/GQ)-Math.floor(t[0].time/GQ)+1,i=new Date(t[0].time),a=i.getDate(),o=t[1].date.getDate();i.setDate(a+r-1);var s=i.getDate();if(s!==o)for(var c=i.getTime()-t[1].time>0?1:-1;(s=i.getDate())!==o&&(i.getTime()-t[1].time)*c>0;)r-=c,i.setDate(s-c);var l=Math.floor((r+t[0].day+6)/7),u=n?-l+1:l-1;return n&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:r,weeks:l,nthWeek:u,fweek:t[0].day,lweek:t[1].day}},e.prototype._getDateByWeeksAndDay=function(e,t,n){var r=this._getRangeInfo(n);if(e>r.weeks||e===0&&t<r.fweek||e===r.weeks&&t>r.lweek)return null;var i=(e-1)*7-r.fweek+t,a=new Date(r.start.time);return a.setDate(+r.start.d+i),this.getDateInfo(a)},e.create=function(t,n){var r=[];return t.eachComponent(`calendar`,function(i){var a=new e(i,t,n);r.push(a),i.coordinateSystem=a}),t.eachComponent(function(e,t){wS({targetModel:t,coordSysType:`calendar`,coordSysProvider:TS})}),r},e.dimensions=[`time`,`value`],e}();function qQ(e){var t=e.calendarModel,n=e.seriesModel;return t?t.coordinateSystem:n?n.coordinateSystem:null}function JQ(e){e.registerComponentModel(HQ),e.registerComponentView(WQ),e.registerCoordinateSystem(`calendar`,KQ)}var YQ={level:1,leaf:2,nonLeaf:3},XQ={none:0,all:1,body:2,corner:3};function ZQ(e,t,n){var r=t[$y[n]].getCell(e);return!r&&Bs(e)&&e<0&&(r=t[$y[1-n]].getUnitLayoutInfo(n,Math.round(e))),r}function QQ(e){var t=e||[];return t[0]=t[0]||[],t[1]=t[1]||[],t[0][0]=t[0][1]=t[1][0]=t[1][1]=NaN,t}function $Q(e,t,n,r,i){e$(e[0],t,i,n,r,0),e$(e[1],t,i,n,r,1)}function e$(e,t,n,r,i,a){e[0]=1/0,e[1]=-1/0;var o=r[a],s=B(o)?o:[o],c=s.length,l=!!n;if(c>=1?(t$(e,t,s,l,i,a,0),c>1&&t$(e,t,s,l,i,a,c-1)):(process.env.NODE_ENV!==`production`&&t&&t.push(`Should be like [["x1", "x2"], ["y1", "y2"]], or ["x1", "y1"], rather than empty.`),e[0]=e[1]=NaN),l){var u=-i[$y[1-a]].getLocatorCount(a),d=i[$y[a]].getLocatorCount(a)-1;n===XQ.body?u=bp(0,u):n===XQ.corner&&(d=yp(-1,d)),d<u&&(u=d=NaN),Ks(e[0])&&(e[0]=u),Ks(e[1])&&(e[1]=d),e[0]=bp(yp(e[0],d),u),e[1]=bp(yp(e[1],d),u)}}function t$(e,t,n,r,i,a,o){var s=ZQ(n[o],i,a);if(!s){process.env.NODE_ENV!==`production`&&!r&&t&&t.push(`Can not find cell by coord[`+a+`][`+o+`].`),e[0]=e[1]=NaN;return}var c=s.id[$y[a]],l=c,u=d$(s);u&&(l+=u.span[$y[a]]-1),e[0]=yp(e[0],c,l),e[1]=bp(e[1],c,l)}function n$(e,t){return Ks(e[t][0])||Ks(e[t][1])}function r$(e,t,n,r){t||=i$;for(var i=0;i<r;i++)t[i]=!1;for(;;){for(var a=!1,i=0;i<r;i++){var o=n[i];!t[i]&&o.cellMergeOwner&&a$(e,o.locatorRange)&&(t[i]=!0,a=!0)}if(!a)break}}var i$=[];function a$(e,t){return!o$(e[0],t[0])||!o$(e[1],t[1])?!1:(e[0][0]=yp(e[0][0],t[0][0]),e[0][1]=bp(e[0][1],t[0][1]),e[1][0]=yp(e[1][0],t[1][0]),e[1][1]=bp(e[1][1],t[1][1]),!0)}function o$(e,t){return e[1]>=t[0]&&e[0]<=t[1]}function s$(e,t){e.id.set(t[0][0],t[1][0]),e.span.set(t[0][1]-e.id.x+1,t[1][1]-e.id.y+1)}function c$(e,t){e[0][0]=t[0][0],e[0][1]=t[0][1],e[1][0]=t[1][0],e[1][1]=t[1][1]}function l$(e,t,n,r){var i=ZQ(t[r][0],n,r),a=ZQ(t[r][1],n,r);e[$y[r]]=e[eb[r]]=NaN,i&&a&&(e[$y[r]]=i.xy,e[eb[r]]=a.xy+a.wh-i.xy)}function u$(e,t,n,r){return e[$y[t]]=n,e[$y[1-t]]=r,e}function d$(e){return e&&(e.type===YQ.leaf||e.type===YQ.nonLeaf)?e:null}function f$(){return{x:NaN,y:NaN,width:NaN,height:NaN}}var p$=function(){function e(e,t){this._cells=[],this._levels=[],this.dim=e,this.dimIdx=e===`x`?0:1,this._model=t,this._uniqueValueGen=m$(e);var n=t.get(`data`,!0);n!=null&&!B(n)&&(process.env.NODE_ENV!==`production`&&Gp(`Illegal echarts option - matrix.`+this.dim+`.data must be an array if specified.`),n=[]),n?this._initByDimModelData(n):this._initBySeriesData()}return e.prototype._initByDimModelData=function(e){var t=this,n=t._cells,r=t._levels,i=[],a=0;t._leavesCount=o(e,0,0),s();return;function o(e,n,s){var c=0;return e&&L(e,function(e,l){var u=!1,d;H(e)?d={value:e}:U(e)?(d=e,e.value!=null&&!H(e.value)&&(u=!0,d={value:null})):(d={value:null},e!=null&&(u=!0)),u&&process.env.NODE_ENV!==`production`&&Gp(`Illegal echarts option - matrix.`+t.dim+`.data[`+l+"] must be `string | {value: string}`.");var f={type:YQ.nonLeaf,ordinal:NaN,level:s,firstLeafLocator:n,id:new J,span:u$(new J,t.dimIdx,1,1),option:d,xy:NaN,wh:NaN,dim:t,rect:f$()};a++,(i[n]||(i[n]=[])).push(f),r[s]||(r[s]={type:YQ.level,xy:NaN,wh:NaN,option:null,id:new J,dim:t});var p=o(d.children,n,s+1),m=Math.max(1,p);f.span[$y[t.dimIdx]]=m,c+=m,n+=m}),c}function s(){for(var e=[];n.length<a;)for(var r=0;r<i.length;r++){var o=i[r].pop();if(o){o.ordinal=e.length;var s=o.option.value;e.push(s),n.push(o),t._uniqueValueGen.calcDupBase(s)}}t._uniqueValueGen.ensureValueUnique(e,n),t._scale=new WA({ordinalMeta:t._ordinalMeta=new HA({categories:e,needCollect:!1,deduplication:!1})});for(var c=0;c<t._leavesCount;c++){var l=t._cells[c];l.type=YQ.leaf,l.span[$y[1-t.dimIdx]]=t._levels.length-l.level}t._initCellsId(),t._initLevelIdOptions()}},e.prototype._initBySeriesData=function(){var e=this;e._leavesCount=0,e._levels=[{type:YQ.level,xy:NaN,wh:NaN,option:null,id:new J,dim:e}],e._initLevelIdOptions(),e._scale=new WA({ordinalMeta:e._ordinalMeta=new HA({needCollect:!0,deduplication:!0,onCollect:function(t,n){var r=e._cells[n]={type:YQ.leaf,ordinal:n,level:0,firstLeafLocator:n,id:new J,span:u$(new J,e.dimIdx,1,1),option:{value:t+``},xy:NaN,wh:NaN,dim:e,rect:f$()};e._leavesCount++,e._setCellId(r)}})})},e.prototype._setCellId=function(e){var t=this._levels.length,n=this.dimIdx;u$(e.id,n,e.firstLeafLocator,e.level-t)},e.prototype._initCellsId=function(){var e=this._levels.length,t=this.dimIdx;L(this._cells,function(n){u$(n.id,t,n.firstLeafLocator,n.level-e)})},e.prototype._initLevelIdOptions=function(){var e=this._levels.length,t=this.dimIdx,n=this._model.get(`levels`,!0);n=B(n)?n:[],L(this._levels,function(r,i){u$(r.id,t,0,i-e),r.option=n[i]})},e.prototype.shouldShow=function(){return!!this._model.getShallow(`show`,!0)},e.prototype.resetLayoutIterator=function(e,t,n,r){if(e||=new Fm,t===this.dimIdx){var i=this._leavesCount,a=n==null?0:Math.max(0,n);r=r==null?i:Math.min(r,i),e.reset(this._cells,a,a+r)}else{var i=this._levels.length,a=n==null?0:Math.max(0,n+i);r=r==null?i:Math.min(r,i),e.reset(this._levels,a,a+r)}return e},e.prototype.resetCellIterator=function(e){return(e||new Fm).reset(this._cells,0)},e.prototype.resetLevelIterator=function(e){return(e||new Fm).reset(this._levels,0)},e.prototype.getLayout=function(e,t,n){var r=this.getUnitLayoutInfo(t,n);e[$y[t]]=r?r.xy:NaN,e[eb[t]]=r?r.wh:NaN},e.prototype.getUnitLayoutInfo=function(e,t){return e===this.dimIdx?t<this._leavesCount?this._cells[t]:void 0:this._levels[t+this._levels.length]},e.prototype.getCell=function(e){var t=this._scale.parse(e);return Ks(t)?void 0:this._cells[t]},e.prototype.getLocatorCount=function(e){return e===this.dimIdx?this._leavesCount:this._levels.length},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e}();function m$(e){var t=e.toUpperCase(),n=RegExp(`^`+t+`([0-9]+)$`),r=0;function i(e){var t;e!=null&&(t=e.match(n))&&(r=bp(r,+t[1]+1))}function a(){return``+t+ r++}function o(e,t){for(var n=K(),r=0;r<e.length;r++){var i=e[r];(i==null||n.get(i)!=null)&&(e[r]=i=a(),t[r].option=I({value:i},t[r].option)),n.set(i,!0)}}return{calcDupBase:i,ensureValueUnique:o}}var h$=function(){function e(e,t,n){this._model=t,this._dims=n,this._kind=e,this._cellMergeOwnerList=[]}return e.prototype._ensureCellMap=function(){var e=this,t=e._cellMap;return t||(t=e._cellMap=K(),n()),t;function n(){var t=[],n=e._model.getShallow(`data`);n&&!B(n)&&(process.env.NODE_ENV!==`production`&&Gp(`matrix.`+n+`.data must be an array if specified.`),n=null),L(n,function(n,r){if(!U(n)||!B(n.coord)){process.env.NODE_ENV!==`production`&&Gp(`Illegal matrix.`+e._kind+`.data[`+r+`], must be a {coord: [...], ...}`);return}var i=QQ([]),a=null;if(process.env.NODE_ENV!==`production`&&(a=[]),$Q(i,a,n.coord,e._dims,n.coordClamp?XQ[e._kind]:XQ.none),n$(i,0)||n$(i,1)){process.env.NODE_ENV!==`production`&&Gp(`Can not determine cells by option matrix.`+e._kind+`.data[`+r+`]: `+(``+a.join(` `)));return}var o=n&&n.mergeCells,s={id:new J,span:new J,locatorRange:i,option:n,cellMergeOwner:o};s$(s,i),t.push(s)});for(var i=[],a=0;a<t.length;a++){var o=t[a];if(o.cellMergeOwner){var s=o.locatorRange;r$(s,i,t,a);for(var c=0;c<a;c++)i[c]&&(t[c].cellMergeOwner=!1);if(s[0][0]!==o.id.x||s[1][0]!==o.id.y){o.cellMergeOwner=!1;var l=F({},o.option);l.coord=null;var u={id:new J,span:new J,locatorRange:s,option:l,cellMergeOwner:!0};s$(u,s),t.push(u)}}}L(t,function(t){var n=r(t.id.x,t.id.y);if(t.cellMergeOwner&&(n.cellMergeOwner=!0,n.span=t.span,n.locatorRange=t.locatorRange,n.spanRect=f$(),e._cellMergeOwnerList.push(n)),!(!t.cellMergeOwner&&!t.option))for(var i=0;i<t.span.y;i++)for(var a=0;a<t.span.x;a++){var o=r(t.id.x+a,t.id.y+i);o.option=t.option,t.cellMergeOwner&&(o.inSpanOf=n)}})}function r(e,n){var r=_$(e,n),i=t.get(r);return i||=t.set(r,{id:new J(e,n),option:null,inSpanOf:null,span:null,spanRect:null,locatorRange:null,cellMergeOwner:!1}),i}},e.prototype.getCell=function(e){return this._ensureCellMap().get(_$(e[0],e[1]))},e.prototype.travelExistingCells=function(e){this._ensureCellMap().each(e)},e.prototype.expandRangeByCellMerge=function(e){if(!n$(e,0)&&!n$(e,1)&&e[0][0]===e[0][1]&&e[1][0]===e[1][1]){g$[0]=e[0][0],g$[1]=e[1][0];var t=this.getCell(g$),n=t&&t.inSpanOf;if(n){c$(e,n.locatorRange);return}}var r=this._cellMergeOwnerList;r$(e,null,r,r.length)},e}(),g$=[];function _$(e,t){return e+`|`+t}var v$={show:!0,color:Z.color.secondary,overflow:`break`,lineOverflow:`truncate`,padding:[2,3,2,3],distance:0};function y$(e){return{color:`none`,borderWidth:1,borderColor:e?`none`:Z.color.borderTint}}var b$={show:!0,label:v$,itemStyle:y$(!1),silent:void 0,dividerLineStyle:{width:1,color:Z.color.border}},x$={z:-50,left:`10%`,top:`10%`,right:`10%`,bottom:`10%`,x:b$,y:b$,body:{label:v$,itemStyle:y$(!1),silent:void 0},corner:{label:v$,itemStyle:y$(!0),silent:void 0},backgroundStyle:{color:`none`,borderColor:Z.color.axisLine,borderWidth:1}},S$=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.optionUpdated=function(){var e=this._dimModels={x:new C$(this.get(`x`,!0)||{}),y:new C$(this.get(`y`,!0)||{})};e.x.option.type=e.y.option.type=`category`;var t={x:e.x.dim=new p$(`x`,e.x),y:e.y.dim=new p$(`y`,e.y)};this._body=new h$(`body`,new ex(this.getShallow(`body`)),t),this._corner=new h$(`corner`,new ex(this.getShallow(`corner`)),t)},t.prototype.getDimensionModel=function(e){return this._dimModels[e]},t.prototype.getBody=function(){return this._body},t.prototype.getCorner=function(){return this._corner},t.type=`matrix`,t.layoutMode=`box`,t.defaultOption=x$,t}(GS),C$=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getOrdinalMeta=function(){return this.dim.getOrdinalMeta()},t}(ex),w$=Math.round,T$=0,E$=99,D$={normal:25,special:100},O$={normal:50,special:125},k$=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t){this.group.removeAll();var n=this.group,r=e.coordinateSystem.getRect(),i=e.getDimensionModel(`x`),a=e.getDimensionModel(`y`),o=i.dim,s=a.dim;A$(n,e,t),j$(n,e,o,s,t);var c=W(e.getShallow(`borderZ2`,!0),E$),l=c-1,u=e.getModel(`backgroundStyle`).getItemStyle([`borderWidth`]);u.lineWidth=0;var d=e.getModel(`backgroundStyle`).getItemStyle([`color`,`decal`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`]);d.fill=`none`;var f=L$(r.clone(),u,T$),p=L$(r.clone(),d,c);f.silent=!0,p.silent=!0,n.add(f),n.add(p);var m=o.getUnitLayoutInfo(0,0),h=s.getUnitLayoutInfo(1,0);m&&h&&(o.shouldShow()&&n.add(R$({x1:r.x,y1:h.xy,x2:r.x+r.width,y2:h.xy},i.getModel(`dividerLineStyle`).getLineStyle(),l)),s.shouldShow()&&n.add(R$({x1:m.xy,y1:r.y,x2:m.xy,y2:r.y+r.height},a.getModel(`dividerLineStyle`).getLineStyle(),l)))},t.type=`matrix`,t}(hE);function A$(e,t,n){r(0),r(1);function r(r){var i=t.getDimensionModel($y[r]),a=i.dim;if(a.shouldShow())for(var o=i.getModel(`itemStyle`),s=i.getModel(`label`),c=t.getShallow(`tooltip`,!0),l=[],u=a.resetCellIterator();u.next();){var d=u.item,f={};Ol.copy(f,d.rect),fc(l,d.id.x,d.id.y),M$(l,t,e,n,d.option,o,s,i,f,d.option.value,O$,c)}}}function j$(e,t,n,r,i){a(`body`,t.getBody(),n,r),n.shouldShow()&&r.shouldShow()&&a(`corner`,t.getCorner(),r,n);function a(n,r,a,o){var s=new ex(t.getShallow(n,!0)),c=s.getModel(`itemStyle`),l=s.getModel(`label`),u=new Fm,d=new Fm,f=[],p=t.getShallow(`tooltip`,!0);for(o.resetLayoutIterator(d,1);d.next();)for(a.resetLayoutIterator(u,0);u.next();){var m=u.item,h=d.item;fc(f,m.id.x,h.id.y);var g=r.getCell(f);if(!(g&&g.inSpanOf&&g.inSpanOf!==g)){var _={};g&&g.span?Ol.copy(_,g.spanRect):(m.dim.getLayout(_,0,f[0]),h.dim.getLayout(_,1,f[1]));var v=g?g.option:null;M$(f,t,e,i,v,c,l,s,_,v?v.value:null,D$,p)}}}}function M$(e,t,n,r,i,a,o,s,c,l,u,d){P$.option=i?i.itemStyle:null,P$.parentModel=a,N$.option=i,N$.parentModel=s;var f=W(N$.getShallow(`z2`),i&&i.itemStyle?u.special:u.normal),p=d&&d.show,m=L$(c,P$.getItemStyle(),f);n.add(m);var h=N$.get(`cursor`);h!=null&&m.attr(`cursor`,h);var g;if(l!=null){var _=l+``;if(F$.option=i?i.label:null,F$.parentModel=o,F$.ecModel=r,Lb(m,{normal:F$},{defaultText:_,autoOverflowArea:!0,layoutRect:P(m.shape)}),g=m.getTextContent(),g){g.z2=f+1;var v=g.style;if(v&&v.overflow&&v.overflow!==`none`&&v.lineOverflow){var y={};Ol.copy(y,c),bb(y,(m.style?.lineWidth||0)/2,!0,!0),m.updateInnerText(),g.getLocalTransform(I$),ml(I$,I$),Ol.applyTransform(y,y,I$),g.setClipPath(new e_({shape:y}))}}Cb({el:m,componentModel:t,itemName:_,itemTooltipOption:d,formatterParamsExtra:{xyLocator:e.slice()}})}if(g){var b=F$.get(`silent`);b??=!p,g.silent=b,g.ignoreHostSilent=!0}var x=N$.get(`silent`);x??=!m.style||m.style.fill===`none`||!m.style.fill,m.silent=x,Im(N$),Im(P$),Im(F$)}var N$=new ex,P$=new ex,F$=new ex,I$=[];function L$(e,t,n){var r=t.lineWidth;if(r){var i=e.x+e.width,a=e.y+e.height;e.x=Zg(e.x,r,!0),e.y=Zg(e.y,r,!0),e.width=Zg(i,r,!0)-e.x,e.height=Zg(a,r,!0)-e.y}return new e_({shape:e,style:t,z2:n})}function R$(e,t,n){var r=t.lineWidth;return r&&(w$(e.x1*2)===w$(e.x2*2)&&(e.x1=e.x2=Zg(e.x1,r,!0)),w$(e.y1*2)===w$(e.y2*2)&&(e.y1=e.y2=Zg(e.y1,r,!0))),new wy({shape:e,style:t,silent:!0,z2:n})}var z$=function(){function e(t,n,r){this.dimensions=e.dimensions,this.type=`matrix`,this._model=t;var i=this._dimModels={x:t.getDimensionModel(`x`),y:t.getDimensionModel(`y`)};this._dims={x:i.x.dim,y:i.y.dim},this._resize(t,r)}return e.getDimensionsInfo=function(){return[{name:`x`,type:`ordinal`},{name:`y`,type:`ordinal`},{name:`value`}]},e.create=function(t,n){var r=[];return t.eachComponent(`matrix`,function(i){var a=new e(i,t,n);r.push(a),i.coordinateSystem=a}),t.eachComponent(function(e,t){wS({targetModel:t,coordSysType:`matrix`,coordSysProvider:TS})}),r},e.prototype.getRect=function(){return this._rect},e.prototype._resize=function(e,t){var n=this._dims,r=this._dimModels,i=this._rect=PS(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()});U$(r,n,i,0),U$(r,n,i,1),W$(0,n),W$(1,n),G$(this._model.getBody(),n),G$(this._model.getCorner(),n)},e.prototype.dataToPoint=function(e,t,n){return n||=[],this.dataToLayout(e,t,B$),n[0]=B$.rect.x+B$.rect.width/2,n[1]=B$.rect.y+B$.rect.height/2,n},e.prototype.dataToLayout=function(e,t,n){var r=this._dims;n||={};var i=n.rect=n.rect||{};i.x=i.y=i.width=i.height=NaN;var a=n.matrixXYLocatorRange=QQ(n.matrixXYLocatorRange);return B(e)?($Q(a,null,e,r,W(t&&t.clamp,XQ.none)),(!t||!t.ignoreMergeCells)&&((!t||t.clamp!==XQ.corner)&&this._model.getBody().expandRangeByCellMerge(a),(!t||t.clamp!==XQ.body)&&this._model.getCorner().expandRangeByCellMerge(a)),l$(i,a,r,0),l$(i,a,r,1),n):(process.env.NODE_ENV!==`production`&&Gp("Input data must be an array in `convertToLayout`, `convertToPixel`"),n)},e.prototype.pointToData=function(e,t,n){var r=this._dims;return Q$(Z$,0,r,e,t&&t.clamp),Q$(Z$,1,r,e,t&&t.clamp),n||=[],n[0]=n[1]=NaN,Z$.y===X$.inCorner&&Z$.x===X$.inBody?$$(Z$,n,0,r):Z$.x===X$.inCorner&&Z$.y===X$.inBody?$$(Z$,n,1,r):(e1(Z$,n,0,r),e1(Z$,n,1,r)),n},e.prototype.convertToPixel=function(e,t,n,r){var i=Y$(t);return i===this?i.dataToPoint(n,r):void 0},e.prototype.convertToLayout=function(e,t,n,r){var i=Y$(t);return i===this?i.dataToLayout(n,r):void 0},e.prototype.convertFromPixel=function(e,t,n,r){var i=Y$(t);return i===this?i.pointToData(n,r):void 0},e.prototype.containPoint=function(e){return this._rect.contain(e[0],e[1])},e.dimensions=[`x`,`y`,`value`],e}(),B$={rect:f$()},V$=new Fm,H$=new Fm;function U$(e,t,n,r){for(var i=1-r,a=t[$y[r]],o=t[$y[i]],s=o.shouldShow(),c=a.resetCellIterator();c.next();)c.item.wh=c.item.xy=NaN;for(var l=o.resetLayoutIterator(null,r);l.next();)l.item.wh=l.item.xy=NaN;for(var u=n[eb[r]],d=a.getLocatorCount(r)+o.getLocatorCount(r),f=new ex,p=o.resetLevelIterator();p.next();)f.option=p.item.option,f.parentModel=e[$y[i]],g(p.item,s?f.get(`levelSize`):0);for(var m=new ex,h=a.resetCellIterator();h.next();)h.item.type===YQ.leaf&&(m.option=h.item.option,m.parentModel=void 0,g(h.item,m.get(`size`)));function g(e,t){var i=q$(t,r,n);Ks(i)||(e.wh=J$(i,u),u=J$(u-e.wh),d--)}var _=d?u/d:0,v=!d&&u>=1,y=n[$y[r]],b=a.getLocatorCount(r)-1,x=new Fm;for(o.resetLayoutIterator(x,r);x.next();)S(x.item);for(a.resetLayoutIterator(x,r);x.next();)S(x.item);function S(e){Ks(e.wh)&&(e.wh=_),e.xy=y,e.id[$y[r]]===b&&!v&&(e.wh=n[$y[r]]+n[eb[r]]-e.xy),y+=e.wh}}function W$(e,t){for(var n=t[$y[e]].resetCellIterator();n.next();){var r=n.item;K$(r.rect,e,r.id,r.span,t),K$(r.rect,1-e,r.id,r.span,t),r.type===YQ.nonLeaf&&(r.xy=r.rect[$y[e]],r.wh=r.rect[eb[e]])}}function G$(e,t){e.travelExistingCells(function(e){var n=e.span;if(n){var r=e.spanRect,i=e.id;K$(r,0,i,n,t),K$(r,1,i,n,t)}})}function K$(e,t,n,r,i){e[eb[t]]=0;var a=n[$y[t]]<0?i[$y[1-t]]:i[$y[t]],o=a.getUnitLayoutInfo(t,n[$y[t]]);if(e[$y[t]]=o.xy,e[eb[t]]=o.wh,r[$y[t]]>1){var s=a.getUnitLayoutInfo(t,n[$y[t]]+r[$y[t]]-1);e[eb[t]]=s.xy+s.wh-o.xy}}function q$(e,t,n){return J$(Cp(e,n[eb[t]]),n[eb[t]])}function J$(e,t){return Math.max(Math.min(e,W(t,1/0)),0)}function Y$(e){var t=e.matrixModel,n=e.seriesModel;return t?t.coordinateSystem:n?n.coordinateSystem:null}var X$={inBody:1,inCorner:2,outside:3},Z$={x:null,y:null,point:[]};function Q$(e,t,n,r,i){var a=n[$y[t]],o=n[$y[1-t]],s=a.getUnitLayoutInfo(t,a.getLocatorCount(t)-1),c=a.getUnitLayoutInfo(t,0),l=o.getUnitLayoutInfo(t,-o.getLocatorCount(t)),u=o.shouldShow()?o.getUnitLayoutInfo(t,-1):null,d=e.point[t]=r[t];if(!c&&!u){e[$y[t]]=X$.outside;return}if(i===XQ.body){c?(e[$y[t]]=X$.inBody,d=yp(s.xy+s.wh,bp(c.xy,d)),e.point[t]=d):e[$y[t]]=X$.outside;return}else if(i===XQ.corner){u?(e[$y[t]]=X$.inCorner,d=yp(u.xy+u.wh,bp(l.xy,d)),e.point[t]=d):e[$y[t]]=X$.outside;return}var f=c?c.xy:u?u.xy+u.wh:NaN,p=l?l.xy:f,m=s?s.xy+s.wh:f;if(d<p){if(!i){e[$y[t]]=X$.outside;return}d=p}else if(d>m){if(!i){e[$y[t]]=X$.outside;return}d=m}e.point[t]=d,e[$y[t]]=f<=d&&d<=m?X$.inBody:p<=d&&d<=f?X$.inCorner:X$.outside}function $$(e,t,n,r){var i=1-n;if(e[$y[n]]!==X$.outside)for(r[$y[n]].resetCellIterator(H$);H$.next();){var a=H$.item;if(n1(e.point[n],a.rect,n)&&n1(e.point[i],a.rect,i)){t[n]=a.ordinal,t[i]=a.id[$y[i]];return}}}function e1(e,t,n,r){if(e[$y[n]]!==X$.outside){for((e[$y[n]]===X$.inCorner?r[$y[1-n]]:r[$y[n]]).resetLayoutIterator(V$,n);V$.next();)if(t1(e.point[n],V$.item)){t[n]=V$.item.id[$y[n]];return}}}function t1(e,t){return t.xy<=e&&e<=t.xy+t.wh}function n1(e,t,n){return t[$y[n]]<=e&&e<=t[$y[n]]+t[eb[n]]}function r1(e){e.registerComponentModel(S$),e.registerComponentView(k$),e.registerCoordinateSystem(`matrix`,z$)}function i1(e,t){var n=e.existing;if(t.id=e.keyInfo.id,!t.type&&n&&(t.type=n.type),t.parentId==null){var r=t.parentOption;r?t.parentId=r.id:n&&(t.parentId=n.parentId)}t.parentOption=null}function a1(e,t){var n;return L(t,function(t){e[t]!=null&&e[t]!==`auto`&&(n=!0)}),n}function o1(e,t,n){var r=F({},n),i=e[t],a=n.$action||`merge`;if(a===`merge`)if(i){if(process.env.NODE_ENV!==`production`){var o=n.type;G(!o||i.type===o,'Please set $action: "replace" to change `type`')}ks(i,r,!0),VS(i,r,{ignoreSize:!0}),US(n,i),l1(n,i),l1(n,i,`shape`),l1(n,i,`style`),l1(n,i,`extra`),n.clipPath=i.clipPath}else e[t]=r;else a===`replace`?e[t]=r:a===`remove`&&i&&(e[t]=null)}var s1=[`transition`,`enterFrom`,`leaveTo`],c1=s1.concat([`enterAnimation`,`updateAnimation`,`leaveAnimation`]);function l1(e,t,n){if(n&&(!e[n]&&t[n]&&(e[n]={}),e=e[n],t=t[n]),!(!e||!t))for(var r=n?s1:c1,i=0;i<r.length;i++){var a=r[i];e[a]==null&&t[a]!=null&&(e[a]=t[a])}}function u1(e,t){if(e&&(e.hv=t.hv=[a1(t,[`left`,`right`]),a1(t,[`top`,`bottom`])],e.type===`group`)){var n=e,r=t;n.width??=r.width=0,n.height??=r.height=0}}var d1=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.preventAutoZ=!0,n}return t.prototype.mergeOption=function(t,n){var r=this.option.elements;this.option.elements=null,e.prototype.mergeOption.call(this,t,n),this.option.elements=r},t.prototype.optionUpdated=function(e,t){var n=this.option,r=(t?n:e).elements,i=n.elements=t?[]:n.elements,a=[];this._flatten(r,a,null);var o=im(i,a,`normalMerge`),s=this._elOptionsToUpdate=[];L(o,function(e,t){var n=e.newOption;process.env.NODE_ENV!==`production`&&G(U(n)||e.existing,`Empty graphic option definition`),n&&(s.push(n),i1(e,n),o1(i,t,n),u1(i[t],n))},this),n.elements=Fs(i,function(e){return e&&delete e.$action,e!=null})},t.prototype._flatten=function(e,t,n){L(e,function(e){if(e){n&&(e.parentOption=n),t.push(e);var r=e.children;r&&r.length&&this._flatten(r,t,e),delete e.children}},this)},t.prototype.useElOptionsToUpdate=function(){var e=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,e},t.type=`graphic`,t.defaultOption={elements:[]},t}(GS),f1={path:null,compoundPath:null,group:Y,image:Kg,text:a_},p1=Cm(),m1=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(){this._elMap=K()},t.prototype.render=function(e,t,n){e!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=e,this._updateElements(e),this._relocate(e,n)},t.prototype._updateElements=function(e){var t=e.useElOptionsToUpdate();if(t){var n=this._elMap,r=this.group,i=e.get(`z`),a=e.get(`zlevel`);L(t,function(t){var o=pm(t.id,null),s=o==null?null:n.get(o),c=pm(t.parentId,null),l=c==null?r:n.get(c),u=t.type,d=t.style;u===`text`&&d&&t.hv&&t.hv[1]&&(d.textVerticalAlign=d.textBaseline=d.verticalAlign=d.align=null);var f=t.textContent,p=t.textConfig;if(d&&DY(d,u,!!p,!!f)){var m=OY(d,u,!0);!p&&m.textConfig&&(p=t.textConfig=m.textConfig),!f&&m.textContent&&(f=m.textContent)}var h=y1(t);process.env.NODE_ENV!==`production`&&s&&G(l===s.parent,`Changing parent is not supported.`);var g=t.$action||`merge`,_=g===`merge`,v=g===`replace`;if(_){var y=!s,b=s;y?b=g1(o,l,t.type,n):(b&&(p1(b).isNew=!1),oX(b)),b&&(BY(b,h,e,{isInit:y}),v1(b,t,i,a))}else if(v){_1(s,t,n,e);var x=g1(o,l,t.type,n);x&&(BY(x,h,e,{isInit:!0}),v1(x,t,i,a))}else g===`remove`&&(VY(s,t),_1(s,t,n,e));var S=n.get(o);if(S&&f)if(_){var C=S.getTextContent();C?C.attr(f):S.setTextContent(new a_(f))}else v&&S.setTextContent(new a_(f));if(S){var w=t.clipPath;if(w){var T=w.type,E=void 0,y=!1;if(_){var D=S.getClipPath();y=!D||p1(D).type!==T,E=y?h1(T):D}else v&&(y=!0,E=h1(T));S.setClipPath(E),BY(E,w,e,{isInit:y}),sX(E,w.keyframeAnimation,e)}var O=p1(S);S.setTextConfig(p),O.option=t,b1(S,e,t),Cb({el:S,componentModel:e,itemName:S.name,itemTooltipOption:t.tooltip}),sX(S,t.keyframeAnimation,e)}})}},t.prototype._relocate=function(e,t){for(var n=e.option.elements,r=this.group,i=this._elMap,a=t.getWidth(),o=t.getHeight(),s=[`x`,`y`],c=0;c<n.length;c++){var l=n[c],u=pm(l.id,null),d=u==null?null:i.get(u);if(!(!d||!d.isGroup)){var f=d.parent,p=f===r,m=p1(d),h=p1(f);m.width=X(m.option.width,p?a:h.width)||0,m.height=X(m.option.height,p?o:h.height)||0}}for(var c=n.length-1;c>=0;c--){var l=n[c],u=pm(l.id,null),d=u==null?null:i.get(u);if(d){var f=d.parent,h=p1(f),g=f===r?{width:a,height:o}:{width:h.width,height:h.height},_={},v=RS(d,l,g,null,{hv:l.hv,boundingMode:l.bounding},_);if(!p1(d).isNew&&v){for(var y=l.transition,b={},x=0;x<s.length;x++){var S=s[x],C=_[S];y&&(UY(y)||js(y,S)>=0)?b[S]=C:d[S]=C}Wy(d,b,e,0)}else d.attr(_)}}},t.prototype._clear=function(){var e=this,t=this._elMap;t.each(function(n){_1(n,p1(n).option,t,e._lastGraphicModel)}),this._elMap=K()},t.prototype.dispose=function(){this._clear()},t.type=`graphic`,t}(hE);function h1(e){process.env.NODE_ENV!==`production`&&G(e,`graphic type MUST be set`);var t=q(f1,e)?f1[e]:nb(e);process.env.NODE_ENV!==`production`&&G(t,`graphic type `+e+` can not be found`);var n=new t({});return p1(n).type=e,n}function g1(e,t,n,r){var i=h1(n);return t.add(i),r.set(e,i),p1(i).id=e,p1(i).isNew=!0,i}function _1(e,t,n,r){e&&e.parent&&(e.type===`group`&&e.traverse(function(e){_1(e,t,n,r)}),HY(e,t,r),n.removeKey(p1(e).id))}function v1(e,t,n,r){e.isGroup||L([[`cursor`,Mh.prototype.cursor],[`zlevel`,r||0],[`z`,n||0],[`z2`,0]],function(n){var r=n[0];q(t,r)?e[r]=W(t[r],n[1]):e[r]??(e[r]=n[1])}),L(Ls(t),function(n){if(n.indexOf(`on`)===0){var r=t[n];e[n]=V(r)?r:null}}),q(t,`draggable`)&&(e.draggable=t.draggable),t.name!=null&&(e.name=t.name),t.id!=null&&(e.id=t.id)}function y1(e){return e=F({},e),L([`id`,`parentId`,`$action`,`hv`,`bounding`,`textContent`,`clipPath`].concat(DS),function(t){delete e[t]}),e}function b1(e,t,n){var r=y_(e).eventData;!e.silent&&!e.ignore&&!r&&(r=y_(e).eventData={componentType:`graphic`,componentIndex:t.componentIndex,name:e.name}),r&&(r.info=n.info)}function x1(e){e.registerComponentModel(d1),e.registerComponentView(m1),e.registerPreprocessor(function(e){var t=e.graphic;B(t)?!t[0]||!t[0].elements?e.graphic=[{elements:t}]:e.graphic=[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var S1=[`x`,`y`,`radius`,`angle`,`single`],C1=[`cartesian2d`,`polar`,`singleAxis`];function w1(e){return js(C1,e.get(`coordinateSystem`))>=0}function T1(e){return process.env.NODE_ENV!==`production`&&G(e),e+`Axis`}function E1(e,t){var n=K(),r=[],i=K();e.eachComponent({mainType:`dataZoom`,query:t},function(e){i.get(e.uid)||s(e)});var a;do a=!1,e.eachComponent(`dataZoom`,o);while(a);function o(e){!i.get(e.uid)&&c(e)&&(s(e),a=!0)}function s(e){i.set(e.uid,!0),r.push(e),l(e)}function c(e){var t=!1;return e.eachTargetAxis(function(e,r){var i=n.get(e);i&&i[r]&&(t=!0)}),t}function l(e){e.eachTargetAxis(function(e,t){(n.get(e)||n.set(e,[]))[t]=!0})}return r}function D1(e){var t=e.ecModel,n={infoList:[],infoMap:K()};return e.eachTargetAxis(function(e,r){var i=t.getComponent(T1(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}var O1=function(){function e(){this.indexList=[],this.indexMap=[]}return e.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},e}(),k1=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=[`percent`,`percent`],n}return t.prototype.init=function(e,t,n){var r=A1(e);this.settledOption=r,this.mergeDefaultAndTheme(e,n),this._doInit(r)},t.prototype.mergeOption=function(e){var t=A1(e);ks(this.option,e,!0),ks(this.settledOption,t,!0),this._doInit(t)},t.prototype._doInit=function(e){var t=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var n=this.settledOption;L([[`start`,`startValue`],[`end`,`endValue`]],function(e,r){this._rangePropMode[r]===`value`&&(t[e[0]]=n[e[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get(`orient`,!0),t=this._targetAxisInfoMap=K();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)},t.prototype._fillSpecifiedTargetAxis=function(e){var t=!1;return L(S1,function(n){var r=this.getReferringComponents(T1(n),Om);if(r.specified){t=!0;var i=new O1;L(r.models,function(e){i.add(e.componentIndex)}),e.set(n,i)}},this),t},t.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`});o(a,i)}if(r){var a=n.findComponents({mainType:`singleAxis`,filter:function(e){return e.get(`orient`,!0)===t}});o(a,`single`)}function o(t,n){var i=t[0];if(i){var a=new O1;if(a.add(i.componentIndex),e.set(n,a),r=!1,n===`x`||n===`y`){var o=i.getReferringComponents(`grid`,Dm).models[0];o&&L(t,function(e){i.componentIndex!==e.componentIndex&&o===e.getReferringComponents(`grid`,Dm).models[0]&&a.add(e.componentIndex)})}}}r&&L(S1,function(t){if(r){var i=n.findComponents({mainType:T1(t),filter:function(e){return e.get(`type`,!0)===`category`}});if(i[0]){var a=new O1;a.add(i[0].componentIndex),e.set(t,a),r=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(t){!e&&(e=t)},this),e===`y`?`vertical`:`horizontal`},t.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}},t.prototype._updateRangeUse=function(e){var t=this._rangePropMode,n=this.get(`rangeMode`);L([[`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`)})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis(function(t,n){e??=this.ecModel.getComponent(T1(t),n)},this),e},t.prototype.eachTargetAxis=function(e,t){this._targetAxisInfoMap.each(function(n,r){L(n.indexList,function(n){e.call(t,r,n)})})},t.prototype.getAxisProxy=function(e,t){var n=this.getAxisModel(e,t);if(n)return n.__dzAxisProxy},t.prototype.getAxisModel=function(e,t){process.env.NODE_ENV!==`production`&&G(e&&t!=null);var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[t])return this.ecModel.getComponent(T1(e),t)},t.prototype.setRawRange=function(e){var t=this.option,n=this.settledOption;L([[`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)},t.prototype.setCalculatedRange=function(e){var t=this.option;L([`start`,`startValue`,`end`,`endValue`],function(n){t[n]=e[n]})},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},t.prototype.getValueRange=function(e,t){if(e==null&&t==null){var n=this.findRepresentativeAxisProxy();if(n)return n.getDataValueWindow()}else return this.getAxisProxy(e,t).getDataValueWindow()},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;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||=s}return t},t.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},t.prototype.getOrient=function(){return process.env.NODE_ENV!==`production`&&G(this._orient),this._orient},t.type=`dataZoom`,t.dependencies=[`xAxis`,`yAxis`,`radiusAxis`,`angleAxis`,`singleAxis`,`series`,`toolbox`],t.defaultOption={z:4,filterMode:`filter`,start:0,end:100},t}(GS);function A1(e){var t={};return L([`start`,`end`,`startValue`,`endValue`,`throttle`],function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t}var j1=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`dataZoom.select`,t}(k1),M1=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n,r){this.dataZoomModel=e,this.ecModel=t,this.api=n},t.type=`dataZoom`,t}(hE),N1=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`dataZoom.select`,t}(M1),P1=L,F1=Tp,I1=function(){function e(e,t,n,r){this._dimName=e,this._axisIndex=t,this.ecModel=r,this._dataZoomModel=n}return e.prototype.hostedBy=function(e){return this._dataZoomModel===e},e.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},e.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},e.prototype.getTargetSeriesModels=function(){var e=[];return this.ecModel.eachSeries(function(t){if(w1(t)){var n=T1(this._dimName),r=t.getReferringComponents(n,Dm).models[0];r&&this._axisIndex===r.componentIndex&&e.push(t)}},this),e},e.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+`Axis`,this._axisIndex)},e.prototype.getMinMaxSpan=function(){return P(this._minMaxSpan)},e.prototype.calculateDataWindow=function(e){var t=this._dataExtent,n=this.getAxisModel().axis.scale,r=this._dataZoomModel.getRangePropMode(),i=[0,100],a=[],o=[],s;P1([`start`,`end`],function(c,l){var u=e[c],d=e[c+`Value`];r[l]===`percent`?(u??=i[l],d=n.parse(Sp(u,i,t))):(s=!0,d=d==null?t[l]:n.parse(d),u=Sp(d,t,i)),o[l]=d==null||isNaN(d)?t[l]:d,a[l]=u==null||isNaN(u)?i[l]:u}),F1(o),F1(a);var c=this._minMaxSpan;s?l(o,a,t,i,!1):l(a,o,i,t,!0);function l(e,t,r,i,a){var o=a?`Span`:`ValueSpan`;ZW(0,e,r,`all`,c[`min`+o],c[`max`+o]);for(var s=0;s<2;s++)t[s]=Sp(e[s],r,i,!0),a&&(t[s]=n.parse(t[s]))}return{valueWindow:o,percentWindow:a}},e.prototype.reset=function(e){if(e===this._dataZoomModel){var t=this.getTargetSeriesModels();this._dataExtent=L1(this,this._dimName,t),this._updateMinMaxSpan();var n=this.calculateDataWindow(e.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},e.prototype.filterData=function(e,t){if(e!==this._dataZoomModel)return;var n=this._dimName,r=this.getTargetSeriesModels(),i=e.get(`filterMode`),a=this._valueWindow;if(i===`none`)return;P1(r,function(e){var t=e.getData(),r=t.mapDimensionsAll(n);if(r.length){if(i===`weakFilter`){var s=t.getStore(),c=R(r,function(e){return t.getDimensionIndex(e)},t);t.filterSelf(function(e){for(var t,n,i,o=0;o<r.length;o++){var l=s.get(c[o],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 P1(r,function(n){if(i===`empty`)e.setData(t=t.map(n,function(e){return o(e)?e:NaN}));else{var r={};r[n]=a,t.selectRange(r)}});P1(r,function(e){t.setApproximateExtent(a,e)})}});function o(e){return e>=a[0]&&e<=a[1]}},e.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._dataExtent;P1([`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=Sp(i,[0,100],n,!0)-n[0]):i=Sp(n[0]+a,n,[0,100],!0),e[r+`Span`]=i,e[r+`ValueSpan`]=a},this)},e.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,n=this._valueWindow;if(t){var r=Op(n,[0,500]);r=Math.min(r,20);var i=e.axis.scale.rawExtentInfo;t[0]!==0&&i.setDeterminedMinMax(`min`,+n[0].toFixed(r)),t[1]!==100&&i.setDeterminedMinMax(`max`,+n[1].toFixed(r)),i.freeze()}},e}();function L1(e,t,n){var r=[1/0,-1/0];P1(n,function(e){Wj(r,e.getData(),t)});var i=e.getAxisModel(),a=Mj(i.axis.scale,i,r).calculate();return[a.min,a.max]}var R1={getTargetSeries:function(e){function t(t){e.eachComponent(`dataZoom`,function(n){n.eachTargetAxis(function(r,i){t(r,i,e.getComponent(T1(r),i),n)})})}t(function(e,t,n,r){n.__dzAxisProxy=null});var n=[];t(function(t,r,i,a){i.__dzAxisProxy||(i.__dzAxisProxy=new I1(t,r,a,e),n.push(i.__dzAxisProxy))});var r=K();return L(n,function(e){L(e.getTargetSeriesModels(),function(e){r.set(e.uid,e)})}),r},overallReset:function(e,t){e.eachComponent(`dataZoom`,function(e){e.eachTargetAxis(function(t,n){e.getAxisProxy(t,n).reset(e)}),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.getDataPercentWindow(),r=t.getDataValueWindow();e.setCalculatedRange({start:n[0],end:n[1],startValue:r[0],endValue:r[1]})}})}};function z1(e){e.registerAction(`dataZoom`,function(e,t){L(E1(t,e),function(t){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var B1=!1;function V1(e){B1||(B1=!0,e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,R1),z1(e),e.registerSubTypeDefaulter(`dataZoom`,function(){return`slider`}))}function H1(e){e.registerComponentModel(j1),e.registerComponentView(N1),V1(e)}var U1=function(){function e(){}return e}(),W1={};function G1(e,t){W1[e]=t}function K1(e){return W1[e]}var q1=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.optionUpdated=function(){e.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;L(this.option.feature,function(e,n){var r=K1(n);r&&(r.getDefaultOption&&(r.defaultOption=r.getDefaultOption(t)),ks(e,r.defaultOption))})},t.type=`toolbox`,t.layoutMode={type:`box`,ignoreSize:!0},t.defaultOption={show:!0,z:6,orient:`horizontal`,left:`right`,top:`top`,backgroundColor:`transparent`,borderColor:Z.color.border,borderRadius:0,borderWidth:0,padding:Z.size.m,itemSize:15,itemGap:Z.size.s,showTitle:!0,iconStyle:{borderColor:Z.color.accent50,color:`none`},emphasis:{iconStyle:{borderColor:Z.color.accent50}},tooltip:{show:!1,position:`bottom`}},t}(GS);function J1(e,t){var n=aS(t.get(`padding`)),r=t.getItemStyle([`color`,`opacity`]);return r.fill=t.get(`backgroundColor`),new e_({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 Y1=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(e,t,n,r){var i=this.group;if(i.removeAll(),!e.get(`show`))return;var a=+e.get(`itemSize`),o=e.get(`orient`)===`vertical`,s=e.get(`feature`)||{},c=this._features||={},l=[];L(s,function(e,t){l.push(t)}),new Ik(this._featureNames||[],l).add(u).update(u).remove(Rs(u,null)).execute(),this._featureNames=l;function u(i,a){var o=l[i],u=l[a],f=s[o],p=new ex(f,e,e.ecModel),m;if(r&&r.newTitle!=null&&r.featureName===o&&(f.title=r.newTitle),o&&!u){if(X1(o))m={onclick:p.option.onclick,featureName:o};else{var h=K1(o);if(!h)return;m=new h}c[o]=m}else if(m=c[u],!m)return;m.uid=nx(`toolbox-feature`),m.model=p,m.ecModel=t,m.api=n;var g=m instanceof U1;if(!o&&u){g&&m.dispose&&m.dispose(t,n);return}if(!p.get(`show`)||g&&m.unusable){g&&m.remove&&m.remove(t,n);return}d(p,m,o),p.setIconStatus=function(e,t){var n=this.option,r=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[e]=t,r[e]&&(t===`emphasis`?Q_:$_)(r[e])},m instanceof U1&&m.render&&m.render(p,t,n,r)}function d(r,s,c){var l=r.getModel(`iconStyle`),u=r.getModel([`emphasis`,`iconStyle`]),d=s instanceof U1&&s.getIcons?s.getIcons():r.get(`icon`),f=r.get(`title`)||{},p,m;H(d)?(p={},p[c]=d):p=d,H(f)?(m={},m[c]=f):m=f;var h=r.iconPaths={};L(p,function(c,d){var f=gb(c,{},{x:-a/2,y:-a/2,width:a,height:a});f.setStyle(l.getItemStyle());var p=f.ensureState(`emphasis`);p.style=u.getItemStyle();var g=new a_({style:{text:m[d],align:u.get(`textAlign`),borderRadius:u.get(`textBorderRadius`),padding:u.get(`textPadding`),fill:null,font:Gb({fontStyle:u.get(`textFontStyle`),fontFamily:u.get(`textFontFamily`),fontSize:u.get(`textFontSize`),fontWeight:u.get(`textFontWeight`)},t)},ignore:!0});f.setTextContent(g),Cb({el:f,componentModel:e,itemName:d,formatterParamsExtra:{title:m[d]}}),f.__title=m[d],f.on(`mouseover`,function(){var t=u.getItemStyle(),r=o?e.get(`right`)==null&&e.get(`left`)!==`right`?`right`:`left`:e.get(`bottom`)==null&&e.get(`top`)!==`bottom`?`bottom`:`top`;g.setStyle({fill:u.get(`textFill`)||t.fill||t.stroke||Z.color.neutral99,backgroundColor:u.get(`textBackgroundColor`)}),f.setTextConfig({position:u.get(`textPosition`)||r}),g.ignore=!e.get(`showTitle`),n.enterEmphasis(this)}).on(`mouseout`,function(){r.get([`iconStatus`,d])!==`emphasis`&&n.leaveEmphasis(this),g.hide()}),(r.get([`iconStatus`,d])===`emphasis`?Q_:$_)(f),i.add(f),f.on(`click`,z(s.onclick,s,t,n,d)),h[d]=f})}var f=LS(e,n).refContainer,p=e.getBoxLayoutParams(),m=e.get(`padding`),h=PS(p,f,m);AS(e.get(`orient`),i,e.get(`itemGap`),h.width,h.height),RS(i,p,f,m),i.add(J1(i.getBoundingRect(),e)),o||i.eachChild(function(e){var t=e.__title,r=e.ensureState(`emphasis`),o=r.textConfig||={},s=e.getTextContent(),c=s&&s.ensureState(`emphasis`);if(c&&!V(c)&&t){var l=c.style||={},u=Vf(t,a_.makeFont(l)),d=e.x+i.x,f=e.y+i.y+a,p=!1;f+u.height>n.getHeight()&&(o.position=`top`,p=!0);var m=p?-5-u.height:a+10;d+u.width/2>n.getWidth()?(o.position=[`100%`,m],l.align=`right`):d-u.width/2<0&&(o.position=[0,m],l.align=`left`)}})},t.prototype.updateView=function(e,t,n,r){L(this._features,function(e){e instanceof U1&&e.updateView&&e.updateView(e.model,t,n,r)})},t.prototype.remove=function(e,t){L(this._features,function(n){n instanceof U1&&n.remove&&n.remove(e,t)}),this.group.removeAll()},t.prototype.dispose=function(e,t){L(this._features,function(n){n instanceof U1&&n.dispose&&n.dispose(e,t)})},t.type=`toolbox`,t}(hE);function X1(e){return e.indexOf(`my`)===0}var Z1=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.onclick=function(e,t){var n=this.model,r=n.get(`name`)||e.get(`title.0.text`)||`echarts`,i=t.getZr().painter.getType()===`svg`,a=i?`svg`:n.get(`type`,!0)||`png`,o=t.getConnectedDataURL({type:a,backgroundColor:n.get(`backgroundColor`,!0)||e.get(`backgroundColor`)||Z.color.neutral00,connectedBackgroundColor:n.get(`connectedBackgroundColor`),excludeComponents:n.get(`excludeComponents`),pixelRatio:n.get(`pixelRatio`)}),s=fs.browser;if(typeof MouseEvent==`function`&&(s.newEdge||!s.ie&&!s.edge)){var c=document.createElement(`a`);c.download=r+`.`+a,c.target=`_blank`,c.href=o;var l=new MouseEvent(`click`,{view:document.defaultView,bubbles:!0,cancelable:!1});c.dispatchEvent(l)}else if(window.navigator.msSaveOrOpenBlob||i){var u=o.split(`,`),d=u[0].indexOf(`base64`)>-1,f=i?decodeURIComponent(u[1]):u[1];d&&(f=window.atob(f));var p=r+`.`+a;if(window.navigator.msSaveOrOpenBlob){for(var m=f.length,h=new Uint8Array(m);m--;)h[m]=f.charCodeAt(m);var g=new Blob([h]);window.navigator.msSaveOrOpenBlob(g,p)}else{var _=document.createElement(`iframe`);document.body.appendChild(_);var v=_.contentWindow,y=v.document;y.open(`image/svg+xml`,`replace`),y.write(f),y.close(),v.focus(),y.execCommand(`SaveAs`,!0,p),document.body.removeChild(_)}}else{var b=n.get(`lang`),x=`<body style="margin:0;"><img src="`+o+`" style="max-width:100%;" title="`+(b&&b[0]||``)+`" /></body>`,S=window.open();S.document.write(x),S.document.title=r}},t.getDefaultOption=function(e){return{show:!0,icon:`M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0`,title:e.getLocaleModel().get([`toolbox`,`saveAsImage`,`title`]),type:`png`,connectedBackgroundColor:Z.color.neutral00,name:``,excludeComponents:[`toolbox`],lang:e.getLocaleModel().get([`toolbox`,`saveAsImage`,`lang`])}},t}(U1),Q1=`__ec_magicType_stack__`,$1=[[`line`,`bar`],[`stack`]],e0=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getIcons=function(){var e=this.model,t=e.get(`icon`),n={};return L(e.get(`type`),function(e){t[e]&&(n[e]=t[e])}),n},t.getDefaultOption=function(e){return{show:!0,type:[],icon:{line:`M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4`,bar:`M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7`,stack:`M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z`},title:e.getLocaleModel().get([`toolbox`,`magicType`,`title`]),option:{},seriesIndex:{}}},t.prototype.onclick=function(e,t,n){var r=this.model,i=r.get([`seriesIndex`,n]);if(t0[n]){var a={series:[]};L($1,function(e){js(e,n)>=0&&L(e,function(e){r.setIconStatus(e,`normal`)})}),r.setIconStatus(n,`emphasis`),e.eachComponent({mainType:`series`,query:i==null?null:{seriesIndex:i}},function(e){var t=e.subType,i=e.id,o=t0[n](t,i,e,r);o&&(I(o,e.option),a.series.push(o));var s=e.coordinateSystem;if(s&&s.type===`cartesian2d`&&(n===`line`||n===`bar`)){var c=s.getAxesByScale(`ordinal`)[0];if(c){var l=c.dim+`Axis`,u=e.getReferringComponents(l,Dm).models[0].componentIndex;a[l]=a[l]||[];for(var d=0;d<=u;d++)a[l][u]=a[l][u]||{};a[l][u].boundaryGap=n===`bar`}}});var o,s=n;n===`stack`&&(o=ks({stack:r.option.title.tiled,tiled:r.option.title.stack},r.option.title),r.get([`iconStatus`,n])!==`emphasis`&&(s=`tiled`)),t.dispatchAction({type:`changeMagicType`,currentType:s,newOption:a,newTitle:o,featureName:`magicType`})}},t}(U1),t0={line:function(e,t,n,r){if(e===`bar`)return ks({id:t,type:`line`,data:n.get(`data`),stack:n.get(`stack`),markPoint:n.get(`markPoint`),markLine:n.get(`markLine`)},r.get([`option`,`line`])||{},!0)},bar:function(e,t,n,r){if(e===`line`)return ks({id:t,type:`bar`,data:n.get(`data`),stack:n.get(`stack`),markPoint:n.get(`markPoint`),markLine:n.get(`markLine`)},r.get([`option`,`bar`])||{},!0)},stack:function(e,t,n,r){var i=n.get(`stack`)===Q1;if(e===`line`||e===`bar`)return r.setIconStatus(`stack`,i?`normal`:`emphasis`),ks({id:t,stack:i?``:Q1},r.get([`option`,`stack`])||{},!0)}};xk({type:`changeMagicType`,event:`magicTypeChanged`,update:`prepareAndUpdate`},function(e,t){t.mergeOption(e.newOption)});var n0=Array(60).join(`-`),r0=` `;function i0(e){var t={},n=[],r=[];return e.eachRawSeries(function(e){var i=e.coordinateSystem;if(i&&(i.type===`cartesian2d`||i.type===`polar`)){var a=i.getBaseAxis();if(a.type===`category`){var o=a.dim+`_`+a.index;t[o]||(t[o]={categoryAxis:a,valueAxis:i.getOtherAxis(a),series:[]},r.push({axisDim:a.dim,axisIndex:a.index})),t[o].series.push(e)}else n.push(e)}else n.push(e)}),{seriesGroupByCategoryAxis:t,other:n,meta:r}}function a0(e){var t=[];return L(e,function(e,n){var r=e.categoryAxis,i=e.valueAxis.dim,a=[` `].concat(R(e.series,function(e){return e.name})),o=[r.model.getCategories()];L(e.series,function(e){var t=e.getRawData();o.push(e.getRawData().mapArray(t.mapDimension(i),function(e){return e}))});for(var s=[a.join(r0)],c=0;c<o[0].length;c++){for(var l=[],u=0;u<o.length;u++)l.push(o[u][c]);s.push(l.join(r0))}t.push(s.join(`
|
|
69
|
-
`))}),t.join(`
|
|
70
|
-
|
|
71
|
-
`+n0+`
|
|
72
|
-
|
|
73
|
-
`)}function o0(e){return R(e,function(e){var t=e.getRawData(),n=[e.name],r=[];return t.each(t.dimensions,function(){for(var e=arguments.length,i=arguments[e-1],a=t.getName(i),o=0;o<e-1;o++)r[o]=arguments[o];n.push((a?a+r0:``)+r.join(r0))}),n.join(`
|
|
74
|
-
`)}).join(`
|
|
75
|
-
|
|
76
|
-
`+n0+`
|
|
77
|
-
|
|
78
|
-
`)}function s0(e){var t=i0(e);return{value:Fs([a0(t.seriesGroupByCategoryAxis),o0(t.other)],function(e){return!!e.replace(/[\n\t\s]/g,``)}).join(`
|
|
79
|
-
|
|
80
|
-
`+n0+`
|
|
81
|
-
|
|
82
|
-
`),meta:t.meta}}function c0(e){return e.replace(/^\s\s*/,``).replace(/\s\s*$/,``)}function l0(e){if(e.slice(0,e.indexOf(`
|
|
83
|
-
`)).indexOf(r0)>=0)return!0}var u0=RegExp(`[`+r0+`]+`,`g`);function d0(e){for(var t=e.split(/\n+/g),n=c0(t.shift()).split(u0),r=[],i=R(n,function(e){return{name:e,data:[]}}),a=0;a<t.length;a++){var o=c0(t[a]).split(u0);r.push(o.shift());for(var s=0;s<o.length;s++)i[s]&&(i[s].data[a]=o[s])}return{series:i,categories:r}}function f0(e){for(var t=e.split(/\n+/g),n=c0(t.shift()),r=[],i=0;i<t.length;i++){var a=c0(t[i]);if(a){var o=a.split(u0),s=``,c=void 0,l=!1;isNaN(o[0])?(l=!0,s=o[0],o=o.slice(1),r[i]={name:s,value:[]},c=r[i].value):c=r[i]=[];for(var u=0;u<o.length;u++)c.push(+o[u]);c.length===1&&(l?r[i].value=c[0]:r[i]=c[0])}}return{name:n,data:r}}function p0(e,t){var n=e.split(RegExp(`
|
|
84
|
-
*`+n0+`
|
|
85
|
-
*`,`g`)),r={series:[]};return L(n,function(e,n){if(l0(e)){var i=d0(e),a=t[n],o=a.axisDim+`Axis`;a&&(r[o]=r[o]||[],r[o][a.axisIndex]={data:i.categories},r.series=r.series.concat(i.series))}else{var i=f0(e);r.series.push(i)}}),r}var m0=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.onclick=function(e,t){setTimeout(function(){t.dispatchAction({type:`hideTip`})});var n=t.getDom(),r=this.model;this._dom&&n.removeChild(this._dom);var i=document.createElement(`div`);i.style.cssText=`position:absolute;top:0;bottom:0;left:0;right:0;padding:5px`,i.style.backgroundColor=r.get(`backgroundColor`)||Z.color.neutral00;var a=document.createElement(`h4`),o=r.get(`lang`)||[];a.innerHTML=o[0]||r.get(`title`),a.style.cssText=`margin:10px 20px`,a.style.color=r.get(`textColor`);var s=document.createElement(`div`),c=document.createElement(`textarea`);s.style.cssText=`overflow:auto`;var l=r.get(`optionToContent`),u=r.get(`contentToOption`),d=s0(e);if(V(l)){var f=l(t.getOption());H(f)?s.innerHTML=f:Us(f)&&s.appendChild(f)}else{c.readOnly=r.get(`readOnly`);var p=c.style;p.cssText=`display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none`,p.color=r.get(`textColor`),p.borderColor=r.get(`textareaBorderColor`),p.backgroundColor=r.get(`textareaColor`),c.value=d.value,s.appendChild(c)}var m=d.meta,h=document.createElement(`div`);h.style.cssText=`position:absolute;bottom:5px;left:0;right:0`;var g=`float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px`,_=document.createElement(`div`),v=document.createElement(`div`);g+=`;background-color:`+r.get(`buttonColor`),g+=`;color:`+r.get(`buttonTextColor`);var y=this;function b(){n.removeChild(i),y._dom=null}$c(_,`click`,b),$c(v,`click`,function(){if(u==null&&l!=null||u!=null&&l==null){process.env.NODE_ENV!==`production`&&Wp("It seems you have just provided one of `contentToOption` and `optionToContent` functions but missed the other one. Data change is ignored."),b();return}var e;try{e=V(u)?u(s,t.getOption()):p0(c.value,m)}catch(e){throw b(),Error(`Data view format error `+e)}e&&t.dispatchAction({type:`changeDataView`,newOption:e}),b()}),_.innerHTML=o[1],v.innerHTML=o[2],v.style.cssText=_.style.cssText=g,!r.get(`readOnly`)&&h.appendChild(v),h.appendChild(_),i.appendChild(a),i.appendChild(s),i.appendChild(h),s.style.height=n.clientHeight-80+`px`,n.appendChild(i),this._dom=i},t.prototype.remove=function(e,t){this._dom&&t.getDom().removeChild(this._dom)},t.prototype.dispose=function(e,t){this.remove(e,t)},t.getDefaultOption=function(e){return{show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:`M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28`,title:e.getLocaleModel().get([`toolbox`,`dataView`,`title`]),lang:e.getLocaleModel().get([`toolbox`,`dataView`,`lang`]),backgroundColor:Z.color.background,textColor:Z.color.primary,textareaColor:Z.color.background,textareaBorderColor:Z.color.border,buttonColor:Z.color.accent50,buttonTextColor:Z.color.neutral00}},t}(U1);function h0(e,t){return R(e,function(e,n){var r=t&&t[n];if(U(r)&&!B(r)){U(e)&&!B(e)||(e={value:e});var i=r.name!=null&&e.name==null;return e=I(e,r),i&&delete e.name,e}else return e})}xk({type:`changeDataView`,event:`dataViewChanged`,update:`prepareAndUpdate`},function(e,t){var n=[];L(e.newOption.series,function(e){var r=t.getSeriesByName(e.name)[0];if(!r)n.push(F({type:`scatter`},e));else{var i=r.get(`data`);n.push({name:e.name,data:h0(e.data,i)})}}),t.mergeOption(I({series:n},e.newOption))});var g0=L,_0=Cm();function v0(e,t){var n=S0(e);g0(t,function(t,r){for(var i=n.length-1;i>=0&&!n[i][r];i--);if(i<0){var a=e.queryComponents({mainType:`dataZoom`,subType:`select`,id:r})[0];if(a){var o=a.getPercentRange();n[0][r]={dataZoomId:r,start:o[0],end:o[1]}}}}),n.push(t)}function y0(e){var t=S0(e),n=t[t.length-1];t.length>1&&t.pop();var r={};return g0(n,function(e,n){for(var i=t.length-1;i>=0;i--)if(e=t[i][n],e){r[n]=e;break}}),r}function b0(e){_0(e).snapshots=null}function x0(e){return S0(e).length}function S0(e){var t=_0(e);return t.snapshots||=[{}],t.snapshots}var C0=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.onclick=function(e,t){b0(e),t.dispatchAction({type:`restore`,from:this.uid})},t.getDefaultOption=function(e){return{show:!0,icon:`M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5`,title:e.getLocaleModel().get([`toolbox`,`restore`,`title`])}},t}(U1);xk({type:`restore`,event:`restore`,update:`prepareAndUpdate`},function(e,t){t.resetOption(`recreate`)});var w0=[`grid`,`xAxis`,`yAxis`,`geo`,`graph`,`polar`,`radiusAxis`,`angleAxis`,`bmap`],T0=function(){function e(e,t,n){var r=this;this._targetInfoList=[];var i=D0(t,e);L(O0,function(e,t){(!n||!n.include||js(n.include,t)>=0)&&e(i,r._targetInfoList)})}return e.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,function(e,t,n){if((e.coordRanges||=[]).push(t),!e.coordRange){e.coordRange=t;var r=j0[e.brushType](0,n,t);e.__rangeOffset={offset:N0[e.brushType](r.values,e.range,[1,1]),xyMinMax:r.xyMinMax}}}),e},e.prototype.matchOutputRanges=function(e,t,n){L(e,function(e){var r=this.findTargetInfo(e,t);r&&r!==!0&&L(r.coordSyses,function(r){n(e,j0[e.brushType](1,r,e.range,!0).values,r,t)})},this)},e.prototype.setInputRanges=function(e,t){L(e,function(e){var n=this.findTargetInfo(e,t);if(process.env.NODE_ENV!==`production`&&(G(!n||n===!0||e.coordRange,`coordRange must be specified when coord index specified.`),G(!n||n!==!0||e.range,`range must be specified in global brush.`)),e.range=e.range||[],n&&n!==!0){e.panelId=n.panelId;var r=j0[e.brushType](0,n.coordSys,e.coordRange),i=e.__rangeOffset;e.range=i?N0[e.brushType](r.values,i.offset,F0(r.xyMinMax,i.xyMinMax)):r.values}},this)},e.prototype.makePanelOpts=function(e,t){return R(this._targetInfoList,function(n){var r=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:t?t(n):null,clipPath:lK(r),isTargetByCursor:dK(r,e,n.coordSysModel),getLinearBrushOtherExtent:uK(r)}})},e.prototype.controlSeries=function(e,t,n){var r=this.findTargetInfo(e,n);return r===!0||r&&js(r.coordSyses,t.coordinateSystem)>=0},e.prototype.findTargetInfo=function(e,t){for(var n=this._targetInfoList,r=D0(t,e),i=0;i<n.length;i++){var a=n[i],o=e.panelId;if(o){if(a.panelId===o)return a}else for(var s=0;s<k0.length;s++)if(k0[s](r,a))return a}return!0},e}();function E0(e){return e[0]>e[1]&&e.reverse(),e}function D0(e,t){return Tm(e,t,{includeMainTypes:w0})}var O0={grid:function(e,t){var n=e.xAxisModels,r=e.yAxisModels,i=e.gridModels,a=K(),o={},s={};!n&&!r&&!i||(L(n,function(e){var t=e.axis.grid.model;a.set(t.id,t),o[t.id]=!0}),L(r,function(e){var t=e.axis.grid.model;a.set(t.id,t),s[t.id]=!0}),L(i,function(e){a.set(e.id,e),o[e.id]=!0,s[e.id]=!0}),a.each(function(e){var i=e.coordinateSystem,a=[];L(i.getCartesians(),function(e,t){(js(n,e.getAxis(`x`).model)>=0||js(r,e.getAxis(`y`).model)>=0)&&a.push(e)}),t.push({panelId:`grid--`+e.id,gridModel:e,coordSysModel:e,coordSys:a[0],coordSyses:a,getPanelRect:A0.grid,xAxisDeclared:o[e.id],yAxisDeclared:s[e.id]})}))},geo:function(e,t){L(e.geoModels,function(e){var n=e.coordinateSystem;t.push({panelId:`geo--`+e.id,geoModel:e,coordSysModel:e,coordSys:n,coordSyses:[n],getPanelRect:A0.geo})})}},k0=[function(e,t){var n=e.xAxisModel,r=e.yAxisModel,i=e.gridModel;return!i&&n&&(i=n.axis.grid.model),!i&&r&&(i=r.axis.grid.model),i&&i===t.gridModel},function(e,t){var n=e.geoModel;return n&&n===t.geoModel}],A0={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var e=this.coordSys,t=e.getBoundingRect().clone();return t.applyTransform(ub(e)),t}},j0={lineX:Rs(M0,0),lineY:Rs(M0,1),rect:function(e,t,n,r){var i=e?t.pointToData([n[0][0],n[1][0]],r):t.dataToPoint([n[0][0],n[1][0]],r),a=e?t.pointToData([n[0][1],n[1][1]],r):t.dataToPoint([n[0][1],n[1][1]],r),o=[E0([i[0],a[0]]),E0([i[1],a[1]])];return{values:o,xyMinMax:o}},polygon:function(e,t,n,r){var i=[[1/0,-1/0],[1/0,-1/0]];return{values:R(n,function(n){var a=e?t.pointToData(n,r):t.dataToPoint(n,r);return i[0][0]=Math.min(i[0][0],a[0]),i[1][0]=Math.min(i[1][0],a[1]),i[0][1]=Math.max(i[0][1],a[0]),i[1][1]=Math.max(i[1][1],a[1]),a}),xyMinMax:i}}};function M0(e,t,n,r){process.env.NODE_ENV!==`production`&&G(n.type===`cartesian2d`,`lineX/lineY brush is available only in cartesian2d.`);var i=n.getAxis([`x`,`y`][e]),a=E0(R([0,1],function(e){return t?i.coordToData(i.toLocalCoord(r[e]),!0):i.toGlobalCoord(i.dataToCoord(r[e]))})),o=[];return o[e]=a,o[1-e]=[NaN,NaN],{values:a,xyMinMax:o}}var N0={lineX:Rs(P0,0),lineY:Rs(P0,1),rect:function(e,t,n){return[[e[0][0]-n[0]*t[0][0],e[0][1]-n[0]*t[0][1]],[e[1][0]-n[1]*t[1][0],e[1][1]-n[1]*t[1][1]]]},polygon:function(e,t,n){return R(e,function(e,r){return[e[0]-n[0]*t[r][0],e[1]-n[1]*t[r][1]]})}};function P0(e,t,n,r){return[t[0]-r[e]*n[0],t[1]-r[e]*n[1]]}function F0(e,t){var n=I0(e),r=I0(t),i=[n[0]/r[0],n[1]/r[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}function I0(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}var L0=L,R0=vm(`toolbox-dataZoom_`),z0=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(e,t,n,r){this._brushController||(this._brushController=new EG(n.getZr()),this._brushController.on(`brush`,z(this._onBrush,this)).mount()),U0(e,t,this,r,n),H0(e,t)},t.prototype.onclick=function(e,t,n){B0[n].call(this)},t.prototype.remove=function(e,t){this._brushController&&this._brushController.unmount()},t.prototype.dispose=function(e,t){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(e){var t=e.areas;if(!e.isEnd||!t.length)return;var n={},r=this.ecModel;this._brushController.updateCovers([]),new T0(V0(this.model),r,{include:[`grid`]}).matchOutputRanges(t,r,function(e,t,n){if(n.type===`cartesian2d`){var r=e.brushType;r===`rect`?(i(`x`,n,t[0]),i(`y`,n,t[1])):i({lineX:`x`,lineY:`y`}[r],n,t)}}),v0(r,n),this._dispatchZoomAction(n);function i(e,t,i){var o=t.getAxis(e),s=o.model,c=a(e,s,r),l=c.findRepresentativeAxisProxy(s).getMinMaxSpan();(l.minValueSpan!=null||l.maxValueSpan!=null)&&(i=ZW(0,i.slice(),o.scale.getExtent(),0,l.minValueSpan,l.maxValueSpan)),c&&(n[c.id]={dataZoomId:c.id,startValue:i[0],endValue:i[1]})}function a(e,t,n){var r;return n.eachComponent({mainType:`dataZoom`,subType:`select`},function(n){n.getAxisModel(e,t.componentIndex)&&(r=n)}),r}},t.prototype._dispatchZoomAction=function(e){var t=[];L0(e,function(e,n){t.push(P(e))}),t.length&&this.api.dispatchAction({type:`dataZoom`,from:this.uid,batch:t})},t.getDefaultOption=function(e){return{show:!0,filterMode:`filter`,icon:{zoom:`M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1`,back:`M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26`},title:e.getLocaleModel().get([`toolbox`,`dataZoom`,`title`]),brushStyle:{borderWidth:0,color:Z.color.backgroundTint}}},t}(U1),B0={zoom:function(){var e=!this._isZoomActive;this.api.dispatchAction({type:`takeGlobalCursor`,key:`dataZoomSelect`,dataZoomSelectActive:e})},back:function(){this._dispatchZoomAction(y0(this.ecModel))}};function V0(e){var t={xAxisIndex:e.get(`xAxisIndex`,!0),yAxisIndex:e.get(`yAxisIndex`,!0),xAxisId:e.get(`xAxisId`,!0),yAxisId:e.get(`yAxisId`,!0)};return t.xAxisIndex==null&&t.xAxisId==null&&(t.xAxisIndex=`all`),t.yAxisIndex==null&&t.yAxisId==null&&(t.yAxisIndex=`all`),t}function H0(e,t){e.setIconStatus(`back`,x0(t)>1?`emphasis`:`normal`)}function U0(e,t,n,r,i){var a=n._isZoomActive;r&&r.type===`takeGlobalCursor`&&(a=r.key===`dataZoomSelect`?r.dataZoomSelectActive:!1),n._isZoomActive=a,e.setIconStatus(`zoom`,a?`emphasis`:`normal`);var o=new T0(V0(e),t,{include:[`grid`]}).makePanelOpts(i,function(e){return e.xAxisDeclared&&!e.yAxisDeclared?`lineX`:!e.xAxisDeclared&&e.yAxisDeclared?`lineY`:`rect`});n._brushController.setPanels(o).enableBrush(a&&o.length?{brushType:`auto`,brushStyle:e.getModel(`brushStyle`).getItemStyle()}:!1)}ane(`dataZoom`,function(e){var t=e.getComponent(`toolbox`,0),n=[`feature`,`dataZoom`];if(!t||t.get(n)==null)return;var r=t.getModel(n),i=[],a=Tm(e,V0(r));L0(a.xAxisModels,function(e){return o(e,`xAxis`,`xAxisIndex`)}),L0(a.yAxisModels,function(e){return o(e,`yAxis`,`yAxisIndex`)});function o(e,t,n){var a=e.componentIndex,o={type:`select`,$fromToolbox:!0,filterMode:r.get(`filterMode`,!0)||`filter`,id:R0+t+a};o[n]=a,i.push(o)}return i});function W0(e){e.registerComponentModel(q1),e.registerComponentView(Y1),G1(`saveAsImage`,Z1),G1(`magicType`,e0),G1(`dataView`,m0),G1(`dataZoom`,z0),G1(`restore`,C0),Nk(H1)}var G0=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`tooltip`,t.dependencies=[`axisPointer`],t.defaultOption={z:60,show:!0,showContent:!0,trigger:`item`,triggerOn:`mousemove|click`,alwaysShowContent:!1,renderMode:`auto`,confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:Z.color.neutral00,shadowBlur:10,shadowColor:`rgba(0, 0, 0, .2)`,shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:Z.color.border,padding:null,extraCssText:``,axisPointer:{type:`line`,axis:`auto`,animation:`auto`,animationDurationUpdate:200,animationEasingUpdate:`exponentialOut`,crossStyle:{color:Z.color.borderShade,width:1,type:`dashed`,textStyle:{}}},textStyle:{color:Z.color.tertiary,fontSize:14}},t}(GS);function K0(e){var t=e.get(`confine`);return t==null?e.get(`renderMode`)===`richText`:!!t}function q0(e){if(fs.domSupported){for(var t=document.documentElement.style,n=0,r=e.length;n<r;n++)if(e[n]in t)return e[n]}}var J0=q0([`transform`,`webkitTransform`,`OTransform`,`MozTransform`,`msTransform`]),Y0=q0([`webkitTransition`,`transition`,`OTransition`,`MozTransition`,`msTransition`]);function X0(e,t){if(!e)return t;t=iS(t,!0);var n=e.indexOf(t);return e=n===-1?t:`-`+e.slice(0,n)+`-`+t,e.toLowerCase()}function Z0(e,t){var n=e.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(e);return n?t?n[t]:n:null}var Q0=X0(Y0,`transition`),$0=X0(J0,`transform`),e2=`position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;`+(fs.transform3dSupported?`will-change:transform;`:``);function t2(e){return e=e===`left`?`right`:e===`right`?`left`:e===`top`?`bottom`:`top`,e}function n2(e,t,n){if(!H(n)||n===`inside`)return``;var r=e.get(`backgroundColor`),i=e.get(`borderWidth`);t=fS(t);var a=t2(n),o=Math.max(Math.round(i)*1.5,6),s=``,c=$0+`:`,l;js([`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 r2(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?`,`:``)+(fs.transformSupported?``+$0+i:`,left`+i+`,top`+i)),Q0+`:`+a}function i2(e,t,n){var r=e.toFixed(0)+`px`,i=t.toFixed(0)+`px`;if(!fs.transformSupported)return n?`top:`+i+`;left:`+r+`;`:[[`top`,i],[`left`,r]];var a=fs.transform3dSupported,o=`translate`+(a?`3d`:``)+`(`+r+`,`+i+(a?`,0`:``)+`)`;return n?`top:0;left:0;`+$0+`:`+o+`;`:[[`top`,0],[`left`,0],[J0,o]]}function a2(e){var t=[],n=e.get(`fontSize`),r=e.getTextColor();r&&t.push(`color:`+r),t.push(`font:`+e.getFont());var i=W(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),L([`decoration`,`align`],function(n){var r=e.get(n);r&&t.push(`text-`+n+`:`+r)}),t.join(`;`)}function o2(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=$T(e,`html`),p=l+`px `+u+`px `+s+`px `+c;return i.push(`box-shadow:`+p),t&&a>0&&i.push(r2(a,n,r)),o&&i.push(`background-color:`+o),L([`width`,`color`,`radius`],function(t){var n=`border-`+t,r=iS(n),a=e.get(r);a!=null&&i.push(n+`:`+a+(t===`color`?``:`px`))}),i.push(a2(d)),f!=null&&i.push(`padding:`+aS(f).join(`px `)+`px`),i.join(`;`)+`;`}function s2(e,t,n,r,i){var a=t&&t.painter;if(n){var o=a&&a.getViewportRoot();o&&Ic(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()}var c2=function(){function e(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,fs.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&&(H(i)?document.querySelector(i):Us(i)?i:V(i)&&i(e.getDom()));s2(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||=window.event,!o._enterable){var t=r.handler;Zc(r.painter.getViewportRoot(),e,!0),t.dispatch(`mousemove`,e)}},n.onmouseleave=function(){o._inContent=!1,o._enterable&&o._show&&o.hideLater(o._hideDelay)}}return e.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),n=Z0(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`)||``},e.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=e2+o2(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+i2(i[0],i[1],!0)+(`border-color:`+fS(t)+`;`)+(e.get(`extraCssText`)||``)+(`;pointer-events:`+(this._enterable?`auto`:`none`)):r.display=`none`,this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,t,n,r,i){var a=this.el;if(e==null){a.innerHTML=``;return}var o=``;if(H(i)&&n.get(`trigger`)===`item`&&!K0(n)&&(o=n2(n,r,i)),H(e))a.innerHTML=e+o;else if(e){a.innerHTML=``,B(e)||(e=[e]);for(var s=0;s<e.length;s++)Us(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)}}},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el;return e?[e.offsetWidth,e.offsetHeight]:[0,0]},e.prototype.moveTo=function(e,t){if(this.el){var n=this._styleCoord;if(s2(n,this._zr,this._container,e,t),n[0]!=null&&n[1]!=null){var r=this.el.style;L(i2(n[0],n[1]),function(e){r[e[0]]=e[1]})}}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){var e=this,t=this.el.style;this._enableDisplayTransition?(t.visibility=`hidden`,t.opacity=`0`):t.display=`none`,fs.transform3dSupported&&(t.willChange=``),this._show=!1,this._longHideTimeout=setTimeout(function(){return e._longHide=!0},500)},e.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(z(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var e=this._zr;Lc(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},e}(),l2=function(){function e(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),f2(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return e.prototype.update=function(e){var t=e.get(`alwaysShowContent`);t&&this._moveIfResized(),this._alwaysShowContent=t},e.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},e.prototype.setContent=function(e,t,n,r,i){var a=this;U(e)&&Yp(process.env.NODE_ENV===`production`?``:`Passing DOM nodes as content is not supported in richText tooltip!`),this.el&&this._zr.remove(this.el);var o=n.getModel(`textStyle`);this.el=new a_({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:r,textShadowColor:o.get(`textShadowColor`),fill:n.get([`textStyle`,`color`]),padding:$T(n,`richText`),verticalAlign:`top`,align:`left`},z:n.get(`z`)}),L([`backgroundColor`,`borderRadius`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],function(e){a.el.style[e]=n.get(e)}),L([`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})},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el,t=this.el.getBoundingRect(),n=d2(e.style);return[t.width+n.left+n.right,t.height+n.top+n.bottom]},e.prototype.moveTo=function(e,t){var n=this.el;if(n){var r=this._styleCoord;f2(r,this._zr,e,t),e=r[0],t=r[1];var i=n.style,a=u2(i.borderWidth||0),o=d2(i);n.x=e+a+o.left,n.y=t+a+o.top,n.markRedraw()}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},e.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(z(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this._zr.remove(this.el)},e}();function u2(e){return Math.max(0,e)}function d2(e){var t=u2(e.shadowBlur||0),n=u2(e.shadowOffsetX||0),r=u2(e.shadowOffsetY||0);return{left:u2(t-n),right:u2(t+n),top:u2(t-r),bottom:u2(t+r)}}function f2(e,t,n,r){e[0]=n,e[1]=r,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var p2=new e_({shape:{x:-1,y:-1,width:2,height:2}}),m2=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(e,t){if(!(fs.node||!t.getDom())){var n=e.getComponent(`tooltip`);this._tooltipContent=(this._renderMode=Mm(n.get(`renderMode`)))===`richText`?new l2(t):new c2(t,{appendTo:n.get(`appendToBody`,!0)?`body`:n.get(`appendTo`,!0)})}},t.prototype.render=function(e,t,n){if(!(fs.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`)?kE(this,`_updatePosition`,50,`fixRate`):AE(this,`_updatePosition`)}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel.get(`triggerOn`);vZ(`itemTooltip`,this._api,z(function(t,n,r){e!==`none`&&(e.indexOf(t)>=0?this._tryShow(n,r):t===`leave`&&this._hide(r))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,r=e.get(`triggerOn`);if(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})})}},t.prototype.manuallyShowTip=function(e,t,n,r){if(!(r.from===this.uid||fs.node||!n.getDom())){var i=g2(r,n);this._ticket=``;var a=r.dataByCoordSys,o=x2(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=p2;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=EZ(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))}},t.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,r.from!==this.uid&&this._hide(g2(r,n))},t.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&&h2([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}},t.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;var i,a;eD(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._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get(`showDelay`);t=z(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,r=this._tooltipModel,i=[t.offsetX,t.offsetY],a=h2([t.tooltipOption],r),o=this._renderMode,s=[],c=zT(`section`,{blocks:[],noHeader:!0}),l=[],u=new eE;L(e,function(e){L(e.dataByAxis,function(e){var t=n.getComponent(e.axisDim+`Axis`,e.axisIndex),i=e.value;if(!(!t||i==null)){var a=aZ(i,t.axis,n,e.seriesDataIndices,e.valueLabelOpt),d=zT(`section`,{header:a,noHeader:!Zs(a),sortBlocks:!0,blocks:[]});c.blocks.push(d),L(e.seriesDataIndices,function(c){var f=n.getSeriesByIndex(c.seriesIndex),p=c.dataIndexInside,m=f.getDataParams(p);if(!(m.dataIndex<0)){m.axisDim=e.axisDim,m.axisIndex=e.axisIndex,m.axisType=e.axisType,m.axisId=e.axisId,m.axisValue=Bj(t.axis,{value:i}),m.axisValueLabel=a,m.marker=u.makeTooltipMarker(`item`,fS(m.color),o);var h=Yw(f.formatTooltip(p,!0,null)),g=h.frag;if(g){var _=h2([f],r).get(`valueFormatter`);d.blocks.push(_?F({valueFormatter:_},g):g)}h.text&&l.push(h.text),s.push(m)}})}})}),c.blocks.reverse(),l.reverse();var d=t.position,f=GT(c,u,o,a.get(`order`),n.get(`useUTC`),a.get(`textStyle`));f&&l.unshift(f);var p=o===`richText`?`
|
|
86
|
-
|
|
87
|
-
`:`<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)})},t.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=h2([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 eE;h.marker=g.makeTooltipMarker(`item`,fS(h.color),d);var _=Yw(s.formatTooltip(c,!1,l)),v=p.get(`order`),y=p.get(`valueFormatter`),b=_.frag,x=b?GT(y?F({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})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r=this._renderMode===`html`,i=y_(t),a=i.tooltipConfig.option||{},o=a.encodeHTMLContent;if(H(a)){var s=a;a={content:s,formatter:s},o=!0}o&&r&&a.content&&(a=P(a),a.content=Wc(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=h2(c,this._tooltipModel,u?{position:u}:null),f=d.get(`content`),p=Math.random()+``,m=new eE;this._showOrMove(d,function(){var n=P(d.get(`formatterParams`)||{});this._showTooltipContent(d,f,n,p,e.offsetX,e.offsetY,e.position,t,m)}),n({type:`showTip`,from:this.uid})},t.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||=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(H(u)){var p=e.ecModel.get(`useUTC`),m=B(n)?n[0]:n,h=m&&m.axisType&&m.axisType.indexOf(`time`)>=0;d=u,h&&(d=Bx(m.axisValue,d,p)),d=lS(d,n,!0)}else if(V(u)){var g=z(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)}},t.prototype._getNearestPoint=function(e,t,n,r,i){if(n===`axis`||B(t))return{color:r||i};if(!B(t))return{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,i,a,o){var s=this._api.getWidth(),c=this._api.getHeight();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),V(t)&&(t=t([n,r],a,i.el,f,{viewSize:[s,c],contentSize:l.slice()})),B(t))n=X(t[0],s),r=X(t[1],c);else if(U(t)){var p=t;p.width=l[0],p.height=l[1];var m=PS(p,{width:s,height:c});n=m.x,r=m.y,u=null,d=null}else if(H(t)&&o){var h=y2(t,f,l,e.get(`borderWidth`));n=h[0],r=h[1]}else{var h=_2(n,r,i,s,c,u?null:20,d?null:20);n=h[0],r=h[1]}if(u&&(n-=b2(u)?l[0]/2:u===`right`?l[0]:0),d&&(r-=b2(d)?l[1]/2:d===`bottom`?l[1]:0),K0(e)){var h=v2(n,r,i,s,c);n=h[0],r=h[1]}i.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===e.length;return i&&L(n,function(n,a){var o=n.dataByAxis||[],s=(e[a]||{}).dataByAxis||[];i&&=o.length===s.length,i&&L(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&&L(o,function(e,t){var n=c[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),r&&L(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},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:`hideTip`,from:this.uid})},t.prototype.dispose=function(e,t){fs.node||!t.getDom()||(AE(this,`_updatePosition`),this._tooltipContent.dispose(),wZ(`itemTooltip`,t))},t.type=`tooltip`,t}(hE);function h2(e,t,n){var r=t.ecModel,i;n?(i=new ex(n,r,r),i=new ex(t.option,i,r)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof ex&&(o=o.get(`tooltip`,!0)),H(o)&&(o={formatter:o}),o&&(i=new ex(o,i,r)))}return i}function g2(e,t){return e.dispatchAction||z(t.dispatchAction,t)}function _2(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 v2(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 y2(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 b2(e){return e===`center`||e===`middle`}function x2(e,t,n){var r=Em(e).queryOptionMap,i=r.keys()[0];if(!(!i||i===`series`)){var a=km(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 S2(e){Nk(zZ),e.registerComponentModel(G0),e.registerComponentView(m2),e.registerAction({type:`showTip`,event:`showTip`,update:`tooltip:manuallyShowTip`},ac),e.registerAction({type:`hideTip`,event:`hideTip`,update:`tooltip:manuallyHideTip`},ac)}var C2=[`rect`,`polygon`,`keep`,`clear`];function w2(e,t){var n=$p(e?e.brush:[]);if(n.length){var r=[];L(n,function(e){var t=e.hasOwnProperty(`toolbox`)?e.toolbox:[];t instanceof Array&&(r=r.concat(t))});var i=e&&e.toolbox;B(i)&&(i=i[0]),i||(i={feature:{}},e.toolbox=[i]);var a=i.feature||={},o=a.brush||={},s=o.type||=[];s.push.apply(s,r),T2(s),t&&!s.length&&s.push.apply(s,C2)}}function T2(e){var t={};L(e,function(e){t[e]=1}),e.length=0,L(t,function(t,n){e.push(n)})}var E2=L;function D2(e){if(e){for(var t in e)if(e.hasOwnProperty(t))return!0}}function O2(e,t,n){var r={};return E2(t,function(t){var a=r[t]=i();E2(e[t],function(e,r){if(ZV.isValidType(r)){var i={type:r,visual:e};n&&n(i,t),a[r]=new ZV(i),r===`opacity`&&(i=P(i),i.type=`colorAlpha`,a.__hidden.__alphaForOpacity=new ZV(i))}})}),r;function i(){var e=function(){};return e.prototype.__hidden=e.prototype,new e}}function k2(e,t,n){var r;L(n,function(e){t.hasOwnProperty(e)&&D2(t[e])&&(r=!0)}),r&&L(n,function(n){t.hasOwnProperty(n)&&D2(t[n])?e[n]=P(t[n]):delete e[n]})}function A2(e,t,n,r,i,a){var o={};L(e,function(e){o[e]=ZV.prepareVisualTypes(t[e])});var s;function c(e){return YE(n,s,e)}function l(e,t){ZE(n,s,e,t)}a==null?n.each(u):n.each([a],u);function u(e,u){s=a==null?e:u;var d=n.getRawDataItem(s);if(!(d&&d.visualMap===!1))for(var f=r.call(i,e),p=t[f],m=o[f],h=0,g=m.length;h<g;h++){var _=m[h];p[_]&&p[_].applyVisual(e,c,l)}}}function j2(e,t,n,r){var i={};return L(e,function(e){i[e]=ZV.prepareVisualTypes(t[e])}),{progress:function(e,a){var o;r!=null&&(o=a.getDimensionIndex(r));function s(e){return YE(a,l,e)}function c(e,t){ZE(a,l,e,t)}for(var l,u=a.getStore();(l=e.next())!=null;){var d=a.getRawDataItem(l);if(!(d&&d.visualMap===!1))for(var f=r==null?l:u.get(o,l),p=n(f),m=t[p],h=i[p],g=0,_=h.length;g<_;g++){var v=h[g];m[v]&&m[v].applyVisual(f,s,c)}}}}}function M2(e){var t=e.brushType,n={point:function(r){return N2[t].point(r,n,e)},rect:function(r){return N2[t].rect(r,n,e)}};return n}var N2={lineX:P2(0),lineY:P2(1),rect:{point:function(e,t,n){return e&&n.boundingRect.contain(e[0],e[1])},rect:function(e,t,n){return e&&n.boundingRect.intersect(e)}},polygon:{point:function(e,t,n){return e&&n.boundingRect.contain(e[0],e[1])&&Qj(n.range,e[0],e[1])},rect:function(e,t,n){var r=n.range;if(!e||r.length<=1)return!1;var i=e.x,a=e.y,o=e.width,s=e.height,c=r[0];if(Qj(r,i,a)||Qj(r,i+o,a)||Qj(r,i,a+s)||Qj(r,i+o,a+s)||Ol.create(e).contain(c[0],c[1])||_b(i,a,i+o,a,r)||_b(i,a,i,a+s,r)||_b(i+o,a,i+o,a+s,r)||_b(i,a+s,i+o,a+s,r))return!0}}};function P2(e){var t=[`x`,`y`],n=[`width`,`height`];return{point:function(t,n,r){if(t){var i=r.range,a=t[e];return F2(a,i)}},rect:function(r,i,a){if(r){var o=a.range,s=[r[t[e]],r[t[e]]+r[n[e]]];return s[1]<s[0]&&s.reverse(),F2(s[0],o)||F2(s[1],o)||F2(o[0],s)||F2(o[1],s)}}}}function F2(e,t){return t[0]<=e&&e<=t[1]}var I2=[`inBrush`,`outOfBrush`],L2=`__ecBrushSelect`,R2=`__ecInBrushSelectEvent`;function z2(e){e.eachComponent({mainType:`brush`},function(t){(t.brushTargetManager=new T0(t.option,e)).setInputRanges(t.areas,e)})}function B2(e,t,n){var r=[],i,a;e.eachComponent({mainType:`brush`},function(e){n&&n.type===`takeGlobalCursor`&&e.setBrushOption(n.key===`brush`?n.brushOption:{brushType:!1})}),z2(e),e.eachComponent({mainType:`brush`},function(t,n){var o={brushId:t.id,brushIndex:n,brushName:t.name,areas:P(t.areas),selected:[]};r.push(o);var s=t.option,c=s.brushLink,l=[],u=[],d=[],f=!1;n||(i=s.throttleType,a=s.throttleDelay);var p=R(t.areas,function(e){var t=G2[e.brushType],n=I({boundingRect:t?t(e):void 0},e);return n.selectors=M2(n),n}),m=O2(t.option,I2,function(e){e.mappingMethod=`fixed`});B(c)&&L(c,function(e){l[e]=1});function h(e){return c===`all`||!!l[e]}function g(e){return!!e.length}e.eachSeries(function(e,t){var n=d[t]=[];e.subType===`parallel`?_(e,t):v(e,t,n)});function _(e,t){var n=e.coordinateSystem;f||=n.hasAxisBrushed(),h(t)&&n.eachActiveState(e.getData(),function(e,t){e===`active`&&(u[t]=1)})}function v(n,r,i){if(!(!n.brushSelector||W2(t,r))&&(L(p,function(r){t.brushTargetManager.controlSeries(r,n,e)&&i.push(r),f||=g(i)}),h(r)&&g(i))){var a=n.getData();a.each(function(e){U2(n,i,a,e)&&(u[e]=1)})}}e.eachSeries(function(e,t){var n={seriesId:e.id,seriesIndex:t,seriesName:e.name,dataIndex:[]};o.selected.push(n);var r=d[t],i=e.getData(),a=h(t)?function(e){return u[e]?(n.dataIndex.push(i.getRawIndex(e)),`inBrush`):`outOfBrush`}:function(t){return U2(e,r,i,t)?(n.dataIndex.push(i.getRawIndex(t)),`inBrush`):`outOfBrush`};(h(t)?f:g(r))&&A2(I2,m,i,a)})}),V2(t,i,a,r,n)}function V2(e,t,n,r,i){if(i){var a=e.getZr();a[R2]||(a[L2]||(a[L2]=H2),kE(a,L2,n,t)(e,r))}}function H2(e,t){if(!e.isDisposed()){var n=e.getZr();n[R2]=!0,e.dispatchAction({type:`brushSelect`,batch:t}),n[R2]=!1}}function U2(e,t,n,r){for(var i=0,a=t.length;i<a;i++){var o=t[i];if(e.brushSelector(r,n,o.selectors,o))return!0}}function W2(e,t){var n=e.option.seriesIndex;return n!=null&&n!==`all`&&(B(n)?js(n,t)<0:t!==n)}var G2={rect:function(e){return K2(e.range)},polygon:function(e){for(var t,n=e.range,r=0,i=n.length;r<i;r++){t||=[[1/0,-1/0],[1/0,-1/0]];var a=n[r];a[0]<t[0][0]&&(t[0][0]=a[0]),a[0]>t[0][1]&&(t[0][1]=a[0]),a[1]<t[1][0]&&(t[1][0]=a[1]),a[1]>t[1][1]&&(t[1][1]=a[1])}return t&&K2(t)}};function K2(e){return new Ol(e[0][0],e[1][0],e[0][1]-e[0][0],e[1][1]-e[1][0])}var q2=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(e,t){this.ecModel=e,this.api=t,this.model,(this._brushController=new EG(t.getZr())).on(`brush`,z(this._onBrush,this)).mount()},t.prototype.render=function(e,t,n,r){this.model=e,this._updateController(e,t,n,r)},t.prototype.updateTransform=function(e,t,n,r){z2(t),this._updateController(e,t,n,r)},t.prototype.updateVisual=function(e,t,n,r){this.updateTransform(e,t,n,r)},t.prototype.updateView=function(e,t,n,r){this._updateController(e,t,n,r)},t.prototype._updateController=function(e,t,n,r){(!r||r.$from!==e.id)&&this._brushController.setPanels(e.brushTargetManager.makePanelOpts(n)).enableBrush(e.brushOption).updateCovers(e.areas.slice())},t.prototype.dispose=function(){this._brushController.dispose()},t.prototype._onBrush=function(e){var t=this.model.id,n=this.model.brushTargetManager.setOutputRanges(e.areas,this.ecModel);(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:`brush`,brushId:t,areas:P(n),$from:t}),e.isEnd&&this.api.dispatchAction({type:`brushEnd`,brushId:t,areas:P(n),$from:t})},t.type=`brush`,t}(hE),J2=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.areas=[],n.brushOption={},n}return t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&k2(n,e,[`inBrush`,`outOfBrush`]);var r=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:this.option.defaultOutOfBrushColor},r.hasOwnProperty(`liftZ`)||(r.liftZ=5)},t.prototype.setAreas=function(e){process.env.NODE_ENV!==`production`&&(G(B(e)),L(e,function(e){G(e.brushType,`Illegal areas`)})),e&&(this.areas=R(e,function(e){return Y2(this.option,e)},this))},t.prototype.setBrushOption=function(e){this.brushOption=Y2(this.option,e),this.brushType=this.brushOption.brushType},t.type=`brush`,t.dependencies=[`geo`,`grid`,`xAxis`,`yAxis`,`parallel`,`series`],t.defaultOption={seriesIndex:`all`,brushType:`rect`,brushMode:`single`,transformable:!0,brushStyle:{borderWidth:1,color:Z.color.backgroundTint,borderColor:Z.color.borderTint},throttleType:`fixRate`,throttleDelay:0,removeOnClick:!0,z:1e4,defaultOutOfBrushColor:Z.color.disabled},t}(GS);function Y2(e,t){return ks({brushType:e.brushType,brushMode:e.brushMode,transformable:e.transformable,brushStyle:new ex(e.brushStyle).getItemStyle(),removeOnClick:e.removeOnClick,z:e.z},t,!0)}var X2=[`rect`,`polygon`,`lineX`,`lineY`,`keep`,`clear`],Z2=function(e){N(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(e,t,n){var r,i,a;t.eachComponent({mainType:`brush`},function(e){r=e.brushType,i=e.brushOption.brushMode||`single`,a||=!!e.areas.length}),this._brushType=r,this._brushMode=i,L(e.get(`type`,!0),function(t){e.setIconStatus(t,(t===`keep`?i===`multiple`:t===`clear`?a:t===r)?`emphasis`:`normal`)})},t.prototype.updateView=function(e,t,n){this.render(e,t,n)},t.prototype.getIcons=function(){var e=this.model,t=e.get(`icon`,!0),n={};return L(e.get(`type`,!0),function(e){t[e]&&(n[e]=t[e])}),n},t.prototype.onclick=function(e,t,n){var r=this._brushType,i=this._brushMode;n===`clear`?(t.dispatchAction({type:`axisAreaSelect`,intervals:[]}),t.dispatchAction({type:`brush`,command:`clear`,areas:[]})):t.dispatchAction({type:`takeGlobalCursor`,key:`brush`,brushOption:{brushType:n===`keep`?r:r===n?!1:n,brushMode:n===`keep`?i===`multiple`?`single`:`multiple`:i}})},t.getDefaultOption=function(e){return{show:!0,type:X2.slice(),icon:{rect:`M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13`,polygon:`M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2`,lineX:`M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4`,lineY:`M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4`,keep:`M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z`,clear:`M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2`},title:e.getLocaleModel().get([`toolbox`,`brush`,`title`])}},t}(U1);function Q2(e){e.registerComponentView(q2),e.registerComponentModel(J2),e.registerPreprocessor(w2),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,B2),e.registerAction({type:`brush`,event:`brush`,update:`updateVisual`},function(e,t){t.eachComponent({mainType:`brush`,query:e},function(t){t.setAreas(e.areas)})}),e.registerAction({type:`brushSelect`,event:`brushSelected`,update:`none`},ac),e.registerAction({type:`brushEnd`,event:`brushEnd`,update:`none`},ac),G1(`brush`,Z2)}var $2=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:`box`,ignoreSize:!0},n}return t.type=`title`,t.defaultOption={z:6,show:!0,text:``,target:`blank`,subtext:``,subtarget:`blank`,left:`center`,top:Z.size.m,backgroundColor:Z.color.transparent,borderColor:Z.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:`bold`,color:Z.color.primary},subtextStyle:{fontSize:12,color:Z.color.quaternary}},t}(GS),e4=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){if(this.group.removeAll(),e.get(`show`)){var r=this.group,i=e.getModel(`textStyle`),a=e.getModel(`subtextStyle`),o=e.get(`textAlign`),s=W(e.get(`textBaseline`),e.get(`textVerticalAlign`)),c=new a_({style:zb(i,{text:e.get(`text`),fill:i.getTextColor()},{disableBox:!0}),z2:10}),l=c.getBoundingRect(),u=e.get(`subtext`),d=new a_({style:zb(a,{text:u,fill:a.getTextColor(),y:l.height+e.get(`itemGap`),verticalAlign:`top`},{disableBox:!0}),z2:10}),f=e.get(`link`),p=e.get(`sublink`),m=e.get(`triggerEvent`,!0);c.silent=!f&&!m,d.silent=!p&&!m,f&&c.on(`click`,function(){pS(f,`_`+e.get(`target`))}),p&&d.on(`click`,function(){pS(p,`_`+e.get(`subtarget`))}),y_(c).eventData=y_(d).eventData=m?{componentType:`title`,componentIndex:e.componentIndex}:null,r.add(c),u&&r.add(d);var h=r.getBoundingRect(),g=e.getBoxLayoutParams();g.width=h.width,g.height=h.height;var _=PS(g,LS(e,n).refContainer,e.get(`padding`));o||(o=e.get(`left`)||e.get(`right`),o===`middle`&&(o=`center`),o===`right`?_.x+=_.width:o===`center`&&(_.x+=_.width/2)),s||(s=e.get(`top`)||e.get(`bottom`),s===`center`&&(s=`middle`),s===`bottom`?_.y+=_.height:s===`middle`&&(_.y+=_.height/2),s||=`top`),r.x=_.x,r.y=_.y,r.markRedraw();var v={align:o,verticalAlign:s};c.setStyle(v),d.setStyle(v),h=r.getBoundingRect();var y=_.margin,b=e.getItemStyle([`color`,`opacity`]);b.fill=e.get(`backgroundColor`);var x=new e_({shape:{x:h.x-y[3],y:h.y-y[0],width:h.width+y[1]+y[3],height:h.height+y[0]+y[2],r:e.get(`borderRadius`)},style:b,subPixelOptimize:!0,silent:!0});r.add(x)}},t.type=`title`,t}(hE);function t4(e){e.registerComponentModel($2),e.registerComponentView(e4)}var n4=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode=`box`,n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),this._initData()},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),this._initData()},t.prototype.setCurrentIndex=function(e){e??=this.option.currentIndex;var t=this._data.count();this.option.loop?e=(e%t+t)%t:(e>=t&&(e=t-1),e<0&&(e=0)),this.option.currentIndex=e},t.prototype.getCurrentIndex=function(){return this.option.currentIndex},t.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},t.prototype.setPlayState=function(e){this.option.autoPlay=!!e},t.prototype.getPlayState=function(){return!!this.option.autoPlay},t.prototype._initData=function(){var e=this.option,t=e.data||[],n=e.axisType,r=this._names=[],i;n===`category`?(i=[],L(t,function(e,t){var n=pm(nm(e),``),a;U(e)?(a=P(e),a.value=t):a=t,i.push(a),r.push(n)})):i=t,(this._data=new uA([{name:`value`,type:{category:`ordinal`,time:`time`,value:`number`}[n]||`number`}],this)).initData(i,r)},t.prototype.getData=function(){return this._data},t.prototype.getCategories=function(){if(this.get(`axisType`)===`category`)return this._names.slice()},t.type=`timeline`,t.defaultOption={z:4,show:!0,axisType:`time`,realtime:!0,left:`20%`,top:null,right:`20%`,bottom:0,width:null,height:40,padding:Z.size.m,controlPosition:`left`,autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:Z.color.secondary},data:[]},t}(GS),r4=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`timeline.slider`,t.defaultOption=ax(n4.defaultOption,{backgroundColor:`rgba(0,0,0,0)`,borderColor:Z.color.border,borderWidth:0,orient:`horizontal`,inverse:!1,tooltip:{trigger:`item`},symbol:`circle`,symbolSize:12,lineStyle:{show:!0,width:2,color:Z.color.accent10},label:{position:`auto`,show:!0,interval:`auto`,rotate:0,color:Z.color.tertiary},itemStyle:{color:Z.color.accent20,borderWidth:0},checkpointStyle:{symbol:`circle`,symbolSize:15,color:Z.color.accent50,borderColor:Z.color.accent50,borderWidth:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:`rgba(0, 0, 0, 0)`,animation:!0,animationDuration:300,animationEasing:`quinticInOut`},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:`left`,playIcon:`path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10.6699C11.5 9.90014 12.3333 9.41887 13 9.80371L20.5 14.1338C21.1667 14.5187 21.1667 15.4813 20.5 15.8662L13 20.1963C12.3333 20.5811 11.5 20.0999 11.5 19.3301V10.6699Z`,stopIcon:`path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10C12.3284 10 13 10.6716 13 11.5V18.5C13 19.3284 12.3284 20 11.5 20C10.6716 20 10 19.3284 10 18.5V11.5C10 10.6716 10.6716 10 11.5 10ZM18.5 10C19.3284 10 20 10.6716 20 11.5V18.5C20 19.3284 19.3284 20 18.5 20C17.6716 20 17 19.3284 17 18.5V11.5C17 10.6716 17.6716 10 18.5 10Z`,nextIcon:`path://M0.838834 18.7383C0.253048 18.1525 0.253048 17.2028 0.838834 16.617L7.55635 9.89949L0.838834 3.18198C0.253048 2.59619 0.253048 1.64645 0.838834 1.06066C1.42462 0.474874 2.37437 0.474874 2.96015 1.06066L10.7383 8.83883L10.8412 8.95277C11.2897 9.50267 11.2897 10.2963 10.8412 10.8462L10.7383 10.9602L2.96015 18.7383C2.37437 19.3241 1.42462 19.3241 0.838834 18.7383Z`,prevIcon:`path://M10.9602 1.06066C11.5459 1.64645 11.5459 2.59619 10.9602 3.18198L4.24264 9.89949L10.9602 16.617C11.5459 17.2028 11.5459 18.1525 10.9602 18.7383C10.3744 19.3241 9.42462 19.3241 8.83883 18.7383L1.06066 10.9602L0.957771 10.8462C0.509245 10.2963 0.509245 9.50267 0.957771 8.95277L1.06066 8.83883L8.83883 1.06066C9.42462 0.474874 10.3744 0.474874 10.9602 1.06066Z`,prevBtnSize:18,nextBtnSize:18,color:Z.color.accent50,borderColor:Z.color.accent50,borderWidth:0},emphasis:{label:{show:!0,color:Z.color.accent60},itemStyle:{color:Z.color.accent60,borderColor:Z.color.accent60},controlStyle:{color:Z.color.accent70,borderColor:Z.color.accent70}},progress:{lineStyle:{color:Z.color.accent30},itemStyle:{color:Z.color.accent40}},data:[]}),t}(n4);Ms(r4,Jw.prototype);var i4=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`timeline`,t}(hE),a4=function(e){N(t,e);function t(t,n,r,i){var a=e.call(this,t,n,r)||this;return a.type=i||`value`,a}return t.prototype.getLabelModel=function(){return this.model.getModel(`label`)},t.prototype.isHorizontal=function(){return this.model.get(`orient`)===`horizontal`},t}(IM),o4=Math.PI,s4=Cm(),c4=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(e,t){this.api=t},t.prototype.render=function(e,t,n){if(this.model=e,this.api=n,this.ecModel=t,this.group.removeAll(),e.get(`show`,!0)){var r=this._layout(e,n),i=this._createGroup(`_mainGroup`),a=this._createGroup(`_labelGroup`),o=this._axis=this._createAxis(r,e);e.formatTooltip=function(e){return zT(`nameValue`,{noName:!0,value:o.scale.getLabel({value:e})})},L([`AxisLine`,`AxisTick`,`Control`,`CurrentPointer`],function(t){this[`_render`+t](r,i,o,e)},this),this._renderAxisLabel(r,a,o,e),this._position(r,e)}this._doPlayStop(),this._updateTicksStatus()},t.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},t.prototype.dispose=function(){this._clearTimer()},t.prototype._layout=function(e,t){var n=e.get([`label`,`position`]),r=e.get(`orient`),i=u4(e,t),a=n==null||n===`auto`?r===`horizontal`?i.y+i.height/2<t.getHeight()/2?`-`:`+`:i.x+i.width/2<t.getWidth()/2?`+`:`-`:H(n)?{horizontal:{top:`-`,bottom:`+`},vertical:{left:`-`,right:`+`}}[r][n]:n,o={horizontal:`center`,vertical:a>=0||a===`+`?`left`:`right`},s={horizontal:a>=0||a===`+`?`top`:`bottom`,vertical:`middle`},c={horizontal:0,vertical:o4/2},l=r===`vertical`?i.height:i.width,u=e.getModel(`controlStyle`),d=u.get(`show`,!0),f=d?u.get(`itemSize`):0,p=d?u.get(`itemGap`):0,m=f+p,h=e.get([`label`,`rotate`])||0;h=h*o4/180;var g,_,v,y=u.get(`position`,!0),b=d&&u.get(`showPlayBtn`,!0),x=d&&u.get(`showPrevBtn`,!0),S=d&&u.get(`showNextBtn`,!0),C=0,w=l;y===`left`||y===`bottom`?(b&&(g=[0,0],C+=m),x&&(_=[C,0],C+=m),S&&(v=[w-f,0],w-=m)):(b&&(g=[w-f,0],w-=m),x&&(_=[0,0],C+=m),S&&(v=[w-f,0],w-=m));var T=[C,w];return e.get(`inverse`)&&T.reverse(),{viewRect:i,mainLength:l,orient:r,rotation:c[r],labelRotation:h,labelPosOpt:a,labelAlign:e.get([`label`,`align`])||o[r],labelBaseline:e.get([`label`,`verticalAlign`])||e.get([`label`,`baseline`])||s[r],playPosition:g,prevBtnPosition:_,nextBtnPosition:v,axisExtent:T,controlSize:f,controlGap:p}},t.prototype._position=function(e,t){var n=this._mainGroup,r=this._labelGroup,i=e.viewRect;if(e.orient===`vertical`){var a=sl(),o=i.x,s=i.y+i.height;dl(a,a,[-o,-s]),fl(a,a,-o4/2),dl(a,a,[o,s]),i=i.clone(),i.applyTransform(a)}var c=g(i),l=g(n.getBoundingRect()),u=g(r.getBoundingRect()),d=[n.x,n.y],f=[r.x,r.y];f[0]=d[0]=c[0][0];var p=e.labelPosOpt;if(p==null||H(p)){var m=p===`+`?0:1;_(d,l,c,1,m),_(f,u,c,1,1-m)}else{var m=p>=0?0:1;_(d,l,c,1,m),f[1]=d[1]+p}n.setPosition(d),r.setPosition(f),n.rotation=r.rotation=e.rotation,h(n),h(r);function h(e){e.originX=c[0][0]-e.x,e.originY=c[1][0]-e.y}function g(e){return[[e.x,e.x+e.width],[e.y,e.y+e.height]]}function _(e,t,n,r,i){e[r]+=n[r][i]-t[r][i]}},t.prototype._createAxis=function(e,t){var n=t.getData(),r=t.get(`axisType`),i=l4(t,r);i.getTicks=function(){return n.mapArray([`value`],function(e){return{value:e}})};var a=n.getDataExtent(`value`);i.setExtent(a[0],a[1]),i.calcNiceTicks();var o=new a4(`value`,i,e.axisExtent,r);return o.model=t,o},t.prototype._createGroup=function(e){var t=this[e]=new Y;return this.group.add(t),t},t.prototype._renderAxisLine=function(e,t,n,r){var i=n.getExtent();if(r.get([`lineStyle`,`show`])){var a=new wy({shape:{x1:i[0],y1:0,x2:i[1],y2:0},style:F({lineCap:`round`},r.getModel(`lineStyle`).getLineStyle()),silent:!0,z2:1});t.add(a);var o=this._progressLine=new wy({shape:{x1:i[0],x2:this._currentPointer?this._currentPointer.x:i[0],y1:0,y2:0},style:I({lineCap:`round`,lineWidth:a.style.lineWidth},r.getModel([`progress`,`lineStyle`]).getLineStyle()),silent:!0,z2:1});t.add(o)}},t.prototype._renderAxisTick=function(e,t,n,r){var i=this,a=r.getData(),o=n.scale.getTicks();this._tickSymbols=[],L(o,function(e){var o=n.dataToCoord(e.value),s=a.getItemModel(e.value),c=s.getModel(`itemStyle`),l=s.getModel([`emphasis`,`itemStyle`]),u=s.getModel([`progress`,`itemStyle`]),d=f4(s,c,t,{x:o,y:0,onclick:z(i._changeTimeline,i,e.value)});d.ensureState(`emphasis`).style=l.getItemStyle(),d.ensureState(`progress`).style=u.getItemStyle(),hv(d);var f=y_(d);s.get(`tooltip`)?(f.dataIndex=e.value,f.dataModel=r):f.dataIndex=f.dataModel=null,i._tickSymbols.push(d)})},t.prototype._renderAxisLabel=function(e,t,n,r){var i=this;if(n.getLabelModel().get(`show`)){var a=r.getData(),o=n.getViewLabels();this._tickLabels=[],L(o,function(r){var o=r.tickValue,s=a.getItemModel(o),c=s.getModel(`label`),l=s.getModel([`emphasis`,`label`]),u=s.getModel([`progress`,`label`]),d=new a_({x:n.dataToCoord(r.tickValue),y:0,rotation:e.labelRotation-e.rotation,onclick:z(i._changeTimeline,i,o),silent:!1,style:zb(c,{text:r.formattedLabel,align:e.labelAlign,verticalAlign:e.labelBaseline})});d.ensureState(`emphasis`).style=zb(l),d.ensureState(`progress`).style=zb(u),t.add(d),hv(d),s4(d).dataIndex=o,i._tickLabels.push(d)})}},t.prototype._renderControl=function(e,t,n,r){var i=e.controlSize,a=e.rotation,o=r.getModel(`controlStyle`).getItemStyle(),s=r.getModel([`emphasis`,`controlStyle`]).getItemStyle(),c=r.getPlayState(),l=r.get(`inverse`,!0);u(e.nextBtnPosition,`next`,z(this._changeTimeline,this,l?`-`:`+`)),u(e.prevBtnPosition,`prev`,z(this._changeTimeline,this,l?`+`:`-`)),u(e.playPosition,c?`stop`:`play`,z(this._handlePlayClick,this,!c),!0);function u(e,n,c,l){if(e){var u=Gf(W(r.get([`controlStyle`,n+`BtnSize`]),i),i),d=[0,-u/2,u,u],f=d4(r,n+`Icon`,d,{x:e[0],y:e[1],originX:i/2,originY:0,rotation:l?-a:0,rectHover:!0,style:o,onclick:c});f.ensureState(`emphasis`).style=s,t.add(f),hv(f)}}},t.prototype._renderCurrentPointer=function(e,t,n,r){var i=r.getData(),a=r.getCurrentIndex(),o=i.getItemModel(a).getModel(`checkpointStyle`),s=this;this._currentPointer=f4(o,o,this._mainGroup,{},this._currentPointer,{onCreate:function(e){e.draggable=!0,e.drift=z(s._handlePointerDrag,s),e.ondragend=z(s._handlePointerDragend,s),p4(e,s._progressLine,a,n,r,!0)},onUpdate:function(e){p4(e,s._progressLine,a,n,r)}})},t.prototype._handlePlayClick=function(e){this._clearTimer(),this.api.dispatchAction({type:`timelinePlayChange`,playState:e,from:this.uid})},t.prototype._handlePointerDrag=function(e,t,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},t.prototype._handlePointerDragend=function(e){this._pointerChangeTimeline([e.offsetX,e.offsetY],!0)},t.prototype._pointerChangeTimeline=function(e,t){var n=this._toAxisCoord(e)[0],r=this._axis,i=Tp(r.getExtent().slice());n>i[1]&&(n=i[1]),n<i[0]&&(n=i[0]),this._currentPointer.x=n,this._currentPointer.markRedraw();var a=this._progressLine;a&&(a.shape.x2=n,a.dirty());var o=this._findNearestTick(n),s=this.model;(t||o!==s.getCurrentIndex()&&s.get(`realtime`))&&this._changeTimeline(o)},t.prototype._doPlayStop=function(){var e=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(function(){var t=e.model;e._changeTimeline(t.getCurrentIndex()+(t.get(`rewind`,!0)?-1:1))},this.model.get(`playInterval`)))},t.prototype._toAxisCoord=function(e){return db(e,this._mainGroup.getLocalTransform(),!0)},t.prototype._findNearestTick=function(e){var t=this.model.getData(),n=1/0,r,i=this._axis;return t.each([`value`],function(t,a){var o=i.dataToCoord(t),s=Math.abs(o-e);s<n&&(n=s,r=a)}),r},t.prototype._clearTimer=function(){this._timer&&=(clearTimeout(this._timer),null)},t.prototype._changeTimeline=function(e){var t=this.model.getCurrentIndex();e===`+`?e=t+1:e===`-`&&(e=t-1),this.api.dispatchAction({type:`timelineChange`,currentIndex:e,from:this.uid})},t.prototype._updateTicksStatus=function(){var e=this.model.getCurrentIndex(),t=this._tickSymbols,n=this._tickLabels;if(t)for(var r=0;r<t.length;r++)t&&t[r]&&t[r].toggleState(`progress`,r<e);if(n)for(var r=0;r<n.length;r++)n&&n[r]&&n[r].toggleState(`progress`,s4(n[r]).dataIndex<=e)},t.type=`timeline.slider`,t}(i4);function l4(e,t){if(t||=e.get(`type`),t)switch(t){case`category`:return new WA({ordinalMeta:e.getCategories(),extent:[1/0,-1/0]});case`time`:return new dj({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get(`useUTC`)});default:return new KA}}function u4(e,t){return PS(e.getBoxLayoutParams(),LS(e,t).refContainer,e.get(`padding`))}function d4(e,t,n,r){var i=r.style,a=gb(e.get([`controlStyle`,t]),r||{},new Ol(n[0],n[1],n[2],n[3]));return i&&a.setStyle(i),a}function f4(e,t,n,r,i,a){var o=t.get(`color`);i?(i.setColor(o),n.add(i),a&&a.onUpdate(i)):(i=nD(e.get(`symbol`),-1,-1,2,2,o),i.setStyle(`strokeNoScale`,!0),n.add(i),a&&a.onCreate(i));var s=t.getItemStyle([`color`]);i.setStyle(s),r=ks({rectHover:!0,z2:100},r,!0);var c=rD(e.get(`symbolSize`));r.scaleX=c[0]/2,r.scaleY=c[1]/2;var l=iD(e.get(`symbolOffset`),c);l&&(r.x=(r.x||0)+l[0],r.y=(r.y||0)+l[1]);var u=e.get(`symbolRotate`);return r.rotation=(u||0)*Math.PI/180||0,i.attr(r),i.updateTransform(),i}function p4(e,t,n,r,i,a){if(!e.dragging){var o=i.getModel(`checkpointStyle`),s=r.dataToCoord(i.getData().get(`value`,n));if(a||!o.get(`animation`,!0))e.attr({x:s,y:0}),t&&t.attr({shape:{x2:s}});else{var c={duration:o.get(`animationDuration`,!0),easing:o.get(`animationEasing`,!0)};e.stopAnimation(null,!0),e.animateTo({x:s,y:0},c),t&&t.animateTo({shape:{x2:s}},c)}}}function m4(e){e.registerAction({type:`timelineChange`,event:`timelineChanged`,update:`prepareAndUpdate`},function(e,t,n){var r=t.getComponent(`timeline`);return r&&e.currentIndex!=null&&(r.setCurrentIndex(e.currentIndex),!r.get(`loop`,!0)&&r.isIndexMax()&&r.getPlayState()&&(r.setPlayState(!1),n.dispatchAction({type:`timelinePlayChange`,playState:!1,from:e.from}))),t.resetOption(`timeline`,{replaceMerge:r.get(`replaceMerge`,!0)}),I({currentIndex:r.option.currentIndex},e)}),e.registerAction({type:`timelinePlayChange`,event:`timelinePlayChanged`,update:`update`},function(e,t){var n=t.getComponent(`timeline`);n&&e.playState!=null&&n.setPlayState(e.playState)})}function h4(e){var t=e&&e.timeline;B(t)||(t=t?[t]:[]),L(t,function(e){e&&g4(e)})}function g4(e){var t=e.type,n={number:`value`,time:`time`};if(n[t]&&(e.axisType=n[t],delete e.type),_4(e),v4(e,`controlPosition`)){var r=e.controlStyle||={};v4(r,`position`)||(r.position=e.controlPosition),r.position===`none`&&!v4(r,`show`)&&(r.show=!1,delete r.position),delete e.controlPosition}L(e.data||[],function(e){U(e)&&!B(e)&&(!v4(e,`value`)&&v4(e,`name`)&&(e.value=e.name),_4(e))})}function _4(e){var t=e.itemStyle||={},n=t.emphasis||={},r=e.label||e.label||{},i=r.normal||={},a={normal:1,emphasis:1};L(r,function(e,t){!a[t]&&!v4(i,t)&&(i[t]=e)}),n.label&&!v4(r,`emphasis`)&&(r.emphasis=n.label,delete n.label)}function v4(e,t){return e.hasOwnProperty(t)}function y4(e){e.registerComponentModel(r4),e.registerComponentView(c4),e.registerSubTypeDefaulter(`timeline`,function(){return`slider`}),m4(e),e.registerPreprocessor(h4)}function b4(e,t){if(!e)return!1;for(var n=B(e)?e:[e],r=0;r<n.length;r++)if(n[r]&&n[r][t])return!0;return!1}function x4(e){em(e,`label`,[`show`])}var S4=Cm(),C4=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.createdBySelf=!1,n.preventAutoZ=!0,n}return t.prototype.init=function(e,t,n){if(process.env.NODE_ENV!==`production`&&this.type===`marker`)throw Error(`Marker component is abstract component. Use markLine, markPoint, markArea instead.`);this.mergeDefaultAndTheme(e,n),this._mergeOption(e,n,!1,!0)},t.prototype.isAnimationEnabled=function(){if(fs.node)return!1;var e=this.__hostSeries;return this.getShallow(`animation`)&&e&&e.isAnimationEnabled()},t.prototype.mergeOption=function(e,t){this._mergeOption(e,t,!1,!1)},t.prototype._mergeOption=function(e,t,n,r){var i=this.mainType;n||t.eachSeries(function(e){var n=e.get(this.mainType,!0),a=S4(e)[i];if(!n||!n.data){S4(e)[i]=null;return}a?a._mergeOption(n,t,!0):(r&&x4(n),L(n.data,function(e){e instanceof Array?(x4(e[0]),x4(e[1])):x4(e)}),a=this.createMarkerModelFromSeries(n,this,t),F(a,{mainType:this.mainType,seriesIndex:e.seriesIndex,name:e.name,createdBySelf:!0}),a.__hostSeries=e),S4(e)[i]=a},this)},t.prototype.formatTooltip=function(e,t,n){var r=this.getData(),i=this.getRawValue(e),a=r.getName(e);return zT(`section`,{header:this.name,blocks:[zT(`nameValue`,{name:a,value:i,noName:!a,noValue:i==null})]})},t.prototype.getData=function(){return this._data},t.prototype.setData=function(e){this._data=e},t.prototype.getDataParams=function(e,t){var n=Jw.prototype.getDataParams.call(this,e,t),r=this.__hostSeries;return r&&(n.seriesId=r.id,n.seriesName=r.name,n.seriesType=r.subType),n},t.getMarkerModelFromSeries=function(e,t){return S4(e)[t]},t.type=`marker`,t.dependencies=[`series`,`grid`,`polar`,`geo`],t}(GS);Ms(C4,Jw.prototype);var w4=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.createMarkerModelFromSeries=function(e,n,r){return new t(e,n,r)},t.type=`markPoint`,t.defaultOption={z:5,symbol:`pin`,symbolSize:50,tooltip:{trigger:`item`},label:{show:!0,position:`inside`},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},t}(C4);function T4(e){return!(isNaN(parseFloat(e.x))&&isNaN(parseFloat(e.y)))}function E4(e){return!isNaN(parseFloat(e.x))&&!isNaN(parseFloat(e.y))}function D4(e,t,n,r,i,a,o){var s=[],c=xA(t,i)?t.getCalculationInfo(`stackResultDimension`):i,l=F4(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=Ep(t.get(i,u));return f=Math.min(f,20),f>=0&&(s[o]=+s[o].toFixed(f)),[s,d]}var O4={min:Rs(D4,`min`),max:Rs(D4,`max`),average:Rs(D4,`average`),median:Rs(D4,`median`)};function k4(e,t){if(t){var n=e.getData(),r=e.coordinateSystem,i=r&&r.dimensions;if(!E4(t)&&!B(t.coord)&&B(i)){var a=A4(t,n,r,e);if(t=P(t),t.type&&O4[t.type]&&a.baseAxis&&a.valueAxis){var o=js(i,a.baseAxis.dim),s=js(i,a.valueAxis.dim),c=O4[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||!B(i)){t.coord=[];var l=e.getBaseAxis();if(l&&t.type&&O4[t.type]){var u=r.getOtherAxis(l);u&&(t.value=F4(n,n.mapDimension(u.dim),t.type))}}else for(var d=t.coord,f=0;f<2;f++)O4[d[f]]&&(d[f]=F4(n,n.mapDimension(i[f]),d[f]));return t}}function A4(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(j4(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 j4(e,t){var n=e.getData().getDimensionInfo(t);return n&&n.coordDim}function M4(e,t){return e&&e.containData&&t.coord&&!T4(t)?e.containData(t.coord):!0}function N4(e,t,n){return e&&e.containZone&&t.coord&&n.coord&&!T4(t)&&!T4(n)?e.containZone(t.coord,n.coord):!0}function P4(e,t){return e?function(e,n,r,i){return $w(i<2?e.coord&&e.coord[i]:e.value,t[i])}:function(e,n,r,i){return $w(e.value,t[i])}}function F4(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`)]}var I4=Cm(),L4=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(){this.markerGroupMap=K()},t.prototype.render=function(e,t,n){var r=this,i=this.markerGroupMap;i.each(function(e){I4(e).keep=!1}),t.eachSeries(function(e){var i=C4.getMarkerModelFromSeries(e,r.type);i&&r.renderSeries(e,i,t,n)}),i.each(function(e){!I4(e).keep&&r.group.remove(e.group)}),R4(t,i,this.type)},t.prototype.markKeep=function(e){I4(e).keep=!0},t.prototype.toggleBlurSeries=function(e,t){var n=this;L(e,function(e){var r=C4.getMarkerModelFromSeries(e,n.type);r&&r.getData().eachItemGraphicEl(function(e){e&&(t?ev(e):tv(e))})})},t.type=`marker`,t}(hE);function R4(e,t,n){e.eachSeries(function(e){var r=C4.getMarkerModelFromSeries(e,n),i=t.get(e.id);if(r&&i&&i.group){var a=Ab(r),o=a.z,s=a.zlevel;Mb(i.group,o,s)}})}function z4(e,t,n){var r=t.coordinateSystem,i=n.getWidth(),a=n.getHeight(),o=r&&r.getArea&&r.getArea();e.each(function(n){var s=e.getItemModel(n),c=s.get(`relativeTo`)===`coordinate`,l=c?o?o.width:0:i,u=c?o?o.height:0:a,d=c&&o?o.x:0,f=c&&o?o.y:0,p,m=X(s.get(`x`),l)+d,h=X(s.get(`y`),u)+f;if(!isNaN(m)&&!isNaN(h))p=[m,h];else if(t.getMarkerPosition)p=t.getMarkerPosition(e.getValues(e.dimensions,n));else if(r){var g=e.get(r.dimensions[0],n),_=e.get(r.dimensions[1],n);p=r.dataToPoint([g,_])}isNaN(m)||(p[0]=m),isNaN(h)||(p[1]=h),e.setItemLayout(n,p)})}var B4=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=C4.getMarkerModelFromSeries(e,`markPoint`);t&&(z4(t.getData(),e,n),this.markerGroupMap.get(e.id).updateLayout())},this)},t.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 yF),l=V4(i,e,t);t.setData(l),z4(t.getData(),e,r),l.each(function(e){var n=l.getItemModel(e),r=n.getShallow(`symbol`),i=n.getShallow(`symbolSize`),a=n.getShallow(`symbolRotate`),s=n.getShallow(`symbolOffset`),c=n.getShallow(`symbolKeepAspect`);if(V(r)||V(i)||V(a)||V(s)){var u=t.getRawValue(e),d=t.getDataParams(e);V(r)&&(r=r(u,d)),V(i)&&(i=i(u,d)),V(a)&&(a=a(u,d)),V(s)&&(s=s(u,d))}var f=n.getModel(`itemStyle`).getItemStyle(),p=n.get(`z2`),m=XE(o,`color`);f.fill||=m,l.setItemVisual(e,{z2:W(p,0),symbol:r,symbolSize:i,symbolRotate:a,symbolOffset:s,symbolKeepAspect:c,style:f})}),c.updateData(l),this.group.add(c.group),l.eachItemGraphicEl(function(e){e.traverse(function(e){y_(e).dataModel=t})}),this.markKeep(c),c.group.silent=t.get(`silent`)||e.get(`silent`)},t.type=`markPoint`,t}(L4);function V4(e,t,n){var r=e?R(e&&e.dimensions,function(e){return F(F({},t.getData().getDimensionInfo(t.getData().mapDimension(e))||{}),{name:e,ordinalMeta:null})}):[{name:`value`,type:`float`}],i=new uA(r,n),a=R(n.get(`data`),Rs(k4,t));e&&(a=Fs(a,Rs(M4,e)));var o=P4(!!e,r);return i.initData(a,null,o),i}function H4(e){e.registerComponentModel(w4),e.registerComponentView(B4),e.registerPreprocessor(function(e){b4(e.series,`markPoint`)&&(e.markPoint=e.markPoint||{})})}var U4=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.createMarkerModelFromSeries=function(e,n,r){return new t(e,n,r)},t.type=`markLine`,t.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`},t}(C4),W4=Cm(),G4=function(e,t,n,r){var i=e.getData(),a;if(B(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=qs(r.yAxis,r.xAxis);else{var l=A4(r,i,t,e);s=l.valueAxis,c=F4(i,SA(i,l.valueDataDim),o)}var u=s.dim===`x`?0:1,d=1-u,f=P(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&&Bs(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 process.env.NODE_ENV!==`production`&&Os(`Invalid markLine data.`),a=[]}var h=[k4(e,a[0]),k4(e,a[1]),F({},a[2])];return h[2].type=h[2].type||null,ks(h[2],h[0]),ks(h[2],h[1]),h};function K4(e){return!isNaN(e)&&!isFinite(e)}function q4(e,t,n,r){var i=1-e,a=r.dimensions[e];return K4(t[i])&&K4(n[i])&&t[e]===n[e]&&r.getAxis(a).containData(t[e])}function J4(e,t){if(e.type===`cartesian2d`){var n=t[0].coord,r=t[1].coord;if(n&&r&&(q4(1,n,r,e)||q4(0,n,r,e)))return!0}return M4(e,t[0])&&M4(e,t[1])}function Y4(e,t,n,r,i){var a=r.coordinateSystem,o=e.getItemModel(t),s,c=X(o.get(`x`),i.getWidth()),l=X(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(jF(a,`cartesian2d`)){var p=a.getAxis(`x`),m=a.getAxis(`y`),u=a.dimensions;K4(e.get(u[0],t))?s[0]=p.toGlobalCoord(p.getExtent()[+!n]):K4(e.get(u[1],t))&&(s[1]=m.toGlobalCoord(m.getExtent()[+!n]))}isNaN(c)||(s[0]=c),isNaN(l)||(s[1]=l)}e.setItemLayout(t,s)}var X4=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=C4.getMarkerModelFromSeries(e,`markLine`);if(t){var r=t.getData(),i=W4(t).from,a=W4(t).to;i.each(function(t){Y4(i,t,!0,e,n),Y4(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)},t.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 MU);this.group.add(c.group);var l=Z4(i,e,t),u=l.from,d=l.to,f=l.line;W4(t).from=u,W4(t).to=d,t.setData(f);var p=t.get(`symbol`),m=t.get(`symbolSize`),h=t.get(`symbolRotate`),g=t.get(`symbolOffset`);B(p)||(p=[p,p]),B(m)||(m=[m,m]),B(h)||(h=[h,h]),B(g)||(g=[g,g]),l.from.each(function(e){_(u,e,!0),_(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??=u.getItemVisual(e,`style`).fill,f.setItemVisual(e,{z2:W(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 _(t,n,i){var a=t.getItemModel(n);Y4(t,n,i,e,r);var s=a.getModel(`itemStyle`).getItemStyle();s.fill??=XE(o,`color`),t.setItemVisual(n,{symbolKeepAspect:a.get(`symbolKeepAspect`),symbolOffset:W(a.get(`symbolOffset`,!0),g[+!i]),symbolRotate:W(a.get(`symbolRotate`,!0),h[+!i]),symbolSize:W(a.get(`symbolSize`),m[+!i]),symbol:W(a.get(`symbol`,!0),p[+!i]),style:s})}this.markKeep(c),c.group.silent=t.get(`silent`)||e.get(`silent`)},t.type=`markLine`,t}(L4);function Z4(e,t,n){var r=e?R(e&&e.dimensions,function(e){return F(F({},t.getData().getDimensionInfo(t.getData().mapDimension(e))||{}),{name:e,ordinalMeta:null})}):[{name:`value`,type:`float`}],i=new uA(r,n),a=new uA(r,n),o=new uA([],n),s=R(n.get(`data`),Rs(G4,t,e,n));e&&(s=Fs(s,Rs(J4,e)));var c=P4(!!e,r);return i.initData(R(s,function(e){return e[0]}),null,c),a.initData(R(s,function(e){return e[1]}),null,c),o.initData(R(s,function(e){return e[2]})),o.hasItemOption=!0,{from:i,to:a,line:o}}function Q4(e){e.registerComponentModel(U4),e.registerComponentView(X4),e.registerPreprocessor(function(e){b4(e.series,`markLine`)&&(e.markLine=e.markLine||{})})}var $4=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.createMarkerModelFromSeries=function(e,n,r){return new t(e,n,r)},t.type=`markArea`,t.defaultOption={z:1,tooltip:{trigger:`item`},animation:!1,label:{show:!0,position:`top`},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:`top`}}},t}(C4),e3=Cm(),t3=function(e,t,n,r){var i=r[0],a=r[1];if(!(!i||!a)){var o=k4(e,i),s=k4(e,a),c=o.coord,l=s.coord;c[0]=qs(c[0],-1/0),c[1]=qs(c[1],-1/0),l[0]=qs(l[0],1/0),l[1]=qs(l[1],1/0);var u=As([{},o,s]);return u.coord=[o.coord,s.coord],u.x0=o.x,u.y0=o.y,u.x1=s.x,u.y1=s.y,u}};function n3(e){return!isNaN(e)&&!isFinite(e)}function r3(e,t,n,r){var i=1-e;return n3(t[i])&&n3(n[i])}function i3(e,t){var n=t.coord[0],r=t.coord[1],i={coord:n,x:t.x0,y:t.y0},a={coord:r,x:t.x1,y:t.y1};return jF(e,`cartesian2d`)?n&&r&&(r3(1,n,r,e)||r3(0,n,r,e))?!0:N4(e,i,a):M4(e,i)||M4(e,a)}function a3(e,t,n,r,i){var a=r.coordinateSystem,o=e.getItemModel(t),s,c=X(o.get(n[0]),i.getWidth()),l=X(o.get(n[1]),i.getHeight());if(!isNaN(c)&&!isNaN(l))s=[c,l];else{if(r.getMarkerPosition){var u=e.getValues([`x0`,`y0`],t),d=e.getValues([`x1`,`y1`],t),f=a.clampData(u),p=a.clampData(d),m=[];n[0]===`x0`?m[0]=f[0]>p[0]?d[0]:u[0]:m[0]=f[0]>p[0]?u[0]:d[0],n[1]===`y0`?m[1]=f[1]>p[1]?d[1]:u[1]:m[1]=f[1]>p[1]?u[1]:d[1],s=r.getMarkerPosition(m,n,!0)}else{var h=e.get(n[0],t),g=e.get(n[1],t),_=[h,g];a.clampData&&a.clampData(_,_),s=a.dataToPoint(_,!0)}if(jF(a,`cartesian2d`)){var v=a.getAxis(`x`),y=a.getAxis(`y`),h=e.get(n[0],t),g=e.get(n[1],t);n3(h)?s[0]=v.toGlobalCoord(v.getExtent()[n[0]===`x0`?0:1]):n3(g)&&(s[1]=y.toGlobalCoord(y.getExtent()[n[1]===`y0`?0:1]))}isNaN(c)||(s[0]=c),isNaN(l)||(s[1]=l)}return s}var o3=[[`x0`,`y0`],[`x1`,`y0`],[`x1`,`y1`],[`x0`,`y1`]],s3=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=C4.getMarkerModelFromSeries(e,`markArea`);if(t){var r=t.getData();r.each(function(t){var i=R(o3,function(i){return a3(r,t,i,e,n)});r.setItemLayout(t,i),r.getItemGraphicEl(t).setShape(`points`,i)})}},this)},t.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,{group:new Y});this.group.add(c.group),this.markKeep(c);var l=c3(i,e,t);t.setData(l),l.each(function(t){var n=R(o3,function(n){return a3(l,t,n,e,r)}),a=i.getAxis(`x`).scale,s=i.getAxis(`y`).scale,c=a.getExtent(),u=s.getExtent(),d=[a.parse(l.get(`x0`,t)),a.parse(l.get(`x1`,t))],f=[s.parse(l.get(`y0`,t)),s.parse(l.get(`y1`,t))];Tp(d),Tp(f);var p=c[0]>d[1]||c[1]<d[0]||u[0]>f[1]||u[1]<f[0];l.setItemLayout(t,{points:n,allClipped:p});var m=l.getItemModel(t),h=m.getModel(`itemStyle`).getItemStyle(),g=m.get(`z2`),_=XE(o,`color`);h.fill||(h.fill=_,H(h.fill)&&(h.fill=ed(h.fill,.4))),h.stroke||=_,l.setItemVisual(t,`style`,h),l.setItemVisual(t,`z2`,W(g,0))}),l.diff(e3(c).data).add(function(e){var t=l.getItemLayout(e),n=l.getItemVisual(e,`z2`);if(!t.allClipped){var r=new Sy({z2:W(n,0),shape:{points:t.points}});l.setItemGraphicEl(e,r),c.group.add(r)}}).update(function(e,n){var r=e3(c).data.getItemGraphicEl(n),i=l.getItemLayout(e),a=l.getItemVisual(e,`z2`);i.allClipped?r&&c.group.remove(r):(r?Wy(r,{z2:W(a,0),shape:{points:i.points}},t,e):r=new Sy({shape:{points:i.points}}),l.setItemGraphicEl(e,r),c.group.add(r))}).remove(function(e){var t=e3(c).data.getItemGraphicEl(e);c.group.remove(t)}).execute(),l.eachItemGraphicEl(function(e,n){var r=l.getItemModel(n),i=l.getItemVisual(n,`style`);e.useStyle(l.getItemVisual(n,`style`)),Lb(e,Rb(r),{labelFetcher:t,labelDataIndex:n,defaultText:l.getName(n)||``,inheritColor:H(i.fill)?ed(i.fill,1):Z.color.neutral99}),xv(e,r),_v(e,null,null,r.get([`emphasis`,`disabled`])),y_(e).dataModel=t}),e3(c).data=l,c.group.silent=t.get(`silent`)||e.get(`silent`)},t.type=`markArea`,t}(L4);function c3(e,t,n){var r,i,a=[`x0`,`y0`,`x1`,`y1`];if(e){var o=R(e&&e.dimensions,function(e){var n=t.getData();return F(F({},n.getDimensionInfo(n.mapDimension(e))||{}),{name:e,ordinalMeta:null})});i=R(a,function(e,t){return{name:e,type:o[t%2].type}}),r=new uA(i,n)}else i=[{name:`value`,type:`float`}],r=new uA(i,n);var s=R(n.get(`data`),Rs(t3,t,e,n));e&&(s=Fs(s,Rs(i3,e)));var c=e?function(e,t,n,r){var a=e.coord[Math.floor(r/2)][r%2];return $w(a,i[r])}:function(e,t,n,r){return $w(e.value,i[r])};return r.initData(s,null,c),r.hasItemOption=!0,r}function l3(e){e.registerComponentModel($4),e.registerComponentView(s3),e.registerPreprocessor(function(e){b4(e.series,`markArea`)&&(e.markArea=e.markArea||{})})}var u3=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`])}},d3=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:`box`,ignoreSize:!0},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},t.prototype._updateSelector=function(e){var t=e.selector,n=this.ecModel;t===!0&&(t=e.selector=[`all`,`inverse`]),B(t)&&L(t,function(e,r){H(e)&&(e={type:e}),t[r]=ks(e,u3(n,e.type))})},t.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`))}},t.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&&gm(r)&&t.push(r.name)}),this._availableNames=n;var r=this.get(`data`)||t,i=K();this._data=Fs(R(r,function(e){return(H(e)||Bs(e))&&(e={name:e}),i.get(e.name)?null:(i.set(e.name,!0),new ex(e,this,this.ecModel))},this),function(e){return!!e})},t.prototype.getData=function(){return this._data},t.prototype.select=function(e){var t=this.option.selected;if(this.get(`selectedMode`)===`single`){var n=this._data;L(n,function(e){t[e.get(`name`)]=!1})}t[e]=!0},t.prototype.unSelect=function(e){this.get(`selectedMode`)!==`single`&&(this.option.selected[e]=!1)},t.prototype.toggleSelected=function(e){var t=this.option.selected;t.hasOwnProperty(e)||(t[e]=!0),this[t[e]?`unSelect`:`select`](e)},t.prototype.allSelect=function(){var e=this._data,t=this.option.selected;L(e,function(e){t[e.get(`name`,!0)]=!0})},t.prototype.inverseSelect=function(){var e=this._data,t=this.option.selected;L(e,function(e){var n=e.get(`name`,!0);t.hasOwnProperty(n)||(t[n]=!0),t[n]=!t[n]})},t.prototype.isSelected=function(e){var t=this.option.selected;return!(t.hasOwnProperty(e)&&!t[e])&&js(this._availableNames,e)>=0},t.prototype.getOrient=function(){return this.get(`orient`)===`vertical`?{index:1,name:`vertical`}:{index:0,name:`horizontal`}},t.type=`legend.plain`,t.dependencies=[`series`],t.defaultOption={z:4,show:!0,orient:`horizontal`,left:`center`,bottom:Z.size.m,align:`auto`,backgroundColor:Z.color.transparent,borderColor:Z.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:`inherit`,symbolKeepAspect:!0,inactiveColor:Z.color.disabled,inactiveBorderColor:Z.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:Z.color.disabled,inactiveWidth:2,opacity:`inherit`,type:`inherit`,cap:`inherit`,join:`inherit`,dashOffset:`inherit`,miterLimit:`inherit`},textStyle:{color:Z.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:`sans-serif`,color:Z.color.tertiary,borderWidth:1,borderColor:Z.color.border},emphasis:{selectorLabel:{show:!0,color:Z.color.quaternary}},selectorPosition:`auto`,selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t}(GS),f3=Rs,p3=L,m3=Y,h3=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return t.prototype.init=function(){this.group.add(this._contentGroup=new m3),this.group.add(this._selectorGroup=new m3),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.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=LS(e,n).refContainer,l=e.getBoxLayoutParams(),u=e.get(`padding`),d=PS(l,c,u),f=this.layoutInner(e,i,d,r,o,s),p=PS(I({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=J1(f,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,r,i,a,o){var s=this.getContentGroup(),c=K(),l=t.get(`selectedMode`),u=t.get(`triggerEvent`),d=[];n.eachRawSeries(function(e){!e.get(`legendHoverLink`)&&d.push(e.id)}),p3(t.getData(),function(i,a){var o=this,f=i.get(`name`);if(!this.newlineDisabled&&(f===``||f===`
|
|
88
|
-
`)){var p=new m3;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`,f3(v3,f,null,r,d)).on(`mouseover`,f3(b3,m.name,null,r,d)).on(`mouseout`,f3(x3,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`),_=qu(h.fill);_&&_[3]===0&&(_[3]=.2,h=F(F({},h),{fill:td(_,`rgba`)}));var v=this._createItem(o,f,a,i,t,e,{},h,g,l,r);v.on(`click`,f3(v3,null,f,r,d)).on(`mouseover`,f3(b3,null,f,r,d)).on(`mouseout`,f3(x3,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);process.env.NODE_ENV!==`production`&&(c.get(f)||console.warn(f+` series not exists. Legend data should be same with series name or data name.`))}},this),i&&this._createSelector(i,t,r,a,o)},t.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},t.prototype._createSelector=function(e,t,n,r,i){var a=this.getSelectorGroup();p3(e,function(e){var r=e.type,i=new a_({style:{x:0,y:0,align:`center`,verticalAlign:`middle`},onclick:function(){n.dispatchAction({type:r===`all`?`legendAllSelect`:`legendInverseSelect`,legendId:t.id})}});a.add(i),Lb(i,{normal:t.getModel(`selectorLabel`),emphasis:t.getModel([`emphasis`,`selectorLabel`])},{defaultText:e.title}),hv(i)})},t.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=g3(c,r,o,s,d,m,u),y=new m3,b=r.getModel(`textStyle`);if(V(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(_3({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;H(w)&&w?T=w.replace(`{name}`,t??``):V(w)&&(T=w(t));var E=m?b.getTextColor():r.get(`inactiveColor`);y.add(new a_({style:zb(b,{text:T,x:S,y:p/2,fill:E,align:C,verticalAlign:`middle`},{inheritColor:E})}));var D=new e_({shape:y.getBoundingRect(),style:{fill:`transparent`}}),O=r.getModel(`tooltip`);return O.get(`show`)&&Cb({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),hv(y),y.__legendDataIndex=n,y},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getContentGroup(),s=this.getSelectorGroup();AS(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){AS(`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()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type=`legend.plain`,t}(hE);function g3(e,t,n,r,i,a,o){function s(e,t){e.lineWidth===`auto`&&(e.lineWidth=t.lineWidth>0?2:0),p3(e,function(n,r){e[r]===`inherit`&&(e[r]=t[r])})}var c=t.getModel(`itemStyle`),l=c.getItemStyle(),u=e.lastIndexOf(`empty`,0)===0?`fill`:`stroke`,d=c.getShallow(`decal`);l.decal=!d||d===`inherit`?r.decal:VD(d,o),l.fill===`inherit`&&(l.fill=r[i]),l.stroke===`inherit`&&(l.stroke=r[u]),l.opacity===`inherit`&&(l.opacity=(i===`fill`?r:n).opacity),s(l,r);var f=t.getModel(`lineStyle`),p=f.getLineStyle();if(s(p,n),l.fill===`auto`&&(l.fill=r.fill),l.stroke===`auto`&&(l.stroke=r.fill),p.stroke===`auto`&&(p.stroke=r.fill),!a){var m=t.get(`inactiveBorderWidth`),h=l[u];l.lineWidth=m===`auto`?r.lineWidth>0&&h?2:0:l.lineWidth,l.fill=t.get(`inactiveColor`),l.stroke=t.get(`inactiveBorderColor`),p.stroke=f.get(`inactiveColor`),p.lineWidth=f.get(`inactiveWidth`)}return{itemStyle:l,lineStyle:p}}function _3(e){var t=e.icon||`roundRect`,n=nD(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=Z.color.neutral00,n.style.lineWidth=2),n}function v3(e,t,n,r){x3(e,t,n,r),n.dispatchAction({type:`legendToggleSelect`,name:e??t}),b3(e,t,n,r)}function y3(e){for(var t=e.getZr().storage.getDisplayList(),n,r=0,i=t.length;r<i&&!(n=t[r].states.emphasis);)r++;return n&&n.hoverLayer}function b3(e,t,n,r){y3(n)||n.dispatchAction({type:`highlight`,seriesName:e,name:t,excludeSeriesId:r})}function x3(e,t,n,r){y3(n)||n.dispatchAction({type:`downplay`,seriesName:e,name:t,excludeSeriesId:r})}function S3(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 C3(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),w3(n,i),a.push(n.componentIndex)});var o={};return n.eachComponent(`legend`,function(e){L(i,function(t,n){e[t?`select`:`unSelect`](n)}),w3(e,o)}),r?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function w3(e,t){var n=t||{};return L(e.getData(),function(t){var r=t.get(`name`);if(!(r===`
|
|
89
|
-
`||r===``)){var i=e.isSelected(r);q(n,r)?n[r]=n[r]&&i:n[r]=i}}),n}function T3(e){e.registerAction(`legendToggleSelect`,`legendselectchanged`,Rs(C3,`toggleSelected`)),e.registerAction(`legendAllSelect`,`legendselectall`,Rs(C3,`allSelect`)),e.registerAction(`legendInverseSelect`,`legendinverseselect`,Rs(C3,`inverseSelect`)),e.registerAction(`legendSelect`,`legendselected`,Rs(C3,`select`)),e.registerAction(`legendUnSelect`,`legendunselected`,Rs(C3,`unSelect`))}function E3(e){e.registerComponentModel(d3),e.registerComponentView(h3),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,S3),e.registerSubTypeDefaulter(`legend`,function(){return`plain`}),T3(e)}var D3=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(t,n,r){var i=HS(t);e.prototype.init.call(this,t,n,r),O3(this,t,i)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),O3(this,this.option,t)},t.type=`legend.scroll`,t.defaultOption=ax(d3.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:Z.color.accent50,pageIconInactiveColor:Z.color.accent10,pageIconSize:15,pageTextStyle:{color:Z.color.tertiary},animationDurationUpdate:800}),t}(d3);function O3(e,t,n){var r=e.getOrient(),i=[1,1];i[r.index]=0,VS(t,n,{type:`box`,ignoreSize:!!i})}var k3=Y,A3=[`width`,`height`],j3=[`x`,`y`],M3=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!0,n._currentIndex=0,n}return t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new k3),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new k3)},t.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.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=B(u)?u:[u,u];p(`pagePrev`,0);var f=n.getModel(`pageTextStyle`);l.add(new a_({name:`pageText`,style:{text:`xx/xx`,fill:f.getTextColor(),font:f.getFont(),verticalAlign:`middle`,align:`center`},silent:!0})),p(`pageNext`,1);function p(e,t){var r=e+`DataIndex`,a=gb(n.get(`pageIcons`,!0)[n.getOrient().name][t],{onclick:z(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)}},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getSelectorGroup(),s=e.getOrient().index,c=A3[s],l=j3[s],u=A3[1-s],d=j3[1-s];i&&AS(`horizontal`,o,e.get(`selectorItemGap`,!0));var f=e.get(`selectorButtonGap`,!0),p=o.getBoundingRect(),m=[-p.x,-p.y],h=P(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},t.prototype._layoutContentAndController=function(e,t,n,r,i,a,o,s){var c=this.getContentGroup(),l=this._containerGroup,u=this._controllerGroup;AS(e.get(`orient`),c,e.get(`itemGap`),r?n.width:null,r?null:n.height),AS(`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],_=W(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 e_({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&&Wy(c,{x:b.contentPosition[0],y:b.contentPosition[1]},p?e:null),this._updatePageInfoView(e,b),v},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];r!=null&&n.dispatchAction({type:`legendScroll`,scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;L([`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`,H(i)?i.replace(`{current}`,o==null?``:o+``).replace(`{total}`,s==null?``:s+``):i({current:o,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get(`scrollDataIndex`,!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,a=A3[i],o=j3[i],s=this._findTargetItemIndex(t),c=n.children(),l=c[s],u=c.length,d=+!!u,f={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!l)return f;var p=v(l);f.contentPosition[i]=-p.s;for(var m=s+1,h=p,g=p,_=null;m<=u;++m)_=v(c[m]),(!_&&g.e>h.s+r||_&&!y(_,h.s))&&(h=g.i>h.i?g:_,h&&(f.pageNextDataIndex??=h.i,++f.pageCount)),g=_;for(var m=s-1,h=p,g=p,_=null;m>=-1;--m)_=v(c[m]),(!_||!y(g,_.s))&&h.i<g.i&&(g=h,f.pagePrevDataIndex??=h.i,++f.pageCount,++f.pageIndex),h=_;return f;function v(e){if(e){var t=e.getBoundingRect(),n=t[o]+e[o];return{s:n,e:n+t[a],i:e.__legendDataIndex}}}function y(e,t){return e.e>=t&&e.s<=t+r}},t.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},t.type=`legend.scroll`,t}(h3);function N3(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 P3(e){Nk(E3),e.registerComponentModel(D3),e.registerComponentView(M3),N3(e)}function F3(e){Nk(E3),Nk(P3)}var I3=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`dataZoom.inside`,t.defaultOption=ax(k1.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(k1),L3=Cm();function R3(e,t,n){L3(e).coordSysRecordMap.each(function(e){var r=e.dataZoomInfoMap.get(t.uid);r&&(r.getRange=n)})}function z3(e,t){for(var n=L3(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||B3(n,o))}}}function B3(e,t){if(t){e.removeKey(t.model.uid);var n=t.controller;n&&n.dispose()}}function V3(e,t){var n={model:t,containsPoint:Rs(U3,t),dispatchAction:Rs(H3,e),dataZoomInfoMap:null,controller:null},r=n.controller=new IR(e.getZr());return L([`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 H3(e,t){e.isDisposed()||e.dispatchAction({type:`dataZoom`,animation:{easing:`cubicOut`,duration:100},batch:t})}function U3(e,t,n,r){return e.coordinateSystem.containPoint([n,r])}function W3(e,t,n){var r,i=`type_`,a={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0;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&&=t.get(`preventDefaultMouseMove`,!0)}),{controlType:r,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:n,zInfo:{component:t.model},triggerInfo:{roamTrigger:null,isInSelf:t.containsPoint}}}}function G3(e){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,function(e,t){var n=L3(t),r=n.coordSysRecordMap||=K();r.each(function(e){e.dataZoomInfoMap=null}),e.eachComponent({mainType:`dataZoom`,subType:`inside`},function(e){L(D1(e).infoList,function(n){var i=n.model.uid,a=r.get(i)||r.set(i,V3(t,n.model));(a.dataZoomInfoMap||=K()).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){B3(r,e);return}var s=W3(a,e,t);n.enable(s.controlType,s.opt),kE(e,`dispatchAction`,i.model.get(`throttle`,!0),`fixRate`)})})}var K3=function(e){N(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`dataZoom.inside`,t}return t.prototype.render=function(t,n,r){if(e.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),R3(r,t,{pan:z(q3.pan,this),zoom:z(q3.zoom,this),scrollMove:z(q3.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){z3(this.api,this.dataZoomModel),this.range=null},t.type=`dataZoom.inside`,t}(M1),q3={zoom:function(e,t,n,r){var i=this.range,a=i.slice(),o=e.axisModels[0];if(o){var s=Y3[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(ZW(0,a,[0,100],0,u.minSpan,u.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:J3(function(e,t,n,r,i,a){var o=Y3[r]([a.oldX,a.oldY],[a.newX,a.newY],t,i,n);return o.signal*(e[1]-e[0])*o.pixel/o.pixelLength}),scrollMove:J3(function(e,t,n,r,i,a){return Y3[r]([0,0],[a.scrollDelta,a.scrollDelta],t,i,n).signal*(e[1]-e[0])*a.scrollDelta})};function J3(e){return function(t,n,r,i){var a=this.range,o=a.slice(),s=t.axisModels[0];if(s&&(ZW(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 Y3={grid:function(e,t,n,r,i){var a=n.axis,o={},s=i.model.coordinateSystem.getRect();return 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||=[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 X3(e){V1(e),e.registerComponentModel(I3),e.registerComponentView(K3),G3(e)}var Z3=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`dataZoom.slider`,t.layoutMode=`box`,t.defaultOption=ax(k1.defaultOption,{show:!0,right:`ph`,top:`ph`,width:`ph`,height:`ph`,left:null,bottom:null,borderColor:Z.color.accent10,borderRadius:0,backgroundColor:Z.color.transparent,dataBackground:{lineStyle:{color:Z.color.accent30,width:.5},areaStyle:{color:Z.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:Z.color.accent40,width:.5},areaStyle:{color:Z.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:Z.color.neutral00,borderColor:Z.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:Z.color.accent40,opacity:.5},showDetail:!0,showDataShadow:`auto`,realtime:!0,zoomLock:!1,textStyle:{color:Z.color.tertiary},brushSelect:!0,brushStyle:{color:Z.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:Z.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),t}(k1),Q3=e_,$3=1,e6=30,t6=7,n6=`horizontal`,r6=`vertical`,i6=5,a6=[`line`,`bar`,`candlestick`,`scatter`],o6={easing:`cubicOut`,duration:100,delay:0},s6=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._displayables={},n}return t.prototype.init=function(e,t){this.api=t,this._onBrush=z(this._onBrush,this),this._onBrushEnd=z(this._onBrushEnd,this)},t.prototype.render=function(t,n,r,i){if(e.prototype.render.apply(this,arguments),kE(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()},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){AE(this,`_dispatchZoomAction`);var e=this.api.getZr();e.off(`mousemove`,this._onBrush),e.off(`mouseup`,this._onBrushEnd)},t.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 Y;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(t),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,t=this.api,n=e.get(`brushSelect`)?t6:0,r=LS(e,t).refContainer,i=this._findCoordRect(),a=e.get(`defaultLocationEdgeGap`,!0)||0,o=this._orient===n6?{right:r.width-i.x-i.width,top:r.height-e6-a-n,width:i.width,height:e6}:{right:a,top:i.y,width:e6,height:i.height},s=HS(e.option);L([`right`,`top`,`width`,`height`],function(e){s[e]===`ph`&&(s[e]=o[e])});var c=PS(s,r);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===r6&&this._size.reverse()},t.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===n6&&!i?{scaleY:o?1:-1,scaleX:1}:n===n6&&i?{scaleY:o?1:-1,scaleX:-1}:n===r6&&!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]);e.x=t.x-s.x,e.y=t.y-s.y,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,t=this._size,n=this._displayables.sliderGroup,r=e.get(`brushSelect`);n.add(new Q3({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get(`backgroundColor`)},z2:-40}));var i=new Q3({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:`transparent`},z2:0,onclick:z(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)},t.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:Sp(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 C(e){var t=S.getModel(e?`selectedDataBackground`:`dataBackground`),n=new Y,r=new Sy({shape:{points:s},segmentIgnoreThreshold:1,style:t.getModel(`areaStyle`).getAreaStyle(),silent:!0,z2:-20}),i=new Cy({shape:{points:c},segmentIgnoreThreshold:1,style:t.getModel(`lineStyle`).getLineStyle(),silent:!0,z2:-19});return n.add(r),n.add(i),n}for(var w=0;w<3;w++){var T=C(w===1);this._displayables.sliderGroup.add(T),this._displayables.dataShadowSegs.push(T)}},t.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){L(e.getAxisProxy(i,a).getTargetSeriesModels(),function(e){if(!n&&!(t!==!0&&js(a6,e.get(`type`))<0)){var o=r.getComponent(T1(i),a).axis,s=c6(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}},t.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 Q3({silent:l,style:{fill:o.get(`fillerColor`)},textConfig:{position:`inside`}});i.add(u),i.add(new Q3({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:$3,fill:Z.color.transparent}})),L([0,1],function(t){var a=o.get(`handleIcon`);!tD[a]&&a.indexOf(`path://`)<0&&a.indexOf(`image://`)<0&&(a=`path://`+a,process.env.NODE_ENV!==`production`&&Kp(`handleIcon now needs 'path://' prefix when using a path string`));var s=nD(a,-1,0,2,2,null,!0);s.attr({cursor:l6(this._orient),draggable:!0,drift:z(this._onDragMove,this,t),ondragend:z(this._onDragEnd,this),onmouseover:z(this._showDataInfo,this,!0),onmouseout:z(this._showDataInfo,this,!1),z2:5});var c=s.getBoundingRect();this._handleHeight=X(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(),hv(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 a_({silent:!0,invisible:!d,style:zb(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=X(o.get(`moveHandleSize`),a[1]),p=t.moveHandle=new e_({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=nD(o.get(`moveHandleIcon`),-m/2,-m/2,m,m,Z.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 e_({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:`default`,drift:z(this._onDragMove,this,`all`),ondragstart:z(this._showDataInfo,this,!0),ondragend:z(this._onDragEnd,this),onmouseover:z(this._showDataInfo,this,!0),onmouseout:z(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[Sp(e[0],[0,100],t,!0),Sp(e[1],[0,100],t,!0)]},t.prototype._updateInterval=function(e,t){var n=this.dataZoomModel,r=this._handleEnds,i=this._getViewExtent(),a=n.findRepresentativeAxisProxy().getMinMaxSpan(),o=[0,100];ZW(t,r,i,n.get(`zoomLock`)?`all`:e,a.minSpan==null?null:Sp(a.minSpan,o,i,!0),a.maxSpan==null?null:Sp(a.maxSpan,o,i,!0));var s=this._range,c=this._range=Tp([Sp(r[0],i,o,!0),Sp(r[1],i,o,!0)]);return!s||s[0]!==c[0]||s[1]!==c[1]},t.prototype._updateView=function(e){var t=this._displayables,n=this._handleEnds,r=Tp(n.slice()),i=this._size;L([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 e_,l.setClipPath(u)),u.setShape({x:s[c],y:0,width:s[c+1]-s[c],height:i[1]})}this._updateDataInfo(e)},t.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();if(o){var s=o.getAxisModel().axis,c=this._range,l=e?o.calculateDataWindow({start:c[0],end:c[1]}).valueWindow:o.getDataValueWindow();a=[this._formatLabel(l[0],s),this._formatLabel(l[1],s)]}}var u=Tp(this._handleEnds.slice());d.call(this,0),d.call(this,1);function d(e){var t=ub(n.handles[e].parent,this.group),o=fb(e===0?`right`:`left`,t),s=this._handleWidth/2+i6,c=db([u[e]+(e===0?-s:s),this._size[1]/2],t);r[e].setStyle({x:c[0],y:c[1],verticalAlign:i===n6?`middle`:o,align:i===n6?o:`center`,text:a[e]})}},t.prototype._formatLabel=function(e,t){var n=this.dataZoomModel,r=n.get(`labelFormatter`),i=n.get(`labelPrecision`);(i==null||i===`auto`)&&(i=t.getPixelPrecision());var a=e==null||isNaN(e)?``:t.type===`category`||t.type===`time`?t.scale.getLabel({value:Math.round(e)}):e.toFixed(Math.min(i,20));return V(r)?r(e,a):H(r)?r.replace(`{value}`,a):a},t.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)},t.prototype._onDragMove=function(e,t,n,r){this._dragging=!0,tl(r.event);var i=this._displayables.sliderGroup.getLocalTransform(),a=db([t,n],i,!0),o=this._updateInterval(e,a[0]),s=this.dataZoomModel.get(`realtime`);this._updateView(!s),o&&s&&this._dispatchZoomAction(!0)},t.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1),!this.dataZoomModel.get(`realtime`)&&this._dispatchZoomAction(!1)},t.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)}},t.prototype._onBrushStart=function(e){var t=e.offsetX,n=e.offsetY;this._brushStart=new J(t,n),this._brushing=!0,this._brushStartTime=+new Date},t.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();ZW(0,a,r,0,o.minSpan==null?null:Sp(o.minSpan,i,r,!0),o.maxSpan==null?null:Sp(o.maxSpan,i,r,!0)),this._range=Tp([Sp(a[0],r,i,!0),Sp(a[1],r,i,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(tl(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,t){var n=this._displayables,r=this.dataZoomModel,i=n.brushRect;i||(i=n.brushRect=new Q3({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]})},t.prototype._dispatchZoomAction=function(e){var t=this._range;this.api.dispatchAction({type:`dataZoom`,from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?o6:null,start:t[0],end:t[1]})},t.prototype._findCoordRect=function(){var e,t=D1(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},t.type=`dataZoom.slider`,t}(M1);function c6(e){return{x:`y`,y:`x`,radius:`angle`,angle:`radius`}[e]}function l6(e){return e===`vertical`?`ns-resize`:`ew-resize`}function u6(e){e.registerComponentModel(Z3),e.registerComponentView(s6),V1(e)}function d6(e){Nk(X3),Nk(u6)}var f6={get:function(e,t,n){var r=P((p6[e]||{})[t]);return n&&B(r)?r[r.length-1]:r}},p6={color:{active:[`#006edd`,`#e0ffff`],inactive:[Z.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:[`circle`,`roundRect`,`diamond`],inactive:[`none`]},symbolSize:{active:[10,50],inactive:[0,0]}},m6=ZV.mapVisual,h6=ZV.eachVisual,g6=B,_6=L,v6=Tp,y6=Sp,b6=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.stateList=[`inRange`,`outOfRange`],n.replacableOptionKeys=[`inRange`,`outOfRange`,`target`,`controller`,`color`],n.layoutMode={type:`box`,ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&k2(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel(`textStyle`),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var t=this.stateList;e=z(e,this),this.controllerVisuals=O2(this.option.controller,t,e),this.targetVisuals=O2(this.option.target,t,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this.option.seriesId,t=this.option.seriesIndex;t==null&&e==null&&(t=`all`);var n=km(this.ecModel,`series`,{index:t,id:e},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return R(n,function(e){return e.componentIndex})},t.prototype.eachTargetSeries=function(e,t){L(this.getTargetSeriesIndices(),function(n){var r=this.ecModel.getSeriesByIndex(n);r&&e.call(t,r)},this)},t.prototype.isTargetSeries=function(e){var t=!1;return this.eachTargetSeries(function(n){n===e&&(t=!0)}),t},t.prototype.formatValueText=function(e,t,n){var r=this.option,i=r.precision,a=this.dataBound,o=r.formatter,s;n||=[`<`,`>`],B(e)&&(e=e.slice(),s=!0);var c=t?e:s?[l(e[0]),l(e[1])]:l(e);if(H(o))return o.replace(`{value}`,s?c[0]:c).replace(`{value2}`,s?c[1]:c);if(V(o))return s?o(e[0],e[1]):o(e);if(s)return e[0]===a[0]?n[0]+` `+c[1]:e[1]===a[1]?n[1]+` `+c[0]:c[0]+` - `+c[1];return c;function l(e){return e===a[0]?`min`:e===a[1]?`max`:(+e).toFixed(Math.min(i,20))}},t.prototype.resetExtent=function(){var e=this.option;this._dataExtent=v6([e.min,e.max])},t.prototype.getDataDimensionIndex=function(e){var t=this.option.dimension;if(t!=null)return e.getDimensionIndex(t);for(var n=e.dimensions,r=n.length-1;r>=0;r--){var i=n[r],a=e.getDimensionInfo(i);if(!a.isCalculationCoord)return a.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,t=this.option,n={inRange:t.inRange,outOfRange:t.outOfRange},r=t.target||={},i=t.controller||={};ks(r,n),ks(i,n);var a=this.isCategory();o.call(this,r),o.call(this,i),s.call(this,r,`inRange`,`outOfRange`),c.call(this,i);function o(n){g6(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get(`gradientColor`)}}function s(e,t,n){var r=e[t],i=e[n];r&&!i&&(i=e[n]={},_6(r,function(e,t){if(ZV.isValidType(t)){var n=f6.get(t,`inactive`,a);n!=null&&(i[t]=n,t===`color`&&!i.hasOwnProperty(`opacity`)&&!i.hasOwnProperty(`colorAlpha`)&&(i.opacity=[0,0]))}}))}function c(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,r=this.get(`inactiveColor`),i=this.getItemSymbol()||`roundRect`;_6(this.stateList,function(o){var s=this.itemSize,c=e[o];c||=e[o]={color:a?r:[r]},c.symbol??=t&&P(t)||(a?i:[i]),c.symbolSize??=n&&P(n)||(a?s[0]:[s[0],s[0]]),c.symbol=m6(c.symbol,function(e){return e===`none`?i:e});var l=c.symbolSize;if(l!=null){var u=-1/0;h6(l,function(e){e>u&&(u=e)}),c.symbolSize=m6(l,function(e){return y6(e,[0,u],[0,s[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get(`itemWidth`)),parseFloat(this.get(`itemHeight`))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type=`visualMap`,t.dependencies=[`series`],t.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:`vertical`,backgroundColor:Z.color.transparent,borderColor:Z.color.borderTint,contentColor:Z.color.theme[0],inactiveColor:Z.color.disabled,borderWidth:0,padding:Z.size.m,textGap:10,precision:0,textStyle:{color:Z.color.secondary}},t}(GS),x6=[20,140],S6=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(e){e.mappingMethod=`linear`,e.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=x6[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=x6[1])},t.prototype._resetRange=function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):B(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),L(this.stateList,function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),t=Tp((this.get(`range`)||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]<e[0]&&(t[0]=e[0]),t[1]<e[0]&&(t[1]=e[0]),t},t.prototype.getValueState=function(e){var t=this.option.range,n=this.getExtent(),r=W(this.option.unboundedRange,!0);return(r&&t[0]<=n[0]||t[0]<=e)&&(r&&t[1]>=n[1]||e<=t[1])?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[];return this.eachTargetSeries(function(n){var r=[],i=n.getData();i.each(this.getDataDimensionIndex(i),function(t,n){e[0]<=t&&t<=e[1]&&r.push(n)},this),t.push({seriesId:n.id,dataIndex:r})},this),t},t.prototype.getVisualMeta=function(e){var t=C6(this,`outOfRange`,this.getExtent()),n=C6(this,`inRange`,this.option.range.slice()),r=[];function i(t,n){r.push({value:t,color:e(t,n)})}for(var a=0,o=0,s=n.length,c=t.length;o<c&&(!n.length||t[o]<=n[0]);o++)t[o]<n[a]&&i(t[o],`outOfRange`);for(var l=1;a<s;a++,l=0)l&&r.length&&i(n[a],`outOfRange`),i(n[a],`inRange`);for(var l=1;o<c;o++)(!n.length||n[n.length-1]<t[o])&&(l&&=(r.length&&i(r[r.length-1].value,`outOfRange`),0),i(t[o],`outOfRange`));var u=r.length;return{stops:r,outerColors:[u?r[0].color:`transparent`,u?r[u-1].color:`transparent`]}},t.type=`visualMap.continuous`,t.defaultOption=ax(b6.defaultOption,{align:`auto`,calculable:!1,hoverLink:!0,realtime:!0,handleIcon:`path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z`,handleSize:`120%`,handleStyle:{borderColor:Z.color.neutral00,borderWidth:1},indicatorIcon:`circle`,indicatorSize:`50%`,indicatorStyle:{borderColor:Z.color.neutral00,borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:Z.color.shadow}}),t}(b6);function C6(e,t,n){if(n[0]===n[1])return n.slice();for(var r=200,i=(n[1]-n[0])/r,a=n[0],o=[],s=0;s<=r&&a<n[1];s++)o.push(a),a+=i;return o.push(n[1]),o}var w6=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.autoPositionValues={left:1,right:1,top:1,bottom:1},n}return t.prototype.init=function(e,t){this.ecModel=e,this.api=t},t.prototype.render=function(e,t,n,r){if(this.visualMapModel=e,e.get(`show`)===!1){this.group.removeAll();return}this.doRender(e,t,n,r)},t.prototype.renderBackground=function(e){var t=this.visualMapModel,n=aS(t.get(`padding`)||0),r=e.getBoundingRect();e.add(new e_({z2:-1,silent:!0,shape:{x:r.x-n[3],y:r.y-n[0],width:r.width+n[3]+n[1],height:r.height+n[0]+n[2]},style:{fill:t.get(`backgroundColor`),stroke:t.get(`borderColor`),lineWidth:t.get(`borderWidth`)}}))},t.prototype.getControllerVisual=function(e,t,n){n||={};var r=n.forceState,i=this.visualMapModel,a={};t===`color`&&(a.color=i.get(`contentColor`));function o(e){return a[e]}function s(e,t){a[e]=t}var c=i.controllerVisuals[r||i.getValueState(e)];return L(ZV.prepareVisualTypes(c),function(r){var i=c[r];n.convertOpacityToAlpha&&r===`opacity`&&(r=`colorAlpha`,i=c.__alphaForOpacity),ZV.dependsOn(r,t)&&i&&i.applyVisual(e,o,s)}),a[t]},t.prototype.positionGroup=function(e){var t=this.visualMapModel,n=this.api,r=LS(t,n).refContainer;RS(e,t.getBoxLayoutParams(),r)},t.prototype.doRender=function(e,t,n,r){},t.type=`visualMap`,t}(hE),T6=[[`left`,`right`,`width`],[`top`,`bottom`,`height`]];function E6(e,t,n){var r=e.option,i=r.align;if(i!=null&&i!==`auto`)return i;for(var a={width:t.getWidth(),height:t.getHeight()},o=+(r.orient===`horizontal`),s=T6[o],c=[0,null,10],l={},u=0;u<3;u++)l[T6[1-o][u]]=c[u],l[s[u]]=u===2?n[0]:r[s[u]];var d=[[`x`,`width`,3],[`y`,`height`,0]][o],f=PS(l,a,r.padding);return s[(f.margin[d[2]]||0)+f[d[0]]+f[d[1]]*.5<a[d[1]]*.5?0:1]}function D6(e,t){return L(e||[],function(e){e.dataIndex!=null&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null),e.highlightKey=`visualMap`+(t?t.componentIndex:``)}),e}var O6=Sp,k6=L,A6=Math.min,j6=Math.max,M6=12,N6=6,P6=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._shapes={},n._dataInterval=[],n._handleEnds=[],n._hoverLinkDataIndices=[],n}return t.prototype.init=function(t,n){e.prototype.init.call(this,t,n),this._hoverLinkFromSeriesMouseOver=z(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=z(this._hideIndicator,this)},t.prototype.doRender=function(e,t,n,r){(!r||r.type!==`selectDataRange`||r.from!==this.uid)&&this._buildView()},t.prototype._buildView=function(){this.group.removeAll();var e=this.visualMapModel,t=this.group;this._orient=e.get(`orient`),this._useHandle=e.get(`calculable`),this._resetInterval(),this._renderBar(t);var n=e.get(`text`);this._renderEndsText(t,n,0),this._renderEndsText(t,n,1),this._updateView(!0),this.renderBackground(t),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(t)},t.prototype._renderEndsText=function(e,t,n){if(t){var r=t[1-n];r=r==null?``:r+``;var i=this.visualMapModel,a=i.get(`textGap`),o=i.itemSize,s=this._shapes.mainGroup,c=this._applyTransform([o[0]/2,n===0?-a:o[1]+a],s),l=this._applyTransform(n===0?`bottom`:`top`,s),u=this._orient,d=this.visualMapModel.textStyleModel;this.group.add(new a_({style:zb(d,{x:c[0],y:c[1],verticalAlign:d.get(`verticalAlign`)||(u===`horizontal`?`middle`:l),align:d.get(`align`)||(u===`horizontal`?l:`center`),text:r})}))}},t.prototype._renderBar=function(e){var t=this.visualMapModel,n=this._shapes,r=t.itemSize,i=this._orient,a=this._useHandle,o=E6(t,this.api,r),s=n.mainGroup=this._createBarGroup(o),c=new Y;s.add(c),c.add(n.outOfRange=F6()),c.add(n.inRange=F6(null,a?R6(this._orient):null,z(this._dragHandle,this,`all`,!1),z(this._dragHandle,this,`all`,!0))),c.setClipPath(new e_({shape:{x:0,y:0,width:r[0],height:r[1],r:3}}));var l=t.textStyleModel.getTextRect(`国`),u=j6(l.width,l.height);a&&(n.handleThumbs=[],n.handleLabels=[],n.handleLabelPoints=[],this._createHandle(t,s,0,r,u,i),this._createHandle(t,s,1,r,u,i)),this._createIndicator(t,s,r,u,i),e.add(s)},t.prototype._createHandle=function(e,t,n,r,i,a){var o=z(this._dragHandle,this,n,!1),s=z(this._dragHandle,this,n,!0),c=Gf(e.get(`handleSize`),r[0]),l=nD(e.get(`handleIcon`),-c/2,-c/2,c,c,null,!0),u=R6(this._orient);l.attr({cursor:u,draggable:!0,drift:o,ondragend:s,onmousemove:function(e){tl(e.event)}}),l.x=r[0]/2,l.useStyle(e.getModel(`handleStyle`).getItemStyle()),l.setStyle({strokeNoScale:!0,strokeFirst:!0}),l.style.lineWidth*=2,l.ensureState(`emphasis`).style=e.getModel([`emphasis`,`handleStyle`]).getItemStyle(),Sv(l,!0),t.add(l);var d=this.visualMapModel.textStyleModel,f=new a_({cursor:u,draggable:!0,drift:o,onmousemove:function(e){tl(e.event)},ondragend:s,style:zb(d,{x:0,y:0,text:``})});f.ensureState(`blur`).style={opacity:.1},f.stateTransition={duration:200},this.group.add(f);var p=[c,0],m=this._shapes;m.handleThumbs[n]=l,m.handleLabelPoints[n]=p,m.handleLabels[n]=f},t.prototype._createIndicator=function(e,t,n,r,i){var a=Gf(e.get(`indicatorSize`),n[0]),o=nD(e.get(`indicatorIcon`),-a/2,-a/2,a,a,null,!0);o.attr({cursor:`move`,invisible:!0,silent:!0,x:n[0]/2});var s=e.getModel(`indicatorStyle`).getItemStyle();if(o instanceof Kg){var c=o.style;o.useStyle(F({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},s))}else o.useStyle(s);t.add(o);var l=this.visualMapModel.textStyleModel,u=new a_({silent:!0,invisible:!0,style:zb(l,{x:0,y:0,text:``})});this.group.add(u);var d=[(i===`horizontal`?r/2:N6)+n[0]/2,0],f=this._shapes;f.indicator=o,f.indicatorLabel=u,f.indicatorLabelPoint=d,this._firstShowIndicator=!0},t.prototype._dragHandle=function(e,t,n,r){if(this._useHandle){if(this._dragging=!t,!t){var i=this._applyTransform([n,r],this._shapes.mainGroup,!0);this._updateInterval(e,i[1]),this._hideIndicator(),this._updateView()}t===!this.visualMapModel.get(`realtime`)&&this.api.dispatchAction({type:`selectDataRange`,from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),t?!this._hovering&&this._clearHoverLinkToSeries():L6(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[e],!1)}},t.prototype._resetInterval=function(){var e=this.visualMapModel,t=this._dataInterval=e.getSelected(),n=e.getExtent(),r=[0,e.itemSize[1]];this._handleEnds=[O6(t[0],n,r,!0),O6(t[1],n,r,!0)]},t.prototype._updateInterval=function(e,t){t||=0;var n=this.visualMapModel,r=this._handleEnds,i=[0,n.itemSize[1]];ZW(t,r,i,e,0);var a=n.getExtent();this._dataInterval=[O6(r[0],i,a,!0),O6(r[1],i,a,!0)]},t.prototype._updateView=function(e){var t=this.visualMapModel,n=t.getExtent(),r=this._shapes,i=[0,t.itemSize[1]],a=e?i:this._handleEnds,o=this._createBarVisual(this._dataInterval,n,a,`inRange`),s=this._createBarVisual(n,n,i,`outOfRange`);r.inRange.setStyle({fill:o.barColor}).setShape(`points`,o.barPoints),r.outOfRange.setStyle({fill:s.barColor}).setShape(`points`,s.barPoints),this._updateHandle(a,o)},t.prototype._createBarVisual=function(e,t,n,r){var i={forceState:r,convertOpacityToAlpha:!0},a=this._makeColorGradient(e,i),o=[this.getControllerVisual(e[0],`symbolSize`,i),this.getControllerVisual(e[1],`symbolSize`,i)],s=this._createBarPoints(n,o);return{barColor:new jy(0,0,0,1,a),barPoints:s,handlesColor:[a[0].color,a[a.length-1].color]}},t.prototype._makeColorGradient=function(e,t){var n=100,r=[],i=(e[1]-e[0])/n;r.push({color:this.getControllerVisual(e[0],`color`,t),offset:0});for(var a=1;a<n;a++){var o=e[0]+i*a;if(o>e[1])break;r.push({color:this.getControllerVisual(o,`color`,t),offset:a/n})}return r.push({color:this.getControllerVisual(e[1],`color`,t),offset:1}),r},t.prototype._createBarPoints=function(e,t){var n=this.visualMapModel.itemSize;return[[n[0]-t[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-t[1],e[1]]]},t.prototype._createBarGroup=function(e){var t=this._orient,n=this.visualMapModel.get(`inverse`);return new Y(t===`horizontal`&&!n?{scaleX:e===`bottom`?1:-1,rotation:Math.PI/2}:t===`horizontal`&&n?{scaleX:e===`bottom`?-1:1,rotation:-Math.PI/2}:t===`vertical`&&!n?{scaleX:e===`left`?1:-1,scaleY:-1}:{scaleX:e===`left`?1:-1})},t.prototype._updateHandle=function(e,t){if(this._useHandle){var n=this._shapes,r=this.visualMapModel,i=n.handleThumbs,a=n.handleLabels,o=r.itemSize,s=r.getExtent(),c=this._applyTransform(`left`,n.mainGroup);k6([0,1],function(l){var u=i[l];u.setStyle(`fill`,t.handlesColor[l]),u.y=e[l];var d=O6(e[l],[0,o[1]],s,!0),f=this.getControllerVisual(d,`symbolSize`);u.scaleX=u.scaleY=f/o[0],u.x=o[0]-f/2;var p=db(n.handleLabelPoints[l],ub(u,this.group));if(this._orient===`horizontal`){var m=c===`left`||c===`top`?(o[0]-f)/2:(o[0]-f)/-2;p[1]+=m}a[l].setStyle({x:p[0],y:p[1],text:r.formatValueText(this._dataInterval[l]),verticalAlign:`middle`,align:this._orient===`vertical`?this._applyTransform(`left`,n.mainGroup):`center`})},this)}},t.prototype._showIndicator=function(e,t,n,r){var i=this.visualMapModel,a=i.getExtent(),o=i.itemSize,s=[0,o[1]],c=this._shapes,l=c.indicator;if(l){l.attr(`invisible`,!1);var u=this.getControllerVisual(e,`color`,{convertOpacityToAlpha:!0}),d=this.getControllerVisual(e,`symbolSize`),f=O6(e,a,s,!0),p=o[0]-d/2,m={x:l.x,y:l.y};l.y=f,l.x=p;var h=db(c.indicatorLabelPoint,ub(l,this.group)),g=c.indicatorLabel;g.attr(`invisible`,!1);var _=this._applyTransform(`left`,c.mainGroup),v=this._orient===`horizontal`;g.setStyle({text:(n||``)+i.formatValueText(t),verticalAlign:v?_:`middle`,align:v?`center`:_});var y={x:p,y:f,style:{fill:u}},b={style:{x:h[0],y:h[1]}};if(i.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var x={duration:100,easing:`cubicInOut`,additive:!0};l.x=m.x,l.y=m.y,l.animateTo(y,x),g.animateTo(b,x)}else l.attr(y),g.attr(b);this._firstShowIndicator=!1;var S=this._shapes.handleLabels;if(S)for(var C=0;C<S.length;C++)this.api.enterBlur(S[C])}},t.prototype._enableHoverLinkToSeries=function(){var e=this;this._shapes.mainGroup.on(`mousemove`,function(t){if(e._hovering=!0,!e._dragging){var n=e.visualMapModel.itemSize,r=e._applyTransform([t.offsetX,t.offsetY],e._shapes.mainGroup,!0,!0);r[1]=A6(j6(0,r[1]),n[1]),e._doHoverLinkToSeries(r[1],0<=r[0]&&r[0]<=n[0])}}).on(`mouseout`,function(){e._hovering=!1,!e._dragging&&e._clearHoverLinkToSeries()})},t.prototype._enableHoverLinkFromSeries=function(){var e=this.api.getZr();this.visualMapModel.option.hoverLink?(e.on(`mouseover`,this._hoverLinkFromSeriesMouseOver,this),e.on(`mouseout`,this._hideIndicator,this)):this._clearHoverLinkFromSeries()},t.prototype._doHoverLinkToSeries=function(e,t){var n=this.visualMapModel,r=n.itemSize;if(n.option.hoverLink){var i=[0,r[1]],a=n.getExtent();e=A6(j6(i[0],e),i[1]);var o=I6(n,a,i),s=[e-o,e+o],c=O6(e,i,a,!0),l=[O6(s[0],i,a,!0),O6(s[1],i,a,!0)];s[0]<i[0]&&(l[0]=-1/0),s[1]>i[1]&&(l[1]=1/0),t&&(l[0]===-1/0?this._showIndicator(c,l[1],`< `,o):l[1]===1/0?this._showIndicator(c,l[0],`> `,o):this._showIndicator(c,c,`≈ `,o));var u=this._hoverLinkDataIndices,d=[];(t||L6(n))&&(d=this._hoverLinkDataIndices=n.findTargetDataIndices(l));var f=xm(u,d);this._dispatchHighDown(`downplay`,D6(f[0],n)),this._dispatchHighDown(`highlight`,D6(f[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var t;if(eD(e.target,function(e){var n=y_(e);if(n.dataIndex!=null)return t=n,!0},!0),t){var n=this.ecModel.getSeriesByIndex(t.seriesIndex),r=this.visualMapModel;if(r.isTargetSeries(n)){var i=n.getData(t.dataType),a=i.getStore().get(r.getDataDimensionIndex(i),t.dataIndex);isNaN(a)||this._showIndicator(a,a)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr(`invisible`,!0),e.indicatorLabel&&e.indicatorLabel.attr(`invisible`,!0);var t=this._shapes.handleLabels;if(t)for(var n=0;n<t.length;n++)this.api.leaveBlur(t[n])},t.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var e=this._hoverLinkDataIndices;this._dispatchHighDown(`downplay`,D6(e,this.visualMapModel)),e.length=0},t.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var e=this.api.getZr();e.off(`mouseover`,this._hoverLinkFromSeriesMouseOver),e.off(`mouseout`,this._hideIndicator)},t.prototype._applyTransform=function(e,t,n,r){var i=ub(t,r?null:this.group);return B(e)?db(e,i,n):fb(e,i,n)},t.prototype._dispatchHighDown=function(e,t){t&&t.length&&this.api.dispatchAction({type:e,batch:t})},t.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},t.type=`visualMap.continuous`,t}(w6);function F6(e,t,n,r){return new Sy({shape:{points:e},draggable:!!n,cursor:t,drift:n,onmousemove:function(e){tl(e.event)},ondragend:r})}function I6(e,t,n){var r=M6/2,i=e.get(`hoverLinkDataSize`);return i&&(r=O6(i,t,n,!0)/2),r}function L6(e){return!!(e.get(`hoverLinkOnHandle`)??e.get(`realtime`))}function R6(e){return e===`vertical`?`ns-resize`:`ew-resize`}var z6={type:`selectDataRange`,event:`dataRangeSelected`,update:`update`},B6=function(e,t){t.eachComponent({mainType:`visualMap`,query:e},function(t){t.setSelected(e.selected)})},V6=[{createOnAllSeries:!0,reset:function(e,t){var n=[];return t.eachComponent(`visualMap`,function(t){var r=e.pipelineContext;!t.isTargetSeries(e)||r&&r.large||n.push(j2(t.stateList,t.targetVisuals,z(t.getValueState,t),t.getDataDimensionIndex(e.getData())))}),n}},{createOnAllSeries:!0,reset:function(e,t){var n=e.getData(),r=[];t.eachComponent(`visualMap`,function(t){if(t.isTargetSeries(e)){var i=t.getVisualMeta(z(H6,null,e,t))||{stops:[],outerColors:[]},a=t.getDataDimensionIndex(n);a>=0&&(i.dimension=a,r.push(i))}}),e.getData().setVisual(`visualMeta`,r)}}];function H6(e,t,n,r){for(var i=t.targetVisuals[r],a=ZV.prepareVisualTypes(i),o={color:XE(e.getData(),`color`)},s=0,c=a.length;s<c;s++){var l=a[s],u=i[l===`opacity`?`__alphaForOpacity`:l];u&&u.applyVisual(n,d,f)}return o.color;function d(e){return o[e]}function f(e,t){o[e]=t}}var U6=L;function W6(e){var t=e&&e.visualMap;B(t)||(t=t?[t]:[]),U6(t,function(e){if(e){G6(e,`splitList`)&&!G6(e,`pieces`)&&(e.pieces=e.splitList,delete e.splitList);var t=e.pieces;t&&B(t)&&U6(t,function(e){U(e)&&(G6(e,`start`)&&!G6(e,`min`)&&(e.min=e.start),G6(e,`end`)&&!G6(e,`max`)&&(e.max=e.end))})}})}function G6(e,t){return e&&e.hasOwnProperty&&e.hasOwnProperty(t)}var K6=!1;function q6(e){K6||(K6=!0,e.registerSubTypeDefaulter(`visualMap`,function(e){return!e.categories&&(!(e.pieces?e.pieces.length>0:e.splitNumber>0)||e.calculable)?`continuous`:`piecewise`}),e.registerAction(z6,B6),L(V6,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(W6))}function J6(e){e.registerComponentModel(S6),e.registerComponentView(P6),q6(e)}var sie=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._pieceList=[],n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],cie[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var i=this.option.categories;this.resetVisual(function(e,t){r===`categories`?(e.mappingMethod=`category`,e.categories=P(i)):(e.dataExtent=this.getExtent(),e.mappingMethod=`piecewise`,e.pieceList=R(this._pieceList,function(e){return e=P(e),t!==`inRange`&&(e.visual=null),e}))})},t.prototype.completeVisualOption=function(){var t=this.option,n={},r=ZV.listVisualTypes(),i=this.isCategory();L(t.pieces,function(e){L(r,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),L(n,function(e,n){var r=!1;L(this.stateList,function(e){r=r||a(t,e,n)||a(t.target,e,n)},this),!r&&L(this.stateList,function(e){(t[e]||(t[e]={}))[n]=f6.get(n,e===`inRange`?`active`:`inactive`,i)})},this);function a(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,t){var n=this.option,r=this._pieceList,i=(t?n:e).selected||{};if(n.selected=i,L(r,function(e,t){var n=this.getSelectedMapKey(e);i.hasOwnProperty(n)||(i[n]=!0)},this),n.selectedMode===`single`){var a=!1;L(r,function(e,t){var n=this.getSelectedMapKey(e);i[n]&&(a?i[n]=!1:a=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get(`itemSymbol`)},t.prototype.getSelectedMapKey=function(e){return this._mode===`categories`?e.value+``:e.index+``},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?`pieces`:this.option.categories?`categories`:`splitNumber`},t.prototype.setSelected=function(e){this.option.selected=P(e)},t.prototype.getValueState=function(e){var t=ZV.findPieceIndex(e,this._pieceList);return t==null?`outOfRange`:this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[],n=this._pieceList;return this.eachTargetSeries(function(r){var i=[],a=r.getData();a.each(this.getDataDimensionIndex(a),function(t,r){ZV.findPieceIndex(t,n)===e&&i.push(r)},this),t.push({seriesId:r.id,dataIndex:i})},this),t},t.prototype.getRepresentValue=function(e){var t;if(this.isCategory())t=e.value;else if(e.value!=null)t=e.value;else{var n=e.interval||[];t=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return t},t.prototype.getVisualMeta=function(e){if(this.isCategory())return;var t=[],n=[``,``],r=this;function i(i,a){var o=r.getRepresentValue({interval:i});a||=r.getValueState(o);var s=e(o,a);i[0]===-1/0?n[0]=s:i[1]===1/0?n[1]=s:t.push({value:i[0],color:s},{value:i[1],color:s})}var a=this._pieceList.slice();if(!a.length)a.push({interval:[-1/0,1/0]});else{var o=a[0].interval[0];o!==-1/0&&a.unshift({interval:[-1/0,o]}),o=a[a.length-1].interval[1],o!==1/0&&a.push({interval:[o,1/0]})}var s=-1/0;return L(a,function(e){var t=e.interval;t&&(t[0]>s&&i([s,t[0]],`outOfRange`),i(t.slice()),s=t[1])},this),{stops:t,outerColors:n}},t.type=`visualMap.piecewise`,t.defaultOption=ax(b6.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:`auto`,itemWidth:20,itemHeight:14,itemSymbol:`roundRect`,pieces:null,categories:null,splitNumber:5,selectedMode:`multiple`,itemGap:10,hoverLink:!0}),t}(b6),cie={splitNumber:function(e){var t=this.option,n=Math.min(t.precision,20),r=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var a=(r[1]-r[0])/i;+a.toFixed(n)!==a&&n<5;)n++;t.precision=n,a=+a.toFixed(n),t.minOpen&&e.push({interval:[-1/0,r[0]],close:[0,0]});for(var o=0,s=r[0];o<i;s+=a,o++){var c=o===i-1?r[1]:s+a;e.push({interval:[s,c],close:[1,1]})}t.maxOpen&&e.push({interval:[r[1],1/0],close:[0,0]}),Fp(e),L(e,function(e,t){e.index=t,e.text=this.formatValueText(e.interval)},this)},categories:function(e){var t=this.option;L(t.categories,function(t){e.push({text:this.formatValueText(t,!0),value:t})},this),Y6(t,e)},pieces:function(e){var t=this.option;L(t.pieces,function(t,n){U(t)||(t={value:t});var r={text:``,index:n};if(t.label!=null&&(r.text=t.label),t.hasOwnProperty(`value`)){var i=r.value=t.value;r.interval=[i,i],r.close=[1,1]}else{for(var a=r.interval=[],o=r.close=[0,0],s=[1,0,1],c=[-1/0,1/0],l=[],u=0;u<2;u++){for(var d=[[`gte`,`gt`,`min`],[`lte`,`lt`,`max`]][u],f=0;f<3&&a[u]==null;f++)a[u]=t[d[f]],o[u]=s[f],l[u]=f===2;a[u]??(a[u]=c[u])}l[0]&&a[1]===1/0&&(o[0]=0),l[1]&&a[0]===-1/0&&(o[1]=0),process.env.NODE_ENV!==`production`&&a[0]>a[1]&&console.warn(`Piece `+n+`is illegal: `+a+` lower bound should not greater then uppper bound.`),a[0]===a[1]&&o[0]&&o[1]&&(r.value=a[0])}r.visual=ZV.retrieveVisuals(t),e.push(r)},this),Y6(t,e),Fp(e),L(e,function(e){var t=e.close,n=[[`<`,`≤`][t[1]],[`>`,`≥`][t[0]]];e.text=e.text||this.formatValueText(e.value==null?e.interval:e.value,!1,n)},this)}};function Y6(e,t){var n=e.inverse;(e.orient===`vertical`?!n:n)&&t.reverse()}var lie=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get(`textGap`),r=t.textStyleModel,i=this._getItemAlign(),a=t.itemSize,o=this._getViewData(),s=o.endsText,c=qs(t.get(`showLabel`,!0),!s),l=!t.get(`selectedMode`);s&&this._renderEndsText(e,s[0],a,c,i),L(o.viewPieceList,function(o){var s=o.piece,u=new Y;u.onclick=z(this._onItemClick,this,s),this._enableHoverLink(u,o.indexInModelPieceList);var d=t.getRepresentValue(s);if(this._createItemSymbol(u,d,[0,0,a[0],a[1]],l),c){var f=this.visualMapModel.getValueState(d),p=r.get(`align`)||i;u.add(new a_({style:zb(r,{x:p===`right`?-n:a[0]+n,y:a[1]/2,text:s.text,verticalAlign:r.get(`verticalAlign`)||`middle`,align:p,opacity:W(r.get(`opacity`),f===`outOfRange`?.5:1)}),silent:l}))}e.add(u)},this),s&&this._renderEndsText(e,s[1],a,c,i),AS(t.get(`orient`),e,t.get(`itemGap`)),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,t){var n=this;e.on(`mouseover`,function(){return r(`highlight`)}).on(`mouseout`,function(){return r(`downplay`)});var r=function(e){var r=n.visualMapModel;r.option.hoverLink&&n.api.dispatchAction({type:e,batch:D6(r.findTargetDataIndices(t),r)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if(t.orient===`vertical`)return E6(e,this.api,e.itemSize);var n=t.align;return(!n||n===`auto`)&&(n=`left`),n},t.prototype._renderEndsText=function(e,t,n,r,i){if(t){var a=new Y,o=this.visualMapModel.textStyleModel;a.add(new a_({style:zb(o,{x:r?i===`right`?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:`middle`,align:r?i:`center`,text:t})})),e.add(a)}},t.prototype._getViewData=function(){var e=this.visualMapModel,t=R(e.getPieceList(),function(e,t){return{piece:e,indexInModelPieceList:t}}),n=e.get(`text`),r=e.get(`orient`),i=e.get(`inverse`);return(r===`horizontal`?i:!i)?t.reverse():n&&=n.slice().reverse(),{viewPieceList:t,endsText:n}},t.prototype._createItemSymbol=function(e,t,n,r){var i=nD(this.getControllerVisual(t,`symbol`),n[0],n[1],n[2],n[3],this.getControllerVisual(t,`color`));i.silent=r,e.add(i)},t.prototype._onItemClick=function(e){var t=this.visualMapModel,n=t.option,r=n.selectedMode;if(r){var i=P(n.selected),a=t.getSelectedMapKey(e);r===`single`||r===!0?(i[a]=!0,L(i,function(e,t){i[t]=t===a})):i[a]=!i[a],this.api.dispatchAction({type:`selectDataRange`,from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}},t.type=`visualMap.piecewise`,t}(w6);function X6(e){e.registerComponentModel(sie),e.registerComponentView(lie),q6(e)}function uie(e){Nk(J6),Nk(X6)}var die=function(){function e(e){this._thumbnailModel=e}return e.prototype.reset=function(e){this._renderVersion=e.getMainProcessVersion()},e.prototype.renderContent=function(e){var t=e.api.getViewOfComponentModel(this._thumbnailModel);t&&(e.group.silent=!0,t.renderContent({group:e.group,targetTrans:e.targetTrans,z2Range:jb(e.group),roamType:e.roamType,viewportRect:e.viewportRect,renderVersion:this._renderVersion}))},e.prototype.updateWindow=function(e,t){var n=t.getViewOfComponentModel(this._thumbnailModel);n&&n.updateWindow({targetTrans:e,renderVersion:this._renderVersion})},e}(),fie=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.preventAutoZ=!0,n}return t.prototype.optionUpdated=function(e,t){this._updateBridge()},t.prototype._updateBridge=function(){var e=this._birdge=this._birdge||new die(this);this._target=null,this.ecModel.eachSeries(function(e){qU(e,null)}),this.shouldShow()&&qU(this.getTarget().baseMapProvider,e)},t.prototype.shouldShow=function(){return this.getShallow(`show`,!0)},t.prototype.getBridge=function(){return this._birdge},t.prototype.getTarget=function(){if(this._target)return this._target;var e=this.getReferringComponents(`series`,{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];return e?e.subType!==`graph`&&(e=null,process.env.NODE_ENV!==`production`&&Gp(`series.`+e.subType+` is not supported in thumbnail.`,!0)):e=this.ecModel.queryComponents({mainType:`series`,subType:`graph`})[0],this._target={baseMapProvider:e},this._target},t.type=`thumbnail`,t.layoutMode=`box`,t.dependencies=[`series`,`geo`],t.defaultOption={show:!0,right:1,bottom:1,height:`25%`,width:`25%`,itemStyle:{borderColor:Z.color.border,borderWidth:2},windowStyle:{borderWidth:1,color:Z.color.neutral30,borderColor:Z.color.neutral40,opacity:.3},z:10},t}(GS),pie=function(e){N(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){if(this._api=n,this._model=e,this._coordSys||=new fB,!this._isEnabled()){this._clear();return}this._renderVersion=n.getMainProcessVersion();var r=this.group;r.removeAll();var i=e.getModel(`itemStyle`),a=i.getItemStyle();a.fill??=t.get(`backgroundColor`)||Z.color.neutral00;var o=LS(e,n).refContainer,s=PS(jS(e,!0),o),c=a.lineWidth||0,l=this._contentRect=bb(s.clone(),c/2,!0,!0),u=new Y;r.add(u),u.setClipPath(new e_({shape:l.plain()}));var d=this._targetGroup=new Y;u.add(d);var f=s.plain();f.r=i.getShallow(`borderRadius`,!0),r.add(this._bgRect=new e_({style:a,shape:f,silent:!1,cursor:`grab`}));var p=e.getModel(`windowStyle`),m=p.getShallow(`borderRadius`,!0);u.add(this._windowRect=new e_({shape:{x:0,y:0,width:0,height:0,r:m},style:p.getItemStyle(),silent:!1,cursor:`grab`})),this._dealRenderContent(),this._dealUpdateWindow(),Q6(e,this)},t.prototype.renderContent=function(e){this._bridgeRendered=e,this._isEnabled()&&(this._dealRenderContent(),this._dealUpdateWindow(),Q6(this._model,this))},t.prototype._dealRenderContent=function(){var e=this._bridgeRendered;if(!(!e||e.renderVersion!==this._renderVersion)){var t=this._targetGroup,n=this._coordSys,r=this._contentRect;if(t.removeAll(),e){var i=e.group,a=i.getBoundingRect();t.add(i),this._bgRect.z2=e.z2Range.min-10,n.setBoundingRect(a.x,a.y,a.width,a.height);var o=PS({left:`center`,top:`center`,aspect:a.width/a.height},r);n.setViewRect(o.x,o.y,o.width,o.height),i.attr(n.getTransformInfo().raw),this._windowRect.z2=e.z2Range.max+10,this._resetRoamController(e.roamType)}}},t.prototype.updateWindow=function(e){var t=this._bridgeRendered;t&&t.renderVersion===e.renderVersion&&(t.targetTrans=e.targetTrans),this._isEnabled()&&this._dealUpdateWindow()},t.prototype._dealUpdateWindow=function(){var e=this._bridgeRendered;if(!(!e||e.renderVersion!==this._renderVersion)){var t=ml([],e.targetTrans),n=ul([],this._coordSys.transform,t);this._transThisToTarget=ml([],n);var r=e.viewportRect;r=r?r.clone():new Ol(0,0,this._api.getWidth(),this._api.getHeight()),r.applyTransform(n);var i=this._windowRect,a=i.shape.r;i.setShape(I({r:a},r))}},t.prototype._resetRoamController=function(e){var t=this,n=this._api,r=this._roamController;if(r||=this._roamController=new IR(n.getZr()),!e||!this._isEnabled()){r.disable();return}r.enable(e,{api:n,zInfo:{component:this._model},triggerInfo:{roamTrigger:null,isInSelf:function(e,n,r){return t._contentRect.contain(n,r)}}}),r.off(`pan`).off(`zoom`).on(`pan`,z(this._onPan,this)).on(`zoom`,z(this._onZoom,this))},t.prototype._onPan=function(e){var t=this._transThisToTarget;if(!(!this._isEnabled()||!t)){var n=Tc([],[e.oldX,e.oldY],t),r=Tc([],[e.oldX-e.dx,e.oldY-e.dy],t);this._api.dispatchAction(Z6(this._model.getTarget().baseMapProvider,{dx:r[0]-n[0],dy:r[1]-n[1]}))}},t.prototype._onZoom=function(e){var t=this._transThisToTarget;if(!(!this._isEnabled()||!t)){var n=Tc([],[e.originX,e.originY],t);this._api.dispatchAction(Z6(this._model.getTarget().baseMapProvider,{zoom:1/e.scale,originX:n[0],originY:n[1]}))}},t.prototype._isEnabled=function(){var e=this._model;return!(!e||!e.shouldShow()||!e.getTarget().baseMapProvider)},t.prototype._clear=function(){this.group.removeAll(),this._bridgeRendered=null,this._roamController&&this._roamController.disable()},t.prototype.remove=function(){this._clear()},t.prototype.dispose=function(){this._clear()},t.type=`thumbnail`,t}(hE);function Z6(e,t){var n={type:e.mainType===`series`?e.subType+`Roam`:e.mainType+`Roam`};return n[e.mainType+`Id`]=e.id,F(n,t),n}function Q6(e,t){var n=Ab(e);Mb(t.group,n.z,n.zlevel)}function mie(e){e.registerComponentModel(fie),e.registerComponentView(pie)}var hie={label:{enabled:!0},decal:{show:!1}},$6=Cm(),gie={};function _ie(e,t){var n=e.getModel(`aria`);if(!n.get(`enabled`))return;var r=P(hie);ks(r.label,e.getLocaleModel().get(`aria`),!1),ks(n.option,r,!1),i(),a();function i(){if(n.getModel(`decal`).get(`show`)){var t=K();e.eachSeries(function(e){if(!e.isColorBySeries()){var n=t.get(e.type);n||(n={},t.set(e.type,n)),$6(e).scope=n}}),e.eachRawSeries(function(t){if(e.isSeriesFiltered(t))return;if(V(t.enableAriaDecal)){t.enableAriaDecal();return}var n=t.getData();if(t.isColorBySeries()){var r=xC(t.ecModel,t.name,gie,e.getSeriesCount()),i=n.getVisual(`decal`);n.setVisual(`decal`,l(i,r))}else{var a=t.getRawData(),o={},s=$6(t).scope;n.each(function(e){var t=n.getRawIndex(e);o[t]=e});var c=a.count();a.each(function(e){var r=o[e],i=a.getName(e)||e+``,u=xC(t.ecModel,i,s,c),d=n.getItemVisual(r,`decal`);n.setItemVisual(r,`decal`,l(d,u))})}function l(e,t){var n=e?F(F({},t),e):t;return n.dirty=!0,n}})}}function a(){var r=t.getZr().dom;if(r){var i=e.getLocaleModel().get(`aria`),a=n.getModel(`label`);if(a.option=I(a.option,i),a.get(`enabled`)){if(r.setAttribute(`role`,`img`),a.get(`description`)){r.setAttribute(`aria-label`,a.get(`description`));return}var l=e.getSeriesCount(),u=a.get([`data`,`maxCount`])||10,d=a.get([`series`,`maxCount`])||10,f=Math.min(l,d),p;if(!(l<1)){var m=s();p=m?o(a.get([`general`,`withTitle`]),{title:m}):a.get([`general`,`withoutTitle`]);var h=[],g=l>1?a.get([`series`,`multiple`,`prefix`]):a.get([`series`,`single`,`prefix`]);p+=o(g,{seriesCount:l}),e.eachSeries(function(e,t){if(t<f){var n=void 0,r=e.get(`name`)?`withName`:`withoutName`;n=l>1?a.get([`series`,`multiple`,r]):a.get([`series`,`single`,r]),n=o(n,{seriesId:e.seriesIndex,seriesName:e.get(`name`),seriesType:c(e.subType)});var i=e.getData();if(i.count()>u){var s=a.get([`data`,`partialData`]);n+=o(s,{displayCnt:u})}else n+=a.get([`data`,`allData`]);for(var d=a.get([`data`,`separator`,`middle`]),p=a.get([`data`,`separator`,`end`]),m=a.get([`data`,`excludeDimensionId`]),g=[],_=0;_<i.count();_++)if(_<u){var v=i.getName(_),y=m?Fs(i.getValues(_),function(e,t){return js(m,t)===-1}):i.getValues(_),b=a.get([`data`,v?`withName`:`withoutName`]);g.push(o(b,{name:v,value:y.join(d)}))}n+=g.join(d)+p,h.push(n)}});var _=a.getModel([`series`,`multiple`,`separator`]),v=_.get(`middle`),y=_.get(`end`);p+=h.join(v)+y,r.setAttribute(`aria-label`,p)}}}}function o(e,t){if(!H(e))return e;var n=e;return L(t,function(e,t){n=n.replace(RegExp(`\\{\\s*`+t+`\\s*\\}`,`g`),e)}),n}function s(){var t=e.get(`title`);return t&&t.length&&(t=t[0]),t&&t.text}function c(t){var n=e.getLocaleModel().get([`series`,`typeNames`]);return n[t]||n.chart}}function vie(e){if(!(!e||!e.aria)){var t=e.aria;t.show!=null&&(t.enabled=t.show),t.label=t.label||{},L([`description`,`general`,`series`,`data`],function(e){t[e]!=null&&(t.label[e]=t[e])})}}function yie(e){e.registerPreprocessor(vie),e.registerVisual(e.PRIORITY.VISUAL.ARIA,_ie)}var e8={value:`eq`,"<":`lt`,"<=":`lte`,">":`gt`,">=":`gte`,"=":`eq`,"!=":`ne`,"<>":`ne`},bie=function(){function e(e){if((this._condVal=H(e)?new RegExp(e):Gs(e)?e:null)==null){var t=``;process.env.NODE_ENV!==`production`&&(t=Jp(`Illegal regexp`,e,`in`)),Yp(t)}}return e.prototype.evaluate=function(e){var t=typeof e;return H(t)?this._condVal.test(e):Bs(t)?this._condVal.test(e+``):!1},e}(),xie=function(){function e(){}return e.prototype.evaluate=function(){return this.value},e}(),Sie=function(){function e(){}return e.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(!e[t].evaluate())return!1;return!0},e}(),Cie=function(){function e(){}return e.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(e[t].evaluate())return!0;return!1},e}(),wie=function(){function e(){}return e.prototype.evaluate=function(){return!this.child.evaluate()},e}(),Tie=function(){function e(){}return e.prototype.evaluate=function(){for(var e=!!this.valueParser,t=this.getValue,n=t(this.valueGetterParam),r=e?this.valueParser(n):null,i=0;i<this.subCondList.length;i++)if(!this.subCondList[i].evaluate(e?r:n))return!1;return!0},e}();function t8(e,t){if(e===!0||e===!1){var n=new xie;return n.value=e,n}var r=``;return r8(e)||(process.env.NODE_ENV!==`production`&&(r=Jp(`Illegal config. Expect a plain object but actually`,e)),Yp(r)),e.and?n8(`and`,e,t):e.or?n8(`or`,e,t):e.not?Eie(e,t):Die(e,t)}function n8(e,t,n){var r=t[e],i=``;process.env.NODE_ENV!==`production`&&(i=Jp('"and"/"or" condition should only be `'+e+": [...]` and must not be empty array.",`Illegal condition:`,t)),B(r)||Yp(i),r.length||Yp(i);var a=e===`and`?new Sie:new Cie;return a.children=R(r,function(e){return t8(e,n)}),a.children.length||Yp(i),a}function Eie(e,t){var n=e.not,r=``;process.env.NODE_ENV!==`production`&&(r=Jp('"not" condition should only be `not: {}`.',`Illegal condition:`,e)),r8(n)||Yp(r);var i=new wie;return i.child=t8(n,t),i.child||Yp(r),i}function Die(e,t){for(var n=``,r=t.prepareGetValue(e),i=[],a=Ls(e),o=e.parser,s=o?tT(o):null,c=0;c<a.length;c++){var l=a[c];if(!(l===`parser`||t.valueGetterAttrMap.get(l))){var u=q(e8,l)?e8[l]:l,d=e[l],f=s?s(d):d,p=oT(u,f)||u===`reg`&&new bie(f);p||(process.env.NODE_ENV!==`production`&&(n=Jp(`Illegal relational operation: "`+l+`" in condition:`,e)),Yp(n)),i.push(p)}}i.length||(process.env.NODE_ENV!==`production`&&(n=Jp(`Relational condition must have at least one operator.`,`Illegal condition:`,e)),Yp(n));var m=new Tie;return m.valueGetterParam=r,m.valueParser=s,m.getValue=t.getValue,m.subCondList=i,m}function r8(e){return U(e)&&!Ns(e)}var Oie=function(){function e(e,t){this._cond=t8(e,t)}return e.prototype.evaluate=function(){return this._cond.evaluate()},e}();function kie(e,t){return new Oie(e,t)}var Aie={type:`echarts:filter`,transform:function(e){for(var t=e.upstream,n,r=kie(e.config,{valueGetterAttrMap:K({dimension:!0}),prepareGetValue:function(e){var n=``,r=e.dimension;q(e,`dimension`)||(process.env.NODE_ENV!==`production`&&(n=Jp(`Relation condition must has prop "dimension" specified.`,`Illegal condition:`,e)),Yp(n));var i=t.getDimensionInfo(r);return i||(process.env.NODE_ENV!==`production`&&(n=Jp(`Can not find dimension info via: `+r+`.
|
|
90
|
-
`,`Existing dimensions: `,t.cloneAllDimensionInfo(),`.
|
|
91
|
-
`,`Illegal condition:`,e,`.
|
|
92
|
-
`)),Yp(n)),{dimIdx:i.index}},getValue:function(e){return t.retrieveValueFromItem(n,e.dimIdx)}}),i=[],a=0,o=t.count();a<o;a++)n=t.getRawDataItem(a),r.evaluate()&&i.push(n);return{data:i}}},i8=``;process.env.NODE_ENV!==`production`&&(i8=[`Valid config is like:`,`{ dimension: "age", order: "asc" }`,`or [{ dimension: "age", order: "asc"], { dimension: "date", order: "desc" }]`].join(` `));var jie={type:`echarts:sort`,transform:function(e){var t=e.upstream,n=e.config,r=``,i=$p(n);i.length||(process.env.NODE_ENV!==`production`&&(r="Empty `config` in sort transform."),Yp(r));var a=[];L(i,function(e){var n=e.dimension,i=e.order,o=e.parser,s=e.incomparable;if(n??(process.env.NODE_ENV!==`production`&&(r=`Sort transform config must has "dimension" specified.`+i8),Yp(r)),i!==`asc`&&i!==`desc`&&(process.env.NODE_ENV!==`production`&&(r=`Sort transform config must has "order" specified.`+i8),Yp(r)),s&&s!==`min`&&s!==`max`){var c=``;process.env.NODE_ENV!==`production`&&(c=`incomparable must be "min" or "max" rather than "`+s+`".`),Yp(c)}if(i!==`asc`&&i!==`desc`){var l=``;process.env.NODE_ENV!==`production`&&(l=`order must be "asc" or "desc" rather than "`+i+`".`),Yp(l)}var u=t.getDimensionInfo(n);u||(process.env.NODE_ENV!==`production`&&(r=Jp(`Can not find dimension info via: `+n+`.
|
|
93
|
-
`,`Existing dimensions: `,t.cloneAllDimensionInfo(),`.
|
|
94
|
-
`,`Illegal config:`,e,`.
|
|
95
|
-
`)),Yp(r));var d=o?tT(o):null;o&&!d&&(process.env.NODE_ENV!==`production`&&(r=Jp(`Invalid parser name `+o+`.
|
|
96
|
-
`,`Illegal config:`,e,`.
|
|
97
|
-
`)),Yp(r)),a.push({dimIdx:u.index,parser:d,comparator:new iT(i,s)})});var o=t.sourceFormat;o!==`arrayRows`&&o!==`objectRows`&&(process.env.NODE_ENV!==`production`&&(r=`sourceFormat "`+o+`" is not supported yet`),Yp(r));for(var s=[],c=0,l=t.count();c<l;c++)s.push(t.getRawDataItem(c));return s.sort(function(e,n){for(var r=0;r<a.length;r++){var i=a[r],o=t.retrieveValueFromItem(e,i.dimIdx),s=t.retrieveValueFromItem(n,i.dimIdx);i.parser&&(o=i.parser(o),s=i.parser(s));var c=i.comparator.evaluate(o,s);if(c!==0)return c}return 0}),{data:s}}};function Mie(e){e.registerTransform(Aie),e.registerTransform(jie)}var Nie=function(e){N(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`dataset`,t}return t.prototype.init=function(t,n,r){e.prototype.init.call(this,t,n,r),this._sourceManager=new AT(this),jT(this)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),jT(this)},t.prototype.optionUpdated=function(){this._sourceManager.dirty()},t.prototype.getSourceManager=function(){return this._sourceManager},t.type=`dataset`,t.defaultOption={seriesLayoutBy:cC},t}(GS),Pie=function(e){N(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`dataset`,t}return t.type=`dataset`,t}(hE);function Fie(e){e.registerComponentModel(Nie),e.registerComponentView(Pie)}var a8=hg.CMD;function o8(e,t){return Math.abs(e-t)<1e-5}function s8(e){var t=e.data,n=e.len(),r=[],i,a=0,o=0,s=0,c=0;function l(e,t){i&&i.length>2&&r.push(i),i=[e,t]}function u(e,t,n,r){o8(e,n)&&o8(t,r)||i.push(e,t,n,r,n,r)}function d(e,t,n,r,a,o){var s=Math.abs(t-e),c=Math.tan(s/4)*4/3,l=t<e?-1:1,u=Math.cos(e),d=Math.sin(e),f=Math.cos(t),p=Math.sin(t),m=u*a+n,h=d*o+r,g=f*a+n,_=p*o+r,v=a*c*l,y=o*c*l;i.push(m-v*d,h+y*u,g+v*p,_-y*f,g,_)}for(var f,p,m,h,g=0;g<n;){var _=t[g++],v=g===1;switch(v&&(a=t[g],o=t[g+1],s=a,c=o,(_===a8.L||_===a8.C||_===a8.Q)&&(i=[s,c])),_){case a8.M:a=s=t[g++],o=c=t[g++],l(s,c);break;case a8.L:f=t[g++],p=t[g++],u(a,o,f,p),a=f,o=p;break;case a8.C:i.push(t[g++],t[g++],t[g++],t[g++],a=t[g++],o=t[g++]);break;case a8.Q:f=t[g++],p=t[g++],m=t[g++],h=t[g++],i.push(a+2/3*(f-a),o+2/3*(p-o),m+2/3*(f-m),h+2/3*(p-h),m,h),a=m,o=h;break;case a8.A:var y=t[g++],b=t[g++],x=t[g++],S=t[g++],C=t[g++],w=t[g++]+C;g+=1;var T=!t[g++];f=Math.cos(C)*x+y,p=Math.sin(C)*S+b,v?(s=f,c=p,l(s,c)):u(a,o,f,p),a=Math.cos(w)*x+y,o=Math.sin(w)*S+b;for(var E=(T?-1:1)*Math.PI/2,D=C;T?D>w:D<w;D+=E){var O=T?Math.max(D+E,w):Math.min(D+E,w);d(D,O,y,b,x,S)}break;case a8.R:s=a=t[g++],c=o=t[g++],f=s+t[g++],p=c+t[g++],l(f,c),u(f,c,f,p),u(f,p,s,p),u(s,p,s,c),u(s,c,f,c);break;case a8.Z:i&&u(a,o,s,c),a=s,o=c;break}}return i&&i.length>2&&r.push(i),r}function c8(e,t,n,r,i,a,o,s,c,l){if(o8(e,n)&&o8(t,r)&&o8(i,o)&&o8(a,s)){c.push(o,s);return}var u=2/l,d=u*u,f=o-e,p=s-t,m=Math.sqrt(f*f+p*p);f/=m,p/=m;var h=n-e,g=r-t,_=i-o,v=a-s,y=h*h+g*g,b=_*_+v*v;if(y<d&&b<d){c.push(o,s);return}var x=f*h+p*g,S=-f*_-p*v,C=y-x*x,w=b-S*S;if(C<d&&x>=0&&w<d&&S>=0){c.push(o,s);return}var T=[],E=[];xu(e,n,i,o,.5,T),xu(t,r,a,s,.5,E),c8(T[0],E[0],T[1],E[1],T[2],E[2],T[3],E[3],c,l),c8(T[4],E[4],T[5],E[5],T[6],E[6],T[7],E[7],c,l)}function Iie(e,t){var n=s8(e),r=[];t||=1;for(var i=0;i<n.length;i++){var a=n[i],o=[],s=a[0],c=a[1];o.push(s,c);for(var l=2;l<a.length;){var u=a[l++],d=a[l++],f=a[l++],p=a[l++],m=a[l++],h=a[l++];c8(s,c,u,d,f,p,m,h,o,t),s=m,c=h}r.push(o)}return r}function l8(e,t,n){var r=e[t],i=e[1-t],a=Math.abs(r/i),o=Math.ceil(Math.sqrt(a*n)),s=Math.floor(n/o);s===0&&(s=1,o=n);for(var c=[],l=0;l<o;l++)c.push(s);var u=n-o*s;if(u>0)for(var l=0;l<u;l++)c[l%o]+=1;return c}function u8(e,t,n){for(var r=e.r0,i=e.r,a=e.startAngle,o=e.endAngle,s=Math.abs(o-a),c=s*i,l=i-r,u=c>Math.abs(l),d=l8([c,l],+!u,t),f=(u?s:l)/d.length,p=0;p<d.length;p++)for(var m=(u?l:s)/d[p],h=0;h<d[p];h++){var g={};u?(g.startAngle=a+f*p,g.endAngle=a+f*(p+1),g.r0=r+m*h,g.r=r+m*(h+1)):(g.startAngle=a+m*h,g.endAngle=a+m*(h+1),g.r0=r+f*p,g.r=r+f*(p+1)),g.clockwise=e.clockwise,g.cx=e.cx,g.cy=e.cy,n.push(g)}}function Lie(e,t,n){for(var r=e.width,i=e.height,a=r>i,o=l8([r,i],+!a,t),s=a?`width`:`height`,c=a?`height`:`width`,l=a?`x`:`y`,u=a?`y`:`x`,d=e[s]/o.length,f=0;f<o.length;f++)for(var p=e[c]/o[f],m=0;m<o[f];m++){var h={};h[l]=f*d,h[u]=m*p,h[s]=d,h[c]=p,h.x+=e.x,h.y+=e.y,n.push(h)}}function d8(e,t,n,r){return e*r-n*t}function Rie(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=d8(u,d,c,l);if(Math.abs(f)<1e-6)return null;var p=d8(e-i,t-a,u,d)/f;return p<0||p>1?null:new J(p*c+e,p*l+t)}function zie(e,t,n){var r=new J;J.sub(r,n,t),r.normalize();var i=new J;return J.sub(i,e,t),i.dot(r)}function f8(e,t){var n=e[e.length-1];n&&n[0]===t[0]&&n[1]===t[1]||e.push(t)}function Bie(e,t,n){for(var r=e.length,i=[],a=0;a<r;a++){var o=e[a],s=e[(a+1)%r],c=Rie(o[0],o[1],s[0],s[1],t.x,t.y,n.x,n.y);c&&i.push({projPt:zie(c,t,n),pt:c,idx:a})}if(i.length<2)return[{points:e},{points:e}];i.sort(function(e,t){return e.projPt-t.projPt});var l=i[0],u=i[i.length-1];if(u.idx<l.idx){var d=l;l=u,u=d}for(var f=[l.pt.x,l.pt.y],p=[u.pt.x,u.pt.y],m=[f],h=[p],a=l.idx+1;a<=u.idx;a++)f8(m,e[a].slice());f8(m,p),f8(m,f);for(var a=u.idx+1;a<=l.idx+r;a++)f8(h,e[a%r].slice());return f8(h,f),f8(h,p),[{points:m},{points:h}]}function p8(e){var t=e.points,n=[],r=[];Wh(t,n,r);var i=new Ol(n[0],n[1],r[0]-n[0],r[1]-n[1]),a=i.width,o=i.height,s=i.x,c=i.y,l=new J,u=new J;return a>o?(l.x=u.x=s+a/2,l.y=c,u.y=c+o):(l.y=u.y=c+o/2,l.x=s,u.x=s+a),Bie(t,l,u)}function m8(e,t,n,r){if(n===1)r.push(t);else{var i=Math.floor(n/2),a=e(t);m8(e,a[0],i,r),m8(e,a[1],n-i,r)}return r}function Vie(e,t){for(var n=[],r=0;r<t;r++)n.push(Zv(e));return n}function Hie(e,t){t.setStyle(e.style),t.z=e.z,t.z2=e.z2,t.zlevel=e.zlevel}function Uie(e){for(var t=[],n=0;n<e.length;)t.push([e[n++],e[n++]]);return t}function Wie(e,t){var n=[],r=e.shape,i;switch(e.type){case`rect`:Lie(r,t,n),i=e_;break;case`sector`:u8(r,t,n),i=vy;break;case`circle`:u8({r0:0,r:r.r,startAngle:0,endAngle:Math.PI*2,cx:r.cx,cy:r.cy},t,n),i=vy;break;default:var a=e.getComputedTransform(),o=a?Math.sqrt(Math.max(a[0]*a[0]+a[1]*a[1],a[2]*a[2]+a[3]*a[3])):1,s=R(Iie(e.getUpdatedPathProxy(),o),function(e){return Uie(e)}),c=s.length;if(c===0)m8(p8,{points:s[0]},t,n);else if(c===t)for(var l=0;l<c;l++)n.push({points:s[l]});else{var u=0,d=R(s,function(e){var t=[],n=[];Wh(e,t,n);var r=(n[1]-t[1])*(n[0]-t[0]);return u+=r,{poly:e,area:r}});d.sort(function(e,t){return t.area-e.area});for(var f=t,l=0;l<c;l++){var p=d[l];if(f<=0)break;var m=l===c-1?f:Math.ceil(p.area/u*t);m<0||(m8(p8,{points:p.poly},m,n),f-=m)}}i=Sy;break}if(!i)return Vie(e,t);for(var h=[],l=0;l<n.length;l++){var g=new i;g.setShape(n[l]),Hie(e,g),h.push(g)}return h}function Gie(e,t){var n=e.length,r=t.length;if(n===r)return[e,t];for(var i=[],a=[],o=n<r?e:t,s=Math.min(n,r),c=Math.abs(r-n)/6,l=(s-2)/6,u=Math.ceil(c/l)+1,d=[o[0],o[1]],f=c,p=2;p<s;){var m=o[p-2],h=o[p-1],g=o[p++],_=o[p++],v=o[p++],y=o[p++],b=o[p++],x=o[p++];if(f<=0){d.push(g,_,v,y,b,x);continue}for(var S=Math.min(f,u-1)+1,C=1;C<=S;C++){var w=C/S;xu(m,g,v,b,w,i),xu(h,_,y,x,w,a),m=i[3],h=a[3],d.push(i[1],a[1],i[2],a[2],m,h),g=i[5],_=a[5],v=i[6],y=a[6]}f-=S-1}return o===e?[d,t]:[e,d]}function h8(e,t){for(var n=e.length,r=e[n-2],i=e[n-1],a=[],o=0;o<t.length;)a[o++]=r,a[o++]=i;return a}function Kie(e,t){for(var n,r,i,a=[],o=[],s=0;s<Math.max(e.length,t.length);s++){var c=e[s],l=t[s],u=void 0,d=void 0;c?l?(n=Gie(c,l),u=n[0],d=n[1],r=u,i=d):(d=h8(i||c,c),u=c):(u=h8(r||l,l),d=l),a.push(u),o.push(d)}return[a,o]}function g8(e){for(var t=0,n=0,r=0,i=e.length,a=0,o=i-2;a<i;o=a,a+=2){var s=e[o],c=e[o+1],l=e[a],u=e[a+1],d=s*u-l*c;t+=d,n+=(s+l)*d,r+=(c+u)*d}return t===0?[e[0]||0,e[1]||0]:[n/t/3,r/t/3,t]}function qie(e,t,n,r){for(var i=(e.length-2)/6,a=1/0,o=0,s=e.length,c=s-2,l=0;l<i;l++){for(var u=l*6,d=0,f=0;f<s;f+=2){var p=f===0?u:(u+f-2)%c+2,m=e[p]-n[0],h=e[p+1]-n[1],g=t[f]-r[0],_=t[f+1]-r[1],v=g-m,y=_-h;d+=v*v+y*y}d<a&&(a=d,o=l)}return o}function Jie(e){for(var t=[],n=e.length,r=0;r<n;r+=2)t[r]=e[n-r-2],t[r+1]=e[n-r-1];return t}function Yie(e,t,n,r){for(var i=[],a,o=0;o<e.length;o++){var s=e[o],c=t[o],l=g8(s),u=g8(c);a??=l[2]<0!=u[2]<0;var d=[],f=[],p=0,m=1/0,h=[],g=s.length;a&&(s=Jie(s));for(var _=qie(s,c,l,u)*6,v=g-2,y=0;y<v;y+=2){var b=(_+y)%v+2;d[y+2]=s[b]-l[0],d[y+3]=s[b+1]-l[1]}if(d[0]=s[_]-l[0],d[1]=s[_+1]-l[1],n>0)for(var x=r/n,S=-r/2;S<=r/2;S+=x){for(var C=Math.sin(S),w=Math.cos(S),T=0,y=0;y<s.length;y+=2){var E=d[y],D=d[y+1],O=c[y]-u[0],k=c[y+1]-u[1],A=O*w-k*C,j=O*C+k*w;h[y]=A,h[y+1]=j;var ee=A-E,te=j-D;T+=ee*ee+te*te}if(T<m){m=T,p=S;for(var ne=0;ne<h.length;ne++)f[ne]=h[ne]}}else for(var re=0;re<g;re+=2)f[re]=c[re]-u[0],f[re+1]=c[re+1]-u[1];i.push({from:d,to:f,fromCp:l,toCp:u,rotation:-p})}return i}function _8(e){return e.__isCombineMorphing}var v8=`__mOriginal_`;function y8(e,t,n){var r=v8+t,i=e[r]||e[t];e[r]||(e[r]=e[t]);var a=n.replace,o=n.after,s=n.before;e[t]=function(){var e=arguments,t;return s&&s.apply(this,e),t=a?a.apply(this,e):i.apply(this,e),o&&o.apply(this,e),t}}function b8(e,t){var n=v8+t;e[n]&&(e[t]=e[n],e[n]=null)}function x8(e,t){for(var n=0;n<e.length;n++)for(var r=e[n],i=0;i<r.length;){var a=r[i],o=r[i+1];r[i++]=t[0]*a+t[2]*o+t[4],r[i++]=t[1]*a+t[3]*o+t[5]}}function S8(e,t){var n=e.getUpdatedPathProxy(),r=t.getUpdatedPathProxy(),i=Kie(s8(n),s8(r)),a=i[0],o=i[1],s=e.getComputedTransform(),c=t.getComputedTransform();function l(){this.transform=null}s&&x8(a,s),c&&x8(o,c),y8(t,`updateTransform`,{replace:l}),t.transform=null;var u=Yie(a,o,10,Math.PI),d=[];y8(t,`buildPath`,{replace:function(e){for(var n=t.__morphT,r=1-n,i=[],a=0;a<u.length;a++){var o=u[a],s=o.from,c=o.to,l=o.rotation*n,f=o.fromCp,p=o.toCp,m=Math.sin(l),h=Math.cos(l);wc(i,f,p,n);for(var g=0;g<s.length;g+=2){var _=s[g],v=s[g+1],y=c[g],b=c[g+1],x=_*r+y*n,S=v*r+b*n;d[g]=x*h-S*m+i[0],d[g+1]=x*m+S*h+i[1]}var C=d[0],w=d[1];e.moveTo(C,w);for(var g=2;g<s.length;){var y=d[g++],b=d[g++],T=d[g++],E=d[g++],D=d[g++],O=d[g++];C===y&&w===b&&T===D&&E===O?e.lineTo(D,O):e.bezierCurveTo(y,b,T,E,D,O),C=D,w=O}}}})}function C8(e,t,n){if(!e||!t)return t;var r=n.done,i=n.during;S8(e,t),t.__morphT=0;function a(){b8(t,`buildPath`),b8(t,`updateTransform`),t.__morphT=-1,t.createPathProxy(),t.dirtyShape()}return t.animateTo({__morphT:1},I({during:function(e){t.dirtyShape(),i&&i(e)},done:function(){a(),r&&r()}},n)),t}function Xie(e,t,n,r,i,a){var o=16;e=i===n?0:Math.round(32767*(e-n)/(i-n)),t=a===r?0:Math.round(32767*(t-r)/(a-r));for(var s=0,c,l=(1<<o)/2;l>0;l/=2){var u=0,d=0;(e&l)>0&&(u=1),(t&l)>0&&(d=1),s+=l*l*(3*u^d),d===0&&(u===1&&(e=l-1-e,t=l-1-t),c=e,e=t,t=c)}return s}function w8(e){var t=1/0,n=1/0,r=-1/0,i=-1/0;return R(R(e,function(e){var a=e.getBoundingRect(),o=e.getComputedTransform(),s=a.x+a.width/2+(o?o[4]:0),c=a.y+a.height/2+(o?o[5]:0);return t=Math.min(s,t),n=Math.min(c,n),r=Math.max(s,r),i=Math.max(c,i),[s,c]}),function(a,o){return{cp:a,z:Xie(a[0],a[1],t,n,r,i),path:e[o]}}).sort(function(e,t){return e.z-t.z}).map(function(e){return e.path})}function T8(e){return Wie(e.path,e.count)}function E8(){return{fromIndividuals:[],toIndividuals:[],count:0}}function Zie(e,t,n){var r=[];function i(e){for(var t=0;t<e.length;t++){var n=e[t];_8(n)?i(n.childrenRef()):n instanceof Bg&&r.push(n)}}i(e);var a=r.length;if(!a)return E8();var o=(n.dividePath||T8)({path:t,count:a});if(o.length!==a)return console.error(`Invalid morphing: unmatched splitted path`),E8();r=w8(r),o=w8(o);for(var s=n.done,c=n.during,l=n.individualDelay,u=new Af,d=0;d<a;d++){var f=r[d],p=o[d];p.parent=t,p.copyTransform(u),l||S8(f,p)}t.__isCombineMorphing=!0,t.childrenRef=function(){return o};function m(e){for(var t=0;t<o.length;t++)o[t].addSelfToZr(e)}y8(t,`addSelfToZr`,{after:function(e){m(e)}}),y8(t,`removeSelfFromZr`,{after:function(e){for(var t=0;t<o.length;t++)o[t].removeSelfFromZr(e)}});function h(){t.__isCombineMorphing=!1,t.__morphT=-1,t.childrenRef=null,b8(t,`addSelfToZr`),b8(t,`removeSelfFromZr`)}var g=o.length;if(l)for(var _=g,v=function(){_--,_===0&&(h(),s&&s())},d=0;d<g;d++){var y=l?I({delay:(n.delay||0)+l(d,g,r[d],o[d]),done:v},n):n;C8(r[d],o[d],y)}else t.__morphT=0,t.animateTo({__morphT:1},I({during:function(e){for(var n=0;n<g;n++){var r=o[n];r.__morphT=t.__morphT,r.dirtyShape()}c&&c(e)},done:function(){h();for(var t=0;t<e.length;t++)b8(e[t],`updateTransform`);s&&s()}},n));return t.__zr&&m(t.__zr),{fromIndividuals:r,toIndividuals:o,count:g}}function Qie(e,t,n){var r=t.length,i=[],a=n.dividePath||T8;function o(e){for(var t=0;t<e.length;t++){var n=e[t];_8(n)?o(n.childrenRef()):n instanceof Bg&&i.push(n)}}if(_8(e)){o(e.childrenRef());var s=i.length;if(s<r)for(var c=0,l=s;l<r;l++)i.push(Zv(i[c++%s]));i.length=r}else{i=a({path:e,count:r});for(var u=e.getComputedTransform(),l=0;l<i.length;l++)i[l].setLocalTransform(u);if(i.length!==r)return console.error(`Invalid morphing: unmatched splitted path`),E8()}i=w8(i),t=w8(t);for(var d=n.individualDelay,l=0;l<r;l++){var f=d?I({delay:(n.delay||0)+d(l,r,i[l],t[l])},n):n;C8(i[l],t[l],f)}return{fromIndividuals:i,toIndividuals:t,count:t.length}}function D8(e){return B(e[0])}function O8(e,t){for(var n=[],r=e.length,i=0;i<r;i++)n.push({one:e[i],many:[]});for(var i=0;i<t.length;i++){var a=t[i].length,o=void 0;for(o=0;o<a;o++)n[o%r].many.push(t[i][o])}for(var s=0,i=r-1;i>=0;i--)if(!n[i].many.length){var c=n[s].many;if(c.length<=1)if(s)s=0;else return n;var a=c.length,l=Math.ceil(a/2);n[i].many=c.slice(l,a),n[s].many=c.slice(0,l),s++}return n}var $ie={clone:function(e){for(var t=[],n=1-(1-e.path.style.opacity)**(1/e.count),r=0;r<e.count;r++){var i=Zv(e.path);i.setStyle(`opacity`,n),t.push(i)}return t},split:null};function k8(e,t,n,r,i,a){if(!e.length||!t.length)return;var o=Hy(`update`,r,i);if(!(o&&o.duration>0))return;var s=r.getModel(`universalTransition`).get(`delay`),c=Object.assign({setToFinal:!0},o),l,u;D8(e)&&(l=e,u=t),D8(t)&&(l=t,u=e);function d(e,t,r,i,o){var l=e.many,u=e.one;if(l.length===1&&!o){var f=t?l[0]:u,p=t?u:l[0];if(_8(f))d({many:[f],one:p},!0,r,i,!0);else{var m=s?I({delay:s(r,i)},c):c;C8(f,p,m),a(f,p,f,p,m)}}else for(var h=I({dividePath:$ie[n],individualDelay:s&&function(e,t,n,a){return s(e+r,i)}},c),g=t?Zie(l,u,h):Qie(u,l,h),_=g.fromIndividuals,v=g.toIndividuals,y=_.length,b=0;b<y;b++){var m=s?I({delay:s(b,y)},c):c;a(_[b],v[b],t?l[b]:e.one,t?e.one:l[b],m)}}for(var f=l?l===e:e.length>t.length,p=l?O8(u,l):O8(f?t:e,[f?e:t]),m=0,h=0;h<p.length;h++)m+=p[h].many.length;for(var g=0,h=0;h<p.length;h++)d(p[h],f,g,m),g+=p[h].many.length}function A8(e){if(!e)return[];if(B(e)){for(var t=[],n=0;n<e.length;n++)t.push(A8(e[n]));return t}var r=[];return e.traverse(function(e){e instanceof Bg&&!e.disableMorphing&&!e.invisible&&!e.ignore&&r.push(e)}),r}var j8=1e4,eae=0,M8=1,N8=2,tae=Cm();function nae(e,t){for(var n=e.dimensions,r=0;r<n.length;r++){var i=e.getDimensionInfo(n[r]);if(i&&i.otherDims[t]===0)return n[r]}}function rae(e,t,n){var r=e.getDimensionInfo(n),i=r&&r.ordinalMeta;if(r){var a=e.get(r.name,t);return i&&i.categories[a]||a+``}}function P8(e,t,n,r){var i=nae(e,r?`itemChildGroupId`:`itemGroupId`);if(i)return rae(e,t,i);var a=e.getRawDataItem(t),o=r?`childGroupId`:`groupId`;if(a&&a[o])return a[o]+``;if(!r)return n||e.getId(t)}function F8(e){var t=[];return L(e,function(e){var n=e.data,r=e.dataGroupId;if(n.count()>j8){process.env.NODE_ENV!==`production`&&Wp(`Universal transition is disabled on large data > 10k.`);return}for(var i=n.getIndices(),a=0;a<i.length;a++)t.push({data:n,groupId:P8(n,a,r,!1),childGroupId:P8(n,a,r,!0),divide:e.divide,dataIndex:a})}),t}function I8(e,t,n){e.traverse(function(e){e instanceof Bg&&Gy(e,{style:{opacity:0}},t,{dataIndex:n,isFrom:!0})})}function L8(e){if(e.parent){var t=e.getComputedTransform();e.setLocalTransform(t),e.parent.remove(e)}}function R8(e){e.stopAnimation(),e.isGroup&&e.traverse(function(e){e.stopAnimation()})}function iae(e,t,n){var r=Hy(`update`,n,t);r&&e.traverse(function(e){if(e instanceof Mh){var t=Hte(e);t&&e.animateFrom({style:t},r)}})}function aae(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++){var i=e[r],a=t[r];if(i.data.getId(i.dataIndex)!==a.data.getId(a.dataIndex))return!1}return!0}function z8(e,t,n){var r=F8(e),i=F8(t);function a(e,t,n,r,i){(n||e)&&t.animateFrom({style:n&&n!==e?F(F({},n.style),e.style):e.style},i)}var o=!1,s=eae,c=K(),l=K();r.forEach(function(e){e.groupId&&c.set(e.groupId,!0),e.childGroupId&&l.set(e.childGroupId,!0)});for(var u=0;u<i.length;u++){var d=i[u].groupId;if(l.get(d)){s=M8;break}var f=i[u].childGroupId;if(f&&c.get(f)){s=N8;break}}function p(e,t){return function(n){var r=n.data,i=n.dataIndex;return t?r.getId(i):e?s===M8?n.childGroupId:n.groupId:s===N8?n.childGroupId:n.groupId}}var m=aae(r,i),h={};if(!m)for(var u=0;u<i.length;u++){var g=i[u],_=g.data.getItemGraphicEl(g.dataIndex);_&&(h[_.id]=!0)}function v(e,t){var n=r[t],s=i[e],c=s.data.hostModel,l=n.data.getItemGraphicEl(n.dataIndex),u=s.data.getItemGraphicEl(s.dataIndex);if(l===u){u&&iae(u,s.dataIndex,c);return}l&&h[l.id]||u&&(R8(u),l?(R8(l),L8(l),o=!0,k8(A8(l),A8(u),s.divide,c,e,a)):I8(u,c,e))}new Ik(r,i,p(!0,m),p(!1,m),null,`multiple`).update(v).updateManyToOne(function(e,t){var n=i[e],s=n.data,c=s.hostModel,l=s.getItemGraphicEl(n.dataIndex),u=Fs(R(t,function(e){return r[e].data.getItemGraphicEl(r[e].dataIndex)}),function(e){return e&&e!==l&&!h[e.id]});l&&(R8(l),u.length?(L(u,function(e){R8(e),L8(e)}),o=!0,k8(A8(u),A8(l),n.divide,c,e,a)):I8(l,c,n.dataIndex))}).updateOneToMany(function(e,t){var n=r[t],s=n.data.getItemGraphicEl(n.dataIndex);if(!(s&&h[s.id])){var c=Fs(R(e,function(e){return i[e].data.getItemGraphicEl(i[e].dataIndex)}),function(e){return e&&e!==s}),l=i[e[0]].data.hostModel;c.length&&(L(c,function(e){return R8(e)}),s?(R8(s),L8(s),o=!0,k8(A8(s),A8(c),n.divide,l,e[0],a)):L(c,function(t){return I8(t,l,e[0])}))}}).updateManyToMany(function(e,t){new Ik(t,e,function(e){return r[e].data.getId(r[e].dataIndex)},function(e){return i[e].data.getId(i[e].dataIndex)}).update(function(n,r){v(e[n],t[r])}).execute()}).execute(),o&&L(t,function(e){var t=e.data.hostModel,r=t&&n.getViewOfSeriesModel(t),i=Hy(`update`,t,0);r&&t.isAnimationEnabled()&&i&&i.duration>0&&r.group.traverse(function(e){e instanceof Bg&&!e.animators.length&&e.animateFrom({style:{opacity:0}},i)})})}function B8(e){return e.getModel(`universalTransition`).get(`seriesKey`)||e.id}function V8(e){return B(e)?e.sort().join(`,`):e}function H8(e){if(e.hostModel)return e.hostModel.getModel(`universalTransition`).get(`divideShape`)}function oae(e,t){var n=K(),r=K(),i=K();L(e.oldSeries,function(t,n){var a=e.oldDataGroupIds[n],o=e.oldData[n],s=B8(t),c=V8(s);r.set(c,{dataGroupId:a,data:o}),B(s)&&L(s,function(e){i.set(e,{key:c,dataGroupId:a,data:o})})});function a(e){n.get(e)&&Wp(`Duplicated seriesKey in universalTransition `+e)}return L(t.updatedSeries,function(e){if(e.isUniversalTransitionEnabled()&&e.isAnimationEnabled()){var t=e.get(`dataGroupId`),o=e.getData(),s=B8(e),c=V8(s),l=r.get(c);if(l)process.env.NODE_ENV!==`production`&&a(c),n.set(c,{oldSeries:[{dataGroupId:l.dataGroupId,divide:H8(l.data),data:l.data}],newSeries:[{dataGroupId:t,divide:H8(o),data:o}]});else if(B(s)){process.env.NODE_ENV!==`production`&&a(c);var u=[];L(s,function(e){var t=r.get(e);t.data&&u.push({dataGroupId:t.dataGroupId,divide:H8(t.data),data:t.data})}),u.length&&n.set(c,{oldSeries:u,newSeries:[{dataGroupId:t,data:o,divide:H8(o)}]})}else{var d=i.get(s);if(d){var f=n.get(d.key);f||(f={oldSeries:[{dataGroupId:d.dataGroupId,data:d.data,divide:H8(d.data)}],newSeries:[]},n.set(d.key,f)),f.newSeries.push({dataGroupId:t,data:o,divide:H8(o)})}}}}),n}function U8(e,t){for(var n=0;n<e.length;n++)if(t.seriesIndex!=null&&t.seriesIndex===e[n].seriesIndex||t.seriesId!=null&&t.seriesId===e[n].id)return n}function sae(e,t,n,r){var i=[],a=[];L($p(e.from),function(e){var n=U8(t.oldSeries,e);n>=0&&i.push({dataGroupId:t.oldDataGroupIds[n],data:t.oldData[n],divide:H8(t.oldData[n]),groupIdDim:e.dimension})}),L($p(e.to),function(e){var r=U8(n.updatedSeries,e);if(r>=0){var i=n.updatedSeries[r].getData();a.push({dataGroupId:t.oldDataGroupIds[r],data:i,divide:H8(i),groupIdDim:e.dimension})}}),i.length>0&&a.length>0&&z8(i,a,r)}function cae(e){e.registerUpdateLifecycle(`series:beforeupdate`,function(e,t,n){L($p(n.seriesTransition),function(e){L($p(e.to),function(e){for(var t=n.updatedSeries,r=0;r<t.length;r++)(e.seriesIndex!=null&&e.seriesIndex===t[r].seriesIndex||e.seriesId!=null&&e.seriesId===t[r].id)&&(t[r][aE]=!0)})})}),e.registerUpdateLifecycle(`series:transition`,function(e,t,n){var r=tae(t);if(r.oldSeries&&n.updatedSeries&&n.optionChanged){var i=n.seriesTransition;if(i)L($p(i),function(e){sae(e,r,n,t)});else{var a=oae(r,n);L(a.keys(),function(e){var n=a.get(e);z8(n.oldSeries,n.newSeries,t)})}L(n.updatedSeries,function(e){e.__universalTransitionEnabled&&(e[aE]=!1)})}for(var o=e.getSeries(),s=r.oldSeries=[],c=r.oldDataGroupIds=[],l=r.oldData=[],u=0;u<o.length;u++){var d=o[u].getData();d.count()<j8&&(s.push(o[u]),c.push(o[u].get(`dataGroupId`)),l.push(d))}})}var lae=function(){function e(){this.breaks=[],this._elapsedExtent=[1/0,-1/0]}return e.prototype.setBreaks=function(e){this.breaks=e.breaks},e.prototype.update=function(e){dae(this,e);var t=this._elapsedExtent;t[0]=this.elapse(e[0]),t[1]=this.elapse(e[1])},e.prototype.hasBreaks=function(){return!!this.breaks.length},e.prototype.calcNiceTickMultiple=function(e,t){for(var n=0;n<this.breaks.length;n++){var r=this.breaks[n];if(r.vmin<e&&e<r.vmax){var i=t(e,r.vmax);return process.env.NODE_ENV!==`production`&&G(i>=0&&Math.round(i)===i),i}}return 0},e.prototype.getExtentSpan=function(){return this._elapsedExtent[1]-this._elapsedExtent[0]},e.prototype.normalize=function(e){var t=this._elapsedExtent[1]-this._elapsedExtent[0];return t===0?.5:(this.elapse(e)-this._elapsedExtent[0])/t},e.prototype.scale=function(e){return this.unelapse(e*(this._elapsedExtent[1]-this._elapsedExtent[0])+this._elapsedExtent[0])},e.prototype.elapse=function(e){for(var t=W8,n=G8,r=!0,i=0;i<this.breaks.length;i++){var a=this.breaks[i];if(e<=a.vmax){e>a.vmin?t+=a.vmin-n+(e-a.vmin)/(a.vmax-a.vmin)*a.gapReal:t+=e-n,n=a.vmax,r=!1;break}t+=a.vmin-n+a.gapReal,n=a.vmax}return r&&(t+=e-n),t},e.prototype.unelapse=function(e){for(var t=W8,n=G8,r=!0,i=0,a=0;a<this.breaks.length;a++){var o=this.breaks[a],s=t+o.vmin-n,c=s+o.gapReal;if(e<=c){i=e>s?o.vmin+(e-s)/(c-s)*(o.vmax-o.vmin):n+e-t,n=o.vmax,r=!1;break}t=c,n=o.vmax}return r&&(i=n+e-t),i},e}();function uae(){return new lae}var W8=0,G8=0;function dae(e,t){var n=0,r={tpAbs:{span:0,val:0},tpPrct:{span:0,val:0}},i=function(){return{has:!1,span:NaN,inExtFrac:NaN,val:NaN}},a={S:{tpAbs:i(),tpPrct:i()},E:{tpAbs:i(),tpPrct:i()}};L(e.breaks,function(e){var i=e.gapParsed;i.type===`tpPrct`&&(n+=i.val);var o=K8(e,t);if(o){var s=o.vmin!==e.vmin,c=o.vmax!==e.vmax,l=o.vmax-o.vmin;if(!(s&&c))if(s||c){var u=s?`S`:`E`;a[u][i.type].has=!0,a[u][i.type].span=l,a[u][i.type].inExtFrac=l/(e.vmax-e.vmin),a[u][i.type].val=i.val}else r[i.type].span+=l,r[i.type].val+=i.val}});var o=n*(0+(t[1]-t[0])+(r.tpAbs.val-r.tpAbs.span)+(a.S.tpAbs.has?(a.S.tpAbs.val-a.S.tpAbs.span)*a.S.tpAbs.inExtFrac:0)+(a.E.tpAbs.has?(a.E.tpAbs.val-a.E.tpAbs.span)*a.E.tpAbs.inExtFrac:0)-r.tpPrct.span-(a.S.tpPrct.has?a.S.tpPrct.span*a.S.tpPrct.inExtFrac:0)-(a.E.tpPrct.has?a.E.tpPrct.span*a.E.tpPrct.inExtFrac:0))/(1-r.tpPrct.val-(a.S.tpPrct.has?a.S.tpPrct.val*a.S.tpPrct.inExtFrac:0)-(a.E.tpPrct.has?a.E.tpPrct.val*a.E.tpPrct.inExtFrac:0));L(e.breaks,function(e){var t=e.gapParsed;t.type===`tpPrct`&&(e.gapReal=n===0?0:Math.max(o,0)*t.val/n),t.type===`tpAbs`&&(e.gapReal=t.val),e.gapReal??=0})}function fae(e,t,n,r,i,a){e!==`no`&&L(n,function(n){var o=K8(n,a);if(o)for(var s=t.length-1;s>=0;s--){var c=t[s],l=r(c),u=i*3/4;l>o.vmin-u&&l<o.vmax+u&&(e!==`preserve_extent_bound`||l!==a[0]&&l!==a[1])&&t.splice(s,1)}})}function pae(e,t,n,r){L(t,function(t){var i=K8(t,n);i&&(e.push({value:i.vmin,break:{type:`vmin`,parsedBreak:i},time:r?r(i):void 0}),e.push({value:i.vmax,break:{type:`vmax`,parsedBreak:i},time:r?r(i):void 0}))}),t.length&&e.sort(function(e,t){return e.value-t.value})}function K8(e,t){var n=Math.max(e.vmin,t[0]),r=Math.min(e.vmax,t[1]);return n<r||n===r&&n>t[0]&&n<t[1]?{vmin:n,vmax:r,breakOption:e.breakOption,gapParsed:e.gapParsed,gapReal:e.gapReal}:null}function q8(e,t,n){var r=[];if(!e)return{breaks:r};function i(e,t){return e>=0&&e<.99999?!0:(process.env.NODE_ENV!==`production`&&Gp(t+` must be >= 0 and < 1, rather than `+e+` .`),!1)}L(e,function(e){if(!e||e.start==null||e.end==null){process.env.NODE_ENV!==`production`&&Gp(`The input axis breaks start/end should not be empty.`);return}if(!e.isExpanded){var a={breakOption:P(e),vmin:t(e.start),vmax:t(e.end),gapParsed:{type:`tpAbs`,val:0},gapReal:null};if(e.gap!=null){var o=!1;if(H(e.gap)){var s=Zs(e.gap);if(s.match(/%$/)){var c=parseFloat(s)/100;i(c,`Percent gap`)||(c=0),a.gapParsed.type=`tpPrct`,a.gapParsed.val=c,o=!0}}if(!o){var l=t(e.gap);(!isFinite(l)||l<0)&&(process.env.NODE_ENV!==`production`&&Gp(`Axis breaks gap must positive finite rather than (`+e.gap+`).`),l=0),a.gapParsed.type=`tpAbs`,a.gapParsed.val=l}}if(a.vmin===a.vmax&&(a.gapParsed.type=`tpAbs`,a.gapParsed.val=0),n&&n.noNegative&&L([`vmin`,`vmax`],function(e){a[e]<0&&(process.env.NODE_ENV!==`production`&&Gp(`Axis break.`+e+` must not be negative.`),a[e]=0)}),a.vmin>a.vmax){var u=a.vmax;a.vmax=a.vmin,a.vmin=u}r.push(a)}}),r.sort(function(e,t){return e.vmin-t.vmin});var a=-1/0;return L(r,function(e,t){a>e.vmin&&(process.env.NODE_ENV!==`production`&&Gp(`Axis breaks must not overlap.`),r[t]=null),a=e.vmax}),{breaks:r.filter(function(e){return!!e})}}function J8(e,t){return Y8(t)===Y8(e)}function Y8(e){return e.start+`_\0_`+e.end}function mae(e,t,n){var r=[];L(e,function(e,n){var i=t(e);i&&i.type===`vmin`&&r.push([n])}),L(e,function(n,i){var a=t(n);if(a&&a.type===`vmax`){var o=Is(r,function(n){return J8(t(e[n[0]]).parsedBreak.breakOption,a.parsedBreak.breakOption)});o&&o.push(i)}});var i=[];return L(r,function(t){t.length===2&&i.push(n?t:[e[t[0]],e[t[1]]])}),i}function hae(e,t,n,r){var i,a;if(e.break){var o=e.break.parsedBreak,s=Is(n,function(t){return J8(t.breakOption,e.break.parsedBreak.breakOption)}),c=r(t**+o.vmin,s.vmin),l=r(t**+o.vmax,s.vmax),u={type:o.gapParsed.type,val:o.gapParsed.type===`tpAbs`?wp(t**+(o.vmin+o.gapParsed.val))-c:o.gapParsed.val};i={type:e.break.type,parsedBreak:{breakOption:o.breakOption,vmin:c,vmax:l,gapParsed:u,gapReal:o.gapReal}},a=s[e.break.type]}return{brkRoundingCriterion:a,vBreak:i}}function gae(e,t,n){var r={noNegative:!0},i=q8(e,n,r),a=q8(e,n,r),o=Math.log(t);return a.breaks=R(a.breaks,function(e){var t=Math.log(e.vmin)/o;return{vmin:t,vmax:Math.log(e.vmax)/o,gapParsed:{type:e.gapParsed.type,val:e.gapParsed.type===`tpAbs`?Math.log(e.vmin+e.gapParsed.val)/o-t:e.gapParsed.val},gapReal:e.gapReal,breakOption:e.breakOption}}),{parsedOriginal:i,parsedLogged:a}}var _ae={vmin:`start`,vmax:`end`};function vae(e,t){return t&&(e||={},e.break={type:_ae[t.type],start:t.parsedBreak.vmin,end:t.parsedBreak.vmax}),e}function yae(){yx({createScaleBreakContext:uae,pruneTicksByBreak:fae,addBreaksToTicks:pae,parseAxisBreakOption:q8,identifyAxisBreak:J8,serializeAxisBreakIdentifier:Y8,retrieveAxisBreakPairs:mae,getTicksLogTransformBreak:hae,logarithmicParseBreaksFromOption:gae,makeAxisLabelFormatterParamBreak:vae})}var X8=Cm();function bae(e,t){var n=Is(e,function(e){return bx().identifyAxisBreak(e.parsedBreak.breakOption,t.breakOption)});return n||e.push(n={zigzagRandomList:[],parsedBreak:t,shouldRemove:!1}),n}function xae(e){L(e,function(e){return e.shouldRemove=!0})}function Sae(e){for(var t=e.length-1;t>=0;t--)e[t].shouldRemove&&e.splice(t,1)}function Cae(e,t,n,r,i){var a=n.axis;if(a.scale.isBlank()||!bx())return;var o=bx().retrieveAxisBreakPairs(a.scale.getTicks({breakTicks:`only_break`}),function(e){return e.break},!1);if(!o.length)return;var s=n.getModel(`breakArea`),c=s.get(`zigzagAmplitude`),l=s.get(`zigzagMinSpan`),u=s.get(`zigzagMaxSpan`);l=Math.max(2,l||0),u=Math.max(l,u||0);var d=s.get(`expandOnClick`),f=s.get(`zigzagZ`),p=s.getModel(`itemStyle`).getItemStyle(),m=p.stroke,h=p.lineWidth,g=p.lineDash,_=p.fill,v=new Y({ignoreModelZ:!0}),y=a.isHorizontal(),b=X8(t).visualList||(X8(t).visualList=[]);xae(b);for(var x=function(e){var t=o[e][0].break.parsedBreak,r=[];r[0]=a.toGlobalCoord(a.dataToCoord(t.vmin,!0)),r[1]=a.toGlobalCoord(a.dataToCoord(t.vmax,!0)),r[1]<r[0]&&r.reverse();var s=bae(b,t);s.shouldRemove=!1;var c=new Y;C(s.zigzagRandomList,c,r[0],r[1],y,t),d&&c.on(`click`,function(){var e={type:NI,breaks:[{start:t.breakOption.start,end:t.breakOption.end}]};e[a.dim+`AxisIndex`]=n.componentIndex,i.dispatchAction(e)}),c.silent=!d,v.add(c)},S=0;S<o.length;S++)x(S);e.add(v),Sae(b);function C(e,t,n,i,a,o){var s={stroke:m,lineWidth:h,lineDash:g,fill:`none`},d=+!a,v=1-d,y=r[$y[v]]+r[eb[v]];function b(e){var t=[],n=[];t[d]=n[d]=e,t[v]=r[$y[v]],n[v]=y;var i={x1:t[0],y1:t[1],x2:n[0],y2:n[1]};return Yg(i,i,{lineWidth:1}),t[0]=i.x1,t[1]=i.y1,t[d]}n=b(n),i=b(i);for(var x=[],S=[],C=!0,w=r[$y[v]],T=0;;T++){var E=w===r[$y[v]],D=w>=y;D&&(w=y);var O=[],k=[];O[d]=n,k[d]=i,!E&&!D&&(O[d]+=C?-c:c,k[d]-=C?c:-c),O[v]=w,k[v]=w,x.push(O),S.push(k);var A=void 0;if(T<e.length?A=e[T]:(A=Math.random(),e.push(A)),w+=A*(u-l)+l,C=!C,D)break}var j=bx().serializeAxisBreakIdentifier(o.breakOption);if(t.add(new Cy({anid:`break_a_`+j,shape:{points:x},style:s,z:f})),o.gapReal!==0){t.add(new Cy({anid:`break_b_`+j,shape:{points:S},style:s,z:f}));var ee=S.slice();ee.reverse();var te=x.concat(ee);t.add(new Sy({anid:`break_c_`+j,shape:{points:te},style:{fill:_,opacity:p.opacity},z:f}))}}}function wae(e,t,n,r){var i=e.axis,a=n.transform;G(r.style);var o=i.getExtent();i.inverse&&(o=o.slice(),o.reverse());var s=R(bx().retrieveAxisBreakPairs(i.scale.getTicks({breakTicks:`only_break`}),function(e){return e.break},!1),function(e){var t=e[0].break.parsedBreak,n=[i.dataToCoord(t.vmin,!0),i.dataToCoord(t.vmax,!0)];return n[0]>n[1]&&n.reverse(),{coordPair:n,brkId:bx().serializeAxisBreakIdentifier(t.breakOption)}});s.sort(function(e,t){return e.coordPair[0]-t.coordPair[0]});for(var c=o[0],l=null,u=0;u<s.length;u++){var d=s[u],f=Math.max(d.coordPair[0],o[0]),p=Math.min(d.coordPair[1],o[1]);c<=f&&m(c,f,l,d),c=p,l=d}c<=o[1]&&m(c,o[1],l,null);function m(e,n,i,o){function s(e,t){a&&(Tc(e,e,a),Tc(t,t,a))}function c(e,t){var n={x1:e[0],y1:e[1],x2:t[0],y2:t[1]};Yg(n,n,r.style),e[0]=n.x1,e[1]=n.y1,t[0]=n.x2,t[1]=n.y2}var l=[e,0],u=[n,0],d=[e,5],f=[n,5];s(l,d),c(l,d),s(u,f),c(u,f),c(l,u);var p=new wy(F({shape:{x1:l[0],y1:l[1],x2:u[0],y2:u[1]}},r));t.add(p),p.anid=`breakLine_`+(i?i.brkId:`\0`)+`_\0_`+(o?o.brkId:`\0`)}}function Tae(e,t,n){if(Is(n,function(e){return!e}))return;var r=new J;if(!TN(n[0],n[1],r,{direction:-(e?t+Math.PI:t),touchThreshold:0,bidirectional:!1}))return;var i=sl();fl(i,i,-t);var a=R(n,function(e){return e.transform?ul(sl(),i,e.transform):i});function o(e){var t=n[0].localRect,r=new J(t[eb[e]]*a[0][0],t[eb[e]]*a[0][1]);return Math.abs(r.y)<1e-5}var s=.5;if(o(0)||o(1)){var c=R(n,function(e,t){var n=e.localRect.clone();return n.applyTransform(a[t]),n}),l=new J;l.copy(n[0].label).add(n[1].label).scale(.5),l.transform(i);var u=r.clone().transform(i),d=(c[0].x+c[1].x+(u.x>=0?c[0].width:c[1].width)+u.x)/2-l.x,f=Math.min(d,d-u.x),p=Math.max(d,d-u.x);s=(d-(p<0?p:f>0?f:0))/u.x}var m=new J,h=new J;J.scale(m,r,-s),J.scale(h,r,1-s),yN(n[0],m),yN(n[1],h)}function Eae(e,t){var n={breaks:[]};return L(t.breaks,function(r){if(r){var i=Is(e.get(`breaks`,!0),function(e){return bx().identifyAxisBreak(e,r)});if(!i){process.env.NODE_ENV!==`production`&&Wp(`Can not find axis break by start: `+r.start+`, end: `+r.end);return}var a=t.type,o={isExpanded:!!i.isExpanded};i.isExpanded=a===`expandAxisBreak`?!0:a===`collapseAxisBreak`?!1:a===`toggleAxisBreak`?!i.isExpanded:i.isExpanded,n.breaks.push({start:i.start,end:i.end,isExpanded:!!i.isExpanded,old:o})}}),n}function Dae(){$re({adjustBreakLabelPair:Tae,buildAxisBreakLine:wae,rectCoordBuildBreakAxis:Cae,updateModelAxisBreak:Eae})}function Oae(e){II(e),yae(),Dae()}function kae(){jL(Aae)}function Aae(e,t){L(e,function(e){if(!e.model.get([`axisLabel`,`inside`])){var n=jae(e);if(n){var r=e.isHorizontal()?`height`:`width`,i=e.model.get([`axisLabel`,`margin`]);t[r]-=n[r]+i,e.position===`top`?t.y+=n.height+i:e.position===`left`&&(t.x+=n.width+i)}}})}function jae(e){var t=e.model,n=e.scale;if(!t.get([`axisLabel`,`show`])||n.isBlank())return;var r,i,a=n.getExtent();n instanceof WA?i=n.count():(r=n.getTicks(),i=r.length);var o=e.getLabelModel(),s=zj(e),c,l=1;i>40&&(l=Math.ceil(i/40));for(var u=0;u<i;u+=l){var d=s(r?r[u]:{value:a[0]+u},u),f=p(o.getTextRect(d),o.get(`rotate`)||0);c?c.union(f):c=f}return c;function p(e,t){var n=t*Math.PI/180,r=e.width,i=e.height,a=r*Math.abs(Math.cos(n))+Math.abs(i*Math.sin(n)),o=r*Math.abs(Math.sin(n))+Math.abs(i*Math.cos(n));return new Ol(e.x,e.y,a,o)}}Nk([$ne]),Nk([Jne]),Nk([yre,Pre,Wre,mR,kR,TB,vV,HH,rW,pW,bW,OW,xK,ZK,pq,zq,Wq,aJ,pJ,VJ,YJ,dY,KX]),Nk(BZ),Nk(SQ),Nk(wB),Nk(VQ),Nk(bK),Nk(JQ),Nk(r1),Nk(x1),Nk(W0),Nk(S2),Nk(zZ),Nk(Q2),Nk(t4),Nk(y4),Nk(H4),Nk(Q4),Nk(l3),Nk(F3),Nk(d6),Nk(X3),Nk(u6),Nk(uie),Nk(J6),Nk(X6),Nk(mie),Nk(yie),Nk(Mie),Nk(Fie),Nk(cae),Nk(IN),Nk(Oae),Nk(kae),Nk(hR);function Z8({option:e,style:t={height:`400px`,width:`100%`},settings:n={notMerge:!0},theme:r}){let i=(0,u.useRef)(null),a=(0,u.useRef)(null);return(0,u.useEffect)(()=>{i.current&&(a.current=pk(i.current,r));let e=()=>{a.current?.resize()};return window.addEventListener(`resize`,e),()=>{window.removeEventListener(`resize`,e),a.current?.dispose()}},[r]),(0,u.useEffect)(()=>{if(a.current&&e){let t={...e,grid:{left:30,right:30,top:100,bottom:50,containLabel:!0},toolbox:{show:!0,...e.toolbox,feature:{saveAsImage:{show:!0,title:`Download`,pixelRatio:2},restore:{show:!0},...e.toolbox?.feature||{}}}};a.current.setOption(t,n)}},[e,n]),(0,m.jsx)(`div`,{ref:i,style:t})}var Q8=(0,u.createContext)(void 0);function Mae({accountUid:e,children:t}){return(0,m.jsx)(Q8.Provider,{value:{accountUid:e},children:t})}function $8(){let e=(0,u.useContext)(Q8);if(!e)throw Error(`useAccount must be used within AccountProvider`);return e}var Nae={querySql:async(e,t)=>{let{data:n}=await Ae({body:{sql:t.sql},throwOnError:!0});if(!n?.data)throw Error(`No data returned from SQL query`);let r=n.data;return{rows:r.rows??[],columns:r.columns??[],row_count:r.row_count??0}}},e5=(e,t,n)=>zt({queryKey:[`dataset-sql`,e,t],queryFn:()=>Nae.querySql(e,t),enabled:(n?.enabled??!0)&&!!e&&!!t.sql,placeholderData:e=>e});function Pae({sql:e,x:t,y:n,title:r,horizontal:i=!1,xAxisName:a,yAxisName:o,height:s=`400px`}){let{accountUid:c}=$8(),[l,d]=(0,u.useState)(!1),{data:f,isLoading:p,isError:h,error:g}=e5(c,(0,u.useMemo)(()=>({sql:e}),[e])),_=(0,u.useMemo)(()=>{if(!f?.rows?.length)return null;let e=f.rows.map(e=>String(e[t]??``)),s=f.rows.map(e=>e[n]??null);return{title:r?{text:r}:void 0,tooltip:{trigger:`axis`,axisPointer:{type:`shadow`}},toolbox:{feature:{myToggleLabels:{show:!0,title:l?`Hide Labels`:`Show Labels`,icon:`path://M3 3h18v18H3z M6 6h12v2H6z M6 10h8v2H6z`,onclick:()=>d(e=>!e)}}},grid:{containLabel:!0},...i?{xAxis:{type:`value`,name:a},yAxis:{type:`category`,data:e,name:o}}:{xAxis:{type:`category`,data:e,name:a},yAxis:{type:`value`,name:o}},series:[{type:`bar`,data:s,label:l?{show:!0,position:i?`right`:`top`}:void 0}]}},[f,t,n,r,i,a,o,l]),v={height:typeof s==`number`?`${s}px`:s,width:`100%`};return p?(0,m.jsx)(`div`,{style:v,className:`erica-chart-loading`}):h?(0,m.jsx)(`div`,{style:{...v,display:`flex`,alignItems:`center`,justifyContent:`center`},className:`erica-chart-error-container`,children:(0,m.jsx)(`p`,{className:`erica-chart-error-text`,children:g?.message??`Failed to load chart data`})}):_?(0,m.jsx)(Z8,{option:_,style:v}):(0,m.jsx)(`div`,{style:{...v,display:`flex`,alignItems:`center`,justifyContent:`center`},className:`erica-chart-no-data`,children:(0,m.jsx)(`p`,{className:`erica-chart-no-data-text`,children:`No data`})})}function Fae({sql:e,x:t,y:n,title:r,xAxisName:i,yAxisName:a,height:o=`400px`}){let{accountUid:s}=$8(),[c,l]=(0,u.useState)(!1),{data:d,isLoading:f,isError:p,error:h}=e5(s,(0,u.useMemo)(()=>({sql:e}),[e])),g=(0,u.useMemo)(()=>{if(!d?.rows?.length)return null;let e=d.rows.map(e=>String(e[t]??``)),o=d.rows.map(e=>e[n]??null);return{title:r?{text:r}:void 0,tooltip:{trigger:`axis`},toolbox:{feature:{myToggleLabels:{show:!0,title:c?`Hide Labels`:`Show Labels`,icon:`path://M3 3h18v18H3z M6 6h12v2H6z M6 10h8v2H6z`,onclick:()=>l(e=>!e)}}},grid:{containLabel:!0},xAxis:{type:`category`,data:e,name:i},yAxis:{type:`value`,name:a},series:[{type:`line`,data:o,smooth:!0,label:c?{show:!0,position:`top`}:void 0}]}},[d,t,n,r,i,a,c]),_={height:typeof o==`number`?`${o}px`:o,width:`100%`};return f?(0,m.jsx)(`div`,{style:_,className:`erica-chart-loading`}):p?(0,m.jsx)(`div`,{style:{..._,display:`flex`,alignItems:`center`,justifyContent:`center`},className:`erica-chart-error-container`,children:(0,m.jsx)(`p`,{className:`erica-chart-error-text`,children:h?.message??`Failed to load chart data`})}):g?(0,m.jsx)(Z8,{option:g,style:_}):(0,m.jsx)(`div`,{style:{..._,display:`flex`,alignItems:`center`,justifyContent:`center`},className:`erica-chart-no-data`,children:(0,m.jsx)(`p`,{className:`erica-chart-no-data-text`,children:`No data`})})}function Iae({sql:e,name:t,value:n,title:r,height:i=`400px`,donut:a=!1,showLabels:o=!0,showLegend:s=!0}){let{accountUid:c}=$8(),[l,d]=(0,u.useState)(o),[f,p]=(0,u.useState)(s),{data:h,isLoading:g,isError:_,error:v}=e5(c,(0,u.useMemo)(()=>({sql:e}),[e])),y=(0,u.useMemo)(()=>{if(!h?.rows?.length)return null;let e=h.rows.map(e=>({name:String(e[t]??``),value:Number(e[n]??0)}));return{title:r?{text:r}:void 0,tooltip:{trigger:`item`,formatter:`{a} <br/>{b}: {c} ({d}%)`},toolbox:{feature:{myToggleLabels:{show:!0,title:l?`Hide Labels`:`Show Labels`,icon:`path://M3 3h18v18H3z M6 6h12v2H6z M6 10h8v2H6z`,onclick:()=>d(e=>!e)},myToggleLegend:{show:!0,title:f?`Hide Legend`:`Show Legend`,icon:`path://M4 6h16M4 12h16M4 18h16`,onclick:()=>p(e=>!e)}}},legend:f?{show:!0,orient:`vertical`,left:`left`}:void 0,series:[{name:r??`Data`,type:`pie`,radius:a?[`40%`,`70%`]:`70%`,data:e,emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:`rgba(0, 0, 0, 0.5)`}},label:{show:l,formatter:`{b}: {c} ({d}%)`}}]}},[h,t,n,r,a,l,f]),b={height:typeof i==`number`?`${i}px`:i,width:`100%`};return g?(0,m.jsx)(`div`,{style:b,className:`erica-chart-loading`}):_?(0,m.jsx)(`div`,{style:{...b,display:`flex`,alignItems:`center`,justifyContent:`center`},className:`erica-chart-error-container`,children:(0,m.jsx)(`p`,{className:`erica-chart-error-text`,children:v?.message??`Failed to load chart data`})}):y?(0,m.jsx)(Z8,{option:y,style:b}):(0,m.jsx)(`div`,{style:{...b,display:`flex`,alignItems:`center`,justifyContent:`center`},className:`erica-chart-no-data`,children:(0,m.jsx)(`p`,{className:`erica-chart-no-data-text`,children:`No data`})})}var Lae={red:`#dc2626`,green:`#16a34a`,blue:`#2563eb`,yellow:`#ca8a04`,orange:`#ea580c`,purple:`#9333ea`,pink:`#db2777`,gray:`#6b7280`,black:`#111827`,white:`#ffffff`},t5=e=>{if(!e)return null;let t=e.indexOf(`|`);if(t===-1)return{text:e};let n=e.slice(0,t).trim().toLowerCase(),r=e.slice(t+1).trim();return r?{text:r,color:Lae[n]??n}:{text:e}};function Rae({sql:e,value:t,title:n=`Big Number`,subtitle:r,description:i,prefix:a=``,suffix:o=``,decimals:s=0}){let{accountUid:c}=$8(),{data:l,isLoading:d,isError:f,error:p}=e5(c,(0,u.useMemo)(()=>({sql:e}),[e])),h=(0,u.useMemo)(()=>l?.rows?.length?l.rows[0]?.[t]??null:null,[l,t]),g=(0,u.useMemo)(()=>{if(h==null||h===``)return`--`;let e=Number(h);return Number.isNaN(e)?String(h):`${a}${e.toLocaleString(void 0,{minimumFractionDigits:s,maximumFractionDigits:s})}${o}`},[h,a,o,s]),_=(0,u.useMemo)(()=>t5(n),[n]),v=(0,u.useMemo)(()=>t5(r),[r]),y=(0,u.useMemo)(()=>t5(i),[i]),b=(0,u.useMemo)(()=>t5(g),[g]);return d?(0,m.jsxs)(`div`,{className:`erica-bignumber-chart erica-bignumber-loading`,children:[(0,m.jsx)(`div`,{className:`erica-bignumber-skeleton-title`}),(0,m.jsx)(`div`,{className:`erica-bignumber-skeleton-value`}),(0,m.jsx)(`div`,{className:`erica-bignumber-skeleton-subtitle`})]}):f?(0,m.jsx)(`div`,{className:`erica-bignumber-chart erica-bignumber-error`,children:(0,m.jsx)(`p`,{className:`erica-bignumber-error-text`,children:p?.message??`Failed to load big number data`})}):(0,m.jsxs)(`div`,{className:`erica-bignumber-chart`,children:[(0,m.jsxs)(`div`,{className:`erica-bignumber-header`,children:[(0,m.jsx)(`p`,{className:`erica-bignumber-title`,style:_?.color?{color:_.color}:void 0,children:_?.text??n}),v&&(0,m.jsx)(`p`,{className:`erica-bignumber-subtitle`,style:v.color?{color:v.color}:void 0,children:v.text})]}),(0,m.jsxs)(`div`,{className:`erica-bignumber-content`,children:[(0,m.jsx)(`p`,{className:`erica-bignumber-value`,style:b?.color?{color:b.color}:void 0,children:b?.text??g}),y&&(0,m.jsx)(`p`,{className:`erica-bignumber-description`,style:y.color?{color:y.color}:void 0,children:y.text})]})]})}var zae=e=>e==null||e===``?`—`:typeof e==`object`?JSON.stringify(e):String(e);function Bae({sql:e,title:t,height:n=`400px`,columns:r,maxRows:i}){let{accountUid:a}=$8(),{data:o,isLoading:s,isError:c,error:l}=e5(a,(0,u.useMemo)(()=>({sql:e}),[e])),d=(0,u.useMemo)(()=>{let e=o?.columns?.length?o.columns:[];return r?r.split(`,`).map(e=>e.trim()).filter(t=>e.includes(t)):e},[o,r]),f=(0,u.useMemo)(()=>{let e=o?.rows??[];return!i||i<=0?e:e.slice(0,i)},[o,i]),p={height:typeof n==`number`?`${n}px`:n,width:`100%`};return s?(0,m.jsx)(`div`,{style:p,className:`erica-chart-loading`,children:(0,m.jsx)(`div`,{className:`erica-chart-loading-spinner`})}):c?(0,m.jsx)(`div`,{style:p,className:`erica-chart-error`,children:(0,m.jsx)(`p`,{children:l?.message??`Failed to load table data`})}):!d.length||!f.length?(0,m.jsx)(`div`,{style:p,className:`erica-chart-no-data`,children:(0,m.jsx)(`p`,{children:`No data`})}):(0,m.jsxs)(`div`,{style:p,className:`erica-table-chart`,children:[t&&(0,m.jsx)(`div`,{className:`erica-table-chart-header`,children:(0,m.jsx)(`p`,{className:`erica-table-chart-title`,children:t})}),(0,m.jsx)(`div`,{className:`erica-table-chart-container`,children:(0,m.jsxs)(`table`,{className:`erica-table`,children:[(0,m.jsx)(`thead`,{children:(0,m.jsx)(`tr`,{children:d.map(e=>(0,m.jsx)(`th`,{children:e},e))})}),(0,m.jsx)(`tbody`,{children:f.map((e,t)=>(0,m.jsx)(`tr`,{children:d.map(n=>(0,m.jsx)(`td`,{children:(0,m.jsx)(`div`,{className:`erica-table-cell-content`,children:zae(e[n])})},`${t}-${n}`))},String(e._erica_id??t)))})]})})]})}var Vae=e=>Object.fromEntries(Object.entries(e).filter(([e,t])=>t!==void 0));function Hae({sql:e,x:t,y:n,seriesBy:r,size:i,color:a,title:o,height:s=`400px`,xAxisName:c,yAxisName:l}){let{accountUid:d}=$8(),[f,p]=(0,u.useState)(!1),h=(0,u.useMemo)(()=>n.includes(`,`)?n.split(`,`).map(e=>e.trim()):[n],[n]),{data:g,isLoading:_,isError:v,error:y}=e5(d,(0,u.useMemo)(()=>({sql:e}),[e])),b=(0,u.useMemo)(()=>{if(!g?.rows?.length)return null;let e=(e,n)=>{let r=[Number(e[t]??0),Number(e[n]??0)];return i&&r.push(Number(e[i]??0)),a&&r.push(String(e[a]??``)),r},n=r?g.rows.reduce((e,t)=>{let n=String(t[r]??`Unknown`);return e[n]||(e[n]=[]),e[n].push(t),e},{}):null,s=(e,t)=>({name:t,type:`scatter`,symbolSize:i?e=>Math.sqrt(e[2])*2:10,data:e,label:f?{show:!0,formatter:e=>{let t=e.value;return`${t[0]}, ${t[1]}`}}:void 0,itemStyle:a?{color:e=>{let t=e.value,n=t[t.length-1],r=[`#5470c6`,`#91cc75`,`#fac858`,`#ee6666`,`#73c0de`,`#3ba272`,`#fc8452`,`#9a60b4`,`#ea7ccc`];return r[n.split(``).reduce((e,t)=>e+t.charCodeAt(0),0)%r.length]}}:void 0}),u=n?Object.entries(n).flatMap(([t,n])=>h.map(r=>{let i=h.length>1?`${t} - ${r}`:t;return s(n.map(t=>e(t,r)),i)})):h.map(t=>s(g.rows.map(n=>e(n,t)),t));return Vae({title:o?{text:o}:void 0,tooltip:{trigger:`item`,formatter:e=>{let n=e.value,r=`${e.seriesName?`${e.seriesName}<br/>`:``}${t}: ${n[0]}<br/>${l??`Value`}: ${n[1]}`,o=2;return i&&(r+=`<br/>${i}: ${n[o++]}`),a&&(r+=`<br/>${a}: ${n[o]}`),r}},toolbox:{feature:{myToggleLabels:{show:!0,title:f?`Hide Labels`:`Show Labels`,icon:`path://M3 3h18v18H3z M6 6h12v2H6z M6 10h8v2H6z`,onclick:()=>p(e=>!e)}}},xAxis:{type:`value`,name:c,scale:!0},yAxis:{type:`value`,name:l,scale:!0},legend:u.length>1?{show:!0}:void 0,series:u})},[g,t,h,r,i,a,o,c,l,f]),x={height:typeof s==`number`?`${s}px`:s,width:`100%`};return _?(0,m.jsxs)(`div`,{style:x,className:`erica-chart-loading`,children:[(0,m.jsx)(`div`,{className:`erica-chart-loading-spinner`}),(0,m.jsx)(`p`,{children:`Loading scatter chart...`})]}):v?(0,m.jsx)(`div`,{style:x,className:`erica-chart-error`,children:(0,m.jsx)(`p`,{children:y?.message??`Failed to load chart data`})}):b?(0,m.jsx)(Z8,{option:b,style:x}):(0,m.jsx)(`div`,{style:x,className:`erica-chart-no-data`,children:(0,m.jsx)(`p`,{children:`No data`})})}var Uae=e=>Object.fromEntries(Object.entries(e).filter(([e,t])=>t!==void 0));function Wae({sql:e,name:t,value:n,title:r,height:i=`400px`,showLabels:a=!0,showLegend:o=!1,sort:s=`descending`}){let{accountUid:c}=$8(),[l,d]=(0,u.useState)(a),[f,p]=(0,u.useState)(o),{data:h,isLoading:g,isError:_,error:v}=e5(c,(0,u.useMemo)(()=>({sql:e}),[e])),y=(0,u.useMemo)(()=>{if(!h?.rows?.length)return null;let e=h.rows.map(e=>({name:String(e[t]??``),value:Number(e[n]??0)}));return Uae({title:r?{text:r}:void 0,tooltip:{trigger:`item`,formatter:`{b}: {c}`},toolbox:{feature:{myToggleLabels:{show:!0,title:l?`Hide Labels`:`Show Labels`,icon:`path://M3 3h18v18H3z M6 6h12v2H6z M6 10h8v2H6z`,onclick:()=>d(e=>!e)},myToggleLegend:{show:!0,title:f?`Hide Legend`:`Show Legend`,icon:`path://M4 6h16M4 12h16M4 18h16`,onclick:()=>p(e=>!e)}}},legend:f?{show:!0,top:`bottom`}:void 0,series:[{type:`funnel`,left:`10%`,top:60,bottom:20,width:`80%`,min:0,minSize:`0%`,maxSize:`100%`,sort:s,gap:4,label:{show:l,position:`inside`,formatter:`{b}: {c}`},emphasis:{label:{fontSize:14}},data:e}]})},[h,t,n,r,s,l,f]),b={height:typeof i==`number`?`${i}px`:i,width:`100%`};return g?(0,m.jsxs)(`div`,{style:b,className:`erica-chart-loading`,children:[(0,m.jsx)(`div`,{className:`erica-chart-loading-spinner`}),(0,m.jsx)(`p`,{children:`Loading funnel chart...`})]}):_?(0,m.jsx)(`div`,{style:b,className:`erica-chart-error`,children:(0,m.jsx)(`p`,{children:v?.message??`Failed to load chart data`})}):y?(0,m.jsx)(Z8,{option:y,style:b}):(0,m.jsx)(`div`,{style:b,className:`erica-chart-no-data`,children:(0,m.jsx)(`p`,{children:`No data`})})}function Gae({type:e,errors:t}){return(0,m.jsxs)(`div`,{className:`erica-chart-error`,children:[(0,m.jsxs)(`p`,{className:`erica-chart-error-title`,children:[`Erica Chart syntax error — `,(0,m.jsx)(`code`,{children:e})]}),(0,m.jsx)(`ul`,{className:`erica-chart-error-list`,children:t.map(e=>(0,m.jsx)(`li`,{className:`erica-chart-error-item`,children:e.message},e.field))})]})}function Kae(e){let{type:t,attrs:n}=e,r=ls(t,n);if(!r.valid)return(0,m.jsx)(Gae,{type:t,errors:r.errors});switch(t){case`bar`:return(0,m.jsx)(Pae,{sql:n.sql,x:n.x,y:n.y,title:n.title,horizontal:as(n.horizontal),xAxisName:n.xAxisName,yAxisName:n.yAxisName});case`line`:return(0,m.jsx)(Fae,{sql:n.sql,x:n.x,y:n.y,title:n.title,xAxisName:n.xAxisName,yAxisName:n.yAxisName});case`pie`:return(0,m.jsx)(Iae,{sql:n.sql,name:n.name,value:n.value,title:n.title});case`bignumber`:return(0,m.jsx)(Rae,{sql:n.sql,value:n.value,title:n.title,subtitle:n.subtitle,description:n.description,prefix:n.prefix,suffix:n.suffix,decimals:os(n.decimals)});case`table`:return(0,m.jsx)(Bae,{sql:n.sql,title:n.title,height:n.height,columns:n.columns,maxRows:os(n.maxRows)});case`scatter`:return(0,m.jsx)(Hae,{sql:n.sql,x:n.x,y:n.y,seriesBy:n.seriesBy,size:n.size,color:n.color,title:n.title,height:n.height,xAxisName:n.xAxisName,yAxisName:n.yAxisName});case`funnel`:return(0,m.jsx)(Wae,{sql:n.sql,name:n.name,value:n.value,title:n.title,height:n.height,showLabels:as(n.showLabels),showLegend:as(n.showLegend),sort:n.sort});default:return null}}function n5({markdown:e}){return(0,m.jsx)(`div`,{className:`erica-chart-container`,children:(0,u.useMemo)(()=>cs(e),[e]).map((e,t)=>e.kind===`text`?e.content.trim()?(0,m.jsx)(`div`,{className:`erica-chart-text`,children:e.content},t):null:(0,m.jsx)(`div`,{className:`erica-chart-wrapper`,children:Kae(e.node)},t))})}var qae=Eo({chartConfig:Za().describe(`Erica chart config syntax.`)});function Jae({chartConfig:e}){return(0,m.jsx)(`div`,{className:`erica-chart-card`,children:(0,m.jsx)(n5,{markdown:e})})}var r5=(0,u.createContext)(null);function i5({children:e}){let[t,n]=(0,u.useState)(!1),[r,i]=(0,u.useState)(null),[a,o]=(0,u.useState)(`Artifacts`);return(0,m.jsx)(r5.Provider,{value:{isOpen:t,onOpen:()=>n(!0),onClose:()=>n(!1),content:r,setContent:i,title:a,setTitle:o},children:e})}var a5=()=>(0,u.useContext)(r5)||{isOpen:!1,onOpen:()=>{},onClose:()=>{},content:null,setContent:()=>{},title:`Artifacts`,setTitle:()=>{}};function Yae(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Xae=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Zae=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Qae={};function o5(e,t){return((t||Qae).jsx?Zae:Xae).test(e)}var $ae=/[ \t\n\f\r]/g;function eoe(e){return typeof e==`object`?e.type===`text`?s5(e.value):!1:s5(e)}function s5(e){return e.replace($ae,``)===``}var c5=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};c5.prototype.normal={},c5.prototype.property={},c5.prototype.space=void 0;function l5(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new c5(n,r,t)}function u5(e){return e.toLowerCase()}var d5=class{constructor(e,t){this.attribute=t,this.property=e}};d5.prototype.attribute=``,d5.prototype.booleanish=!1,d5.prototype.boolean=!1,d5.prototype.commaOrSpaceSeparated=!1,d5.prototype.commaSeparated=!1,d5.prototype.defined=!1,d5.prototype.mustUseProperty=!1,d5.prototype.number=!1,d5.prototype.overloadedBoolean=!1,d5.prototype.property=``,d5.prototype.spaceSeparated=!1,d5.prototype.space=void 0;var f5=s({boolean:()=>p5,booleanish:()=>m5,commaOrSpaceSeparated:()=>v5,commaSeparated:()=>_5,number:()=>$,overloadedBoolean:()=>h5,spaceSeparated:()=>g5}),toe=0,p5=y5(),m5=y5(),h5=y5(),$=y5(),g5=y5(),_5=y5(),v5=y5();function y5(){return 2**++toe}var b5=Object.keys(f5),x5=class extends d5{constructor(e,t,n,r){let i=-1;if(super(e,t),S5(this,`space`,r),typeof n==`number`)for(;++i<b5.length;){let e=b5[i];S5(this,b5[i],(n&f5[e])===f5[e])}}};x5.prototype.defined=!0;function S5(e,t,n){n&&(e[t]=n)}function C5(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new x5(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[u5(r)]=r,n[u5(a.attribute)]=r}return new c5(t,n,e.space)}var w5=C5({properties:{ariaActiveDescendant:null,ariaAtomic:m5,ariaAutoComplete:null,ariaBusy:m5,ariaChecked:m5,ariaColCount:$,ariaColIndex:$,ariaColSpan:$,ariaControls:g5,ariaCurrent:null,ariaDescribedBy:g5,ariaDetails:null,ariaDisabled:m5,ariaDropEffect:g5,ariaErrorMessage:null,ariaExpanded:m5,ariaFlowTo:g5,ariaGrabbed:m5,ariaHasPopup:null,ariaHidden:m5,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:g5,ariaLevel:$,ariaLive:null,ariaModal:m5,ariaMultiLine:m5,ariaMultiSelectable:m5,ariaOrientation:null,ariaOwns:g5,ariaPlaceholder:null,ariaPosInSet:$,ariaPressed:m5,ariaReadOnly:m5,ariaRelevant:null,ariaRequired:m5,ariaRoleDescription:g5,ariaRowCount:$,ariaRowIndex:$,ariaRowSpan:$,ariaSelected:m5,ariaSetSize:$,ariaSort:null,ariaValueMax:$,ariaValueMin:$,ariaValueNow:$,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function T5(e,t){return t in e?e[t]:t}function E5(e,t){return T5(e,t.toLowerCase())}var noe=C5({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:_5,acceptCharset:g5,accessKey:g5,action:null,allow:null,allowFullScreen:p5,allowPaymentRequest:p5,allowUserMedia:p5,alt:null,as:null,async:p5,autoCapitalize:null,autoComplete:g5,autoFocus:p5,autoPlay:p5,blocking:g5,capture:null,charSet:null,checked:p5,cite:null,className:g5,cols:$,colSpan:null,content:null,contentEditable:m5,controls:p5,controlsList:g5,coords:$|_5,crossOrigin:null,data:null,dateTime:null,decoding:null,default:p5,defer:p5,dir:null,dirName:null,disabled:p5,download:h5,draggable:m5,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:p5,formTarget:null,headers:g5,height:$,hidden:h5,high:$,href:null,hrefLang:null,htmlFor:g5,httpEquiv:g5,id:null,imageSizes:null,imageSrcSet:null,inert:p5,inputMode:null,integrity:null,is:null,isMap:p5,itemId:null,itemProp:g5,itemRef:g5,itemScope:p5,itemType:g5,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:p5,low:$,manifest:null,max:null,maxLength:$,media:null,method:null,min:null,minLength:$,multiple:p5,muted:p5,name:null,nonce:null,noModule:p5,noValidate:p5,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:p5,optimum:$,pattern:null,ping:g5,placeholder:null,playsInline:p5,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:p5,referrerPolicy:null,rel:g5,required:p5,reversed:p5,rows:$,rowSpan:$,sandbox:g5,scope:null,scoped:p5,seamless:p5,selected:p5,shadowRootClonable:p5,shadowRootDelegatesFocus:p5,shadowRootMode:null,shape:null,size:$,sizes:null,slot:null,span:$,spellCheck:m5,src:null,srcDoc:null,srcLang:null,srcSet:null,start:$,step:null,style:null,tabIndex:$,target:null,title:null,translate:null,type:null,typeMustMatch:p5,useMap:null,value:m5,width:$,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:g5,axis:null,background:null,bgColor:null,border:$,borderColor:null,bottomMargin:$,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:p5,declare:p5,event:null,face:null,frame:null,frameBorder:null,hSpace:$,leftMargin:$,link:null,longDesc:null,lowSrc:null,marginHeight:$,marginWidth:$,noResize:p5,noHref:p5,noShade:p5,noWrap:p5,object:null,profile:null,prompt:null,rev:null,rightMargin:$,rules:null,scheme:null,scrolling:m5,standby:null,summary:null,text:null,topMargin:$,valueType:null,version:null,vAlign:null,vLink:null,vSpace:$,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:p5,disableRemotePlayback:p5,prefix:null,property:null,results:$,security:null,unselectable:null},space:`html`,transform:E5}),roe=C5({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:v5,accentHeight:$,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:$,amplitude:$,arabicForm:null,ascent:$,attributeName:null,attributeType:null,azimuth:$,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:$,by:null,calcMode:null,capHeight:$,className:g5,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:$,diffuseConstant:$,direction:null,display:null,dur:null,divisor:$,dominantBaseline:null,download:p5,dx:null,dy:null,edgeMode:null,editable:null,elevation:$,enableBackground:null,end:null,event:null,exponent:$,externalResourcesRequired:null,fill:null,fillOpacity:$,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:_5,g2:_5,glyphName:_5,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:$,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:$,horizOriginX:$,horizOriginY:$,id:null,ideographic:$,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:$,k:$,k1:$,k2:$,k3:$,k4:$,kernelMatrix:v5,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:$,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:$,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:$,overlineThickness:$,paintOrder:null,panose1:null,path:null,pathLength:$,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:g5,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:$,pointsAtY:$,pointsAtZ:$,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:v5,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:v5,rev:v5,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:v5,requiredFeatures:v5,requiredFonts:v5,requiredFormats:v5,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:$,specularExponent:$,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:$,strikethroughThickness:$,string:null,stroke:null,strokeDashArray:v5,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:$,strokeOpacity:$,strokeWidth:null,style:null,surfaceScale:$,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:v5,tabIndex:$,tableValues:null,target:null,targetX:$,targetY:$,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:v5,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:$,underlineThickness:$,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:$,values:null,vAlphabetic:$,vMathematical:$,vectorEffect:null,vHanging:$,vIdeographic:$,version:null,vertAdvY:$,vertOriginX:$,vertOriginY:$,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:$,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:T5}),D5=C5({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),O5=C5({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:E5}),k5=C5({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),ioe={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},aoe=/[A-Z]/g,A5=/-[a-z]/g,ooe=/^data[-\w.:]+$/i;function soe(e,t){let n=u5(t),r=t,i=d5;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&ooe.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(A5,loe);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!A5.test(e)){let n=e.replace(aoe,coe);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=x5}return new i(r,t)}function coe(e){return`-`+e.toLowerCase()}function loe(e){return e.charAt(1).toUpperCase()}var uoe=l5([w5,noe,D5,O5,k5],`html`),j5=l5([w5,roe,D5,O5,k5],`svg`);function doe(e){return e.join(` `).trim()}var foe=o(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
|
|
98
|
-
`,d=`/`,f=`*`,p=``,m=`comment`,h=`declaration`;function g(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,g=1;function v(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(u);g=~n?e.length-n:g+e.length}function y(){var e={line:l,column:g};return function(t){return t.position=new b(e),C(),t}}function b(e){this.start=e,this.end={line:l,column:g},this.source=t.source}b.prototype.content=e;function x(n){var r=Error(t.source+`:`+l+`:`+g+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=g,r.source=e,!t.silent)throw r}function S(t){var n=t.exec(e);if(n){var r=n[0];return v(r),e=e.slice(r.length),n}}function C(){S(i)}function w(e){var t;for(e||=[];t=T();)t!==!1&&e.push(t);return e}function T(){var t=y();if(!(d!=e.charAt(0)||f!=e.charAt(1))){for(var n=2;p!=e.charAt(n)&&(f!=e.charAt(n)||d!=e.charAt(n+1));)++n;if(n+=2,p===e.charAt(n-1))return x(`End of comment missing`);var r=e.slice(2,n-2);return g+=2,v(r),e=e.slice(n),g+=2,t({type:m,comment:r})}}function E(){var e=y(),t=S(a);if(t){if(T(),!S(o))return x(`property missing ':'`);var r=S(s),i=e({type:h,property:_(t[0].replace(n,p)),value:r?_(r[0].replace(n,p)):p});return S(c),i}}function D(){var e=[];w(e);for(var t;t=E();)t!==!1&&(e.push(t),w(e));return e}return C(),D()}function _(e){return e?e.replace(l,p):p}t.exports=g})),poe=o((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var n=t(foe());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),moe=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),hoe=o(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(poe()),r=moe();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),M5=P5(`end`),N5=P5(`start`);function P5(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function goe(e){let t=N5(e),n=M5(e);if(t&&n)return{start:t,end:n}}function F5(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?L5(e.position):`start`in e||`end`in e?L5(e):`line`in e||`column`in e?I5(e):``}function I5(e){return R5(e&&e.line)+`:`+R5(e&&e.column)}function L5(e){return I5(e&&e.start)+`-`+I5(e&&e.end)}function R5(e){return e&&typeof e==`number`?e:1}var z5=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=F5(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};z5.prototype.file=``,z5.prototype.name=``,z5.prototype.reason=``,z5.prototype.message=``,z5.prototype.stack=``,z5.prototype.column=void 0,z5.prototype.line=void 0,z5.prototype.ancestors=void 0,z5.prototype.cause=void 0,z5.prototype.fatal=void 0,z5.prototype.place=void 0,z5.prototype.ruleId=void 0,z5.prototype.source=void 0;var _oe=l(hoe(),1),B5={}.hasOwnProperty,voe=new Map,yoe=/[A-Z]/g,boe=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),xoe=new Set([`td`,`th`]),V5=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function Soe(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=Aoe(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=koe(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?j5:uoe,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=H5(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function H5(e,t,n){if(t.type===`element`)return Coe(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return woe(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Eoe(e,t,n);if(t.type===`mdxjsEsm`)return Toe(e,t);if(t.type===`root`)return Doe(e,t,n);if(t.type===`text`)return Ooe(e,t)}function Coe(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=j5,e.schema=i),e.ancestors.push(t);let a=K5(e,t.tagName,!1),o=joe(e,t),s=G5(e,t);return boe.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!eoe(e):!0})),U5(e,o,a,t),W5(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function woe(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}q5(e,t.position)}function Toe(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);q5(e,t.position)}function Eoe(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=j5,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:K5(e,t.name,!0),o=Moe(e,t),s=G5(e,t);return U5(e,o,a,t),W5(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Doe(e,t,n){let r={};return W5(r,G5(e,t)),e.create(t,e.Fragment,r,n)}function Ooe(e,t){return t.value}function U5(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function W5(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function koe(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function Aoe(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=N5(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function joe(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&B5.call(t.properties,i)){let a=Noe(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&xoe.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function Moe(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else q5(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else q5(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function G5(e,t){let n=[],r=-1,i=e.passKeys?new Map:voe;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=H5(e,a,o);s!==void 0&&n.push(s)}return n}function Noe(e,t,n){let r=soe(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Yae(n):doe(n)),r.property===`style`){let t=typeof n==`object`?n:Poe(e,String(n));return e.stylePropertyNameCase===`css`&&(t=Foe(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?ioe[r.property]||r.property:r.attribute,n]}}function Poe(e,t){try{return(0,_oe.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new z5("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=V5+`#cannot-parse-style-attribute`,r}}function K5(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=o5(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=o5(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return B5.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);q5(e)}function q5(e,t){let n=new z5("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=V5+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function Foe(e){let t={},n;for(n in e)B5.call(e,n)&&(t[Ioe(n)]=e[n]);return t}function Ioe(e){let t=e.replace(yoe,Loe);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function Loe(e){return`-`+e.toLowerCase()}var J5={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},Roe={};function zoe(e,t){let n=t||Roe;return Y5(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function Y5(e,t,n){if(Boe(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return X5(e.children,t,n)}return Array.isArray(e)?X5(e,t,n):``}function X5(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=Y5(e[i],t,n);return r.join(``)}function Boe(e){return!!(e&&typeof e==`object`)}var Z5=document.createElement(`i`);function Q5(e){let t=`&`+e+`;`;Z5.innerHTML=t;let n=Z5.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}function $5(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function e7(e,t){return e.length>0?($5(e,e.length,0,t),e):t}var t7={}.hasOwnProperty;function Voe(e){let t={},n=-1;for(;++n<e.length;)Hoe(t,e[n]);return t}function Hoe(e,t){let n;for(n in t){let r=(t7.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){t7.call(r,a)||(r[a]=[]);let e=i[a];Uoe(r[a],Array.isArray(e)?e:e?[e]:[])}}}function Uoe(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);$5(e,0,0,r)}function n7(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function r7(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var i7=p7(/[A-Za-z]/),a7=p7(/[\dA-Za-z]/),Woe=p7(/[#-'*+\--9=?A-Z^-~]/);function o7(e){return e!==null&&(e<32||e===127)}var s7=p7(/\d/),Goe=p7(/[\dA-Fa-f]/),Koe=p7(/[!-/:-@[-`{-~]/);function c7(e){return e!==null&&e<-2}function l7(e){return e!==null&&(e<0||e===32)}function u7(e){return e===-2||e===-1||e===32}var d7=p7(/\p{P}|\p{S}/u),f7=p7(/\s/);function p7(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function m7(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&a7(e.charCodeAt(n+1))&&a7(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function h7(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return u7(r)?(e.enter(n),s(r)):t(r)}function s(r){return u7(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var qoe={tokenize:Joe};function Joe(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),h7(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return c7(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var Yoe={tokenize:Xoe},g7={tokenize:Zoe};function Xoe(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return $5(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(g7,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(g7,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return c7(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;$5(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Zoe(e,t,n){return h7(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function _7(e){if(e===null||l7(e)||f7(e))return 1;if(d7(e))return 2}function v7(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var y7={name:`attention`,resolveAll:Qoe,tokenize:$oe};function Qoe(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};b7(d,-c),b7(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=e7(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=e7(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=e7(l,v7(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=e7(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=e7(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,$5(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function $oe(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=_7(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=_7(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function b7(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var ese={name:`autolink`,tokenize:tse};function tse(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return i7(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||a7(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||a7(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||o7(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):Woe(t)?(e.consume(t),l):n(t)}function u(e){return a7(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||a7(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var x7={partial:!0,tokenize:nse};function nse(e,t,n){return r;function r(t){return u7(t)?h7(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||c7(e)?t(e):n(e)}}var S7={continuation:{tokenize:ise},exit:ase,name:`blockQuote`,tokenize:rse};function rse(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return u7(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function ise(e,t,n){let r=this;return i;function i(t){return u7(t)?h7(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(S7,t,n)(r)}}function ase(e){e.exit(`blockQuote`)}var C7={name:`characterEscape`,tokenize:ose};function ose(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return Koe(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var w7={name:`characterReference`,tokenize:sse};function sse(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=a7,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=Goe,u):(e.enter(`characterReferenceValue`),a=7,o=s7,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===a7&&!Q5(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var T7={partial:!0,tokenize:lse},E7={concrete:!0,name:`codeFenced`,tokenize:cse};function cse(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),u7(t)?h7(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||c7(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(T7,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||c7(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):u7(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),h7(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||c7(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||c7(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&u7(t)?h7(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||c7(t)?e.check(T7,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||c7(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),u7(t)?h7(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),u7(t)?h7(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||c7(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function lse(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var D7={name:`codeIndented`,tokenize:dse},use={partial:!0,tokenize:fse};function dse(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),h7(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):c7(t)?e.attempt(use,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||c7(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function fse(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):c7(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):h7(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):c7(e)?i(e):n(e)}}var pse={name:`codeText`,previous:hse,resolve:mse,tokenize:gse};function mse(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function hse(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function gse(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):c7(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||c7(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var _se=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&O7(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),O7(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),O7(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);O7(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);O7(this.left,t.reverse())}}};function O7(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function k7(e){let t={},n=-1,r,i,a,o,s,c,l,u=new _se(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,vse(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return $5(e,0,1/0,u.slice(0)),!l}function vse(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var yse={resolve:xse,tokenize:Sse},bse={partial:!0,tokenize:Cse};function xse(e){return k7(e),e}function Sse(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):c7(t)?e.check(bse,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function Cse(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),h7(e,a,`linePrefix`)}function a(i){if(i===null||c7(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function A7(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||o7(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||c7(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||l7(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||o7(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function j7(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):c7(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||c7(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!u7(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function M7(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):c7(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),h7(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||c7(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function N7(e,t){let n;return r;function r(i){return c7(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):u7(i)?h7(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var wse={name:`definition`,tokenize:Ese},Tse={partial:!0,tokenize:Dse};function Ese(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return j7.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=r7(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return l7(t)?N7(e,l)(t):l(t)}function l(t){return A7(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Tse,d,d)(t)}function d(t){return u7(t)?h7(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||c7(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Dse(e,t,n){return r;function r(t){return l7(t)?N7(e,i)(t):n(t)}function i(t){return M7(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return u7(t)?h7(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||c7(e)?t(e):n(e)}}var Ose={name:`hardBreakEscape`,tokenize:kse};function kse(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return c7(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var Ase={name:`headingAtx`,resolve:jse,tokenize:Mse};function jse(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},$5(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function Mse(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||l7(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||c7(n)?(e.exit(`atxHeading`),t(n)):u7(n)?h7(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||l7(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var Nse=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),P7=[`pre`,`script`,`style`,`textarea`],Pse={concrete:!0,name:`htmlFlow`,resolveTo:Lse,tokenize:Rse},Fse={partial:!0,tokenize:Bse},Ise={partial:!0,tokenize:zse};function Lse(e){let t=e.length;for(;t--&&!(e[t][0]===`enter`&&e[t][1].type===`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Rse(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:ie):i7(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):i7(a)?(e.consume(a),i=4,r.interrupt?t:ie):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:ie):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return i7(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||l7(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&P7.includes(l)?(i=1,r.interrupt?t(s):O(s)):Nse.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||a7(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return u7(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||i7(t)?(e.consume(t),b):u7(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||a7(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):u7(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):u7(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||c7(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||l7(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||u7(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||c7(t)?O(t):u7(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),ee):t===60&&i===1?(e.consume(t),te):t===62&&i===4?(e.consume(t),ae):t===63&&i===3?(e.consume(t),ie):t===93&&i===5?(e.consume(t),re):c7(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Fse,oe,k)(t)):t===null||c7(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(Ise,A,oe)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||c7(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function ee(t){return t===45?(e.consume(t),ie):O(t)}function te(t){return t===47?(e.consume(t),o=``,ne):O(t)}function ne(t){if(t===62){let n=o.toLowerCase();return P7.includes(n)?(e.consume(t),ae):O(t)}return i7(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),ne):O(t)}function re(t){return t===93?(e.consume(t),ie):O(t)}function ie(t){return t===62?(e.consume(t),ae):t===45&&i===2?(e.consume(t),ie):O(t)}function ae(t){return t===null||c7(t)?(e.exit(`htmlFlowData`),oe(t)):(e.consume(t),ae)}function oe(n){return e.exit(`htmlFlow`),t(n)}}function zse(e,t,n){let r=this;return i;function i(t){return c7(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function Bse(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(x7,t,n)}}var Vse={name:`htmlText`,tokenize:Hse};function Hse(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):i7(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):i7(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):c7(t)?(o=d,te(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?ee(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):c7(t)?(o=h,te(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?ee(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?ee(t):c7(t)?(o=v,te(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):c7(t)?(o=y,te(t)):(e.consume(t),y)}function b(e){return e===62?ee(e):y(e)}function x(t){return i7(t)?(e.consume(t),S):n(t)}function S(t){return t===45||a7(t)?(e.consume(t),S):C(t)}function C(t){return c7(t)?(o=C,te(t)):u7(t)?(e.consume(t),C):ee(t)}function w(t){return t===45||a7(t)?(e.consume(t),w):t===47||t===62||l7(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),ee):t===58||t===95||i7(t)?(e.consume(t),E):c7(t)?(o=T,te(t)):u7(t)?(e.consume(t),T):ee(t)}function E(t){return t===45||t===46||t===58||t===95||a7(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):c7(t)?(o=D,te(t)):u7(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):c7(t)?(o=O,te(t)):u7(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):c7(t)?(o=k,te(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||l7(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||l7(e)?T(e):n(e)}function ee(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function te(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ne}function ne(t){return u7(t)?h7(e,re,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):re(t)}function re(t){return e.enter(`htmlTextData`),o(t)}}var F7={name:`labelEnd`,resolveAll:Kse,resolveTo:qse,tokenize:Jse},Use={tokenize:Yse},Wse={tokenize:Xse},Gse={tokenize:Zse};function Kse(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&$5(e,0,e.length,n),e}function qse(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=e7(s,e.slice(a+1,a+r+3)),s=e7(s,[[`enter`,u,t]]),s=e7(s,v7(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=e7(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=e7(s,e.slice(o+1)),s=e7(s,[[`exit`,c,t]]),$5(e,a,e.length,s),e}function Jse(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(r7(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(Use,u,o?u:d)(t):t===91?e.attempt(Wse,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(Gse,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function Yse(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return l7(t)?N7(e,a)(t):a(t)}function a(t){return t===41?u(t):A7(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return l7(t)?N7(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?M7(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return l7(t)?N7(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function Xse(e,t,n){let r=this;return i;function i(t){return j7.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(r7(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function Zse(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var Qse={name:`labelStartImage`,resolveAll:F7.resolveAll,tokenize:$se};function $se(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var ece={name:`labelStartLink`,resolveAll:F7.resolveAll,tokenize:tce};function tce(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var I7={name:`lineEnding`,tokenize:nce};function nce(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),h7(e,t,`linePrefix`)}}var L7={name:`thematicBreak`,tokenize:rce};function rce(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||c7(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),u7(t)?h7(e,s,`whitespace`)(t):s(t))}}var R7={continuation:{tokenize:sce},exit:lce,name:`list`,tokenize:oce},ice={partial:!0,tokenize:uce},ace={partial:!0,tokenize:cce};function oce(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:s7(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(L7,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return s7(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(x7,r.interrupt?n:u,e.attempt(ice,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return u7(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function sce(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(x7,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,h7(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!u7(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(ace,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,h7(e,e.attempt(R7,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function cce(e,t,n){let r=this;return h7(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function lce(e){e.exit(this.containerState.type)}function uce(e,t,n){let r=this;return h7(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!u7(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var z7={name:`setextUnderline`,resolveTo:dce,tokenize:fce};function dce(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function fce(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),u7(t)?h7(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||c7(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var pce={tokenize:mce};function mce(e){let t=this,n=e.attempt(x7,r,e.attempt(this.parser.constructs.flowInitial,i,h7(e,e.attempt(this.parser.constructs.flow,i,e.attempt(yse,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var hce={resolveAll:V7()},gce=B7(`string`),_ce=B7(`text`);function B7(e){return{resolveAll:V7(e===`text`?vce:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function V7(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function vce(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var yce=s({attentionMarkers:()=>Dce,contentInitial:()=>xce,disable:()=>Oce,document:()=>bce,flow:()=>Cce,flowInitial:()=>Sce,insideSpan:()=>Ece,string:()=>wce,text:()=>Tce}),bce={42:R7,43:R7,45:R7,48:R7,49:R7,50:R7,51:R7,52:R7,53:R7,54:R7,55:R7,56:R7,57:R7,62:S7},xce={91:wse},Sce={[-2]:D7,[-1]:D7,32:D7},Cce={35:Ase,42:L7,45:[z7,L7],60:Pse,61:z7,95:L7,96:E7,126:E7},wce={38:w7,92:C7},Tce={[-5]:I7,[-4]:I7,[-3]:I7,33:Qse,38:w7,42:y7,60:[ese,Vse],91:ece,92:[Ose,C7],93:F7,95:y7,96:pse},Ece={null:[y7,hce]},Dce={null:[42,95]},Oce={null:[]};function kce(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=e7(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=v7(a,l.events,l),l.events):[]}function f(e,t){return jce(p(e),t)}function p(e){return Ace(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){c7(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&$5(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Ace(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function jce(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
44
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function uo(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(a[e.defId]=e.def)}e.external||Object.keys(a).length>0&&(e.target===`draft-2020-12`?i.$defs=a:i.definitions=a);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,`~standard`,{value:{...t[`~standard`],jsonSchema:{input:po(t,`input`,e.processors),output:po(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function I(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return I(r.element,n);if(r.type===`set`)return I(r.valueType,n);if(r.type===`lazy`)return I(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type===`default`||r.type===`prefault`)return I(r.innerType,n);if(r.type===`intersection`)return I(r.left,n)||I(r.right,n);if(r.type===`record`||r.type===`map`)return I(r.keyType,n)||I(r.valueType,n);if(r.type===`pipe`)return I(r.in,n)||I(r.out,n);if(r.type===`object`){for(let e in r.shape)if(I(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(I(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(I(e,n))return!0;return!!(r.rest&&I(r.rest,n))}return!1}var fo=(e,t={})=>n=>{let r=co({...n,processors:t});return F(e,r),lo(r,e),uo(r,e)},po=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=co({...i??{},target:a,io:t,processors:n});return F(e,o),lo(o,e),uo(o,e)},mo={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},ho=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=mo[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},go=(e,t,n,r)=>{n.not={}},_o=(e,t,n,r)=>{let i=e._zod.def,a=xn(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},vo=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},yo=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},bo=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=F(a.element,t,{...r,path:[...r.path,`items`]})},xo=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=F(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=F(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},So=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>F(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Co=(e,t,n,r)=>{let i=e._zod.def,a=F(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=F(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},wo=(e,t,n,r)=>{let i=e._zod.def,a=F(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},To=(e,t,n,r)=>{let i=e._zod.def;F(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Eo=(e,t,n,r)=>{let i=e._zod.def;F(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},Do=(e,t,n,r)=>{let i=e._zod.def;F(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},Oo=(e,t,n,r)=>{let i=e._zod.def;F(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},ko=(e,t,n,r)=>{let i=e._zod.def,a=t.io===`input`?i.in._zod.def.type===`transform`?i.out:i.in:i.out;F(a,t,r);let o=t.seen.get(e);o.ref=a},Ao=(e,t,n,r)=>{let i=e._zod.def;F(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},jo=(e,t,n,r)=>{let i=e._zod.def;F(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Mo=A(`ZodISODateTime`,(e,t)=>{_i.init(e,t),z.init(e,t)});function No(e){return La(Mo,e)}var Po=A(`ZodISODate`,(e,t)=>{vi.init(e,t),z.init(e,t)});function Fo(e){return Ra(Po,e)}var Io=A(`ZodISOTime`,(e,t)=>{yi.init(e,t),z.init(e,t)});function Lo(e){return za(Io,e)}var Ro=A(`ZodISODuration`,(e,t)=>{bi.init(e,t),z.init(e,t)});function zo(e){return Ba(Ro,e)}var Bo=(e,t)=>{er.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>rr(e,t)},flatten:{value:t=>nr(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Sn,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Sn,2)}},isEmpty:{get(){return e.issues.length===0}}})};A(`ZodError`,Bo);var L=A(`ZodError`,Bo,{Parent:Error}),Vo=ir(L),Ho=ar(L),Uo=or(L),Wo=cr(L),Go=ur(L),Ko=dr(L),qo=fr(L),Jo=pr(L),Yo=mr(L),Xo=hr(L),Zo=gr(L),Qo=_r(L),R=A(`ZodType`,(e,t)=>(N.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:po(e,`input`),output:po(e,`output`)}}),e.toJSONSchema=fo(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.check=(...n)=>e.clone(On(t,{checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>Rn(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>Vo(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Uo(e,t,n),e.parseAsync=async(t,n)=>Ho(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Wo(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>Go(e,t,n),e.decode=(t,n)=>Ko(e,t,n),e.encodeAsync=async(t,n)=>qo(e,t,n),e.decodeAsync=async(t,n)=>Jo(e,t,n),e.safeEncode=(t,n)=>Yo(e,t,n),e.safeDecode=(t,n)=>Xo(e,t,n),e.safeEncodeAsync=async(t,n)=>Zo(e,t,n),e.safeDecodeAsync=async(t,n)=>Qo(e,t,n),e.refine=(t,n)=>e.check(nc(t,n)),e.superRefine=t=>e.check(rc(t)),e.overwrite=t=>e.check(Qa(t)),e.optional=()=>Rs(e),e.exactOptional=()=>Bs(e),e.nullable=()=>Hs(e),e.nullish=()=>Rs(Hs(e)),e.nonoptional=t=>Js(e,t),e.array=()=>Es(e),e.or=t=>As([e,t]),e.and=t=>Ms(e,t),e.transform=t=>Qs(e,Is(t)),e.default=t=>Ws(e,t),e.prefault=t=>Ks(e,t),e.catch=t=>Xs(e,t),e.pipe=t=>Qs(e,t),e.readonly=()=>ec(e),e.describe=t=>{let n=e.clone();return pa.add(n,{description:t}),n},Object.defineProperty(e,`description`,{get(){return pa.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return pa.get(e);let n=e.clone();return pa.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),$o=A(`_ZodString`,(e,t)=>{ai.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ho(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(Ka(...t)),e.includes=(...t)=>e.check(Ya(...t)),e.startsWith=(...t)=>e.check(Xa(...t)),e.endsWith=(...t)=>e.check(Za(...t)),e.min=(...t)=>e.check(Wa(...t)),e.max=(...t)=>e.check(Ua(...t)),e.length=(...t)=>e.check(Ga(...t)),e.nonempty=(...t)=>e.check(Wa(1,...t)),e.lowercase=t=>e.check(qa(t)),e.uppercase=t=>e.check(Ja(t)),e.trim=()=>e.check(eo()),e.normalize=(...t)=>e.check($a(...t)),e.toLowerCase=()=>e.check(to()),e.toUpperCase=()=>e.check(no()),e.slugify=()=>e.check(ro())}),es=A(`ZodString`,(e,t)=>{ai.init(e,t),$o.init(e,t),e.email=t=>e.check(ha(ns,t)),e.url=t=>e.check(xa(as,t)),e.jwt=t=>e.check(Ia(bs,t)),e.emoji=t=>e.check(Sa(os,t)),e.guid=t=>e.check(ga(rs,t)),e.uuid=t=>e.check(_a(is,t)),e.uuidv4=t=>e.check(va(is,t)),e.uuidv6=t=>e.check(ya(is,t)),e.uuidv7=t=>e.check(ba(is,t)),e.nanoid=t=>e.check(Ca(ss,t)),e.guid=t=>e.check(ga(rs,t)),e.cuid=t=>e.check(wa(cs,t)),e.cuid2=t=>e.check(Ta(ls,t)),e.ulid=t=>e.check(Ea(us,t)),e.base64=t=>e.check(Na(_s,t)),e.base64url=t=>e.check(Pa(vs,t)),e.xid=t=>e.check(Da(ds,t)),e.ksuid=t=>e.check(Oa(fs,t)),e.ipv4=t=>e.check(ka(ps,t)),e.ipv6=t=>e.check(Aa(ms,t)),e.cidrv4=t=>e.check(ja(hs,t)),e.cidrv6=t=>e.check(Ma(gs,t)),e.e164=t=>e.check(Fa(ys,t)),e.datetime=t=>e.check(No(t)),e.date=t=>e.check(Fo(t)),e.time=t=>e.check(Lo(t)),e.duration=t=>e.check(zo(t))});function ts(e){return ma(es,e)}var z=A(`ZodStringFormat`,(e,t)=>{P.init(e,t),$o.init(e,t)}),ns=A(`ZodEmail`,(e,t)=>{ci.init(e,t),z.init(e,t)}),rs=A(`ZodGUID`,(e,t)=>{oi.init(e,t),z.init(e,t)}),is=A(`ZodUUID`,(e,t)=>{si.init(e,t),z.init(e,t)}),as=A(`ZodURL`,(e,t)=>{li.init(e,t),z.init(e,t)}),os=A(`ZodEmoji`,(e,t)=>{ui.init(e,t),z.init(e,t)}),ss=A(`ZodNanoID`,(e,t)=>{di.init(e,t),z.init(e,t)}),cs=A(`ZodCUID`,(e,t)=>{fi.init(e,t),z.init(e,t)}),ls=A(`ZodCUID2`,(e,t)=>{pi.init(e,t),z.init(e,t)}),us=A(`ZodULID`,(e,t)=>{mi.init(e,t),z.init(e,t)}),ds=A(`ZodXID`,(e,t)=>{hi.init(e,t),z.init(e,t)}),fs=A(`ZodKSUID`,(e,t)=>{gi.init(e,t),z.init(e,t)}),ps=A(`ZodIPv4`,(e,t)=>{xi.init(e,t),z.init(e,t)}),ms=A(`ZodIPv6`,(e,t)=>{Si.init(e,t),z.init(e,t)}),hs=A(`ZodCIDRv4`,(e,t)=>{Ci.init(e,t),z.init(e,t)}),gs=A(`ZodCIDRv6`,(e,t)=>{wi.init(e,t),z.init(e,t)}),_s=A(`ZodBase64`,(e,t)=>{Ei.init(e,t),z.init(e,t)}),vs=A(`ZodBase64URL`,(e,t)=>{Oi.init(e,t),z.init(e,t)}),ys=A(`ZodE164`,(e,t)=>{ki.init(e,t),z.init(e,t)}),bs=A(`ZodJWT`,(e,t)=>{ji.init(e,t),z.init(e,t)}),xs=A(`ZodUnknown`,(e,t)=>{Mi.init(e,t),R.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Ss(){return Va(xs)}var Cs=A(`ZodNever`,(e,t)=>{Ni.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>go(e,t,n,r)});function ws(e){return Ha(Cs,e)}var Ts=A(`ZodArray`,(e,t)=>{Fi.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bo(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(Wa(t,n)),e.nonempty=t=>e.check(Wa(1,t)),e.max=(t,n)=>e.check(Ua(t,n)),e.length=(t,n)=>e.check(Ga(t,n)),e.unwrap=()=>e.element});function Es(e,t){return io(Ts,e,t)}var Ds=A(`ZodObject`,(e,t)=>{Bi.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xo(e,t,n,r),j(e,`shape`,()=>t.shape),e.keyof=()=>Ps(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Ss()}),e.loose=()=>e.clone({...e._zod.def,catchall:Ss()}),e.strict=()=>e.clone({...e._zod.def,catchall:ws()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>Hn(e,t),e.safeExtend=t=>Un(e,t),e.merge=t=>Wn(e,t),e.pick=t=>Bn(e,t),e.omit=t=>Vn(e,t),e.partial=(...t)=>Gn(Ls,e,t[0]),e.required=(...t)=>Kn(qs,e,t[0])});function Os(e,t){return new Ds({type:`object`,shape:e??{},...M(t)})}var ks=A(`ZodUnion`,(e,t)=>{Hi.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>So(e,t,n,r),e.options=t.options});function As(e,t){return new ks({type:`union`,options:e,...M(t)})}var js=A(`ZodIntersection`,(e,t)=>{Ui.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Co(e,t,n,r)});function Ms(e,t){return new js({type:`intersection`,left:e,right:t})}var Ns=A(`ZodEnum`,(e,t)=>{Ki.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_o(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Ns({...t,checks:[],...M(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Ns({...t,checks:[],...M(r),entries:i})}});function Ps(e,t){return new Ns({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...M(t)})}var Fs=A(`ZodTransform`,(e,t)=>{qi.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yo(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new vn(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Qn(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(Qn(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Is(e){return new Fs({type:`transform`,transform:e})}var Ls=A(`ZodOptional`,(e,t)=>{Yi.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Rs(e){return new Ls({type:`optional`,innerType:e})}var zs=A(`ZodExactOptional`,(e,t)=>{Xi.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Bs(e){return new zs({type:`optional`,innerType:e})}var Vs=A(`ZodNullable`,(e,t)=>{Zi.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Hs(e){return new Vs({type:`nullable`,innerType:e})}var Us=A(`ZodDefault`,(e,t)=>{Qi.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Eo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Ws(e,t){return new Us({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():Fn(t)}})}var Gs=A(`ZodPrefault`,(e,t)=>{ea.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Do(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ks(e,t){return new Gs({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():Fn(t)}})}var qs=A(`ZodNonOptional`,(e,t)=>{ta.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>To(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Js(e,t){return new qs({type:`nonoptional`,innerType:e,...M(t)})}var Ys=A(`ZodCatch`,(e,t)=>{ra.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Oo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Xs(e,t){return new Ys({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var Zs=A(`ZodPipe`,(e,t)=>{ia.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ko(e,t,n,r),e.in=t.in,e.out=t.out});function Qs(e,t){return new Zs({type:`pipe`,in:e,out:t})}var $s=A(`ZodReadonly`,(e,t)=>{oa.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ao(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ec(e){return new $s({type:`readonly`,innerType:e})}var tc=A(`ZodCustom`,(e,t)=>{ca.init(e,t),R.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vo(e,t,n,r)});function nc(e,t={}){return ao(tc,e,t)}function rc(e){return oo(e)}var ic=[`bar`,`line`,`pie`,`bignumber`,`table`,`scatter`,`funnel`],ac=/(\w+)=(?:"([^"]*)"|'([^']*)'|(true|false|-?(?:\d+\.?\d*|\.\d+)))/g;function oc(e){let t={},n=new RegExp(ac.source,ac.flags),r;for(;(r=n.exec(e))!==null;)t[r[1]]=r[2]??r[3]??r[4]??``;return t}function sc(e){if(e!==void 0)return e===`true`}function cc(e){if(e===void 0)return;let t=Number(e);return Number.isNaN(t)?void 0:t}var lc=/\{%\s*(\w+)\s+((?:(?!\/%\})[\s\S])*)\/%\}/g;function uc(e){let t=[],n=0,r=new RegExp(lc.source,lc.flags),i;for(;(i=r.exec(e))!==null;){let[r,a,o]=i,s=i.index;s>n&&t.push({kind:`text`,content:e.slice(n,s)});let c=a.toLowerCase();if(ic.includes(c)){let e={type:c,attrs:oc(o),raw:r};t.push({kind:`chart`,node:e})}else t.push({kind:`text`,content:r});n=s+r.length}return n<e.length&&t.push({kind:`text`,content:e.slice(n)}),t}function dc(e,t){let n=[];switch(e){case`bar`:case`line`:t.sql||n.push({field:`sql`,message:`sql is required`}),t.x||n.push({field:`x`,message:`x is required`}),t.y||n.push({field:`y`,message:`y is required`});break;case`pie`:t.sql||n.push({field:`sql`,message:`sql is required`}),t.name||n.push({field:`name`,message:`name is required`}),t.value||n.push({field:`value`,message:`value is required`});break;case`bignumber`:t.sql||n.push({field:`sql`,message:`sql is required`}),t.value||n.push({field:`value`,message:`value is required`});break;case`table`:t.sql||n.push({field:`sql`,message:`sql is required`});break;case`scatter`:t.sql||n.push({field:`sql`,message:`sql is required`}),t.x||n.push({field:`x`,message:`x is required`}),t.y||n.push({field:`y`,message:`y is required`});break;case`funnel`:t.sql||n.push({field:`sql`,message:`sql is required`}),t.name||n.push({field:`name`,message:`name is required`}),t.value||n.push({field:`value`,message:`value is required`});break}return n.length>0?{valid:!1,errors:n}:{valid:!0}}function fc({option:e,style:t={height:`400px`,width:`100%`},settings:n={notMerge:!0},theme:r}){let i=(0,u.useRef)(null),a=(0,u.useRef)(null);return(0,u.useEffect)(()=>{i.current&&(a.current=h.init(i.current,r));let e=()=>{a.current?.resize()};return window.addEventListener(`resize`,e),()=>{window.removeEventListener(`resize`,e),a.current?.dispose()}},[r]),(0,u.useEffect)(()=>{if(a.current&&e){let t={...e,grid:{left:30,right:30,top:100,bottom:50,containLabel:!0},toolbox:{show:!0,...e.toolbox,feature:{saveAsImage:{show:!0,title:`Download`,pixelRatio:2},restore:{show:!0},...e.toolbox?.feature||{}}}};a.current.setOption(t,n)}},[e,n]),(0,m.jsx)(`div`,{ref:i,style:t})}var pc=(0,u.createContext)(void 0);function mc({accountUid:e,children:t}){return(0,m.jsx)(pc.Provider,{value:{accountUid:e},children:t})}function hc(){let e=(0,u.useContext)(pc);if(!e)throw Error(`useAccount must be used within AccountProvider`);return e}var gc={querySql:async(e,t)=>{let{data:n}=await Fe({body:{sql:t.sql},throwOnError:!0});if(!n?.data)throw Error(`No data returned from SQL query`);let r=n.data;return{rows:r.rows??[],columns:r.columns??[],row_count:r.row_count??0}}},_c=(e,t,n)=>un({queryKey:[`dataset-sql`,e,t],queryFn:()=>gc.querySql(e,t),enabled:(n?.enabled??!0)&&!!e&&!!t.sql,placeholderData:e=>e});function vc({sql:e,x:t,y:n,title:r,horizontal:i=!1,xAxisName:a,yAxisName:o,height:s=`400px`}){let{accountUid:c}=hc(),[l,d]=(0,u.useState)(!1),{data:f,isLoading:p,isError:h,error:g}=_c(c,(0,u.useMemo)(()=>({sql:e}),[e])),_=(0,u.useMemo)(()=>{if(!f?.rows?.length)return null;let e=f.rows.map(e=>String(e[t]??``)),s=f.rows.map(e=>e[n]??null);return{title:r?{text:r}:void 0,tooltip:{trigger:`axis`,axisPointer:{type:`shadow`}},toolbox:{feature:{myToggleLabels:{show:!0,title:l?`Hide Labels`:`Show Labels`,icon:`path://M3 3h18v18H3z M6 6h12v2H6z M6 10h8v2H6z`,onclick:()=>d(e=>!e)}}},grid:{containLabel:!0},...i?{xAxis:{type:`value`,name:a},yAxis:{type:`category`,data:e,name:o}}:{xAxis:{type:`category`,data:e,name:a},yAxis:{type:`value`,name:o}},series:[{type:`bar`,data:s,label:l?{show:!0,position:i?`right`:`top`}:void 0}]}},[f,t,n,r,i,a,o,l]),v={height:typeof s==`number`?`${s}px`:s,width:`100%`};return p?(0,m.jsx)(`div`,{style:v,className:`erica-chart-loading`}):h?(0,m.jsx)(`div`,{style:{...v,display:`flex`,alignItems:`center`,justifyContent:`center`},className:`erica-chart-error-container`,children:(0,m.jsx)(`p`,{className:`erica-chart-error-text`,children:g?.message??`Failed to load chart data`})}):_?(0,m.jsx)(fc,{option:_,style:v}):(0,m.jsx)(`div`,{style:{...v,display:`flex`,alignItems:`center`,justifyContent:`center`},className:`erica-chart-no-data`,children:(0,m.jsx)(`p`,{className:`erica-chart-no-data-text`,children:`No data`})})}function yc({sql:e,x:t,y:n,title:r,xAxisName:i,yAxisName:a,height:o=`400px`}){let{accountUid:s}=hc(),[c,l]=(0,u.useState)(!1),{data:d,isLoading:f,isError:p,error:h}=_c(s,(0,u.useMemo)(()=>({sql:e}),[e])),g=(0,u.useMemo)(()=>{if(!d?.rows?.length)return null;let e=d.rows.map(e=>String(e[t]??``)),o=d.rows.map(e=>e[n]??null);return{title:r?{text:r}:void 0,tooltip:{trigger:`axis`},toolbox:{feature:{myToggleLabels:{show:!0,title:c?`Hide Labels`:`Show Labels`,icon:`path://M3 3h18v18H3z M6 6h12v2H6z M6 10h8v2H6z`,onclick:()=>l(e=>!e)}}},grid:{containLabel:!0},xAxis:{type:`category`,data:e,name:i},yAxis:{type:`value`,name:a},series:[{type:`line`,data:o,smooth:!0,label:c?{show:!0,position:`top`}:void 0}]}},[d,t,n,r,i,a,c]),_={height:typeof o==`number`?`${o}px`:o,width:`100%`};return f?(0,m.jsx)(`div`,{style:_,className:`erica-chart-loading`}):p?(0,m.jsx)(`div`,{style:{..._,display:`flex`,alignItems:`center`,justifyContent:`center`},className:`erica-chart-error-container`,children:(0,m.jsx)(`p`,{className:`erica-chart-error-text`,children:h?.message??`Failed to load chart data`})}):g?(0,m.jsx)(fc,{option:g,style:_}):(0,m.jsx)(`div`,{style:{..._,display:`flex`,alignItems:`center`,justifyContent:`center`},className:`erica-chart-no-data`,children:(0,m.jsx)(`p`,{className:`erica-chart-no-data-text`,children:`No data`})})}function bc({sql:e,name:t,value:n,title:r,height:i=`400px`,donut:a=!1,showLabels:o=!0,showLegend:s=!0}){let{accountUid:c}=hc(),[l,d]=(0,u.useState)(o),[f,p]=(0,u.useState)(s),{data:h,isLoading:g,isError:_,error:v}=_c(c,(0,u.useMemo)(()=>({sql:e}),[e])),y=(0,u.useMemo)(()=>{if(!h?.rows?.length)return null;let e=h.rows.map(e=>({name:String(e[t]??``),value:Number(e[n]??0)}));return{title:r?{text:r}:void 0,tooltip:{trigger:`item`,formatter:`{a} <br/>{b}: {c} ({d}%)`},toolbox:{feature:{myToggleLabels:{show:!0,title:l?`Hide Labels`:`Show Labels`,icon:`path://M3 3h18v18H3z M6 6h12v2H6z M6 10h8v2H6z`,onclick:()=>d(e=>!e)},myToggleLegend:{show:!0,title:f?`Hide Legend`:`Show Legend`,icon:`path://M4 6h16M4 12h16M4 18h16`,onclick:()=>p(e=>!e)}}},legend:f?{show:!0,orient:`vertical`,left:`left`}:void 0,series:[{name:r??`Data`,type:`pie`,radius:a?[`40%`,`70%`]:`70%`,data:e,emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:`rgba(0, 0, 0, 0.5)`}},label:{show:l,formatter:`{b}: {c} ({d}%)`}}]}},[h,t,n,r,a,l,f]),b={height:typeof i==`number`?`${i}px`:i,width:`100%`};return g?(0,m.jsx)(`div`,{style:b,className:`erica-chart-loading`}):_?(0,m.jsx)(`div`,{style:{...b,display:`flex`,alignItems:`center`,justifyContent:`center`},className:`erica-chart-error-container`,children:(0,m.jsx)(`p`,{className:`erica-chart-error-text`,children:v?.message??`Failed to load chart data`})}):y?(0,m.jsx)(fc,{option:y,style:b}):(0,m.jsx)(`div`,{style:{...b,display:`flex`,alignItems:`center`,justifyContent:`center`},className:`erica-chart-no-data`,children:(0,m.jsx)(`p`,{className:`erica-chart-no-data-text`,children:`No data`})})}var xc={red:`#dc2626`,green:`#16a34a`,blue:`#2563eb`,yellow:`#ca8a04`,orange:`#ea580c`,purple:`#9333ea`,pink:`#db2777`,gray:`#6b7280`,black:`#111827`,white:`#ffffff`},Sc=e=>{if(!e)return null;let t=e.indexOf(`|`);if(t===-1)return{text:e};let n=e.slice(0,t).trim().toLowerCase(),r=e.slice(t+1).trim();return r?{text:r,color:xc[n]??n}:{text:e}};function Cc({sql:e,value:t,title:n=`Big Number`,subtitle:r,description:i,prefix:a=``,suffix:o=``,decimals:s=0}){let{accountUid:c}=hc(),{data:l,isLoading:d,isError:f,error:p}=_c(c,(0,u.useMemo)(()=>({sql:e}),[e])),h=(0,u.useMemo)(()=>l?.rows?.length?l.rows[0]?.[t]??null:null,[l,t]),g=(0,u.useMemo)(()=>{if(h==null||h===``)return`--`;let e=Number(h);return Number.isNaN(e)?String(h):`${a}${e.toLocaleString(void 0,{minimumFractionDigits:s,maximumFractionDigits:s})}${o}`},[h,a,o,s]),_=(0,u.useMemo)(()=>Sc(n),[n]),v=(0,u.useMemo)(()=>Sc(r),[r]),y=(0,u.useMemo)(()=>Sc(i),[i]),b=(0,u.useMemo)(()=>Sc(g),[g]);return d?(0,m.jsxs)(`div`,{className:`erica-bignumber-chart erica-bignumber-loading`,children:[(0,m.jsx)(`div`,{className:`erica-bignumber-skeleton-title`}),(0,m.jsx)(`div`,{className:`erica-bignumber-skeleton-value`}),(0,m.jsx)(`div`,{className:`erica-bignumber-skeleton-subtitle`})]}):f?(0,m.jsx)(`div`,{className:`erica-bignumber-chart erica-bignumber-error`,children:(0,m.jsx)(`p`,{className:`erica-bignumber-error-text`,children:p?.message??`Failed to load big number data`})}):(0,m.jsxs)(`div`,{className:`erica-bignumber-chart`,children:[(0,m.jsxs)(`div`,{className:`erica-bignumber-header`,children:[(0,m.jsx)(`p`,{className:`erica-bignumber-title`,style:_?.color?{color:_.color}:void 0,children:_?.text??n}),v&&(0,m.jsx)(`p`,{className:`erica-bignumber-subtitle`,style:v.color?{color:v.color}:void 0,children:v.text})]}),(0,m.jsxs)(`div`,{className:`erica-bignumber-content`,children:[(0,m.jsx)(`p`,{className:`erica-bignumber-value`,style:b?.color?{color:b.color}:void 0,children:b?.text??g}),y&&(0,m.jsx)(`p`,{className:`erica-bignumber-description`,style:y.color?{color:y.color}:void 0,children:y.text})]})]})}var wc=e=>e==null||e===``?`—`:typeof e==`object`?JSON.stringify(e):String(e);function Tc({sql:e,title:t,height:n=`400px`,columns:r,maxRows:i}){let{accountUid:a}=hc(),{data:o,isLoading:s,isError:c,error:l}=_c(a,(0,u.useMemo)(()=>({sql:e}),[e])),d=(0,u.useMemo)(()=>{let e=o?.columns?.length?o.columns:[];return r?r.split(`,`).map(e=>e.trim()).filter(t=>e.includes(t)):e},[o,r]),f=(0,u.useMemo)(()=>{let e=o?.rows??[];return!i||i<=0?e:e.slice(0,i)},[o,i]),p={height:typeof n==`number`?`${n}px`:n,width:`100%`};return s?(0,m.jsx)(`div`,{style:p,className:`erica-chart-loading`,children:(0,m.jsx)(`div`,{className:`erica-chart-loading-spinner`})}):c?(0,m.jsx)(`div`,{style:p,className:`erica-chart-error`,children:(0,m.jsx)(`p`,{children:l?.message??`Failed to load table data`})}):!d.length||!f.length?(0,m.jsx)(`div`,{style:p,className:`erica-chart-no-data`,children:(0,m.jsx)(`p`,{children:`No data`})}):(0,m.jsxs)(`div`,{style:p,className:`erica-table-chart`,children:[t&&(0,m.jsx)(`div`,{className:`erica-table-chart-header`,children:(0,m.jsx)(`p`,{className:`erica-table-chart-title`,children:t})}),(0,m.jsx)(`div`,{className:`erica-table-chart-container`,children:(0,m.jsxs)(`table`,{className:`erica-table`,children:[(0,m.jsx)(`thead`,{children:(0,m.jsx)(`tr`,{children:d.map(e=>(0,m.jsx)(`th`,{children:e},e))})}),(0,m.jsx)(`tbody`,{children:f.map((e,t)=>(0,m.jsx)(`tr`,{children:d.map(n=>(0,m.jsx)(`td`,{children:(0,m.jsx)(`div`,{className:`erica-table-cell-content`,children:wc(e[n])})},`${t}-${n}`))},String(e._erica_id??t)))})]})})]})}var Ec=e=>Object.fromEntries(Object.entries(e).filter(([e,t])=>t!==void 0));function Dc({sql:e,x:t,y:n,seriesBy:r,size:i,color:a,title:o,height:s=`400px`,xAxisName:c,yAxisName:l}){let{accountUid:d}=hc(),[f,p]=(0,u.useState)(!1),h=(0,u.useMemo)(()=>n.includes(`,`)?n.split(`,`).map(e=>e.trim()):[n],[n]),{data:g,isLoading:_,isError:v,error:y}=_c(d,(0,u.useMemo)(()=>({sql:e}),[e])),b=(0,u.useMemo)(()=>{if(!g?.rows?.length)return null;let e=(e,n)=>{let r=[Number(e[t]??0),Number(e[n]??0)];return i&&r.push(Number(e[i]??0)),a&&r.push(String(e[a]??``)),r},n=r?g.rows.reduce((e,t)=>{let n=String(t[r]??`Unknown`);return e[n]||(e[n]=[]),e[n].push(t),e},{}):null,s=(e,t)=>({name:t,type:`scatter`,symbolSize:i?e=>Math.sqrt(e[2])*2:10,data:e,label:f?{show:!0,formatter:e=>{let t=e.value;return`${t[0]}, ${t[1]}`}}:void 0,itemStyle:a?{color:e=>{let t=e.value,n=t[t.length-1],r=[`#5470c6`,`#91cc75`,`#fac858`,`#ee6666`,`#73c0de`,`#3ba272`,`#fc8452`,`#9a60b4`,`#ea7ccc`];return r[n.split(``).reduce((e,t)=>e+t.charCodeAt(0),0)%r.length]}}:void 0}),u=n?Object.entries(n).flatMap(([t,n])=>h.map(r=>{let i=h.length>1?`${t} - ${r}`:t;return s(n.map(t=>e(t,r)),i)})):h.map(t=>s(g.rows.map(n=>e(n,t)),t));return Ec({title:o?{text:o}:void 0,tooltip:{trigger:`item`,formatter:e=>{let n=e.value,r=`${e.seriesName?`${e.seriesName}<br/>`:``}${t}: ${n[0]}<br/>${l??`Value`}: ${n[1]}`,o=2;return i&&(r+=`<br/>${i}: ${n[o++]}`),a&&(r+=`<br/>${a}: ${n[o]}`),r}},toolbox:{feature:{myToggleLabels:{show:!0,title:f?`Hide Labels`:`Show Labels`,icon:`path://M3 3h18v18H3z M6 6h12v2H6z M6 10h8v2H6z`,onclick:()=>p(e=>!e)}}},xAxis:{type:`value`,name:c,scale:!0},yAxis:{type:`value`,name:l,scale:!0},legend:u.length>1?{show:!0}:void 0,series:u})},[g,t,h,r,i,a,o,c,l,f]),x={height:typeof s==`number`?`${s}px`:s,width:`100%`};return _?(0,m.jsxs)(`div`,{style:x,className:`erica-chart-loading`,children:[(0,m.jsx)(`div`,{className:`erica-chart-loading-spinner`}),(0,m.jsx)(`p`,{children:`Loading scatter chart...`})]}):v?(0,m.jsx)(`div`,{style:x,className:`erica-chart-error`,children:(0,m.jsx)(`p`,{children:y?.message??`Failed to load chart data`})}):b?(0,m.jsx)(fc,{option:b,style:x}):(0,m.jsx)(`div`,{style:x,className:`erica-chart-no-data`,children:(0,m.jsx)(`p`,{children:`No data`})})}var Oc=e=>Object.fromEntries(Object.entries(e).filter(([e,t])=>t!==void 0));function kc({sql:e,name:t,value:n,title:r,height:i=`400px`,showLabels:a=!0,showLegend:o=!1,sort:s=`descending`}){let{accountUid:c}=hc(),[l,d]=(0,u.useState)(a),[f,p]=(0,u.useState)(o),{data:h,isLoading:g,isError:_,error:v}=_c(c,(0,u.useMemo)(()=>({sql:e}),[e])),y=(0,u.useMemo)(()=>{if(!h?.rows?.length)return null;let e=h.rows.map(e=>({name:String(e[t]??``),value:Number(e[n]??0)}));return Oc({title:r?{text:r}:void 0,tooltip:{trigger:`item`,formatter:`{b}: {c}`},toolbox:{feature:{myToggleLabels:{show:!0,title:l?`Hide Labels`:`Show Labels`,icon:`path://M3 3h18v18H3z M6 6h12v2H6z M6 10h8v2H6z`,onclick:()=>d(e=>!e)},myToggleLegend:{show:!0,title:f?`Hide Legend`:`Show Legend`,icon:`path://M4 6h16M4 12h16M4 18h16`,onclick:()=>p(e=>!e)}}},legend:f?{show:!0,top:`bottom`}:void 0,series:[{type:`funnel`,left:`10%`,top:60,bottom:20,width:`80%`,min:0,minSize:`0%`,maxSize:`100%`,sort:s,gap:4,label:{show:l,position:`inside`,formatter:`{b}: {c}`},emphasis:{label:{fontSize:14}},data:e}]})},[h,t,n,r,s,l,f]),b={height:typeof i==`number`?`${i}px`:i,width:`100%`};return g?(0,m.jsxs)(`div`,{style:b,className:`erica-chart-loading`,children:[(0,m.jsx)(`div`,{className:`erica-chart-loading-spinner`}),(0,m.jsx)(`p`,{children:`Loading funnel chart...`})]}):_?(0,m.jsx)(`div`,{style:b,className:`erica-chart-error`,children:(0,m.jsx)(`p`,{children:v?.message??`Failed to load chart data`})}):y?(0,m.jsx)(fc,{option:y,style:b}):(0,m.jsx)(`div`,{style:b,className:`erica-chart-no-data`,children:(0,m.jsx)(`p`,{children:`No data`})})}function Ac({type:e,errors:t}){return(0,m.jsxs)(`div`,{className:`erica-chart-error`,children:[(0,m.jsxs)(`p`,{className:`erica-chart-error-title`,children:[`Erica Chart syntax error — `,(0,m.jsx)(`code`,{children:e})]}),(0,m.jsx)(`ul`,{className:`erica-chart-error-list`,children:t.map(e=>(0,m.jsx)(`li`,{className:`erica-chart-error-item`,children:e.message},e.field))})]})}function jc(e){let{type:t,attrs:n}=e,r=dc(t,n);if(!r.valid)return(0,m.jsx)(Ac,{type:t,errors:r.errors});switch(t){case`bar`:return(0,m.jsx)(vc,{sql:n.sql,x:n.x,y:n.y,title:n.title,horizontal:sc(n.horizontal),xAxisName:n.xAxisName,yAxisName:n.yAxisName});case`line`:return(0,m.jsx)(yc,{sql:n.sql,x:n.x,y:n.y,title:n.title,xAxisName:n.xAxisName,yAxisName:n.yAxisName});case`pie`:return(0,m.jsx)(bc,{sql:n.sql,name:n.name,value:n.value,title:n.title});case`bignumber`:return(0,m.jsx)(Cc,{sql:n.sql,value:n.value,title:n.title,subtitle:n.subtitle,description:n.description,prefix:n.prefix,suffix:n.suffix,decimals:cc(n.decimals)});case`table`:return(0,m.jsx)(Tc,{sql:n.sql,title:n.title,height:n.height,columns:n.columns,maxRows:cc(n.maxRows)});case`scatter`:return(0,m.jsx)(Dc,{sql:n.sql,x:n.x,y:n.y,seriesBy:n.seriesBy,size:n.size,color:n.color,title:n.title,height:n.height,xAxisName:n.xAxisName,yAxisName:n.yAxisName});case`funnel`:return(0,m.jsx)(kc,{sql:n.sql,name:n.name,value:n.value,title:n.title,height:n.height,showLabels:sc(n.showLabels),showLegend:sc(n.showLegend),sort:n.sort});default:return null}}function Mc({markdown:e}){return(0,m.jsx)(`div`,{className:`erica-chart-container`,children:(0,u.useMemo)(()=>uc(e),[e]).map((e,t)=>e.kind===`text`?e.content.trim()?(0,m.jsx)(`div`,{className:`erica-chart-text`,children:e.content},t):null:(0,m.jsx)(`div`,{className:`erica-chart-wrapper`,children:jc(e.node)},t))})}var Nc=Os({chartConfig:ts().describe(`Erica chart config syntax.`)});function Pc({chartConfig:e}){return(0,m.jsx)(`div`,{className:`erica-chart-card`,children:(0,m.jsx)(Mc,{markdown:e})})}var Fc=(0,u.createContext)(null);function Ic({children:e}){let[t,n]=(0,u.useState)(!1),[r,i]=(0,u.useState)(null),[a,o]=(0,u.useState)(`Artifacts`);return(0,m.jsx)(Fc.Provider,{value:{isOpen:t,onOpen:()=>n(!0),onClose:()=>n(!1),content:r,setContent:i,title:a,setTitle:o},children:e})}var Lc=()=>(0,u.useContext)(Fc)||{isOpen:!1,onOpen:()=>{},onClose:()=>{},content:null,setContent:()=>{},title:`Artifacts`,setTitle:()=>{}};function Rc(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var zc=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Bc=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Vc={};function Hc(e,t){return((t||Vc).jsx?Bc:zc).test(e)}var Uc=/[ \t\n\f\r]/g;function Wc(e){return typeof e==`object`?e.type===`text`?Gc(e.value):!1:Gc(e)}function Gc(e){return e.replace(Uc,``)===``}var Kc=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Kc.prototype.normal={},Kc.prototype.property={},Kc.prototype.space=void 0;function qc(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Kc(n,r,t)}function Jc(e){return e.toLowerCase()}var B=class{constructor(e,t){this.attribute=t,this.property=e}};B.prototype.attribute=``,B.prototype.booleanish=!1,B.prototype.boolean=!1,B.prototype.commaOrSpaceSeparated=!1,B.prototype.commaSeparated=!1,B.prototype.defined=!1,B.prototype.mustUseProperty=!1,B.prototype.number=!1,B.prototype.overloadedBoolean=!1,B.prototype.property=``,B.prototype.spaceSeparated=!1,B.prototype.space=void 0;var Yc=s({boolean:()=>V,booleanish:()=>H,commaOrSpaceSeparated:()=>G,commaSeparated:()=>Qc,number:()=>U,overloadedBoolean:()=>Zc,spaceSeparated:()=>W}),Xc=0,V=$c(),H=$c(),Zc=$c(),U=$c(),W=$c(),Qc=$c(),G=$c();function $c(){return 2**++Xc}var el=Object.keys(Yc),tl=class extends B{constructor(e,t,n,r){let i=-1;if(super(e,t),nl(this,`space`,r),typeof n==`number`)for(;++i<el.length;){let e=el[i];nl(this,el[i],(n&Yc[e])===Yc[e])}}};tl.prototype.defined=!0;function nl(e,t,n){n&&(e[t]=n)}function rl(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new tl(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Jc(r)]=r,n[Jc(a.attribute)]=r}return new Kc(t,n,e.space)}var il=rl({properties:{ariaActiveDescendant:null,ariaAtomic:H,ariaAutoComplete:null,ariaBusy:H,ariaChecked:H,ariaColCount:U,ariaColIndex:U,ariaColSpan:U,ariaControls:W,ariaCurrent:null,ariaDescribedBy:W,ariaDetails:null,ariaDisabled:H,ariaDropEffect:W,ariaErrorMessage:null,ariaExpanded:H,ariaFlowTo:W,ariaGrabbed:H,ariaHasPopup:null,ariaHidden:H,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:W,ariaLevel:U,ariaLive:null,ariaModal:H,ariaMultiLine:H,ariaMultiSelectable:H,ariaOrientation:null,ariaOwns:W,ariaPlaceholder:null,ariaPosInSet:U,ariaPressed:H,ariaReadOnly:H,ariaRelevant:null,ariaRequired:H,ariaRoleDescription:W,ariaRowCount:U,ariaRowIndex:U,ariaRowSpan:U,ariaSelected:H,ariaSetSize:U,ariaSort:null,ariaValueMax:U,ariaValueMin:U,ariaValueNow:U,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function al(e,t){return t in e?e[t]:t}function ol(e,t){return al(e,t.toLowerCase())}var sl=rl({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:Qc,acceptCharset:W,accessKey:W,action:null,allow:null,allowFullScreen:V,allowPaymentRequest:V,allowUserMedia:V,alt:null,as:null,async:V,autoCapitalize:null,autoComplete:W,autoFocus:V,autoPlay:V,blocking:W,capture:null,charSet:null,checked:V,cite:null,className:W,cols:U,colSpan:null,content:null,contentEditable:H,controls:V,controlsList:W,coords:U|Qc,crossOrigin:null,data:null,dateTime:null,decoding:null,default:V,defer:V,dir:null,dirName:null,disabled:V,download:Zc,draggable:H,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:V,formTarget:null,headers:W,height:U,hidden:Zc,high:U,href:null,hrefLang:null,htmlFor:W,httpEquiv:W,id:null,imageSizes:null,imageSrcSet:null,inert:V,inputMode:null,integrity:null,is:null,isMap:V,itemId:null,itemProp:W,itemRef:W,itemScope:V,itemType:W,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:V,low:U,manifest:null,max:null,maxLength:U,media:null,method:null,min:null,minLength:U,multiple:V,muted:V,name:null,nonce:null,noModule:V,noValidate:V,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:V,optimum:U,pattern:null,ping:W,placeholder:null,playsInline:V,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:V,referrerPolicy:null,rel:W,required:V,reversed:V,rows:U,rowSpan:U,sandbox:W,scope:null,scoped:V,seamless:V,selected:V,shadowRootClonable:V,shadowRootDelegatesFocus:V,shadowRootMode:null,shape:null,size:U,sizes:null,slot:null,span:U,spellCheck:H,src:null,srcDoc:null,srcLang:null,srcSet:null,start:U,step:null,style:null,tabIndex:U,target:null,title:null,translate:null,type:null,typeMustMatch:V,useMap:null,value:H,width:U,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:W,axis:null,background:null,bgColor:null,border:U,borderColor:null,bottomMargin:U,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:V,declare:V,event:null,face:null,frame:null,frameBorder:null,hSpace:U,leftMargin:U,link:null,longDesc:null,lowSrc:null,marginHeight:U,marginWidth:U,noResize:V,noHref:V,noShade:V,noWrap:V,object:null,profile:null,prompt:null,rev:null,rightMargin:U,rules:null,scheme:null,scrolling:H,standby:null,summary:null,text:null,topMargin:U,valueType:null,version:null,vAlign:null,vLink:null,vSpace:U,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:V,disableRemotePlayback:V,prefix:null,property:null,results:U,security:null,unselectable:null},space:`html`,transform:ol}),cl=rl({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:G,accentHeight:U,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:U,amplitude:U,arabicForm:null,ascent:U,attributeName:null,attributeType:null,azimuth:U,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:U,by:null,calcMode:null,capHeight:U,className:W,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:U,diffuseConstant:U,direction:null,display:null,dur:null,divisor:U,dominantBaseline:null,download:V,dx:null,dy:null,edgeMode:null,editable:null,elevation:U,enableBackground:null,end:null,event:null,exponent:U,externalResourcesRequired:null,fill:null,fillOpacity:U,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Qc,g2:Qc,glyphName:Qc,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:U,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:U,horizOriginX:U,horizOriginY:U,id:null,ideographic:U,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:U,k:U,k1:U,k2:U,k3:U,k4:U,kernelMatrix:G,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:U,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:U,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:U,overlineThickness:U,paintOrder:null,panose1:null,path:null,pathLength:U,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:W,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:U,pointsAtY:U,pointsAtZ:U,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:G,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:G,rev:G,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:G,requiredFeatures:G,requiredFonts:G,requiredFormats:G,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:U,specularExponent:U,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:U,strikethroughThickness:U,string:null,stroke:null,strokeDashArray:G,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:U,strokeOpacity:U,strokeWidth:null,style:null,surfaceScale:U,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:G,tabIndex:U,tableValues:null,target:null,targetX:U,targetY:U,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:G,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:U,underlineThickness:U,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:U,values:null,vAlphabetic:U,vMathematical:U,vectorEffect:null,vHanging:U,vIdeographic:U,version:null,vertAdvY:U,vertOriginX:U,vertOriginY:U,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:U,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:al}),ll=rl({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),ul=rl({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:ol}),dl=rl({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),fl={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},pl=/[A-Z]/g,ml=/-[a-z]/g,hl=/^data[-\w.:]+$/i;function gl(e,t){let n=Jc(t),r=t,i=B;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&hl.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(ml,vl);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!ml.test(e)){let n=e.replace(pl,_l);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=tl}return new i(r,t)}function _l(e){return`-`+e.toLowerCase()}function vl(e){return e.charAt(1).toUpperCase()}var yl=qc([il,sl,ll,ul,dl],`html`),bl=qc([il,cl,ll,ul,dl],`svg`);function xl(e){return e.join(` `).trim()}var Sl=o(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
|
|
45
|
+
`,d=`/`,f=`*`,p=``,m=`comment`,h=`declaration`;function g(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,g=1;function v(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(u);g=~n?e.length-n:g+e.length}function y(){var e={line:l,column:g};return function(t){return t.position=new b(e),C(),t}}function b(e){this.start=e,this.end={line:l,column:g},this.source=t.source}b.prototype.content=e;function x(n){var r=Error(t.source+`:`+l+`:`+g+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=g,r.source=e,!t.silent)throw r}function S(t){var n=t.exec(e);if(n){var r=n[0];return v(r),e=e.slice(r.length),n}}function C(){S(i)}function w(e){var t;for(e||=[];t=T();)t!==!1&&e.push(t);return e}function T(){var t=y();if(!(d!=e.charAt(0)||f!=e.charAt(1))){for(var n=2;p!=e.charAt(n)&&(f!=e.charAt(n)||d!=e.charAt(n+1));)++n;if(n+=2,p===e.charAt(n-1))return x(`End of comment missing`);var r=e.slice(2,n-2);return g+=2,v(r),e=e.slice(n),g+=2,t({type:m,comment:r})}}function E(){var e=y(),t=S(a);if(t){if(T(),!S(o))return x(`property missing ':'`);var r=S(s),i=e({type:h,property:_(t[0].replace(n,p)),value:r?_(r[0].replace(n,p)):p});return S(c),i}}function ee(){var e=[];w(e);for(var t;t=E();)t!==!1&&(e.push(t),w(e));return e}return C(),ee()}function _(e){return e?e.replace(l,p):p}t.exports=g})),Cl=o((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var n=t(Sl());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),wl=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),Tl=o(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Cl()),r=wl();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),El=Ol(`end`),Dl=Ol(`start`);function Ol(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function kl(e){let t=Dl(e),n=El(e);if(t&&n)return{start:t,end:n}}function Al(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Ml(e.position):`start`in e||`end`in e?Ml(e):`line`in e||`column`in e?jl(e):``}function jl(e){return Nl(e&&e.line)+`:`+Nl(e&&e.column)}function Ml(e){return jl(e&&e.start)+`-`+jl(e&&e.end)}function Nl(e){return e&&typeof e==`number`?e:1}var K=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=Al(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};K.prototype.file=``,K.prototype.name=``,K.prototype.reason=``,K.prototype.message=``,K.prototype.stack=``,K.prototype.column=void 0,K.prototype.line=void 0,K.prototype.ancestors=void 0,K.prototype.cause=void 0,K.prototype.fatal=void 0,K.prototype.place=void 0,K.prototype.ruleId=void 0,K.prototype.source=void 0;var Pl=l(Tl(),1),Fl={}.hasOwnProperty,Il=new Map,Ll=/[A-Z]/g,Rl=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),zl=new Set([`td`,`th`]),Bl=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function Vl(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=Ql(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=Zl(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?bl:yl,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Hl(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Hl(e,t,n){if(t.type===`element`)return Ul(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return Wl(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Kl(e,t,n);if(t.type===`mdxjsEsm`)return Gl(e,t);if(t.type===`root`)return ql(e,t,n);if(t.type===`text`)return Jl(e,t)}function Ul(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=bl,e.schema=i),e.ancestors.push(t);let a=iu(e,t.tagName,!1),o=$l(e,t),s=tu(e,t);return Rl.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!Wc(e):!0})),Yl(e,o,a,t),Xl(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Wl(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}au(e,t.position)}function Gl(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);au(e,t.position)}function Kl(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=bl,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:iu(e,t.name,!0),o=eu(e,t),s=tu(e,t);return Yl(e,o,a,t),Xl(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function ql(e,t,n){let r={};return Xl(r,tu(e,t)),e.create(t,e.Fragment,r,n)}function Jl(e,t){return t.value}function Yl(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Xl(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function Zl(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function Ql(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Dl(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function $l(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Fl.call(t.properties,i)){let a=nu(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&zl.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function eu(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else au(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else au(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function tu(e,t){let n=[],r=-1,i=e.passKeys?new Map:Il;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=Hl(e,a,o);s!==void 0&&n.push(s)}return n}function nu(e,t,n){let r=gl(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Rc(n):xl(n)),r.property===`style`){let t=typeof n==`object`?n:ru(e,String(n));return e.stylePropertyNameCase===`css`&&(t=ou(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?fl[r.property]||r.property:r.attribute,n]}}function ru(e,t){try{return(0,Pl.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new K("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=Bl+`#cannot-parse-style-attribute`,r}}function iu(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=Hc(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=Hc(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Fl.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);au(e)}function au(e,t){let n=new K("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=Bl+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function ou(e){let t={},n;for(n in e)Fl.call(e,n)&&(t[su(n)]=e[n]);return t}function su(e){let t=e.replace(Ll,cu);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function cu(e){return`-`+e.toLowerCase()}var lu={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},uu={};function du(e,t){let n=t||uu;return fu(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function fu(e,t,n){if(mu(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return pu(e.children,t,n)}return Array.isArray(e)?pu(e,t,n):``}function pu(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=fu(e[i],t,n);return r.join(``)}function mu(e){return!!(e&&typeof e==`object`)}var hu=document.createElement(`i`);function gu(e){let t=`&`+e+`;`;hu.innerHTML=t;let n=hu.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}function _u(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function q(e,t){return e.length>0?(_u(e,e.length,0,t),e):t}var vu={}.hasOwnProperty;function yu(e){let t={},n=-1;for(;++n<e.length;)bu(t,e[n]);return t}function bu(e,t){let n;for(n in t){let r=(vu.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){vu.call(r,a)||(r[a]=[]);let e=i[a];xu(r[a],Array.isArray(e)?e:e?[e]:[])}}}function xu(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);_u(e,0,0,r)}function Su(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function Cu(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var wu=Mu(/[A-Za-z]/),J=Mu(/[\dA-Za-z]/),Tu=Mu(/[#-'*+\--9=?A-Z^-~]/);function Eu(e){return e!==null&&(e<32||e===127)}var Du=Mu(/\d/),Ou=Mu(/[\dA-Fa-f]/),ku=Mu(/[!-/:-@[-`{-~]/);function Y(e){return e!==null&&e<-2}function X(e){return e!==null&&(e<0||e===32)}function Z(e){return e===-2||e===-1||e===32}var Au=Mu(/\p{P}|\p{S}/u),ju=Mu(/\s/);function Mu(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Nu(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&J(e.charCodeAt(n+1))&&J(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function Q(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return Z(r)?(e.enter(n),s(r)):t(r)}function s(r){return Z(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var Pu={tokenize:Fu};function Fu(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),Q(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return Y(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var Iu={tokenize:Ru},Lu={tokenize:zu};function Ru(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return _u(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Lu,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(Lu,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return Y(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;_u(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function zu(e,t,n){return Q(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function Bu(e){if(e===null||X(e)||ju(e))return 1;if(Au(e))return 2}function Vu(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var Hu={name:`attention`,resolveAll:Uu,tokenize:Wu};function Uu(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};Gu(d,-c),Gu(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=q(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=q(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=q(l,Vu(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=q(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=q(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,_u(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function Wu(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Bu(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=Bu(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function Gu(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Ku={name:`autolink`,tokenize:qu};function qu(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return wu(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||J(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||J(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||Eu(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):Tu(t)?(e.consume(t),l):n(t)}function u(e){return J(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||J(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var Ju={partial:!0,tokenize:Yu};function Yu(e,t,n){return r;function r(t){return Z(t)?Q(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||Y(e)?t(e):n(e)}}var Xu={continuation:{tokenize:Qu},exit:$u,name:`blockQuote`,tokenize:Zu};function Zu(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return Z(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function Qu(e,t,n){let r=this;return i;function i(t){return Z(t)?Q(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(Xu,t,n)(r)}}function $u(e){e.exit(`blockQuote`)}var ed={name:`characterEscape`,tokenize:td};function td(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return ku(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var nd={name:`characterReference`,tokenize:rd};function rd(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=J,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=Ou,u):(e.enter(`characterReferenceValue`),a=7,o=Du,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===J&&!gu(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var id={partial:!0,tokenize:sd},ad={concrete:!0,name:`codeFenced`,tokenize:od};function od(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),Z(t)?Q(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||Y(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(id,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||Y(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):Z(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),Q(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||Y(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||Y(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&Z(t)?Q(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||Y(t)?e.check(id,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||Y(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),Z(t)?Q(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),Z(t)?Q(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||Y(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function sd(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var cd={name:`codeIndented`,tokenize:ud},ld={partial:!0,tokenize:dd};function ud(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),Q(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):Y(t)?e.attempt(ld,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||Y(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function dd(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):Y(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):Q(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):Y(e)?i(e):n(e)}}var fd={name:`codeText`,previous:md,resolve:pd,tokenize:hd};function pd(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function md(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function hd(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):Y(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||Y(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var gd=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&_d(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),_d(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),_d(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);_d(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);_d(this.left,t.reverse())}}};function _d(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function vd(e){let t={},n=-1,r,i,a,o,s,c,l,u=new gd(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,yd(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return _u(e,0,1/0,u.slice(0)),!l}function yd(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var bd={resolve:Sd,tokenize:Cd},xd={partial:!0,tokenize:wd};function Sd(e){return vd(e),e}function Cd(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):Y(t)?e.check(xd,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function wd(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Q(e,a,`linePrefix`)}function a(i){if(i===null||Y(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function Td(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||Eu(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||Y(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||X(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||Eu(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function Ed(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):Y(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||Y(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!Z(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function Dd(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):Y(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Q(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||Y(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function Od(e,t){let n;return r;function r(i){return Y(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):Z(i)?Q(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var kd={name:`definition`,tokenize:jd},Ad={partial:!0,tokenize:Md};function jd(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return Ed.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=Cu(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return X(t)?Od(e,l)(t):l(t)}function l(t){return Td(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Ad,d,d)(t)}function d(t){return Z(t)?Q(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||Y(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Md(e,t,n){return r;function r(t){return X(t)?Od(e,i)(t):n(t)}function i(t){return Dd(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return Z(t)?Q(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||Y(e)?t(e):n(e)}}var Nd={name:`hardBreakEscape`,tokenize:Pd};function Pd(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return Y(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var Fd={name:`headingAtx`,resolve:Id,tokenize:Ld};function Id(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},_u(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function Ld(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||X(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||Y(n)?(e.exit(`atxHeading`),t(n)):Z(n)?Q(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||X(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var Rd=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),zd=[`pre`,`script`,`style`,`textarea`],Bd={concrete:!0,name:`htmlFlow`,resolveTo:Ud,tokenize:Wd},Vd={partial:!0,tokenize:Kd},Hd={partial:!0,tokenize:Gd};function Ud(e){let t=e.length;for(;t--&&!(e[t][0]===`enter`&&e[t][1].type===`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Wd(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:ce):wu(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):wu(a)?(e.consume(a),i=4,r.interrupt?t:ce):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:ce):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:D:m):n(i)}function h(t){return wu(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||X(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&zd.includes(l)?(i=1,r.interrupt?t(s):D(s)):Rd.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):D(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||J(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:D):n(i)}function v(t){return Z(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||wu(t)?(e.consume(t),b):Z(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||J(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):Z(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):Z(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||Y(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||X(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||Z(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),ee):n(t)}function ee(t){return t===null||Y(t)?D(t):Z(t)?(e.consume(t),ee):n(t)}function D(t){return t===45&&i===2?(e.consume(t),ie):t===60&&i===1?(e.consume(t),ae):t===62&&i===4?(e.consume(t),le):t===63&&i===3?(e.consume(t),ce):t===93&&i===5?(e.consume(t),se):Y(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Vd,ue,te)(t)):t===null||Y(t)?(e.exit(`htmlFlowData`),te(t)):(e.consume(t),D)}function te(t){return e.check(Hd,ne,ue)(t)}function ne(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),re}function re(t){return t===null||Y(t)?te(t):(e.enter(`htmlFlowData`),D(t))}function ie(t){return t===45?(e.consume(t),ce):D(t)}function ae(t){return t===47?(e.consume(t),o=``,oe):D(t)}function oe(t){if(t===62){let n=o.toLowerCase();return zd.includes(n)?(e.consume(t),le):D(t)}return wu(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),oe):D(t)}function se(t){return t===93?(e.consume(t),ce):D(t)}function ce(t){return t===62?(e.consume(t),le):t===45&&i===2?(e.consume(t),ce):D(t)}function le(t){return t===null||Y(t)?(e.exit(`htmlFlowData`),ue(t)):(e.consume(t),le)}function ue(n){return e.exit(`htmlFlow`),t(n)}}function Gd(e,t,n){let r=this;return i;function i(t){return Y(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function Kd(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(Ju,t,n)}}var qd={name:`htmlText`,tokenize:Jd};function Jd(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):wu(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):wu(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):Y(t)?(o=d,ae(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?ie(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):Y(t)?(o=h,ae(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?ie(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?ie(t):Y(t)?(o=v,ae(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):Y(t)?(o=y,ae(t)):(e.consume(t),y)}function b(e){return e===62?ie(e):y(e)}function x(t){return wu(t)?(e.consume(t),S):n(t)}function S(t){return t===45||J(t)?(e.consume(t),S):C(t)}function C(t){return Y(t)?(o=C,ae(t)):Z(t)?(e.consume(t),C):ie(t)}function w(t){return t===45||J(t)?(e.consume(t),w):t===47||t===62||X(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),ie):t===58||t===95||wu(t)?(e.consume(t),E):Y(t)?(o=T,ae(t)):Z(t)?(e.consume(t),T):ie(t)}function E(t){return t===45||t===46||t===58||t===95||J(t)?(e.consume(t),E):ee(t)}function ee(t){return t===61?(e.consume(t),D):Y(t)?(o=ee,ae(t)):Z(t)?(e.consume(t),ee):T(t)}function D(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,te):Y(t)?(o=D,ae(t)):Z(t)?(e.consume(t),D):(e.consume(t),ne)}function te(t){return t===i?(e.consume(t),i=void 0,re):t===null?n(t):Y(t)?(o=te,ae(t)):(e.consume(t),te)}function ne(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||X(t)?T(t):(e.consume(t),ne)}function re(e){return e===47||e===62||X(e)?T(e):n(e)}function ie(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function ae(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),oe}function oe(t){return Z(t)?Q(e,se,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):se(t)}function se(t){return e.enter(`htmlTextData`),o(t)}}var Yd={name:`labelEnd`,resolveAll:$d,resolveTo:ef,tokenize:tf},Xd={tokenize:nf},Zd={tokenize:rf},Qd={tokenize:af};function $d(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&_u(e,0,e.length,n),e}function ef(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=q(s,e.slice(a+1,a+r+3)),s=q(s,[[`enter`,u,t]]),s=q(s,Vu(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=q(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=q(s,e.slice(o+1)),s=q(s,[[`exit`,c,t]]),_u(e,a,e.length,s),e}function tf(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(Cu(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(Xd,u,o?u:d)(t):t===91?e.attempt(Zd,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(Qd,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function nf(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return X(t)?Od(e,a)(t):a(t)}function a(t){return t===41?u(t):Td(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return X(t)?Od(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?Dd(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return X(t)?Od(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function rf(e,t,n){let r=this;return i;function i(t){return Ed.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(Cu(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function af(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var of={name:`labelStartImage`,resolveAll:Yd.resolveAll,tokenize:sf};function sf(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var cf={name:`labelStartLink`,resolveAll:Yd.resolveAll,tokenize:lf};function lf(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var uf={name:`lineEnding`,tokenize:df};function df(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),Q(e,t,`linePrefix`)}}var ff={name:`thematicBreak`,tokenize:pf};function pf(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||Y(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),Z(t)?Q(e,s,`whitespace`)(t):s(t))}}var $={continuation:{tokenize:_f},exit:yf,name:`list`,tokenize:gf},mf={partial:!0,tokenize:bf},hf={partial:!0,tokenize:vf};function gf(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:Du(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(ff,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return Du(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(Ju,r.interrupt?n:u,e.attempt(mf,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return Z(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function _f(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Ju,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Q(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!Z(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(hf,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,Q(e,e.attempt($,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function vf(e,t,n){let r=this;return Q(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function yf(e){e.exit(this.containerState.type)}function bf(e,t,n){let r=this;return Q(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!Z(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var xf={name:`setextUnderline`,resolveTo:Sf,tokenize:Cf};function Sf(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function Cf(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),Z(t)?Q(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||Y(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var wf={tokenize:Tf};function Tf(e){let t=this,n=e.attempt(Ju,r,e.attempt(this.parser.constructs.flowInitial,i,Q(e,e.attempt(this.parser.constructs.flow,i,e.attempt(bd,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var Ef={resolveAll:Af()},Df=kf(`string`),Of=kf(`text`);function kf(e){return{resolveAll:Af(e===`text`?jf:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function Af(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function jf(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var Mf=s({attentionMarkers:()=>Bf,contentInitial:()=>Pf,disable:()=>Vf,document:()=>Nf,flow:()=>If,flowInitial:()=>Ff,insideSpan:()=>zf,string:()=>Lf,text:()=>Rf}),Nf={42:$,43:$,45:$,48:$,49:$,50:$,51:$,52:$,53:$,54:$,55:$,56:$,57:$,62:Xu},Pf={91:kd},Ff={[-2]:cd,[-1]:cd,32:cd},If={35:Fd,42:ff,45:[xf,ff],60:Bd,61:xf,95:ff,96:ad,126:ad},Lf={38:nd,92:ed},Rf={[-5]:uf,[-4]:uf,[-3]:uf,33:of,38:nd,42:Hu,60:[Ku,qd],91:cf,92:[Nd,ed],93:Yd,95:Hu,96:fd},zf={null:[Hu,Ef]},Bf={null:[42,95]},Vf={null:[]};function Hf(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=q(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=Vu(a,l.events,l),l.events):[]}function f(e,t){return Wf(p(e),t)}function p(e){return Uf(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){Y(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&_u(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Uf(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function Wf(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
99
46
|
`;break;case-3:o=`\r
|
|
100
|
-
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function Mce(e){let t={constructs:Voe([yce,...(e||{}).extensions||[]]),content:n(qoe),defined:[],document:n(Yoe),flow:n(pce),lazy:{},string:n(gce),text:n(_ce)};return t;function n(e){return n;function n(n){return kce(t,e,n)}}}function Nce(e){for(;!k7(e););return e}var H7=/[\0\t\n\r]/g;function Pce(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(H7.lastIndex=u,c=H7.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var Fce=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ice(e){return e.replace(Fce,Lce)}function Lce(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return n7(n.slice(t?2:1),t?16:10)}return Q5(n)||e}var U7={}.hasOwnProperty;function Rce(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),zce(n)(Nce(Mce(n).document().write(Pce()(e,t,!0))))}function zce(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(Ce),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(ye),blockQuote:a(me),characterEscape:T,characterReference:T,codeFenced:a(he),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(he,o),codeText:a(ge,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(_e),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(ve),hardBreakEscape:a(be),hardBreakTrailing:a(be),htmlFlow:a(xe,o),htmlFlowData:T,htmlText:a(xe,o),htmlTextData:T,image:a(Se),label:o,link:a(Ce),listItem:a(Te),listItemValue:f,listOrdered:a(we,d),listUnordered:a(we),paragraph:a(Ee),reference:se,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(ye),strong:a(De),thematicBreak:a(ke)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:pe,autolinkProtocol:fe,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:le,characterReferenceMarkerNumeric:le,characterReferenceValue:ue,characterReference:de,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(j),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(k),htmlFlowData:E,htmlText:c(A),htmlTextData:E,image:c(te),label:re,labelText:ne,lineEnding:D,link:c(ee),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ce,resourceDestinationString:ie,resourceTitleString:ae,resource:oe,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};G7(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];U7.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||K7).call(a,void 0,e[0])}for(r.position={start:W7(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:W7(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:W7(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||K7).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+F5({start:e.start,end:e.end})+`): it’s not open`);n.position.end=W7(e.end)}function u(){return zoe(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=r7(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=Oe(),n.position={start:W7(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=W7(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=W7(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ee(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function te(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ne(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=Ice(t),n.identifier=r7(t).toLowerCase()}function re(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function ie(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function ae(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function oe(){this.data.inReference=void 0}function se(){this.data.referenceType=`collapsed`}function ce(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=r7(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function le(e){this.data.characterReferenceType=e.type}function ue(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=n7(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=Q5(t);let i=this.stack[this.stack.length-1];i.value+=r}function de(e){let t=this.stack.pop();t.position.end=W7(e.end)}function fe(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function pe(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function me(){return{type:`blockquote`,children:[]}}function he(){return{type:`code`,lang:null,meta:null,value:``}}function ge(){return{type:`inlineCode`,value:``}}function _e(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function ve(){return{type:`emphasis`,children:[]}}function ye(){return{type:`heading`,depth:0,children:[]}}function be(){return{type:`break`}}function xe(){return{type:`html`,value:``}}function Se(){return{type:`image`,title:null,url:``,alt:null}}function Ce(){return{type:`link`,title:null,url:``,children:[]}}function we(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function Te(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function Ee(){return{type:`paragraph`,children:[]}}function De(){return{type:`strong`,children:[]}}function Oe(){return{type:`text`,value:``}}function ke(){return{type:`thematicBreak`}}}function W7(e){return{line:e.line,column:e.column,offset:e.offset}}function G7(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?G7(e,r):Bce(e,r)}}function Bce(e,t){let n;for(n in t)if(U7.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function K7(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+F5({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+F5({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+F5({start:t.start,end:t.end})+`) is still open`)}function Vce(e){let t=this;t.parser=n;function n(n){return Rce(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function Hce(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Uce(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
101
|
-
`}]}function
|
|
102
|
-
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function
|
|
47
|
+
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function Gf(e){let t={constructs:yu([Mf,...(e||{}).extensions||[]]),content:n(Pu),defined:[],document:n(Iu),flow:n(wf),lazy:{},string:n(Df),text:n(Of)};return t;function n(e){return n;function n(n){return Hf(t,e,n)}}}function Kf(e){for(;!vd(e););return e}var qf=/[\0\t\n\r]/g;function Jf(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(qf.lastIndex=u,c=qf.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var Yf=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Xf(e){return e.replace(Yf,Zf)}function Zf(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return Su(n.slice(t?2:1),t?16:10)}return gu(n)||e}var Qf={}.hasOwnProperty;function $f(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),ep(n)(Kf(Gf(n).document().write(Jf()(e,t,!0))))}function ep(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(De),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(Ce),blockQuote:a(ve),characterEscape:T,characterReference:T,codeFenced:a(ye),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(ye,o),codeText:a(be,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(xe),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(Se),hardBreakEscape:a(we),hardBreakTrailing:a(we),htmlFlow:a(Te,o),htmlFlowData:T,htmlText:a(Te,o),htmlTextData:T,image:a(Ee),label:o,link:a(De),listItem:a(ke),listItemValue:f,listOrdered:a(Oe,d),listUnordered:a(Oe),paragraph:a(Ae),reference:de,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(Ce),strong:a(je),thematicBreak:a(Ne)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:_e,autolinkProtocol:ge,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:pe,characterReferenceMarkerNumeric:pe,characterReferenceValue:me,characterReference:he,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(re),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(D),hardBreakTrailing:c(D),htmlFlow:c(te),htmlFlowData:E,htmlText:c(ne),htmlTextData:E,image:c(ae),label:se,labelText:oe,lineEnding:ee,link:c(ie),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:fe,resourceDestinationString:ce,resourceTitleString:le,resource:ue,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};np(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];Qf.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||ip).call(a,void 0,e[0])}for(r.position={start:tp(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:tp(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:tp(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||ip).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+Al({start:e.start,end:e.end})+`): it’s not open`);n.position.end=tp(e.end)}function u(){return du(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Cu(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=Me(),n.position={start:tp(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=tp(e.end)}function ee(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=tp(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function D(){this.data.atHardBreak=!0}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ne(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function re(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ie(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ae(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function oe(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=Xf(t),n.identifier=Cu(t).toLowerCase()}function se(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function ce(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function le(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function ue(){this.data.inReference=void 0}function de(){this.data.referenceType=`collapsed`}function fe(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Cu(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function pe(e){this.data.characterReferenceType=e.type}function me(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=Su(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=gu(t);let i=this.stack[this.stack.length-1];i.value+=r}function he(e){let t=this.stack.pop();t.position.end=tp(e.end)}function ge(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function _e(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function ve(){return{type:`blockquote`,children:[]}}function ye(){return{type:`code`,lang:null,meta:null,value:``}}function be(){return{type:`inlineCode`,value:``}}function xe(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function Se(){return{type:`emphasis`,children:[]}}function Ce(){return{type:`heading`,depth:0,children:[]}}function we(){return{type:`break`}}function Te(){return{type:`html`,value:``}}function Ee(){return{type:`image`,title:null,url:``,alt:null}}function De(){return{type:`link`,title:null,url:``,children:[]}}function Oe(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function ke(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function Ae(){return{type:`paragraph`,children:[]}}function je(){return{type:`strong`,children:[]}}function Me(){return{type:`text`,value:``}}function Ne(){return{type:`thematicBreak`}}}function tp(e){return{line:e.line,column:e.column,offset:e.offset}}function np(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?np(e,r):rp(e,r)}}function rp(e,t){let n;for(n in t)if(Qf.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function ip(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+Al({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Al({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+Al({start:t.start,end:t.end})+`) is still open`)}function ap(e){let t=this;t.parser=n;function n(n){return $f(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function op(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function sp(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
48
|
+
`}]}function cp(e,t){let n=t.value?t.value+`
|
|
49
|
+
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function lp(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function up(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function dp(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=Nu(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function fp(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function pp(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function mp(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function hp(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return mp(e,t);let i={src:Nu(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function gp(e,t){let n={src:Nu(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function _p(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function vp(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return mp(e,t);let i={href:Nu(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function yp(e,t){let n={href:Nu(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function bp(e,t,n){let r=e.all(t),i=n?xp(n):Sp(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
103
50
|
`}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
104
|
-
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function
|
|
51
|
+
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function xp(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=Sp(n[r])}return t}function Sp(e){return e.spread??e.children.length>1}function Cp(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function wp(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Tp(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Ep(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Dp(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=Dl(t.children[1]),o=El(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function Op(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function kp(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var Ap=9,jp=32;function Mp(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(Np(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(Np(t.slice(i),i>0,!1)),a.join(``)}function Np(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===Ap||t===jp;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===Ap||t===jp;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function Pp(e,t){let n={type:`text`,value:Mp(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Fp(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var Ip={blockquote:op,break:sp,code:cp,delete:lp,emphasis:up,footnoteReference:dp,heading:fp,html:pp,imageReference:hp,image:gp,inlineCode:_p,linkReference:vp,link:yp,listItem:bp,list:Cp,paragraph:wp,root:Tp,strong:Ep,table:Dp,tableCell:kp,tableRow:Op,text:Pp,thematicBreak:Fp,toml:Lp,yaml:Lp,definition:Lp,footnoteDefinition:Lp};function Lp(){}var Rp=typeof self==`object`?self:globalThis,zp=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(new Rp[e](t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(new Rp[a](o),i)};return r},Bp=e=>zp(new Map,e)(0),Vp=``,{toString:Hp}={},{keys:Up}=Object,Wp=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=Hp.call(e).slice(8,-1);switch(n){case`Array`:return[1,Vp];case`Object`:return[2,Vp];case`Date`:return[3,Vp];case`RegExp`:return[4,Vp];case`Map`:return[5,Vp];case`Set`:return[6,Vp];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},Gp=([e,t])=>e===0&&(t===`function`||t===`symbol`),Kp=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=Wp(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of Up(r))(e||!Gp(Wp(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(Gp(Wp(n))||Gp(Wp(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!Gp(Wp(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},qp=(e,{json:t,lossy:n}={})=>{let r=[];return Kp(!(t||n),!!t,new Map,r)(e),r},Jp=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?Bp(qp(e,t)):structuredClone(e):(e,t)=>Bp(qp(e,t));function Yp(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function Xp(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function Zp(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||Yp,r=e.options.footnoteBackLabel||Xp,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=Nu(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...Jp(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
|
|
105
52
|
`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
|
|
106
|
-
`}]}}var
|
|
53
|
+
`}]}}var Qp=(function(e){if(e==null)return rm;if(typeof e==`function`)return nm(e);if(typeof e==`object`)return Array.isArray(e)?$p(e):em(e);if(typeof e==`string`)return tm(e);throw Error(`Expected function, string, or object as test`)});function $p(e){let t=[],n=-1;for(;++n<e.length;)t[n]=Qp(e[n]);return nm(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function em(e){let t=e;return nm(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function tm(e){return nm(t);function t(t){return t&&t.type===e}}function nm(e){return t;function t(t,n,r){return!!(im(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function rm(){return!0}function im(e){return typeof e==`object`&&!!e&&`type`in e}function am(e){return e}var om=[];function sm(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=Qp(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,`name`,{value:`node (`+am(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=om,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=cm(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function cm(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?om:[e]}function lm(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),sm(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var um={}.hasOwnProperty,dm={};function fm(e,t){let n=t||dm,r=new Map,i=new Map,a={all:s,applyData:mm,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...Ip,...n.handlers},one:o,options:n,patch:pm,wrap:gm};return lm(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(um.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=Jp(n);return r.children=a.all(e),r}return Jp(e)}return(a.options.unknownHandler||hm)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=_m(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=_m(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function pm(e,t){e.position&&(t.position=kl(e))}function mm(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,Jp(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function hm(e,t){let n=t.data||{},r=`value`in t&&!(um.call(n,`hProperties`)||um.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function gm(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
|
|
107
54
|
`});++r<e.length;)r&&n.push({type:`text`,value:`
|
|
108
55
|
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
|
|
109
|
-
`}),n}function
|
|
110
|
-
`},i)),a}function Ple(e,t){return e&&`run`in e?async function(n,r){let i=p9(n,{file:r,...t});await e.run(i,r)}:function(n,r){return p9(n,{file:r,...e||t})}}function m9(e){if(e)throw e}var Fle=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function h9(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Ile(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?Lle(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function Lle(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var g9={basename:Rle,dirname:zle,extname:Ble,join:Vle,sep:`/`};function Rle(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);_9(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function zle(e){if(_9(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function Ble(e){_9(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function Vle(...e){let t=-1,n;for(;++t<e.length;)_9(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:Hle(n)}function Hle(e){_9(e);let t=e.codePointAt(0)===47,n=Ule(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function Ule(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function _9(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var Wle={cwd:Gle};function Gle(){return`/`}function v9(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function Kle(e){if(typeof e==`string`)e=new URL(e);else if(!v9(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return qle(e)}function qle(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var y9=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],b9=class{constructor(e){let t;t=e?v9(e)?{path:e}:typeof e==`string`||Jle(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:Wle.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<y9.length;){let e=y9[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)y9.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?g9.basename(this.path):void 0}set basename(e){S9(e,`basename`),x9(e,`basename`),this.path=g9.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?g9.dirname(this.path):void 0}set dirname(e){C9(this.basename,`dirname`),this.path=g9.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?g9.extname(this.path):void 0}set extname(e){if(x9(e,`extname`),C9(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=g9.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){v9(e)&&(e=Kle(e)),S9(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?g9.basename(this.path,this.extname):void 0}set stem(e){S9(e,`stem`),x9(e,`stem`),this.path=g9.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new z5(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function x9(e,t){if(e&&e.includes(g9.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+g9.sep+"`")}function S9(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function C9(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function Jle(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Yle=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),w9=l(Fle(),1),Xle={}.hasOwnProperty,Zle=new class e extends Yle{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Ile()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,w9.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(D9(`data`,this.frozen),this.namespace[e]=t,this):Xle.call(this.namespace,e)&&this.namespace[e]||void 0:e?(D9(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=A9(e),n=this.parser||this.Parser;return T9(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),T9(`process`,this.parser||this.Parser),E9(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=A9(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);$le(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),T9(`processSync`,this.parser||this.Parser),E9(`processSync`,this.compiler||this.Compiler),this.process(e,r),k9(`processSync`,`process`,t),n;function r(e,r){t=!0,m9(e),n=r}}run(e,t,n){O9(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=A9(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),k9(`runSync`,`run`,n),r;function i(e,t){m9(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=A9(t),r=this.compiler||this.Compiler;return E9(`stringify`,r),O9(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(D9(`use`,this.frozen),e!=null)if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e);else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,w9.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null)if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];h9(o)&&h9(r)&&(r=(0,w9.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function T9(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function E9(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function D9(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function O9(e){if(!h9(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function k9(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function A9(e){return Qle(e)?e:new b9(e)}function Qle(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function $le(e){return typeof e==`string`||eue(e)}function eue(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var j9=[],M9={allowDangerousHtml:!0},tue=/^(https?|ircs?|mailto|xmpp)$/i,nue=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function rue(e){let t=iue(e),n=aue(e);return oue(t.runSync(t.parse(n),n),e)}function iue(e){let t=e.rehypePlugins||j9,n=e.remarkPlugins||j9,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...M9}:M9;return Zle().use(Vce).use(n).use(Ple,r).use(t)}function aue(e){let t=e.children||``,n=new b9;return typeof t==`string`?n.value=t:``+t,n}function oue(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||sue;for(let e of nue)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return u9(e,l),Soe(e,{Fragment:m.Fragment,components:i,ignoreInvalidStyle:!0,jsx:m.jsx,jsxs:m.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in J5)if(Object.hasOwn(J5,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=J5[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function sue(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||tue.test(e.slice(0,t))?e:``}function N9(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}var cue=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),P9={0:`�`,128:`€`,130:`‚`,131:`ƒ`,132:`„`,133:`…`,134:`†`,135:`‡`,136:`ˆ`,137:`‰`,138:`Š`,139:`‹`,140:`Œ`,142:`Ž`,145:`‘`,146:`’`,147:`“`,148:`”`,149:`•`,150:`–`,151:`—`,152:`˜`,153:`™`,154:`š`,155:`›`,156:`œ`,158:`ž`,159:`Ÿ`};function F9(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=48&&t<=57}function lue(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function uue(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}function I9(e){return uue(e)||F9(e)}var due=[``,`Named character references must be terminated by a semicolon`,`Numeric character references must be terminated by a semicolon`,`Named character references cannot be empty`,`Numeric character references cannot be empty`,`Named character references must be known`,`Numeric character references cannot be disallowed`,`Numeric character references cannot be outside the permissible Unicode range`];function L9(e,t){let n=t||{},r=typeof n.additional==`string`?n.additional.charCodeAt(0):n.additional,i=[],a=0,o=-1,s=``,c,l;n.position&&(`start`in n.position||`indent`in n.position?(l=n.position.indent,c=n.position.start):c=n.position);let u=(c?c.line:0)||1,d=(c?c.column:0)||1,f=m(),p;for(a--;++a<=e.length;)if(p===10&&(d=(l?l[o]:0)||1),p=e.charCodeAt(a),p===38){let t=e.charCodeAt(a+1);if(t===9||t===10||t===12||t===32||t===38||t===60||Number.isNaN(t)||r&&t===r){s+=String.fromCharCode(p),d++;continue}let o=a+1,c=o,l=o,u;if(t===35){l=++c;let t=e.charCodeAt(l);t===88||t===120?(u=`hexadecimal`,l=++c):u=`decimal`}else u=`named`;let _=``,v=``,y=``,b=u===`named`?I9:u===`decimal`?F9:lue;for(l--;++l<=e.length;){let t=e.charCodeAt(l);if(!b(t))break;y+=String.fromCharCode(t),u===`named`&&cue.includes(y)&&(_=y,v=Q5(y))}let x=e.charCodeAt(l)===59;if(x){l++;let e=u===`named`?Q5(y):!1;e&&(_=y,v=e)}let S=1+l-o,C=``;if(!(!x&&n.nonTerminated===!1))if(!y)u!==`named`&&h(4,S);else if(u===`named`){if(x&&!v)h(5,1);else if(_!==y&&(l=c+_.length,S=1+l-c,x=!1),!x){let t=_?1:3;if(n.attribute){let n=e.charCodeAt(l);n===61?(h(t,S),v=``):I9(n)?v=``:h(t,S)}else h(t,S)}C=v}else{x||h(2,S);let e=Number.parseInt(y,u===`hexadecimal`?16:10);if(fue(e))h(7,S),C=`�`;else if(e in P9)h(6,S),C=P9[e];else{let t=``;pue(e)&&h(6,S),e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10|55296),e=56320|e&1023),C=t+String.fromCharCode(e)}}if(C){g(),f=m(),a=l-1,d+=l-o+1,i.push(C);let t=m();t.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,C,{start:f,end:t},e.slice(o-1,l)),f=t}else y=e.slice(o-1,l),s+=y,d+=y.length,a=l-1}else p===10&&(u++,o++,d=0),Number.isNaN(p)?g():(s+=String.fromCharCode(p),d++);return i.join(``);function m(){return{line:u,column:d,offset:a+((c?c.offset:0)||0)}}function h(e,t){let r;n.warning&&(r=m(),r.column+=t,r.offset+=t,n.warning.call(n.warningContext||void 0,due[e],r,e))}function g(){s&&=(i.push(s),n.text&&n.text.call(n.textContext||void 0,s,{start:f,end:m()}),``)}}function fue(e){return e>=55296&&e<=57343||e>1114111}function pue(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)==65535||(e&65535)==65534}var mue=/["&'<>`]/g,hue=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,gue=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,_ue=/[|\\{}()[\]^$+*?.]/g,R9=new WeakMap;function vue(e,t){if(e=e.replace(t.subset?yue(t.subset):mue,r),t.subset||t.escapeOnly)return e;return e.replace(hue,n).replace(gue,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function yue(e){let t=R9.get(e);return t||(t=bue(e),R9.set(e,t)),t}function bue(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(_ue,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}function xue(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function Sue(e,t){return vue(e,Object.assign({format:xue},t))}var Cue={}.hasOwnProperty,wue={},z9=/^[^\t\n\r "#'.<=>`}]+$/,Tue=/^[^\t\n\r "'<=>`}]+$/;function Eue(){return{canContainEols:[`textDirective`],enter:{directiveContainer:Oue,directiveContainerAttributes:H9,directiveContainerLabel:jue,directiveLeaf:kue,directiveLeafAttributes:H9,directiveText:Aue,directiveTextAttributes:H9},exit:{directiveContainer:J9,directiveContainerAttributeClassValue:W9,directiveContainerAttributeIdValue:U9,directiveContainerAttributeName:K9,directiveContainerAttributeValue:G9,directiveContainerAttributes:q9,directiveContainerLabel:Mue,directiveContainerName:V9,directiveLeaf:J9,directiveLeafAttributeClassValue:W9,directiveLeafAttributeIdValue:U9,directiveLeafAttributeName:K9,directiveLeafAttributeValue:G9,directiveLeafAttributes:q9,directiveLeafName:V9,directiveText:J9,directiveTextAttributeClassValue:W9,directiveTextAttributeIdValue:U9,directiveTextAttributeName:K9,directiveTextAttributeValue:G9,directiveTextAttributes:q9,directiveTextName:V9}}}function Due(e){let t=e||wue;if(t.quote!==`"`&&t.quote!==`'`&&t.quote!==null&&t.quote!==void 0)throw Error("Invalid quote `"+t.quote+"`, expected `'` or `\"`");return n.peek=Nue,{handlers:{containerDirective:n,leafDirective:n,textDirective:n},unsafe:[{character:`\r`,inConstruct:[`leafDirectiveLabel`,`containerDirectiveLabel`]},{character:`
|
|
111
|
-
`,inConstruct:[`leafDirectiveLabel`,`containerDirectiveLabel`]},{before:`[^:]`,character:`:`,after:`[A-Za-z]`,inConstruct:[`phrasing`]},{atBreak:!0,character:`:`,after:`:`}]};function n(e,t,n,i){let a=n.createTracker(i),o=
|
|
56
|
+
`}),n}function _m(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function vm(e,t){let n=fm(e,t),r=n.one(e,void 0),i=Zp(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
|
|
57
|
+
`},i)),a}function ym(e,t){return e&&`run`in e?async function(n,r){let i=vm(n,{file:r,...t});await e.run(i,r)}:function(n,r){return vm(n,{file:r,...e||t})}}function bm(e){if(e)throw e}var xm=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function Sm(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Cm(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?wm(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function wm(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var Tm={basename:Em,dirname:Dm,extname:Om,join:km,sep:`/`};function Em(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);Mm(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function Dm(e){if(Mm(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function Om(e){Mm(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function km(...e){let t=-1,n;for(;++t<e.length;)Mm(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:Am(n)}function Am(e){Mm(e);let t=e.codePointAt(0)===47,n=jm(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function jm(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function Mm(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var Nm={cwd:Pm};function Pm(){return`/`}function Fm(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function Im(e){if(typeof e==`string`)e=new URL(e);else if(!Fm(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return Lm(e)}function Lm(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var Rm=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],zm=class{constructor(e){let t;t=e?Fm(e)?{path:e}:typeof e==`string`||Um(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:Nm.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Rm.length;){let e=Rm[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)Rm.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?Tm.basename(this.path):void 0}set basename(e){Vm(e,`basename`),Bm(e,`basename`),this.path=Tm.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?Tm.dirname(this.path):void 0}set dirname(e){Hm(this.basename,`dirname`),this.path=Tm.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?Tm.extname(this.path):void 0}set extname(e){if(Bm(e,`extname`),Hm(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=Tm.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){Fm(e)&&(e=Im(e)),Vm(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?Tm.basename(this.path,this.extname):void 0}set stem(e){Vm(e,`stem`),Bm(e,`stem`),this.path=Tm.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new K(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function Bm(e,t){if(e&&e.includes(Tm.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+Tm.sep+"`")}function Vm(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function Hm(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function Um(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Wm=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),Gm=l(xm(),1),Km={}.hasOwnProperty,qm=new class e extends Wm{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Cm()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,Gm.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(Xm(`data`,this.frozen),this.namespace[e]=t,this):Km.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Xm(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=$m(e),n=this.parser||this.Parser;return Jm(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),Jm(`process`,this.parser||this.Parser),Ym(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=$m(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);th(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),Jm(`processSync`,this.parser||this.Parser),Ym(`processSync`,this.compiler||this.Compiler),this.process(e,r),Qm(`processSync`,`process`,t),n;function r(e,r){t=!0,bm(e),n=r}}run(e,t,n){Zm(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=$m(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),Qm(`runSync`,`run`,n),r;function i(e,t){bm(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=$m(t),r=this.compiler||this.Compiler;return Ym(`stringify`,r),Zm(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(Xm(`use`,this.frozen),e!=null)if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e);else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,Gm.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null)if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];Sm(o)&&Sm(r)&&(r=(0,Gm.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function Jm(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function Ym(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function Xm(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Zm(e){if(!Sm(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function Qm(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function $m(e){return eh(e)?e:new zm(e)}function eh(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function th(e){return typeof e==`string`||nh(e)}function nh(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var rh=[],ih={allowDangerousHtml:!0},ah=/^(https?|ircs?|mailto|xmpp)$/i,oh=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function sh(e){let t=ch(e),n=lh(e);return uh(t.runSync(t.parse(n),n),e)}function ch(e){let t=e.rehypePlugins||rh,n=e.remarkPlugins||rh,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...ih}:ih;return qm().use(ap).use(n).use(ym,r).use(t)}function lh(e){let t=e.children||``,n=new zm;return typeof t==`string`?n.value=t:``+t,n}function uh(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||dh;for(let e of oh)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return lm(e,l),Vl(e,{Fragment:m.Fragment,components:i,ignoreInvalidStyle:!0,jsx:m.jsx,jsxs:m.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in lu)if(Object.hasOwn(lu,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=lu[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function dh(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||ah.test(e.slice(0,t))?e:``}function fh(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}var ph=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),mh={0:`�`,128:`€`,130:`‚`,131:`ƒ`,132:`„`,133:`…`,134:`†`,135:`‡`,136:`ˆ`,137:`‰`,138:`Š`,139:`‹`,140:`Œ`,142:`Ž`,145:`‘`,146:`’`,147:`“`,148:`”`,149:`•`,150:`–`,151:`—`,152:`˜`,153:`™`,154:`š`,155:`›`,156:`œ`,158:`ž`,159:`Ÿ`};function hh(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=48&&t<=57}function gh(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function _h(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}function vh(e){return _h(e)||hh(e)}var yh=[``,`Named character references must be terminated by a semicolon`,`Numeric character references must be terminated by a semicolon`,`Named character references cannot be empty`,`Numeric character references cannot be empty`,`Named character references must be known`,`Numeric character references cannot be disallowed`,`Numeric character references cannot be outside the permissible Unicode range`];function bh(e,t){let n=t||{},r=typeof n.additional==`string`?n.additional.charCodeAt(0):n.additional,i=[],a=0,o=-1,s=``,c,l;n.position&&(`start`in n.position||`indent`in n.position?(l=n.position.indent,c=n.position.start):c=n.position);let u=(c?c.line:0)||1,d=(c?c.column:0)||1,f=m(),p;for(a--;++a<=e.length;)if(p===10&&(d=(l?l[o]:0)||1),p=e.charCodeAt(a),p===38){let t=e.charCodeAt(a+1);if(t===9||t===10||t===12||t===32||t===38||t===60||Number.isNaN(t)||r&&t===r){s+=String.fromCharCode(p),d++;continue}let o=a+1,c=o,l=o,u;if(t===35){l=++c;let t=e.charCodeAt(l);t===88||t===120?(u=`hexadecimal`,l=++c):u=`decimal`}else u=`named`;let _=``,v=``,y=``,b=u===`named`?vh:u===`decimal`?hh:gh;for(l--;++l<=e.length;){let t=e.charCodeAt(l);if(!b(t))break;y+=String.fromCharCode(t),u===`named`&&ph.includes(y)&&(_=y,v=gu(y))}let x=e.charCodeAt(l)===59;if(x){l++;let e=u===`named`?gu(y):!1;e&&(_=y,v=e)}let S=1+l-o,C=``;if(!(!x&&n.nonTerminated===!1))if(!y)u!==`named`&&h(4,S);else if(u===`named`){if(x&&!v)h(5,1);else if(_!==y&&(l=c+_.length,S=1+l-c,x=!1),!x){let t=_?1:3;if(n.attribute){let n=e.charCodeAt(l);n===61?(h(t,S),v=``):vh(n)?v=``:h(t,S)}else h(t,S)}C=v}else{x||h(2,S);let e=Number.parseInt(y,u===`hexadecimal`?16:10);if(xh(e))h(7,S),C=`�`;else if(e in mh)h(6,S),C=mh[e];else{let t=``;Sh(e)&&h(6,S),e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10|55296),e=56320|e&1023),C=t+String.fromCharCode(e)}}if(C){g(),f=m(),a=l-1,d+=l-o+1,i.push(C);let t=m();t.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,C,{start:f,end:t},e.slice(o-1,l)),f=t}else y=e.slice(o-1,l),s+=y,d+=y.length,a=l-1}else p===10&&(u++,o++,d=0),Number.isNaN(p)?g():(s+=String.fromCharCode(p),d++);return i.join(``);function m(){return{line:u,column:d,offset:a+((c?c.offset:0)||0)}}function h(e,t){let r;n.warning&&(r=m(),r.column+=t,r.offset+=t,n.warning.call(n.warningContext||void 0,yh[e],r,e))}function g(){s&&=(i.push(s),n.text&&n.text.call(n.textContext||void 0,s,{start:f,end:m()}),``)}}function xh(e){return e>=55296&&e<=57343||e>1114111}function Sh(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)==65535||(e&65535)==65534}var Ch=/["&'<>`]/g,wh=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Th=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Eh=/[|\\{}()[\]^$+*?.]/g,Dh=new WeakMap;function Oh(e,t){if(e=e.replace(t.subset?kh(t.subset):Ch,r),t.subset||t.escapeOnly)return e;return e.replace(wh,n).replace(Th,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function kh(e){let t=Dh.get(e);return t||(t=Ah(e),Dh.set(e,t)),t}function Ah(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(Eh,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}function jh(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function Mh(e,t){return Oh(e,Object.assign({format:jh},t))}var Nh={}.hasOwnProperty,Ph={},Fh=/^[^\t\n\r "#'.<=>`}]+$/,Ih=/^[^\t\n\r "'<=>`}]+$/;function Lh(){return{canContainEols:[`textDirective`],enter:{directiveContainer:zh,directiveContainerAttributes:Kh,directiveContainerLabel:Wh,directiveLeaf:Bh,directiveLeafAttributes:Kh,directiveText:Vh,directiveTextAttributes:Kh},exit:{directiveContainer:Qh,directiveContainerAttributeClassValue:Jh,directiveContainerAttributeIdValue:qh,directiveContainerAttributeName:Xh,directiveContainerAttributeValue:Yh,directiveContainerAttributes:Zh,directiveContainerLabel:Gh,directiveContainerName:Uh,directiveLeaf:Qh,directiveLeafAttributeClassValue:Jh,directiveLeafAttributeIdValue:qh,directiveLeafAttributeName:Xh,directiveLeafAttributeValue:Yh,directiveLeafAttributes:Zh,directiveLeafName:Uh,directiveText:Qh,directiveTextAttributeClassValue:Jh,directiveTextAttributeIdValue:qh,directiveTextAttributeName:Xh,directiveTextAttributeValue:Yh,directiveTextAttributes:Zh,directiveTextName:Uh}}}function Rh(e){let t=e||Ph;if(t.quote!==`"`&&t.quote!==`'`&&t.quote!==null&&t.quote!==void 0)throw Error("Invalid quote `"+t.quote+"`, expected `'` or `\"`");return n.peek=$h,{handlers:{containerDirective:n,leafDirective:n,textDirective:n},unsafe:[{character:`\r`,inConstruct:[`leafDirectiveLabel`,`containerDirectiveLabel`]},{character:`
|
|
58
|
+
`,inConstruct:[`leafDirectiveLabel`,`containerDirectiveLabel`]},{before:`[^:]`,character:`:`,after:`[A-Za-z]`,inConstruct:[`phrasing`]},{atBreak:!0,character:`:`,after:`:`}]};function n(e,t,n,i){let a=n.createTracker(i),o=tg(e),s=n.enter(e.type),c=a.move(o+(e.name||``)),l;if(e.type===`containerDirective`){let t=(e.children||[])[0];l=eg(t)?t:void 0}else l=e;if(l&&l.children&&l.children.length>0){let t=n.enter(`label`),r=`${e.type}Label`,i=n.enter(r);c+=a.move(`[`),c+=a.move(n.containerPhrasing(l,{...a.current(),before:c,after:`]`})),c+=a.move(`]`),i(),t()}if(c+=a.move(r(e,n)),e.type===`containerDirective`){let t=(e.children||[])[0],r=e;eg(t)&&(r=Object.assign({},e,{children:e.children.slice(1)})),r&&r.children&&r.children.length>0&&(c+=a.move(`
|
|
112
59
|
`),c+=a.move(n.containerFlow(r,a.current()))),c+=a.move(`
|
|
113
|
-
`+o)}return s(),c}function r(e,n){let r=e.attributes||{},a=[],o,s,c,l;for(l in r)if(
|
|
114
|
-
`,`\r`];return e+`=`+s+Sue(n,{subset:c})+s}}function Oue(e){B9.call(this,`containerDirective`,e)}function kue(e){B9.call(this,`leafDirective`,e)}function Aue(e){B9.call(this,`textDirective`,e)}function B9(e,t){this.enter({type:e,name:``,attributes:{},children:[]},t)}function V9(e){let t=this.stack[this.stack.length-1];t.type===`containerDirective`||t.type===`leafDirective`||t.type,t.name=this.sliceSerialize(e)}function jue(e){this.enter({type:`paragraph`,data:{directiveLabel:!0},children:[]},e)}function Mue(e){this.exit(e)}function H9(){this.data.directiveAttributes=[],this.buffer()}function U9(e){this.data.directiveAttributes.push([`id`,L9(this.sliceSerialize(e),{attribute:!0})])}function W9(e){this.data.directiveAttributes.push([`class`,L9(this.sliceSerialize(e),{attribute:!0})])}function G9(e){let t=this.data.directiveAttributes;t[t.length-1][1]=L9(this.sliceSerialize(e),{attribute:!0})}function K9(e){this.data.directiveAttributes.push([this.sliceSerialize(e),``])}function q9(){let e=this.data.directiveAttributes,t={},n=-1;for(;++n<e.length;){let r=e[n];r[0]===`class`&&t.class?t.class+=` `+r[1]:t[r[0]]=r[1]}this.data.directiveAttributes=void 0,this.resume();let r=this.stack[this.stack.length-1];r.type===`containerDirective`||r.type===`leafDirective`||r.type,r.attributes=t}function J9(e){this.exit(e)}function Nue(){return`:`}function Y9(e){return!!(e&&e.type===`paragraph`&&e.data&&e.data.directiveLabel)}function Pue(e){let t=0;return e.type===`containerDirective`?(l9(e,function(e,n){if(e.type===`containerDirective`){let e=n.length,r=0;for(;e--;)n[e].type===`containerDirective`&&r++;r>t&&(t=r)}}),t+=3):t=e.type===`leafDirective`?2:1,`:`.repeat(t)}function X9(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m){let h,g;return _;function _(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),v}function v(t){return t===35?(h=o,y(t)):t===46?(h=s,y(t)):m&&u7(t)?h7(e,v,`whitespace`)(t):!m&&l7(t)?N7(e,v)(t):t===null||c7(t)||f7(t)||d7(t)&&t!==45&&t!==95?A(t):(e.enter(a),e.enter(c),e.consume(t),S)}function y(t){let n=h+`Marker`;return e.enter(a),e.enter(h),e.enter(n),e.consume(t),e.exit(n),b}function b(t){if(t===null||t===34||t===35||t===39||t===46||t===60||t===61||t===62||t===96||t===125||l7(t))return n(t);let r=h+`Value`;return e.enter(r),e.consume(t),x}function x(t){if(t===null||t===34||t===39||t===60||t===61||t===62||t===96)return n(t);if(t===35||t===46||t===125||l7(t)){let n=h+`Value`;return e.exit(n),e.exit(h),e.exit(a),v(t)}return e.consume(t),x}function S(t){return t===null||c7(t)||f7(t)||d7(t)&&t!==45&&t!==46&&t!==58&&t!==95?(e.exit(c),m&&u7(t)?h7(e,C,`whitespace`)(t):!m&&l7(t)?N7(e,C)(t):C(t)):(e.consume(t),S)}function C(t){return t===61?(e.enter(l),e.consume(t),e.exit(l),w):(e.exit(a),v(t))}function w(t){return t===null||t===60||t===61||t===62||t===96||t===125||m&&c7(t)?n(t):t===34||t===39?(e.enter(u),e.enter(f),e.consume(t),e.exit(f),g=t,E):m&&u7(t)?h7(e,w,`whitespace`)(t):!m&&l7(t)?N7(e,w)(t):(e.enter(d),e.enter(p),e.consume(t),g=void 0,T)}function T(t){return t===null||t===34||t===39||t===60||t===61||t===62||t===96?n(t):t===125||l7(t)?(e.exit(p),e.exit(d),e.exit(a),v(t)):(e.consume(t),T)}function E(t){return t===g?(e.enter(f),e.consume(t),e.exit(f),e.exit(u),e.exit(a),k):(e.enter(d),D(t))}function D(t){return t===g?(e.exit(d),E(t)):t===null?n(t):c7(t)?m?n(t):N7(e,D)(t):(e.enter(p),e.consume(t),O)}function O(t){return t===g||t===null||c7(t)?(e.exit(p),D(t)):(e.consume(t),O)}function k(e){return e===125||l7(e)?v(e):A(e)}function A(a){return a===125?(e.enter(i),e.consume(a),e.exit(i),e.exit(r),t):n(a)}}function Z9(e,t,n,r,i,a,o){let s=0,c=0,l;return u;function u(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),d}function d(n){return n===93?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),f(n))}function f(t){if(t===93&&!c)return h(t);let n=e.enter(`chunkText`,{_contentTypeTextTrailing:!0,contentType:`text`,previous:l});return l&&(l.next=n),l=n,p(t)}function p(t){return t===null||s>999||t===91&&++c>32?n(t):t===93&&!c--?(e.exit(`chunkText`),h(t)):c7(t)?o?n(t):(e.consume(t),e.exit(`chunkText`),f):(e.consume(t),t===92?m:p)}function m(t){return t===91||t===92||t===93?(e.consume(t),s++,p):p(t)}function h(n){return e.exit(a),e.enter(i),e.consume(n),e.exit(i),e.exit(r),t}}function Q9(e,t,n,r){let i=this;return a;function a(t){return t===null||c7(t)||d7(t)||f7(t)?n(t):(e.enter(r),e.consume(t),o)}function o(a){return a===null||c7(a)||f7(a)||d7(a)&&a!==45&&a!==95?(e.exit(r),i.previous===45||i.previous===95?n(a):t(a)):(e.consume(a),o)}}var Fue={tokenize:Rue,concrete:!0},Iue={tokenize:zue,partial:!0},Lue={tokenize:Bue,partial:!0},$9={tokenize:Vue,partial:!0};function Rue(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0,s;return c;function c(t){return e.enter(`directiveContainer`),e.enter(`directiveContainerFence`),e.enter(`directiveContainerSequence`),l(t)}function l(t){return t===58?(e.consume(t),o++,l):o<3?n(t):(e.exit(`directiveContainerSequence`),Q9.call(r,e,u,n,`directiveContainerName`)(t))}function u(t){return t===91?e.attempt(Iue,d,d)(t):d(t)}function d(t){return t===123?e.attempt(Lue,f,f)(t):f(t)}function f(t){return h7(e,p,`whitespace`)(t)}function p(i){return e.exit(`directiveContainerFence`),i===null?C(i):c7(i)?r.interrupt?t(i):e.attempt($9,m,C)(i):n(i)}function m(t){return t===null?C(t):c7(t)?e.check($9,y,C)(t):(e.enter(`directiveContainerContent`),h(t))}function h(t){return e.attempt({tokenize:w,partial:!0},S,a?h7(e,g,`linePrefix`,a+1):g)(t)}function g(t){return t===null?S(t):c7(t)?e.check($9,v,S)(t):v(t)}function _(t){if(t===null){let n=e.exit(`chunkDocument`);return r.parser.lazy[n.start.line]=!1,S(t)}return c7(t)?e.check($9,b,x)(t):(e.consume(t),_)}function v(t){let n=e.enter(`chunkDocument`,{contentType:`document`,previous:s});return s&&(s.next=n),s=n,_(t)}function y(t){return e.enter(`directiveContainerContent`),h(t)}function b(t){e.consume(t);let n=e.exit(`chunkDocument`);return r.parser.lazy[n.start.line]=!1,h}function x(t){let n=e.exit(`chunkDocument`);return r.parser.lazy[n.start.line]=!1,S(t)}function S(t){return e.exit(`directiveContainerContent`),C(t)}function C(n){return e.exit(`directiveContainer`),t(n)}function w(e,t,n){let i=0;return h7(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4);function a(t){return e.enter(`directiveContainerFence`),e.enter(`directiveContainerSequence`),s(t)}function s(t){return t===58?(e.consume(t),i++,s):i<o?n(t):(e.exit(`directiveContainerSequence`),h7(e,c,`whitespace`)(t))}function c(r){return r===null||c7(r)?(e.exit(`directiveContainerFence`),t(r)):n(r)}}}function zue(e,t,n){return Z9(e,t,n,`directiveContainerLabel`,`directiveContainerLabelMarker`,`directiveContainerLabelString`,!0)}function Bue(e,t,n){return X9(e,t,n,`directiveContainerAttributes`,`directiveContainerAttributesMarker`,`directiveContainerAttribute`,`directiveContainerAttributeId`,`directiveContainerAttributeClass`,`directiveContainerAttributeName`,`directiveContainerAttributeInitializerMarker`,`directiveContainerAttributeValueLiteral`,`directiveContainerAttributeValue`,`directiveContainerAttributeValueMarker`,`directiveContainerAttributeValueData`,!0)}function Vue(e,t,n){let r=this;return i;function i(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var Hue={tokenize:Gue},Uue={tokenize:Kue,partial:!0},Wue={tokenize:que,partial:!0};function Gue(e,t,n){let r=this;return i;function i(t){return e.enter(`directiveLeaf`),e.enter(`directiveLeafSequence`),e.consume(t),a}function a(t){return t===58?(e.consume(t),e.exit(`directiveLeafSequence`),Q9.call(r,e,o,n,`directiveLeafName`)):n(t)}function o(t){return t===91?e.attempt(Uue,s,s)(t):s(t)}function s(t){return t===123?e.attempt(Wue,c,c)(t):c(t)}function c(t){return h7(e,l,`whitespace`)(t)}function l(r){return r===null||c7(r)?(e.exit(`directiveLeaf`),t(r)):n(r)}}function Kue(e,t,n){return Z9(e,t,n,`directiveLeafLabel`,`directiveLeafLabelMarker`,`directiveLeafLabelString`,!0)}function que(e,t,n){return X9(e,t,n,`directiveLeafAttributes`,`directiveLeafAttributesMarker`,`directiveLeafAttribute`,`directiveLeafAttributeId`,`directiveLeafAttributeClass`,`directiveLeafAttributeName`,`directiveLeafAttributeInitializerMarker`,`directiveLeafAttributeValueLiteral`,`directiveLeafAttributeValue`,`directiveLeafAttributeValueMarker`,`directiveLeafAttributeValueData`,!0)}var Jue={tokenize:Que,previous:Zue},Yue={tokenize:$ue,partial:!0},Xue={tokenize:ede,partial:!0};function Zue(e){return e!==58||this.events[this.events.length-1][1].type===`characterEscape`}function Que(e,t,n){let r=this;return i;function i(t){return e.enter(`directiveText`),e.enter(`directiveTextMarker`),e.consume(t),e.exit(`directiveTextMarker`),Q9.call(r,e,a,n,`directiveTextName`)}function a(t){return t===58?n(t):t===91?e.attempt(Yue,o,o)(t):o(t)}function o(t){return t===123?e.attempt(Xue,s,s)(t):s(t)}function s(n){return e.exit(`directiveText`),t(n)}}function $ue(e,t,n){return Z9(e,t,n,`directiveTextLabel`,`directiveTextLabelMarker`,`directiveTextLabelString`)}function ede(e,t,n){return X9(e,t,n,`directiveTextAttributes`,`directiveTextAttributesMarker`,`directiveTextAttribute`,`directiveTextAttributeId`,`directiveTextAttributeClass`,`directiveTextAttributeName`,`directiveTextAttributeInitializerMarker`,`directiveTextAttributeValueLiteral`,`directiveTextAttributeValue`,`directiveTextAttributeValueMarker`,`directiveTextAttributeValueData`)}function tde(){return{text:{58:Jue},flow:{58:[Fue,Hue]}}}function nde(){let e=this.data(),t=e.micromarkExtensions||=[],n=e.fromMarkdownExtensions||=[],r=e.toMarkdownExtensions||=[];t.push(tde()),n.push(Eue()),r.push(Due())}function rde({markdown:e}){return(0,m.jsx)(`div`,{className:`erica-report-artifact`,children:(0,m.jsx)(rue,{remarkPlugins:[nde,()=>e=>{let t=e=>{let n=[`grid`,`column`].includes(e.name);[`containerDirective`,`leafDirective`,`textDirective`].includes(e.type)&&n&&(e.data=e.data||{},e.data.hName=e.name,e.data.hProperties=e.attributes||{}),e.children&&e.children.forEach(t)};t(e)}],components:{h1:({children:e})=>(0,m.jsx)(`h1`,{className:`erica-markdown-h1`,children:e}),h2:({children:e})=>(0,m.jsx)(`h2`,{className:`erica-markdown-h2`,children:e}),h3:({children:e})=>(0,m.jsx)(`h3`,{className:`erica-markdown-h3`,children:e}),p:({children:e})=>(0,m.jsx)(`p`,{className:`erica-markdown-p`,children:e}),ul:({children:e})=>(0,m.jsx)(`ul`,{className:`erica-markdown-ul`,children:e}),ol:({children:e})=>(0,m.jsx)(`ol`,{className:`erica-markdown-ol`,children:e}),li:({children:e})=>(0,m.jsx)(`li`,{className:`erica-markdown-li`,children:e}),a:({children:e,href:t})=>(0,m.jsx)(`a`,{href:t,target:`_blank`,rel:`noopener noreferrer`,className:`erica-markdown-link`,children:e}),blockquote:({children:e})=>(0,m.jsx)(`blockquote`,{className:`erica-markdown-blockquote`,children:e}),hr:()=>(0,m.jsx)(`hr`,{className:`erica-markdown-hr`}),table:({children:e})=>(0,m.jsx)(`div`,{className:`erica-markdown-table-wrapper`,children:(0,m.jsx)(`table`,{className:`erica-markdown-table`,children:e})}),thead:({children:e})=>(0,m.jsx)(`thead`,{className:`erica-markdown-thead`,children:e}),th:({children:e})=>(0,m.jsx)(`th`,{className:`erica-markdown-th`,children:e}),td:({children:e})=>(0,m.jsx)(`td`,{className:`erica-markdown-td`,children:e}),code:e=>{let{children:t,className:n,...r}=e;return/language-(\w+)/.exec(n||``)?.[1]===`ericachart`?(0,m.jsx)(n5,{markdown:t}):(0,m.jsx)(`code`,{...r,className:n,children:t})}},children:e})})}var ide=Eo({title:Za().describe(`Title of the report.`),reportContent:Za().describe(`Markdown content of the report.`)});function ade({title:e,reportContent:t}){let n=a5(),r=()=>{n.setTitle(e),n.setContent((0,m.jsx)(rde,{markdown:t})),n.onOpen()};return(0,m.jsx)(`div`,{onClick:r,className:`erica-report-card`,children:(0,m.jsxs)(`div`,{className:`erica-report-content-wrapper`,children:[(0,m.jsx)(`div`,{className:`erica-report-icon`,children:(0,m.jsx)(D,{className:`erica-icon-md`})}),(0,m.jsxs)(`div`,{className:`erica-report-content`,children:[(0,m.jsx)(`span`,{className:`erica-report-title`,children:e}),(0,m.jsx)(`span`,{className:`erica-report-subtitle`,children:`Business Report`})]}),(0,m.jsx)(`button`,{onClick:e=>{e.stopPropagation(),r()},className:`erica-report-button`,children:`Show Report`})]})})}var ode=()=>{(0,f.useComponent)({name:`showChart`,description:`Display a chart from erica chart syntax.`,parameters:qae,render:Jae},[]),(0,f.useComponent)({name:`showReport`,description:`Display a report from markdown with erica report syntax.`,parameters:ide,render:ade},[])};function sde({threadId:e,handleNewChat:t,handleThreadSelect:n}){return ode(),(0,m.jsx)(p.CopilotSidebar,{labels:{initial:`Hi! How can I help you today?
|
|
60
|
+
`+o)}return s(),c}function r(e,n){let r=e.attributes||{},a=[],o,s,c,l;for(l in r)if(Nh.call(r,l)&&r[l]!==void 0&&r[l]!==null){let u=String(r[l]);if(l===`id`)c=t.preferShortcut!==!1&&Fh.test(u)?`#`+u:i(`id`,u,e,n);else if(l===`class`){let r=u.split(/[\t\n\r ]+/g),a=[],c=[],l=-1;for(;++l<r.length;)(t.preferShortcut!==!1&&Fh.test(r[l])?c:a).push(r[l]);o=a.length>0?i(`class`,a.join(` `),e,n):``,s=c.length>0?`.`+c.join(`.`):``}else a.push(i(l,u,e,n))}return o&&a.unshift(o),s&&a.unshift(s),c&&a.unshift(c),a.length>0?`{`+a.join(` `)+`}`:``}function i(e,n,r,i){if(t.collapseEmptyAttributes!==!1&&!n)return e;if(t.preferUnquoted&&Ih.test(n))return e+`=`+n;let a=t.quote||i.options.quote||`"`,o=a===`"`?`'`:`"`,s=t.quoteSmart&&fh(n,a)>fh(n,o)?o:a,c=r.type===`textDirective`?[s]:[s,`
|
|
61
|
+
`,`\r`];return e+`=`+s+Mh(n,{subset:c})+s}}function zh(e){Hh.call(this,`containerDirective`,e)}function Bh(e){Hh.call(this,`leafDirective`,e)}function Vh(e){Hh.call(this,`textDirective`,e)}function Hh(e,t){this.enter({type:e,name:``,attributes:{},children:[]},t)}function Uh(e){let t=this.stack[this.stack.length-1];t.type===`containerDirective`||t.type===`leafDirective`||t.type,t.name=this.sliceSerialize(e)}function Wh(e){this.enter({type:`paragraph`,data:{directiveLabel:!0},children:[]},e)}function Gh(e){this.exit(e)}function Kh(){this.data.directiveAttributes=[],this.buffer()}function qh(e){this.data.directiveAttributes.push([`id`,bh(this.sliceSerialize(e),{attribute:!0})])}function Jh(e){this.data.directiveAttributes.push([`class`,bh(this.sliceSerialize(e),{attribute:!0})])}function Yh(e){let t=this.data.directiveAttributes;t[t.length-1][1]=bh(this.sliceSerialize(e),{attribute:!0})}function Xh(e){this.data.directiveAttributes.push([this.sliceSerialize(e),``])}function Zh(){let e=this.data.directiveAttributes,t={},n=-1;for(;++n<e.length;){let r=e[n];r[0]===`class`&&t.class?t.class+=` `+r[1]:t[r[0]]=r[1]}this.data.directiveAttributes=void 0,this.resume();let r=this.stack[this.stack.length-1];r.type===`containerDirective`||r.type===`leafDirective`||r.type,r.attributes=t}function Qh(e){this.exit(e)}function $h(){return`:`}function eg(e){return!!(e&&e.type===`paragraph`&&e.data&&e.data.directiveLabel)}function tg(e){let t=0;return e.type===`containerDirective`?(sm(e,function(e,n){if(e.type===`containerDirective`){let e=n.length,r=0;for(;e--;)n[e].type===`containerDirective`&&r++;r>t&&(t=r)}}),t+=3):t=e.type===`leafDirective`?2:1,`:`.repeat(t)}function ng(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m){let h,g;return _;function _(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),v}function v(t){return t===35?(h=o,y(t)):t===46?(h=s,y(t)):m&&Z(t)?Q(e,v,`whitespace`)(t):!m&&X(t)?Od(e,v)(t):t===null||Y(t)||ju(t)||Au(t)&&t!==45&&t!==95?ne(t):(e.enter(a),e.enter(c),e.consume(t),S)}function y(t){let n=h+`Marker`;return e.enter(a),e.enter(h),e.enter(n),e.consume(t),e.exit(n),b}function b(t){if(t===null||t===34||t===35||t===39||t===46||t===60||t===61||t===62||t===96||t===125||X(t))return n(t);let r=h+`Value`;return e.enter(r),e.consume(t),x}function x(t){if(t===null||t===34||t===39||t===60||t===61||t===62||t===96)return n(t);if(t===35||t===46||t===125||X(t)){let n=h+`Value`;return e.exit(n),e.exit(h),e.exit(a),v(t)}return e.consume(t),x}function S(t){return t===null||Y(t)||ju(t)||Au(t)&&t!==45&&t!==46&&t!==58&&t!==95?(e.exit(c),m&&Z(t)?Q(e,C,`whitespace`)(t):!m&&X(t)?Od(e,C)(t):C(t)):(e.consume(t),S)}function C(t){return t===61?(e.enter(l),e.consume(t),e.exit(l),w):(e.exit(a),v(t))}function w(t){return t===null||t===60||t===61||t===62||t===96||t===125||m&&Y(t)?n(t):t===34||t===39?(e.enter(u),e.enter(f),e.consume(t),e.exit(f),g=t,E):m&&Z(t)?Q(e,w,`whitespace`)(t):!m&&X(t)?Od(e,w)(t):(e.enter(d),e.enter(p),e.consume(t),g=void 0,T)}function T(t){return t===null||t===34||t===39||t===60||t===61||t===62||t===96?n(t):t===125||X(t)?(e.exit(p),e.exit(d),e.exit(a),v(t)):(e.consume(t),T)}function E(t){return t===g?(e.enter(f),e.consume(t),e.exit(f),e.exit(u),e.exit(a),te):(e.enter(d),ee(t))}function ee(t){return t===g?(e.exit(d),E(t)):t===null?n(t):Y(t)?m?n(t):Od(e,ee)(t):(e.enter(p),e.consume(t),D)}function D(t){return t===g||t===null||Y(t)?(e.exit(p),ee(t)):(e.consume(t),D)}function te(e){return e===125||X(e)?v(e):ne(e)}function ne(a){return a===125?(e.enter(i),e.consume(a),e.exit(i),e.exit(r),t):n(a)}}function rg(e,t,n,r,i,a,o){let s=0,c=0,l;return u;function u(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),d}function d(n){return n===93?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),f(n))}function f(t){if(t===93&&!c)return h(t);let n=e.enter(`chunkText`,{_contentTypeTextTrailing:!0,contentType:`text`,previous:l});return l&&(l.next=n),l=n,p(t)}function p(t){return t===null||s>999||t===91&&++c>32?n(t):t===93&&!c--?(e.exit(`chunkText`),h(t)):Y(t)?o?n(t):(e.consume(t),e.exit(`chunkText`),f):(e.consume(t),t===92?m:p)}function m(t){return t===91||t===92||t===93?(e.consume(t),s++,p):p(t)}function h(n){return e.exit(a),e.enter(i),e.consume(n),e.exit(i),e.exit(r),t}}function ig(e,t,n,r){let i=this;return a;function a(t){return t===null||Y(t)||Au(t)||ju(t)?n(t):(e.enter(r),e.consume(t),o)}function o(a){return a===null||Y(a)||ju(a)||Au(a)&&a!==45&&a!==95?(e.exit(r),i.previous===45||i.previous===95?n(a):t(a)):(e.consume(a),o)}}var ag={tokenize:lg,concrete:!0},og={tokenize:ug,partial:!0},sg={tokenize:dg,partial:!0},cg={tokenize:fg,partial:!0};function lg(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0,s;return c;function c(t){return e.enter(`directiveContainer`),e.enter(`directiveContainerFence`),e.enter(`directiveContainerSequence`),l(t)}function l(t){return t===58?(e.consume(t),o++,l):o<3?n(t):(e.exit(`directiveContainerSequence`),ig.call(r,e,u,n,`directiveContainerName`)(t))}function u(t){return t===91?e.attempt(og,d,d)(t):d(t)}function d(t){return t===123?e.attempt(sg,f,f)(t):f(t)}function f(t){return Q(e,p,`whitespace`)(t)}function p(i){return e.exit(`directiveContainerFence`),i===null?C(i):Y(i)?r.interrupt?t(i):e.attempt(cg,m,C)(i):n(i)}function m(t){return t===null?C(t):Y(t)?e.check(cg,y,C)(t):(e.enter(`directiveContainerContent`),h(t))}function h(t){return e.attempt({tokenize:w,partial:!0},S,a?Q(e,g,`linePrefix`,a+1):g)(t)}function g(t){return t===null?S(t):Y(t)?e.check(cg,v,S)(t):v(t)}function _(t){if(t===null){let n=e.exit(`chunkDocument`);return r.parser.lazy[n.start.line]=!1,S(t)}return Y(t)?e.check(cg,b,x)(t):(e.consume(t),_)}function v(t){let n=e.enter(`chunkDocument`,{contentType:`document`,previous:s});return s&&(s.next=n),s=n,_(t)}function y(t){return e.enter(`directiveContainerContent`),h(t)}function b(t){e.consume(t);let n=e.exit(`chunkDocument`);return r.parser.lazy[n.start.line]=!1,h}function x(t){let n=e.exit(`chunkDocument`);return r.parser.lazy[n.start.line]=!1,S(t)}function S(t){return e.exit(`directiveContainerContent`),C(t)}function C(n){return e.exit(`directiveContainer`),t(n)}function w(e,t,n){let i=0;return Q(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4);function a(t){return e.enter(`directiveContainerFence`),e.enter(`directiveContainerSequence`),s(t)}function s(t){return t===58?(e.consume(t),i++,s):i<o?n(t):(e.exit(`directiveContainerSequence`),Q(e,c,`whitespace`)(t))}function c(r){return r===null||Y(r)?(e.exit(`directiveContainerFence`),t(r)):n(r)}}}function ug(e,t,n){return rg(e,t,n,`directiveContainerLabel`,`directiveContainerLabelMarker`,`directiveContainerLabelString`,!0)}function dg(e,t,n){return ng(e,t,n,`directiveContainerAttributes`,`directiveContainerAttributesMarker`,`directiveContainerAttribute`,`directiveContainerAttributeId`,`directiveContainerAttributeClass`,`directiveContainerAttributeName`,`directiveContainerAttributeInitializerMarker`,`directiveContainerAttributeValueLiteral`,`directiveContainerAttributeValue`,`directiveContainerAttributeValueMarker`,`directiveContainerAttributeValueData`,!0)}function fg(e,t,n){let r=this;return i;function i(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var pg={tokenize:gg},mg={tokenize:_g,partial:!0},hg={tokenize:vg,partial:!0};function gg(e,t,n){let r=this;return i;function i(t){return e.enter(`directiveLeaf`),e.enter(`directiveLeafSequence`),e.consume(t),a}function a(t){return t===58?(e.consume(t),e.exit(`directiveLeafSequence`),ig.call(r,e,o,n,`directiveLeafName`)):n(t)}function o(t){return t===91?e.attempt(mg,s,s)(t):s(t)}function s(t){return t===123?e.attempt(hg,c,c)(t):c(t)}function c(t){return Q(e,l,`whitespace`)(t)}function l(r){return r===null||Y(r)?(e.exit(`directiveLeaf`),t(r)):n(r)}}function _g(e,t,n){return rg(e,t,n,`directiveLeafLabel`,`directiveLeafLabelMarker`,`directiveLeafLabelString`,!0)}function vg(e,t,n){return ng(e,t,n,`directiveLeafAttributes`,`directiveLeafAttributesMarker`,`directiveLeafAttribute`,`directiveLeafAttributeId`,`directiveLeafAttributeClass`,`directiveLeafAttributeName`,`directiveLeafAttributeInitializerMarker`,`directiveLeafAttributeValueLiteral`,`directiveLeafAttributeValue`,`directiveLeafAttributeValueMarker`,`directiveLeafAttributeValueData`,!0)}var yg={tokenize:Cg,previous:Sg},bg={tokenize:wg,partial:!0},xg={tokenize:Tg,partial:!0};function Sg(e){return e!==58||this.events[this.events.length-1][1].type===`characterEscape`}function Cg(e,t,n){let r=this;return i;function i(t){return e.enter(`directiveText`),e.enter(`directiveTextMarker`),e.consume(t),e.exit(`directiveTextMarker`),ig.call(r,e,a,n,`directiveTextName`)}function a(t){return t===58?n(t):t===91?e.attempt(bg,o,o)(t):o(t)}function o(t){return t===123?e.attempt(xg,s,s)(t):s(t)}function s(n){return e.exit(`directiveText`),t(n)}}function wg(e,t,n){return rg(e,t,n,`directiveTextLabel`,`directiveTextLabelMarker`,`directiveTextLabelString`)}function Tg(e,t,n){return ng(e,t,n,`directiveTextAttributes`,`directiveTextAttributesMarker`,`directiveTextAttribute`,`directiveTextAttributeId`,`directiveTextAttributeClass`,`directiveTextAttributeName`,`directiveTextAttributeInitializerMarker`,`directiveTextAttributeValueLiteral`,`directiveTextAttributeValue`,`directiveTextAttributeValueMarker`,`directiveTextAttributeValueData`)}function Eg(){return{text:{58:yg},flow:{58:[ag,pg]}}}function Dg(){let e=this.data(),t=e.micromarkExtensions||=[],n=e.fromMarkdownExtensions||=[],r=e.toMarkdownExtensions||=[];t.push(Eg()),n.push(Lh()),r.push(Rh())}function Og({markdown:e}){return(0,m.jsx)(`div`,{className:`erica-report-artifact`,children:(0,m.jsx)(sh,{remarkPlugins:[Dg,()=>e=>{let t=e=>{let n=[`grid`,`column`].includes(e.name);[`containerDirective`,`leafDirective`,`textDirective`].includes(e.type)&&n&&(e.data=e.data||{},e.data.hName=e.name,e.data.hProperties=e.attributes||{}),e.children&&e.children.forEach(t)};t(e)}],components:{h1:({children:e})=>(0,m.jsx)(`h1`,{className:`erica-markdown-h1`,children:e}),h2:({children:e})=>(0,m.jsx)(`h2`,{className:`erica-markdown-h2`,children:e}),h3:({children:e})=>(0,m.jsx)(`h3`,{className:`erica-markdown-h3`,children:e}),p:({children:e})=>(0,m.jsx)(`p`,{className:`erica-markdown-p`,children:e}),ul:({children:e})=>(0,m.jsx)(`ul`,{className:`erica-markdown-ul`,children:e}),ol:({children:e})=>(0,m.jsx)(`ol`,{className:`erica-markdown-ol`,children:e}),li:({children:e})=>(0,m.jsx)(`li`,{className:`erica-markdown-li`,children:e}),a:({children:e,href:t})=>(0,m.jsx)(`a`,{href:t,target:`_blank`,rel:`noopener noreferrer`,className:`erica-markdown-link`,children:e}),blockquote:({children:e})=>(0,m.jsx)(`blockquote`,{className:`erica-markdown-blockquote`,children:e}),hr:()=>(0,m.jsx)(`hr`,{className:`erica-markdown-hr`}),table:({children:e})=>(0,m.jsx)(`div`,{className:`erica-markdown-table-wrapper`,children:(0,m.jsx)(`table`,{className:`erica-markdown-table`,children:e})}),thead:({children:e})=>(0,m.jsx)(`thead`,{className:`erica-markdown-thead`,children:e}),th:({children:e})=>(0,m.jsx)(`th`,{className:`erica-markdown-th`,children:e}),td:({children:e})=>(0,m.jsx)(`td`,{className:`erica-markdown-td`,children:e}),code:e=>{let{children:t,className:n,...r}=e;return/language-(\w+)/.exec(n||``)?.[1]===`ericachart`?(0,m.jsx)(Mc,{markdown:t}):(0,m.jsx)(`code`,{...r,className:n,children:t})},grid:({children:e,columns:t})=>{let n=t?Number(t):2;return(0,m.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:n===3?`repeat(3, 1fr)`:n===1?`1fr`:`repeat(2, 1fr)`,gap:`1.5rem`,margin:`2rem 0`,width:`100%`},children:e})}},children:e})})}var kg=Os({title:ts().describe(`Title of the report.`),reportContent:ts().describe(`Markdown content of the report.`)});function Ag({title:e,reportContent:t}){let n=Lc(),r=()=>{n.setTitle(e),n.setContent((0,m.jsx)(Og,{markdown:t})),n.onOpen()};return(0,m.jsx)(`div`,{onClick:r,className:`erica-report-card`,children:(0,m.jsxs)(`div`,{className:`erica-report-content-wrapper`,children:[(0,m.jsx)(`div`,{className:`erica-report-icon`,children:(0,m.jsx)(D,{className:`erica-icon-md`})}),(0,m.jsxs)(`div`,{className:`erica-report-content`,children:[(0,m.jsx)(`span`,{className:`erica-report-title`,children:e}),(0,m.jsx)(`span`,{className:`erica-report-subtitle`,children:`Business Report`})]}),(0,m.jsx)(`button`,{onClick:e=>{e.stopPropagation(),r()},className:`erica-report-button`,children:`Show Report`})]})})}var jg=()=>{(0,f.useComponent)({name:`showChart`,description:`Display a chart from erica chart syntax.`,parameters:Nc,render:Pc},[]),(0,f.useComponent)({name:`showReport`,description:`Display a report from markdown with erica report syntax.`,parameters:kg,render:Ag},[])};function Mg({threadId:e,handleNewChat:t,handleThreadSelect:n}){return jg(),(0,m.jsx)(p.CopilotSidebar,{labels:{initial:`Hi! How can I help you today?
|
|
115
62
|
|
|
116
63
|
You can:
|
|
117
64
|
- Ask me questions
|
|
118
65
|
- Upload files using the attachment icon
|
|
119
|
-
- Drag & drop files to attach`},Input:(0,u.useCallback)(t=>(0,m.jsx)(
|
|
66
|
+
- Drag & drop files to attach`},Input:(0,u.useCallback)(t=>(0,m.jsx)(Be,{...t,threadId:e}),[e]),Header:(0,u.useCallback)(()=>(0,m.jsx)(gn,{onNewChat:t,onThreadSelect:n}),[t,n])})}function Ng({runtimeUrl:e,widgetToken:t}){let[n,r]=(0,u.useState)(void 0),i=(0,u.useMemo)(()=>{let t=new URL(e),n=t.pathname.split(`/`).filter(Boolean);return n.length>2&&n.pop(),t.pathname=`/`+n.join(`/`),t.toString()},[e]);(0,u.useMemo)(()=>{Ne(i,t)},[i,t]);let a=(0,u.useCallback)(()=>{r(void 0),console.log(`New chat started`)},[]),o=(0,u.useCallback)(e=>{r(e),console.log(`Thread selected:`,e)},[]);return(0,m.jsx)(f.CopilotChatConfigurationProvider,{isModalDefaultOpen:!0,children:(0,m.jsx)(`div`,{className:`h-full w-full`,children:(0,m.jsx)(d.CopilotKit,{runtimeUrl:e,headers:{Authorization:`Bearer ${t}`},properties:{agent:`platform:ultimate`},threadId:n,enableInspector:!1,children:(0,m.jsx)(Mg,{threadId:n,handleNewChat:a,handleThreadSelect:o})})})})}var Pg=new Kt({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1,staleTime:3e4}}});function Fg({accountUid:e,children:t}){return(0,m.jsx)(Yt,{client:Pg,children:(0,m.jsx)(mc,{accountUid:e,children:(0,m.jsx)(Ic,{children:t})})})}function Ig(){let{isOpen:e,onClose:t,content:n,title:r}=Lc(),[i,a]=(0,u.useState)(!1);return(0,u.useEffect)(()=>{e?setTimeout(()=>a(!0),10):a(!1)},[e]),e?(0,m.jsxs)(`div`,{className:`erica-artifact-container`,children:[(0,m.jsx)(`div`,{className:`erica-artifact-backdrop ${i?`erica-artifact-backdrop--visible`:``}`,onClick:t}),(0,m.jsxs)(`div`,{className:`erica-artifact-drawer ${i?`erica-artifact-drawer--open`:``}`,children:[(0,m.jsxs)(`div`,{className:`erica-artifact-header`,children:[(0,m.jsx)(`h2`,{className:`erica-artifact-title`,children:r}),(0,m.jsx)(`button`,{onClick:t,className:`erica-artifact-close-button`,"aria-label":`Close drawer`,children:(0,m.jsx)(re,{className:`erica-icon-md`})})]}),(0,m.jsx)(`div`,{className:`erica-artifact-body`,children:n})]})]}):null}exports.ArtifactProvider=Ic,exports.EricaChat=Ng,exports.EricaDrawer=Ig,exports.EricaProvider=Fg;
|
|
120
67
|
//# sourceMappingURL=index.cjs.map
|