var e=Object.defineProperty,t=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),n=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r};(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var r=t((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-Tt&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),i=t(((e,t)=>{t.exports=r()})),a=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function A(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var j=/\/+/g;function M(e,t){return typeof e==`object`&&e&&e.key!=null?A(``+e.key):t.toString(36)}function ee(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+M(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(j,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(j,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u{t.exports=a()})),s=t((e=>{var t=o();function n(e){var t=`https://react.dev/errors/`+e;if(1{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=s()})),l=t((e=>{var t=i(),n=o(),r=c();function a(e){var t=`https://react.dev/errors/`+e;if(1ge||(e.current=he[ge],he[ge]=null,ge--)}function ye(e,t){ge++,he[ge]=e.current,e.current=t}var z=_e(null),B=_e(null),be=_e(null),xe=_e(null);function Se(e,t){switch(ye(be,t),ye(B,e),ye(z,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?pp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=pp(t),e=mp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ve(z),ye(z,e)}function Ce(){ve(z),ve(B),ve(be)}function we(e){var t=e.memoizedState;t!==null&&(uh._currentValue=t.memoizedState,ye(xe,e)),t=z.current;var n=mp(t,e.type);t!==n&&(ye(B,e),ye(z,n))}function V(e){B.current===e&&(ve(z),ve(B)),xe.current===e&&(ve(xe),uh._currentValue=me)}var Te,H;function U(e){if(Te===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Te=t&&t[1]||``,H=-1)`:-1i||c[r]!==l[i]){var u=` `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(``)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{W=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?U(n):``}function De(e,t){switch(e.tag){case 26:case 27:case 5:return U(e.type);case 16:return U(`Lazy`);case 13:return e.child!==t&&t!==null?U(`Suspense Fallback`):U(`Suspense`);case 19:return U(`SuspenseList`);case 0:case 15:return Ee(e.type,!1);case 11:return Ee(e.type.render,!1);case 1:return Ee(e.type,!0);case 31:return U(`Activity`);case 30:return U(`ViewTransition`);default:return``}}function G(e){try{var t=``,n=null;do t+=De(e,n),n=e,e=e.return;while(e);return t}catch(e){return` Error generating stack: `+e.message+` `+e.stack}}var Oe=Object.prototype.hasOwnProperty,ke=t.unstable_scheduleCallback,Ae=t.unstable_cancelCallback,je=t.unstable_shouldYield,Me=t.unstable_requestPaint,Ne=t.unstable_now,Pe=t.unstable_getCurrentPriorityLevel,K=t.unstable_ImmediatePriority,Fe=t.unstable_UserBlockingPriority,Ie=t.unstable_NormalPriority,Le=t.unstable_LowPriority,Re=t.unstable_IdlePriority,ze=t.log,Be=t.unstable_setDisableYieldValue,Ve=null,He=null;function Ue(e){if(typeof ze==`function`&&Be(e),He&&typeof He.setStrictMode==`function`)try{He.setStrictMode(Ve,e)}catch{}}var We=Math.clz32?Math.clz32:q,Ge=Math.log,Ke=Math.LN2;function q(e){return e>>>=0,e===0?32:31-(Ge(e)/Ke|0)|0}var qe=256,Je=262144,Ye=4194304;function Xe(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ze(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Xe(n))):i=Xe(o):i=Xe(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Xe(n))):i=Xe(o)):i=Xe(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Qe(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function $e(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0n;n++)t.push(e);return t}function rt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function it(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0=nr),ar=` `,or=!1;function sr(e,t){switch(e){case`keyup`:return er.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function cr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var lr=!1;function ur(e,t){switch(e){case`compositionend`:return cr(t);case`keypress`:return t.which===32?(or=!0,ar):null;case`textInput`:return e=t.data,e===ar&&or?null:e;default:return null}}function dr(e,t){if(lr)return e===`compositionend`||!tr&&sr(e,t)?(e=Cn(),Sn=xn=bn=null,lr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Pr(n)}}function Ir(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ir(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Lr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Nr(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Nr(e.document)}return t}function Rr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var zr=_n&&`documentMode`in document&&11>=document.documentMode,Br=null,Vr=null,Hr=null,Ur=!1;function Wr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ur||Br==null||Br!==Nr(r)||(r=Br,`selectionStart`in r&&Rr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Hr&&Mr(Hr,r)||(Hr=r,r=Xf(Vr,`onSelect`),0>=o,i-=o,Bi=1<<32-We(t)+i|n<h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),Yi&&Hi(i,h),l;if(d===null){for(;hg?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),Yi&&Hi(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Yi&&Hi(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&h.delete(_.key===null?g:_.key)),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),Yi&&Hi(i,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===j&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case k:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===j){if(r.tag===7){n(e,r.sibling),c=i(r,o.props.children),$a(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===ae&&Ka(l)===r.type){n(e,r.sibling),c=i(r,o.props),$a(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===j?(c=Di(o.props.children,e.mode,c,o.key),$a(c,o),c.return=e,e=c):(c=Ei(o.type,o.key,o.props,null,e.mode,c),$a(c,o),c.return=e,e=c)}return s(e);case A:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=i(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=Ai(o,e.mode,c),c.return=e,e=c}return s(e);case ae:return o=Ka(o),_(e,r,o,c)}if(I(o))return h(e,r,o,c);if(de(o)){if(l=de(o),typeof l!=`function`)throw Error(a(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,Qa(o),c);if(o.$$typeof===P)return _(e,r,_a(e,o),c);eo(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,o),c.return=e,e=c):(n(e,r),c=Oi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Za=0;var i=_(e,t,n,r);return Xa=null,i}catch(t){if(t===Ba||t===Ha)throw t;var a=Si(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var no=to(!0),ro=to(!1),io=!1;function ao(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function oo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function so(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function co(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Xu&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=yi(e),vi(e,null,n),t}return hi(e,r,t,n),yi(e)}function lo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ot(e,n)}}function uo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n}else e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var fo=!1;function po(){if(fo){var e=ja;if(e!==null)throw e}}function mo(e,t,n,r){fo=!1;var i=e.updateQueue;io=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?($u&f)===f:(r&f)===f){f!==0&&f===Aa&&(fo=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=D({},d,f);break a;case 2:io=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),sd|=o,e.lanes=o,e.memoizedState=d}}function ho(e,t){if(typeof e!=`function`)throw Error(a(191,e));e.call(t)}function go(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=L.T,s={};s.types=o===null?null:o.types,L.T=s,ic(e,!1,t,n);try{var c=i(),l=L.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?rc(e,t,Pa(c,r),Md(e)):rc(e,t,r,Md(e))}catch(n){rc(e,t,{then:function(){},status:`rejected`,reason:n},Md())}finally{R.p=a,o!==null&&s.types!==null&&(o.types=s.types),L.T=o}}function qs(){}function Js(e,t,n,r){if(e.tag!==5)throw Error(a(476));var i=Ys(e).queue;Ks(e,i,t,me,n===null?qs:function(){return Xs(e),n(r)})}function Ys(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:me,baseState:me,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:as,lastRenderedState:me},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:as,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Xs(e){var t=Ys(e);t.next===null&&(t=e.alternate.memoizedState),rc(e,t.next.queue,{},Md())}function Zs(){return ga(uh)}function Qs(){return es().memoizedState}function $s(){return es().memoizedState}function ec(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Md();e=so(n);var r=co(t,e,n);r!==null&&(Fd(r,t,n),lo(r,t,n)),t={cache:Ca()},e.payload=t;return}t=t.return}}function tc(e,t,n){var r=Md();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ac(e)?oc(t,n):(n=gi(e,t,n,r),n!==null&&(Fd(n,e,r),sc(n,t,r)))}function nc(e,t,n){rc(e,t,n,Md())}function rc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(ac(e))oc(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,jr(s,o))return hi(e,t,i,0),Zu===null&&mi(),!1}catch{}if(n=gi(e,t,i,r),n!==null)return Fd(n,e,r),sc(n,t,r),!0}return!1}function ic(e,t,n,r){if(r={lane:2,revertLane:If(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},ac(e)){if(t)throw Error(a(479))}else t=gi(e,n,r,2),t!==null&&Fd(t,e,2)}function ac(e){var t=e.alternate;return e===Po||t!==null&&t===Po}function oc(e,t){Ro=Lo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function sc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ot(e,n)}}var cc={readContext:ga,use:rs,useCallback:Wo,useContext:Wo,useEffect:Wo,useImperativeHandle:Wo,useLayoutEffect:Wo,useInsertionEffect:Wo,useMemo:Wo,useReducer:Wo,useRef:Wo,useState:Wo,useDebugValue:Wo,useDeferredValue:Wo,useTransition:Wo,useSyncExternalStore:Wo,useId:Wo,useHostTransitionStatus:Wo,useFormState:Wo,useActionState:Wo,useOptimistic:Wo,useMemoCache:Wo,useCacheRefresh:Wo,useEffectEvent:Wo},lc={readContext:ga,use:rs,useCallback:function(e,t){return $o().memoizedState=[e,t===void 0?null:t],e},useContext:ga,useEffect:Ns,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),js(4194308,4,zs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return js(4194308,4,e,t)},useInsertionEffect:function(e,t){js(4,2,e,t)},useMemo:function(e,t){var n=$o();t=t===void 0?null:t;var r=e();if(zo){Ue(!0);try{e()}finally{Ue(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=$o();if(n!==void 0){var i=n(t);if(zo){Ue(!0);try{n(t)}finally{Ue(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=tc.bind(null,Po,e),[r.memoizedState,e]},useRef:function(e){var t=$o();return e={current:e},t.memoizedState=e},useState:function(e){e=hs(e);var t=e.queue,n=nc.bind(null,Po,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Vs,useDeferredValue:function(e,t){return Ws($o(),e,t)},useTransition:function(){var e=hs(!1);return e=Ks.bind(null,Po,e.queue,!0,!1),$o().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=Po,i=$o();if(Yi){if(n===void 0)throw Error(a(407));n=n()}else{if(n=t(),Zu===null)throw Error(a(349));$u&127||us(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Ns(fs.bind(null,r,o,e),[e]),r.flags|=2048,ks(9,{destroy:void 0},ds.bind(null,r,o,n,t),null),n},useId:function(){var e=$o(),t=Zu.identifierPrefix;if(Yi){var n=Vi,r=Bi;n=(r&~(1<<32-We(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Bo++,0<\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(i,{is:r.is}):s.createElement(i)}}o[pt]=t,o[mt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(ap(o,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&sl(t)}}return fl(t),t.subtreeFlags&=-33554433,cl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&sl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(a(166));if(e=be.current,na(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=qi,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[pt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||np(e.nodeValue,n)),e||$i(t,!0)}else e=fp(e).createTextNode(r),e[pt]=t,t.stateNode=e}return fl(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=na(t),n!==null){if(e===null){if(!r)throw Error(a(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(557));e[pt]=t}else ra(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;fl(t),e=!1}else n=ia(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Oo(t),t):(Oo(t),null);if(t.flags&128)throw Error(a(558))}return fl(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=na(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(a(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(a(317));i[pt]=t}else ra(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;fl(t),i=!1}else i=ia(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(Oo(t),t):(Oo(t),null)}return Oo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),ul(t,t.updateQueue),fl(t),null);case 4:return Ce(),e===null&&Kf(t.stateNode.containerInfo),t.flags|=67108864,fl(t),null;case 10:return ua(t.type),fl(t),null;case 19:if(jo(t),r=t.memoizedState,r===null)return fl(t),null;if(i=!!(t.flags&128),o=r.rendering,o===null){if(i)dl(r,!1);else{if(od!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Mo(e),o!==null){for(t.flags|=128,dl(r,!1),e=o.updateQueue,t.updateQueue=e,ul(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Ti(n,e),n=n.sibling;return Ao(t,ko.current&1|2),Yi&&Hi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ne()>_d&&(t.flags|=128,i=!0,dl(r,!1),t.lanes=4194304)}}else{if(!i){if(e=Mo(o),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,ul(t,e),dl(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!Yi)return fl(t),null}else 2*Ne()-r.renderingStartTime>_d&&n!==536870912&&(t.flags|=128,i=!0,dl(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ne(),e.sibling=null,o=ko.current,o=i?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||Yi?Ao(t,o):(n=o,ye(So,t),ye(ko,n),Co===null&&(Co=t)),Yi&&Hi(t,r.treeForkCount),e}return fl(t),null;case 22:case 23:return Oo(t),xo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(fl(t),t.subtreeFlags&6&&(t.flags|=8192)):fl(t),n=t.updateQueue,n!==null&&ul(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&ve(Ia),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ua(Sa),fl(t),null;case 25:return null;case 30:return t.flags|=33554432,fl(t),null}throw Error(a(156,t.tag))}function ml(e,t){switch(Gi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ua(Sa),Ce(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return V(t),null;case 31:if(t.memoizedState!==null){if(Oo(t),t.alternate===null)throw Error(a(340));ra()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Oo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));ra()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return jo(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return Ce(),null;case 10:return ua(t.type),null;case 22:case 23:return Oo(t),xo(),e!==null&&ve(Ia),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ua(Sa),null;case 25:return null;default:return null}}function hl(e,t){switch(Gi(t),t.tag){case 3:ua(Sa),Ce();break;case 26:case 27:case 5:V(t);break;case 4:Ce();break;case 31:t.memoizedState!==null&&Oo(t);break;case 13:Oo(t);break;case 19:jo(t);break;case 10:ua(t.type);break;case 22:case 23:Oo(t),xo(),e!==null&&ve(Ia);break;case 24:ua(Sa)}}function gl(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){hf(t,t.return,e)}}function _l(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){hf(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){hf(t,t.return,e)}}function vl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{go(t,n)}catch(t){hf(e,e.return,t)}}}function yl(e,t,n){n.props=gc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){hf(e,t,n)}}function bl(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,a=si(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Lp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Rp(e);h(e.child,!1,tm,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){hf(e,t,n)}}function xl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){hf(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){hf(e,t,n)}else n.current=null}}function Sl(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n title`))),ap(r,t,n),r[pt]=e,Dt(r),t=r;break a;case`link`:if(o=Jm(`link`,`href`,i).get(t+(n.href||``))){for(s=0;sg&&(o=g,g=h,h=o);var _=Fr(s,h),v=Fr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,L.T=null,n=Td,Td=null;var o=xd,s=Cd;if(bd=0,Sd=xd=null,Cd=0,Xu&6)throw Error(a(331));var c=Xu;if(Xu|=4,Gu(o.current),Lu(o,o.current,s,n),Xu=c,kf(0,!1),He&&typeof He.onPostCommitFiberRoot==`function`)try{He.onPostCommitFiberRoot(Ve,o)}catch{}return!0}finally{R.p=i,L.T=r,df(e,t)}}function mf(e,t,n){t=Mi(n,t),t=Sc(e.stateNode,t,2),e=co(e,t,2),e!==null&&(rt(e,2),Of(e))}function hf(e,t,n){if(e.tag===3)mf(e,e,n);else for(;t!==null;){if(t.tag===3){mf(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(yd===null||!yd.has(r))){e=Mi(n,e),n=Cc(2),r=co(t,n,2),r!==null&&(wc(n,r,t,e),rt(r,2),Of(r));break}}t=t.return}}function gf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Yu;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(id=!0,i.add(n),e=_f.bind(null,e,t,n),t.then(e,e))}function _f(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Zu===e&&($u&n)===n&&(od===4||od===3&&($u&62914560)===$u&&300>Ne()-hd?Xu&2?ld|=n:Hd(e,0):ld|=n,dd===$u&&(dd=0)),Of(e)}function vf(e,t){t===0&&(t=tt()),e=_i(e,t),e!==null&&(rt(e,t),Of(e))}function yf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),vf(e,n)}function bf(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(a(314))}r!==null&&r.delete(t),vf(e,n)}function xf(e,t){return ke(e,t)}var Sf=null,Cf=null,wf=!1,Tf=!1,Ef=!1,Df=0;function Of(e){e!==Cf&&e.next===null&&(Cf===null?Sf=Cf=e:Cf=Cf.next=e),Tf=!0,wf||(wf=!0,Ff())}function kf(e,t){if(!Ef&&Tf){Ef=!0;do for(var n=!1,r=Sf;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-We(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Pf(r,a))}else a=$u,a=Ze(r,r===Zu?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Qe(r,a)||(n=!0,Pf(r,a))}r=r.next}while(n);Ef=!1}}function Af(){jf()}function jf(){Tf=wf=!1;var e=0;Df!==0&&vp()&&(e=Df);for(var t=Ne(),n=null,r=Sf;r!==null;){var i=r.next,a=Mf(r,t);a===0?(r.next=null,n===null?Sf=i:n.next=i,i===null&&(Cf=n)):(n=r,(e!==0||a&3)&&(Tf=!0)),r=i}bd!==0&&bd!==5||kf(e,!1),Df!==0&&(Df=0)}function Mf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&cp(d)&&(c=c.responseEnd,o+=u*(cnh){s.length=o;break}f=new Promise(Pp.bind(f)),s.push(f)}}}if(0`u`?null:document;function Om(e,t,n){var r=Dm;if(r&&typeof t==`string`&&t){var i=Jt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Sm.has(i)||(Sm.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),ap(t,`link`,e),Dt(t),r.head.appendChild(t)))}}function km(e){wm.D(e),Om(`dns-prefetch`,e,null)}function Am(e,t){wm.C(e,t),Om(`preconnect`,e,t)}function jm(e,t,n){wm.L(e,t,n);var r=Dm;if(r&&e&&t){var i=`link[rel="preload"][as="`+Jt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Jt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Jt(n.imageSizes)+`"]`)):i+=`[href="`+Jt(e)+`"]`;var a=i;switch(t){case`style`:a=Lm(e);break;case`script`:a=Vm(e)}if(!(xm.has(a)||(e=D({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),xm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Rm(a))||t===`script`&&r.querySelector(Hm(a))))){var o=r.createElement(`link`);ap(o,`link`,e),t===`style`&&(o[xt]=!0,o.onload=o.onerror=function(){Ot(o)}),Dt(o),r.head.appendChild(o)}}}function Mm(e,t){wm.m(e,t);var n=Dm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Jt(r)+`"][href="`+Jt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Vm(e)}if(!xm.has(a)&&(e=D({rel:`modulepreload`,href:e},t),xm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Hm(a)))return}r=n.createElement(`link`),ap(r,`link`,e),Dt(r),n.head.appendChild(r)}}}function Nm(e,t,n){wm.S(e,t,n);var r=Dm;if(r&&e){var i=Et(r).hoistableStyles,a=Lm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Rm(a)))s.loading=5;else{e=D({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=xm.get(a))&&Gm(e,n);var c=o=r.createElement(`link`);Dt(c),ap(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Wm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Pm(e,t){wm.X(e,t);var n=Dm;if(n&&e){var r=Et(n).hoistableScripts,i=Vm(e),a=r.get(i);a||(a=n.querySelector(Hm(i)),a||(e=D({src:e,async:!0},t),(t=xm.get(i))&&Km(e,t),a=n.createElement(`script`),Dt(a),ap(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Fm(e,t){wm.M(e,t);var n=Dm;if(n&&e){var r=Et(n).hoistableScripts,i=Vm(e),a=r.get(i);a||(a=n.querySelector(Hm(i)),a||(e=D({src:e,async:!0,type:`module`},t),(t=xm.get(i))&&Km(e,t),a=n.createElement(`script`),Dt(a),ap(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Im(e,t,n,r){var i=(i=be.current)?Cm(i):null;if(!i)throw Error(a(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Lm(n.href),t=Et(i).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Lm(n.href);var o=Et(i).hoistableStyles,s=o.get(e);if(s||(i=i.ownerDocument||i,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=i.querySelector(Rm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=xm.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},xm.set(e,o)),Bm(i,e,o,s.state))),t&&r===null)throw Error(a(528,``));return s}if(t&&r!==null)throw Error(a(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Vm(n),t=Et(i).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(a(444,e))}}function Lm(e){return`href="`+Jt(e)+`"`}function Rm(e){return`link[rel="stylesheet"][`+e+`]`}function zm(e){return D({},e,{"data-precedence":e.precedence,precedence:null})}function Bm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[xt]){r.loading=1;return}}else t=e.createElement(`link`),t[xt]=!0,t.onload=t.onerror=Ot.bind(null,t),ap(t,`link`,n),Dt(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Vm(e){return`[src="`+Jt(e)+`"]`}function Hm(e){return`script[async]`+e}function Um(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Jt(n.href)+`"]`);if(r)return t.instance=r,Dt(r),r;var i=D({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Dt(r),ap(r,`style`,i),Wm(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Lm(n.href);var o=e.querySelector(Rm(i));if(o)return t.state.loading|=4,t.instance=o,Dt(o),o;r=zm(n),(i=xm.get(i))&&Gm(r,i),o=(e.ownerDocument||e).createElement(`link`),Dt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),ap(o,`link`,r),t.state.loading|=4,Wm(o,n.precedence,e),t.instance=o;case`script`:return o=Vm(n.src),(i=e.querySelector(Hm(o)))?(t.instance=i,Dt(i),i):(r=n,(i=xm.get(o))&&(r=D({},n),Km(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),Dt(i),ap(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(a(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Wm(r,n.precedence,e));return t.instance}function Wm(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function Xm(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Zm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Qm(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function $m(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function eh(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=$m(t),e.suspenseyImages.push(t)),e=oh.bind(e),t.decode().then(e,e))}function th(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Lm(r.href),a=t.querySelector(Rm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=ah.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Dt(a);return}a=t.ownerDocument||t,r=zm(r),(i=xm.get(i))&&Gm(r,i),a=a.createElement(`link`),Dt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),ap(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=ah.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var nh=0;function rh(e,t){return e.stylesheets&&e.count===0&&ch(e,e.stylesheets),0nh?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function ih(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)ch(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function ah(){this.count--,ih(this)}function oh(){this.imgCount--,ih(this)}var sh=null;function ch(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,sh=new Map,t.forEach(lh,e),sh=null,ah.call(e))}function lh(e,t){if(!(t.state.loading&4)){var n=sh.get(e);if(n)var r=n.get(null);else{n=new Map,sh.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=l()})),d=o(),f=u(),p=[`mode`,`batch`,`start`,`end`,`city`,`store_id`];async function m(e,t){let n=new URLSearchParams;t&&p.forEach(e=>{t[e]&&n.set(e,t[e])});let r=n.toString(),i=await fetch(`/api/`+e+(r?`?`+r:``));if(!i.ok){let e=`请求失败 `+i.status;try{e=(await i.json()).detail||e}catch{}throw Error(e)}return i.json()}function h(){let e=new URLSearchParams(window.location.search);return{mode:e.get(`mode`)===`range`?`range`:`batch`,batch:e.get(`batch`)||``,start:e.get(`start`)||``,end:e.get(`end`)||``,city:e.get(`city`)||``,store_id:e.get(`store_id`)||``,tab:e.get(`tab`)===`keyword`?`keyword`:`coupon`,coupon:e.get(`coupon`)||``,keyword:e.get(`keyword`)||``}}function g(e){let t=new URLSearchParams;Object.entries(e).forEach(([e,n])=>{n&&(e!==`mode`||n!==`batch`)&&(e!==`tab`||n!==`coupon`)&&t.set(e,n)});let n=t.toString(),r=window.location.pathname+(n?`?`+n:``);r!==window.location.pathname+window.location.search&&window.history.replaceState(null,``,r)}var _=e=>String(e).padStart(2,`0`);function v(e){return e.getFullYear()+`-`+_(e.getMonth()+1)+`-`+_(e.getDate())}function y(e,t){let n=new Date,r=new Date(n.getFullYear(),n.getMonth(),n.getDate()+e),i=new Date(n.getFullYear(),n.getMonth(),n.getDate()+t);return{start:v(r)+` 00:00:00`,end:v(i)+` 23:59:59`}}function b(e){if(e.mode!==`range`)return!1;let t=y(0,0);return e.start<=t.end&&e.end>=t.start}function x(e){return Number(e||0).toLocaleString(`zh-CN`)}function S(e){return e?e.slice(5,16):`--`}var C=function(e,t){return C=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])},C(e,t)};function w(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);C(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var T=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),E=new(function(){function e(){this.browser=new T,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`?(E.wxa=!0,E.touchEventsSupported=!0):typeof document>`u`&&typeof self<`u`?E.worker=!0:!E.hasGlobalWindow||`Deno`in window||typeof navigator<`u`&&typeof navigator.userAgent==`string`&&navigator.userAgent.indexOf(`Node.js`)>-1?(E.node=!0,E.svgSupported=!0):D(navigator.userAgent,E);function D(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 O=`12px sans-serif`,k=20,A=100,j=`007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N`;function M(e){var t={};if(typeof JSON>`u`)return t;for(var n=0;n=0)s=o*n.length;else for(var c=0;c=de&&(F=0),F++}function pe(){var e=[...arguments];typeof console<`u`&&console.error.apply(console,e)}function I(e){if(typeof e!=`object`||!e)return e;var t=e,n=ne.call(e);if(n===`[object Array]`){if(!He(e)){t=[];for(var r=0,i=e.length;r>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(){z(n,function(e){e.parentNode&&e.parentNode.removeChild(e)})},n}function Ot(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?xt(s,o):xt(o,s))}function kt(e){return e.nodeName.toUpperCase()===`CANVAS`}var At=/([&<>"'])/g,jt={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function Mt(e){return e==null?``:(e+``).replace(At,function(e,t){return jt[t]})}var Nt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Pt=[],Ft=E.browser.firefox&&+E.browser.version.split(`.`)[0]<39;function It(e,t,n,r){return n||={},r?Lt(e,t,n):Ft&&t.layerX!=null&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):t.offsetX==null?Lt(e,t,n):(n.zrX=t.offsetX,n.zrY=t.offsetY),n}function Lt(e,t,n){if(E.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(kt(e)){var a=e.getBoundingClientRect();n.zrX=r-a.left,n.zrY=i-a.top;return}if(Et(Pt,e,r,i)){n.zrX=Pt[0],n.zrY=Pt[1];return}}n.zrX=n.zrY=0}function Rt(e){return e||window.event}function zt(e,t,n){if(t=Rt(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&&It(e,i,t,n)}else{It(e,t,t,n);var a=Bt(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return t.which==null&&o!==void 0&&Nt.test(t.type)&&(t.which=o&1?1:o&2?3:o&4?2:0),t}function Bt(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 Vt(e,t,n,r){e.addEventListener(t,n,r)}function Ht(e,t,n,r){e.removeEventListener(t,n,r)}var Ut=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function Wt(e){return e.which===2||e.which===3}var Gt=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;a1&&r&&r.length>1){var a=Kt(r)/Kt(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=qt(r);return t.pinchX=o[0],t.pinchY=o[1],{type:`pinch`,target:e[0].target,event:t}}}}};function Yt(){return[1,0,0,1,0,0]}function Xt(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function Zt(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 Qt(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 $t(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 en(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 tn(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 nn(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 J=function(){function e(e,t){this.x=e||0,this.y=t||0}return e.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(e,t){return this.x=e,this.y=t,this},e.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},e.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.scale=function(e){this.x*=e,this.y*=e},e.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},e.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},e.prototype.dot=function(e){return this.x*e.x+this.y*e.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},e.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},e.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},e.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},e.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},e.set=function(e,t,n){e.x=t,e.y=n},e.copy=function(e,t){e.x=t.x,e.y=t.y},e.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},e.lenSquare=function(e){return e.x*e.x+e.y*e.y},e.dot=function(e,t){return e.x*t.x+e.y*t.y},e.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},e.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},e.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},e.scaleAndAdd=function(e,t,n,r){e.x=t.x+n.x*r,e.y=t.y+n.y*r},e.lerp=function(e,t,n,r){var i=1-r;e.x=i*t.x+r*n.x,e.y=i*t.y+r*n.y},e}(),rn=Math.min,an=Math.max,on=Math.abs,sn=[`x`,`y`],cn=[`width`,`height`],ln=new J,un=new J,dn=new J,fn=new J,pn=wn(),mn=pn.minTv,hn=pn.maxTv,gn=[0,0],Y=function(){function e(e,t,n,r){_n(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=rn(e.x,this.x),n=rn(e.y,this.y);this.width=isFinite(this.x)&&isFinite(this.width)?an(e.x+e.width,this.x+this.width)-t:e.width,this.height=isFinite(this.y)&&isFinite(this.height)?an(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 yn(Yt(),this,e)},e.prototype.intersect=function(t,n,r){return e.intersect(this,t,n,r)},e.intersect=function(t,n,r,i){r&&J.set(r,0,0);var a=i&&i.outIntersectRect||null,o=i&&i.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!t||!n)return!1;t instanceof e||(t=_n(bn,t.x,t.y,t.width,t.height)),n instanceof e||(n=_n(xn,n.x,n.y,n.width,n.height));var s=!!r;pn.reset(i,s);var c=pn.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=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){vn(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&&vn(e,t);else 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)}else{ln.x=dn.x=t.x,ln.y=fn.y=t.y,un.x=fn.x=t.x+t.width,un.y=dn.y=t.y+t.height,ln.transform(n),fn.transform(n),un.transform(n),dn.transform(n),e.x=rn(ln.x,un.x,dn.x,fn.x),e.y=rn(ln.y,un.y,dn.y,fn.y);var s=an(ln.x,un.x,dn.x,fn.x),c=an(ln.y,un.y,dn.y,fn.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=Xt(e||[]),$t(e,e,tt(Sn,-t.x,-t.y)),tn(e,e,tt(Sn,r,i)),$t(e,e,tt(Sn,n.x,n.y)),e},e}();Y.create;var _n=Y.set,vn=Y.copy,yn=Y.calculateTransform;Y.applyTransform,Y.contain;var bn=new Y(0,0,0,0),xn=new Y(0,0,0,0),Sn=[];function Cn(e,t,n,r,i,a,o,s){var c=on(t-n),l=on(r-e),u=rn(c,l),d=sn[i],f=sn[1-i],p=cn[i];t=l||!pn.bidirectional)&&(mn[d]=-l,mn[f]=0,pn.useDir&&pn.calcDirMTV())))}function wn(){var e=0,t=new J,n=new J,r={minTv:new J,maxTv:new J,useDir:!1,dirMinTv:new J,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,a){r.touchThreshold=0,i&&i.touchThreshold!=null&&(r.touchThreshold=an(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;i(u)?i(a.x)&&i(a.y)&&o.set(0,0):(n.x=s*l/u,n.y=s*c/u,i(n.x)&&i(n.y)?o.set(0,0):(r.bidirectional||t.dot(n)>0)&&n.len()=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;m4)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=0;)i++;return i-t}function Bn(e,t,n){for(n--;t>>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;c0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}else{for(s=i+1;cs&&(c=s);var l=o;o=i-c,c=i-l}for(o++;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;cs&&(c=s);var l=o;o=i-c,c=i-l}else{for(s=r-i;c=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}for(o++;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])break;u(e)}}function l(){for(;a>1;){var e=a-2;e>0&&i[e-1]=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=0;c--)e[p+c]=e[f+c];e[d]=o[u]}else{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)=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=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;cs&&(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=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=E.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=$e(),ar=$e(),or=$e();function sr(e){return e>-er&&eer||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=dt(ir,ar),g=0&&g=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=dt(ir,ar);p=0&&p=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||Ze,this.ondestroy=e.ondestroy||Ze,this.onrestart=e.onrestart||Ze,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;else{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=U(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}}else{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 Xr(n,n.length===4?`rgba`:`rgb`)}}function Kr(e,t,n){if(t&&t.length&&e>=0&&e<=1){n||=[];var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=t[i],s=t[a],c=r-i;return n[0]=Ar(Ir(o[0],s[0],c)),n[1]=Ar(Ir(o[1],s[1],c)),n[2]=Ar(Ir(o[2],s[2],c)),n[3]=Mr(Ir(o[3],s[3],c)),n}}function qr(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=Xr([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 Jr(e,t,n,r){var i=Hr(e);if(e)return i=Wr(i),t!=null&&(i[0]=jr(U(t)?t(i[0]):t)),n!=null&&(i[1]=Pr(U(n)?n(i[1]):n)),r!=null&&(i[2]=Pr(U(r)?r(i[2]):r)),Xr(Ur(i),`rgba`)}function Yr(e,t){var n=Hr(e);if(n&&t!=null)return n[3]=Mr(t),Xr(n,`rgba`)}function Xr(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 Zr(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 Qr=new Or(100);function $r(e){if(W(e)){var t=Qr.get(e);return t||(t=Gr(e,-.1),Qr.put(e,t)),t}if(je(e)){var n=R({},e);return n.colorStops=B(e.colorStops,function(e){return{offset:e.offset,color:Gr(e.color,-.1)}}),n}return e}function ei(e){return e.type===`linear`}function ti(e){return e.type===`radial`}(function(){return typeof Buffer<`u`&&typeof Buffer.from==`function`?function(e){return Buffer.from(e).toString(`base64`)}:typeof btoa==`function`&&typeof unescape==`function`&&typeof encodeURIComponent==`function`?function(e){return btoa(unescape(encodeURIComponent(e)))}:function(e){return null}})();var ni=Array.prototype.slice;function ri(e,t,n){return(t-e)*n+e}function ii(e,t,n,r){for(var i=t.length,a=0;ar?t:e,a=Math.min(n,r),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;so)r.length=o;else for(var s=a;s=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=yi,s=t;if(ye(t)){var c=fi(t);o=c,(c===1&&!De(t[0])||c===2&&!De(t[0][0]))&&(a=!0)}else if(De(t)&&!Ne(t))o=pi;else if(W(t)){if(!isNaN(+t))o=pi;else{var l=Hr(t);l&&(s=l,o=gi)}}else if(je(t)){var u=R({},s);u.colorStops=B(t.colorStops,function(e){return{offset:e.offset,color:Hr(e.color)}}),ei(t)?o=_i:ti(t)&&(o=vi),s=u}i===0?this.valType=o:(o!==this.valType||o===yi)&&(a=!0),this.discrete=this.discrete||a;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=U(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=xi(r),c=bi(r),l=0;l=0&&!(a[l].percent<=t);l--);l=d(l,o-2)}else{for(l=u;lt);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?Si:e[s];if((xi(i)||c)&&!g&&(g=this._additiveValue=[]),this.discrete)e[s]=h<1?f.rawValue:p.rawValue;else if(xi(i))i===mi?ii(g,f[r],p[r],h):ai(g,f[r],p[r],h);else if(bi(i)){var _=f[r],v=p[r],y=i===_i;e[s]={type:y?`linear`:`radial`,x:ri(_.x,v.x,h),y:ri(_.y,v.y,h),colorStops:B(_.colorStops,function(e,t){var n=v.colorStops[t];return{offset:ri(e.offset,n.offset,h),color:di(ii([],e.color,n.color,h))}}),global:v.global},y?(e[s].x2=ri(_.x2,v.x2,h),e[s].y2=ri(_.y2,v.y2,h)):e[s].r=ri(_.r,v.r,h)}else if(c)ii(g,f[r],p[r],h),n||(e[s]=di(g));else{var b=ri(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===pi?e[n]=e[n]+r:t===gi?(Hr(e[n],Si),oi(Si,Si,r,1),e[n]=di(Si)):t===mi?oi(e[n],e[n],r,1):t===hi&&si(e[n],e[n],r,1)},e}(),wi=function(){function e(e,t,n,r){this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r?pe(`Can' use additive animation on looped animation.`):(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,Ce(t),n)},e.prototype.whenWithKeys=function(e,t,n,r){for(var i=this._tracks,a=0;a0&&s.addKeyframe(0,ui(c),r),this._trackKeys.push(o)}s.addKeyframe(e,ui(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;n0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,i=0;i1){var o=a.pop();i.addKeyframe(o.time,e[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e}();function Ti(){return new Date().getTime()}var Ei=function(e){w(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=Ti()-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}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=Ti(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||=(this._pauseStart=Ti(),!0)},t.prototype.resume=function(){this._paused&&=(this._pausedTime+=Ti()-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 wi(e,t.loop);return this.addAnimator(n),n},t}(vt),Di=300,Oi=E.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:B(e,function(e){var t=e.replace(`mouse`,`pointer`);return n.hasOwnProperty(t)?t:e})}})(),Ai={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},ji=!1;function Mi(e){var t=e.pointerType;return t===`pen`||t===`touch`}function Ni(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 Pi(e){e&&(e.zrByTouch=!0)}function Fi(e,t){return zt(e.dom,new Li(e,t),!0)}function Ii(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 Li=function(){function e(e,t){this.stopPropagation=Ze,this.stopImmediatePropagation=Ze,this.preventDefault=Ze,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return e}(),Ri={mousedown:function(e){e=zt(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove:function(e){e=zt(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=zt(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout:function(e){e=zt(this.dom,e);var t=e.toElement||e.relatedTarget;Ii(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel:function(e){ji=!0,e=zt(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel:function(e){ji||(e=zt(this.dom,e),this.trigger(`mousewheel`,e))},touchstart:function(e){e=zt(this.dom,e),Pi(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,`start`),Ri.mousemove.call(this,e),Ri.mousedown.call(this,e)},touchmove:function(e){e=zt(this.dom,e),Pi(e),this.handler.processGesture(e,`change`),Ri.mousemove.call(this,e)},touchend:function(e){e=zt(this.dom,e),Pi(e),this.handler.processGesture(e,`end`),Ri.mouseup.call(this,e),+new Date-this.__lastTouchMoment$i||e<-$i}var ta=[],na=[],ra=Yt(),ia=Math.abs,aa=function(){function e(){}return e.prototype.getLocalTransform=function(e){return oa(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 ea(this.rotation)||ea(this.x)||ea(this.y)||ea(this.scaleX-1)||ea(this.scaleY-1)||ea(this.skewX)||ea(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;t||e?(n||=Yt(),t?this.getLocalTransform(n):Qi(n),e&&(t?Qt(n,e,n):Zt(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n),this.invTransform=this.invTransform||Yt(),nn(this.invTransform,n)):n&&(Qi(n),this.invTransform=null)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(ta);var n=ta[0]<0?-1:1,r=ta[1]<0?-1:1,i=((ta[0]-n)*t+n)/ta[0]||0,a=((ta[1]-r)*t+r)/ta[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||Yt(),Qt(na,e.invTransform,t),t=na);var n=this.originX,r=this.originY;(n||r)&&(ra[4]=n,ra[5]=r,Qt(na,t,ra),na[4]-=n,na[5]-=r,t=na),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&&pt(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&pt(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&ia(e[0]-1)>1e-10&&ia(e[3]-1)>1e-10?Math.sqrt(ia(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){ca(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&&en(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}(),oa=aa.getLocalTransform,sa=[`x`,`y`,`originX`,`originY`,`anchorX`,`anchorY`,`rotation`,`scaleX`,`scaleY`,`skewX`,`skewY`];function ca(e,t){return me(e,t,sa)}function la(e){ua||=new Or(100),e||=`12px sans-serif`;var t=ua.get(e);return t||(t={font:e,strWidthCache:new Or(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:N.measureText(`国`,e).width,asciiCharWidth:N.measureText(`a`,e).width},ua.put(e,t)),t}var ua;function da(e){if(!(fa>=pa)){e||=`12px sans-serif`;for(var t=[],n=+new Date,r=0;r<=127;r++)t[r]=N.measureText(String.fromCharCode(r),e).width;var i=+new Date-n;return i>16?fa=pa:i>2&&fa++,t}}var fa=0,pa=5;function ma(e,t){return e.asciiWidthMapTried||=(e.asciiWidthMap=da(e.font),!0),0<=t&&t<=127?e.asciiWidthMap==null?e.asciiCharWidth:e.asciiWidthMap[t]:e.stWideCharWidth}function ha(e,t){var n=e.strWidthCache,r=n.get(t);return r??(r=N.measureText(t,e.font).width,n.put(t,r)),r}function ga(e,t,n,r){var i=ha(la(t),e),a=ba(t);return new Y(va(0,i,n),ya(0,a,r),i,a)}function _a(e,t,n,r){var i=((e||``)+``).split(` `);if(i.length===1)return ga(i[0],t,n,r);for(var a=new Y(0,0,0,0),o=0;o=0?parseFloat(e)/100*t:parseFloat(e):e}function Sa(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+=xa(r[0],n.width),l+=xa(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 Ca=`__zr_normal__`,wa=sa.concat([`ignore`]),Ta=be(sa,function(e,t){return e[t]=!0,e},{ignore:!1}),Ea={},Da=new Y(0,0,0,0),Oa=[],ka=function(){function e(e){this.id=fe(),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=Da,n.layoutRect?d.copy(n.layoutRect):d.copy(this.getBoundingRect()),r||d.applyTransform(this.transform)),l){this.calculateTextPosition?this.calculateTextPosition(Ea,n,d):Sa(Ea,n,d),i.x=Ea.x,i.y=Ea.y,a=Ea.align,o=Ea.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=xa(f[0],d.width),m=xa(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 Y(0,0,0,0);i.getLocalTransform(Oa),nn(Oa,Oa),Y.copy(_,d),_.applyTransform(Oa)}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()?Xi:Yi},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,Xr(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||{},R(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(G(e))for(var n=Ce(e),r=0;r0},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(Ca,!1,e)},e.prototype.useState=function(e,t,n,r){var i=e===Ca;if(this.hasState()||!i){var a=this.currentStates,o=this.stateTransition;if(!(ge(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)pe(`State `+e+` not exists.`);else{i||this.saveCurrentToNormalState(s);var c=this._textContent,l=La(this,c,s,r);l&&!this.__inHover&&(this.__inHover=l),this._applyStateObj(e,s,this._normalState,t,za(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=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=ge(r,e),a=ge(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=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;a0&&n.during&&a[0].during(function(e,t){n.during(t)});for(var f=0;f0||i.force&&!o.length){var C=void 0,w=void 0,T=void 0;if(s){w={},f&&(C={});for(var b=0;b0}var Ba=function(e){w(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=0&&(n.splice(r,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=ge(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=ge(n,e);return r<0||(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;n0&&(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;t0){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 lo=uo;function uo(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 fo(e,t,n)}function fo(e,t,n){return W(e)?po(e)?parseFloat(e)/100*t+(n||0):parseFloat(e):e==null?NaN:+e}function po(e){return!!Xa(e).match(/%$/)}function mo(e,t,n){return isNaN(t)?n?``+e:+e:(t=Za(Qa(0,t),Ya),e=(+e).toFixed(t),n?e:+e)}function ho(e){return e.sort(function(e,t){return e-t}),e}function go(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,n=0;n<15;n++,t*=10)if(eo(e*t)/t===e)return n}return _o(e)}function _o(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 Qa(0,(a<0?0:i-1-a)-r)}function vo(e,t,n){var r=$a(e[1]-e[0]);if(!isFinite(r)||r===0)return NaN;var i=io(2*$a(n||1)*$a(r))/ao,a=io($a(t))/ao,o=Qa(0,no(-i+a));return isFinite(o)||(o=NaN),o}function yo(e,t){var n=be(e,function(e,t){return e+(isNaN(t)?0:t)},0);if(n===0)return[];for(var r=ro(10,t),i=B(e,function(e){return(isNaN(e)?0:e)/n*r*100}),a=r*100,o=B(i,function(e){return to(e)}),s=be(o,function(e,t){return e+t},0),c=B(i,function(e,t){return e-o[t]});sl&&(l=c[d],u=d);++o[u],c[u]=0,++s}return B(o,function(e){return e/r})}function bo(e,t){var n=Qa(go(e),go(t)),r=e+t;return n>Ya?r:mo(r,n)}var xo=ro(2,53)-1;function So(e){var t=oo*2;return(e%t+t)%t}function Co(e){return e>-Ja&&e=10&&t++,t}function Oo(e,t){var n=Do(e),r=ro(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,mo(e,-n)}function ko(e){e.sort(function(e,t){return s(e,t,0)?-1:1});for(var t=-1/0,n=1,r=0;r0?e.length:0),this.item=null,this.key=NaN,this},e.prototype.next=function(){return(this._step>0?this._idx=this._end)&&(this.item=this._list[this._idx],this.key=this._idx+=this._step,!0)},e})();function ws(){return[1/0,-1/0]}function Ts(e,t){ks(t)&&(te[1]&&(e[1]=t))}function Es(e,t){ks(t)&&te[1]&&(e[1]=t)}function Os(e,t){As(t[0],t[1])&&(t[0]e[1]&&(e[1]=t[1]))}function ks(e){return e!=null&&isFinite(e)}function As(e,t){return ks(e)&&ks(t)&&e<=t}function js(e){var t=e[1]-e[0];return isFinite(t)&&t>=0}function Ms(e){As(e[0],e[1])&&e[0]>e[1]&&(e[0]=e[1])}function Ns(){var e=`__ec_once_`+Ps++;return function(t,n){Xe(t,e)||(t[e]=1,n())}}var Ps=Mo();function Fs(e,t,n){var r=q(),i=0;z(e,function(a){var o=t(a),s=r.get(o)||0;n&&n(a,s),!s&&!n&&(e[i++]=a),r.set(o,s+1)}),n||(e.length=i)}function Is(e){return e.value+``}function Ls(e){return e+``}function Rs(e,t){return K(t,!0)?e.seriesIndex+2:0}function zs(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 Bs(e,t){return{seriesType:e,overallReset:t}}function Vs(e){return{overallReset:e}}var Hs=`.`,Us=`___EC__COMPONENT__CONTAINER___`,Ws=`___EC__EXTENDED_CLASS___`;function Gs(e){var t={main:``,sub:``};if(e){var n=e.split(Hs);t.main=n[0]||``,t.sub=n[1]||``}return t}function Ks(e){Re(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),`componentType "`+e+`" illegal`)}function qs(e){return!!(e&&e[Ws])}function Js(e,t){e.$constructor=e,e.extend=function(e){var t=this,n;return Ys(t)?n=function(e){w(t,e);function t(){return e.apply(this,arguments)||this}return t}(t):(n=function(){(e.$constructor||t).apply(this,arguments)},_e(n,this)),R(n.prototype,e),n[Ws]=!0,n.extend=this.extend,n.superCall=$s,n.superApply=ec,n.superClass=t,n}}function Ys(e){return U(e)&&/^class\s/.test(Function.prototype.toString.call(e))}function Xs(e,t){e.extend=t.extend}var Zs=Math.round(Math.random()*10);function Qs(e){var t=[`__\0is_clz`,Zs++].join(`_`);e.prototype[t]=!0,e.isInstance=function(e){return!!(e&&e[t])}}function $s(e,t){var n=[...arguments].slice(2);return this.superClass.prototype[t].apply(e,n)}function ec(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){Ks(r),e.prototype.type=r;var i=Gs(r);if(!i.sub)t[i.main]=e;else if(i.sub!==Us){var a=n(i);a[i.sub]=e}}return e},e.getClass=function(e,n,r){var i=t[e];if(i&&i[Us]&&(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=Gs(e),r=[],i=t[n.main];return i&&i[Us]?z(i,function(e,t){t!==Us&&r.push(e)}):r.push(i),r},e.hasClass=function(e){return!!t[Gs(e).main]},e.getAllClassMainTypes=function(){var e=[];return z(t,function(t,n){e.push(n)}),e},e.hasSubTypes=function(e){var n=t[Gs(e).main];return n&&n[Us]};function n(e){var n=t[e.main];return(!n||!n[Us])&&(n=t[e.main]={},n[Us]=!0),n}}function nc(e,t){for(var n=0;n=0||i&&ge(i,s)<0)){var c=n.getShallow(s,t);c!=null&&(a[e[o][0]]=c)}}return a}}var rc=nc([[`fill`,`color`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`opacity`],[`shadowColor`]]),ic=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return rc(this,e,t)},e}(),ac=new Or(50);function oc(e){if(typeof e==`string`){var t=ac.get(e);return t&&t.image}return e}function sc(e,t,n,r,i){if(!e)return t;if(typeof e==`string`){if(t&&t.__zrImageSrc===e||!n)return t;var a=ac.get(e),o={hostEl:n,cb:r,cbPayload:i};return a?(t=a.image,!lc(t)&&a.pending.push(o)):(t=N.loadImage(e,cc,cc),t.__zrImageSrc=e,ac.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}return e}function cc(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t=s;l++)c-=s;var u=ha(o,n);return u>c&&(n=``,u=0),c=e-u,i.ellipsis=n,i.ellipsisWidth=u,i.contentWidth=c,i.containerWidth=e,i}function pc(e,t,n){var r=n.containerWidth,i=n.contentWidth,a=n.fontMeasureInfo;if(!r)e.textLine=``,e.isTruncated=!1;else{var o=ha(a,t);if(o<=r)e.textLine=t,e.isTruncated=!1;else{for(var s=0;;s++){if(o<=i||s>=n.maxIterations){t+=n.ellipsis;break}var c=s===0?mc(t,i,a):o>0?Math.floor(t.length*i/o):0;t=t.substr(0,c),o=ha(a,t)}t===``&&(t=n.placeholder),e.textLine=t,e.isTruncated=!0}}}function mc(e,t,n){for(var r=0,i=0,a=e.length;ig&&p){var y=Math.floor(g/f);m||=_.length>y,_=_.slice(0,y),v=_.length*f}if(i&&u&&h!=null)for(var b=fc(h,l,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),x={},S=0;S<_.length;S++)pc(x,_[S],b),_[S]=x.textLine,m||=x.isTruncated;for(var C=g,w=0,T=la(l),S=0;S<_.length;S++)w=Math.max(ha(T,_[S]),w);h??=w;var E=h;return C+=c,E+=s,{lines:_,height:g,outerWidth:E,outerHeight:C,lineHeight:f,calculatedLineHeight:d,contentWidth:w,contentHeight:v,width:h,isTruncated:m}}var gc=function(){function e(){}return e}(),_c=function(){function e(e){this.tokens=[],e&&(this.tokens=e)}return e}(),vc=function(){function e(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return e}();function yc(e,t,n,r,i){var a=new vc,o=Oc(e);if(!o)return a;var s=t.padding,c=s?s[1]+s[3]:0,l=s?s[0]+s[2]:0,u=t.width;u==null&&n!=null&&(u=n-c);var d=t.height;d==null&&r!=null&&(d=r-l);for(var f=t.overflow,p=(f===`break`||f===`breakAll`)&&u!=null?{width:u,accumWidth:0,breakAll:f===`breakAll`}:null,m=uc.lastIndex=0,h;(h=uc.exec(o))!=null;){var g=h.index;g>m&&bc(a,o.substring(m,g),t,p),bc(a,h[2],t,p,h[1]),m=uc.lastIndex}md){var P=a.lines.length;O>0?(T.tokens=T.tokens.slice(0,O),C(T,D,E),a.lines=a.lines.slice(0,w+1)):a.lines=a.lines.slice(0,w),a.isTruncated=a.isTruncated||a.lines.length0&&m+r.accumWidth>r.width&&(u=t.split(` `),l=!0),r.accumWidth=m}else{var h=wc(t,c,r.width,r.breakAll,r.accumWidth);r.accumWidth=h.accumWidth+p,d=h.linesWidths,u=h.lines}}u||=t.split(` `);for(var g=la(c),_=0;_=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var Sc=be(`,&?/;] `.split(``),function(e,t){return e[t]=!0,e},{});function Cc(e){return!xc(e)||!!Sc[e]}function wc(e,t,n,r,i){for(var a=[],o=[],s=``,c=``,l=0,u=0,d=la(t),f=0;fn:i+u+m>n)?u?(s||c)&&(h?(s||(s=c,c=``,l=0,u=l),a.push(s),o.push(u-l),c+=p,l+=m,s=``,u=l):(c&&(s+=c,c=``,l=0),a.push(s),o.push(u),s=p,u=m)):h?(a.push(c),o.push(l),c=p,l=m):(a.push(p),o.push(m)):(u+=m,h?(c+=p,l+=m):(c&&(s+=c,c=``,l=0),s+=p))}}return c&&(s+=c),s&&(a.push(s),o.push(u)),a.length===1&&(u+=i),{accumWidth:u,lines:a,linesWidths:o}}function Tc(e,t,n,r,i,a){if(e.baseX=n,e.baseY=r,e.outerWidth=e.outerHeight=null,t){var o=t.width*2,s=t.height*2;Y.set(Ec,va(n,o,i),ya(r,s,a),o,s),Y.intersect(t,Ec,null,Dc);var c=Dc.outIntersectRect;e.outerWidth=c.width,e.outerHeight=c.height,e.baseX=va(c.x,c.width,i,!0),e.baseY=ya(c.y,c.height,a,!0)}}var Ec=new Y(0,0,0,0),Dc={outIntersectRect:{},clamp:!0};function Oc(e){return e==null?e=``:e+=``}function kc(e){var t=Oc(e.text),n=e.font;return Ac(e,ha(la(n),t),ba(n),null)}function Ac(e,t,n,r){var i=new Y(va(e.x||0,t,e.textAlign),ya(e.y||0,n,e.textBaseline),t,n),a=r??(jc(e)?e.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function jc(e){var t=e.stroke;return t!=null&&t!==`none`&&e.lineWidth>0}var Mc=`__zr_style_`+Math.round(Math.random()*10),Nc={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:`#000`,opacity:1,blend:`source-over`},Pc={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Nc[Mc]=!0;var Fc=[`z`,`z2`,`invisible`],Ic=[`invisible`],Lc=function(e){w(t,e);function t(t){return e.call(this,t)||this}return t.prototype._init=function(t){for(var n=Ce(t),r=0;r1e-4)s[0]=e-n,s[1]=t-r,c[0]=e+n,c[1]=t+r;else{if(Kc[0]=Wc(i)*n+e,Kc[1]=Uc(i)*r+t,qc[0]=Wc(a)*n+e,qc[1]=Uc(a)*r+t,l(s,Kc,qc),u(c,Kc,qc),i%=Gc,i<0&&(i+=Gc),a%=Gc,a<0&&(a+=Gc),i>a&&!o?a+=Gc:ii&&(Jc[0]=Wc(p)*n+e,Jc[1]=Uc(p)*r+t,l(s,Jc,s),u(c,Jc,c))}}var tl={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},nl=[],rl=[],il=[],al=[],ol=[],sl=[],cl=Math.min,ll=Math.max,ul=Math.cos,dl=Math.sin,fl=Math.abs,pl=Math.PI,ml=pl*2,hl=typeof Float32Array<`u`,gl=[];function _l(e){return Math.round(e/pl*1e8)/1e8%2*pl}function vl(e,t){var n=_l(e[0]);n<0&&(n+=ml);var r=n-e[0],i=e[1];i+=r,!t&&i-n>=ml?i=n+ml:t&&n-i>=ml?i=n-ml:!t&&n>i?i=n+(ml-_l(n-i)):t&&n0&&(this._ux=fl(n/qi/e)||0,this._uy=fl(n/qi/t)||0)},e.prototype.setDPR=function(e){this.dpr=e},e.prototype.setContext=function(e){this._ctx=e},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(tl.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},e.prototype.lineTo=function(e,t){var n=fl(e-this._xi),r=fl(t-this._yi),i=n>this._ux||r>this._uy;if(this.addData(tl.L,e,t),this._ctx&&i&&this._ctx.lineTo(e,t),i)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var a=n*n+r*r;a>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=a)}return this},e.prototype.bezierCurveTo=function(e,t,n,r,i,a){return this._drawPendingPt(),this.addData(tl.C,e,t,n,r,i,a),this._ctx&&this._ctx.bezierCurveTo(e,t,n,r,i,a),this._xi=i,this._yi=a,this},e.prototype.quadraticCurveTo=function(e,t,n,r){return this._drawPendingPt(),this.addData(tl.Q,e,t,n,r),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,r),this._xi=n,this._yi=r,this},e.prototype.arc=function(e,t,n,r,i,a){this._drawPendingPt(),gl[0]=r,gl[1]=i,vl(gl,a),r=gl[0],i=gl[1];var o=i-r;return this.addData(tl.A,e,t,n,n,r,o,0,+!a),this._ctx&&this._ctx.arc(e,t,n,r,i,a),this._xi=ul(i)*n+e,this._yi=dl(i)*n+t,this},e.prototype.arcTo=function(e,t,n,r,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,r,i),this},e.prototype.rect=function(e,t,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,r),this.addData(tl.R,e,t,n,r),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(tl.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},e.prototype.fill=function(e){e&&e.fill(),this.toStatic()},e.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(e){if(this._saveData){var t=e.length;!(this.data&&this.data.length===t)&&hl&&(this.data=new Float32Array(t));for(var n=0;n0&&a))for(var o=0;ol.length&&(this._expandData(),l=this.data);for(var u=0;u0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){il[0]=il[1]=ol[0]=ol[1]=Number.MAX_VALUE,al[0]=al[1]=sl[0]=sl[1]=-Number.MAX_VALUE;for(var e=this.data,t=0,n=0,r=0,i=0,a=0;an||fl(v)>r||d===t-1)&&(m=Math.sqrt(_*_+v*v),i=h,a=g);break;case tl.C:var y=e[d++],b=e[d++],h=e[d++],g=e[d++],x=e[d++],S=e[d++];m=hr(i,a,y,b,h,g,x,S,10),i=x,a=S;break;case tl.Q:var y=e[d++],b=e[d++],h=e[d++],g=e[d++];m=Sr(i,a,y,b,h,g,10),i=h,a=g;break;case tl.A:var C=e[d++],w=e[d++],T=e[d++],E=e[d++],D=e[d++],O=e[d++],k=O+D;d+=1,p&&(o=ul(D)*T+C,s=dl(D)*E+w),m=ll(T,E)*cl(ml,Math.abs(O)),i=ul(k)*T+C,a=dl(k)*E+w;break;case tl.R:o=i=e[d++],s=a=e[d++];var A=e[d++],j=e[d++];m=A*2+j*2;break;case tl.Z:var _=o-i,v=s-a;m=Math.sqrt(_*_+v*v),i=o,a=s}m>=0&&(c[u++]=m,l+=m)}return this._pathLen=l,l},e.prototype.rebuildPath=function(e,t){var n=this.data,r=this._ux,i=this._uy,a=this._len,o,s,c,l,u,d,f=t<1,p,m,h=0,g=0,_,v=0,y,b;if(!(f&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,m=this._pathLen,_=t*m,!_)))lo:for(var x=0;x0&&(e.lineTo(y,b),v=0),S){case tl.M:o=c=n[x++],s=l=n[x++],e.moveTo(c,l);break;case tl.L:u=n[x++],d=n[x++];var w=fl(u-c),T=fl(d-l);if(w>r||T>i){if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+u*D,l*(1-D)+d*D);break lo}h+=E}e.lineTo(u,d),c=u,l=d,v=0}else{var O=w*w+T*T;O>v&&(y=u,b=d,v=O)}break;case tl.C:var k=n[x++],A=n[x++],j=n[x++],M=n[x++],ee=n[x++],N=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;pr(c,k,j,ee,D,nl),pr(l,A,M,N,D,rl),e.bezierCurveTo(nl[1],rl[1],nl[2],rl[2],nl[3],rl[3]);break lo}h+=E}e.bezierCurveTo(k,A,j,M,ee,N),c=ee,l=N;break;case tl.Q:var k=n[x++],A=n[x++],j=n[x++],M=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;br(c,k,j,D,nl),br(l,A,M,D,rl),e.quadraticCurveTo(nl[1],rl[1],nl[2],rl[2]);break lo}h+=E}e.quadraticCurveTo(k,A,j,M),c=j,l=M;break;case tl.A:var P=n[x++],te=n[x++],ne=n[x++],re=n[x++],ie=n[x++],ae=n[x++],oe=n[x++],se=!n[x++],ce=ne>re?ne:re,le=fl(ne-re)>.001,ue=ie+ae,F=!1;if(f){var E=p[g++];h+E>_&&(ue=ie+ae*(_-h)/E,F=!0),h+=E}if(le&&e.ellipse?e.ellipse(P,te,ne,re,oe,ie,ue,se):e.arc(P,te,ce,ie,ue,se),F)break lo;C&&(o=ul(ie)*ne+P,s=dl(ie)*re+te),c=ul(ue)*ne+P,l=dl(ue)*re+te;break;case tl.R:o=c=n[x],s=l=n[x+1],u=n[x++],d=n[x++];var de=n[x++],fe=n[x++];if(f){var E=p[g++];if(h+E>_){var pe=_-h;e.moveTo(u,d),e.lineTo(u+cl(pe,de),d),pe-=de,pe>0&&e.lineTo(u+de,d+cl(pe,fe)),pe-=fe,pe>0&&e.lineTo(u+ll(de-pe,0),d+fe),pe-=de,pe>0&&e.lineTo(u,d+ll(fe-pe,0));break lo}h+=E}e.rect(u,d,de,fe);break;case tl.Z:if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+o*D,l*(1-D)+s*D);break lo}h+=E}e.closePath(),c=o,l=s}}},e.prototype.clone=function(){var t=new e,n=this.data;return t.data=n.slice?n.slice():Array.prototype.slice.call(n),t._len=this._len,t},e.prototype.canSave=function(){return!!this._saveData},e.CMD=tl,e.initDefaultProps=(function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0})(),e}();function bl(e,t,n,r,i,a,o){if(i===0)return!1;var s=i,c=0,l=e;if(o>t+s&&o>r+s||oe+s&&a>n+s||at+d&&u>r+d&&u>a+d&&u>s+d||ue+d&&l>n+d&&l>i+d&&l>o+d||lt+l&&c>r+l&&c>a+l||ce+l&&s>n+l&&s>i+l||sn||u+li&&(i+=Tl);var f=Math.atan2(c,s);return f<0&&(f+=Tl),f>=r&&f<=i||f+Tl>=r&&f+Tl<=i}function Dl(e,t,n,r,i,a){if(a>t&&a>r||ai?s:0}var Ol=yl.CMD,kl=Math.PI*2,Al=1e-4;function jl(e,t){return Math.abs(e-t)t&&l>r&&l>a&&l>s||l1&&Pl(),p=lr(t,r,a,s,Nl[0]),f>1&&(m=lr(t,r,a,s,Nl[1]))),f===2?gt&&s>r&&s>a||s=0&&l<=1){for(var u=0,d=gr(t,r,a,l),f=0;fn||s<-n)return 0;var c=Math.sqrt(n*n-s*s);Ml[0]=-c,Ml[1]=c;var l=Math.abs(r-i);if(l<1e-4)return 0;if(l>=kl-1e-4){r=0,i=kl;var u=a?1:-1;return o>=Ml[0]+e&&o<=Ml[1]+e?u:0}if(r>i){var d=r;r=i,i=d}r<0&&(r+=kl,i+=kl);for(var f=0,p=0;p<2;p++){var m=Ml[p];if(m+e>o){var h=Math.atan2(s,m),u=a?1:-1;h<0&&(h=kl+h),(h>=r&&h<=i||h+kl>=r&&h+kl<=i)&&(h>Math.PI/2&&h1&&(n||(s+=Dl(c,l,u,d,r,i))),g&&(c=a[m],l=a[m+1],u=c,d=l),h){case Ol.M:u=a[m++],d=a[m++],c=u,l=d;break;case Ol.L:if(n){if(bl(c,l,a[m],a[m+1],t,r,i))return!0}else s+=Dl(c,l,a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case Ol.C:if(n){if(xl(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=Fl(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case Ol.Q:if(n){if(Sl(c,l,a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=Il(c,l,a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case Ol.A:var _=a[m++],v=a[m++],y=a[m++],b=a[m++],x=a[m++],S=a[m++];m+=1;var C=!!(1-a[m++]);f=Math.cos(x)*y+_,p=Math.sin(x)*b+v,g?(u=f,d=p):s+=Dl(c,l,f,p,r,i);var w=(r-_)*b/y+_;if(n){if(El(_,v,b,x,x+S,C,t,w,i))return!0}else s+=Ll(_,v,b,x,x+S,C,w,i);c=Math.cos(x+S)*y+_,l=Math.sin(x+S)*b+v;break;case Ol.R:u=c=a[m++],d=l=a[m++];var T=a[m++],E=a[m++];if(f=u+T,p=d+E,n){if(bl(u,d,f,d,t,r,i)||bl(f,d,f,p,t,r,i)||bl(f,p,u,p,t,r,i)||bl(u,p,u,d,t,r,i))return!0}else s+=Dl(f,d,f,p,r,i),s+=Dl(u,p,u,d,r,i);break;case Ol.Z:if(n){if(bl(c,l,u,d,t,r,i))return!0}else s+=Dl(c,l,u,d,r,i);c=u,l=d}}return!n&&!jl(l,d)&&(s+=Dl(c,l,u,d,r,i)||0),s!==0}function zl(e,t,n){return Rl(e,0,!1,t,n)}function Bl(e,t,n,r){return Rl(e,t,!0,n,r)}var Vl=he({fill:`#000`,stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:`butt`,miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Nc),Hl={style:he({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Pc.style)},Ul=sa.concat([`invisible`,`culling`,`z`,`z2`,`zlevel`,`parent`]),Wl=function(e){w(t,e);function t(t){return e.call(this,t)||this}return t.prototype.update=function(){var n=this;e.prototype.update.call(this);var r=this.style;if(r.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(e){n.buildPath(e,n.shape)}),i.silent=!0;var a=i.style;for(var o in r)a[o]!==r[o]&&(a[o]=r[o]);a.fill=r.fill?r.decal:null,a.decal=null,a.shadowColor=null,r.strokeFirst&&(a.stroke=null);for(var s=0;s.5?Yi:t>.2?Zi:Xi}if(e)return Xi}return Yi},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(W(t)){var n=this.__zr;if(!!(n&&n.isDarkMode())==Zr(e,0)<.4)return t}},t.prototype.buildPath=function(e,t,n){},t.prototype.pathUpdated=function(){this.__dirty&=-5},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new yl(!1)},t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style.fill;return e!=null&&e!==`none`},t.prototype.getBoundingRect=function(){var e=this._rect,t=this.style,n=!e;if(n){var r=!1;this.path||(r=!0,this.createPathProxy());var i=this.path;(r||this.__dirty&4)&&(i.beginPath(),this.buildPath(i,this.shape,!1),this.pathUpdated()),e=i.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var a=this._rectStroke||=e.clone();if(this.__dirty||n){a.copy(e);var o=t.strokeNoScale?this.getLineScale():1,s=t.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;s=Math.max(s,c??4)}o>1e-10&&(a.width+=s/o,a.height+=s/o,a.x-=s/o/2,a.y-=s/o/2)}return a}return e},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect(),i=this.style;if(e=n[0],t=n[1],r.contain(e,t)){var a=this.path;if(this.hasStroke()){var o=i.lineWidth,s=i.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),Bl(a,o/s,e,t)))return!0}if(this.hasFill())return zl(a,e,t)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&=null,this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate(`shape`,e)},t.prototype.updateDuringAnimation=function(e){e===`style`?this.dirtyStyle():e===`shape`?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(t,n){t===`shape`?this.setShape(n):e.prototype.attrKV.call(this,t,n)},t.prototype.setShape=function(e,t){var n=this.shape;return n||=this.shape={},typeof e==`string`?n[e]=t:R(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&4)},t.prototype.createStyle=function(e){return Je(Vl,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=R({},this.shape))},t.prototype._applyStateObj=function(t,n,r,i,a,o){if(e.prototype._applyStateObj.call(this,t,n,r,i,a,o),this.__inHover!==1){var s=!(n&&i),c;if(n&&n.shape?a?i?c=n.shape:(c=R({},r.shape),R(c,n.shape)):(c=R({},i?this.shape:r.shape),R(c,n.shape)):s&&(c=r.shape),c){if(a){this.shape=R({},this.shape);for(var l={},u=Ce(c),d=0;di&&(d=s+c,s*=i/d,c*=i/d),l+u>i&&(d=l+u,l*=i/d,u*=i/d),c+l>a&&(d=c+l,c*=a/d,l*=a/d),s+u>a&&(d=s+u,s*=a/d,u*=a/d),e.moveTo(n+s,r),e.lineTo(n+i-c,r),c!==0&&e.arc(n+i-c,r+c,c,-Math.PI/2,0),e.lineTo(n+i,r+a-l),l!==0&&e.arc(n+i-l,r+a-l,l,0,Math.PI/2),e.lineTo(n+u,r+a),u!==0&&e.arc(n+u,r+a-u,u,Math.PI/2,Math.PI),e.lineTo(n,r+s),s!==0&&e.arc(n+s,r+s,s,Math.PI,Math.PI*1.5),e.closePath()}var Ql=Math.round;function $l(e,t,n){if(t){var r=t.x1,i=t.x2,a=t.y1,o=t.y2;e.x1=r,e.x2=i,e.y1=a,e.y2=o;var s=n&&n.lineWidth;return s&&(Ql(r*2)===Ql(i*2)&&(e.x1=e.x2=tu(r,s,!0)),Ql(a*2)===Ql(o*2)&&(e.y1=e.y2=tu(a,s,!0))),e}}function eu(e,t,n){if(t){var r=t.x,i=t.y,a=t.width,o=t.height;e.x=r,e.y=i,e.width=a,e.height=o;var s=n&&n.lineWidth;return s&&(e.x=tu(r,s,!0),e.y=tu(i,s,!0),e.width=Math.max(tu(r+a,s,!1)-e.x,a===0?0:1),e.height=Math.max(tu(i+o,s,!1)-e.y,o===0?0:1)),e}}function tu(e,t,n){if(!t)return e;var r=Ql(e*2);return(r+Ql(t))%2==0?r/2:(r+(n?1:-1))/2}var nu=function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e}(),ru={},iu=function(e){w(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new nu},t.prototype.buildPath=function(e,t){var n,r,i,a;if(this.subPixelOptimize){var o=eu(ru,t,this.style);n=o.x,r=o.y,i=o.width,a=o.height,o.r=t.r,t=o}else n=t.x,r=t.y,i=t.width,a=t.height;t.r?Zl(e,t):e.rect(n,r,i,a)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(Wl);iu.prototype.type=`rect`;var au={fill:`#000`},ou=2,su={},cu={style:he({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},Pc.style)},lu=function(e){w(t,e);function t(t){var n=e.call(this)||this;return n.type=`text`,n._children=[],n._defaultStyle=au,n.attr(t),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t0,T=0;T=0&&(D=y[E],D.align===`right`);)this._placeToken(D,e,x,m,T,`right`,g),S-=D.width,T-=D.width,E--;for(w+=(s-(w-p)-(h-T)-S)/2;C<=E;)D=y[C],this._placeToken(D,e,x,m,w+D.width/2,`center`,g),w+=D.width,C++;m+=x}},t.prototype._placeToken=function(e,t,n,r,i,a,o){var s=t.rich[e.styleName]||{};s.text=e.text;var c=e.verticalAlign,l=r+n/2;c===`top`?l=r+e.height/2:c===`bottom`&&(l=r+n-e.height/2),!e.isLineHolder&&Su(s)&&this._renderBackground(s,t,a===`right`?i-e.width:a===`center`?i-e.width/2:i,l-e.height/2,e.width,e.height);var u=!!s.backgroundColor,d=e.textPadding;d&&(i=bu(i,a,d),l-=e.height/2-d[0]-e.innerHeight/2);var f=this._getOrCreateChild(Kl),p=f.createStyle();f.useStyle(p);var m=this._defaultStyle,h=!1,g=0,_=!1,v=yu(`fill`in s?s.fill:`fill`in t?t.fill:(h=!0,m.fill)),y=vu(`stroke`in s?s.stroke:`stroke`in t?t.stroke:!u&&!o&&(!m.autoStroke||h)?(g=ou,_=!0,m.stroke):null),b=s.textShadowBlur>0||t.textShadowBlur>0;p.text=e.text,p.x=i,p.y=l,b&&(p.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,p.shadowColor=s.textShadowColor||t.textShadowColor||`transparent`,p.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,p.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),p.textAlign=a,p.textBaseline=`middle`,p.font=e.font||`12px sans-serif`,p.opacity=Fe(s.opacity,t.opacity,1),mu(p,s),y&&(p.lineWidth=Fe(s.lineWidth,t.lineWidth,g),p.lineDash=K(s.lineDash,t.lineDash),p.lineDashOffset=t.lineDashOffset||0,p.stroke=y),v&&(p.fill=v),f.setBoundingRect(Ac(p,e.contentWidth,e.contentHeight,_?0:null))},t.prototype._renderBackground=function(e,t,n,r,i,a){var o=e.backgroundColor,s=e.borderWidth,c=e.borderColor,l=o&&o.image,u=o&&!l,d=e.borderRadius,f=this,p,m;if(u||e.lineHeight||s&&c){p=this._getOrCreateChild(iu),p.useStyle(p.createStyle()),p.style.fill=null;var h=p.shape;h.x=n,h.y=r,h.width=i,h.height=a,h.r=d,p.dirtyShape()}if(u){var g=p.style;g.fill=o||null,g.fillOpacity=K(e.fillOpacity,1)}else if(l){m=this._getOrCreateChild(Xl),m.onload=function(){f.dirtyStyle()};var _=m.style;_.image=o.image,_.x=n,_.y=r,_.width=i,_.height=a}if(s&&c){var g=p.style;g.lineWidth=s,g.stroke=c,g.strokeOpacity=K(e.strokeOpacity,1),g.lineDash=e.borderDash,g.lineDashOffset=e.borderDashOffset||0,p.strokeContainThreshold=0,p.hasFill()&&p.hasStroke()&&(g.strokeFirst=!0,g.lineWidth*=2)}var v=(p||m).style;v.shadowBlur=e.shadowBlur||0,v.shadowColor=e.shadowColor||`transparent`,v.shadowOffsetX=e.shadowOffsetX||0,v.shadowOffsetY=e.shadowOffsetY||0,v.opacity=Fe(e.opacity,t.opacity,1)},t.makeFont=function(e){var t=``;return hu(e)&&(t=[e.fontStyle,e.fontWeight,pu(e.fontSize),e.fontFamily||`sans-serif`].join(` `)),t&&ze(t)||e.textFont||e.font},t}(Lc),uu={left:!0,right:1,center:1},du={top:1,bottom:1,middle:1},fu=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`];function pu(e){return typeof e==`string`&&(e.indexOf(`px`)!==-1||e.indexOf(`rem`)!==-1||e.indexOf(`em`)!==-1)?e:isNaN(+e)?`12px`:e+`px`}function mu(e,t){for(var n=0;n=0,a=!1;if(e instanceof Wl){var o=Ru(e),s=i&&o.selectFill||o.normalFill,c=i&&o.selectStroke||o.normalStroke;if(Ju(s)||Ju(c)){r||={};var l=r.style||{};l.fill===`inherit`?(a=!0,r=R({},r),l=R({},l),l.fill=s):!Ju(l.fill)&&Ju(s)?(a=!0,r=R({},r),l=R({},l),l.fill=$r(s)):!Ju(l.stroke)&&Ju(c)&&(a||(r=R({},r),l=R({},l)),l.stroke=$r(c)),r.style=l}}if(r&&r.z2==null){a||(r=R({},r));var u=e.z2EmphasisLift;r.z2=e.z2+(u??10)}return r}function sd(e,t,n){if(n&&n.z2==null){n=R({},n);var r=e.z2SelectLift;n.z2=e.z2+(r??9)}return n}function cd(e,t,n){var r=ge(e.currentStates,t)>=0,i=e.style.opacity,a=r?null:ad(e,[`opacity`],t,{opacity:1});n||={};var o=n.style||{};return o.opacity??(n=R({},n),o=R({opacity:r?i:a.opacity*.1},o),n.style=o),n}function ld(e,t){var n=this.states[e];if(this.style){if(e===`emphasis`)return od(this,e,t,n);if(e===`blur`)return cd(this,e,n);if(e===`select`)return sd(this,e,n)}return n}function ud(e){e.stateProxy=ld;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=ld),n&&(n.stateProxy=ld)}function dd(e,t){!yd(e,t)&&!e.__highByOuter&&rd(e,Xu)}function fd(e,t){!yd(e,t)&&!e.__highByOuter&&rd(e,Zu)}function pd(e,t){e.__highByOuter|=1<<(t||0),rd(e,Xu)}function md(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&rd(e,Zu)}function hd(e){rd(e,Qu)}function gd(e){rd(e,$u)}function _d(e){rd(e,ed)}function vd(e){rd(e,td)}function yd(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function bd(e){var t=e.getModel(),n=[],r=[];t.eachComponent(function(t,i){var a=zu(i),o=Fu(e,i),s=t===`series`;!s&&r.push(o),a.isBlured&&(o.group.traverse(function(e){$u(e)}),s&&n.push(i)),a.isBlured=!1}),z(r,function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)})}function xd(e,t,n,r){var i=r.getModel();n||=`coordinateSystem`;function a(e,t){for(var n=0;n0){var a={dataIndex:i,seriesIndex:e.seriesIndex};r!=null&&(a.dataType=r),t.push(a)}})}),t}function Ad(e,t,n){Ld(e,!0),rd(e,ud),Nd(e,t,n)}function jd(e){Ld(e,!1)}function Md(e,t,n,r){r?jd(e):Ad(e,t,n)}function Nd(e,t,n){var r=Cu(e);t==null?r.focus&&=null:(r.focus=t,r.blurScope=n)}var Pd=[`emphasis`,`blur`,`select`],Fd={itemStyle:`getItemStyle`,lineStyle:`getLineStyle`,areaStyle:`getAreaStyle`};function Id(e,t,n,r){n||=`itemStyle`;for(var i=0;i1&&(o*=Jd(m),s*=Jd(m));var h=(i===a?-1:1)*Jd((o*o*(s*s)-o*o*(p*p)-s*s*(f*f))/(o*o*(p*p)+s*s*(f*f)))||0,g=h*o*p/s,_=h*-s*f/o,v=(e+n)/2+Xd(d)*g-Yd(d)*_,y=(t+r)/2+Yd(d)*g+Xd(d)*_,b=ef([1,0],[(f-g)/o,(p-_)/s]),x=[(f-g)/o,(p-_)/s],S=[(-1*f-g)/o,(-1*p-_)/s],C=ef(x,S);if($d(x,S)<=-1&&(C=Zd),$d(x,S)>=1&&(C=0),C<0){var w=Math.round(C/Zd*1e6)/1e6;C=Zd*2+w%2*Zd}u.addData(l,v,y,o,s,b,C,d,a)}var nf=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,rf=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function af(e){var t=new yl;if(!e)return t;var n=0,r=0,i=n,a=r,o,s=yl.CMD,c=e.match(nf);if(!c)return t;for(var l=0;lA*A+j*j&&(w=E,T=D),{cx:w,cy:T,x0:-u,y0:-d,x1:w*(i/x-1),y1:T*(i/x-1)}}function kf(e){var t;if(H(e)){var n=e.length;if(!n)return e;t=n===1?[e[0],e[0],0,0]:n===2?[e[0],e[0],e[1],e[1]]:n===3?e.concat(e[2]):e}else t=[e,e,e,e];return t}function Af(e,t){var n,r=wf(t.r,0),i=wf(t.r0||0,0),a=r>0;if(a||i>0){if(a||(r=i,i=0),i>r){var o=r;r=i,i=o}var s=t.startAngle,c=t.endAngle;if(!(isNaN(s)||isNaN(c))){var l=t.cx,u=t.cy,d=!!t.clockwise,f=Sf(c-s),p=f>_f&&f%_f;if(p>Ef&&(f=p),!(r>Ef))e.moveTo(l,u);else if(f>_f-Ef)e.moveTo(l+r*yf(s),u+r*vf(s)),e.arc(l,u,r,s,c,!d),i>Ef&&(e.moveTo(l+i*yf(c),u+i*vf(c)),e.arc(l,u,i,c,s,d));else{var m=void 0,h=void 0,g=void 0,_=void 0,v=void 0,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0,w=void 0,T=void 0,E=void 0,D=void 0,O=void 0,k=void 0,A=r*yf(s),j=r*vf(s),M=i*yf(c),ee=i*vf(c),N=f>Ef;if(N){var P=t.cornerRadius;P&&(n=kf(P),m=n[0],h=n[1],g=n[2],_=n[3]);var te=Sf(r-i)/2;if(v=Tf(te,g),y=Tf(te,_),b=Tf(te,m),x=Tf(te,h),w=S=wf(v,y),T=C=wf(b,x),(S>Ef||C>Ef)&&(E=r*yf(c),D=r*vf(c),O=i*yf(s),k=i*vf(s),fEf){var le=Tf(g,w),ue=Tf(_,w),F=Of(O,k,A,j,r,le,d),de=Of(E,D,M,ee,r,ue,d);e.moveTo(l+F.cx+F.x0,u+F.cy+F.y0),w0&&e.arc(l+F.cx,u+F.cy,le,xf(F.y0,F.x0),xf(F.y1,F.x1),!d),e.arc(l,u,r,xf(F.cy+F.y1,F.cx+F.x1),xf(de.cy+de.y1,de.cx+de.x1),!d),ue>0&&e.arc(l+de.cx,u+de.cy,ue,xf(de.y1,de.x1),xf(de.y0,de.x0),!d))}else e.moveTo(l+A,u+j),e.arc(l,u,r,s,c,!d);if(!(i>Ef)||!N)e.lineTo(l+M,u+ee);else if(T>Ef){var le=Tf(m,T),ue=Tf(h,T),F=Of(M,ee,E,D,i,-ue,d),de=Of(A,j,O,k,i,-le,d);e.lineTo(l+F.cx+F.x0,u+F.cy+F.y0),T0&&e.arc(l+F.cx,u+F.cy,ue,xf(F.y0,F.x0),xf(F.y1,F.x1),!d),e.arc(l,u,i,xf(F.cy+F.y1,F.cx+F.x1),xf(de.cy+de.y1,de.cx+de.x1),d),le>0&&e.arc(l+de.cx,u+de.cy,le,xf(de.y1,de.x1),xf(de.y0,de.x0),!d))}else e.lineTo(l+M,u+ee),e.arc(l,u,i,c,s,d)}e.closePath()}}}var jf=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return e}(),Mf=function(e){w(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new jf},t.prototype.buildPath=function(e,t){Af(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(Wl);Mf.prototype.type=`sector`;var Nf=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e}(),Pf=function(e){w(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Nf},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.PI*2;e.moveTo(n+t.r,r),e.arc(n,r,t.r,0,i,!1),e.moveTo(n+t.r0,r),e.arc(n,r,t.r0,0,i,!0)},t}(Wl);Pf.prototype.type=`ring`;function Ff(e,t,n,r){var i=[],a=[],o=[],s=[],c,l,u,d;if(r){u=[1/0,1/0],d=[-1/0,-1/0];for(var f=0,p=e.length;f=2){if(r){var a=Ff(i,r,n,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(n?o:o-1);s++){var c=a[s*2],l=a[s*2+1],u=i[(s+1)%o];e.bezierCurveTo(c[0],c[1],l[0],l[1],u[0],u[1])}}else{e.moveTo(i[0][0],i[0][1]);for(var s=1,d=i.length;srp[1]){if(i=!1,ip.negativeSize||n)return i;var s=tp(rp[0]-np[1]),c=tp(np[0]-rp[1]);$f(s,c)>op.len()&&(s=c||!ip.bidirectional)&&(J.scale(ap,o,-c*r),ip.useDir&&ip.calcDirMTV()))}}return i},e.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var r=this._axes[e],i=this._origin,a=t[0].dot(r)+i[e],o=a,s=a,c=1;c0){var d=u.duration,f=u.delay,p=u.easing,m={duration:d,delay:f||0,easing:p,done:a,force:!!a||!!o,setToFinal:!l,scope:e,during:o};s?t.animateFrom(n,m):t.animateTo(n,m)}else t.stopAnimation(),!s&&t.attr(n),o&&o(1),a&&a()}function pp(e,t,n,r,i,a){fp(`update`,e,t,n,r,i,a)}function mp(e,t,n,r,i,a){fp(`enter`,e,t,n,r,i,a)}function hp(e){if(!e.__zr)return!0;for(var t=0;tJf,BezierCurve:()=>Kf,BoundingRect:()=>Y,Circle:()=>pf,CompoundPath:()=>Yf,Ellipse:()=>hf,Group:()=>Ba,HOVER_LAYER_FOR_INCREMENTAL:()=>2,HOVER_LAYER_FROM_THRESHOLD:()=>1,HOVER_LAYER_NO:()=>0,Image:()=>Xl,IncrementalDisplayable:()=>lp,Line:()=>Uf,LinearGradient:()=>Zf,OrientedBoundingRect:()=>sp,Path:()=>Wl,Point:()=>J,Polygon:()=>Rf,Polyline:()=>Bf,RadialGradient:()=>Qf,Rect:()=>iu,Ring:()=>Pf,Sector:()=>Mf,Text:()=>lu,WH:()=>Cp,XY:()=>Sp,applyTransform:()=>Rp,calcZ2Range:()=>sm,clipPointsByRect:()=>Up,clipRectByRect:()=>Wp,createIcon:()=>Gp,decomposeTransform:()=>dm,ensureCopyRect:()=>im,ensureCopyTransform:()=>am,expandOrShrinkRect:()=>Xp,extendPath:()=>Ep,extendShape:()=>wp,getCurrentCanvasPainter:()=>pm,getShapeClass:()=>Op,getTransform:()=>Lp,groupTransition:()=>Hp,initProps:()=>mp,isBoundingRectAxisAligned:()=>nm,isElementRemoved:()=>hp,lineLineIntersect:()=>qp,linePolygonIntersect:()=>Kp,makeImage:()=>Ap,makePath:()=>kp,mergePath:()=>Mp,payloadDisableAnimation:()=>um,registerShape:()=>Dp,removeElement:()=>gp,removeElementWithFadeOut:()=>vp,resizePath:()=>Np,retrieveZInfo:()=>om,setTooltipConfig:()=>$p,subPixelOptimize:()=>Ip,subPixelOptimizeLine:()=>Pp,subPixelOptimizeRect:()=>Fp,transformDirection:()=>zp,traverseElements:()=>tm,traverseUpdateZ:()=>cm,updateProps:()=>pp}),xp={},Sp=[`x`,`y`],Cp=[`width`,`height`];function wp(e){return Wl.extend(e)}var Tp=uf;function Ep(e,t){return Tp(e,t)}function Dp(e,t){xp[e]=t}function Op(e){if(xp.hasOwnProperty(e))return xp[e]}function kp(e,t,n,r){var i=lf(e,t);return n&&(r===`center`&&(n=jp(n,i.getBoundingRect())),Np(i,n)),i}function Ap(e,t,n){var r=new Xl({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if(n===`center`){var i={width:e.width,height:e.height};r.setStyle(jp(t,i))}}});return r}function jp(e,t){var n=t.width/t.height,r=e.height*n,i;r<=e.width?i=e.height:(r=e.width,i=r/n);var a=e.x+e.width/2,o=e.y+e.height/2;return{x:a-r/2,y:o-i/2,width:r,height:i}}var Mp=df;function Np(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function Pp(e,t){return $l(e,e,{lineWidth:t}),e}function Fp(e,t){return eu(e,e,t),e}var Ip=tu;function Lp(e,t){for(var n=Xt([]);e&&e!==t;)Qt(n,e.getLocalTransform(),n),e=e.parent;return n}function Rp(e,t,n){return t&&!ye(t)&&(t=aa.getLocalTransform(t)),n&&(t=nn([],t)),pt([],e,t)}function zp(e,t,n){var r=t[4]===0||t[5]===0||t[0]===0?1:$a(2*t[4]/t[0]),i=t[4]===0||t[5]===0||t[2]===0?1:$a(2*t[4]/t[2]),a=[e===`left`?-r:e===`right`?r:0,e===`top`?-i:e===`bottom`?i:0];return a=Rp(a,t,n),$a(a[0])>$a(a[1])?a[0]>0?`right`:`left`:a[1]>0?`bottom`:`top`}function Bp(e){return!e.isGroup}function Vp(e){return e.shape!=null}function Hp(e,t,n){if(!e||!t)return;function r(e){var t={};return e.traverse(function(e){Bp(e)&&e.anid&&(t[e.anid]=e)}),t}function i(e){var t={x:e.x,y:e.y,rotation:e.rotation};return Vp(e)&&(t.shape=I(e.shape)),t}var a=r(e);t.traverse(function(e){if(Bp(e)&&e.anid){var t=a[e.anid];if(t){var r=i(e);e.attr(i(t)),pp(e,r,n,Cu(e).dataIndex)}}})}function Up(e,t){return B(e,function(e){var n=e[0];n=Qa(n,t.x),n=Za(n,t.x+t.width);var r=e[1];return r=Qa(r,t.y),r=Za(r,t.y+t.height),[n,r]})}function Wp(e,t){var n=Qa(e.x,t.x),r=Za(e.x+e.width,t.x+t.width),i=Qa(e.y,t.y),a=Za(e.y+e.height,t.y+t.height);if(r>=n&&a>=i)return{x:n,y:i,width:r-n,height:a-i}}function Gp(e,t,n){var r=R({rectHover:!0},t),i=r.style={strokeNoScale:!0};if(n||={x:-1,y:-1,width:2,height:2},e)return e.indexOf(`image://`)===0?(i.image=e.slice(8),he(i,n),new Xl(r)):kp(e.replace(`path://`,``),r,n,`center`)}function Kp(e,t,n,r,i){for(var a=0,o=i[i.length-1];a1)return!1;var g=Jp(p,m,u,d)/f;return!(g<0||g>1)}function Jp(e,t,n,r){return e*r-n*t}function Yp(e){return e<=1e-6&&e>=-1e-6}function Xp(e,t,n,r,i){return t==null||(De(t)?Zp[0]=Zp[1]=Zp[2]=Zp[3]=t:(Zp[0]=t[0],Zp[1]=t[1],Zp[2]=t[2],Zp[3]=t[3]),r&&(Zp[0]=Qa(0,Zp[0]),Zp[1]=Qa(0,Zp[1]),Zp[2]=Qa(0,Zp[2]),Zp[3]=Qa(0,Zp[3])),n&&(Zp[0]=-Zp[0],Zp[1]=-Zp[1],Zp[2]=-Zp[2],Zp[3]=-Zp[3]),Qp(e,Zp,`x`,`width`,3,1,i&&i[0]||0),Qp(e,Zp,`y`,`height`,0,2,i&&i[1]||0)),e}var Zp=[0,0,0,0];function Qp(e,t,n,r,i,a,o){var s=t[a]+t[i],c=e[r];e[r]+=s,o=Qa(0,Za(o,c)),e[r]=0?-t[i]:t[a]>=0?c+t[a]:$a(s)>1e-8?(c-o)*t[i]/s:0):e[n]-=t[i]}function $p(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,i=W(t)?{formatter:t}:t,a=n.mainType,o=n.componentIndex,s={componentType:a,name:r,$vars:[`name`]};s[a+`Index`]=o;var c=e.formatterParamsExtra;c&&z(Ce(c),function(e){Xe(s,e)||(s[e]=c[e],s.$vars.push(e))});var l=Cu(e.el);l.componentMainType=a,l.componentIndex=o,l.tooltipConfig={name:r,option:he({content:r,encodeHTMLContent:!0,formatterParams:s},i)}}function em(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function tm(e,t){if(e){if(H(e))for(var n=0;nt&&(t=r),rt&&(n=t=0),{min:n,max:t}}function cm(e,t,n){lm(e,t,n,-1/0)}function lm(e,t,n,r){if(e.ignoreModelZ)return r;var i=e.getTextContent(),a=e.getTextGuideLine();if(e.isGroup)for(var o=e.childrenRef(),s=0;s=0&&n.push(e)}),n}}function Gm(e,t){return L(L({},e,!0),t,!0)}var Km={time:{month:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],monthAbbr:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],dayOfWeek:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],dayOfWeekAbbr:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`]},legend:{selector:{all:`All`,inverse:`Inv`}},toolbox:{brush:{title:{rect:`Box Select`,polygon:`Lasso Select`,lineX:`Horizontally Select`,lineY:`Vertically Select`,keep:`Keep Selections`,clear:`Clear Selections`}},dataView:{title:`Data View`,lang:[`Data View`,`Close`,`Refresh`]},dataZoom:{title:{zoom:`Zoom`,back:`Zoom Reset`}},magicType:{title:{line:`Switch to Line Chart`,bar:`Switch to Bar Chart`,stack:`Stack`,tiled:`Tile`}},restore:{title:`Restore`},saveAsImage:{title:`Save as Image`,lang:[`Right Click to Save Image`]}},series:{typeNames:{pie:`Pie chart`,bar:`Bar chart`,line:`Line chart`,scatter:`Scatter plot`,effectScatter:`Ripple scatter plot`,radar:`Radar chart`,tree:`Tree`,treemap:`Treemap`,boxplot:`Boxplot`,candlestick:`Candlestick`,k:`K line chart`,heatmap:`Heat map`,map:`Map`,parallel:`Parallel coordinate map`,lines:`Line graph`,graph:`Relationship graph`,sankey:`Sankey diagram`,funnel:`Funnel chart`,gauge:`Gauge`,pictorialBar:`Pictorial bar`,themeRiver:`Theme River Map`,sunburst:`Sunburst`,custom:`Custom chart`,chart:`Chart`}},aria:{general:{withTitle:`This is a chart about "{title}"`,withoutTitle:`This is a chart`},series:{single:{prefix:``,withName:` with type {seriesType} named {seriesName}.`,withoutName:` with type {seriesType}.`},multiple:{prefix:`. It consists of {seriesCount} series count.`,withName:` The {seriesId} series is a {seriesType} representing {seriesName}.`,withoutName:` The {seriesId} series is a {seriesType}.`,separator:{middle:``,end:``}}},data:{allData:`The data is as follows: `,partialData:`The first {displayCnt} items are: `,withName:`the data for {name} is {value}`,withoutName:`{value}`,separator:{middle:`, `,end:`. `}}}},qm={time:{month:[`一月`,`二月`,`三月`,`四月`,`五月`,`六月`,`七月`,`八月`,`九月`,`十月`,`十一月`,`十二月`],monthAbbr:[`1月`,`2月`,`3月`,`4月`,`5月`,`6月`,`7月`,`8月`,`9月`,`10月`,`11月`,`12月`],dayOfWeek:[`星期日`,`星期一`,`星期二`,`星期三`,`星期四`,`星期五`,`星期六`],dayOfWeekAbbr:[`日`,`一`,`二`,`三`,`四`,`五`,`六`]},legend:{selector:{all:`全选`,inverse:`反选`}},toolbox:{brush:{title:{rect:`矩形选择`,polygon:`圈选`,lineX:`横向选择`,lineY:`纵向选择`,keep:`保持选择`,clear:`清除选择`}},dataView:{title:`数据视图`,lang:[`数据视图`,`关闭`,`刷新`]},dataZoom:{title:{zoom:`区域缩放`,back:`区域缩放还原`}},magicType:{title:{line:`切换为折线图`,bar:`切换为柱状图`,stack:`切换为堆叠`,tiled:`切换为平铺`}},restore:{title:`还原`},saveAsImage:{title:`保存为图片`,lang:[`右键另存为图片`]}},series:{typeNames:{pie:`饼图`,bar:`柱状图`,line:`折线图`,scatter:`散点图`,effectScatter:`涟漪散点图`,radar:`雷达图`,tree:`树图`,treemap:`矩形树图`,boxplot:`箱型图`,candlestick:`K线图`,k:`K线图`,heatmap:`热力图`,map:`地图`,parallel:`平行坐标图`,lines:`线图`,graph:`关系图`,sankey:`桑基图`,funnel:`漏斗图`,gauge:`仪表盘图`,pictorialBar:`象形柱图`,themeRiver:`主题河流图`,sunburst:`旭日图`,custom:`自定义图表`,chart:`图表`}},aria:{general:{withTitle:`这是一个关于“{title}”的图表。`,withoutTitle:`这是一个图表,`},series:{single:{prefix:``,withName:`图表类型是{seriesType},表示{seriesName}。`,withoutName:`图表类型是{seriesType}。`},multiple:{prefix:`它由{seriesCount}个图表系列组成。`,withName:`第{seriesId}个系列是一个表示{seriesName}的{seriesType},`,withoutName:`第{seriesId}个系列是一个{seriesType},`,separator:{middle:`;`,end:`。`}}},data:{allData:`其数据是——`,partialData:`其中,前{displayCnt}项是——`,withName:`{name}的数据是{value}`,withoutName:`{value}`,separator:{middle:`,`,end:``}}}},Jm=`ZH`,Ym=`EN`,Xm=Ym,Zm={},Qm={},$m=E.domSupported?function(){return(document.documentElement.lang||navigator.language||navigator.browserLanguage||Xm).toUpperCase().indexOf(Jm)>-1?Jm:Xm}():Xm;function eh(e,t){e=e.toUpperCase(),Qm[e]=new Bm(t),Zm[e]=t}function th(e){if(W(e)){var t=Zm[e.toUpperCase()]||{};return e===Jm||e===Ym?I(t):L(I(t),I(Zm[Xm]),!1)}return L(I(e),I(Zm[Xm]),!1)}function nh(e){return Qm[e]}function rh(){return Qm[Xm]}eh(Ym,Km),eh(Jm,qm);var ih=null;function ah(){return ih}function oh(e,t){var n=ah(),r=t.breakOption,i=t.breakParsed;return!i&&n&&(i=n.parseAxisBreakOption(r,e)),i}function sh(e){var t=e.brk;return t?t.breaks:[]}function ch(e){var t=e.brk;return t?t.hasBreaks():!1}var lh=1e3,uh=lh*60,dh=uh*60,fh=dh*24,ph=fh*365,mh={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},hh={year:`{yyyy}`,month:`{MMM}`,day:`{d}`,hour:`{HH}:{mm}`,minute:`{HH}:{mm}`,second:`{HH}:{mm}:{ss}`,millisecond:`{HH}:{mm}:{ss} {SSS}`},gh=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}`,_h=`{yyyy}-{MM}-{dd}`,vh={year:`{yyyy}`,month:`{yyyy}-{MM}`,day:_h,hour:_h+` `+hh.hour,minute:_h+` `+hh.minute,second:_h+` `+hh.second,millisecond:gh},yh=[`year`,`month`,`day`,`hour`,`minute`,`second`,`millisecond`],bh=[`year`,`half-year`,`quarter`,`month`,`week`,`half-week`,`day`,`half-day`,`quarter-day`,`hour`,`minute`,`second`,`millisecond`];function xh(e){return!W(e)&&!U(e)?Sh(e):e}function Sh(e){e||={};var t={},n=!0;return z(yh,function(t){n&&=e[t]==null}),z(yh,function(r,i){var a=e[r];t[r]={};for(var o=null,s=i;s>=0;s--){var c=yh[s],l=G(a)&&!H(a)?a[c]:a,u=void 0;H(l)?(u=l.slice(),o=u[0]||``):W(l)?(o=l,u=[o]):(o==null?o=hh[r]:mh[c].test(o)||(o=t[c][c][0]+` `+o),u=[o],n&&(u[1]=`{primary|`+o+`}`)),t[r][c]=u}}),t}function Ch(e,t){return e+=``,`0000`.substr(0,t-e.length)+e}function wh(e){switch(e){case`half-year`:case`quarter`:return`month`;case`week`:case`half-week`:return`day`;case`half-day`:case`quarter-day`:return`hour`;default:return e}}function Th(e){return e===wh(e)}function Eh(e){switch(e){case`year`:case`month`:return`day`;case`millisecond`:return`millisecond`;default:return`second`}}function Dh(e,t,n,r){var i=To(e),a=i[jh(n)](),o=i[Mh(n)]()+1,s=Math.floor((o-1)/3)+1,c=i[Nh(n)](),l=i[`get`+(n?`UTC`:``)+`Day`](),u=i[Ph(n)](),d=(u-1)%12+1,f=i[Fh(n)](),p=i[Ih(n)](),m=i[Lh(n)](),h=u>=12?`pm`:`am`,g=h.toUpperCase(),_=(r instanceof Bm?r:nh(r||$m)||rh()).getModel(`time`),v=_.get(`month`),y=_.get(`monthAbbr`),b=_.get(`dayOfWeek`),x=_.get(`dayOfWeekAbbr`);return(t||``).replace(/{a}/g,h+``).replace(/{A}/g,g+``).replace(/{yyyy}/g,a+``).replace(/{yy}/g,Ch(a%100+``,2)).replace(/{Q}/g,s+``).replace(/{MMMM}/g,v[o-1]).replace(/{MMM}/g,y[o-1]).replace(/{MM}/g,Ch(o,2)).replace(/{M}/g,o+``).replace(/{dd}/g,Ch(c,2)).replace(/{d}/g,c+``).replace(/{eeee}/g,b[l]).replace(/{ee}/g,x[l]).replace(/{e}/g,l+``).replace(/{HH}/g,Ch(u,2)).replace(/{H}/g,u+``).replace(/{hh}/g,Ch(d+``,2)).replace(/{h}/g,d+``).replace(/{mm}/g,Ch(f,2)).replace(/{m}/g,f+``).replace(/{ss}/g,Ch(p,2)).replace(/{s}/g,p+``).replace(/{SSS}/g,Ch(m,3)).replace(/{S}/g,m+``)}function Oh(e,t,n,r,i){var a=null;if(W(n))a=n;else if(U(n)){var o={time:e.time,level:e.time?e.time.level:0},s=ah();s&&s.makeAxisLabelFormatterParamBreak(o,e.break),a=n(e.value,t,o)}else{var c=e.time;if(c){var l=n[c.lowerTimeUnit][c.upperTimeUnit];a=l[Math.min(c.level,l.length-1)]||``}else{var u=kh(e.value,i);a=n[u][u][0]}}return Dh(new Date(e.value),a,i,r)}function kh(e,t){var n=To(e),r=n[Mh(t)]()+1,i=n[Nh(t)](),a=n[Ph(t)](),o=n[Fh(t)](),s=n[Ih(t)](),c=n[Lh(t)]()===0,l=c&&s===0,u=l&&o===0,d=u&&a===0,f=d&&i===1;return f&&r===1?`year`:f?`month`:d?`day`:u?`hour`:l?`minute`:c?`second`:`millisecond`}function Ah(e,t,n){switch(t){case`year`:e[zh(n)](0);case`month`:e[Bh(n)](1);case`day`:e[Vh(n)](0);case`hour`:e[Hh(n)](0);case`minute`:e[Uh(n)](0);case`second`:e[Wh(n)](0)}return e}function jh(e){return e?`getUTCFullYear`:`getFullYear`}function Mh(e){return e?`getUTCMonth`:`getMonth`}function Nh(e){return e?`getUTCDate`:`getDate`}function Ph(e){return e?`getUTCHours`:`getHours`}function Fh(e){return e?`getUTCMinutes`:`getMinutes`}function Ih(e){return e?`getUTCSeconds`:`getSeconds`}function Lh(e){return e?`getUTCMilliseconds`:`getMilliseconds`}function Rh(e){return e?`setUTCFullYear`:`setFullYear`}function zh(e){return e?`setUTCMonth`:`setMonth`}function Bh(e){return e?`setUTCDate`:`setDate`}function Vh(e){return e?`setUTCHours`:`setHours`}function Hh(e){return e?`setUTCMinutes`:`setMinutes`}function Uh(e){return e?`setUTCSeconds`:`setSeconds`}function Wh(e){return e?`setUTCMilliseconds`:`setMilliseconds`}function Gh(e){if(!jo(e))return W(e)?e:`-`;var t=(e+``).split(`.`);return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,`$1,`)+(t.length>1?`.`+t[1]:``)}function Kh(e,t){return e=(e||``).toLowerCase().replace(/-(.)/g,function(e,t){return t.toUpperCase()}),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var qh=Le;function Jh(e,t,n){var r=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}`;function i(e){return e&&ze(e)?e:`-`}function a(e){return Fo(e)}var o=t===`time`,s=e instanceof Date;if(o||s){var c=o?To(e):e;if(!isNaN(+c))return Dh(c,r,n);if(s)return`-`}if(t===`ordinal`)return Ee(e)?i(e):De(e)&&a(e)?e+``:`-`;var l=Ao(e);return a(l)?Gh(l):Ee(e)?i(e):typeof e==`boolean`?e+``:`-`}var Yh=[`a`,`b`,`c`,`d`,`e`,`f`,`g`],Xh=function(e,t){return`{`+e+(t??``)+`}`};function Zh(e,t,n){H(t)||(t=[t]);var r=t.length;if(!r)return``;for(var i=t[0].$vars||[],a=0;a`:``:{renderMode:a,content:`{`+(n.markerId||`markerX`)+`|} `,style:i===`subItem`?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:``}function $h(e,t){return t||=`transparent`,W(e)?e:G(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}var eg={},tg={},ng=function(){function e(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return e.prototype.create=function(e,t){this._nonSeriesBoxMasterList=n(eg,!0),this._normalMasterList=n(tg,!1);function n(n,r){var i=[];return z(n,function(n,r){var a=n.create(e,t);i=i.concat(a||[])}),i}},e.prototype.update=function(e,t){z(this._normalMasterList,function(n){n.update&&n.update(e,t)})},e.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},e.register=function(e,t){e===`matrix`||e===`calendar`?eg[e]=t:tg[e]=t},e.get=function(e){return tg[e]||eg[e]},e}();function rg(e){return!!eg[e]}function ig(e){ag.set(e.fullType,{getCoord2:void 0}).getCoord2=e.getCoord2}var ag=q();function og(e){var t=e.getShallow(`coord`,!0),n=1;if(t==null){var r=ag.get(e.type);r&&r.getCoord2&&(n=2,t=r.getCoord2(e))}return{coord:t,from:n}}function sg(e,t){var n=e.getShallow(`coordinateSystem`),r=e.getShallow(`coordinateSystemUsage`,!0),i=0;if(n){var a=e.mainType===`series`;r??=a?`data`:`box`,r===`data`?(i=1,a||(i=0)):r===`box`&&(i=2,!a&&!rg(n)&&(i=0))}return{coordSysType:n,kind:i}}function cg(e){var t=e.targetModel,n=e.coordSysType,r=e.coordSysProvider,i=e.isDefaultDataCoordSys;e.allowNotFound;var a=sg(t,!0),o=a.kind,s=a.coordSysType;if(i&&o!==1&&(o=1,s=n),o===0||s!==n)return 0;var c=r(n,t);return c?(o===1?t.coordinateSystem=c:t.boxCoordinateSystem=c,o):0}var lg=z,ug=[`left`,`right`,`top`,`bottom`,`width`,`height`],dg=[[`width`,`left`,`right`],[`height`,`top`,`bottom`]];function fg(e,t,n,r,i){var a=0,o=0;r??=1/0,i??=1/0;var s=0;t.eachChild(function(c,l){var u=c.getBoundingRect(),d=t.childAt(l+1),f=d&&d.getBoundingRect(),p,m;if(e===`horizontal`){var h=u.width+(f?-f.x+u.x:0);p=a+h,p>r||c.newline?(a=0,p=h,o+=s+n,s=u.height):s=Math.max(s,u.height)}else{var g=u.height+(f?-f.y+u.y:0);m=o+g,m>i||c.newline?(a+=s+n,o=0,m=g,s=u.width):s=Math.max(s,u.width)}c.newline||(c.x=a,c.y=o,c.markRedraw(),e===`horizontal`?a=p+n:o=m+n)})}var pg=fg;Te(fg,`vertical`),Te(fg,`horizontal`);function mg(e,t){return{left:e.getShallow(`left`,t),top:e.getShallow(`top`,t),right:e.getShallow(`right`,t),bottom:e.getShallow(`bottom`,t),width:e.getShallow(`width`,t),height:e.getShallow(`height`,t)}}function hg(e,t){var n=yg(e,t,{enableLayoutOnlyByCenter:!0}),r=e.getBoxLayoutParams(),i,a;if(n.type===vg.point)a=n.refPoint,i=_g(r,{width:t.getWidth(),height:t.getHeight()});else{var o=e.get(`center`),s=H(o)?o:[o,o];i=_g(r,n.refContainer),a=n.boxCoordFrom===2?n.refPoint:[lo(s[0],i.width)+i.x,lo(s[1],i.height)+i.y]}return{viewRect:i,center:a}}function gg(e,t){var n=hg(e,t),r=n.viewRect,i=n.center,a=e.get(`radius`);H(a)||(a=[0,a]);var o=lo(r.width,t.getWidth()),s=lo(r.height,t.getHeight()),c=Math.min(o,s),l=lo(a[0],c/2),u=lo(a[1],c/2);return{cx:i[0],cy:i[1],r0:l,r:u,viewRect:r}}function _g(e,t,n){n=qh(n||0);var r=t.width,i=t.height,a=lo(e.left,r),o=lo(e.top,i),s=lo(e.right,r),c=lo(e.bottom,i),l=lo(e.width,r),u=lo(e.height,i),d=n[2]+n[0],f=n[1]+n[3],p=e.aspect;switch(isNaN(l)&&(l=r-s-f-a),isNaN(u)&&(u=i-c-d-o),p!=null&&(isNaN(l)&&isNaN(u)&&(p>r/i?l=r*.8:u=i*.8),isNaN(l)&&(l=p*u),isNaN(u)&&(u=l/p)),isNaN(a)&&(a=r-s-l-f),isNaN(o)&&(o=i-c-u-d),e.left||e.right){case`center`:a=r/2-l/2-n[3];break;case`right`:a=r-l-f}switch(e.top||e.bottom){case`middle`:case`center`:o=i/2-u/2-n[0];break;case`bottom`:o=i-u-d}a||=0,o||=0,isNaN(l)&&(l=r-f-a-(s||0)),isNaN(u)&&(u=i-d-o-(c||0));var m=new Y((t.x||0)+a+n[3],(t.y||0)+o+n[0],l,u);return m.margin=n,m}var vg={rect:1,point:2};function yg(e,t,n){var r,i,a,o=e.boxCoordinateSystem,s;if(o){var c=og(e),l=c.coord,u=c.from;if(o.dataToLayout){a=vg.rect,s=u;var d=o.dataToLayout(l);r=d.contentRect||d.rect}else n&&n.enableLayoutOnlyByCenter&&o.dataToPoint&&(a=vg.point,s=u,i=o.dataToPoint(l))}return a??=vg.rect,a===vg.rect&&(r||={x:0,y:0,width:t.getWidth(),height:t.getHeight()},i=[r.x+r.width/2,r.y+r.height/2]),{type:a,refContainer:r,refPoint:i,boxCoordFrom:s}}function bg(e,t,n,r,i,a){var o=!i||!i.hv||i.hv[0],s=!i||!i.hv||i.hv[1],c=i&&i.boundingMode||`all`;if(a||=e,a.x=e.x,a.y=e.y,!o&&!s)return!1;var l;if(c===`raw`)l=e.type===`group`?new Y(0,0,+t.width||0,+t.height||0):e.getBoundingRect();else if(l=e.getBoundingRect(),e.needLocalTransform()){var u=e.getLocalTransform();l=l.clone(),l.applyTransform(u)}var d=_g(he({width:l.width,height:l.height},t),n,r),f=o?d.x-l.x:0,p=s?d.y-l.y:0;return c===`raw`?(a.x=f,a.y=p):(a.x+=f,a.y+=p),a===e&&e.markRedraw(),!0}function xg(e){var t=e.layoutMode||e.constructor.layoutMode;return G(t)?t:t?{type:t}:null}function Sg(e,t,n){var r=n&&n.ignoreSize;!H(r)&&(r=[r,r]);var i=o(dg[0],0),a=o(dg[1],1);c(dg[0],e,i),c(dg[1],e,a);function o(n,i){var a={},o=0,c={},l=0,u=2;if(lg(n,function(t){c[t]=e[t]}),lg(n,function(e){Xe(t,e)&&(a[e]=c[e]=t[e]),s(a,e)&&o++,s(c,e)&&l++}),r[i])return s(t,n[1])?c[n[2]]=null:s(t,n[2])&&(c[n[1]]=null),c;if(l===u||!o)return c;if(o>=u)return a;for(var d=0;d=0;o--)a=L(a,n[o],!0);t.defaultOption=a}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+`Index`,r=e+`Id`;return vs(this.ecModel,e,{index:this.get(n,!0),id:this.get(r,!0)},t)},t.prototype.getBoxLayoutParams=function(){return mg(this,!1)},t.prototype.getZLevelKey=function(){return``},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=function(){var e=t.prototype;e.type=`component`,e.id=``,e.name=``,e.mainType=``,e.subType=``,e.componentIndex=0}(),t}(Bm);Xs(Eg,Bm),tc(Eg),Um(Eg),Wm(Eg,Dg);function Dg(e){var t=[];return z(Eg.getClassesByMainType(e),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=B(t,function(e){return Gs(e).main}),e!==`dataset`&&ge(t,`dataset`)<=0&&t.unshift(`dataset`),t}var Z={color:{},darkColor:{},size:{}},Og=Z.color={theme:[`#5070dd`,`#b6d634`,`#505372`,`#ff994d`,`#0ca8df`,`#ffd10a`,`#fb628b`,`#785db0`,`#3fbe95`],neutral00:`#fff`,neutral05:`#f4f7fd`,neutral10:`#e8ebf0`,neutral15:`#dbdee4`,neutral20:`#cfd2d7`,neutral25:`#c3c5cb`,neutral30:`#b7b9be`,neutral35:`#aaacb2`,neutral40:`#9ea0a5`,neutral45:`#929399`,neutral50:`#86878c`,neutral55:`#797b7f`,neutral60:`#6d6e73`,neutral65:`#616266`,neutral70:`#54555a`,neutral75:`#48494d`,neutral80:`#3c3c41`,neutral85:`#303034`,neutral90:`#232328`,neutral95:`#17171b`,neutral99:`#000`,accent05:`#eff1f9`,accent10:`#e0e4f2`,accent15:`#d0d6ec`,accent20:`#c0c9e6`,accent25:`#b1bbdf`,accent30:`#a1aed9`,accent35:`#91a0d3`,accent40:`#8292cc`,accent45:`#7285c6`,accent50:`#6578ba`,accent55:`#5c6da9`,accent60:`#536298`,accent65:`#4a5787`,accent70:`#404c76`,accent75:`#374165`,accent80:`#2e3654`,accent85:`#252b43`,accent90:`#1b2032`,accent95:`#121521`,transparent:`rgba(0,0,0,0)`,highlight:`rgba(255,231,130,0.8)`};for(var kg in R(Og,{primary:Og.neutral80,secondary:Og.neutral70,tertiary:Og.neutral60,quaternary:Og.neutral50,disabled:Og.neutral20,border:Og.neutral30,borderTint:Og.neutral20,borderShade:Og.neutral40,background:Og.neutral05,backgroundTint:`rgba(234,237,245,0.5)`,backgroundTransparent:`rgba(255,255,255,0)`,backgroundShade:Og.neutral10,shadow:`rgba(0,0,0,0.2)`,shadowTint:`rgba(129,130,136,0.2)`,axisLine:Og.neutral70,axisLineTint:Og.neutral40,axisTick:Og.neutral70,axisTickMinor:Og.neutral60,axisLabel:Og.neutral70,axisSplitLine:Og.neutral15,axisMinorSplitLine:Og.neutral05}),Og)if(Og.hasOwnProperty(kg)){var Ag=Og[kg];kg===`theme`?Z.darkColor.theme=Og.theme.slice():kg===`highlight`?Z.darkColor.highlight=`rgba(255,231,130,0.4)`:kg.indexOf(`accent`)===0?Z.darkColor[kg]=Jr(Ag,null,function(e){return e*.5},function(e){return Math.min(1,1.3-e)}):Z.darkColor[kg]=Jr(Ag,null,function(e){return e*.9},function(e){return 1-e**1.5})}Z.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var jg=``;typeof navigator<`u`&&(jg=navigator.platform||``);var Mg=`rgba(0, 0, 0, 0.2)`,Ng=Z.color.theme[0],Pg=Jr(Ng,null,null,.9),Fg={darkMode:`auto`,colorBy:`series`,color:Z.color.theme,gradientColor:[Pg,Ng],aria:{decal:{decals:[{color:Mg,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Mg,symbol:`circle`,dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Mg,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Mg,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Mg,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Mg,symbol:`triangle`,dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:jg.match(/^Win/)?`Microsoft YaHei`:`sans-serif`,fontSize:12,fontStyle:`normal`,fontWeight:`normal`},blendMode:null,stateAnimation:{duration:300,easing:`cubicOut`},animation:`auto`,animationDuration:1e3,animationDurationUpdate:500,animationEasing:`cubicInOut`,animationEasingUpdate:`cubicInOut`,animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},Ig={Must:1,Might:2,Not:3},Lg=fs();function Rg(e){Lg(e).datasetMap=q()}function zg(e,t,n){var r={},i=Vg(t);if(!i||!e)return r;var a=[],o=[],s=t.ecModel,c=Lg(s).datasetMap,l=i.uid+`_`+n.seriesLayoutBy,u,d;e=e.slice(),z(e,function(t,n){var i=G(t)?t:e[n]={name:t};i.type===`ordinal`&&u==null&&(u=n,d=m(i)),r[i.name]=[]});var f=c.get(l)||c.set(l,{categoryWayDim:d,valueWayDim:0});z(e,function(e,t){var n=e.name,i=m(e);if(u==null){var s=f.valueWayDim;p(r[n],s,i),p(o,s,i),f.valueWayDim+=i}else if(u===t)p(r[n],0,i),p(a,0,i);else{var s=f.categoryWayDim;p(r[n],s,i),p(o,s,i),f.categoryWayDim+=i}});function p(e,t,n){for(var r=0;rt)return e[r];return e[n-1]}function Qg(e,t,n,r,i,a,o){a||=e;var s=t(a),c=s.paletteIdx||0,l=s.paletteNameMap=s.paletteNameMap||{};if(l.hasOwnProperty(i))return l[i];var u=o==null||!r?n:Zg(r,o);if(u||=n,u&&u.length){var d=u[c];return i&&(l[i]=d),s.paletteIdx=(c+1)%u.length,d}}function $g(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var e_,t_,n_,r_=`\0_ec_inner`,i_=1,a_=function(e){w(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(e,t,n,r,i,a){r||={},this.option=null,this._theme=new Bm(r),this._locale=new Bm(i),this._optionManager=a},t.prototype.setOption=function(e,t,n){var r=u_(t);this._optionManager.setOption(e,n,r),this._resetOption(null,r)},t.prototype.resetOption=function(e,t){return this._resetOption(e,u_(t))},t.prototype._resetOption=function(e,t){var n=!1,r=this._optionManager;if(!e||e===`recreate`){var i=r.mountOption(e===`recreate`);!this.option||e===`recreate`?n_(this,i):(this.restoreData(),this._mergeOption(i,t)),n=!0}if((e===`timeline`||e===`media`)&&this.restoreData(),!e||e===`recreate`||e===`timeline`){var a=r.getTimelineOption(this);a&&(n=!0,this._mergeOption(a,t))}if(!e||e===`recreate`||e===`media`){var o=r.getMediaOption(this);o.length&&z(o,function(e){n=!0,this._mergeOption(e,t)},this)}return n},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,t){var n=this.option,r=this._componentsMap,i=this._componentsCount,a=[],o=q(),s=t&&t.replaceMergeMainTypeMap;Rg(this),z(e,function(e,t){e!=null&&(Eg.hasClass(t)?t&&(a.push(t),o.set(t,!0)):n[t]=n[t]==null?I(e):L(n[t],e,!0))}),s&&s.each(function(e,t){Eg.hasClass(t)&&!o.get(t)&&(a.push(t),o.set(t,!0))}),Eg.topologicalTravel(a,Eg.getAllClassMainTypes(),c,this);function c(t){var a=Kg(this,t,Go(e[t])),o=r.get(t),c=Xo(o,a,o?s&&s.get(t)?`replaceMerge`:`normalMerge`:`replaceAll`);cs(c,t,Eg),n[t]=null,r.set(t,null),i.set(t,0);var l=[],u=[],d=0,f;z(c,function(e,n){var r=e.existing,i=e.newOption;if(!i)r&&(r.mergeOption({},this),r.optionUpdated({},!1));else{var a=t===`series`,o=Eg.getClass(t,e.keyInfo.subType,!a);if(!o)return;if(t===`tooltip`){if(f)return;f=!0}if(r&&r.constructor===o)r.name=e.keyInfo.name,r.mergeOption(i,this),r.optionUpdated(i,!1);else{var s=R({componentIndex:n},e.keyInfo);r=new o(i,this,this,s),R(r,s),e.brandNew&&(r.__requireNewView=!0),r.init(i,this,this),r.optionUpdated(null,!0)}}r?(l.push(r.option),u.push(r),d++):(l.push(void 0),u.push(void 0))},this),n[t]=l,r.set(t,u),i.set(t,d),t===`series`&&e_(this)}this._seriesIndices||e_(this)},t.prototype.getOption=function(){var e=I(this.option);return z(e,function(t,n){if(Eg.hasClass(n)){for(var r=Go(t),i=r.length,a=!1,o=i-1;o>=0;o--)r[o]&&!ss(r[o])?a=!0:(r[o]=null,!a&&i--);r.length=i,e[n]=r}}),delete e[r_],e},t.prototype.setTheme=function(e){this._theme=new Bm(e),this._resetOption(`recreate`,null)},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,t){var n=this._componentsMap.get(e);if(n){var r=n[t||0];if(r)return r;if(t==null){for(var i=0;i=t:n===`max`?e<=t:e===t}function g_(e,t){return e.join(`,`)===t.join(`,`)}var __=z,v_=G,y_=[`areaStyle`,`lineStyle`,`nodeStyle`,`linkStyle`,`chordStyle`,`label`,`labelLine`];function b_(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=y_.length;n0?e[n-1].seriesModel:null)}),U_(e))})}function U_(e){z(e,function(t,n){var r=[],i=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,c=t.seriesModel.get(`stackStrategy`)||`samesign`;o.modify(a,function(a,l,u){var d=o.get(t.stackedDimension,u);if(isNaN(d))return i;var f,p;s?p=o.getRawIndex(u):f=o.get(t.stackedByDimension,u);for(var m=NaN,h=n-1;h>=0;h--){var g=e[h];if(s||(p=g.data.rawIndexOf(g.stackedByDimension,f)),p>=0){var _=g.data.getByRawIndex(g.stackResultDimension,p);if(c===`all`||c===`positive`&&_>0||c===`negative`&&_<0||c===`samesign`&&d>=0&&_>0||c===`samesign`&&d<=0&&_<0){d=bo(d,_),m=_;break}}}return r[0]=d,r[1]=m,r})})}var W_=function(){function e(e){this.data=e.data||(e.sourceFormat===`keyedColumns`?{}:[]),this.sourceFormat=e.sourceFormat||`unknown`,this.seriesLayoutBy=e.seriesLayoutBy||`column`,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var n=0;nl&&(l=p)}s[0]=c,s[1]=l}},r=function(){return this._data?this._data.length/this._dimSize:0};av=(e={},e[Du+`_`+Mu]={pure:!0,appendData:i},e[Du+`_row`]={pure:!0,appendData:function(){throw Error(`Do not support appendData when set seriesLayoutBy: "row".`)}},e[Ou]={pure:!0,appendData:i},e[ku]={pure:!0,appendData:function(e){var t=this._data;z(e,function(e,n){for(var r=t[n]||(t[n]=[]),i=0;i<(e||[]).length;i++)r.push(e[i])})}},e[Eu]={appendData:i},e[Au]={persistent:!1,pure:!0,appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}},e);function i(e){for(var t=0;t=0&&(s=a.interpolatedValue[c])}return s==null?``:s+``})},e.prototype.getRawValue=function(e,t){return yv(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function Sv(e){var t,n;return G(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function Cv(e){return new wv(e)}var wv=function(){function e(e){e||={},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return e.prototype.perform=function(e){var t=this._upstream,n=e&&e.skip;if(this._dirty&&t){var r=this.context;r.data=r.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!n&&(i=this._plan(this.context));var a=l(this._modBy),o=this._modDataCount||0,s=l(e&&e.modBy),c=e&&e.modDataCount||0;(a!==s||o!==c)&&(i=`reset`);function l(e){return!(e>=1)&&(e=1),e}var u;(this._dirty||i===`reset`)&&(this._dirty=!1,u=this._doReset(n)),this._modBy=s,this._modDataCount=c;var d=e&&e.step;if(this._dueEnd=t?t._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var f=this._dueIndex,p=Math.min(d==null?1/0:this._dueIndex+d,this._dueEnd);if(!n&&(u||f1&&r>0?s:o}};return a;function o(){return t=e?null:at},gte:function(e,t){return e>=t}};(function(){function e(e,t){De(t)||Vo(``),this._opFn=Dv[e],this._rvalFloat=Ao(t)}return e.prototype.evaluate=function(e){return De(e)?this._opFn(e,this._rvalFloat):this._opFn(Ao(e),this._rvalFloat)},e})();var Ov=function(){function e(e,t){var n=e===`desc`;this._resultLT=n?1:-1,t??=n?`min`:`max`,this._incomparable=t===`min`?-1/0:1/0}return e.prototype.evaluate=function(e,t){var n=De(e)?e:Ao(e),r=De(t)?t:Ao(t),i=isNaN(n),a=isNaN(r);if(i&&(n=this._incomparable),a&&(r=this._incomparable),i&&a){var o=W(e),s=W(t);o&&(n=s?e:0),s&&(r=o?t:0)}return nr?-this._resultLT:0},e}();(function(){function e(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=Ao(t)}return e.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n!==this._rvalTypeof&&(n===`number`||this._rvalTypeof===`number`)&&(t=Ao(e)===this._rvalFloat)}return this._isEQ?t:!t},e})();function kv(e){var t=``,n=-1/0,r=-1/0,i=1/0,a=1/0;return e&&(e.g!=null&&(t+=`G`+e.g,n=e.g),e.ge!=null&&(t+=`GE`+e.ge,r=e.ge),e.l!=null&&(t+=`L`+e.l,i=e.l),e.le!=null&&(t+=`LE`+e.le,a=e.le)),{key:t,g:n,ge:r,l:i,le:a}}function Av(e,t){return t>e.g&&t>=e.ge&&t`u`?Array:Uint32Array,Uv=typeof Uint16Array>`u`?Array:Uint16Array,Wv=typeof Int32Array>`u`?Array:Int32Array,Gv=typeof Float64Array>`u`?Array:Float64Array,Kv={float:Gv,int:Wv,ordinal:Array,number:Array,time:Gv},qv;function Jv(e){return e>65535?Hv:Uv}function Yv(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function Xv(e,t,n,r,i){var a=Kv[n||`float`];if(i){var o=e[t],s=o&&o.length;if(s!==r){for(var c=new a(r),l=0;lh[1]&&(h[1]=m)}return this._rawCount=this._count=s,{start:o,end:s}},e.prototype._initDataFromProvider=function(e,t,n){for(var r=this._provider,i=this._chunks,a=this._dimensions,o=a.length,s=this._rawExtent,c=B(a,function(e){return e.property}),l=0;lg[1]&&(g[1]=h)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=t,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(e,t){if(!(t>=0&&t=0&&t=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(n!=null&&ne)i=a-1;else return a}return-1},e.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,r=this._count;if(n===Array){e=new n(r);for(var i=0;i=l&&g<=u||isNaN(g))&&(o[s++]=p),p++}f=!0}else if(i===2){for(var m=d[r[0]],_=d[r[1]],v=e[r[1]][0],y=e[r[1]][1],h=0;h=l&&g<=u||isNaN(g))&&(b>=v&&b<=y||isNaN(b))&&(o[s++]=p),p++}f=!0}}if(!f){if(i===1)for(var h=0;h=l&&g<=u||isNaN(g))&&(o[s++]=x)}else for(var h=0;he[w][1])&&(S=!1)}S&&(o[s++]=t.getRawIndex(h))}}return sg[1]&&(g[1]=h)}}}},e.prototype.lttbDownSample=function(e,t){var n=this.clone([e],!0),r=n._chunks[e],i=this.count(),a=0,o=Math.floor(1/t),s=this.getRawIndex(0),c,l,u,d=new(Jv(this._rawCount))(Math.min((Math.ceil(i/o)+2)*2,i));d[a++]=s;for(var f=1;fc&&(c=l,u=v))}T>0&&To&&(m=o-l);for(var h=0;hp&&(p=g,f=l+h)}var _=this.getRawIndex(u),v=this.getRawIndex(f);ul-p&&(s=l-p,o.length=s);for(var m=0;mu[1]&&(u[1]=g),d[f++]=_}return i._count=f,i._indices=d,i._updateGetRawIdx(),i},e.prototype.each=function(e,t){if(this._count)for(var n=e.length,r=this._chunks,i=0,a=this.count();id&&(d=p))}return o[c]=[u,d]},e.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],r=this._chunks,i=0;i=0?this._indices[e]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function e(e,t,n,r){return Ev(e[r],this._dimensions[r])}qv={arrayRows:e,objectRows:function(e,t,n,r){return Ev(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var i=e&&(e.value==null?e:e.value);return Ev(i instanceof Array?i[r]:i,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}(),Qv=function(){function e(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return e.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},e.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+`_`+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),n=!!t.length,r,i;if($v(e)){var a=e,o=void 0,s=void 0,c=void 0;if(n){var l=t[0];l.prepareSource(),c=l.getSource(),o=c.data,s=c.sourceFormat,i=[l._getVersionSign()]}else o=a.get(`data`,!0),s=ke(o)?Au:Eu,i=[];var u=this._getSourceMetaRawOption()||{},d=c&&c.metaRawOption||{},f=K(u.seriesLayoutBy,d.seriesLayoutBy)||null,p=K(u.sourceHeader,d.sourceHeader),m=K(u.dimensions,d.dimensions);r=f!==d.seriesLayoutBy||!!p!=!!d.sourceHeader||m?[K_(o,{seriesLayoutBy:f,sourceHeader:p,dimensions:m},s)]:[]}else{var h=e;if(n){var g=this._applyTransform(t);r=g.sourceList,i=g.upstreamSignList}else r=[K_(h.get(`source`,!0),this._getSourceMetaRawOption(),null)],i=[]}this._setLocalSource(r,i)},e.prototype._applyTransform=function(e){var t=this._sourceHost,n=t.get(`transform`,!0),r=t.get(`fromTransformResult`,!0);r!=null&&e.length!==1&&ey(``);var i,a=[],o=[];return z(e,function(e){e.prepareSource();var t=e.getSource(r||0);r!=null&&!t&&ey(``),a.push(t),o.push(e._getVersionSign())}),n?i=zv(n,a,{datasetIndex:t.componentIndex}):r!=null&&(i=[J_(a[0])]),{sourceList:i,upstreamSignList:o}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t1||n>0&&!e.noHeader;return z(e.blocks,function(e){var n=ly(e);n>=t&&(t=n+ +(r&&(!n||sy(e)&&!e.noHeader)))}),t}return 0}function uy(e,t,n,r){var i=t.noHeader,a=py(ly(t)),o=[],s=t.blocks||[];Re(!s||H(s)),s||=[];var c=e.orderMode;if(t.sortBlocks&&c){s=s.slice();var l={valueAsc:`asc`,valueDesc:`desc`};if(Xe(l,c)){var u=new Ov(l[c],null);s.sort(function(e,t){return u.evaluate(e.sortParam,t.sortParam)})}else c===`seriesDesc`&&s.reverse()}z(s,function(n,i){var s=t.valueFormatter,c=cy(n)(s?R(R({},e),{valueFormatter:s}):e,n,i>0?a.html:0,r);c!=null&&o.push(c)});var d=e.renderMode===`richText`?o.join(a.richText):my(r,o.join(``),i?n:a.html);if(i)return d;var f=Jh(t.header,`ordinal`,e.useUTC),p=ry(r,e.renderMode).nameStyle,m=ny(r);return e.renderMode===`richText`?_y(e,f,p)+a.richText+d:my(r,`
`+Mt(f)+`
`+d,n)}function dy(e,t,n,r){var i=e.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,c=t.name,l=e.useUTC,u=t.valueFormatter||e.valueFormatter||function(e){return e=H(e)?e:[e],B(e,function(e,t){return Jh(e,H(p)?p[t]:p,l)})};if(!(a&&o)){var d=s?``:e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||Z.color.secondary,i),f=a?``:Jh(c,`ordinal`,l),p=t.valueType,m=o?[]:u(t.value,t.rawDataIndex),h=!s||!a,g=!s&&a,_=ry(r,i),v=_.nameStyle,y=_.valueStyle;return i===`richText`?(s?``:d)+(a?``:_y(e,f,v))+(o?``:vy(e,m,h,g,y)):my(r,(s?``:d)+(a?``:hy(f,!s,v))+(o?``:gy(m,h,g,y)),n)}}function fy(e,t,n,r,i,a){if(e)return cy(e)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,a)}function py(e){return{html:iy[e],richText:ay[e]}}function my(e,t,n){var r=`
`,i=`margin: `+n+`px 0 0`,a=ny(e);return`
`+t+r+`
`}function hy(e,t,n){var r=t?`margin-left:2px`:``;return``+Mt(e)+``}function gy(e,t,n,r){var i=t?`float:right;margin-left:`+(n?`10px`:`20px`):``;return e=H(e)?e:[e],``+B(e,function(e){return Mt(e)}).join(`  `)+``}function _y(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function vy(e,t,n,r,i){var a=[i],o=r?10:20;return n&&a.push({padding:[0,0,0,o],align:`right`}),e.markupStyleCreator.wrapRichTextStyle(H(t)?t.join(` `):t,a)}function yy(e,t){var n=e.getData().getItemVisual(t,`style`)[e.visualDrawType];return $h(n)}function by(e,t){return e.get(`padding`)??(t===`richText`?[8,10]:10)}var xy=function(){function e(){this.richTextStyles={},this._nextStyleNameId=Mo()}return e.prototype._generateStyleName=function(){return`__EC_aUTo_`+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var r=n===`richText`?this._generateStyleName():null,i=Qh({color:t,type:e,renderMode:n,markerId:r});return W(i)?i:(this.richTextStyles[r]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};H(t)?z(t,function(e){return R(n,e)}):R(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,`{`+r+`|`+e+`}`},e}();function Sy(e){var t=e.series,n=e.dataIndex,r=e.multipleSeries,i=t.getData(),a=i.mapDimensionsAll(`defaultedTooltip`),o=a.length,s=t.getRawValue(n),c=H(s),l=yy(t,n),u,d,f,p;if(o>1||c&&!o){var m=Cy(s,t,n,a,l);u=m.inlineValues,d=m.inlineValueTypes,f=m.blocks,p=m.inlineValues[0]}else if(o){var h=i.getDimensionInfo(a[0]);p=u=yv(i,n,a[0]),d=h.type}else p=u=c?s[0]:s;var g=os(t),_=g&&t.name||``,v=i.getName(n),y=r?_:v;return oy(`section`,{header:_,noHeader:r||!g,sortParam:p,blocks:[oy(`nameValue`,{markerType:`item`,markerColor:l,name:y,noName:!ze(y),value:u,valueType:d,rawDataIndex:i.getRawIndex(n)})].concat(f||[])})}function Cy(e,t,n,r,i){var a=t.getData(),o=be(e,function(e,t,n){var r=a.getDimensionInfo(n);return e||=r&&r.tooltip!==!1&&r.displayName!=null},!1),s=[],c=[],l=[];r.length?z(r,function(e){u(yv(a,n,e),e)}):z(e,u);function u(e,t){var n=a.getDimensionInfo(t);n&&n.otherDims.tooltip!==!1&&(o?l.push(oy(`nameValue`,{markerType:`subItem`,markerColor:i,name:n.displayName,value:e,valueType:n.type})):(s.push(e),c.push(n.type)))}return{inlineValues:s,inlineValueTypes:c,blocks:l}}var wy=fs();function Ty(e,t){return e.getName(t)||e.getId(t)}var Ey=function(e){w(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return t.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=Cv({count:ky,reset:Ay}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(wy(this).sourceManager=new Qv(this)).prepareSource();var r=this.getInitialData(e,n);My(r,this),this.dataTask.context.data=r,wy(this).dataBeforeProcessed=r,Dy(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=xg(this),r=n?Cg(e):{},i=this.subType;Eg.hasClass(i)&&(i+=`Series`),L(e,t.getTheme().get(this.subType)),L(e,this.getDefaultOption()),Ko(e,`label`,[`show`]),this.fillDataTextStyle(e.data),n&&Sg(e,r,n)},t.prototype.mergeOption=function(e,t){e=L(this.option,e,!0),this.fillDataTextStyle(e.data);var n=xg(this);n&&Sg(this.option,e,n);var r=wy(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(e,t);My(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,wy(this).dataBeforeProcessed=i,Dy(this),this._initSelectedMapFromData(i)},t.prototype.fillDataTextStyle=function(e){if(e&&!ke(e))for(var t=[`show`],n=0;n=0&&u<0)&&(l=v,u=_,d=0),_===u&&(c[d++]=m))}return c.length=d,c},t.prototype.formatTooltip=function(e,t,n){return Sy({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(E.node&&!(e&&e.ssr))return!1;var t=this.getShallow(`animation`);return t&&this.getData().count()>this.getShallow(`animationThreshold`)&&(t=!1),!!t},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,t,n){var r=this.ecModel,i=Yg.prototype.getColorFromPalette.call(this,e,t,n);return i||=r.getColorFromPalette(e,t,n),i},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get(`progressive`)},t.prototype.getProgressiveThreshold=function(){return this.get(`progressiveThreshold`)},t.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},t.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,i=this.getData(t);if(r===`series`||n===`all`)this.option.selectedMap={},this._selectedDataIndicesMap={};else for(var a=0;a=0&&n.push(i)}return n},t.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var r=this.getData(t);return(n===`all`||n[Ty(r,e)])&&!r.getItemModel(e).get([`select`,`disabled`])},t.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var e=this.option.universalTransition;return e?e===!0||e&&e.enabled:!1},t.prototype._innerSelect=function(e,t){var n,r,i=this.option,a=i.selectedMode,o=t.length;if(a&&o){if(a===`series`)i.selectedMap=`all`;else if(a===`multiple`){G(i.selectedMap)||(i.selectedMap={});for(var s=i.selectedMap,c=0;c0&&this._innerSelect(e,t)}},t.registerClass=function(e){return Eg.registerClass(e)},t.protoInitialize=function(){var e=t.prototype;e.type=`series.__base__`,e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol=`circle`,e.visualStyleAccessPath=`itemStyle`,e.visualDrawType=`fill`}(),t}(Eg);ve(Ey,xv),ve(Ey,Yg),Xs(Ey,Eg);function Dy(e){var t=e.name;os(e)||(e.name=Oy(e)||t)}function Oy(e){var t=e.getRawData(),n=t.mapDimensionsAll(`seriesName`),r=[];return z(n,function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)}),r.join(` `)}function ky(e){return e.model.getRawData().count()}function Ay(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),jy}function jy(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function My(e,t){z(qe(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,Te(Ny,t))})}function Ny(e,t){var n=Py(e);return n&&n.setOutputEnd((t||this).count()),t}function Py(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var r=n.currentTask;if(r){var i=r.agentStubMap;i&&(r=i.get(e.uid))}return r}}var Fy=function(){function e(){this.group=new Ba,this.uid=Hm(`viewComponent`)}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){},e.prototype.updateLayout=function(e,t,n,r){},e.prototype.updateVisual=function(e,t,n,r){},e.prototype.toggleBlurSeries=function(e,t,n){},e.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},e}();Js(Fy),tc(Fy);function Iy(){var e=fs();return function(t){var n=e(t),r=t.pipelineContext,i=!!n.large,a=!!n.progressiveRender,o=n.large=!!(r&&r.large),s=n.progressiveRender=!!(r&&r.progressiveRender);return(i!==o||a!==s)&&`reset`}}var Ly=fs(),Ry=Iy(),zy=function(){function e(){this.group=new Ba,this.uid=Hm(`viewChart`),this.renderTask=Cv({plan:Hy,reset:Uy}),this.renderTask.context={view:this}}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.highlight=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&Vy(i,r,`emphasis`)},e.prototype.downplay=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&Vy(i,r,`normal`)},e.prototype.remove=function(e,t){this.group.removeAll()},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.updateVisual=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.eachRendered=function(e){tm(this.group,e)},e.markUpdateMethod=function(e,t){Ly(e).updateMethod=t},e.protoInitialize=function(){var t=e.prototype;t.type=`chart`}(),e}();function By(e,t,n){e&&Rd(e)&&(t===`emphasis`?pd:md)(e,n)}function Vy(e,t,n){var r=ds(e,t),i=t&&t.highlightKey!=null?zd(t.highlightKey):null;r==null?e.eachItemGraphicEl(function(e){By(e,n,i)}):z(Go(r),function(t){By(e.getItemGraphicEl(t),n,i)})}Js(zy,[`dispose`]),tc(zy);function Hy(e){return Ry(e.model)}function Uy(e){var t=e.model,n=e.ecModel,r=e.api,i=e.payload,a=t.pipelineContext.progressiveRender,o=e.view,s=i&&Ly(i).updateMethod,c=a?`incrementalPrepareRender`:s&&o[s]?s:`render`;return c!==`render`&&o[c](t,n,r,i),Wy[c]}var Wy={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},Gy=`\0__throttleOriginMethod`,Ky=`\0__throttleRate`,qy=`\0__throttleType`;function Jy(e,t,n){var r,i=0,a=0,o=null,s,c,l,u;t||=0;function d(){a=new Date().getTime(),o=null,e.apply(c,l||[])}var f=function(){var e=[...arguments];r=new Date().getTime(),c=this,l=e;var f=u||t,p=u||n;u=null,s=r-(p?i:a)-f,clearTimeout(o),p?o=setTimeout(d,f):s>=0?d():o=setTimeout(d,-s),i=r};return f.clear=function(){o&&=(clearTimeout(o),null)},f.debounceNextCall=function(e){u=e},f}function Yy(e,t,n,r){var i=e[t];if(i){var a=i[Gy]||i,o=i[qy];if(i[Ky]!==n||o!==r){if(n==null||!r)return e[t]=a;i=e[t]=Jy(a,n,r===`debounce`),i[Gy]=a,i[qy]=r,i[Ky]=n}return i}}function Xy(e,t){var n=e[t];n&&n[Gy]&&(n.clear&&n.clear(),e[t]=n[Gy])}var Zy=fs(),Qy={itemStyle:nc(Lm,!0),lineStyle:nc(Pm,!0)},$y={lineStyle:`stroke`,itemStyle:`fill`};function eb(e,t){return e.visualStyleMapper||Qy[t]||(console.warn(`Unknown style type '`+t+`'.`),Qy.itemStyle)}function tb(e,t){return e.visualDrawType||$y[t]||(console.warn(`Unknown style type '`+t+`'.`),`fill`)}var nb={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=e.getModel(r),a=eb(e,r)(i),o=i.getShallow(`decal`);o&&(n.setVisual(`decal`,o),o.dirty=!0);var s=tb(e,r),c=a[s],l=U(c)?c:null,u=a.fill===`auto`||a.stroke===`auto`;if(!a[s]||l||u){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());a[s]||(a[s]=d,n.setVisual(`colorFromPalette`,!0)),a.fill=a.fill===`auto`||U(a.fill)?d:a.fill,a.stroke=a.stroke===`auto`||U(a.stroke)?d:a.stroke}if(n.setVisual(`style`,a),n.setVisual(`drawType`,s),!t.isSeriesFiltered(e)&&l)return n.setVisual(`colorFromPalette`,!1),{dataEach:function(t,n){var r=e.getDataParams(n),i=R({},a);i[s]=l(r),t.setItemVisual(n,`style`,i)}}}},rb=new Bm,ib={createOnAllSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=eb(e,r),a=n.getVisual(`drawType`);return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){rb.option=n[r];var o=i(rb);R(e.ensureUniqueItemVisual(t,`style`),o),rb.option.decal&&(e.setItemVisual(t,`decal`,rb.option.decal),rb.option.decal.dirty=!0),a in o&&e.setItemVisual(t,`colorFromPalette`,!1)}}:null}}}},ab={performRawSeries:!0,overallReset:function(e){var t=q();e.eachSeries(function(e){if(!e.isColorBySeries()){var n=e.type+`-`+e.getColorBy();Zy(e).scope=t.get(n)||t.set(n,{})}}),e.eachSeries(function(e){if(!e.isColorBySeries()){var t=e.getRawData(),n={},r=e.getData(),i=Zy(e).scope,a=tb(e,e.visualStyleAccessPath||`itemStyle`);r.each(function(e){var t=r.getRawIndex(e);n[t]=e}),t.each(function(o){var s=n[o];if(r.getItemVisual(s,`colorFromPalette`)){var c=r.ensureUniqueItemVisual(s,`style`),l=t.getName(o)||o+``,u=t.count();c[a]=e.getColorFromPalette(l,i,u)}})}})}},ob=Math.PI;function sb(e,t){t||={},he(t,{text:`loading`,textColor:Z.color.primary,fontSize:12,fontWeight:`normal`,fontStyle:`normal`,fontFamily:`sans-serif`,maskColor:`rgba(255,255,255,0.8)`,showSpinner:!0,color:Z.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var n=new Ba,r=new iu({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var i=new lu({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new iu({style:{fill:`none`},textContent:i,textConfig:{position:`right`,distance:10},zlevel:t.zlevel,z:10001});n.add(a);var o;return t.showSpinner&&(o=new Jf({shape:{startAngle:-ob/2,endAngle:-ob/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:`round`,lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:ob*3/2}).start(`circularInOut`),o.animateShape(!0).when(1e3,{startAngle:ob*3/2}).delay(300).start(`circularInOut`),n.add(o)),n.resize=function(){var n=i.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,c=(e.getWidth()-s*2-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner&&n?0:5+n/2)+(t.showSpinner?0:n/2)+(n?0:s),l=e.getHeight()/2;t.showSpinner&&o.setShape({cx:c,cy:l}),a.setShape({x:c-s,y:l-s,width:s*2,height:s*2}),r.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n}var cb=function(){function e(e,t,n,r){this._stageTaskMap=q(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(e){var t=e.overallTask;t&&t.dirty()})},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),r=n.context,i=!t&&n.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,a=r&&r.modDataCount;return{step:i,modBy:a==null?null:Math.ceil(a/i),modDataCount:a}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid);e.pipelineContext=n.context=e.__preparePipelineContext?e.__preparePipelineContext(t,n):zs(e,t,n)},e.prototype.restorePipelines=function(e,t){var n=this,r=n._pipelineMap=q();t.eachSeries(function(t){var i=e.painter.type===`canvas`&&t.getProgressive(),a=t.uid;r.set(a,{id:a,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),n._pipe(t,t.dataTask)})},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;z(this._allHandlers,function(r){var i=e.get(r.uid)||e.set(r.uid,{});Re(!(r.reset&&r.overallReset),``),r.reset&&this._createSeriesStageTask(r,i,t,n),r.overallReset&&this._createOverallStageTask(r,i,t,n)},this)},e.prototype.prepareView=function(e,t,n,r){var i=e.renderTask,a=i.context;a.model=t,a.ecModel=n,a.api=r,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,r){r||={};var i=!1,a=this;z(e,function(e,s){if(!(r.visualType&&r.visualType!==e.visualType)){var c=a._stageTaskMap.get(e.uid),l=c.seriesTaskMap,u=c.overallTask;if(u){var d,f=u.agentStubMap;f.each(function(e){o(r,e)&&(e.dirty(),d=!0)}),d&&u.dirty(),a.updatePayload(u,n);var p=a.getPerformArgs(u,r.block);f.each(function(e){e.perform(p)}),u.perform(p)&&(i=!0)}else l&&l.each(function(s,c){o(r,s)&&s.dirty();var l=a.getPerformArgs(s,r.block);l.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),a.updatePayload(s,n),s.perform(l)&&(i=!0)})}});function o(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}this.unfinished=i||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(e){t=e.dataTask.perform()||t}),this.unfinished=t||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},e.prototype.updatePayload=function(e,t){t!==`remain`&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,r){var i=this,a=t.seriesTaskMap,o=t.seriesTaskMap=q(),s=e.seriesType,c=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(l):s?n.eachRawSeriesByType(s,l):c&&c(n,r).each(l);function l(t){var s=t.uid,c=o.set(s,a&&a.get(s)||Cv({plan:pb,reset:mb,count:_b}));c.context={model:t,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(t,c)}},e.prototype._createOverallStageTask=function(e,t,n,r){var i=this,a=t.overallTask=t.overallTask||Cv({reset:lb});a.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};var o=a.agentStubMap,s=a.agentStubMap=q(),c=e.seriesType,l=e.getTargetSeries,u=e.dirtyOnOverallProgress,d=!1;Re(!e.createOnAllSeries,``),c?n.eachRawSeriesByType(c,f):l?l(n,r).each(f):z(n.getSeries(),f);function f(e){var t=e.uid,n=s.set(t,o&&o.get(t)||(d=!0,Cv({reset:ub,onDirty:fb})));n.context={model:e,dirtyOnOverallProgress:u},n.agent=a,n.__block=u,i._pipe(e,n)}d&&a.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,r=this._pipelineMap.get(n);!r.head&&(r.head=t),r.tail&&r.tail.pipe(t),r.tail=t,t.__idxInPipeline=r.count++,t.__pipeline=r},e.wrapStageHandler=function(e,t){return U(e)&&(e={overallReset:e,seriesType:vb(e)}),e.uid=Hm(`stageHandler`),t&&(e.visualType=t),e},e}();function lb(e){e.overallReset(e.ecModel,e.api,e.payload)}function ub(e){return e.dirtyOnOverallProgress&&db}function db(){this.agent.dirty(),this.getDownstream().dirty()}function fb(){this.agent&&this.agent.dirty()}function pb(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function mb(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=Go(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?B(t,function(e,t){return gb(t)}):hb}var hb=gb(0);function gb(e){return function(t,n){var r=n.data,i=n.resetDefines[e];if(i&&i.dataEach)for(var a=t.start;a0&&u===i.length-l.length){var d=i.slice(0,u);d!==`data`&&(t.mainType=d,t[l.toLowerCase()]=e,s=!0)}}o.hasOwnProperty(i)&&(n[i]=e,s=!0),s||(r[i]=e)})}return{cptQuery:t,dataQuery:n,otherQuery:r}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,i=n.packedEvent,a=n.model,o=n.view;if(!a||!o)return!0;var s=t.cptQuery,c=t.dataQuery;return l(s,a,`mainType`)&&l(s,a,`subType`)&&l(s,a,`index`,`componentIndex`)&&l(s,a,`name`)&&l(s,a,`id`)&&l(c,i,`name`)&&l(c,i,`dataIndex`)&&l(c,i,`dataType`)&&(!o.filterForExposedEvent||o.filterForExposedEvent(e,t.otherQuery,r,i));function l(e,t,n,r){return e[n]==null||t[r||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),Ob=[`symbol`,`symbolSize`,`symbolRotate`,`symbolOffset`],kb=Ob.concat([`symbolKeepAspect`]),Ab={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual(`legendIcon`,e.legendIcon),!e.hasSymbolVisual)return;for(var r={},i={},a=!1,o=0;o=0&&cx(c)?c:.5,e.createRadialGradient(o,s,0,o,s,c)}function dx(e,t,n){for(var r=t.type===`radial`?ux(e,t,n):lx(e,t,n),i=t.colorStops,a=0;a0)?null:e===`dashed`?[4*t,2*t]:e===`dotted`?[t]:De(e)?[e]:H(e)?e:null}function gx(e){var t=e.style,n=t.lineDash&&t.lineWidth>0&&hx(t.lineDash,t.lineWidth),r=t.lineDashOffset;if(n){var i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(n=B(n,function(e){return e/i}),r/=i)}return[n,r]}var _x=new yl(!0);function vx(e){var t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))}function yx(e){return typeof e==`string`&&e!==`none`}function bx(e){var t=e.fill;return t!=null&&t!==`none`}function xx(e,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function Sx(e,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function Cx(e,t,n){var r=sc(t.image,t.__image,n);if(lc(r)){var i=e.createPattern(r,t.repeat||`repeat`);if(typeof DOMMatrix==`function`&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*Qe),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function Tx(e,t,n,r,i){var a,o=vx(n),s=bx(n),c=n.strokePercent,l=c<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var d=t.path||_x,f=t.__dirty;if(!r){var p=n.fill,m=n.stroke,h=s&&!!p.colorStops,g=o&&!!m.colorStops,_=s&&!!p.image,v=o&&!!m.image,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0;(h||g)&&(C=t.getBoundingRect()),h&&(y=f?dx(e,p,C):t.__canvasFillGradient,t.__canvasFillGradient=y),g&&(b=f?dx(e,m,C):t.__canvasStrokeGradient,t.__canvasStrokeGradient=b),_&&(x=f||!t.__canvasFillPattern?Cx(e,p,t):t.__canvasFillPattern,t.__canvasFillPattern=x),v&&(S=f||!t.__canvasStrokePattern?Cx(e,m,t):t.__canvasStrokePattern,t.__canvasStrokePattern=S),h?e.fillStyle=y:_&&(x?e.fillStyle=x:s=!1),g?e.strokeStyle=b:v&&(S?e.strokeStyle=S:o=!1)}var w=t.getGlobalScale();d.setScale(w[0],w[1],t.segmentIgnoreThreshold);var T,E;e.setLineDash&&n.lineDash&&(a=gx(t),T=a[0],E=a[1]);var D=!0;(u||f&4)&&(d.setDPR(e.dpr),l?d.setContext(null):(d.setContext(e),D=!1),d.reset(),t.buildPath(d,t.shape,r),d.toStatic(),t.pathUpdated()),D&&d.rebuildPath(e,l?c:1),T&&(e.setLineDash(T),e.lineDashOffset=E),r?(i.batchFill=s,i.batchStroke=o):n.strokeFirst?(o&&Sx(e,n),s&&xx(e,n)):(s&&xx(e,n),o&&Sx(e,n)),T&&e.setLineDash([])}function Ex(e,t,n){var r=t.__image=sc(n.image,t.__image,t,t.onload);if(r&&lc(r)){var i=n.x||0,a=n.y||0,o=t.getWidth(),s=t.getHeight(),c=r.width/r.height;if(o==null&&s!=null?o=s*c:s==null&&o!=null?s=o/c:o==null&&s==null&&(o=r.width,s=r.height),n.sWidth&&n.sHeight){var l=n.sx||0,u=n.sy||0;e.drawImage(r,l,u,n.sWidth,n.sHeight,i,a,o,s)}else if(n.sx&&n.sy){var l=n.sx,u=n.sy,d=o-l,f=s-u;e.drawImage(r,l,u,d,f,i,a,o,s)}else e.drawImage(r,i,a,o,s)}}function Dx(e,t,n){var r,i=n.text;if(i!=null&&(i+=``),i){e.font=n.font||`12px sans-serif`,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var a=void 0,o=void 0;e.setLineDash&&n.lineDash&&(r=gx(t),a=r[0],o=r[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),n.strokeFirst?(vx(n)&&e.strokeText(i,n.x,n.y),bx(n)&&e.fillText(i,n.x,n.y)):(bx(n)&&e.fillText(i,n.x,n.y),vx(n)&&e.strokeText(i,n.x,n.y)),a&&e.setLineDash([])}}var Ox=[`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],kx=[[`lineCap`,`butt`],[`lineJoin`,`miter`],[`miterLimit`,10]];function Ax(e,t,n,r,i){var a=!1;if(!r&&(n||={},t===n))return!1;if(r||t.opacity!==n.opacity){Vx(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?Nc.opacity:o}(r||t.blend!==n.blend)&&(a||=(Vx(e,i),!0),e.globalCompositeOperation=t.blend||Nc.blend);for(var s=0;s0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,t,n){if(!this[xS]){if(this._disposed)this.id;else{var r,i,a;if(G(t)&&(n=t.lazyUpdate,r=t.silent,i=t.replaceMerge,a=t.transition,t=t.notMerge),this[xS]=!0,$S(this),!this._model||t){var o=new f_(this._api),s=this._theme,c=this._model=new a_;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,s,this._locale,o)}this._model.setOption(e,{replaceMerge:i},sC);var l={seriesTransition:a,optionChanged:!0};if(n)this[CS]={silent:r,updateParams:l},this[xS]=!1,this.getZr().wakeUp();else{try{FS(this),RS.update.call(this,null,l)}catch(e){throw this[CS]=null,this[xS]=!1,e}this._ssr||this._zr.flush(),this[CS]=null,this[xS]=!1,HS.call(this,r),US.call(this,r)}}}},t.prototype.setTheme=function(e,t){if(!this[xS]){if(this._disposed)this.id;else{var n=this._model;if(n){var r=t&&t.silent,i=null;this[CS]&&(r??=this[CS].silent,i=this[CS].updateParams,this[CS]=null),this[xS]=!0,$S(this);try{this._updateTheme(e),n.setTheme(this._theme),FS(this),RS.update.call(this,{type:`setTheme`},i)}catch(e){throw this[xS]=!1,e}this[xS]=!1,HS.call(this,r),US.call(this,r)}}}},t.prototype._updateTheme=function(e){W(e)&&(e=lC[e]),e&&(e=I(e),e&&B_(e,!0),this._theme=e)},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||E.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){return e||={},this._zr.painter.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get(`backgroundColor`),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){return e||={},this._zr.painter.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){var e=this._zr;return z(e.storage.getDisplayList(),function(e){e.stopAnimation(null,!0)}),e.painter.toDataURL()},t.prototype.getDataURL=function(e){if(this._disposed)this.id;else{e||={};var t=e.excludeComponents,n=this._model,r=[],i=this;z(t,function(e){n.eachComponent({mainType:e},function(e){var t=i._componentsMap[e.__viewId];t.group.ignore||(r.push(t),t.group.ignore=!0)})});var a=this._zr.painter.getType()===`svg`?this.getSvgDataURL():this.renderToCanvas(e).toDataURL(`image/`+(e&&e.type||`png`));return z(r,function(e){e.group.ignore=!1}),a}},t.prototype.getConnectedDataURL=function(e){if(this._disposed)this.id;else{var t=e.type===`svg`,n=this.group,r=Math.min,i=Math.max,a=1/0;if(fC[n]){var o=a,s=a,c=-a,l=-a,u=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();z(dC,function(a,d){if(a.group===n){var f=t?a.getZr().painter.getSvgDom().innerHTML:a.renderToCanvas(I(e)),p=a.getDom().getBoundingClientRect();o=r(p.left,o),s=r(p.top,s),c=i(p.right,c),l=i(p.bottom,l),u.push({dom:f,left:p.left,top:p.top})}}),o*=d,s*=d,c*=d,l*=d;var f=c-o,p=l-s,m=N.createCanvas(),h=Ka(m,{renderer:t?`svg`:`canvas`});if(h.resize({width:f,height:p}),t){var g=``;return z(u,function(e){var t=e.left-o,n=e.top-s;g+=``+e.dom+``}),h.painter.getSvgRoot().innerHTML=g,e.connectedBackgroundColor&&h.painter.setBackgroundColor(e.connectedBackgroundColor),h.refreshImmediately(),h.painter.toDataURL()}return e.connectedBackgroundColor&&h.add(new iu({shape:{x:0,y:0,width:f,height:p},style:{fill:e.connectedBackgroundColor}})),z(u,function(e){var t=new Xl({style:{x:e.left*d-o,y:e.top*d-s,image:e.dom}});h.add(t)}),h.refreshImmediately(),m.toDataURL(`image/`+(e&&e.type||`png`))}return this.getDataURL(e)}},t.prototype.convertToPixel=function(e,t,n){return zS(this,`convertToPixel`,e,t,n)},t.prototype.convertToLayout=function(e,t,n){return zS(this,`convertToLayout`,e,t,n)},t.prototype.convertFromPixel=function(e,t,n){return zS(this,`convertFromPixel`,e,t,n)},t.prototype.containPixel=function(e,t){if(this._disposed)this.id;else{var n=this._model,r;return z(ms(n,e),function(e,n){n.indexOf(`Models`)>=0&&z(e,function(e){var i=e.coordinateSystem;if(i&&i.containPoint)r||=!!i.containPoint(t);else if(n===`seriesModels`){var a=this._chartsMap[e.__viewId];a&&a.containPoint&&(r||=a.containPoint(t,e))}},this)},this),!!r}},t.prototype.getVisual=function(e,t){var n=this._model,r=ms(n,e,{defaultMainType:`series`}),i=r.seriesModel.getData(),a=r.hasOwnProperty(`dataIndexInside`)?r.dataIndexInside:r.hasOwnProperty(`dataIndex`)?i.indexOfRawIndex(r.dataIndex):null;return a==null?Nb(i,t):Mb(i,a,t)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;z(nC,function(t){var n=function(n){var r=e.getModel(),i=n.target,a;if(t===`globalout`?a={}:i&&Rb(i,function(e){var t=Cu(e);if(t&&t.dataIndex!=null){var n=t.dataModel||r.getSeriesByIndex(t.seriesIndex);return a=n&&n.getDataParams(t.dataIndex,t.dataType,i)||{},!0}if(t.eventData)return a=R({},t.eventData),!0},!0),a){var o=a.componentType,s=a.componentIndex;(o===`markLine`||o===`markPoint`||o===`markArea`)&&(o=`series`,s=a.seriesIndex);var c=o&&s!=null&&r.getComponent(o,s),l=c&&e[c.mainType===`series`?`_chartsMap`:`_componentsMap`][c.__viewId];a.event=n,a.type=t,e._$eventProcessor.eventInfo={targetEl:i,packedEvent:a,model:c,view:l},e.trigger(t,a)}};n.zrEventfulCallAtLast=!0,e._zr.on(t,n,e)});var t=this._messageCenter;z(aC,function(n,r){t.on(r,function(t){e.trigger(r,t)})}),Lb(t,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed)this.id;else{this._disposed=!0,this.getDom()&&bs(this.getDom(),mC,``);var e=this,t=e._api,n=e._model;z(e._componentsViews,function(e){e.dispose(n,t)}),z(e._chartsViews,function(e){e.dispose(n,t)}),e._zr.dispose(),e._dom=e._model=e._chartsMap=e._componentsMap=e._chartsViews=e._componentsViews=e._scheduler=e._api=e._zr=e._throttledZrFlush=e._theme=e._coordSysMgr=e._messageCenter=null,delete dC[e.id]}},t.prototype.resize=function(e){if(!this[xS]){if(this._disposed)this.id;else{this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption(`media`),r=e&&e.silent;this[CS]&&(r??=this[CS].silent,n=!0,this[CS]=null),this[xS]=!0,$S(this);try{n&&FS(this),RS.update.call(this,{type:`resize`,animation:R({duration:0},e&&e.animation)})}catch(e){throw this[xS]=!1,e}this[xS]=!1,HS.call(this,r),US.call(this,r)}}}},t.prototype.showLoading=function(e,t){if(this._disposed)this.id;else if(G(e)&&(t=e,e=``),e||=`default`,this.hideLoading(),uC[e]){var n=uC[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)}},t.prototype.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},t.prototype.makeActionFromEvent=function(e){var t=R({},e);return t.type=iC[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed)this.id;else if(G(t)||(t={silent:!!t}),rC[e.type]&&this._model){if(this[xS])this._pendingActions.push(e);else{var n=t.silent;VS.call(this,e,n);var r=t.flush;r?this._zr.flush():r!==!1&&E.browser.weChat&&this._throttledZrFlush(),HS.call(this,n),US.call(this,n)}}},t.prototype.updateLabelLayout=function(){zb.trigger(`series:layoutlabels`,this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed)this.id;else{var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},t.internalField=function(){FS=function(e){Kb(e._model);var t=e._scheduler;t.restorePipelines(e._zr,e._model),t.prepareStageTasks(),IS(e,!0),IS(e,!1),t.plan()},IS=function(e,t){for(var n=e._model,r=e._scheduler,i=t?e._componentsViews:e._chartsViews,a=t?e._componentsMap:e._chartsMap,o=e._zr,s=e._api,c=0;cK(t.get(`hoverLayerThreshold`),Fg.hoverLayerThreshold)&&!E.node&&!E.worker;(e._usingTHL||a)&&(t.eachSeries(function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered(function(e){var t=e.states.emphasis;t&&t.hoverLayer!==2&&(t.hoverLayer=+!!a)})}}),e._usingTHL=a)}}function a(e,t){var n=e.get(`blendMode`)||null;t.eachRendered(function(e){e.isGroup||(e.style.blend=n)})}function o(e,t){if(!e.preventAutoZ){var n=om(e);t.eachRendered(function(e){return cm(e,n.z,n.zlevel),!0})}}function s(e,t){t.eachRendered(function(e){if(!hp(e)){var t=e.getTextContent(),n=e.getTextGuideLine();e.stateTransition&&=null,t&&t.stateTransition&&(t.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),e.hasState()?(e.prevStates=e.currentStates,e.clearStates()):e.prevStates&&=null}})}function c(e,t){var n=e.getModel(`stateAnimation`),i=e.isAnimationEnabled(),a=n.get(`duration`),o=a>0?{duration:a,delay:n.get(`delay`),easing:n.get(`easing`)}:null;t.eachRendered(function(e){if(e.states&&e.states.emphasis){if(hp(e))return;if(e instanceof Wl&&Hd(e),e.__dirty){var t=e.prevStates;t&&e.useStates(t)}if(i){e.stateTransition=o;var n=e.getTextContent(),a=e.getTextGuideLine();n&&(n.stateTransition=o),a&&(a.stateTransition=o)}e.__dirty&&r(e)}})}YS=function(e){return new(function(t){w(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(t){for(;t;){var n=t.__ecComponentInfo;if(n!=null)return e._model.getComponent(n.mainType,n.index);t=t.parent}},n.prototype.enterEmphasis=function(t,n){pd(t,n),ZS(e)},n.prototype.leaveEmphasis=function(t,n){md(t,n),ZS(e)},n.prototype.enterBlur=function(t){hd(t),ZS(e)},n.prototype.leaveBlur=function(t){gd(t),ZS(e)},n.prototype.enterSelect=function(t){_d(t),ZS(e)},n.prototype.leaveSelect=function(t){vd(t),ZS(e)},n.prototype.getModel=function(){return e.getModel()},n.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},n.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},n.prototype.getECUpdateCycleVersion=function(){return e[SS]},n.prototype.usingTHL=function(){return e._usingTHL},n}(Pu))(e)},XS=function(e){function t(e,t){for(var n=0;n=0)){DC.push(n);var o=cb.wrapStageHandler(n,i);o.__prio=t,o.__raw=n,e.push(o)}}function kC(e,t){uC[e]=t}function AC(e,t,n){var r=Hb(`registerMap`);r&&r(e,t,n)}var jC=Rv;EC(fS,nb),EC(hS,ib),EC(hS,ab),EC(fS,Ab),EC(hS,jb),EC(yS,tS),vC(B_),yC(aS,V_),kC(`default`,sb),CC({type:Hu,event:Hu,update:Hu},Ze),CC({type:Uu,event:Uu,update:Uu},Ze),CC({type:Wu,event:qu,update:Wu,action:Ze,refineEvent:MC,publishNonRefinedEvent:!0}),CC({type:Gu,event:qu,update:Gu,action:Ze,refineEvent:MC,publishNonRefinedEvent:!0}),CC({type:Ku,event:qu,update:Ku,action:Ze,refineEvent:MC,publishNonRefinedEvent:!0});function MC(e,t,n,r){return{eventContent:{selected:kd(n),isFromClick:t.isFromClick||!1}}}_C(`default`,{}),_C(`dark`,Eb);function NC(e){return e==null?0:e.length||1}function PC(e){return e}var FC=function(){function e(e,t,n,r,i,a){this._old=e,this._new=t,this._oldKeyGetter=n||PC,this._newKeyGetter=r||PC,this.context=i,this._diffModeMultiple=a===`multiple`}return e.prototype.add=function(e){return this._add=e,this},e.prototype.update=function(e){return this._update=e,this},e.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},e.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},e.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},e.prototype.remove=function(e){return this._remove=e,this},e.prototype.execute=function(){this[this._diffModeMultiple?`_executeMultiple`:`_executeOneToOne`]()},e.prototype._executeOneToOne=function(){var e=this._old,t=this._new,n={},r=Array(e.length),i=Array(t.length);this._initIndexMap(e,null,r,`_oldKeyGetter`),this._initIndexMap(t,n,i,`_newKeyGetter`);for(var a=0;a1){var l=s.shift();s.length===1&&(n[o]=s[0]),this._update&&this._update(l,a)}else c===1?(n[o]=null,this._update&&this._update(s,a)):this._remove&&this._remove(a)}this._performRestAdd(i,n)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},r={},i=[],a=[];this._initIndexMap(e,n,i,`_oldKeyGetter`),this._initIndexMap(t,r,a,`_newKeyGetter`);for(var o=0;o1&&d===1)this._updateManyToOne&&this._updateManyToOne(l,c),r[s]=null;else if(u===1&&d>1)this._updateOneToMany&&this._updateOneToMany(l,c),r[s]=null;else if(u===1&&d===1)this._update&&this._update(l,c),r[s]=null;else if(u>1&&d>1)this._updateManyToMany&&this._updateManyToMany(l,c),r[s]=null;else if(u>1)for(var f=0;f1)for(var o=0;o30}var YC=G,XC=B,ZC=typeof Int32Array>`u`?Array:Int32Array,QC=`e\0\0`,$C=-1,ew=[`hasItemOption`,`_nameList`,`_idList`,`_invertedIndicesMap`,`_dimSummary`,`userOutput`,`_rawData`,`_dimValueGetter`,`_nameDimIdx`,`_idDimIdx`,`_nameRepeatCount`],tw=[`_approximateExtent`],nw,rw,iw,aw,ow,sw,cw,lw=function(){function e(e,t){this.type=`list`,this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=[`cloneShallow`,`downSample`,`minmaxDownSample`,`lttbDownSample`,`map`],this.CHANGABLE_METHODS=[`filterSelf`,`selectRange`],this.DOWNSAMPLE_METHODS=[`downSample`,`minmaxDownSample`,`lttbDownSample`];var n,r=!1;GC(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(r=!0,n=e),n||=[`x`,`y`];for(var i={},a=[],o={},s=!1,c={},l=0;l=t)){var n=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,i=this._idList;if(n.getSource().sourceFormat===`original`&&!n.pure)for(var a=[],o=e;o0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,r=n[e];r||=n[e]={};var i=r[t];return i??(i=this.getVisual(t),H(i)?i=i.slice():YC(i)&&(i=R({},i)),r[t]=i),i},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,YC(t)?R(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){YC(e)?R(this._layout,e):this._layout[e]=t},e.prototype.getLayout=function(e){return this._layout[e]},e.prototype.getItemLayout=function(e){return this._itemLayouts[e]},e.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?R(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){wu(this.hostModel&&this.hostModel.seriesIndex,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){z(this._graphicEls,function(n,r){n&&e&&e.call(t,n,r)})},e.prototype.cloneShallow=function(t){return t||=new e(this._schema?this._schema:XC(this.dimensions,this._getDimInfo,this),this.hostModel),ow(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];U(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(Ie(arguments)))})},e.internalField=function(){nw=function(e){var t=e._invertedIndicesMap;z(t,function(n,r){var i=e._dimInfos[r],a=i.ordinalMeta,o=e._store;if(a){n=t[r]=new ZC(a.categories.length);for(var s=0;s1&&(s+=`__ec__`+l),r[t]=s}}}(),e}();function uw(e,t){G_(e)||(e=q_(e)),t||={};var n=t.coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],i=q(),a=[],o=dw(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&JC(o),c=r===e.dimensionsDefine,l=c?qC(e):KC(r),u=t.encodeDefine;!u&&t.encodeDefaulter&&(u=t.encodeDefaulter(e,o));for(var d=q(u),f=new Wv(o),p=0;p0&&(e.name+=t-1)}),new WC({source:e,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function dw(e,t,n,r){var i=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return z(t,function(e){var t;G(e)&&(t=e.dimsDef)&&(i=Math.max(i,t.length))}),i}function fw(e,t,n){if(n||t.hasKey(e)){for(var r=0;t.hasKey(e+r);)r++;e+=r}return t.set(e,!0),e}var pw=function(){function e(e){this.coordSysDims=[],this.axisMap=q(),this.categoryAxisMap=q(),this.coordSysName=e}return e}();function mw(e){var t=e.get(`coordinateSystem`),n=new pw(t),r=hw[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}var hw={cartesian2d:function(e,t,n,r){var i=e.getReferringComponents(`xAxis`,gs).models[0],a=e.getReferringComponents(`yAxis`,gs).models[0];t.coordSysDims=[`x`,`y`],n.set(`x`,i),n.set(`y`,a),gw(i)&&(r.set(`x`,i),t.firstCategoryDimIndex=0),gw(a)&&(r.set(`y`,a),t.firstCategoryDimIndex??=1)},singleAxis:function(e,t,n,r){var i=e.getReferringComponents(`singleAxis`,gs).models[0];t.coordSysDims=[`single`],n.set(`single`,i),gw(i)&&(r.set(`single`,i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var i=e.getReferringComponents(`polar`,gs).models[0],a=i.findAxisModel(`radiusAxis`),o=i.findAxisModel(`angleAxis`);t.coordSysDims=[`radius`,`angle`],n.set(`radius`,a),n.set(`angle`,o),gw(a)&&(r.set(`radius`,a),t.firstCategoryDimIndex=0),gw(o)&&(r.set(`angle`,o),t.firstCategoryDimIndex??=1)},geo:function(e,t,n,r){t.coordSysDims=[`lng`,`lat`]},parallel:function(e,t,n,r){var i=e.ecModel,a=i.getComponent(`parallel`,e.get(`parallelIndex`)),o=t.coordSysDims=a.dimensions.slice();z(a.parallelAxisIndex,function(e,a){var s=i.getComponent(`parallelAxis`,e),c=o[a];n.set(c,s),gw(s)&&(r.set(c,s),t.firstCategoryDimIndex??=a)})},matrix:function(e,t,n,r){var i=e.getReferringComponents(`matrix`,gs).models[0];t.coordSysDims=[`x`,`y`];var a=i.getDimensionModel(`x`),o=i.getDimensionModel(`y`);n.set(`x`,a),n.set(`y`,o),r.set(`x`,a),r.set(`y`,o)}};function gw(e){return e.get(`type`)===`category`}function _w(e,t,n){n||={};var r=n.byIndex,i=n.stackedCoordDimension,a,o,s;vw(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var c=!!(e&&e.get(`stack`)),l,u,d,f,p=!0;function m(e){return e.type!==`ordinal`&&e.type!==`time`}if(z(a,function(e,t){W(e)&&(a[t]=e={name:e}),m(e)||(p=!1)}),z(a,function(e,t){c&&!e.isExtraCoord&&(!r&&!l&&e.ordinalMeta&&(l=e),!u&&m(e)&&(!p||e.coordDim!==`x`&&e.coordDim!==`angle`)&&(!i||i===e.coordDim)&&(u=e))}),u&&!r&&!l&&(r=!0),u){d=`__\0ecstackresult_`+e.id,f=`__\0ecstackedover_`+e.id,l&&(l.createInvertedIndices=!0);var h=u.coordDim,g=u.type,_=0;z(a,function(e){e.coordDim===h&&_++});var v={name:d,coordDim:h,coordDimIndex:_,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},y={name:f,coordDim:f,coordDimIndex:_+1,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(v.storeDimIndex=s.ensureCalculationDimension(f,g),y.storeDimIndex=s.ensureCalculationDimension(d,g)),o.appendCalculationDimension(v),o.appendCalculationDimension(y)):(a.push(v),a.push(y))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:r,stackedOverDimension:f,stackResultDimension:d}}function vw(e){return!GC(e.schema)}function yw(e,t){return!!t&&t===e.getCalculationInfo(`stackedDimension`)}function bw(e,t){return yw(e,t)?e.getCalculationInfo(`stackResultDimension`):t}function xw(e,t){var n=e.get(`coordinateSystem`),r=ng.get(n),i;return t&&t.coordSysDims&&(i=B(t.coordSysDims,function(e){var n={name:e},r=t.axisMap.get(e);return r&&(n.type=zC(r.get(`type`))),n})),i||=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||[`x`,`y`],i}function Sw(e,t,n){var r,i;return n&&z(e,function(e,a){var o=e.coordDim,s=n.categoryAxisMap.get(o);s&&(r??=a,e.ordinalMeta=s.getOrdinalMeta(),t&&(e.createInvertedIndices=!0)),e.otherDims.itemName!=null&&(i=!0)}),!i&&r!=null&&(e[r].otherDims.itemName=0),r}function Cw(e,t,n){n||={};var r=t.getSourceManager(),i,a=!1;e?(a=!0,i=q_(e)):(i=r.getSource(),a=i.sourceFormat===Eu);var o=mw(t),s=xw(t,o),c=n.useEncodeDefaulter,l=U(c)?c:c?Te(zg,s,t):null,u={coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:l,canOmitUnusedDimensions:!a},d=uw(i,u),f=Sw(d.dimensions,n.createInvertedIndices,o),p=a?null:r.getSharedDataStore(d),m=_w(t,{schema:d,store:p}),h=new lw(d,t);h.setCalculationInfo(m);var g=f!=null&&ww(i)?function(e,t,n,r){return r===f?n:this.defaultDimValueGetter(e,t,n,r)}:null;return h.hasItemOption=!1,h.initData(a?i:p,null,g),h}function ww(e){if(e.sourceFormat===`original`)return!H(Jo(Tw(e.data||[])))}function Tw(e){for(var t=0;t=t[0]&&e<=t[1]},getExtent:function(){return this._extents[0].slice()},getExtentUnsafe:function(e){return this._extents[e]},setExtent:function(e,t){Bw(this._extents,0,e,t)},setExtent2:function(e,t,n){var r=this._extents;r[e]||(r[e]=r[0].slice()),Bw(r,e,t,n)},freeze:function(){}};function Bw(e,t,n,r){As(n,r)&&(e[t][0]=n,e[t][1]=r)}function Vw(e){return Hw(e)||Ww(e)}function Hw(e){return e.type===`interval`}function Uw(e){return e.type===`time`}function Ww(e){return e.type===`log`}function Gw(e){return e.type===`ordinal`}function Kw(e){var t=Do(e),n=ro(10,t),r=eo(e/n);return r?r===2?r=3:r===3?r=5:r*=2:r=1,mo(r*n,-t)}function qw(e){return go(e)+2}function Jw(e,t){return io(e)/io(t)}function Yw(e,t,n){var r=n&&n.lookup;if(r){for(var i=0;i1&&a/o>2&&(i=Math.round(Math.ceil(i/o)*o)),i!==r[0]&&c(r[0],!0,!0);for(var s=i;s<=r[1];s+=o)c(s,!1,s===r[0]||s===r[1]);s-o!==r[1]&&c(r[1],!0,!0);function c(e,t,r){n({value:e,offInterval:t},r)}}var eT=function(e){w(t,e);function t(n){var r=e.call(this)||this;r.type=`ordinal`,r.parse=t.parse,Mw(r,t.decoratedMethods);var i=n.ordinalMeta;i||=new Ow({}),H(i)&&(i=new Ow({categories:B(i,function(e){return G(e)?e.value:e})})),r._ordinalMeta=i;var a=jw(null,null,n.extent||[0,i.categories.length-1]);return r._mapper=a.mapper,Nw(r,a.mapper),r}return t.parse=function(e){return e==null?e=NaN:W(e)?(e=this._ordinalMeta.getOrdinal(e),e??=NaN):e=eo(e),e},t.prototype.getTicks=function(){var e=[];return $w(this,0,function(t){e.push(t)}),e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null)this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;else{for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],i=0,a=this._ordinalMeta.categories.length,o=Za(a,t.length);i=0&&e=0&&e=0&&eo[0]&&mi[1]||!isFinite(p)||!isFinite(i[1]))break}else{if(m>f)break;p=Za(p,i[1]),m===f&&(p=i[1])}if(l.push({value:p}),p=mo(p+n,a),s){var h=s.calcNiceTickMultiple(p,d);h>=0&&(p=mo(p+h*n,a))}if(l.length>0&&p===l[l.length-1].value)break;if(l.length>u)return[]}var g=l.length?l[l.length-1].value:i[1];return r[1]>g&&l.push({value:e.expandToNicedExtent?mo(g+n,a):r[1]}),c&&o.pruneTicksByBreak(e.pruneByBreak,l,s.breaks,function(e){return e.value},t.interval,r),c&&e.breakTicks!==`none`&&o.addBreaksToTicks(l,s.breaks,r),l},t.prototype.getMinorTicks=function(e){return tT(this,e,sh(this),this._cfg.interval)},t.prototype.getLabel=function(e,t){if(e==null)return``;var n=t&&t.precision;return n==null?n=go(e.value)||0:n===`auto`&&(n=this._cfg.intervalPrecision),Gh(mo(e.value,n,!0))},t.type=`interval`,t}(Ew);Ew.registerClass(nT);var rT=function(e,t,n,r){for(;n>>1;e[i][1]16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function cT(e){var t=30*fh;return e/=t,e>6?6:e>3?3:e>2?2:1}function lT(e){return e/=dh,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function uT(e,t){return e/=t?uh:lh,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function dT(e){return Qa(Oo(e,!0),1)}function fT(e,t,n){var r=Math.max(0,ge(yh,t)-1);return Ah(new Date(e),yh[r],n).getTime()}function pT(e,t){var n=new Date(0);n[e](1);var r=n.getTime();n[e](1+t);var i=n.getTime()-r;return function(e,t){return Math.max(0,Math.round((t-e)/i))}}function mT(e,t,n,r,i,a){var o=bh,s=0;function c(e,t,n,i,o,c,l){for(var u=pT(o,e),d=t,f=new Date(d);d3e3));)if(f[o](f[i]()+e),d=f.getTime(),a){var p=a.calcNiceTickMultiple(d,u);p>0&&(f[o](f[i]()+p*e),d=f.getTime())}l.push({value:d,notAdd:d>r[1]})}function l(e,i,a){var o=[],s=!i.length;if(!oT(wh(e),r[0],r[1],n)){s&&(i=[{value:fT(r[0],e,n)},{value:r[1]}]);for(var l=0;l=r[0]&&u<=r[1]&&c(f,u,d,p,m,h,o),e===`year`&&a.length>1&&l===0&&a.unshift({value:a[0].value-f})}}for(var l=0;l=r[0]&&v<=r[1]&&f++)}var y=i/t;if(f>y*1.5&&p>y/1.5||(u.push(g),f>y||e===o[m]))break}d=[]}}for(var b=xe(B(u,function(e){return xe(e,function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd})}),function(e){return e.length>0}),x=b.length-1,S=[],m=0;mr[0])&&S.unshift({value:r[0],time:{level:0,upperTimeUnit:O,lowerTimeUnit:O},notNice:!0}),(!D||D.values&&(a=s);var c=aT.length,l=Math.min(rT(aT,a,0,c),c-1),u=aT[l][1],d=aT[Math.max(l-1,0)][0];e.setTimeInterval({approxInterval:a,interval:u,minLevelUnit:d})};Ew.registerClass(iT);var gT=0,_T=1,vT=2,yT=function(e){w(t,e);function t(n){var r=e.call(this)||this;r.type=`log`,r.parse=nT.parse,r.base=n.logBase||10;var i=[],a=[],o=r._lookup={from:i,to:a};i[gT]=i[_T]=a[gT]=a[_T]=NaN,Mw(r,t.mapperMethods);var s=ah(),c=n.breakOption,l={lookup:o};return s&&s.parseAxisBreakOptionInwardTransform(c,r,{noNegative:!0},vT,l),r.powStub=new nT({breakParsed:l.original}),r.intervalStub=new nT({breakParsed:l.transformed}),Nw(r,r.intervalStub),r}return t.prototype.getTicks=function(e){var t=this.base,n=this.powStub,r=ah(),i=this.intervalStub,a={lookup:{from:i.getExtent(),to:n.getExtent()}};return B(i.getTicks(e||{}),function(e){var i=e.value,o=Yw(i,t,a),s;if(r){var c=r.getTicksBreakOutwardTransform(this,e,sh(n),this._lookup);c&&(s=c.vBreak,o=c.tickVal)}return{value:o,break:s}},this)},t.prototype.getMinorTicks=function(e){return tT(this,e,sh(this.powStub),this.intervalStub.getConfig().interval)},t.prototype.getLabel=function(e,t){return this.intervalStub.getLabel(e,t)},t.type=`log`,t.mapperMethods={needTransform:function(){return!0},normalize:function(e){return this.intervalStub.normalize(Jw(e,this.base))},scale:function(e){return Yw(this.intervalStub.scale(e),this.base,null)},transformIn:function(e,t){return e=Jw(e,this.base),t&&t.depth===2?e:this.intervalStub.transformIn(e,t)},transformOut:function(e,t){var n=t?t.depth:null;return bT.depth=n,xT.lookup=this._lookup,Yw(n===2?e:this.intervalStub.transformOut(e,bT),this.base,xT)},contain:function(e){return this.powStub.contain(e)},setExtent:function(e,t){this.setExtent2(0,e,t)},setExtent2:function(e,t,n){if(!(!As(t,n)||t<=0||n<=0)){var r=ST,i=ST;if(e===0){var a=this._lookup;r=a.to,i=a.from}this.powStub.setExtent2(e,r[gT]=t,r[_T]=n);var o=this.base;this.intervalStub.setExtent2(e,i[gT]=Jw(t,o),i[_T]=Jw(n,o))}},getFilter:function(){return{g:0}},sanitize:function(e,t){return As(t[0],t[1])&&Fo(e)&&e<=0&&(e=t[0]),e},getDefaultStartValue:function(){return 1},getExtent:function(){return this.powStub.getExtent()},getExtentUnsafe:function(e,t){return t===null?this.powStub.getExtentUnsafe(e,null):this.intervalStub.getExtentUnsafe(e,t)}},t}(Ew);Ew.registerClass(yT);var bT={},xT={},ST=[],CT={value:1,category:1,time:1,log:1},wT=fs();function TT(e){var t=e.get(`type`);return(t==null||!Xe(CT,t)&&!Ew.getClass(t))&&(t=`value`),t}function ET(e,t,n){var r=ah(),i;switch(r&&(i=LT(e,t,n)),t){case`category`:return new eT({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:ws()});case`time`:return new iT({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get(`useUTC`),breakOption:i});case`log`:return new yT({logBase:e.get(`logBase`),breakOption:i});case`value`:return new nT({breakOption:i});default:return new((Ew.getClass(t))||nT)({})}}function DT(e,t,n){var r=n?Fw(e,null):e.getExtentUnsafe(0,null),i=r[0],a=r[1];return As(i,a)?i===t||a===t?2:it?1:3:3}function OT(e){wT(e).noOnMyZero=!0}function kT(e){return wT(e).noOnMyZero}function AT(e){var t=e.getLabelModel().get(`formatter`);if(e.type===`time`){var n=xh(t);return function(t,r){return e.scale.getFormattedLabel(t,r,n)}}if(W(t))return function(n){var r=e.scale.getLabel(n);return t.replace(`{value}`,r??``)};if(U(t)){if(e.type===`category`)return function(n,r){return t(jT(e,n),n.value-e.scale.getExtent()[0],null)};var r=ah();return function(n,i){var a=null;return r&&(a=r.makeAxisLabelFormatterParamBreak(a,n.break)),t(jT(e,n),i,a)}}return function(t){return e.scale.getLabel(t)}}function jT(e,t){var n=e.scale;return Gw(n)?n.getLabel(t):t.value}function MT(e){return e.get(`interval`)??`auto`}function NT(e){return e.type===`category`&&MT(e.getLabelModel())===0}function PT(e,t){var n={};return z(e.mapDimensionsAll(t),function(t){n[bw(e,t)]=!0}),Ce(n)}function FT(e){return e===`middle`||e===`center`}function IT(e){return e.getShallow(`show`)}function LT(e,t,n){var r=e.get(`breaks`,!0);if(r!=null)return!ah()||!n||!RT(t)?void 0:r}function RT(e){return e!==`category`}function zT(e,t,n,r,i,a){var o=Ww(e),s=o?e.intervalStub:e;if(s.setExtent(r[0],r[1]),o){var c=e.powStub,l={depth:2},u=e.transformOut(r[0],l),d=e.transformOut(r[1],l),f=Zw(n,r);t[0]&&!f[0]&&(u=i[0]),t[1]&&!f[1]&&(d=i[1]),c.setExtent(u,d)}s.setConfig(a)}function BT(e,t){return Gw(e)?e.getRawOrdinalNumber(t.value):t.value}function VT(e,t){return Gw(e)&&!!t.get(`boundaryGap`)}var HT=function(){function e(){}return e.prototype.needIncludeZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}();Ns();var UT=fs();fs();function WT(e,t){var n=e.model,r=UT(Yb(n.ecModel)).keyed,i=r&&r.get(t);return i&&i.get(n.uid)}function GT(e,t){return JT(WT(e,t))}function KT(e,t){var n=[];return qT(e.model.ecModel,function(e){for(var r=0;r0&&u[1]>0&&!d[0]&&(u[0]=0),u[0]<0&&u[1]<0&&!d[1]&&(u[1]=0));var y=!1;u[0]>u[1]&&(u.reverse(),y=!0);var b=aE(e,t.get(`startValue`,!0)),x=b!=null;!Fo(b)&&r&&(b=e.getDefaultStartValue?e.getDefaultStartValue():0),Fo(b)&&(x||!_||v)&&(bu[1]&&!d[1]&&(u[1]=b,d[1]=!0)),iE(this._i={scale:e,dataMM:l,noZoomEffMM:u,zoomMM:[],fixMM:d,zoomFixMM:[!1,!1],startValue:b,isBlank:g,incl0:v,tggAxInv:y,ctnShp:i},u)}return e.prototype.makeNoZoom=function(){return this._i.noZoomEffMM.slice()},e.prototype.makeFinal=function(){var e=this._i,t=e.zoomMM,n=e.noZoomEffMM,r=e.zoomFixMM,i=e.fixMM,a={fixMM:i,zoomFixMM:r,isBlank:e.isBlank,incl0:e.incl0,tggAxInv:e.tggAxInv,ctnShp:e.ctnShp,effMM:n.slice()},o=a.effMM;return t[0]!=null&&(o[0]=t[0],i[0]=r[0]=!0),t[1]!=null&&(o[1]=t[1],i[1]=r[1]=!0),iE(e,o),a},e.prototype.makeRenderInfo=function(){return{startValue:this._i.startValue}},e.prototype.setZoomMM=function(e,t){this._i.zoomMM[e]=t},e}();function iE(e,t){var n=e.scale,r=e.dataMM;n.sanitize&&(t[0]=n.sanitize(t[0],r),t[1]=n.sanitize(t[1],r),Ms(t))}function aE(e,t){return t==null?null:Ne(t)?NaN:e.parse(t)}function oE(e,t){var n;if(Gw(e))n=[0,0];else{var r=t.get(`boundaryGap`);typeof r==`boolean`&&(r=null),n=H(r)?r:[r,r]}return[sE(n[0]),sE(n[1])]}function sE(e){return xa(typeof e==`boolean`?0:e,1)||0}function cE(e){var t=tE(e.scale);return t.extent||=ws(),t}function lE(e,t){cE(e).dimIdxInCoord=t.get(e.dim)}function uE(e,t){var n=e.scale,r=e.model,i=e.dim;n.rawExtentInfo||dE(n,e,i,r,t)}function dE(e,t,n,r,i){var a=cE(t),o=a.extent,s=!1;YT(t,function(r){if(r.boxCoordinateSystem){var i=og(r).coord,c=a.dimIdxInCoord;if(c>=0&&H(i)){var l=i[c];l!=null&&!H(l)&&Ts(o,e.parse(l))}}else if(r.coordinateSystem){var u=r.getData();if(u){var d=e.getFilter?e.getFilter():null;z(PT(u,n),function(e){Os(o,u.getApproximateExtent(e,d))})}r.__requireStartValue&&r.__requireStartValue(t)&&(s=!0)}});var c=gE(e,t,r);pE(e,new rE(e,r,o,s,c),i),a.extent=null}function fE(e,t){var n=e.scale;pE(n,new rE(n,e.model,t,!1,!1),nE)}function pE(e,t,n){e.rawExtentInfo=t,t.from=n}var mE=q();function hE(e,t,n,r,i){e.rawExtentInfo||fE({scale:e,model:t},i||ws());var a=e.rawExtentInfo.makeFinal(),o=a.effMM;return e.setExtent(o[0],o[1]),e.setBlank(a.isBlank),r&&a.tggAxInv&&n&&!n.get(`legacyMinMaxDontInverseAxis`)&&(r.inverse=!r.inverse),a}function gE(e,t,n){var r=VT(e,n),i=n.get(`containShape`,!0);if(i==null&&!r&&(i=!0),!i)return!1;var a=!1;return ZT(t,function(e){a=!!mE.get(e)||a}),a}function _E(e,t,n,r){if(n.ctnShp){var i;if(ZT(e,function(t){var n=mE.get(t);if(n){var a=n(e,r);a&&(i||=[0,0],Es(i,a[0]),Ds(i,a[1]),OT(e))}}),i){var a=t.getExtent();if(Gw(t))e.onBand||t.setExtent2(1,Za(a[0],a[0]+i[0]),Qa(a[1],a[1]+i[1]));else{var o=a.slice();n.zoomFixMM[0]||(o[0]=Za(o[0],t.transformOut(t.transformIn(o[0],null)+i[0],null))),n.zoomFixMM[1]||(o[1]=Qa(o[1],t.transformOut(t.transformIn(o[1],null)+i[1],null))),(o[0]a[1])&&t.setExtent2(1,o[0],o[1])}}}}function vE(e,t){var n=Ww(e),r=n?e.intervalStub:e,i=t.fixMinMax||[],a=n?e.getExtent():null,o=r.getExtent(),s=Xw(o,i,t.rawExtentResult);r.setExtent(s[0],s[1]),s=r.getExtent();var c=n?bE(r,t):yE(r,t),l=c.intervalPrecision,u=c.interval,d=t.userInterval;d!=null&&(c.interval=d,c.intervalPrecision=qw(d)),i[0]||(s[0]=mo(to(s[0]/u)*u,l)),i[1]||(s[1]=mo(no(s[1]/u)*u,l)),d!=null&&(c.niceExtent=s.slice()),zT(e,i,o,s,a,c)}function yE(e,t){var n=Qw(t.splitNumber,5),r=Lw(e),i=t.minInterval,a=t.maxInterval,o=Oo(r/n,!0);i!=null&&oa&&(o=a);var s=qw(o),c=e.getExtent(),l=[mo(no(c[0]/o)*o,s),mo(to(c[1]/o)*o,s)];return{interval:o,intervalPrecision:s,niceExtent:l}}function bE(e,t){var n=Qw(t.splitNumber,10),r=e.getExtent(),i=Lw(e),a=Qa(Eo(i),1);n/i*a<=.5&&(a*=10);var o=qw(a),s=[mo(no(r[0]/a)*a,o),mo(to(r[1]/a)*a,o)];return{intervalPrecision:o,interval:a,niceExtent:s}}function xE(e){var t=e.scale,n=e.model,r=n.axis,i=n.ecModel;SE(t,n,r,i,null)}function SE(e,t,n,r,i){var a=hE(e,t,r,n,i),o=Hw(e)||Uw(e);CE(e,{splitNumber:t.get(`splitNumber`),fixMinMax:a.fixMM,userInterval:t.get(`interval`),minInterval:o?t.get(`minInterval`):null,maxInterval:o?t.get(`maxInterval`):null,rawExtentResult:a}),n&&r&&_E(n,e,a,r)}function CE(e,t){wE[e.type](e,t)}var wE={interval:vE,log:vE,time:hT,ordinal:Ze},TE=[],EE={registerPreprocessor:vC,registerProcessor:yC,registerPostInit:bC,registerPostUpdate:xC,registerUpdateLifecycle:SC,registerAction:CC,registerCoordinateSystem:wC,registerLayout:TC,registerVisual:EC,registerTransform:jC,registerLoading:kC,registerMap:AC,registerImpl:Vb,PRIORITY:bS,ComponentModel:Eg,ComponentView:Fy,SeriesModel:Ey,ChartView:zy,registerComponentModel:function(e){Eg.registerClass(e)},registerComponentView:function(e){Fy.registerClass(e)},registerSeriesModel:function(e){Ey.registerClass(e)},registerChartView:function(e){zy.registerClass(e)},registerCustomSeries:function(e,t){Wb(e,t)},registerSubTypeDefaulter:function(e,t){Eg.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){qa(e,t)}};function DE(e){H(e)?z(e,function(e){DE(e)}):ge(TE,e)>=0||(TE.push(e),U(e)&&(e={install:e}),e.install(EE))}var OE=fs(),kE=fs(),AE={estimate:1,determine:2};function jE(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function ME(e,t){var n=e.getLabelModel().get(`customValues`);if(n){var r=e.scale;return{labels:B(PE(n,r),function(t,n){return{formattedLabel:AT(e)(t,n),rawLabel:r.getLabel(t),tick:t}})}}return e.type===`category`?FE(e,t):RE(e)}function NE(e,t,n){var r=e.scale,i=e.getTickModel().get(`customValues`);return i?{ticks:PE(i,r)}:e.type===`category`?LE(e,t):{ticks:r.getTicks(n)}}function PE(e,t){var n=t.getExtent(),r=[];return z(e,function(e){e=t.parse(e),e>=n[0]&&e<=n[1]&&r.push(e)}),Fs(r,Ls,null),ho(r),B(r,function(e){return{value:e}})}function FE(e,t){var n=e.getLabelModel(),r=IE(e,n,t);return!n.get(`show`)||e.scale.isBlank()?{labels:[]}:r}function IE(e,t,n){var r=BE(e),i=MT(t),a=n.kind===AE.estimate;if(!a){var o=HE(r,i);if(o)return o}var s,c;U(i)?s=YE(e,i,!1):(c=i===`auto`?WE(e,n):i,s=YE(e,c,!1));var l={labels:s,labelCategoryInterval:c};return a?n.out.noPxChangeTryDetermine.push(function(){return UE(r,i,l),!0}):UE(r,i,l),l}function LE(e,t){var n=zE(e),r=MT(t),i=HE(n,r);if(i)return i;var a,o;if((!t.get(`show`)||e.scale.isBlank())&&(a=[]),U(r))a=YE(e,r,!0);else if(r===`auto`){var s=IE(e,e.getLabelModel(),jE(AE.determine));o=s.labelCategoryInterval,a=B(s.labels,function(e){return e.tick})}else o=r,a=YE(e,o,!0);return UE(n,r,{ticks:a,tickCategoryInterval:o})}function RE(e){var t=e.scale.getTicks(),n=AT(e);return{labels:B(t,function(t,r){return{formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tick:t}})}}var zE=VE(`axisTick`),BE=VE(`axisLabel`);function VE(e){return function(t){return kE(t)[e]||(kE(t)[e]={list:[]})}}function HE(e,t){for(var n=0;nu&&(l=Math.max(1,Math.floor(c/u)));for(var d=s[0],f=e.dataToCoord(d+1)-e.dataToCoord(d),p=Math.abs(f*Math.cos(a)),m=Math.abs(f*Math.sin(a)),h=0,g=0;d<=s[1];d+=l){var _=0,v=0,y=_a(i({value:d}),r.font,`center`,`top`);_=y.width*1.3,v=y.height*1.3,h=Math.max(h,_,7),g=Math.max(g,v,7)}var b=h/p,x=g/m;isNaN(b)&&(b=1/0),isNaN(x)&&(x=1/0);var S=Math.max(0,Math.floor(Math.min(b,x)));return n===AE.estimate?(t.out.noPxChangeTryDetermine.push(V(KE,null,e,S,c)),S):qE(e,S,c)??S}function KE(e,t,n){return qE(e,t,n)==null}function qE(e,t,n){var r=OE(e.model),i=e.getExtent(),a=r.lastAutoInterval,o=r.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-t)<=1&&Math.abs(o-n)<=1&&a>t&&r.axisExtent0===i[0]&&r.axisExtent1===i[1])return a;r.lastTickCount=n,r.lastAutoInterval=t,r.axisExtent0=i[0],r.axisExtent1=i[1]}function JE(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get(`rotate`)||0,font:t.getFont()}}function YE(e,t,n){var r=AT(e),i=e.scale,a=[],o=U(t);return $w(i,o?0:t,function(e,s){var c=i.getLabel(e);if(o){var l=!!t(e.value,c);if(e.offInterval=!l,!l&&!s)return}a.push(n?e:{formattedLabel:r(e),rawLabel:c,tick:e})}),a}var XE=.8;function ZE(e,t){t||={};var n={w:NaN,w2:NaN},r=e.scale,i=t.fromStat,a=t.min,o=Iw(r);Fo(o)||(o=NaN);var s=e.getExtent(),c=$a(s[1]-s[0]);return Gw(r)?QE(n,e,o,c):i&&$E(n,e,o,c,i),a!=null&&(n.w=Fo(n.w)?Qa(a,n.w):a),n}function QE(e,t,n,r){var i=t.onBand,a=n+ +!!i;a===0&&(a=1),e.w=r/a,!i&&n&&r&&(e.w2=e.w*n/r)}function $E(e,t,n,r,i){var a=!1,o=-1/0;z(i.key?[GT(t,i.key)]:KT(t,i.sers||[]),function(e){var t=e.liPosMinGap;t!=null&&(t>0?(t>o&&(o=t),a=!1):t===-2&&(a=!0))}),Fo(n)&&n>0&&Fo(o)?(e.w=r/n*o,e.w2=o):a&&(e.w=r*XE,e.w2=e.w*n/r)}var eD=[0,1],tD=function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=n&&e<=r},e.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this.scale;return e=n.normalize(n.parse(e)),co(e,eD,nD(this),t)},e.prototype.coordToData=function(e,t){var n=co(e,nD(this),eD,t);return this.scale.scale(n)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){e||={};var t=e.tickModel||this.getTickModel(),n=B(NE(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}).ticks,function(e){return{coord:this.dataToCoord(BT(this.scale,e)),tick:e}},this),r=t.get(`alignWithLabel`),i=rD(this,n,r);return B(n,function(e){return{coord:e.coord,tickValue:e.tick.value,onBand:i}})},e.prototype.getMinorTicksCoords=function(){if(Gw(this.scale))return[];var e=this.model.getModel(`minorTick`).get(`splitNumber`);return e>0&&e<100||(e=5),B(this.scale.getMinorTicks(e),function(e){return B(e,function(e){return{coord:this.dataToCoord(e),tickValue:e}},this)},this)},e.prototype.getViewLabels=function(e){return e||=jE(AE.determine),ME(this,e).labels},e.prototype.getLabelModel=function(){return this.model.getModel(`axisLabel`)},e.prototype.getTickModel=function(){return this.model.getModel(`axisTick`)},e.prototype.getBandWidth=function(){return ZE(this,{min:1}).w},e.prototype.calculateCategoryInterval=function(e){return e||=jE(AE.determine),GE(this,e)},e}();function nD(e){var t=e.getExtent();if(e.onBand){var n=(t[1]-t[0])/e.scale.count()/2;t[0]+=n,t[1]-=n}return t}function rD(e,t,n){var r=t.length;if(!e.onBand||n||!r)return!1;var i=ZE(e).w;if(!i)return!1;z(t,function(e){e.coord-=i/2});var a=e.scale.getExtent(),o=t[r-1];return o.tick.offInterval&&t.pop(),t.push({coord:o.coord+i,tick:{value:a[1]+1}}),!0}yl.CMD;function iD(e,t,n,r,i,a,o,s){var c=i-e,l=a-t,u=n-e,d=r-t,f=Math.sqrt(u*u+d*d);u/=f,d/=f;var p=(c*u+l*d)/f;s&&(p=Math.min(Math.max(p,0),1)),p*=f;var m=o[0]=e+p*u,h=o[1]=t+p*d;return Math.sqrt((m-i)*(m-i)+(h-a)*(h-a))}var aD=new J,oD=new J,sD=new J,cD=new J,lD=new J,uD=[],dD=new J;function fD(e,t){if(t<=180&&t>0){t=t/180*Math.PI,aD.fromArray(e[0]),oD.fromArray(e[1]),sD.fromArray(e[2]),J.sub(cD,aD,oD),J.sub(lD,sD,oD);var n=cD.len(),r=lD.len();if(!(n<.001||r<.001)){cD.scale(1/n),lD.scale(1/r);var i=cD.dot(lD);if(Math.cos(t)1&&J.copy(dD,sD),dD.toArray(e[1])}}}}function pD(e,t,n){if(n<=180&&n>0){n=n/180*Math.PI,aD.fromArray(e[0]),oD.fromArray(e[1]),sD.fromArray(e[2]),J.sub(cD,oD,aD),J.sub(lD,sD,oD);var r=cD.len(),i=lD.len();if(!(r<.001||i<.001)&&(cD.scale(1/r),lD.scale(1/i),cD.dot(t)=o)J.copy(dD,sD);else{dD.scaleAndAdd(lD,a/Math.tan(Math.PI/2-s));var c=sD.x===oD.x?(dD.y-oD.y)/(sD.y-oD.y):(dD.x-oD.x)/(sD.x-oD.x);if(isNaN(c))return;c<0?J.copy(dD,oD):c>1&&J.copy(dD,sD)}dD.toArray(e[1])}}}function mD(e,t,n,r){var i=n===`normal`,a=i?e:e.ensureState(n);a.ignore=t;var o=r.get(`smooth`);o=o===!0?.3:Math.max(+o,0)||0,a.shape=a.shape||{},a.shape.smooth=o;var s=r.getModel(`lineStyle`).getLineStyle();i?e.useStyle(s):a.style=s}function hD(e,t){var n=t.smooth,r=t.points;if(r){if(e.moveTo(r[0][0],r[0][1]),n>0&&r.length>=3){var i=lt(r[0],r[1]),a=lt(r[1],r[2]);if(!i||!a){e.lineTo(r[1][0],r[1][1]),e.lineTo(r[2][0],r[2][1]);return}var o=Math.min(i,a)*n,s=ft([],r[1],r[0],o/i),c=ft([],r[1],r[2],o/a),l=ft([],s,c,.5);e.bezierCurveTo(s[0],s[1],s[0],s[1],l[0],l[1]),e.bezierCurveTo(c[0],c[1],c[0],c[1],r[2][0],r[2][1])}else for(var u=1;u0&&i&&S(-d/a,0,a);var g=e[0],_=e[a-1],v,y;b(),v<0&&C(-v,.8),y<0&&C(y,.8),b(),x(v,y,1),x(y,v,-1),b(),v<0&&w(-v),y<0&&w(y);function b(){v=g.rect[o]-n,y=r-_.rect[o]-_.rect[s]}function x(e,t,n){if(e<0){var r=Math.min(t,-e);if(r>0){S(r*n,0,a);var i=r+e;i<0&&C(-i*n,1)}else C(-e*n,1)}}function S(t,n,r){t!==0&&(u=!0);for(var i=n;i0)for(var c=0;c0;c--){var f=r[c-1]*d;S(-f,c,a)}}}function w(e){var t=e<0?-1:1;e=Math.abs(e);for(var n=Math.ceil(e/(a-1)),r=0;r0?S(n,0,r+1):S(-n,a-r-1,a),e-=n,e<=0)return}return u}function MD(e){var t=[];e.sort(function(e,t){return+!!t.suggestIgnore-!!e.suggestIgnore||t.priority-e.priority});function n(e){if(!e.ignore){var t=e.ensureState(`emphasis`);t.ignore??=!1}e.ignore=!0}for(var r=0;r-1&&(s.style.stroke=s.style.fill,s.style.fill=Z.color.neutral00,s.style.lineWidth=2),t},t.type=`series.line`,t.dependencies=[`grid`,`polar`],t.defaultOption={z:3,coordinateSystem:`cartesian2d`,legendHoverLink:!0,clip:!0,label:{position:`top`},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:`solid`},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:`emptyCircle`,symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:`auto`,connectNulls:!1,sampling:`none`,animationEasing:`linear`,progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:`clone`},triggerLineEvent:!1,triggerEvent:!1},t}(Ey);function FD(e,t){var n=e.mapDimensionsAll(`defaultedLabel`),r=n.length;if(r===1){var i=yv(e,t,n[0]);return i==null?null:i+``}if(r){for(var a=[],o=0;o=0&&r.push(t[a])}return r.join(` `)}var LD=function(e){w(t,e);function t(t,n,r,i){var a=e.call(this)||this;return a.updateData(t,n,r,i),a}return t.prototype._createSymbol=function(e,t,n,r,i,a){this.removeAll();var o=ax(e,-1,-1,2,2,null,a);o.attr({z2:K(i,100),culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),o.drift=RD,this._symbolType=e,this.add(o)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){pd(this.childAt(0))},t.prototype.downplay=function(){md(this.childAt(0))},t.prototype.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},t.prototype.setDraggable=function(e,t){var n=this.childAt(0);n.draggable=e,n.cursor=!t&&e?`move`:n.cursor},t.prototype.updateData=function(e,n,r,i){this.silent=!1;var a=e.getItemVisual(n,`symbol`)||`circle`,o=e.hostModel,s=t.getSymbolSize(e,n),c=t.getSymbolZ2(e,n),l=a!==this._symbolType,u=i&&i.disableAnimation;if(l){var d=e.getItemVisual(n,`symbolKeepAspect`);this._createSymbol(a,e,n,s,c,d)}else{var f=this.childAt(0);f.silent=!1;var p={scaleX:s[0]/2,scaleY:s[1]/2};u?f.attr(p):pp(f,p,o,n),yp(f)}if(this._updateCommon(e,n,s,r,i),l){var f=this.childAt(0);if(!u){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:f.style.opacity}};f.scaleX=f.scaleY=0,f.style.opacity=0,mp(f,p,o,n)}}u&&this.childAt(0).stopAnimation(`leave`)},t.prototype._updateCommon=function(e,t,n,r,i){var a=this.childAt(0),o=e.hostModel,s,c,l,u,d,f,p,m,h;if(r&&(s=r.emphasisItemStyle,c=r.blurItemStyle,l=r.selectItemStyle,u=r.focus,d=r.blurScope,p=r.labelStatesModels,m=r.hoverScale,h=r.cursorStyle,f=r.emphasisDisabled),!r||e.hasItemOption){var g=r&&r.itemModel?r.itemModel:e.getItemModel(t),_=g.getModel(`emphasis`);s=_.getModel(`itemStyle`).getItemStyle(),l=g.getModel([`select`,`itemStyle`]).getItemStyle(),c=g.getModel([`blur`,`itemStyle`]).getItemStyle(),u=_.get(`focus`),d=_.get(`blurScope`),f=_.get(`disabled`),p=vm(g),m=_.getShallow(`scale`),h=g.getShallow(`cursor`)}var v=e.getItemVisual(t,`symbolRotate`);a.attr(`rotation`,(v||0)*Math.PI/180||0);var y=sx(e.getItemVisual(t,`symbolOffset`),n);y&&(a.x=y[0],a.y=y[1]),h&&a.attr(`cursor`,h);var b=e.getItemVisual(t,`style`),x=b.fill;if(a instanceof Xl){var S=a.style;a.useStyle(R({image:S.image,x:S.x,y:S.y,width:S.width,height:S.height},b))}else a.__isEmptyBrush?a.useStyle(R({},b)):a.useStyle(b),a.style.decal=null,a.setColor(x,i&&i.symbolInnerColor),a.style.strokeNoScale=!0;var C=e.getItemVisual(t,`liftZ`),w=this._z2;C==null?w!=null&&(a.z2=w,this._z2=null):w??(this._z2=a.z2,a.z2+=C);var T=i&&i.useNameLabel;_m(a,p,{labelFetcher:o,labelDataIndex:t,defaultText:E,inheritColor:x,defaultOpacity:b.opacity});function E(t){return T?e.getName(t):FD(e,t)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var D=a.ensureState(`emphasis`);D.style=s,a.ensureState(`select`).style=l,a.ensureState(`blur`).style=c;var O=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;D.scaleX=this._sizeX*O,D.scaleY=this._sizeY*O,this.setSymbolScale(1),Md(this,u,d,f)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,t,n){var r=this.childAt(0),i=Cu(this).dataIndex,a=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var o=r.getTextContent();o&&gp(o,{style:{opacity:0}},t,{dataIndex:i,removeOpt:a,cb:function(){r.removeTextContent()}})}else r.removeTextContent();gp(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:a})},t.getSymbolSize=function(e,t){return ox(e.getItemVisual(t,`symbolSize`))},t.getSymbolZ2=function(e,t){return e.getItemVisual(t,`z2`)},t}(Ba);function RD(e,t){this.parent.drift(e,t)}function zD(e,t,n,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r&&r.isIgnore&&r.isIgnore(n))&&!(r&&r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&e.getItemVisual(n,`symbol`)!==`none`}function BD(e){return e!=null&&!G(e)&&(e={isIgnore:e}),e||{}}function VD(e){var t=e.hostModel,n=t.getModel(`emphasis`);return{emphasisItemStyle:n.getModel(`itemStyle`).getItemStyle(),blurItemStyle:t.getModel([`blur`,`itemStyle`]).getItemStyle(),selectItemStyle:t.getModel([`select`,`itemStyle`]).getItemStyle(),focus:n.get(`focus`),blurScope:n.get(`blurScope`),emphasisDisabled:n.get(`disabled`),hoverScale:n.get(`scale`),labelStatesModels:vm(t),cursorStyle:t.get(`cursor`)}}function HD(e,t,n,r,i,a,o){var s=new e(t,n,r,i);return s.setPosition(a),t.setItemGraphicEl(n,s),o.add(s),s}var UD=function(){function e(e){this.group=new Ba,this._SymbolCtor=e||LD}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=BD(t);var n=this.group,r=e.hostModel,i=this._data,a=this._SymbolCtor,o=t.disableAnimation,s=this._seriesScope=VD(e),c={disableAnimation:o},l=t.getSymbolPoint||function(t){return e.getItemLayout(t)};i||n.removeAll(),e.diff(i).add(function(r){var i=l(r);zD(e,i,r,t)&&HD(a,e,r,s,c,i,n)}).update(function(u,d){var f=i.getItemGraphicEl(d),p=l(u);if(!zD(e,p,u,t))n.remove(f);else{var m=e.getItemVisual(u,`symbol`)||`circle`,h=f&&f.getSymbolType&&f.getSymbolType();if(!f||h&&h!==m)n.remove(f),f=new a(e,u,s,c),f.setPosition(p);else{f.updateData(e,u,s,c);var g={x:p[0],y:p[1]};o?f.attr(g):pp(f,g,r)}n.add(f),e.setItemGraphicEl(u,f)}}).remove(function(e){var t=i.getItemGraphicEl(e);t&&t.fadeOut(function(){n.remove(t)},r)}).execute(),this._getSymbolPoint=l,this._data=e},e.prototype.updateLayout=function(e){var t=this._data;if(t)for(var n=this,r=t.getStore(),i=0,a=r.count();i0?n=r[0]:r[1]<0&&(n=r[1]),n}function KD(e,t,n,r){var i=NaN;e.stacked&&(i=n.get(n.getCalculationInfo(`stackedOverDimension`),r)),isNaN(i)&&(i=e.valueStart);var a=e.baseDataOffset,o=[];return o[a]=n.get(e.baseDim,r),o[1-a]=i,t.dataToPoint(o)}function qD(e,t){return!isFinite(e)||!isFinite(t)}var JD=typeof Float32Array<`u`?Float32Array:void 0;function YD(e){return XD({ctor:JD},e).arr}function XD(e,t){var n=e.arr,r=e.ctor;if(t>xo&&(t=xo),!n||e.typed&&n.length=i||h<0)break;if(qD(_,v)){if(c){h+=a;continue}break}if(h===n)e[a>0?`moveTo`:`lineTo`](_,v),d=_,f=v;else{var y=_-l,b=v-u;if(y*y+b*b<.5){h+=a;continue}if(o>0){for(var x=h+a,S=t[x*2],C=t[x*2+1];S===_&&C===v&&g=r||qD(S,C))p=_,m=v;else{E=S-l,D=C-u;var A=_-l,j=S-_,M=v-u,ee=C-v,N=void 0,P=void 0;if(s===`x`){N=Math.abs(A),P=Math.abs(j);var te=E>0?1:-1;p=_-te*N*o,m=v,O=_+te*P*o,k=v}else if(s===`y`){N=Math.abs(M),P=Math.abs(ee);var ne=D>0?1:-1;p=_,m=v-ne*N*o,O=_,k=v+ne*P*o}else N=Math.sqrt(A*A+M*M),P=Math.sqrt(j*j+ee*ee),T=P/(P+N),p=_-E*o*(1-T),m=v-D*o*(1-T),O=_+E*o*T,k=v+D*o*T,O=$D(O,eO(S,_)),k=$D(k,eO(C,v)),O=eO(O,$D(S,_)),k=eO(k,$D(C,v)),E=O-_,D=k-v,p=_-E*N/P,m=v-D*N/P,p=$D(p,eO(l,_)),m=$D(m,eO(u,v)),p=eO(p,$D(l,_)),m=eO(m,$D(u,v)),E=_-p,D=v-m,O=_+E*P/N,k=v+D*P/N}e.bezierCurveTo(d,f,p,m,_,v),d=O,f=k}else e.lineTo(_,v)}l=_,u=v,h+=a}return g}var nO=function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e}(),rO=function(e){w(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-polyline`,n}return t.prototype.getDefaultStyle=function(){return{stroke:Z.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new nO},t.prototype.buildPath=function(e,t){var n=t.points,r=0,i=n.length/2;if(t.connectNulls){for(;i>0&&qD(n[i*2-2],n[i*2-1]);i--);for(;r=0){var _=o?(d-a)*g+a:(u-i)*g+i;return o?[e,_]:[_,e]}i=u,a=d;break;case r.C:u=n[c++],d=n[c++],f=n[c++],p=n[c++],m=n[c++],h=n[c++];var v=o?dr(i,u,f,m,e,s):dr(a,d,p,h,e,s);if(v>0)for(var y=0;y=0){var _=o?lr(a,d,p,h,b):lr(i,u,f,m,b);return o?[e,_]:[_,e]}}i=m,a=h}}},t}(Wl),iO=function(e){w(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(nO),aO=function(e){w(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-polygon`,n}return t.prototype.getDefaultShape=function(){return new iO},t.prototype.buildPath=function(e,t){var n=t.points,r=t.stackedOnPoints,i=0,a=n.length/2,o=t.smoothMonotone;if(t.connectNulls){for(;a>0&&qD(n[a*2-2],n[a*2-1]);a--);for(;it){a?n.push(o(a,c,t)):i&&n.push(o(i,c,0),o(i,c,t));break}else i&&=(n.push(o(i,c,0)),null),n.push(c),a=c}return n}function vO(e,t,n){var r=e.getVisual(`visualMeta`);if(r&&r.length&&e.count()&&t.type===`cartesian2d`){for(var i,a,o=r.length-1;o>=0;o--){var s=e.getDimensionInfo(r[o].dimension);if(i=s&&s.coordDim,i===`x`||i===`y`){a=r[o];break}}if(a){var c=t.getAxis(i),l=B(a.stops,function(e){return{coord:c.toGlobalCoord(c.dataToCoord(e.value)),color:e.color}}),u=l.length,d=a.outerColors.slice();u&&l[0].coord>l[u-1].coord&&(l.reverse(),d.reverse());var f=_O(l,i===`x`?n.getWidth():n.getHeight()),p=f.length;if(!p&&u)return l[0].coord<0?d[1]?d[1]:l[u-1].color:d[0]?d[0]:l[0].color;var m=10,h=f[0].coord-m,g=f[p-1].coord+m,_=g-h;if(_<.001)return`transparent`;z(f,function(e){e.offset=(e.coord-h)/_}),f.push({offset:p?f[p-1].offset:.5,color:d[1]||`transparent`}),f.unshift({offset:p?f[0].offset:.5,color:d[0]||`transparent`});var v=new Zf(0,0,0,0,f,!0);return v[i]=h,v[i+`2`]=g,v}}}function yO(e,t,n){var r=e.get(`showAllSymbol`),i=r===`auto`;if(!r||i){var a=n.getAxesByScale(`ordinal`)[0];if(a&&!(i&&bO(a,t))){var o=t.mapDimension(a.dim),s={};return z(a.getViewLabels(),function(e){e.tick.offInterval||(s[BT(a.scale,e.tick)]=1)}),function(e){return!s.hasOwnProperty(t.get(o,e))}}}}function bO(e,t){var n=e.getExtent(),r=Math.abs(n[1]-n[0])/e.scale.count();isNaN(r)&&(r=0);for(var i=t.count(),a=Math.max(1,Math.round(i/5)),o=0;or)return!1;return!0}function xO(e){for(var t=e.length/2;t>0&&qD(e[t*2-2],e[t*2-1]);t--);return t-1}function SO(e,t){return[e[t*2],e[t*2+1]]}function CO(e,t,n){for(var r=e.length/2,i=n===`x`?0:1,a,o,s=0,c=-1,l=0;l=t||a>=t&&o<=t){c=l;break}s=l,a=o}}return{range:[s,c],t:(t-a)/(o-a)}}function wO(e){if(e.get([`endLabel`,`show`]))return!0;for(var t=0;t0&&e.get([`emphasis`,`lineStyle`,`width`])===`bolder`){var M=f.getState(`emphasis`).style;M.lineWidth=+f.style.lineWidth+1}Cu(f).seriesIndex=e.seriesIndex,Md(f,k,A,j);var ee=mO(e.get(`smooth`)),N=e.get(`smoothMonotone`);if(f.setShape({smooth:ee,smoothMonotone:N,connectNulls:x}),p){var P=a.getCalculationInfo(`stackedOnSeries`),te=0;p.useStyle(he(s.getAreaStyle(),{fill:E,opacity:.7,lineJoin:`bevel`,decal:a.getVisual(`style`).decal})),P&&(te=mO(P.get(`smooth`))),p.setShape({smooth:ee,stackedOnSmooth:te,smoothMonotone:N,connectNulls:x}),Id(p,e,`areaStyle`),Cu(p).seriesIndex=e.seriesIndex,Md(p,k,A,j)}var ne=this._changePolyState;a.eachItemGraphicEl(function(e){e&&(e.onHoverStateChange=ne)}),this._polyline.onHoverStateChange=ne,this._data=a,this._coordSys=r,this._stackedOnPoints=y,this._points=c,this._step=w,this._valueOrigin=_;var re=e.get(`triggerEvent`),ie=e.get(`triggerLineEvent`),ae=ie===!0||re===!0||re===`line`,oe=ie===!0||re===!0||re===`area`;this.packEventData(e,f,ae),p&&this.packEventData(e,p,oe)},t.prototype.packEventData=function(e,t,n){Cu(t).eventData=n?{componentType:`series`,componentSubType:`line`,componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:`line`,selfType:t===this._polygon?`area`:`line`}:null},t.prototype.highlight=function(e,t,n,r){var i=e.getData(),a=ds(i,r);if(this._changePolyState(`emphasis`),!(a instanceof Array)&&a!=null&&a>=0){var o=i.getLayout(`points`),s=i.getItemGraphicEl(a);if(!s){var c=o[a*2],l=o[a*2+1];if(qD(c,l)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,l))return;var u=e.get(`zlevel`)||0,d=e.get(`z`)||0;s=new LD(i,a),s.x=c,s.y=l,s.setZ(u,d);var f=s.getSymbolPath().getTextContent();f&&(f.zlevel=u,f.z=d,f.z2=this._polyline.z2+1),s.__temp=!0,i.setItemGraphicEl(a,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else zy.prototype.highlight.call(this,e,t,n,r)},t.prototype.downplay=function(e,t,n,r){var i=e.getData(),a=ds(i,r);if(this._changePolyState(`normal`),a!=null&&a>=0){var o=i.getItemGraphicEl(a);o&&(o.__temp?(i.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay())}else zy.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;id(this._polyline,e),t&&id(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new rO({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t},t.prototype._newPolygon=function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new aO({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,t,n){var r,i,a=t.getBaseAxis(),o=a.inverse;t.type===`cartesian2d`?(r=a.isHorizontal(),i=!1):t.type===`polar`&&(r=a.dim===`angle`,i=!0);var s=e.hostModel,c=s.get(`animationDuration`);U(c)&&(c=c(null));var l=s.get(`animationDelay`)||0,u=U(l)?l(null):l;e.eachItemGraphicEl(function(e,a){var s=e;if(s){var d=[e.x,e.y],f=void 0,p=void 0,m=void 0;if(n){if(i){var h=n,g=t.pointToCoord(d);r?(f=h.startAngle,p=h.endAngle,m=-g[1]/180*Math.PI):(f=h.r0,p=h.r,m=g[0])}else{var _=n;r?(f=_.x,p=_.x+_.width,m=e.x):(f=_.y+_.height,p=_.y,m=e.y)}}var v=p===f?0:(m-f)/(p-f);o&&(v=1-v);var y=U(l)?l(a):c*v+u,b=s.getSymbolPath(),x=b.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:y}),x&&x.animateFrom({style:{opacity:0}},{duration:300,delay:y}),b.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,t,n){var r=e.getModel(`endLabel`);if(wO(e)){var i=e.getData(),a=this._polyline,o=i.getLayout(`points`);if(!o){a.removeTextContent(),this._endLabel=null;return}var s=this._endLabel;s||(s=this._endLabel=new lu({z2:200}),s.ignoreClip=!0,a.setTextContent(this._endLabel),a.disableLabelAnimation=!0);var c=xO(o);c>=0&&(_m(a,vm(e,`endLabel`),{inheritColor:n,labelFetcher:e,labelDataIndex:c,defaultText:function(e,t,n){return n==null?FD(i,e):ID(i,n)},enableTextSetter:!0},EO(r,t)),a.textConfig.position=null)}else this._endLabel&&=(this._polyline.removeTextContent(),null)},t.prototype._endLabelOnDuring=function(e,t,n,r,i,a,o){var s=this._endLabel,c=this._polyline;if(s){e<1&&r.originalX==null&&(r.originalX=s.x,r.originalY=s.y);var l=n.getLayout(`points`),u=n.hostModel,d=u.get(`connectNulls`),f=a.get(`precision`),p=a.get(`distance`)||0,m=o.getBaseAxis(),h=m.isHorizontal(),g=m.inverse,_=t.shape,v=g?h?_.x:_.y+_.height:h?_.x+_.width:_.y,y=(h?p:0)*(g?-1:1),b=(h?0:-p)*(g?-1:1),x=h?`x`:`y`,S=CO(l,v,x),C=S.range,w=C[1]-C[0],T=void 0;if(w>=1){if(w>1&&!d){var E=SO(l,C[0]);s.attr({x:E[0]+y,y:E[1]+b}),i&&(T=u.getRawValue(C[0]))}else{var E=c.getPointOn(v,x);E&&s.attr({x:E[0]+y,y:E[1]+b});var D=u.getRawValue(C[0]),O=u.getRawValue(C[1]);i&&(T=Cs(n,f,D,O,S.t))}r.lastFrameIndex=C[0]}else{var k=e===1||r.lastFrameIndex>0?C[0]:0,E=SO(l,k);i&&(T=u.getRawValue(k)),s.attr({x:E[0]+y,y:E[1]+b})}if(i){var A=Om(s);typeof A.setLabelText==`function`&&A.setLabelText(T)}}},t.prototype._doUpdateAnimation=function(e,t,n,r,i,a,o){var s=this._polyline,c=this._polygon,l=e.hostModel,u=QD(this._data,e,this._stackedOnPoints,t,this._coordSys,n,this._valueOrigin,a),d=u.current,f=u.stackedOnCurrent,p=u.next,m=u.stackedOnNext;if(i&&(f=gO(u.stackedOnCurrent,u.current,n,i,o),d=gO(u.current,null,n,i,o),m=gO(u.stackedOnNext,u.next,n,i,o),p=gO(u.next,null,n,i,o)),pO(d,p)>3e3||c&&pO(f,m)>3e3)s.stopAnimation(),s.setShape({points:p}),c&&(c.stopAnimation(),c.setShape({points:p,stackedOnPoints:m}));else{s.shape.__points=u.current,s.shape.points=d;var h={shape:{points:p}};u.current!==d&&(h.shape.__points=u.next),s.stopAnimation(),pp(s,h,l),c&&(c.setShape({points:d,stackedOnPoints:f}),c.stopAnimation(),pp(c,{shape:{stackedOnPoints:m}},l),s.shape.points!==c.shape.points&&(c.shape.points=s.shape.points));for(var g=[],_=u.status,v=0;v<_.length;v++)if(_[v].cmd===`=`){var y=e.getItemGraphicEl(_[v].idx1);y&&g.push({el:y,ptIdx:v})}s.animators&&s.animators.length&&s.animators[0].during(function(){c&&c.dirtyShape();for(var e=s.shape.__points,t=0;tt&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n10&&a.type===`cartesian2d`&&i){var s=a.getBaseAxis(),c=a.getOtherAxis(s),l=s.getExtent(),u=n.getDevicePixelRatio(),d=Math.abs(l[1]-l[0])*(u||1),f=Math.round(o/d);if(isFinite(f)&&f>1){i===`lttb`?e.setData(r.lttbDownSample(r.mapDimension(c.dim),1/f)):i===`minmax`&&e.setData(r.minmaxDownSample(r.mapDimension(c.dim),1/f));var p=void 0;W(i)?p=kO[i]:U(i)&&(p=i),p&&e.setData(r.downSample(r.mapDimension(c.dim),1/f,p,AO))}}}}}function MO(e){e.registerChartView(DO),e.registerSeriesModel(PD),e.registerLayout(OO(`line`,!0)),e.registerVisual({seriesType:`line`,reset:function(e){var t=e.getData(),n=e.getModel(`lineStyle`).getLineStyle();n&&!n.stroke&&(n.stroke=t.getVisual(`style`).fill),t.setVisual(`legendLineStyle`,n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,jO(`line`))}var NO=function(e){w(t,e);function t(t,n,r,i,a){var o=e.call(this,t,n,r)||this;return o.index=0,o.type=i||`value`,o.position=a||`bottom`,o}return t.prototype.isHorizontal=function(){var e=this.position;return e===`top`||e===`bottom`},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e[this.dim===`x`?0:1]),t)},t.prototype.setCategorySortInfo=function(e){if(this.type!==`category`)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(tD),PO=null;function FO(){return PO}var IO=`expandAxisBreak`,LO=Math.PI,RO=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],zO=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],BO=fs(),VO=fs(),HO=function(){function e(e){this.recordMap={},this.resolveAxisNameOverlap=e}return e.prototype.ensureRecord=function(e){var t=e.axis.dim,n=e.componentIndex,r=this.recordMap,i=r[t]||(r[t]=[]);return i[n]||(i[n]={ready:{}})},e}();function UO(e,t,n,r){var i=n.axis,a=t.ensureRecord(n),o=[],s,c=pk(e.axisName)&&FT(e.nameLocation);z(r,function(e){var t=wD(e);if(t&&!t.label.ignore){o.push(t);var n=a.transGroup;c&&(n.transform?nn(WO,n.transform):Xt(WO),t.transform&&Qt(WO,WO,t.transform),Y.copy(GO,t.localRect),GO.applyTransform(WO),s?s.union(GO):Y.copy(s=new Y(0,0,0,0),GO))}});var l=Math.abs(a.dirVec.x)>.1?`x`:`y`,u=a.transGroup[l];if(o.sort(function(e,t){return Math.abs(e.label[l]-u)-Math.abs(t.label[l]-u)}),c&&s){var d=i.getExtent(),f=Math.min(d[0],d[1]),p=Math.max(d[0],d[1])-f;s.union(new Y(f,0,p,1))}a.stOccupiedRect=s,a.labelInfoList=o}var WO=Yt(),GO=new Y(0,0,0,0),KO=function(e,t,n,r,i,a){if(FT(e.nameLocation)){var o=a.stOccupiedRect;o&&qO(DD({},o,a.transGroup.transform),r,i)}else JO(a.labelInfoList,a.dirVec,r,i)};function qO(e,t,n){var r=new J;ND(e,t,r,{direction:Math.atan2(n.y,n.x),bidirectional:!1,touchThreshold:.05})&&OD(t,r)}function JO(e,t,n,r){for(var i=J.dot(r,t)>=0,a=0,o=e.length;a0?`top`:`bottom`,i=`center`):Co(r-LO)?(a=n>0?`bottom`:`top`,i=`center`):(a=`middle`,i=r>0&&r0?`right`:`left`:n>0?`left`:`right`),{rotation:r,textAlign:i,textVerticalAlign:a}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+`Index`]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get(`tooltip`);return e.get(`silent`)||!(e.get(`triggerEvent`)||t&&t.show)},e}(),XO=[`axisLine`,`axisTickLabelEstimate`,`axisTickLabelDetermine`,`axisName`],ZO={axisLine:function(e,t,n,r,i,a,o){var s=r.get([`axisLine`,`show`]);if(s===`auto`&&(s=!0,e.raw.axisLineAutoShow!=null&&(s=!!e.raw.axisLineAutoShow)),s){var c=r.axis.getExtent(),l=a.transform,u=[c[0],0],d=[c[1],0],f=u[0]>d[0];l&&(pt(u,u,l),pt(d,d,l));var p=R({lineCap:`round`},r.getModel([`axisLine`,`lineStyle`]).getLineStyle()),m={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:p};if(r.get([`axisLine`,`breakLine`])&&ch(r.axis.scale))FO().buildAxisBreakLine(r,i,a,m);else{var h=new Uf(R({shape:{x1:u[0],y1:u[1],x2:d[0],y2:d[1]}},m));Pp(h.shape,h.style.lineWidth),h.anid=`line`,i.add(h)}var g=r.get([`axisLine`,`symbol`]);if(g!=null){var _=r.get([`axisLine`,`symbolSize`]);W(g)&&(g=[g,g]),(W(_)||De(_))&&(_=[_,_]);var v=sx(r.get([`axisLine`,`symbolOffset`])||0,_),y=_[0],b=_[1];z([{rotate:e.rotation+Math.PI/2,offset:v[0],r:0},{rotate:e.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((u[0]-d[0])*(u[0]-d[0])+(u[1]-d[1])*(u[1]-d[1]))}],function(t,n){if(g[n]!==`none`&&g[n]!=null){var r=ax(g[n],-y/2,-b/2,y,b,p.stroke,!0),a=t.r+t.offset,o=f?d:u;r.attr({rotation:t.rotate,x:o[0]+a*Math.cos(e.rotation),y:o[1]-a*Math.sin(e.rotation),silent:!0,z2:11}),i.add(r)}})}}},axisTickLabelEstimate:function(e,t,n,r,i,a,o,s){ok(t,i,s)&&QO(e,t,n,r,i,a,o,AE.estimate)},axisTickLabelDetermine:function(e,t,n,r,i,a,o,s){ok(t,i,s)&&QO(e,t,n,r,i,a,o,AE.determine);var c=ik(e,i,a,r);tk(e,t.labelLayoutList,c),ak(e,i,a,r,e.tickDirection)},axisName:function(e,t,n,r,i,a,o,s){var c=n.ensureRecord(r);t.nameEl&&=(i.remove(t.nameEl),c.nameLayout=c.nameLocation=null);var l=e.axisName;if(pk(l)){var u=e.nameLocation,d=e.nameDirection,f=r.getModel(`nameTextStyle`),p=r.get(`nameGap`)||0,m=r.axis.getExtent(),h=r.axis.inverse?-1:1,g=new J(0,0),_=new J(0,0);u===`start`?(g.x=m[0]-h*p,_.x=-h):u===`end`?(g.x=m[1]+h*p,_.x=h):(g.x=(m[0]+m[1])/2,g.y=e.labelOffset+d*p,_.y=d);var v=Yt();_.transform(en(v,v,e.rotation));var y=r.get(`nameRotate`);y!=null&&(y=y*LO/180);var b,x;FT(u)?b=YO.innerTextLayout(e.rotation,y??e.rotation,d):(b=$O(e.rotation,u,y||0,m),x=e.raw.axisNameAvailableWidth,x!=null&&(x=Math.abs(x/Math.sin(b.rotation)),!isFinite(x)&&(x=null)));var S=f.getFont(),C=r.get(`nameTruncate`,!0)||{},w=C.ellipsis,T=Pe(e.raw.nameTruncateMaxWidth,C.maxWidth,x),E=s.nameMarginLevel||0,D=new lu({x:g.x,y:g.y,rotation:b.rotation,silent:YO.isLabelSilent(r),style:ym(f,{text:l,font:S,overflow:`truncate`,width:T,ellipsis:w,fill:f.getTextColor()||r.get([`axisLine`,`lineStyle`,`color`]),align:f.get(`align`)||b.textAlign,verticalAlign:f.get(`verticalAlign`)||b.textVerticalAlign}),z2:1});if($p({el:D,componentModel:r,itemName:l}),D.__fullText=l,D.anid=`name`,r.get(`triggerEvent`)){var O=YO.makeAxisEventDataBase(r);O.targetType=`axisName`,O.name=l,Cu(D).eventData=O}a.add(D),D.updateTransform(),t.nameEl=D;var k=c.nameLayout=wD({label:D,priority:D.z2,defaultAttr:{ignore:D.ignore},marginDefault:FT(u)?RO[E]:zO[E]});if(c.nameLocation=u,i.add(D),D.decomposeTransform(),e.shouldNameMoveOverlap&&k){var A=n.ensureRecord(r);n.resolveAxisNameOverlap(e,n,r,k,_,A)}}}};function QO(e,t,n,r,i,a,o,s){ck(t)||sk(e,t,i,s,r,o);var c=t.labelLayoutList;uk(e,r,c,a),hk(r,e.rotation,c);var l=e.optionHideOverlap;ek(r,c,l),l&&MD(xe(c,function(e){return e&&!e.label.ignore})),UO(e,n,r,c)}function $O(e,t,n,r){var i=So(n-e),a,o,s=r[0]>r[1],c=t===`start`&&!s||t!==`start`&&s;return Co(i-LO/2)?(o=c?`bottom`:`top`,a=`center`):Co(i-LO*1.5)?(o=c?`top`:`bottom`,a=`center`):(o=`middle`,a=iLO/2?c?`left`:`right`:c?`right`:`left`),{rotation:i,textAlign:a,textVerticalAlign:o}}function ek(e,t,n){var r=e.axis,i=e.get([`axisLabel`,`customValues`]);if(NT(r))return;function a(e,a,o){var s=wD(t[a]),c=wD(t[o]),l=r.scale;if(s&&c){if(e==null){if(!n&&i)return;var u=BO(s.label).labelInfo.tick;if(Uw(l)&&u.notNice||Gw(l)&&u.offInterval){nk(s.label);return}}if(e===!1||s.suggestIgnore)nk(s.label);else if(c.suggestIgnore)nk(c.label);else{var d=.1;if(!n){var f=[0,0,0,0];s=kD({marginForce:f},s),c=kD({marginForce:f},c)}ND(s,c,null,{touchThreshold:d})&&nk(e?c.label:s.label)}}}var o=e.get([`axisLabel`,`showMinLabel`]),s=e.get([`axisLabel`,`showMaxLabel`]),c=t.length;a(o,0,1),a(s,c-1,c-2)}function tk(e,t,n){e.showMinorTicks||z(t,function(e){if(e&&e.label.ignore)for(var t=0;t=0},e.prototype.indexOfName=function(e){return this._getDataWithEncodedVisual().indexOfName(e)},e.prototype.getItemVisual=function(e,t){return this._getDataWithEncodedVisual().getItemVisual(e,t)},e}(),Ok=fs(),kk=function(e){w(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new Dk(V(this.getData,this),V(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return Ek(this,{coordDimensions:[`value`],encodeDefaulter:Te(Bg,this)})},t.prototype.getDataParams=function(t){var n=this.getData(),r=Ok(n),i=r.seats;if(!i){var a=[];n.each(n.mapDimension(`value`),function(e){a.push(e)}),i=r.seats=yo(a,n.hostModel.get(`percentPrecision`))}var o=e.prototype.getDataParams.call(this,t);return o.percent=i[t]||0,o.$vars.push(`percent`),o},t.prototype._defaultLabelLine=function(e){Ko(e,`labelLine`,[`show`]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.type=`series.pie`,t.defaultOption={z:2,legendHoverLink:!0,colorBy:`data`,center:[`50%`,`50%`],radius:[0,`50%`],clockwise:!0,startAngle:90,endAngle:`auto`,padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:`box`,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:`truncate`,position:`outer`,alignTo:`none`,edgeDistance:`25%`,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:`solid`}},itemStyle:{borderWidth:1,borderJoin:`round`},showEmptyCircle:!0,emptyCircleStyle:{color:`lightgray`,opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:`expansion`,animationDuration:1e3,animationTypeUpdate:`transition`,animationEasingUpdate:`cubicInOut`,animationDurationUpdate:500,animationEasing:`cubicInOut`},t}(Ey);ig({fullType:kk.type,getCoord2:function(e){return e.getShallow(`center`)}});var Ak=Math.PI/180;function jk(e,t,n,r,i,a,o,s,c,l){if(e.length<2)return;function u(e){for(var a=e.rB,o=a*a,s=0;sn?o:a,d=Math.abs(c.label.y-n);if(d>=l.maxY){var f=c.label.x-t-c.len2*i,p=r+c.len;l.rB=Math.abs(f)e.unconstrainedWidth?null:f:null;r.setStyle(`width`,p)}Pk(a,r)}}}function Pk(e,t){Ik.rect=e,TD(Ik,t,Fk)}var Fk={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},Ik={};function Lk(e){return e.position===`center`}function Rk(e){var t=e.getData(),n=[],r,i,a=!1,o=(e.get(`minShowLabelAngle`)||0)*Ak,s=t.getLayout(`viewRect`),c=t.getLayout(`r`),l=s.width,u=s.x,d=s.y,f=s.height;function p(e){e.ignore=!0}function m(e){if(!e.ignore)return!0;for(var t in e.states)if(e.states[t].ignore===!1)return!0;return!1}t.each(function(e){var s=t.getItemGraphicEl(e),d=s.shape,h=s.getTextContent(),g=s.getTextGuideLine(),_=t.getItemModel(e),v=_.getModel(`label`),y=v.get(`position`)||_.get([`emphasis`,`label`,`position`]),b=v.get(`distanceToLabelLine`),x=v.get(`alignTo`),S=lo(v.get(`edgeDistance`),l),C=v.get(`bleedMargin`);C??=Math.min(l,f)>200?10:2;var w=_.getModel(`labelLine`),T=w.get(`length`);T=lo(T,l);var E=w.get(`length2`);if(E=lo(E,l),Math.abs(d.endAngle-d.startAngle)0?`right`:`left`:O>0?`left`:`right`}var oe=Math.PI,se=0,ce=v.get(`rotate`);if(De(ce))se=oe/180*ce;else if(y===`center`)se=0;else if(ce===`radial`||ce===!0)se=O<0?-D+oe:-D;else if(ce===`tangential`||ce===`tangential-noflip`&&y!==`outside`&&y!==`outer`){var le=Math.atan2(O,k);le<0&&(le=oe*2+le),k>0&&ce!==`tangential-noflip`&&(le=oe+le),se=le-oe}if(a=!!se,h.x=A,h.y=j,h.rotation=se,h.setStyle({verticalAlign:`middle`}),N){h.setStyle({align:ee});var ue=h.states.select;ue&&(ue.x+=h.x,ue.y+=h.y)}else{var F=new Y(0,0,0,0);Pk(F,h),n.push({label:h,labelLine:g,position:y,len:T,len2:E,minTurnAngle:w.get(`minTurnAngle`),maxSurfaceAngle:w.get(`maxSurfaceAngle`),surfaceNormal:new J(O,k),linePoints:M,textAlign:ee,labelDistance:b,labelAlignTo:x,edgeDistance:S,bleedMargin:C,rect:F,unconstrainedWidth:F.width,labelStyleWidth:h.style.width})}s.setTextConfig({inside:N})}}),!a&&e.get(`avoidLabelOverlap`)&&Mk(n,r,i,c,l,f,u,d);for(var h=0;hr?(l=O+x*r/2,u=l):(l=O+C,u=i-C),n.setItemLayout(t,{angle:r,startAngle:l,endAngle:u,clockwise:_,cx:a,cy:o,r0:c,r:v?co(e,b,[c,s]):s}),O=i}}),E0){for(var c=i.getItemLayout(0),l=1;isNaN(c&&c.startAngle)&&l=n.r0}},t.type=`pie`,t}(zy);function Kk(e){return{seriesType:e,reset:function(e,t){var n=e.getData();n.filterSelf(function(e){var t=n.mapDimension(`value`),r=n.get(t,e);return!(De(r)&&!isNaN(r)&&r<0)})}}}function qk(e){e.registerChartView(Gk),e.registerSeriesModel(kk),Fb(`pie`,e.registerAction),e.registerLayout(Vk),e.registerProcessor(Tk(`pie`)),e.registerProcessor(Kk(`pie`))}var Jk=function(e){w(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return t.prototype.getInitialData=function(e,t){return Cw(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){return this.option.progressive??(this.option.large?5e3:this.get(`progressive`))},t.prototype.getProgressiveThreshold=function(){return this.option.progressiveThreshold??(this.option.large?1e4:this.get(`progressiveThreshold`))},t.prototype.brushSelector=function(e,t,n){return n.point(t.getItemLayout(e))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:``},t.type=`series.scatter`,t.dependencies=[`grid`,`polar`,`geo`,`singleAxis`,`calendar`,`matrix`],t.defaultOption={coordinateSystem:`cartesian2d`,z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:Z.color.primary}},universalTransition:{divideShape:`clone`}},t}(Ey),Yk=4,Xk=function(){function e(){}return e}(),Zk=function(e){w(t,e);function t(t){var n=e.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return t.prototype.getDefaultShape=function(){return new Xk},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.beforeBrush=function(e){e&&!e.contentRetained&&this.reset()},t.prototype.buildPath=function(e,t){var n=t.points,r=t.size,i=this.symbolProxy,a=i.shape,o=e.getContext?e.getContext():e,s=o&&r[0]=0;s--){var c=s*2,l=r[c]-a/2,u=r[c+1]-o/2;if(e>=l&&t>=u&&e<=l+a&&t<=u+o)return s}return-1},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect();return e=n[0],t=n[1],r.contain(e,t)?(this.hoverDataIdx=this.findDataIndex(e,t))>=0:(this.hoverDataIdx=-1,!1)},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var t=this.shape,n=t.points,r=t.size,i=r[0],a=r[1],o=1/0,s=1/0,c=-1/0,l=-1/0,u=0;u=0&&(c.dataIndex=n+(e.startIndex||0))})},e.prototype.remove=function(){this._clear()},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),$k=function(e){w(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=e.getData();this._updateSymbolDraw(r,e).updateData(r,eA(e)),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,t,n){var r=e.getData();this._updateSymbolDraw(r,e).incrementalPrepareUpdate(r),this._finished=!1},t.prototype.incrementalRender=function(e,t,n){this._symbolDraw.incrementalUpdate(e,t.getData(),Rs(t),eA(t)),this._finished=e.end===t.getData().count()},t.prototype.updateTransform=function(e,t,n){var r=e.getData();if(this.group.dirty(),this._finished){var i=OO(``).reset(e,t,n);i.progress&&i.progress({start:0,end:r.count(),count:r.count()},r),this._symbolDraw.updateLayout(eA(e))}else return{update:!0}},t.prototype.eachRendered=function(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)},t.prototype._updateSymbolDraw=function(e,t){var n=this._symbolDraw,r=t.pipelineContext.large;return(!n||r!==this._isLargeDraw)&&(n&&n.remove(),n=this._symbolDraw=r?new Qk:new UD,this._isLargeDraw=r,this.group.removeAll()),this.group.add(n.group),n},t.prototype.remove=function(e,t){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type=`scatter`,t}(zy);function eA(e){return{clipShape:cO(e)}}var tA=function(e){w(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents(`grid`,gs).models[0]},t.type=`cartesian2dAxis`,t}(Eg);ve(tA,HT);var nA={show:!0,z:0,inverse:!1,name:``,nameLocation:`end`,nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:`...`,placeholder:`.`},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:`auto`,onZeroAxisIndex:null,lineStyle:{color:Z.color.axisLine,width:1,type:`solid`},symbol:[`none`,`none`],symbolSize:[10,15],breakLine:!0},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12,color:Z.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:Z.color.axisSplitLine,width:1,type:`solid`}},splitArea:{show:!1,areaStyle:{color:[Z.color.backgroundTint,Z.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:Z.color.neutral00,borderColor:Z.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:`auto`}},rA=L({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:`auto`,show:`auto`},axisLabel:{interval:`auto`}},nA),iA=L({boundaryGap:[0,0],axisLine:{show:`auto`},axisTick:{show:`auto`},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:Z.color.axisMinorSplitLine,width:1}}},nA),aA={category:rA,value:iA,time:L({splitNumber:6,axisLabel:{rich:{primary:{fontWeight:`bold`}}},splitLine:{show:!1}},iA),log:he({logBase:10},iA)};function oA(e,t,n,r){z(CT,function(i,a){var o=L(L({},aA[a],!0),r,!0),s=function(e){w(n,e);function n(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t+`Axis.`+a,n}return n.prototype.mergeDefaultAndTheme=function(e,t){var n=xg(this),r=n?Cg(e):{};L(e,t.getTheme().get(a+`Axis`)),L(e,this.getDefaultOption()),e.type=sA(e),n&&Sg(e,r,n)},n.prototype.optionUpdated=function(){this.option.type===`category`&&(this.__ordinalMeta=Ow.createByAxisModel(this))},n.prototype.getCategories=function(e){var t=this.option;if(t.type===`category`)return e?t.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.prototype.updateAxisBreaks=function(e){var t=FO();return t?t.updateModelAxisBreak(this,e):{breaks:[]}},n.type=t+`Axis.`+a,n.defaultOption=o,n}(n);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+`Axis`,sA)}function sA(e){return e.type||(e.data?`category`:`value`)}var cA=function(){function e(e){this.type=`cartesian`,this._dimList=[],this._axes={},this.name=e||``}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return B(this._dimList,function(e){return this._axes[e]},this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),xe(this.getAxes(),function(t){return t.scale.type===e})},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}(),lA=[`x`,`y`];function uA(e){return(e.type===`interval`||e.type===`time`)&&!ch(e)}var dA=function(e){w(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=Sk,t.dimensions=lA,t}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis(`x`).scale,t=this.getAxis(`y`).scale;if(uA(e)&&uA(t)){var n=Fw(e,null),r=Fw(t,null),i=this.dataToPoint([n[0],r[0]]),a=this.dataToPoint([n[1],r[1]]),o=n[1]-n[0],s=r[1]-r[0];if(o&&s){var c=(a[0]-i[0])/o,l=(a[1]-i[1])/s,u=i[0]-n[0]*c,d=i[1]-r[0]*l,f=this._transform=[c,0,0,l,u,d];this._invTransform=nn([],f)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale(`ordinal`)[0]||this.getAxesByScale(`time`)[0]||this.getAxis(`x`)},t.prototype.containPoint=function(e){var t=this.getAxis(`x`),n=this.getAxis(`y`);return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis(`x`).containData(e[0])&&this.getAxis(`y`).containData(e[1])},t.prototype.containZone=function(e,t){var n=this.dataToPoint(e),r=this.dataToPoint(t),i=this.getArea(),a=new Y(n[0],n[1],r[0]-n[0],r[1]-n[1]);return i.intersect(a)},t.prototype.dataToPoint=function(e,t,n){n||=[];var r=e[0],i=e[1];if(this._transform&&r!=null&&isFinite(r)&&i!=null&&isFinite(i))return pt(n,e,this._transform);var a=this.getAxis(`x`),o=this.getAxis(`y`);return n[0]=a.toGlobalCoord(a.dataToCoord(r,t)),n[1]=o.toGlobalCoord(o.dataToCoord(i,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis(`x`).scale,r=this.getAxis(`y`).scale,i=n.getExtent(),a=r.getExtent(),o=n.parse(e[0]),s=r.parse(e[1]);return t||=[],t[0]=Math.min(Math.max(Math.min(i[0],i[1]),o),Math.max(i[0],i[1])),t[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),t},t.prototype.pointToData=function(e,t,n){if(n||=[],this._invTransform)return pt(n,e,this._invTransform);var r=this.getAxis(`x`),i=this.getAxis(`y`);return n[0]=r.coordToData(r.toLocalCoord(e[0]),t),n[1]=i.coordToData(i.toLocalCoord(e[1]),t),n},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim===`x`?`y`:`x`)},t.prototype.getArea=function(e){e||=0;var t=this.getAxis(`x`).getGlobalExtent(),n=this.getAxis(`y`).getGlobalExtent(),r=Math.min(t[0],t[1])-e,i=Math.min(n[0],n[1])-e;return new Y(r,i,Math.max(t[0],t[1])-r+e,Math.max(n[0],n[1])-i+e)},t}(cA);function fA(e,t){var n=e.scale,r=e.model,i=hE(n,r,r.ecModel,e,null),a=Ww(n),o=Ww(t)?t.intervalStub:t,s=a?n.intervalStub:n,c=n.base,l=o.getTicks(),u=o.getTicks({expandToNicedExtent:!0}),d=l.length-1,f,p,m;if(d===1)f=p=0,m=1;else if(d===2){var h=$a(l[0].value-l[1].value),g=$a(l[1].value-l[2].value);f=p=0,h===g?m=2:(m=1,h=C[1])return!0})):b[1]?(T=C[1],A(function(){if(N(),k=mo(O-E*m,D),j(),w<=C[0])return!0})):A(function(){k=mo(no(C[0]/E)*E,D),O=mo(to(C[1]/E)*E,D);var e=eo((O-k)/E);if(e<=m){var t=m-e,n=void 0,r=i.incl0||a;if(r&&C[0]===0)n=[0,t];else if(r&&C[1]===0)n=[t,0];else{var o=to(t/2);n=t%2==0?[o,o]:w+T=C[1])return!0}})}zT(n,b,S,[w,T],x,{interval:E,intervalCount:m,intervalPrecision:D,niceExtent:[k,O]})}var pA=[[3,1],[0,2]],mA=function(){function e(e,t,n){this.type=`grid`,this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=lA,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;z(this._axesList,function(e){uE(e,1);var t=e.scale;Gw(t)&&t.setSortInfo(e.model.get(`categorySortInfo`))});function r(e){for(var t=Ce(e),n=[],r=t.length-1;r>=0;r--){var i=e[+t[r]];i.__alignTo?n.push(i):xE(i)}z(n,function(e){yA(e,e.__alignTo)?xE(e):fA(e,e.__alignTo.scale)})}r(n.x),r(n.y);var i={};z(n.x,function(e){gA(n,`y`,e,i)}),z(n.y,function(e){gA(n,`x`,e,i)}),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=yg(e,t),i=this._rect=_g(e.getBoxLayoutParams(),r.refContainer),a=this._axesMap,o=this._coordsList,s=e.get(`containLabel`);if(xA(a,i),!n){var c=TA(i,o,a,s,t),l=void 0;if(s)CA?(CA(this._axesList,i),xA(a,i)):l=wA(i.clone(),`axisLabel`,null,i,a,c,r);else{var u=DA(e,i,r),d=u.outerBoundsRect,f=u.parsedOuterBoundsContain,p=u.outerBoundsClamp;d&&(l=wA(d,f,p,i,a,c,r))}EA(i,a,AE.determine,null,l,r),z(this._coordsList,function(e){e.calcAffineTransform()})}},e.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(n!=null)return n[t||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var n=`x`+e+`y`+t;return this._coordsMap[n]}G(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var r=0,i=this._coordsList;r=0;i--){var a=e[+t[i]];Vw(a.scale)&<(a.model,a.type,!0)==null&&(a.model.get(`alignTicks`)&&a.model.get(`interval`)==null?r.push(a):n=a)}n||=r.pop(),n&&z(r,function(e){e.__alignTo=n})}function yA(e,t){return ch(e.scale)||ch(t.scale)||t.scale.getTicks().length<2}function bA(e,t){var n=e.getExtent(),r=n[0]+n[1];e.toGlobalCoord=e.dim===`x`?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord=e.dim===`x`?function(e){return e-t}:function(e){return r-e+t}}function xA(e,t){z(e.x,function(e){return SA(e,t.x,t.width)}),z(e.y,function(e){return SA(e,t.y,t.height)})}function SA(e,t,n){var r=[0,n],i=+!!e.inverse;e.setExtent(r[i],r[1-i]),bA(e,t)}var CA;function wA(e,t,n,r,i,a,o){EA(r,i,AE.estimate,t,!1,o);var s=[0,0,0,0];l(0),l(1),u(r,0,NaN),u(r,1,NaN);var c=Se(s,function(e){return e>0})==null;return Xp(r,s,!0,!0,n),xA(i,r),c;function l(e){z(i[Sp[e]],function(t){if(IT(t.model)){var n=a.ensureRecord(t.model),r=n.labelInfoList;if(r)for(var i=0;i0&&!Ne(t)&&t>1e-4&&(e/=t),e}}function TA(e,t,n,r,i){var a=new HO(OA);return z(n,function(n){return z(n,function(n){if(IT(n.model)){var o=!r;n.axisBuilder=vk(e,t,n.model,i,a,o)}})}),a}function EA(e,t,n,r,i,a){var o=n===AE.determine;z(t,function(t){return z(t,function(t){IT(t.model)&&(yk(t.axisBuilder,e,t.model),t.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};c(0),c(1);function c(t){s[Sp[1-t]]=e[Cp[t]]<=a.refContainer[Cp[t]]*.5?0:1-t==1?2:1}z(t,function(e,t){return z(e,function(e){IT(e.model)&&((r===`all`||o)&&e.axisBuilder.build({axisName:!0},{nameMarginLevel:s[t]}),o&&e.axisBuilder.build({axisLine:!0}))})})}function DA(e,t,n){var r,i=e.get(`outerBoundsMode`,!0);i===`same`?r=t.clone():(i==null||i===`auto`)&&(r=_g(e.get(`outerBounds`,!0)||bk,n.refContainer));var a=e.get(`outerBoundsContain`,!0),o=a==null||a===`auto`||ge([`all`,`axisLabel`],a)<0?`all`:a,s=[fo(K(e.get(`outerBoundsClampWidth`,!0),xk[0]),t.width),fo(K(e.get(`outerBoundsClampHeight`,!0),xk[1]),t.height)];return{outerBoundsRect:r,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var OA=function(e,t,n,r,i,a){var o=n.axis.dim===`x`?`y`:`x`;KO(e,t,n,r,i,a),FT(e.nameLocation)||z(t.recordMap[o],function(e){e&&e.labelInfoList&&e.dirVec&&JO(e.labelInfoList,e.dirVec,r,i)})};function kA(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return AA(n,e,t),n.seriesInvolved&&MA(n,e),n}function AA(e,t,n){var r=t.getComponent(`tooltip`),i=t.getComponent(`axisPointer`),a=i.get(`link`,!0)||[],o=[];z(n.getCoordinateSystems(),function(n){if(!n.axisPointerEnabled)return;var s=zA(n.model),c=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var l=n.model.getModel(`tooltip`,r);if(z(n.getAxes(),Te(p,!1,null)),n.getTooltipAxes&&r&&l.get(`show`)){var u=l.get(`trigger`)===`axis`,d=l.get([`axisPointer`,`type`])===`cross`,f=n.getTooltipAxes(l.get([`axisPointer`,`axis`]));(u||d)&&z(f.baseAxes,Te(p,!d||`cross`,u)),d&&z(f.otherAxes,Te(p,`cross`,!1))}function p(r,s,u){var d=u.model.getModel(`axisPointer`,i),f=d.get(`show`);if(f&&(f!==`auto`||r||RA(d))){s??=d.get(`triggerTooltip`),d=r?jA(u,l,i,t,r,s):d;var p=d.get(`snap`),m=d.get(`triggerEmphasis`),h=zA(u.model),g=s||p||u.type===`category`,_=e.axesInfo[h]={key:h,axis:u,coordSys:n,axisPointerModel:d,triggerTooltip:s,triggerEmphasis:m,involveSeries:g,snap:p,useHandle:RA(d),seriesModels:[],linkGroup:null};c[h]=_,e.seriesInvolved=e.seriesInvolved||g;var v=NA(a,u);if(v!=null){var y=o[v]||(o[v]={axesInfo:{}});y.axesInfo[h]=_,y.mapper=a[v].mapper,_.linkGroup=y}}}})}function jA(e,t,n,r,i,a){var o=t.getModel(`axisPointer`),s=[`type`,`snap`,`lineStyle`,`shadowStyle`,`label`,`animation`,`animationDurationUpdate`,`animationEasingUpdate`,`z`],c={};z(s,function(e){c[e]=I(o.get(e))}),c.snap=e.type!==`category`&&!!a,o.get(`type`)===`cross`&&(c.type=`line`);var l=c.label||={};if(l.show??=!1,i===`cross`&&(l.show=o.get([`label`,`show`])??!0,!a)){var u=c.lineStyle=o.get(`crossStyle`);u&&he(l,u.textStyle)}return e.model.getModel(`axisPointer`,new Bm(c,n,r))}function MA(e,t){t.eachSeries(function(t){var n=t.coordinateSystem,r=t.get([`tooltip`,`trigger`],!0),i=t.get([`tooltip`,`show`],!0);n&&n.model&&r!==`none`&&r!==!1&&r!==`item`&&i!==!1&&t.get([`axisPointer`,`show`],!0)!==!1&&z(e.coordSysAxesInfo[zA(n.model)],function(e){var r=e.axis;n.getAxis(r.dim)===r&&(e.seriesModels.push(t),e.seriesDataCount??=0,e.seriesDataCount+=t.getData().count())})})}function NA(e,t){for(var n=t.model,r=t.dim,i=0;i=0||e===t}function FA(e){var t=IA(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,i=n.option,a=n.get(`status`),o=n.get(`value`);o!=null&&(o=r.parse(o));var s=RA(n);a??(i.status=s?`show`:`hide`);var c=r.getExtent();(o==null||o>c[1])&&(o=c[1]),o3?1.4:i>1?1.2:1.1,c=r>0?s:1/s;this._checkTriggerMoveZoom(this,`zoom`,`zoomOnMouseWheel`,e,{scale:c,originX:a,originY:o,isAvailableBehavior:null})}if(n){var l=Math.abs(r),u=(r>0?1:-1)*(l>3?.4:l>1?.15:.05);this._checkTriggerMoveZoom(this,`scrollMove`,`moveOnMouseWheel`,e,{scrollDelta:u,originX:a,originY:o,isAvailableBehavior:null})}}}},t.prototype._pinchHandler=function(e){if(!(tj(this._zr,`globalPan`)||aj(e))){var t=e.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,`zoom`,null,e,{scale:t,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t.prototype._checkTriggerMoveZoom=function(e,t,n,r,i){e._checkPointer(r,i.originX,i.originY)&&(Ut(r.event),r.__ecRoamConsumed=!0,fj(e,t,n,r,i))},t}(vt);function aj(e){return e.__ecRoamConsumed}var oj=fs();function sj(e){var t=oj(e);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function cj(e,t,n,r){for(var i=sj(e).roam,a=i[t]=i[t]||[],o=0;o=0;a--)r[a]??(delete n[t[a]],t.pop())}function bj(e,t){var n=e.visual,r=[];G(n)?mj(n,function(e){r.push(e)}):n!=null&&r.push(n),!t&&r.length===1&&!{color:1,symbol:1}.hasOwnProperty(e.type)&&(r[1]=r[0]),Oj(e,r)}function xj(e){return{applyVisual:function(t,n,r){var i=this.mapValueToVisual(t);r(`color`,e(n(`color`),i))},_normalizedToVisual:Ej([0,1])}}function Sj(e){var t=this.option.visual;return t[Math.round(co(e,[0,1],[0,t.length-1],!0))]||{}}function Cj(e){return function(t,n,r){r(e,this.mapValueToVisual(t))}}function wj(e){var t=this.option.visual;return t[this.option.loop&&e!==gj?e%t.length:e]}function Tj(){return this.option.visual[0]}function Ej(e){return{linear:function(t){return co(t,e,this.option.visual,!0)},category:wj,piecewise:function(t,n){var r=Dj.call(this,n);return r??=co(t,e,this.option.visual,!0),r},fixed:Tj}}function Dj(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var r=n[_j.findPieceIndex(e,n)];if(r&&r.visual)return r.visual[this.type]}}function Oj(e,t){return e.visual=t,e.type===`color`&&(e.parsedVisual=B(t,function(e){return Hr(e)||[0,0,0,1]})),t}var kj={linear:function(e){return co(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=_j.findPieceIndex(e,t,!0);if(n!=null)return co(n,[0,t.length-1],[0,1],!0)},category:function(e){return(this.option.categories?this.option.categoryMap[e]:e)??gj},fixed:Ze};function Aj(e,t,n){return e?t<=n:ta&&(t[1-r]=bo(t[r],d.sign*a)),t}function Mj(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function Nj(e,t){return Math.min(t[1]==null?1/0:t[1],Math.max(t[0]==null?-1/0:t[0],e))}var Pj=256,Fj=function(){function e(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=N.createCanvas();this.canvas=e}return e.prototype.update=function(e,t,n,r,i,a){var o=this._getBrush(),s=this._getGradient(i,`inRange`),c=this._getGradient(i,`outOfRange`),l=this.pointSize+this.blurSize,u=this.canvas,d=u.getContext(`2d`),f=e.length;u.width=t,u.height=n;for(var p=0;p0){var E=a(v)?s:c;v>0&&(v=v*w+C),b[x++]=E[T],b[x++]=E[T+1],b[x++]=E[T+2],b[x++]=E[T+3]*v*256}else x+=4}return d.putImageData(y,0,0),u},e.prototype._getBrush=function(){var e=this._brushCanvas||=N.createCanvas(),t=this.pointSize+this.blurSize,n=t*2;e.width=n,e.height=n;var r=e.getContext(`2d`);return r.clearRect(0,0,n,n),r.shadowOffsetX=n,r.shadowBlur=this.blurSize,r.shadowColor=Z.color.neutral99,r.beginPath(),r.arc(-t,t,this.pointSize,0,Math.PI*2,!0),r.closePath(),r.fill(),e},e.prototype._getGradient=function(e,t){for(var n=this._gradientPixels,r=n[t]||(n[t]=new Uint8ClampedArray(1024)),i=[0,0,0,0],a=0,o=0;o<256;o++)e[t](o/255,!0,i),r[a++]=i[0],r[a++]=i[1],r[a++]=i[2],r[a++]=i[3];return r},e}();function Ij(e,t,n){var r=e[1]-e[0];t=B(t,function(t){return{interval:[(t.interval[0]-e[0])/r,(t.interval[1]-e[0])/r]}});var i=t.length,a=0;return function(e){for(var r=a;r=0;r--){var o=t[r].interval;if(o[0]<=e&&e<=o[1]){a=r;break}}return r>=0&&r=t[0]&&e<=t[1]}}var Rj=function(e){w(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r;t.eachComponent(`visualMap`,function(t){t.eachTargetSeries(function(n){n===e&&(r=t)})}),this._progressiveEls=null,this.group.removeAll();var i=e.coordinateSystem;i.type===`cartesian2d`||i.type===`calendar`||i.type===`matrix`?this._renderOnGridLike(e,n,0,e.getData().count()):uO(i)&&this._renderOnGeo(i,e,r,n)},t.prototype.incrementalPrepareRender=function(e,t,n){this.group.removeAll()},t.prototype.incrementalRender=function(e,t,n,r){var i=t.coordinateSystem;i&&(uO(i)?this.render(t,n,r):(this._progressiveEls=[],this._renderOnGridLike(t,r,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){tm(this._progressiveEls||this.group,e)},t.prototype._renderOnGridLike=function(e,t,n,r,i){var a=e.coordinateSystem,o=lO(a,`cartesian2d`),s=lO(a,`matrix`),c,l,u,d;if(o){var f=a.getAxis(`x`),p=a.getAxis(`y`);c=ZE(f).w+.5,l=ZE(p).w+.5,u=f.scale.getExtent(),d=p.scale.getExtent()}for(var m=this.group,h=e.getData(),g=e.getModel([`emphasis`,`itemStyle`]).getItemStyle(),_=e.getModel([`blur`,`itemStyle`]).getItemStyle(),v=e.getModel([`select`,`itemStyle`]).getItemStyle(),y=e.get([`itemStyle`,`borderRadius`]),b=vm(e),x=e.getModel(`emphasis`),S=x.get(`focus`),C=x.get(`blurScope`),w=x.get(`disabled`),T=o||s?[h.mapDimension(`x`),h.mapDimension(`y`),h.mapDimension(`value`)]:[h.mapDimension(`time`),h.mapDimension(`value`)],E=n;Eu[1]||Ad[1])continue;var j=a.dataToPoint([k,A]);D=new iu({shape:{x:j[0]-c/2,y:j[1]-l/2,width:c,height:l},style:O})}else if(s){var M=a.dataToLayout([h.get(T[0],E),h.get(T[1],E)]).rect;if(Ne(M.x))continue;D=new iu({z2:1,shape:M,style:O})}else{if(isNaN(h.get(T[1],E)))continue;var ee=a.dataToLayout([h.get(T[0],E)]),M=ee.contentRect||ee.rect;if(Ne(M.x)||Ne(M.y))continue;D=new iu({z2:1,shape:M,style:O})}if(h.hasItemOption){var N=h.getItemModel(E),P=N.getModel(`emphasis`);g=P.getModel(`itemStyle`).getItemStyle(),_=N.getModel([`blur`,`itemStyle`]).getItemStyle(),v=N.getModel([`select`,`itemStyle`]).getItemStyle(),y=N.get([`itemStyle`,`borderRadius`]),S=P.get(`focus`),C=P.get(`blurScope`),w=P.get(`disabled`),b=vm(N)}D.shape.r=y;var te=e.getRawValue(E),ne=`-`;te&&te[2]!=null&&(ne=te[2]+``),_m(D,b,{labelFetcher:e,labelDataIndex:E,defaultOpacity:O.opacity,defaultText:ne}),D.ensureState(`emphasis`).style=g,D.ensureState(`blur`).style=_,D.ensureState(`select`).style=v,Md(D,S,C,w),D.incremental=Rs(e,i),i&&(D.states.emphasis.hoverLayer=2),m.add(D),h.setItemGraphicEl(E,D),this._progressiveEls&&this._progressiveEls.push(D)}},t.prototype._renderOnGeo=function(e,t,n,r){var i=n.targetVisuals.inRange,a=n.targetVisuals.outOfRange,o=t.getData(),s=this._hmLayer||this._hmLayer||new Fj;s.blurSize=t.get(`blurSize`),s.pointSize=t.get(`pointSize`),s.minOpacity=t.get(`minOpacity`),s.maxOpacity=t.get(`maxOpacity`);var c=e.getViewRect().clone(),l=e.getRoamTransform();c.applyTransform(l);var u=Math.max(c.x,0),d=Math.max(c.y,0),f=Math.min(c.width+c.x,r.getWidth()),p=Math.min(c.height+c.y,r.getHeight()),m=f-u,h=p-d,g=[o.mapDimension(`lng`),o.mapDimension(`lat`),o.mapDimension(`value`)],_=o.mapArray(g,function(t,n,r){var i=e.dataToPoint([t,n]);return i[0]-=u,i[1]-=d,i.push(r),i}),v=n.getExtent(),y=n.type===`visualMap.continuous`?Lj(v,n.option.range):Ij(v,n.getPieceList(),n.option.selected);s.update(_,m,h,i.color.getNormalizer(),{inRange:i.color.getColorMapper(),outOfRange:a.color.getColorMapper()},y);var b=new Xl({style:{width:m,height:h,x:u,y:d,image:s.canvas},silent:!0});this.group.add(b)},t.type=`heatmap`,t}(zy),zj=function(e){w(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(e,t){return Cw(null,this,{generateCoord:`value`})},t.prototype.preventIncremental=function(){var e=ng.get(this.get(`coordinateSystem`));if(e&&e.dimensions)return e.dimensions[0]===`lng`&&e.dimensions[1]===`lat`},t.type=`series.heatmap`,t.dependencies=[`grid`,`geo`,`calendar`,`matrix`],t.defaultOption={coordinateSystem:`cartesian2d`,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:Z.color.primary}}},t}(Ey);function Bj(e){e.registerChartView(Rj),e.registerSeriesModel(zj)}var Vj=fs(),Hj=I,Uj=V,Wj=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(e,t,n,r){var i=t.get(`value`),a=t.get(`status`);if(this._axisModel=e,this._axisPointerModel=t,this._api=n,r||this._lastValue!==i||this._lastStatus!==a){this._lastValue=i,this._lastStatus=a;var o=this._group,s=this._handle;if(!a||a===`hide`)o&&o.hide(),s&&s.hide();else{o&&o.show(),s&&s.show();var c={};this.makeElOption(c,i,e,t,n);var l=c.graphicKey;l!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=l;var u=this._moveAnimation=this.determineAnimation(e,t);if(!o)o=this._group=new Ba,this.createPointerEl(o,c,e,t),this.createLabelEl(o,c,e,t),n.getZr().add(o);else{var d=Te(Gj,t,u);this.updatePointerEl(o,c,d),this.updateLabelEl(o,c,d,t)}Yj(o,t,!0),this._renderHandle(i)}}},e.prototype.remove=function(e){this.clear(e)},e.prototype.dispose=function(e){this.clear(e)},e.prototype.determineAnimation=function(e,t){var n=t.get(`animation`),r=e.axis,i=r.type===`category`,a=t.get(`snap`);if(!a&&!i)return!1;if(n===`auto`||n==null){var o=this.animationThreshold;if(i&&ZE(r).w>o)return!0;if(a){var s=IA(e).seriesDataCount,c=r.getExtent();return Math.abs(c[0]-c[1])/s>o}return!1}return n===!0},e.prototype.makeElOption=function(e,t,n,r,i){},e.prototype.createPointerEl=function(e,t,n,r){var i=t.pointer;if(i){var a=Vj(e).pointerEl=new bp[i.type](Hj(t.pointer));e.add(a)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=Vj(e).labelEl=new lu(Hj(t.label));e.add(i),qj(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=Vj(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),n(r,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,r){var i=Vj(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),qj(i,r))},e.prototype._renderHandle=function(e){if(!this._dragging&&this.updateHandleTransform){var t=this._axisPointerModel,n=this._api.getZr(),r=this._handle,i=t.getModel(`handle`),a=t.get(`status`);if(!i.get(`show`)||!a||a===`hide`)r&&n.remove(r),this._handle=null;else{var o;this._handle||(o=!0,r=this._handle=Gp(i.get(`icon`),{cursor:`move`,draggable:!0,onmousemove:function(e){Ut(e.event)},onmousedown:Uj(this._onHandleDragMove,this,0,0),drift:Uj(this._onHandleDragMove,this),ondragend:Uj(this._onHandleDragEnd,this)}),n.add(r)),Yj(r,t,!1),r.setStyle(i.getItemStyle(null,[`color`,`borderColor`,`borderWidth`,`opacity`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`]));var s=i.get(`size`);H(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,Yy(this,`_doDispatchAxisPointer`,i.get(`throttle`)||0,`fixRate`),this._moveHandleToValue(e,o)}}},e.prototype._moveHandleToValue=function(e,t){Gj(this._axisPointerModel,!t&&this._moveAnimation,this._handle,Jj(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var r=this.updateHandleTransform(Jj(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(Jj(r)),Vj(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:`updateAxisPointer`,x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get(`value`);this._moveHandleToValue(e),this._api.dispatchAction({type:`hideTip`})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,r=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),r&&t.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),Xy(this,`_doDispatchAxisPointer`)},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}},e}();function Gj(e,t,n,r){Kj(Vj(n).lastProp,r)||(Vj(n).lastProp=r,t?pp(n,r,e):(n.stopAnimation(),n.attr(r)))}function Kj(e,t){if(G(e)&&G(t)){var n=!0;return z(t,function(t,r){n&&=Kj(e[r],t)}),!!n}return e===t}function qj(e,t){e[t.get([`label`,`show`])?`show`:`hide`]()}function Jj(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function Yj(e,t,n){var r=t.get(`z`),i=t.get(`zlevel`);e&&e.traverse(function(e){e.type!==`group`&&(r!=null&&(e.z=r),i!=null&&(e.zlevel=i),e.silent=n)})}function Xj(e){var t=e.get(`type`),n=e.getModel(t+`Style`),r;return t===`line`?(r=n.getLineStyle(),r.fill=null):t===`shadow`&&(r=n.getAreaStyle(),r.stroke=null),r}function Zj(e,t,n,r,i){var a=$j(n.get(`value`),t.axis,t.ecModel,n.get(`seriesDataIndices`),{precision:n.get([`label`,`precision`]),formatter:n.get([`label`,`formatter`])}),o=n.getModel(`label`),s=qh(o.get(`padding`)||0),c=o.getFont(),l=_a(a,c),u=i.position,d=l.width+s[1]+s[3],f=l.height+s[0]+s[2],p=i.align;p===`right`&&(u[0]-=d),p===`center`&&(u[0]-=d/2);var m=i.verticalAlign;m===`bottom`&&(u[1]-=f),m===`middle`&&(u[1]-=f/2),Qj(u,d,f,r);var h=o.get(`backgroundColor`);(!h||h===`auto`)&&(h=t.get([`axisLine`,`lineStyle`,`color`])),e.label={x:u[0],y:u[1],style:ym(o,{text:a,font:c,fill:o.getTextColor(),padding:s,backgroundColor:h}),z2:10}}function Qj(e,t,n,r){var i=r.getWidth(),a=r.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+n,a)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function $j(e,t,n,r,i){e=t.scale.parse(e);var a=t.scale.getLabel({value:e},{precision:i.precision}),o=i.formatter;if(o){var s={value:jT(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};z(r,function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,i=t&&t.getDataParams(r);i&&s.seriesData.push(i)}),W(o)?a=o.replace(`{value}`,a):U(o)&&(a=o(s))}return a}function eM(e,t,n){var r=Yt();return en(r,r,n.rotation),$t(r,r,n.position),Rp([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}function tM(e,t,n,r,i,a){var o=YO.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get([`label`,`margin`]),Zj(t,r,i,a,{position:eM(r.axis,e,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function nM(e,t,n){return n||=0,{x1:e[n],y1:e[1-n],x2:t[n],y2:t[1-n]}}function rM(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}}function iM(e,t,n){return ZE(e,{fromStat:{sers:B(t,function(e){return n.getSeriesByIndex(e.seriesIndex)})},min:1}).w}function aM(e,t,n){return[Qa(Za(t[0],t[1]),e-n/2),Za(e+n/2,Qa(t[0],t[1]))]}var oM=function(e){w(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,t,n,r,i){var a=n.axis,o=a.grid,s=r.get(`type`),c=a.getGlobalExtent(),l=sM(o,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(t,!0));if(s&&s!==`none`){var d=Xj(r),f=cM[s](a,u,c,l,r.get(`seriesDataIndices`),r.ecModel);f.style=d,e.graphicKey=f.type,e.pointer=f}tM(t,e,gk(o.getRect(),n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=gk(t.axis.grid.getRect(),t,{labelInside:!1});r.labelMargin=n.get([`handle`,`margin`]);var i=eM(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var i=n.axis,a=i.grid,o=i.getGlobalExtent(!0),s=sM(a,i).getOtherAxis(i).getGlobalExtent(),c=i.dim===`x`?0:1,l=[e.x,e.y];l[c]+=t[c],l[c]=Za(o[1],l[c]),l[c]=Qa(o[0],l[c]);var u=(s[1]+s[0])/2,d=[u,u];return d[c]=l[c],{x:l[0],y:l[1],rotation:e.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:`middle`},{align:`center`}][c]}},t}(Wj);function sM(e,t){var n={};return n[t.dim+`AxisIndex`]=t.index,e.getCartesian(n)}var cM={line:function(e,t,n,r){return{type:`Line`,subPixelOptimize:!0,shape:nM([t,r[0]],[t,r[1]],lM(e))}},shadow:function(e,t,n,r,i,a){var o=iM(e,i,a),s=r[1]-r[0],c=aM(t,n,o),l=c[0],u=c[1];return{type:`Rect`,shape:rM([l,r[0]],[u-l,s],lM(e))}}};function lM(e){return e.dim===`x`?0:1}var uM=function(e){w(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`axisPointer`,t.defaultOption={show:`auto`,z:50,type:`line`,snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:Z.color.border,width:1,type:`dashed`},shadowStyle:{color:Z.color.shadowTint},label:{show:!0,formatter:null,precision:`auto`,margin:3,color:Z.color.neutral00,padding:[5,7,5,7],backgroundColor:Z.color.accent60,borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:`M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z`,size:45,margin:50,color:Z.color.accent40,throttle:40}},t}(Eg),dM=fs(),fM=z;function pM(e,t,n){if(!E.node){var r=t.getZr();dM(r).records||(dM(r).records={}),mM(r,t);var i=dM(r).records[e]||(dM(r).records[e]={});i.handler=n}}function mM(e,t){if(dM(e).initialized)return;dM(e).initialized=!0,n(`click`,Te(_M,`click`)),n(`mousemove`,Te(_M,`mousemove`)),n(`mousewheel`,Te(_M,`mousewheel`)),n(`globalout`,gM);function n(n,r){e.on(n,function(n){var i=vM(t);fM(dM(e).records,function(e){e&&r(e,n,i.dispatchAction)}),hM(i.pendings,t)})}}function hM(e,t){var n=e.showTip.length,r=e.hideTip.length,i;n?i=e.showTip[n-1]:r&&(i=e.hideTip[r-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function gM(e,t,n){e.handler(`leave`,null,n)}function _M(e,t,n,r){t.handler(e,n,r)}function vM(e){var t={showTip:[],hideTip:[]},n=function(r){var i=t[r.type];i?i.push(r):(r.dispatchAction=n,e.dispatchAction(r))};return{dispatchAction:n,pendings:t}}function yM(e,t){if(!E.node){var n=t.getZr();(dM(n).records||{})[e]&&(dM(n).records[e]=null)}}var bM=function(e){w(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=t.getComponent(`tooltip`),i=e.get(`triggerOn`)||r&&r.get(`triggerOn`)||`mousemove|click|mousewheel`;pM(`axisPointer`,n,function(e,t,n){i!==`none`&&(e===`leave`||i.indexOf(e)>=0)&&n({type:`updateAxisPointer`,currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})})},t.prototype.remove=function(e,t){yM(`axisPointer`,t)},t.prototype.dispose=function(e,t){yM(`axisPointer`,t)},t.type=`axisPointer`,t}(Fy);function xM(e,t){var n=[],r=e.seriesIndex,i;if(r==null||!(i=t.getSeriesByIndex(r)))return{point:[]};var a=i.getData(),o=ds(a,e);if(o==null||o<0||H(o))return{point:[]};var s=a.getItemGraphicEl(o),c=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(o)||[];else if(c&&c.dataToPoint){if(e.isStacked){var l=c.getBaseAxis(),u=c.getOtherAxis(l).dim,d=l.dim,f=+(u===`x`||u===`radius`),p=a.mapDimension(d),m=[];m[f]=a.get(p,o),m[1-f]=a.get(a.getCalculationInfo(`stackResultDimension`),o),n=c.dataToPoint(m)||[]}else n=c.dataToPoint(a.getValues(B(c.dimensions,function(e){return a.mapDimension(e)}),o))||[]}else if(s){var h=s.getBoundingRect().clone();h.applyTransform(s.transform),n=[h.x+h.width/2,h.y+h.height/2]}return{point:n,el:s}}var SM=fs();function CM(e,t,n){var r=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||V(n.dispatchAction,n),s=t.getComponent(`axisPointer`).coordSysAxesInfo;if(s){NM(i)&&(i=xM({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var c=NM(i),l=a.axesInfo,u=s.axesInfo,d=r===`leave`||NM(i),f={},p={},m={list:[],map:{}},h={showPointer:Te(EM,p),showTooltip:Te(DM,m)};z(s.coordSysMap,function(e,t){var n=c||e.containPoint(i);z(s.coordSysAxesInfo[t],function(e,t){var r=e.axis,a=jM(l,e);if(!d&&n&&(!l||a)){var o=a&&a.value;o==null&&!c&&(o=r.pointToData(i)),o!=null&&wM(e,o,h,!1,f)}})});var g={};return z(u,function(e,t){var n=e.linkGroup;n&&!p[t]&&z(n.axesInfo,function(t,r){var i=p[r];if(t!==e&&i){var a=i.value;n.mapper&&(a=e.axis.scale.parse(n.mapper(a,MM(t),MM(e)))),g[e.key]=a}})}),z(g,function(e,t){wM(u[t],e,h,!0,f)}),OM(p,u,f),kM(m,i,e,o),AM(u,o,n),f}}function wM(e,t,n,r,i){var a=e.axis;if(!a.scale.isBlank()&&a.containData(t)){if(!e.involveSeries)n.showPointer(e,t);else{var o=TM(t,e),s=o.payloadBatch,c=o.snapToValue;s[0]&&i.seriesIndex==null&&R(i,s[0]),!r&&e.snap&&a.containData(c)&&c!=null&&(t=c),n.showPointer(e,t,s),n.showTooltip(e,o,c)}}}function TM(e,t){var n=t.axis,r=n.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return z(t.seriesModels,function(t,c){var l=t.getData().mapDimensionsAll(r),u,d;if(t.getAxisTooltipData){var f=t.getAxisTooltipData(l,e,n);d=f.dataIndices,u=f.nestestValue}else{if(d=t.indicesOfNearest(r,l[0],e,n.type===`category`?.5:null),!d.length)return;u=t.getData().get(l[0],d[0])}if(Fo(u)){var p=e-u,m=Math.abs(p);m<=o&&((m=0&&s<0)&&(o=m,s=p,i=u,a.length=0),z(d,function(e){a.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})}))}}),{payloadBatch:a,snapToValue:i}}function EM(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function DM(e,t,n,r){var i=n.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(t.triggerTooltip&&i.length){var c=t.coordSys.model,l=zA(c),u=e.map[l];u||(u=e.map[l]={coordSysId:c.id,coordSysIndex:c.componentIndex,coordSysType:c.type,coordSysMainType:c.mainType,dataByAxis:[]},e.list.push(u)),u.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:r,valueLabelOpt:{precision:s.get([`label`,`precision`]),formatter:s.get([`label`,`formatter`])},seriesDataIndices:i.slice()})}}function OM(e,t,n){var r=n.axesInfo=[];z(t,function(t,n){var i=t.axisPointerModel.option,a=e[n];a?(!t.useHandle&&(i.status=`show`),i.value=a.value,i.seriesDataIndices=(a.payloadBatch||[]).slice()):!t.useHandle&&(i.status=`hide`),i.status===`show`&&r.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})})}function kM(e,t,n,r){if(NM(t)||!e.list.length)r({type:`hideTip`});else{var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:`showTip`,escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}}function AM(e,t,n){var r=n.getZr(),i=`axisPointerLastHighlights`,a=SM(r)[i]||{},o=SM(r)[i]={};z(e,function(e,t){var n=e.axisPointerModel.option;n.status===`show`&&e.triggerEmphasis&&z(n.seriesDataIndices,function(e){o[e.seriesIndex+`|`+e.dataIndex]=e})});var s=[],c=[];function l(e){return{seriesIndex:e.seriesIndex,dataIndex:e.dataIndex}}z(a,function(e,t){!o[t]&&c.push(l(e))}),z(o,function(e,t){!a[t]&&s.push(l(e))}),c.length&&n.dispatchAction({type:`downplay`,escapeConnect:!0,notBlur:!0,batch:c}),s.length&&n.dispatchAction({type:`highlight`,escapeConnect:!0,notBlur:!0,batch:s})}function jM(e,t){for(var n=0;n<(e||[]).length;n++){var r=e[n];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}function MM(e){var t=e.axis.model,n={},r=n.axisDim=e.axis.dim;return n.axisIndex=n[r+`AxisIndex`]=t.componentIndex,n.axisName=n[r+`AxisName`]=t.name,n.axisId=n[r+`AxisId`]=t.id,n}function NM(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function PM(e){VA.registerAxisPointerClass(`CartesianAxisPointer`,oM),e.registerComponentModel(uM),e.registerComponentView(bM),e.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!H(t)&&(e.axisPointer.link=[t])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,{overallReset:function(e,t){e.getComponent(`axisPointer`).coordSysAxesInfo=kA(e,t)}}),e.registerAction({type:`updateAxisPointer`,event:`updateAxisPointer`,update:`:updateAxisPointer`},CM)}function FM(e){DE(QA),DE(PM)}var IM=[`x`,`y`,`radius`,`angle`,`single`],LM=fs(),RM=[`cartesian2d`,`polar`,`singleAxis`];function zM(e){return ge(RM,e.get(`coordinateSystem`))>=0}function BM(e){return e+`Axis`}function VM(e,t){var n=q(),r=[],i=q();e.eachComponent({mainType:`dataZoom`,query:t},function(e){i.get(e.uid)||s(e)});var a;do a=!1,e.eachComponent(`dataZoom`,o);while(a);function o(e){!i.get(e.uid)&&c(e)&&(s(e),a=!0)}function s(e){i.set(e.uid,!0),r.push(e),l(e)}function c(e){var t=!1;return e.eachTargetAxis(function(e,r){var i=n.get(e);i&&i[r]&&(t=!0)}),t}function l(e){e.eachTargetAxis(function(e,t){(n.get(e)||n.set(e,[]))[t]=!0})}return r}function HM(e){var t=e.ecModel,n={infoList:[],infoMap:q()};return e.eachTargetAxis(function(e,r){var i=t.getComponent(BM(e),r);if(i){var a=i.getCoordSysModel();if(a){var o=a.uid,s=n.infoMap.get(o);s||(s={model:a,axisModels:[]},n.infoList.push(s),n.infoMap.set(o,s)),s.axisModels.push(i)}}}),n}function UM(e){var t=LM(Jb(e));return t.axisProxyMap||=q()}function WM(e){if(e)return UM(e.ecModel).get(e.uid)}function GM(e,t){UM(e.ecModel).set(e.uid,t)}function KM(e,t){var n=t.getAxisModel().axis.__alignTo;return n&&e.getAxisProxy(n.dim,n.model.componentIndex)?WM(n.model):null}var qM=function(){function e(){this.indexList=[],this.indexMap=[]}return e.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},e}(),JM=function(e){w(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=[`percent`,`percent`],n}return t.prototype.init=function(e,t,n){var r=YM(e);this.settledOption=r,this.mergeDefaultAndTheme(e,n),this._doInit(r)},t.prototype.mergeOption=function(e){var t=YM(e);L(this.option,e,!0),L(this.settledOption,t,!0),this._doInit(t)},t.prototype._doInit=function(e){var t=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var n=this.settledOption;z([[`start`,`startValue`],[`end`,`endValue`]],function(e,r){this._rangePropMode[r]===`value`&&(t[e[0]]=n[e[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get(`orient`,!0),t=this._targetAxisInfoMap=q();this._fillSpecifiedTargetAxis(t)?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||`horizontal`,this._fillAutoTargetAxisByOrient(t,this._orient)),this._noTarget=!0,t.each(function(e){e.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(e){var t=!1;return z(IM,function(n){var r=this.getReferringComponents(BM(n),_s);if(r.specified){t=!0;var i=new qM;z(r.models,function(e){i.add(e.componentIndex)}),e.set(n,i)}},this),t},t.prototype._fillAutoTargetAxisByOrient=function(e,t){var n=this.ecModel,r=!0;if(r){var i=t===`vertical`?`y`:`x`,a=n.findComponents({mainType:i+`Axis`});o(a,i)}if(r){var a=n.findComponents({mainType:`singleAxis`,filter:function(e){return e.get(`orient`,!0)===t}});o(a,`single`)}function o(t,n){var i=t[0];if(i){var a=new qM;if(a.add(i.componentIndex),e.set(n,a),r=!1,n===`x`||n===`y`){var o=i.getReferringComponents(`grid`,gs).models[0];o&&z(t,function(e){i.componentIndex!==e.componentIndex&&o===e.getReferringComponents(`grid`,gs).models[0]&&a.add(e.componentIndex)})}}}r&&z(IM,function(t){if(r){var i=n.findComponents({mainType:BM(t),filter:function(e){return e.get(`type`,!0)===`category`}});if(i[0]){var a=new qM;a.add(i[0].componentIndex),e.set(t,a),r=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(t){!e&&(e=t)},this),e===`y`?`vertical`:`horizontal`},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty(`throttle`)&&(this._autoThrottle=!1),this._autoThrottle){var t=this.ecModel.option;this.option.throttle=t.animation&&t.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var t=this._rangePropMode,n=this.get(`rangeMode`);z([[`start`,`startValue`],[`end`,`endValue`]],function(r,i){var a=e[r[0]]!=null,o=e[r[1]]!=null;a&&!o?t[i]=`percent`:!a&&o?t[i]=`value`:n?t[i]=n[i]:a&&(t[i]=`percent`)})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis(function(t,n){e??=this.ecModel.getComponent(BM(t),n)},this),e},t.prototype.eachTargetAxis=function(e,t){this._targetAxisInfoMap.each(function(n,r){z(n.indexList,function(n){e.call(t,r,n)})})},t.prototype.getAxisProxy=function(e,t){return WM(this.getAxisModel(e,t))},t.prototype.getAxisModel=function(e,t){var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[t])return this.ecModel.getComponent(BM(e),t)},t.prototype.setRawRange=function(e){var t=this.option,n=this.settledOption;z([[`start`,`startValue`],[`end`,`endValue`]],function(r){(e[r[0]]!=null||e[r[1]]!=null)&&(t[r[0]]=n[r[0]]=e[r[0]],t[r[1]]=n[r[1]]=e[r[1]])},this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var t=this.option;z([`start`,`startValue`,`end`,`endValue`],function(n){t[n]=e[n]})},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getWindow().percent},t.prototype.getValueRange=function(e,t){if(e==null&&t==null){var n=this.findRepresentativeAxisProxy();if(n)return n.getWindow().value}else return this.getAxisProxy(e,t).getWindow().value},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return WM(e);for(var t,n=this._targetAxisInfoMap.keys(),r=0;ra[1];if(u&&!d&&!f)return!0;u&&(i=!0),d&&(t=!0),f&&(n=!0)}return i&&t&&n})}else z(r,function(n){if(i===`empty`)e.setData(t=t.map(n,function(e){return o(e)?e:NaN}));else{var r={};r[n]=a,t.selectRange(r)}});z(r,function(e){t.setApproximateExtent(a,e)})}});function o(e){return e>=a[0]&&e<=a[1]}},e.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._extent;z([`min`,`max`],function(r){var i=t.get(r+`Span`),a=t.get(r+`ValueSpan`);a!=null&&(a=this.getAxisModel().axis.scale.parse(a)),a==null?i!=null&&(a=co(i,[0,100],n,!0)-n[0]):i=co(n[0]+a,n,[0,100],!0),e[r+`Span`]=i,e[r+`ValueSpan`]=a},this)},e}(),QM={dirtyOnOverallProgress:!0,getTargetSeries:function(e){function t(t){e.eachComponent(`dataZoom`,function(n){n.eachTargetAxis(function(r,i){t(r,i,e.getComponent(BM(r),i),n)})})}var n=[];t(function(t,r,i,a){if(!WM(i)){var o=new ZM(t,r,a,e);n.push(o),GM(i,o)}});var r=q();return z(n,function(e){z(e.getTargetSeriesModels(),function(e){r.set(e.uid,e)})}),r},overallReset:function(e,t){e.eachComponent(`dataZoom`,function(e){var n=[];e.eachTargetAxis(function(t,r){var i=e.getAxisProxy(t,r),a=KM(e,i);a?n.push([i,a]):i.reset(e,null)}),z(n,function(t){t[0].reset(e,t[1].getWindow().percentInverted)}),e.eachTargetAxis(function(n,r){e.getAxisProxy(n,r).filterData(e,t)})}),e.eachComponent(`dataZoom`,function(e){var t=e.findRepresentativeAxisProxy();if(t){var n=t.getWindow(),r=n.percent,i=n.value;e.setCalculatedRange({start:r[0],end:r[1],startValue:i[0],endValue:i[1]})}})}};function $M(e){e.registerAction(`dataZoom`,function(e,t){z(VM(t,e),function(t){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var eN=Ns();function tN(e){eN(e,function(){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,QM),$M(e),e.registerSubTypeDefaulter(`dataZoom`,function(){return`slider`})})}function nN(e,t){var n=qh(t.get(`padding`)),r=t.getItemStyle([`color`,`opacity`]);return r.fill=t.get(`backgroundColor`),new iu({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get(`borderRadius`)},style:r,silent:!0,z2:-1})}var rN=function(e){w(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`tooltip`,t.dependencies=[`axisPointer`],t.defaultOption={z:60,show:!0,showContent:!0,trigger:`item`,triggerOn:`mousemove|click|mousewheel`,alwaysShowContent:!1,renderMode:`auto`,confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:Z.color.neutral00,shadowBlur:10,shadowColor:`rgba(0, 0, 0, .2)`,shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:Z.color.border,padding:null,extraCssText:``,axisPointer:{type:`line`,axis:`auto`,animation:`auto`,animationDurationUpdate:200,animationEasingUpdate:`exponentialOut`,crossStyle:{color:Z.color.borderShade,width:1,type:`dashed`,textStyle:{}}},textStyle:{color:Z.color.tertiary,fontSize:14}},t}(Eg);function iN(e){var t=e.get(`confine`);return t==null?e.get(`renderMode`)===`richText`:!!t}function aN(e){if(E.domSupported){for(var t=document.documentElement.style,n=0,r=e.length;n-1?(s+=`top:50%`,c+=`translateY(-50%) rotate(`+(l=a===`left`?-225:-45)+`deg)`):(s+=`left:50%`,c+=`translateX(-50%) rotate(`+(l=a===`top`?225:45)+`deg)`);var u=l*Math.PI/180,d=o+i,f=d*Math.abs(Math.cos(u))+d*Math.abs(Math.sin(u)),p=Math.round(((f-Math.SQRT2*i)/2+Math.SQRT2*i-(f-d)/2)*100)/100;s+=`;`+a+`:-`+p+`px`;var m=t+` solid `+i+`px;`;return`
`}function hN(e,t,n){var r=`cubic-bezier(0.23,1,0.32,1)`,i=``,a=``;return n&&(i=` `+e/2+`s `+r,a=`opacity`+i+`,visibility`+i),t||(i=` `+e+`s `+r,a+=(a.length?`,`:``)+(E.transformSupported?``+dN+i:`,left`+i+`,top`+i)),uN+`:`+a}function gN(e,t,n){var r=e.toFixed(0)+`px`,i=t.toFixed(0)+`px`;if(!E.transformSupported)return n?`top:`+i+`;left:`+r+`;`:[[`top`,i],[`left`,r]];var a=E.transform3dSupported,o=`translate`+(a?`3d`:``)+`(`+r+`,`+i+(a?`,0`:``)+`)`;return n?`top:0;left:0;`+dN+`:`+o+`;`:[[`top`,0],[`left`,0],[oN,o]]}function _N(e){var t=[],n=e.get(`fontSize`),r=e.getTextColor();r&&t.push(`color:`+r),t.push(`font:`+e.getFont());var i=K(e.get(`lineHeight`),Math.round(n*3/2));n&&t.push(`line-height:`+i+`px`);var a=e.get(`textShadowColor`),o=e.get(`textShadowBlur`)||0,s=e.get(`textShadowOffsetX`)||0,c=e.get(`textShadowOffsetY`)||0;return a&&o&&t.push(`text-shadow:`+s+`px `+c+`px `+o+`px `+a),z([`decoration`,`align`],function(n){var r=e.get(n);r&&t.push(`text-`+n+`:`+r)}),t.join(`;`)}function vN(e,t,n,r){var i=[],a=e.get(`transitionDuration`),o=e.get(`backgroundColor`),s=e.get(`shadowBlur`),c=e.get(`shadowColor`),l=e.get(`shadowOffsetX`),u=e.get(`shadowOffsetY`),d=e.getModel(`textStyle`),f=by(e,`html`),p=l+`px `+u+`px `+s+`px `+c;return i.push(`box-shadow:`+p),t&&a>0&&i.push(hN(a,n,r)),o&&i.push(`background-color:`+o),z([`width`,`color`,`radius`],function(t){var n=`border-`+t,r=Kh(n),a=e.get(r);a!=null&&i.push(n+`:`+a+(t===`color`?``:`px`))}),i.push(_N(d)),f!=null&&i.push(`padding:`+qh(f).join(`px `)+`px`),i.join(`;`)+`;`}function yN(e,t,n,r,i){var a=t&&t.painter;if(n){var o=a&&a.getViewportRoot();o&&wt(e,o,n,r,i)}else{e[0]=r,e[1]=i;var s=a&&a.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var bN=function(){function e(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,E.wxa)return null;var n=document.createElement(`div`);n.domBelongToZr=!0,this.el=n;var r=this._zr=e.getZr(),i=t.appendTo,a=i&&(W(i)?document.querySelector(i):Ae(i)?i:U(i)&&i(e.getDom()));yN(this._styleCoord,r,a,e.getWidth()/2,e.getHeight()/2),(a||e.getDom()).appendChild(n),this._api=e,this._container=a;var o=this;n.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},n.onmousemove=function(e){if(e||=window.event,!o._enterable){var t=r.handler;zt(r.painter.getViewportRoot(),e,!0),t.dispatch(`mousemove`,e)}},n.onmouseleave=function(){o._inContent=!1,o._enterable&&o._show&&o.hideLater(o._hideDelay)}}return e.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),n=lN(t,`position`),r=t.style;r.position!==`absolute`&&n!==`absolute`&&(r.position=`relative`)}var i=e.get(`alwaysShowContent`);i&&this._moveIfResized(),this._alwaysShowContent=i,this._enableDisplayTransition=e.get(`displayTransition`)&&e.get(`transitionDuration`)>0,this.el.className=e.get(`className`)||``},e.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,r=n.style,i=this._styleCoord;n.innerHTML?r.cssText=fN+vN(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+gN(i[0],i[1],!0)+(`border-color:`+$h(t)+`;`)+(e.get(`extraCssText`)||``)+(`;pointer-events:`+(this._enterable?`auto`:`none`)):r.display=`none`,this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,t,n,r,i){var a=this.el;if(e==null)a.innerHTML=``;else{var o=``;if(W(i)&&n.get(`trigger`)===`item`&&!iN(n)&&(o=mN(n,r,i)),W(e))a.innerHTML=e+o;else if(e){a.innerHTML=``,H(e)||(e=[e]);for(var s=0;s=0?this._tryShow(n,r):t===`leave`&&this._hide(r))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,r=e.get(`triggerOn`);if(e.get(`trigger`)!==`axis`&&(this._lastDataByCoordSys=null,this._cbParamsList=null),this._lastX!=null&&this._lastY!=null&&r!==`none`&&r!==`click`){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&i.manuallyShowTip(e,t,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,t,n,r){if(r.from!==this.uid&&!E.node&&n.getDom()){var i=ON(r,n);this._ticket=``;var a=r.dataByCoordSys,o=NN(r,t,n);if(o){var s=o.el.getBoundingRect().clone();s.applyTransform(o.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:o.el,position:r.position,positionDefault:`bottom`},i)}else if(r.tooltip&&r.x!=null&&r.y!=null){var c=TN;c.x=r.x,c.y=r.y,c.update(),Cu(c).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:c},i)}else if(a)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:a,tooltipOption:r.tooltipOption},i);else if(r.seriesIndex!=null){if(this._manuallyAxisShowTip(e,t,n,r))return;var l=xM(r,t),u=l.point[0],d=l.point[1];u!=null&&d!=null&&this._tryShow({offsetX:u,offsetY:d,target:l.el,position:r.position,positionDefault:`bottom`},i)}else r.x!=null&&r.y!=null&&(n.dispatchAction({type:`updateAxisPointer`,x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target},i))}},t.prototype.manuallyHideTip=function(e,t,n,r){var i=this._tooltipContent;this._tooltipModel&&i.hideLater(this._tooltipModel.get(`hideDelay`)),this._lastX=this._lastY=this._lastDataByCoordSys=null,this._cbParamsList=null,r.from!==this.uid&&this._hide(ON(r,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,r){var i=r.seriesIndex,a=r.dataIndex,o=t.getComponent(`axisPointer`).coordSysAxesInfo;if(i!=null&&a!=null&&o!=null){var s=t.getSeriesByIndex(i);if(s&&DN([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model],this._tooltipModel).get(`trigger`)===`axis`)return n.dispatchAction({type:`updateAxisPointer`,seriesIndex:i,dataIndex:a,position:r.position}),!0}},t.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var r=e.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,e);else if(n){if(Cu(n).ssrType===`legend`)return;this._lastDataByCoordSys=null,this._cbParamsList=null;var i,a;Rb(n,function(e){if(e.tooltipDisabled)return i=a=null,!0;i||a||(Cu(e).dataIndex==null?Cu(e).tooltipConfig!=null&&(a=e):i=e)},!0),i?this._showSeriesItemTooltip(e,i,t):a?this._showComponentItemTooltip(e,a,t):this._hide(t)}else this._lastDataByCoordSys=null,this._cbParamsList=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get(`showDelay`);t=V(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,r=this._tooltipModel,i=[t.offsetX,t.offsetY],a=DN([t.tooltipOption],r),o=this._renderMode,s=[],c=oy(`section`,{blocks:[],noHeader:!0}),l=[],u=new xy;z(e,function(e){z(e.dataByAxis,function(e){var t=n.getComponent(e.axisDim+`Axis`,e.axisIndex),i=e.value,a=t.axis,d=a.scale.parse(i);if(t&&i!=null){var f=$j(i,a,n,e.seriesDataIndices,e.valueLabelOpt),p=oy(`section`,{header:f,noHeader:!ze(f),sortBlocks:!0,blocks:[]});c.blocks.push(p),z(e.seriesDataIndices,function(i){var a=n.getSeriesByIndex(i.seriesIndex),c=i.dataIndexInside,m=a.getDataParams(c);if(!(m.dataIndex<0)){m.axisDim=e.axisDim,m.axisIndex=e.axisIndex,m.axisType=e.axisType,m.axisId=e.axisId,m.axisValue=jT(t.axis,{value:d}),m.axisValueLabel=f,m.marker=u.makeTooltipMarker(`item`,$h(m.color),o);var h=Sv(a.formatTooltip(c,!0,null)),g=h.frag;if(g){var _=DN([a],r).get(`valueFormatter`);p.blocks.push(_?R({valueFormatter:_},g):g)}h.text&&l.push(h.text),s.push(m)}})}})}),c.blocks.reverse(),l.reverse();var d=t.position,f=fy(c,u,o,a.get(`order`),n.get(`useUTC`),a.get(`textStyle`));f&&l.unshift(f);var p=o===`richText`?` `:`
`,m=l.join(p);this._showOrMove(a,function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(a,d,i[0],i[1],this._tooltipContent,s):this._showTooltipContent(a,m,s,Math.random()+``,i[0],i[1],d,null,u)})},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,i=Cu(t),a=i.seriesIndex,o=r.getSeriesByIndex(a),s=i.dataModel||o,c=i.dataIndex,l=i.dataType,u=s.getData(l),d=this._renderMode,f=e.positionDefault,p=DN([u.getItemModel(c),s,o&&(o.coordinateSystem||{}).model],this._tooltipModel,f?{position:f}:null),m=p.get(`trigger`);if(m==null||m===`item`){var h=s.getDataParams(c,l),g=new xy;h.marker=g.makeTooltipMarker(`item`,$h(h.color),d);var _=Sv(s.formatTooltip(c,!1,l)),v=p.get(`order`),y=p.get(`valueFormatter`),b=_.frag,x=b?fy(y?R({valueFormatter:y},b):b,g,d,v,r.get(`useUTC`),p.get(`textStyle`)):_.text,S=`item_`+s.name+`_`+c;this._showOrMove(p,function(){this._showTooltipContent(p,x,h,S,e.offsetX,e.offsetY,e.position,e.target,g)}),n({type:`showTip`,dataIndexInside:c,dataIndex:u.getRawIndex(c),seriesIndex:a,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r=this._renderMode===`html`,i=Cu(t),a=i.tooltipConfig.option||{},o=a.encodeHTMLContent;if(W(a)){var s=a;a={content:s,formatter:s},o=!0}o&&r&&a.content&&(a=I(a),a.content=Mt(a.content));var c=[a],l=this._ecModel.getComponent(i.componentMainType,i.componentIndex);l&&c.push(l),c.push({formatter:a.content});var u=e.positionDefault,d=DN(c,this._tooltipModel,u?{position:u}:null),f=d.get(`content`),p=Math.random()+``,m=new xy;this._showOrMove(d,function(){var n=I(d.get(`formatterParams`)||{});this._showTooltipContent(d,f,n,p,e.offsetX,e.offsetY,e.position,t,m)}),n({type:`showTip`,from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,i,a,o,s,c){if(this._ticket=``,e.get(`showContent`)&&e.get(`show`)){var l=this._tooltipContent;l.setEnterable(e.get(`enterable`));var u=e.get(`formatter`);o||=e.get(`position`);var d=t,f=this._getNearestPoint([i,a],n,e.get(`trigger`),e.get(`borderColor`),e.get(`defaultBorderColor`,!0)).color;if(u){if(W(u)){var p=e.ecModel.get(`useUTC`),m=H(n)?n[0]:n,h=m&&m.axisType&&m.axisType.indexOf(`time`)>=0;d=u,h&&(d=Dh(m.axisValue,d,p)),d=Zh(d,n,!0)}else if(U(u)){var g=V(function(t,r){t===this._ticket&&(l.setContent(r,c,e,f,o),this._updatePosition(e,o,i,a,l,n,s))},this);this._ticket=r,d=u(n,r,g)}else d=u}l.setContent(d,c,e,f,o),l.show(e,f),this._updatePosition(e,o,i,a,l,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r,i){if(n===`axis`||H(t))return{color:r||i};if(!H(t))return{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,i,a,o){var s=this._api.getWidth(),c=this._api.getHeight();t||=e.get(`position`);var l=i.getSize(),u=e.get(`align`),d=e.get(`verticalAlign`),f=o&&o.getBoundingRect().clone();if(o&&f.applyTransform(o.transform),U(t)&&(t=t([n,r],a,i.el,f,{viewSize:[s,c],contentSize:l.slice()})),H(t))n=lo(t[0],s),r=lo(t[1],c);else if(G(t)){var p=t;p.width=l[0],p.height=l[1];var m=_g(p,{width:s,height:c});n=m.x,r=m.y,u=null,d=null}else if(W(t)&&o){var h=jN(t,f,l,e.get(`borderWidth`));n=h[0],r=h[1]}else{var h=kN(n,r,i,s,c,u?null:20,d?null:20);n=h[0],r=h[1]}if(u&&(n-=MN(u)?l[0]/2:u===`right`?l[0]:0),d&&(r-=MN(d)?l[1]/2:d===`bottom`?l[1]:0),iN(e)){var h=AN(n,r,i,s,c);n=h[0],r=h[1]}i.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===e.length;return i&&z(n,function(n,a){var o=n.dataByAxis||[],s=(e[a]||{}).dataByAxis||[];i&&=o.length===s.length,i&&z(o,function(e,n){var a=s[n]||{},o=e.seriesDataIndices||[],c=a.seriesDataIndices||[];i=i&&e.value===a.value&&e.axisType===a.axisType&&e.axisId===a.axisId&&o.length===c.length,i&&z(o,function(e,t){var n=c[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),r&&z(e.seriesDataIndices,function(e){var n=e.seriesIndex,a=t[n],o=r[n];a&&o&&o.data!==a.data&&(i=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i},t.prototype._hide=function(e){this._lastDataByCoordSys=null,this._cbParamsList=null,e({type:`hideTip`,from:this.uid})},t.prototype.dispose=function(e,t){!E.node&&t.getDom()&&(Xy(this,`_updatePosition`),this._tooltipContent.dispose(),yM(`itemTooltip`,t),this._tooltipContent=null,this._tooltipModel=null,this._lastDataByCoordSys=null,this._cbParamsList=null)},t.type=`tooltip`,t}(Fy);function DN(e,t,n){var r=t.ecModel,i;n?(i=new Bm(n,r,r),i=new Bm(t.option,i,r)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof Bm&&(o=o.get(`tooltip`,!0)),W(o)&&(o={formatter:o}),o&&(i=new Bm(o,i,r)))}return i}function ON(e,t){return e.dispatchAction||V(t.dispatchAction,t)}function kN(e,t,n,r,i,a,o){var s=n.getSize(),c=s[0],l=s[1];return a!=null&&(e+c+a+2>r?e-=c+a:e+=a),o!=null&&(t+l+o>i?t-=l+o:t+=o),[e,t]}function AN(e,t,n,r,i){var a=n.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,r)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function jN(e,t,n,r){var i=n[0],a=n[1],o=Math.ceil(Math.SQRT2*r)+8,s=0,c=0,l=t.width,u=t.height;switch(e){case`inside`:s=t.x+l/2-i/2,c=t.y+u/2-a/2;break;case`top`:s=t.x+l/2-i/2,c=t.y-a-o;break;case`bottom`:s=t.x+l/2-i/2,c=t.y+u+o;break;case`left`:s=t.x-i-o,c=t.y+u/2-a/2;break;case`right`:s=t.x+l+o,c=t.y+u/2-a/2}return[s,c]}function MN(e){return e===`center`||e===`middle`}function NN(e,t,n){var r=hs(e).queryOptionMap,i=r.keys()[0];if(i&&i!==`series`){var a=vs(t,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(a){var o=n.getViewOfComponentModel(a),s;if(o.group.traverse(function(t){var n=Cu(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0}),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}}}function PN(e){DE(PM),e.registerComponentModel(rN),e.registerComponentView(EN),e.registerAction({type:`showTip`,event:`showTip`,update:`tooltip:manuallyShowTip`},Ze),e.registerAction({type:`hideTip`,event:`hideTip`,update:`tooltip:manuallyHideTip`},Ze)}var FN=z;function IN(e){if(e){for(var t in e)if(e.hasOwnProperty(t))return!0}}function LN(e,t,n){var r={};return FN(t,function(t){var a=r[t]=i();FN(e[t],function(e,r){if(_j.isValidType(r)){var i={type:r,visual:e};n&&n(i,t),a[r]=new _j(i),r===`opacity`&&(i=I(i),i.type=`colorAlpha`,a.__hidden.__alphaForOpacity=new _j(i))}})}),r;function i(){var e=function(){};return e.prototype.__hidden=e.prototype,new e}}function RN(e,t,n){var r;z(n,function(e){t.hasOwnProperty(e)&&IN(t[e])&&(r=!0)}),r&&z(n,function(n){t.hasOwnProperty(n)&&IN(t[n])?e[n]=I(t[n]):delete e[n]})}function zN(e,t,n,r){var i={};return z(e,function(e){i[e]=_j.prepareVisualTypes(t[e])}),{progress:function(e,a){var o;r!=null&&(o=a.getDimensionIndex(r));function s(e){return Mb(a,l,e)}function c(e,t){Pb(a,l,e,t)}for(var l,u=a.getStore();(l=e.next())!=null;){var d=a.getRawDataItem(l);if(!(d&&d.visualMap===!1))for(var f=r==null?l:u.get(o,l),p=n(f),m=t[p],h=i[p],g=0,_=h.length;g<_;g++){var v=h[g];m[v]&&m[v].applyVisual(f,s,c)}}}}}var BN=function(e,t){if(t===`all`)return{type:`all`,title:e.getLocaleModel().get([`legend`,`selector`,`all`])};if(t===`inverse`)return{type:`inverse`,title:e.getLocaleModel().get([`legend`,`selector`,`inverse`])}},VN=function(e){w(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:`box`,ignoreSize:!0},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},t.prototype._updateSelector=function(e){var t=e.selector,n=this.ecModel;t===!0&&(t=e.selector=[`all`,`inverse`]),H(t)&&z(t,function(e,r){W(e)&&(e={type:e}),t[r]=L(e,BN(n,e.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get(`selectedMode`)===`single`){for(var t=!1,n=0;n=0},t.prototype.getOrient=function(){return this.get(`orient`)===`vertical`?{index:1,name:`vertical`}:{index:0,name:`horizontal`}},t.type=`legend.plain`,t.dependencies=[`series`],t.defaultOption={z:4,show:!0,orient:`horizontal`,left:`center`,bottom:Z.size.m,align:`auto`,backgroundColor:Z.color.transparent,borderColor:Z.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:`inherit`,symbolKeepAspect:!0,inactiveColor:Z.color.disabled,inactiveBorderColor:Z.color.disabled,inactiveBorderWidth:`auto`,itemStyle:{color:`inherit`,opacity:`inherit`,borderColor:`inherit`,borderWidth:`auto`,borderCap:`inherit`,borderJoin:`inherit`,borderDashOffset:`inherit`,borderMiterLimit:`inherit`},lineStyle:{width:`auto`,color:`inherit`,inactiveColor:Z.color.disabled,inactiveWidth:2,opacity:`inherit`,type:`inherit`,cap:`inherit`,join:`inherit`,dashOffset:`inherit`,miterLimit:`inherit`},textStyle:{color:Z.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:`sans-serif`,color:Z.color.tertiary,borderWidth:1,borderColor:Z.color.border},emphasis:{selectorLabel:{show:!0,color:Z.color.quaternary}},selectorPosition:`auto`,selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t}(Eg),HN=Te,UN=z,WN=Ba,GN=function(e){w(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return t.prototype.init=function(){this.group.add(this._contentGroup=new WN),this.group.add(this._selectorGroup=new WN),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,t,n){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get(`show`,!0)){var i=e.get(`align`),a=e.get(`orient`);(!i||i===`auto`)&&(i=e.get(`left`)===`right`&&a===`vertical`?`right`:`left`);var o=e.get(`selector`,!0),s=e.get(`selectorPosition`,!0);o&&(!s||s===`auto`)&&(s=a===`horizontal`?`end`:`start`),this.renderInner(i,e,t,n,o,a,s);var c=yg(e,n).refContainer,l=e.getBoxLayoutParams(),u=e.get(`padding`),d=_g(l,c,u),f=this.layoutInner(e,i,d,r,o,s),p=_g(he({width:f.width,height:f.height},l),c,u);this.group.x=p.x-f.x,this.group.y=p.y-f.y,this.group.markRedraw(),this.group.add(this._backgroundEl=nN(f,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,r,i,a,o){var s=this.getContentGroup(),c=q(),l=t.get(`selectedMode`),u=t.get(`triggerEvent`),d=[];n.eachRawSeries(function(e){!e.get(`legendHoverLink`)&&d.push(e.id)}),UN(t.getData(),function(i,a){var o=this,f=i.get(`name`);if(!this.newlineDisabled&&(f===``||f===` `)){var p=new WN;p.newline=!0,s.add(p)}else{var m=n.getSeriesByName(f)[0];if(!c.get(f)){if(m){var h=m.getData(),g=h.getVisual(`legendLineStyle`)||{},_=h.getVisual(`legendIcon`),v=h.getVisual(`style`),y=this._createItem(m,f,a,i,t,e,g,v,_,l,r);y.on(`click`,HN(JN,f,null,r,d)).on(`mouseover`,HN(YN,m.name,null,r,d)).on(`mouseout`,HN(XN,m.name,null,r,d)),n.ssr&&y.eachChild(function(e){var t=Cu(e);t.seriesIndex=m.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&y.eachChild(function(e){o.packEventData(e,t,m,a,f)}),c.set(f,!0)}else n.eachRawSeries(function(o){var s=this;if(!c.get(f)&&o.legendVisualProvider){var p=o.legendVisualProvider;if(!p.containName(f))return;var m=p.indexOfName(f),h=p.getItemVisual(m,`style`),g=p.getItemVisual(m,`legendIcon`),_=Hr(h.fill);_&&_[3]===0&&(_[3]=.2,h=R(R({},h),{fill:Xr(_,`rgba`)}));var v=this._createItem(o,f,a,i,t,e,{},h,g,l,r);v.on(`click`,HN(JN,null,f,r,d)).on(`mouseover`,HN(YN,null,f,r,d)).on(`mouseout`,HN(XN,null,f,r,d)),n.ssr&&v.eachChild(function(e){var t=Cu(e);t.seriesIndex=o.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&v.eachChild(function(e){s.packEventData(e,t,o,a,f)}),c.set(f,!0)}},this)}}},this),i&&this._createSelector(i,t,r,a,o)},t.prototype.packEventData=function(e,t,n,r,i){var a={componentType:`legend`,componentIndex:t.componentIndex,dataIndex:r,value:i,seriesIndex:n.seriesIndex};Cu(e).eventData=a},t.prototype._createSelector=function(e,t,n,r,i){var a=this.getSelectorGroup();UN(e,function(e){var r=e.type,i=new lu({style:{x:0,y:0,align:`center`,verticalAlign:`middle`},onclick:function(){n.dispatchAction({type:r===`all`?`legendAllSelect`:`legendInverseSelect`,legendId:t.id})}});a.add(i),_m(i,{normal:t.getModel(`selectorLabel`),emphasis:t.getModel([`emphasis`,`selectorLabel`])},{defaultText:e.title}),Ad(i)})},t.prototype._createItem=function(e,t,n,r,i,a,o,s,c,l,u){var d=e.visualDrawType,f=i.get(`itemWidth`),p=i.get(`itemHeight`),m=i.isSelected(t),h=r.get(`symbolRotate`),g=r.get(`symbolKeepAspect`),_=r.get(`icon`);c=_||c||`roundRect`;var v=KN(c,r,o,s,d,m,u),y=new WN,b=r.getModel(`textStyle`);if(U(e.getLegendIcon)&&(!_||_===`inherit`))y.add(e.getLegendIcon({itemWidth:f,itemHeight:p,icon:c,iconRotate:h,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}));else{var x=_===`inherit`&&e.getData().getVisual(`symbol`)?h===`inherit`?e.getData().getVisual(`symbolRotate`):h:0;y.add(qN({itemWidth:f,itemHeight:p,icon:c,iconRotate:x,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}))}var S=a===`left`?f+5:-5,C=a,w=i.get(`formatter`),T=t;W(w)&&w?T=w.replace(`{name}`,t??``):U(w)&&(T=w(t));var E=m?b.getTextColor():r.get(`inactiveColor`);y.add(new lu({style:ym(b,{text:T,x:S,y:p/2,fill:E,align:C,verticalAlign:`middle`},{inheritColor:E})}));var D=new iu({shape:y.getBoundingRect(),style:{fill:`transparent`}}),O=r.getModel(`tooltip`);return O.get(`show`)&&$p({el:D,componentModel:i,itemName:t,itemTooltipOption:O.option}),y.add(D),y.eachChild(function(e){e.silent=!0}),D.silent=!l,this.getContentGroup().add(y),Ad(y),y.__legendDataIndex=n,y},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getContentGroup(),s=this.getSelectorGroup();pg(e.get(`orient`),o,e.get(`itemGap`),n.width,n.height);var c=o.getBoundingRect(),l=[-c.x,-c.y];if(s.markRedraw(),o.markRedraw(),i){pg(`horizontal`,s,e.get(`selectorItemGap`,!0));var u=s.getBoundingRect(),d=[-u.x,-u.y],f=e.get(`selectorButtonGap`,!0),p=e.getOrient().index,m=p===0?`width`:`height`,h=p===0?`height`:`width`,g=p===0?`y`:`x`;a===`end`?d[p]+=c[m]+f:l[p]+=u[m]+f,d[1-p]+=c[h]/2-u[h]/2,s.x=d[0],s.y=d[1],o.x=l[0],o.y=l[1];var _={x:0,y:0};return _[m]=c[m]+f+u[m],_[h]=Math.max(c[h],u[h]),_[g]=Math.min(0,u[g]+d[1-p]),_}return o.x=l[0],o.y=l[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type=`legend.plain`,t}(Fy);function KN(e,t,n,r,i,a,o){function s(e,t){e.lineWidth===`auto`&&(e.lineWidth=t.lineWidth>0?2:0),UN(e,function(n,r){e[r]===`inherit`&&(e[r]=t[r])})}var c=t.getModel(`itemStyle`),l=c.getItemStyle(),u=e.lastIndexOf(`empty`,0)===0?`fill`:`stroke`,d=c.getShallow(`decal`);l.decal=!d||d===`inherit`?r.decal:Yx(d,o),l.fill===`inherit`&&(l.fill=r[i]),l.stroke===`inherit`&&(l.stroke=r[u]),l.opacity===`inherit`&&(l.opacity=(i===`fill`?r:n).opacity),s(l,r);var f=t.getModel(`lineStyle`),p=f.getLineStyle();if(s(p,n),l.fill===`auto`&&(l.fill=r.fill),l.stroke===`auto`&&(l.stroke=r.fill),p.stroke===`auto`&&(p.stroke=r.fill),!a){var m=t.get(`inactiveBorderWidth`),h=l[u];l.lineWidth=m===`auto`?r.lineWidth>0&&h?2:0:l.lineWidth,l.fill=t.get(`inactiveColor`),l.stroke=t.get(`inactiveBorderColor`),p.stroke=f.get(`inactiveColor`),p.lineWidth=f.get(`inactiveWidth`)}return{itemStyle:l,lineStyle:p}}function qN(e){var t=e.icon||`roundRect`,n=ax(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf(`empty`)>-1&&(n.style.stroke=n.style.fill,n.style.fill=Z.color.neutral00,n.style.lineWidth=2),n}function JN(e,t,n,r){XN(e,t,n,r),n.dispatchAction({type:`legendToggleSelect`,name:e??t}),YN(e,t,n,r)}function YN(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`highlight`,seriesName:e,name:t,excludeSeriesId:r})}function XN(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`downplay`,seriesName:e,name:t,excludeSeriesId:r})}function ZN(e,t,n){var r=e===`allSelect`||e===`inverseSelect`,i={},a=[];n.eachComponent({mainType:`legend`,query:t},function(n){r?n[e]():n[e](t.name),QN(n,i),a.push(n.componentIndex)});var o={};return n.eachComponent(`legend`,function(e){z(i,function(t,n){e[t?`select`:`unSelect`](n)}),QN(e,o)}),r?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function QN(e,t){var n=t||{};return z(e.getData(),function(t){var r=t.get(`name`);if(r!==` `&&r!==``){var i=e.isSelected(r);n[r]=Xe(n,r)?n[r]&&i:i}}),n}function $N(e){e.registerAction(`legendToggleSelect`,`legendselectchanged`,Te(ZN,`toggleSelected`)),e.registerAction(`legendAllSelect`,`legendselectall`,Te(ZN,`allSelect`)),e.registerAction(`legendInverseSelect`,`legendinverseselect`,Te(ZN,`inverseSelect`)),e.registerAction(`legendSelect`,`legendselected`,Te(ZN,`select`)),e.registerAction(`legendUnSelect`,`legendunselected`,Te(ZN,`unSelect`))}var eP=Vs(tP);function tP(e){var t=e.findComponents({mainType:`legend`});t&&t.length&&e.filterSeries(function(e){for(var n=0;nn[i],m=[-d.x,-d.y];t||(m[r]=c[s]);var h=[0,0],g=[-f.x,-f.y],_=K(e.get(`pageButtonGap`,!0),e.get(`itemGap`,!0));p&&(e.get(`pageButtonPosition`,!0)===`end`?g[r]+=n[i]-f[i]:h[r]+=f[i]+_),g[1-r]+=d[a]/2-f[a]/2,c.setPosition(m),l.setPosition(h),u.setPosition(g);var v={x:0,y:0};if(v[i]=p?n[i]:d[i],v[a]=Math.max(d[a],f[a]),v[o]=Math.min(0,f[o]+g[1-r]),l.__rectSize=n[i],p){var y={x:0,y:0};y[i]=Math.max(n[i]-f[i]-_,0),y[a]=v[a],l.setClipPath(new iu({shape:y})),l.__rectSize=y[i]}else u.eachChild(function(e){e.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(e);return b.pageIndex!=null&&pp(c,{x:b.contentPosition[0],y:b.contentPosition[1]},p?e:null),this._updatePageInfoView(e,b),v},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];r!=null&&n.dispatchAction({type:`legendScroll`,scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;z([`pagePrev`,`pageNext`],function(r){var i=t[r+`DataIndex`]!=null,a=n.childOfName(r);a&&(a.setStyle(`fill`,i?e.get(`pageIconColor`,!0):e.get(`pageIconInactiveColor`,!0)),a.cursor=i?`pointer`:`default`)});var r=n.childOfName(`pageText`),i=e.get(`pageFormatter`),a=t.pageIndex,o=a==null?0:a+1,s=t.pageCount;r&&i&&r.setStyle(`text`,W(i)?i.replace(`{current}`,o==null?``:o+``).replace(`{total}`,s==null?``:s+``):i({current:o,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get(`scrollDataIndex`,!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,a=oP[i],o=sP[i],s=this._findTargetItemIndex(t),c=n.children(),l=c[s],u=c.length,d=+!!u,f={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!l)return f;var p=v(l);f.contentPosition[i]=-p.s;for(var m=s+1,h=p,g=p,_=null;m<=u;++m)_=v(c[m]),(!_&&g.e>h.s+r||_&&!y(_,h.s))&&(h=g.i>h.i?g:_,h&&(f.pageNextDataIndex??=h.i,++f.pageCount)),g=_;for(var m=s-1,h=p,g=p,_=null;m>=-1;--m)_=v(c[m]),(!_||!y(g,_.s))&&h.i=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var t,n=this.getContentGroup(),r;return n.eachChild(function(n,i){var a=n.__legendDataIndex;r==null&&a!=null&&(r=i),a===e&&(t=i)}),t??r},t.type=`legend.scroll`,t}(GN);function lP(e){e.registerAction(`legendScroll`,`legendscroll`,function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:`legend`,subType:`scroll`,query:e},function(e){e.setScrollDataIndex(n)})})}function uP(e){DE(nP),e.registerComponentModel(rP),e.registerComponentView(cP),lP(e)}function dP(e){DE(nP),DE(uP)}var fP=function(e){w(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`dataZoom.inside`,t.defaultOption=Gm(JM.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(JM),pP=fs();function mP(e,t,n){pP(e).coordSysRecordMap.each(function(e){var r=e.dataZoomInfoMap.get(t.uid);r&&(r.getRange=n)})}function hP(e,t){for(var n=pP(e).coordSysRecordMap,r=n.keys(),i=0;ia[i+r]&&(r=n),o&&=t.get(`preventDefaultMouseMove`,!0),s=K(t.get(`cursorGrab`,!0),s),c=K(t.get(`cursorGrabbing`,!0),c)}),{controlType:r,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:n,zInfo:{component:t.model},triggerInfo:{roamTrigger:null,isInSelf:t.containsPoint},cursorGrab:s,cursorGrabbing:c}}}function xP(e){e.registerUpdateLifecycle(`coordsys:aftercreate`,function(e,t){var n=pP(t),r=n.coordSysRecordMap||=q();r.each(function(e){e.dataZoomInfoMap=null}),e.eachComponent({mainType:`dataZoom`,subType:`inside`},function(e){z(HM(e).infoList,function(n){var i=n.model.uid,a=r.get(i)||r.set(i,_P(t,n.model));(a.dataZoomInfoMap||=q()).set(e.uid,{dzReferCoordSysInfo:n,model:e,getRange:null})})}),r.each(function(e){var n=e.controller,i,a=e.dataZoomInfoMap;if(a){var o=a.keys()[0];o!=null&&(i=a.get(o))}if(!i)gP(r,e);else{var s=bP(a,e,t);n.enable(s.controlType,s.opt),Yy(e,`dispatchAction`,i.model.get(`throttle`,!0),`fixRate`)}})})}var SP=function(e){w(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`dataZoom.inside`,t}return t.prototype.render=function(t,n,r){e.prototype.render.apply(this,arguments),t.noTarget()?this._clear():(this.range=t.getPercentRange(),mP(r,t,{pan:V(CP.pan,this),zoom:V(CP.zoom,this),scrollMove:V(CP.scrollMove,this)}))},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){hP(this.api,this.dataZoomModel),this.range=null},t.type=`dataZoom.inside`,t}(XM),CP={zoom:function(e,t,n,r){var i=this.range,a=i.slice(),o=e.axisModels[0];if(o){var s=TP[t](null,[r.originX,r.originY],o,n,e),c=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],l=Math.max(1/r.scale,0);a[0]=(a[0]-c)*l+c,a[1]=(a[1]-c)*l+c;var u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(jj(0,a,[0,100],0,u.minSpan,u.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:wP(function(e,t,n,r,i,a){var o=TP[r]([a.oldX,a.oldY],[a.newX,a.newY],t,i,n);return o.signal*(e[1]-e[0])*o.pixel/o.pixelLength}),scrollMove:wP(function(e,t,n,r,i,a){return TP[r]([0,0],[a.scrollDelta,a.scrollDelta],t,i,n).signal*(e[1]-e[0])*a.scrollDelta})};function wP(e){return function(t,n,r,i){var a=this.range,o=a.slice(),s=t.axisModels[0];if(s&&(jj(e(o,s,t,n,r,i),o,[0,100],`all`),this.range=o,a[0]!==o[0]||a[1]!==o[1]))return o}}var TP={grid:function(e,t,n,r,i){var a=n.axis,o={},s=i.model.coordinateSystem.getRect();return e||=[0,0],a.dim===`x`?(o.pixel=t[0]-e[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(e,t,n,r,i){var a=n.axis,o={},s=i.model.coordinateSystem,c=s.getRadiusAxis().getExtent(),l=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),n.mainType===`radiusAxis`?(o.pixel=t[0]-e[0],o.pixelLength=c[1]-c[0],o.pixelStart=c[0],o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?-1:1),o},singleAxis:function(e,t,n,r,i){var a=n.axis,o=i.model.coordinateSystem.getRect(),s={};return e||=[0,0],a.orient===`horizontal`?(s.pixel=t[0]-e[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};function EP(e){tN(e),e.registerComponentModel(fP),e.registerComponentView(SP),xP(e)}var DP=function(e){w(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`dataZoom.slider`,t.layoutMode=`box`,t.defaultOption=Gm(JM.defaultOption,{show:!0,right:`ph`,top:`ph`,width:`ph`,height:`ph`,left:null,bottom:null,borderColor:Z.color.accent10,borderRadius:0,backgroundColor:Z.color.transparent,dataBackground:{lineStyle:{color:Z.color.accent30,width:.5},areaStyle:{color:Z.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:Z.color.accent40,width:.5},areaStyle:{color:Z.color.accent20,opacity:.3}},fillerColor:`rgba(135,175,274,0.2)`,handleIcon:`path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z`,handleSize:`100%`,handleStyle:{color:Z.color.neutral00,borderColor:Z.color.accent20},moveHandleSize:7,moveHandleIcon:`path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z`,moveHandleStyle:{color:Z.color.accent40,opacity:.5},showDetail:!0,showDataShadow:`auto`,realtime:!0,zoomLock:!1,textStyle:{color:Z.color.tertiary},brushSelect:!0,brushStyle:{color:Z.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:Z.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),t}(JM),OP=iu,kP=1,AP=30,jP=7,MP=`horizontal`,NP=`vertical`,PP=5,FP=[`line`,`bar`,`candlestick`,`scatter`],IP={easing:`cubicOut`,duration:100,delay:0},LP=function(e){w(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._displayables={},n}return t.prototype.init=function(e,t){this.api=t,this._onBrush=V(this._onBrush,this),this._onBrushEnd=V(this._onBrushEnd,this)},t.prototype.render=function(t,n,r,i){e.prototype.render.apply(this,arguments),Yy(this,`_dispatchZoomAction`,t.get(`throttle`),`fixRate`),this._orient=t.getOrient(),t.get(`show`)===!1?this.group.removeAll():t.noTarget()?(this._clear(),this.group.removeAll()):((!i||i.type!==`dataZoom`||i.from!==this.uid)&&this._buildView(),this._updateView())},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){Xy(this,`_dispatchZoomAction`);var e=this.api.getZr();e.off(`mousemove`,this._onBrush),e.off(`mouseup`,this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var t=this._displayables.sliderGroup=new Ba;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(t),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,t=this.api,n=e.get(`brushSelect`)?jP:0,r=yg(e,t).refContainer,i=this._findCoordRect(),a=e.get(`defaultLocationEdgeGap`,!0)||0,o=this._orient===MP?{right:r.width-i.x-i.width,top:r.height-AP-a-n,width:i.width,height:AP}:{right:a,top:i.y,width:AP,height:i.height},s=Cg(e.option);z([`right`,`top`,`width`,`height`],function(e){s[e]===`ph`&&(s[e]=o[e])});var c=_g(s,r);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===NP&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,t=this._location,n=this._orient,r=this.dataZoomModel.getFirstTargetAxisModel(),i=r&&r.get(`inverse`),a=this._displayables.sliderGroup,o=(this._dataShadowInfo||{}).otherAxisInverse;a.attr(n===MP&&!i?{scaleY:o?1:-1,scaleX:1}:n===MP&&i?{scaleY:o?1:-1,scaleX:-1}:n===NP&&!i?{scaleY:o?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:o?-1:1,scaleX:-1,rotation:Math.PI/2});var s=e.getBoundingRect([a]),c=isNaN(s.x)?0:s.x,l=isNaN(s.y)?0:s.y;e.x=t.x-c,e.y=t.y-l,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,t=this._size,n=this._displayables.sliderGroup,r=e.get(`brushSelect`);n.add(new OP({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get(`backgroundColor`)},z2:-40}));var i=new OP({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:`transparent`},z2:0,onclick:V(this._onClickPanel,this)}),a=this.api.getZr();r?(i.on(`mousedown`,this._onBrushStart,this),i.cursor=`crosshair`,a.on(`mousemove`,this._onBrush),a.on(`mouseup`,this._onBrushEnd)):(a.off(`mousemove`,this._onBrush),a.off(`mouseup`,this._onBrushEnd)),n.add(i)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!e)return;var t=this._size,n=this._shadowSize||[],r=e.series,i=r.getRawData(),a=r.getShadowDim&&r.getShadowDim(),o=a&&i.getDimensionInfo(a)?r.getShadowDim():e.otherDim;if(o==null)return;var s=this._shadowPolygonPts,c=this._shadowPolylinePts;if(i!==this._shadowData||o!==this._shadowDim||t[0]!==n[0]||t[1]!==n[1]){var l=i.getDataExtent(e.thisDim),u=i.getDataExtent(o),d=(u[1]-u[0])*.3;u=[u[0]-d,u[1]+d];var f=[0,t[1]],p=[0,t[0]],m=[[t[0],0],[0,0]],h=[],g=p[1]/Math.max(1,i.count()-1),_=t[0]/(l[1]-l[0]),v=e.thisAxis.type===`time`,y=-g,b=Math.round(i.count()/t[0]),x;i.each([e.thisDim,o],function(e,t,n){if(b>0&&n%b)v||(y+=g);else{y=v?(+e-l[0])*_:y+g;var r=t==null||isNaN(t)||t===``,i=r?0:co(t,u,f,!0);r&&!x&&n?(m.push([m[m.length-1][0],0]),h.push([h[h.length-1][0],0])):!r&&x&&(m.push([y,0]),h.push([y,0])),r||(m.push([y,i]),h.push([y,i])),x=r}}),s=this._shadowPolygonPts=m,c=this._shadowPolylinePts=h}this._shadowData=i,this._shadowDim=o,this._shadowSize=[t[0],t[1]];var S=this.dataZoomModel;function C(e){var t=S.getModel(e?`selectedDataBackground`:`dataBackground`),n=new Ba,r=new Rf({shape:{points:s},segmentIgnoreThreshold:1,style:t.getModel(`areaStyle`).getAreaStyle(),silent:!0,z2:-20}),i=new Bf({shape:{points:c},segmentIgnoreThreshold:1,style:t.getModel(`lineStyle`).getLineStyle(),silent:!0,z2:-19});return n.add(r),n.add(i),n}for(var w=0;w<3;w++){var T=C(w===1);this._displayables.sliderGroup.add(T),this._displayables.dataShadowSegs.push(T)}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,t=e.get(`showDataShadow`);if(t!==!1){var n,r=this.ecModel;return e.eachTargetAxis(function(i,a){z(e.getAxisProxy(i,a).getTargetSeriesModels(),function(e){if(!n&&!(t!==!0&&ge(FP,e.get(`type`))<0)){var o=r.getComponent(BM(i),a).axis,s=zP(i),c,l=e.coordinateSystem;s!=null&&l.getOtherAxis&&(c=l.getOtherAxis(o).inverse),s=e.getData().mapDimension(s),n={thisAxis:o,series:e,thisDim:e.getData().mapDimension(i),otherDim:s,otherAxisInverse:c}}},this)},this),n}},t.prototype._renderHandle=function(){var e=this.group,t=this._displayables,n=t.handles=[null,null],r=t.handleLabels=[null,null],i=this._displayables.sliderGroup,a=this._size,o=this.dataZoomModel,s=this.api,c=o.get(`borderRadius`)||0,l=o.get(`brushSelect`),u=t.filler=new OP({silent:l,style:{fill:o.get(`fillerColor`)},textConfig:{position:`inside`}});i.add(u),i.add(new OP({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:a[0],height:a[1],r:c},style:{stroke:o.get(`dataBackgroundColor`)||o.get(`borderColor`),lineWidth:kP,fill:Z.color.transparent}})),z([0,1],function(t){var a=o.get(`handleIcon`);!nx[a]&&a.indexOf(`path://`)<0&&a.indexOf(`image://`)<0&&(a=`path://`+a);var s=ax(a,-1,0,2,2,null,!0);s.attr({cursor:BP(this._orient),draggable:!0,drift:V(this._onDragMove,this,t),ondragend:V(this._onDragEnd,this),onmouseover:V(this._onOverDataInfoTriggerArea,this,!0),onmouseout:V(this._onOverDataInfoTriggerArea,this,!1),z2:5});var c=s.getBoundingRect(),l=o.get(`handleSize`);this._handleHeight=lo(l,this._size[1]),this._handleWidth=c.width/c.height*this._handleHeight,s.setStyle(o.getModel(`handleStyle`).getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState(`emphasis`).style=o.getModel([`emphasis`,`handleStyle`]).getItemStyle(),Ad(s);var u=o.get(`handleColor`);u!=null&&(s.style.fill=u),i.add(n[t]=s);var d=o.getModel(`textStyle`),f=(o.get(`handleLabel`)||{}).show||!1;e.add(r[t]=new lu({silent:!0,invisible:!f,style:ym(d,{x:0,y:0,text:``,verticalAlign:`middle`,align:`center`,fill:d.getTextColor(),font:d.getFont()}),z2:10}))},this);var d=u;if(l){var f=lo(o.get(`moveHandleSize`),a[1]),p=t.moveHandle=new iu({style:o.getModel(`moveHandleStyle`).getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:a[1]-.5,height:f}}),m=f*.8,h=t.moveHandleIcon=ax(o.get(`moveHandleIcon`),-m/2,-m/2,m,m,Z.color.neutral00,!0);h.silent=!0,h.y=a[1]+f/2-.5,p.ensureState(`emphasis`).style=o.getModel([`emphasis`,`moveHandleStyle`]).getItemStyle();var g=Math.min(a[1]/2,Math.max(f,10));d=t.moveZone=new iu({invisible:!0,shape:{y:a[1]-g,height:f+g}}),d.on(`mouseover`,function(){s.enterEmphasis(p)}).on(`mouseout`,function(){s.leaveEmphasis(p)}),i.add(p),i.add(h),i.add(d)}d.attr({draggable:!0,cursor:`grab`,drift:V(this._onActualMoveZoneDrift,this),ondragstart:V(this._onActualMoveZoneDragStart,this),ondragend:V(this._onActualMoveZoneDragEnd,this),onmouseover:V(this._onOverDataInfoTriggerArea,this,!0),onmouseout:V(this._onOverDataInfoTriggerArea,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[co(e[0],[0,100],t,!0),co(e[1],[0,100],t,!0)]},t.prototype._updateInterval=function(e,t){var n=this.dataZoomModel,r=this._handleEnds,i=this._getViewExtent(),a=n.findRepresentativeAxisProxy().getMinMaxSpan(),o=[0,100];jj(t,r,i,n.get(`zoomLock`)?`all`:e,a.minSpan==null?null:co(a.minSpan,o,i,!0),a.maxSpan==null?null:co(a.maxSpan,o,i,!0));var s=this._range,c=this._range=ho([co(r[0],i,o,!0),co(r[1],i,o,!0)]);return!s||s[0]!==c[0]||s[1]!==c[1]},t.prototype._updateView=function(e){var t=this._displayables,n=this._handleEnds,r=ho(n.slice()),i=this._size;z([0,1],function(e){var r=t.handles[e],a=this._handleHeight;r.attr({scaleX:a/2,scaleY:a/2,x:n[e]+(e?-1:1),y:i[1]/2-a/2})},this),t.filler.setShape({x:r[0],y:0,width:r[1]-r[0],height:i[1]});var a={x:r[0],width:r[1]-r[0]};t.moveHandle&&(t.moveHandle.setShape(a),t.moveZone.setShape(a),t.moveZone.getBoundingRect(),t.moveHandleIcon&&t.moveHandleIcon.attr(`x`,a.x+a.width/2));for(var o=t.dataShadowSegs,s=[0,r[0],r[1],i[0]],c=0;ct[0]||n[1]<0||n[1]>t[1])){var r=this._handleEnds,i=(r[0]+r[1])/2,a=this._updateInterval(`all`,n[0]-i);this._updateView(),a&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var t=e.offsetX,n=e.offsetY;this._brushStart=new J(t,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var t=this._displayables.brushRect;if(this._brushing=!1,t){t.attr(`ignore`,!0);var n=t.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var r=this._getViewExtent(),i=[0,100],a=this._handleEnds=[n.x,n.x+n.width],o=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();jj(0,a,r,0,o.minSpan==null?null:co(o.minSpan,i,r,!0),o.maxSpan==null?null:co(o.maxSpan,i,r,!0)),this._range=ho([co(a[0],r,i,!0),co(a[1],r,i,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(Ut(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,t){var n=this._displayables,r=this.dataZoomModel,i=n.brushRect;i||(i=n.brushRect=new OP({silent:!0,style:r.getModel(`brushStyle`).getItemStyle()}),n.sliderGroup.add(i)),i.attr(`ignore`,!1);var a=this._brushStart,o=this._displayables.sliderGroup,s=o.transformCoordToLocal(e,t),c=o.transformCoordToLocal(a.x,a.y),l=this._size;s[0]=Math.max(Math.min(l[0],s[0]),0),i.setShape({x:c[0],y:0,width:s[0]-c[0],height:l[1]})},t.prototype._dispatchZoomAction=function(e){var t=this._range;this.api.dispatchAction({type:`dataZoom`,from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?IP:null,start:t[0],end:t[1]})},t.prototype._findCoordRect=function(){var e,t=HM(this.dataZoomModel).infoList;if(!e&&t.length){var n=t[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var r=this.api.getWidth(),i=this.api.getHeight();e={x:r*.2,y:i*.2,width:r*.6,height:i*.6}}return e},t.type=`dataZoom.slider`,t}(XM);function RP(e,t,n,r){var i=e.get(`labelFormatter`),a=e.get(`labelPrecision`);(a==null||a===`auto`)&&(a=n.valuePrecision);var o=n.value[t],s=o==null||isNaN(o)?``:Gw(r)||Uw(r)?r.getLabel({value:Math.round(o)}):isFinite(a)?mo(o,a,!0):o+``;return U(i)?i(o,s):W(i)?i.replace(`{value}`,s):s}function zP(e){return{x:`y`,y:`x`,radius:`angle`,angle:`radius`}[e]}function BP(e){return e===`vertical`?`ns-resize`:`ew-resize`}function VP(e){e.registerComponentModel(DP),e.registerComponentView(LP),tN(e)}function HP(e){DE(EP),DE(VP)}var UP={get:function(e,t,n){var r=I((WP[e]||{})[t]);return n&&H(r)?r[r.length-1]:r}},WP={color:{active:[`#006edd`,`#e0ffff`],inactive:[Z.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:[`circle`,`roundRect`,`diamond`],inactive:[`none`]},symbolSize:{active:[10,50],inactive:[0,0]}},GP=_j.mapVisual,KP=_j.eachVisual,qP=H,JP=z,YP=ho,XP=co,ZP=function(e){w(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.stateList=[`inRange`,`outOfRange`],n.replacableOptionKeys=[`inRange`,`outOfRange`,`target`,`controller`,`color`],n.layoutMode={type:`box`,ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&RN(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel(`textStyle`),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var t=this.stateList;e=V(e,this),this.controllerVisuals=LN(this.option.controller,t,e),this.targetVisuals=LN(this.option.target,t,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this,t=this.option.seriesTargets;if(t){var n=[];return JP(t,function(t){if(t.seriesIndex!=null)n.push(t.seriesIndex);else if(t.seriesId!=null){var r;e.ecModel.eachSeries(function(e){e.id===t.seriesId&&(r=e)}),r&&n.push(r.componentIndex)}}),n}var r=this.option.seriesId,i=this.option.seriesIndex;i==null&&r==null&&(i=`all`);var a=vs(this.ecModel,`series`,{index:i,id:r},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return B(a,function(e){return e.componentIndex})},t.prototype.eachTargetSeries=function(e,t){z(this.getTargetSeriesIndices(),function(n){var r=this.ecModel.getSeriesByIndex(n);r&&e.call(t,r)},this)},t.prototype.isTargetSeries=function(e){var t=!1;return this.eachTargetSeries(function(n){n===e&&(t=!0)}),t},t.prototype.formatValueText=function(e,t,n){var r=this.option,i=r.precision,a=this.dataBound,o=r.formatter,s;n||=[`<`,`>`],H(e)&&(e=e.slice(),s=!0);var c=t?e:s?[l(e[0]),l(e[1])]:l(e);return W(o)?o.replace(`{value}`,s?c[0]:c).replace(`{value2}`,s?c[1]:c):U(o)?s?o(e[0],e[1]):o(e):s?e[0]===a[0]?n[0]+` `+c[1]:e[1]===a[1]?n[1]+` `+c[0]:c[0]+` - `+c[1]:c;function l(e){return e===a[0]?`min`:e===a[1]?`max`:(+e).toFixed(Math.min(i,20))}},t.prototype.resetExtent=function(){var e=this.option,t=YP([e.min,e.max]);this._dataExtent=t},t.prototype.getDimension=function(e){var t=this,n=this.option.seriesTargets;if(n){var r=Se(n,function(n){return n.seriesIndex!=null&&n.seriesIndex===e||n.seriesId!=null&&n.seriesId===t.ecModel.getSeriesByIndex(e).id});if(r)return r.dimension}return this.option.dimension},t.prototype.getDataDimensionIndex=function(e){var t=e.hostModel.seriesIndex,n=this.getDimension(t);if(n!=null)return e.getDimensionIndex(n);for(var r=e.dimensions,i=r.length-1;i>=0;i--){var a=r[i],o=e.getDimensionInfo(a);if(!o.isCalculationCoord)return o.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,t=this.option,n={inRange:t.inRange,outOfRange:t.outOfRange},r=t.target||={},i=t.controller||={};L(r,n),L(i,n);var a=this.isCategory();o.call(this,r),o.call(this,i),s.call(this,r,`inRange`,`outOfRange`),c.call(this,i);function o(n){qP(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get(`gradientColor`)}}function s(e,t,n){var r=e[t],i=e[n];r&&!i&&(i=e[n]={},JP(r,function(e,t){if(_j.isValidType(t)){var n=UP.get(t,`inactive`,a);n!=null&&(i[t]=n,t===`color`&&!i.hasOwnProperty(`opacity`)&&!i.hasOwnProperty(`colorAlpha`)&&(i.opacity=[0,0]))}}))}function c(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,r=this.get(`inactiveColor`),i=this.getItemSymbol()||`roundRect`;JP(this.stateList,function(o){var s=this.itemSize,c=e[o];c||=e[o]={color:a?r:[r]},c.symbol??(c.symbol=t&&I(t)||(a?i:[i])),c.symbolSize??(c.symbolSize=n&&I(n)||(a?s[0]:[s[0],s[0]])),c.symbol=GP(c.symbol,function(e){return e===`none`?i:e});var l=c.symbolSize;if(l!=null){var u=-1/0;KP(l,function(e){e>u&&(u=e)}),c.symbolSize=GP(l,function(e){return XP(e,[0,u],[0,s[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get(`itemWidth`)),parseFloat(this.get(`itemHeight`))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type=`visualMap`,t.dependencies=[`series`],t.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:`vertical`,backgroundColor:Z.color.transparent,borderColor:Z.color.borderTint,contentColor:Z.color.theme[0],inactiveColor:Z.color.disabled,borderWidth:0,padding:Z.size.m,textGap:10,precision:0,textStyle:{color:Z.color.secondary}},t}(Eg),QP=[20,140],$P=function(e){w(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(e){e.mappingMethod=`linear`,e.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=QP[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=QP[1])},t.prototype._resetRange=function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):H(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),z(this.stateList,function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),t=ho((this.get(`range`)||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]=n[1]||e<=t[1])?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[];return this.eachTargetSeries(function(n){var r=[],i=n.getData();i.each(this.getDataDimensionIndex(i),function(t,n){e[0]<=t&&t<=e[1]&&r.push(n)},this),t.push({seriesId:n.id,dataIndex:r})},this),t},t.prototype.getVisualMeta=function(e){var t=eF(this,`outOfRange`,this.getExtent()),n=eF(this,`inRange`,this.option.range.slice()),r=[];function i(t,n){r.push({value:t,color:e(t,n)})}for(var a=0,o=0,s=n.length,c=t.length;oe[1])break;r.push({color:this.getControllerVisual(o,`color`,t),offset:a/n})}return r.push({color:this.getControllerVisual(e[1],`color`,t),offset:1}),r},t.prototype._createBarPoints=function(e,t){var n=this.visualMapModel.itemSize;return[[n[0]-t[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-t[1],e[1]]]},t.prototype._createBarGroup=function(e){var t=this._orient,n=this.visualMapModel.get(`inverse`);return new Ba(t===`horizontal`&&!n?{scaleX:e===`bottom`?1:-1,rotation:Math.PI/2}:t===`horizontal`&&n?{scaleX:e===`bottom`?-1:1,rotation:-Math.PI/2}:t===`vertical`&&!n?{scaleX:e===`left`?1:-1,scaleY:-1}:{scaleX:e===`left`?1:-1})},t.prototype._updateHandle=function(e,t){if(this._useHandle){var n=this._shapes,r=this.visualMapModel,i=n.handleThumbs,a=n.handleLabels,o=r.itemSize,s=r.getExtent(),c=this._applyTransform(`left`,n.mainGroup);oF([0,1],function(l){var u=i[l];u.setStyle(`fill`,t.handlesColor[l]),u.y=e[l];var d=aF(e[l],[0,o[1]],s,!0),f=this.getControllerVisual(d,`symbolSize`);u.scaleX=u.scaleY=f/o[0],u.x=o[0]-f/2;var p=Rp(n.handleLabelPoints[l],Lp(u,this.group));if(this._orient===`horizontal`){var m=c===`left`||c===`top`?(o[0]-f)/2:(o[0]-f)/-2;p[1]+=m}a[l].setStyle({x:p[0],y:p[1],text:r.formatValueText(this._dataInterval[l]),verticalAlign:`middle`,align:this._orient===`vertical`?this._applyTransform(`left`,n.mainGroup):`center`})},this)}},t.prototype._showIndicator=function(e,t,n,r){var i=this.visualMapModel,a=i.getExtent(),o=i.itemSize,s=[0,o[1]],c=this._shapes,l=c.indicator;if(l){l.attr(`invisible`,!1);var u=this.getControllerVisual(e,`color`,{convertOpacityToAlpha:!0}),d=this.getControllerVisual(e,`symbolSize`),f=aF(e,a,s,!0),p=o[0]-d/2,m={x:l.x,y:l.y};l.y=f,l.x=p;var h=Rp(c.indicatorLabelPoint,Lp(l,this.group)),g=c.indicatorLabel;g.attr(`invisible`,!1);var _=this._applyTransform(`left`,c.mainGroup),v=this._orient===`horizontal`;g.setStyle({text:(n||``)+i.formatValueText(t),verticalAlign:v?_:`middle`,align:v?`center`:_});var y={x:p,y:f,style:{fill:u}},b={style:{x:h[0],y:h[1]}};if(i.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var x={duration:100,easing:`cubicInOut`,additive:!0};l.x=m.x,l.y=m.y,l.animateTo(y,x),g.animateTo(b,x)}else l.attr(y),g.attr(b);this._firstShowIndicator=!1;var S=this._shapes.handleLabels;if(S)for(var C=0;Ci[1]&&(l[1]=1/0),t&&(l[0]===-1/0?this._showIndicator(c,l[1],`< `,o):l[1]===1/0?this._showIndicator(c,l[0],`> `,o):this._showIndicator(c,c,`≈ `,o));var u=this._hoverLinkDataIndices,d=[];(t||mF(n))&&(d=this._hoverLinkDataIndices=n.findTargetDataIndices(l));var f=us(u,d);this._dispatchHighDown(`downplay`,iF(f[0],n)),this._dispatchHighDown(`highlight`,iF(f[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var t;if(Rb(e.target,function(e){var n=Cu(e);if(n.dataIndex!=null)return t=n,!0},!0),t){var n=this.ecModel.getSeriesByIndex(t.seriesIndex),r=this.visualMapModel;if(r.isTargetSeries(n)){var i=n.getData(t.dataType),a=i.getStore().get(r.getDataDimensionIndex(i),t.dataIndex);isNaN(a)||this._showIndicator(a,a)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr(`invisible`,!0),e.indicatorLabel&&e.indicatorLabel.attr(`invisible`,!0);var t=this._shapes.handleLabels;if(t)for(var n=0;n=0&&(i.dimension=a,r.push(i))}}),e.getData().setVisual(`visualMeta`,r)}}];function yF(e,t,n,r){for(var i=t.targetVisuals[r],a=_j.prepareVisualTypes(i),o={color:Nb(e.getData(),`color`)},s=0,c=a.length;s0:e.splitNumber>0)||e.calculable)?`continuous`:`piecewise`}),e.registerAction(gF,_F),z(vF,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(xF))}function TF(e){e.registerComponentModel($P),e.registerComponentView(dF),wF(e)}var EF=function(e){w(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._pieceList=[],n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],DF[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var i=this.option.categories;this.resetVisual(function(e,t){r===`categories`?(e.mappingMethod=`category`,e.categories=I(i)):(e.dataExtent=this.getExtent(),e.mappingMethod=`piecewise`,e.pieceList=B(this._pieceList,function(e){return e=I(e),t!==`inRange`&&(e.visual=null),e}))})},t.prototype.completeVisualOption=function(){var t=this.option,n={},r=_j.listVisualTypes(),i=this.isCategory();z(t.pieces,function(e){z(r,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),z(n,function(e,n){var r=!1;z(this.stateList,function(e){r=r||a(t,e,n)||a(t.target,e,n)},this),!r&&z(this.stateList,function(e){(t[e]||(t[e]={}))[n]=UP.get(n,e===`inRange`?`active`:`inactive`,i)})},this);function a(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,t){var n=this.option,r=this._pieceList,i=(t?n:e).selected||{};if(n.selected=i,z(r,function(e,t){var n=this.getSelectedMapKey(e);i.hasOwnProperty(n)||(i[n]=!0)},this),n.selectedMode===`single`){var a=!1;z(r,function(e,t){var n=this.getSelectedMapKey(e);i[n]&&(a?i[n]=!1:a=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get(`itemSymbol`)},t.prototype.getSelectedMapKey=function(e){return this._mode===`categories`?e.value+``:e.index+``},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?`pieces`:this.option.categories?`categories`:`splitNumber`},t.prototype.setSelected=function(e){this.option.selected=I(e)},t.prototype.getValueState=function(e){var t=_j.findPieceIndex(e,this._pieceList);return t==null?`outOfRange`:this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[],n=this._pieceList;return this.eachTargetSeries(function(r){var i=[],a=r.getData();a.each(this.getDataDimensionIndex(a),function(t,r){_j.findPieceIndex(t,n)===e&&i.push(r)},this),t.push({seriesId:r.id,dataIndex:i})},this),t},t.prototype.getRepresentValue=function(e){var t;if(this.isCategory())t=e.value;else if(e.value!=null)t=e.value;else{var n=e.interval||[];t=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return t},t.prototype.getVisualMeta=function(e){if(this.isCategory())return;var t=[],n=[``,``],r=this;function i(i,a){var o=r.getRepresentValue({interval:i});a||=r.getValueState(o);var s=e(o,a);i[0]===-1/0?n[0]=s:i[1]===1/0?n[1]=s:t.push({value:i[0],color:s},{value:i[1],color:s})}var a=this._pieceList.slice();if(!a.length)a.push({interval:[-1/0,1/0]});else{var o=a[0].interval[0];o!==-1/0&&a.unshift({interval:[-1/0,o]}),o=a[a.length-1].interval[1],o!==1/0&&a.push({interval:[o,1/0]})}var s=-1/0;return z(a,function(e){var t=e.interval;t&&(t[0]>s&&i([s,t[0]],`outOfRange`),i(t.slice()),s=t[1])},this),{stops:t,outerColors:n}},t.type=`visualMap.piecewise`,t.defaultOption=Gm(ZP.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:`auto`,itemWidth:20,itemHeight:14,itemSymbol:`roundRect`,pieces:null,categories:null,splitNumber:5,selectedMode:`multiple`,itemGap:10,hoverLink:!0}),t}(ZP),DF={splitNumber:function(e){var t=this.option,n=Math.min(t.precision,20),r=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var a=(r[1]-r[0])/i;+a.toFixed(n)!==a&&n<5;)n++;t.precision=n,a=+a.toFixed(n),t.minOpen&&e.push({interval:[-1/0,r[0]],close:[0,0]});for(var o=0,s=r[0];o`,`≥`][t[0]]];e.text=e.text||this.formatValueText(e.value==null?e.interval:e.value,!1,n)},this)}};function OF(e,t){var n=e.inverse;(e.orient===`vertical`?!n:n)&&t.reverse()}var kF=function(e){w(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get(`textGap`),r=t.textStyleModel,i=this._getItemAlign(),a=t.itemSize,o=this._getViewData(),s=o.endsText,c=Pe(t.get(`showLabel`,!0),!s),l=!t.get(`selectedMode`);s&&this._renderEndsText(e,s[0],a,c,i),z(o.viewPieceList,function(o){var s=o.piece,u=new Ba;u.onclick=V(this._onItemClick,this,s),this._enableHoverLink(u,o.indexInModelPieceList);var d=t.getRepresentValue(s);if(this._createItemSymbol(u,d,[0,0,a[0],a[1]],l),c){var f=this.visualMapModel.getValueState(d),p=r.get(`align`)||i;u.add(new lu({style:ym(r,{x:p===`right`?-n:a[0]+n,y:a[1]/2,text:s.text,verticalAlign:r.get(`verticalAlign`)||`middle`,align:p,opacity:K(r.get(`opacity`),f===`outOfRange`?.5:1)}),silent:l}))}e.add(u)},this),s&&this._renderEndsText(e,s[1],a,c,i),pg(t.get(`orient`),e,t.get(`itemGap`)),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,t){var n=this;e.on(`mouseover`,function(){return r(`highlight`)}).on(`mouseout`,function(){return r(`downplay`)});var r=function(e){var r=n.visualMapModel;r.option.hoverLink&&n.api.dispatchAction({type:e,batch:iF(r.findTargetDataIndices(t),r)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if(t.orient===`vertical`)return rF(e,this.api,e.itemSize);var n=t.align;return(!n||n===`auto`)&&(n=`left`),n},t.prototype._renderEndsText=function(e,t,n,r,i){if(t){var a=new Ba,o=this.visualMapModel.textStyleModel;a.add(new lu({style:ym(o,{x:r?i===`right`?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:`middle`,align:r?i:`center`,text:t})})),e.add(a)}},t.prototype._getViewData=function(){var e=this.visualMapModel,t=B(e.getPieceList(),function(e,t){return{piece:e,indexInModelPieceList:t}}),n=e.get(`text`),r=e.get(`orient`),i=e.get(`inverse`);return(r===`horizontal`?i:!i)?t.reverse():n&&=n.slice().reverse(),{viewPieceList:t,endsText:n}},t.prototype._createItemSymbol=function(e,t,n,r){var i=ax(this.getControllerVisual(t,`symbol`),n[0],n[1],n[2],n[3],this.getControllerVisual(t,`color`));i.silent=r,e.add(i)},t.prototype._onItemClick=function(e){var t=this.visualMapModel,n=t.option,r=n.selectedMode;if(r){var i=I(n.selected),a=t.getSelectedMapKey(e);r===`single`||r===!0?(i[a]=!0,z(i,function(e,t){i[t]=t===a})):i[a]=!i[a],this.api.dispatchAction({type:`selectDataRange`,from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}},t.type=`visualMap.piecewise`,t}(tF);function AF(e){e.registerComponentModel(EF),e.registerComponentView(kF),wF(e)}function jF(e){DE(TF),DE(AF)}var MF={label:{enabled:!0},decal:{show:!1}},NF=fs(),PF=fs(),FF=Vs(IF);function IF(e,t){var n=e.getModel(`aria`);if(!n.get(`enabled`))return;var r=PF(e).scope||(PF(e).scope={}),i=I(MF);L(i.label,e.getLocaleModel().get(`aria`),!1),L(n.option,i,!1),a(),o();function a(){if(n.getModel(`decal`).get(`show`)){var t=q();e.eachSeries(function(e){e.isColorBySeries()||(NF(e).scope=t.get(e.type)||t.set(e.type,{}))}),e.eachSeries(function(t){if(U(t.enableAriaDecal)){t.enableAriaDecal();return}var n=t.getData();if(t.isColorBySeries()){var i=Xg(t.ecModel,t.name,r,e.getSeriesCount()),a=n.getVisual(`decal`);n.setVisual(`decal`,u(a,i))}else{var o=t.getRawData(),s={},c=NF(t).scope;n.each(function(e){var t=n.getRawIndex(e);s[t]=e});var l=o.count();o.each(function(e){var r=s[e],i=o.getName(e)||e+``,a=Xg(t.ecModel,i,c,l),d=n.getItemVisual(r,`decal`);n.setItemVisual(r,`decal`,u(d,a))})}function u(e,t){var n=e?R(R({},t),e):t;return n.dirty=!0,n}})}}function o(){var r=t.getZr().dom;if(r){var i=e.getLocaleModel().get(`aria`),a=n.getModel(`label`);if(a.option=he(a.option,i),a.get(`enabled`)){if(r.setAttribute(`role`,`img`),a.get(`description`))r.setAttribute(`aria-label`,a.get(`description`));else{var o=e.getSeriesCount(),u=a.get([`data`,`maxCount`])||10,d=a.get([`series`,`maxCount`])||10,f=Math.min(o,d),p;if(!(o<1)){var m=c();p=m?s(a.get([`general`,`withTitle`]),{title:m}):a.get([`general`,`withoutTitle`]);var h=[],g=o>1?a.get([`series`,`multiple`,`prefix`]):a.get([`series`,`single`,`prefix`]);p+=s(g,{seriesCount:o}),e.eachSeries(function(e,t){if(t1?a.get([`series`,`multiple`,r]):a.get([`series`,`single`,r]),n=s(n,{seriesId:e.seriesIndex,seriesName:e.get(`name`),seriesType:l(e.subType)});var i=e.getData();if(i.count()>u){var c=a.get([`data`,`partialData`]);n+=s(c,{displayCnt:u})}else n+=a.get([`data`,`allData`]);for(var d=a.get([`data`,`separator`,`middle`]),p=a.get([`data`,`separator`,`end`]),m=a.get([`data`,`excludeDimensionId`]),g=[],_=0;_=a}}}for(var l=VF(this),u=l.startIdx;u=0)&&(a=!0)}),a||i.__dirty){var o=n._opts.useDirtyRect&&!BF(i)?i.createRepaintRects(e,t,n._width,n._height):null,s=n._i.layerStack[0],c=!0;if(i.__dirty){c=!1,i.__dirty=!1;var l=i.zlevel===s.zl&&i.zlevel2===s.zl2?n._backgroundColor:null;i.clear(!1,l,o)}eI(i,function(t){var a=n._paintPerCursor(i,t,e,o,c);r&&=a})}},oI),E.wxa&&nI(this._i,function(e){e&&e.ctx&&e.ctx.draw&&e.ctx.draw()}),r},e.prototype._paintPerCursor=function(e,t,n,r,i){var a=e.ctx;if(r){if(!r.length)t.drawIdx=t.endIdx;else for(var o=this.dpr,s=0;s=t.endIdx},e.prototype._paintPerCursorInRect=function(e,t,n,r,i){for(var a={inHover:!1,allClipped:!1,prevEl:null,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{contentRetained:i}},o=e.ctx,s=BF(e),c=s&&N.getTime(),l=t.drawIdx,u=t.notClearIdx,d=u>=0?Math.min(u,l):l;d15){d++;break}}}Wx(o,a),t.drawIdx=Math.max(d,l)},e.prototype.getLayer=function(e,t){return this._ensureLayer(e,0,t)},e.prototype._ensureLayer=function(e,t,n){t||=0;var r=this._singleCanvas;r&&!this._needsManuallyCompositing&&(e=WF,t=0);var i=tI(this._i,e)[t];return i||(i=XF(`zr_`+e+`.`+t,this,e,t),this._layerConfig[e]&&L(i,this._layerConfig[e],!0),(n||r&&e!==WF)&&(i.virtual=!0),this._insertLayer(i,e,t,!1),i.initContext()),i},e.prototype.insertLayer=function(e,t){this._insertLayer(t,e,0,!1)},e.prototype._insertLayer=function(e,t,n,r){var i=this._i,a=i.layers,o=i.layerStack,s=this._domRoot,c=null;if(!(a[t]&&a[t][n])&&JF(e)){for(var l=o.length,u=0;u0&&(c=tI(i,o[u-1].zl)[o[u-1].zl2]),o.splice(u,0,{zl:t,zl2:n}),tI(i,t)[n]=e,!r&&!e.virtual){if(c){var d=c.dom;d.nextSibling?s.insertBefore(e.dom,d.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)}e.painter||=this}},e.prototype.eachLayer=function(e,t){return nI(this._i,function(n,r){e.call(t,n,r)})},e.prototype.eachBuiltinLayer=function(e,t){return nI(this._i,function(n,r){e.call(t,n,r)},rI)},e.prototype.eachOtherLayer=function(e,t){return nI(this._i,function(n,r){e.call(t,n,r)},iI)},e.prototype.getLayers=function(){var e={};return nI(this._i,function(t,n,r){e[t.id]=t}),e},e.prototype._updateLayerStatus=function(e,t){var n=this;if(n._singleCanvas)for(var r=1;r=0;a--){var o=i.get(r[a]);if(!o.used)t.__dirty=!0,i.removeKey(r[a]),r.splice(a,1);else{var s=o.endIdxNew;(BF(t)?s=0;r--){var i=t[r];if(i.zl===e){var a=n[e][i.zl2];if(a.__builtin__)continue;if(t.splice(r,1),n[e][i.zl2]=void 0,!a.virtual){var o=a.dom.parentNode;o&&o.removeChild(a.dom)}}}},e.prototype.resize=function(e,t){if(this._domRoot.style){var n=this._domRoot;n.style.display=`none`;var r=this._opts,i=this.root;e!=null&&(r.width=e),t!=null&&(r.height=t),e=mx(i,0,r),t=mx(i,1,r),n.style.display=``,(this._width!==e||t!==this._height)&&(n.style.width=e+`px`,n.style.height=t+`px`,nI(this._i,function(n){n.resize(e,t)}),this.refresh({paintAll:!0})),this._width=e,this._height=t}else{if(e==null||t==null)return;this._width=e,this._height=t,this._ensureLayer(WF).resize(e,t)}return this},e.prototype.clearLayer=function(e){z(this._i.layers[e],function(e){e&&!e.__builtin__&&e.clear()})},e.prototype.dispose=function(){this.root.innerHTML=``,this.root=this.storage=this._domRoot=this._i=null},e.prototype.getRenderedCanvas=function(e){if(e||={},this._singleCanvas&&!this._compositeManually)return this._i.layers[WF][0].dom;var t=new HF(`image`,this,e.pixelRatio||this.dpr);t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor);var n=t.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var r=t.dom.width,i=t.dom.height;nI(this._i,function(e){e.__builtin__?n.drawImage(e.dom,0,0,r,i):e.renderToCanvas&&(n.save(),e.renderToCanvas(n),n.restore())})}else{for(var a={inHover:!1,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},o=this.storage.getDisplayList(!0),s=0,c=o.length;swindow.matchMedia(`(prefers-reduced-motion: reduce)`).matches);return(0,d.useEffect)(()=>{let e=window.matchMedia(`(prefers-reduced-motion: reduce)`),n=()=>t(e.matches);return e.addEventListener(`change`,n),()=>e.removeEventListener(`change`,n)},[]),e}function uI(e,t,n=900){let[r,i]=(0,d.useState)(0),a=(0,d.useRef)(0);return(0,d.useEffect)(()=>{if(t){i(e),a.current=e;return}let r=a.current,o=performance.now(),s=0,c=t=>{let l=Math.min(1,(t-o)/n),u=1-(1-l)**3;i(Math.round(r+(e-r)*u)),l<1?s=requestAnimationFrame(c):a.current=e};return s=requestAnimationFrame(c),()=>{cancelAnimationFrame(s),a.current=e}},[e,t,n]),r}function dI(e,t,n){let r=(0,d.useRef)(null),i=(0,d.useRef)(null),a=(0,d.useRef)(n);return a.current=n,(0,d.useEffect)(()=>{let e=hC(r.current,null,{renderer:`canvas`});i.current=e,e.on(`click`,e=>a.current&&a.current(e));let t=new ResizeObserver(()=>e.resize());return t.observe(r.current),()=>{t.disconnect(),e.dispose()}},[]),(0,d.useEffect)(()=>{i.current&&e&&i.current.setOption({animation:!t,...e},!0)},[e,t]),r}function fI(e,t,n=!0){let r=(0,d.useRef)(t);r.current=t,(0,d.useEffect)(()=>{if(!n)return;let t=t=>{t.key===e&&r.current(t)};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[e,n])}var pI=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),$=t(((e,t)=>{t.exports=pI()}))(),mI=` attribute vec2 p; void main() { gl_Position = vec4(p, 0.0, 1.0); } `,hI=` precision mediump float; uniform vec2 res; uniform float t; float hash(vec2 p) { return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453); } float noise(vec2 p) { vec2 i = floor(p), f = fract(p); vec2 u = f * f * (3.0 - 2.0 * f); return mix(mix(hash(i), hash(i + vec2(1, 0)), u.x), mix(hash(i + vec2(0, 1)), hash(i + vec2(1, 1)), u.x), u.y); } float fbm(vec2 p) { float v = 0.0, a = 0.5; for (int i = 0; i < 5; i++) { v += a * noise(p); p = p * 2.03 + vec2(1.7, 9.2); a *= 0.5; } return v; } void main() { vec2 uv = gl_FragCoord.xy / res.xy; vec2 p = uv * vec2(res.x / res.y, 1.0) * 1.6; float s = t * 0.035; vec2 q = vec2(fbm(p + s), fbm(p + vec2(5.2, 1.3) - s)); vec2 r = vec2(fbm(p + 3.0 * q + vec2(1.7, 9.2) + s * 1.3), fbm(p + 3.0 * q + vec2(8.3, 2.8) - s)); float f = fbm(p + 2.6 * r); vec3 ink = vec3(0.035, 0.045, 0.085); vec3 wine = vec3(0.22, 0.04, 0.07); vec3 amber = vec3(0.91, 0.62, 0.26); vec3 col = mix(ink, wine, smoothstep(0.1, 0.9, uv.x * 0.6 + uv.y * 0.2 + q.x * 0.5)); float glow = smoothstep(0.55, 0.95, f) * (0.55 + 0.45 * r.y); col += amber * glow * 0.42; col += vec3(1.0, 0.85, 0.6) * pow(glow, 3.0) * 0.18; float vig = smoothstep(1.25, 0.25, length(uv - vec2(0.5, 0.45))); col *= 0.55 + 0.45 * vig; gl_FragColor = vec4(col, 1.0); } `;function gI(e,t){let n=e.getContext(`webgl`,{antialias:!1,premultipliedAlpha:!1});if(!n)return null;let r=(e,t)=>{let r=n.createShader(e);return n.shaderSource(r,t),n.compileShader(r),r},i=n.createProgram();if(n.attachShader(i,r(n.VERTEX_SHADER,mI)),n.attachShader(i,r(n.FRAGMENT_SHADER,hI)),n.linkProgram(i),!n.getProgramParameter(i,n.LINK_STATUS))return null;n.useProgram(i);let a=n.createBuffer();n.bindBuffer(n.ARRAY_BUFFER,a),n.bufferData(n.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,1,1]),n.STATIC_DRAW);let o=n.getAttribLocation(i,`p`);n.enableVertexAttribArray(o),n.vertexAttribPointer(o,2,n.FLOAT,!1,0,0);let s=n.getUniformLocation(i,`res`),c=n.getUniformLocation(i,`t`),l=()=>{e.width=Math.ceil(window.innerWidth/2),e.height=Math.ceil(window.innerHeight/2),n.viewport(0,0,e.width,e.height)};l(),window.addEventListener(`resize`,l);let u=0,d=performance.now()-4e4,f=()=>{n.uniform2f(s,e.width,e.height),n.uniform1f(c,(performance.now()-d)/1e3),n.drawArrays(n.TRIANGLE_STRIP,0,4),!t&&!document.hidden&&(u=requestAnimationFrame(f))},p=()=>{!t&&!document.hidden&&(u=requestAnimationFrame(f))};return document.addEventListener(`visibilitychange`,p),f(),t&&window.addEventListener(`resize`,f),()=>{cancelAnimationFrame(u),window.removeEventListener(`resize`,l),window.removeEventListener(`resize`,f),document.removeEventListener(`visibilitychange`,p)}}var _I=Array.from({length:18},(e,t)=>({left:t*53%100,size:4+t*7%9,delay:t*1.7%14,duration:14+t*5%12}));function vI({live:e,reducedMotion:t}){let n=(0,d.useRef)(null);return(0,d.useEffect)(()=>gI(n.current,t),[t]),(0,$.jsxs)(`div`,{className:`bg`,"aria-hidden":`true`,children:[(0,$.jsx)(`canvas`,{ref:n,className:`bg-canvas`}),(0,$.jsx)(`div`,{className:`bg-grain`}),e&&!t&&(0,$.jsx)(`div`,{className:`bg-bubbles`,children:_I.map((e,t)=>(0,$.jsx)(`span`,{style:{left:e.left+`%`,width:e.size,height:e.size,animationDelay:e.delay+`s`,animationDuration:e.duration+`s`}},t))})]})}var yI=[{key:`today`,label:`今天`,range:()=>y(0,0)},{key:`yesterday`,label:`昨天`,range:()=>y(-1,-1)},{key:`week`,label:`近 7 天`,range:()=>y(-6,0)}];function bI(e){return e?e.slice(0,10):``}function xI({meta:e,filter:t,onFilter:n,live:r,lastTime:i,refreshing:a}){let[o,s]=(0,d.useState)(!1),[c,l]=(0,d.useState)(bI(t.start)),[u,f]=(0,d.useState)(bI(t.end));(0,d.useEffect)(()=>{l(bI(t.start)),f(bI(t.end))},[t.start,t.end]);let p=e?e.stores.filter(e=>!t.city||e.city===t.city):[],m=yI.find(e=>{let n=e.range();return t.mode===`range`&&n.start===t.start&&n.end===t.end}),h=r=>{r!==t.mode&&n(r===`range`?{mode:r,batch:``,...y(0,0)}:{mode:r,start:``,end:``,batch:t.batch||(e&&e.batches.length?e.batches[0].batch:``)})};return(0,$.jsxs)(`header`,{className:`topbar glass`,children:[(0,$.jsxs)(`div`,{className:`brand`,children:[(0,$.jsx)(`span`,{className:`brand-mark`,"aria-hidden":`true`,children:(0,$.jsxs)(`svg`,{viewBox:`0 0 32 32`,width:`30`,height:`30`,children:[(0,$.jsx)(`path`,{d:`M9 4h14l-1.6 10.5a5.5 5.5 0 0 1-10.8 0L9 4Z`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`}),(0,$.jsx)(`path`,{d:`M10.4 10h11.2l-.8 4.3a4.8 4.8 0 0 1-9.6 0Z`,fill:`currentColor`,opacity:`.55`}),(0,$.jsx)(`path`,{d:`M16 20v7M11 28h10`,stroke:`currentColor`,strokeWidth:`1.6`,strokeLinecap:`round`})]})}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h1`,{children:`歪马送酒 · 采集看板`}),(0,$.jsx)(`p`,{className:`brand-sub`,children:`优惠券商品与关键词搜索采集进度`})]})]}),(0,$.jsxs)(`div`,{className:`filters`,role:`group`,"aria-label":`数据范围`,children:[(0,$.jsxs)(`div`,{className:`segmented`,role:`tablist`,"aria-label":`筛选方式`,children:[(0,$.jsx)(`button`,{role:`tab`,"aria-selected":t.mode===`batch`,className:t.mode===`batch`?`on`:``,onClick:()=>h(`batch`),children:`按批次`}),(0,$.jsx)(`button`,{role:`tab`,"aria-selected":t.mode===`range`,className:t.mode===`range`?`on`:``,onClick:()=>h(`range`),children:`按时间段`})]}),t.mode===`batch`?(0,$.jsxs)(`label`,{className:`select-wrap`,children:[(0,$.jsx)(`span`,{className:`sr-only`,children:`批次`}),(0,$.jsxs)(`select`,{value:t.batch,onChange:e=>n({batch:e.target.value}),disabled:!e||!e.batches.length,children:[e&&!e.batches.length&&(0,$.jsx)(`option`,{value:``,children:`暂无批次`}),e&&e.batches.map(e=>(0,$.jsxs)(`option`,{value:e.batch,children:[`批次 `,e.batch]},e.batch))]})]}):(0,$.jsxs)(`div`,{className:`quick-range`,children:[yI.map(e=>(0,$.jsx)(`button`,{className:`chip`+(m&&m.key===e.key?` on`:``),onClick:()=>n(e.range()),children:e.label},e.key)),(0,$.jsxs)(`div`,{className:`custom-range`,children:[(0,$.jsx)(`button`,{className:`chip`+(m?``:` on`),"aria-expanded":o,onClick:()=>s(!o),children:!m&&t.start?bI(t.start).slice(5)+` ~ `+bI(t.end).slice(5):`自定义`}),o&&(0,$.jsxs)(`form`,{className:`custom-pop glass`,onSubmit:e=>{e.preventDefault(),!(!c||!u||c>u)&&(n({start:c+` 00:00:00`,end:u+` 23:59:59`}),s(!1))},children:[(0,$.jsxs)(`label`,{children:[`开始`,(0,$.jsx)(`input`,{type:`date`,value:c,max:u||void 0,onChange:e=>l(e.target.value),required:!0})]}),(0,$.jsxs)(`label`,{children:[`结束`,(0,$.jsx)(`input`,{type:`date`,value:u,min:c||void 0,onChange:e=>f(e.target.value),required:!0})]}),(0,$.jsxs)(`div`,{className:`custom-actions`,children:[(0,$.jsx)(`button`,{type:`button`,className:`ghost`,onClick:()=>s(!1),children:`取消`}),(0,$.jsx)(`button`,{type:`submit`,className:`primary`,disabled:!c||!u||c>u,children:`应用`})]})]})]})]}),e&&e.cities.length>1?(0,$.jsxs)(`label`,{className:`select-wrap`,children:[(0,$.jsx)(`span`,{className:`sr-only`,children:`城市`}),(0,$.jsxs)(`select`,{value:t.city,onChange:e=>n({city:e.target.value,store_id:``}),children:[(0,$.jsx)(`option`,{value:``,children:`全部城市`}),e.cities.map(e=>(0,$.jsx)(`option`,{value:e,children:e},e))]})]}):e&&e.cities.length===1&&(0,$.jsx)(`span`,{className:`static-tag`,children:e.cities[0]}),p.length>1?(0,$.jsxs)(`label`,{className:`select-wrap`,children:[(0,$.jsx)(`span`,{className:`sr-only`,children:`店铺`}),(0,$.jsxs)(`select`,{value:t.store_id,onChange:e=>n({store_id:e.target.value}),children:[(0,$.jsx)(`option`,{value:``,children:`全部店铺`}),p.map(e=>(0,$.jsx)(`option`,{value:e.store_id,children:e.store_name},e.store_id))]})]}):p.length===1&&(0,$.jsx)(`span`,{className:`static-tag`,children:p[0].store_name})]}),(0,$.jsxs)(`div`,{className:`live`+(r?` on`:``),role:`status`,"aria-live":`polite`,children:[(0,$.jsx)(`span`,{className:`live-dot`,"aria-hidden":`true`}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`strong`,{children:r?`采集中`:`空闲`}),(0,$.jsx)(`small`,{children:a?`同步中…`:`最近入库 `+S(i)})]})]})]})}function SI({now:e,prev:t,label:n}){if(t==null)return(0,$.jsx)(`span`,{className:`delta muted`,children:`暂无可对比的上一周期`});if(t===0&&e===0)return(0,$.jsxs)(`span`,{className:`delta muted`,children:[`与`,n,`持平`]});if(t===0)return(0,$.jsxs)(`span`,{className:`delta up`,children:[`较`,n,` 新增 `,x(e)]});let r=Math.round((e-t)/t*100),i=r>0?`up`:r<0?`down`:`muted`,a=r>0?`↑`:r<0?`↓`:``;return(0,$.jsxs)(`span`,{className:`delta `+i,children:[`较`,n,` `,a,Math.abs(r),`%`]})}function CI({title:e,value:t,total:n,unit:r,sub:i,prev:a,prevLabel:o,reduced:s,index:c,accent:l}){let u=uI(t,s),d=n?Math.min(100,t/n*100):null;return(0,$.jsxs)(`article`,{className:`kpi glass`,style:{"--i":c,"--accent":l},children:[(0,$.jsx)(`h2`,{className:`kpi-title`,children:e}),(0,$.jsxs)(`p`,{className:`kpi-value`,children:[(0,$.jsx)(`span`,{className:`num`,children:x(u)}),n!==void 0&&(0,$.jsxs)(`span`,{className:`kpi-total`,children:[`/ `,x(n)]}),r&&(0,$.jsx)(`span`,{className:`kpi-unit`,children:r})]}),d!==null&&(0,$.jsx)(`div`,{className:`kpi-bar`,role:`progressbar`,"aria-valuenow":Math.round(d),"aria-valuemin":0,"aria-valuemax":100,"aria-label":e+`完成度`,children:(0,$.jsx)(`span`,{style:{width:d+`%`}})}),(0,$.jsx)(`p`,{className:`kpi-sub`,children:i}),(0,$.jsx)(SI,{now:t,prev:a,label:o})]})}function wI({summary:e,reduced:t}){let n=e.current,r=e.prev,i=e.prev_label?e.prev_label===`上一时段`?`上一时段`:`批次 `+e.prev_label:``,a=n.keyword_status.done;return(0,$.jsxs)(`section`,{className:`kpis`,"aria-label":`核心指标`,children:[(0,$.jsx)(CI,{index:0,accent:`#E8A84A`,title:`已采集优惠券`,value:n.coupon_collected,total:n.coupon_total,unit:`张`,sub:`已采完 ${n.coupon_status.done} · 无商品 ${n.coupon_status.empty} · 采集中 ${n.coupon_status.running}`,prev:r&&r.coupon_collected,prevLabel:i,reduced:t}),(0,$.jsx)(CI,{index:1,accent:`#F3C77B`,title:`券商品页数`,value:n.coupon_pages,unit:`页`,sub:`共 ${x(n.coupon_products)} 件商品 · 去重 ${x(n.coupon_spu)} 款`,prev:r&&r.coupon_pages,prevLabel:i,reduced:t}),(0,$.jsx)(CI,{index:2,accent:`#7FD1B9`,title:`关键词完成`,value:a,total:n.keyword_total,unit:`个`,sub:`已入库 ${x(n.search_pages)} 页 · ${x(n.search_products)} 件商品`,prev:r&&r.keyword_status.done,prevLabel:i,reduced:t}),(0,$.jsx)(CI,{index:3,accent:`#E7D7C1`,title:`采集商品`,value:n.product_spu,unit:`款`,sub:`券商品 ${x(n.coupon_spu)} 款 + 搜索 ${x(n.search_spu)} 款(去重合并)`,prev:r&&r.product_spu,prevLabel:i,reduced:t})]})}var TI=`#E9DFCF`,EI=`rgba(233,223,207,.55)`,DI=`#E8A84A`,OI=`#7FD1B9`,kI={backgroundColor:`rgba(18,16,24,.92)`,borderColor:`rgba(232,168,74,.35)`,textStyle:{color:TI,fontSize:12},extraCssText:`backdrop-filter: blur(8px); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.4);`};function AI({data:e,reduced:t}){let[n,r]=(0,d.useState)(!1),i=e.buckets,a=dI((0,d.useMemo)(()=>{let t=i.map(t=>(e.unit,t.time.slice(5))),n=e=>({type:`linear`,x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:e+`88`},{offset:1,color:e+`00`}]});return{aria:{enabled:!0,decal:{show:!1}},grid:{left:36,right:16,top:36,bottom:i.length>36?52:28},legend:{top:0,right:0,textStyle:{color:EI},icon:`roundRect`,itemWidth:12,itemHeight:6},tooltip:{...kI,trigger:`axis`,axisPointer:{type:`line`,lineStyle:{color:`rgba(232,168,74,.5)`}}},xAxis:{type:`category`,data:t,boundaryGap:!1,axisLine:{lineStyle:{color:`rgba(233,223,207,.18)`}},axisLabel:{color:EI,fontSize:11,hideOverlap:!0},axisTick:{show:!1}},yAxis:{type:`value`,minInterval:1,splitLine:{lineStyle:{color:`rgba(233,223,207,.07)`}},axisLabel:{color:EI,fontSize:11}},dataZoom:i.length>36?[{type:`inside`},{type:`slider`,height:14,bottom:8,borderColor:`transparent`,fillerColor:`rgba(232,168,74,.18)`,textStyle:{color:EI}}]:[],series:[{name:`券商品页`,type:`line`,smooth:.35,symbol:`circle`,symbolSize:5,showSymbol:!1,lineStyle:{width:2,color:DI},itemStyle:{color:DI},areaStyle:{color:n(DI)},emphasis:{focus:`series`},data:i.map(e=>e.coupon_pages)},{name:`搜索页`,type:`line`,smooth:.35,symbol:`circle`,symbolSize:5,showSymbol:!1,lineStyle:{width:2,color:OI},itemStyle:{color:OI},areaStyle:{color:n(OI)},emphasis:{focus:`series`},data:i.map(e=>e.search_pages)}]}},[i,e.unit]),t),o=i.reduce((e,t)=>e+t.coupon_pages+t.search_pages,0),s=i.filter(e=>e.coupon_pages+e.search_pages>0);return(0,$.jsxs)(`section`,{className:`panel glass timeline`,"aria-labelledby":`timeline-title`,children:[(0,$.jsxs)(`div`,{className:`panel-head`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h2`,{id:`timeline-title`,children:`采集时间轴`}),(0,$.jsxs)(`p`,{className:`panel-sub`,children:[e.unit===`hour`?`按小时`:`按天`,`统计入库页数 · 共 `,o,` 页`]})]}),(0,$.jsx)(`button`,{className:`link-btn`,"aria-expanded":n,onClick:()=>r(!n),children:n?`看图表`:`看数据表`})]}),!i.length||!o?(0,$.jsx)(PI,{text:`这段时间没有入库的页面`}):n?(0,$.jsx)(`div`,{className:`table-scroll`,children:(0,$.jsxs)(`table`,{className:`data-table`,children:[(0,$.jsx)(`thead`,{children:(0,$.jsxs)(`tr`,{children:[(0,$.jsx)(`th`,{scope:`col`,children:`时间`}),(0,$.jsx)(`th`,{scope:`col`,children:`券商品页`}),(0,$.jsx)(`th`,{scope:`col`,children:`搜索页`})]})}),(0,$.jsx)(`tbody`,{children:s.map(e=>(0,$.jsxs)(`tr`,{children:[(0,$.jsx)(`td`,{children:e.time}),(0,$.jsx)(`td`,{children:e.coupon_pages}),(0,$.jsx)(`td`,{children:e.search_pages})]},e.time))})]})}):null,(0,$.jsx)(`div`,{ref:a,className:`chart`,role:`img`,"aria-label":`采集时间轴, `+s.map(e=>`${e.time} 券商品${e.coupon_pages}页 搜索${e.search_pages}页`).join(`;`),style:{display:i.length&&o&&!n?`block`:`none`}})]})}var jI=[{key:`done`,label:`已采完`,color:`#E8A84A`},{key:`running`,label:`采集中`,color:`#F6D8A0`},{key:`empty`,label:`无商品`,color:`#8E7F6E`},{key:`pending`,label:`未开始`,color:`rgba(233,223,207,.12)`}],MI=[{key:`done`,label:`已完成`,color:`#7FD1B9`},{key:`running`,label:`进行中`,color:`#C4EDE0`},{key:`pending`,label:`未完成`,color:`rgba(233,223,207,.12)`}];function NI({summary:e,reduced:t,onPick:n}){let r=e.current,i=dI((0,d.useMemo)(()=>{let e=(e,t,n,r)=>({name:e,type:`pie`,radius:t,center:[`50%`,`50%`],startAngle:90,avoidLabelOverlap:!1,label:{show:!1},labelLine:{show:!1},itemStyle:{borderColor:`rgba(10,10,18,.9)`,borderWidth:2,borderRadius:6},emphasis:{scale:!0,scaleSize:5},data:n.map(t=>({name:t.label,value:r[t.key],itemStyle:{color:t.color},stateKey:t.key,group:e}))});return{aria:{enabled:!0},tooltip:{...kI,trigger:`item`,formatter:e=>`${e.seriesName}
${e.marker}${e.name}:${e.value}(${e.percent}%)`},series:[e(`优惠券`,[`62%`,`82%`],jI,r.coupon_status),e(`关键词`,[`40%`,`56%`],MI,r.keyword_status)]}},[r]),t,e=>n(e.data.group===`优惠券`?`coupon`:`keyword`,e.data.stateKey)),a=r.coupon_total?Math.round((r.coupon_status.done+r.coupon_status.empty)/r.coupon_total*100):0,o=r.keyword_total?Math.round(r.keyword_status.done/r.keyword_total*100):0;return(0,$.jsxs)(`section`,{className:`panel glass rings`,"aria-labelledby":`rings-title`,children:[(0,$.jsx)(`div`,{className:`panel-head`,children:(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h2`,{id:`rings-title`,children:`完成度`}),(0,$.jsx)(`p`,{className:`panel-sub`,children:`外圈优惠券 · 内圈关键词 · 点击扇区筛选`})]})}),(0,$.jsxs)(`div`,{className:`rings-body`,children:[(0,$.jsxs)(`div`,{className:`ring-chart-wrap`,children:[(0,$.jsx)(`div`,{ref:i,className:`chart ring-chart`,role:`img`,"aria-label":`优惠券完成 ${a}%,关键词完成 ${o}%`}),(0,$.jsxs)(`div`,{className:`ring-center`,"aria-hidden":`true`,children:[(0,$.jsxs)(`span`,{className:`num`,children:[a,(0,$.jsx)(`small`,{children:`%`})]}),(0,$.jsx)(`span`,{className:`ring-center-sub`,children:`券完成`})]})]}),(0,$.jsxs)(`ul`,{className:`ring-legend`,children:[jI.map(e=>(0,$.jsx)(`li`,{children:(0,$.jsxs)(`button`,{onClick:()=>n(`coupon`,e.key),children:[(0,$.jsx)(`i`,{style:{background:e.color}}),`券 · `,e.label,(0,$.jsx)(`b`,{children:r.coupon_status[e.key]})]})},e.key)),MI.map(e=>(0,$.jsx)(`li`,{children:(0,$.jsxs)(`button`,{onClick:()=>n(`keyword`,e.key),children:[(0,$.jsx)(`i`,{style:{background:e.color}}),`关键词 · `,e.label,(0,$.jsx)(`b`,{children:r.keyword_status[e.key]})]})},`k`+e.key))]})]})]})}function PI({text:e,sub:t}){return(0,$.jsxs)(`div`,{className:`empty`,children:[(0,$.jsxs)(`svg`,{viewBox:`0 0 120 90`,width:`120`,height:`90`,"aria-hidden":`true`,children:[(0,$.jsx)(`path`,{d:`M38 14h44l-5 32a17 17 0 0 1-34 0Z`,fill:`none`,stroke:`rgba(232,168,74,.55)`,strokeWidth:`2`}),(0,$.jsx)(`path`,{d:`M60 63v16M46 80h28`,stroke:`rgba(232,168,74,.55)`,strokeWidth:`2`,strokeLinecap:`round`}),(0,$.jsx)(`circle`,{cx:`54`,cy:`36`,r:`2`,fill:`rgba(232,168,74,.45)`}),(0,$.jsx)(`circle`,{cx:`64`,cy:`28`,r:`1.5`,fill:`rgba(232,168,74,.35)`})]}),(0,$.jsx)(`p`,{children:e}),t&&(0,$.jsx)(`small`,{children:t})]})}var FI={done:{label:`已采完`,cls:`st-done`},running:{label:`采集中`,cls:`st-running`},empty:{label:`无商品`,cls:`st-empty`},pending:{label:`未开始`,cls:`st-pending`}},II=[{key:``,label:`全部`},{key:`running`,label:`采集中`},{key:`done`,label:`已采完`},{key:`empty`,label:`无商品`},{key:`pending`,label:`未开始`}],LI=[{key:`progress`,label:`采集进度`},{key:`pages`,label:`页数多→少`},{key:`price`,label:`面额高→低`},{key:`recent`,label:`最近采集`}],RI={running:0,done:1,empty:2,pending:3},zI=12;function BI({coupon:e}){let t=e.pages,n=t.slice(-12),r=t.length-n.length;return(0,$.jsxs)(`div`,{className:`ticks`,"aria-label":`已采 ${t.length} 页`,children:[r>0&&(0,$.jsxs)(`span`,{className:`tick-more`,children:[`+`,r]}),n.map((t,r)=>(0,$.jsx)(`span`,{className:`tick`+(t.products?``:` zero`)+(e.status===`running`&&r===n.length-1?` pulse`:``),title:`第${t.page}页 · ${t.products}件 · ${t.time}`},t.page+`-`+r)),e.status===`running`&&(0,$.jsx)(`span`,{className:`tick ghost`,title:`下一页采集中`}),!t.length&&(0,$.jsx)(`span`,{className:`tick-none`,children:`尚未采集`})]})}function VI({coupon:e,onOpen:t,index:n}){let r=FI[e.status];return(0,$.jsx)(`li`,{className:`coupon-li`,style:{"--i":n%zI},children:(0,$.jsxs)(`button`,{className:`coupon `+r.cls,onClick:()=>t(e.id),"aria-label":`${e.name} ${e.limit_text} ${r.label} 已采${e.page_count}页`,children:[(0,$.jsxs)(`span`,{className:`coupon-left`,children:[(0,$.jsxs)(`span`,{className:`coupon-price`,children:[(0,$.jsx)(`small`,{children:`¥`}),e.price]}),(0,$.jsx)(`span`,{className:`coupon-cond`,children:e.condition_text})]}),(0,$.jsxs)(`span`,{className:`coupon-right`,children:[(0,$.jsxs)(`span`,{className:`coupon-top`,children:[(0,$.jsx)(`span`,{className:`coupon-name`,children:e.name}),(0,$.jsx)(`span`,{className:`badge `+r.cls,children:r.label})]}),(0,$.jsxs)(`span`,{className:`coupon-meta`,children:[e.type_doc,` · `,e.limit_text,` · `,e.use_doc]}),(0,$.jsx)(BI,{coupon:e}),(0,$.jsxs)(`span`,{className:`coupon-foot`,children:[(0,$.jsxs)(`span`,{children:[(0,$.jsx)(`b`,{children:e.page_count}),` 页 · `,(0,$.jsx)(`b`,{children:e.product_count}),` 件`]}),(0,$.jsx)(`span`,{children:e.last_time?S(e.last_time):`—`})]})]})]})})}function HI({coupons:e,statusFilter:t,onStatusFilter:n,onOpen:r,onOrder:i}){let[a,o]=(0,d.useState)(`progress`),[s,c]=(0,d.useState)(``),[l,u]=(0,d.useState)(zI),f=(0,d.useMemo)(()=>{let t={"":e.length,done:0,running:0,empty:0,pending:0};return e.forEach(e=>t[e.status]+=1),t},[e]),p=(0,d.useMemo)(()=>{let n=s.trim().toLowerCase(),r=[...e.filter(e=>(!t||e.status===t)&&(!n||e.name.toLowerCase().includes(n)||e.coupon_id.includes(n)))];return a===`progress`&&r.sort((e,t)=>RI[e.status]-RI[t.status]||t.page_count-e.page_count),a===`pages`&&r.sort((e,t)=>t.page_count-e.page_count||t.product_count-e.product_count),a===`price`&&r.sort((e,t)=>Number(t.price)-Number(e.price)),a===`recent`&&r.sort((e,t)=>(t.last_time||``).localeCompare(e.last_time||``)),r},[e,t,a,s]),m=p.slice(0,l);return(0,d.useEffect)(()=>i(p.map(e=>String(e.id))),[p,i]),(0,$.jsxs)(`div`,{className:`tab-body`,role:`tabpanel`,id:`panel-coupon`,"aria-labelledby":`tab-coupon`,children:[(0,$.jsxs)(`div`,{className:`toolbar`,children:[(0,$.jsx)(`div`,{className:`chips`,role:`group`,"aria-label":`按状态筛选`,children:II.map(e=>(0,$.jsxs)(`button`,{className:`chip`+(t===e.key?` on`:``),"aria-pressed":t===e.key,onClick:()=>{n(e.key),u(zI)},children:[e.label,(0,$.jsx)(`span`,{className:`chip-count`,children:f[e.key]})]},e.key))}),(0,$.jsxs)(`div`,{className:`toolbar-right`,children:[(0,$.jsxs)(`label`,{className:`search`,children:[(0,$.jsx)(`span`,{className:`sr-only`,children:`搜索券名称或券 ID`}),(0,$.jsxs)(`svg`,{viewBox:`0 0 20 20`,width:`14`,height:`14`,"aria-hidden":`true`,children:[(0,$.jsx)(`circle`,{cx:`9`,cy:`9`,r:`6`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`}),(0,$.jsx)(`path`,{d:`m14 14 4 4`,stroke:`currentColor`,strokeWidth:`1.6`,strokeLinecap:`round`})]}),(0,$.jsx)(`input`,{value:s,placeholder:`搜索券名称 / ID`,onChange:e=>{c(e.target.value),u(zI)}})]}),(0,$.jsxs)(`label`,{className:`select-wrap small`,children:[(0,$.jsx)(`span`,{className:`sr-only`,children:`排序`}),(0,$.jsx)(`select`,{value:a,onChange:e=>o(e.target.value),children:LI.map(e=>(0,$.jsx)(`option`,{value:e.key,children:e.label},e.key))})]})]})]}),e.length?p.length?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`ul`,{className:`coupon-grid`,children:m.map((e,t)=>(0,$.jsx)(VI,{coupon:e,index:t,onOpen:r},e.id))}),(0,$.jsxs)(`div`,{className:`more-row`,children:[(0,$.jsxs)(`span`,{className:`muted`,children:[`显示 `,m.length,` / `,p.length,` 张`]}),p.length>m.length&&(0,$.jsx)(`button`,{className:`ghost`,onClick:()=>u(l+24),children:`展开更多`}),m.length>zI&&(0,$.jsx)(`button`,{className:`ghost`,onClick:()=>u(zI),children:`收起`})]})]}):(0,$.jsx)(PI,{text:`没有符合条件的优惠券`,sub:`调整筛选或搜索条件`}):(0,$.jsx)(PI,{text:`这段时间没有优惠券任务`,sub:`换一个批次或时间段试试`})]})}var UI={done:{label:`已完成`,cls:`st-kdone`,color:`#7FD1B9`},running:{label:`进行中`,cls:`st-krunning`,color:`#C4EDE0`},pending:{label:`未完成`,cls:`st-kpending`,color:`#5B5566`}},WI=[{key:``,label:`全部`},{key:`done`,label:`已完成`},{key:`running`,label:`进行中`},{key:`pending`,label:`未完成`}],GI=3;function KI(e){let t=[...e].sort((e,t)=>(t.total_num||0)-(e.total_num||0)||e.keyword.localeCompare(t.keyword)),n=Math.max(1,...t.map(e=>e.total_num||0));return t.map((e,t)=>{let r=t*2.39996,i=Math.sqrt(t+.6)*10.5;return{row:e,x:50+Math.cos(r)*i*1.7,y:50+Math.sin(r)*i,size:22+Math.sqrt((e.total_num||0)/n)*46}})}function qI({rows:e,onOpen:t}){let n=(0,d.useMemo)(()=>KI(e),[e]),r=(0,d.useMemo)(()=>{let e=n.map(e=>e.x),t=n.map(e=>e.y);return{minX:Math.min(...e),maxX:Math.max(...e),minY:Math.min(...t),maxY:Math.max(...t)}},[n]),i=e=>r.maxX===r.minX?50:6+(e-r.minX)/(r.maxX-r.minX)*88,a=e=>r.maxY===r.minY?50:10+(e-r.minY)/(r.maxY-r.minY)*80;return(0,$.jsx)(`ul`,{className:`bubbles`,"aria-label":`关键词气泡, 大小代表命中商品数`,children:n.map((e,n)=>{let r=UI[e.row.status];return(0,$.jsx)(`li`,{style:{left:i(e.x)+`%`,top:a(e.y)+`%`,"--size":e.size+`px`,"--i":n},children:(0,$.jsxs)(`button`,{className:`bubble `+r.cls,onClick:()=>t(e.row.id),"aria-label":`${e.row.keyword} ${r.label} 命中${e.row.total_num??`未知`}件 已采${e.row.current_page}/${e.row.page}页`,children:[(0,$.jsx)(`span`,{className:`bubble-word`,children:e.row.keyword}),e.row.total_num!==null&&(0,$.jsx)(`span`,{className:`bubble-num`,children:e.row.total_num})]})},e.row.id)})})}function JI({rows:e,onOpen:t,reduced:n}){let{keywords:r,stores:i,cells:a}=(0,d.useMemo)(()=>{let t=[...new Set(e.map(e=>e.keyword))],n=[...new Set(e.map(e=>e.store_name))];return{keywords:t,stores:n,cells:e.map(e=>[t.indexOf(e.keyword),n.indexOf(e.store_name),Math.min(1,e.current_page/e.page),e.id,e.total_num,e.current_page,e.page])}},[e]),o=dI((0,d.useMemo)(()=>({aria:{enabled:!0},grid:{left:110,right:20,top:10,bottom:70},tooltip:{backgroundColor:`rgba(18,16,24,.92)`,borderColor:`rgba(127,209,185,.35)`,textStyle:{color:`#E9DFCF`,fontSize:12},formatter:e=>`${r[e.data[0]]} · ${i[e.data[1]]}
已采 ${e.data[5]}/${e.data[6]} 页
命中 ${e.data[4]??`—`} 件`},xAxis:{type:`category`,data:r,axisLabel:{color:`rgba(233,223,207,.6)`,rotate:45,fontSize:11},axisLine:{show:!1},axisTick:{show:!1},splitArea:{show:!1}},yAxis:{type:`category`,data:i,axisLabel:{color:`rgba(233,223,207,.75)`,fontSize:12},axisLine:{show:!1},axisTick:{show:!1}},visualMap:{show:!1,min:0,max:1,inRange:{color:[`#2A2533`,`#3E6E62`,`#7FD1B9`]}},series:[{type:`heatmap`,data:a,itemStyle:{borderColor:`rgba(10,10,18,.9)`,borderWidth:3,borderRadius:4},emphasis:{itemStyle:{borderColor:`#E8A84A`}}}]}),[r,i,a]),n,e=>t(e.data[3]));return(0,$.jsx)(`div`,{ref:o,className:`chart matrix`,style:{height:Math.max(240,i.length*46+90)},role:`img`,"aria-label":`关键词与店铺完成度矩阵`})}function YI({rows:e,onOpen:t}){return(0,$.jsx)(`div`,{className:`table-scroll`,children:(0,$.jsxs)(`table`,{className:`data-table kw-table`,children:[(0,$.jsx)(`thead`,{children:(0,$.jsxs)(`tr`,{children:[(0,$.jsx)(`th`,{scope:`col`,children:`关键词`}),(0,$.jsx)(`th`,{scope:`col`,children:`店铺`}),(0,$.jsx)(`th`,{scope:`col`,children:`进度`}),(0,$.jsx)(`th`,{scope:`col`,children:`命中`}),(0,$.jsx)(`th`,{scope:`col`,children:`已入库`}),(0,$.jsx)(`th`,{scope:`col`,children:`更新时间`})]})}),(0,$.jsx)(`tbody`,{children:e.map(e=>{let n=UI[e.status];return(0,$.jsxs)(`tr`,{children:[(0,$.jsx)(`td`,{children:(0,$.jsx)(`button`,{className:`link-btn strong`,onClick:()=>t(e.id),children:e.keyword})}),(0,$.jsx)(`td`,{children:e.store_name}),(0,$.jsxs)(`td`,{children:[(0,$.jsx)(`span`,{className:`badge `+n.cls,children:n.label}),(0,$.jsx)(`span`,{className:`mini-bar`,"aria-hidden":`true`,children:(0,$.jsx)(`span`,{style:{width:Math.min(100,e.current_page/e.page*100)+`%`}})}),(0,$.jsxs)(`span`,{className:`muted`,children:[` `,e.current_page,`/`,e.page,` 页`]})]}),(0,$.jsx)(`td`,{children:e.total_num??`—`}),(0,$.jsxs)(`td`,{children:[e.saved_pages,` 页 · `,e.product_count,` 件`]}),(0,$.jsx)(`td`,{className:`muted`,children:S(e.updated_at)})]},e.id)})})]})})}function XI({keywords:e,statusFilter:t,onStatusFilter:n,onOpen:r,onOrder:i,reduced:a}){let o=new Set(e.map(e=>e.store_id)).size,[s,c]=(0,d.useState)(`auto`),[l,u]=(0,d.useState)(``),f=o>=GI?`matrix`:`bubble`,p=s===`auto`?f:s,m=(0,d.useMemo)(()=>{let t={"":e.length,done:0,running:0,pending:0};return e.forEach(e=>t[e.status]+=1),t},[e]),h=(0,d.useMemo)(()=>{let n=l.trim().toLowerCase();return e.filter(e=>(!t||e.status===t)&&(!n||e.keyword.toLowerCase().includes(n)))},[e,t,l]),g=(0,d.useMemo)(()=>p===`bubble`?KI(h).map(e=>e.row):h,[h,p]);return(0,d.useEffect)(()=>i(g.map(e=>String(e.id))),[g,i]),(0,$.jsxs)(`div`,{className:`tab-body`,role:`tabpanel`,id:`panel-keyword`,"aria-labelledby":`tab-keyword`,children:[(0,$.jsxs)(`div`,{className:`toolbar`,children:[(0,$.jsx)(`div`,{className:`chips`,role:`group`,"aria-label":`按状态筛选`,children:WI.map(e=>(0,$.jsxs)(`button`,{className:`chip`+(t===e.key?` on`:``),"aria-pressed":t===e.key,onClick:()=>n(e.key),children:[e.label,(0,$.jsx)(`span`,{className:`chip-count`,children:m[e.key]})]},e.key))}),(0,$.jsxs)(`div`,{className:`toolbar-right`,children:[(0,$.jsxs)(`label`,{className:`search`,children:[(0,$.jsx)(`span`,{className:`sr-only`,children:`搜索关键词`}),(0,$.jsxs)(`svg`,{viewBox:`0 0 20 20`,width:`14`,height:`14`,"aria-hidden":`true`,children:[(0,$.jsx)(`circle`,{cx:`9`,cy:`9`,r:`6`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`}),(0,$.jsx)(`path`,{d:`m14 14 4 4`,stroke:`currentColor`,strokeWidth:`1.6`,strokeLinecap:`round`})]}),(0,$.jsx)(`input`,{value:l,placeholder:`搜索关键词`,onChange:e=>u(e.target.value)})]}),(0,$.jsxs)(`div`,{className:`segmented small`,role:`group`,"aria-label":`展示方式`,children:[(0,$.jsx)(`button`,{className:p===`list`?``:`on`,"aria-pressed":p!==`list`,onClick:()=>c(`auto`),children:f===`matrix`?`矩阵`:`气泡`}),(0,$.jsx)(`button`,{className:p===`list`?`on`:``,"aria-pressed":p===`list`,onClick:()=>c(`list`),children:`列表`})]})]})]}),e.length?h.length?p===`list`?(0,$.jsx)(YI,{rows:h,onOpen:r}):p===`matrix`?(0,$.jsx)(JI,{rows:h,onOpen:r,reduced:a}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(qI,{rows:h,onOpen:r}),(0,$.jsxs)(`p`,{className:`legend-line`,children:[Object.entries(UI).map(([e,t])=>(0,$.jsxs)(`span`,{children:[(0,$.jsx)(`i`,{style:{background:t.color}}),t.label]},e)),(0,$.jsx)(`span`,{className:`muted`,children:`气泡越大,命中商品越多`})]})]}):(0,$.jsx)(PI,{text:`没有符合条件的关键词`,sub:`调整筛选或搜索条件`}):(0,$.jsx)(PI,{text:`这段时间没有关键词任务`,sub:`换一个批次或时间段试试`})]})}function ZI({product:e}){let t=e.price||e.activity_price,n=e.origin_price,r=t&&n&&Number(n)>Number(t)?Math.round((1-Number(t)/Number(n))*100):0;return(0,$.jsxs)(`div`,{className:`p-price`,children:[t?(0,$.jsxs)(`span`,{className:`p-now`,children:[(0,$.jsx)(`small`,{children:`¥`}),t]}):(0,$.jsx)(`span`,{className:`p-now muted`,children:`暂无售价`}),n&&n!==t&&(0,$.jsxs)(`s`,{className:`p-origin`,children:[`¥`,n]}),r>0&&(0,$.jsxs)(`span`,{className:`p-off`,children:[`省`,r,`%`]}),e.after_coupon&&(0,$.jsxs)(`span`,{className:`p-after`,children:[`券后 ¥`,e.after_coupon]})]})}function QI({src:e,name:t}){let[n,r]=(0,d.useState)(!1);return!e||n?(0,$.jsx)(`span`,{className:`p-img placeholder`,"aria-hidden":`true`,children:(0,$.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`26`,height:`26`,children:(0,$.jsx)(`path`,{d:`M9 2h6v4l2 3v12a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1V9l2-3Z`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.3`})})}):(0,$.jsx)(`img`,{className:`p-img`,src:e,alt:t,loading:`lazy`,referrerPolicy:`no-referrer`,onError:()=>r(!0)})}function $I({page:e,open:t,onToggle:n}){let r=e.products.length;return(0,$.jsxs)(`li`,{className:`tl-item`+(t?` open`:``),children:[(0,$.jsx)(`span`,{className:`tl-dot`+(r?``:` zero`),"aria-hidden":`true`}),(0,$.jsxs)(`button`,{className:`tl-head`,"aria-expanded":t,onClick:n,disabled:!r,children:[(0,$.jsxs)(`span`,{className:`tl-title`,children:[`第 `,e.page,` 页`]}),(0,$.jsx)(`span`,{className:`tl-meta`,children:r?r+` 件商品`:`本页无商品`}),(0,$.jsx)(`span`,{className:`tl-time`,children:e.time}),r>0&&(0,$.jsx)(`span`,{className:`tl-caret`,"aria-hidden":`true`,children:`›`})]}),t&&r>0&&(0,$.jsx)(`ul`,{className:`p-grid`,children:e.products.map((e,t)=>(0,$.jsxs)(`li`,{className:`p-card`,style:{"--i":t},children:[(0,$.jsx)(QI,{src:e.picture,name:e.name}),(0,$.jsxs)(`div`,{className:`p-info`,children:[(0,$.jsx)(`p`,{className:`p-name`,title:e.name,children:e.name}),(0,$.jsx)(ZI,{product:e}),(0,$.jsxs)(`span`,{className:`p-unit muted`,children:[`/`,e.unit]})]})]},e.spu_id+`-`+t))})]})}function eL({kind:e,id:t,ids:n,onClose:r,onMove:i}){let[a,o]=(0,d.useState)({loading:!0,error:``,data:null}),[s,c]=(0,d.useState)({}),[l,u]=(0,d.useState)(!1),f=(0,d.useRef)(null),p=(0,d.useRef)(null),[h,g]=(0,d.useState)(0);(0,d.useEffect)(()=>(p.current=document.activeElement,()=>p.current&&p.current.focus&&p.current.focus()),[]),(0,d.useEffect)(()=>{let n=!0;return o(e=>({...e,loading:!0,error:``})),m((e===`coupon`?`coupons/`:`keywords/`)+t+`/pages`).then(e=>{if(!n)return;o({loading:!1,error:``,data:e});let t=e.pages.find(e=>e.products.length);c(t?{[t.page]:!0}:{}),u(!1),f.current&&f.current.focus()}).catch(e=>n&&o({loading:!1,error:e.message,data:null})),()=>{n=!1}},[e,t,h]);let _=n.indexOf(String(t)),v=_>0?n[_-1]:null,y=_>=0&&_{v&&![`INPUT`,`SELECT`,`TEXTAREA`].includes(e.target.tagName)&&i(v)}),fI(`ArrowRight`,e=>{y&&![`INPUT`,`SELECT`,`TEXTAREA`].includes(e.target.tagName)&&i(y)});let b=e=>{if(e.key!==`Tab`||!f.current)return;let t=f.current.querySelectorAll(`button:not([disabled]), [href], input, select, [tabindex]:not([tabindex="-1"])`);if(!t.length)return;let n=t[0],r=t[t.length-1];e.shiftKey&&document.activeElement===n?(e.preventDefault(),r.focus()):!e.shiftKey&&document.activeElement===r&&(e.preventDefault(),n.focus())},x=a.data,S=x?e===`coupon`?x.coupon:x.keyword:null,C=S?(e===`coupon`?FI:UI)[S.status]:null,w=x?x.pages.reduce((e,t)=>e+t.products.length,0):0;return(0,$.jsxs)(`div`,{className:`drawer-root`,children:[(0,$.jsx)(`div`,{className:`drawer-mask`,onClick:r,"aria-hidden":`true`}),(0,$.jsxs)(`aside`,{ref:f,className:`drawer glass`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`drawer-title`,tabIndex:-1,onKeyDown:b,children:[(0,$.jsxs)(`div`,{className:`drawer-bar`,children:[(0,$.jsxs)(`div`,{className:`drawer-nav`,children:[(0,$.jsx)(`button`,{className:`icon-btn`,onClick:()=>i(v),disabled:!v,"aria-label":`上一个`,children:`‹`}),(0,$.jsxs)(`span`,{className:`muted`,children:[_>=0?_+1:`–`,` / `,n.length]}),(0,$.jsx)(`button`,{className:`icon-btn`,onClick:()=>i(y),disabled:!y,"aria-label":`下一个`,children:`›`})]}),(0,$.jsxs)(`span`,{className:`kbd-hint muted`,"aria-hidden":`true`,children:[(0,$.jsx)(`kbd`,{children:`←`}),(0,$.jsx)(`kbd`,{children:`→`}),` 切换 · `,(0,$.jsx)(`kbd`,{children:`Esc`}),` 关闭`]}),(0,$.jsx)(`button`,{className:`icon-btn`,onClick:r,"aria-label":`关闭详情`,children:`✕`})]}),a.loading&&!x?(0,$.jsxs)(`div`,{className:`drawer-skeleton`,"aria-busy":`true`,"aria-label":`加载中`,children:[(0,$.jsx)(`div`,{className:`sk sk-h`}),(0,$.jsx)(`div`,{className:`sk sk-l`}),(0,$.jsx)(`div`,{className:`sk sk-l short`}),(0,$.jsx)(`div`,{className:`sk sk-block`}),(0,$.jsx)(`div`,{className:`sk sk-block`})]}):a.error?(0,$.jsxs)(`div`,{className:`error-box`,role:`alert`,children:[(0,$.jsxs)(`p`,{children:[`详情加载失败:`,a.error]}),(0,$.jsx)(`button`,{className:`primary`,onClick:()=>g(h+1),children:`重试`})]}):(0,$.jsxs)(`div`,{className:`drawer-body`+(a.loading?` dim`:``),children:[e===`coupon`?(0,$.jsxs)(`section`,{className:`d-hero coupon-hero`,children:[(0,$.jsxs)(`div`,{className:`d-hero-price`,children:[(0,$.jsx)(`small`,{children:`¥`}),S.price,(0,$.jsx)(`span`,{children:S.condition_text})]}),(0,$.jsxs)(`div`,{className:`d-hero-info`,children:[(0,$.jsx)(`h2`,{id:`drawer-title`,children:S.name}),(0,$.jsxs)(`p`,{className:`muted`,children:[S.type_doc,` · `,S.limit_text,` · `,S.use_doc]}),(0,$.jsxs)(`p`,{className:`d-tags`,children:[(0,$.jsx)(`span`,{className:`badge `+C.cls,children:C.label}),(0,$.jsx)(`span`,{className:`tag`,children:S.store_name}),(0,$.jsxs)(`span`,{className:`tag`,children:[`批次 `,S.batch]}),(0,$.jsxs)(`span`,{className:`tag mono`,children:[`ID `,S.coupon_id]})]})]})]}):(0,$.jsxs)(`section`,{className:`d-hero kw-hero`,children:[(0,$.jsx)(`div`,{className:`d-hero-price kw`,children:(0,$.jsx)(`span`,{className:`kw-big`,children:S.keyword})}),(0,$.jsxs)(`div`,{className:`d-hero-info`,children:[(0,$.jsxs)(`h2`,{id:`drawer-title`,children:[`关键词「`,S.keyword,`」`]}),(0,$.jsxs)(`p`,{className:`muted`,children:[`计划 `,S.page,` 页 · 已采 `,S.current_page,` 页 · 命中 `,S.total_num??`—`,` 件`]}),(0,$.jsxs)(`p`,{className:`d-tags`,children:[(0,$.jsx)(`span`,{className:`badge `+C.cls,children:C.label}),(0,$.jsx)(`span`,{className:`tag`,children:S.store_name}),(0,$.jsxs)(`span`,{className:`tag`,children:[`批次 `,S.batch]})]})]})]}),(0,$.jsxs)(`div`,{className:`d-stats`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`b`,{children:x.pages.length}),(0,$.jsx)(`span`,{children:`已入库页`})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`b`,{children:w}),(0,$.jsx)(`span`,{children:`商品件数`})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`b`,{children:x.pages.length?x.pages[x.pages.length-1].time.slice(5,16):`—`}),(0,$.jsx)(`span`,{children:`最近采集`})]})]}),e===`coupon`&&S.use_rules.length>0&&(0,$.jsxs)(`section`,{className:`d-rules`,children:[(0,$.jsxs)(`button`,{className:`rules-toggle`,"aria-expanded":l,onClick:()=>u(!l),children:[`使用规则(`,S.use_rules.length,` 条)`,(0,$.jsx)(`span`,{"aria-hidden":`true`,children:l?`−`:`+`})]}),l&&(0,$.jsx)(`ol`,{className:`rules-list`,children:S.use_rules.map((e,t)=>(0,$.jsx)(`li`,{children:e},t))})]}),(0,$.jsxs)(`section`,{className:`d-pages`,children:[(0,$.jsxs)(`div`,{className:`d-pages-head`,children:[(0,$.jsx)(`h3`,{children:`逐页采集记录`}),x.pages.some(e=>e.products.length)&&(0,$.jsx)(`button`,{className:`link-btn`,onClick:()=>{let e=x.pages.every(e=>!e.products.length||s[e.page]),t={};e||x.pages.forEach(e=>t[e.page]=!0),c(t)},children:x.pages.every(e=>!e.products.length||s[e.page])?`全部收起`:`全部展开`})]}),x.pages.length?(0,$.jsx)(`ol`,{className:`timeline-list`,children:x.pages.map(e=>(0,$.jsx)($I,{page:e,open:!!s[e.page],onToggle:()=>c({...s,[e.page]:!s[e.page]})},e.page+e.time))}):(0,$.jsx)(PI,{text:`还没有采集到页面`,sub:`任务开始后这里会按页出现记录`})]})]})]})]})}var tL=3e4;function nL(e,t,n,r){let[i,a]=(0,d.useState)({data:null,error:``,loading:!0}),[o,s]=(0,d.useState)(0),c=JSON.stringify(t),l=(0,d.useRef)(c);return(0,d.useEffect)(()=>{if(!n)return;let r=!0,i=l.current!==c;return l.current=c,a(e=>({data:i?null:e.data,error:``,loading:!0})),m(e,t).then(e=>r&&a({data:e,error:``,loading:!1})).catch(e=>r&&a(t=>({data:t.data,error:e.message,loading:!1}))),()=>{r=!1}},[e,c,n,r,o]),{...i,retry:()=>s(e=>e+1)}}function rL({message:e,onRetry:t}){return(0,$.jsxs)(`div`,{className:`error-box`,role:`alert`,children:[(0,$.jsxs)(`p`,{children:[`数据加载失败:`,e]}),(0,$.jsx)(`button`,{className:`primary`,onClick:t,children:`重试`})]})}function iL({className:e}){return(0,$.jsx)(`div`,{className:`glass skeleton `+(e||``),"aria-busy":`true`,"aria-label":`加载中`,children:(0,$.jsx)(`div`,{className:`shimmer`})})}function aL(){let e=lI(),t=(0,d.useMemo)(h,[]),[n,r]=(0,d.useState)({mode:t.mode,batch:t.batch,start:t.start,end:t.end,city:t.city,store_id:t.store_id}),[i,a]=(0,d.useState)(t.tab),[o,s]=(0,d.useState)(t.coupon?{kind:`coupon`,id:t.coupon}:t.keyword?{kind:`keyword`,id:t.keyword}:null),[c,l]=(0,d.useState)(``),[u,f]=(0,d.useState)(``),[p,_]=(0,d.useState)([]),[v,y]=(0,d.useState)([]),[x,S]=(0,d.useState)(0),[C,w]=(0,d.useState)(null),[T,E]=(0,d.useState)(``),D=(0,d.useRef)(null),O=(0,d.useCallback)(()=>{m(`meta`).then(e=>{w(e),E(``)}).catch(e=>E(e.message))},[]);(0,d.useEffect)(O,[O,x]),(0,d.useEffect)(()=>{C&&r(e=>{let t={...e};return t.mode===`batch`&&(!t.batch||!C.batches.some(e=>e.batch===t.batch))&&C.batches.length&&(t.batch=C.batches[0].batch),t.city&&!C.cities.includes(t.city)&&(t.city=``),t.store_id&&!C.stores.some(e=>e.store_id===t.store_id)&&(t.store_id=``),JSON.stringify(t)===JSON.stringify(e)?e:t})},[C]);let k=!!C&&(n.mode===`range`?!!(n.start&&n.end):!!n.batch||!C.batches.length),A=nL(`summary`,n,k,x),j=nL(`timeline`,n,k,x),M=nL(`coupons`,n,k,x),ee=nL(`keywords`,n,k,x);(0,d.useEffect)(()=>{g({...n,tab:i,coupon:o&&o.kind===`coupon`?o.id:``,keyword:o&&o.kind===`keyword`?o.id:``})},[n,i,o]);let N=n.mode===`range`?b(n):!!C&&!!C.batches.length&&C.batches[0].batch===n.batch;(0,d.useEffect)(()=>{if(!N)return;let e=setInterval(()=>!document.hidden&&S(e=>e+1),tL);return()=>clearInterval(e)},[N]);let P=e=>{r(t=>({...t,...e})),l(``),f(``)},te=(t,n)=>{a(t),t===`coupon`?l(n):f(n),D.current&&D.current.scrollIntoView({behavior:e?`auto`:`smooth`,block:`start`})},ne=(0,d.useMemo)(()=>{if(!o)return[];let e=o.kind===`coupon`?p:v;return e.includes(String(o.id))?e:[String(o.id)]},[o,p,v]),re=C?C.live:!1,ie=A.data?A.data.last_time:C?C.last_time:null,ae=[A,j,M,ee].some(e=>e.loading&&e.data);return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(vI,{live:re,reducedMotion:e}),(0,$.jsx)(`a`,{className:`skip-link`,href:`#main`,children:`跳到主要内容`}),(0,$.jsxs)(`div`,{className:`shell`,children:[(0,$.jsx)(xI,{meta:C,filter:n,onFilter:P,live:re,lastTime:ie,refreshing:ae}),(0,$.jsx)(`main`,{id:`main`,children:T&&!C?(0,$.jsx)(rL,{message:T,onRetry:O}):(0,$.jsxs)($.Fragment,{children:[A.error&&!A.data?(0,$.jsx)(rL,{message:A.error,onRetry:A.retry}):A.data?(0,$.jsx)(wI,{summary:A.data,reduced:e}):(0,$.jsx)(`section`,{className:`kpis`,children:[0,1,2,3].map(e=>(0,$.jsx)(iL,{className:`kpi-sk`},e))}),(0,$.jsxs)(`div`,{className:`row-2`,children:[j.error&&!j.data?(0,$.jsx)(rL,{message:j.error,onRetry:j.retry}):j.data?(0,$.jsx)(AI,{data:j.data,reduced:e}):(0,$.jsx)(iL,{className:`panel-sk`}),A.data?(0,$.jsx)(NI,{summary:A.data,reduced:e,onPick:te}):(0,$.jsx)(iL,{className:`panel-sk`})]}),(0,$.jsxs)(`section`,{className:`panel glass tabs-panel`,ref:D,children:[(0,$.jsxs)(`div`,{className:`tabs`,role:`tablist`,"aria-label":`采集明细`,onKeyDown:e=>{if(e.key!==`ArrowLeft`&&e.key!==`ArrowRight`)return;let t=i===`coupon`?`keyword`:`coupon`;a(t),document.getElementById(`tab-`+t).focus()},children:[(0,$.jsxs)(`button`,{id:`tab-coupon`,role:`tab`,"aria-selected":i===`coupon`,"aria-controls":`panel-coupon`,tabIndex:i===`coupon`?0:-1,className:i===`coupon`?`on`:``,onClick:()=>a(`coupon`),children:[`优惠券`,M.data&&(0,$.jsx)(`span`,{className:`tab-count`,children:M.data.coupons.length})]}),(0,$.jsxs)(`button`,{id:`tab-keyword`,role:`tab`,"aria-selected":i===`keyword`,"aria-controls":`panel-keyword`,tabIndex:i===`keyword`?0:-1,className:i===`keyword`?`on`:``,onClick:()=>a(`keyword`),children:[`关键词搜索`,ee.data&&(0,$.jsx)(`span`,{className:`tab-count`,children:ee.data.keywords.length})]}),(0,$.jsx)(`span`,{className:`tab-ink`,style:{transform:i===`coupon`?`translateX(0)`:`translateX(100%)`},"aria-hidden":`true`})]}),i===`coupon`?M.error&&!M.data?(0,$.jsx)(rL,{message:M.error,onRetry:M.retry}):M.data?(0,$.jsx)(HI,{coupons:M.data.coupons,statusFilter:c,onStatusFilter:l,onOrder:_,onOpen:e=>s({kind:`coupon`,id:String(e)})}):(0,$.jsx)(`div`,{className:`grid-sk`,children:Array.from({length:6},(e,t)=>(0,$.jsx)(iL,{className:`coupon-sk`},t))}):ee.error&&!ee.data?(0,$.jsx)(rL,{message:ee.error,onRetry:ee.retry}):ee.data?(0,$.jsx)(XI,{keywords:ee.data.keywords,statusFilter:u,onStatusFilter:f,onOrder:y,onOpen:e=>s({kind:`keyword`,id:String(e)}),reduced:e}):(0,$.jsx)(iL,{className:`panel-sk`})]})]})}),(0,$.jsx)(`footer`,{className:`foot muted`,children:`数据每 30 秒自动同步(查看最新批次或包含今天的时间段时)`})]}),o&&(0,$.jsx)(eL,{kind:o.kind,id:o.id,ids:ne,onClose:()=>s(null),onMove:e=>e&&s({kind:o.kind,id:String(e)})})]})}(0,f.createRoot)(document.getElementById(`root`)).render((0,$.jsx)(aL,{}));