infobae-charts 0.0.20 → 0.0.21

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.

Potentially problematic release.


This version of infobae-charts might be problematic. Click here for more details.

package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- (function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.ibc-title{box-sizing:border-box;border-bottom:1px solid var(--gray-50);width:100%;padding-bottom:26px}.ibc-title__row{flex-direction:column;justify-content:space-between;align-items:flex-start;gap:20px;display:flex}@media (width>=577px){.ibc-title__row{flex-direction:row}}.ibc-title__text{flex-direction:column;gap:19px;min-width:0;display:flex}.ibc-title__heading{color:var(--gray-100);font-family:Roboto;font-size:40px;font-style:normal;font-weight:700;line-height:normal}.ibc-title__subtitle{color:var(--gray-90);font-family:Roboto;font-size:26px;font-style:normal;font-weight:400;line-height:normal}.ibc-title__brand{flex-shrink:0;align-items:center;gap:10px;line-height:0;display:flex}.ibc-title__logo{width:auto;height:40px;display:block}.ibc-title__button{background:var(--bg);border:1px solid var(--gray-50);border-radius:100px;justify-content:center;align-items:center;width:48px;height:48px;display:flex;position:relative}@media (width>=577px){.ibc-title__button{width:32px;height:32px}.ibc-title__button svg{width:16px;height:16px}}.ibc-title__share-modal{background:var(--bg);border:1px solid var(--gray-50);z-index:2;border-radius:9px;flex-direction:column;gap:8px;padding:8px;display:flex;position:absolute;top:calc(100% + 8px);left:0;box-shadow:0 0 12px #0000004d}@media (width>=577px){.ibc-title__share-modal{left:auto;right:0}}.ibc-title__share-modal-button{color:var(--gray-90);background:0 0;border:none;gap:6px;padding:4px;font-size:14px;font-weight:300;line-height:150%;display:flex}.ibc-title__share-modal-icon{border:1px solid var(--gray-80);border-radius:100px;justify-content:center;align-items:center;width:22px;height:22px;padding:10px;display:flex}.horizontal-bar-chart{background:var(--gray-0);padding:16px}.horizontal-bar-chart-credits{background:var(--gray-0);justify-content:space-between;padding-top:24px;padding-bottom:36px;display:flex}.horizontal-bar-chart-ctn{flex-direction:column;padding-top:36px;display:flex}.horizontal-bar-chart-font{background:var(--gray-0);color:var(--gray-90);align-items:center;gap:8px;font-size:16px;font-weight:400;display:flex}.horizontal-bar-chart-font>span{font-weight:700}.horizontal-bar-chart-label{background:var(--bg);border:1px solid var(--gray-30);-webkit-user-select:none;user-select:none;border-radius:100px;align-items:center;gap:6px;width:max-content;padding:8px 16px;display:flex}.horizontal-bar-chart-label-icon{border-radius:100px;width:12px;height:12px}.horizontal-bar-chart-label-text{color:var(--gray-90);width:max-content;font-size:12px;font-weight:400}.horizontal-bar-chart-labels{scrollbar-width:none;touch-action:pan-x;-webkit-user-select:none;user-select:none;gap:8px;width:100%;padding-top:36px;padding-bottom:36px;display:flex;overflow-x:auto}.horizontal-bar-chart-labels::-webkit-scrollbar{display:none}.horizontal-bar-chart-legend{border-bottom:1px solid #c2c2c2;align-items:center;gap:8px;max-width:100%;display:flex}.horizontal-bar-chart-ref{border-radius:16px}@media screen and (width>=992px){.horizontal-bar-chart{padding:36px 20px}}.ibc-footer{border-top:1px solid var(--gray-50);flex-direction:column;justify-content:space-between;gap:48px;padding:24px 0 0;display:flex}@media (width>=577px){.ibc-footer{flex-direction:row;gap:12px}}.ibc-footer-font{color:var(--gray-90);font-size:16px;font-weight:400}.ibc-footer-font>span{font-weight:700}.ibc-footer-logo{object-fit:contain;max-width:90px;height:21px;max-height:21px}.line-chart{background:#fafafa;flex-direction:column;gap:36px;padding:36px 4px;display:flex}.line-chart-ctn{background:var(--bg);border-radius:16px;flex-direction:column;gap:36px;display:flex}.line-chart-labels{gap:16px;display:flex}.line-chart-label{align-items:center;gap:8px;display:flex}.line-chart-label-img{object-fit:cover;border-radius:100px;width:50px;height:50px}.line-chart-label-content{background:var(--gray-0);border:1px solid var(--gray-30);border-radius:50px;justify-content:center;align-items:center;gap:10px;padding:8px 16px;display:flex}.line-chart-label-text{color:var(--gray-90);font-size:12px;font-weight:400}.bars-line-chart{height:400px;padding:16px}.vertical-bar-chart{background:var(--gray-0);flex-direction:column;gap:36px;padding:36px 4px;display:flex}.vertical-bar-chart-ctn{background:var(--bg);border-radius:16px;flex-direction:column;gap:36px;display:flex}.vertical-bar-chart-labels{gap:8px;max-width:100%;display:flex;overflow-x:auto}.vertical-bar-chart-labels::-webkit-scrollbar{display:none}.vertical-bar-chart-label{background:var(--gray-0);border:1px solid var(--gray-30);border-radius:100px;align-items:center;gap:6px;width:max-content;padding:8px 16px;display:flex}.vertical-bar-chart-label-icon{border-radius:100px;width:12px;height:12px}.vertical-bar-chart-label-text{color:var(--gray-90);width:max-content;font-size:12px;font-weight:400}.bars-vertical-bar-chart{height:400px;padding:16px}/*$vite$:1*/`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();
1
+ (function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.ibc-title{box-sizing:border-box;border-bottom:1px solid var(--gray-50);width:100%;padding-bottom:26px}.ibc-title__row{flex-direction:column;justify-content:space-between;align-items:flex-start;gap:20px;display:flex}@media (width>=577px){.ibc-title__row{flex-direction:row}}.ibc-title__text{flex-direction:column;gap:19px;min-width:0;display:flex}.ibc-title__heading{color:var(--gray-100);font-family:Roboto;font-size:40px;font-style:normal;font-weight:700;line-height:normal}.ibc-title__subtitle{color:var(--gray-90);font-family:Roboto;font-size:26px;font-style:normal;font-weight:400;line-height:normal}.ibc-title__brand{flex-shrink:0;align-items:center;gap:10px;line-height:0;display:flex}.ibc-title__logo{width:auto;height:40px;display:block}.ibc-title__button{background:var(--bg);border:1px solid var(--gray-50);border-radius:100px;justify-content:center;align-items:center;width:48px;height:48px;display:flex;position:relative}@media (width>=577px){.ibc-title__button{width:32px;height:32px}.ibc-title__button svg{width:16px;height:16px}}.ibc-title__share-modal{background:var(--bg);border:1px solid var(--gray-50);z-index:2;border-radius:9px;flex-direction:column;gap:8px;padding:8px;display:flex;position:absolute;top:calc(100% + 8px);left:0;box-shadow:0 0 12px #0000004d}@media (width>=577px){.ibc-title__share-modal{left:auto;right:0}}.ibc-title__share-modal-button{color:var(--gray-90);background:0 0;border:none;gap:6px;padding:4px;font-size:14px;font-weight:300;line-height:150%;display:flex}.ibc-title__share-modal-icon{border:1px solid var(--gray-80);border-radius:100px;justify-content:center;align-items:center;width:22px;height:22px;padding:10px;display:flex}.horizontal-bar-chart{background:var(--gray-0);padding:16px}.horizontal-bar-chart-credits{background:var(--gray-0);justify-content:space-between;padding-top:24px;padding-bottom:36px;display:flex}.horizontal-bar-chart-ctn{flex-direction:column;padding-top:36px;display:flex}.horizontal-bar-chart-font{background:var(--gray-0);color:var(--gray-90);align-items:center;gap:8px;font-size:16px;font-weight:400;display:flex}.horizontal-bar-chart-font>span{font-weight:700}.horizontal-bar-chart-label{background:var(--bg);border:1px solid var(--gray-30);-webkit-user-select:none;user-select:none;border-radius:100px;align-items:center;gap:6px;width:max-content;padding:8px 16px;display:flex}.horizontal-bar-chart-label-icon{border-radius:100px;width:12px;height:12px}.horizontal-bar-chart-label-text{color:var(--gray-90);width:max-content;font-size:12px;font-weight:400}.horizontal-bar-chart-labels{scrollbar-width:none;touch-action:pan-x;-webkit-user-select:none;user-select:none;gap:8px;width:100%;padding-top:36px;padding-bottom:36px;display:flex;overflow-x:auto}.horizontal-bar-chart-labels::-webkit-scrollbar{display:none}.horizontal-bar-chart-legend{border-bottom:1px solid #c2c2c2;align-items:center;gap:8px;max-width:100%;display:flex}.horizontal-bar-chart-ref{border-radius:16px}@media screen and (width>=992px){.horizontal-bar-chart{padding:36px 20px}}.ibc-footer{border-top:1px solid var(--gray-50);flex-direction:column;justify-content:space-between;gap:48px;padding:24px 0 0;display:flex}@media (width>=577px){.ibc-footer{flex-direction:row;gap:12px}}.ibc-footer-font{color:var(--gray-90);font-size:16px;font-weight:400}.ibc-footer-font>span{font-weight:700}.ibc-footer-logo{object-fit:contain;max-width:90px;height:21px;max-height:21px}.line-chart{background:var(--gray-0);flex-direction:column;gap:36px;padding:36px 4px;display:flex}.line-chart-ctn{background:var(--bg);border-radius:16px;flex-direction:column;gap:36px;display:flex}.line-chart-labels{gap:16px;display:flex}.line-chart-label{align-items:center;gap:8px;display:flex}.line-chart-label-img{object-fit:cover;border-radius:100px;width:50px;height:50px}.line-chart-label-content{background:var(--gray-0);border:1px solid var(--gray-30);border-radius:50px;justify-content:center;align-items:center;gap:10px;padding:8px 16px;display:flex}.line-chart-label-text{color:var(--gray-90);font-size:12px;font-weight:400}.bars-line-chart{height:400px;padding:16px}.vertical-bar-chart{background:var(--gray-0);flex-direction:column;gap:36px;padding:36px 4px;display:flex}.vertical-bar-chart-ctn{background:var(--bg);border-radius:16px;flex-direction:column;gap:36px;display:flex}.vertical-bar-chart-labels{gap:8px;max-width:100%;display:flex;overflow-x:auto}.vertical-bar-chart-labels::-webkit-scrollbar{display:none}.vertical-bar-chart-label{background:var(--gray-0);border:1px solid var(--gray-30);border-radius:100px;align-items:center;gap:6px;width:max-content;padding:8px 16px;display:flex}.vertical-bar-chart-label-icon{border-radius:100px;width:12px;height:12px}.vertical-bar-chart-label-text{color:var(--gray-90);width:max-content;font-size:12px;font-weight:400}.bars-vertical-bar-chart{height:400px;padding:16px}/*$vite$:1*/`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();
2
2
  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,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},s=(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},c=(n,r,o)=>(o=n==null?{}:e(i(n)),s(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));let l=require("react/jsx-runtime"),u=require("react");u=c(u,1);var d=({color:e=`var(--gray-90)`})=>(0,l.jsx)(`svg`,{width:25,height:23,viewBox:`0 0 25 23`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,l.jsx)(`path`,{d:`M15.1484 18.209C16.2165 17.062 17.2844 15.9156 18.3525 14.7686C19.6733 13.3501 21.0013 11.9235 22.3223 10.5049C21.0337 9.12301 19.7399 7.73568 18.4463 6.34863C17.3459 5.16872 16.2458 3.98836 15.1484 2.81152V7.11133L15.0605 7.12207L13.7334 7.2832C13.2462 7.34244 12.7328 7.3756 12.3428 7.40918C11.9212 7.4455 11.5709 7.487 11.25 7.55957L11.249 7.55859L11.2188 7.56641L11.2139 7.56836V7.56738L11.1797 7.57422C6.97754 8.31826 3.54696 11.4713 2.3457 15.6885L2.33203 15.7441C2.04422 16.8005 1.87981 17.8793 1.8252 18.9707C2.122 18.5479 2.4433 18.1395 2.79492 17.749L2.80762 17.7363C5.6064 14.6866 9.60855 13.2162 13.625 13.6777H13.624C13.6309 13.6784 13.6373 13.6791 13.6406 13.6797C13.6426 13.68 13.6445 13.6805 13.6455 13.6807L13.7715 13.7002C14.0526 13.7561 14.2412 13.8734 14.2803 13.8965C14.3888 13.9606 14.4699 14.0248 14.5107 14.0586C14.5577 14.0974 14.5963 14.1335 14.6191 14.1553L14.6514 14.1865L14.6533 14.1875L14.5908 14.2471L14.5811 14.2568L14.6533 14.1885L14.6738 14.209H14.6729L15.1201 14.6709L15.1484 14.7002V18.209ZM24.2998 10.7754L24.2832 10.8008C24.095 11.0787 23.9061 11.3293 23.6904 11.5801L23.6875 11.583C20.9494 14.5235 18.2039 17.4716 15.4658 20.4121L15.374 20.5234C15.1464 20.7683 14.828 20.9048 14.4971 20.9043H14.4902V20.9033L14.3389 20.8926H14.332L14.3252 20.8906C13.7676 20.7689 13.3904 20.2251 13.4482 19.6543V15.4482L13.4316 15.4375C9.93065 15.0376 6.45647 16.3191 4.03418 18.959L4.03516 18.96C3.32287 19.7509 2.74215 20.6242 2.2666 21.5801C2.03257 22.1442 1.3672 22.4611 0.805664 22.2168L0.745117 22.1914V22.1768C0.443793 22.0328 0.22449 21.7539 0.171875 21.418L0.170898 21.4102L0.15918 21.2695V21.2686C0.0187049 19.5013 0.124356 17.7326 0.511719 16.001L0.512695 15.998L0.695312 15.2617L0.696289 15.2598C2.02169 10.5049 5.78955 6.91872 10.4414 5.91699L10.8936 5.82812C11.3251 5.73086 11.7619 5.68221 12.2012 5.64453C12.6152 5.60902 13.0281 5.58023 13.4482 5.53223V1.33789C13.3904 0.707944 13.8273 0.161489 14.4434 0.100586L14.4531 0.0996094V0.100586C14.6044 0.100586 14.7904 0.0990999 14.9502 0.194336C15.1239 0.257283 15.2662 0.374645 15.3779 0.516602H15.3789L23.9541 9.71289L23.959 9.71777V9.71875C24.0959 9.88874 24.2065 10.0607 24.29 10.2334L24.2998 10.2539V10.7754Z`,fill:e,stroke:e,strokeWidth:.2})}),f=`https://www.infobae.com/assets/images/logos/logo_infobae_naranja.svg`,p=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),m=/iPad|iPhone|iPod/.test(navigator.userAgent),h=[{buttonText:`Whatsapp`,id:`wa`,iconName:`whatsapp`},{buttonText:`Facebook`,id:`fb`,iconName:`facebook`},{buttonText:`Telegram`,id:`tl`,iconName:`telegram`},{buttonText:`X`,id:`x`,iconName:`x`},{buttonText:`Linkedin`,id:`li`,iconName:`linkedin`}];function g({className:e,showShare:t=!0,showSubtitle:n=!0,showTitle:r=!0,subtitle:i,title:a,url:o}){if(!t&&!r&&!n)return null;let[s,c]=(0,u.useState)(!1),f=e=>{if(typeof window>`u`||!o)return null;let t=`Te comparto este gráfico de Infobae`;switch(e){case`fb`:window.open(`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(o)}&quote=Te%20comparto%20este%20gr%C3%A1fico%20de%20Infobae`,`share_facebook`,`width=658,height=354,scrollbars=no`);break;case`x`:window.open(`https://x.com/intent/post?url=${encodeURIComponent(o)}&text=Te%20comparto%20este%20gr%C3%A1fico%20de%20Infobae`,`share_x`,`width=950,height=850,scrollbars=no`);break;case`wa`:m?window.location.href=`whatsapp://send?text=${encodeURIComponent(`${t} ${o}`)}`:window.open(`https://wa.me/?text=${encodeURIComponent(`${t} ${o}`)}&type=custom_url&app_absent=0`,`_blank`,`noopener,noreferrer`);break;case`li`:window.open(`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(o)}`,`share_linkedin`,`width=830,height=460,scrollbars=no`);break;case`tl`:p?window.location.href=`tg://msg_url?url=${encodeURIComponent(o)}&text=Te%20comparto%20este%20gr%C3%A1fico%20de%20Infobae`:window.open(`https://telegram.me/share/url?url=${encodeURIComponent(o)}&text=Te%20comparto%20este%20gr%C3%A1fico%20de%20Infobae`,`_blank`,`noopener,noreferrer`)}return null};return(0,l.jsx)(`header`,{className:[`ibc-title`,e].filter(Boolean).join(` `),children:(0,l.jsxs)(`div`,{className:`ibc-title__row`,children:[(0,l.jsxs)(`div`,{className:`ibc-title__text`,children:[!r||!a?null:(0,l.jsx)(`p`,{className:`ibc-title__heading`,children:a}),!n||!i?null:(0,l.jsx)(`p`,{className:`ibc-title__subtitle`,children:i})]}),!t||!o?null:(0,l.jsx)(`div`,{className:`ibc-title__brand`,children:(0,l.jsxs)(`button`,{className:`ibc-title__button`,onClick:()=>c(e=>!e),children:[(0,l.jsx)(d,{}),s?(0,l.jsx)(`div`,{className:`ibc-title__share-modal`,children:h.map(({buttonText:e,id:t,iconName:n})=>(0,l.jsxs)(`button`,{"aria-label":`Compartir en ${e}`,className:`ibc-title__share-modal-button`,onClick:()=>f(t),type:`button`,children:[(0,l.jsx)(`div`,{className:`ibc-title__share-modal-icon`,children:(0,l.jsx)(`img`,{alt:`Ícono de ${e}`,src:`https://infobae-static.infobae.com/assets/images/icons/${n}-icon.svg`})}),(0,l.jsx)(`p`,{children:e})]},t))}):null]})})]})})}var _=function(e,t){return _=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])},_(e,t)};function v(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);_(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var y=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),b=new(function(){function e(){this.browser=new y,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`?(b.wxa=!0,b.touchEventsSupported=!0):typeof document>`u`&&typeof self<`u`?b.worker=!0:!b.hasGlobalWindow||`Deno`in window||typeof navigator<`u`&&typeof navigator.userAgent==`string`&&navigator.userAgent.indexOf(`Node.js`)>-1?(b.node=!0,b.svgSupported=!0):x(navigator.userAgent,b);function x(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 S=`12px sans-serif`,C=20,w=100,T=`007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N`;function E(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)-C)/w}return t}var D=E(T),O={createCanvas:function(){return typeof document<`u`&&document.createElement(`canvas`)},measureText:(function(){var e,t;return function(n,r){if(!e){var i=O.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=D[n[c]];s+=l==null?o:l*o}return{width:s}}})(),loadImage:function(e,t,n){var r=new Image;return r.onload=t,r.onerror=n,r.src=e,r},getTime:function(){return Date.now?Date.now():+new Date}},k=ge([`Function`,`RegExp`,`Date`,`Error`,`CanvasGradient`,`CanvasPattern`,`Image`,`Canvas`],function(e,t){return e[`[object `+t+`]`]=!0,e},{}),A=ge([`Int8`,`Uint8`,`Uint8Clamped`,`Int16`,`Uint16`,`Int32`,`Uint32`,`Float32`,`Float64`],function(e,t){return e[`[object `+t+`Array]`]=!0,e},{}),j=Object.prototype.toString,ee=Array.prototype,te=ee.forEach,ne=ee.filter,re=ee.slice,ie=ee.map,ae=function(){}.constructor,oe=ae?ae.prototype:null,se=`__proto__`,ce=2311,le=2**53-1;function ue(){return ce>=le&&(ce=0),ce++}function de(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];typeof console<`u`&&console.error.apply(console,e)}function M(e){if(typeof e!=`object`||!e)return e;var t=e,n=j.call(e);if(n===`[object Array]`){if(!Re(e)){t=[];for(var r=0,i=e.length;r<i;r++)t[r]=M(e[r])}}else if(A[n]){if(!Re(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(!k[n]&&!Re(e)&&!Ee(e))for(var o in t={},e)e.hasOwnProperty(o)&&o!==se&&(t[o]=M(e[o]));return t}function N(e,t,n){if(!U(t)||!U(e))return n?M(t):e;for(var r in t)if(t.hasOwnProperty(r)&&r!==se){var i=e[r],a=t[r];U(a)&&U(i)&&!B(a)&&!B(i)&&!Ee(a)&&!Ee(i)&&!we(a)&&!we(i)&&!Re(a)&&!Re(i)?N(i,a,n):(n||!(r in e))&&(e[r]=M(t[r]))}return e}function P(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==se&&(e[n]=t[n]);return e}function fe(e,t,n){e||={};for(var r=0;r<n.length;r++){var i=n[r];e[i]=t[i]}return e}function F(e,t,n){for(var r=z(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}O.createCanvas;function I(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 pe(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 me(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 F(e,t,n)}function he(e){return!e||typeof e==`string`?!1:typeof e.length==`number`}function L(e,t,n){if(e&&t){if(e.forEach&&e.forEach===te)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 Ne(e);if(e.map&&e.map===ie)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 ge(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 _e(e,t,n){if(!e)return[];if(!t)return Ne(e);if(e.filter&&e.filter===ne)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 ve(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 z(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 ye(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return function(){return e.apply(t,n.concat(re.call(arguments)))}}var be=oe&&V(oe.bind)?oe.call.bind(oe.bind):ye;function xe(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){return e.apply(this,t.concat(re.call(arguments)))}}function B(e){return Array.isArray?Array.isArray(e):j.call(e)===`[object Array]`}function V(e){return typeof e==`function`}function H(e){return typeof e==`string`}function Se(e){return j.call(e)===`[object String]`}function Ce(e){return typeof e==`number`}function U(e){var t=typeof e;return t===`function`||!!e&&t===`object`}function we(e){return!!k[j.call(e)]}function Te(e){return!!A[j.call(e)]}function Ee(e){return typeof e==`object`&&typeof e.nodeType==`number`&&typeof e.ownerDocument==`object`}function De(e){return e.colorStops!=null}function Oe(e){return e.image!=null}function ke(e){return j.call(e)===`[object RegExp]`}function Ae(e){return e!==e}function je(){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 Me(e,t,n){return e??t??n}function Ne(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return re.apply(e,t)}function Pe(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 Fe(e){return e==null?null:typeof e.trim==`function`?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``)}var Ie=`__ec_primitive__`;function Le(e){e[Ie]=!0}function Re(e){return e[Ie]}var ze=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 z(this.data)},e.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},e}(),Be=typeof Map==`function`;function Ve(){return Be?new Map:new ze}var He=function(){function e(t){var n=B(t);this.data=Ve();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 Be?Array.from(e):e},e.prototype.removeKey=function(e){this.data.delete(e)},e}();function K(e){return new He(e)}function Ue(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 We(e,t){var n;if(Object.create)n=Object.create(e);else{var r=function(){};r.prototype=e,n=new r}return t&&P(n,t),n}function Ge(e){var t=e.style;t.webkitUserSelect=`none`,t.userSelect=`none`,t.webkitTapHighlightColor=`rgba(0,0,0,0)`,t[`-webkit-touch-callout`]=`none`}function Ke(e,t){return e.hasOwnProperty(t)}function qe(){}var Je=180/Math.PI;function Ye(e,t){return e??=0,t??=0,[e,t]}function Xe(e,t){return e[0]=t[0],e[1]=t[1],e}function Ze(e){return[e[0],e[1]]}function Qe(e,t,n){return e[0]=t,e[1]=n,e}function $e(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function et(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function tt(e){return Math.sqrt(nt(e))}function nt(e){return e[0]*e[0]+e[1]*e[1]}function rt(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function it(e,t){var n=tt(t);return n===0?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e}function at(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var ot=at;function st(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var ct=st;function lt(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 ut(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 dt(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function ft(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var pt=function(){function e(e,t){this.target=e,this.topTarget=t&&t.topTarget}return e}(),mt=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 pt(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 pt(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 pt(s,e),`dragleave`,e.event),o&&o!==s&&this.handler.dispatchToElement(new pt(o,e),`dragenter`,e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new pt(t,e),`dragend`,e.event),this._dropTarget&&this.handler.dispatchToElement(new pt(this._dropTarget,e),`drop`,e.event),this._draggingTarget=null,this._dropTarget=null},e}(),ht=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)}}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))}}return i&&i.afterTrigger&&i.afterTrigger(e),this},e}(),gt=Math.log(2);function _t(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)/gt);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]*_t(e,t-1,u,l,i|m,a),p++)}return a[o]=d,d}function vt(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=_t(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)*_t(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 yt=`___zrEVENTSAVED`,bt=[];function xt(e,t,n,r,i){return Ct(bt,t,r,i,!0)&&Ct(e,n,bt[0],bt[1])}function St(e,t){e&&n(e),t&&n(t);function n(e){var t=e[yt];t&&(t.clearMarkers&&t.clearMarkers(),delete e[yt])}}function Ct(e,t,n,r,i){if(t.getBoundingClientRect&&b.domSupported&&!Et(t)){var a=t[yt]||(t[yt]={}),o=Tt(wt(t,a),a,i);if(o)return o(e,n,r),!0}return!1}function wt(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 Tt(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?vt(s,o):vt(o,s))}function Et(e){return e.nodeName.toUpperCase()===`CANVAS`}var Dt=/([&<>"'])/g,Ot={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`};function kt(e){return e==null?``:(e+``).replace(Dt,function(e,t){return Ot[t]})}var At=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,jt=[],Mt=b.browser.firefox&&+b.browser.version.split(`.`)[0]<39;function Nt(e,t,n,r){return n||={},r?Pt(e,t,n):Mt&&t.layerX!=null&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):t.offsetX==null?Pt(e,t,n):(n.zrX=t.offsetX,n.zrY=t.offsetY),n}function Pt(e,t,n){if(b.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(Et(e)){var a=e.getBoundingClientRect();n.zrX=r-a.left,n.zrY=i-a.top;return}if(Ct(jt,e,r,i)){n.zrX=jt[0],n.zrY=jt[1];return}}n.zrX=n.zrY=0}function Ft(e){return e||window.event}function It(e,t,n){if(t=Ft(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&&Nt(e,i,t,n)}else{Nt(e,t,t,n);var a=Lt(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return t.which==null&&o!==void 0&&At.test(t.type)&&(t.which=o&1?1:o&2?3:o&4?2:0),t}function Lt(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 Rt(e,t,n,r){e.addEventListener(t,n,r)}function zt(e,t,n,r){e.removeEventListener(t,n,r)}var Bt=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0},Vt=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=Nt(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 Wt)if(Wt.hasOwnProperty(t)){var n=Wt[t](this._track,e);if(n)return n}},e}();function Ht(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}function Ut(e){return[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]}var Wt={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=Ht(r)/Ht(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=Ut(r);return t.pinchX=o[0],t.pinchY=o[1],{type:`pinch`,target:e[0].target,event:t}}}}};function Gt(){return[1,0,0,1,0,0]}function Kt(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function qt(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 Jt(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 Yt(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 Xt(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 Zt(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 Qt(e,t){var n=t[0],r=t[2],i=t[4],a=t[1],o=t[3],s=t[5],c=n*o-a*r;return c?(c=1/c,e[0]=o*c,e[1]=-a*c,e[2]=-r*c,e[3]=n*c,e[4]=(r*s-o*i)*c,e[5]=(a*i-n*s)*c,e):null}var $t=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}(),en=Math.min,tn=Math.max,nn=Math.abs,rn=[`x`,`y`],an=[`width`,`height`],on=new $t,sn=new $t,cn=new $t,ln=new $t,un=wn(),dn=un.minTv,fn=un.maxTv,pn=[0,0],q=function(){function e(e,t,n,r){hn(this,e,t,n,r)}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=en(e.x,this.x),n=en(e.y,this.y);this.width=isFinite(this.x)&&isFinite(this.width)?tn(e.x+e.width,this.x+this.width)-t:e.width,this.height=isFinite(this.y)&&isFinite(this.height)?tn(e.y+e.height,this.y+this.height)-n:e.height,this.x=t,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(e){return _n(Gt(),this,e)},e.prototype.intersect=function(t,n,r){return e.intersect(this,t,n,r)},e.intersect=function(t,n,r,i){r&&$t.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=hn(bn,t.x,t.y,t.width,t.height)),n instanceof e||(n=hn(xn,n.x,n.y,n.width,n.height));var s=!!r;un.reset(i,s);var c=un.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)&&(pn[0]=1/0,pn[1]=0,Cn(l,u,p,m,0,s,a,o),Cn(d,f,h,g,1,s,a,o),s&&$t.copy(r,_?un.useDir?un.dirMinTv:dn:fn)),_},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(e){gn(this,e)},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?t.x:0,t?t.y:0,t?t.width:0,t?t.height:0)},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(e,t,n){if(!n){e!==t&&gn(e,t);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var r=n[0],i=n[3],a=n[4],o=n[5];e.x=t.x*r+a,e.y=t.y*i+o,e.width=t.width*r,e.height=t.height*i,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}on.x=cn.x=t.x,on.y=ln.y=t.y,sn.x=ln.x=t.x+t.width,sn.y=cn.y=t.y+t.height,on.transform(n),ln.transform(n),sn.transform(n),cn.transform(n),e.x=en(on.x,sn.x,cn.x,ln.x),e.y=en(on.y,sn.y,cn.y,ln.y);var s=tn(on.x,sn.x,cn.x,ln.x),c=tn(on.y,sn.y,cn.y,ln.y);e.width=s-e.x,e.height=c-e.y},e.calculateTransform=function(e,t,n){var r=n.width/t.width,i=n.height/t.height;return e=Kt(e||[]),Yt(e,e,Qe(Sn,-t.x,-t.y)),Zt(e,e,Qe(Sn,r,i)),Yt(e,e,Qe(Sn,n.x,n.y)),e},e}(),mn=q.create,hn=q.set,gn=q.copy,_n=q.calculateTransform,vn=q.applyTransform,yn=q.contain,bn=new q(0,0,0,0),xn=new q(0,0,0,0),Sn=[];function Cn(e,t,n,r,i,a,o,s){var c=nn(t-n),l=nn(r-e),u=en(c,l),d=rn[i],f=rn[1-i],p=an[i];t<n||r<e?c<l?(a&&(fn[d]=-c),s&&(o[d]=t,o[p]=0)):(a&&(fn[d]=l),s&&(o[d]=e,o[p]=0)):(o&&(o[d]=tn(e,n),o[p]=en(t,r)-o[d]),a&&(u<pn[0]||un.useDir)&&(pn[0]=en(u,pn[0]),(c<l||!un.bidirectional)&&(dn[d]=c,dn[f]=0,un.useDir&&un.calcDirMTV()),(c>=l||!un.bidirectional)&&(dn[d]=-l,dn[f]=0,un.useDir&&un.calcDirMTV())))}function wn(){var e=0,t=new $t,n=new $t,r={minTv:new $t,maxTv:new $t,useDir:!1,dirMinTv:new $t,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,a){r.touchThreshold=0,i&&i.touchThreshold!=null&&(r.touchThreshold=tn(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 nn(e)<1e-10}return r}var Tn=`silent`;function En(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:Dn}}function Dn(){Bt(this.event)}var On=function(e){v(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}(ht),kn=function(){function e(e,t){this.x=e,this.y=t}return e}(),An=[`click`,`dblclick`,`mousewheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],jn=new q(0,0,0,0),Mn=function(e){v(t,e);function t(t,n,r,i,a){var o=e.call(this)||this;return o._hovered=new kn(0,0),o.storage=t,o.painter=n,o.painterRoot=i,o._pointerSize=a,r||=new On,o.proxy=null,o.setHandlerProxy(r),o._draggingMgr=new mt(o),o}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(L(An,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=Fn(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 kn(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 kn(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=En(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 kn(e,t);if(Pn(r,i,e,t,n),this._pointerSize&&!i.target){for(var a=[],o=this._pointerSize,s=o/2,c=new q(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)&&(jn.copy(u.getBoundingRect()),u.transform&&jn.applyTransform(u.transform),jn.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(Pn(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 Vt;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 kn;a.target=r.target,this.dispatchToElement(a,i,r.event)}},t}(ht);L([`click`,`mousedown`,`mouseup`,`mousewheel`,`dblclick`,`contextmenu`],function(e){Mn.prototype[e]=function(t){var n=t.zrX,r=t.zrY,i=Fn(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||ot(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function Nn(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||Tn}return!1}function Pn(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=Nn(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==Tn)){t.target=o;break}}}function Fn(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var In=32,Ln=7;function Rn(e){for(var t=0;e>=In;)t|=e&1,e>>=1;return e+t}function zn(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++;Bn(e,t,i)}else for(;i<n&&r(e[i],e[i-1])>=0;)i++;return i-t}function Bn(e,t,n){for(n--;t<n;){var r=e[t];e[t++]=e[n],e[n--]=r}}function Vn(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 Hn(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 Un(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 Wn(e,t){var n=Ln,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=Un(e[c],e,o,s,0,t);o+=u,s-=u,s!==0&&(l=Hn(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=Un(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=Hn(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>=Ln||m>=Ln);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-Un(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-Hn(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>=Ln||g>=Ln);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 Gn(e,t,n,r){n||=0,r||=e.length;var i=r-n;if(!(i<2)){var a=0;if(i<In){a=zn(e,n,r,t),Vn(e,n,r,n+a,t);return}var o=Wn(e,t),s=Rn(i);do{if(a=zn(e,n,r,t),a<s){var c=i;c>s&&(c=s),Vn(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 Kn=!1;function qn(){Kn||(Kn=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function Jn(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var Yn=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Jn}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,Gn(n,Jn)},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)&&(qn(),p.z=0),isNaN(p.z2)&&(qn(),p.z2=0),isNaN(p.zlevel)&&(qn(),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=I(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}(),Xn=b.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)},Zn={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=2.5949095;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-Zn.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?Zn.bounceIn(e*2)*.5:Zn.bounceOut(e*2-1)*.5+.5}},Qn=Math.pow,$n=Math.sqrt,er=1e-8,tr=1e-4,nr=$n(3),rr=1/3,ir=Ye(),ar=Ye(),or=Ye();function sr(e){return e>-er&&e<er}function cr(e){return e>er||e<-er}function lr(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 ur(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)}function dr(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(sr(u)&&sr(d)){if(sr(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(sr(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=$n(h),y=u*s+1.5*o*(-d+v),b=u*s+1.5*o*(-d-v);y=y<0?-Qn(-y,rr):Qn(y,rr),b=b<0?-Qn(-b,rr):Qn(b,rr);var m=(-s-(y+b))/(3*o);m>=0&&m<=1&&(a[p++]=m)}else{var x=(2*u*s-3*o*d)/(2*$n(u*u*u)),S=Math.acos(x)/3,C=$n(u),w=Math.cos(S),m=(-s-2*C*w)/(3*o),_=(-s+C*(w+nr*Math.sin(S)))/(3*o),T=(-s+C*(w-nr*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 fr(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(sr(o)){if(cr(a)){var l=-s/a;l>=0&&l<=1&&(i[c++]=l)}}else{var u=a*a-4*o*s;if(sr(u))i[0]=-a/(2*o);else if(u>0){var d=$n(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 pr(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 mr(e,t,n,r,i,a,o,s,c,l,u){var d,f=.005,p=1/0,m,h,g,_;ir[0]=c,ir[1]=l;for(var v=0;v<1;v+=.05)ar[0]=lr(e,n,i,o,v),ar[1]=lr(t,r,a,s,v),g=ct(ir,ar),g<p&&(d=v,p=g);p=1/0;for(var y=0;y<32&&!(f<tr);y++)m=d-f,h=d+f,ar[0]=lr(e,n,i,o,m),ar[1]=lr(t,r,a,s,m),g=ct(ar,ir),m>=0&&g<p?(d=m,p=g):(or[0]=lr(e,n,i,o,h),or[1]=lr(t,r,a,s,h),_=ct(or,ir),h<=1&&_<p?(d=h,p=_):f*=.5);return u&&(u[0]=lr(e,n,i,o,d),u[1]=lr(t,r,a,s,d)),$n(p)}function hr(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=lr(e,n,i,o,m),g=lr(t,r,a,s,m),_=h-l,v=g-u;d+=Math.sqrt(_*_+v*v),l=h,u=g}return d}function gr(e,t,n,r){var i=1-r;return i*(i*e+2*r*t)+r*r*n}function _r(e,t,n,r){return 2*((1-r)*(t-e)+r*(n-t))}function vr(e,t,n,r,i){var a=e-2*t+n,o=2*(t-e),s=e-r,c=0;if(sr(a)){if(cr(o)){var l=-s/o;l>=0&&l<=1&&(i[c++]=l)}}else{var u=o*o-4*a*s;if(sr(u)){var l=-o/(2*a);l>=0&&l<=1&&(i[c++]=l)}else if(u>0){var d=$n(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 yr(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function br(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 xr(e,t,n,r,i,a,o,s,c){var l,u=.005,d=1/0;ir[0]=o,ir[1]=s;for(var f=0;f<1;f+=.05){ar[0]=gr(e,n,i,f),ar[1]=gr(t,r,a,f);var p=ct(ir,ar);p<d&&(l=f,d=p)}d=1/0;for(var m=0;m<32&&!(u<tr);m++){var h=l-u,g=l+u;ar[0]=gr(e,n,i,h),ar[1]=gr(t,r,a,h);var p=ct(ar,ir);if(h>=0&&p<d)l=h,d=p;else{or[0]=gr(e,n,i,g),or[1]=gr(t,r,a,g);var _=ct(or,ir);g<=1&&_<d?(l=g,d=_):u*=.5}}return c&&(c[0]=gr(e,n,i,l),c[1]=gr(t,r,a,l)),$n(d)}function Sr(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=gr(e,n,i,f),m=gr(t,r,a,f),h=p-s,g=m-c;l+=Math.sqrt(h*h+g*g),s=p,c=m}return l}var Cr=/cubic-bezier\(([0-9,\.e ]+)\)/;function wr(e){var t=e&&Cr.exec(e);if(t){var n=t[1].split(`,`),r=+Fe(n[0]),i=+Fe(n[1]),a=+Fe(n[2]),o=+Fe(n[3]);if(isNaN(r+i+a+o))return;var s=[];return function(e){return e<=0?0:e>=1?1:dr(0,r,a,1,e,s)&&lr(0,i,o,1,s[0])}}}var Tr=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||qe,this.ondestroy=e.ondestroy||qe,this.onrestart=e.onrestart||qe,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){var s=r%n;this._startTime=e-s,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:Zn[e]||wr(e)},e}(),Er=function(){function e(e){this.value=e}return e}(),Dr=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new Er(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}(),Or=function(){function e(e){this._list=new Dr,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 Er(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}(),kr={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 Ar(e){return e=Math.round(e),e<0?0:e>255?255:e}function jr(e){return e=Math.round(e),e<0?0:e>360?360:e}function Mr(e){return e<0?0:e>1?1:e}function Nr(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?Ar(parseFloat(t)/100*255):Ar(parseInt(t,10))}function Pr(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?Mr(parseFloat(t)/100):Mr(parseFloat(t))}function Fr(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 Ir(e,t,n){return e+(t-e)*n}function Lr(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function Rr(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var zr=new Or(20),Br=null;function Vr(e,t){Br&&Rr(Br,t),Br=zr.put(e,Br||t.slice())}function Hr(e,t){if(e){t||=[];var n=zr.get(e);if(n)return Rr(t,n);e+=``;var r=e.replace(/ /g,``).toLowerCase();if(r in kr)return Rr(t,kr[r]),Vr(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)){Lr(t,0,0,0,1);return}return Lr(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),Vr(e,t),t}if(i===7||i===9){var a=parseInt(r.slice(1,7),16);if(!(a>=0&&a<=16777215)){Lr(t,0,0,0,1);return}return Lr(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(r.slice(7),16)/255:1),Vr(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?Lr(t,+l[0],+l[1],+l[2],1):Lr(t,0,0,0,1);u=Pr(l.pop());case`rgb`:if(l.length>=3)return Lr(t,Nr(l[0]),Nr(l[1]),Nr(l[2]),l.length===3?u:Pr(l[3])),Vr(e,t),t;Lr(t,0,0,0,1);return;case`hsla`:if(l.length!==4){Lr(t,0,0,0,1);return}return l[3]=Pr(l[3]),Ur(l,t),Vr(e,t),t;case`hsl`:if(l.length!==3){Lr(t,0,0,0,1);return}return Ur(l,t),Vr(e,t),t;default:return}}Lr(t,0,0,0,1)}}function Ur(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=Pr(e[1]),i=Pr(e[2]),a=i<=.5?i*(r+1):i+r-i*r,o=i*2-a;return t||=[],Lr(t,Ar(Fr(o,a,n+1/3)*255),Ar(Fr(o,a,n)*255),Ar(Fr(o,a,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function Wr(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 Gr(e,t){var n=Hr(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 Jr(n,n.length===4?`rgba`:`rgb`)}}function Kr(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=Hr(t[i]),s=Hr(t[a]),c=r-i,l=Jr([Ar(Ir(o[0],s[0],c)),Ar(Ir(o[1],s[1],c)),Ar(Ir(o[2],s[2],c)),Mr(Ir(o[3],s[3],c))],`rgba`);return n?{color:l,leftIndex:i,rightIndex:a,value:r}:l}}function qr(e,t,n,r){var i=Hr(e);if(e)return i=Wr(i),t!=null&&(i[0]=jr(V(t)?t(i[0]):t)),n!=null&&(i[1]=Pr(V(n)?n(i[1]):n)),r!=null&&(i[2]=Pr(V(r)?r(i[2]):r)),Jr(Ur(i),`rgba`)}function Jr(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 Yr(e,t){var n=Hr(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var Xr=new Or(100);function Zr(e){if(H(e)){var t=Xr.get(e);return t||(t=Gr(e,-.1),Xr.put(e,t)),t}if(De(e)){var n=P({},e);return n.colorStops=R(e.colorStops,function(e){return{offset:e.offset,color:Gr(e.color,-.1)}}),n}return e}var Qr=Math.round;function $r(e){var t;if(!e||e===`transparent`)e=`none`;else if(typeof e==`string`&&e.indexOf(`rgba`)>-1){var n=Hr(e);n&&(e=`rgb(`+n[0]+`,`+n[1]+`,`+n[2]+`)`,t=n[3])}return{color:e,opacity:t??1}}var ei=1e-4;function ti(e){return e<ei&&e>-ei}function ni(e){return Qr(e*1e3)/1e3}function ri(e){return Qr(e*1e4)/1e4}function ii(e){return`matrix(`+ni(e[0])+`,`+ni(e[1])+`,`+ni(e[2])+`,`+ni(e[3])+`,`+ri(e[4])+`,`+ri(e[5])+`)`}var ai={left:`start`,right:`end`,center:`middle`,middle:`middle`};function oi(e,t,n){return n===`top`?e+=t/2:n===`bottom`&&(e-=t/2),e}function si(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}function ci(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 li(e){return e&&!!e.image}function ui(e){return e&&!!e.svgElement}function di(e){return li(e)||ui(e)}function fi(e){return e.type===`linear`}function pi(e){return e.type===`radial`}function mi(e){return e&&(e.type===`linear`||e.type===`radial`)}function hi(e){return`url(#`+e+`)`}function gi(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 _i(e){var t=e.x||0,n=e.y||0,r=(e.rotation||0)*Je,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(`+Qr(o*Je)+`deg, `+Qr(s*Je)+`deg)`),c.join(` `)}var vi=(function(){return typeof Buffer<`u`&&typeof Buffer.from==`function`?function(e){return Buffer.from(e).toString(`base64`)}:typeof btoa==`function`&&typeof unescape==`function`&&typeof encodeURIComponent==`function`?function(e){return btoa(unescape(encodeURIComponent(e)))}:function(e){return process.env.NODE_ENV!==`production`&&de(`Base64 isn't natively supported in the current environment.`),null}})(),yi=Array.prototype.slice;function bi(e,t,n){return(t-e)*n+e}function xi(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=bi(t[a],n[a],r);return e}function Si(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]=bi(t[o][s],n[o][s],r)}return e}function Ci(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=t[a]+n[a]*r;return e}function wi(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 Ti(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 Ei(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]:yi.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 Di(e){if(he(e)){var t=e.length;if(he(e[0])){for(var n=[],r=0;r<t;r++)n.push(yi.call(e[r]));return n}return yi.call(e)}return e}function Oi(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 ki(e){return he(e&&e[0])?2:1}var Ai=0,ji=1,Mi=2,Ni=3,Pi=4,Fi=5,Ii=6;function Li(e){return e===Pi||e===Fi}function Ri(e){return e===ji||e===Mi}var zi=[0,0,0,0],Bi=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=Ii,s=t;if(he(t)){var c=ki(t);o=c,(c===1&&!Ce(t[0])||c===2&&!Ce(t[0][0]))&&(a=!0)}else if(Ce(t)&&!Ae(t))o=Ai;else if(H(t)){if(!isNaN(+t))o=Ai;else{var l=Hr(t);l&&(s=l,o=Ni)}}else if(De(t)){var u=P({},s);u.colorStops=R(t.colorStops,function(e){return{offset:e.offset,color:Hr(e.color)}}),fi(t)?o=Pi:pi(t)&&(o=Fi),s=u}i===0?this.valType=o:(o!==this.valType||o===Ii)&&(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:Zn[n]||wr(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=Ri(r),c=Li(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?Ei(d,f,r):c&&Ti(d.colorStops,f.colorStops))}if(!o&&r!==Fi&&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===Ai?n[l].additiveValue=n[l].value-p:r===Ni?n[l].additiveValue=Ci([],n[l].value,p,-1):Ri(r)&&(n[l].additiveValue=r===ji?Ci([],n[l].value,p,-1):wi([],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===Ni,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?zi:e[s];if((Ri(i)||c)&&!g&&(g=this._additiveValue=[]),this.discrete)e[s]=h<1?f.rawValue:p.rawValue;else if(Ri(i))i===ji?xi(g,f[r],p[r],h):Si(g,f[r],p[r],h);else if(Li(i)){var _=f[r],v=p[r],y=i===Pi;e[s]={type:y?`linear`:`radial`,x:bi(_.x,v.x,h),y:bi(_.y,v.y,h),colorStops:R(_.colorStops,function(e,t){var n=v.colorStops[t];return{offset:bi(e.offset,n.offset,h),color:Oi(xi([],e.color,n.color,h))}}),global:v.global},y?(e[s].x2=bi(_.x2,v.x2,h),e[s].y2=bi(_.y2,v.y2,h)):e[s].r=bi(_.r,v.r,h)}else if(c)xi(g,f[r],p[r],h),n||(e[s]=Oi(g));else{var b=bi(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===Ai?e[n]=e[n]+r:t===Ni?(Hr(e[n],zi),Ci(zi,zi,r,1),e[n]=Oi(zi)):t===ji?Ci(e[n],e[n],r,1):t===Mi&&wi(e[n],e[n],r,1)},e}(),Vi=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){de(`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,z(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 Bi(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===Ni&&c&&(c=Oi(c))}else c=this._target[o];if(c==null)continue;e>0&&s.addKeyframe(0,Di(c),r),this._trackKeys.push(o)}s.addKeyframe(e,Di(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 Tr({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]=Di(s.rawValue))}}}},e.prototype.__changeFinalValue=function(e,t){t||=z(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 Hi(){return new Date().getTime()}var Ui=function(e){v(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=Hi()-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&&(Xn(t),!e._paused&&e.update())}Xn(t)},t.prototype.start=function(){this._running||(this._time=Hi(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||=(this._pauseStart=Hi(),!0)},t.prototype.resume=function(){this._paused&&=(this._pausedTime+=Hi()-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 Vi(e,t.loop);return this.addAnimator(n),n},t}(ht),Wi=300,Gi=b.domSupported,Ki=(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})}})(),qi={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},Ji=!1;function Yi(e){var t=e.pointerType;return t===`pen`||t===`touch`}function Xi(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 Zi(e){e&&(e.zrByTouch=!0)}function Qi(e,t){return It(e.dom,new ea(e,t),!0)}function $i(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 ea=function(){function e(e,t){this.stopPropagation=qe,this.stopImmediatePropagation=qe,this.preventDefault=qe,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return e}(),ta={mousedown:function(e){e=It(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove:function(e){e=It(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=It(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout:function(e){e=It(this.dom,e);var t=e.toElement||e.relatedTarget;$i(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel:function(e){Ji=!0,e=It(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel:function(e){Ji||(e=It(this.dom,e),this.trigger(`mousewheel`,e))},touchstart:function(e){e=It(this.dom,e),Zi(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,`start`),ta.mousemove.call(this,e),ta.mousedown.call(this,e)},touchmove:function(e){e=It(this.dom,e),Zi(e),this.handler.processGesture(e,`change`),ta.mousemove.call(this,e)},touchend:function(e){e=It(this.dom,e),Zi(e),this.handler.processGesture(e,`end`),ta.mouseup.call(this,e),+new Date-this.__lastTouchMoment<Wi&&ta.click.call(this,e)},pointerdown:function(e){ta.mousedown.call(this,e)},pointermove:function(e){Yi(e)||ta.mousemove.call(this,e)},pointerup:function(e){ta.mouseup.call(this,e)},pointerout:function(e){Yi(e)||ta.mouseout.call(this,e)}};L([`click`,`dblclick`,`contextmenu`],function(e){ta[e]=function(t){t=It(this.dom,t),this.trigger(e,t)}});var na={pointermove:function(e){Yi(e)||na.mousemove.call(this,e)},pointerup:function(e){na.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 ra(e,t){var n=t.domHandlers;b.pointerEventsSupported?L(Ki.pointer,function(r){aa(t,r,function(t){n[r].call(e,t)})}):(b.touchEventsSupported&&L(Ki.touch,function(r){aa(t,r,function(i){n[r].call(e,i),Xi(t)})}),L(Ki.mouse,function(r){aa(t,r,function(i){i=Ft(i),t.touching||n[r].call(e,i)})}))}function ia(e,t){b.pointerEventsSupported?L(qi.pointer,n):b.touchEventsSupported||L(qi.mouse,n);function n(n){function r(r){r=Ft(r),$i(e,r.target)||(r=Qi(e,r),t.domHandlers[n].call(e,r))}aa(t,n,r,{capture:!0})}}function aa(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,Rt(e.domTarget,t,n,r)}function oa(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&zt(e.domTarget,n,t[n],e.listenerOpts[n]);e.mounted={}}var sa=function(){function e(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}return e}(),ca=function(e){v(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 sa(t,ta),Gi&&(r._globalHandlerScope=new sa(document,na)),ra(r,r._localHandlerScope),r}return t.prototype.dispose=function(){oa(this._localHandlerScope),Gi&&oa(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,Gi&&+this.__pointerCapturing^e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?ia(this,t):oa(t)}},t}(ht),la=1;b.hasGlobalWindow&&(la=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var ua=la,da=.4,fa=`#333`,pa=`#ccc`,ma=`#eee`,ha=Kt,ga=5e-5;function _a(e){return e>ga||e<-ga}var va=[],ya=[],ba=Gt(),xa=Math.abs,Sa=function(){function e(){}return e.prototype.getLocalTransform=function(e){return Ca(this,e)},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 _a(this.rotation)||_a(this.x)||_a(this.y)||_a(this.scaleX-1)||_a(this.scaleY-1)||_a(this.skewX)||_a(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(ha(n),this.invTransform=null);return}n||=Gt(),t?this.getLocalTransform(n):ha(n),e&&(t?Jt(n,e,n):qt(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n),this.invTransform=this.invTransform||Gt(),Qt(this.invTransform,n)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(va);var n=va[0]<0?-1:1,r=va[1]<0?-1:1,i=((va[0]-n)*t+n)/va[0]||0,a=((va[1]-r)*t+r)/va[1]||0;e[0]*=i,e[1]*=i,e[2]*=a,e[3]*=a}},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||Gt(),Jt(ya,e.invTransform,t),t=ya);var n=this.originX,r=this.originY;(n||r)&&(ba[4]=n,ba[5]=r,Jt(ya,t,ba),ya[4]-=n,ya[5]-=r,t=ya),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&&ut(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&ut(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&xa(e[0]-1)>1e-10&&xa(e[3]-1)>1e-10?Math.sqrt(xa(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){Ea(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&&Xt(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}(),Ca=Sa.getLocalTransform;function wa(){return new Sa}var Ta=[`x`,`y`,`originX`,`originY`,`anchorX`,`anchorY`,`rotation`,`scaleX`,`scaleY`,`skewX`,`skewY`];function Ea(e,t){return fe(e,t,Ta)}function Da(e){Oa||=new Or(100),e||=`12px sans-serif`;var t=Oa.get(e);return t||(t={font:e,strWidthCache:new Or(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:O.measureText(`国`,e).width,asciiCharWidth:O.measureText(`a`,e).width},Oa.put(e,t)),t}var Oa;function ka(e){if(!(Aa>=ja)){e||=`12px sans-serif`;for(var t=[],n=+new Date,r=0;r<=127;r++)t[r]=O.measureText(String.fromCharCode(r),e).width;var i=+new Date-n;return i>16?Aa=ja:i>2&&Aa++,t}}var Aa=0,ja=5;function Ma(e,t){return e.asciiWidthMapTried||=(e.asciiWidthMap=ka(e.font),!0),0<=t&&t<=127?e.asciiWidthMap==null?e.asciiCharWidth:e.asciiWidthMap[t]:e.stWideCharWidth}function Na(e,t){var n=e.strWidthCache,r=n.get(t);return r??(r=O.measureText(t,e.font).width,n.put(t,r)),r}function Pa(e,t,n,r){var i=Na(Da(t),e),a=Ra(t);return new q(Ia(0,i,n),La(0,a,r),i,a)}function Fa(e,t,n,r){var i=((e||``)+``).split(`
3
3
  `);if(i.length===1)return Pa(i[0],t,n,r);for(var a=new q(0,0,0,0),o=0;o<i.length;o++){var s=Pa(i[o],t,n,r);o===0?a.copy(s):a.union(s)}return a}function Ia(e,t,n,r){return n===`right`?r?e+=t:e-=t:n===`center`&&(r?e+=t/2:e-=t/2),e}function La(e,t,n,r){return n===`middle`?r?e+=t/2:e-=t/2:n===`bottom`&&(r?e+=t:e-=t),e}function Ra(e){return Da(e).stWideCharWidth}function za(e,t){return typeof e==`string`?e.lastIndexOf(`%`)>=0?parseFloat(e)/100*t:parseFloat(e):e}function Ba(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+=za(r[0],n.width),l+=za(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`}return e||={},e.x=c,e.y=l,e.align=u,e.verticalAlign=d,e}var Va=`__zr_normal__`,Ha=Ta.concat([`ignore`]),Ua=ge(Ta,function(e,t){return e[t]=!0,e},{ignore:!1}),Wa={},Ga=new q(0,0,0,0),Ka=[],qa=function(){function e(e){this.id=ue(),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}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=Ga,n.layoutRect?d.copy(n.layoutRect):d.copy(this.getBoundingRect()),r||d.applyTransform(this.transform)),l){this.calculateTextPosition?this.calculateTextPosition(Wa,n,d):Ba(Wa,n,d),i.x=Wa.x,i.y=Wa.y,a=Wa.align,o=Wa.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=za(f[0],d.width),m=za(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 q(0,0,0,0);i.getLocalTransform(Ka),Qt(Ka,Ka),q.copy(_,d),_.applyTransform(Ka)}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()?pa:fa},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t==`string`&&Hr(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,Jr(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||{},P(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=z(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,Ha)},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(Va,!1,e)},e.prototype.useState=function(e,t,n,r){var i=e===Va;if(!(!this.hasState()&&i)){var a=this.currentStates,o=this.stateTransition;if(!(I(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){de(`State `+e+` not exists.`);return}i||this.saveCurrentToNormalState(s);var c=this._textContent,l=to(this,c,s,r);l&&!this.__inHover&&(this.__inHover=l),this._applyStateObj(e,s,this._normalState,t,ro(this,n,o),o);var u=this._textGuide;return c&&c.useState(e,t,n,!!l),u&&u.useState(e,t,n,!!l),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this.__inHover=0,this.__dirty&=-2),s}}},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=this._textContent,f=to(this,d,u,n);f&&!this.__inHover&&(this.__inHover=f);var p=this._mergeStates(r),m=this.stateTransition;this.saveCurrentToNormalState(p),this._applyStateObj(e.join(`,`),p,this._normalState,!1,ro(this,t,m),m);var h=this._textGuide;d&&d.useStates(e,t,!!f),h&&h.useStates(e,t,!!f),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!f&&this.__inHover&&(this.__inHover=0,this.__dirty&=-2)}},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=I(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=I(r,e),a=I(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];P(t,i),i.textConfig&&(n||={},P(n,i.textConfig))}return n&&(t.textConfig=n),t},e.prototype._applyStateObj=function(e,t,n,r,i,a){if(this.__inHover!==1){var o=!(t&&r);t&&t.textConfig?(this.textConfig=P({},r?this.textConfig:n.textConfig),P(this.textConfig,t.textConfig)):o&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},c=!1,l=0;l<Ha.length;l++){var u=Ha[l],d=i&&Ua[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 Sa,this._attachComponent(e),this._textContent=e,this.markRedraw()}},e.prototype.setTextConfig=function(e){this.textConfig||={},P(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.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){de(`Property "`+e+`" is not existed in element `+this.id);return}var i=new Vi(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=I(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){Ja(this,e,t,n)},e.prototype.animateFrom=function(e,t,n){Ja(this,e,t,n,!0)},e.prototype._transitionState=function(e,t,n,r){for(var i=Ja(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=!1,t.__inHover=0,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}();me(qa,ht),me(qa,Sa);function Ja(e,t,n,r,i){n||={};var a=[];eo(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 Ya(e,t,n){for(var r=0;r<n;r++)e[r]=t[r]}function Xa(e){return he(e[0])}function Za(e,t,n){if(he(t[n])){if(he(e[n])||(e[n]=[]),Te(t[n])){var r=t[n].length;e[n].length!==r&&(e[n]=new t[n].constructor(r),Ya(e[n],t[n],r))}else{var i=t[n],a=e[n],o=i.length;if(Xa(i))for(var s=i[0].length,c=0;c<o;c++)a[c]?Ya(a[c],i[c],s):a[c]=Array.prototype.slice.call(i[c]);else Ya(a,i,o);a.length=i.length}}else e[n]=t[n]}function Qa(e,t){return e===t||he(e)&&he(t)&&$a(e,t)}function $a(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 eo(e,t,n,r,i,a,o,s){for(var c=z(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)&&!he(v)&&!De(v)){if(t){s||(n[_]=v,e.updateDuringAnimation(t));continue}eo(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=I(m,x);m.splice(S,1)}}if(i.force||(h=_e(h,function(e){return!Qa(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[_]=Di(n[_]),Za(n,r,_)}}var x=new Vi(n,!1,!1,d?_e(m,function(e){return e.targetName===t}):null);x.targetName=t,i.scope&&(x.scope=i.scope),f&&C&&x.whenWithKeys(0,C,h),T&&x.whenWithKeys(0,T,h),x.whenWithKeys(l??500,s?w:r,h).delay(u||0),e.addAnimator(x,t),o.push(x)}}function to(e,t,n,r){return!(n&&n.hoverLayer||r)||no(e)||t&&no(t)?0:1}function no(e){return e.type===`text`||e.type===`tspan`}function ro(e,t,n){return!t&&!e.__inHover&&n&&n.duration>0}var io=function(e){v(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=I(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=I(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 q(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?(q.applyTransform(t,s,c),i||=t.clone(),i.union(t)):(i||=s.clone(),i.union(s))}}return i||t},t}(qa);io.prototype.type=`group`;var ao={},oo={};function so(e){delete oo[e]}function co(e){if(!e)return!1;if(typeof e==`string`)return Yr(e,1)<da;if(e.colorStops){for(var t=e.colorStops,n=0,r=t.length,i=0;i<r;i++)n+=Yr(t[i].color,1);return n/=r,n<da}return!1}var lo=function(){function e(e,t,n){var r=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!1,this._darkMode=!1,n||={},this.dom=t,this.id=e;var i=new Yn,a=n.renderer||`canvas`;if(ao[a]||(a=z(ao)[0]),process.env.NODE_ENV!==`production`&&!ao[a])throw Error(`Renderer '`+a+`' is not imported. Please import it first.`);n.useDirtyRect=n.useDirtyRect!=null&&n.useDirtyRect;var o=new ao[a](t,i,n,e),s=n.ssr||o.ssrOnly;this.storage=i,this.painter=o;var c=!b.node&&!b.worker&&!s?new ca(o.getViewportRoot(),o.root):null,l=n.useCoarsePointer,u=l==null||l===`auto`?b.touchEventsSupported:!!l,d=44,f;u&&(f=W(n.pointerSize,d)),this.handler=new Mn(i,o,c,o.root,f),this.animation=new Ui({stage:{update:s?null:function(){return r._flush(!1)}}}),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=co(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||this._refresh({animUpdate:!e,refresh:!0,refreshHover:!1})},e.prototype._refresh=function(e){e.animUpdate&&this.animation.update(!0),this._needsRefresh=this._needsRefreshHover=!1,this.painter.refresh({refresh:e.refresh,refreshHover:e.refreshHover}),this._needsRefresh=this._needsRefreshHover=!1},e.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},e.prototype.flush=function(){this._disposed||this._flush(!0)},e.prototype._flush=function(e){var t,n=Hi(),r=this._needsRefresh,i=this._needsRefreshHover;(r||i)&&(t=!0,this._refresh({animUpdate:e,refresh:r,refreshHover:i}));var a=Hi();t?(this._stillFrameAccum=0,this.trigger(`rendered`,{elapsedTime:a-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._refresh({animUpdate:!1,refresh:!1,refreshHover:!0})},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 io&&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,so(this.id))},e}();function uo(e,t){var n=new lo(ue(),e,t);return oo[n.id]=n,n}function fo(e,t){ao[e]=t}var po;function mo(e){if(typeof po==`function`)return po(e)}function ho(e){po=e}var go=1e-4,_o=20;function vo(e){return e.replace(/^\s+|\s+$/g,``)}var yo=Math.min,bo=Math.max,xo=Math.abs,So=Math.round,Co=Math.floor,wo=Math.ceil,To=Math.pow,Eo=Math.log,Do=Math.LN10,Oo=Math.PI,ko=Math.random;function Ao(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 jo=Mo;function Mo(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%`}return No(e,t,n)}function No(e,t,n){return H(e)?Po(e)?parseFloat(e)/100*t+(n||0):parseFloat(e):e==null?NaN:+e}function Po(e){return!!vo(e).match(/%$/)}function J(e,t,n){return process.env.NODE_ENV!==`production`&&G(t!=null),isNaN(t)?n?``+e:+e:(t=yo(bo(0,t),_o),e=(+e).toFixed(t),n?e:+e)}function Fo(e){return e.sort(function(e,t){return e-t}),e}function Io(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,n=0;n<15;n++,t*=10)if(So(e*t)/t===e)return n}return Lo(e)}function Lo(e){var t=e.toString().toLowerCase(),n=t.indexOf(`e`),r=n>0?+t.slice(n+1):0,i=n>0?n:t.length,a=t.indexOf(`.`);return bo(0,(a<0?0:i-1-a)-r)}function Ro(e,t,n){var r=xo(e[1]-e[0]);if(!isFinite(r)||r===0)return NaN;var i=Eo(2*xo(n||1)*xo(r))/Do,a=Eo(xo(t))/Do,o=bo(0,wo(-i+a));return isFinite(o)||(o=NaN),o}function zo(e,t){var n=bo(Io(e),Io(t)),r=e+t;return n>_o?r:J(r,n)}var Bo=To(2,53)-1;function Vo(e){var t=Oo*2;return(e%t+t)%t}function Ho(e){return e>-go&&e<go}var Uo=/^(?:(\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 Wo(e){if(e instanceof Date)return e;if(H(e)){var t=Uo.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))}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)}return e==null?new Date(NaN):new Date(So(e))}function Go(e){return To(10,Ko(e))}function Ko(e){if(e===0)return 0;var t=Co(Eo(e)/Do);return e/To(10,t)>=10&&t++,t}function qo(e,t){var n=Ko(e),r=To(10,n),i=e/r;return e=(t===2?1:t?i<1.5?1:i<2.5?2:i<4?3:i<7?5:10:i<1?1:i<2?2:i<3?3:i<5?5:10)*r,J(e,-n)}function Jo(e){var t=parseFloat(e);return t==e&&(t!==0||!H(e)||e.indexOf(`x`)<=0)?t:NaN}function Yo(e){return!isNaN(Jo(e))}function Xo(){return So(ko()*9)}function Zo(e,t){return t===0?e:Zo(t,e%t)}function Qo(e,t){return e==null?t:t==null?e:e*t/Zo(e,t)}function $o(e){return e!=null&&isFinite(e)}var es=`[ECharts] `,ts={},ns=typeof console<`u`&&console.warn&&console.log;function rs(e,t,n){if(ns){if(n){if(ts[t])return;ts[t]=!0}console[e](es+t)}}function is(e,t){rs(`log`,e,t)}function as(e,t){rs(`warn`,e,t)}function os(e,t){rs(`error`,e,t)}function ss(e){process.env.NODE_ENV!==`production`&&rs(`warn`,`DEPRECATED: `+e,!0)}function cs(e,t,n){process.env.NODE_ENV!==`production`&&ss((n?`[`+n+`]`:``)+(e+` is deprecated; use `+t+` instead.`))}function ls(){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`:Ae(e)?`NaN`:e instanceof Date?`Date(`+e.toISOString()+`)`:V(e)?`function () { ... }`:ke(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`?`}return`?`}).join(` `)}return n}function us(e){throw Error(e)}function ds(e,t,n){return(t-e)*n+e}var fs=`series\0`,ps=`\0_ec_\0`;function ms(e){return e instanceof Array?e:e==null?[]:[e]}function hs(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 gs=`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 _s(e){return U(e)&&!B(e)&&!(e instanceof Date)?e.value:e}function vs(e){return U(e)&&!(e instanceof Array)}function ys(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&&!As(e.id)&&ks(e.id),e.name!=null&&!As(e.name)&&ks(e.name))});var s=bs(e,o,n);return(r||i)&&xs(s,e,o,t),r&&Ss(s,t),r||i?Cs(s,t,i):a&&ws(s,t),Ts(s),s}function bs(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`||Ms(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return r}function xs(e,t,n,r){L(r,function(i,a){if(!(!i||i.id==null)){var o=Ds(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 Ss(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)&&!Ms(n)&&!Ms(a)&&Es(`name`,a,n)){e[i].newOption=n,t[r]=null;return}}})}function Cs(e,t,n){L(t,function(t){if(t){for(var r,i=0;(r=e[i])&&(r.newOption||Ms(r.existing)||r.existing&&t.id!=null&&!Es(`id`,t,r.existing));)i++;r?(r.newOption=t,r.brandNew=n):e.push({newOption:t,brandNew:n,existing:null,keyInfo:null}),i++}})}function ws(e,t){L(t,function(t){e.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})}function Ts(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:fs+n:Ds(i.name),r)a.id=Ds(r.id);else if(i.id!=null)a.id=Ds(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 Es(e,t,n){var r=Os(t[e],null),i=Os(n[e],null);return r!=null&&i!=null&&r===i}function Ds(e){if(process.env.NODE_ENV!==`production`&&e==null)throw Error();return Os(e,``)}function Os(e,t){return e==null?t:H(e)?e:Ce(e)||Se(e)?e+``:t}function ks(e){process.env.NODE_ENV!==`production`&&as("`"+e+"` is invalid id or name. Must be a string or number.")}function As(e){return Se(e)||Yo(e)}function js(e){var t=e.name;return!!(t&&t.indexOf(fs))}function Ms(e){return e&&e.id!=null&&Ds(e.id).indexOf(ps)===0}function Ns(e){return ps+e}function Ps(e,t,n){L(e,function(e){var r=e.newOption;U(r)&&(e.keyInfo.mainType=t,e.keyInfo.subType=Fs(t,r,e.existing,n))})}function Fs(e,t,n,r){return t.type?t.type:n?n.subType:r.determineSubType(e,t)}function Is(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 Ls(){var e=`__ec_inner_`+Rs++;return function(t){return t[e]||(t[e]={})}}var Rs=Xo();function zs(e,t,n){var r=Bs(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=Us(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 Bs(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&&I(t.includeMainTypes,s)<0)){o||=!!s;var l=i.get(s)||i.set(s,{});l[c]=e}}),{mainTypeSpecified:o,queryOptionMap:i,others:a}}var Vs={useDefault:!0,enableAll:!1,enableNone:!1},Hs={useDefault:!1,enableAll:!0,enableNone:!0};function Us(e,t,n,r){r||=Vs;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`&&os('`"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`&&os('`"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 Ws(e,t,n){process.env.NODE_ENV!==`production`&&G(t);var r={};r[t+`Id`]=e[t+`Id`],r[t+`Index`]=e[t+`Index`],r[t+`Name`]=e[t+`Name`];var i={mainType:t,query:r};return n&&(i.subType=n),i}function Gs(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n}function Ks(e,t){return e.getAttribute?e.getAttribute(t):e[t]}function qs(e){return e===`auto`?b.domSupported?`html`:`richText`:e||`html`}function Js(e,t,n,r,i){var a=t==null||t===`auto`;if(r==null)return r;if(Ce(r)){var o=ds(n||0,r,i);return J(o,a?Math.max(Io(n||0),Io(r)):t)}if(H(r))return i<1?n:r;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=ds(p,m,i);s[d]=J(o,a?Math.max(Io(p),Io(m)):t)}}return s}(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)},e})();function Ys(){return[1/0,-1/0]}function Xs(e,t){ec(t)&&(t<e[0]&&(e[0]=t),t>e[1]&&(e[1]=t))}function Zs(e,t){ec(t)&&t<e[0]&&(e[0]=t)}function Qs(e,t){ec(t)&&t>e[1]&&(e[1]=t)}function $s(e,t){tc(t[0],t[1])&&(t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]))}function ec(e){return e!=null&&isFinite(e)}function tc(e,t){return ec(e)&&ec(t)&&e<=t}function nc(e){var t=e[1]-e[0];return isFinite(t)&&t>=0}function rc(e){tc(e[0],e[1])&&e[0]>e[1]&&(e[0]=e[1])}function ic(){var e=`__ec_once_`+ac++;return function(t,n){process.env.NODE_ENV!==`production`&&G(t),Ke(t,e)||(t[e]=1,n())}}var ac=Xo();function oc(e,t,n){var r=K(),i=0;L(e,function(a){var o=t(a);process.env.NODE_ENV!==`production`&&G(H(o));var s=r.get(o)||0;n&&n(a,s),!s&&!n&&(e[i++]=a),r.set(o,s+1)}),n||(e.length=i)}function sc(e){return process.env.NODE_ENV!==`production`&&G(e.value!=null),e.value+``}function cc(e){return process.env.NODE_ENV!==`production`&&G(e!=null),e+``}function lc(e,t){return W(t,!0)?e.seriesIndex+2:0}function uc(e,t,n){var r=e.getData().count();return{progressiveRender:n.progressiveEnabled&&t.incrementalPrepareRender&&r>=n.threshold,large:e.get(`large`)&&r>=e.get(`largeThreshold`),modDataCount:e.get(`progressiveChunkMode`)===`mod`?e.getData().count():null}}function dc(e){return{overallReset:e}}var fc=`.`,pc=`___EC__COMPONENT__CONTAINER___`,mc=`___EC__EXTENDED_CLASS___`;function hc(e){var t={main:``,sub:``};if(e){var n=e.split(fc);t.main=n[0]||``,t.sub=n[1]||``}return t}function gc(e){G(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),`componentType "`+e+`" illegal`)}function _c(e){return!!(e&&e[mc])}function vc(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 yc(n)?r=function(e){v(t,e);function t(){return e.apply(this,arguments)||this}return t}(n):(r=function(){(e.$constructor||n).apply(this,arguments)},pe(r,this)),P(r.prototype,e),r[mc]=!0,r.extend=this.extend,r.superCall=Cc,r.superApply=wc,r.superClass=n,r}}function yc(e){return V(e)&&/^class\s/.test(Function.prototype.toString.call(e))}function bc(e,t){e.extend=t.extend}var xc=Math.round(Math.random()*10);function Sc(e){var t=[`__\0is_clz`,xc++].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 Cc(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 wc(e,t,n){return this.superClass.prototype[t].apply(e,n)}function Tc(e){var t={};e.registerClass=function(e){var r=e.type||e.prototype.type;if(r){gc(r),e.prototype.type=r;var i=hc(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!==pc){var a=n(i);a[i.sub]=e}}return e},e.getClass=function(e,n,r){var i=t[e];if(i&&i[pc]&&(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=hc(e),r=[],i=t[n.main];return i&&i[pc]?L(i,function(e,t){t!==pc&&r.push(e)}):r.push(i),r},e.hasClass=function(e){return!!t[hc(e).main]},e.getAllClassMainTypes=function(){var e=[];return L(t,function(t,n){e.push(n)}),e},e.hasSubTypes=function(e){var n=t[hc(e).main];return n&&n[pc]};function n(e){var n=t[e.main];return(!n||!n[pc])&&(n=t[e.main]={},n[pc]=!0),n}}function Ec(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&&I(r,s)>=0||i&&I(i,s)<0)){var c=n.getShallow(s,t);c!=null&&(a[e[o][0]]=c)}}return a}}var Dc=Ec([[`fill`,`color`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`opacity`],[`shadowColor`]]),Oc=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return Dc(this,e,t)},e}(),kc=new Or(50);function Ac(e){if(typeof e==`string`){var t=kc.get(e);return t&&t.image}return e}function jc(e,t,n,r,i){if(!e)return t;if(typeof e==`string`){if(t&&t.__zrImageSrc===e||!n)return t;var a=kc.get(e),o={hostEl:n,cb:r,cbPayload:i};return a?(t=a.image,!Nc(t)&&a.pending.push(o)):(t=O.loadImage(e,Mc,Mc),t.__zrImageSrc=e,kc.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}return e}function Mc(){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 Nc(e){return e&&e.width&&e.height}var Pc=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function Fc(e,t,n,r,i,a){if(!n){e.text=``,e.isTruncated=!1;return}var o=(t+``).split(`
4
4
  `);a=Ic(n,r,i,a);for(var s=!1,c={},l=0,u=o.length;l<u;l++)Lc(c,o[l],a),o[l]=c.textLine,s||=c.isTruncated;e.text=o.join(`
@@ -47,4 +47,4 @@ echarts.use([`+c+`]);`:`Unknown series `+s))}return}if(t===`tooltip`){if(f){proc
47
47
  <span style="margin-left: 6px;">${e.seriesName}: </span>
48
48
  <span style="margin-left: 4px;">${n}</span>
49
49
  </div>
50
- `}),t}catch(e){return console.log(`[HorizontalBarChart] Error al formatear el tooltip:`,e),``}},WR=`#EFEFEF`,GR=`#3B3B3B`,KR=`#B9B9B9`,qR=.25,JR=e=>(t,n)=>e===null||n===e?GR:KR,YR=(e=0)=>{try{let t=(Number(e)||0)+1;return Array.from({length:t},(e,n)=>n===0||n===t-1?`transparent`:WR)}catch(e){return console.log(`[HorizontalBarChart] Error al calcular las líneas del grid:`,e),[WR]}},XR={backgroundColor:`#FFF`,grid:{bottom:`5%`,containLabel:!0,left:`2%`,right:`2%`,top:`5%`},textStyle:{color:`#3B3B3B`,fontFamily:`Roboto, sans-serif`,fontSize:14},tooltip:{backgroundColor:`#FFFFFF`,borderColor:`#E2E2E2`,borderRadius:8,borderWidth:1,extraCssText:`box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.08);`,formatter:UR,padding:[12,16],show:!0,textStyle:{color:`#3B3B3B`,fontFamily:`Roboto, sans-serif`,fontSize:16},trigger:`axis`},xAxis:[{axisLabel:{fontSize:14},axisLine:{show:!1},axisTick:{show:!1},splitLine:{show:!1},tooltip:{show:!1},type:`value`}],yAxis:[{axisLabel:{fontSize:14,interval:0},axisLine:{lineStyle:{color:`#D3D3D3`,type:`solid`,width:2},onZero:!0,show:!0},axisTick:{show:!1},splitLine:{lineStyle:{color:WR,type:`solid`,width:1},show:!0},type:`category`,z:10}]},ZR=[`negativa`],QR={categories:[],hasImages:!1,images:[],series:[]},$R=e=>{try{let t=Number(e);return Number.isFinite(t)?t:0}catch(t){return console.log(`[HorizontalBarChart] Valor no numérico:`,e,t),0}},ez=e=>{try{return String(e??``).trim().toLowerCase()}catch(t){return console.log(`[HorizontalBarChart] Valor no convertible a texto:`,e,t),``}},tz=e=>ZR.includes(ez(e)),nz=(e={})=>{let{category:t,x:n,y:r}=e||{};return ez([t,r,n].find(e=>typeof e==`string`&&e.length>0))},rz=(e={},t=[],n=``)=>{let{values:r,x:i}=e||{};return([r,i].find(e=>Array.isArray(e)&&e.length>0)??t.filter(e=>ez(e)!==n)).map(e=>String(e))},iz=(e,t)=>e.findIndex(e=>ez(e)===ez(t)),az=(e,t)=>e.find(e=>ez(e.key)===ez(t)),oz=(e,t)=>az(e,t)?.color??``,sz=(e,t)=>az(e,t)?.image??``,cz=(e,t)=>({barGap:`0%`,barWidth:22,data:t,label:{show:!1},name:e,type:`bar`}),lz=(e,t)=>e.map(e=>({...e,data:e.data.map((e,n)=>({...e,itemStyle:{...e.itemStyle,opacity:t===null||t===n?1:qR}}))})),uz=(e={},t={})=>{let{columns:n=[],rows:r=[]}=e||{},{bindings:i={},series:a=[]}=t||{};if(!n.length||!r.length||!a.length)return QR;let o=nz(i),s=n.findIndex(e=>ez(e)===o);if(s<0)return QR;let c=r.map(e=>String(e?.[s]??``)),l=rz(i,n,o),u=a.some(({key:e})=>iz(n,e)>=0),d=l.map(e=>{let t=iz(n,e);if(t<0)return null;let i=tz(e)?-1:1,o=oz(a,e);return cz(e,r.map((e,n)=>{let r=u?o:oz(a,c[n]);return{itemStyle:{...RR,color:r},value:$R(e?.[t])*i}}))}).filter(e=>e!==null),f=c.map(e=>sz(a,e));return{categories:c,hasImages:f.some(Boolean),images:f,series:d}},dz=({series:e=[],showLegend:t=!0})=>{let n=(0,u.useRef)(null),r=(0,u.useRef)({isDragging:!1,startScroll:0,startX:0});if(!t||!e.length||!Array.isArray(e))return null;let i=e=>{let t=n.current;!t||e.pointerType===`touch`||(e.preventDefault(),r.current={isDragging:!0,startScroll:t.scrollLeft,startX:e.clientX},t.setPointerCapture(e.pointerId))},a=e=>{let t=n.current;if(!(!t||!r.current.isDragging))try{let{startScroll:n,startX:i}=r.current;t.scrollLeft=n-(e.clientX-i)}catch(e){console.log(`[HorizontalBarChart] Error al arrastrar la leyenda:`,e)}},o=e=>{let t=n.current;r.current.isDragging=!1,t?.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId)};return(0,l.jsx)(`div`,{className:`horizontal-bar-chart-legend`,children:(0,l.jsx)(`div`,{className:`horizontal-bar-chart-labels`,onPointerCancel:o,onPointerDown:i,onPointerMove:a,onPointerUp:o,ref:n,children:e.map(({key:e,color:t},n)=>(0,l.jsxs)(`div`,{className:`horizontal-bar-chart-label`,children:[(0,l.jsx)(`div`,{className:`horizontal-bar-chart-label-icon`,style:{background:t||``}}),(0,l.jsx)(`p`,{className:`horizontal-bar-chart-label-text`,children:e})]},`horizontal-bar-chart-label-${e}-${t}-${n}`))})})};dD([yP,HA,iF,FI,LR]);var fz=({data:e={},showLegend:t=!0,visualization:n={}})=>{let{series:r=[]}=n||{},i=(0,u.useRef)(null),a=(0,u.useRef)(null),o=(0,u.useMemo)(()=>uz(e,n),[e,n]),s=(0,u.useMemo)(()=>HR(o.categories.length,o.series.length,o.hasImages),[o.categories.length,o.series.length,o.hasImages]);return(0,u.useEffect)(()=>{if(!i.current)return;a.current||=HC(i.current,void 0,{renderer:`svg`});let e=XR.yAxis[0],t=t=>[{...e,axisLabel:{...e.axisLabel,color:JR(t),formatter:BR(o.images),rich:zR(o.images)},data:o.categories,splitLine:{...e.splitLine,lineStyle:{...e.splitLine.lineStyle,color:YR(o.categories.length)}}}],n={...XR,yAxis:t(null),series:o.series};a.current.setOption(n,!0);let r=e=>{a.current?.setOption({series:lz(o.series,e),yAxis:t(e)})},s=(...e)=>{try{let{axesInfo:t}=e[0]??{},n=Number(t?.[0]?.value);r(Number.isInteger(n)?n:null)}catch(e){console.log(`[HorizontalBarChart] Error al resaltar la fila:`,e)}},c=()=>r(null);a.current.on(`updateAxisPointer`,s),a.current.on(`globalout`,c);let l=new ResizeObserver(()=>{a.current?.resize()});return l.observe(i.current),()=>{l.disconnect(),a.current?.off(`updateAxisPointer`,s),a.current?.off(`globalout`,c),a.current?.dispose(),a.current=null}},[o]),(0,l.jsxs)(`div`,{className:`horizontal-bar-chart-ctn`,children:[(0,l.jsx)(`div`,{ref:i,className:`horizontal-bar-chart-ref`,style:s}),(0,l.jsx)(dz,{series:r,showLegend:t})]})},pz=({source:e=``,showSource:t=!0,showLogo:n=!0,logoSrc:r=``})=>!t&&!n?null:(0,l.jsxs)(`div`,{className:`ibc-footer`,children:[!t||!e?null:(0,l.jsxs)(`p`,{className:`ibc-footer-font`,children:[`Fuente: `,(0,l.jsx)(`span`,{children:e})]}),!n||!r?null:(0,l.jsx)(`img`,{className:`ibc-footer-logo`,src:r||`https://www.infobae.com/assets/images/logos/logo_infobae_naranja.svg`,alt:`Infobae`})]}),mz=({data:e={},type:t=``})=>{let{metadata:{description:n=``,image:r=f,source:i=``,title:a=``,articleUrl:o=``}={},data:s={},visualization:c={},visualization:{settings:{showChart:u=!0,showDescription:d=!0,showImage:p=!0,showLegend:m=!0,showSource:h=!0,showTitle:_=!0}={}}={}}=e||{},v=t===`only-graph`,y=!v&&p;return(0,l.jsxs)(`div`,{className:`horizontal-bar-chart`,children:[(0,l.jsx)(g,{showShare:!v,showSubtitle:d,showTitle:_,subtitle:n,title:a,url:o}),u?(0,l.jsx)(fz,{data:s,visualization:c,showLegend:m}):null,!h||!i?null:(0,l.jsx)(pz,{logoSrc:r,showLogo:y,showSource:h,source:i})]})},hz=Wl.CMD;function gz(e,t){return Math.abs(e-t)<1e-5}function _z(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){gz(e,n)&&gz(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,(_===hz.L||_===hz.C||_===hz.Q)&&(i=[s,c])),_){case hz.M:a=s=t[g++],o=c=t[g++],l(s,c);break;case hz.L:f=t[g++],p=t[g++],u(a,o,f,p),a=f,o=p;break;case hz.C:i.push(t[g++],t[g++],t[g++],t[g++],a=t[g++],o=t[g++]);break;case hz.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 hz.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 hz.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 hz.Z:i&&u(a,o,s,c),a=s,o=c}}return i&&i.length>2&&r.push(i),r}function vz(e,t,n,r,i,a,o,s,c,l){if(gz(e,n)&&gz(t,r)&&gz(i,o)&&gz(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=[];pr(e,n,i,o,.5,T),pr(t,r,a,s,.5,E),vz(T[0],E[0],T[1],E[1],T[2],E[2],T[3],E[3],c,l),vz(T[4],E[4],T[5],E[5],T[6],E[6],T[7],E[7],c,l)}function yz(e,t){var n=_z(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++];vz(s,c,u,d,f,p,m,h,o,t),s=m,c=h}r.push(o)}return r}function bz(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 xz(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=bz([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 Sz(e,t,n){for(var r=e.width,i=e.height,a=r>i,o=bz([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 Cz(e,t,n,r){return e*r-n*t}function wz(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=Cz(u,d,c,l);if(Math.abs(f)<1e-6)return null;var p=Cz(e-i,t-a,u,d)/f;return p<0||p>1?null:new $t(p*c+e,p*l+t)}function Tz(e,t,n){var r=new $t;$t.sub(r,n,t),r.normalize();var i=new $t;return $t.sub(i,e,t),i.dot(r)}function Ez(e,t){var n=e[e.length-1];n&&n[0]===t[0]&&n[1]===t[1]||e.push(t)}function Dz(e,t,n){for(var r=e.length,i=[],a=0;a<r;a++){var o=e[a],s=e[(a+1)%r],c=wz(o[0],o[1],s[0],s[1],t.x,t.y,n.x,n.y);c&&i.push({projPt:Tz(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++)Ez(m,e[a].slice());Ez(m,p),Ez(m,f);for(var a=u.idx+1;a<=l.idx+r;a++)Ez(h,e[a%r].slice());return Ez(h,f),Ez(h,p),[{points:m},{points:h}]}function Oz(e){var t=e.points,n=[],r=[];yl(t,n,r);var i=new q(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 $t,u=new $t;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),Dz(t,l,u)}function kz(e,t,n,r){if(n===1)r.push(t);else{var i=Math.floor(n/2),a=e(t);kz(e,a[0],i,r),kz(e,a[1],n-i,r)}return r}function Az(e,t){for(var n=[],r=0;r<t;r++)n.push(Ff(e));return n}function jz(e,t){t.setStyle(e.style),t.z=e.z,t.z2=e.z2,t.zlevel=e.zlevel}function Mz(e){for(var t=[],n=0;n<e.length;)t.push([e[n++],e[n++]]);return t}function Nz(e,t){var n=[],r=e.shape,i;switch(e.type){case`rect`:Sz(r,t,n),i=Ou;break;case`sector`:xz(r,t,n),i=np;break;case`circle`:xz({r0:0,r:r.r,startAngle:0,endAngle:Math.PI*2,cx:r.cx,cy:r.cy},t,n),i=np;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(yz(e.getUpdatedPathProxy(),o),function(e){return Mz(e)}),c=s.length;if(c===0)kz(Oz,{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=[];yl(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||(kz(Oz,{points:p.poly},m,n),f-=m)}}i=cp}if(!i)return Az(e,t);for(var h=[],l=0;l<n.length;l++){var g=new i;g.setShape(n[l]),jz(e,g),h.push(g)}return h}function Pz(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;pr(m,g,v,b,w,i),pr(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 Fz(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 Iz(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=Pz(c,l),u=n[0],d=n[1],r=u,i=d):(d=Fz(i||c,c),u=c):(u=Fz(r||l,l),d=l),a.push(u),o.push(d)}return[a,o]}function Lz(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 Rz(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 zz(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 Bz(e,t,n,r){for(var i=[],a,o=0;o<e.length;o++){var s=e[o],c=t[o],l=Lz(s),u=Lz(c);a??=l[2]<0!=u[2]<0;var d=[],f=[],p=0,m=1/0,h=[],g=s.length;a&&(s=zz(s));for(var _=Rz(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 Vz(e){return e.__isCombineMorphing}var Hz=`__mOriginal_`;function Uz(e,t,n){var r=Hz+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 Wz(e,t){var n=Hz+t;e[n]&&(e[t]=e[n],e[n]=null)}function Gz(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 Kz(e,t){var n=e.getUpdatedPathProxy(),r=t.getUpdatedPathProxy(),i=Iz(_z(n),_z(r)),a=i[0],o=i[1],s=e.getComputedTransform(),c=t.getComputedTransform();function l(){this.transform=null}s&&Gz(a,s),c&&Gz(o,c),Uz(t,`updateTransform`,{replace:l}),t.transform=null;var u=Bz(a,o,10,Math.PI),d=[];Uz(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);lt(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 qz(e,t,n){if(!e||!t)return t;var r=n.done,i=n.during;Kz(e,t),t.__morphT=0;function a(){Wz(t,`buildPath`),Wz(t,`updateTransform`),t.__morphT=-1,t.createPathProxy(),t.dirtyShape()}return t.animateTo({__morphT:1},F({during:function(e){t.dirtyShape(),i&&i(e)},done:function(){a(),r&&r()}},n)),t}function Jz(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 Yz(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:Jz(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 Xz(e){return Nz(e.path,e.count)}function Zz(){return{fromIndividuals:[],toIndividuals:[],count:0}}function Qz(e,t,n){var r=[];function i(e){for(var t=0;t<e.length;t++){var n=e[t];Vz(n)?i(n.childrenRef()):n instanceof Y&&r.push(n)}}i(e);var a=r.length;if(!a)return Zz();var o=(n.dividePath||Xz)({path:t,count:a});if(o.length!==a)return console.error(`Invalid morphing: unmatched splitted path`),Zz();r=Yz(r),o=Yz(o);for(var s=n.done,c=n.during,l=n.individualDelay,u=new Sa,d=0;d<a;d++){var f=r[d],p=o[d];p.parent=t,p.copyTransform(u),l||Kz(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)}Uz(t,`addSelfToZr`,{after:function(e){m(e)}}),Uz(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,Wz(t,`addSelfToZr`),Wz(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?F({delay:(n.delay||0)+l(d,g,r[d],o[d]),done:v},n):n;qz(r[d],o[d],y)}else t.__morphT=0,t.animateTo({__morphT:1},F({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++)Wz(e[t],`updateTransform`);s&&s()}},n));return t.__zr&&m(t.__zr),{fromIndividuals:r,toIndividuals:o,count:g}}function $z(e,t,n){var r=t.length,i=[],a=n.dividePath||Xz;function o(e){for(var t=0;t<e.length;t++){var n=e[t];Vz(n)?o(n.childrenRef()):n instanceof Y&&i.push(n)}}if(Vz(e)){o(e.childrenRef());var s=i.length;if(s<r)for(var c=0,l=s;l<r;l++)i.push(Ff(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`),Zz()}i=Yz(i),t=Yz(t);for(var d=n.individualDelay,l=0;l<r;l++){var f=d?F({delay:(n.delay||0)+d(l,r,i[l],t[l])},n):n;qz(i[l],t[l],f)}return{fromIndividuals:i,toIndividuals:t,count:t.length}}function eB(e){return B(e[0])}function tB(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 nB={clone:function(e){for(var t=[],n=1-(1-e.path.style.opacity)**(1/e.count),r=0;r<e.count;r++){var i=Ff(e.path);i.setStyle(`opacity`,n),t.push(i)}return t},split:null};function rB(e,t,n,r,i,a){if(!e.length||!t.length)return;var o=Ip(`update`,r,i);if(!(o&&o.duration>0))return;var s=r.getModel(`universalTransition`).get(`delay`),c=P({setToFinal:!0},o),l,u;eB(e)&&(l=e,u=t),eB(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(Vz(f))d({many:[f],one:p},!0,r,i,!0);else{var m=s?F({delay:s(r,i)},c):c;qz(f,p,m),a(f,p,f,p,m)}}else for(var h=F({dividePath:nB[n],individualDelay:s&&function(e,t,n,a){return s(e+r,i)}},c),g=t?Qz(l,u,h):$z(u,l,h),_=g.fromIndividuals,v=g.toIndividuals,y=_.length,b=0;b<y;b++){var m=s?F({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?tB(u,l):tB(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 iB(e){if(!e)return[];if(B(e)){for(var t=[],n=0;n<e.length;n++)t.push(iB(e[n]));return t}var r=[];return e.traverse(function(e){e instanceof Y&&!e.disableMorphing&&!e.invisible&&!e.ignore&&r.push(e)}),r}var aB=1e4,oB=0,sB=1,cB=2,lB=Ls();function uB(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 dB(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 fB(e,t,n,r){var i=uB(e,r?`itemChildGroupId`:`itemGroupId`);if(i)return dB(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 pB(e){var t=[];return L(e,function(e){var n=e.data,r=e.dataGroupId;if(n.count()>aB){process.env.NODE_ENV!==`production`&&as(`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:fB(n,a,r,!1),childGroupId:fB(n,a,r,!0),divide:e.divide,dataIndex:a})}),t}function mB(e,t,n){e.traverse(function(e){e instanceof Y&&zp(e,{style:{opacity:0}},t,{dataIndex:n,isFrom:!0})})}function hB(e){if(e.parent){var t=e.getComputedTransform();e.setLocalTransform(t),e.parent.remove(e)}}function gB(e){e.stopAnimation(),e.isGroup&&e.traverse(function(e){e.stopAnimation()})}function _B(e,t,n){var r=Ip(`update`,n,t);r&&e.traverse(function(e){if(e instanceof sl){var t=Gp(e);t&&e.animateFrom({style:t},r)}})}function vB(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 yB(e,t,n){var r=pB(e),i=pB(t);function a(e,t,n,r,i){(n||e)&&t.animateFrom({style:n&&n!==e?P(P({},n.style),e.style):e.style},i)}var o=!1,s=oB,c=K(),l=K();L(r,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=sB;break}var f=i[u].childGroupId;if(f&&c.get(f)){s=cB;break}}function p(e,t){return function(n){var r=n.data,i=n.dataIndex;return t?r.getId(i):e?s===sB?n.childGroupId:n.groupId:s===cB?n.childGroupId:n.groupId}}var m=vB(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&&_B(u,s.dataIndex,c);return}l&&h[l.id]||u&&(gB(u),l?(gB(l),hB(l),o=!0,rB(iB(l),iB(u),s.divide,c,e,a)):mB(u,c,e))}new cw(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=_e(R(t,function(e){return r[e].data.getItemGraphicEl(r[e].dataIndex)}),function(e){return e&&e!==l&&!h[e.id]});l&&(gB(l),u.length?(L(u,function(e){gB(e),hB(e)}),o=!0,rB(iB(u),iB(l),n.divide,c,e,a)):mB(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=_e(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 gB(e)}),s?(gB(s),hB(s),o=!0,rB(iB(s),iB(c),n.divide,l,e[0],a)):L(c,function(t){return mB(t,l,e[0])}))}}).updateManyToMany(function(e,t){new cw(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=Ip(`update`,t,0);r&&t.isAnimationEnabled()&&i&&i.duration>0&&r.group.traverse(function(e){e instanceof Y&&!e.animators.length&&e.animateFrom({style:{opacity:0}},i)})})}function bB(e){return e.getModel(`universalTransition`).get(`seriesKey`)||e.id}function xB(e){return B(e)?e.sort().join(`,`):e}function SB(e){if(e.hostModel)return e.hostModel.getModel(`universalTransition`).get(`divideShape`)}function CB(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=bB(t),c=xB(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)&&as(`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=bB(e),c=xB(s),l=r.get(c);if(l)process.env.NODE_ENV!==`production`&&a(c),n.set(c,{oldSeries:[{dataGroupId:l.dataGroupId,divide:SB(l.data),data:l.data}],newSeries:[{dataGroupId:t,divide:SB(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:SB(t.data),data:t.data})}),u.length&&n.set(c,{oldSeries:u,newSeries:[{dataGroupId:t,data:o,divide:SB(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:SB(d.data)}],newSeries:[]},n.set(d.key,f)),f.newSeries.push({dataGroupId:t,data:o,divide:SB(o)})}}}}),n}function wB(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 TB(e,t,n,r){var i=[],a=[];L(ms(e.from),function(e){var n=wB(t.oldSeries,e);n>=0&&i.push({dataGroupId:t.oldDataGroupIds[n],data:t.oldData[n],divide:SB(t.oldData[n]),groupIdDim:e.dimension})}),L(ms(e.to),function(e){var r=wB(n.updatedSeries,e);if(r>=0){var i=n.updatedSeries[r].getData();a.push({dataGroupId:t.oldDataGroupIds[r],data:i,divide:SB(i),groupIdDim:e.dimension})}}),i.length>0&&a.length>0&&yB(i,a,r)}function EB(e){e.registerUpdateLifecycle(`series:beforeupdate`,function(e,t,n){L(ms(n.seriesTransition),function(e){L(ms(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][$y]=!0)})})}),e.registerUpdateLifecycle(`series:transition`,function(e,t,n){var r=lB(t);if(r.oldSeries&&n.updatedSeries&&n.optionChanged){var i=n.seriesTransition;if(i)L(ms(i),function(e){TB(e,r,n,t)});else{var a=CB(r,n);L(a.keys(),function(e){var n=a.get(e);yB(n.oldSeries,n.newSeries,t)})}L(n.updatedSeries,function(e){e.__universalTransitionEnabled&&(e[$y]=!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()<aB&&(s.push(o[u]),c.push(o[u].get(`dataGroupId`)),l.push(d))}})}var DB=({color:e=`#d85040`,width:t=27,height:n=10})=>(0,l.jsxs)(`svg`,{width:t,height:n,viewBox:`0 0 ${t} ${n}`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,l.jsx)(`path`,{d:`M1.2998 4.75H25.2998`,stroke:e,strokeWidth:2.6,strokeLinecap:`round`}),(0,l.jsx)(`path`,{d:`M13.2998 8.75C15.5089 8.75 17.2998 6.95914 17.2998 4.75C17.2998 2.54086 15.5089 0.75 13.2998 0.75C11.0907 0.75 9.2998 2.54086 9.2998 4.75C9.2998 6.95914 11.0907 8.75 13.2998 8.75Z`,fill:`white`,stroke:e,strokeWidth:1.5})]}),OB=({hex:e=``,alpha:t=1})=>{if(!e)return``;let n=e.replace(`#`,``);if(n.length===3&&(n=n.split(``).map(e=>e+e).join(``)),!/^[A-Fa-f0-9]{6}$/.test(n))return``;let r=n.match(/.{1,2}/g);if(!r)return``;let[i,a,o]=r.map(e=>parseInt(e,16));return`rgba(${i},${a},${o},${t})`},kB=({visualization:e,data:t})=>{let{bindings:{y:n=[]}={}}=e||{},{columns:r=[]}=t||{};return r.map((e,t)=>n.includes(e)?t:null).filter(e=>e).map(e=>e?r[e]:null).filter(e=>e!==null)},AB=({visualization:e,data:t})=>{let{bindings:{x:n=``}={}}=e||{},{columns:r=[],rows:i=[]}=t||{},a=r.map((e,t)=>n===e?t:null).filter(e=>e!==null)[0]??null;return i.map(e=>a===null?null:e[a]).filter(e=>e!==null)},jB=({visualization:e={},data:t={}})=>{let{bindings:{y:n=[]}={},series:r=[]}=e||{},{columns:i=[],rows:a=[]}=t||{},o=i.map((e,t)=>n.includes(e)?t:null).filter(e=>e!==null),s=r.some(({key:e})=>i.includes(e))||!1,c=n.map((e,t)=>{let n=o[t]??null;return{name:e,data:a.map(e=>n!==null&&Number(e[n])?Number(e[n]):null).filter(e=>e!==null),type:`line`,smooth:!0,stack:String(t+1),lineStyle:{width:1},showSymbol:!0,symbol:`circle`,symbolSize:10,itemStyle:{color:`var(--bg)`,borderWidth:1.8},areaStyle:{origin:`start`},emphasis:{focus:`series`,scale:1.3,itemStyle:{color:`var(--bg)`,borderWidth:1.8,shadowBlur:6,shadowColor:`rgba(216, 80, 64, 0.4)`}}}}),l=kB({visualization:e,data:t});return c.map(e=>{let t=e.stack?Number(e.stack):0,n=l[t-1],i=r.find(({key:e})=>e===n)?.color||`var(--orange-90)`,a=s?i:void 0;return console.log(a),{...e,emphasis:{...e.emphasis,itemStyle:{...e.emphasis?.itemStyle,borderColor:a}},lineStyle:{...e.lineStyle,color:a},itemStyle:{...e.itemStyle,borderColor:a},areaStyle:{...e.areaStyle,color:a?new Sp(0,0,0,1,[{offset:0,color:OB({hex:a,alpha:.1})},{offset:1,color:OB({hex:a,alpha:0})}]):void 0}}})},MB=({xData:e=[],series:t=[]})=>{let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t.find(({key:e})=>e===i)||{};a?.image&&a.key?n[r]={key:i,image:a.image}:n[r]={}}return n};dD([SP,yP,HA,UF,pR,EB]);var NB=({visualization:e={},data:t={},showLegend:n=!0})=>{let r=(0,u.useRef)(null),i=(0,u.useRef)(null),a=jB({visualization:e,data:t}),o=AB({visualization:e,data:t}),{series:s=[]}=e||{},c=MB({xData:o,series:s});return(0,u.useEffect)(()=>{if(!r.current)return;i.current||=HC(r.current,void 0,{renderer:`svg`});let e={valueStyle:{color:`#333`,align:`center`,padding:[0,0,6,0]}};c.forEach(({image:t},n)=>{t&&(e[`img_${n}`]={height:24,width:24,align:`center`,backgroundColor:{image:t}})});let t={grid:{bottom:`0%`,containLabel:!0,left:`0%`,right:`0%`,top:`0%`},tooltip:{trigger:`axis`},xAxis:[{type:`category`,boundaryGap:!1,data:o,axisTick:{show:!1},axisLine:{show:!0,onZero:!0,lineStyle:{color:`var(--gray-50)`,type:`solid`,width:1.4}},axisLabel:{interval:0,formatter:(t,n)=>{let r=`img_${n}`;return e[r]?`{valueStyle|${t}}\n{${r}|}`:`{valueStyle|${t}}`},rich:e}}],yAxis:[{type:`value`,splitLine:{show:!1},axisLine:{show:!1}}],series:a};i.current.setOption(t);let n=new ResizeObserver(()=>{i.current?.resize()});return n.observe(r.current),()=>{n.disconnect(),i.current?.dispose(),i.current=null}},[a,o,c]),(0,l.jsxs)(`div`,{className:`line-chart-ctn`,children:[(0,l.jsx)(`div`,{ref:r,className:`bars-line-chart`,style:{width:`100%`}}),(()=>{if(!n)return null;let e=s.map(({key:e,color:t,image:n},r)=>(0,l.jsxs)(`div`,{className:`line-chart-label`,children:[n?(0,l.jsx)(`img`,{src:n,alt:`label-image`,className:`line-chart-label-img`}):null,(0,l.jsxs)(`div`,{className:`line-chart-label-content`,children:[(0,l.jsx)(DB,{color:t}),(0,l.jsx)(`p`,{className:`line-chart-label-text`,children:e})]})]},`line-chart-label-${e}-${t}-${r}`));return(0,l.jsx)(`div`,{className:`line-chart-labels`,children:e})})()]})},PB=({data:e={},type:t})=>{let{data:n={},metadata:{title:r=``,description:i=``,source:a=``,image:o=void 0,articleUrl:s=``}={},visualization:c={},visualization:{settings:{showChart:u=!0,showDescription:d=!0,showImage:f=!0,showLegend:p=!0,showSource:m=!0,showTitle:h=!0}={}}={}}=e||{},_=t===`only-graph`,v=!_,y=!_&&f;return(0,l.jsxs)(`div`,{className:`line-chart`,children:[(0,l.jsx)(g,{title:r,showTitle:h,subtitle:i,showSubtitle:d,url:s,showShare:v}),u?(0,l.jsx)(NB,{data:n,visualization:c,showLegend:p}):null,(0,l.jsx)(pz,{showLogo:y,logoSrc:o,source:a,showSource:m})]})},FB=({visualization:e,data:t})=>{let{bindings:{y:n=[]}={}}=e||{},{columns:r=[]}=t||{};return r.map((e,t)=>n.includes(e)?t:null).filter(e=>e).map(e=>e?r[e]:null).filter(e=>e!==null)},IB=({visualization:e,data:t})=>{let{bindings:{x:n=``}={}}=e||{},{columns:r=[],rows:i=[]}=t||{},a=r.map((e,t)=>n===e?t:null).filter(e=>e!==null)[0]??null;return i.map(e=>a===null?null:e[a]).filter(e=>e!==null)},LB=({visualization:e={},data:t={}})=>{let{bindings:{y:n=[]}={},series:r=[]}=e||{},{columns:i=[],rows:a=[]}=t||{},o=i.map((e,t)=>n.includes(e)?t:null).filter(e=>e),s=r.some(({key:e})=>a.some(t=>t.includes(e)))||!1,c=r.some(({key:e})=>i.includes(e))||!1,l=n.map((e,t)=>{let n=o[t]||null;return{name:e,data:a.map(e=>n&&Number(e[n])?Number(e[n]):null).filter(e=>e!==null),type:`bar`,stack:t+1,itemStyle:{borderRadius:[16,16,0,0]},emphasis:{focus:`series`,itemStyle:{shadowBlur:8,shadowColor:`rgba(0,0,0,0.25)`}},showBackground:!0,backgroundStyle:{color:`rgba(175, 175, 175, 0.1)`,borderRadius:[16,16,0,0]}}}),u=IB({visualization:e,data:t}),d=FB({visualization:e,data:t});return l.map(e=>{let{stack:t=0,data:n=[]}=e||{},i=n.map((e,t)=>{let n=u[t];return{value:e,itemStyle:{color:r.find(({key:e})=>e===n)?.color||`var(--orange-90)`}}}),a=s?i:n,o=d[t-1],l=r.find(({key:e})=>e===o)?.color||`var(--orange-90)`,f=c?l:null;return{...e,color:f,data:a,emphasis:{...e.emphasis,itemStyle:{...e.emphasis.itemStyle,color:f}}}})},RB=({xData:e=[],series:t=[]})=>{let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t.find(({key:e})=>e===i)||{};a?.image&&a.key?n[r]={key:i,image:a.image}:n[r]={}}return n};dD([HA,yP,VN,FI,pR]);var zB=({visualization:e={},data:t={},showLegend:n=!0})=>{let r=(0,u.useRef)(null),i=(0,u.useRef)(null),a=LB({visualization:e,data:t}),o=IB({visualization:e,data:t}),{series:s=[]}=e||{},c=RB({xData:o,series:s});return(0,u.useEffect)(()=>{if(!r.current)return;i.current||=HC(r.current,void 0,{renderer:`svg`});let e=[...a],t={valueStyle:{color:`#333`,align:`center`,padding:[0,0,6,0]}};c.forEach(({image:e},n)=>{e&&(t[`img_${n}`]={height:24,width:24,align:`center`,backgroundColor:{image:e}})});let n={grid:{left:`0%`,right:`0%`,top:`0%`,bottom:`0%`,containLabel:!0},tooltip:{trigger:`axis`},xAxis:{type:`category`,data:o,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{interval:0,formatter:(e,n)=>{let r=`img_${n}`;return t[r]?`{valueStyle|${e}}\n{${r}|}`:`{valueStyle|${e}}`},rich:t}},yAxis:{type:`value`,splitLine:{lineStyle:{color:`#d5d5d566`}}},series:e};i.current.setOption(n);let s=new ResizeObserver(()=>{i.current?.resize()});return s.observe(r.current),()=>{s.disconnect(),i.current?.dispose(),i.current=null}},[a,o,c]),(0,l.jsxs)(`div`,{className:`vertical-bar-chart-ctn`,children:[(0,l.jsx)(`div`,{ref:r,className:`bars-vertical-bar-chart`,style:{width:`100%`}}),(()=>{if(!n||!s.length)return null;let e=s.map(({key:e,color:t},n)=>(0,l.jsxs)(`div`,{className:`vertical-bar-chart-label`,children:[(0,l.jsx)(`div`,{className:`vertical-bar-chart-label-icon`,style:{background:t||``}}),(0,l.jsx)(`p`,{className:`vertical-bar-chart-label-text`,children:e})]},`vertical-bar-chart-label-${e}-${t}-${n}`));return(0,l.jsx)(`div`,{className:`vertical-bar-chart-labels`,children:e})})()]})},BB=({data:e={},type:t=``})=>{let{data:n={},metadata:{title:r=``,description:i=``,source:a=``,image:o=void 0,articleUrl:s=``}={},visualization:c={},visualization:{settings:{showChart:u=!0,showDescription:d=!0,showImage:f=!0,showLegend:p=!0,showSource:m=!0,showTitle:h=!0}={}}={}}=e||{},_=t===`only-graph`,v=!_,y=!_&&f;return(0,l.jsxs)(`div`,{className:`vertical-bar-chart`,children:[(0,l.jsx)(g,{title:r,showTitle:h,subtitle:i,showSubtitle:d,url:s,showShare:v}),u?(0,l.jsx)(zB,{data:n,visualization:c,showLegend:p}):null,(0,l.jsx)(pz,{showLogo:y,logoSrc:o,source:a,showSource:m})]})};exports.HorizontalBarChart=mz,exports.Line=PB,exports.Title=g,exports.VerticalBar=BB;
50
+ `}),t}catch(e){return console.log(`[HorizontalBarChart] Error al formatear el tooltip:`,e),``}},WR=`#EFEFEF`,GR=`#3B3B3B`,KR=`#B9B9B9`,qR=.25,JR=e=>(t,n)=>e===null||n===e?GR:KR,YR=(e=0)=>{try{let t=(Number(e)||0)+1;return Array.from({length:t},(e,n)=>n===0||n===t-1?`transparent`:WR)}catch(e){return console.log(`[HorizontalBarChart] Error al calcular las líneas del grid:`,e),[WR]}},XR={backgroundColor:`#FFF`,grid:{bottom:`5%`,containLabel:!0,left:`2%`,right:`2%`,top:`5%`},textStyle:{color:`#3B3B3B`,fontFamily:`Roboto, sans-serif`,fontSize:14},tooltip:{backgroundColor:`#FFFFFF`,borderColor:`#E2E2E2`,borderRadius:8,borderWidth:1,extraCssText:`box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.08);`,formatter:UR,padding:[12,16],show:!0,textStyle:{color:`#3B3B3B`,fontFamily:`Roboto, sans-serif`,fontSize:16},trigger:`axis`},xAxis:[{axisLabel:{fontSize:14},axisLine:{show:!1},axisTick:{show:!1},splitLine:{show:!1},tooltip:{show:!1},type:`value`}],yAxis:[{axisLabel:{fontSize:14,interval:0},axisLine:{lineStyle:{color:`#D3D3D3`,type:`solid`,width:2},onZero:!0,show:!0},axisTick:{show:!1},splitLine:{lineStyle:{color:WR,type:`solid`,width:1},show:!0},type:`category`,z:10}]},ZR=[`negativa`],QR={categories:[],hasImages:!1,images:[],series:[]},$R=e=>{try{let t=Number(e);return Number.isFinite(t)?t:0}catch(t){return console.log(`[HorizontalBarChart] Valor no numérico:`,e,t),0}},ez=e=>{try{return String(e??``).trim().toLowerCase()}catch(t){return console.log(`[HorizontalBarChart] Valor no convertible a texto:`,e,t),``}},tz=e=>ZR.includes(ez(e)),nz=(e={})=>{let{category:t,x:n,y:r}=e||{};return ez([t,r,n].find(e=>typeof e==`string`&&e.length>0))},rz=(e={},t=[],n=``)=>{let{values:r,x:i}=e||{};return([r,i].find(e=>Array.isArray(e)&&e.length>0)??t.filter(e=>ez(e)!==n)).map(e=>String(e))},iz=(e,t)=>e.findIndex(e=>ez(e)===ez(t)),az=(e,t)=>e.find(e=>ez(e.key)===ez(t)),oz=(e,t)=>az(e,t)?.color??``,sz=(e,t)=>az(e,t)?.image??``,cz=(e,t)=>({barGap:`0%`,barWidth:22,data:t,label:{show:!1},name:e,type:`bar`}),lz=(e,t)=>e.map(e=>({...e,data:e.data.map((e,n)=>({...e,itemStyle:{...e.itemStyle,opacity:t===null||t===n?1:qR}}))})),uz=(e={},t={})=>{let{columns:n=[],rows:r=[]}=e||{},{bindings:i={},series:a=[]}=t||{};if(!n.length||!r.length||!a.length)return QR;let o=nz(i),s=n.findIndex(e=>ez(e)===o);if(s<0)return QR;let c=r.map(e=>String(e?.[s]??``)),l=rz(i,n,o),u=a.some(({key:e})=>iz(n,e)>=0),d=l.map(e=>{let t=iz(n,e);if(t<0)return null;let i=tz(e)?-1:1,o=oz(a,e);return cz(e,r.map((e,n)=>{let r=u?o:oz(a,c[n]);return{itemStyle:{...RR,color:r},value:$R(e?.[t])*i}}))}).filter(e=>e!==null),f=c.map(e=>sz(a,e));return{categories:c,hasImages:f.some(Boolean),images:f,series:d}},dz=({series:e=[],showLegend:t=!0})=>{let n=(0,u.useRef)(null),r=(0,u.useRef)({isDragging:!1,startScroll:0,startX:0});if(!t||!e.length||!Array.isArray(e))return null;let i=e=>{let t=n.current;!t||e.pointerType===`touch`||(e.preventDefault(),r.current={isDragging:!0,startScroll:t.scrollLeft,startX:e.clientX},t.setPointerCapture(e.pointerId))},a=e=>{let t=n.current;if(!(!t||!r.current.isDragging))try{let{startScroll:n,startX:i}=r.current;t.scrollLeft=n-(e.clientX-i)}catch(e){console.log(`[HorizontalBarChart] Error al arrastrar la leyenda:`,e)}},o=e=>{let t=n.current;r.current.isDragging=!1,t?.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId)};return(0,l.jsx)(`div`,{className:`horizontal-bar-chart-legend`,children:(0,l.jsx)(`div`,{className:`horizontal-bar-chart-labels`,onPointerCancel:o,onPointerDown:i,onPointerMove:a,onPointerUp:o,ref:n,children:e.map(({key:e,color:t},n)=>(0,l.jsxs)(`div`,{className:`horizontal-bar-chart-label`,children:[(0,l.jsx)(`div`,{className:`horizontal-bar-chart-label-icon`,style:{background:t||``}}),(0,l.jsx)(`p`,{className:`horizontal-bar-chart-label-text`,children:e})]},`horizontal-bar-chart-label-${e}-${t}-${n}`))})})};dD([yP,HA,iF,FI,LR]);var fz=({data:e={},showLegend:t=!0,visualization:n={}})=>{let{series:r=[]}=n||{},i=(0,u.useRef)(null),a=(0,u.useRef)(null),o=(0,u.useMemo)(()=>uz(e,n),[e,n]),s=(0,u.useMemo)(()=>HR(o.categories.length,o.series.length,o.hasImages),[o.categories.length,o.series.length,o.hasImages]);return(0,u.useEffect)(()=>{if(!i.current)return;a.current||=HC(i.current,void 0,{renderer:`svg`});let e=XR.yAxis[0],t=t=>[{...e,axisLabel:{...e.axisLabel,color:JR(t),formatter:BR(o.images),rich:zR(o.images)},data:o.categories,splitLine:{...e.splitLine,lineStyle:{...e.splitLine.lineStyle,color:YR(o.categories.length)}}}],n={...XR,yAxis:t(null),series:o.series};a.current.setOption(n,!0);let r=e=>{a.current?.setOption({series:lz(o.series,e),yAxis:t(e)})},s=(...e)=>{try{let{axesInfo:t}=e[0]??{},n=Number(t?.[0]?.value);r(Number.isInteger(n)?n:null)}catch(e){console.log(`[HorizontalBarChart] Error al resaltar la fila:`,e)}},c=()=>r(null);a.current.on(`updateAxisPointer`,s),a.current.on(`globalout`,c);let l=new ResizeObserver(()=>{a.current?.resize()});return l.observe(i.current),()=>{l.disconnect(),a.current?.off(`updateAxisPointer`,s),a.current?.off(`globalout`,c),a.current?.dispose(),a.current=null}},[o]),(0,l.jsxs)(`div`,{className:`horizontal-bar-chart-ctn`,children:[(0,l.jsx)(`div`,{ref:i,className:`horizontal-bar-chart-ref`,style:s}),(0,l.jsx)(dz,{series:r,showLegend:t})]})},pz=({source:e=``,showSource:t=!0,showLogo:n=!0,logoSrc:r=``})=>!t&&!n?null:(0,l.jsxs)(`div`,{className:`ibc-footer`,children:[!t||!e?null:(0,l.jsxs)(`p`,{className:`ibc-footer-font`,children:[`Fuente: `,(0,l.jsx)(`span`,{children:e})]}),!n||!r?null:(0,l.jsx)(`img`,{className:`ibc-footer-logo`,src:r||`https://www.infobae.com/assets/images/logos/logo_infobae_naranja.svg`,alt:`Infobae`})]}),mz=({data:e={},type:t=``})=>{let{metadata:{description:n=``,image:r=f,source:i=``,title:a=``,articleUrl:o=``}={},data:s={},visualization:c={},visualization:{settings:{showChart:u=!0,showDescription:d=!0,showImage:p=!0,showLegend:m=!0,showSource:h=!0,showTitle:_=!0}={}}={}}=e||{},v=t===`only-graph`,y=!v&&p;return(0,l.jsxs)(`div`,{className:`horizontal-bar-chart`,children:[(0,l.jsx)(g,{showShare:!v,showSubtitle:d,showTitle:_,subtitle:n,title:a,url:o}),u?(0,l.jsx)(fz,{data:s,visualization:c,showLegend:m}):null,!h||!i?null:(0,l.jsx)(pz,{logoSrc:r,showLogo:y,showSource:h,source:i})]})},hz=Wl.CMD;function gz(e,t){return Math.abs(e-t)<1e-5}function _z(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){gz(e,n)&&gz(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,(_===hz.L||_===hz.C||_===hz.Q)&&(i=[s,c])),_){case hz.M:a=s=t[g++],o=c=t[g++],l(s,c);break;case hz.L:f=t[g++],p=t[g++],u(a,o,f,p),a=f,o=p;break;case hz.C:i.push(t[g++],t[g++],t[g++],t[g++],a=t[g++],o=t[g++]);break;case hz.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 hz.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 hz.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 hz.Z:i&&u(a,o,s,c),a=s,o=c}}return i&&i.length>2&&r.push(i),r}function vz(e,t,n,r,i,a,o,s,c,l){if(gz(e,n)&&gz(t,r)&&gz(i,o)&&gz(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=[];pr(e,n,i,o,.5,T),pr(t,r,a,s,.5,E),vz(T[0],E[0],T[1],E[1],T[2],E[2],T[3],E[3],c,l),vz(T[4],E[4],T[5],E[5],T[6],E[6],T[7],E[7],c,l)}function yz(e,t){var n=_z(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++];vz(s,c,u,d,f,p,m,h,o,t),s=m,c=h}r.push(o)}return r}function bz(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 xz(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=bz([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 Sz(e,t,n){for(var r=e.width,i=e.height,a=r>i,o=bz([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 Cz(e,t,n,r){return e*r-n*t}function wz(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=Cz(u,d,c,l);if(Math.abs(f)<1e-6)return null;var p=Cz(e-i,t-a,u,d)/f;return p<0||p>1?null:new $t(p*c+e,p*l+t)}function Tz(e,t,n){var r=new $t;$t.sub(r,n,t),r.normalize();var i=new $t;return $t.sub(i,e,t),i.dot(r)}function Ez(e,t){var n=e[e.length-1];n&&n[0]===t[0]&&n[1]===t[1]||e.push(t)}function Dz(e,t,n){for(var r=e.length,i=[],a=0;a<r;a++){var o=e[a],s=e[(a+1)%r],c=wz(o[0],o[1],s[0],s[1],t.x,t.y,n.x,n.y);c&&i.push({projPt:Tz(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++)Ez(m,e[a].slice());Ez(m,p),Ez(m,f);for(var a=u.idx+1;a<=l.idx+r;a++)Ez(h,e[a%r].slice());return Ez(h,f),Ez(h,p),[{points:m},{points:h}]}function Oz(e){var t=e.points,n=[],r=[];yl(t,n,r);var i=new q(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 $t,u=new $t;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),Dz(t,l,u)}function kz(e,t,n,r){if(n===1)r.push(t);else{var i=Math.floor(n/2),a=e(t);kz(e,a[0],i,r),kz(e,a[1],n-i,r)}return r}function Az(e,t){for(var n=[],r=0;r<t;r++)n.push(Ff(e));return n}function jz(e,t){t.setStyle(e.style),t.z=e.z,t.z2=e.z2,t.zlevel=e.zlevel}function Mz(e){for(var t=[],n=0;n<e.length;)t.push([e[n++],e[n++]]);return t}function Nz(e,t){var n=[],r=e.shape,i;switch(e.type){case`rect`:Sz(r,t,n),i=Ou;break;case`sector`:xz(r,t,n),i=np;break;case`circle`:xz({r0:0,r:r.r,startAngle:0,endAngle:Math.PI*2,cx:r.cx,cy:r.cy},t,n),i=np;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(yz(e.getUpdatedPathProxy(),o),function(e){return Mz(e)}),c=s.length;if(c===0)kz(Oz,{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=[];yl(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||(kz(Oz,{points:p.poly},m,n),f-=m)}}i=cp}if(!i)return Az(e,t);for(var h=[],l=0;l<n.length;l++){var g=new i;g.setShape(n[l]),jz(e,g),h.push(g)}return h}function Pz(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;pr(m,g,v,b,w,i),pr(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 Fz(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 Iz(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=Pz(c,l),u=n[0],d=n[1],r=u,i=d):(d=Fz(i||c,c),u=c):(u=Fz(r||l,l),d=l),a.push(u),o.push(d)}return[a,o]}function Lz(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 Rz(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 zz(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 Bz(e,t,n,r){for(var i=[],a,o=0;o<e.length;o++){var s=e[o],c=t[o],l=Lz(s),u=Lz(c);a??=l[2]<0!=u[2]<0;var d=[],f=[],p=0,m=1/0,h=[],g=s.length;a&&(s=zz(s));for(var _=Rz(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 Vz(e){return e.__isCombineMorphing}var Hz=`__mOriginal_`;function Uz(e,t,n){var r=Hz+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 Wz(e,t){var n=Hz+t;e[n]&&(e[t]=e[n],e[n]=null)}function Gz(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 Kz(e,t){var n=e.getUpdatedPathProxy(),r=t.getUpdatedPathProxy(),i=Iz(_z(n),_z(r)),a=i[0],o=i[1],s=e.getComputedTransform(),c=t.getComputedTransform();function l(){this.transform=null}s&&Gz(a,s),c&&Gz(o,c),Uz(t,`updateTransform`,{replace:l}),t.transform=null;var u=Bz(a,o,10,Math.PI),d=[];Uz(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);lt(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 qz(e,t,n){if(!e||!t)return t;var r=n.done,i=n.during;Kz(e,t),t.__morphT=0;function a(){Wz(t,`buildPath`),Wz(t,`updateTransform`),t.__morphT=-1,t.createPathProxy(),t.dirtyShape()}return t.animateTo({__morphT:1},F({during:function(e){t.dirtyShape(),i&&i(e)},done:function(){a(),r&&r()}},n)),t}function Jz(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 Yz(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:Jz(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 Xz(e){return Nz(e.path,e.count)}function Zz(){return{fromIndividuals:[],toIndividuals:[],count:0}}function Qz(e,t,n){var r=[];function i(e){for(var t=0;t<e.length;t++){var n=e[t];Vz(n)?i(n.childrenRef()):n instanceof Y&&r.push(n)}}i(e);var a=r.length;if(!a)return Zz();var o=(n.dividePath||Xz)({path:t,count:a});if(o.length!==a)return console.error(`Invalid morphing: unmatched splitted path`),Zz();r=Yz(r),o=Yz(o);for(var s=n.done,c=n.during,l=n.individualDelay,u=new Sa,d=0;d<a;d++){var f=r[d],p=o[d];p.parent=t,p.copyTransform(u),l||Kz(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)}Uz(t,`addSelfToZr`,{after:function(e){m(e)}}),Uz(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,Wz(t,`addSelfToZr`),Wz(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?F({delay:(n.delay||0)+l(d,g,r[d],o[d]),done:v},n):n;qz(r[d],o[d],y)}else t.__morphT=0,t.animateTo({__morphT:1},F({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++)Wz(e[t],`updateTransform`);s&&s()}},n));return t.__zr&&m(t.__zr),{fromIndividuals:r,toIndividuals:o,count:g}}function $z(e,t,n){var r=t.length,i=[],a=n.dividePath||Xz;function o(e){for(var t=0;t<e.length;t++){var n=e[t];Vz(n)?o(n.childrenRef()):n instanceof Y&&i.push(n)}}if(Vz(e)){o(e.childrenRef());var s=i.length;if(s<r)for(var c=0,l=s;l<r;l++)i.push(Ff(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`),Zz()}i=Yz(i),t=Yz(t);for(var d=n.individualDelay,l=0;l<r;l++){var f=d?F({delay:(n.delay||0)+d(l,r,i[l],t[l])},n):n;qz(i[l],t[l],f)}return{fromIndividuals:i,toIndividuals:t,count:t.length}}function eB(e){return B(e[0])}function tB(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 nB={clone:function(e){for(var t=[],n=1-(1-e.path.style.opacity)**(1/e.count),r=0;r<e.count;r++){var i=Ff(e.path);i.setStyle(`opacity`,n),t.push(i)}return t},split:null};function rB(e,t,n,r,i,a){if(!e.length||!t.length)return;var o=Ip(`update`,r,i);if(!(o&&o.duration>0))return;var s=r.getModel(`universalTransition`).get(`delay`),c=P({setToFinal:!0},o),l,u;eB(e)&&(l=e,u=t),eB(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(Vz(f))d({many:[f],one:p},!0,r,i,!0);else{var m=s?F({delay:s(r,i)},c):c;qz(f,p,m),a(f,p,f,p,m)}}else for(var h=F({dividePath:nB[n],individualDelay:s&&function(e,t,n,a){return s(e+r,i)}},c),g=t?Qz(l,u,h):$z(u,l,h),_=g.fromIndividuals,v=g.toIndividuals,y=_.length,b=0;b<y;b++){var m=s?F({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?tB(u,l):tB(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 iB(e){if(!e)return[];if(B(e)){for(var t=[],n=0;n<e.length;n++)t.push(iB(e[n]));return t}var r=[];return e.traverse(function(e){e instanceof Y&&!e.disableMorphing&&!e.invisible&&!e.ignore&&r.push(e)}),r}var aB=1e4,oB=0,sB=1,cB=2,lB=Ls();function uB(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 dB(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 fB(e,t,n,r){var i=uB(e,r?`itemChildGroupId`:`itemGroupId`);if(i)return dB(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 pB(e){var t=[];return L(e,function(e){var n=e.data,r=e.dataGroupId;if(n.count()>aB){process.env.NODE_ENV!==`production`&&as(`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:fB(n,a,r,!1),childGroupId:fB(n,a,r,!0),divide:e.divide,dataIndex:a})}),t}function mB(e,t,n){e.traverse(function(e){e instanceof Y&&zp(e,{style:{opacity:0}},t,{dataIndex:n,isFrom:!0})})}function hB(e){if(e.parent){var t=e.getComputedTransform();e.setLocalTransform(t),e.parent.remove(e)}}function gB(e){e.stopAnimation(),e.isGroup&&e.traverse(function(e){e.stopAnimation()})}function _B(e,t,n){var r=Ip(`update`,n,t);r&&e.traverse(function(e){if(e instanceof sl){var t=Gp(e);t&&e.animateFrom({style:t},r)}})}function vB(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 yB(e,t,n){var r=pB(e),i=pB(t);function a(e,t,n,r,i){(n||e)&&t.animateFrom({style:n&&n!==e?P(P({},n.style),e.style):e.style},i)}var o=!1,s=oB,c=K(),l=K();L(r,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=sB;break}var f=i[u].childGroupId;if(f&&c.get(f)){s=cB;break}}function p(e,t){return function(n){var r=n.data,i=n.dataIndex;return t?r.getId(i):e?s===sB?n.childGroupId:n.groupId:s===cB?n.childGroupId:n.groupId}}var m=vB(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&&_B(u,s.dataIndex,c);return}l&&h[l.id]||u&&(gB(u),l?(gB(l),hB(l),o=!0,rB(iB(l),iB(u),s.divide,c,e,a)):mB(u,c,e))}new cw(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=_e(R(t,function(e){return r[e].data.getItemGraphicEl(r[e].dataIndex)}),function(e){return e&&e!==l&&!h[e.id]});l&&(gB(l),u.length?(L(u,function(e){gB(e),hB(e)}),o=!0,rB(iB(u),iB(l),n.divide,c,e,a)):mB(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=_e(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 gB(e)}),s?(gB(s),hB(s),o=!0,rB(iB(s),iB(c),n.divide,l,e[0],a)):L(c,function(t){return mB(t,l,e[0])}))}}).updateManyToMany(function(e,t){new cw(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=Ip(`update`,t,0);r&&t.isAnimationEnabled()&&i&&i.duration>0&&r.group.traverse(function(e){e instanceof Y&&!e.animators.length&&e.animateFrom({style:{opacity:0}},i)})})}function bB(e){return e.getModel(`universalTransition`).get(`seriesKey`)||e.id}function xB(e){return B(e)?e.sort().join(`,`):e}function SB(e){if(e.hostModel)return e.hostModel.getModel(`universalTransition`).get(`divideShape`)}function CB(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=bB(t),c=xB(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)&&as(`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=bB(e),c=xB(s),l=r.get(c);if(l)process.env.NODE_ENV!==`production`&&a(c),n.set(c,{oldSeries:[{dataGroupId:l.dataGroupId,divide:SB(l.data),data:l.data}],newSeries:[{dataGroupId:t,divide:SB(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:SB(t.data),data:t.data})}),u.length&&n.set(c,{oldSeries:u,newSeries:[{dataGroupId:t,data:o,divide:SB(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:SB(d.data)}],newSeries:[]},n.set(d.key,f)),f.newSeries.push({dataGroupId:t,data:o,divide:SB(o)})}}}}),n}function wB(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 TB(e,t,n,r){var i=[],a=[];L(ms(e.from),function(e){var n=wB(t.oldSeries,e);n>=0&&i.push({dataGroupId:t.oldDataGroupIds[n],data:t.oldData[n],divide:SB(t.oldData[n]),groupIdDim:e.dimension})}),L(ms(e.to),function(e){var r=wB(n.updatedSeries,e);if(r>=0){var i=n.updatedSeries[r].getData();a.push({dataGroupId:t.oldDataGroupIds[r],data:i,divide:SB(i),groupIdDim:e.dimension})}}),i.length>0&&a.length>0&&yB(i,a,r)}function EB(e){e.registerUpdateLifecycle(`series:beforeupdate`,function(e,t,n){L(ms(n.seriesTransition),function(e){L(ms(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][$y]=!0)})})}),e.registerUpdateLifecycle(`series:transition`,function(e,t,n){var r=lB(t);if(r.oldSeries&&n.updatedSeries&&n.optionChanged){var i=n.seriesTransition;if(i)L(ms(i),function(e){TB(e,r,n,t)});else{var a=CB(r,n);L(a.keys(),function(e){var n=a.get(e);yB(n.oldSeries,n.newSeries,t)})}L(n.updatedSeries,function(e){e.__universalTransitionEnabled&&(e[$y]=!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()<aB&&(s.push(o[u]),c.push(o[u].get(`dataGroupId`)),l.push(d))}})}var DB=({color:e=`#d85040`,width:t=27,height:n=10})=>(0,l.jsxs)(`svg`,{width:t,height:n,viewBox:`0 0 ${t} ${n}`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,l.jsx)(`path`,{d:`M1.2998 4.75H25.2998`,stroke:e,strokeWidth:2.6,strokeLinecap:`round`}),(0,l.jsx)(`path`,{d:`M13.2998 8.75C15.5089 8.75 17.2998 6.95914 17.2998 4.75C17.2998 2.54086 15.5089 0.75 13.2998 0.75C11.0907 0.75 9.2998 2.54086 9.2998 4.75C9.2998 6.95914 11.0907 8.75 13.2998 8.75Z`,fill:`var(--bg)`,stroke:e,strokeWidth:1.5})]}),OB=({hex:e=``,alpha:t=1})=>{if(!e)return``;let n=e.replace(`#`,``);if(n.length===3&&(n=n.split(``).map(e=>e+e).join(``)),!/^[A-Fa-f0-9]{6}$/.test(n))return``;let r=n.match(/.{1,2}/g);if(!r)return``;let[i,a,o]=r.map(e=>parseInt(e,16));return`rgba(${i},${a},${o},${t})`},kB=({visualization:e,data:t})=>{let{bindings:{y:n=[]}={}}=e||{},{columns:r=[]}=t||{};return r.map((e,t)=>n.includes(e)?t:null).filter(e=>e).map(e=>e?r[e]:null).filter(e=>e!==null)},AB=({visualization:e,data:t})=>{let{bindings:{x:n=``}={}}=e||{},{columns:r=[],rows:i=[]}=t||{},a=r.map((e,t)=>n===e?t:null).filter(e=>e!==null)[0]??null;return i.map(e=>a===null?null:e[a]).filter(e=>e!==null)},jB=({visualization:e={},data:t={}})=>{let{bindings:{y:n=[]}={},series:r=[]}=e||{},{columns:i=[],rows:a=[]}=t||{},o=i.map((e,t)=>n.includes(e)?t:null).filter(e=>e!==null),s=r.some(({key:e})=>i.includes(e))||!1,c=n.map((e,t)=>{let n=o[t]??null;return{name:e,data:a.map(e=>n!==null&&Number(e[n])?Number(e[n]):null).filter(e=>e!==null),type:`line`,smooth:!0,stack:String(t+1),lineStyle:{width:1},showSymbol:!0,symbol:`circle`,symbolSize:10,itemStyle:{color:`var(--bg)`,borderWidth:1.8},areaStyle:{origin:`start`},emphasis:{focus:`series`,scale:1.3,itemStyle:{color:`var(--bg)`,borderWidth:1.8,shadowBlur:6,shadowColor:`rgba(216, 80, 64, 0.4)`}}}}),l=kB({visualization:e,data:t});return c.map(e=>{let t=e.stack?Number(e.stack):0,n=l[t-1],i=r.find(({key:e})=>e===n)?.color||`var(--orange-90)`,a=s?i:void 0;return console.log(a),{...e,emphasis:{...e.emphasis,itemStyle:{...e.emphasis?.itemStyle,borderColor:a}},lineStyle:{...e.lineStyle,color:a},itemStyle:{...e.itemStyle,borderColor:a},areaStyle:{...e.areaStyle,color:a?new Sp(0,0,0,1,[{offset:0,color:OB({hex:a,alpha:.1})},{offset:1,color:OB({hex:a,alpha:0})}]):void 0}}})},MB=({xData:e=[],series:t=[]})=>{let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t.find(({key:e})=>e===i)||{};a?.image&&a.key?n[r]={key:i,image:a.image}:n[r]={}}return n};dD([SP,yP,HA,UF,pR,EB]);var NB=({visualization:e={},data:t={},showLegend:n=!0})=>{let r=(0,u.useRef)(null),i=(0,u.useRef)(null),a=jB({visualization:e,data:t}),o=AB({visualization:e,data:t}),{series:s=[]}=e||{},c=MB({xData:o,series:s});return(0,u.useEffect)(()=>{if(!r.current)return;i.current||=HC(r.current,void 0,{renderer:`svg`});let e={valueStyle:{color:`#333`,align:`center`,padding:[0,0,6,0]}};c.forEach(({image:t},n)=>{t&&(e[`img_${n}`]={height:24,width:24,align:`center`,backgroundColor:{image:t}})});let t={grid:{bottom:`0%`,containLabel:!0,left:`0%`,right:`0%`,top:`0%`},tooltip:{trigger:`axis`},xAxis:[{type:`category`,boundaryGap:!1,data:o,axisTick:{show:!1},axisLine:{show:!0,onZero:!0,lineStyle:{color:`var(--gray-50)`,type:`solid`,width:1.4}},axisLabel:{interval:0,formatter:(t,n)=>{let r=`img_${n}`;return e[r]?`{valueStyle|${t}}\n{${r}|}`:`{valueStyle|${t}}`},rich:e}}],yAxis:[{type:`value`,splitLine:{show:!1},axisLine:{show:!1}}],series:a};i.current.setOption(t);let n=new ResizeObserver(()=>{i.current?.resize()});return n.observe(r.current),()=>{n.disconnect(),i.current?.dispose(),i.current=null}},[a,o,c]),(0,l.jsxs)(`div`,{className:`line-chart-ctn`,children:[(0,l.jsx)(`div`,{ref:r,className:`bars-line-chart`,style:{width:`100%`}}),(()=>{if(!n)return null;let e=s.map(({key:e,color:t,image:n},r)=>(0,l.jsxs)(`div`,{className:`line-chart-label`,children:[n?(0,l.jsx)(`img`,{src:n,alt:`label-image`,className:`line-chart-label-img`}):null,(0,l.jsxs)(`div`,{className:`line-chart-label-content`,children:[(0,l.jsx)(DB,{color:t}),(0,l.jsx)(`p`,{className:`line-chart-label-text`,children:e})]})]},`line-chart-label-${e}-${t}-${r}`));return(0,l.jsx)(`div`,{className:`line-chart-labels`,children:e})})()]})},PB=({data:e={},type:t})=>{let{data:n={},metadata:{title:r=``,description:i=``,source:a=``,image:o=void 0,articleUrl:s=``}={},visualization:c={},visualization:{settings:{showChart:u=!0,showDescription:d=!0,showImage:f=!0,showLegend:p=!0,showSource:m=!0,showTitle:h=!0}={}}={}}=e||{},_=t===`only-graph`,v=!_,y=!_&&f;return(0,l.jsxs)(`div`,{className:`line-chart`,children:[(0,l.jsx)(g,{title:r,showTitle:h,subtitle:i,showSubtitle:d,url:s,showShare:v}),u?(0,l.jsx)(NB,{data:n,visualization:c,showLegend:p}):null,(0,l.jsx)(pz,{showLogo:y,logoSrc:o,source:a,showSource:m})]})},FB=({visualization:e,data:t})=>{let{bindings:{y:n=[]}={}}=e||{},{columns:r=[]}=t||{};return r.map((e,t)=>n.includes(e)?t:null).filter(e=>e).map(e=>e?r[e]:null).filter(e=>e!==null)},IB=({visualization:e,data:t})=>{let{bindings:{x:n=``}={}}=e||{},{columns:r=[],rows:i=[]}=t||{},a=r.map((e,t)=>n===e?t:null).filter(e=>e!==null)[0]??null;return i.map(e=>a===null?null:e[a]).filter(e=>e!==null)},LB=({visualization:e={},data:t={}})=>{let{bindings:{y:n=[]}={},series:r=[]}=e||{},{columns:i=[],rows:a=[]}=t||{},o=i.map((e,t)=>n.includes(e)?t:null).filter(e=>e),s=r.some(({key:e})=>a.some(t=>t.includes(e)))||!1,c=r.some(({key:e})=>i.includes(e))||!1,l=n.map((e,t)=>{let n=o[t]||null;return{name:e,data:a.map(e=>n&&Number(e[n])?Number(e[n]):null).filter(e=>e!==null),type:`bar`,stack:t+1,itemStyle:{borderRadius:[16,16,0,0]},emphasis:{focus:`series`,itemStyle:{shadowBlur:8,shadowColor:`rgba(0,0,0,0.25)`}},showBackground:!0,backgroundStyle:{color:`rgba(175, 175, 175, 0.1)`,borderRadius:[16,16,0,0]}}}),u=IB({visualization:e,data:t}),d=FB({visualization:e,data:t});return l.map(e=>{let{stack:t=0,data:n=[]}=e||{},i=n.map((e,t)=>{let n=u[t];return{value:e,itemStyle:{color:r.find(({key:e})=>e===n)?.color||`var(--orange-90)`}}}),a=s?i:n,o=d[t-1],l=r.find(({key:e})=>e===o)?.color||`var(--orange-90)`,f=c?l:null;return{...e,color:f,data:a,emphasis:{...e.emphasis,itemStyle:{...e.emphasis.itemStyle,color:f}}}})},RB=({xData:e=[],series:t=[]})=>{let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t.find(({key:e})=>e===i)||{};a?.image&&a.key?n[r]={key:i,image:a.image}:n[r]={}}return n};dD([HA,yP,VN,FI,pR]);var zB=({visualization:e={},data:t={},showLegend:n=!0})=>{let r=(0,u.useRef)(null),i=(0,u.useRef)(null),a=LB({visualization:e,data:t}),o=IB({visualization:e,data:t}),{series:s=[]}=e||{},c=RB({xData:o,series:s});return(0,u.useEffect)(()=>{if(!r.current)return;i.current||=HC(r.current,void 0,{renderer:`svg`});let e=[...a],t={valueStyle:{color:`#333`,align:`center`,padding:[0,0,6,0]}};c.forEach(({image:e},n)=>{e&&(t[`img_${n}`]={height:24,width:24,align:`center`,backgroundColor:{image:e}})});let n={grid:{left:`0%`,right:`0%`,top:`0%`,bottom:`0%`,containLabel:!0},tooltip:{trigger:`axis`},xAxis:{type:`category`,data:o,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{interval:0,formatter:(e,n)=>{let r=`img_${n}`;return t[r]?`{valueStyle|${e}}\n{${r}|}`:`{valueStyle|${e}}`},rich:t}},yAxis:{type:`value`,splitLine:{lineStyle:{color:`#d5d5d566`}}},series:e};i.current.setOption(n);let s=new ResizeObserver(()=>{i.current?.resize()});return s.observe(r.current),()=>{s.disconnect(),i.current?.dispose(),i.current=null}},[a,o,c]),(0,l.jsxs)(`div`,{className:`vertical-bar-chart-ctn`,children:[(0,l.jsx)(`div`,{ref:r,className:`bars-vertical-bar-chart`,style:{width:`100%`}}),(()=>{if(!n||!s.length)return null;let e=s.map(({key:e,color:t},n)=>(0,l.jsxs)(`div`,{className:`vertical-bar-chart-label`,children:[(0,l.jsx)(`div`,{className:`vertical-bar-chart-label-icon`,style:{background:t||``}}),(0,l.jsx)(`p`,{className:`vertical-bar-chart-label-text`,children:e})]},`vertical-bar-chart-label-${e}-${t}-${n}`));return(0,l.jsx)(`div`,{className:`vertical-bar-chart-labels`,children:e})})()]})},BB=({data:e={},type:t=``})=>{let{data:n={},metadata:{title:r=``,description:i=``,source:a=``,image:o=void 0,articleUrl:s=``}={},visualization:c={},visualization:{settings:{showChart:u=!0,showDescription:d=!0,showImage:f=!0,showLegend:p=!0,showSource:m=!0,showTitle:h=!0}={}}={}}=e||{},_=t===`only-graph`,v=!_,y=!_&&f;return(0,l.jsxs)(`div`,{className:`vertical-bar-chart`,children:[(0,l.jsx)(g,{title:r,showTitle:h,subtitle:i,showSubtitle:d,url:s,showShare:v}),u?(0,l.jsx)(zB,{data:n,visualization:c,showLegend:p}):null,(0,l.jsx)(pz,{showLogo:y,logoSrc:o,source:a,showSource:m})]})};exports.HorizontalBarChart=mz,exports.Line=PB,exports.Title=g,exports.VerticalBar=BB;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.ibc-title{box-sizing:border-box;border-bottom:1px solid var(--gray-50);width:100%;padding-bottom:26px}.ibc-title__row{flex-direction:column;justify-content:space-between;align-items:flex-start;gap:20px;display:flex}@media (width>=577px){.ibc-title__row{flex-direction:row}}.ibc-title__text{flex-direction:column;gap:19px;min-width:0;display:flex}.ibc-title__heading{color:var(--gray-100);font-family:Roboto;font-size:40px;font-style:normal;font-weight:700;line-height:normal}.ibc-title__subtitle{color:var(--gray-90);font-family:Roboto;font-size:26px;font-style:normal;font-weight:400;line-height:normal}.ibc-title__brand{flex-shrink:0;align-items:center;gap:10px;line-height:0;display:flex}.ibc-title__logo{width:auto;height:40px;display:block}.ibc-title__button{background:var(--bg);border:1px solid var(--gray-50);border-radius:100px;justify-content:center;align-items:center;width:48px;height:48px;display:flex;position:relative}@media (width>=577px){.ibc-title__button{width:32px;height:32px}.ibc-title__button svg{width:16px;height:16px}}.ibc-title__share-modal{background:var(--bg);border:1px solid var(--gray-50);z-index:2;border-radius:9px;flex-direction:column;gap:8px;padding:8px;display:flex;position:absolute;top:calc(100% + 8px);left:0;box-shadow:0 0 12px #0000004d}@media (width>=577px){.ibc-title__share-modal{left:auto;right:0}}.ibc-title__share-modal-button{color:var(--gray-90);background:0 0;border:none;gap:6px;padding:4px;font-size:14px;font-weight:300;line-height:150%;display:flex}.ibc-title__share-modal-icon{border:1px solid var(--gray-80);border-radius:100px;justify-content:center;align-items:center;width:22px;height:22px;padding:10px;display:flex}.horizontal-bar-chart{background:var(--gray-0);padding:16px}.horizontal-bar-chart-credits{background:var(--gray-0);justify-content:space-between;padding-top:24px;padding-bottom:36px;display:flex}.horizontal-bar-chart-ctn{flex-direction:column;padding-top:36px;display:flex}.horizontal-bar-chart-font{background:var(--gray-0);color:var(--gray-90);align-items:center;gap:8px;font-size:16px;font-weight:400;display:flex}.horizontal-bar-chart-font>span{font-weight:700}.horizontal-bar-chart-label{background:var(--bg);border:1px solid var(--gray-30);-webkit-user-select:none;user-select:none;border-radius:100px;align-items:center;gap:6px;width:max-content;padding:8px 16px;display:flex}.horizontal-bar-chart-label-icon{border-radius:100px;width:12px;height:12px}.horizontal-bar-chart-label-text{color:var(--gray-90);width:max-content;font-size:12px;font-weight:400}.horizontal-bar-chart-labels{scrollbar-width:none;touch-action:pan-x;-webkit-user-select:none;user-select:none;gap:8px;width:100%;padding-top:36px;padding-bottom:36px;display:flex;overflow-x:auto}.horizontal-bar-chart-labels::-webkit-scrollbar{display:none}.horizontal-bar-chart-legend{border-bottom:1px solid #c2c2c2;align-items:center;gap:8px;max-width:100%;display:flex}.horizontal-bar-chart-ref{border-radius:16px}@media screen and (width>=992px){.horizontal-bar-chart{padding:36px 20px}}.ibc-footer{border-top:1px solid var(--gray-50);flex-direction:column;justify-content:space-between;gap:48px;padding:24px 0 0;display:flex}@media (width>=577px){.ibc-footer{flex-direction:row;gap:12px}}.ibc-footer-font{color:var(--gray-90);font-size:16px;font-weight:400}.ibc-footer-font>span{font-weight:700}.ibc-footer-logo{object-fit:contain;max-width:90px;height:21px;max-height:21px}.line-chart{background:#fafafa;flex-direction:column;gap:36px;padding:36px 4px;display:flex}.line-chart-ctn{background:var(--bg);border-radius:16px;flex-direction:column;gap:36px;display:flex}.line-chart-labels{gap:16px;display:flex}.line-chart-label{align-items:center;gap:8px;display:flex}.line-chart-label-img{object-fit:cover;border-radius:100px;width:50px;height:50px}.line-chart-label-content{background:var(--gray-0);border:1px solid var(--gray-30);border-radius:50px;justify-content:center;align-items:center;gap:10px;padding:8px 16px;display:flex}.line-chart-label-text{color:var(--gray-90);font-size:12px;font-weight:400}.bars-line-chart{height:400px;padding:16px}.vertical-bar-chart{background:var(--gray-0);flex-direction:column;gap:36px;padding:36px 4px;display:flex}.vertical-bar-chart-ctn{background:var(--bg);border-radius:16px;flex-direction:column;gap:36px;display:flex}.vertical-bar-chart-labels{gap:8px;max-width:100%;display:flex;overflow-x:auto}.vertical-bar-chart-labels::-webkit-scrollbar{display:none}.vertical-bar-chart-label{background:var(--gray-0);border:1px solid var(--gray-30);border-radius:100px;align-items:center;gap:6px;width:max-content;padding:8px 16px;display:flex}.vertical-bar-chart-label-icon{border-radius:100px;width:12px;height:12px}.vertical-bar-chart-label-text{color:var(--gray-90);width:max-content;font-size:12px;font-weight:400}.bars-vertical-bar-chart{height:400px;padding:16px}/*$vite$:1*/`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();
1
+ (function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.ibc-title{box-sizing:border-box;border-bottom:1px solid var(--gray-50);width:100%;padding-bottom:26px}.ibc-title__row{flex-direction:column;justify-content:space-between;align-items:flex-start;gap:20px;display:flex}@media (width>=577px){.ibc-title__row{flex-direction:row}}.ibc-title__text{flex-direction:column;gap:19px;min-width:0;display:flex}.ibc-title__heading{color:var(--gray-100);font-family:Roboto;font-size:40px;font-style:normal;font-weight:700;line-height:normal}.ibc-title__subtitle{color:var(--gray-90);font-family:Roboto;font-size:26px;font-style:normal;font-weight:400;line-height:normal}.ibc-title__brand{flex-shrink:0;align-items:center;gap:10px;line-height:0;display:flex}.ibc-title__logo{width:auto;height:40px;display:block}.ibc-title__button{background:var(--bg);border:1px solid var(--gray-50);border-radius:100px;justify-content:center;align-items:center;width:48px;height:48px;display:flex;position:relative}@media (width>=577px){.ibc-title__button{width:32px;height:32px}.ibc-title__button svg{width:16px;height:16px}}.ibc-title__share-modal{background:var(--bg);border:1px solid var(--gray-50);z-index:2;border-radius:9px;flex-direction:column;gap:8px;padding:8px;display:flex;position:absolute;top:calc(100% + 8px);left:0;box-shadow:0 0 12px #0000004d}@media (width>=577px){.ibc-title__share-modal{left:auto;right:0}}.ibc-title__share-modal-button{color:var(--gray-90);background:0 0;border:none;gap:6px;padding:4px;font-size:14px;font-weight:300;line-height:150%;display:flex}.ibc-title__share-modal-icon{border:1px solid var(--gray-80);border-radius:100px;justify-content:center;align-items:center;width:22px;height:22px;padding:10px;display:flex}.horizontal-bar-chart{background:var(--gray-0);padding:16px}.horizontal-bar-chart-credits{background:var(--gray-0);justify-content:space-between;padding-top:24px;padding-bottom:36px;display:flex}.horizontal-bar-chart-ctn{flex-direction:column;padding-top:36px;display:flex}.horizontal-bar-chart-font{background:var(--gray-0);color:var(--gray-90);align-items:center;gap:8px;font-size:16px;font-weight:400;display:flex}.horizontal-bar-chart-font>span{font-weight:700}.horizontal-bar-chart-label{background:var(--bg);border:1px solid var(--gray-30);-webkit-user-select:none;user-select:none;border-radius:100px;align-items:center;gap:6px;width:max-content;padding:8px 16px;display:flex}.horizontal-bar-chart-label-icon{border-radius:100px;width:12px;height:12px}.horizontal-bar-chart-label-text{color:var(--gray-90);width:max-content;font-size:12px;font-weight:400}.horizontal-bar-chart-labels{scrollbar-width:none;touch-action:pan-x;-webkit-user-select:none;user-select:none;gap:8px;width:100%;padding-top:36px;padding-bottom:36px;display:flex;overflow-x:auto}.horizontal-bar-chart-labels::-webkit-scrollbar{display:none}.horizontal-bar-chart-legend{border-bottom:1px solid #c2c2c2;align-items:center;gap:8px;max-width:100%;display:flex}.horizontal-bar-chart-ref{border-radius:16px}@media screen and (width>=992px){.horizontal-bar-chart{padding:36px 20px}}.ibc-footer{border-top:1px solid var(--gray-50);flex-direction:column;justify-content:space-between;gap:48px;padding:24px 0 0;display:flex}@media (width>=577px){.ibc-footer{flex-direction:row;gap:12px}}.ibc-footer-font{color:var(--gray-90);font-size:16px;font-weight:400}.ibc-footer-font>span{font-weight:700}.ibc-footer-logo{object-fit:contain;max-width:90px;height:21px;max-height:21px}.line-chart{background:var(--gray-0);flex-direction:column;gap:36px;padding:36px 4px;display:flex}.line-chart-ctn{background:var(--bg);border-radius:16px;flex-direction:column;gap:36px;display:flex}.line-chart-labels{gap:16px;display:flex}.line-chart-label{align-items:center;gap:8px;display:flex}.line-chart-label-img{object-fit:cover;border-radius:100px;width:50px;height:50px}.line-chart-label-content{background:var(--gray-0);border:1px solid var(--gray-30);border-radius:50px;justify-content:center;align-items:center;gap:10px;padding:8px 16px;display:flex}.line-chart-label-text{color:var(--gray-90);font-size:12px;font-weight:400}.bars-line-chart{height:400px;padding:16px}.vertical-bar-chart{background:var(--gray-0);flex-direction:column;gap:36px;padding:36px 4px;display:flex}.vertical-bar-chart-ctn{background:var(--bg);border-radius:16px;flex-direction:column;gap:36px;display:flex}.vertical-bar-chart-labels{gap:8px;max-width:100%;display:flex;overflow-x:auto}.vertical-bar-chart-labels::-webkit-scrollbar{display:none}.vertical-bar-chart-label{background:var(--gray-0);border:1px solid var(--gray-30);border-radius:100px;align-items:center;gap:6px;width:max-content;padding:8px 16px;display:flex}.vertical-bar-chart-label-icon{border-radius:100px;width:12px;height:12px}.vertical-bar-chart-label-text{color:var(--gray-90);width:max-content;font-size:12px;font-weight:400}.bars-vertical-bar-chart{height:400px;padding:16px}/*$vite$:1*/`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();
2
2
  import { jsx as e, jsxs as t } from "react/jsx-runtime";
3
3
  import { useEffect as n, useMemo as r, useRef as i, useState as a } from "react";
4
4
  //#region \0rolldown/runtime.js
@@ -26468,7 +26468,7 @@ var wB = ({ color: n = "#d85040", width: r = 27, height: i = 10 }) => /* @__PURE
26468
26468
  strokeLinecap: "round"
26469
26469
  }), /* @__PURE__ */ e("path", {
26470
26470
  d: "M13.2998 8.75C15.5089 8.75 17.2998 6.95914 17.2998 4.75C17.2998 2.54086 15.5089 0.75 13.2998 0.75C11.0907 0.75 9.2998 2.54086 9.2998 4.75C9.2998 6.95914 11.0907 8.75 13.2998 8.75Z",
26471
- fill: "white",
26471
+ fill: "var(--bg)",
26472
26472
  stroke: n,
26473
26473
  strokeWidth: 1.5
26474
26474
  })]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "infobae-charts",
3
- "version": "0.0.20",
3
+ "version": "0.0.21",
4
4
  "type": "module",
5
5
  "description": "Infobae charts components",
6
6
  "main": "./dist/index.cjs",