@databrainhq/plugin 0.7.6 → 0.7.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(Sr,B){typeof exports=="object"&&typeof module!="undefined"?B(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],B):(Sr=typeof globalThis!="undefined"?globalThis:Sr||self,B(Sr.Databrain={},Sr.React,Sr.ReactDOM))})(this,function(Sr,B,Hz){"use strict";function JS(r){return r&&typeof r=="object"&&"default"in r?r:{default:r}}function Gz(r){if(r&&r.__esModule)return r;var e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});return r&&Object.keys(r).forEach(function(t){if(t!=="default"){var n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:function(){return r[t]}})}}),e.default=r,Object.freeze(e)}var yy=Gz(B),pe=JS(B),Oh=JS(Hz);function my(r,e){return my=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},my(r,e)}function Bo(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,my(r,e)}var Wz=function(e,t){return e===void 0&&(e=[]),t===void 0&&(t=[]),e.length!==t.length||e.some(function(n,a){return!Object.is(n,t[a])})},eC={error:null},Uz=function(r){Bo(e,r);function e(){for(var n,a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=r.call.apply(r,[this].concat(i))||this,n.state=eC,n.resetErrorBoundary=function(){for(var s,l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];n.props.onReset==null||(s=n.props).onReset.apply(s,u),n.reset()},n}e.getDerivedStateFromError=function(a){return{error:a}};var t=e.prototype;return t.reset=function(){this.setState(eC)},t.componentDidCatch=function(a,i){var o,s;(o=(s=this.props).onError)==null||o.call(s,a,i)},t.componentDidUpdate=function(a,i){var o=this.state.error,s=this.props.resetKeys;if(o!==null&&i.error!==null&&Wz(a.resetKeys,s)){var l,u;(l=(u=this.props).onResetKeysChange)==null||l.call(u,a.resetKeys,s),this.reset()}},t.render=function(){var a=this.state.error,i=this.props,o=i.fallbackRender,s=i.FallbackComponent,l=i.fallback;if(a!==null){var u={error:a,resetErrorBoundary:this.resetErrorBoundary};if(yy.isValidElement(l))return l;if(typeof o=="function")return o(u);if(s)return yy.createElement(s,u);throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},e}(yy.Component),dl=function(){function r(){this.listeners=[]}var e=r.prototype;return e.subscribe=function(n){var a=this,i=n||function(){};return this.listeners.push(i),this.onSubscribe(),function(){a.listeners=a.listeners.filter(function(o){return o!==i}),a.onUnsubscribe()}},e.hasListeners=function(){return this.listeners.length>0},e.onSubscribe=function(){},e.onUnsubscribe=function(){},r}();function Ke(){return Ke=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},Ke.apply(this,arguments)}var Rh=typeof window=="undefined";function hr(){}function jz(r,e){return typeof r=="function"?r(e):r}function _y(r){return typeof r=="number"&&r>=0&&r!==1/0}function Nh(r){return Array.isArray(r)?r:[r]}function tC(r,e){return Math.max(r+(e||0)-Date.now(),0)}function kh(r,e,t){return qu(r)?typeof e=="function"?Ke({},t,{queryKey:r,queryFn:e}):Ke({},e,{queryKey:r}):r}function Yz(r,e,t){return qu(r)?typeof e=="function"?Ke({},t,{mutationKey:r,mutationFn:e}):Ke({},e,{mutationKey:r}):typeof r=="function"?Ke({},e,{mutationFn:r}):Ke({},r)}function Fi(r,e,t){return qu(r)?[Ke({},e,{queryKey:r}),t]:[r||{},e]}function qz(r,e){if(r===!0&&e===!0||r==null&&e==null)return"all";if(r===!1&&e===!1)return"none";var t=r!=null?r:!e;return t?"active":"inactive"}function rC(r,e){var t=r.active,n=r.exact,a=r.fetching,i=r.inactive,o=r.predicate,s=r.queryKey,l=r.stale;if(qu(s)){if(n){if(e.queryHash!==by(s,e.options))return!1}else if(!Bh(e.queryKey,s))return!1}var u=qz(t,i);if(u==="none")return!1;if(u!=="all"){var c=e.isActive();if(u==="active"&&!c||u==="inactive"&&c)return!1}return!(typeof l=="boolean"&&e.isStale()!==l||typeof a=="boolean"&&e.isFetching()!==a||o&&!o(e))}function nC(r,e){var t=r.exact,n=r.fetching,a=r.predicate,i=r.mutationKey;if(qu(i)){if(!e.options.mutationKey)return!1;if(t){if(zo(e.options.mutationKey)!==zo(i))return!1}else if(!Bh(e.options.mutationKey,i))return!1}return!(typeof n=="boolean"&&e.state.status==="loading"!==n||a&&!a(e))}function by(r,e){var t=(e==null?void 0:e.queryKeyHashFn)||zo;return t(r)}function zo(r){var e=Nh(r);return Zz(e)}function Zz(r){return JSON.stringify(r,function(e,t){return xy(t)?Object.keys(t).sort().reduce(function(n,a){return n[a]=t[a],n},{}):t})}function Bh(r,e){return aC(Nh(r),Nh(e))}function aC(r,e){return r===e?!0:typeof r!=typeof e?!1:r&&e&&typeof r=="object"&&typeof e=="object"?!Object.keys(e).some(function(t){return!aC(r[t],e[t])}):!1}function zh(r,e){if(r===e)return r;var t=Array.isArray(r)&&Array.isArray(e);if(t||xy(r)&&xy(e)){for(var n=t?r.length:Object.keys(r).length,a=t?e:Object.keys(e),i=a.length,o=t?[]:{},s=0,l=0;l<i;l++){var u=t?l:a[l];o[u]=zh(r[u],e[u]),o[u]===r[u]&&s++}return n===i&&s===n?r:o}return e}function Xz(r,e){if(r&&!e||e&&!r)return!1;for(var t in r)if(r[t]!==e[t])return!1;return!0}function xy(r){if(!iC(r))return!1;var e=r.constructor;if(typeof e=="undefined")return!0;var t=e.prototype;return!(!iC(t)||!t.hasOwnProperty("isPrototypeOf"))}function iC(r){return Object.prototype.toString.call(r)==="[object Object]"}function qu(r){return typeof r=="string"||Array.isArray(r)}function Qz(r){return new Promise(function(e){setTimeout(e,r)})}function oC(r){Promise.resolve().then(r).catch(function(e){return setTimeout(function(){throw e})})}function sC(){if(typeof AbortController=="function")return new AbortController}var Kz=function(r){Bo(e,r);function e(){var n;return n=r.call(this)||this,n.setup=function(a){var i;if(!Rh&&((i=window)==null?void 0:i.addEventListener)){var o=function(){return a()};return window.addEventListener("visibilitychange",o,!1),window.addEventListener("focus",o,!1),function(){window.removeEventListener("visibilitychange",o),window.removeEventListener("focus",o)}}},n}var t=e.prototype;return t.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},t.onUnsubscribe=function(){if(!this.hasListeners()){var a;(a=this.cleanup)==null||a.call(this),this.cleanup=void 0}},t.setEventListener=function(a){var i,o=this;this.setup=a,(i=this.cleanup)==null||i.call(this),this.cleanup=a(function(s){typeof s=="boolean"?o.setFocused(s):o.onFocus()})},t.setFocused=function(a){this.focused=a,a&&this.onFocus()},t.onFocus=function(){this.listeners.forEach(function(a){a()})},t.isFocused=function(){return typeof this.focused=="boolean"?this.focused:typeof document=="undefined"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)},e}(dl),Zu=new Kz,Jz=function(r){Bo(e,r);function e(){var n;return n=r.call(this)||this,n.setup=function(a){var i;if(!Rh&&((i=window)==null?void 0:i.addEventListener)){var o=function(){return a()};return window.addEventListener("online",o,!1),window.addEventListener("offline",o,!1),function(){window.removeEventListener("online",o),window.removeEventListener("offline",o)}}},n}var t=e.prototype;return t.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},t.onUnsubscribe=function(){if(!this.hasListeners()){var a;(a=this.cleanup)==null||a.call(this),this.cleanup=void 0}},t.setEventListener=function(a){var i,o=this;this.setup=a,(i=this.cleanup)==null||i.call(this),this.cleanup=a(function(s){typeof s=="boolean"?o.setOnline(s):o.onOnline()})},t.setOnline=function(a){this.online=a,a&&this.onOnline()},t.onOnline=function(){this.listeners.forEach(function(a){a()})},t.isOnline=function(){return typeof this.online=="boolean"?this.online:typeof navigator=="undefined"||typeof navigator.onLine=="undefined"?!0:navigator.onLine},e}(dl),Fh=new Jz;function e3(r){return Math.min(1e3*Math.pow(2,r),3e4)}function Vh(r){return typeof(r==null?void 0:r.cancel)=="function"}var lC=function(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent};function $h(r){return r instanceof lC}var uC=function(e){var t=this,n=!1,a,i,o,s;this.abort=e.abort,this.cancel=function(h){return a==null?void 0:a(h)},this.cancelRetry=function(){n=!0},this.continueRetry=function(){n=!1},this.continue=function(){return i==null?void 0:i()},this.failureCount=0,this.isPaused=!1,this.isResolved=!1,this.isTransportCancelable=!1,this.promise=new Promise(function(h,v){o=h,s=v});var l=function(v){t.isResolved||(t.isResolved=!0,e.onSuccess==null||e.onSuccess(v),i==null||i(),o(v))},u=function(v){t.isResolved||(t.isResolved=!0,e.onError==null||e.onError(v),i==null||i(),s(v))},c=function(){return new Promise(function(v){i=v,t.isPaused=!0,e.onPause==null||e.onPause()}).then(function(){i=void 0,t.isPaused=!1,e.onContinue==null||e.onContinue()})},f=function h(){if(!t.isResolved){var v;try{v=e.fn()}catch(d){v=Promise.reject(d)}a=function(p){if(!t.isResolved&&(u(new lC(p)),t.abort==null||t.abort(),Vh(v)))try{v.cancel()}catch{}},t.isTransportCancelable=Vh(v),Promise.resolve(v).then(l).catch(function(d){var p,g;if(!t.isResolved){var y=(p=e.retry)!=null?p:3,m=(g=e.retryDelay)!=null?g:e3,_=typeof m=="function"?m(t.failureCount,d):m,b=y===!0||typeof y=="number"&&t.failureCount<y||typeof y=="function"&&y(t.failureCount,d);if(n||!b){u(d);return}t.failureCount++,e.onFail==null||e.onFail(t.failureCount,d),Qz(_).then(function(){if(!Zu.isFocused()||!Fh.isOnline())return c()}).then(function(){n?u(d):h()})}})}};f()},t3=function(){function r(){this.queue=[],this.transactions=0,this.notifyFn=function(t){t()},this.batchNotifyFn=function(t){t()}}var e=r.prototype;return e.batch=function(n){var a;this.transactions++;try{a=n()}finally{this.transactions--,this.transactions||this.flush()}return a},e.schedule=function(n){var a=this;this.transactions?this.queue.push(n):oC(function(){a.notifyFn(n)})},e.batchCalls=function(n){var a=this;return function(){for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];a.schedule(function(){n.apply(void 0,o)})}},e.flush=function(){var n=this,a=this.queue;this.queue=[],a.length&&oC(function(){n.batchNotifyFn(function(){a.forEach(function(i){n.notifyFn(i)})})})},e.setNotifyFunction=function(n){this.notifyFn=n},e.setBatchNotifyFunction=function(n){this.batchNotifyFn=n},r}(),Dt=new t3,cC=console;function Hh(){return cC}function r3(r){cC=r}var n3=function(){function r(t){this.abortSignalConsumed=!1,this.hadObservers=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||this.getDefaultState(this.options),this.state=this.initialState,this.meta=t.meta,this.scheduleGc()}var e=r.prototype;return e.setOptions=function(n){var a;this.options=Ke({},this.defaultOptions,n),this.meta=n==null?void 0:n.meta,this.cacheTime=Math.max(this.cacheTime||0,(a=this.options.cacheTime)!=null?a:5*60*1e3)},e.setDefaultOptions=function(n){this.defaultOptions=n},e.scheduleGc=function(){var n=this;this.clearGcTimeout(),_y(this.cacheTime)&&(this.gcTimeout=setTimeout(function(){n.optionalRemove()},this.cacheTime))},e.clearGcTimeout=function(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)},e.optionalRemove=function(){this.observers.length||(this.state.isFetching?this.hadObservers&&this.scheduleGc():this.cache.remove(this))},e.setData=function(n,a){var i,o,s=this.state.data,l=jz(n,s);return(i=(o=this.options).isDataEqual)!=null&&i.call(o,s,l)?l=s:this.options.structuralSharing!==!1&&(l=zh(s,l)),this.dispatch({data:l,type:"success",dataUpdatedAt:a==null?void 0:a.updatedAt}),l},e.setState=function(n,a){this.dispatch({type:"setState",state:n,setStateOptions:a})},e.cancel=function(n){var a,i=this.promise;return(a=this.retryer)==null||a.cancel(n),i?i.then(hr).catch(hr):Promise.resolve()},e.destroy=function(){this.clearGcTimeout(),this.cancel({silent:!0})},e.reset=function(){this.destroy(),this.setState(this.initialState)},e.isActive=function(){return this.observers.some(function(n){return n.options.enabled!==!1})},e.isFetching=function(){return this.state.isFetching},e.isStale=function(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(function(n){return n.getCurrentResult().isStale})},e.isStaleByTime=function(n){return n===void 0&&(n=0),this.state.isInvalidated||!this.state.dataUpdatedAt||!tC(this.state.dataUpdatedAt,n)},e.onFocus=function(){var n,a=this.observers.find(function(i){return i.shouldFetchOnWindowFocus()});a&&a.refetch(),(n=this.retryer)==null||n.continue()},e.onOnline=function(){var n,a=this.observers.find(function(i){return i.shouldFetchOnReconnect()});a&&a.refetch(),(n=this.retryer)==null||n.continue()},e.addObserver=function(n){this.observers.indexOf(n)===-1&&(this.observers.push(n),this.hadObservers=!0,this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:n}))},e.removeObserver=function(n){this.observers.indexOf(n)!==-1&&(this.observers=this.observers.filter(function(a){return a!==n}),this.observers.length||(this.retryer&&(this.retryer.isTransportCancelable||this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.cacheTime?this.scheduleGc():this.cache.remove(this)),this.cache.notify({type:"observerRemoved",query:this,observer:n}))},e.getObserversCount=function(){return this.observers.length},e.invalidate=function(){this.state.isInvalidated||this.dispatch({type:"invalidate"})},e.fetch=function(n,a){var i=this,o,s,l;if(this.state.isFetching){if(this.state.dataUpdatedAt&&(a==null?void 0:a.cancelRefetch))this.cancel({silent:!0});else if(this.promise){var u;return(u=this.retryer)==null||u.continueRetry(),this.promise}}if(n&&this.setOptions(n),!this.options.queryFn){var c=this.observers.find(function(m){return m.options.queryFn});c&&this.setOptions(c.options)}var f=Nh(this.queryKey),h=sC(),v={queryKey:f,pageParam:void 0,meta:this.meta};Object.defineProperty(v,"signal",{enumerable:!0,get:function(){if(h)return i.abortSignalConsumed=!0,h.signal}});var d=function(){return i.options.queryFn?(i.abortSignalConsumed=!1,i.options.queryFn(v)):Promise.reject("Missing queryFn")},p={fetchOptions:a,options:this.options,queryKey:f,state:this.state,fetchFn:d,meta:this.meta};if((o=this.options.behavior)!=null&&o.onFetch){var g;(g=this.options.behavior)==null||g.onFetch(p)}if(this.revertState=this.state,!this.state.isFetching||this.state.fetchMeta!==((s=p.fetchOptions)==null?void 0:s.meta)){var y;this.dispatch({type:"fetch",meta:(y=p.fetchOptions)==null?void 0:y.meta})}return this.retryer=new uC({fn:p.fetchFn,abort:h==null||(l=h.abort)==null?void 0:l.bind(h),onSuccess:function(_){i.setData(_),i.cache.config.onSuccess==null||i.cache.config.onSuccess(_,i),i.cacheTime===0&&i.optionalRemove()},onError:function(_){$h(_)&&_.silent||i.dispatch({type:"error",error:_}),$h(_)||(i.cache.config.onError==null||i.cache.config.onError(_,i),Hh().error(_)),i.cacheTime===0&&i.optionalRemove()},onFail:function(){i.dispatch({type:"failed"})},onPause:function(){i.dispatch({type:"pause"})},onContinue:function(){i.dispatch({type:"continue"})},retry:p.options.retry,retryDelay:p.options.retryDelay}),this.promise=this.retryer.promise,this.promise},e.dispatch=function(n){var a=this;this.state=this.reducer(this.state,n),Dt.batch(function(){a.observers.forEach(function(i){i.onQueryUpdate(n)}),a.cache.notify({query:a,type:"queryUpdated",action:n})})},e.getDefaultState=function(n){var a=typeof n.initialData=="function"?n.initialData():n.initialData,i=typeof n.initialData!="undefined",o=i?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0,s=typeof a!="undefined";return{data:a,dataUpdateCount:0,dataUpdatedAt:s?o!=null?o:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchMeta:null,isFetching:!1,isInvalidated:!1,isPaused:!1,status:s?"success":"idle"}},e.reducer=function(n,a){var i,o;switch(a.type){case"failed":return Ke({},n,{fetchFailureCount:n.fetchFailureCount+1});case"pause":return Ke({},n,{isPaused:!0});case"continue":return Ke({},n,{isPaused:!1});case"fetch":return Ke({},n,{fetchFailureCount:0,fetchMeta:(i=a.meta)!=null?i:null,isFetching:!0,isPaused:!1},!n.dataUpdatedAt&&{error:null,status:"loading"});case"success":return Ke({},n,{data:a.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:(o=a.dataUpdatedAt)!=null?o:Date.now(),error:null,fetchFailureCount:0,isFetching:!1,isInvalidated:!1,isPaused:!1,status:"success"});case"error":var s=a.error;return $h(s)&&s.revert&&this.revertState?Ke({},this.revertState):Ke({},n,{error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return Ke({},n,{isInvalidated:!0});case"setState":return Ke({},n,a.state);default:return n}},r}(),a3=function(r){Bo(e,r);function e(n){var a;return a=r.call(this)||this,a.config=n||{},a.queries=[],a.queriesMap={},a}var t=e.prototype;return t.build=function(a,i,o){var s,l=i.queryKey,u=(s=i.queryHash)!=null?s:by(l,i),c=this.get(u);return c||(c=new n3({cache:this,queryKey:l,queryHash:u,options:a.defaultQueryOptions(i),state:o,defaultOptions:a.getQueryDefaults(l),meta:i.meta}),this.add(c)),c},t.add=function(a){this.queriesMap[a.queryHash]||(this.queriesMap[a.queryHash]=a,this.queries.push(a),this.notify({type:"queryAdded",query:a}))},t.remove=function(a){var i=this.queriesMap[a.queryHash];i&&(a.destroy(),this.queries=this.queries.filter(function(o){return o!==a}),i===a&&delete this.queriesMap[a.queryHash],this.notify({type:"queryRemoved",query:a}))},t.clear=function(){var a=this;Dt.batch(function(){a.queries.forEach(function(i){a.remove(i)})})},t.get=function(a){return this.queriesMap[a]},t.getAll=function(){return this.queries},t.find=function(a,i){var o=Fi(a,i),s=o[0];return typeof s.exact=="undefined"&&(s.exact=!0),this.queries.find(function(l){return rC(s,l)})},t.findAll=function(a,i){var o=Fi(a,i),s=o[0];return Object.keys(s).length>0?this.queries.filter(function(l){return rC(s,l)}):this.queries},t.notify=function(a){var i=this;Dt.batch(function(){i.listeners.forEach(function(o){o(a)})})},t.onFocus=function(){var a=this;Dt.batch(function(){a.queries.forEach(function(i){i.onFocus()})})},t.onOnline=function(){var a=this;Dt.batch(function(){a.queries.forEach(function(i){i.onOnline()})})},e}(dl),i3=function(){function r(t){this.options=Ke({},t.defaultOptions,t.options),this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.observers=[],this.state=t.state||fC(),this.meta=t.meta}var e=r.prototype;return e.setState=function(n){this.dispatch({type:"setState",state:n})},e.addObserver=function(n){this.observers.indexOf(n)===-1&&this.observers.push(n)},e.removeObserver=function(n){this.observers=this.observers.filter(function(a){return a!==n})},e.cancel=function(){return this.retryer?(this.retryer.cancel(),this.retryer.promise.then(hr).catch(hr)):Promise.resolve()},e.continue=function(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()},e.execute=function(){var n=this,a,i=this.state.status==="loading",o=Promise.resolve();return i||(this.dispatch({type:"loading",variables:this.options.variables}),o=o.then(function(){n.mutationCache.config.onMutate==null||n.mutationCache.config.onMutate(n.state.variables,n)}).then(function(){return n.options.onMutate==null?void 0:n.options.onMutate(n.state.variables)}).then(function(s){s!==n.state.context&&n.dispatch({type:"loading",context:s,variables:n.state.variables})})),o.then(function(){return n.executeMutation()}).then(function(s){a=s,n.mutationCache.config.onSuccess==null||n.mutationCache.config.onSuccess(a,n.state.variables,n.state.context,n)}).then(function(){return n.options.onSuccess==null?void 0:n.options.onSuccess(a,n.state.variables,n.state.context)}).then(function(){return n.options.onSettled==null?void 0:n.options.onSettled(a,null,n.state.variables,n.state.context)}).then(function(){return n.dispatch({type:"success",data:a}),a}).catch(function(s){return n.mutationCache.config.onError==null||n.mutationCache.config.onError(s,n.state.variables,n.state.context,n),Hh().error(s),Promise.resolve().then(function(){return n.options.onError==null?void 0:n.options.onError(s,n.state.variables,n.state.context)}).then(function(){return n.options.onSettled==null?void 0:n.options.onSettled(void 0,s,n.state.variables,n.state.context)}).then(function(){throw n.dispatch({type:"error",error:s}),s})})},e.executeMutation=function(){var n=this,a;return this.retryer=new uC({fn:function(){return n.options.mutationFn?n.options.mutationFn(n.state.variables):Promise.reject("No mutationFn found")},onFail:function(){n.dispatch({type:"failed"})},onPause:function(){n.dispatch({type:"pause"})},onContinue:function(){n.dispatch({type:"continue"})},retry:(a=this.options.retry)!=null?a:0,retryDelay:this.options.retryDelay}),this.retryer.promise},e.dispatch=function(n){var a=this;this.state=o3(this.state,n),Dt.batch(function(){a.observers.forEach(function(i){i.onMutationUpdate(n)}),a.mutationCache.notify(a)})},r}();function fC(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}function o3(r,e){switch(e.type){case"failed":return Ke({},r,{failureCount:r.failureCount+1});case"pause":return Ke({},r,{isPaused:!0});case"continue":return Ke({},r,{isPaused:!1});case"loading":return Ke({},r,{context:e.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:e.variables});case"success":return Ke({},r,{data:e.data,error:null,status:"success",isPaused:!1});case"error":return Ke({},r,{data:void 0,error:e.error,failureCount:r.failureCount+1,isPaused:!1,status:"error"});case"setState":return Ke({},r,e.state);default:return r}}var s3=function(r){Bo(e,r);function e(n){var a;return a=r.call(this)||this,a.config=n||{},a.mutations=[],a.mutationId=0,a}var t=e.prototype;return t.build=function(a,i,o){var s=new i3({mutationCache:this,mutationId:++this.mutationId,options:a.defaultMutationOptions(i),state:o,defaultOptions:i.mutationKey?a.getMutationDefaults(i.mutationKey):void 0,meta:i.meta});return this.add(s),s},t.add=function(a){this.mutations.push(a),this.notify(a)},t.remove=function(a){this.mutations=this.mutations.filter(function(i){return i!==a}),a.cancel(),this.notify(a)},t.clear=function(){var a=this;Dt.batch(function(){a.mutations.forEach(function(i){a.remove(i)})})},t.getAll=function(){return this.mutations},t.find=function(a){return typeof a.exact=="undefined"&&(a.exact=!0),this.mutations.find(function(i){return nC(a,i)})},t.findAll=function(a){return this.mutations.filter(function(i){return nC(a,i)})},t.notify=function(a){var i=this;Dt.batch(function(){i.listeners.forEach(function(o){o(a)})})},t.onFocus=function(){this.resumePausedMutations()},t.onOnline=function(){this.resumePausedMutations()},t.resumePausedMutations=function(){var a=this.mutations.filter(function(i){return i.state.isPaused});return Dt.batch(function(){return a.reduce(function(i,o){return i.then(function(){return o.continue().catch(hr)})},Promise.resolve())})},e}(dl);function l3(){return{onFetch:function(e){e.fetchFn=function(){var t,n,a,i,o,s,l=(t=e.fetchOptions)==null||(n=t.meta)==null?void 0:n.refetchPage,u=(a=e.fetchOptions)==null||(i=a.meta)==null?void 0:i.fetchMore,c=u==null?void 0:u.pageParam,f=(u==null?void 0:u.direction)==="forward",h=(u==null?void 0:u.direction)==="backward",v=((o=e.state.data)==null?void 0:o.pages)||[],d=((s=e.state.data)==null?void 0:s.pageParams)||[],p=sC(),g=p==null?void 0:p.signal,y=d,m=!1,_=e.options.queryFn||function(){return Promise.reject("Missing queryFn")},b=function(E,O,N,V){return y=V?[O].concat(y):[].concat(y,[O]),V?[N].concat(E):[].concat(E,[N])},w=function(E,O,N,V){if(m)return Promise.reject("Cancelled");if(typeof N=="undefined"&&!O&&E.length)return Promise.resolve(E);var $={queryKey:e.queryKey,signal:g,pageParam:N,meta:e.meta},U=_($),Y=Promise.resolve(U).then(function(H){return b(E,N,H,V)});if(Vh(U)){var ae=Y;ae.cancel=U.cancel}return Y},x;if(!v.length)x=w([]);else if(f){var S=typeof c!="undefined",T=S?c:hC(e.options,v);x=w(v,S,T)}else if(h){var D=typeof c!="undefined",M=D?c:u3(e.options,v);x=w(v,D,M,!0)}else(function(){y=[];var P=typeof e.options.getNextPageParam=="undefined",E=l&&v[0]?l(v[0],0,v):!0;x=E?w([],P,d[0]):Promise.resolve(b([],d[0],v[0]));for(var O=function($){x=x.then(function(U){var Y=l&&v[$]?l(v[$],$,v):!0;if(Y){var ae=P?d[$]:hC(e.options,U);return w(U,P,ae)}return Promise.resolve(b(U,d[$],v[$]))})},N=1;N<v.length;N++)O(N)})();var A=x.then(function(P){return{pages:P,pageParams:y}}),I=A;return I.cancel=function(){m=!0,p==null||p.abort(),Vh(x)&&x.cancel()},A}}}}function hC(r,e){return r.getNextPageParam==null?void 0:r.getNextPageParam(e[e.length-1],e)}function u3(r,e){return r.getPreviousPageParam==null?void 0:r.getPreviousPageParam(e[0],e)}var c3=function(){function r(t){t===void 0&&(t={}),this.queryCache=t.queryCache||new a3,this.mutationCache=t.mutationCache||new s3,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var e=r.prototype;return e.mount=function(){var n=this;this.unsubscribeFocus=Zu.subscribe(function(){Zu.isFocused()&&Fh.isOnline()&&(n.mutationCache.onFocus(),n.queryCache.onFocus())}),this.unsubscribeOnline=Fh.subscribe(function(){Zu.isFocused()&&Fh.isOnline()&&(n.mutationCache.onOnline(),n.queryCache.onOnline())})},e.unmount=function(){var n,a;(n=this.unsubscribeFocus)==null||n.call(this),(a=this.unsubscribeOnline)==null||a.call(this)},e.isFetching=function(n,a){var i=Fi(n,a),o=i[0];return o.fetching=!0,this.queryCache.findAll(o).length},e.isMutating=function(n){return this.mutationCache.findAll(Ke({},n,{fetching:!0})).length},e.getQueryData=function(n,a){var i;return(i=this.queryCache.find(n,a))==null?void 0:i.state.data},e.getQueriesData=function(n){return this.getQueryCache().findAll(n).map(function(a){var i=a.queryKey,o=a.state,s=o.data;return[i,s]})},e.setQueryData=function(n,a,i){var o=kh(n),s=this.defaultQueryOptions(o);return this.queryCache.build(this,s).setData(a,i)},e.setQueriesData=function(n,a,i){var o=this;return Dt.batch(function(){return o.getQueryCache().findAll(n).map(function(s){var l=s.queryKey;return[l,o.setQueryData(l,a,i)]})})},e.getQueryState=function(n,a){var i;return(i=this.queryCache.find(n,a))==null?void 0:i.state},e.removeQueries=function(n,a){var i=Fi(n,a),o=i[0],s=this.queryCache;Dt.batch(function(){s.findAll(o).forEach(function(l){s.remove(l)})})},e.resetQueries=function(n,a,i){var o=this,s=Fi(n,a,i),l=s[0],u=s[1],c=this.queryCache,f=Ke({},l,{active:!0});return Dt.batch(function(){return c.findAll(l).forEach(function(h){h.reset()}),o.refetchQueries(f,u)})},e.cancelQueries=function(n,a,i){var o=this,s=Fi(n,a,i),l=s[0],u=s[1],c=u===void 0?{}:u;typeof c.revert=="undefined"&&(c.revert=!0);var f=Dt.batch(function(){return o.queryCache.findAll(l).map(function(h){return h.cancel(c)})});return Promise.all(f).then(hr).catch(hr)},e.invalidateQueries=function(n,a,i){var o,s,l,u=this,c=Fi(n,a,i),f=c[0],h=c[1],v=Ke({},f,{active:(o=(s=f.refetchActive)!=null?s:f.active)!=null?o:!0,inactive:(l=f.refetchInactive)!=null?l:!1});return Dt.batch(function(){return u.queryCache.findAll(f).forEach(function(d){d.invalidate()}),u.refetchQueries(v,h)})},e.refetchQueries=function(n,a,i){var o=this,s=Fi(n,a,i),l=s[0],u=s[1],c=Dt.batch(function(){return o.queryCache.findAll(l).map(function(h){return h.fetch(void 0,Ke({},u,{meta:{refetchPage:l==null?void 0:l.refetchPage}}))})}),f=Promise.all(c).then(hr);return u!=null&&u.throwOnError||(f=f.catch(hr)),f},e.fetchQuery=function(n,a,i){var o=kh(n,a,i),s=this.defaultQueryOptions(o);typeof s.retry=="undefined"&&(s.retry=!1);var l=this.queryCache.build(this,s);return l.isStaleByTime(s.staleTime)?l.fetch(s):Promise.resolve(l.state.data)},e.prefetchQuery=function(n,a,i){return this.fetchQuery(n,a,i).then(hr).catch(hr)},e.fetchInfiniteQuery=function(n,a,i){var o=kh(n,a,i);return o.behavior=l3(),this.fetchQuery(o)},e.prefetchInfiniteQuery=function(n,a,i){return this.fetchInfiniteQuery(n,a,i).then(hr).catch(hr)},e.cancelMutations=function(){var n=this,a=Dt.batch(function(){return n.mutationCache.getAll().map(function(i){return i.cancel()})});return Promise.all(a).then(hr).catch(hr)},e.resumePausedMutations=function(){return this.getMutationCache().resumePausedMutations()},e.executeMutation=function(n){return this.mutationCache.build(this,n).execute()},e.getQueryCache=function(){return this.queryCache},e.getMutationCache=function(){return this.mutationCache},e.getDefaultOptions=function(){return this.defaultOptions},e.setDefaultOptions=function(n){this.defaultOptions=n},e.setQueryDefaults=function(n,a){var i=this.queryDefaults.find(function(o){return zo(n)===zo(o.queryKey)});i?i.defaultOptions=a:this.queryDefaults.push({queryKey:n,defaultOptions:a})},e.getQueryDefaults=function(n){var a;return n?(a=this.queryDefaults.find(function(i){return Bh(n,i.queryKey)}))==null?void 0:a.defaultOptions:void 0},e.setMutationDefaults=function(n,a){var i=this.mutationDefaults.find(function(o){return zo(n)===zo(o.mutationKey)});i?i.defaultOptions=a:this.mutationDefaults.push({mutationKey:n,defaultOptions:a})},e.getMutationDefaults=function(n){var a;return n?(a=this.mutationDefaults.find(function(i){return Bh(n,i.mutationKey)}))==null?void 0:a.defaultOptions:void 0},e.defaultQueryOptions=function(n){if(n!=null&&n._defaulted)return n;var a=Ke({},this.defaultOptions.queries,this.getQueryDefaults(n==null?void 0:n.queryKey),n,{_defaulted:!0});return!a.queryHash&&a.queryKey&&(a.queryHash=by(a.queryKey,a)),a},e.defaultQueryObserverOptions=function(n){return this.defaultQueryOptions(n)},e.defaultMutationOptions=function(n){return n!=null&&n._defaulted?n:Ke({},this.defaultOptions.mutations,this.getMutationDefaults(n==null?void 0:n.mutationKey),n,{_defaulted:!0})},e.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},r}(),f3=function(r){Bo(e,r);function e(n,a){var i;return i=r.call(this)||this,i.client=n,i.options=a,i.trackedProps=[],i.selectError=null,i.bindMethods(),i.setOptions(a),i}var t=e.prototype;return t.bindMethods=function(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)},t.onSubscribe=function(){this.listeners.length===1&&(this.currentQuery.addObserver(this),vC(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},t.onUnsubscribe=function(){this.listeners.length||this.destroy()},t.shouldFetchOnReconnect=function(){return wy(this.currentQuery,this.options,this.options.refetchOnReconnect)},t.shouldFetchOnWindowFocus=function(){return wy(this.currentQuery,this.options,this.options.refetchOnWindowFocus)},t.destroy=function(){this.listeners=[],this.clearTimers(),this.currentQuery.removeObserver(this)},t.setOptions=function(a,i){var o=this.options,s=this.currentQuery;if(this.options=this.client.defaultQueryObserverOptions(a),typeof this.options.enabled!="undefined"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=o.queryKey),this.updateQuery();var l=this.hasListeners();l&&dC(this.currentQuery,s,this.options,o)&&this.executeFetch(),this.updateResult(i),l&&(this.currentQuery!==s||this.options.enabled!==o.enabled||this.options.staleTime!==o.staleTime)&&this.updateStaleTimeout();var u=this.computeRefetchInterval();l&&(this.currentQuery!==s||this.options.enabled!==o.enabled||u!==this.currentRefetchInterval)&&this.updateRefetchInterval(u)},t.getOptimisticResult=function(a){var i=this.client.defaultQueryObserverOptions(a),o=this.client.getQueryCache().build(this.client,i);return this.createResult(o,i)},t.getCurrentResult=function(){return this.currentResult},t.trackResult=function(a,i){var o=this,s={},l=function(c){o.trackedProps.includes(c)||o.trackedProps.push(c)};return Object.keys(a).forEach(function(u){Object.defineProperty(s,u,{configurable:!1,enumerable:!0,get:function(){return l(u),a[u]}})}),(i.useErrorBoundary||i.suspense)&&l("error"),s},t.getNextResult=function(a){var i=this;return new Promise(function(o,s){var l=i.subscribe(function(u){u.isFetching||(l(),u.isError&&(a==null?void 0:a.throwOnError)?s(u.error):o(u))})})},t.getCurrentQuery=function(){return this.currentQuery},t.remove=function(){this.client.getQueryCache().remove(this.currentQuery)},t.refetch=function(a){return this.fetch(Ke({},a,{meta:{refetchPage:a==null?void 0:a.refetchPage}}))},t.fetchOptimistic=function(a){var i=this,o=this.client.defaultQueryObserverOptions(a),s=this.client.getQueryCache().build(this.client,o);return s.fetch().then(function(){return i.createResult(s,o)})},t.fetch=function(a){var i=this;return this.executeFetch(a).then(function(){return i.updateResult(),i.currentResult})},t.executeFetch=function(a){this.updateQuery();var i=this.currentQuery.fetch(this.options,a);return a!=null&&a.throwOnError||(i=i.catch(hr)),i},t.updateStaleTimeout=function(){var a=this;if(this.clearStaleTimeout(),!(Rh||this.currentResult.isStale||!_y(this.options.staleTime))){var i=tC(this.currentResult.dataUpdatedAt,this.options.staleTime),o=i+1;this.staleTimeoutId=setTimeout(function(){a.currentResult.isStale||a.updateResult()},o)}},t.computeRefetchInterval=function(){var a;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(a=this.options.refetchInterval)!=null?a:!1},t.updateRefetchInterval=function(a){var i=this;this.clearRefetchInterval(),this.currentRefetchInterval=a,!(Rh||this.options.enabled===!1||!_y(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(function(){(i.options.refetchIntervalInBackground||Zu.isFocused())&&i.executeFetch()},this.currentRefetchInterval))},t.updateTimers=function(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())},t.clearTimers=function(){this.clearStaleTimeout(),this.clearRefetchInterval()},t.clearStaleTimeout=function(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)},t.clearRefetchInterval=function(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)},t.createResult=function(a,i){var o=this.currentQuery,s=this.options,l=this.currentResult,u=this.currentResultState,c=this.currentResultOptions,f=a!==o,h=f?a.state:this.currentQueryInitialState,v=f?this.currentResult:this.previousQueryResult,d=a.state,p=d.dataUpdatedAt,g=d.error,y=d.errorUpdatedAt,m=d.isFetching,_=d.status,b=!1,w=!1,x;if(i.optimisticResults){var S=this.hasListeners(),T=!S&&vC(a,i),D=S&&dC(a,o,i,s);(T||D)&&(m=!0,p||(_="loading"))}if(i.keepPreviousData&&!d.dataUpdateCount&&(v==null?void 0:v.isSuccess)&&_!=="error")x=v.data,p=v.dataUpdatedAt,_=v.status,b=!0;else if(i.select&&typeof d.data!="undefined")if(l&&d.data===(u==null?void 0:u.data)&&i.select===this.selectFn)x=this.selectResult;else try{this.selectFn=i.select,x=i.select(d.data),i.structuralSharing!==!1&&(x=zh(l==null?void 0:l.data,x)),this.selectResult=x,this.selectError=null}catch(I){Hh().error(I),this.selectError=I}else x=d.data;if(typeof i.placeholderData!="undefined"&&typeof x=="undefined"&&(_==="loading"||_==="idle")){var M;if((l==null?void 0:l.isPlaceholderData)&&i.placeholderData===(c==null?void 0:c.placeholderData))M=l.data;else if(M=typeof i.placeholderData=="function"?i.placeholderData():i.placeholderData,i.select&&typeof M!="undefined")try{M=i.select(M),i.structuralSharing!==!1&&(M=zh(l==null?void 0:l.data,M)),this.selectError=null}catch(I){Hh().error(I),this.selectError=I}typeof M!="undefined"&&(_="success",x=M,w=!0)}this.selectError&&(g=this.selectError,x=this.selectResult,y=Date.now(),_="error");var A={status:_,isLoading:_==="loading",isSuccess:_==="success",isError:_==="error",isIdle:_==="idle",data:x,dataUpdatedAt:p,error:g,errorUpdatedAt:y,failureCount:d.fetchFailureCount,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>h.dataUpdateCount||d.errorUpdateCount>h.errorUpdateCount,isFetching:m,isRefetching:m&&_!=="loading",isLoadingError:_==="error"&&d.dataUpdatedAt===0,isPlaceholderData:w,isPreviousData:b,isRefetchError:_==="error"&&d.dataUpdatedAt!==0,isStale:Sy(a,i),refetch:this.refetch,remove:this.remove};return A},t.shouldNotifyListeners=function(a,i){if(!i)return!0;var o=this.options,s=o.notifyOnChangeProps,l=o.notifyOnChangePropsExclusions;if(!s&&!l||s==="tracked"&&!this.trackedProps.length)return!0;var u=s==="tracked"?this.trackedProps:s;return Object.keys(a).some(function(c){var f=c,h=a[f]!==i[f],v=u==null?void 0:u.some(function(p){return p===c}),d=l==null?void 0:l.some(function(p){return p===c});return h&&!d&&(!u||v)})},t.updateResult=function(a){var i=this.currentResult;if(this.currentResult=this.createResult(this.currentQuery,this.options),this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,!Xz(this.currentResult,i)){var o={cache:!0};(a==null?void 0:a.listeners)!==!1&&this.shouldNotifyListeners(this.currentResult,i)&&(o.listeners=!0),this.notify(Ke({},o,a))}},t.updateQuery=function(){var a=this.client.getQueryCache().build(this.client,this.options);if(a!==this.currentQuery){var i=this.currentQuery;this.currentQuery=a,this.currentQueryInitialState=a.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(i==null||i.removeObserver(this),a.addObserver(this))}},t.onQueryUpdate=function(a){var i={};a.type==="success"?i.onSuccess=!0:a.type==="error"&&!$h(a.error)&&(i.onError=!0),this.updateResult(i),this.hasListeners()&&this.updateTimers()},t.notify=function(a){var i=this;Dt.batch(function(){a.onSuccess?(i.options.onSuccess==null||i.options.onSuccess(i.currentResult.data),i.options.onSettled==null||i.options.onSettled(i.currentResult.data,null)):a.onError&&(i.options.onError==null||i.options.onError(i.currentResult.error),i.options.onSettled==null||i.options.onSettled(void 0,i.currentResult.error)),a.listeners&&i.listeners.forEach(function(o){o(i.currentResult)}),a.cache&&i.client.getQueryCache().notify({query:i.currentQuery,type:"observerResultsUpdated"})})},e}(dl);function h3(r,e){return e.enabled!==!1&&!r.state.dataUpdatedAt&&!(r.state.status==="error"&&e.retryOnMount===!1)}function vC(r,e){return h3(r,e)||r.state.dataUpdatedAt>0&&wy(r,e,e.refetchOnMount)}function wy(r,e,t){if(e.enabled!==!1){var n=typeof t=="function"?t(r):t;return n==="always"||n!==!1&&Sy(r,e)}return!1}function dC(r,e,t,n){return t.enabled!==!1&&(r!==e||n.enabled===!1)&&(!t.suspense||r.state.status!=="error")&&Sy(r,t)}function Sy(r,e){return r.isStaleByTime(e.staleTime)}var v3=function(r){Bo(e,r);function e(n,a){var i;return i=r.call(this)||this,i.client=n,i.setOptions(a),i.bindMethods(),i.updateResult(),i}var t=e.prototype;return t.bindMethods=function(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)},t.setOptions=function(a){this.options=this.client.defaultMutationOptions(a)},t.onUnsubscribe=function(){if(!this.listeners.length){var a;(a=this.currentMutation)==null||a.removeObserver(this)}},t.onMutationUpdate=function(a){this.updateResult();var i={listeners:!0};a.type==="success"?i.onSuccess=!0:a.type==="error"&&(i.onError=!0),this.notify(i)},t.getCurrentResult=function(){return this.currentResult},t.reset=function(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})},t.mutate=function(a,i){return this.mutateOptions=i,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,Ke({},this.options,{variables:typeof a!="undefined"?a:this.options.variables})),this.currentMutation.addObserver(this),this.currentMutation.execute()},t.updateResult=function(){var a=this.currentMutation?this.currentMutation.state:fC(),i=Ke({},a,{isLoading:a.status==="loading",isSuccess:a.status==="success",isError:a.status==="error",isIdle:a.status==="idle",mutate:this.mutate,reset:this.reset});this.currentResult=i},t.notify=function(a){var i=this;Dt.batch(function(){i.mutateOptions&&(a.onSuccess?(i.mutateOptions.onSuccess==null||i.mutateOptions.onSuccess(i.currentResult.data,i.currentResult.variables,i.currentResult.context),i.mutateOptions.onSettled==null||i.mutateOptions.onSettled(i.currentResult.data,null,i.currentResult.variables,i.currentResult.context)):a.onError&&(i.mutateOptions.onError==null||i.mutateOptions.onError(i.currentResult.error,i.currentResult.variables,i.currentResult.context),i.mutateOptions.onSettled==null||i.mutateOptions.onSettled(void 0,i.currentResult.error,i.currentResult.variables,i.currentResult.context))),a.listeners&&i.listeners.forEach(function(o){o(i.currentResult)})})},e}(dl),d3=Oh.default.unstable_batchedUpdates;Dt.setBatchNotifyFunction(d3);var p3=console;r3(p3);var pC=pe.default.createContext(void 0),gC=pe.default.createContext(!1);function yC(r){return r&&typeof window!="undefined"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=pC),window.ReactQueryClientContext):pC}var mC=function(){var e=pe.default.useContext(yC(pe.default.useContext(gC)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},g3=function(e){var t=e.client,n=e.contextSharing,a=n===void 0?!1:n,i=e.children;pe.default.useEffect(function(){return t.mount(),function(){t.unmount()}},[t]);var o=yC(a);return pe.default.createElement(gC.Provider,{value:a},pe.default.createElement(o.Provider,{value:t},i))};function y3(){var r=!1;return{clearReset:function(){r=!1},reset:function(){r=!0},isReset:function(){return r}}}var m3=pe.default.createContext(y3()),_3=function(){return pe.default.useContext(m3)};function _C(r,e,t){return typeof e=="function"?e.apply(void 0,t):typeof e=="boolean"?e:!!r}function pl(r,e,t){var n=pe.default.useRef(!1),a=pe.default.useState(0),i=a[1],o=Yz(r,e,t),s=mC(),l=pe.default.useRef();l.current?l.current.setOptions(o):l.current=new v3(s,o);var u=l.current.getCurrentResult();pe.default.useEffect(function(){n.current=!0;var f=l.current.subscribe(Dt.batchCalls(function(){n.current&&i(function(h){return h+1})}));return function(){n.current=!1,f()}},[]);var c=pe.default.useCallback(function(f,h){l.current.mutate(f,h).catch(hr)},[]);if(u.error&&_C(void 0,l.current.options.useErrorBoundary,[u.error]))throw u.error;return Ke({},u,{mutate:c,mutateAsync:u.mutate})}function b3(r,e){var t=pe.default.useRef(!1),n=pe.default.useState(0),a=n[1],i=mC(),o=_3(),s=i.defaultQueryObserverOptions(r);s.optimisticResults=!0,s.onError&&(s.onError=Dt.batchCalls(s.onError)),s.onSuccess&&(s.onSuccess=Dt.batchCalls(s.onSuccess)),s.onSettled&&(s.onSettled=Dt.batchCalls(s.onSettled)),s.suspense&&(typeof s.staleTime!="number"&&(s.staleTime=1e3),s.cacheTime===0&&(s.cacheTime=1)),(s.suspense||s.useErrorBoundary)&&(o.isReset()||(s.retryOnMount=!1));var l=pe.default.useState(function(){return new e(i,s)}),u=l[0],c=u.getOptimisticResult(s);if(pe.default.useEffect(function(){t.current=!0,o.clearReset();var f=u.subscribe(Dt.batchCalls(function(){t.current&&a(function(h){return h+1})}));return u.updateResult(),function(){t.current=!1,f()}},[o,u]),pe.default.useEffect(function(){u.setOptions(s,{listeners:!1})},[s,u]),s.suspense&&c.isLoading)throw u.fetchOptimistic(s).then(function(f){var h=f.data;s.onSuccess==null||s.onSuccess(h),s.onSettled==null||s.onSettled(h,null)}).catch(function(f){o.clearReset(),s.onError==null||s.onError(f),s.onSettled==null||s.onSettled(void 0,f)});if(c.isError&&!o.isReset()&&!c.isFetching&&_C(s.suspense,s.useErrorBoundary,[c.error,u.getCurrentQuery()]))throw c.error;return s.notifyOnChangeProps==="tracked"&&(c=u.trackResult(c,s)),c}function gl(r,e,t){var n=kh(r,e,t);return b3(n,f3)}var en={container:"_container_1hfou_1",static:"_static_1hfou_387",fixed:"_fixed_1hfou_1",absolute:"_absolute_1hfou_1","left-2":"_left-2_1hfou_1","top-1":"_top-1_1hfou_1","my-2":"_my-2_1hfou_1","mt-2.5":"_mt-2.5_1hfou_1","mt-2":"_mt-2_1hfou_1","mb-3":"_mb-3_1hfou_1",table:"_table_1hfou_1",grid:"_grid_1hfou_1",hidden:"_hidden_1hfou_1","h-screen":"_h-screen_1hfou_1","w-screen":"_w-screen_1hfou_1","w-full":"_w-full_1hfou_1",transform:"_transform_1hfou_1",resize:"_resize_1hfou_1","overflow-x-hidden":"_overflow-x-hidden_1hfou_1",truncate:"_truncate_1hfou_1",border:"_border_1hfou_1","p-2":"_p-2_1hfou_1","text-center":"_text-center_1hfou_1","text-sm":"_text-sm_1hfou_1","text-xs":"_text-xs_1hfou_1","text-blue-700":"_text-blue-700_1hfou_1",shadow:"_shadow_1hfou_1",filter:"_filter_1hfou_347","!filter":"_!filter_1hfou_1","embedDashboard-container":"_embedDashboard-container_1hfou_307","embedDashboard-header-static":"_embedDashboard-header-static_1hfou_315","embedDashboard-header-floating":"_embedDashboard-header-floating_1hfou_323","embedDashboard-wrapper":"_embedDashboard-wrapper_1hfou_331","alt-container":"_alt-container_1hfou_339",floatingFilterButton:"_floatingFilterButton_1hfou_355",floatingFilterButtonIcon:"_floatingFilterButtonIcon_1hfou_363",floatingButton:"_floatingButton_1hfou_371",floatingButtonIcon:"_floatingButtonIcon_1hfou_379",staticContainer:"_staticContainer_1hfou_387",floatingContainer:"_floatingContainer_1hfou_395","hover:cursor-pointer":"_hover:cursor-pointer_1hfou_1","hover:cursor-text":"_hover:cursor-text_1hfou_1","disabled:cursor-text":"_disabled:cursor-text_1hfou_1"},Gh=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function x3(r){if(r.__esModule)return r;var e=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(r).forEach(function(t){var n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:function(){return r[t]}})}),e}var Cy={exports:{}},Xu={},Qu={exports:{}};(function(r,e){var t=200,n="__lodash_hash_undefined__",a=1,i=2,o=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",c="[object Boolean]",f="[object Date]",h="[object Error]",v="[object Function]",d="[object GeneratorFunction]",p="[object Map]",g="[object Number]",y="[object Null]",m="[object Object]",_="[object Promise]",b="[object Proxy]",w="[object RegExp]",x="[object Set]",S="[object String]",T="[object Symbol]",D="[object Undefined]",M="[object WeakMap]",A="[object ArrayBuffer]",I="[object DataView]",P="[object Float32Array]",E="[object Float64Array]",O="[object Int8Array]",N="[object Int16Array]",V="[object Int32Array]",$="[object Uint8Array]",U="[object Uint8ClampedArray]",Y="[object Uint16Array]",ae="[object Uint32Array]",H=/[\\^$.*+?()[\]{}|]/g,q=/^\[object .+?Constructor\]$/,X=/^(?:0|[1-9]\d*)$/,Z={};Z[P]=Z[E]=Z[O]=Z[N]=Z[V]=Z[$]=Z[U]=Z[Y]=Z[ae]=!0,Z[s]=Z[l]=Z[A]=Z[c]=Z[I]=Z[f]=Z[h]=Z[v]=Z[p]=Z[g]=Z[m]=Z[w]=Z[x]=Z[S]=Z[M]=!1;var ie=typeof Gh=="object"&&Gh&&Gh.Object===Object&&Gh,se=typeof self=="object"&&self&&self.Object===Object&&self,te=ie||se||Function("return this")(),ve=e&&!e.nodeType&&e,R=ve&&!0&&r&&!r.nodeType&&r,F=R&&R.exports===ve,G=F&&ie.process,re=function(){try{return G&&G.binding&&G.binding("util")}catch{}}(),ne=re&&re.isTypedArray;function ee(k,W){for(var oe=-1,Se=k==null?0:k.length,Tt=0,Ze=[];++oe<Se;){var Vt=k[oe];W(Vt,oe,k)&&(Ze[Tt++]=Vt)}return Ze}function ue(k,W){for(var oe=-1,Se=W.length,Tt=k.length;++oe<Se;)k[Tt+oe]=W[oe];return k}function De(k,W){for(var oe=-1,Se=k==null?0:k.length;++oe<Se;)if(W(k[oe],oe,k))return!0;return!1}function vt(k,W){for(var oe=-1,Se=Array(k);++oe<k;)Se[oe]=W(oe);return Se}function rt(k){return function(W){return k(W)}}function Yt(k,W){return k.has(W)}function Ct(k,W){return k==null?void 0:k[W]}function Qr(k){var W=-1,oe=Array(k.size);return k.forEach(function(Se,Tt){oe[++W]=[Tt,Se]}),oe}function St(k,W){return function(oe){return k(W(oe))}}function bt(k){var W=-1,oe=Array(k.size);return k.forEach(function(Se){oe[++W]=Se}),oe}var Qt=Array.prototype,Ta=Function.prototype,or=Object.prototype,Ni=te["__core-js_shared__"],Uu=Ta.toString,Kr=or.hasOwnProperty,ju=function(){var k=/[^.]+$/.exec(Ni&&Ni.keys&&Ni.keys.IE_PROTO||"");return k?"Symbol(src)_1."+k:""}(),ll=or.toString,Ih=RegExp("^"+Uu.call(Kr).replace(H,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ul=F?te.Buffer:void 0,ki=te.Symbol,Jr=te.Uint8Array,Tn=or.propertyIsEnumerable,Da=Qt.splice,Dn=ki?ki.toStringTag:void 0,Ja=Object.getOwnPropertySymbols,ct=ul?ul.isBuffer:void 0,hn=St(Object.keys,Object),Ie=Yu(te,"DataView"),ft=Yu(te,"Map"),xr=Yu(te,"Promise"),Qe=Yu(te,"Set"),Pt=Yu(te,"WeakMap"),Kt=Yu(Object,"create"),kr=hl(Ie),ly=hl(ft),uy=hl(xr),cy=hl(Qe),Yhe=hl(Pt),Pz=ki?ki.prototype:void 0,QS=Pz?Pz.valueOf:void 0;function cl(k){var W=-1,oe=k==null?0:k.length;for(this.clear();++W<oe;){var Se=k[W];this.set(Se[0],Se[1])}}function qhe(){this.__data__=Kt?Kt(null):{},this.size=0}function Zhe(k){var W=this.has(k)&&delete this.__data__[k];return this.size-=W?1:0,W}function Xhe(k){var W=this.__data__;if(Kt){var oe=W[k];return oe===n?void 0:oe}return Kr.call(W,k)?W[k]:void 0}function Qhe(k){var W=this.__data__;return Kt?W[k]!==void 0:Kr.call(W,k)}function Khe(k,W){var oe=this.__data__;return this.size+=this.has(k)?0:1,oe[k]=Kt&&W===void 0?n:W,this}cl.prototype.clear=qhe,cl.prototype.delete=Zhe,cl.prototype.get=Xhe,cl.prototype.has=Qhe,cl.prototype.set=Khe;function Bi(k){var W=-1,oe=k==null?0:k.length;for(this.clear();++W<oe;){var Se=k[W];this.set(Se[0],Se[1])}}function Jhe(){this.__data__=[],this.size=0}function eve(k){var W=this.__data__,oe=hy(W,k);if(oe<0)return!1;var Se=W.length-1;return oe==Se?W.pop():Da.call(W,oe,1),--this.size,!0}function tve(k){var W=this.__data__,oe=hy(W,k);return oe<0?void 0:W[oe][1]}function rve(k){return hy(this.__data__,k)>-1}function nve(k,W){var oe=this.__data__,Se=hy(oe,k);return Se<0?(++this.size,oe.push([k,W])):oe[Se][1]=W,this}Bi.prototype.clear=Jhe,Bi.prototype.delete=eve,Bi.prototype.get=tve,Bi.prototype.has=rve,Bi.prototype.set=nve;function fl(k){var W=-1,oe=k==null?0:k.length;for(this.clear();++W<oe;){var Se=k[W];this.set(Se[0],Se[1])}}function ave(){this.size=0,this.__data__={hash:new cl,map:new(ft||Bi),string:new cl}}function ive(k){var W=vy(this,k).delete(k);return this.size-=W?1:0,W}function ove(k){return vy(this,k).get(k)}function sve(k){return vy(this,k).has(k)}function lve(k,W){var oe=vy(this,k),Se=oe.size;return oe.set(k,W),this.size+=oe.size==Se?0:1,this}fl.prototype.clear=ave,fl.prototype.delete=ive,fl.prototype.get=ove,fl.prototype.has=sve,fl.prototype.set=lve;function fy(k){var W=-1,oe=k==null?0:k.length;for(this.__data__=new fl;++W<oe;)this.add(k[W])}function uve(k){return this.__data__.set(k,n),this}function cve(k){return this.__data__.has(k)}fy.prototype.add=fy.prototype.push=uve,fy.prototype.has=cve;function Ro(k){var W=this.__data__=new Bi(k);this.size=W.size}function fve(){this.__data__=new Bi,this.size=0}function hve(k){var W=this.__data__,oe=W.delete(k);return this.size=W.size,oe}function vve(k){return this.__data__.get(k)}function dve(k){return this.__data__.has(k)}function pve(k,W){var oe=this.__data__;if(oe instanceof Bi){var Se=oe.__data__;if(!ft||Se.length<t-1)return Se.push([k,W]),this.size=++oe.size,this;oe=this.__data__=new fl(Se)}return oe.set(k,W),this.size=oe.size,this}Ro.prototype.clear=fve,Ro.prototype.delete=hve,Ro.prototype.get=vve,Ro.prototype.has=dve,Ro.prototype.set=pve;function gve(k,W){var oe=dy(k),Se=!oe&&Pve(k),Tt=!oe&&!Se&&KS(k),Ze=!oe&&!Se&&!Tt&&Vz(k),Vt=oe||Se||Tt||Ze,fr=Vt?vt(k.length,String):[],wr=fr.length;for(var Rt in k)(W||Kr.call(k,Rt))&&!(Vt&&(Rt=="length"||Tt&&(Rt=="offset"||Rt=="parent")||Ze&&(Rt=="buffer"||Rt=="byteLength"||Rt=="byteOffset")||Dve(Rt,wr)))&&fr.push(Rt);return fr}function hy(k,W){for(var oe=k.length;oe--;)if(kz(k[oe][0],W))return oe;return-1}function yve(k,W,oe){var Se=W(k);return dy(k)?Se:ue(Se,oe(k))}function Ph(k){return k==null?k===void 0?D:y:Dn&&Dn in Object(k)?Cve(k):Ive(k)}function Ez(k){return Eh(k)&&Ph(k)==s}function Oz(k,W,oe,Se,Tt){return k===W?!0:k==null||W==null||!Eh(k)&&!Eh(W)?k!==k&&W!==W:mve(k,W,oe,Se,Oz,Tt)}function mve(k,W,oe,Se,Tt,Ze){var Vt=dy(k),fr=dy(W),wr=Vt?l:No(k),Rt=fr?l:No(W);wr=wr==s?m:wr,Rt=Rt==s?m:Rt;var Mn=wr==m,Ma=Rt==m,Br=wr==Rt;if(Br&&KS(k)){if(!KS(W))return!1;Vt=!0,Mn=!1}if(Br&&!Mn)return Ze||(Ze=new Ro),Vt||Vz(k)?Rz(k,W,oe,Se,Tt,Ze):wve(k,W,wr,oe,Se,Tt,Ze);if(!(oe&a)){var ta=Mn&&Kr.call(k,"__wrapped__"),ra=Ma&&Kr.call(W,"__wrapped__");if(ta||ra){var ko=ta?k.value():k,zi=ra?W.value():W;return Ze||(Ze=new Ro),Tt(ko,zi,oe,Se,Ze)}}return Br?(Ze||(Ze=new Ro),Sve(k,W,oe,Se,Tt,Ze)):!1}function _ve(k){if(!Fz(k)||Ave(k))return!1;var W=Bz(k)?Ih:q;return W.test(hl(k))}function bve(k){return Eh(k)&&zz(k.length)&&!!Z[Ph(k)]}function xve(k){if(!Lve(k))return hn(k);var W=[];for(var oe in Object(k))Kr.call(k,oe)&&oe!="constructor"&&W.push(oe);return W}function Rz(k,W,oe,Se,Tt,Ze){var Vt=oe&a,fr=k.length,wr=W.length;if(fr!=wr&&!(Vt&&wr>fr))return!1;var Rt=Ze.get(k);if(Rt&&Ze.get(W))return Rt==W;var Mn=-1,Ma=!0,Br=oe&i?new fy:void 0;for(Ze.set(k,W),Ze.set(W,k);++Mn<fr;){var ta=k[Mn],ra=W[Mn];if(Se)var ko=Vt?Se(ra,ta,Mn,W,k,Ze):Se(ta,ra,Mn,k,W,Ze);if(ko!==void 0){if(ko)continue;Ma=!1;break}if(Br){if(!De(W,function(zi,vl){if(!Yt(Br,vl)&&(ta===zi||Tt(ta,zi,oe,Se,Ze)))return Br.push(vl)})){Ma=!1;break}}else if(!(ta===ra||Tt(ta,ra,oe,Se,Ze))){Ma=!1;break}}return Ze.delete(k),Ze.delete(W),Ma}function wve(k,W,oe,Se,Tt,Ze,Vt){switch(oe){case I:if(k.byteLength!=W.byteLength||k.byteOffset!=W.byteOffset)return!1;k=k.buffer,W=W.buffer;case A:return!(k.byteLength!=W.byteLength||!Ze(new Jr(k),new Jr(W)));case c:case f:case g:return kz(+k,+W);case h:return k.name==W.name&&k.message==W.message;case w:case S:return k==W+"";case p:var fr=Qr;case x:var wr=Se&a;if(fr||(fr=bt),k.size!=W.size&&!wr)return!1;var Rt=Vt.get(k);if(Rt)return Rt==W;Se|=i,Vt.set(k,W);var Mn=Rz(fr(k),fr(W),Se,Tt,Ze,Vt);return Vt.delete(k),Mn;case T:if(QS)return QS.call(k)==QS.call(W)}return!1}function Sve(k,W,oe,Se,Tt,Ze){var Vt=oe&a,fr=Nz(k),wr=fr.length,Rt=Nz(W),Mn=Rt.length;if(wr!=Mn&&!Vt)return!1;for(var Ma=wr;Ma--;){var Br=fr[Ma];if(!(Vt?Br in W:Kr.call(W,Br)))return!1}var ta=Ze.get(k);if(ta&&Ze.get(W))return ta==W;var ra=!0;Ze.set(k,W),Ze.set(W,k);for(var ko=Vt;++Ma<wr;){Br=fr[Ma];var zi=k[Br],vl=W[Br];if(Se)var $z=Vt?Se(vl,zi,Br,W,k,Ze):Se(zi,vl,Br,k,W,Ze);if(!($z===void 0?zi===vl||Tt(zi,vl,oe,Se,Ze):$z)){ra=!1;break}ko||(ko=Br=="constructor")}if(ra&&!ko){var py=k.constructor,gy=W.constructor;py!=gy&&"constructor"in k&&"constructor"in W&&!(typeof py=="function"&&py instanceof py&&typeof gy=="function"&&gy instanceof gy)&&(ra=!1)}return Ze.delete(k),Ze.delete(W),ra}function Nz(k){return yve(k,Rve,Tve)}function vy(k,W){var oe=k.__data__;return Mve(W)?oe[typeof W=="string"?"string":"hash"]:oe.map}function Yu(k,W){var oe=Ct(k,W);return _ve(oe)?oe:void 0}function Cve(k){var W=Kr.call(k,Dn),oe=k[Dn];try{k[Dn]=void 0;var Se=!0}catch{}var Tt=ll.call(k);return Se&&(W?k[Dn]=oe:delete k[Dn]),Tt}var Tve=Ja?function(k){return k==null?[]:(k=Object(k),ee(Ja(k),function(W){return Tn.call(k,W)}))}:Nve,No=Ph;(Ie&&No(new Ie(new ArrayBuffer(1)))!=I||ft&&No(new ft)!=p||xr&&No(xr.resolve())!=_||Qe&&No(new Qe)!=x||Pt&&No(new Pt)!=M)&&(No=function(k){var W=Ph(k),oe=W==m?k.constructor:void 0,Se=oe?hl(oe):"";if(Se)switch(Se){case kr:return I;case ly:return p;case uy:return _;case cy:return x;case Yhe:return M}return W});function Dve(k,W){return W=W==null?o:W,!!W&&(typeof k=="number"||X.test(k))&&k>-1&&k%1==0&&k<W}function Mve(k){var W=typeof k;return W=="string"||W=="number"||W=="symbol"||W=="boolean"?k!=="__proto__":k===null}function Ave(k){return!!ju&&ju in k}function Lve(k){var W=k&&k.constructor,oe=typeof W=="function"&&W.prototype||or;return k===oe}function Ive(k){return ll.call(k)}function hl(k){if(k!=null){try{return Uu.call(k)}catch{}try{return k+""}catch{}}return""}function kz(k,W){return k===W||k!==k&&W!==W}var Pve=Ez(function(){return arguments}())?Ez:function(k){return Eh(k)&&Kr.call(k,"callee")&&!Tn.call(k,"callee")},dy=Array.isArray;function Eve(k){return k!=null&&zz(k.length)&&!Bz(k)}var KS=ct||kve;function Ove(k,W){return Oz(k,W)}function Bz(k){if(!Fz(k))return!1;var W=Ph(k);return W==v||W==d||W==u||W==b}function zz(k){return typeof k=="number"&&k>-1&&k%1==0&&k<=o}function Fz(k){var W=typeof k;return k!=null&&(W=="object"||W=="function")}function Eh(k){return k!=null&&typeof k=="object"}var Vz=ne?rt(ne):bve;function Rve(k){return Eve(k)?gve(k):xve(k)}function Nve(){return[]}function kve(){return!1}r.exports=Ove})(Qu,Qu.exports);function bC(r){var e,t,n="";if(typeof r=="string"||typeof r=="number")n+=r;else if(typeof r=="object")if(Array.isArray(r))for(e=0;e<r.length;e++)r[e]&&(t=bC(r[e]))&&(n&&(n+=" "),n+=t);else for(e in r)r[e]&&(n&&(n+=" "),n+=e);return n}function xC(){for(var r,e,t=0,n="";t<arguments.length;)(r=arguments[t++])&&(e=bC(r))&&(n&&(n+=" "),n+=e);return n}var w3=Object.freeze(Object.defineProperty({__proto__:null,clsx:xC,default:xC},Symbol.toStringTag,{value:"Module"})),Wh=x3(w3),Je={},S3=function(e,t,n){return e===t?!0:e.className===t.className&&n(e.style,t.style)&&e.width===t.width&&e.autoSize===t.autoSize&&e.cols===t.cols&&e.draggableCancel===t.draggableCancel&&e.draggableHandle===t.draggableHandle&&n(e.verticalCompact,t.verticalCompact)&&n(e.compactType,t.compactType)&&n(e.layout,t.layout)&&n(e.margin,t.margin)&&n(e.containerPadding,t.containerPadding)&&e.rowHeight===t.rowHeight&&e.maxRows===t.maxRows&&e.isBounded===t.isBounded&&e.isDraggable===t.isDraggable&&e.isResizable===t.isResizable&&e.allowOverlap===t.allowOverlap&&e.preventCollision===t.preventCollision&&e.useCSSTransforms===t.useCSSTransforms&&e.transformScale===t.transformScale&&e.isDroppable===t.isDroppable&&n(e.resizeHandles,t.resizeHandles)&&n(e.resizeHandle,t.resizeHandle)&&e.onLayoutChange===t.onLayoutChange&&e.onDragStart===t.onDragStart&&e.onDrag===t.onDrag&&e.onDragStop===t.onDragStop&&e.onResizeStart===t.onResizeStart&&e.onResize===t.onResize&&e.onResizeStop===t.onResizeStop&&e.onDrop===t.onDrop&&n(e.droppingItem,t.droppingItem)&&n(e.innerRef,t.innerRef)};Object.defineProperty(Je,"__esModule",{value:!0}),Je.bottom=Dy,Je.childrenEqual=M3,Je.cloneLayout=TC,Je.cloneLayoutItem=Fo,Je.collides=Uh,Je.compact=MC,Je.compactItem=AC,Je.compactType=k3,Je.correctBounds=LC,Je.fastPositionEqual=L3,Je.fastRGLPropsEqual=void 0,Je.getAllCollisions=IC,Je.getFirstCollision=yl,Je.getLayoutItem=Ay,Je.getStatics=Ly,Je.modifyLayout=DC,Je.moveElement=Iy,Je.moveElementAwayFromCollision=Py,Je.noop=void 0,Je.perc=P3,Je.setTopLeft=O3,Je.setTransform=E3,Je.sortLayoutItems=Ey,Je.sortLayoutItemsByColRow=EC,Je.sortLayoutItemsByRowCol=PC,Je.synchronizeLayoutWithChildren=R3,Je.validateLayout=N3,Je.withLayoutItem=D3;var C3=wC(Qu.exports),Ty=wC(pe.default);function wC(r){return r&&r.__esModule?r:{default:r}}function SC(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable})),t.push.apply(t,n)}return t}function CC(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?SC(Object(t),!0).forEach(function(n){T3(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):SC(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function T3(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Dy(r){for(var e=0,t,n=0,a=r.length;n<a;n++)t=r[n].y+r[n].h,t>e&&(e=t);return e}function TC(r){for(var e=Array(r.length),t=0,n=r.length;t<n;t++)e[t]=Fo(r[t]);return e}function DC(r,e){for(var t=Array(r.length),n=0,a=r.length;n<a;n++)e.i===r[n].i?t[n]=e:t[n]=r[n];return t}function D3(r,e,t){var n=Ay(r,e);return n?(n=t(Fo(n)),r=DC(r,n),[r,n]):[r,null]}function Fo(r){return{w:r.w,h:r.h,x:r.x,y:r.y,i:r.i,minW:r.minW,maxW:r.maxW,minH:r.minH,maxH:r.maxH,moved:Boolean(r.moved),static:Boolean(r.static),isDraggable:r.isDraggable,isResizable:r.isResizable,resizeHandles:r.resizeHandles,isBounded:r.isBounded}}function M3(r,e){return(0,C3.default)(Ty.default.Children.map(r,function(t){return t==null?void 0:t.key}),Ty.default.Children.map(e,function(t){return t==null?void 0:t.key}))}var A3=S3;Je.fastRGLPropsEqual=A3;function L3(r,e){return r.left===e.left&&r.top===e.top&&r.width===e.width&&r.height===e.height}function Uh(r,e){return!(r.i===e.i||r.x+r.w<=e.x||r.x>=e.x+e.w||r.y+r.h<=e.y||r.y>=e.y+e.h)}function MC(r,e,t){for(var n=Ly(r),a=Ey(r,e),i=Array(r.length),o=0,s=a.length;o<s;o++){var l=Fo(a[o]);l.static||(l=AC(n,l,e,t,a),n.push(l)),i[r.indexOf(a[o])]=l,l.moved=!1}return i}var I3={x:"w",y:"h"};function My(r,e,t,n){var a=I3[n];e[n]+=1;for(var i=r.map(function(l){return l.i}).indexOf(e.i),o=i+1;o<r.length;o++){var s=r[o];if(!s.static){if(s.y>e.y+e.h)break;Uh(e,s)&&My(r,s,t+e[a],n)}}e[n]=t}function AC(r,e,t,n,a){var i=t==="vertical",o=t==="horizontal";if(i)for(e.y=Math.min(Dy(r),e.y);e.y>0&&!yl(r,e);)e.y--;else if(o)for(;e.x>0&&!yl(r,e);)e.x--;for(var s;s=yl(r,e);)o?My(a,e,s.x+s.w,"x"):My(a,e,s.y+s.h,"y"),o&&e.x+e.w>n&&(e.x=n-e.w,e.y++);return e.y=Math.max(e.y,0),e.x=Math.max(e.x,0),e}function LC(r,e){for(var t=Ly(r),n=0,a=r.length;n<a;n++){var i=r[n];if(i.x+i.w>e.cols&&(i.x=e.cols-i.w),i.x<0&&(i.x=0,i.w=e.cols),!i.static)t.push(i);else for(;yl(t,i);)i.y++}return r}function Ay(r,e){for(var t=0,n=r.length;t<n;t++)if(r[t].i===e)return r[t]}function yl(r,e){for(var t=0,n=r.length;t<n;t++)if(Uh(r[t],e))return r[t]}function IC(r,e){return r.filter(function(t){return Uh(t,e)})}function Ly(r){return r.filter(function(e){return e.static})}function Iy(r,e,t,n,a,i,o,s,l){if(e.static&&e.isDraggable!==!0||e.y===n&&e.x===t)return r;"Moving element ".concat(e.i," to [").concat(String(t),",").concat(String(n),"] from [").concat(e.x,",").concat(e.y,"]");var u=e.x,c=e.y;typeof t=="number"&&(e.x=t),typeof n=="number"&&(e.y=n),e.moved=!0;var f=Ey(r,o),h=o==="vertical"&&typeof n=="number"?c>=n:o==="horizontal"&&typeof t=="number"?u>=t:!1;h&&(f=f.reverse());var v=IC(f,e),d=v.length>0;if(d&&l)return TC(r);if(d&&i)return"Collision prevented on ".concat(e.i,", reverting."),e.x=u,e.y=c,e.moved=!1,r;for(var p=0,g=v.length;p<g;p++){var y=v[p];"Resolving collision between ".concat(e.i," at [").concat(e.x,",").concat(e.y,"] and ").concat(y.i," at [").concat(y.x,",").concat(y.y,"]"),!y.moved&&(y.static?r=Py(r,y,e,a,o):r=Py(r,e,y,a,o))}return r}function Py(r,e,t,n,a,i){var o=a==="horizontal",s=a!=="horizontal",l=e.static;if(n){n=!1;var u={x:o?Math.max(e.x-t.w,0):t.x,y:s?Math.max(e.y-t.h,0):t.y,w:t.w,h:t.h,i:"-1"};if(!yl(r,u))return"Doing reverse collision on ".concat(t.i," up to [").concat(u.x,",").concat(u.y,"]."),Iy(r,t,o?u.x:void 0,s?u.y:void 0,n,l,a)}return Iy(r,t,o?t.x+1:void 0,s?t.y+1:void 0,n,l,a)}function P3(r){return r*100+"%"}function E3(r){var e=r.top,t=r.left,n=r.width,a=r.height,i="translate(".concat(t,"px,").concat(e,"px)");return{transform:i,WebkitTransform:i,MozTransform:i,msTransform:i,OTransform:i,width:"".concat(n,"px"),height:"".concat(a,"px"),position:"absolute"}}function O3(r){var e=r.top,t=r.left,n=r.width,a=r.height;return{top:"".concat(e,"px"),left:"".concat(t,"px"),width:"".concat(n,"px"),height:"".concat(a,"px"),position:"absolute"}}function Ey(r,e){return e==="horizontal"?EC(r):e==="vertical"?PC(r):r}function PC(r){return r.slice(0).sort(function(e,t){return e.y>t.y||e.y===t.y&&e.x>t.x?1:e.y===t.y&&e.x===t.x?0:-1})}function EC(r){return r.slice(0).sort(function(e,t){return e.x>t.x||e.x===t.x&&e.y>t.y?1:-1})}function R3(r,e,t,n,a){r=r||[];var i=[];Ty.default.Children.forEach(e,function(s){if((s==null?void 0:s.key)!=null){var l=Ay(r,String(s.key));if(l)i.push(Fo(l));else{var u=s.props["data-grid"]||s.props._grid;u?i.push(Fo(CC(CC({},u),{},{i:s.key}))):i.push(Fo({w:1,h:1,x:0,y:Dy(i),i:String(s.key)}))}}});var o=LC(i,{cols:t});return a?o:MC(o,n,t)}function N3(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Layout",t=["x","y","w","h"];if(!Array.isArray(r))throw new Error(e+" must be an array!");for(var n=0,a=r.length;n<a;n++)for(var i=r[n],o=0;o<t.length;o++)if(typeof i[t[o]]!="number")throw new Error("ReactGridLayout: "+e+"["+n+"]."+t[o]+" must be a number!")}function k3(r){var e=r||{},t=e.verticalCompact,n=e.compactType;return t===!1?null:n}function tde(){}var B3=function(){};Je.noop=B3;var ei={};Object.defineProperty(ei,"__esModule",{value:!0}),ei.calcGridColWidth=jh,ei.calcGridItemPosition=z3,ei.calcGridItemWHPx=Oy,ei.calcWH=V3,ei.calcXY=F3,ei.clamp=Ku;function jh(r){var e=r.margin,t=r.containerPadding,n=r.containerWidth,a=r.cols;return(n-e[0]*(a-1)-t[0]*2)/a}function Oy(r,e,t){return Number.isFinite(r)?Math.round(e*r+Math.max(0,r-1)*t):r}function z3(r,e,t,n,a,i){var o=r.margin,s=r.containerPadding,l=r.rowHeight,u=jh(r),c={};return i&&i.resizing?(c.width=Math.round(i.resizing.width),c.height=Math.round(i.resizing.height)):(c.width=Oy(n,u,o[0]),c.height=Oy(a,l,o[1])),i&&i.dragging?(c.top=Math.round(i.dragging.top),c.left=Math.round(i.dragging.left)):(c.top=Math.round((l+o[1])*t+s[1]),c.left=Math.round((u+o[0])*e+s[0])),c}function F3(r,e,t,n,a){var i=r.margin,o=r.cols,s=r.rowHeight,l=r.maxRows,u=jh(r),c=Math.round((t-i[0])/(u+i[0])),f=Math.round((e-i[1])/(s+i[1]));return c=Ku(c,0,o-n),f=Ku(f,0,l-a),{x:c,y:f}}function V3(r,e,t,n,a){var i=r.margin,o=r.maxRows,s=r.cols,l=r.rowHeight,u=jh(r),c=Math.round((e+i[0])/(u+i[0])),f=Math.round((t+i[1])/(l+i[1]));return c=Ku(c,0,s-n),f=Ku(f,0,o-a),{w:c,h:f}}function Ku(r,e,t){return Math.max(Math.min(r,t),e)}var Yh={},ti={exports:{}},$3="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",H3=$3,G3=H3;function OC(){}function RC(){}RC.resetWarningCache=OC;var W3=function(){function r(n,a,i,o,s,l){if(l!==G3){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}r.isRequired=r;function e(){return r}var t={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:e,element:r,elementType:r,instanceOf:e,node:r,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:RC,resetWarningCache:OC};return t.PropTypes=t,t};ti.exports=W3();var Ju={exports:{}},NC={},Nt={},Aa={};Object.defineProperty(Aa,"__esModule",{value:!0}),Aa.dontSetMe=Z3,Aa.findInArray=U3,Aa.int=q3,Aa.isFunction=j3,Aa.isNum=Y3;function U3(r,e){for(var t=0,n=r.length;t<n;t++)if(e.apply(e,[r[t],t,r]))return r[t]}function j3(r){return typeof r=="function"||Object.prototype.toString.call(r)==="[object Function]"}function Y3(r){return typeof r=="number"&&!isNaN(r)}function q3(r){return parseInt(r,10)}function Z3(r,e,t){if(r[e])return new Error("Invalid prop ".concat(e," passed to ").concat(t," - do not set this, set it on the child."))}var Vo={};Object.defineProperty(Vo,"__esModule",{value:!0}),Vo.browserPrefixToKey=BC,Vo.browserPrefixToStyle=X3,Vo.default=void 0,Vo.getPrefix=kC;var Ry=["Moz","Webkit","O","ms"];function kC(){var r,e,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window=="undefined")return"";var n=(r=window.document)===null||r===void 0||(e=r.documentElement)===null||e===void 0?void 0:e.style;if(!n||t in n)return"";for(var a=0;a<Ry.length;a++)if(BC(t,Ry[a])in n)return Ry[a];return""}function BC(r,e){return e?"".concat(e).concat(Q3(r)):r}function X3(r,e){return e?"-".concat(e.toLowerCase(),"-").concat(r):r}function Q3(r){for(var e="",t=!0,n=0;n<r.length;n++)t?(e+=r[n].toUpperCase(),t=!1):r[n]==="-"?t=!0:e+=r[n];return e}var K3=kC();Vo.default=K3;function Ny(r){return Ny=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ny(r)}Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.addClassName=WC,Nt.addEvent=tF,Nt.addUserSelectStyles=hF,Nt.createCSSTransform=lF,Nt.createSVGTransform=uF,Nt.getTouch=cF,Nt.getTouchIdentifier=fF,Nt.getTranslation=ky,Nt.innerHeight=iF,Nt.innerWidth=oF,Nt.matchesSelector=GC,Nt.matchesSelectorAndParentsTo=eF,Nt.offsetXYFromParent=sF,Nt.outerHeight=nF,Nt.outerWidth=aF,Nt.removeClassName=UC,Nt.removeEvent=rF,Nt.removeUserSelectStyles=vF;var vn=Aa,zC=J3(Vo);function FC(r){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(FC=function(a){return a?t:e})(r)}function J3(r,e){if(!e&&r&&r.__esModule)return r;if(r===null||Ny(r)!=="object"&&typeof r!="function")return{default:r};var t=FC(e);if(t&&t.has(r))return t.get(r);var n={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in r)if(i!=="default"&&Object.prototype.hasOwnProperty.call(r,i)){var o=a?Object.getOwnPropertyDescriptor(r,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=r[i]}return n.default=r,t&&t.set(r,n),n}function VC(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable})),t.push.apply(t,n)}return t}function $C(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?VC(Object(t),!0).forEach(function(n){HC(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):VC(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function HC(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}var qh="";function GC(r,e){return qh||(qh=(0,vn.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(t){return(0,vn.isFunction)(r[t])})),(0,vn.isFunction)(r[qh])?r[qh](e):!1}function eF(r,e,t){var n=r;do{if(GC(n,e))return!0;if(n===t)return!1;n=n.parentNode}while(n);return!1}function tF(r,e,t,n){if(!!r){var a=$C({capture:!0},n);r.addEventListener?r.addEventListener(e,t,a):r.attachEvent?r.attachEvent("on"+e,t):r["on"+e]=t}}function rF(r,e,t,n){if(!!r){var a=$C({capture:!0},n);r.removeEventListener?r.removeEventListener(e,t,a):r.detachEvent?r.detachEvent("on"+e,t):r["on"+e]=null}}function nF(r){var e=r.clientHeight,t=r.ownerDocument.defaultView.getComputedStyle(r);return e+=(0,vn.int)(t.borderTopWidth),e+=(0,vn.int)(t.borderBottomWidth),e}function aF(r){var e=r.clientWidth,t=r.ownerDocument.defaultView.getComputedStyle(r);return e+=(0,vn.int)(t.borderLeftWidth),e+=(0,vn.int)(t.borderRightWidth),e}function iF(r){var e=r.clientHeight,t=r.ownerDocument.defaultView.getComputedStyle(r);return e-=(0,vn.int)(t.paddingTop),e-=(0,vn.int)(t.paddingBottom),e}function oF(r){var e=r.clientWidth,t=r.ownerDocument.defaultView.getComputedStyle(r);return e-=(0,vn.int)(t.paddingLeft),e-=(0,vn.int)(t.paddingRight),e}function sF(r,e,t){var n=e===e.ownerDocument.body,a=n?{left:0,top:0}:e.getBoundingClientRect(),i=(r.clientX+e.scrollLeft-a.left)/t,o=(r.clientY+e.scrollTop-a.top)/t;return{x:i,y:o}}function lF(r,e){var t=ky(r,e,"px");return HC({},(0,zC.browserPrefixToKey)("transform",zC.default),t)}function uF(r,e){var t=ky(r,e,"");return t}function ky(r,e,t){var n=r.x,a=r.y,i="translate(".concat(n).concat(t,",").concat(a).concat(t,")");if(e){var o="".concat(typeof e.x=="string"?e.x:e.x+t),s="".concat(typeof e.y=="string"?e.y:e.y+t);i="translate(".concat(o,", ").concat(s,")")+i}return i}function cF(r,e){return r.targetTouches&&(0,vn.findInArray)(r.targetTouches,function(t){return e===t.identifier})||r.changedTouches&&(0,vn.findInArray)(r.changedTouches,function(t){return e===t.identifier})}function fF(r){if(r.targetTouches&&r.targetTouches[0])return r.targetTouches[0].identifier;if(r.changedTouches&&r.changedTouches[0])return r.changedTouches[0].identifier}function hF(r){if(!!r){var e=r.getElementById("react-draggable-style-el");e||(e=r.createElement("style"),e.type="text/css",e.id="react-draggable-style-el",e.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
1
+ (function(Sr,B){typeof exports=="object"&&typeof module!="undefined"?B(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],B):(Sr=typeof globalThis!="undefined"?globalThis:Sr||self,B(Sr.Databrain={},Sr.React,Sr.ReactDOM))})(this,function(Sr,B,H3){"use strict";function JS(r){return r&&typeof r=="object"&&"default"in r?r:{default:r}}function G3(r){if(r&&r.__esModule)return r;var e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});return r&&Object.keys(r).forEach(function(t){if(t!=="default"){var n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:function(){return r[t]}})}}),e.default=r,Object.freeze(e)}var yy=G3(B),pe=JS(B),Oh=JS(H3);function my(r,e){return my=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},my(r,e)}function Bo(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,my(r,e)}var W3=function(e,t){return e===void 0&&(e=[]),t===void 0&&(t=[]),e.length!==t.length||e.some(function(n,a){return!Object.is(n,t[a])})},eC={error:null},U3=function(r){Bo(e,r);function e(){for(var n,a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=r.call.apply(r,[this].concat(i))||this,n.state=eC,n.resetErrorBoundary=function(){for(var s,l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];n.props.onReset==null||(s=n.props).onReset.apply(s,u),n.reset()},n}e.getDerivedStateFromError=function(a){return{error:a}};var t=e.prototype;return t.reset=function(){this.setState(eC)},t.componentDidCatch=function(a,i){var o,s;(o=(s=this.props).onError)==null||o.call(s,a,i)},t.componentDidUpdate=function(a,i){var o=this.state.error,s=this.props.resetKeys;if(o!==null&&i.error!==null&&W3(a.resetKeys,s)){var l,u;(l=(u=this.props).onResetKeysChange)==null||l.call(u,a.resetKeys,s),this.reset()}},t.render=function(){var a=this.state.error,i=this.props,o=i.fallbackRender,s=i.FallbackComponent,l=i.fallback;if(a!==null){var u={error:a,resetErrorBoundary:this.resetErrorBoundary};if(yy.isValidElement(l))return l;if(typeof o=="function")return o(u);if(s)return yy.createElement(s,u);throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},e}(yy.Component),dl=function(){function r(){this.listeners=[]}var e=r.prototype;return e.subscribe=function(n){var a=this,i=n||function(){};return this.listeners.push(i),this.onSubscribe(),function(){a.listeners=a.listeners.filter(function(o){return o!==i}),a.onUnsubscribe()}},e.hasListeners=function(){return this.listeners.length>0},e.onSubscribe=function(){},e.onUnsubscribe=function(){},r}();function Ke(){return Ke=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},Ke.apply(this,arguments)}var Rh=typeof window=="undefined";function hr(){}function j3(r,e){return typeof r=="function"?r(e):r}function _y(r){return typeof r=="number"&&r>=0&&r!==1/0}function Nh(r){return Array.isArray(r)?r:[r]}function tC(r,e){return Math.max(r+(e||0)-Date.now(),0)}function kh(r,e,t){return qu(r)?typeof e=="function"?Ke({},t,{queryKey:r,queryFn:e}):Ke({},e,{queryKey:r}):r}function Y3(r,e,t){return qu(r)?typeof e=="function"?Ke({},t,{mutationKey:r,mutationFn:e}):Ke({},e,{mutationKey:r}):typeof r=="function"?Ke({},e,{mutationFn:r}):Ke({},r)}function Fi(r,e,t){return qu(r)?[Ke({},e,{queryKey:r}),t]:[r||{},e]}function q3(r,e){if(r===!0&&e===!0||r==null&&e==null)return"all";if(r===!1&&e===!1)return"none";var t=r!=null?r:!e;return t?"active":"inactive"}function rC(r,e){var t=r.active,n=r.exact,a=r.fetching,i=r.inactive,o=r.predicate,s=r.queryKey,l=r.stale;if(qu(s)){if(n){if(e.queryHash!==by(s,e.options))return!1}else if(!Bh(e.queryKey,s))return!1}var u=q3(t,i);if(u==="none")return!1;if(u!=="all"){var c=e.isActive();if(u==="active"&&!c||u==="inactive"&&c)return!1}return!(typeof l=="boolean"&&e.isStale()!==l||typeof a=="boolean"&&e.isFetching()!==a||o&&!o(e))}function nC(r,e){var t=r.exact,n=r.fetching,a=r.predicate,i=r.mutationKey;if(qu(i)){if(!e.options.mutationKey)return!1;if(t){if(zo(e.options.mutationKey)!==zo(i))return!1}else if(!Bh(e.options.mutationKey,i))return!1}return!(typeof n=="boolean"&&e.state.status==="loading"!==n||a&&!a(e))}function by(r,e){var t=(e==null?void 0:e.queryKeyHashFn)||zo;return t(r)}function zo(r){var e=Nh(r);return Z3(e)}function Z3(r){return JSON.stringify(r,function(e,t){return xy(t)?Object.keys(t).sort().reduce(function(n,a){return n[a]=t[a],n},{}):t})}function Bh(r,e){return aC(Nh(r),Nh(e))}function aC(r,e){return r===e?!0:typeof r!=typeof e?!1:r&&e&&typeof r=="object"&&typeof e=="object"?!Object.keys(e).some(function(t){return!aC(r[t],e[t])}):!1}function zh(r,e){if(r===e)return r;var t=Array.isArray(r)&&Array.isArray(e);if(t||xy(r)&&xy(e)){for(var n=t?r.length:Object.keys(r).length,a=t?e:Object.keys(e),i=a.length,o=t?[]:{},s=0,l=0;l<i;l++){var u=t?l:a[l];o[u]=zh(r[u],e[u]),o[u]===r[u]&&s++}return n===i&&s===n?r:o}return e}function X3(r,e){if(r&&!e||e&&!r)return!1;for(var t in r)if(r[t]!==e[t])return!1;return!0}function xy(r){if(!iC(r))return!1;var e=r.constructor;if(typeof e=="undefined")return!0;var t=e.prototype;return!(!iC(t)||!t.hasOwnProperty("isPrototypeOf"))}function iC(r){return Object.prototype.toString.call(r)==="[object Object]"}function qu(r){return typeof r=="string"||Array.isArray(r)}function Q3(r){return new Promise(function(e){setTimeout(e,r)})}function oC(r){Promise.resolve().then(r).catch(function(e){return setTimeout(function(){throw e})})}function sC(){if(typeof AbortController=="function")return new AbortController}var K3=function(r){Bo(e,r);function e(){var n;return n=r.call(this)||this,n.setup=function(a){var i;if(!Rh&&((i=window)==null?void 0:i.addEventListener)){var o=function(){return a()};return window.addEventListener("visibilitychange",o,!1),window.addEventListener("focus",o,!1),function(){window.removeEventListener("visibilitychange",o),window.removeEventListener("focus",o)}}},n}var t=e.prototype;return t.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},t.onUnsubscribe=function(){if(!this.hasListeners()){var a;(a=this.cleanup)==null||a.call(this),this.cleanup=void 0}},t.setEventListener=function(a){var i,o=this;this.setup=a,(i=this.cleanup)==null||i.call(this),this.cleanup=a(function(s){typeof s=="boolean"?o.setFocused(s):o.onFocus()})},t.setFocused=function(a){this.focused=a,a&&this.onFocus()},t.onFocus=function(){this.listeners.forEach(function(a){a()})},t.isFocused=function(){return typeof this.focused=="boolean"?this.focused:typeof document=="undefined"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)},e}(dl),Zu=new K3,J3=function(r){Bo(e,r);function e(){var n;return n=r.call(this)||this,n.setup=function(a){var i;if(!Rh&&((i=window)==null?void 0:i.addEventListener)){var o=function(){return a()};return window.addEventListener("online",o,!1),window.addEventListener("offline",o,!1),function(){window.removeEventListener("online",o),window.removeEventListener("offline",o)}}},n}var t=e.prototype;return t.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},t.onUnsubscribe=function(){if(!this.hasListeners()){var a;(a=this.cleanup)==null||a.call(this),this.cleanup=void 0}},t.setEventListener=function(a){var i,o=this;this.setup=a,(i=this.cleanup)==null||i.call(this),this.cleanup=a(function(s){typeof s=="boolean"?o.setOnline(s):o.onOnline()})},t.setOnline=function(a){this.online=a,a&&this.onOnline()},t.onOnline=function(){this.listeners.forEach(function(a){a()})},t.isOnline=function(){return typeof this.online=="boolean"?this.online:typeof navigator=="undefined"||typeof navigator.onLine=="undefined"?!0:navigator.onLine},e}(dl),Fh=new J3;function ez(r){return Math.min(1e3*Math.pow(2,r),3e4)}function Vh(r){return typeof(r==null?void 0:r.cancel)=="function"}var lC=function(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent};function $h(r){return r instanceof lC}var uC=function(e){var t=this,n=!1,a,i,o,s;this.abort=e.abort,this.cancel=function(h){return a==null?void 0:a(h)},this.cancelRetry=function(){n=!0},this.continueRetry=function(){n=!1},this.continue=function(){return i==null?void 0:i()},this.failureCount=0,this.isPaused=!1,this.isResolved=!1,this.isTransportCancelable=!1,this.promise=new Promise(function(h,v){o=h,s=v});var l=function(v){t.isResolved||(t.isResolved=!0,e.onSuccess==null||e.onSuccess(v),i==null||i(),o(v))},u=function(v){t.isResolved||(t.isResolved=!0,e.onError==null||e.onError(v),i==null||i(),s(v))},c=function(){return new Promise(function(v){i=v,t.isPaused=!0,e.onPause==null||e.onPause()}).then(function(){i=void 0,t.isPaused=!1,e.onContinue==null||e.onContinue()})},f=function h(){if(!t.isResolved){var v;try{v=e.fn()}catch(d){v=Promise.reject(d)}a=function(p){if(!t.isResolved&&(u(new lC(p)),t.abort==null||t.abort(),Vh(v)))try{v.cancel()}catch{}},t.isTransportCancelable=Vh(v),Promise.resolve(v).then(l).catch(function(d){var p,g;if(!t.isResolved){var y=(p=e.retry)!=null?p:3,m=(g=e.retryDelay)!=null?g:ez,_=typeof m=="function"?m(t.failureCount,d):m,b=y===!0||typeof y=="number"&&t.failureCount<y||typeof y=="function"&&y(t.failureCount,d);if(n||!b){u(d);return}t.failureCount++,e.onFail==null||e.onFail(t.failureCount,d),Q3(_).then(function(){if(!Zu.isFocused()||!Fh.isOnline())return c()}).then(function(){n?u(d):h()})}})}};f()},tz=function(){function r(){this.queue=[],this.transactions=0,this.notifyFn=function(t){t()},this.batchNotifyFn=function(t){t()}}var e=r.prototype;return e.batch=function(n){var a;this.transactions++;try{a=n()}finally{this.transactions--,this.transactions||this.flush()}return a},e.schedule=function(n){var a=this;this.transactions?this.queue.push(n):oC(function(){a.notifyFn(n)})},e.batchCalls=function(n){var a=this;return function(){for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];a.schedule(function(){n.apply(void 0,o)})}},e.flush=function(){var n=this,a=this.queue;this.queue=[],a.length&&oC(function(){n.batchNotifyFn(function(){a.forEach(function(i){n.notifyFn(i)})})})},e.setNotifyFunction=function(n){this.notifyFn=n},e.setBatchNotifyFunction=function(n){this.batchNotifyFn=n},r}(),Dt=new tz,cC=console;function Hh(){return cC}function rz(r){cC=r}var nz=function(){function r(t){this.abortSignalConsumed=!1,this.hadObservers=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||this.getDefaultState(this.options),this.state=this.initialState,this.meta=t.meta,this.scheduleGc()}var e=r.prototype;return e.setOptions=function(n){var a;this.options=Ke({},this.defaultOptions,n),this.meta=n==null?void 0:n.meta,this.cacheTime=Math.max(this.cacheTime||0,(a=this.options.cacheTime)!=null?a:5*60*1e3)},e.setDefaultOptions=function(n){this.defaultOptions=n},e.scheduleGc=function(){var n=this;this.clearGcTimeout(),_y(this.cacheTime)&&(this.gcTimeout=setTimeout(function(){n.optionalRemove()},this.cacheTime))},e.clearGcTimeout=function(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)},e.optionalRemove=function(){this.observers.length||(this.state.isFetching?this.hadObservers&&this.scheduleGc():this.cache.remove(this))},e.setData=function(n,a){var i,o,s=this.state.data,l=j3(n,s);return(i=(o=this.options).isDataEqual)!=null&&i.call(o,s,l)?l=s:this.options.structuralSharing!==!1&&(l=zh(s,l)),this.dispatch({data:l,type:"success",dataUpdatedAt:a==null?void 0:a.updatedAt}),l},e.setState=function(n,a){this.dispatch({type:"setState",state:n,setStateOptions:a})},e.cancel=function(n){var a,i=this.promise;return(a=this.retryer)==null||a.cancel(n),i?i.then(hr).catch(hr):Promise.resolve()},e.destroy=function(){this.clearGcTimeout(),this.cancel({silent:!0})},e.reset=function(){this.destroy(),this.setState(this.initialState)},e.isActive=function(){return this.observers.some(function(n){return n.options.enabled!==!1})},e.isFetching=function(){return this.state.isFetching},e.isStale=function(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(function(n){return n.getCurrentResult().isStale})},e.isStaleByTime=function(n){return n===void 0&&(n=0),this.state.isInvalidated||!this.state.dataUpdatedAt||!tC(this.state.dataUpdatedAt,n)},e.onFocus=function(){var n,a=this.observers.find(function(i){return i.shouldFetchOnWindowFocus()});a&&a.refetch(),(n=this.retryer)==null||n.continue()},e.onOnline=function(){var n,a=this.observers.find(function(i){return i.shouldFetchOnReconnect()});a&&a.refetch(),(n=this.retryer)==null||n.continue()},e.addObserver=function(n){this.observers.indexOf(n)===-1&&(this.observers.push(n),this.hadObservers=!0,this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:n}))},e.removeObserver=function(n){this.observers.indexOf(n)!==-1&&(this.observers=this.observers.filter(function(a){return a!==n}),this.observers.length||(this.retryer&&(this.retryer.isTransportCancelable||this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.cacheTime?this.scheduleGc():this.cache.remove(this)),this.cache.notify({type:"observerRemoved",query:this,observer:n}))},e.getObserversCount=function(){return this.observers.length},e.invalidate=function(){this.state.isInvalidated||this.dispatch({type:"invalidate"})},e.fetch=function(n,a){var i=this,o,s,l;if(this.state.isFetching){if(this.state.dataUpdatedAt&&(a==null?void 0:a.cancelRefetch))this.cancel({silent:!0});else if(this.promise){var u;return(u=this.retryer)==null||u.continueRetry(),this.promise}}if(n&&this.setOptions(n),!this.options.queryFn){var c=this.observers.find(function(m){return m.options.queryFn});c&&this.setOptions(c.options)}var f=Nh(this.queryKey),h=sC(),v={queryKey:f,pageParam:void 0,meta:this.meta};Object.defineProperty(v,"signal",{enumerable:!0,get:function(){if(h)return i.abortSignalConsumed=!0,h.signal}});var d=function(){return i.options.queryFn?(i.abortSignalConsumed=!1,i.options.queryFn(v)):Promise.reject("Missing queryFn")},p={fetchOptions:a,options:this.options,queryKey:f,state:this.state,fetchFn:d,meta:this.meta};if((o=this.options.behavior)!=null&&o.onFetch){var g;(g=this.options.behavior)==null||g.onFetch(p)}if(this.revertState=this.state,!this.state.isFetching||this.state.fetchMeta!==((s=p.fetchOptions)==null?void 0:s.meta)){var y;this.dispatch({type:"fetch",meta:(y=p.fetchOptions)==null?void 0:y.meta})}return this.retryer=new uC({fn:p.fetchFn,abort:h==null||(l=h.abort)==null?void 0:l.bind(h),onSuccess:function(_){i.setData(_),i.cache.config.onSuccess==null||i.cache.config.onSuccess(_,i),i.cacheTime===0&&i.optionalRemove()},onError:function(_){$h(_)&&_.silent||i.dispatch({type:"error",error:_}),$h(_)||(i.cache.config.onError==null||i.cache.config.onError(_,i),Hh().error(_)),i.cacheTime===0&&i.optionalRemove()},onFail:function(){i.dispatch({type:"failed"})},onPause:function(){i.dispatch({type:"pause"})},onContinue:function(){i.dispatch({type:"continue"})},retry:p.options.retry,retryDelay:p.options.retryDelay}),this.promise=this.retryer.promise,this.promise},e.dispatch=function(n){var a=this;this.state=this.reducer(this.state,n),Dt.batch(function(){a.observers.forEach(function(i){i.onQueryUpdate(n)}),a.cache.notify({query:a,type:"queryUpdated",action:n})})},e.getDefaultState=function(n){var a=typeof n.initialData=="function"?n.initialData():n.initialData,i=typeof n.initialData!="undefined",o=i?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0,s=typeof a!="undefined";return{data:a,dataUpdateCount:0,dataUpdatedAt:s?o!=null?o:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchMeta:null,isFetching:!1,isInvalidated:!1,isPaused:!1,status:s?"success":"idle"}},e.reducer=function(n,a){var i,o;switch(a.type){case"failed":return Ke({},n,{fetchFailureCount:n.fetchFailureCount+1});case"pause":return Ke({},n,{isPaused:!0});case"continue":return Ke({},n,{isPaused:!1});case"fetch":return Ke({},n,{fetchFailureCount:0,fetchMeta:(i=a.meta)!=null?i:null,isFetching:!0,isPaused:!1},!n.dataUpdatedAt&&{error:null,status:"loading"});case"success":return Ke({},n,{data:a.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:(o=a.dataUpdatedAt)!=null?o:Date.now(),error:null,fetchFailureCount:0,isFetching:!1,isInvalidated:!1,isPaused:!1,status:"success"});case"error":var s=a.error;return $h(s)&&s.revert&&this.revertState?Ke({},this.revertState):Ke({},n,{error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return Ke({},n,{isInvalidated:!0});case"setState":return Ke({},n,a.state);default:return n}},r}(),az=function(r){Bo(e,r);function e(n){var a;return a=r.call(this)||this,a.config=n||{},a.queries=[],a.queriesMap={},a}var t=e.prototype;return t.build=function(a,i,o){var s,l=i.queryKey,u=(s=i.queryHash)!=null?s:by(l,i),c=this.get(u);return c||(c=new nz({cache:this,queryKey:l,queryHash:u,options:a.defaultQueryOptions(i),state:o,defaultOptions:a.getQueryDefaults(l),meta:i.meta}),this.add(c)),c},t.add=function(a){this.queriesMap[a.queryHash]||(this.queriesMap[a.queryHash]=a,this.queries.push(a),this.notify({type:"queryAdded",query:a}))},t.remove=function(a){var i=this.queriesMap[a.queryHash];i&&(a.destroy(),this.queries=this.queries.filter(function(o){return o!==a}),i===a&&delete this.queriesMap[a.queryHash],this.notify({type:"queryRemoved",query:a}))},t.clear=function(){var a=this;Dt.batch(function(){a.queries.forEach(function(i){a.remove(i)})})},t.get=function(a){return this.queriesMap[a]},t.getAll=function(){return this.queries},t.find=function(a,i){var o=Fi(a,i),s=o[0];return typeof s.exact=="undefined"&&(s.exact=!0),this.queries.find(function(l){return rC(s,l)})},t.findAll=function(a,i){var o=Fi(a,i),s=o[0];return Object.keys(s).length>0?this.queries.filter(function(l){return rC(s,l)}):this.queries},t.notify=function(a){var i=this;Dt.batch(function(){i.listeners.forEach(function(o){o(a)})})},t.onFocus=function(){var a=this;Dt.batch(function(){a.queries.forEach(function(i){i.onFocus()})})},t.onOnline=function(){var a=this;Dt.batch(function(){a.queries.forEach(function(i){i.onOnline()})})},e}(dl),iz=function(){function r(t){this.options=Ke({},t.defaultOptions,t.options),this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.observers=[],this.state=t.state||fC(),this.meta=t.meta}var e=r.prototype;return e.setState=function(n){this.dispatch({type:"setState",state:n})},e.addObserver=function(n){this.observers.indexOf(n)===-1&&this.observers.push(n)},e.removeObserver=function(n){this.observers=this.observers.filter(function(a){return a!==n})},e.cancel=function(){return this.retryer?(this.retryer.cancel(),this.retryer.promise.then(hr).catch(hr)):Promise.resolve()},e.continue=function(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()},e.execute=function(){var n=this,a,i=this.state.status==="loading",o=Promise.resolve();return i||(this.dispatch({type:"loading",variables:this.options.variables}),o=o.then(function(){n.mutationCache.config.onMutate==null||n.mutationCache.config.onMutate(n.state.variables,n)}).then(function(){return n.options.onMutate==null?void 0:n.options.onMutate(n.state.variables)}).then(function(s){s!==n.state.context&&n.dispatch({type:"loading",context:s,variables:n.state.variables})})),o.then(function(){return n.executeMutation()}).then(function(s){a=s,n.mutationCache.config.onSuccess==null||n.mutationCache.config.onSuccess(a,n.state.variables,n.state.context,n)}).then(function(){return n.options.onSuccess==null?void 0:n.options.onSuccess(a,n.state.variables,n.state.context)}).then(function(){return n.options.onSettled==null?void 0:n.options.onSettled(a,null,n.state.variables,n.state.context)}).then(function(){return n.dispatch({type:"success",data:a}),a}).catch(function(s){return n.mutationCache.config.onError==null||n.mutationCache.config.onError(s,n.state.variables,n.state.context,n),Hh().error(s),Promise.resolve().then(function(){return n.options.onError==null?void 0:n.options.onError(s,n.state.variables,n.state.context)}).then(function(){return n.options.onSettled==null?void 0:n.options.onSettled(void 0,s,n.state.variables,n.state.context)}).then(function(){throw n.dispatch({type:"error",error:s}),s})})},e.executeMutation=function(){var n=this,a;return this.retryer=new uC({fn:function(){return n.options.mutationFn?n.options.mutationFn(n.state.variables):Promise.reject("No mutationFn found")},onFail:function(){n.dispatch({type:"failed"})},onPause:function(){n.dispatch({type:"pause"})},onContinue:function(){n.dispatch({type:"continue"})},retry:(a=this.options.retry)!=null?a:0,retryDelay:this.options.retryDelay}),this.retryer.promise},e.dispatch=function(n){var a=this;this.state=oz(this.state,n),Dt.batch(function(){a.observers.forEach(function(i){i.onMutationUpdate(n)}),a.mutationCache.notify(a)})},r}();function fC(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}function oz(r,e){switch(e.type){case"failed":return Ke({},r,{failureCount:r.failureCount+1});case"pause":return Ke({},r,{isPaused:!0});case"continue":return Ke({},r,{isPaused:!1});case"loading":return Ke({},r,{context:e.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:e.variables});case"success":return Ke({},r,{data:e.data,error:null,status:"success",isPaused:!1});case"error":return Ke({},r,{data:void 0,error:e.error,failureCount:r.failureCount+1,isPaused:!1,status:"error"});case"setState":return Ke({},r,e.state);default:return r}}var sz=function(r){Bo(e,r);function e(n){var a;return a=r.call(this)||this,a.config=n||{},a.mutations=[],a.mutationId=0,a}var t=e.prototype;return t.build=function(a,i,o){var s=new iz({mutationCache:this,mutationId:++this.mutationId,options:a.defaultMutationOptions(i),state:o,defaultOptions:i.mutationKey?a.getMutationDefaults(i.mutationKey):void 0,meta:i.meta});return this.add(s),s},t.add=function(a){this.mutations.push(a),this.notify(a)},t.remove=function(a){this.mutations=this.mutations.filter(function(i){return i!==a}),a.cancel(),this.notify(a)},t.clear=function(){var a=this;Dt.batch(function(){a.mutations.forEach(function(i){a.remove(i)})})},t.getAll=function(){return this.mutations},t.find=function(a){return typeof a.exact=="undefined"&&(a.exact=!0),this.mutations.find(function(i){return nC(a,i)})},t.findAll=function(a){return this.mutations.filter(function(i){return nC(a,i)})},t.notify=function(a){var i=this;Dt.batch(function(){i.listeners.forEach(function(o){o(a)})})},t.onFocus=function(){this.resumePausedMutations()},t.onOnline=function(){this.resumePausedMutations()},t.resumePausedMutations=function(){var a=this.mutations.filter(function(i){return i.state.isPaused});return Dt.batch(function(){return a.reduce(function(i,o){return i.then(function(){return o.continue().catch(hr)})},Promise.resolve())})},e}(dl);function lz(){return{onFetch:function(e){e.fetchFn=function(){var t,n,a,i,o,s,l=(t=e.fetchOptions)==null||(n=t.meta)==null?void 0:n.refetchPage,u=(a=e.fetchOptions)==null||(i=a.meta)==null?void 0:i.fetchMore,c=u==null?void 0:u.pageParam,f=(u==null?void 0:u.direction)==="forward",h=(u==null?void 0:u.direction)==="backward",v=((o=e.state.data)==null?void 0:o.pages)||[],d=((s=e.state.data)==null?void 0:s.pageParams)||[],p=sC(),g=p==null?void 0:p.signal,y=d,m=!1,_=e.options.queryFn||function(){return Promise.reject("Missing queryFn")},b=function(E,O,N,V){return y=V?[O].concat(y):[].concat(y,[O]),V?[N].concat(E):[].concat(E,[N])},w=function(E,O,N,V){if(m)return Promise.reject("Cancelled");if(typeof N=="undefined"&&!O&&E.length)return Promise.resolve(E);var $={queryKey:e.queryKey,signal:g,pageParam:N,meta:e.meta},U=_($),Y=Promise.resolve(U).then(function(H){return b(E,N,H,V)});if(Vh(U)){var ae=Y;ae.cancel=U.cancel}return Y},x;if(!v.length)x=w([]);else if(f){var S=typeof c!="undefined",T=S?c:hC(e.options,v);x=w(v,S,T)}else if(h){var D=typeof c!="undefined",M=D?c:uz(e.options,v);x=w(v,D,M,!0)}else(function(){y=[];var P=typeof e.options.getNextPageParam=="undefined",E=l&&v[0]?l(v[0],0,v):!0;x=E?w([],P,d[0]):Promise.resolve(b([],d[0],v[0]));for(var O=function($){x=x.then(function(U){var Y=l&&v[$]?l(v[$],$,v):!0;if(Y){var ae=P?d[$]:hC(e.options,U);return w(U,P,ae)}return Promise.resolve(b(U,d[$],v[$]))})},N=1;N<v.length;N++)O(N)})();var A=x.then(function(P){return{pages:P,pageParams:y}}),I=A;return I.cancel=function(){m=!0,p==null||p.abort(),Vh(x)&&x.cancel()},A}}}}function hC(r,e){return r.getNextPageParam==null?void 0:r.getNextPageParam(e[e.length-1],e)}function uz(r,e){return r.getPreviousPageParam==null?void 0:r.getPreviousPageParam(e[0],e)}var cz=function(){function r(t){t===void 0&&(t={}),this.queryCache=t.queryCache||new az,this.mutationCache=t.mutationCache||new sz,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var e=r.prototype;return e.mount=function(){var n=this;this.unsubscribeFocus=Zu.subscribe(function(){Zu.isFocused()&&Fh.isOnline()&&(n.mutationCache.onFocus(),n.queryCache.onFocus())}),this.unsubscribeOnline=Fh.subscribe(function(){Zu.isFocused()&&Fh.isOnline()&&(n.mutationCache.onOnline(),n.queryCache.onOnline())})},e.unmount=function(){var n,a;(n=this.unsubscribeFocus)==null||n.call(this),(a=this.unsubscribeOnline)==null||a.call(this)},e.isFetching=function(n,a){var i=Fi(n,a),o=i[0];return o.fetching=!0,this.queryCache.findAll(o).length},e.isMutating=function(n){return this.mutationCache.findAll(Ke({},n,{fetching:!0})).length},e.getQueryData=function(n,a){var i;return(i=this.queryCache.find(n,a))==null?void 0:i.state.data},e.getQueriesData=function(n){return this.getQueryCache().findAll(n).map(function(a){var i=a.queryKey,o=a.state,s=o.data;return[i,s]})},e.setQueryData=function(n,a,i){var o=kh(n),s=this.defaultQueryOptions(o);return this.queryCache.build(this,s).setData(a,i)},e.setQueriesData=function(n,a,i){var o=this;return Dt.batch(function(){return o.getQueryCache().findAll(n).map(function(s){var l=s.queryKey;return[l,o.setQueryData(l,a,i)]})})},e.getQueryState=function(n,a){var i;return(i=this.queryCache.find(n,a))==null?void 0:i.state},e.removeQueries=function(n,a){var i=Fi(n,a),o=i[0],s=this.queryCache;Dt.batch(function(){s.findAll(o).forEach(function(l){s.remove(l)})})},e.resetQueries=function(n,a,i){var o=this,s=Fi(n,a,i),l=s[0],u=s[1],c=this.queryCache,f=Ke({},l,{active:!0});return Dt.batch(function(){return c.findAll(l).forEach(function(h){h.reset()}),o.refetchQueries(f,u)})},e.cancelQueries=function(n,a,i){var o=this,s=Fi(n,a,i),l=s[0],u=s[1],c=u===void 0?{}:u;typeof c.revert=="undefined"&&(c.revert=!0);var f=Dt.batch(function(){return o.queryCache.findAll(l).map(function(h){return h.cancel(c)})});return Promise.all(f).then(hr).catch(hr)},e.invalidateQueries=function(n,a,i){var o,s,l,u=this,c=Fi(n,a,i),f=c[0],h=c[1],v=Ke({},f,{active:(o=(s=f.refetchActive)!=null?s:f.active)!=null?o:!0,inactive:(l=f.refetchInactive)!=null?l:!1});return Dt.batch(function(){return u.queryCache.findAll(f).forEach(function(d){d.invalidate()}),u.refetchQueries(v,h)})},e.refetchQueries=function(n,a,i){var o=this,s=Fi(n,a,i),l=s[0],u=s[1],c=Dt.batch(function(){return o.queryCache.findAll(l).map(function(h){return h.fetch(void 0,Ke({},u,{meta:{refetchPage:l==null?void 0:l.refetchPage}}))})}),f=Promise.all(c).then(hr);return u!=null&&u.throwOnError||(f=f.catch(hr)),f},e.fetchQuery=function(n,a,i){var o=kh(n,a,i),s=this.defaultQueryOptions(o);typeof s.retry=="undefined"&&(s.retry=!1);var l=this.queryCache.build(this,s);return l.isStaleByTime(s.staleTime)?l.fetch(s):Promise.resolve(l.state.data)},e.prefetchQuery=function(n,a,i){return this.fetchQuery(n,a,i).then(hr).catch(hr)},e.fetchInfiniteQuery=function(n,a,i){var o=kh(n,a,i);return o.behavior=lz(),this.fetchQuery(o)},e.prefetchInfiniteQuery=function(n,a,i){return this.fetchInfiniteQuery(n,a,i).then(hr).catch(hr)},e.cancelMutations=function(){var n=this,a=Dt.batch(function(){return n.mutationCache.getAll().map(function(i){return i.cancel()})});return Promise.all(a).then(hr).catch(hr)},e.resumePausedMutations=function(){return this.getMutationCache().resumePausedMutations()},e.executeMutation=function(n){return this.mutationCache.build(this,n).execute()},e.getQueryCache=function(){return this.queryCache},e.getMutationCache=function(){return this.mutationCache},e.getDefaultOptions=function(){return this.defaultOptions},e.setDefaultOptions=function(n){this.defaultOptions=n},e.setQueryDefaults=function(n,a){var i=this.queryDefaults.find(function(o){return zo(n)===zo(o.queryKey)});i?i.defaultOptions=a:this.queryDefaults.push({queryKey:n,defaultOptions:a})},e.getQueryDefaults=function(n){var a;return n?(a=this.queryDefaults.find(function(i){return Bh(n,i.queryKey)}))==null?void 0:a.defaultOptions:void 0},e.setMutationDefaults=function(n,a){var i=this.mutationDefaults.find(function(o){return zo(n)===zo(o.mutationKey)});i?i.defaultOptions=a:this.mutationDefaults.push({mutationKey:n,defaultOptions:a})},e.getMutationDefaults=function(n){var a;return n?(a=this.mutationDefaults.find(function(i){return Bh(n,i.mutationKey)}))==null?void 0:a.defaultOptions:void 0},e.defaultQueryOptions=function(n){if(n!=null&&n._defaulted)return n;var a=Ke({},this.defaultOptions.queries,this.getQueryDefaults(n==null?void 0:n.queryKey),n,{_defaulted:!0});return!a.queryHash&&a.queryKey&&(a.queryHash=by(a.queryKey,a)),a},e.defaultQueryObserverOptions=function(n){return this.defaultQueryOptions(n)},e.defaultMutationOptions=function(n){return n!=null&&n._defaulted?n:Ke({},this.defaultOptions.mutations,this.getMutationDefaults(n==null?void 0:n.mutationKey),n,{_defaulted:!0})},e.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},r}(),fz=function(r){Bo(e,r);function e(n,a){var i;return i=r.call(this)||this,i.client=n,i.options=a,i.trackedProps=[],i.selectError=null,i.bindMethods(),i.setOptions(a),i}var t=e.prototype;return t.bindMethods=function(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)},t.onSubscribe=function(){this.listeners.length===1&&(this.currentQuery.addObserver(this),vC(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},t.onUnsubscribe=function(){this.listeners.length||this.destroy()},t.shouldFetchOnReconnect=function(){return wy(this.currentQuery,this.options,this.options.refetchOnReconnect)},t.shouldFetchOnWindowFocus=function(){return wy(this.currentQuery,this.options,this.options.refetchOnWindowFocus)},t.destroy=function(){this.listeners=[],this.clearTimers(),this.currentQuery.removeObserver(this)},t.setOptions=function(a,i){var o=this.options,s=this.currentQuery;if(this.options=this.client.defaultQueryObserverOptions(a),typeof this.options.enabled!="undefined"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=o.queryKey),this.updateQuery();var l=this.hasListeners();l&&dC(this.currentQuery,s,this.options,o)&&this.executeFetch(),this.updateResult(i),l&&(this.currentQuery!==s||this.options.enabled!==o.enabled||this.options.staleTime!==o.staleTime)&&this.updateStaleTimeout();var u=this.computeRefetchInterval();l&&(this.currentQuery!==s||this.options.enabled!==o.enabled||u!==this.currentRefetchInterval)&&this.updateRefetchInterval(u)},t.getOptimisticResult=function(a){var i=this.client.defaultQueryObserverOptions(a),o=this.client.getQueryCache().build(this.client,i);return this.createResult(o,i)},t.getCurrentResult=function(){return this.currentResult},t.trackResult=function(a,i){var o=this,s={},l=function(c){o.trackedProps.includes(c)||o.trackedProps.push(c)};return Object.keys(a).forEach(function(u){Object.defineProperty(s,u,{configurable:!1,enumerable:!0,get:function(){return l(u),a[u]}})}),(i.useErrorBoundary||i.suspense)&&l("error"),s},t.getNextResult=function(a){var i=this;return new Promise(function(o,s){var l=i.subscribe(function(u){u.isFetching||(l(),u.isError&&(a==null?void 0:a.throwOnError)?s(u.error):o(u))})})},t.getCurrentQuery=function(){return this.currentQuery},t.remove=function(){this.client.getQueryCache().remove(this.currentQuery)},t.refetch=function(a){return this.fetch(Ke({},a,{meta:{refetchPage:a==null?void 0:a.refetchPage}}))},t.fetchOptimistic=function(a){var i=this,o=this.client.defaultQueryObserverOptions(a),s=this.client.getQueryCache().build(this.client,o);return s.fetch().then(function(){return i.createResult(s,o)})},t.fetch=function(a){var i=this;return this.executeFetch(a).then(function(){return i.updateResult(),i.currentResult})},t.executeFetch=function(a){this.updateQuery();var i=this.currentQuery.fetch(this.options,a);return a!=null&&a.throwOnError||(i=i.catch(hr)),i},t.updateStaleTimeout=function(){var a=this;if(this.clearStaleTimeout(),!(Rh||this.currentResult.isStale||!_y(this.options.staleTime))){var i=tC(this.currentResult.dataUpdatedAt,this.options.staleTime),o=i+1;this.staleTimeoutId=setTimeout(function(){a.currentResult.isStale||a.updateResult()},o)}},t.computeRefetchInterval=function(){var a;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(a=this.options.refetchInterval)!=null?a:!1},t.updateRefetchInterval=function(a){var i=this;this.clearRefetchInterval(),this.currentRefetchInterval=a,!(Rh||this.options.enabled===!1||!_y(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(function(){(i.options.refetchIntervalInBackground||Zu.isFocused())&&i.executeFetch()},this.currentRefetchInterval))},t.updateTimers=function(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())},t.clearTimers=function(){this.clearStaleTimeout(),this.clearRefetchInterval()},t.clearStaleTimeout=function(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)},t.clearRefetchInterval=function(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)},t.createResult=function(a,i){var o=this.currentQuery,s=this.options,l=this.currentResult,u=this.currentResultState,c=this.currentResultOptions,f=a!==o,h=f?a.state:this.currentQueryInitialState,v=f?this.currentResult:this.previousQueryResult,d=a.state,p=d.dataUpdatedAt,g=d.error,y=d.errorUpdatedAt,m=d.isFetching,_=d.status,b=!1,w=!1,x;if(i.optimisticResults){var S=this.hasListeners(),T=!S&&vC(a,i),D=S&&dC(a,o,i,s);(T||D)&&(m=!0,p||(_="loading"))}if(i.keepPreviousData&&!d.dataUpdateCount&&(v==null?void 0:v.isSuccess)&&_!=="error")x=v.data,p=v.dataUpdatedAt,_=v.status,b=!0;else if(i.select&&typeof d.data!="undefined")if(l&&d.data===(u==null?void 0:u.data)&&i.select===this.selectFn)x=this.selectResult;else try{this.selectFn=i.select,x=i.select(d.data),i.structuralSharing!==!1&&(x=zh(l==null?void 0:l.data,x)),this.selectResult=x,this.selectError=null}catch(I){Hh().error(I),this.selectError=I}else x=d.data;if(typeof i.placeholderData!="undefined"&&typeof x=="undefined"&&(_==="loading"||_==="idle")){var M;if((l==null?void 0:l.isPlaceholderData)&&i.placeholderData===(c==null?void 0:c.placeholderData))M=l.data;else if(M=typeof i.placeholderData=="function"?i.placeholderData():i.placeholderData,i.select&&typeof M!="undefined")try{M=i.select(M),i.structuralSharing!==!1&&(M=zh(l==null?void 0:l.data,M)),this.selectError=null}catch(I){Hh().error(I),this.selectError=I}typeof M!="undefined"&&(_="success",x=M,w=!0)}this.selectError&&(g=this.selectError,x=this.selectResult,y=Date.now(),_="error");var A={status:_,isLoading:_==="loading",isSuccess:_==="success",isError:_==="error",isIdle:_==="idle",data:x,dataUpdatedAt:p,error:g,errorUpdatedAt:y,failureCount:d.fetchFailureCount,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>h.dataUpdateCount||d.errorUpdateCount>h.errorUpdateCount,isFetching:m,isRefetching:m&&_!=="loading",isLoadingError:_==="error"&&d.dataUpdatedAt===0,isPlaceholderData:w,isPreviousData:b,isRefetchError:_==="error"&&d.dataUpdatedAt!==0,isStale:Sy(a,i),refetch:this.refetch,remove:this.remove};return A},t.shouldNotifyListeners=function(a,i){if(!i)return!0;var o=this.options,s=o.notifyOnChangeProps,l=o.notifyOnChangePropsExclusions;if(!s&&!l||s==="tracked"&&!this.trackedProps.length)return!0;var u=s==="tracked"?this.trackedProps:s;return Object.keys(a).some(function(c){var f=c,h=a[f]!==i[f],v=u==null?void 0:u.some(function(p){return p===c}),d=l==null?void 0:l.some(function(p){return p===c});return h&&!d&&(!u||v)})},t.updateResult=function(a){var i=this.currentResult;if(this.currentResult=this.createResult(this.currentQuery,this.options),this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,!X3(this.currentResult,i)){var o={cache:!0};(a==null?void 0:a.listeners)!==!1&&this.shouldNotifyListeners(this.currentResult,i)&&(o.listeners=!0),this.notify(Ke({},o,a))}},t.updateQuery=function(){var a=this.client.getQueryCache().build(this.client,this.options);if(a!==this.currentQuery){var i=this.currentQuery;this.currentQuery=a,this.currentQueryInitialState=a.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(i==null||i.removeObserver(this),a.addObserver(this))}},t.onQueryUpdate=function(a){var i={};a.type==="success"?i.onSuccess=!0:a.type==="error"&&!$h(a.error)&&(i.onError=!0),this.updateResult(i),this.hasListeners()&&this.updateTimers()},t.notify=function(a){var i=this;Dt.batch(function(){a.onSuccess?(i.options.onSuccess==null||i.options.onSuccess(i.currentResult.data),i.options.onSettled==null||i.options.onSettled(i.currentResult.data,null)):a.onError&&(i.options.onError==null||i.options.onError(i.currentResult.error),i.options.onSettled==null||i.options.onSettled(void 0,i.currentResult.error)),a.listeners&&i.listeners.forEach(function(o){o(i.currentResult)}),a.cache&&i.client.getQueryCache().notify({query:i.currentQuery,type:"observerResultsUpdated"})})},e}(dl);function hz(r,e){return e.enabled!==!1&&!r.state.dataUpdatedAt&&!(r.state.status==="error"&&e.retryOnMount===!1)}function vC(r,e){return hz(r,e)||r.state.dataUpdatedAt>0&&wy(r,e,e.refetchOnMount)}function wy(r,e,t){if(e.enabled!==!1){var n=typeof t=="function"?t(r):t;return n==="always"||n!==!1&&Sy(r,e)}return!1}function dC(r,e,t,n){return t.enabled!==!1&&(r!==e||n.enabled===!1)&&(!t.suspense||r.state.status!=="error")&&Sy(r,t)}function Sy(r,e){return r.isStaleByTime(e.staleTime)}var vz=function(r){Bo(e,r);function e(n,a){var i;return i=r.call(this)||this,i.client=n,i.setOptions(a),i.bindMethods(),i.updateResult(),i}var t=e.prototype;return t.bindMethods=function(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)},t.setOptions=function(a){this.options=this.client.defaultMutationOptions(a)},t.onUnsubscribe=function(){if(!this.listeners.length){var a;(a=this.currentMutation)==null||a.removeObserver(this)}},t.onMutationUpdate=function(a){this.updateResult();var i={listeners:!0};a.type==="success"?i.onSuccess=!0:a.type==="error"&&(i.onError=!0),this.notify(i)},t.getCurrentResult=function(){return this.currentResult},t.reset=function(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})},t.mutate=function(a,i){return this.mutateOptions=i,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,Ke({},this.options,{variables:typeof a!="undefined"?a:this.options.variables})),this.currentMutation.addObserver(this),this.currentMutation.execute()},t.updateResult=function(){var a=this.currentMutation?this.currentMutation.state:fC(),i=Ke({},a,{isLoading:a.status==="loading",isSuccess:a.status==="success",isError:a.status==="error",isIdle:a.status==="idle",mutate:this.mutate,reset:this.reset});this.currentResult=i},t.notify=function(a){var i=this;Dt.batch(function(){i.mutateOptions&&(a.onSuccess?(i.mutateOptions.onSuccess==null||i.mutateOptions.onSuccess(i.currentResult.data,i.currentResult.variables,i.currentResult.context),i.mutateOptions.onSettled==null||i.mutateOptions.onSettled(i.currentResult.data,null,i.currentResult.variables,i.currentResult.context)):a.onError&&(i.mutateOptions.onError==null||i.mutateOptions.onError(i.currentResult.error,i.currentResult.variables,i.currentResult.context),i.mutateOptions.onSettled==null||i.mutateOptions.onSettled(void 0,i.currentResult.error,i.currentResult.variables,i.currentResult.context))),a.listeners&&i.listeners.forEach(function(o){o(i.currentResult)})})},e}(dl),dz=Oh.default.unstable_batchedUpdates;Dt.setBatchNotifyFunction(dz);var pz=console;rz(pz);var pC=pe.default.createContext(void 0),gC=pe.default.createContext(!1);function yC(r){return r&&typeof window!="undefined"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=pC),window.ReactQueryClientContext):pC}var mC=function(){var e=pe.default.useContext(yC(pe.default.useContext(gC)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},gz=function(e){var t=e.client,n=e.contextSharing,a=n===void 0?!1:n,i=e.children;pe.default.useEffect(function(){return t.mount(),function(){t.unmount()}},[t]);var o=yC(a);return pe.default.createElement(gC.Provider,{value:a},pe.default.createElement(o.Provider,{value:t},i))};function yz(){var r=!1;return{clearReset:function(){r=!1},reset:function(){r=!0},isReset:function(){return r}}}var mz=pe.default.createContext(yz()),_z=function(){return pe.default.useContext(mz)};function _C(r,e,t){return typeof e=="function"?e.apply(void 0,t):typeof e=="boolean"?e:!!r}function pl(r,e,t){var n=pe.default.useRef(!1),a=pe.default.useState(0),i=a[1],o=Y3(r,e,t),s=mC(),l=pe.default.useRef();l.current?l.current.setOptions(o):l.current=new vz(s,o);var u=l.current.getCurrentResult();pe.default.useEffect(function(){n.current=!0;var f=l.current.subscribe(Dt.batchCalls(function(){n.current&&i(function(h){return h+1})}));return function(){n.current=!1,f()}},[]);var c=pe.default.useCallback(function(f,h){l.current.mutate(f,h).catch(hr)},[]);if(u.error&&_C(void 0,l.current.options.useErrorBoundary,[u.error]))throw u.error;return Ke({},u,{mutate:c,mutateAsync:u.mutate})}function bz(r,e){var t=pe.default.useRef(!1),n=pe.default.useState(0),a=n[1],i=mC(),o=_z(),s=i.defaultQueryObserverOptions(r);s.optimisticResults=!0,s.onError&&(s.onError=Dt.batchCalls(s.onError)),s.onSuccess&&(s.onSuccess=Dt.batchCalls(s.onSuccess)),s.onSettled&&(s.onSettled=Dt.batchCalls(s.onSettled)),s.suspense&&(typeof s.staleTime!="number"&&(s.staleTime=1e3),s.cacheTime===0&&(s.cacheTime=1)),(s.suspense||s.useErrorBoundary)&&(o.isReset()||(s.retryOnMount=!1));var l=pe.default.useState(function(){return new e(i,s)}),u=l[0],c=u.getOptimisticResult(s);if(pe.default.useEffect(function(){t.current=!0,o.clearReset();var f=u.subscribe(Dt.batchCalls(function(){t.current&&a(function(h){return h+1})}));return u.updateResult(),function(){t.current=!1,f()}},[o,u]),pe.default.useEffect(function(){u.setOptions(s,{listeners:!1})},[s,u]),s.suspense&&c.isLoading)throw u.fetchOptimistic(s).then(function(f){var h=f.data;s.onSuccess==null||s.onSuccess(h),s.onSettled==null||s.onSettled(h,null)}).catch(function(f){o.clearReset(),s.onError==null||s.onError(f),s.onSettled==null||s.onSettled(void 0,f)});if(c.isError&&!o.isReset()&&!c.isFetching&&_C(s.suspense,s.useErrorBoundary,[c.error,u.getCurrentQuery()]))throw c.error;return s.notifyOnChangeProps==="tracked"&&(c=u.trackResult(c,s)),c}function gl(r,e,t){var n=kh(r,e,t);return bz(n,fz)}var en={container:"_container_1hfou_1",static:"_static_1hfou_387",fixed:"_fixed_1hfou_1",absolute:"_absolute_1hfou_1","left-2":"_left-2_1hfou_1","top-1":"_top-1_1hfou_1","my-2":"_my-2_1hfou_1","mt-2.5":"_mt-2.5_1hfou_1","mt-2":"_mt-2_1hfou_1","mb-3":"_mb-3_1hfou_1",table:"_table_1hfou_1",grid:"_grid_1hfou_1",hidden:"_hidden_1hfou_1","h-screen":"_h-screen_1hfou_1","h-[10%]":"_h-[10%]_1hfou_1","w-screen":"_w-screen_1hfou_1","w-full":"_w-full_1hfou_1",transform:"_transform_1hfou_1",resize:"_resize_1hfou_1","overflow-x-hidden":"_overflow-x-hidden_1hfou_1",truncate:"_truncate_1hfou_1",border:"_border_1hfou_1","p-2":"_p-2_1hfou_1","text-center":"_text-center_1hfou_1","text-sm":"_text-sm_1hfou_1","text-xs":"_text-xs_1hfou_1","text-blue-700":"_text-blue-700_1hfou_1",shadow:"_shadow_1hfou_1",filter:"_filter_1hfou_347","!filter":"_!filter_1hfou_1","embedDashboard-container":"_embedDashboard-container_1hfou_307","embedDashboard-header-static":"_embedDashboard-header-static_1hfou_315","embedDashboard-header-floating":"_embedDashboard-header-floating_1hfou_323","embedDashboard-wrapper":"_embedDashboard-wrapper_1hfou_331","alt-container":"_alt-container_1hfou_339",floatingFilterButton:"_floatingFilterButton_1hfou_355",floatingFilterButtonIcon:"_floatingFilterButtonIcon_1hfou_363",floatingButton:"_floatingButton_1hfou_371",floatingButtonIcon:"_floatingButtonIcon_1hfou_379",staticContainer:"_staticContainer_1hfou_387",floatingContainer:"_floatingContainer_1hfou_395","hover:cursor-pointer":"_hover:cursor-pointer_1hfou_1","hover:cursor-text":"_hover:cursor-text_1hfou_1","disabled:cursor-text":"_disabled:cursor-text_1hfou_1"},Gh=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function xz(r){if(r.__esModule)return r;var e=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(r).forEach(function(t){var n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:function(){return r[t]}})}),e}var Cy={exports:{}},Xu={},Qu={exports:{}};(function(r,e){var t=200,n="__lodash_hash_undefined__",a=1,i=2,o=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",c="[object Boolean]",f="[object Date]",h="[object Error]",v="[object Function]",d="[object GeneratorFunction]",p="[object Map]",g="[object Number]",y="[object Null]",m="[object Object]",_="[object Promise]",b="[object Proxy]",w="[object RegExp]",x="[object Set]",S="[object String]",T="[object Symbol]",D="[object Undefined]",M="[object WeakMap]",A="[object ArrayBuffer]",I="[object DataView]",P="[object Float32Array]",E="[object Float64Array]",O="[object Int8Array]",N="[object Int16Array]",V="[object Int32Array]",$="[object Uint8Array]",U="[object Uint8ClampedArray]",Y="[object Uint16Array]",ae="[object Uint32Array]",H=/[\\^$.*+?()[\]{}|]/g,q=/^\[object .+?Constructor\]$/,X=/^(?:0|[1-9]\d*)$/,Z={};Z[P]=Z[E]=Z[O]=Z[N]=Z[V]=Z[$]=Z[U]=Z[Y]=Z[ae]=!0,Z[s]=Z[l]=Z[A]=Z[c]=Z[I]=Z[f]=Z[h]=Z[v]=Z[p]=Z[g]=Z[m]=Z[w]=Z[x]=Z[S]=Z[M]=!1;var ie=typeof Gh=="object"&&Gh&&Gh.Object===Object&&Gh,se=typeof self=="object"&&self&&self.Object===Object&&self,te=ie||se||Function("return this")(),ve=e&&!e.nodeType&&e,R=ve&&!0&&r&&!r.nodeType&&r,F=R&&R.exports===ve,G=F&&ie.process,re=function(){try{return G&&G.binding&&G.binding("util")}catch{}}(),ne=re&&re.isTypedArray;function ee(k,W){for(var oe=-1,Se=k==null?0:k.length,Tt=0,Ze=[];++oe<Se;){var Vt=k[oe];W(Vt,oe,k)&&(Ze[Tt++]=Vt)}return Ze}function ue(k,W){for(var oe=-1,Se=W.length,Tt=k.length;++oe<Se;)k[Tt+oe]=W[oe];return k}function De(k,W){for(var oe=-1,Se=k==null?0:k.length;++oe<Se;)if(W(k[oe],oe,k))return!0;return!1}function vt(k,W){for(var oe=-1,Se=Array(k);++oe<k;)Se[oe]=W(oe);return Se}function rt(k){return function(W){return k(W)}}function Yt(k,W){return k.has(W)}function Ct(k,W){return k==null?void 0:k[W]}function Qr(k){var W=-1,oe=Array(k.size);return k.forEach(function(Se,Tt){oe[++W]=[Tt,Se]}),oe}function St(k,W){return function(oe){return k(W(oe))}}function bt(k){var W=-1,oe=Array(k.size);return k.forEach(function(Se){oe[++W]=Se}),oe}var Qt=Array.prototype,Ta=Function.prototype,or=Object.prototype,Ni=te["__core-js_shared__"],Uu=Ta.toString,Kr=or.hasOwnProperty,ju=function(){var k=/[^.]+$/.exec(Ni&&Ni.keys&&Ni.keys.IE_PROTO||"");return k?"Symbol(src)_1."+k:""}(),ll=or.toString,Ih=RegExp("^"+Uu.call(Kr).replace(H,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ul=F?te.Buffer:void 0,ki=te.Symbol,Jr=te.Uint8Array,Tn=or.propertyIsEnumerable,Da=Qt.splice,Dn=ki?ki.toStringTag:void 0,Ja=Object.getOwnPropertySymbols,ct=ul?ul.isBuffer:void 0,hn=St(Object.keys,Object),Ie=Yu(te,"DataView"),ft=Yu(te,"Map"),xr=Yu(te,"Promise"),Qe=Yu(te,"Set"),Pt=Yu(te,"WeakMap"),Kt=Yu(Object,"create"),kr=hl(Ie),ly=hl(ft),uy=hl(xr),cy=hl(Qe),Yhe=hl(Pt),P3=ki?ki.prototype:void 0,QS=P3?P3.valueOf:void 0;function cl(k){var W=-1,oe=k==null?0:k.length;for(this.clear();++W<oe;){var Se=k[W];this.set(Se[0],Se[1])}}function qhe(){this.__data__=Kt?Kt(null):{},this.size=0}function Zhe(k){var W=this.has(k)&&delete this.__data__[k];return this.size-=W?1:0,W}function Xhe(k){var W=this.__data__;if(Kt){var oe=W[k];return oe===n?void 0:oe}return Kr.call(W,k)?W[k]:void 0}function Qhe(k){var W=this.__data__;return Kt?W[k]!==void 0:Kr.call(W,k)}function Khe(k,W){var oe=this.__data__;return this.size+=this.has(k)?0:1,oe[k]=Kt&&W===void 0?n:W,this}cl.prototype.clear=qhe,cl.prototype.delete=Zhe,cl.prototype.get=Xhe,cl.prototype.has=Qhe,cl.prototype.set=Khe;function Bi(k){var W=-1,oe=k==null?0:k.length;for(this.clear();++W<oe;){var Se=k[W];this.set(Se[0],Se[1])}}function Jhe(){this.__data__=[],this.size=0}function eve(k){var W=this.__data__,oe=hy(W,k);if(oe<0)return!1;var Se=W.length-1;return oe==Se?W.pop():Da.call(W,oe,1),--this.size,!0}function tve(k){var W=this.__data__,oe=hy(W,k);return oe<0?void 0:W[oe][1]}function rve(k){return hy(this.__data__,k)>-1}function nve(k,W){var oe=this.__data__,Se=hy(oe,k);return Se<0?(++this.size,oe.push([k,W])):oe[Se][1]=W,this}Bi.prototype.clear=Jhe,Bi.prototype.delete=eve,Bi.prototype.get=tve,Bi.prototype.has=rve,Bi.prototype.set=nve;function fl(k){var W=-1,oe=k==null?0:k.length;for(this.clear();++W<oe;){var Se=k[W];this.set(Se[0],Se[1])}}function ave(){this.size=0,this.__data__={hash:new cl,map:new(ft||Bi),string:new cl}}function ive(k){var W=vy(this,k).delete(k);return this.size-=W?1:0,W}function ove(k){return vy(this,k).get(k)}function sve(k){return vy(this,k).has(k)}function lve(k,W){var oe=vy(this,k),Se=oe.size;return oe.set(k,W),this.size+=oe.size==Se?0:1,this}fl.prototype.clear=ave,fl.prototype.delete=ive,fl.prototype.get=ove,fl.prototype.has=sve,fl.prototype.set=lve;function fy(k){var W=-1,oe=k==null?0:k.length;for(this.__data__=new fl;++W<oe;)this.add(k[W])}function uve(k){return this.__data__.set(k,n),this}function cve(k){return this.__data__.has(k)}fy.prototype.add=fy.prototype.push=uve,fy.prototype.has=cve;function Ro(k){var W=this.__data__=new Bi(k);this.size=W.size}function fve(){this.__data__=new Bi,this.size=0}function hve(k){var W=this.__data__,oe=W.delete(k);return this.size=W.size,oe}function vve(k){return this.__data__.get(k)}function dve(k){return this.__data__.has(k)}function pve(k,W){var oe=this.__data__;if(oe instanceof Bi){var Se=oe.__data__;if(!ft||Se.length<t-1)return Se.push([k,W]),this.size=++oe.size,this;oe=this.__data__=new fl(Se)}return oe.set(k,W),this.size=oe.size,this}Ro.prototype.clear=fve,Ro.prototype.delete=hve,Ro.prototype.get=vve,Ro.prototype.has=dve,Ro.prototype.set=pve;function gve(k,W){var oe=dy(k),Se=!oe&&Pve(k),Tt=!oe&&!Se&&KS(k),Ze=!oe&&!Se&&!Tt&&V3(k),Vt=oe||Se||Tt||Ze,fr=Vt?vt(k.length,String):[],wr=fr.length;for(var Rt in k)(W||Kr.call(k,Rt))&&!(Vt&&(Rt=="length"||Tt&&(Rt=="offset"||Rt=="parent")||Ze&&(Rt=="buffer"||Rt=="byteLength"||Rt=="byteOffset")||Dve(Rt,wr)))&&fr.push(Rt);return fr}function hy(k,W){for(var oe=k.length;oe--;)if(k3(k[oe][0],W))return oe;return-1}function yve(k,W,oe){var Se=W(k);return dy(k)?Se:ue(Se,oe(k))}function Ph(k){return k==null?k===void 0?D:y:Dn&&Dn in Object(k)?Cve(k):Ive(k)}function E3(k){return Eh(k)&&Ph(k)==s}function O3(k,W,oe,Se,Tt){return k===W?!0:k==null||W==null||!Eh(k)&&!Eh(W)?k!==k&&W!==W:mve(k,W,oe,Se,O3,Tt)}function mve(k,W,oe,Se,Tt,Ze){var Vt=dy(k),fr=dy(W),wr=Vt?l:No(k),Rt=fr?l:No(W);wr=wr==s?m:wr,Rt=Rt==s?m:Rt;var Mn=wr==m,Ma=Rt==m,Br=wr==Rt;if(Br&&KS(k)){if(!KS(W))return!1;Vt=!0,Mn=!1}if(Br&&!Mn)return Ze||(Ze=new Ro),Vt||V3(k)?R3(k,W,oe,Se,Tt,Ze):wve(k,W,wr,oe,Se,Tt,Ze);if(!(oe&a)){var ta=Mn&&Kr.call(k,"__wrapped__"),ra=Ma&&Kr.call(W,"__wrapped__");if(ta||ra){var ko=ta?k.value():k,zi=ra?W.value():W;return Ze||(Ze=new Ro),Tt(ko,zi,oe,Se,Ze)}}return Br?(Ze||(Ze=new Ro),Sve(k,W,oe,Se,Tt,Ze)):!1}function _ve(k){if(!F3(k)||Ave(k))return!1;var W=B3(k)?Ih:q;return W.test(hl(k))}function bve(k){return Eh(k)&&z3(k.length)&&!!Z[Ph(k)]}function xve(k){if(!Lve(k))return hn(k);var W=[];for(var oe in Object(k))Kr.call(k,oe)&&oe!="constructor"&&W.push(oe);return W}function R3(k,W,oe,Se,Tt,Ze){var Vt=oe&a,fr=k.length,wr=W.length;if(fr!=wr&&!(Vt&&wr>fr))return!1;var Rt=Ze.get(k);if(Rt&&Ze.get(W))return Rt==W;var Mn=-1,Ma=!0,Br=oe&i?new fy:void 0;for(Ze.set(k,W),Ze.set(W,k);++Mn<fr;){var ta=k[Mn],ra=W[Mn];if(Se)var ko=Vt?Se(ra,ta,Mn,W,k,Ze):Se(ta,ra,Mn,k,W,Ze);if(ko!==void 0){if(ko)continue;Ma=!1;break}if(Br){if(!De(W,function(zi,vl){if(!Yt(Br,vl)&&(ta===zi||Tt(ta,zi,oe,Se,Ze)))return Br.push(vl)})){Ma=!1;break}}else if(!(ta===ra||Tt(ta,ra,oe,Se,Ze))){Ma=!1;break}}return Ze.delete(k),Ze.delete(W),Ma}function wve(k,W,oe,Se,Tt,Ze,Vt){switch(oe){case I:if(k.byteLength!=W.byteLength||k.byteOffset!=W.byteOffset)return!1;k=k.buffer,W=W.buffer;case A:return!(k.byteLength!=W.byteLength||!Ze(new Jr(k),new Jr(W)));case c:case f:case g:return k3(+k,+W);case h:return k.name==W.name&&k.message==W.message;case w:case S:return k==W+"";case p:var fr=Qr;case x:var wr=Se&a;if(fr||(fr=bt),k.size!=W.size&&!wr)return!1;var Rt=Vt.get(k);if(Rt)return Rt==W;Se|=i,Vt.set(k,W);var Mn=R3(fr(k),fr(W),Se,Tt,Ze,Vt);return Vt.delete(k),Mn;case T:if(QS)return QS.call(k)==QS.call(W)}return!1}function Sve(k,W,oe,Se,Tt,Ze){var Vt=oe&a,fr=N3(k),wr=fr.length,Rt=N3(W),Mn=Rt.length;if(wr!=Mn&&!Vt)return!1;for(var Ma=wr;Ma--;){var Br=fr[Ma];if(!(Vt?Br in W:Kr.call(W,Br)))return!1}var ta=Ze.get(k);if(ta&&Ze.get(W))return ta==W;var ra=!0;Ze.set(k,W),Ze.set(W,k);for(var ko=Vt;++Ma<wr;){Br=fr[Ma];var zi=k[Br],vl=W[Br];if(Se)var $3=Vt?Se(vl,zi,Br,W,k,Ze):Se(zi,vl,Br,k,W,Ze);if(!($3===void 0?zi===vl||Tt(zi,vl,oe,Se,Ze):$3)){ra=!1;break}ko||(ko=Br=="constructor")}if(ra&&!ko){var py=k.constructor,gy=W.constructor;py!=gy&&"constructor"in k&&"constructor"in W&&!(typeof py=="function"&&py instanceof py&&typeof gy=="function"&&gy instanceof gy)&&(ra=!1)}return Ze.delete(k),Ze.delete(W),ra}function N3(k){return yve(k,Rve,Tve)}function vy(k,W){var oe=k.__data__;return Mve(W)?oe[typeof W=="string"?"string":"hash"]:oe.map}function Yu(k,W){var oe=Ct(k,W);return _ve(oe)?oe:void 0}function Cve(k){var W=Kr.call(k,Dn),oe=k[Dn];try{k[Dn]=void 0;var Se=!0}catch{}var Tt=ll.call(k);return Se&&(W?k[Dn]=oe:delete k[Dn]),Tt}var Tve=Ja?function(k){return k==null?[]:(k=Object(k),ee(Ja(k),function(W){return Tn.call(k,W)}))}:Nve,No=Ph;(Ie&&No(new Ie(new ArrayBuffer(1)))!=I||ft&&No(new ft)!=p||xr&&No(xr.resolve())!=_||Qe&&No(new Qe)!=x||Pt&&No(new Pt)!=M)&&(No=function(k){var W=Ph(k),oe=W==m?k.constructor:void 0,Se=oe?hl(oe):"";if(Se)switch(Se){case kr:return I;case ly:return p;case uy:return _;case cy:return x;case Yhe:return M}return W});function Dve(k,W){return W=W==null?o:W,!!W&&(typeof k=="number"||X.test(k))&&k>-1&&k%1==0&&k<W}function Mve(k){var W=typeof k;return W=="string"||W=="number"||W=="symbol"||W=="boolean"?k!=="__proto__":k===null}function Ave(k){return!!ju&&ju in k}function Lve(k){var W=k&&k.constructor,oe=typeof W=="function"&&W.prototype||or;return k===oe}function Ive(k){return ll.call(k)}function hl(k){if(k!=null){try{return Uu.call(k)}catch{}try{return k+""}catch{}}return""}function k3(k,W){return k===W||k!==k&&W!==W}var Pve=E3(function(){return arguments}())?E3:function(k){return Eh(k)&&Kr.call(k,"callee")&&!Tn.call(k,"callee")},dy=Array.isArray;function Eve(k){return k!=null&&z3(k.length)&&!B3(k)}var KS=ct||kve;function Ove(k,W){return O3(k,W)}function B3(k){if(!F3(k))return!1;var W=Ph(k);return W==v||W==d||W==u||W==b}function z3(k){return typeof k=="number"&&k>-1&&k%1==0&&k<=o}function F3(k){var W=typeof k;return k!=null&&(W=="object"||W=="function")}function Eh(k){return k!=null&&typeof k=="object"}var V3=ne?rt(ne):bve;function Rve(k){return Eve(k)?gve(k):xve(k)}function Nve(){return[]}function kve(){return!1}r.exports=Ove})(Qu,Qu.exports);function bC(r){var e,t,n="";if(typeof r=="string"||typeof r=="number")n+=r;else if(typeof r=="object")if(Array.isArray(r))for(e=0;e<r.length;e++)r[e]&&(t=bC(r[e]))&&(n&&(n+=" "),n+=t);else for(e in r)r[e]&&(n&&(n+=" "),n+=e);return n}function xC(){for(var r,e,t=0,n="";t<arguments.length;)(r=arguments[t++])&&(e=bC(r))&&(n&&(n+=" "),n+=e);return n}var wz=Object.freeze(Object.defineProperty({__proto__:null,clsx:xC,default:xC},Symbol.toStringTag,{value:"Module"})),Wh=xz(wz),Je={},Sz=function(e,t,n){return e===t?!0:e.className===t.className&&n(e.style,t.style)&&e.width===t.width&&e.autoSize===t.autoSize&&e.cols===t.cols&&e.draggableCancel===t.draggableCancel&&e.draggableHandle===t.draggableHandle&&n(e.verticalCompact,t.verticalCompact)&&n(e.compactType,t.compactType)&&n(e.layout,t.layout)&&n(e.margin,t.margin)&&n(e.containerPadding,t.containerPadding)&&e.rowHeight===t.rowHeight&&e.maxRows===t.maxRows&&e.isBounded===t.isBounded&&e.isDraggable===t.isDraggable&&e.isResizable===t.isResizable&&e.allowOverlap===t.allowOverlap&&e.preventCollision===t.preventCollision&&e.useCSSTransforms===t.useCSSTransforms&&e.transformScale===t.transformScale&&e.isDroppable===t.isDroppable&&n(e.resizeHandles,t.resizeHandles)&&n(e.resizeHandle,t.resizeHandle)&&e.onLayoutChange===t.onLayoutChange&&e.onDragStart===t.onDragStart&&e.onDrag===t.onDrag&&e.onDragStop===t.onDragStop&&e.onResizeStart===t.onResizeStart&&e.onResize===t.onResize&&e.onResizeStop===t.onResizeStop&&e.onDrop===t.onDrop&&n(e.droppingItem,t.droppingItem)&&n(e.innerRef,t.innerRef)};Object.defineProperty(Je,"__esModule",{value:!0}),Je.bottom=Dy,Je.childrenEqual=Mz,Je.cloneLayout=TC,Je.cloneLayoutItem=Fo,Je.collides=Uh,Je.compact=MC,Je.compactItem=AC,Je.compactType=kz,Je.correctBounds=LC,Je.fastPositionEqual=Lz,Je.fastRGLPropsEqual=void 0,Je.getAllCollisions=IC,Je.getFirstCollision=yl,Je.getLayoutItem=Ay,Je.getStatics=Ly,Je.modifyLayout=DC,Je.moveElement=Iy,Je.moveElementAwayFromCollision=Py,Je.noop=void 0,Je.perc=Pz,Je.setTopLeft=Oz,Je.setTransform=Ez,Je.sortLayoutItems=Ey,Je.sortLayoutItemsByColRow=EC,Je.sortLayoutItemsByRowCol=PC,Je.synchronizeLayoutWithChildren=Rz,Je.validateLayout=Nz,Je.withLayoutItem=Dz;var Cz=wC(Qu.exports),Ty=wC(pe.default);function wC(r){return r&&r.__esModule?r:{default:r}}function SC(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable})),t.push.apply(t,n)}return t}function CC(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?SC(Object(t),!0).forEach(function(n){Tz(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):SC(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Tz(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Dy(r){for(var e=0,t,n=0,a=r.length;n<a;n++)t=r[n].y+r[n].h,t>e&&(e=t);return e}function TC(r){for(var e=Array(r.length),t=0,n=r.length;t<n;t++)e[t]=Fo(r[t]);return e}function DC(r,e){for(var t=Array(r.length),n=0,a=r.length;n<a;n++)e.i===r[n].i?t[n]=e:t[n]=r[n];return t}function Dz(r,e,t){var n=Ay(r,e);return n?(n=t(Fo(n)),r=DC(r,n),[r,n]):[r,null]}function Fo(r){return{w:r.w,h:r.h,x:r.x,y:r.y,i:r.i,minW:r.minW,maxW:r.maxW,minH:r.minH,maxH:r.maxH,moved:Boolean(r.moved),static:Boolean(r.static),isDraggable:r.isDraggable,isResizable:r.isResizable,resizeHandles:r.resizeHandles,isBounded:r.isBounded}}function Mz(r,e){return(0,Cz.default)(Ty.default.Children.map(r,function(t){return t==null?void 0:t.key}),Ty.default.Children.map(e,function(t){return t==null?void 0:t.key}))}var Az=Sz;Je.fastRGLPropsEqual=Az;function Lz(r,e){return r.left===e.left&&r.top===e.top&&r.width===e.width&&r.height===e.height}function Uh(r,e){return!(r.i===e.i||r.x+r.w<=e.x||r.x>=e.x+e.w||r.y+r.h<=e.y||r.y>=e.y+e.h)}function MC(r,e,t){for(var n=Ly(r),a=Ey(r,e),i=Array(r.length),o=0,s=a.length;o<s;o++){var l=Fo(a[o]);l.static||(l=AC(n,l,e,t,a),n.push(l)),i[r.indexOf(a[o])]=l,l.moved=!1}return i}var Iz={x:"w",y:"h"};function My(r,e,t,n){var a=Iz[n];e[n]+=1;for(var i=r.map(function(l){return l.i}).indexOf(e.i),o=i+1;o<r.length;o++){var s=r[o];if(!s.static){if(s.y>e.y+e.h)break;Uh(e,s)&&My(r,s,t+e[a],n)}}e[n]=t}function AC(r,e,t,n,a){var i=t==="vertical",o=t==="horizontal";if(i)for(e.y=Math.min(Dy(r),e.y);e.y>0&&!yl(r,e);)e.y--;else if(o)for(;e.x>0&&!yl(r,e);)e.x--;for(var s;s=yl(r,e);)o?My(a,e,s.x+s.w,"x"):My(a,e,s.y+s.h,"y"),o&&e.x+e.w>n&&(e.x=n-e.w,e.y++);return e.y=Math.max(e.y,0),e.x=Math.max(e.x,0),e}function LC(r,e){for(var t=Ly(r),n=0,a=r.length;n<a;n++){var i=r[n];if(i.x+i.w>e.cols&&(i.x=e.cols-i.w),i.x<0&&(i.x=0,i.w=e.cols),!i.static)t.push(i);else for(;yl(t,i);)i.y++}return r}function Ay(r,e){for(var t=0,n=r.length;t<n;t++)if(r[t].i===e)return r[t]}function yl(r,e){for(var t=0,n=r.length;t<n;t++)if(Uh(r[t],e))return r[t]}function IC(r,e){return r.filter(function(t){return Uh(t,e)})}function Ly(r){return r.filter(function(e){return e.static})}function Iy(r,e,t,n,a,i,o,s,l){if(e.static&&e.isDraggable!==!0||e.y===n&&e.x===t)return r;"Moving element ".concat(e.i," to [").concat(String(t),",").concat(String(n),"] from [").concat(e.x,",").concat(e.y,"]");var u=e.x,c=e.y;typeof t=="number"&&(e.x=t),typeof n=="number"&&(e.y=n),e.moved=!0;var f=Ey(r,o),h=o==="vertical"&&typeof n=="number"?c>=n:o==="horizontal"&&typeof t=="number"?u>=t:!1;h&&(f=f.reverse());var v=IC(f,e),d=v.length>0;if(d&&l)return TC(r);if(d&&i)return"Collision prevented on ".concat(e.i,", reverting."),e.x=u,e.y=c,e.moved=!1,r;for(var p=0,g=v.length;p<g;p++){var y=v[p];"Resolving collision between ".concat(e.i," at [").concat(e.x,",").concat(e.y,"] and ").concat(y.i," at [").concat(y.x,",").concat(y.y,"]"),!y.moved&&(y.static?r=Py(r,y,e,a,o):r=Py(r,e,y,a,o))}return r}function Py(r,e,t,n,a,i){var o=a==="horizontal",s=a!=="horizontal",l=e.static;if(n){n=!1;var u={x:o?Math.max(e.x-t.w,0):t.x,y:s?Math.max(e.y-t.h,0):t.y,w:t.w,h:t.h,i:"-1"};if(!yl(r,u))return"Doing reverse collision on ".concat(t.i," up to [").concat(u.x,",").concat(u.y,"]."),Iy(r,t,o?u.x:void 0,s?u.y:void 0,n,l,a)}return Iy(r,t,o?t.x+1:void 0,s?t.y+1:void 0,n,l,a)}function Pz(r){return r*100+"%"}function Ez(r){var e=r.top,t=r.left,n=r.width,a=r.height,i="translate(".concat(t,"px,").concat(e,"px)");return{transform:i,WebkitTransform:i,MozTransform:i,msTransform:i,OTransform:i,width:"".concat(n,"px"),height:"".concat(a,"px"),position:"absolute"}}function Oz(r){var e=r.top,t=r.left,n=r.width,a=r.height;return{top:"".concat(e,"px"),left:"".concat(t,"px"),width:"".concat(n,"px"),height:"".concat(a,"px"),position:"absolute"}}function Ey(r,e){return e==="horizontal"?EC(r):e==="vertical"?PC(r):r}function PC(r){return r.slice(0).sort(function(e,t){return e.y>t.y||e.y===t.y&&e.x>t.x?1:e.y===t.y&&e.x===t.x?0:-1})}function EC(r){return r.slice(0).sort(function(e,t){return e.x>t.x||e.x===t.x&&e.y>t.y?1:-1})}function Rz(r,e,t,n,a){r=r||[];var i=[];Ty.default.Children.forEach(e,function(s){if((s==null?void 0:s.key)!=null){var l=Ay(r,String(s.key));if(l)i.push(Fo(l));else{var u=s.props["data-grid"]||s.props._grid;u?i.push(Fo(CC(CC({},u),{},{i:s.key}))):i.push(Fo({w:1,h:1,x:0,y:Dy(i),i:String(s.key)}))}}});var o=LC(i,{cols:t});return a?o:MC(o,n,t)}function Nz(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Layout",t=["x","y","w","h"];if(!Array.isArray(r))throw new Error(e+" must be an array!");for(var n=0,a=r.length;n<a;n++)for(var i=r[n],o=0;o<t.length;o++)if(typeof i[t[o]]!="number")throw new Error("ReactGridLayout: "+e+"["+n+"]."+t[o]+" must be a number!")}function kz(r){var e=r||{},t=e.verticalCompact,n=e.compactType;return t===!1?null:n}function tde(){}var Bz=function(){};Je.noop=Bz;var ei={};Object.defineProperty(ei,"__esModule",{value:!0}),ei.calcGridColWidth=jh,ei.calcGridItemPosition=zz,ei.calcGridItemWHPx=Oy,ei.calcWH=Vz,ei.calcXY=Fz,ei.clamp=Ku;function jh(r){var e=r.margin,t=r.containerPadding,n=r.containerWidth,a=r.cols;return(n-e[0]*(a-1)-t[0]*2)/a}function Oy(r,e,t){return Number.isFinite(r)?Math.round(e*r+Math.max(0,r-1)*t):r}function zz(r,e,t,n,a,i){var o=r.margin,s=r.containerPadding,l=r.rowHeight,u=jh(r),c={};return i&&i.resizing?(c.width=Math.round(i.resizing.width),c.height=Math.round(i.resizing.height)):(c.width=Oy(n,u,o[0]),c.height=Oy(a,l,o[1])),i&&i.dragging?(c.top=Math.round(i.dragging.top),c.left=Math.round(i.dragging.left)):(c.top=Math.round((l+o[1])*t+s[1]),c.left=Math.round((u+o[0])*e+s[0])),c}function Fz(r,e,t,n,a){var i=r.margin,o=r.cols,s=r.rowHeight,l=r.maxRows,u=jh(r),c=Math.round((t-i[0])/(u+i[0])),f=Math.round((e-i[1])/(s+i[1]));return c=Ku(c,0,o-n),f=Ku(f,0,l-a),{x:c,y:f}}function Vz(r,e,t,n,a){var i=r.margin,o=r.maxRows,s=r.cols,l=r.rowHeight,u=jh(r),c=Math.round((e+i[0])/(u+i[0])),f=Math.round((t+i[1])/(l+i[1]));return c=Ku(c,0,s-n),f=Ku(f,0,o-a),{w:c,h:f}}function Ku(r,e,t){return Math.max(Math.min(r,t),e)}var Yh={},ti={exports:{}},$z="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Hz=$z,Gz=Hz;function OC(){}function RC(){}RC.resetWarningCache=OC;var Wz=function(){function r(n,a,i,o,s,l){if(l!==Gz){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}r.isRequired=r;function e(){return r}var t={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:e,element:r,elementType:r,instanceOf:e,node:r,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:RC,resetWarningCache:OC};return t.PropTypes=t,t};ti.exports=Wz();var Ju={exports:{}},NC={},Nt={},Aa={};Object.defineProperty(Aa,"__esModule",{value:!0}),Aa.dontSetMe=Zz,Aa.findInArray=Uz,Aa.int=qz,Aa.isFunction=jz,Aa.isNum=Yz;function Uz(r,e){for(var t=0,n=r.length;t<n;t++)if(e.apply(e,[r[t],t,r]))return r[t]}function jz(r){return typeof r=="function"||Object.prototype.toString.call(r)==="[object Function]"}function Yz(r){return typeof r=="number"&&!isNaN(r)}function qz(r){return parseInt(r,10)}function Zz(r,e,t){if(r[e])return new Error("Invalid prop ".concat(e," passed to ").concat(t," - do not set this, set it on the child."))}var Vo={};Object.defineProperty(Vo,"__esModule",{value:!0}),Vo.browserPrefixToKey=BC,Vo.browserPrefixToStyle=Xz,Vo.default=void 0,Vo.getPrefix=kC;var Ry=["Moz","Webkit","O","ms"];function kC(){var r,e,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window=="undefined")return"";var n=(r=window.document)===null||r===void 0||(e=r.documentElement)===null||e===void 0?void 0:e.style;if(!n||t in n)return"";for(var a=0;a<Ry.length;a++)if(BC(t,Ry[a])in n)return Ry[a];return""}function BC(r,e){return e?"".concat(e).concat(Qz(r)):r}function Xz(r,e){return e?"-".concat(e.toLowerCase(),"-").concat(r):r}function Qz(r){for(var e="",t=!0,n=0;n<r.length;n++)t?(e+=r[n].toUpperCase(),t=!1):r[n]==="-"?t=!0:e+=r[n];return e}var Kz=kC();Vo.default=Kz;function Ny(r){return Ny=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ny(r)}Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.addClassName=WC,Nt.addEvent=tF,Nt.addUserSelectStyles=hF,Nt.createCSSTransform=lF,Nt.createSVGTransform=uF,Nt.getTouch=cF,Nt.getTouchIdentifier=fF,Nt.getTranslation=ky,Nt.innerHeight=iF,Nt.innerWidth=oF,Nt.matchesSelector=GC,Nt.matchesSelectorAndParentsTo=eF,Nt.offsetXYFromParent=sF,Nt.outerHeight=nF,Nt.outerWidth=aF,Nt.removeClassName=UC,Nt.removeEvent=rF,Nt.removeUserSelectStyles=vF;var vn=Aa,zC=Jz(Vo);function FC(r){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(FC=function(a){return a?t:e})(r)}function Jz(r,e){if(!e&&r&&r.__esModule)return r;if(r===null||Ny(r)!=="object"&&typeof r!="function")return{default:r};var t=FC(e);if(t&&t.has(r))return t.get(r);var n={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in r)if(i!=="default"&&Object.prototype.hasOwnProperty.call(r,i)){var o=a?Object.getOwnPropertyDescriptor(r,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=r[i]}return n.default=r,t&&t.set(r,n),n}function VC(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable})),t.push.apply(t,n)}return t}function $C(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?VC(Object(t),!0).forEach(function(n){HC(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):VC(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function HC(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}var qh="";function GC(r,e){return qh||(qh=(0,vn.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(t){return(0,vn.isFunction)(r[t])})),(0,vn.isFunction)(r[qh])?r[qh](e):!1}function eF(r,e,t){var n=r;do{if(GC(n,e))return!0;if(n===t)return!1;n=n.parentNode}while(n);return!1}function tF(r,e,t,n){if(!!r){var a=$C({capture:!0},n);r.addEventListener?r.addEventListener(e,t,a):r.attachEvent?r.attachEvent("on"+e,t):r["on"+e]=t}}function rF(r,e,t,n){if(!!r){var a=$C({capture:!0},n);r.removeEventListener?r.removeEventListener(e,t,a):r.detachEvent?r.detachEvent("on"+e,t):r["on"+e]=null}}function nF(r){var e=r.clientHeight,t=r.ownerDocument.defaultView.getComputedStyle(r);return e+=(0,vn.int)(t.borderTopWidth),e+=(0,vn.int)(t.borderBottomWidth),e}function aF(r){var e=r.clientWidth,t=r.ownerDocument.defaultView.getComputedStyle(r);return e+=(0,vn.int)(t.borderLeftWidth),e+=(0,vn.int)(t.borderRightWidth),e}function iF(r){var e=r.clientHeight,t=r.ownerDocument.defaultView.getComputedStyle(r);return e-=(0,vn.int)(t.paddingTop),e-=(0,vn.int)(t.paddingBottom),e}function oF(r){var e=r.clientWidth,t=r.ownerDocument.defaultView.getComputedStyle(r);return e-=(0,vn.int)(t.paddingLeft),e-=(0,vn.int)(t.paddingRight),e}function sF(r,e,t){var n=e===e.ownerDocument.body,a=n?{left:0,top:0}:e.getBoundingClientRect(),i=(r.clientX+e.scrollLeft-a.left)/t,o=(r.clientY+e.scrollTop-a.top)/t;return{x:i,y:o}}function lF(r,e){var t=ky(r,e,"px");return HC({},(0,zC.browserPrefixToKey)("transform",zC.default),t)}function uF(r,e){var t=ky(r,e,"");return t}function ky(r,e,t){var n=r.x,a=r.y,i="translate(".concat(n).concat(t,",").concat(a).concat(t,")");if(e){var o="".concat(typeof e.x=="string"?e.x:e.x+t),s="".concat(typeof e.y=="string"?e.y:e.y+t);i="translate(".concat(o,", ").concat(s,")")+i}return i}function cF(r,e){return r.targetTouches&&(0,vn.findInArray)(r.targetTouches,function(t){return e===t.identifier})||r.changedTouches&&(0,vn.findInArray)(r.changedTouches,function(t){return e===t.identifier})}function fF(r){if(r.targetTouches&&r.targetTouches[0])return r.targetTouches[0].identifier;if(r.changedTouches&&r.changedTouches[0])return r.changedTouches[0].identifier}function hF(r){if(!!r){var e=r.getElementById("react-draggable-style-el");e||(e=r.createElement("style"),e.type="text/css",e.id="react-draggable-style-el",e.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
2
2
  `,e.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
3
3
  `,r.getElementsByTagName("head")[0].appendChild(e)),r.body&&WC(r.body,"react-draggable-transparent-selection")}}function vF(r){if(!!r)try{if(r.body&&UC(r.body,"react-draggable-transparent-selection"),r.selection)r.selection.empty();else{var e=(r.defaultView||window).getSelection();e&&e.type!=="Caret"&&e.removeAllRanges()}}catch{}}function WC(r,e){r.classList?r.classList.add(e):r.className.match(new RegExp("(?:^|\\s)".concat(e,"(?!\\S)")))||(r.className+=" ".concat(e))}function UC(r,e){r.classList?r.classList.remove(e):r.className=r.className.replace(new RegExp("(?:^|\\s)".concat(e,"(?!\\S)"),"g"),"")}var La={};Object.defineProperty(La,"__esModule",{value:!0}),La.canDragX=gF,La.canDragY=yF,La.createCoreData=_F,La.createDraggableData=bF,La.getBoundPosition=dF,La.getControlPosition=mF,La.snapToGrid=pF;var dn=Aa,ml=Nt;function dF(r,e,t){if(!r.props.bounds)return[e,t];var n=r.props.bounds;n=typeof n=="string"?n:xF(n);var a=By(r);if(typeof n=="string"){var i=a.ownerDocument,o=i.defaultView,s;if(n==="parent"?s=a.parentNode:s=i.querySelector(n),!(s instanceof o.HTMLElement))throw new Error('Bounds selector "'+n+'" could not find an element.');var l=s,u=o.getComputedStyle(a),c=o.getComputedStyle(l);n={left:-a.offsetLeft+(0,dn.int)(c.paddingLeft)+(0,dn.int)(u.marginLeft),top:-a.offsetTop+(0,dn.int)(c.paddingTop)+(0,dn.int)(u.marginTop),right:(0,ml.innerWidth)(l)-(0,ml.outerWidth)(a)-a.offsetLeft+(0,dn.int)(c.paddingRight)-(0,dn.int)(u.marginRight),bottom:(0,ml.innerHeight)(l)-(0,ml.outerHeight)(a)-a.offsetTop+(0,dn.int)(c.paddingBottom)-(0,dn.int)(u.marginBottom)}}return(0,dn.isNum)(n.right)&&(e=Math.min(e,n.right)),(0,dn.isNum)(n.bottom)&&(t=Math.min(t,n.bottom)),(0,dn.isNum)(n.left)&&(e=Math.max(e,n.left)),(0,dn.isNum)(n.top)&&(t=Math.max(t,n.top)),[e,t]}function pF(r,e,t){var n=Math.round(e/r[0])*r[0],a=Math.round(t/r[1])*r[1];return[n,a]}function gF(r){return r.props.axis==="both"||r.props.axis==="x"}function yF(r){return r.props.axis==="both"||r.props.axis==="y"}function mF(r,e,t){var n=typeof e=="number"?(0,ml.getTouch)(r,e):null;if(typeof e=="number"&&!n)return null;var a=By(t),i=t.props.offsetParent||a.offsetParent||a.ownerDocument.body;return(0,ml.offsetXYFromParent)(n||r,i,t.props.scale)}function _F(r,e,t){var n=r.state,a=!(0,dn.isNum)(n.lastX),i=By(r);return a?{node:i,deltaX:0,deltaY:0,lastX:e,lastY:t,x:e,y:t}:{node:i,deltaX:e-n.lastX,deltaY:t-n.lastY,lastX:n.lastX,lastY:n.lastY,x:e,y:t}}function bF(r,e){var t=r.props.scale;return{node:e.node,x:r.state.x+e.deltaX/t,y:r.state.y+e.deltaY/t,deltaX:e.deltaX/t,deltaY:e.deltaY/t,lastX:r.state.x,lastY:r.state.y}}function xF(r){return{left:r.left,top:r.top,right:r.right,bottom:r.bottom}}function By(r){var e=r.findDOMNode();if(!e)throw new Error("<DraggableCore>: Unmounted during event!");return e}var Zh={},Xh={};Object.defineProperty(Xh,"__esModule",{value:!0}),Xh.default=wF;function wF(){}function Qh(r){return Qh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qh(r)}Object.defineProperty(Zh,"__esModule",{value:!0}),Zh.default=void 0;var zy=CF(pe.default),pn=Vy(ti.exports),SF=Vy(Oh.default),Cr=Nt,Vi=La,Fy=Aa,ec=Vy(Xh);function Vy(r){return r&&r.__esModule?r:{default:r}}function jC(r){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(jC=function(a){return a?t:e})(r)}function CF(r,e){if(!e&&r&&r.__esModule)return r;if(r===null||Qh(r)!=="object"&&typeof r!="function")return{default:r};var t=jC(e);if(t&&t.has(r))return t.get(r);var n={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in r)if(i!=="default"&&Object.prototype.hasOwnProperty.call(r,i)){var o=a?Object.getOwnPropertyDescriptor(r,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=r[i]}return n.default=r,t&&t.set(r,n),n}function YC(r,e){return AF(r)||MF(r,e)||DF(r,e)||TF()}function TF(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
4
4
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function DF(r,e){if(!!r){if(typeof r=="string")return qC(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Array.from(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return qC(r,e)}}function qC(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function MF(r,e){var t=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var n=[],a=!0,i=!1,o,s;try{for(t=t.call(r);!(a=(o=t.next()).done)&&(n.push(o.value),!(e&&n.length===e));a=!0);}catch(l){i=!0,s=l}finally{try{!a&&t.return!=null&&t.return()}finally{if(i)throw s}}return n}}function AF(r){if(Array.isArray(r))return r}function LF(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function ZC(r,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,n.key,n)}}function IF(r,e,t){return e&&ZC(r.prototype,e),t&&ZC(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r}function PF(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&$y(r,e)}function $y(r,e){return $y=Object.setPrototypeOf||function(n,a){return n.__proto__=a,n},$y(r,e)}function EF(r){var e=RF();return function(){var n=Kh(r),a;if(e){var i=Kh(this).constructor;a=Reflect.construct(n,arguments,i)}else a=n.apply(this,arguments);return OF(this,a)}}function OF(r,e){if(e&&(Qh(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Tr(r)}function Tr(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function RF(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Kh(r){return Kh=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Kh(r)}function An(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}var na={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}},$i=na.mouse,Jh=function(r){PF(t,r);var e=EF(t);function t(){var n;LF(this,t);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n=e.call.apply(e,[this].concat(i)),An(Tr(n),"state",{dragging:!1,lastX:NaN,lastY:NaN,touchIdentifier:null}),An(Tr(n),"mounted",!1),An(Tr(n),"handleDragStart",function(s){if(n.props.onMouseDown(s),!n.props.allowAnyClick&&typeof s.button=="number"&&s.button!==0)return!1;var l=n.findDOMNode();if(!l||!l.ownerDocument||!l.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");var u=l.ownerDocument;if(!(n.props.disabled||!(s.target instanceof u.defaultView.Node)||n.props.handle&&!(0,Cr.matchesSelectorAndParentsTo)(s.target,n.props.handle,l)||n.props.cancel&&(0,Cr.matchesSelectorAndParentsTo)(s.target,n.props.cancel,l))){s.type==="touchstart"&&s.preventDefault();var c=(0,Cr.getTouchIdentifier)(s);n.setState({touchIdentifier:c});var f=(0,Vi.getControlPosition)(s,c,Tr(n));if(f!=null){var h=f.x,v=f.y,d=(0,Vi.createCoreData)(Tr(n),h,v);(0,ec.default)("DraggableCore: handleDragStart: %j",d),(0,ec.default)("calling",n.props.onStart);var p=n.props.onStart(s,d);p===!1||n.mounted===!1||(n.props.enableUserSelectHack&&(0,Cr.addUserSelectStyles)(u),n.setState({dragging:!0,lastX:h,lastY:v}),(0,Cr.addEvent)(u,$i.move,n.handleDrag),(0,Cr.addEvent)(u,$i.stop,n.handleDragStop))}}}),An(Tr(n),"handleDrag",function(s){var l=(0,Vi.getControlPosition)(s,n.state.touchIdentifier,Tr(n));if(l!=null){var u=l.x,c=l.y;if(Array.isArray(n.props.grid)){var f=u-n.state.lastX,h=c-n.state.lastY,v=(0,Vi.snapToGrid)(n.props.grid,f,h),d=YC(v,2);if(f=d[0],h=d[1],!f&&!h)return;u=n.state.lastX+f,c=n.state.lastY+h}var p=(0,Vi.createCoreData)(Tr(n),u,c);(0,ec.default)("DraggableCore: handleDrag: %j",p);var g=n.props.onDrag(s,p);if(g===!1||n.mounted===!1){try{n.handleDragStop(new MouseEvent("mouseup"))}catch{var y=document.createEvent("MouseEvents");y.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),n.handleDragStop(y)}return}n.setState({lastX:u,lastY:c})}}),An(Tr(n),"handleDragStop",function(s){if(!!n.state.dragging){var l=(0,Vi.getControlPosition)(s,n.state.touchIdentifier,Tr(n));if(l!=null){var u=l.x,c=l.y;if(Array.isArray(n.props.grid)){var f=u-n.state.lastX||0,h=c-n.state.lastY||0,v=(0,Vi.snapToGrid)(n.props.grid,f,h),d=YC(v,2);f=d[0],h=d[1],u=n.state.lastX+f,c=n.state.lastY+h}var p=(0,Vi.createCoreData)(Tr(n),u,c),g=n.props.onStop(s,p);if(g===!1||n.mounted===!1)return!1;var y=n.findDOMNode();y&&n.props.enableUserSelectHack&&(0,Cr.removeUserSelectStyles)(y.ownerDocument),(0,ec.default)("DraggableCore: handleDragStop: %j",p),n.setState({dragging:!1,lastX:NaN,lastY:NaN}),y&&((0,ec.default)("DraggableCore: Removing handlers"),(0,Cr.removeEvent)(y.ownerDocument,$i.move,n.handleDrag),(0,Cr.removeEvent)(y.ownerDocument,$i.stop,n.handleDragStop))}}}),An(Tr(n),"onMouseDown",function(s){return $i=na.mouse,n.handleDragStart(s)}),An(Tr(n),"onMouseUp",function(s){return $i=na.mouse,n.handleDragStop(s)}),An(Tr(n),"onTouchStart",function(s){return $i=na.touch,n.handleDragStart(s)}),An(Tr(n),"onTouchEnd",function(s){return $i=na.touch,n.handleDragStop(s)}),n}return IF(t,[{key:"componentDidMount",value:function(){this.mounted=!0;var a=this.findDOMNode();a&&(0,Cr.addEvent)(a,na.touch.start,this.onTouchStart,{passive:!1})}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var a=this.findDOMNode();if(a){var i=a.ownerDocument;(0,Cr.removeEvent)(i,na.mouse.move,this.handleDrag),(0,Cr.removeEvent)(i,na.touch.move,this.handleDrag),(0,Cr.removeEvent)(i,na.mouse.stop,this.handleDragStop),(0,Cr.removeEvent)(i,na.touch.stop,this.handleDragStop),(0,Cr.removeEvent)(a,na.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,Cr.removeUserSelectStyles)(i)}}},{key:"findDOMNode",value:function(){var a,i,o;return(a=this.props)!==null&&a!==void 0&&a.nodeRef?(i=this.props)===null||i===void 0||(o=i.nodeRef)===null||o===void 0?void 0:o.current:SF.default.findDOMNode(this)}},{key:"render",value:function(){return zy.cloneElement(zy.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}]),t}(zy.Component);Zh.default=Jh,An(Jh,"displayName","DraggableCore"),An(Jh,"propTypes",{allowAnyClick:pn.default.bool,disabled:pn.default.bool,enableUserSelectHack:pn.default.bool,offsetParent:function(e,t){if(e[t]&&e[t].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:pn.default.arrayOf(pn.default.number),handle:pn.default.string,cancel:pn.default.string,nodeRef:pn.default.object,onStart:pn.default.func,onDrag:pn.default.func,onStop:pn.default.func,onMouseDown:pn.default.func,scale:pn.default.number,className:Fy.dontSetMe,style:Fy.dontSetMe,transform:Fy.dontSetMe}),An(Jh,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),function(r){function e(H){return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(q){return typeof q}:function(q){return q&&typeof Symbol=="function"&&q.constructor===Symbol&&q!==Symbol.prototype?"symbol":typeof q},e(H)}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"DraggableCore",{enumerable:!0,get:function(){return u.default}}),r.default=void 0;var t=d(pe.default),n=h(ti.exports),a=h(Oh.default),i=h(Wh),o=Nt,s=La,l=Aa,u=h(Zh),c=h(Xh),f=["axis","bounds","children","defaultPosition","defaultClassName","defaultClassNameDragging","defaultClassNameDragged","position","positionOffset","scale"];function h(H){return H&&H.__esModule?H:{default:H}}function v(H){if(typeof WeakMap!="function")return null;var q=new WeakMap,X=new WeakMap;return(v=function(ie){return ie?X:q})(H)}function d(H,q){if(!q&&H&&H.__esModule)return H;if(H===null||e(H)!=="object"&&typeof H!="function")return{default:H};var X=v(q);if(X&&X.has(H))return X.get(H);var Z={},ie=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var se in H)if(se!=="default"&&Object.prototype.hasOwnProperty.call(H,se)){var te=ie?Object.getOwnPropertyDescriptor(H,se):null;te&&(te.get||te.set)?Object.defineProperty(Z,se,te):Z[se]=H[se]}return Z.default=H,X&&X.set(H,Z),Z}function p(){return p=Object.assign||function(H){for(var q=1;q<arguments.length;q++){var X=arguments[q];for(var Z in X)Object.prototype.hasOwnProperty.call(X,Z)&&(H[Z]=X[Z])}return H},p.apply(this,arguments)}function g(H,q){if(H==null)return{};var X=y(H,q),Z,ie;if(Object.getOwnPropertySymbols){var se=Object.getOwnPropertySymbols(H);for(ie=0;ie<se.length;ie++)Z=se[ie],!(q.indexOf(Z)>=0)&&(!Object.prototype.propertyIsEnumerable.call(H,Z)||(X[Z]=H[Z]))}return X}function y(H,q){if(H==null)return{};var X={},Z=Object.keys(H),ie,se;for(se=0;se<Z.length;se++)ie=Z[se],!(q.indexOf(ie)>=0)&&(X[ie]=H[ie]);return X}function m(H,q){var X=Object.keys(H);if(Object.getOwnPropertySymbols){var Z=Object.getOwnPropertySymbols(H);q&&(Z=Z.filter(function(ie){return Object.getOwnPropertyDescriptor(H,ie).enumerable})),X.push.apply(X,Z)}return X}function _(H){for(var q=1;q<arguments.length;q++){var X=arguments[q]!=null?arguments[q]:{};q%2?m(Object(X),!0).forEach(function(Z){Y(H,Z,X[Z])}):Object.getOwnPropertyDescriptors?Object.defineProperties(H,Object.getOwnPropertyDescriptors(X)):m(Object(X)).forEach(function(Z){Object.defineProperty(H,Z,Object.getOwnPropertyDescriptor(X,Z))})}return H}function b(H,q){return D(H)||T(H,q)||x(H,q)||w()}function w(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
@@ -215,11 +215,11 @@ yyyy`);var n=bn(e),a=t?"getUTC":"get",i=n[a+"FullYear"](),o=n[a+"Month"]()+1,s=n
215
215
  `,`
216
216
 
217
217
 
218
- `];function nr(r,e){return e.type=r,e}function r1(r){return r.type==="section"}function gL(r){return r1(r)?N9:k9}function yL(r){if(r1(r)){var e=0,t=r.blocks.length,n=t>1||t>0&&!r.noHeader;return L(r.blocks,function(a){var i=yL(a);i>=e&&(e=i+ +(n&&(!i||r1(a)&&!a.noHeader)))}),e}return 0}function N9(r,e,t,n){var a=e.noHeader,i=B9(yL(e)),o=[],s=e.blocks||[];Dr(!s||K(s)),s=s||[];var l=r.orderMode;if(e.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(he(u,l)){var c=new iL(u[l],null);s.sort(function(d,p){return c.evaluate(d.sortParam,p.sortParam)})}else l==="seriesDesc"&&s.reverse()}L(s,function(d,p){var g=e.valueFormatter,y=gL(d)(g?Q(Q({},r),{valueFormatter:g}):r,d,p>0?i.html:0,n);y!=null&&o.push(y)});var f=r.renderMode==="richText"?o.join(i.richText):n1(o.join(""),a?t:i.html);if(a)return f;var h=N_(e.header,"ordinal",r.useUTC),v=pL(n,r.renderMode).nameStyle;return r.renderMode==="richText"?_L(r,h,v)+i.richText+f:n1('<div style="'+v+";"+dL+';">'+zr(h)+"</div>"+f,t)}function k9(r,e,t,n){var a=r.renderMode,i=e.noName,o=e.noValue,s=!e.markerType,l=e.name,u=r.useUTC,c=e.valueFormatter||r.valueFormatter||function(b){return b=K(b)?b:[b],J(b,function(w,x){return N_(w,K(v)?v[x]:v,u)})};if(!(i&&o)){var f=s?"":r.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",a),h=i?"":N_(l,"ordinal",u),v=e.valueType,d=o?[]:c(e.value),p=!s||!i,g=!s&&i,y=pL(n,a),m=y.nameStyle,_=y.valueStyle;return a==="richText"?(s?"":f)+(i?"":_L(r,h,m))+(o?"":V9(r,d,p,g,_)):n1((s?"":f)+(i?"":z9(h,!s,m))+(o?"":F9(d,p,g,_)),t)}}function mL(r,e,t,n,a,i){if(!!r){var o=gL(r),s={useUTC:a,renderMode:t,orderMode:n,markupStyleCreator:e,valueFormatter:r.valueFormatter};return o(s,r,0,i)}}function B9(r){return{html:O9[r],richText:R9[r]}}function n1(r,e){var t='<div style="clear:both"></div>',n="margin: "+e+"px 0 0";return'<div style="'+n+";"+dL+';">'+r+t+"</div>"}function z9(r,e,t){var n=e?"margin-left:2px":"";return'<span style="'+t+";"+n+'">'+zr(r)+"</span>"}function F9(r,e,t,n){var a=t?"10px":"20px",i=e?"float:right;margin-left:"+a:"";return r=K(r)?r:[r],'<span style="'+i+";"+n+'">'+J(r,function(o){return zr(o)}).join("&nbsp;&nbsp;")+"</span>"}function _L(r,e,t){return r.markupStyleCreator.wrapRichTextStyle(e,t)}function V9(r,e,t,n,a){var i=[a],o=n?10:20;return t&&i.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(K(e)?e.join(" "):e,i)}function bL(r,e){var t=r.getData().getItemVisual(e,"style"),n=t[r.visualDrawType];return ws(n)}function xL(r,e){var t=r.get("padding");return t!=null?t:e==="richText"?[8,10]:10}var a1=function(){function r(){this.richTextStyles={},this._nextStyleNameId=aD()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(e,t,n){var a=n==="richText"?this._generateStyleName():null,i=gA({color:t,type:e,renderMode:n,markerId:a});return ce(i)?i:(this.richTextStyles[a]=i.style,i.content)},r.prototype.wrapRichTextStyle=function(e,t){var n={};K(t)?L(t,function(i){return Q(n,i)}):Q(n,t);var a=this._generateStyleName();return this.richTextStyles[a]=n,"{"+a+"|"+e+"}"},r}();function wL(r){var e=r.series,t=r.dataIndex,n=r.multipleSeries,a=e.getData(),i=a.mapDimensionsAll("defaultedTooltip"),o=i.length,s=e.getRawValue(t),l=K(s),u=bL(e,t),c,f,h,v;if(o>1||l&&!o){var d=$9(s,e,t,i,u);c=d.inlineValues,f=d.inlineValueTypes,h=d.blocks,v=d.inlineValues[0]}else if(o){var p=a.getDimensionInfo(i[0]);v=c=nu(a,t,i[0]),f=p.type}else v=c=l?s[0]:s;var g=R0(e),y=g&&e.name||"",m=a.getName(t),_=n?y:m;return nr("section",{header:y,noHeader:n||!g,sortParam:v,blocks:[nr("nameValue",{markerType:"item",markerColor:u,name:_,noName:!En(_),value:c,valueType:f})].concat(h||[])})}function $9(r,e,t,n,a){var i=e.getData(),o=Pn(r,function(f,h,v){var d=i.getDimensionInfo(v);return f=f||d&&d.tooltip!==!1&&d.displayName!=null},!1),s=[],l=[],u=[];n.length?L(n,function(f){c(nu(i,t,f),f)}):L(r,c);function c(f,h){var v=i.getDimensionInfo(h);!v||v.otherDims.tooltip===!1||(o?u.push(nr("nameValue",{markerType:"subItem",markerColor:a,name:v.displayName,value:f,valueType:v.type})):(s.push(f),l.push(v.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var fo=Ye();function Yd(r,e){return r.getName(e)||r.getId(e)}var qd="__universalTransitionEnabled",Zd=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return e.prototype.init=function(t,n,a){this.seriesIndex=this.componentIndex,this.dataTask=gf({count:G9,reset:W9}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,a);var i=fo(this).sourceManager=new fL(this);i.prepareSource();var o=this.getInitialData(t,a);CL(o,this),this.dataTask.context.data=o,fo(this).dataBeforeProcessed=o,SL(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(t,n){var a=ff(this),i=a?Kl(t):{},o=this.subType;$e.hasClass(o)&&(o+="Series"),Pe(t,n.getTheme().get(this.subType)),Pe(t,this.getDefaultOption()),rs(t,"label",["show"]),this.fillDataTextStyle(t.data),a&&lo(t,i,a)},e.prototype.mergeOption=function(t,n){t=Pe(this.option,t,!0),this.fillDataTextStyle(t.data);var a=ff(this);a&&lo(this.option,t,a);var i=fo(this).sourceManager;i.dirty(),i.prepareSource();var o=this.getInitialData(t,n);CL(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,fo(this).dataBeforeProcessed=o,SL(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(t){if(t&&!nn(t))for(var n=["show"],a=0;a<t.length;a++)t[a]&&t[a].label&&rs(t[a],"label",n)},e.prototype.getInitialData=function(t,n){},e.prototype.appendData=function(t){var n=this.getRawData();n.appendData(t.data)},e.prototype.getData=function(t){var n=i1(this);if(n){var a=n.context.data;return t==null?a:a.getLinkedData(t)}else return fo(this).data},e.prototype.getAllData=function(){var t=this.getData();return t&&t.getLinkedDataAll?t.getLinkedDataAll():[{data:t}]},e.prototype.setData=function(t){var n=i1(this);if(n){var a=n.context;a.outputData=t,n!==this.dataTask&&(a.data=t)}fo(this).data=t},e.prototype.getEncode=function(){var t=this.get("encode",!0);if(t)return ge(t)},e.prototype.getSourceManager=function(){return fo(this).sourceManager},e.prototype.getSource=function(){return this.getSourceManager().getSource()},e.prototype.getRawData=function(){return fo(this).dataBeforeProcessed},e.prototype.getColorBy=function(){var t=this.get("colorBy");return t||"series"},e.prototype.isColorBySeries=function(){return this.getColorBy()==="series"},e.prototype.getBaseAxis=function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},e.prototype.formatTooltip=function(t,n,a){return wL({series:this,dataIndex:t,multipleSeries:n})},e.prototype.isAnimationEnabled=function(){var t=this.ecModel;if(Ue.node&&!(t&&t.ssr))return!1;var n=this.getShallow("animation");return n&&this.getData().count()>this.getShallow("animationThreshold")&&(n=!1),!!n},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,n,a){var i=this.ecModel,o=H_.prototype.getColorFromPalette.call(this,t,n,a);return o||(o=i.getColorFromPalette(t,n,a)),o},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,n){this._innerSelect(this.getData(n),t)},e.prototype.unselect=function(t,n){var a=this.option.selectedMap;if(!!a){var i=this.option.selectedMode,o=this.getData(n);if(i==="series"||a==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s<t.length;s++){var l=t[s],u=Yd(o,l);a[u]=!1,this._selectedDataIndicesMap[u]=-1}}},e.prototype.toggleSelect=function(t,n){for(var a=[],i=0;i<t.length;i++)a[0]=t[i],this.isSelected(t[i],n)?this.unselect(a,n):this.select(a,n)},e.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var t=this._selectedDataIndicesMap,n=Fe(t),a=[],i=0;i<n.length;i++){var o=t[n[i]];o>=0&&a.push(o)}return a},e.prototype.isSelected=function(t,n){var a=this.option.selectedMap;if(!a)return!1;var i=this.getData(n);return(a==="all"||a[Yd(i,t)])&&!i.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[qd])return!0;var t=this.option.universalTransition;return t?t===!0?!0:t&&t.enabled:!1},e.prototype._innerSelect=function(t,n){var a,i,o=this.option,s=o.selectedMode,l=n.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){_e(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,c=0;c<l;c++){var f=n[c],h=Yd(t,f);u[h]=!0,this._selectedDataIndicesMap[h]=t.getRawIndex(f)}}else if(s==="single"||s===!0){var v=n[l-1],h=Yd(t,v);o.selectedMap=(a={},a[h]=!0,a),this._selectedDataIndicesMap=(i={},i[h]=t.getRawIndex(v),i)}}},e.prototype._initSelectedMapFromData=function(t){if(!this.option.selectedMap){var n=[];t.hasItemOption&&t.each(function(a){var i=t.getRawDataItem(a);i&&i.selected&&n.push(a)}),n.length>0&&this._innerSelect(t,n)}},e.registerClass=function(t){return $e.registerClass(t)},e.protoInitialize=function(){var t=e.prototype;t.type="series.__base__",t.seriesIndex=0,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"}(),e}($e);Et(Zd,K_),Et(Zd,H_),yD(Zd,$e);function SL(r){var e=r.name;R0(r)||(r.name=H9(r)||e)}function H9(r){var e=r.getRawData(),t=e.mapDimensionsAll("seriesName"),n=[];return L(t,function(a){var i=e.getDimensionInfo(a);i.displayName&&n.push(i.displayName)}),n.join(" ")}function G9(r){return r.model.getRawData().count()}function W9(r){var e=r.model;return e.setData(e.getRawData().cloneShallow()),U9}function U9(r,e){e.outputData&&r.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function CL(r,e){L(hc(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(t){r.wrapMethod(t,Ae(j9,e))})}function j9(r,e){var t=i1(r);return t&&t.setOutputEnd((e||this).count()),e}function i1(r){var e=(r.ecModel||{}).scheduler,t=e&&e.getPipeline(r.uid);if(t){var n=t.currentTask;if(n){var a=n.agentStubMap;a&&(n=a.get(r.uid))}return n}}var yt=Zd,o1=function(){function r(){this.group=new Te,this.uid=Zl("viewComponent")}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,n,a){},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,n,a){},r.prototype.updateLayout=function(e,t,n,a){},r.prototype.updateVisual=function(e,t,n,a){},r.prototype.toggleBlurSeries=function(e,t,n){},r.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},r}();B0(o1),ad(o1);var wt=o1;function iu(){var r=Ye();return function(e){var t=r(e),n=e.pipelineContext,a=!!t.large,i=!!t.progressiveRender,o=t.large=!!(n&&n.large),s=t.progressiveRender=!!(n&&n.progressiveRender);return(a!==o||i!==s)&&"reset"}}var TL=Ye(),Y9=iu(),s1=function(){function r(){this.group=new Te,this.uid=Zl("viewChart"),this.renderTask=gf({plan:q9,reset:Z9}),this.renderTask.context={view:this}}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,n,a){},r.prototype.highlight=function(e,t,n,a){var i=e.getData(a&&a.dataType);!i||ML(i,a,"emphasis")},r.prototype.downplay=function(e,t,n,a){var i=e.getData(a&&a.dataType);!i||ML(i,a,"normal")},r.prototype.remove=function(e,t){this.group.removeAll()},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,n,a){this.render(e,t,n,a)},r.prototype.updateLayout=function(e,t,n,a){this.render(e,t,n,a)},r.prototype.updateVisual=function(e,t,n,a){this.render(e,t,n,a)},r.prototype.eachRendered=function(e){oo(this.group,e)},r.markUpdateMethod=function(e,t){TL(e).updateMethod=t},r.protoInitialize=function(){var e=r.prototype;e.type="chart"}(),r}();function DL(r,e,t){r&&qc(r)&&(e==="emphasis"?hi:vi)(r,t)}function ML(r,e,t){var n=ns(r,e),a=e&&e.highlightKey!=null?wW(e.highlightKey):null;n!=null?L(st(n),function(i){DL(r.getItemGraphicEl(i),t,a)}):r.eachItemGraphicEl(function(i){DL(i,t,a)})}B0(s1),ad(s1);function q9(r){return Y9(r.model)}function Z9(r){var e=r.model,t=r.ecModel,n=r.api,a=r.payload,i=e.pipelineContext.progressiveRender,o=r.view,s=a&&TL(a).updateMethod,l=i?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,t,n,a),X9[l]}var X9={incrementalPrepareRender:{progress:function(r,e){e.view.incrementalRender(r,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(r,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},ut=s1,Xd="\0__throttleOriginMethod",AL="\0__throttleRate",LL="\0__throttleType";function Qd(r,e,t){var n,a=0,i=0,o=null,s,l,u,c;e=e||0;function f(){i=new Date().getTime(),o=null,r.apply(l,u||[])}var h=function(){for(var v=[],d=0;d<arguments.length;d++)v[d]=arguments[d];n=new Date().getTime(),l=this,u=v;var p=c||e,g=c||t;c=null,s=n-(g?a:i)-p,clearTimeout(o),g?o=setTimeout(f,p):s>=0?f():o=setTimeout(f,-s),a=n};return h.clear=function(){o&&(clearTimeout(o),o=null)},h.debounceNextCall=function(v){c=v},h}function ou(r,e,t,n){var a=r[e];if(!!a){var i=a[Xd]||a,o=a[LL],s=a[AL];if(s!==t||o!==n){if(t==null||!n)return r[e]=i;a=r[e]=Qd(i,t,n==="debounce"),a[Xd]=i,a[LL]=n,a[AL]=t}return a}}function mf(r,e){var t=r[e];t&&t[Xd]&&(t.clear&&t.clear(),r[e]=t[Xd])}var IL=Ye(),PL={itemStyle:is(rA,!0),lineStyle:is(tA,!0)},Q9={lineStyle:"stroke",itemStyle:"fill"};function EL(r,e){var t=r.visualStyleMapper||PL[e];return t||(console.warn("Unknown style type '"+e+"'."),PL.itemStyle)}function OL(r,e){var t=r.visualDrawType||Q9[e];return t||(console.warn("Unknown style type '"+e+"'."),"fill")}var K9={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData(),n=r.visualStyleAccessPath||"itemStyle",a=r.getModel(n),i=EL(r,n),o=i(a),s=a.getShallow("decal");s&&(t.setVisual("decal",s),s.dirty=!0);var l=OL(r,n),u=o[l],c=ye(u)?u:null,f=o.fill==="auto"||o.stroke==="auto";if(!o[l]||c||f){var h=r.getColorFromPalette(r.name,null,e.getSeriesCount());o[l]||(o[l]=h,t.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||ye(o.fill)?h:o.fill,o.stroke=o.stroke==="auto"||ye(o.stroke)?h:o.stroke}if(t.setVisual("style",o),t.setVisual("drawType",l),!e.isSeriesFiltered(r)&&c)return t.setVisual("colorFromPalette",!1),{dataEach:function(v,d){var p=r.getDataParams(d),g=Q({},o);g[l]=c(p),v.setItemVisual(d,"style",g)}}}},_f=new lt,J9={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!(r.ignoreStyleOnData||e.isSeriesFiltered(r))){var t=r.getData(),n=r.visualStyleAccessPath||"itemStyle",a=EL(r,n),i=t.getVisual("drawType");return{dataEach:t.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){_f.option=l[n];var u=a(_f),c=o.ensureUniqueItemVisual(s,"style");Q(c,u),_f.option.decal&&(o.setItemVisual(s,"decal",_f.option.decal),_f.option.decal.dirty=!0),i in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},e6={performRawSeries:!0,overallReset:function(r){var e=ge();r.eachSeries(function(t){var n=t.getColorBy();if(!t.isColorBySeries()){var a=t.type+"-"+n,i=e.get(a);i||(i={},e.set(a,i)),IL(t).scope=i}}),r.eachSeries(function(t){if(!(t.isColorBySeries()||r.isSeriesFiltered(t))){var n=t.getRawData(),a={},i=t.getData(),o=IL(t).scope,s=t.visualStyleAccessPath||"itemStyle",l=OL(t,s);i.each(function(u){var c=i.getRawIndex(u);a[c]=u}),n.each(function(u){var c=a[u],f=i.getItemVisual(c,"colorFromPalette");if(f){var h=i.ensureUniqueItemVisual(c,"style"),v=n.getName(u)||u+"",d=n.count();h[l]=t.getColorFromPalette(v,o,d)}})}})}},Kd=Math.PI;function t6(r,e){e=e||{},me(e,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var t=new Te,n=new Ge({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});t.add(n);var a=new We({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),i=new Ge({style:{fill:"none"},textContent:a,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});t.add(i);var o;return e.showSpinner&&(o=new xd({shape:{startAngle:-Kd/2,endAngle:-Kd/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:Kd*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Kd*3/2}).delay(300).start("circularInOut"),t.add(o)),t.resize=function(){var s=a.getBoundingRect().width,l=e.showSpinner?e.spinnerRadius:0,u=(r.getWidth()-l*2-(e.showSpinner&&s?10:0)-s)/2-(e.showSpinner&&s?0:5+s/2)+(e.showSpinner?0:s/2)+(s?0:l),c=r.getHeight()/2;e.showSpinner&&o.setShape({cx:u,cy:c}),i.setShape({x:u-l,y:c-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},t.resize(),t}var r6=function(){function r(e,t,n,a){this._stageTaskMap=ge(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),a=this._visualHandlers=a.slice(),this._allHandlers=n.concat(a)}return r.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(n){var a=n.overallTask;a&&a.dirty()})},r.prototype.getPerformArgs=function(e,t){if(!!e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),a=n.context,i=!t&&n.progressiveEnabled&&(!a||a.progressiveRender)&&e.__idxInPipeline>n.blockIndex,o=i?n.step:null,s=a&&a.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},r.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},r.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid),a=e.getData(),i=a.count(),o=n.progressiveEnabled&&t.incrementalPrepareRender&&i>=n.threshold,s=e.get("large")&&i>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?i:null;e.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(e){var t=this,n=t._pipelineMap=ge();e.eachSeries(function(a){var i=a.getProgressive(),o=a.uid;n.set(o,{id:o,head:null,tail:null,threshold:a.getProgressiveThreshold(),progressiveEnabled:i&&!(a.preventIncremental&&a.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),t._pipe(a,a.dataTask)})},r.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;L(this._allHandlers,function(a){var i=e.get(a.uid)||e.set(a.uid,{}),o="";Dr(!(a.reset&&a.overallReset),o),a.reset&&this._createSeriesStageTask(a,i,t,n),a.overallReset&&this._createOverallStageTask(a,i,t,n)},this)},r.prototype.prepareView=function(e,t,n,a){var i=e.renderTask,o=i.context;o.model=t,o.ecModel=n,o.api=a,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},r.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},r.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},r.prototype._performStageTasks=function(e,t,n,a){a=a||{};var i=!1,o=this;L(e,function(l,u){if(!(a.visualType&&a.visualType!==l.visualType)){var c=o._stageTaskMap.get(l.uid),f=c.seriesTaskMap,h=c.overallTask;if(h){var v,d=h.agentStubMap;d.each(function(g){s(a,g)&&(g.dirty(),v=!0)}),v&&h.dirty(),o.updatePayload(h,n);var p=o.getPerformArgs(h,a.block);d.each(function(g){g.perform(p)}),h.perform(p)&&(i=!0)}else f&&f.each(function(g,y){s(a,g)&&g.dirty();var m=o.getPerformArgs(g,a.block);m.skip=!l.performRawSeries&&t.isSeriesFiltered(g.context.model),o.updatePayload(g,n),g.perform(m)&&(i=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=i||this.unfinished},r.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(n){t=n.dataTask.perform()||t}),this.unfinished=t||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},r.prototype.updatePayload=function(e,t){t!=="remain"&&(e.context.payload=t)},r.prototype._createSeriesStageTask=function(e,t,n,a){var i=this,o=t.seriesTaskMap,s=t.seriesTaskMap=ge(),l=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(c):l?n.eachRawSeriesByType(l,c):u&&u(n,a).each(c);function c(f){var h=f.uid,v=s.set(h,o&&o.get(h)||gf({plan:s6,reset:l6,count:c6}));v.context={model:f,ecModel:n,api:a,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(f,v)}},r.prototype._createOverallStageTask=function(e,t,n,a){var i=this,o=t.overallTask=t.overallTask||gf({reset:n6});o.context={ecModel:n,api:a,overallReset:e.overallReset,scheduler:i};var s=o.agentStubMap,l=o.agentStubMap=ge(),u=e.seriesType,c=e.getTargetSeries,f=!0,h=!1,v="";Dr(!e.createOnAllSeries,v),u?n.eachRawSeriesByType(u,d):c?c(n,a).each(d):(f=!1,L(n.getSeries(),d));function d(p){var g=p.uid,y=l.set(g,s&&s.get(g)||(h=!0,gf({reset:a6,onDirty:o6})));y.context={model:p,overallProgress:f},y.agent=o,y.__block=f,i._pipe(p,y)}h&&o.dirty()},r.prototype._pipe=function(e,t){var n=e.uid,a=this._pipelineMap.get(n);!a.head&&(a.head=t),a.tail&&a.tail.pipe(t),a.tail=t,t.__idxInPipeline=a.count++,t.__pipeline=a},r.wrapStageHandler=function(e,t){return ye(e)&&(e={overallReset:e,seriesType:f6(e)}),e.uid=Zl("stageHandler"),t&&(e.visualType=t),e},r}();function n6(r){r.overallReset(r.ecModel,r.api,r.payload)}function a6(r){return r.overallProgress&&i6}function i6(){this.agent.dirty(),this.getDownstream().dirty()}function o6(){this.agent&&this.agent.dirty()}function s6(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function l6(r){r.useClearVisual&&r.data.clearAllVisual();var e=r.resetDefines=st(r.reset(r.model,r.ecModel,r.api,r.payload));return e.length>1?J(e,function(t,n){return RL(n)}):u6}var u6=RL(0);function RL(r){return function(e,t){var n=t.data,a=t.resetDefines[r];if(a&&a.dataEach)for(var i=e.start;i<e.end;i++)a.dataEach(n,i);else a&&a.progress&&a.progress(e,n)}}function c6(r){return r.data.count()}function f6(r){Jd=null;try{r(bf,NL)}catch{}return Jd}var bf={},NL={},Jd;kL(bf,RA),kL(NL,NA),bf.eachSeriesByType=bf.eachRawSeriesByType=function(r){Jd=r},bf.eachComponent=function(r){r.mainType==="series"&&r.subType&&(Jd=r.subType)};function kL(r,e){for(var t in e.prototype)r[t]=Ot}var BL=r6,zL=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],h6={color:zL,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],zL]},Ur="#B9B8CE",FL="#100C2A",ep=function(){return{axisLine:{lineStyle:{color:Ur}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},VL=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],$L={darkMode:!0,color:VL,backgroundColor:FL,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:Ur}},textStyle:{color:Ur},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:Ur}},dataZoom:{borderColor:"#71708A",textStyle:{color:Ur},brushStyle:{color:"rgba(135,163,206,0.3)"},handleStyle:{color:"#353450",borderColor:"#C5CBE3"},moveHandleStyle:{color:"#B0B6C3",opacity:.3},fillerColor:"rgba(135,163,206,0.2)",emphasis:{handleStyle:{borderColor:"#91B7F2",color:"#4D587D"},moveHandleStyle:{color:"#636D9A",opacity:.7}},dataBackground:{lineStyle:{color:"#71708A",width:1},areaStyle:{color:"#71708A"}},selectedDataBackground:{lineStyle:{color:"#87A3CE"},areaStyle:{color:"#87A3CE"}}},visualMap:{textStyle:{color:Ur}},timeline:{lineStyle:{color:Ur},label:{color:Ur},controlStyle:{color:Ur,borderColor:Ur}},calendar:{itemStyle:{color:FL},dayLabel:{color:Ur},monthLabel:{color:Ur},yearLabel:{color:Ur}},timeAxis:ep(),logAxis:ep(),valueAxis:ep(),categoryAxis:ep(),line:{symbol:"circle"},graph:{color:VL},gauge:{title:{color:Ur},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:Ur},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};$L.categoryAxis.splitLine.show=!1;var v6=$L,d6=function(){function r(){}return r.prototype.normalizeQuery=function(e){var t={},n={},a={};if(ce(e)){var i=ka(e);t.mainType=i.main||null,t.subType=i.sub||null}else{var o=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};L(e,function(l,u){for(var c=!1,f=0;f<o.length;f++){var h=o[f],v=u.lastIndexOf(h);if(v>0&&v===u.length-h.length){var d=u.slice(0,v);d!=="data"&&(t.mainType=d,t[h.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(n[u]=l,c=!0),c||(a[u]=l)})}return{cptQuery:t,dataQuery:n,otherQuery:a}},r.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var a=n.targetEl,i=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=t.cptQuery,u=t.dataQuery;return c(l,o,"mainType")&&c(l,o,"subType")&&c(l,o,"index","componentIndex")&&c(l,o,"name")&&c(l,o,"id")&&c(u,i,"name")&&c(u,i,"dataIndex")&&c(u,i,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,t.otherQuery,a,i));function c(f,h,v,d){return f[v]==null||h[d||v]===f[v]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r}(),l1=["symbol","symbolSize","symbolRotate","symbolOffset"],HL=l1.concat(["symbolKeepAspect"]),p6={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData();if(r.legendIcon&&t.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var n={},a={},i=!1,o=0;o<l1.length;o++){var s=l1[o],l=r.get(s);ye(l)?(i=!0,a[s]=l):n[s]=l}if(n.symbol=n.symbol||r.defaultSymbol,t.setVisual(Q({legendIcon:r.legendIcon||n.symbol,symbolKeepAspect:r.get("symbolKeepAspect")},n)),e.isSeriesFiltered(r))return;var u=Fe(a);function c(f,h){for(var v=r.getRawValue(h),d=r.getDataParams(h),p=0;p<u.length;p++){var g=u[p];f.setItemVisual(h,g,a[g](v,d))}}return{dataEach:i?c:null}}},g6={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!r.hasSymbolVisual||e.isSeriesFiltered(r))return;var t=r.getData();function n(a,i){for(var o=a.getItemModel(i),s=0;s<HL.length;s++){var l=HL[s],u=o.getShallow(l,!0);u!=null&&a.setItemVisual(i,l,u)}}return{dataEach:t.hasItemOption?n:null}}};function u1(r,e,t){switch(t){case"color":var n=r.getItemVisual(e,"style");return n[r.getVisual("drawType")];case"opacity":return r.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getItemVisual(e,t)}}function xf(r,e){switch(e){case"color":var t=r.getVisual("style");return t[r.getVisual("drawType")];case"opacity":return r.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getVisual(e)}}function GL(r,e,t,n){switch(t){case"color":var a=r.ensureUniqueItemVisual(e,"style");a[r.getVisual("drawType")]=n,r.setItemVisual(e,"colorFromPalette",!1);break;case"opacity":r.ensureUniqueItemVisual(e,"style").opacity=n;break;case"symbol":case"symbolSize":case"liftZ":r.setItemVisual(e,t,n);break}}function WL(r,e){function t(n,a){var i=[];return n.eachComponent({mainType:"series",subType:r,query:a},function(o){i.push(o.seriesIndex)}),i}L([[r+"ToggleSelect","toggleSelect"],[r+"Select","select"],[r+"UnSelect","unselect"]],function(n){e(n[0],function(a,i,o){a=Q({},a),o.dispatchAction(Q(a,{type:n[1],seriesIndex:t(i,a)}))})})}function su(r,e,t,n,a){var i=r+e;t.isSilent(i)||n.eachComponent({mainType:"series",subType:"pie"},function(o){for(var s=o.seriesIndex,l=o.option.selectedMap,u=a.selected,c=0;c<u.length;c++)if(u[c].seriesIndex===s){var f=o.getData(),h=ns(f,a.fromActionPayload);t.trigger(i,{type:i,seriesId:o.id,name:K(h)?f.getName(h[0]):f.getName(h),selected:ce(l)?l:Q({},l)})}})}function y6(r,e,t){r.on("selectchanged",function(n){var a=t.getModel();n.isFromClick?(su("map","selectchanged",e,a,n),su("pie","selectchanged",e,a,n)):n.fromAction==="select"?(su("map","selected",e,a,n),su("pie","selected",e,a,n)):n.fromAction==="unselect"&&(su("map","unselected",e,a,n),su("pie","unselected",e,a,n))})}function As(r,e,t){for(var n;r&&!(e(r)&&(n=r,t));)r=r.__hostTarget||r.parent;return n}var m6=Math.round(Math.random()*9),_6=typeof Object.defineProperty=="function",b6=function(){function r(){this._id="__ec_inner_"+m6++}return r.prototype.get=function(e){return this._guard(e)[this._id]},r.prototype.set=function(e,t){var n=this._guard(e);return _6?Object.defineProperty(n,this._id,{value:t,enumerable:!1,configurable:!0}):n[this._id]=t,this},r.prototype.delete=function(e){return this.has(e)?(delete this._guard(e)[this._id],!0):!1},r.prototype.has=function(e){return!!this._guard(e)[this._id]},r.prototype._guard=function(e){if(e!==Object(e))throw TypeError("Value of WeakMap is not a non-null object.");return e},r}(),x6=b6,w6=Be.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,e){var t=e.cx,n=e.cy,a=e.width/2,i=e.height/2;r.moveTo(t,n-i),r.lineTo(t+a,n+i),r.lineTo(t-a,n+i),r.closePath()}}),S6=Be.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,e){var t=e.cx,n=e.cy,a=e.width/2,i=e.height/2;r.moveTo(t,n-i),r.lineTo(t+a,n),r.lineTo(t,n+i),r.lineTo(t-a,n),r.closePath()}}),C6=Be.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,e){var t=e.x,n=e.y,a=e.width/5*3,i=Math.max(a,e.height),o=a/2,s=o*o/(i-o),l=n-i+o+s,u=Math.asin(s/o),c=Math.cos(u)*o,f=Math.sin(u),h=Math.cos(u),v=o*.6,d=o*.7;r.moveTo(t-c,l+s),r.arc(t,l,o,Math.PI-u,Math.PI*2+u),r.bezierCurveTo(t+c-f*v,l+s+h*v,t,n-d,t,n),r.bezierCurveTo(t,n-d,t-c+f*v,l+s+h*v,t-c,l+s),r.closePath()}}),T6=Be.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,e){var t=e.height,n=e.width,a=e.x,i=e.y,o=n/3*2;r.moveTo(a,i),r.lineTo(a+o,i+t),r.lineTo(a,i+t/4*3),r.lineTo(a-o,i+t),r.lineTo(a,i),r.closePath()}}),D6={line:tr,rect:Ge,roundRect:Ge,square:Ge,circle:ha,diamond:S6,pin:C6,arrow:T6,triangle:w6},M6={line:function(r,e,t,n,a){a.x1=r,a.y1=e+n/2,a.x2=r+t,a.y2=e+n/2},rect:function(r,e,t,n,a){a.x=r,a.y=e,a.width=t,a.height=n},roundRect:function(r,e,t,n,a){a.x=r,a.y=e,a.width=t,a.height=n,a.r=Math.min(t,n)/4},square:function(r,e,t,n,a){var i=Math.min(t,n);a.x=r,a.y=e,a.width=i,a.height=i},circle:function(r,e,t,n,a){a.cx=r+t/2,a.cy=e+n/2,a.r=Math.min(t,n)/2},diamond:function(r,e,t,n,a){a.cx=r+t/2,a.cy=e+n/2,a.width=t,a.height=n},pin:function(r,e,t,n,a){a.x=r+t/2,a.y=e+n/2,a.width=t,a.height=n},arrow:function(r,e,t,n,a){a.x=r+t/2,a.y=e+n/2,a.width=t,a.height=n},triangle:function(r,e,t,n,a){a.cx=r+t/2,a.cy=e+n/2,a.width=t,a.height=n}},tp={};L(D6,function(r,e){tp[e]=new r});var A6=Be.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(r,e,t){var n=ed(r,e,t),a=this.shape;return a&&a.symbolType==="pin"&&e.position==="inside"&&(n.y=t.y+t.height*.4),n},buildPath:function(r,e,t){var n=e.symbolType;if(n!=="none"){var a=tp[n];a||(n="rect",a=tp[n]),M6[n](e.x,e.y,e.width,e.height,a.shape),a.buildPath(r,a.shape,t)}}});function L6(r,e){if(this.type!=="image"){var t=this.style;this.__isEmptyBrush?(t.stroke=r,t.fill=e||"#fff",t.lineWidth=2):this.shape.symbolType==="line"?t.stroke=r:t.fill=r,this.markRedraw()}}function kt(r,e,t,n,a,i,o){var s=r.indexOf("empty")===0;s&&(r=r.substr(5,1).toLowerCase()+r.substr(6));var l;return r.indexOf("image://")===0?l=m_(r.slice(8),new Re(e,t,n,a),o?"center":"cover"):r.indexOf("path://")===0?l=tf(r.slice(7),{},new Re(e,t,n,a),o?"center":"cover"):l=new A6({shape:{symbolType:r,x:e,y:t,width:n,height:a}}),l.__isEmptyBrush=s,l.setColor=L6,i&&l.setColor(i),l}function wf(r){return K(r)||(r=[+r,+r]),[r[0]||0,r[1]||0]}function lu(r,e){if(r!=null)return K(r)||(r=[r,r]),[le(r[0],e[0])||0,le(Ee(r[1],r[0]),e[1])||0]}function Ls(r){return isFinite(r)}function I6(r,e,t){var n=e.x==null?0:e.x,a=e.x2==null?1:e.x2,i=e.y==null?0:e.y,o=e.y2==null?0:e.y2;e.global||(n=n*t.width+t.x,a=a*t.width+t.x,i=i*t.height+t.y,o=o*t.height+t.y),n=Ls(n)?n:0,a=Ls(a)?a:1,i=Ls(i)?i:0,o=Ls(o)?o:0;var s=r.createLinearGradient(n,i,a,o);return s}function P6(r,e,t){var n=t.width,a=t.height,i=Math.min(n,a),o=e.x==null?.5:e.x,s=e.y==null?.5:e.y,l=e.r==null?.5:e.r;e.global||(o=o*n+t.x,s=s*a+t.y,l=l*i),o=Ls(o)?o:.5,s=Ls(s)?s:.5,l=l>=0&&Ls(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function c1(r,e,t){for(var n=e.type==="radial"?P6(r,e,t):I6(r,e,t),a=e.colorStops,i=0;i<a.length;i++)n.addColorStop(a[i].offset,a[i].color);return n}function E6(r,e){if(r===e||!r&&!e)return!1;if(!r||!e||r.length!==e.length)return!0;for(var t=0;t<r.length;t++)if(r[t]!==e[t])return!0;return!1}function rp(r){return parseInt(r,10)}function uu(r,e,t){var n=["width","height"][e],a=["clientWidth","clientHeight"][e],i=["paddingLeft","paddingTop"][e],o=["paddingRight","paddingBottom"][e];if(t[n]!=null&&t[n]!=="auto")return parseFloat(t[n]);var s=document.defaultView.getComputedStyle(r);return(r[a]||rp(s[n])||rp(r.style[n]))-(rp(s[i])||0)-(rp(s[o])||0)|0}function O6(r,e){return!r||r==="solid"||!(e>0)?null:r==="dashed"?[4*e,2*e]:r==="dotted"?[e]:je(r)?[r]:K(r)?r:null}function f1(r){var e=r.style,t=e.lineDash&&e.lineWidth>0&&O6(e.lineDash,e.lineWidth),n=e.lineDashOffset;if(t){var a=e.strokeNoScale&&r.getLineScale?r.getLineScale():1;a&&a!==1&&(t=J(t,function(i){return i/a}),n/=a)}return[t,n]}var R6=new Va(!0);function np(r){var e=r.stroke;return!(e==null||e==="none"||!(r.lineWidth>0))}function UL(r){return typeof r=="string"&&r!=="none"}function ap(r){var e=r.fill;return e!=null&&e!=="none"}function jL(r,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.fillOpacity*e.opacity,r.fill(),r.globalAlpha=t}else r.fill()}function YL(r,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.strokeOpacity*e.opacity,r.stroke(),r.globalAlpha=t}else r.stroke()}function h1(r,e,t){var n=F0(e.image,e.__image,t);if(id(n)){var a=r.createPattern(n,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&a&&a.setTransform){var i=new DOMMatrix;i.translateSelf(e.x||0,e.y||0),i.rotateSelf(0,0,(e.rotation||0)*dc),i.scaleSelf(e.scaleX||1,e.scaleY||1),a.setTransform(i)}return a}}function N6(r,e,t,n){var a,i=np(t),o=ap(t),s=t.strokePercent,l=s<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var c=e.path||R6,f=e.__dirty;if(!n){var h=t.fill,v=t.stroke,d=o&&!!h.colorStops,p=i&&!!v.colorStops,g=o&&!!h.image,y=i&&!!v.image,m=void 0,_=void 0,b=void 0,w=void 0,x=void 0;(d||p)&&(x=e.getBoundingRect()),d&&(m=f?c1(r,h,x):e.__canvasFillGradient,e.__canvasFillGradient=m),p&&(_=f?c1(r,v,x):e.__canvasStrokeGradient,e.__canvasStrokeGradient=_),g&&(b=f||!e.__canvasFillPattern?h1(r,h,e):e.__canvasFillPattern,e.__canvasFillPattern=b),y&&(w=f||!e.__canvasStrokePattern?h1(r,v,e):e.__canvasStrokePattern,e.__canvasStrokePattern=b),d?r.fillStyle=m:g&&(b?r.fillStyle=b:o=!1),p?r.strokeStyle=_:y&&(w?r.strokeStyle=w:i=!1)}var S=e.getGlobalScale();c.setScale(S[0],S[1],e.segmentIgnoreThreshold);var T,D;r.setLineDash&&t.lineDash&&(a=f1(e),T=a[0],D=a[1]);var M=!0;(u||f&Al)&&(c.setDPR(r.dpr),l?c.setContext(null):(c.setContext(r),M=!1),c.reset(),e.buildPath(c,e.shape,n),c.toStatic(),e.pathUpdated()),M&&c.rebuildPath(r,l?s:1),T&&(r.setLineDash(T),r.lineDashOffset=D),n||(t.strokeFirst?(i&&YL(r,t),o&&jL(r,t)):(o&&jL(r,t),i&&YL(r,t))),T&&r.setLineDash([])}function k6(r,e,t){var n=e.__image=F0(t.image,e.__image,e,e.onload);if(!(!n||!id(n))){var a=t.x||0,i=t.y||0,o=e.getWidth(),s=e.getHeight(),l=n.width/n.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=n.width,s=n.height),t.sWidth&&t.sHeight){var u=t.sx||0,c=t.sy||0;r.drawImage(n,u,c,t.sWidth,t.sHeight,a,i,o,s)}else if(t.sx&&t.sy){var u=t.sx,c=t.sy,f=o-u,h=s-c;r.drawImage(n,u,c,f,h,a,i,o,s)}else r.drawImage(n,a,i,o,s)}}function B6(r,e,t){var n,a=t.text;if(a!=null&&(a+=""),a){r.font=t.font||Hi,r.textAlign=t.textAlign,r.textBaseline=t.textBaseline;var i=void 0,o=void 0;r.setLineDash&&t.lineDash&&(n=f1(e),i=n[0],o=n[1]),i&&(r.setLineDash(i),r.lineDashOffset=o),t.strokeFirst?(np(t)&&r.strokeText(a,t.x,t.y),ap(t)&&r.fillText(a,t.x,t.y)):(ap(t)&&r.fillText(a,t.x,t.y),np(t)&&r.strokeText(a,t.x,t.y)),i&&r.setLineDash([])}}var qL=["shadowBlur","shadowOffsetX","shadowOffsetY"],ZL=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function XL(r,e,t,n,a){var i=!1;if(!n&&(t=t||{},e===t))return!1;if(n||e.opacity!==t.opacity){un(r,a),i=!0;var o=Math.max(Math.min(e.opacity,1),0);r.globalAlpha=isNaN(o)?os.opacity:o}(n||e.blend!==t.blend)&&(i||(un(r,a),i=!0),r.globalCompositeOperation=e.blend||os.blend);for(var s=0;s<qL.length;s++){var l=qL[s];(n||e[l]!==t[l])&&(i||(un(r,a),i=!0),r[l]=r.dpr*(e[l]||0))}return(n||e.shadowColor!==t.shadowColor)&&(i||(un(r,a),i=!0),r.shadowColor=e.shadowColor||os.shadowColor),i}function QL(r,e,t,n,a){var i=Sf(e,a.inHover),o=n?null:t&&Sf(t,a.inHover)||{};if(i===o)return!1;var s=XL(r,i,o,n,a);if((n||i.fill!==o.fill)&&(s||(un(r,a),s=!0),UL(i.fill)&&(r.fillStyle=i.fill)),(n||i.stroke!==o.stroke)&&(s||(un(r,a),s=!0),UL(i.stroke)&&(r.strokeStyle=i.stroke)),(n||i.opacity!==o.opacity)&&(s||(un(r,a),s=!0),r.globalAlpha=i.opacity==null?1:i.opacity),e.hasStroke()){var l=i.lineWidth,u=l/(i.strokeNoScale&&e.getLineScale?e.getLineScale():1);r.lineWidth!==u&&(s||(un(r,a),s=!0),r.lineWidth=u)}for(var c=0;c<ZL.length;c++){var f=ZL[c],h=f[0];(n||i[h]!==o[h])&&(s||(un(r,a),s=!0),r[h]=i[h]||f[1])}return s}function z6(r,e,t,n,a){return XL(r,Sf(e,a.inHover),t&&Sf(t,a.inHover),n,a)}function KL(r,e){var t=e.transform,n=r.dpr||1;t?r.setTransform(n*t[0],n*t[1],n*t[2],n*t[3],n*t[4],n*t[5]):r.setTransform(n,0,0,n,0,0)}function F6(r,e,t){for(var n=!1,a=0;a<r.length;a++){var i=r[a];n=n||i.isZeroArea(),KL(e,i),e.beginPath(),i.buildPath(e,i.shape),e.clip()}t.allClipped=n}function V6(r,e){return r&&e?r[0]!==e[0]||r[1]!==e[1]||r[2]!==e[2]||r[3]!==e[3]||r[4]!==e[4]||r[5]!==e[5]:!(!r&&!e)}var JL=1,eI=2,tI=3,rI=4;function $6(r){var e=ap(r),t=np(r);return!(r.lineDash||!(+e^+t)||e&&typeof r.fill!="string"||t&&typeof r.stroke!="string"||r.strokePercent<1||r.strokeOpacity<1||r.fillOpacity<1)}function un(r,e){e.batchFill&&r.fill(),e.batchStroke&&r.stroke(),e.batchFill="",e.batchStroke=""}function Sf(r,e){return e&&r.__hoverStyle||r.style}function v1(r,e){Is(r,e,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function Is(r,e,t,n){var a=e.transform;if(!e.shouldBePainted(t.viewWidth,t.viewHeight,!1,!1)){e.__dirty&=~yn,e.__isRendered=!1;return}var i=e.__clipPaths,o=t.prevElClipPaths,s=!1,l=!1;if((!o||E6(i,o))&&(o&&o.length&&(un(r,t),r.restore(),l=s=!0,t.prevElClipPaths=null,t.allClipped=!1,t.prevEl=null),i&&i.length&&(un(r,t),r.save(),F6(i,r,t),s=!0),t.prevElClipPaths=i),t.allClipped){e.__isRendered=!1;return}e.beforeBrush&&e.beforeBrush(),e.innerBeforeBrush();var u=t.prevEl;u||(l=s=!0);var c=e instanceof Be&&e.autoBatch&&$6(e.style);s||V6(a,u.transform)?(un(r,t),KL(r,e)):c||un(r,t);var f=Sf(e,t.inHover);e instanceof Be?(t.lastDrawType!==JL&&(l=!0,t.lastDrawType=JL),QL(r,e,u,l,t),(!c||!t.batchFill&&!t.batchStroke)&&r.beginPath(),N6(r,e,f,c),c&&(t.batchFill=f.fill||"",t.batchStroke=f.stroke||"")):e instanceof Gc?(t.lastDrawType!==tI&&(l=!0,t.lastDrawType=tI),QL(r,e,u,l,t),B6(r,e,f)):e instanceof ur?(t.lastDrawType!==eI&&(l=!0,t.lastDrawType=eI),z6(r,e,u,l,t),k6(r,e,f)):e.getTemporalDisplayables&&(t.lastDrawType!==rI&&(l=!0,t.lastDrawType=rI),H6(r,e,t)),c&&n&&un(r,t),e.innerAfterBrush(),e.afterBrush&&e.afterBrush(),t.prevEl=e,e.__dirty=0,e.__isRendered=!0}function H6(r,e,t){var n=e.getDisplayables(),a=e.getTemporalDisplayables();r.save();var i={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:t.viewWidth,viewHeight:t.viewHeight,inHover:t.inHover},o,s;for(o=e.getCursor(),s=n.length;o<s;o++){var l=n[o];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),Is(r,l,i,o===s-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),i.prevEl=l}for(var u=0,c=a.length;u<c;u++){var l=a[u];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),Is(r,l,i,u===c-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),i.prevEl=l}e.clearTemporalDisplayables(),e.notClear=!0,r.restore()}var d1=new x6,nI=new Tc(100),aI=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function cu(r,e){if(r==="none")return null;var t=e.getDevicePixelRatio(),n=e.getZr(),a=n.painter.type==="svg";r.dirty&&d1.delete(r);var i=d1.get(r);if(i)return i;var o=me(r,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});o.backgroundColor==="none"&&(o.backgroundColor=null);var s={repeat:"repeat"};return l(s),s.rotation=o.rotation,s.scaleX=s.scaleY=a?1:1/t,d1.set(r,s),r.dirty=!1,s;function l(u){for(var c=[t],f=!0,h=0;h<aI.length;++h){var v=o[aI[h]];if(v!=null&&!K(v)&&!ce(v)&&!je(v)&&typeof v!="boolean"){f=!1;break}c.push(v)}var d;if(f){d=c.join(",")+(a?"-svg":"");var p=nI.get(d);p&&(a?u.svgElement=p:u.image=p)}var g=oI(o.dashArrayX),y=G6(o.dashArrayY),m=iI(o.symbol),_=W6(g),b=sI(y),w=!a&&ia.createCanvas(),x=a&&{tag:"g",attrs:{},key:"dcl",children:[]},S=D(),T;w&&(w.width=S.width*t,w.height=S.height*t,T=w.getContext("2d")),M(),f&&nI.put(d,w||x),u.image=w,u.svgElement=x,u.svgWidth=S.width,u.svgHeight=S.height;function D(){for(var A=1,I=0,P=_.length;I<P;++I)A=oD(A,_[I]);for(var E=1,I=0,P=m.length;I<P;++I)E=oD(E,m[I].length);A*=E;var O=b*_.length*m.length;return{width:Math.max(1,Math.min(A,o.maxTileWidth)),height:Math.max(1,Math.min(O,o.maxTileHeight))}}function M(){T&&(T.clearRect(0,0,w.width,w.height),o.backgroundColor&&(T.fillStyle=o.backgroundColor,T.fillRect(0,0,w.width,w.height)));for(var A=0,I=0;I<y.length;++I)A+=y[I];if(A<=0)return;for(var P=-b,E=0,O=0,N=0;P<S.height;){if(E%2===0){for(var V=O/2%m.length,$=0,U=0,Y=0;$<S.width*2;){for(var ae=0,I=0;I<g[N].length;++I)ae+=g[N][I];if(ae<=0)break;if(U%2===0){var H=(1-o.symbolSize)*.5,q=$+g[N][U]*H,X=P+y[E]*H,Z=g[N][U]*o.symbolSize,ie=y[E]*o.symbolSize,se=Y/2%m[V].length;te(q,X,Z,ie,m[V][se])}$+=g[N][U],++Y,++U,U===g[N].length&&(U=0)}++N,N===g.length&&(N=0)}P+=y[E],++O,++E,E===y.length&&(E=0)}function te(ve,R,F,G,re){var ne=a?1:t,ee=kt(re,ve*ne,R*ne,F*ne,G*ne,o.color,o.symbolKeepAspect);if(a){var ue=n.painter.renderOneToVNode(ee);ue&&x.children.push(ue)}else v1(T,ee)}}}}function iI(r){if(!r||r.length===0)return[["rect"]];if(ce(r))return[[r]];for(var e=!0,t=0;t<r.length;++t)if(!ce(r[t])){e=!1;break}if(e)return iI([r]);for(var n=[],t=0;t<r.length;++t)ce(r[t])?n.push([r[t]]):n.push(r[t]);return n}function oI(r){if(!r||r.length===0)return[[0,0]];if(je(r)){var e=Math.ceil(r);return[[e,e]]}for(var t=!0,n=0;n<r.length;++n)if(!je(r[n])){t=!1;break}if(t)return oI([r]);for(var a=[],n=0;n<r.length;++n)if(je(r[n])){var e=Math.ceil(r[n]);a.push([e,e])}else{var e=J(r[n],function(s){return Math.ceil(s)});e.length%2===1?a.push(e.concat(e)):a.push(e)}return a}function G6(r){if(!r||typeof r=="object"&&r.length===0)return[0,0];if(je(r)){var e=Math.ceil(r);return[e,e]}var t=J(r,function(n){return Math.ceil(n)});return r.length%2?t.concat(t):t}function W6(r){return J(r,function(e){return sI(e)})}function sI(r){for(var e=0,t=0;t<r.length;++t)e+=r[t];return r.length%2===1?e*2:e}function U6(r,e){r.eachRawSeries(function(t){if(!r.isSeriesFiltered(t)){var n=t.getData();n.hasItemVisual()&&n.each(function(o){var s=n.getItemVisual(o,"decal");if(s){var l=n.ensureUniqueItemVisual(o,"style");l.decal=cu(s,e)}});var a=n.getVisual("decal");if(a){var i=n.getVisual("style");i.decal=cu(a,e)}}})}var j6=new On,ya=j6,lI={};function Y6(r,e){lI[r]=e}function uI(r){return lI[r]}var q6="5.4.1",Z6={zrender:"5.4.1"},X6=1,Q6=800,K6=900,J6=1e3,eU=2e3,tU=5e3,cI=1e3,rU=1100,p1=2e3,fI=3e3,nU=4e3,ip=4500,aU=4600,iU=5e3,oU=6e3,hI=7e3,vI={PROCESSOR:{FILTER:J6,SERIES_FILTER:Q6,STATISTIC:tU},VISUAL:{LAYOUT:cI,PROGRESSIVE_LAYOUT:rU,GLOBAL:p1,CHART:fI,POST_CHART_LAYOUT:aU,COMPONENT:nU,BRUSH:iU,CHART_ITEM:ip,ARIA:oU,DECAL:hI}},Pr="__flagInMainProcess",cn="__pendingUpdate",g1="__needsUpdateStatus",dI=/^[a-zA-Z0-9_]+$/,y1="__connectUpdateStatus",pI=0,sU=1,lU=2;function gI(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(this.isDisposed()){this.id;return}return mI(this,r,e)}}function yI(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mI(this,r,e)}}function mI(r,e,t){return t[0]=t[0]&&t[0].toLowerCase(),On.prototype[e].apply(r,t)}var _I=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(On),bI=_I.prototype;bI.on=yI("on"),bI.off=yI("off");var fu,m1,op,ho,_1,b1,x1,Cf,Tf,xI,wI,w1,SI,sp,CI,TI,Wn,DI,lp=function(r){j(e,r);function e(t,n,a){var i=r.call(this,new d6)||this;i._chartsViews=[],i._chartsMap={},i._componentsViews=[],i._componentsMap={},i._pendingActions=[],a=a||{},ce(n)&&(n=MI[n]),i._dom=t;var o="canvas",s="auto",l=!1,u=i._zr=M0(t,{renderer:a.renderer||o,devicePixelRatio:a.devicePixelRatio,width:a.width,height:a.height,ssr:a.ssr,useDirtyRect:Ee(a.useDirtyRect,l),useCoarsePointer:Ee(a.useCoarsePointer,s),pointerSize:a.pointerSize});i._ssr=a.ssr,i._throttledZrFlush=Qd(fe(u.flush,u),17),n=we(n),n&&HA(n,!0),i._theme=n,i._locale=m7(a.locale||nA),i._coordSysMgr=new ru;var c=i._api=CI(i);function f(h,v){return h.__prio-v.__prio}return Nv(cp,f),Nv(C1,f),i._scheduler=new BL(i,c,C1,cp),i._messageCenter=new _I,i._initEvents(),i.resize=fe(i.resize,i),u.animation.on("frame",i._onframe,i),xI(u,i),wI(u,i),fc(i),i}return e.prototype._onframe=function(){if(!this._disposed){DI(this);var t=this._scheduler;if(this[cn]){var n=this[cn].silent;this[Pr]=!0;try{fu(this),ho.update.call(this,null,this[cn].updateParams)}catch(l){throw this[Pr]=!1,this[cn]=null,l}this._zr.flush(),this[Pr]=!1,this[cn]=null,Cf.call(this,n),Tf.call(this,n)}else if(t.unfinished){var a=X6,i=this._model,o=this._api;t.unfinished=!1;do{var s=+new Date;t.performSeriesTasks(i),t.performDataProcessorTasks(i),b1(this,i),t.performVisualTasks(i),sp(this,this._model,o,"remain",{}),a-=+new Date-s}while(a>0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(t,n,a){if(!this[Pr]){if(this._disposed){this.id;return}var i,o,s;if(_e(n)&&(a=n.lazyUpdate,i=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[Pr]=!0,!this._model||n){var l=new K7(this._api),u=this._theme,c=this._model=new RA;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(t,{replaceMerge:o},T1);var f={seriesTransition:s,optionChanged:!0};if(a)this[cn]={silent:i,updateParams:f},this[Pr]=!1,this.getZr().wakeUp();else{try{fu(this),ho.update.call(this,null,f)}catch(h){throw this[cn]=null,this[Pr]=!1,h}this._ssr||this._zr.flush(),this[cn]=null,this[Pr]=!1,Cf.call(this,i),Tf.call(this,i)}}},e.prototype.setTheme=function(){},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Ue.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){t=t||{};var n=this._zr.painter;return n.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){t=t||{};var n=this._zr.painter;return n.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){if(!!Ue.svgSupported){var t=this._zr,n=t.storage.getDisplayList();return L(n,function(a){a.stopAnimation(null,!0)}),t.painter.toDataURL()}},e.prototype.getDataURL=function(t){if(this._disposed){this.id;return}t=t||{};var n=t.excludeComponents,a=this._model,i=[],o=this;L(n,function(l){a.eachComponent({mainType:l},function(u){var c=o._componentsMap[u.__viewId];c.group.ignore||(i.push(c),c.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return L(i,function(l){l.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(t){if(this._disposed){this.id;return}var n=t.type==="svg",a=this.group,i=Math.min,o=Math.max,s=1/0;if(fp[a]){var l=s,u=s,c=-s,f=-s,h=[],v=t&&t.pixelRatio||this.getDevicePixelRatio();L(Ps,function(_,b){if(_.group===a){var w=n?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(we(t)),x=_.getDom().getBoundingClientRect();l=i(x.left,l),u=i(x.top,u),c=o(x.right,c),f=o(x.bottom,f),h.push({dom:w,left:x.left,top:x.top})}}),l*=v,u*=v,c*=v,f*=v;var d=c-l,p=f-u,g=ia.createCanvas(),y=M0(g,{renderer:n?"svg":"canvas"});if(y.resize({width:d,height:p}),n){var m="";return L(h,function(_){var b=_.left-l,w=_.top-u;m+='<g transform="translate('+b+","+w+')">'+_.dom+"</g>"}),y.painter.getSvgRoot().innerHTML=m,t.connectedBackgroundColor&&y.painter.setBackgroundColor(t.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}else return t.connectedBackgroundColor&&y.add(new Ge({shape:{x:0,y:0,width:d,height:p},style:{fill:t.connectedBackgroundColor}})),L(h,function(_){var b=new ur({style:{x:_.left*v-l,y:_.top*v-u,image:_.dom}});y.add(b)}),y.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}else return this.getDataURL(t)},e.prototype.convertToPixel=function(t,n){return _1(this,"convertToPixel",t,n)},e.prototype.convertFromPixel=function(t,n){return _1(this,"convertFromPixel",t,n)},e.prototype.containPixel=function(t,n){if(this._disposed){this.id;return}var a=this._model,i,o=Fc(a,t);return L(o,function(s,l){l.indexOf("Models")>=0&&L(s,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)i=i||!!c.containPoint(n);else if(l==="seriesModels"){var f=this._chartsMap[u.__viewId];f&&f.containPoint&&(i=i||f.containPoint(n,u))}},this)},this),!!i},e.prototype.getVisual=function(t,n){var a=this._model,i=Fc(a,t,{defaultMainType:"series"}),o=i.seriesModel,s=o.getData(),l=i.hasOwnProperty("dataIndexInside")?i.dataIndexInside:i.hasOwnProperty("dataIndex")?s.indexOfRawIndex(i.dataIndex):null;return l!=null?u1(s,l,n):xf(s,n)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t=this;L(uU,function(n){var a=function(i){var o=t.getModel(),s=i.target,l,u=n==="globalout";if(u?l={}:s&&As(s,function(d){var p=Me(d);if(p&&p.dataIndex!=null){var g=p.dataModel||o.getSeriesByIndex(p.seriesIndex);return l=g&&g.getDataParams(p.dataIndex,p.dataType)||{},!0}else if(p.eventData)return l=Q({},p.eventData),!0},!0),l){var c=l.componentType,f=l.componentIndex;(c==="markLine"||c==="markPoint"||c==="markArea")&&(c="series",f=l.seriesIndex);var h=c&&f!=null&&o.getComponent(c,f),v=h&&t[h.mainType==="series"?"_chartsMap":"_componentsMap"][h.__viewId];l.event=i,l.type=n,t._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:h,view:v},t.trigger(n,l)}};a.zrEventfulCallAtLast=!0,t._zr.on(n,a,t)}),L(Df,function(n,a){t._messageCenter.on(a,function(i){this.trigger(a,i)},t)}),L(["selectchanged"],function(n){t._messageCenter.on(n,function(a){this.trigger(n,a)},t)}),y6(this._messageCenter,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var t=this.getDom();t&&dD(this.getDom(),M1,"");var n=this,a=n._api,i=n._model;L(n._componentsViews,function(o){o.dispose(i,a)}),L(n._chartsViews,function(o){o.dispose(i,a)}),n._zr.dispose(),n._dom=n._model=n._chartsMap=n._componentsMap=n._chartsViews=n._componentsViews=n._scheduler=n._api=n._zr=n._throttledZrFlush=n._theme=n._coordSysMgr=n._messageCenter=null,delete Ps[n.id]},e.prototype.resize=function(t){if(!this[Pr]){if(this._disposed){this.id;return}this._zr.resize(t);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var a=n.resetOption("media"),i=t&&t.silent;this[cn]&&(i==null&&(i=this[cn].silent),a=!0,this[cn]=null),this[Pr]=!0;try{a&&fu(this),ho.update.call(this,{type:"resize",animation:Q({duration:0},t&&t.animation)})}catch(o){throw this[Pr]=!1,o}this[Pr]=!1,Cf.call(this,i),Tf.call(this,i)}}},e.prototype.showLoading=function(t,n){if(this._disposed){this.id;return}if(_e(t)&&(n=t,t=""),t=t||"default",this.hideLoading(),!!D1[t]){var a=D1[t](this._api,n),i=this._zr;this._loadingFX=a,i.add(a)}},e.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(t){var n=Q({},t);return n.type=Df[t.type],n},e.prototype.dispatchAction=function(t,n){if(this._disposed){this.id;return}if(_e(n)||(n={silent:!!n}),!!up[t.type]&&!!this._model){if(this[Pr]){this._pendingActions.push(t);return}var a=n.silent;x1.call(this,t,a);var i=n.flush;i?this._zr.flush():i!==!1&&Ue.browser.weChat&&this._throttledZrFlush(),Cf.call(this,a),Tf.call(this,a)}},e.prototype.updateLabelLayout=function(){ya.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed){this.id;return}var n=t.seriesIndex,a=this.getModel(),i=a.getSeriesByIndex(n);i.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=function(){fu=function(f){var h=f._scheduler;h.restorePipelines(f._model),h.prepareStageTasks(),m1(f,!0),m1(f,!1),h.plan()},m1=function(f,h){for(var v=f._model,d=f._scheduler,p=h?f._componentsViews:f._chartsViews,g=h?f._componentsMap:f._chartsMap,y=f._zr,m=f._api,_=0;_<p.length;_++)p[_].__alive=!1;h?v.eachComponent(function(x,S){x!=="series"&&b(S)}):v.eachSeries(b);function b(x){var S=x.__requireNewView;x.__requireNewView=!1;var T="_ec_"+x.id+"_"+x.type,D=!S&&g[T];if(!D){var M=ka(x.type),A=h?wt.getClass(M.main,M.sub):ut.getClass(M.sub);D=new A,D.init(v,m),g[T]=D,p.push(D),y.add(D.group)}x.__viewId=D.__id=T,D.__alive=!0,D.__model=x,D.group.__ecComponentInfo={mainType:x.mainType,index:x.componentIndex},!h&&d.prepareView(D,x,v,m)}for(var _=0;_<p.length;){var w=p[_];w.__alive?_++:(!h&&w.renderTask.dispose(),y.remove(w.group),w.dispose(v,m),p.splice(_,1),g[w.__id]===w&&delete g[w.__id],w.__id=w.group.__ecComponentInfo=null)}},op=function(f,h,v,d,p){var g=f._model;if(g.setUpdatePayload(v),!d){L([].concat(f._componentsViews).concat(f._chartsViews),w);return}var y={};y[d+"Id"]=v[d+"Id"],y[d+"Index"]=v[d+"Index"],y[d+"Name"]=v[d+"Name"];var m={mainType:d,query:y};p&&(m.subType=p);var _=v.excludeSeriesId,b;_!=null&&(b=ge(),L(st(_),function(x){var S=qt(x,null);S!=null&&b.set(S,!0)})),g&&g.eachComponent(m,function(x){var S=b&&b.get(x.id)!=null;if(!S)if(vM(v))if(x instanceof yt)v.type===ds&&!v.notBlur&&!x.get(["emphasis","disabled"])&&dW(x,v,f._api);else{var T=l_(x.mainType,x.componentIndex,v.name,f._api),D=T.focusSelf,M=T.dispatchers;v.type===ds&&D&&!v.notBlur&&s_(x.mainType,x.componentIndex,f._api),M&&L(M,function(A){v.type===ds?hi(A):vi(A)})}else c_(v)&&x instanceof yt&&(yW(x,v,f._api),fM(x),Wn(f))},f),g&&g.eachComponent(m,function(x){var S=b&&b.get(x.id)!=null;S||w(f[d==="series"?"_chartsMap":"_componentsMap"][x.__viewId])},f);function w(x){x&&x.__alive&&x[h]&&x[h](x.__model,g,f._api,v)}},ho={prepareAndUpdate:function(f){fu(this),ho.update.call(this,f,{optionChanged:f.newOption!=null})},update:function(f,h){var v=this._model,d=this._api,p=this._zr,g=this._coordSysMgr,y=this._scheduler;if(!!v){v.setUpdatePayload(f),y.restoreData(v,f),y.performSeriesTasks(v),g.create(v,d),y.performDataProcessorTasks(v,f),b1(this,v),g.update(v,d),t(v),y.performVisualTasks(v,f),w1(this,v,d,f,h);var m=v.get("backgroundColor")||"transparent",_=v.get("darkMode");p.setBackgroundColor(m),_!=null&&_!=="auto"&&p.setDarkMode(_),ya.trigger("afterupdate",v,d)}},updateTransform:function(f){var h=this,v=this._model,d=this._api;if(!!v){v.setUpdatePayload(f);var p=[];v.eachComponent(function(y,m){if(y!=="series"){var _=h.getViewOfComponentModel(m);if(_&&_.__alive)if(_.updateTransform){var b=_.updateTransform(m,v,d,f);b&&b.update&&p.push(_)}else p.push(_)}});var g=ge();v.eachSeries(function(y){var m=h._chartsMap[y.__viewId];if(m.updateTransform){var _=m.updateTransform(y,v,d,f);_&&_.update&&g.set(y.uid,1)}else g.set(y.uid,1)}),t(v),this._scheduler.performVisualTasks(v,f,{setDirty:!0,dirtyMap:g}),sp(this,v,d,f,{},g),ya.trigger("afterupdate",v,d)}},updateView:function(f){var h=this._model;!h||(h.setUpdatePayload(f),ut.markUpdateMethod(f,"updateView"),t(h),this._scheduler.performVisualTasks(h,f,{setDirty:!0}),w1(this,h,this._api,f,{}),ya.trigger("afterupdate",h,this._api))},updateVisual:function(f){var h=this,v=this._model;!v||(v.setUpdatePayload(f),v.eachSeries(function(d){d.getData().clearAllVisual()}),ut.markUpdateMethod(f,"updateVisual"),t(v),this._scheduler.performVisualTasks(v,f,{visualType:"visual",setDirty:!0}),v.eachComponent(function(d,p){if(d!=="series"){var g=h.getViewOfComponentModel(p);g&&g.__alive&&g.updateVisual(p,v,h._api,f)}}),v.eachSeries(function(d){var p=h._chartsMap[d.__viewId];p.updateVisual(d,v,h._api,f)}),ya.trigger("afterupdate",v,this._api))},updateLayout:function(f){ho.update.call(this,f)}},_1=function(f,h,v,d){if(f._disposed){f.id;return}for(var p=f._model,g=f._coordSysMgr.getCoordinateSystems(),y,m=Fc(p,v),_=0;_<g.length;_++){var b=g[_];if(b[h]&&(y=b[h](p,m,d))!=null)return y}},b1=function(f,h){var v=f._chartsMap,d=f._scheduler;h.eachSeries(function(p){d.updateStreamModes(p,v[p.__viewId])})},x1=function(f,h){var v=this,d=this.getModel(),p=f.type,g=f.escapeConnect,y=up[p],m=y.actionInfo,_=(m.update||"update").split(":"),b=_.pop(),w=_[0]!=null&&ka(_[0]);this[Pr]=!0;var x=[f],S=!1;f.batch&&(S=!0,x=J(f.batch,function(E){return E=me(Q({},E),f),E.batch=null,E}));var T=[],D,M=c_(f),A=vM(f);if(A&&cM(this._api),L(x,function(E){if(D=y.action(E,v._model,v._api),D=D||Q({},E),D.type=m.event||D.type,T.push(D),A){var O=N0(f),N=O.queryOptionMap,V=O.mainTypeSpecified,$=V?N.keys()[0]:"series";op(v,b,E,$),Wn(v)}else M?(op(v,b,E,"series"),Wn(v)):w&&op(v,b,E,w.main,w.sub)}),b!=="none"&&!A&&!M&&!w)try{this[cn]?(fu(this),ho.update.call(this,f),this[cn]=null):ho[b].call(this,f)}catch(E){throw this[Pr]=!1,E}if(S?D={type:m.event||p,escapeConnect:g,batch:T}:D=T[0],this[Pr]=!1,!h){var I=this._messageCenter;if(I.trigger(D.type,D),M){var P={type:"selectchanged",escapeConnect:g,selected:mW(d),isFromClick:f.isFromClick||!1,fromAction:f.type,fromActionPayload:f};I.trigger(P.type,P)}}},Cf=function(f){for(var h=this._pendingActions;h.length;){var v=h.shift();x1.call(this,v,f)}},Tf=function(f){!f&&this.trigger("updated")},xI=function(f,h){f.on("rendered",function(v){h.trigger("rendered",v),f.animation.isFinished()&&!h[cn]&&!h._scheduler.unfinished&&!h._pendingActions.length&&h.trigger("finished")})},wI=function(f,h){f.on("mouseover",function(v){var d=v.target,p=As(d,qc);p&&(pW(p,v,h._api),Wn(h))}).on("mouseout",function(v){var d=v.target,p=As(d,qc);p&&(gW(p,v,h._api),Wn(h))}).on("click",function(v){var d=v.target,p=As(d,function(m){return Me(m).dataIndex!=null},!0);if(p){var g=p.selected?"unselect":"select",y=Me(p);h._api.dispatchAction({type:g,dataType:y.dataType,dataIndexInside:y.dataIndex,seriesIndex:y.seriesIndex,isFromClick:!0})}})};function t(f){f.clearColorPalette(),f.eachSeries(function(h){h.clearColorPalette()})}function n(f){var h=[],v=[],d=!1;if(f.eachComponent(function(m,_){var b=_.get("zlevel")||0,w=_.get("z")||0,x=_.getZLevelKey();d=d||!!x,(m==="series"?v:h).push({zlevel:b,z:w,idx:_.componentIndex,type:m,key:x})}),d){var p=h.concat(v),g,y;Nv(p,function(m,_){return m.zlevel===_.zlevel?m.z-_.z:m.zlevel-_.zlevel}),L(p,function(m){var _=f.getComponent(m.type,m.idx),b=m.zlevel,w=m.key;g!=null&&(b=Math.max(g,b)),w?(b===g&&w!==y&&b++,y=w):y&&(b===g&&b++,y=""),g=b,_.setZLevel(b)})}}w1=function(f,h,v,d,p){n(h),SI(f,h,v,d,p),L(f._chartsViews,function(g){g.__alive=!1}),sp(f,h,v,d,p),L(f._chartsViews,function(g){g.__alive||g.remove(h,v)})},SI=function(f,h,v,d,p,g){L(g||f._componentsViews,function(y){var m=y.__model;u(m,y),y.render(m,h,v,d),s(m,y),c(m,y)})},sp=function(f,h,v,d,p,g){var y=f._scheduler;p=Q(p||{},{updatedSeries:h.getSeries()}),ya.trigger("series:beforeupdate",h,v,p);var m=!1;h.eachSeries(function(_){var b=f._chartsMap[_.__viewId];b.__alive=!0;var w=b.renderTask;y.updatePayload(w,d),u(_,b),g&&g.get(_.uid)&&w.dirty(),w.perform(y.getPerformArgs(w))&&(m=!0),b.group.silent=!!_.get("silent"),o(_,b),fM(_)}),y.unfinished=m||y.unfinished,ya.trigger("series:layoutlabels",h,v,p),ya.trigger("series:transition",h,v,p),h.eachSeries(function(_){var b=f._chartsMap[_.__viewId];s(_,b),c(_,b)}),i(f,h),ya.trigger("series:afterupdate",h,v,p)},Wn=function(f){f[g1]=!0,f.getZr().wakeUp()},DI=function(f){!f[g1]||(f.getZr().storage.traverse(function(h){Wl(h)||a(h)}),f[g1]=!1)};function a(f){for(var h=[],v=f.currentStates,d=0;d<v.length;d++){var p=v[d];p==="emphasis"||p==="blur"||p==="select"||h.push(p)}f.selected&&f.states.select&&h.push("select"),f.hoverState===hd&&f.states.emphasis?h.push("emphasis"):f.hoverState===Wc&&f.states.blur&&h.push("blur"),f.useStates(h)}function i(f,h){var v=f._zr,d=v.storage,p=0;d.traverse(function(g){g.isGroup||p++}),p>h.get("hoverLayerThreshold")&&!Ue.node&&!Ue.worker&&h.eachSeries(function(g){if(!g.preventUsingHoverLayer){var y=f._chartsMap[g.__viewId];y.__alive&&y.eachRendered(function(m){m.states.emphasis&&(m.states.emphasis.hoverLayer=!0)})}})}function o(f,h){var v=f.get("blendMode")||null;h.eachRendered(function(d){d.isGroup||(d.style.blend=v)})}function s(f,h){if(!f.preventAutoZ){var v=f.get("z")||0,d=f.get("zlevel")||0;h.eachRendered(function(p){return l(p,v,d,-1/0),!0})}}function l(f,h,v,d){var p=f.getTextContent(),g=f.getTextGuideLine(),y=f.isGroup;if(y)for(var m=f.childrenRef(),_=0;_<m.length;_++)d=Math.max(l(m[_],h,v,d),d);else f.z=h,f.zlevel=v,d=Math.max(f.z2,d);if(p&&(p.z=h,p.zlevel=v,isFinite(d)&&(p.z2=d+2)),g){var b=f.textGuideLineConfig;g.z=h,g.zlevel=v,isFinite(d)&&(g.z2=d+(b&&b.showAbove?1:-1))}return d}function u(f,h){h.eachRendered(function(v){if(!Wl(v)){var d=v.getTextContent(),p=v.getTextGuideLine();v.stateTransition&&(v.stateTransition=null),d&&d.stateTransition&&(d.stateTransition=null),p&&p.stateTransition&&(p.stateTransition=null),v.hasState()?(v.prevStates=v.currentStates,v.clearStates()):v.prevStates&&(v.prevStates=null)}})}function c(f,h){var v=f.getModel("stateAnimation"),d=f.isAnimationEnabled(),p=v.get("duration"),g=p>0?{duration:p,delay:v.get("delay"),easing:v.get("easing")}:null;h.eachRendered(function(y){if(y.states&&y.states.emphasis){if(Wl(y))return;if(y instanceof Be&&SW(y),y.__dirty){var m=y.prevStates;m&&y.useStates(m)}if(d){y.stateTransition=g;var _=y.getTextContent(),b=y.getTextGuideLine();_&&(_.stateTransition=g),b&&(b.stateTransition=g)}y.__dirty&&a(y)}})}CI=function(f){return new(function(h){j(v,h);function v(){return h!==null&&h.apply(this,arguments)||this}return v.prototype.getCoordinateSystems=function(){return f._coordSysMgr.getCoordinateSystems()},v.prototype.getComponentByElement=function(d){for(;d;){var p=d.__ecComponentInfo;if(p!=null)return f._model.getComponent(p.mainType,p.index);d=d.parent}},v.prototype.enterEmphasis=function(d,p){hi(d,p),Wn(f)},v.prototype.leaveEmphasis=function(d,p){vi(d,p),Wn(f)},v.prototype.enterBlur=function(d){oM(d),Wn(f)},v.prototype.leaveBlur=function(d){i_(d),Wn(f)},v.prototype.enterSelect=function(d){sM(d),Wn(f)},v.prototype.leaveSelect=function(d){lM(d),Wn(f)},v.prototype.getModel=function(){return f.getModel()},v.prototype.getViewOfComponentModel=function(d){return f.getViewOfComponentModel(d)},v.prototype.getViewOfSeriesModel=function(d){return f.getViewOfSeriesModel(d)},v}(NA))(f)},TI=function(f){function h(v,d){for(var p=0;p<v.length;p++){var g=v[p];g[y1]=d}}L(Df,function(v,d){f._messageCenter.on(d,function(p){if(fp[f.group]&&f[y1]!==pI){if(p&&p.escapeConnect)return;var g=f.makeActionFromEvent(p),y=[];L(Ps,function(m){m!==f&&m.group===f.group&&y.push(m)}),h(y,pI),L(y,function(m){m[y1]!==sU&&m.dispatchAction(g)}),h(y,lU)}})})}}(),e}(On),S1=lp.prototype;S1.on=gI("on"),S1.off=gI("off"),S1.one=function(r,e,t){var n=this;function a(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];e&&e.apply&&e.apply(this,i),n.off(r,a)}this.on.call(this,r,a,t)};var uU=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function Sde(r){}var up={},Df={},C1=[],T1=[],cp=[],MI={},D1={},Ps={},fp={},cU=+new Date-0,fU=+new Date-0,M1="_echarts_instance_";function hU(r,e,t){var n=!(t&&t.ssr);if(n){var a=A1(r);if(a)return a}var i=new lp(r,e,t);return i.id="ec_"+cU++,Ps[i.id]=i,n&&dD(r,M1,i.id),TI(i),ya.trigger("afterinit",i),i}function vU(r){if(K(r)){var e=r;r=null,L(e,function(t){t.group!=null&&(r=t.group)}),r=r||"g_"+fU++,L(e,function(t){t.group=r})}return fp[r]=!0,r}function AI(r){fp[r]=!1}var dU=AI;function pU(r){ce(r)?r=Ps[r]:r instanceof lp||(r=A1(r)),r instanceof lp&&!r.isDisposed()&&r.dispose()}function A1(r){return Ps[u8(r,M1)]}function gU(r){return Ps[r]}function L1(r,e){MI[r]=e}function I1(r){Ne(T1,r)<0&&T1.push(r)}function P1(r,e){E1(C1,r,e,eU)}function LI(r){hp("afterinit",r)}function II(r){hp("afterupdate",r)}function hp(r,e){ya.on(r,e)}function ma(r,e,t){ye(e)&&(t=e,e="");var n=_e(r)?r.type:[r,r={event:e}][0];r.event=(r.event||n).toLowerCase(),e=r.event,!Df[e]&&(Dr(dI.test(n)&&dI.test(e)),up[n]||(up[n]={action:t,actionInfo:r}),Df[e]=n)}function PI(r,e){ru.register(r,e)}function yU(r){var e=ru.get(r);if(e)return e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice()}function EI(r,e){E1(cp,r,e,cI,"layout")}function vo(r,e){E1(cp,r,e,fI,"visual")}var OI=[];function E1(r,e,t,n,a){if((ye(e)||_e(e))&&(t=e,e=n),!(Ne(OI,t)>=0)){OI.push(t);var i=BL.wrapStageHandler(t,a);i.__prio=e,i.__raw=t,r.push(i)}}function O1(r,e){D1[r]=e}function mU(r){$T({createCanvas:r})}function RI(r,e,t){var n=uI("registerMap");n&&n(r,e,t)}function _U(r){var e=uI("getMap");return e&&e(r)}var NI=D9;vo(p1,K9),vo(ip,J9),vo(ip,e6),vo(p1,p6),vo(ip,g6),vo(hI,U6),I1(HA),P1(K6,o9),O1("default",t6),ma({type:ds,event:ds,update:ds},Ot),ma({type:vd,event:vd,update:vd},Ot),ma({type:jc,event:jc,update:jc},Ot),ma({type:dd,event:dd,update:dd},Ot),ma({type:Yc,event:Yc,update:Yc},Ot),L1("light",h6),L1("dark",v6);var bU={},kI=[],xU={registerPreprocessor:I1,registerProcessor:P1,registerPostInit:LI,registerPostUpdate:II,registerUpdateLifecycle:hp,registerAction:ma,registerCoordinateSystem:PI,registerLayout:EI,registerVisual:vo,registerTransform:NI,registerLoading:O1,registerMap:RI,registerImpl:Y6,PRIORITY:vI,ComponentModel:$e,ComponentView:wt,SeriesModel:yt,ChartView:ut,registerComponentModel:function(r){$e.registerClass(r)},registerComponentView:function(r){wt.registerClass(r)},registerSeriesModel:function(r){yt.registerClass(r)},registerChartView:function(r){ut.registerClass(r)},registerSubTypeDefaulter:function(r,e){$e.registerSubTypeDefaulter(r,e)},registerPainter:function(r,e){K2(r,e)}};function ke(r){if(K(r)){L(r,function(e){ke(e)});return}Ne(kI,r)>=0||(kI.push(r),ye(r)&&(r={install:r}),r.install(xU))}function Mf(r){return r==null?0:r.length||1}function BI(r){return r}var wU=function(){function r(e,t,n,a,i,o){this._old=e,this._new=t,this._oldKeyGetter=n||BI,this._newKeyGetter=a||BI,this.context=i,this._diffModeMultiple=o==="multiple"}return r.prototype.add=function(e){return this._add=e,this},r.prototype.update=function(e){return this._update=e,this},r.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},r.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},r.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},r.prototype.remove=function(e){return this._remove=e,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var e=this._old,t=this._new,n={},a=new Array(e.length),i=new Array(t.length);this._initIndexMap(e,null,a,"_oldKeyGetter"),this._initIndexMap(t,n,i,"_newKeyGetter");for(var o=0;o<e.length;o++){var s=a[o],l=n[s],u=Mf(l);if(u>1){var c=l.shift();l.length===1&&(n[s]=l[0]),this._update&&this._update(c,o)}else u===1?(n[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(i,n)},r.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},a={},i=[],o=[];this._initIndexMap(e,n,i,"_oldKeyGetter"),this._initIndexMap(t,a,o,"_newKeyGetter");for(var s=0;s<i.length;s++){var l=i[s],u=n[l],c=a[l],f=Mf(u),h=Mf(c);if(f>1&&h===1)this._updateManyToOne&&this._updateManyToOne(c,u),a[l]=null;else if(f===1&&h>1)this._updateOneToMany&&this._updateOneToMany(c,u),a[l]=null;else if(f===1&&h===1)this._update&&this._update(c,u),a[l]=null;else if(f>1&&h>1)this._updateManyToMany&&this._updateManyToMany(c,u),a[l]=null;else if(f>1)for(var v=0;v<f;v++)this._remove&&this._remove(u[v]);else this._remove&&this._remove(u)}this._performRestAdd(o,a)},r.prototype._performRestAdd=function(e,t){for(var n=0;n<e.length;n++){var a=e[n],i=t[a],o=Mf(i);if(o>1)for(var s=0;s<o;s++)this._add&&this._add(i[s]);else o===1&&this._add&&this._add(i);t[a]=null}},r.prototype._initIndexMap=function(e,t,n,a){for(var i=this._diffModeMultiple,o=0;o<e.length;o++){var s="_ec_"+this[a](e[o],o);if(i||(n[o]=s),!!t){var l=t[s],u=Mf(l);u===0?(t[s]=o,i&&n.push(s)):u===1?t[s]=[l,o]:l.push(o)}}},r}(),pi=wU,SU=function(){function r(e,t){this._encode=e,this._schema=t}return r.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},r.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},r}();function CU(r,e){var t={},n=t.encode={},a=ge(),i=[],o=[],s={};L(r.dimensions,function(h){var v=r.getDimensionInfo(h),d=v.coordDim;if(d){var p=v.coordDimIndex;R1(n,d)[p]=h,v.isExtraCoord||(a.set(d,1),TU(v.type)&&(i[0]=h),R1(s,d)[p]=r.getDimensionIndex(v.name)),v.defaultTooltip&&o.push(h)}bA.each(function(g,y){var m=R1(n,y),_=v.otherDims[y];_!=null&&_!==!1&&(m[_]=v.name)})});var l=[],u={};a.each(function(h,v){var d=n[v];u[v]=d[0],l=l.concat(d)}),t.dataDimsOnCoord=l,t.dataDimIndicesOnCoord=J(l,function(h){return r.getDimensionInfo(h).storeDimIndex}),t.encodeFirstDimNotExtra=u;var c=n.label;c&&c.length&&(i=c.slice());var f=n.tooltip;return f&&f.length?o=f.slice():o.length||(o=i.slice()),n.defaultedLabel=i,n.defaultedTooltip=o,t.userOutput=new SU(s,e),t}function R1(r,e){return r.hasOwnProperty(e)||(r[e]=[]),r[e]}function vp(r){return r==="category"?"ordinal":r==="time"?"time":"float"}function TU(r){return!(r==="ordinal"||r==="time")}var DU=function(){function r(e){this.otherDims={},e!=null&&Q(this,e)}return r}(),dp=DU,MU=Ye(),AU={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},zI=function(){function r(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return r.prototype.isDimensionOmitted=function(){return this._dimOmitted},r.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||(this._dimNameMap=$I(this.source)))},r.prototype.getSourceDimensionIndex=function(e){return Ee(this._dimNameMap.get(e),-1)},r.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},r.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=jA(this.source),n=!HI(e),a="",i=[],o=0,s=0;o<e;o++){var l=void 0,u=void 0,c=void 0,f=this.dimensions[s];if(f&&f.storeDimIndex===o)l=t?f.name:null,u=f.type,c=f.ordinalMeta,s++;else{var h=this.getSourceDimension(o);h&&(l=t?h.name:null,u=h.type)}i.push({property:l,type:u,ordinalMeta:c}),t&&l!=null&&(!f||!f.isCalculationCoord)&&(a+=n?l.replace(/\`/g,"`1").replace(/\$/g,"`2"):l),a+="$",a+=AU[u]||"f",c&&(a+=c.uid),a+="$"}var v=this.source,d=[v.seriesLayoutBy,v.startIndex,a].join("$$");return{dimensions:i,hash:d}},r.prototype.makeOutputDimensionNames=function(){for(var e=[],t=0,n=0;t<this._fullDimCount;t++){var a=void 0,i=this.dimensions[n];if(i&&i.storeDimIndex===t)i.isCalculationCoord||(a=i.name),n++;else{var o=this.getSourceDimension(t);o&&(a=o.name)}e.push(a)}return e},r.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},r}();function FI(r){return r instanceof zI}function VI(r){for(var e=ge(),t=0;t<(r||[]).length;t++){var n=r[t],a=_e(n)?n.name:n;a!=null&&e.get(a)==null&&e.set(a,t)}return e}function $I(r){var e=MU(r);return e.dimNameMap||(e.dimNameMap=VI(r.dimensionsDefine))}function HI(r){return r>30}var Af=_e,po=J,LU=typeof Int32Array=="undefined"?Array:Int32Array,IU="e\0\0",GI=-1,PU=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],EU=["_approximateExtent"],WI,pp,Lf,If,N1,gp,k1,OU=function(){function r(e,t){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var n,a=!1;FI(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(a=!0,n=e),n=n||["x","y"];for(var i={},o=[],s={},l=!1,u={},c=0;c<n.length;c++){var f=n[c],h=ce(f)?new dp({name:f}):f instanceof dp?f:new dp(f),v=h.name;h.type=h.type||"float",h.coordDim||(h.coordDim=v,h.coordDimIndex=0);var d=h.otherDims=h.otherDims||{};o.push(v),i[v]=h,u[v]!=null&&(l=!0),h.createInvertedIndices&&(s[v]=[]),d.itemName===0&&(this._nameDimIdx=c),d.itemId===0&&(this._idDimIdx=c),a&&(h.storeDimIndex=c)}if(this.dimensions=o,this._dimInfos=i,this._initGetDimensionInfo(l),this.hostModel=t,this._invertedIndicesMap=s,this._dimOmitted){var p=this._dimIdxToName=ge();L(o,function(g){p.set(i[g].storeDimIndex,g)})}}return r.prototype.getDimension=function(e){var t=this._recognizeDimIndex(e);if(t==null)return e;if(t=e,!this._dimOmitted)return this.dimensions[t];var n=this._dimIdxToName.get(t);if(n!=null)return n;var a=this._schema.getSourceDimension(t);if(a)return a.name},r.prototype.getDimensionIndex=function(e){var t=this._recognizeDimIndex(e);if(t!=null)return t;if(e==null)return-1;var n=this._getDimInfo(e);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},r.prototype._recognizeDimIndex=function(e){if(je(e)||e!=null&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},r.prototype._getStoreDimIndex=function(e){var t=this.getDimensionIndex(e);return t},r.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},r.prototype._initGetDimensionInfo=function(e){var t=this._dimInfos;this._getDimInfo=e?function(n){return t.hasOwnProperty(n)?t[n]:void 0}:function(n){return t[n]}},r.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},r.prototype.mapDimension=function(e,t){var n=this._dimSummary;if(t==null)return n.encodeFirstDimNotExtra[e];var a=n.encode[e];return a?a[t]:null},r.prototype.mapDimensionsAll=function(e){var t=this._dimSummary,n=t.encode[e];return(n||[]).slice()},r.prototype.getStore=function(){return this._store},r.prototype.initData=function(e,t,n){var a=this,i;if(e instanceof t1&&(i=e),!i){var o=this.dimensions,s=Y_(e)||pr(e)?new ZA(e,o.length):e;i=new t1;var l=po(o,function(u){return{type:a._dimInfos[u].type,property:u}});i.initData(s,l,n)}this._store=i,this._nameList=(t||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,i.count()),this._dimSummary=CU(this,this._schema),this.userOutput=this._dimSummary.userOutput},r.prototype.appendData=function(e){var t=this._store.appendData(e);this._doInit(t[0],t[1])},r.prototype.appendValues=function(e,t){var n=this._store.appendValues(e,t.length),a=n.start,i=n.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),t)for(var s=a;s<i;s++){var l=s-a;this._nameList[s]=t[l],o&&k1(this,s)}},r.prototype._updateOrdinalMeta=function(){for(var e=this._store,t=this.dimensions,n=0;n<t.length;n++){var a=this._dimInfos[t[n]];a.ordinalMeta&&e.collectOrdinalMeta(a.storeDimIndex,a.ordinalMeta)}},r.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return this._idDimIdx==null&&e.getSource().sourceFormat!==uo&&!e.fillStorage},r.prototype._doInit=function(e,t){if(!(e>=t)){var n=this._store,a=n.getProvider();this._updateOrdinalMeta();var i=this._nameList,o=this._idList,s=a.getSource().sourceFormat,l=s===$n;if(l&&!a.pure)for(var u=[],c=e;c<t;c++){var f=a.getItem(c,u);if(!this.hasItemOption&&XG(f)&&(this.hasItemOption=!0),f){var h=f.name;i[c]==null&&h!=null&&(i[c]=qt(h,null));var v=f.id;o[c]==null&&v!=null&&(o[c]=qt(v,null))}}if(this._shouldMakeIdFromName())for(var c=e;c<t;c++)k1(this,c);WI(this)}},r.prototype.getApproximateExtent=function(e){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e))},r.prototype.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},r.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},r.prototype.setCalculationInfo=function(e,t){Af(e)?Q(this._calculationInfo,e):this._calculationInfo[e]=t},r.prototype.getName=function(e){var t=this.getRawIndex(e),n=this._nameList[t];return n==null&&this._nameDimIdx!=null&&(n=Lf(this,this._nameDimIdx,t)),n==null&&(n=""),n},r.prototype._getCategory=function(e,t){var n=this._store.get(e,t),a=this._store.getOrdinalMeta(e);return a?a.categories[n]:n},r.prototype.getId=function(e){return pp(this,this.getRawIndex(e))},r.prototype.count=function(){return this._store.count()},r.prototype.get=function(e,t){var n=this._store,a=this._dimInfos[e];if(a)return n.get(a.storeDimIndex,t)},r.prototype.getByRawIndex=function(e,t){var n=this._store,a=this._dimInfos[e];if(a)return n.getByRawIndex(a.storeDimIndex,t)},r.prototype.getIndices=function(){return this._store.getIndices()},r.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e))},r.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},r.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},r.prototype.getValues=function(e,t){var n=this,a=this._store;return K(e)?a.getValues(po(e,function(i){return n._getStoreDimIndex(i)}),t):a.getValues(e)},r.prototype.hasValue=function(e){for(var t=this._dimSummary.dataDimIndicesOnCoord,n=0,a=t.length;n<a;n++)if(isNaN(this._store.get(t[n],e)))return!1;return!0},r.prototype.indexOfName=function(e){for(var t=0,n=this._store.count();t<n;t++)if(this.getName(t)===e)return t;return-1},r.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},r.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},r.prototype.rawIndexOf=function(e,t){var n=e&&this._invertedIndicesMap[e],a=n[t];return a==null||isNaN(a)?GI:a},r.prototype.indicesOfNearest=function(e,t,n){return this._store.indicesOfNearest(this._getStoreDimIndex(e),t,n)},r.prototype.each=function(e,t,n){ye(e)&&(n=t,t=e,e=[]);var a=n||this,i=po(If(e),this._getStoreDimIndex,this);this._store.each(i,a?fe(t,a):t)},r.prototype.filterSelf=function(e,t,n){ye(e)&&(n=t,t=e,e=[]);var a=n||this,i=po(If(e),this._getStoreDimIndex,this);return this._store=this._store.filter(i,a?fe(t,a):t),this},r.prototype.selectRange=function(e){var t=this,n={},a=Fe(e);return L(a,function(i){var o=t._getStoreDimIndex(i);n[o]=e[i]}),this._store=this._store.selectRange(n),this},r.prototype.mapArray=function(e,t,n){ye(e)&&(n=t,t=e,e=[]),n=n||this;var a=[];return this.each(e,function(){a.push(t&&t.apply(this,arguments))},n),a},r.prototype.map=function(e,t,n,a){var i=n||a||this,o=po(If(e),this._getStoreDimIndex,this),s=gp(this);return s._store=this._store.map(o,i?fe(t,i):t),s},r.prototype.modify=function(e,t,n,a){var i=n||a||this,o=po(If(e),this._getStoreDimIndex,this);this._store.modify(o,i?fe(t,i):t)},r.prototype.downSample=function(e,t,n,a){var i=gp(this);return i._store=this._store.downSample(this._getStoreDimIndex(e),t,n,a),i},r.prototype.lttbDownSample=function(e,t){var n=gp(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(e),t),n},r.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},r.prototype.getItemModel=function(e){var t=this.hostModel,n=this.getRawDataItem(e);return new lt(n,t,t&&t.ecModel)},r.prototype.diff=function(e){var t=this;return new pi(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(n){return pp(e,n)},function(n){return pp(t,n)})},r.prototype.getVisual=function(e){var t=this._visual;return t&&t[e]},r.prototype.setVisual=function(e,t){this._visual=this._visual||{},Af(e)?Q(this._visual,e):this._visual[e]=t},r.prototype.getItemVisual=function(e,t){var n=this._itemVisuals[e],a=n&&n[t];return a==null?this.getVisual(t):a},r.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},r.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,a=n[e];a||(a=n[e]={});var i=a[t];return i==null&&(i=this.getVisual(t),K(i)?i=i.slice():Af(i)&&(i=Q({},i)),a[t]=i),i},r.prototype.setItemVisual=function(e,t,n){var a=this._itemVisuals[e]||{};this._itemVisuals[e]=a,Af(t)?Q(a,t):a[t]=n},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(e,t){Af(e)?Q(this._layout,e):this._layout[e]=t},r.prototype.getLayout=function(e){return this._layout[e]},r.prototype.getItemLayout=function(e){return this._itemLayouts[e]},r.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?Q(this._itemLayouts[e]||{},t):t},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(e,t){var n=this.hostModel&&this.hostModel.seriesIndex;e_(n,this.dataType,e,t),this._graphicEls[e]=t},r.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},r.prototype.eachItemGraphicEl=function(e,t){L(this._graphicEls,function(n,a){n&&e&&e.call(t,n,a)})},r.prototype.cloneShallow=function(e){return e||(e=new r(this._schema?this._schema:po(this.dimensions,this._getDimInfo,this),this.hostModel)),N1(e,this),e._store=this._store,e},r.prototype.wrapMethod=function(e,t){var n=this[e];!ye(n)||(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var a=n.apply(this,arguments);return t.apply(this,[a].concat(Mv(arguments)))})},r.internalField=function(){WI=function(e){var t=e._invertedIndicesMap;L(t,function(n,a){var i=e._dimInfos[a],o=i.ordinalMeta,s=e._store;if(o){n=t[a]=new LU(o.categories.length);for(var l=0;l<n.length;l++)n[l]=GI;for(var l=0;l<s.count();l++)n[s.get(i.storeDimIndex,l)]=l}})},Lf=function(e,t,n){return qt(e._getCategory(t,n),null)},pp=function(e,t){var n=e._idList[t];return n==null&&e._idDimIdx!=null&&(n=Lf(e,e._idDimIdx,t)),n==null&&(n=IU+t),n},If=function(e){return K(e)||(e=e!=null?[e]:[]),e},gp=function(e){var t=new r(e._schema?e._schema:po(e.dimensions,e._getDimInfo,e),e.hostModel);return N1(t,e),t},N1=function(e,t){L(PU.concat(t.__wrappedMethods||[]),function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e.__wrappedMethods=t.__wrappedMethods,L(EU,function(n){e[n]=we(t[n])}),e._calculationInfo=Q({},t._calculationInfo)},k1=function(e,t){var n=e._nameList,a=e._idList,i=e._nameDimIdx,o=e._idDimIdx,s=n[t],l=a[t];if(s==null&&i!=null&&(n[t]=s=Lf(e,i,t)),l==null&&o!=null&&(a[t]=l=Lf(e,o,t)),l==null&&s!=null){var u=e._nameRepeatCount,c=u[s]=(u[s]||0)+1;l=s,c>1&&(l+="__ec__"+c),a[t]=l}}}(),r}(),Er=OU;function RU(r,e){return hu(r,e).dimensions}function hu(r,e){Y_(r)||(r=Z_(r)),e=e||{};var t=e.coordDimensions||[],n=e.dimensionsDefine||r.dimensionsDefine||[],a=ge(),i=[],o=kU(r,t,n,e.dimensionsCount),s=e.canOmitUnusedDimensions&&HI(o),l=n===r.dimensionsDefine,u=l?$I(r):VI(n),c=e.encodeDefine;!c&&e.encodeDefaulter&&(c=e.encodeDefaulter(r,o));for(var f=ge(c),h=new sL(o),v=0;v<h.length;v++)h[v]=-1;function d(D){var M=h[D];if(M<0){var A=n[D],I=_e(A)?A:{name:A},P=new dp,E=I.name;E!=null&&u.get(E)!=null&&(P.name=P.displayName=E),I.type!=null&&(P.type=I.type),I.displayName!=null&&(P.displayName=I.displayName);var O=i.length;return h[D]=O,P.storeDimIndex=D,i.push(P),P}return i[M]}if(!s)for(var v=0;v<o;v++)d(v);f.each(function(D,M){var A=st(D).slice();if(A.length===1&&!ce(A[0])&&A[0]<0){f.set(M,!1);return}var I=f.set(M,[]);L(A,function(P,E){var O=ce(P)?u.get(P):P;O!=null&&O<o&&(I[E]=O,g(d(O),M,E))})});var p=0;L(t,function(D){var M,A,I,P;if(ce(D))M=D,P={};else{P=D,M=P.name;var E=P.ordinalMeta;P.ordinalMeta=null,P=Q({},P),P.ordinalMeta=E,A=P.dimsDef,I=P.otherDims,P.name=P.coordDim=P.coordDimIndex=P.dimsDef=P.otherDims=null}var O=f.get(M);if(O!==!1){if(O=st(O),!O.length)for(var N=0;N<(A&&A.length||1);N++){for(;p<o&&d(p).coordDim!=null;)p++;p<o&&O.push(p++)}L(O,function(V,$){var U=d(V);if(l&&P.type!=null&&(U.type=P.type),g(me(U,P),M,$),U.name==null&&A){var Y=A[$];!_e(Y)&&(Y={name:Y}),U.name=U.displayName=Y.name,U.defaultTooltip=Y.defaultTooltip}I&&me(U.otherDims,I)})}});function g(D,M,A){bA.get(M)!=null?D.otherDims[M]=A:(D.coordDim=M,D.coordDimIndex=A,a.set(M,!0))}var y=e.generateCoord,m=e.generateCoordCount,_=m!=null;m=y?m||1:0;var b=y||"value";function w(D){D.name==null&&(D.name=D.coordDim)}if(s)L(i,function(D){w(D)}),i.sort(function(D,M){return D.storeDimIndex-M.storeDimIndex});else for(var x=0;x<o;x++){var S=d(x),T=S.coordDim;T==null&&(S.coordDim=BU(b,a,_),S.coordDimIndex=0,(!y||m<=0)&&(S.isExtraCoord=!0),m--),w(S),S.type==null&&(CA(r,x)===mr.Must||S.isExtraCoord&&(S.otherDims.itemName!=null||S.otherDims.seriesName!=null))&&(S.type="ordinal")}return NU(i),new zI({source:r,dimensions:i,fullDimensionCount:o,dimensionOmitted:s})}function NU(r){for(var e=ge(),t=0;t<r.length;t++){var n=r[t],a=n.name,i=e.get(a)||0;i>0&&(n.name=a+(i-1)),i++,e.set(a,i)}}function kU(r,e,t,n){var a=Math.max(r.dimensionsDetectedCount||1,e.length,t.length,n||0);return L(e,function(i){var o;_e(i)&&(o=i.dimsDef)&&(a=Math.max(a,o.length))}),a}function BU(r,e,t){if(t||e.hasKey(r)){for(var n=0;e.hasKey(r+n);)n++;r+=n}return e.set(r,!0),r}var zU=function(){function r(e){this.coordSysDims=[],this.axisMap=ge(),this.categoryAxisMap=ge(),this.coordSysName=e}return r}();function FU(r){var e=r.get("coordinateSystem"),t=new zU(e),n=VU[e];if(n)return n(r,t,t.axisMap,t.categoryAxisMap),t}var VU={cartesian2d:function(r,e,t,n){var a=r.getReferringComponents("xAxis",$t).models[0],i=r.getReferringComponents("yAxis",$t).models[0];e.coordSysDims=["x","y"],t.set("x",a),t.set("y",i),vu(a)&&(n.set("x",a),e.firstCategoryDimIndex=0),vu(i)&&(n.set("y",i),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(r,e,t,n){var a=r.getReferringComponents("singleAxis",$t).models[0];e.coordSysDims=["single"],t.set("single",a),vu(a)&&(n.set("single",a),e.firstCategoryDimIndex=0)},polar:function(r,e,t,n){var a=r.getReferringComponents("polar",$t).models[0],i=a.findAxisModel("radiusAxis"),o=a.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],t.set("radius",i),t.set("angle",o),vu(i)&&(n.set("radius",i),e.firstCategoryDimIndex=0),vu(o)&&(n.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(r,e,t,n){e.coordSysDims=["lng","lat"]},parallel:function(r,e,t,n){var a=r.ecModel,i=a.getComponent("parallel",r.get("parallelIndex")),o=e.coordSysDims=i.dimensions.slice();L(i.parallelAxisIndex,function(s,l){var u=a.getComponent("parallelAxis",s),c=o[l];t.set(c,u),vu(u)&&(n.set(c,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})}};function vu(r){return r.get("type")==="category"}function UI(r,e,t){t=t||{};var n=t.byIndex,a=t.stackedCoordDimension,i,o,s;$U(e)?i=e:(o=e.schema,i=o.dimensions,s=e.store);var l=!!(r&&r.get("stack")),u,c,f,h;if(L(i,function(m,_){ce(m)&&(i[_]=m={name:m}),l&&!m.isExtraCoord&&(!n&&!u&&m.ordinalMeta&&(u=m),!c&&m.type!=="ordinal"&&m.type!=="time"&&(!a||a===m.coordDim)&&(c=m))}),c&&!n&&!u&&(n=!0),c){f="__\0ecstackresult_"+r.id,h="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var v=c.coordDim,d=c.type,p=0;L(i,function(m){m.coordDim===v&&p++});var g={name:f,coordDim:v,coordDimIndex:p,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},y={name:h,coordDim:h,coordDimIndex:p+1,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(h,d),y.storeDimIndex=s.ensureCalculationDimension(f,d)),o.appendCalculationDimension(g),o.appendCalculationDimension(y)):(i.push(g),i.push(y))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:h,stackResultDimension:f}}function $U(r){return!FI(r.schema)}function gi(r,e){return!!e&&e===r.getCalculationInfo("stackedDimension")}function B1(r,e){return gi(r,e)?r.getCalculationInfo("stackResultDimension"):e}function HU(r,e){var t=r.get("coordinateSystem"),n=ru.get(t),a;return e&&e.coordSysDims&&(a=J(e.coordSysDims,function(i){var o={name:i},s=e.axisMap.get(i);if(s){var l=s.get("type");o.type=vp(l)}return o})),a||(a=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),a}function GU(r,e,t){var n,a;return t&&L(r,function(i,o){var s=i.coordDim,l=t.categoryAxisMap.get(s);l&&(n==null&&(n=o),i.ordinalMeta=l.getOrdinalMeta(),e&&(i.createInvertedIndices=!0)),i.otherDims.itemName!=null&&(a=!0)}),!a&&n!=null&&(r[n].otherDims.itemName=0),n}function Wa(r,e,t){t=t||{};var n=e.getSourceManager(),a,i=!1;r?(i=!0,a=Z_(r)):(a=n.getSource(),i=a.sourceFormat===$n);var o=FU(e),s=HU(e,o),l=t.useEncodeDefaulter,u=ye(l)?l:l?Ae(SA,s,e):null,c={coordDimensions:s,generateCoord:t.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!i},f=hu(a,c),h=GU(f.dimensions,t.createInvertedIndices,o),v=i?null:n.getSharedDataStore(f),d=UI(e,{schema:f,store:v}),p=new Er(f,e);p.setCalculationInfo(d);var g=h!=null&&WU(a)?function(y,m,_,b){return b===h?_:this.defaultDimValueGetter(y,m,_,b)}:null;return p.hasItemOption=!1,p.initData(i?a:v,null,g),p}function WU(r){if(r.sourceFormat===$n){var e=UU(r.data||[]);return!K(kl(e))}}function UU(r){for(var e=0;e<r.length&&r[e]==null;)e++;return r[e]}var jI=function(){function r(e){this._setting=e||{},this._extent=[1/0,-1/0]}return r.prototype.getSetting=function(e){return this._setting[e]},r.prototype.unionExtent=function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1])},r.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(t)||(n[1]=t)},r.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(e){this._isBlank=e},r}();ad(jI);var yi=jI,jU=0,YU=function(){function r(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++jU}return r.createByAxisModel=function(e){var t=e.option,n=t.data,a=n&&J(n,qU);return new r({categories:a,needCollect:!a,deduplication:t.dedplication!==!1})},r.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},r.prototype.parseAndCollect=function(e){var t,n=this._needCollect;if(!ce(e)&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var a=this._getOrCreateMap();return t=a.get(e),t==null&&(n?(t=this.categories.length,this.categories[t]=e,a.set(e,t)):t=NaN),t},r.prototype._getOrCreateMap=function(){return this._map||(this._map=ge(this.categories))},r}();function qU(r){return _e(r)&&r.value!=null?r.value:r+""}var z1=YU;function F1(r){return r.type==="interval"||r.type==="log"}function ZU(r,e,t,n){var a={},i=r[1]-r[0],o=a.interval=P0(i/e,!0);t!=null&&o<t&&(o=a.interval=t),n!=null&&o>n&&(o=a.interval=n);var s=a.intervalPrecision=YI(o),l=a.niceTickExtent=[At(Math.ceil(r[0]/o)*o,s),At(Math.floor(r[1]/o)*o,s)];return XU(l,r),a}function V1(r){var e=Math.pow(10,rd(r)),t=r/e;return t?t===2?t=3:t===3?t=5:t*=2:t=1,At(t*e)}function YI(r){return fa(r)+2}function qI(r,e,t){r[e]=Math.max(Math.min(r[e],t[1]),t[0])}function XU(r,e){!isFinite(r[0])&&(r[0]=e[0]),!isFinite(r[1])&&(r[1]=e[1]),qI(r,0,e),qI(r,1,e),r[0]>r[1]&&(r[0]=r[1])}function yp(r,e){return r>=e[0]&&r<=e[1]}function mp(r,e){return e[1]===e[0]?.5:(r-e[0])/(e[1]-e[0])}function _p(r,e){return r*(e[1]-e[0])+e[0]}var ZI=function(r){j(e,r);function e(t){var n=r.call(this,t)||this;n.type="ordinal";var a=n.getSetting("ordinalMeta");return a||(a=new z1({})),K(a)&&(a=new z1({categories:J(a,function(i){return _e(i)?i.value:i})})),n._ordinalMeta=a,n._extent=n.getSetting("extent")||[0,a.categories.length-1],n}return e.prototype.parse=function(t){return t==null?NaN:ce(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return t=this.parse(t),yp(t,this._extent)&&this._ordinalMeta.categories[t]!=null},e.prototype.normalize=function(t){return t=this._getTickNumber(this.parse(t)),mp(t,this._extent)},e.prototype.scale=function(t){return t=Math.round(_p(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],n=this._extent,a=n[0];a<=n[1];)t.push({value:a}),a++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(t==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var n=t.ordinalNumbers,a=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,n.length);o<l;++o){var u=n[o];a[o]=u,i[u]=o}for(var c=0;o<s;++o){for(;i[c]!=null;)c++;a.push(c),i[c]=o}},e.prototype._getTickNumber=function(t){var n=this._ticksByOrdinalNumber;return n&&t>=0&&t<n.length?n[t]:t},e.prototype.getRawOrdinalNumber=function(t){var n=this._ordinalNumbersByTick;return n&&t>=0&&t<n.length?n[t]:t},e.prototype.getLabel=function(t){if(!this.isBlank()){var n=this.getRawOrdinalNumber(t.value),a=this._ordinalMeta.categories[n];return a==null?"":a+""}},e.prototype.count=function(){return this._extent[1]-this._extent[0]+1},e.prototype.unionExtentFromData=function(t,n){this.unionExtent(t.getApproximateExtent(n))},e.prototype.isInExtentRange=function(t){return t=this._getTickNumber(t),this._extent[0]<=t&&this._extent[1]>=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(yi);yi.registerClass(ZI);var $1=ZI,Es=At,XI=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return yp(t,this._extent)},e.prototype.normalize=function(t){return mp(t,this._extent)},e.prototype.scale=function(t){return _p(t,this._extent)},e.prototype.setExtent=function(t,n){var a=this._extent;isNaN(t)||(a[0]=parseFloat(t)),isNaN(n)||(a[1]=parseFloat(n))},e.prototype.unionExtent=function(t){var n=this._extent;t[0]<n[0]&&(n[0]=t[0]),t[1]>n[1]&&(n[1]=t[1]),this.setExtent(n[0],n[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=YI(t)},e.prototype.getTicks=function(t){var n=this._interval,a=this._extent,i=this._niceExtent,o=this._intervalPrecision,s=[];if(!n)return s;var l=1e4;a[0]<i[0]&&(t?s.push({value:Es(i[0]-n,o)}):s.push({value:a[0]}));for(var u=i[0];u<=i[1]&&(s.push({value:u}),u=Es(u+n,o),u!==s[s.length-1].value);)if(s.length>l)return[];var c=s.length?s[s.length-1].value:i[1];return a[1]>c&&(t?s.push({value:Es(c+n,o)}):s.push({value:a[1]})),s},e.prototype.getMinorTicks=function(t){for(var n=this.getTicks(!0),a=[],i=this.getExtent(),o=1;o<n.length;o++){for(var s=n[o],l=n[o-1],u=0,c=[],f=s.value-l.value,h=f/t;u<t-1;){var v=Es(l.value+(u+1)*h);v>i[0]&&v<i[1]&&c.push(v),u++}a.push(c)}return a},e.prototype.getLabel=function(t,n){if(t==null)return"";var a=n&&n.precision;a==null?a=fa(t.value)||0:a==="auto"&&(a=this._intervalPrecision);var i=Es(t.value,a,!0);return O_(i)},e.prototype.calcNiceTicks=function(t,n,a){t=t||5;var i=this._extent,o=i[1]-i[0];if(!!isFinite(o)){o<0&&(o=-o,i.reverse());var s=ZU(i,t,n,a);this._intervalPrecision=s.intervalPrecision,this._interval=s.interval,this._niceExtent=s.niceTickExtent}},e.prototype.calcNiceExtent=function(t){var n=this._extent;if(n[0]===n[1])if(n[0]!==0){var a=Math.abs(n[0]);t.fixMax||(n[1]+=a/2),n[0]-=a/2}else n[1]=1;var i=n[1]-n[0];isFinite(i)||(n[0]=0,n[1]=1),this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval);var o=this._interval;t.fixMin||(n[0]=Es(Math.floor(n[0]/o)*o)),t.fixMax||(n[1]=Es(Math.ceil(n[1]/o)*o))},e.prototype.setNiceExtent=function(t,n){this._niceExtent=[t,n]},e.type="interval",e}(yi);yi.registerClass(XI);var go=XI,QI=typeof Float32Array!="undefined",QU=QI?Float32Array:Array;function Ua(r){return K(r)?QI?new Float32Array(r):r:new QU(r)}var H1="__ec_stack_";function G1(r){return r.get("stack")||H1+r.seriesIndex}function W1(r){return r.dim+r.index}function KU(r){var e=[],t=r.axis,n="axis0";if(t.type==="category"){for(var a=t.getBandWidth(),i=0;i<r.count;i++)e.push(me({bandWidth:a,axisKey:n,stackId:H1+i},r));for(var o=eP(e),s=[],i=0;i<r.count;i++){var l=o[n][H1+i];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}}function KI(r,e){var t=[];return e.eachSeriesByType(r,function(n){nP(n)&&t.push(n)}),t}function JU(r){var e={};L(r,function(l){var u=l.coordinateSystem,c=u.getBaseAxis();if(!(c.type!=="time"&&c.type!=="value"))for(var f=l.getData(),h=c.dim+"_"+c.index,v=f.getDimensionIndex(f.mapDimension(c.dim)),d=f.getStore(),p=0,g=d.count();p<g;++p){var y=d.get(v,p);e[h]?e[h].push(y):e[h]=[y]}});var t={};for(var n in e)if(e.hasOwnProperty(n)){var a=e[n];if(a){a.sort(function(l,u){return l-u});for(var i=null,o=1;o<a.length;++o){var s=a[o]-a[o-1];s>0&&(i=i===null?s:Math.min(i,s))}t[n]=i}}return t}function JI(r){var e=JU(r),t=[];return L(r,function(n){var a=n.coordinateSystem,i=a.getBaseAxis(),o=i.getExtent(),s;if(i.type==="category")s=i.getBandWidth();else if(i.type==="value"||i.type==="time"){var l=i.dim+"_"+i.index,u=e[l],c=Math.abs(o[1]-o[0]),f=i.scale.getExtent(),h=Math.abs(f[1]-f[0]);s=u?c/h*u:c}else{var v=n.getData();s=Math.abs(o[1]-o[0])/v.count()}var d=le(n.get("barWidth"),s),p=le(n.get("barMaxWidth"),s),g=le(n.get("barMinWidth")||(aP(n)?.5:1),s),y=n.get("barGap"),m=n.get("barCategoryGap");t.push({bandWidth:s,barWidth:d,barMaxWidth:p,barMinWidth:g,barGap:y,barCategoryGap:m,axisKey:W1(i),stackId:G1(n)})}),eP(t)}function eP(r){var e={};L(r,function(n,a){var i=n.axisKey,o=n.bandWidth,s=e[i]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},l=s.stacks;e[i]=s;var u=n.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var c=n.barWidth;c&&!l[u].width&&(l[u].width=c,c=Math.min(s.remainedWidth,c),s.remainedWidth-=c);var f=n.barMaxWidth;f&&(l[u].maxWidth=f);var h=n.barMinWidth;h&&(l[u].minWidth=h);var v=n.barGap;v!=null&&(s.gap=v);var d=n.barCategoryGap;d!=null&&(s.categoryGap=d)});var t={};return L(e,function(n,a){t[a]={};var i=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=Fe(i).length;s=Math.max(35-l*4,15)+"%"}var u=le(s,o),c=le(n.gap,1),f=n.remainedWidth,h=n.autoWidthCount,v=(f-u)/(h+(h-1)*c);v=Math.max(v,0),L(i,function(y){var m=y.maxWidth,_=y.minWidth;if(y.width){var b=y.width;m&&(b=Math.min(b,m)),_&&(b=Math.max(b,_)),y.width=b,f-=b+c*b,h--}else{var b=v;m&&m<b&&(b=Math.min(m,f)),_&&_>b&&(b=_),b!==v&&(y.width=b,f-=b+c*b,h--)}}),v=(f-u)/(h+(h-1)*c),v=Math.max(v,0);var d=0,p;L(i,function(y,m){y.width||(y.width=v),p=y,d+=y.width*(1+c)}),p&&(d-=p.width*c);var g=-d/2;L(i,function(y,m){t[a][m]=t[a][m]||{bandWidth:o,offset:g,width:y.width},g+=y.width*(1+c)})}),t}function ej(r,e,t){if(r&&e){var n=r[W1(e)];return n!=null&&t!=null?n[G1(t)]:n}}function tP(r,e){var t=KI(r,e),n=JI(t);L(t,function(a){var i=a.getData(),o=a.coordinateSystem,s=o.getBaseAxis(),l=G1(a),u=n[W1(s)][l],c=u.offset,f=u.width;i.setLayout({bandWidth:u.bandWidth,offset:c,size:f})})}function rP(r){return{seriesType:r,plan:iu(),reset:function(e){if(!!nP(e)){var t=e.getData(),n=e.coordinateSystem,a=n.getBaseAxis(),i=n.getOtherAxis(a),o=t.getDimensionIndex(t.mapDimension(i.dim)),s=t.getDimensionIndex(t.mapDimension(a.dim)),l=e.get("showBackground",!0),u=t.mapDimension(i.dim),c=t.getCalculationInfo("stackResultDimension"),f=gi(t,u)&&!!t.getCalculationInfo("stackedOnSeries"),h=i.isHorizontal(),v=tj(a,i),d=aP(e),p=e.get("barMinHeight")||0,g=c&&t.getDimensionIndex(c),y=t.getLayout("size"),m=t.getLayout("offset");return{progress:function(_,b){for(var w=_.count,x=d&&Ua(w*3),S=d&&l&&Ua(w*3),T=d&&Ua(w),D=n.master.getRect(),M=h?D.width:D.height,A,I=b.getStore(),P=0;(A=_.next())!=null;){var E=I.get(f?g:o,A),O=I.get(s,A),N=v,V=void 0;f&&(V=+E-I.get(o,A));var $=void 0,U=void 0,Y=void 0,ae=void 0;if(h){var H=n.dataToPoint([E,O]);if(f){var q=n.dataToPoint([V,O]);N=q[0]}$=N,U=H[1]+m,Y=H[0]-N,ae=y,Math.abs(Y)<p&&(Y=(Y<0?-1:1)*p)}else{var H=n.dataToPoint([O,E]);if(f){var q=n.dataToPoint([O,V]);N=q[1]}$=H[0]+m,U=N,Y=y,ae=H[1]-N,Math.abs(ae)<p&&(ae=(ae<=0?-1:1)*p)}d?(x[P]=$,x[P+1]=U,x[P+2]=h?Y:ae,S&&(S[P]=h?D.x:$,S[P+1]=h?U:D.y,S[P+2]=M),T[A]=A):b.setItemLayout(A,{x:$,y:U,width:Y,height:ae}),P+=3}d&&b.setLayout({largePoints:x,largeDataIndices:T,largeBackgroundPoints:S,valueAxisHorizontal:h})}}}}}}function nP(r){return r.coordinateSystem&&r.coordinateSystem.type==="cartesian2d"}function aP(r){return r.pipelineContext&&r.pipelineContext.large}function tj(r,e){return e.toGlobalCoord(e.dataToCoord(e.type==="log"?1:0))}var rj=function(r,e,t,n){for(;t<n;){var a=t+n>>>1;r[a][1]<e?t=a+1:n=a}return t},iP=function(r){j(e,r);function e(t){var n=r.call(this,t)||this;return n.type="time",n}return e.prototype.getLabel=function(t){var n=this.getSetting("useUTC");return uf(t.value,iA[x7(Xl(this._minLevelUnit))]||iA.second,n,this.getSetting("locale"))},e.prototype.getFormattedLabel=function(t,n,a){var i=this.getSetting("useUTC"),o=this.getSetting("locale");return w7(t,n,a,o,i)},e.prototype.getTicks=function(){var t=this._interval,n=this._extent,a=[];if(!t)return a;a.push({value:n[0],level:0});var i=this.getSetting("useUTC"),o=uj(this._minLevelUnit,this._approxInterval,i,n);return a=a.concat(o),a.push({value:n[1],level:0}),a},e.prototype.calcNiceExtent=function(t){var n=this._extent;if(n[0]===n[1]&&(n[0]-=Vn,n[1]+=Vn),n[1]===-1/0&&n[0]===1/0){var a=new Date;n[1]=+new Date(a.getFullYear(),a.getMonth(),a.getDate()),n[0]=n[1]-Vn}this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval)},e.prototype.calcNiceTicks=function(t,n,a){t=t||10;var i=this._extent,o=i[1]-i[0];this._approxInterval=o/t,n!=null&&this._approxInterval<n&&(this._approxInterval=n),a!=null&&this._approxInterval>a&&(this._approxInterval=a);var s=bp.length,l=Math.min(rj(bp,this._approxInterval,0,s),s-1);this._interval=bp[l][1],this._minLevelUnit=bp[Math.max(l-1,0)][0]},e.prototype.parse=function(t){return je(t)?t:+bn(t)},e.prototype.contain=function(t){return yp(this.parse(t),this._extent)},e.prototype.normalize=function(t){return mp(this.parse(t),this._extent)},e.prototype.scale=function(t){return _p(t,this._extent)},e.type="time",e}(go),bp=[["second",L_],["minute",I_],["hour",sf],["quarter-day",sf*6],["half-day",sf*12],["day",Vn*1.2],["half-week",Vn*3.5],["week",Vn*7],["month",Vn*31],["quarter",Vn*95],["half-year",aA/2],["year",aA]];function nj(r,e,t,n){var a=bn(e),i=bn(t),o=function(d){return lA(a,d,n)===lA(i,d,n)},s=function(){return o("year")},l=function(){return s()&&o("month")},u=function(){return l()&&o("day")},c=function(){return u()&&o("hour")},f=function(){return c()&&o("minute")},h=function(){return f()&&o("second")},v=function(){return h()&&o("millisecond")};switch(r){case"year":return s();case"month":return l();case"day":return u();case"hour":return c();case"minute":return f();case"second":return h();case"millisecond":return v()}}function aj(r,e){return r/=Vn,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function ij(r){var e=30*Vn;return r/=e,r>6?6:r>3?3:r>2?2:1}function oj(r){return r/=sf,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function oP(r,e){return r/=e?I_:L_,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function sj(r){return P0(r,!0)}function lj(r,e,t){var n=new Date(r);switch(Xl(e)){case"year":case"month":n[uA(t)](0);case"day":n[cA(t)](1);case"hour":n[fA(t)](0);case"minute":n[hA(t)](0);case"second":n[vA(t)](0),n[dA(t)](0)}return n.getTime()}function uj(r,e,t,n){var a=1e4,i=oA,o=0;function s(M,A,I,P,E,O,N){for(var V=new Date(A),$=A,U=V[P]();$<I&&$<=n[1];)N.push({value:$}),U+=M,V[E](U),$=V.getTime();N.push({value:$,notAdd:!0})}function l(M,A,I){var P=[],E=!A.length;if(!nj(Xl(M),n[0],n[1],t)){E&&(A=[{value:lj(new Date(n[0]),M,t)},{value:n[1]}]);for(var O=0;O<A.length-1;O++){var N=A[O].value,V=A[O+1].value;if(N!==V){var $=void 0,U=void 0,Y=void 0,ae=!1;switch(M){case"year":$=Math.max(1,Math.round(e/Vn/365)),U=E_(t),Y=S7(t);break;case"half-year":case"quarter":case"month":$=ij(e),U=Ql(t),Y=uA(t);break;case"week":case"half-week":case"day":$=aj(e),U=kd(t),Y=cA(t),ae=!0;break;case"half-day":case"quarter-day":case"hour":$=oj(e),U=cf(t),Y=fA(t);break;case"minute":$=oP(e,!0),U=Bd(t),Y=hA(t);break;case"second":$=oP(e,!1),U=zd(t),Y=vA(t);break;case"millisecond":$=sj(e),U=Fd(t),Y=dA(t);break}s($,N,V,U,Y,ae,P),M==="year"&&I.length>1&&O===0&&I.unshift({value:I[0].value-$})}}for(var O=0;O<P.length;O++)I.push(P[O]);return P}}for(var u=[],c=[],f=0,h=0,v=0;v<i.length&&o++<a;++v){var d=Xl(i[v]);if(!!b7(i[v])){l(i[v],u[u.length-1]||[],c);var p=i[v+1]?Xl(i[v+1]):null;if(d!==p){if(c.length){h=f,c.sort(function(M,A){return M.value-A.value});for(var g=[],y=0;y<c.length;++y){var m=c[y].value;(y===0||c[y-1].value!==m)&&(g.push(c[y]),m>=n[0]&&m<=n[1]&&f++)}var _=(n[1]-n[0])/e;if(f>_*1.5&&h>_/1.5||(u.push(g),f>_||r===i[v]))break}c=[]}}}for(var b=nt(J(u,function(M){return nt(M,function(A){return A.value>=n[0]&&A.value<=n[1]&&!A.notAdd})}),function(M){return M.length>0}),w=[],x=b.length-1,v=0;v<b.length;++v)for(var S=b[v],T=0;T<S.length;++T)w.push({value:S[T].value,level:x-v});w.sort(function(M,A){return M.value-A.value});for(var D=[],v=0;v<w.length;++v)(v===0||w[v].value!==w[v-1].value)&&D.push(w[v]);return D}yi.registerClass(iP);var sP=iP,lP=yi.prototype,Pf=go.prototype,cj=At,fj=Math.floor,hj=Math.ceil,xp=Math.pow,_a=Math.log,U1=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="log",t.base=10,t._originalScale=new go,t._interval=0,t}return e.prototype.getTicks=function(t){var n=this._originalScale,a=this._extent,i=n.getExtent(),o=Pf.getTicks.call(this,t);return J(o,function(s){var l=s.value,u=At(xp(this.base,l));return u=l===a[0]&&this._fixMin?wp(u,i[0]):u,u=l===a[1]&&this._fixMax?wp(u,i[1]):u,{value:u}},this)},e.prototype.setExtent=function(t,n){var a=_a(this.base);t=_a(Math.max(0,t))/a,n=_a(Math.max(0,n))/a,Pf.setExtent.call(this,t,n)},e.prototype.getExtent=function(){var t=this.base,n=lP.getExtent.call(this);n[0]=xp(t,n[0]),n[1]=xp(t,n[1]);var a=this._originalScale,i=a.getExtent();return this._fixMin&&(n[0]=wp(n[0],i[0])),this._fixMax&&(n[1]=wp(n[1],i[1])),n},e.prototype.unionExtent=function(t){this._originalScale.unionExtent(t);var n=this.base;t[0]=_a(t[0])/_a(n),t[1]=_a(t[1])/_a(n),lP.unionExtent.call(this,t)},e.prototype.unionExtentFromData=function(t,n){this.unionExtent(t.getApproximateExtent(n))},e.prototype.calcNiceTicks=function(t){t=t||10;var n=this._extent,a=n[1]-n[0];if(!(a===1/0||a<=0)){var i=nD(a),o=t/a*i;for(o<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var s=[At(hj(n[0]/i)*i),At(fj(n[1]/i)*i)];this._interval=i,this._niceExtent=s}},e.prototype.calcNiceExtent=function(t){Pf.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return t=_a(t)/_a(this.base),yp(t,this._extent)},e.prototype.normalize=function(t){return t=_a(t)/_a(this.base),mp(t,this._extent)},e.prototype.scale=function(t){return t=_p(t,this._extent),xp(this.base,t)},e.type="log",e}(yi),uP=U1.prototype;uP.getMinorTicks=Pf.getMinorTicks,uP.getLabel=Pf.getLabel;function wp(r,e){return cj(r,fa(e))}yi.registerClass(U1);var vj=U1,dj=function(){function r(e,t,n){this._prepareParams(e,t,n)}return r.prototype._prepareParams=function(e,t,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var a=this._isOrdinal=e.type==="ordinal";this._needCrossZero=e.type==="interval"&&t.getNeedCrossZero&&t.getNeedCrossZero();var i=this._modelMinRaw=t.get("min",!0);ye(i)?this._modelMinNum=Sp(e,i({min:n[0],max:n[1]})):i!=="dataMin"&&(this._modelMinNum=Sp(e,i));var o=this._modelMaxRaw=t.get("max",!0);if(ye(o)?this._modelMaxNum=Sp(e,o({min:n[0],max:n[1]})):o!=="dataMax"&&(this._modelMaxNum=Sp(e,o)),a)this._axisDataLen=t.getCategories().length;else{var s=t.get("boundaryGap"),l=K(s)?s:[s||0,s||0];typeof l[0]=="boolean"||typeof l[1]=="boolean"?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[ca(l[0],1),ca(l[1],1)]}},r.prototype.calculate=function(){var e=this._isOrdinal,t=this._dataMin,n=this._dataMax,a=this._axisDataLen,i=this._boundaryGapInner,o=e?null:n-t||Math.abs(t),s=this._modelMinRaw==="dataMin"?t:this._modelMinNum,l=this._modelMaxRaw==="dataMax"?n:this._modelMaxNum,u=s!=null,c=l!=null;s==null&&(s=e?a?0:NaN:t-i[0]*o),l==null&&(l=e?a?a-1:NaN:n+i[1]*o),(s==null||!isFinite(s))&&(s=NaN),(l==null||!isFinite(l))&&(l=NaN);var f=Tl(s)||Tl(l)||e&&!a;this._needCrossZero&&(s>0&&l>0&&!u&&(s=0),s<0&&l<0&&!c&&(l=0));var h=this._determinedMin,v=this._determinedMax;return h!=null&&(s=h,u=!0),v!=null&&(l=v,c=!0),{min:s,max:l,minFixed:u,maxFixed:c,isBlank:f}},r.prototype.modifyDataMinMax=function(e,t){this[gj[e]]=t},r.prototype.setDeterminedMinMax=function(e,t){var n=pj[e];this[n]=t},r.prototype.freeze=function(){this.frozen=!0},r}(),pj={min:"_determinedMin",max:"_determinedMax"},gj={min:"_dataMin",max:"_dataMax"};function cP(r,e,t){var n=r.rawExtentInfo;return n||(n=new dj(r,e,t),r.rawExtentInfo=n,n)}function Sp(r,e){return e==null?null:Tl(e)?NaN:r.parse(e)}function fP(r,e){var t=r.type,n=cP(r,e,r.getExtent()).calculate();r.setBlank(n.isBlank);var a=n.min,i=n.max,o=e.ecModel;if(o&&t==="time"){var s=KI("bar",o),l=!1;if(L(s,function(f){l=l||f.getBaseAxis()===e.axis}),l){var u=JI(s),c=yj(a,i,e,u);a=c.min,i=c.max}}return{extent:[a,i],fixMin:n.minFixed,fixMax:n.maxFixed}}function yj(r,e,t,n){var a=t.axis.getExtent(),i=a[1]-a[0],o=ej(n,t.axis);if(o===void 0)return{min:r,max:e};var s=1/0;L(o,function(v){s=Math.min(v.offset,s)});var l=-1/0;L(o,function(v){l=Math.max(v.offset+v.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=e-r,f=1-(s+l)/i,h=c/f-c;return e+=h*(l/u),r-=h*(s/u),{min:r,max:e}}function Os(r,e){var t=e,n=fP(r,t),a=n.extent,i=t.get("splitNumber");r instanceof vj&&(r.base=t.get("logBase"));var o=r.type,s=t.get("interval"),l=o==="interval"||o==="time";r.setExtent(a[0],a[1]),r.calcNiceExtent({splitNumber:i,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?t.get("minInterval"):null,maxInterval:l?t.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function Ef(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new $1({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new sP({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(yi.getClass(e)||go)}}function mj(r){var e=r.scale.getExtent(),t=e[0],n=e[1];return!(t>0&&n>0||t<0&&n<0)}function Of(r){var e=r.getLabelModel().get("formatter"),t=r.type==="category"?r.scale.getExtent()[0]:null;return r.scale.type==="time"?function(n){return function(a,i){return r.scale.getFormattedLabel(a,i,n)}}(e):ce(e)?function(n){return function(a){var i=r.scale.getLabel(a),o=n.replace("{value}",i!=null?i:"");return o}}(e):ye(e)?function(n){return function(a,i){return t!=null&&(i=a.value-t),n(j1(r,a),i,a.level!=null?{level:a.level}:null)}}(e):function(n){return r.scale.getLabel(n)}}function j1(r,e){return r.type==="category"?r.scale.getLabel(e):e.value}function _j(r){var e=r.model,t=r.scale;if(!(!e.get(["axisLabel","show"])||t.isBlank())){var n,a,i=t.getExtent();t instanceof $1?a=t.count():(n=t.getTicks(),a=n.length);var o=r.getLabelModel(),s=Of(r),l,u=1;a>40&&(u=Math.ceil(a/40));for(var c=0;c<a;c+=u){var f=n?n[c]:{value:i[0]+c},h=s(f,c),v=o.getTextRect(h),d=bj(v,o.get("rotate")||0);l?l.union(d):l=d}return l}}function bj(r,e){var t=e*Math.PI/180,n=r.width,a=r.height,i=n*Math.abs(Math.cos(t))+Math.abs(a*Math.sin(t)),o=n*Math.abs(Math.sin(t))+Math.abs(a*Math.cos(t)),s=new Re(r.x,r.y,i,o);return s}function Y1(r){var e=r.get("interval");return e==null?"auto":e}function hP(r){return r.type==="category"&&Y1(r.getLabelModel())===0}function Cp(r,e){var t={};return L(r.mapDimensionsAll(e),function(n){t[B1(r,n)]=!0}),Fe(t)}function xj(r,e,t){e&&L(Cp(e,t),function(n){var a=e.getApproximateExtent(n);a[0]<r[0]&&(r[0]=a[0]),a[1]>r[1]&&(r[1]=a[1])})}var du=function(){function r(){}return r.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},r.prototype.getCoordSysModel=function(){},r}();function wj(r){return Wa(null,r)}var Sj={isDimensionStacked:gi,enableDataStack:UI,getStackedDimension:B1};function Cj(r,e){var t=e;e instanceof lt||(t=new lt(e));var n=Ef(t);return n.setExtent(r[0],r[1]),Os(n,t),n}function Tj(r){Et(r,du)}function Dj(r,e){return e=e||{},gt(r,null,null,e.state!=="normal")}var Mj=Object.freeze(Object.defineProperty({__proto__:null,createList:wj,getLayoutRect:Ht,dataStack:Sj,createScale:Cj,mixinAxisModelCommonMethods:Tj,getECData:Me,createTextStyle:Dj,createDimensions:RU,createSymbol:kt,enableHoverEmphasis:no},Symbol.toStringTag,{value:"Module"})),Aj=1e-8;function vP(r,e){return Math.abs(r-e)<Aj}function Rs(r,e,t){var n=0,a=r[0];if(!a)return!1;for(var i=1;i<r.length;i++){var o=r[i];n+=ci(a[0],a[1],o[0],o[1],e,t),a=o}var s=r[0];return(!vP(a[0],s[0])||!vP(a[1],s[1]))&&(n+=ci(a[0],a[1],s[0],s[1],e,t)),n!==0}var Lj=[];function q1(r,e){for(var t=0;t<r.length;t++)sr(r[t],r[t],e)}function dP(r,e,t,n){for(var a=0;a<r.length;a++){var i=r[a];n&&(i=n.project(i)),i&&isFinite(i[0])&&isFinite(i[1])&&(ai(e,e,i),ii(t,t,i))}}function Ij(r){for(var e=0,t=0,n=0,a=r.length,i=r[a-1][0],o=r[a-1][1],s=0;s<a;s++){var l=r[s][0],u=r[s][1],c=i*u-l*o;e+=c,t+=(i+l)*c,n+=(o+u)*c,i=l,o=u}return e?[t/e/3,n/e/3,e]:[r[0][0]||0,r[0][1]||0]}var pP=function(){function r(e){this.name=e}return r.prototype.setCenter=function(e){this._center=e},r.prototype.getCenter=function(){var e=this._center;return e||(e=this._center=this.calcCenter()),e},r}(),gP=function(){function r(e,t){this.type="polygon",this.exterior=e,this.interiors=t}return r}(),yP=function(){function r(e){this.type="linestring",this.points=e}return r}(),mP=function(r){j(e,r);function e(t,n,a){var i=r.call(this,t)||this;return i.type="geoJSON",i.geometries=n,i._center=a&&[a[0],a[1]],i}return e.prototype.calcCenter=function(){for(var t=this.geometries,n,a=0,i=0;i<t.length;i++){var o=t[i],s=o.exterior,l=s&&s.length;l>a&&(n=o,a=l)}if(n)return Ij(n.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},e.prototype.getBoundingRect=function(t){var n=this._rect;if(n&&!t)return n;var a=[1/0,1/0],i=[-1/0,-1/0],o=this.geometries;return L(o,function(s){s.type==="polygon"?dP(s.exterior,a,i,t):L(s.points,function(l){dP(l,a,i,t)})}),isFinite(a[0])&&isFinite(a[1])&&isFinite(i[0])&&isFinite(i[1])||(a[0]=a[1]=i[0]=i[1]=0),n=new Re(a[0],a[1],i[0]-a[0],i[1]-a[1]),t||(this._rect=n),n},e.prototype.contain=function(t){var n=this.getBoundingRect(),a=this.geometries;if(!n.contain(t[0],t[1]))return!1;e:for(var i=0,o=a.length;i<o;i++){var s=a[i];if(s.type==="polygon"){var l=s.exterior,u=s.interiors;if(Rs(l,t[0],t[1])){for(var c=0;c<(u?u.length:0);c++)if(Rs(u[c],t[0],t[1]))continue e;return!0}}}return!1},e.prototype.transformTo=function(t,n,a,i){var o=this.getBoundingRect(),s=o.width/o.height;a?i||(i=a/s):a=s*i;for(var l=new Re(t,n,a,i),u=o.calculateTransform(l),c=this.geometries,f=0;f<c.length;f++){var h=c[f];h.type==="polygon"?(q1(h.exterior,u),L(h.interiors,function(v){q1(v,u)})):L(h.points,function(v){q1(v,u)})}o=this._rect,o.copy(l),this._center=[o.x+o.width/2,o.y+o.height/2]},e.prototype.cloneShallow=function(t){t==null&&(t=this.name);var n=new e(t,this.geometries,this._center);return n._rect=this._rect,n.transformTo=null,n},e}(pP),Pj=function(r){j(e,r);function e(t,n){var a=r.call(this,t)||this;return a.type="geoSVG",a._elOnlyForCalculate=n,a}return e.prototype.calcCenter=function(){for(var t=this._elOnlyForCalculate,n=t.getBoundingRect(),a=[n.x+n.width/2,n.y+n.height/2],i=mc(Lj),o=t;o&&!o.isGeoSVGGraphicRoot;)Ea(i,o.getLocalTransform(),i),o=o.parent;return Yo(i,i),sr(a,a,i),a},e}(pP);function Ej(r){if(!r.UTF8Encoding)return r;var e=r,t=e.UTF8Scale;t==null&&(t=1024);var n=e.features;return L(n,function(a){var i=a.geometry,o=i.encodeOffsets,s=i.coordinates;if(!!o)switch(i.type){case"LineString":i.coordinates=_P(s,o,t);break;case"Polygon":Z1(s,o,t);break;case"MultiLineString":Z1(s,o,t);break;case"MultiPolygon":L(s,function(l,u){return Z1(l,o[u],t)})}}),e.UTF8Encoding=!1,e}function Z1(r,e,t){for(var n=0;n<r.length;n++)r[n]=_P(r[n],e[n],t)}function _P(r,e,t){for(var n=[],a=e[0],i=e[1],o=0;o<r.length;o+=2){var s=r.charCodeAt(o)-64,l=r.charCodeAt(o+1)-64;s=s>>1^-(s&1),l=l>>1^-(l&1),s+=a,l+=i,a=s,i=l,n.push([s/t,l/t])}return n}function X1(r,e){return r=Ej(r),J(nt(r.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var n=t.properties,a=t.geometry,i=[];switch(a.type){case"Polygon":var o=a.coordinates;i.push(new gP(o[0],o.slice(1)));break;case"MultiPolygon":L(a.coordinates,function(l){l[0]&&i.push(new gP(l[0],l.slice(1)))});break;case"LineString":i.push(new yP([a.coordinates]));break;case"MultiLineString":i.push(new yP(a.coordinates))}var s=new mP(n[e||"name"],i,n.cp);return s.properties=n,s})}var Oj=Object.freeze(Object.defineProperty({__proto__:null,linearMap:at,round:At,asc:_n,getPrecision:fa,getPrecisionSafe:tD,getPixelPrecision:A0,getPercentWithPrecision:WG,MAX_SAFE_INTEGER:L0,remRadian:I0,isRadianAroundZero:kc,parseDate:bn,quantity:nD,quantityExponent:rd,nice:P0,quantile:nd,reformIntervals:E0,isNumeric:O0,numericToNumber:Na},Symbol.toStringTag,{value:"Module"})),Rj=Object.freeze(Object.defineProperty({__proto__:null,parse:bn,format:uf},Symbol.toStringTag,{value:"Module"})),Nj=Object.freeze(Object.defineProperty({__proto__:null,extendShape:VM,extendPath:$M,makePath:tf,makeImage:m_,mergePath:xn,resizePath:__,createIcon:jl,updateProps:qe,initProps:xt,getTransform:io,clipPointsByRect:b_,clipRectByRect:WM,registerShape:Fn,getShapeClass:Ad,Group:Te,Image:ur,Text:We,Circle:ha,Ellipse:_d,Sector:Hr,Ring:Kc,Polygon:Gr,Polyline:Wr,Rect:Ge,Line:tr,BezierCurve:Jc,Arc:xd,IncrementalDisplayable:BM,CompoundPath:wd,LinearGradient:Hl,RadialGradient:p_,BoundingRect:Re},Symbol.toStringTag,{value:"Module"})),kj=Object.freeze(Object.defineProperty({__proto__:null,addCommas:O_,toCamelCase:R_,normalizeCssArray:xs,encodeHTML:zr,formatTpl:B_,getTooltipMarker:gA,formatTime:D7,capitalFirst:M7,truncateText:_D,getTextRect:C7},Symbol.toStringTag,{value:"Module"})),Bj=Object.freeze(Object.defineProperty({__proto__:null,map:J,each:L,indexOf:Ne,inherits:Em,reduce:Pn,filter:nt,bind:fe,curry:Ae,isArray:K,isString:ce,isObject:_e,isFunction:ye,extend:Q,defaults:me,clone:we,merge:Pe},Symbol.toStringTag,{value:"Module"})),Rf=Ye();function zj(r){return r.type==="category"?Vj(r):Hj(r)}function Fj(r,e){return r.type==="category"?$j(r,e):{ticks:J(r.scale.getTicks(),function(t){return t.value})}}function Vj(r){var e=r.getLabelModel(),t=bP(r,e);return!e.get("show")||r.scale.isBlank()?{labels:[],labelCategoryInterval:t.labelCategoryInterval}:t}function bP(r,e){var t=xP(r,"labels"),n=Y1(e),a=wP(t,n);if(a)return a;var i,o;return ye(n)?i=TP(r,n):(o=n==="auto"?Gj(r):n,i=CP(r,o)),SP(t,n,{labels:i,labelCategoryInterval:o})}function $j(r,e){var t=xP(r,"ticks"),n=Y1(e),a=wP(t,n);if(a)return a;var i,o;if((!e.get("show")||r.scale.isBlank())&&(i=[]),ye(n))i=TP(r,n,!0);else if(n==="auto"){var s=bP(r,r.getLabelModel());o=s.labelCategoryInterval,i=J(s.labels,function(l){return l.tickValue})}else o=n,i=CP(r,o,!0);return SP(t,n,{ticks:i,tickCategoryInterval:o})}function Hj(r){var e=r.scale.getTicks(),t=Of(r);return{labels:J(e,function(n,a){return{level:n.level,formattedLabel:t(n,a),rawLabel:r.scale.getLabel(n),tickValue:n.value}})}}function xP(r,e){return Rf(r)[e]||(Rf(r)[e]=[])}function wP(r,e){for(var t=0;t<r.length;t++)if(r[t].key===e)return r[t].value}function SP(r,e,t){return r.push({key:e,value:t}),t}function Gj(r){var e=Rf(r).autoInterval;return e!=null?e:Rf(r).autoInterval=r.calculateCategoryInterval()}function Wj(r){var e=Uj(r),t=Of(r),n=(e.axisRotate-e.labelRotate)/180*Math.PI,a=r.scale,i=a.getExtent(),o=a.count();if(i[1]-i[0]<1)return 0;var s=1;o>40&&(s=Math.max(1,Math.floor(o/40)));for(var l=i[0],u=r.dataToCoord(l+1)-r.dataToCoord(l),c=Math.abs(u*Math.cos(n)),f=Math.abs(u*Math.sin(n)),h=0,v=0;l<=i[1];l+=s){var d=0,p=0,g=Rc(t({value:l}),e.font,"center","top");d=g.width*1.3,p=g.height*1.3,h=Math.max(h,d,7),v=Math.max(v,p,7)}var y=h/c,m=v/f;isNaN(y)&&(y=1/0),isNaN(m)&&(m=1/0);var _=Math.max(0,Math.floor(Math.min(y,m))),b=Rf(r.model),w=r.getExtent(),x=b.lastAutoInterval,S=b.lastTickCount;return x!=null&&S!=null&&Math.abs(x-_)<=1&&Math.abs(S-o)<=1&&x>_&&b.axisExtent0===w[0]&&b.axisExtent1===w[1]?_=x:(b.lastTickCount=o,b.lastAutoInterval=_,b.axisExtent0=w[0],b.axisExtent1=w[1]),_}function Uj(r){var e=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function CP(r,e,t){var n=Of(r),a=r.scale,i=a.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=i[0],c=a.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var f=hP(r),h=o.get("showMinLabel")||f,v=o.get("showMaxLabel")||f;h&&u!==i[0]&&p(i[0]);for(var d=u;d<=i[1];d+=l)p(d);v&&d-l!==i[1]&&p(i[1]);function p(g){var y={value:g};s.push(t?g:{formattedLabel:n(y),rawLabel:a.getLabel(y),tickValue:g})}return s}function TP(r,e,t){var n=r.scale,a=Of(r),i=[];return L(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;e(o.value,s)&&i.push(t?l:{formattedLabel:a(o),rawLabel:s,tickValue:l})}),i}var DP=[0,1],jj=function(){function r(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return r.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),a=Math.max(t[0],t[1]);return e>=n&&e<=a},r.prototype.containData=function(e){return this.scale.contain(e)},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(e){return A0(e||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},r.prototype.dataToCoord=function(e,t){var n=this._extent,a=this.scale;return e=a.normalize(e),this.onBand&&a.type==="ordinal"&&(n=n.slice(),MP(n,a.count())),at(e,DP,n,t)},r.prototype.coordToData=function(e,t){var n=this._extent,a=this.scale;this.onBand&&a.type==="ordinal"&&(n=n.slice(),MP(n,a.count()));var i=at(e,n,DP,t);return this.scale.scale(i)},r.prototype.pointToData=function(e,t){},r.prototype.getTicksCoords=function(e){e=e||{};var t=e.tickModel||this.getTickModel(),n=Fj(this,t),a=n.ticks,i=J(a,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=t.get("alignWithLabel");return Yj(this,i,o,e.clamp),i},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),t=e.get("splitNumber");t>0&&t<100||(t=5);var n=this.scale.getMinorTicks(t),a=J(n,function(i){return J(i,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return a},r.prototype.getViewLabels=function(){return zj(this).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),n=t[1]-t[0]+(this.onBand?1:0);n===0&&(n=1);var a=Math.abs(e[1]-e[0]);return Math.abs(a)/n},r.prototype.calculateCategoryInterval=function(){return Wj(this)},r}();function MP(r,e){var t=r[1]-r[0],n=e,a=t/n/2;r[0]+=a,r[1]-=a}function Yj(r,e,t,n){var a=e.length;if(!r.onBand||t||!a)return;var i=r.getExtent(),o,s;if(a===1)e[0].coord=i[0],o=e[1]={coord:i[0]};else{var l=e[a-1].tickValue-e[0].tickValue,u=(e[a-1].coord-e[0].coord)/l;L(e,function(v){v.coord-=u/2});var c=r.scale.getExtent();s=1+c[1]-e[a-1].tickValue,o={coord:e[a-1].coord+u*s},e.push(o)}var f=i[0]>i[1];h(e[0].coord,i[0])&&(n?e[0].coord=i[0]:e.shift()),n&&h(i[0],e[0].coord)&&e.unshift({coord:i[0]}),h(i[1],o.coord)&&(n?o.coord=i[1]:e.pop()),n&&h(o.coord,i[1])&&e.push({coord:i[1]});function h(v,d){return v=At(v),d=At(d),f?v>d:v<d}}var Un=jj;function qj(r){var e=$e.extend(r);return $e.registerClass(e),e}function Zj(r){var e=wt.extend(r);return wt.registerClass(e),e}function Xj(r){var e=yt.extend(r);return yt.registerClass(e),e}function Qj(r){var e=ut.extend(r);return ut.registerClass(e),e}var Nf=Math.PI*2,Ns=Va.CMD,Kj=["top","right","bottom","left"];function Jj(r,e,t,n,a){var i=t.width,o=t.height;switch(r){case"top":n.set(t.x+i/2,t.y-e),a.set(0,-1);break;case"bottom":n.set(t.x+i/2,t.y+o+e),a.set(0,1);break;case"left":n.set(t.x-e,t.y+o/2),a.set(-1,0);break;case"right":n.set(t.x+i+e,t.y+o/2),a.set(1,0);break}}function eY(r,e,t,n,a,i,o,s,l){o-=r,s-=e;var u=Math.sqrt(o*o+s*s);o/=u,s/=u;var c=o*t+r,f=s*t+e;if(Math.abs(n-a)%Nf<1e-4)return l[0]=c,l[1]=f,u-t;if(i){var h=n;n=to(a),a=to(h)}else n=to(n),a=to(a);n>a&&(a+=Nf);var v=Math.atan2(s,o);if(v<0&&(v+=Nf),v>=n&&v<=a||v+Nf>=n&&v+Nf<=a)return l[0]=c,l[1]=f,u-t;var d=t*Math.cos(n)+r,p=t*Math.sin(n)+e,g=t*Math.cos(a)+r,y=t*Math.sin(a)+e,m=(d-o)*(d-o)+(p-s)*(p-s),_=(g-o)*(g-o)+(y-s)*(y-s);return m<_?(l[0]=d,l[1]=p,Math.sqrt(m)):(l[0]=g,l[1]=y,Math.sqrt(_))}function Tp(r,e,t,n,a,i,o,s){var l=a-r,u=i-e,c=t-r,f=n-e,h=Math.sqrt(c*c+f*f);c/=h,f/=h;var v=l*c+u*f,d=v/h;s&&(d=Math.min(Math.max(d,0),1)),d*=h;var p=o[0]=r+d*c,g=o[1]=e+d*f;return Math.sqrt((p-a)*(p-a)+(g-i)*(g-i))}function AP(r,e,t,n,a,i,o){t<0&&(r=r+t,t=-t),n<0&&(e=e+n,n=-n);var s=r+t,l=e+n,u=o[0]=Math.min(Math.max(a,r),s),c=o[1]=Math.min(Math.max(i,e),l);return Math.sqrt((u-a)*(u-a)+(c-i)*(c-i))}var ba=[];function tY(r,e,t){var n=AP(e.x,e.y,e.width,e.height,r.x,r.y,ba);return t.set(ba[0],ba[1]),n}function rY(r,e,t){for(var n=0,a=0,i=0,o=0,s,l,u=1/0,c=e.data,f=r.x,h=r.y,v=0;v<c.length;){var d=c[v++];v===1&&(n=c[v],a=c[v+1],i=n,o=a);var p=u;switch(d){case Ns.M:i=c[v++],o=c[v++],n=i,a=o;break;case Ns.L:p=Tp(n,a,c[v],c[v+1],f,h,ba,!0),n=c[v++],a=c[v++];break;case Ns.C:p=w2(n,a,c[v++],c[v++],c[v++],c[v++],c[v],c[v+1],f,h,ba),n=c[v++],a=c[v++];break;case Ns.Q:p=C2(n,a,c[v++],c[v++],c[v],c[v+1],f,h,ba),n=c[v++],a=c[v++];break;case Ns.A:var g=c[v++],y=c[v++],m=c[v++],_=c[v++],b=c[v++],w=c[v++];v+=1;var x=!!(1-c[v++]);s=Math.cos(b)*m+g,l=Math.sin(b)*_+y,v<=1&&(i=s,o=l);var S=(f-g)*_/m+g;p=eY(g,y,_,b,b+w,x,S,h,ba),n=Math.cos(b+w)*m+g,a=Math.sin(b+w)*_+y;break;case Ns.R:i=n=c[v++],o=a=c[v++];var T=c[v++],D=c[v++];p=AP(i,o,T,D,f,h,ba);break;case Ns.Z:p=Tp(n,a,i,o,f,h,ba,!0),n=i,a=o;break}p<u&&(u=p,t.set(ba[0],ba[1]))}return u}var xa=new Oe,mt=new Oe,Bt=new Oe,ja=new Oe,Ya=new Oe;function LP(r,e){if(!!r){var t=r.getTextGuideLine(),n=r.getTextContent();if(!!(n&&t)){var a=r.textGuideLineConfig||{},i=[[0,0],[0,0],[0,0]],o=a.candidates||Kj,s=n.getBoundingRect().clone();s.applyTransform(n.getComputedTransform());var l=1/0,u=a.anchor,c=r.getComputedTransform(),f=c&&Yo([],c),h=e.get("length2")||0;u&&Bt.copy(u);for(var v=0;v<o.length;v++){var d=o[v];Jj(d,0,s,xa,ja),Oe.scaleAndAdd(mt,xa,ja,h),mt.transform(f);var p=r.getBoundingRect(),g=u?u.distance(mt):r instanceof Be?rY(mt,r.path,Bt):tY(mt,p,Bt);g<l&&(l=g,mt.transform(c),Bt.transform(c),Bt.toArray(i[0]),mt.toArray(i[1]),xa.toArray(i[2]))}IP(i,e.get("minTurnAngle")),t.setShape({points:i})}}}var Dp=[],jr=new Oe;function IP(r,e){if(e<=180&&e>0){e=e/180*Math.PI,xa.fromArray(r[0]),mt.fromArray(r[1]),Bt.fromArray(r[2]),Oe.sub(ja,xa,mt),Oe.sub(Ya,Bt,mt);var t=ja.len(),n=Ya.len();if(!(t<.001||n<.001)){ja.scale(1/t),Ya.scale(1/n);var a=ja.dot(Ya),i=Math.cos(e);if(i<a){var o=Tp(mt.x,mt.y,Bt.x,Bt.y,xa.x,xa.y,Dp,!1);jr.fromArray(Dp),jr.scaleAndAdd(Ya,o/Math.tan(Math.PI-e));var s=Bt.x!==mt.x?(jr.x-mt.x)/(Bt.x-mt.x):(jr.y-mt.y)/(Bt.y-mt.y);if(isNaN(s))return;s<0?Oe.copy(jr,mt):s>1&&Oe.copy(jr,Bt),jr.toArray(r[1])}}}}function nY(r,e,t){if(t<=180&&t>0){t=t/180*Math.PI,xa.fromArray(r[0]),mt.fromArray(r[1]),Bt.fromArray(r[2]),Oe.sub(ja,mt,xa),Oe.sub(Ya,Bt,mt);var n=ja.len(),a=Ya.len();if(!(n<.001||a<.001)){ja.scale(1/n),Ya.scale(1/a);var i=ja.dot(e),o=Math.cos(t);if(i<o){var s=Tp(mt.x,mt.y,Bt.x,Bt.y,xa.x,xa.y,Dp,!1);jr.fromArray(Dp);var l=Math.PI/2,u=Math.acos(Ya.dot(e)),c=l+u-t;if(c>=l)Oe.copy(jr,Bt);else{jr.scaleAndAdd(Ya,s/Math.tan(Math.PI/2-c));var f=Bt.x!==mt.x?(jr.x-mt.x)/(Bt.x-mt.x):(jr.y-mt.y)/(Bt.y-mt.y);if(isNaN(f))return;f<0?Oe.copy(jr,mt):f>1&&Oe.copy(jr,Bt)}jr.toArray(r[1])}}}}function PP(r,e,t,n){var a=t==="normal",i=a?r:r.ensureState(t);i.ignore=e;var o=n.get("smooth");o&&o===!0&&(o=.3),i.shape=i.shape||{},o>0&&(i.shape.smooth=o);var s=n.getModel("lineStyle").getLineStyle();a?r.useStyle(s):i.style=s}function aY(r,e){var t=e.smooth,n=e.points;if(!!n)if(r.moveTo(n[0][0],n[0][1]),t>0&&n.length>=3){var a=ni(n[0],n[1]),i=ni(n[1],n[2]);if(!a||!i){r.lineTo(n[1][0],n[1][1]),r.lineTo(n[2][0],n[2][1]);return}var o=Math.min(a,i)*t,s=yc([],n[1],n[0],o/a),l=yc([],n[1],n[2],o/i),u=yc([],s,l,.5);r.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),r.bezierCurveTo(l[0],l[1],l[0],l[1],n[2][0],n[2][1])}else for(var c=1;c<n.length;c++)r.lineTo(n[c][0],n[c][1])}function Q1(r,e,t){var n=r.getTextGuideLine(),a=r.getTextContent();if(!a){n&&r.removeTextGuideLine();return}for(var i=e.normal,o=i.get("show"),s=a.ignore,l=0;l<Uc.length;l++){var u=Uc[l],c=e[u],f=u==="normal";if(c){var h=c.get("show"),v=f?s:Ee(a.states[u]&&a.states[u].ignore,s);if(v||!Ee(h,o)){var d=f?n:n&&n.states[u];d&&(d.ignore=!0);continue}n||(n=new Wr,r.setTextGuideLine(n),!f&&(s||!o)&&PP(n,!0,"normal",e.normal),r.stateProxy&&(n.stateProxy=r.stateProxy)),PP(n,!1,u,c)}}if(n){me(n.style,t),n.style.fill=null;var p=i.get("showAbove"),g=r.textGuideLineConfig=r.textGuideLineConfig||{};g.showAbove=p||!1,n.buildPath=aY}}function K1(r,e){e=e||"labelLine";for(var t={normal:r.getModel(e)},n=0;n<$r.length;n++){var a=$r[n];t[a]=r.getModel([a,e])}return t}function EP(r){for(var e=[],t=0;t<r.length;t++){var n=r[t];if(!n.defaultAttr.ignore){var a=n.label,i=a.getComputedTransform(),o=a.getBoundingRect(),s=!i||i[1]<1e-5&&i[2]<1e-5,l=a.style.margin||0,u=o.clone();u.applyTransform(i),u.x-=l/2,u.y-=l/2,u.width+=l,u.height+=l;var c=s?new Td(o,i):null;e.push({label:a,labelLine:n.labelLine,rect:u,localRect:o,obb:c,priority:n.priority,defaultAttr:n.defaultAttr,layoutOption:n.computedLayoutOption,axisAligned:s,transform:i})}}return e}function OP(r,e,t,n,a,i){var o=r.length;if(o<2)return;r.sort(function(T,D){return T.rect[e]-D.rect[e]});for(var s=0,l,u=!1,c=0,f=0;f<o;f++){var h=r[f],v=h.rect;l=v[e]-s,l<0&&(v[e]-=l,h.label[e]-=l,u=!0);var d=Math.max(-l,0);c+=d,s=v[e]+v[t]}c>0&&i&&w(-c/o,0,o);var p=r[0],g=r[o-1],y,m;_(),y<0&&x(-y,.8),m<0&&x(m,.8),_(),b(y,m,1),b(m,y,-1),_(),y<0&&S(-y),m<0&&S(m);function _(){y=p.rect[e]-n,m=a-g.rect[e]-g.rect[t]}function b(T,D,M){if(T<0){var A=Math.min(D,-T);if(A>0){w(A*M,0,o);var I=A+T;I<0&&x(-I*M,1)}else x(-T*M,1)}}function w(T,D,M){T!==0&&(u=!0);for(var A=D;A<M;A++){var I=r[A],P=I.rect;P[e]+=T,I.label[e]+=T}}function x(T,D){for(var M=[],A=0,I=1;I<o;I++){var P=r[I-1].rect,E=Math.max(r[I].rect[e]-P[e]-P[t],0);M.push(E),A+=E}if(!!A){var O=Math.min(Math.abs(T)/A,D);if(T>0)for(var I=0;I<o-1;I++){var N=M[I]*O;w(N,0,I+1)}else for(var I=o-1;I>0;I--){var N=M[I-1]*O;w(-N,I,o)}}}function S(T){var D=T<0?-1:1;T=Math.abs(T);for(var M=Math.ceil(T/(o-1)),A=0;A<o-1;A++)if(D>0?w(M,0,A+1):w(-M,o-A-1,o),T-=M,T<=0)return}return u}function iY(r,e,t,n){return OP(r,"x","width",e,t,n)}function RP(r,e,t,n){return OP(r,"y","height",e,t,n)}function NP(r){var e=[];r.sort(function(p,g){return g.priority-p.priority});var t=new Re(0,0,0,0);function n(p){if(!p.ignore){var g=p.ensureState("emphasis");g.ignore==null&&(g.ignore=!1)}p.ignore=!0}for(var a=0;a<r.length;a++){var i=r[a],o=i.axisAligned,s=i.localRect,l=i.transform,u=i.label,c=i.labelLine;t.copy(i.rect),t.width-=.1,t.height-=.1,t.x+=.05,t.y+=.05;for(var f=i.obb,h=!1,v=0;v<e.length;v++){var d=e[v];if(!!t.intersect(d.rect)){if(o&&d.axisAligned){h=!0;break}if(d.obb||(d.obb=new Td(d.localRect,d.transform)),f||(f=new Td(s,l)),f.intersect(d.obb)){h=!0;break}}}h?(n(u),c&&n(c)):(u.attr("ignore",i.defaultAttr.ignore),c&&c.attr("ignore",i.defaultAttr.labelGuideIgnore),e.push(i))}}function oY(r){if(r){for(var e=[],t=0;t<r.length;t++)e.push(r[t].slice());return e}}function sY(r,e){var t=r.label,n=e&&e.getTextGuideLine();return{dataIndex:r.dataIndex,dataType:r.dataType,seriesIndex:r.seriesModel.seriesIndex,text:r.label.style.text,rect:r.hostRect,labelRect:r.rect,align:t.style.align,verticalAlign:t.style.verticalAlign,labelLinePoints:oY(n&&n.shape.points)}}var kP=["align","verticalAlign","width","height","fontSize"],wn=new li,J1=Ye(),lY=Ye();function Mp(r,e,t){for(var n=0;n<t.length;n++){var a=t[n];e[a]!=null&&(r[a]=e[a])}}var Ap=["x","y","rotation"],uY=function(){function r(){this._labelList=[],this._chartViewList=[]}return r.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},r.prototype._addLabel=function(e,t,n,a,i){var o=a.style,s=a.__hostTarget,l=s.textConfig||{},u=a.getComputedTransform(),c=a.getBoundingRect().plain();Re.applyTransform(c,c,u),u?wn.setLocalTransform(u):(wn.x=wn.y=wn.rotation=wn.originX=wn.originY=0,wn.scaleX=wn.scaleY=1);var f=a.__hostTarget,h;if(f){h=f.getBoundingRect().plain();var v=f.getComputedTransform();Re.applyTransform(h,h,v)}var d=h&&f.getTextGuideLine();this._labelList.push({label:a,labelLine:d,seriesModel:n,dataIndex:e,dataType:t,layoutOption:i,computedLayoutOption:null,rect:c,hostRect:h,priority:h?h.width*h.height:0,defaultAttr:{ignore:a.ignore,labelGuideIgnore:d&&d.ignore,x:wn.x,y:wn.y,scaleX:wn.scaleX,scaleY:wn.scaleY,rotation:wn.rotation,style:{x:o.x,y:o.y,align:o.align,verticalAlign:o.verticalAlign,width:o.width,height:o.height,fontSize:o.fontSize},cursor:a.cursor,attachedPos:l.position,attachedRot:l.rotation}})},r.prototype.addLabelsOfSeries=function(e){var t=this;this._chartViewList.push(e);var n=e.__model,a=n.get("labelLayout");!(ye(a)||Fe(a).length)||e.group.traverse(function(i){if(i.ignore)return!0;var o=i.getTextContent(),s=Me(i);o&&!o.disableLabelLayout&&t._addLabel(s.dataIndex,s.dataType,n,o,a)})},r.prototype.updateLayoutConfig=function(e){var t=e.getWidth(),n=e.getHeight();function a(_,b){return function(){LP(_,b)}}for(var i=0;i<this._labelList.length;i++){var o=this._labelList[i],s=o.label,l=s.__hostTarget,u=o.defaultAttr,c=void 0;ye(o.layoutOption)?c=o.layoutOption(sY(o,l)):c=o.layoutOption,c=c||{},o.computedLayoutOption=c;var f=Math.PI/180;l&&l.setTextConfig({local:!1,position:c.x!=null||c.y!=null?null:u.attachedPos,rotation:c.rotate!=null?c.rotate*f:u.attachedRot,offset:[c.dx||0,c.dy||0]});var h=!1;if(c.x!=null?(s.x=le(c.x,t),s.setStyle("x",0),h=!0):(s.x=u.x,s.setStyle("x",u.style.x)),c.y!=null?(s.y=le(c.y,n),s.setStyle("y",0),h=!0):(s.y=u.y,s.setStyle("y",u.style.y)),c.labelLinePoints){var v=l.getTextGuideLine();v&&(v.setShape({points:c.labelLinePoints}),h=!1)}var d=J1(s);d.needsUpdateLabelLine=h,s.rotation=c.rotate!=null?c.rotate*f:u.rotation,s.scaleX=u.scaleX,s.scaleY=u.scaleY;for(var p=0;p<kP.length;p++){var g=kP[p];s.setStyle(g,c[g]!=null?c[g]:u.style[g])}if(c.draggable){if(s.draggable=!0,s.cursor="move",l){var y=o.seriesModel;if(o.dataIndex!=null){var m=o.seriesModel.getData(o.dataType);y=m.getItemModel(o.dataIndex)}s.on("drag",a(l,y.getModel("labelLine")))}}else s.off("drag"),s.cursor=u.cursor}},r.prototype.layout=function(e){var t=e.getWidth(),n=e.getHeight(),a=EP(this._labelList),i=nt(a,function(l){return l.layoutOption.moveOverlap==="shiftX"}),o=nt(a,function(l){return l.layoutOption.moveOverlap==="shiftY"});iY(i,0,t),RP(o,0,n);var s=nt(a,function(l){return l.layoutOption.hideOverlap});NP(s)},r.prototype.processLabelsOverall=function(){var e=this;L(this._chartViewList,function(t){var n=t.__model,a=t.ignoreLabelLineUpdate,i=n.isAnimationEnabled();t.group.traverse(function(o){if(o.ignore&&!o.forceLabelAnimation)return!0;var s=!a,l=o.getTextContent();!s&&l&&(s=J1(l).needsUpdateLabelLine),s&&e._updateLabelLine(o,n),i&&e._animateLabels(o,n)})})},r.prototype._updateLabelLine=function(e,t){var n=e.getTextContent(),a=Me(e),i=a.dataIndex;if(n&&i!=null){var o=t.getData(a.dataType),s=o.getItemModel(i),l={},u=o.getItemVisual(i,"style"),c=o.getVisual("drawType");l.stroke=u[c];var f=s.getModel("labelLine");Q1(e,K1(s),l),LP(e,f)}},r.prototype._animateLabels=function(e,t){var n=e.getTextContent(),a=e.getTextGuideLine();if(n&&(e.forceLabelAnimation||!n.ignore&&!n.invisible&&!e.disableLabelAnimation&&!Wl(e))){var i=J1(n),o=i.oldLayout,s=Me(e),l=s.dataIndex,u={x:n.x,y:n.y,rotation:n.rotation},c=t.getData(s.dataType);if(o){n.attr(o);var h=e.prevStates;h&&(Ne(h,"select")>=0&&n.attr(i.oldLayoutSelect),Ne(h,"emphasis")>=0&&n.attr(i.oldLayoutEmphasis)),qe(n,u,t,l)}else if(n.attr(u),!ql(n).valueAnimation){var f=Ee(n.style.opacity,1);n.style.opacity=0,xt(n,{style:{opacity:f}},t,l)}if(i.oldLayout=u,n.states.select){var v=i.oldLayoutSelect={};Mp(v,u,Ap),Mp(v,n.states.select,Ap)}if(n.states.emphasis){var d=i.oldLayoutEmphasis={};Mp(d,u,Ap),Mp(d,n.states.emphasis,Ap)}eA(n,l,c,t,t)}if(a&&!a.ignore&&!a.invisible){var i=lY(a),o=i.oldLayout,p={points:a.shape.points};o?(a.attr({shape:o}),qe(a,{shape:p},t)):(a.setShape(p),a.style.strokePercent=0,xt(a,{style:{strokePercent:1}},t)),i.oldLayout=p}},r}(),cY=uY,eb=Ye();function fY(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,n){var a=eb(t).labelManager;a||(a=eb(t).labelManager=new cY),a.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(e,t,n){var a=eb(t).labelManager;n.updatedSeries.forEach(function(i){a.addLabelsOfSeries(t.getViewOfSeriesModel(i))}),a.updateLayoutConfig(t),a.layout(t),a.processLabelsOverall()})}var tb=Math.sin,rb=Math.cos,BP=Math.PI,ks=Math.PI*2,hY=180/BP,vY=function(){function r(){}return r.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},r.prototype.moveTo=function(e,t){this._add("M",e,t)},r.prototype.lineTo=function(e,t){this._add("L",e,t)},r.prototype.bezierCurveTo=function(e,t,n,a,i,o){this._add("C",e,t,n,a,i,o)},r.prototype.quadraticCurveTo=function(e,t,n,a){this._add("Q",e,t,n,a)},r.prototype.arc=function(e,t,n,a,i,o){this.ellipse(e,t,n,n,0,a,i,o)},r.prototype.ellipse=function(e,t,n,a,i,o,s,l){var u=s-o,c=!l,f=Math.abs(u),h=Qi(f-ks)||(c?u>=ks:-u>=ks),v=u>0?u%ks:u%ks+ks,d=!1;h?d=!0:Qi(f)?d=!1:d=v>=BP==!!c;var p=e+n*rb(o),g=t+a*tb(o);this._start&&this._add("M",p,g);var y=Math.round(i*hY);if(h){var m=1/this._p,_=(c?1:-1)*(ks-m);this._add("A",n,a,y,1,+c,e+n*rb(o+_),t+a*tb(o+_)),m>.01&&this._add("A",n,a,y,0,+c,p,g)}else{var b=e+n*rb(s),w=t+a*tb(s);this._add("A",n,a,y,+d,+c,b,w)}},r.prototype.rect=function(e,t,n,a){this._add("M",e,t),this._add("l",n,0),this._add("l",0,a),this._add("l",-n,0),this._add("Z")},r.prototype.closePath=function(){this._d.length>0&&this._add("Z")},r.prototype._add=function(e,t,n,a,i,o,s,l,u){for(var c=[],f=this._p,h=1;h<arguments.length;h++){var v=arguments[h];if(isNaN(v)){this._invalid=!0;return}c.push(Math.round(v*f)/f)}this._d.push(e+c.join(" ")),this._start=e==="Z"},r.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},r.prototype.getStr=function(){return this._str},r}(),zP=vY,kf="none",dY=Math.round;function pY(r){var e=r.fill;return e!=null&&e!==kf}function gY(r){var e=r.stroke;return e!=null&&e!==kf}var nb=["lineCap","miterLimit","lineJoin"],yY=J(nb,function(r){return"stroke-"+r.toLowerCase()});function mY(r,e,t,n){var a=e.opacity==null?1:e.opacity;if(t instanceof ur){r("opacity",a);return}if(pY(e)){var i=Ic(e.fill);r("fill",i.color);var o=e.fillOpacity!=null?e.fillOpacity*i.opacity*a:i.opacity*a;(n||o<1)&&r("fill-opacity",o)}else r("fill",kf);if(gY(e)){var s=Ic(e.stroke);r("stroke",s.color);var l=e.strokeNoScale?t.getLineScale():1,u=l?(e.lineWidth||0)/l:0,c=e.strokeOpacity!=null?e.strokeOpacity*s.opacity*a:s.opacity*a,f=e.strokeFirst;if((n||u!==1)&&r("stroke-width",u),(n||f)&&r("paint-order",f?"stroke":"fill"),(n||c<1)&&r("stroke-opacity",c),e.lineDash){var h=f1(t),v=h[0],d=h[1];v&&(d=dY(d||0),r("stroke-dasharray",v.join(",")),(d||n)&&r("stroke-dashoffset",d))}else n&&r("stroke-dasharray",kf);for(var p=0;p<nb.length;p++){var g=nb[p];if(n||e[g]!==fd[g]){var y=e[g]||fd[g];y&&r(yY[p],y)}}}else n&&r("stroke",kf)}var FP="http://www.w3.org/2000/svg",VP="http://www.w3.org/1999/xlink",_Y="http://www.w3.org/2000/xmlns/",bY="http://www.w3.org/XML/1998/namespace";function $P(r){return document.createElementNS(FP,r)}function ar(r,e,t,n,a){return{tag:r,attrs:t||{},children:n,text:a,key:e}}function xY(r,e){var t=[];if(e)for(var n in e){var a=e[n],i=n;a!==!1&&(a!==!0&&a!=null&&(i+='="'+a+'"'),t.push(i))}return"<"+r+" "+t.join(" ")+">"}function wY(r){return"</"+r+">"}function ab(r,e){e=e||{};var t=e.newline?`
218
+ `];function nr(r,e){return e.type=r,e}function r1(r){return r.type==="section"}function gL(r){return r1(r)?N9:k9}function yL(r){if(r1(r)){var e=0,t=r.blocks.length,n=t>1||t>0&&!r.noHeader;return L(r.blocks,function(a){var i=yL(a);i>=e&&(e=i+ +(n&&(!i||r1(a)&&!a.noHeader)))}),e}return 0}function N9(r,e,t,n){var a=e.noHeader,i=B9(yL(e)),o=[],s=e.blocks||[];Dr(!s||K(s)),s=s||[];var l=r.orderMode;if(e.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(he(u,l)){var c=new iL(u[l],null);s.sort(function(d,p){return c.evaluate(d.sortParam,p.sortParam)})}else l==="seriesDesc"&&s.reverse()}L(s,function(d,p){var g=e.valueFormatter,y=gL(d)(g?Q(Q({},r),{valueFormatter:g}):r,d,p>0?i.html:0,n);y!=null&&o.push(y)});var f=r.renderMode==="richText"?o.join(i.richText):n1(o.join(""),a?t:i.html);if(a)return f;var h=N_(e.header,"ordinal",r.useUTC),v=pL(n,r.renderMode).nameStyle;return r.renderMode==="richText"?_L(r,h,v)+i.richText+f:n1('<div style="'+v+";"+dL+';">'+zr(h)+"</div>"+f,t)}function k9(r,e,t,n){var a=r.renderMode,i=e.noName,o=e.noValue,s=!e.markerType,l=e.name,u=r.useUTC,c=e.valueFormatter||r.valueFormatter||function(b){return b=K(b)?b:[b],J(b,function(w,x){return N_(w,K(v)?v[x]:v,u)})};if(!(i&&o)){var f=s?"":r.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",a),h=i?"":N_(l,"ordinal",u),v=e.valueType,d=o?[]:c(e.value),p=!s||!i,g=!s&&i,y=pL(n,a),m=y.nameStyle,_=y.valueStyle;return a==="richText"?(s?"":f)+(i?"":_L(r,h,m))+(o?"":V9(r,d,p,g,_)):n1((s?"":f)+(i?"":z9(h,!s,m))+(o?"":F9(d,p,g,_)),t)}}function mL(r,e,t,n,a,i){if(!!r){var o=gL(r),s={useUTC:a,renderMode:t,orderMode:n,markupStyleCreator:e,valueFormatter:r.valueFormatter};return o(s,r,0,i)}}function B9(r){return{html:O9[r],richText:R9[r]}}function n1(r,e){var t='<div style="clear:both"></div>',n="margin: "+e+"px 0 0";return'<div style="'+n+";"+dL+';">'+r+t+"</div>"}function z9(r,e,t){var n=e?"margin-left:2px":"";return'<span style="'+t+";"+n+'">'+zr(r)+"</span>"}function F9(r,e,t,n){var a=t?"10px":"20px",i=e?"float:right;margin-left:"+a:"";return r=K(r)?r:[r],'<span style="'+i+";"+n+'">'+J(r,function(o){return zr(o)}).join("&nbsp;&nbsp;")+"</span>"}function _L(r,e,t){return r.markupStyleCreator.wrapRichTextStyle(e,t)}function V9(r,e,t,n,a){var i=[a],o=n?10:20;return t&&i.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(K(e)?e.join(" "):e,i)}function bL(r,e){var t=r.getData().getItemVisual(e,"style"),n=t[r.visualDrawType];return ws(n)}function xL(r,e){var t=r.get("padding");return t!=null?t:e==="richText"?[8,10]:10}var a1=function(){function r(){this.richTextStyles={},this._nextStyleNameId=aD()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(e,t,n){var a=n==="richText"?this._generateStyleName():null,i=gA({color:t,type:e,renderMode:n,markerId:a});return ce(i)?i:(this.richTextStyles[a]=i.style,i.content)},r.prototype.wrapRichTextStyle=function(e,t){var n={};K(t)?L(t,function(i){return Q(n,i)}):Q(n,t);var a=this._generateStyleName();return this.richTextStyles[a]=n,"{"+a+"|"+e+"}"},r}();function wL(r){var e=r.series,t=r.dataIndex,n=r.multipleSeries,a=e.getData(),i=a.mapDimensionsAll("defaultedTooltip"),o=i.length,s=e.getRawValue(t),l=K(s),u=bL(e,t),c,f,h,v;if(o>1||l&&!o){var d=$9(s,e,t,i,u);c=d.inlineValues,f=d.inlineValueTypes,h=d.blocks,v=d.inlineValues[0]}else if(o){var p=a.getDimensionInfo(i[0]);v=c=nu(a,t,i[0]),f=p.type}else v=c=l?s[0]:s;var g=R0(e),y=g&&e.name||"",m=a.getName(t),_=n?y:m;return nr("section",{header:y,noHeader:n||!g,sortParam:v,blocks:[nr("nameValue",{markerType:"item",markerColor:u,name:_,noName:!En(_),value:c,valueType:f})].concat(h||[])})}function $9(r,e,t,n,a){var i=e.getData(),o=Pn(r,function(f,h,v){var d=i.getDimensionInfo(v);return f=f||d&&d.tooltip!==!1&&d.displayName!=null},!1),s=[],l=[],u=[];n.length?L(n,function(f){c(nu(i,t,f),f)}):L(r,c);function c(f,h){var v=i.getDimensionInfo(h);!v||v.otherDims.tooltip===!1||(o?u.push(nr("nameValue",{markerType:"subItem",markerColor:a,name:v.displayName,value:f,valueType:v.type})):(s.push(f),l.push(v.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var fo=Ye();function Yd(r,e){return r.getName(e)||r.getId(e)}var qd="__universalTransitionEnabled",Zd=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return e.prototype.init=function(t,n,a){this.seriesIndex=this.componentIndex,this.dataTask=gf({count:G9,reset:W9}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,a);var i=fo(this).sourceManager=new fL(this);i.prepareSource();var o=this.getInitialData(t,a);CL(o,this),this.dataTask.context.data=o,fo(this).dataBeforeProcessed=o,SL(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(t,n){var a=ff(this),i=a?Kl(t):{},o=this.subType;$e.hasClass(o)&&(o+="Series"),Pe(t,n.getTheme().get(this.subType)),Pe(t,this.getDefaultOption()),rs(t,"label",["show"]),this.fillDataTextStyle(t.data),a&&lo(t,i,a)},e.prototype.mergeOption=function(t,n){t=Pe(this.option,t,!0),this.fillDataTextStyle(t.data);var a=ff(this);a&&lo(this.option,t,a);var i=fo(this).sourceManager;i.dirty(),i.prepareSource();var o=this.getInitialData(t,n);CL(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,fo(this).dataBeforeProcessed=o,SL(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(t){if(t&&!nn(t))for(var n=["show"],a=0;a<t.length;a++)t[a]&&t[a].label&&rs(t[a],"label",n)},e.prototype.getInitialData=function(t,n){},e.prototype.appendData=function(t){var n=this.getRawData();n.appendData(t.data)},e.prototype.getData=function(t){var n=i1(this);if(n){var a=n.context.data;return t==null?a:a.getLinkedData(t)}else return fo(this).data},e.prototype.getAllData=function(){var t=this.getData();return t&&t.getLinkedDataAll?t.getLinkedDataAll():[{data:t}]},e.prototype.setData=function(t){var n=i1(this);if(n){var a=n.context;a.outputData=t,n!==this.dataTask&&(a.data=t)}fo(this).data=t},e.prototype.getEncode=function(){var t=this.get("encode",!0);if(t)return ge(t)},e.prototype.getSourceManager=function(){return fo(this).sourceManager},e.prototype.getSource=function(){return this.getSourceManager().getSource()},e.prototype.getRawData=function(){return fo(this).dataBeforeProcessed},e.prototype.getColorBy=function(){var t=this.get("colorBy");return t||"series"},e.prototype.isColorBySeries=function(){return this.getColorBy()==="series"},e.prototype.getBaseAxis=function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},e.prototype.formatTooltip=function(t,n,a){return wL({series:this,dataIndex:t,multipleSeries:n})},e.prototype.isAnimationEnabled=function(){var t=this.ecModel;if(Ue.node&&!(t&&t.ssr))return!1;var n=this.getShallow("animation");return n&&this.getData().count()>this.getShallow("animationThreshold")&&(n=!1),!!n},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,n,a){var i=this.ecModel,o=H_.prototype.getColorFromPalette.call(this,t,n,a);return o||(o=i.getColorFromPalette(t,n,a)),o},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,n){this._innerSelect(this.getData(n),t)},e.prototype.unselect=function(t,n){var a=this.option.selectedMap;if(!!a){var i=this.option.selectedMode,o=this.getData(n);if(i==="series"||a==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s<t.length;s++){var l=t[s],u=Yd(o,l);a[u]=!1,this._selectedDataIndicesMap[u]=-1}}},e.prototype.toggleSelect=function(t,n){for(var a=[],i=0;i<t.length;i++)a[0]=t[i],this.isSelected(t[i],n)?this.unselect(a,n):this.select(a,n)},e.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var t=this._selectedDataIndicesMap,n=Fe(t),a=[],i=0;i<n.length;i++){var o=t[n[i]];o>=0&&a.push(o)}return a},e.prototype.isSelected=function(t,n){var a=this.option.selectedMap;if(!a)return!1;var i=this.getData(n);return(a==="all"||a[Yd(i,t)])&&!i.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[qd])return!0;var t=this.option.universalTransition;return t?t===!0?!0:t&&t.enabled:!1},e.prototype._innerSelect=function(t,n){var a,i,o=this.option,s=o.selectedMode,l=n.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){_e(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,c=0;c<l;c++){var f=n[c],h=Yd(t,f);u[h]=!0,this._selectedDataIndicesMap[h]=t.getRawIndex(f)}}else if(s==="single"||s===!0){var v=n[l-1],h=Yd(t,v);o.selectedMap=(a={},a[h]=!0,a),this._selectedDataIndicesMap=(i={},i[h]=t.getRawIndex(v),i)}}},e.prototype._initSelectedMapFromData=function(t){if(!this.option.selectedMap){var n=[];t.hasItemOption&&t.each(function(a){var i=t.getRawDataItem(a);i&&i.selected&&n.push(a)}),n.length>0&&this._innerSelect(t,n)}},e.registerClass=function(t){return $e.registerClass(t)},e.protoInitialize=function(){var t=e.prototype;t.type="series.__base__",t.seriesIndex=0,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"}(),e}($e);Et(Zd,K_),Et(Zd,H_),yD(Zd,$e);function SL(r){var e=r.name;R0(r)||(r.name=H9(r)||e)}function H9(r){var e=r.getRawData(),t=e.mapDimensionsAll("seriesName"),n=[];return L(t,function(a){var i=e.getDimensionInfo(a);i.displayName&&n.push(i.displayName)}),n.join(" ")}function G9(r){return r.model.getRawData().count()}function W9(r){var e=r.model;return e.setData(e.getRawData().cloneShallow()),U9}function U9(r,e){e.outputData&&r.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function CL(r,e){L(hc(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(t){r.wrapMethod(t,Ae(j9,e))})}function j9(r,e){var t=i1(r);return t&&t.setOutputEnd((e||this).count()),e}function i1(r){var e=(r.ecModel||{}).scheduler,t=e&&e.getPipeline(r.uid);if(t){var n=t.currentTask;if(n){var a=n.agentStubMap;a&&(n=a.get(r.uid))}return n}}var yt=Zd,o1=function(){function r(){this.group=new Te,this.uid=Zl("viewComponent")}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,n,a){},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,n,a){},r.prototype.updateLayout=function(e,t,n,a){},r.prototype.updateVisual=function(e,t,n,a){},r.prototype.toggleBlurSeries=function(e,t,n){},r.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},r}();B0(o1),ad(o1);var wt=o1;function iu(){var r=Ye();return function(e){var t=r(e),n=e.pipelineContext,a=!!t.large,i=!!t.progressiveRender,o=t.large=!!(n&&n.large),s=t.progressiveRender=!!(n&&n.progressiveRender);return(a!==o||i!==s)&&"reset"}}var TL=Ye(),Y9=iu(),s1=function(){function r(){this.group=new Te,this.uid=Zl("viewChart"),this.renderTask=gf({plan:q9,reset:Z9}),this.renderTask.context={view:this}}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,n,a){},r.prototype.highlight=function(e,t,n,a){var i=e.getData(a&&a.dataType);!i||ML(i,a,"emphasis")},r.prototype.downplay=function(e,t,n,a){var i=e.getData(a&&a.dataType);!i||ML(i,a,"normal")},r.prototype.remove=function(e,t){this.group.removeAll()},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,n,a){this.render(e,t,n,a)},r.prototype.updateLayout=function(e,t,n,a){this.render(e,t,n,a)},r.prototype.updateVisual=function(e,t,n,a){this.render(e,t,n,a)},r.prototype.eachRendered=function(e){oo(this.group,e)},r.markUpdateMethod=function(e,t){TL(e).updateMethod=t},r.protoInitialize=function(){var e=r.prototype;e.type="chart"}(),r}();function DL(r,e,t){r&&qc(r)&&(e==="emphasis"?hi:vi)(r,t)}function ML(r,e,t){var n=ns(r,e),a=e&&e.highlightKey!=null?wW(e.highlightKey):null;n!=null?L(st(n),function(i){DL(r.getItemGraphicEl(i),t,a)}):r.eachItemGraphicEl(function(i){DL(i,t,a)})}B0(s1),ad(s1);function q9(r){return Y9(r.model)}function Z9(r){var e=r.model,t=r.ecModel,n=r.api,a=r.payload,i=e.pipelineContext.progressiveRender,o=r.view,s=a&&TL(a).updateMethod,l=i?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,t,n,a),X9[l]}var X9={incrementalPrepareRender:{progress:function(r,e){e.view.incrementalRender(r,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(r,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},ut=s1,Xd="\0__throttleOriginMethod",AL="\0__throttleRate",LL="\0__throttleType";function Qd(r,e,t){var n,a=0,i=0,o=null,s,l,u,c;e=e||0;function f(){i=new Date().getTime(),o=null,r.apply(l,u||[])}var h=function(){for(var v=[],d=0;d<arguments.length;d++)v[d]=arguments[d];n=new Date().getTime(),l=this,u=v;var p=c||e,g=c||t;c=null,s=n-(g?a:i)-p,clearTimeout(o),g?o=setTimeout(f,p):s>=0?f():o=setTimeout(f,-s),a=n};return h.clear=function(){o&&(clearTimeout(o),o=null)},h.debounceNextCall=function(v){c=v},h}function ou(r,e,t,n){var a=r[e];if(!!a){var i=a[Xd]||a,o=a[LL],s=a[AL];if(s!==t||o!==n){if(t==null||!n)return r[e]=i;a=r[e]=Qd(i,t,n==="debounce"),a[Xd]=i,a[LL]=n,a[AL]=t}return a}}function mf(r,e){var t=r[e];t&&t[Xd]&&(t.clear&&t.clear(),r[e]=t[Xd])}var IL=Ye(),PL={itemStyle:is(rA,!0),lineStyle:is(tA,!0)},Q9={lineStyle:"stroke",itemStyle:"fill"};function EL(r,e){var t=r.visualStyleMapper||PL[e];return t||(console.warn("Unknown style type '"+e+"'."),PL.itemStyle)}function OL(r,e){var t=r.visualDrawType||Q9[e];return t||(console.warn("Unknown style type '"+e+"'."),"fill")}var K9={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData(),n=r.visualStyleAccessPath||"itemStyle",a=r.getModel(n),i=EL(r,n),o=i(a),s=a.getShallow("decal");s&&(t.setVisual("decal",s),s.dirty=!0);var l=OL(r,n),u=o[l],c=ye(u)?u:null,f=o.fill==="auto"||o.stroke==="auto";if(!o[l]||c||f){var h=r.getColorFromPalette(r.name,null,e.getSeriesCount());o[l]||(o[l]=h,t.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||ye(o.fill)?h:o.fill,o.stroke=o.stroke==="auto"||ye(o.stroke)?h:o.stroke}if(t.setVisual("style",o),t.setVisual("drawType",l),!e.isSeriesFiltered(r)&&c)return t.setVisual("colorFromPalette",!1),{dataEach:function(v,d){var p=r.getDataParams(d),g=Q({},o);g[l]=c(p),v.setItemVisual(d,"style",g)}}}},_f=new lt,J9={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!(r.ignoreStyleOnData||e.isSeriesFiltered(r))){var t=r.getData(),n=r.visualStyleAccessPath||"itemStyle",a=EL(r,n),i=t.getVisual("drawType");return{dataEach:t.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){_f.option=l[n];var u=a(_f),c=o.ensureUniqueItemVisual(s,"style");Q(c,u),_f.option.decal&&(o.setItemVisual(s,"decal",_f.option.decal),_f.option.decal.dirty=!0),i in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},eU={performRawSeries:!0,overallReset:function(r){var e=ge();r.eachSeries(function(t){var n=t.getColorBy();if(!t.isColorBySeries()){var a=t.type+"-"+n,i=e.get(a);i||(i={},e.set(a,i)),IL(t).scope=i}}),r.eachSeries(function(t){if(!(t.isColorBySeries()||r.isSeriesFiltered(t))){var n=t.getRawData(),a={},i=t.getData(),o=IL(t).scope,s=t.visualStyleAccessPath||"itemStyle",l=OL(t,s);i.each(function(u){var c=i.getRawIndex(u);a[c]=u}),n.each(function(u){var c=a[u],f=i.getItemVisual(c,"colorFromPalette");if(f){var h=i.ensureUniqueItemVisual(c,"style"),v=n.getName(u)||u+"",d=n.count();h[l]=t.getColorFromPalette(v,o,d)}})}})}},Kd=Math.PI;function tU(r,e){e=e||{},me(e,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var t=new Te,n=new Ge({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});t.add(n);var a=new We({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),i=new Ge({style:{fill:"none"},textContent:a,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});t.add(i);var o;return e.showSpinner&&(o=new xd({shape:{startAngle:-Kd/2,endAngle:-Kd/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:Kd*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Kd*3/2}).delay(300).start("circularInOut"),t.add(o)),t.resize=function(){var s=a.getBoundingRect().width,l=e.showSpinner?e.spinnerRadius:0,u=(r.getWidth()-l*2-(e.showSpinner&&s?10:0)-s)/2-(e.showSpinner&&s?0:5+s/2)+(e.showSpinner?0:s/2)+(s?0:l),c=r.getHeight()/2;e.showSpinner&&o.setShape({cx:u,cy:c}),i.setShape({x:u-l,y:c-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},t.resize(),t}var rU=function(){function r(e,t,n,a){this._stageTaskMap=ge(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),a=this._visualHandlers=a.slice(),this._allHandlers=n.concat(a)}return r.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(n){var a=n.overallTask;a&&a.dirty()})},r.prototype.getPerformArgs=function(e,t){if(!!e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),a=n.context,i=!t&&n.progressiveEnabled&&(!a||a.progressiveRender)&&e.__idxInPipeline>n.blockIndex,o=i?n.step:null,s=a&&a.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},r.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},r.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid),a=e.getData(),i=a.count(),o=n.progressiveEnabled&&t.incrementalPrepareRender&&i>=n.threshold,s=e.get("large")&&i>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?i:null;e.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(e){var t=this,n=t._pipelineMap=ge();e.eachSeries(function(a){var i=a.getProgressive(),o=a.uid;n.set(o,{id:o,head:null,tail:null,threshold:a.getProgressiveThreshold(),progressiveEnabled:i&&!(a.preventIncremental&&a.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),t._pipe(a,a.dataTask)})},r.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;L(this._allHandlers,function(a){var i=e.get(a.uid)||e.set(a.uid,{}),o="";Dr(!(a.reset&&a.overallReset),o),a.reset&&this._createSeriesStageTask(a,i,t,n),a.overallReset&&this._createOverallStageTask(a,i,t,n)},this)},r.prototype.prepareView=function(e,t,n,a){var i=e.renderTask,o=i.context;o.model=t,o.ecModel=n,o.api=a,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},r.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},r.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},r.prototype._performStageTasks=function(e,t,n,a){a=a||{};var i=!1,o=this;L(e,function(l,u){if(!(a.visualType&&a.visualType!==l.visualType)){var c=o._stageTaskMap.get(l.uid),f=c.seriesTaskMap,h=c.overallTask;if(h){var v,d=h.agentStubMap;d.each(function(g){s(a,g)&&(g.dirty(),v=!0)}),v&&h.dirty(),o.updatePayload(h,n);var p=o.getPerformArgs(h,a.block);d.each(function(g){g.perform(p)}),h.perform(p)&&(i=!0)}else f&&f.each(function(g,y){s(a,g)&&g.dirty();var m=o.getPerformArgs(g,a.block);m.skip=!l.performRawSeries&&t.isSeriesFiltered(g.context.model),o.updatePayload(g,n),g.perform(m)&&(i=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=i||this.unfinished},r.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(n){t=n.dataTask.perform()||t}),this.unfinished=t||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},r.prototype.updatePayload=function(e,t){t!=="remain"&&(e.context.payload=t)},r.prototype._createSeriesStageTask=function(e,t,n,a){var i=this,o=t.seriesTaskMap,s=t.seriesTaskMap=ge(),l=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(c):l?n.eachRawSeriesByType(l,c):u&&u(n,a).each(c);function c(f){var h=f.uid,v=s.set(h,o&&o.get(h)||gf({plan:sU,reset:lU,count:cU}));v.context={model:f,ecModel:n,api:a,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(f,v)}},r.prototype._createOverallStageTask=function(e,t,n,a){var i=this,o=t.overallTask=t.overallTask||gf({reset:nU});o.context={ecModel:n,api:a,overallReset:e.overallReset,scheduler:i};var s=o.agentStubMap,l=o.agentStubMap=ge(),u=e.seriesType,c=e.getTargetSeries,f=!0,h=!1,v="";Dr(!e.createOnAllSeries,v),u?n.eachRawSeriesByType(u,d):c?c(n,a).each(d):(f=!1,L(n.getSeries(),d));function d(p){var g=p.uid,y=l.set(g,s&&s.get(g)||(h=!0,gf({reset:aU,onDirty:oU})));y.context={model:p,overallProgress:f},y.agent=o,y.__block=f,i._pipe(p,y)}h&&o.dirty()},r.prototype._pipe=function(e,t){var n=e.uid,a=this._pipelineMap.get(n);!a.head&&(a.head=t),a.tail&&a.tail.pipe(t),a.tail=t,t.__idxInPipeline=a.count++,t.__pipeline=a},r.wrapStageHandler=function(e,t){return ye(e)&&(e={overallReset:e,seriesType:fU(e)}),e.uid=Zl("stageHandler"),t&&(e.visualType=t),e},r}();function nU(r){r.overallReset(r.ecModel,r.api,r.payload)}function aU(r){return r.overallProgress&&iU}function iU(){this.agent.dirty(),this.getDownstream().dirty()}function oU(){this.agent&&this.agent.dirty()}function sU(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function lU(r){r.useClearVisual&&r.data.clearAllVisual();var e=r.resetDefines=st(r.reset(r.model,r.ecModel,r.api,r.payload));return e.length>1?J(e,function(t,n){return RL(n)}):uU}var uU=RL(0);function RL(r){return function(e,t){var n=t.data,a=t.resetDefines[r];if(a&&a.dataEach)for(var i=e.start;i<e.end;i++)a.dataEach(n,i);else a&&a.progress&&a.progress(e,n)}}function cU(r){return r.data.count()}function fU(r){Jd=null;try{r(bf,NL)}catch{}return Jd}var bf={},NL={},Jd;kL(bf,RA),kL(NL,NA),bf.eachSeriesByType=bf.eachRawSeriesByType=function(r){Jd=r},bf.eachComponent=function(r){r.mainType==="series"&&r.subType&&(Jd=r.subType)};function kL(r,e){for(var t in e.prototype)r[t]=Ot}var BL=rU,zL=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],hU={color:zL,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],zL]},Ur="#B9B8CE",FL="#100C2A",ep=function(){return{axisLine:{lineStyle:{color:Ur}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},VL=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],$L={darkMode:!0,color:VL,backgroundColor:FL,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:Ur}},textStyle:{color:Ur},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:Ur}},dataZoom:{borderColor:"#71708A",textStyle:{color:Ur},brushStyle:{color:"rgba(135,163,206,0.3)"},handleStyle:{color:"#353450",borderColor:"#C5CBE3"},moveHandleStyle:{color:"#B0B6C3",opacity:.3},fillerColor:"rgba(135,163,206,0.2)",emphasis:{handleStyle:{borderColor:"#91B7F2",color:"#4D587D"},moveHandleStyle:{color:"#636D9A",opacity:.7}},dataBackground:{lineStyle:{color:"#71708A",width:1},areaStyle:{color:"#71708A"}},selectedDataBackground:{lineStyle:{color:"#87A3CE"},areaStyle:{color:"#87A3CE"}}},visualMap:{textStyle:{color:Ur}},timeline:{lineStyle:{color:Ur},label:{color:Ur},controlStyle:{color:Ur,borderColor:Ur}},calendar:{itemStyle:{color:FL},dayLabel:{color:Ur},monthLabel:{color:Ur},yearLabel:{color:Ur}},timeAxis:ep(),logAxis:ep(),valueAxis:ep(),categoryAxis:ep(),line:{symbol:"circle"},graph:{color:VL},gauge:{title:{color:Ur},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:Ur},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};$L.categoryAxis.splitLine.show=!1;var vU=$L,dU=function(){function r(){}return r.prototype.normalizeQuery=function(e){var t={},n={},a={};if(ce(e)){var i=ka(e);t.mainType=i.main||null,t.subType=i.sub||null}else{var o=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};L(e,function(l,u){for(var c=!1,f=0;f<o.length;f++){var h=o[f],v=u.lastIndexOf(h);if(v>0&&v===u.length-h.length){var d=u.slice(0,v);d!=="data"&&(t.mainType=d,t[h.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(n[u]=l,c=!0),c||(a[u]=l)})}return{cptQuery:t,dataQuery:n,otherQuery:a}},r.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var a=n.targetEl,i=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=t.cptQuery,u=t.dataQuery;return c(l,o,"mainType")&&c(l,o,"subType")&&c(l,o,"index","componentIndex")&&c(l,o,"name")&&c(l,o,"id")&&c(u,i,"name")&&c(u,i,"dataIndex")&&c(u,i,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,t.otherQuery,a,i));function c(f,h,v,d){return f[v]==null||h[d||v]===f[v]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r}(),l1=["symbol","symbolSize","symbolRotate","symbolOffset"],HL=l1.concat(["symbolKeepAspect"]),pU={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData();if(r.legendIcon&&t.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var n={},a={},i=!1,o=0;o<l1.length;o++){var s=l1[o],l=r.get(s);ye(l)?(i=!0,a[s]=l):n[s]=l}if(n.symbol=n.symbol||r.defaultSymbol,t.setVisual(Q({legendIcon:r.legendIcon||n.symbol,symbolKeepAspect:r.get("symbolKeepAspect")},n)),e.isSeriesFiltered(r))return;var u=Fe(a);function c(f,h){for(var v=r.getRawValue(h),d=r.getDataParams(h),p=0;p<u.length;p++){var g=u[p];f.setItemVisual(h,g,a[g](v,d))}}return{dataEach:i?c:null}}},gU={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!r.hasSymbolVisual||e.isSeriesFiltered(r))return;var t=r.getData();function n(a,i){for(var o=a.getItemModel(i),s=0;s<HL.length;s++){var l=HL[s],u=o.getShallow(l,!0);u!=null&&a.setItemVisual(i,l,u)}}return{dataEach:t.hasItemOption?n:null}}};function u1(r,e,t){switch(t){case"color":var n=r.getItemVisual(e,"style");return n[r.getVisual("drawType")];case"opacity":return r.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getItemVisual(e,t)}}function xf(r,e){switch(e){case"color":var t=r.getVisual("style");return t[r.getVisual("drawType")];case"opacity":return r.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getVisual(e)}}function GL(r,e,t,n){switch(t){case"color":var a=r.ensureUniqueItemVisual(e,"style");a[r.getVisual("drawType")]=n,r.setItemVisual(e,"colorFromPalette",!1);break;case"opacity":r.ensureUniqueItemVisual(e,"style").opacity=n;break;case"symbol":case"symbolSize":case"liftZ":r.setItemVisual(e,t,n);break}}function WL(r,e){function t(n,a){var i=[];return n.eachComponent({mainType:"series",subType:r,query:a},function(o){i.push(o.seriesIndex)}),i}L([[r+"ToggleSelect","toggleSelect"],[r+"Select","select"],[r+"UnSelect","unselect"]],function(n){e(n[0],function(a,i,o){a=Q({},a),o.dispatchAction(Q(a,{type:n[1],seriesIndex:t(i,a)}))})})}function su(r,e,t,n,a){var i=r+e;t.isSilent(i)||n.eachComponent({mainType:"series",subType:"pie"},function(o){for(var s=o.seriesIndex,l=o.option.selectedMap,u=a.selected,c=0;c<u.length;c++)if(u[c].seriesIndex===s){var f=o.getData(),h=ns(f,a.fromActionPayload);t.trigger(i,{type:i,seriesId:o.id,name:K(h)?f.getName(h[0]):f.getName(h),selected:ce(l)?l:Q({},l)})}})}function yU(r,e,t){r.on("selectchanged",function(n){var a=t.getModel();n.isFromClick?(su("map","selectchanged",e,a,n),su("pie","selectchanged",e,a,n)):n.fromAction==="select"?(su("map","selected",e,a,n),su("pie","selected",e,a,n)):n.fromAction==="unselect"&&(su("map","unselected",e,a,n),su("pie","unselected",e,a,n))})}function As(r,e,t){for(var n;r&&!(e(r)&&(n=r,t));)r=r.__hostTarget||r.parent;return n}var mU=Math.round(Math.random()*9),_U=typeof Object.defineProperty=="function",bU=function(){function r(){this._id="__ec_inner_"+mU++}return r.prototype.get=function(e){return this._guard(e)[this._id]},r.prototype.set=function(e,t){var n=this._guard(e);return _U?Object.defineProperty(n,this._id,{value:t,enumerable:!1,configurable:!0}):n[this._id]=t,this},r.prototype.delete=function(e){return this.has(e)?(delete this._guard(e)[this._id],!0):!1},r.prototype.has=function(e){return!!this._guard(e)[this._id]},r.prototype._guard=function(e){if(e!==Object(e))throw TypeError("Value of WeakMap is not a non-null object.");return e},r}(),xU=bU,wU=Be.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,e){var t=e.cx,n=e.cy,a=e.width/2,i=e.height/2;r.moveTo(t,n-i),r.lineTo(t+a,n+i),r.lineTo(t-a,n+i),r.closePath()}}),SU=Be.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,e){var t=e.cx,n=e.cy,a=e.width/2,i=e.height/2;r.moveTo(t,n-i),r.lineTo(t+a,n),r.lineTo(t,n+i),r.lineTo(t-a,n),r.closePath()}}),CU=Be.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,e){var t=e.x,n=e.y,a=e.width/5*3,i=Math.max(a,e.height),o=a/2,s=o*o/(i-o),l=n-i+o+s,u=Math.asin(s/o),c=Math.cos(u)*o,f=Math.sin(u),h=Math.cos(u),v=o*.6,d=o*.7;r.moveTo(t-c,l+s),r.arc(t,l,o,Math.PI-u,Math.PI*2+u),r.bezierCurveTo(t+c-f*v,l+s+h*v,t,n-d,t,n),r.bezierCurveTo(t,n-d,t-c+f*v,l+s+h*v,t-c,l+s),r.closePath()}}),TU=Be.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,e){var t=e.height,n=e.width,a=e.x,i=e.y,o=n/3*2;r.moveTo(a,i),r.lineTo(a+o,i+t),r.lineTo(a,i+t/4*3),r.lineTo(a-o,i+t),r.lineTo(a,i),r.closePath()}}),DU={line:tr,rect:Ge,roundRect:Ge,square:Ge,circle:ha,diamond:SU,pin:CU,arrow:TU,triangle:wU},MU={line:function(r,e,t,n,a){a.x1=r,a.y1=e+n/2,a.x2=r+t,a.y2=e+n/2},rect:function(r,e,t,n,a){a.x=r,a.y=e,a.width=t,a.height=n},roundRect:function(r,e,t,n,a){a.x=r,a.y=e,a.width=t,a.height=n,a.r=Math.min(t,n)/4},square:function(r,e,t,n,a){var i=Math.min(t,n);a.x=r,a.y=e,a.width=i,a.height=i},circle:function(r,e,t,n,a){a.cx=r+t/2,a.cy=e+n/2,a.r=Math.min(t,n)/2},diamond:function(r,e,t,n,a){a.cx=r+t/2,a.cy=e+n/2,a.width=t,a.height=n},pin:function(r,e,t,n,a){a.x=r+t/2,a.y=e+n/2,a.width=t,a.height=n},arrow:function(r,e,t,n,a){a.x=r+t/2,a.y=e+n/2,a.width=t,a.height=n},triangle:function(r,e,t,n,a){a.cx=r+t/2,a.cy=e+n/2,a.width=t,a.height=n}},tp={};L(DU,function(r,e){tp[e]=new r});var AU=Be.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(r,e,t){var n=ed(r,e,t),a=this.shape;return a&&a.symbolType==="pin"&&e.position==="inside"&&(n.y=t.y+t.height*.4),n},buildPath:function(r,e,t){var n=e.symbolType;if(n!=="none"){var a=tp[n];a||(n="rect",a=tp[n]),MU[n](e.x,e.y,e.width,e.height,a.shape),a.buildPath(r,a.shape,t)}}});function LU(r,e){if(this.type!=="image"){var t=this.style;this.__isEmptyBrush?(t.stroke=r,t.fill=e||"#fff",t.lineWidth=2):this.shape.symbolType==="line"?t.stroke=r:t.fill=r,this.markRedraw()}}function kt(r,e,t,n,a,i,o){var s=r.indexOf("empty")===0;s&&(r=r.substr(5,1).toLowerCase()+r.substr(6));var l;return r.indexOf("image://")===0?l=m_(r.slice(8),new Re(e,t,n,a),o?"center":"cover"):r.indexOf("path://")===0?l=tf(r.slice(7),{},new Re(e,t,n,a),o?"center":"cover"):l=new AU({shape:{symbolType:r,x:e,y:t,width:n,height:a}}),l.__isEmptyBrush=s,l.setColor=LU,i&&l.setColor(i),l}function wf(r){return K(r)||(r=[+r,+r]),[r[0]||0,r[1]||0]}function lu(r,e){if(r!=null)return K(r)||(r=[r,r]),[le(r[0],e[0])||0,le(Ee(r[1],r[0]),e[1])||0]}function Ls(r){return isFinite(r)}function IU(r,e,t){var n=e.x==null?0:e.x,a=e.x2==null?1:e.x2,i=e.y==null?0:e.y,o=e.y2==null?0:e.y2;e.global||(n=n*t.width+t.x,a=a*t.width+t.x,i=i*t.height+t.y,o=o*t.height+t.y),n=Ls(n)?n:0,a=Ls(a)?a:1,i=Ls(i)?i:0,o=Ls(o)?o:0;var s=r.createLinearGradient(n,i,a,o);return s}function PU(r,e,t){var n=t.width,a=t.height,i=Math.min(n,a),o=e.x==null?.5:e.x,s=e.y==null?.5:e.y,l=e.r==null?.5:e.r;e.global||(o=o*n+t.x,s=s*a+t.y,l=l*i),o=Ls(o)?o:.5,s=Ls(s)?s:.5,l=l>=0&&Ls(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function c1(r,e,t){for(var n=e.type==="radial"?PU(r,e,t):IU(r,e,t),a=e.colorStops,i=0;i<a.length;i++)n.addColorStop(a[i].offset,a[i].color);return n}function EU(r,e){if(r===e||!r&&!e)return!1;if(!r||!e||r.length!==e.length)return!0;for(var t=0;t<r.length;t++)if(r[t]!==e[t])return!0;return!1}function rp(r){return parseInt(r,10)}function uu(r,e,t){var n=["width","height"][e],a=["clientWidth","clientHeight"][e],i=["paddingLeft","paddingTop"][e],o=["paddingRight","paddingBottom"][e];if(t[n]!=null&&t[n]!=="auto")return parseFloat(t[n]);var s=document.defaultView.getComputedStyle(r);return(r[a]||rp(s[n])||rp(r.style[n]))-(rp(s[i])||0)-(rp(s[o])||0)|0}function OU(r,e){return!r||r==="solid"||!(e>0)?null:r==="dashed"?[4*e,2*e]:r==="dotted"?[e]:je(r)?[r]:K(r)?r:null}function f1(r){var e=r.style,t=e.lineDash&&e.lineWidth>0&&OU(e.lineDash,e.lineWidth),n=e.lineDashOffset;if(t){var a=e.strokeNoScale&&r.getLineScale?r.getLineScale():1;a&&a!==1&&(t=J(t,function(i){return i/a}),n/=a)}return[t,n]}var RU=new Va(!0);function np(r){var e=r.stroke;return!(e==null||e==="none"||!(r.lineWidth>0))}function UL(r){return typeof r=="string"&&r!=="none"}function ap(r){var e=r.fill;return e!=null&&e!=="none"}function jL(r,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.fillOpacity*e.opacity,r.fill(),r.globalAlpha=t}else r.fill()}function YL(r,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.strokeOpacity*e.opacity,r.stroke(),r.globalAlpha=t}else r.stroke()}function h1(r,e,t){var n=F0(e.image,e.__image,t);if(id(n)){var a=r.createPattern(n,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&a&&a.setTransform){var i=new DOMMatrix;i.translateSelf(e.x||0,e.y||0),i.rotateSelf(0,0,(e.rotation||0)*dc),i.scaleSelf(e.scaleX||1,e.scaleY||1),a.setTransform(i)}return a}}function NU(r,e,t,n){var a,i=np(t),o=ap(t),s=t.strokePercent,l=s<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var c=e.path||RU,f=e.__dirty;if(!n){var h=t.fill,v=t.stroke,d=o&&!!h.colorStops,p=i&&!!v.colorStops,g=o&&!!h.image,y=i&&!!v.image,m=void 0,_=void 0,b=void 0,w=void 0,x=void 0;(d||p)&&(x=e.getBoundingRect()),d&&(m=f?c1(r,h,x):e.__canvasFillGradient,e.__canvasFillGradient=m),p&&(_=f?c1(r,v,x):e.__canvasStrokeGradient,e.__canvasStrokeGradient=_),g&&(b=f||!e.__canvasFillPattern?h1(r,h,e):e.__canvasFillPattern,e.__canvasFillPattern=b),y&&(w=f||!e.__canvasStrokePattern?h1(r,v,e):e.__canvasStrokePattern,e.__canvasStrokePattern=b),d?r.fillStyle=m:g&&(b?r.fillStyle=b:o=!1),p?r.strokeStyle=_:y&&(w?r.strokeStyle=w:i=!1)}var S=e.getGlobalScale();c.setScale(S[0],S[1],e.segmentIgnoreThreshold);var T,D;r.setLineDash&&t.lineDash&&(a=f1(e),T=a[0],D=a[1]);var M=!0;(u||f&Al)&&(c.setDPR(r.dpr),l?c.setContext(null):(c.setContext(r),M=!1),c.reset(),e.buildPath(c,e.shape,n),c.toStatic(),e.pathUpdated()),M&&c.rebuildPath(r,l?s:1),T&&(r.setLineDash(T),r.lineDashOffset=D),n||(t.strokeFirst?(i&&YL(r,t),o&&jL(r,t)):(o&&jL(r,t),i&&YL(r,t))),T&&r.setLineDash([])}function kU(r,e,t){var n=e.__image=F0(t.image,e.__image,e,e.onload);if(!(!n||!id(n))){var a=t.x||0,i=t.y||0,o=e.getWidth(),s=e.getHeight(),l=n.width/n.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=n.width,s=n.height),t.sWidth&&t.sHeight){var u=t.sx||0,c=t.sy||0;r.drawImage(n,u,c,t.sWidth,t.sHeight,a,i,o,s)}else if(t.sx&&t.sy){var u=t.sx,c=t.sy,f=o-u,h=s-c;r.drawImage(n,u,c,f,h,a,i,o,s)}else r.drawImage(n,a,i,o,s)}}function BU(r,e,t){var n,a=t.text;if(a!=null&&(a+=""),a){r.font=t.font||Hi,r.textAlign=t.textAlign,r.textBaseline=t.textBaseline;var i=void 0,o=void 0;r.setLineDash&&t.lineDash&&(n=f1(e),i=n[0],o=n[1]),i&&(r.setLineDash(i),r.lineDashOffset=o),t.strokeFirst?(np(t)&&r.strokeText(a,t.x,t.y),ap(t)&&r.fillText(a,t.x,t.y)):(ap(t)&&r.fillText(a,t.x,t.y),np(t)&&r.strokeText(a,t.x,t.y)),i&&r.setLineDash([])}}var qL=["shadowBlur","shadowOffsetX","shadowOffsetY"],ZL=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function XL(r,e,t,n,a){var i=!1;if(!n&&(t=t||{},e===t))return!1;if(n||e.opacity!==t.opacity){un(r,a),i=!0;var o=Math.max(Math.min(e.opacity,1),0);r.globalAlpha=isNaN(o)?os.opacity:o}(n||e.blend!==t.blend)&&(i||(un(r,a),i=!0),r.globalCompositeOperation=e.blend||os.blend);for(var s=0;s<qL.length;s++){var l=qL[s];(n||e[l]!==t[l])&&(i||(un(r,a),i=!0),r[l]=r.dpr*(e[l]||0))}return(n||e.shadowColor!==t.shadowColor)&&(i||(un(r,a),i=!0),r.shadowColor=e.shadowColor||os.shadowColor),i}function QL(r,e,t,n,a){var i=Sf(e,a.inHover),o=n?null:t&&Sf(t,a.inHover)||{};if(i===o)return!1;var s=XL(r,i,o,n,a);if((n||i.fill!==o.fill)&&(s||(un(r,a),s=!0),UL(i.fill)&&(r.fillStyle=i.fill)),(n||i.stroke!==o.stroke)&&(s||(un(r,a),s=!0),UL(i.stroke)&&(r.strokeStyle=i.stroke)),(n||i.opacity!==o.opacity)&&(s||(un(r,a),s=!0),r.globalAlpha=i.opacity==null?1:i.opacity),e.hasStroke()){var l=i.lineWidth,u=l/(i.strokeNoScale&&e.getLineScale?e.getLineScale():1);r.lineWidth!==u&&(s||(un(r,a),s=!0),r.lineWidth=u)}for(var c=0;c<ZL.length;c++){var f=ZL[c],h=f[0];(n||i[h]!==o[h])&&(s||(un(r,a),s=!0),r[h]=i[h]||f[1])}return s}function zU(r,e,t,n,a){return XL(r,Sf(e,a.inHover),t&&Sf(t,a.inHover),n,a)}function KL(r,e){var t=e.transform,n=r.dpr||1;t?r.setTransform(n*t[0],n*t[1],n*t[2],n*t[3],n*t[4],n*t[5]):r.setTransform(n,0,0,n,0,0)}function FU(r,e,t){for(var n=!1,a=0;a<r.length;a++){var i=r[a];n=n||i.isZeroArea(),KL(e,i),e.beginPath(),i.buildPath(e,i.shape),e.clip()}t.allClipped=n}function VU(r,e){return r&&e?r[0]!==e[0]||r[1]!==e[1]||r[2]!==e[2]||r[3]!==e[3]||r[4]!==e[4]||r[5]!==e[5]:!(!r&&!e)}var JL=1,eI=2,tI=3,rI=4;function $U(r){var e=ap(r),t=np(r);return!(r.lineDash||!(+e^+t)||e&&typeof r.fill!="string"||t&&typeof r.stroke!="string"||r.strokePercent<1||r.strokeOpacity<1||r.fillOpacity<1)}function un(r,e){e.batchFill&&r.fill(),e.batchStroke&&r.stroke(),e.batchFill="",e.batchStroke=""}function Sf(r,e){return e&&r.__hoverStyle||r.style}function v1(r,e){Is(r,e,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function Is(r,e,t,n){var a=e.transform;if(!e.shouldBePainted(t.viewWidth,t.viewHeight,!1,!1)){e.__dirty&=~yn,e.__isRendered=!1;return}var i=e.__clipPaths,o=t.prevElClipPaths,s=!1,l=!1;if((!o||EU(i,o))&&(o&&o.length&&(un(r,t),r.restore(),l=s=!0,t.prevElClipPaths=null,t.allClipped=!1,t.prevEl=null),i&&i.length&&(un(r,t),r.save(),FU(i,r,t),s=!0),t.prevElClipPaths=i),t.allClipped){e.__isRendered=!1;return}e.beforeBrush&&e.beforeBrush(),e.innerBeforeBrush();var u=t.prevEl;u||(l=s=!0);var c=e instanceof Be&&e.autoBatch&&$U(e.style);s||VU(a,u.transform)?(un(r,t),KL(r,e)):c||un(r,t);var f=Sf(e,t.inHover);e instanceof Be?(t.lastDrawType!==JL&&(l=!0,t.lastDrawType=JL),QL(r,e,u,l,t),(!c||!t.batchFill&&!t.batchStroke)&&r.beginPath(),NU(r,e,f,c),c&&(t.batchFill=f.fill||"",t.batchStroke=f.stroke||"")):e instanceof Gc?(t.lastDrawType!==tI&&(l=!0,t.lastDrawType=tI),QL(r,e,u,l,t),BU(r,e,f)):e instanceof ur?(t.lastDrawType!==eI&&(l=!0,t.lastDrawType=eI),zU(r,e,u,l,t),kU(r,e,f)):e.getTemporalDisplayables&&(t.lastDrawType!==rI&&(l=!0,t.lastDrawType=rI),HU(r,e,t)),c&&n&&un(r,t),e.innerAfterBrush(),e.afterBrush&&e.afterBrush(),t.prevEl=e,e.__dirty=0,e.__isRendered=!0}function HU(r,e,t){var n=e.getDisplayables(),a=e.getTemporalDisplayables();r.save();var i={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:t.viewWidth,viewHeight:t.viewHeight,inHover:t.inHover},o,s;for(o=e.getCursor(),s=n.length;o<s;o++){var l=n[o];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),Is(r,l,i,o===s-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),i.prevEl=l}for(var u=0,c=a.length;u<c;u++){var l=a[u];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),Is(r,l,i,u===c-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),i.prevEl=l}e.clearTemporalDisplayables(),e.notClear=!0,r.restore()}var d1=new xU,nI=new Tc(100),aI=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function cu(r,e){if(r==="none")return null;var t=e.getDevicePixelRatio(),n=e.getZr(),a=n.painter.type==="svg";r.dirty&&d1.delete(r);var i=d1.get(r);if(i)return i;var o=me(r,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});o.backgroundColor==="none"&&(o.backgroundColor=null);var s={repeat:"repeat"};return l(s),s.rotation=o.rotation,s.scaleX=s.scaleY=a?1:1/t,d1.set(r,s),r.dirty=!1,s;function l(u){for(var c=[t],f=!0,h=0;h<aI.length;++h){var v=o[aI[h]];if(v!=null&&!K(v)&&!ce(v)&&!je(v)&&typeof v!="boolean"){f=!1;break}c.push(v)}var d;if(f){d=c.join(",")+(a?"-svg":"");var p=nI.get(d);p&&(a?u.svgElement=p:u.image=p)}var g=oI(o.dashArrayX),y=GU(o.dashArrayY),m=iI(o.symbol),_=WU(g),b=sI(y),w=!a&&ia.createCanvas(),x=a&&{tag:"g",attrs:{},key:"dcl",children:[]},S=D(),T;w&&(w.width=S.width*t,w.height=S.height*t,T=w.getContext("2d")),M(),f&&nI.put(d,w||x),u.image=w,u.svgElement=x,u.svgWidth=S.width,u.svgHeight=S.height;function D(){for(var A=1,I=0,P=_.length;I<P;++I)A=oD(A,_[I]);for(var E=1,I=0,P=m.length;I<P;++I)E=oD(E,m[I].length);A*=E;var O=b*_.length*m.length;return{width:Math.max(1,Math.min(A,o.maxTileWidth)),height:Math.max(1,Math.min(O,o.maxTileHeight))}}function M(){T&&(T.clearRect(0,0,w.width,w.height),o.backgroundColor&&(T.fillStyle=o.backgroundColor,T.fillRect(0,0,w.width,w.height)));for(var A=0,I=0;I<y.length;++I)A+=y[I];if(A<=0)return;for(var P=-b,E=0,O=0,N=0;P<S.height;){if(E%2===0){for(var V=O/2%m.length,$=0,U=0,Y=0;$<S.width*2;){for(var ae=0,I=0;I<g[N].length;++I)ae+=g[N][I];if(ae<=0)break;if(U%2===0){var H=(1-o.symbolSize)*.5,q=$+g[N][U]*H,X=P+y[E]*H,Z=g[N][U]*o.symbolSize,ie=y[E]*o.symbolSize,se=Y/2%m[V].length;te(q,X,Z,ie,m[V][se])}$+=g[N][U],++Y,++U,U===g[N].length&&(U=0)}++N,N===g.length&&(N=0)}P+=y[E],++O,++E,E===y.length&&(E=0)}function te(ve,R,F,G,re){var ne=a?1:t,ee=kt(re,ve*ne,R*ne,F*ne,G*ne,o.color,o.symbolKeepAspect);if(a){var ue=n.painter.renderOneToVNode(ee);ue&&x.children.push(ue)}else v1(T,ee)}}}}function iI(r){if(!r||r.length===0)return[["rect"]];if(ce(r))return[[r]];for(var e=!0,t=0;t<r.length;++t)if(!ce(r[t])){e=!1;break}if(e)return iI([r]);for(var n=[],t=0;t<r.length;++t)ce(r[t])?n.push([r[t]]):n.push(r[t]);return n}function oI(r){if(!r||r.length===0)return[[0,0]];if(je(r)){var e=Math.ceil(r);return[[e,e]]}for(var t=!0,n=0;n<r.length;++n)if(!je(r[n])){t=!1;break}if(t)return oI([r]);for(var a=[],n=0;n<r.length;++n)if(je(r[n])){var e=Math.ceil(r[n]);a.push([e,e])}else{var e=J(r[n],function(s){return Math.ceil(s)});e.length%2===1?a.push(e.concat(e)):a.push(e)}return a}function GU(r){if(!r||typeof r=="object"&&r.length===0)return[0,0];if(je(r)){var e=Math.ceil(r);return[e,e]}var t=J(r,function(n){return Math.ceil(n)});return r.length%2?t.concat(t):t}function WU(r){return J(r,function(e){return sI(e)})}function sI(r){for(var e=0,t=0;t<r.length;++t)e+=r[t];return r.length%2===1?e*2:e}function UU(r,e){r.eachRawSeries(function(t){if(!r.isSeriesFiltered(t)){var n=t.getData();n.hasItemVisual()&&n.each(function(o){var s=n.getItemVisual(o,"decal");if(s){var l=n.ensureUniqueItemVisual(o,"style");l.decal=cu(s,e)}});var a=n.getVisual("decal");if(a){var i=n.getVisual("style");i.decal=cu(a,e)}}})}var jU=new On,ya=jU,lI={};function YU(r,e){lI[r]=e}function uI(r){return lI[r]}var qU="5.4.1",ZU={zrender:"5.4.1"},XU=1,QU=800,KU=900,JU=1e3,e6=2e3,t6=5e3,cI=1e3,r6=1100,p1=2e3,fI=3e3,n6=4e3,ip=4500,a6=4600,i6=5e3,o6=6e3,hI=7e3,vI={PROCESSOR:{FILTER:JU,SERIES_FILTER:QU,STATISTIC:t6},VISUAL:{LAYOUT:cI,PROGRESSIVE_LAYOUT:r6,GLOBAL:p1,CHART:fI,POST_CHART_LAYOUT:a6,COMPONENT:n6,BRUSH:i6,CHART_ITEM:ip,ARIA:o6,DECAL:hI}},Pr="__flagInMainProcess",cn="__pendingUpdate",g1="__needsUpdateStatus",dI=/^[a-zA-Z0-9_]+$/,y1="__connectUpdateStatus",pI=0,s6=1,l6=2;function gI(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(this.isDisposed()){this.id;return}return mI(this,r,e)}}function yI(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mI(this,r,e)}}function mI(r,e,t){return t[0]=t[0]&&t[0].toLowerCase(),On.prototype[e].apply(r,t)}var _I=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(On),bI=_I.prototype;bI.on=yI("on"),bI.off=yI("off");var fu,m1,op,ho,_1,b1,x1,Cf,Tf,xI,wI,w1,SI,sp,CI,TI,Wn,DI,lp=function(r){j(e,r);function e(t,n,a){var i=r.call(this,new dU)||this;i._chartsViews=[],i._chartsMap={},i._componentsViews=[],i._componentsMap={},i._pendingActions=[],a=a||{},ce(n)&&(n=MI[n]),i._dom=t;var o="canvas",s="auto",l=!1,u=i._zr=M0(t,{renderer:a.renderer||o,devicePixelRatio:a.devicePixelRatio,width:a.width,height:a.height,ssr:a.ssr,useDirtyRect:Ee(a.useDirtyRect,l),useCoarsePointer:Ee(a.useCoarsePointer,s),pointerSize:a.pointerSize});i._ssr=a.ssr,i._throttledZrFlush=Qd(fe(u.flush,u),17),n=we(n),n&&HA(n,!0),i._theme=n,i._locale=m7(a.locale||nA),i._coordSysMgr=new ru;var c=i._api=CI(i);function f(h,v){return h.__prio-v.__prio}return Nv(cp,f),Nv(C1,f),i._scheduler=new BL(i,c,C1,cp),i._messageCenter=new _I,i._initEvents(),i.resize=fe(i.resize,i),u.animation.on("frame",i._onframe,i),xI(u,i),wI(u,i),fc(i),i}return e.prototype._onframe=function(){if(!this._disposed){DI(this);var t=this._scheduler;if(this[cn]){var n=this[cn].silent;this[Pr]=!0;try{fu(this),ho.update.call(this,null,this[cn].updateParams)}catch(l){throw this[Pr]=!1,this[cn]=null,l}this._zr.flush(),this[Pr]=!1,this[cn]=null,Cf.call(this,n),Tf.call(this,n)}else if(t.unfinished){var a=XU,i=this._model,o=this._api;t.unfinished=!1;do{var s=+new Date;t.performSeriesTasks(i),t.performDataProcessorTasks(i),b1(this,i),t.performVisualTasks(i),sp(this,this._model,o,"remain",{}),a-=+new Date-s}while(a>0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(t,n,a){if(!this[Pr]){if(this._disposed){this.id;return}var i,o,s;if(_e(n)&&(a=n.lazyUpdate,i=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[Pr]=!0,!this._model||n){var l=new K7(this._api),u=this._theme,c=this._model=new RA;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(t,{replaceMerge:o},T1);var f={seriesTransition:s,optionChanged:!0};if(a)this[cn]={silent:i,updateParams:f},this[Pr]=!1,this.getZr().wakeUp();else{try{fu(this),ho.update.call(this,null,f)}catch(h){throw this[cn]=null,this[Pr]=!1,h}this._ssr||this._zr.flush(),this[cn]=null,this[Pr]=!1,Cf.call(this,i),Tf.call(this,i)}}},e.prototype.setTheme=function(){},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Ue.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){t=t||{};var n=this._zr.painter;return n.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){t=t||{};var n=this._zr.painter;return n.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){if(!!Ue.svgSupported){var t=this._zr,n=t.storage.getDisplayList();return L(n,function(a){a.stopAnimation(null,!0)}),t.painter.toDataURL()}},e.prototype.getDataURL=function(t){if(this._disposed){this.id;return}t=t||{};var n=t.excludeComponents,a=this._model,i=[],o=this;L(n,function(l){a.eachComponent({mainType:l},function(u){var c=o._componentsMap[u.__viewId];c.group.ignore||(i.push(c),c.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return L(i,function(l){l.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(t){if(this._disposed){this.id;return}var n=t.type==="svg",a=this.group,i=Math.min,o=Math.max,s=1/0;if(fp[a]){var l=s,u=s,c=-s,f=-s,h=[],v=t&&t.pixelRatio||this.getDevicePixelRatio();L(Ps,function(_,b){if(_.group===a){var w=n?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(we(t)),x=_.getDom().getBoundingClientRect();l=i(x.left,l),u=i(x.top,u),c=o(x.right,c),f=o(x.bottom,f),h.push({dom:w,left:x.left,top:x.top})}}),l*=v,u*=v,c*=v,f*=v;var d=c-l,p=f-u,g=ia.createCanvas(),y=M0(g,{renderer:n?"svg":"canvas"});if(y.resize({width:d,height:p}),n){var m="";return L(h,function(_){var b=_.left-l,w=_.top-u;m+='<g transform="translate('+b+","+w+')">'+_.dom+"</g>"}),y.painter.getSvgRoot().innerHTML=m,t.connectedBackgroundColor&&y.painter.setBackgroundColor(t.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}else return t.connectedBackgroundColor&&y.add(new Ge({shape:{x:0,y:0,width:d,height:p},style:{fill:t.connectedBackgroundColor}})),L(h,function(_){var b=new ur({style:{x:_.left*v-l,y:_.top*v-u,image:_.dom}});y.add(b)}),y.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}else return this.getDataURL(t)},e.prototype.convertToPixel=function(t,n){return _1(this,"convertToPixel",t,n)},e.prototype.convertFromPixel=function(t,n){return _1(this,"convertFromPixel",t,n)},e.prototype.containPixel=function(t,n){if(this._disposed){this.id;return}var a=this._model,i,o=Fc(a,t);return L(o,function(s,l){l.indexOf("Models")>=0&&L(s,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)i=i||!!c.containPoint(n);else if(l==="seriesModels"){var f=this._chartsMap[u.__viewId];f&&f.containPoint&&(i=i||f.containPoint(n,u))}},this)},this),!!i},e.prototype.getVisual=function(t,n){var a=this._model,i=Fc(a,t,{defaultMainType:"series"}),o=i.seriesModel,s=o.getData(),l=i.hasOwnProperty("dataIndexInside")?i.dataIndexInside:i.hasOwnProperty("dataIndex")?s.indexOfRawIndex(i.dataIndex):null;return l!=null?u1(s,l,n):xf(s,n)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t=this;L(u6,function(n){var a=function(i){var o=t.getModel(),s=i.target,l,u=n==="globalout";if(u?l={}:s&&As(s,function(d){var p=Me(d);if(p&&p.dataIndex!=null){var g=p.dataModel||o.getSeriesByIndex(p.seriesIndex);return l=g&&g.getDataParams(p.dataIndex,p.dataType)||{},!0}else if(p.eventData)return l=Q({},p.eventData),!0},!0),l){var c=l.componentType,f=l.componentIndex;(c==="markLine"||c==="markPoint"||c==="markArea")&&(c="series",f=l.seriesIndex);var h=c&&f!=null&&o.getComponent(c,f),v=h&&t[h.mainType==="series"?"_chartsMap":"_componentsMap"][h.__viewId];l.event=i,l.type=n,t._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:h,view:v},t.trigger(n,l)}};a.zrEventfulCallAtLast=!0,t._zr.on(n,a,t)}),L(Df,function(n,a){t._messageCenter.on(a,function(i){this.trigger(a,i)},t)}),L(["selectchanged"],function(n){t._messageCenter.on(n,function(a){this.trigger(n,a)},t)}),yU(this._messageCenter,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var t=this.getDom();t&&dD(this.getDom(),M1,"");var n=this,a=n._api,i=n._model;L(n._componentsViews,function(o){o.dispose(i,a)}),L(n._chartsViews,function(o){o.dispose(i,a)}),n._zr.dispose(),n._dom=n._model=n._chartsMap=n._componentsMap=n._chartsViews=n._componentsViews=n._scheduler=n._api=n._zr=n._throttledZrFlush=n._theme=n._coordSysMgr=n._messageCenter=null,delete Ps[n.id]},e.prototype.resize=function(t){if(!this[Pr]){if(this._disposed){this.id;return}this._zr.resize(t);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var a=n.resetOption("media"),i=t&&t.silent;this[cn]&&(i==null&&(i=this[cn].silent),a=!0,this[cn]=null),this[Pr]=!0;try{a&&fu(this),ho.update.call(this,{type:"resize",animation:Q({duration:0},t&&t.animation)})}catch(o){throw this[Pr]=!1,o}this[Pr]=!1,Cf.call(this,i),Tf.call(this,i)}}},e.prototype.showLoading=function(t,n){if(this._disposed){this.id;return}if(_e(t)&&(n=t,t=""),t=t||"default",this.hideLoading(),!!D1[t]){var a=D1[t](this._api,n),i=this._zr;this._loadingFX=a,i.add(a)}},e.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(t){var n=Q({},t);return n.type=Df[t.type],n},e.prototype.dispatchAction=function(t,n){if(this._disposed){this.id;return}if(_e(n)||(n={silent:!!n}),!!up[t.type]&&!!this._model){if(this[Pr]){this._pendingActions.push(t);return}var a=n.silent;x1.call(this,t,a);var i=n.flush;i?this._zr.flush():i!==!1&&Ue.browser.weChat&&this._throttledZrFlush(),Cf.call(this,a),Tf.call(this,a)}},e.prototype.updateLabelLayout=function(){ya.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed){this.id;return}var n=t.seriesIndex,a=this.getModel(),i=a.getSeriesByIndex(n);i.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=function(){fu=function(f){var h=f._scheduler;h.restorePipelines(f._model),h.prepareStageTasks(),m1(f,!0),m1(f,!1),h.plan()},m1=function(f,h){for(var v=f._model,d=f._scheduler,p=h?f._componentsViews:f._chartsViews,g=h?f._componentsMap:f._chartsMap,y=f._zr,m=f._api,_=0;_<p.length;_++)p[_].__alive=!1;h?v.eachComponent(function(x,S){x!=="series"&&b(S)}):v.eachSeries(b);function b(x){var S=x.__requireNewView;x.__requireNewView=!1;var T="_ec_"+x.id+"_"+x.type,D=!S&&g[T];if(!D){var M=ka(x.type),A=h?wt.getClass(M.main,M.sub):ut.getClass(M.sub);D=new A,D.init(v,m),g[T]=D,p.push(D),y.add(D.group)}x.__viewId=D.__id=T,D.__alive=!0,D.__model=x,D.group.__ecComponentInfo={mainType:x.mainType,index:x.componentIndex},!h&&d.prepareView(D,x,v,m)}for(var _=0;_<p.length;){var w=p[_];w.__alive?_++:(!h&&w.renderTask.dispose(),y.remove(w.group),w.dispose(v,m),p.splice(_,1),g[w.__id]===w&&delete g[w.__id],w.__id=w.group.__ecComponentInfo=null)}},op=function(f,h,v,d,p){var g=f._model;if(g.setUpdatePayload(v),!d){L([].concat(f._componentsViews).concat(f._chartsViews),w);return}var y={};y[d+"Id"]=v[d+"Id"],y[d+"Index"]=v[d+"Index"],y[d+"Name"]=v[d+"Name"];var m={mainType:d,query:y};p&&(m.subType=p);var _=v.excludeSeriesId,b;_!=null&&(b=ge(),L(st(_),function(x){var S=qt(x,null);S!=null&&b.set(S,!0)})),g&&g.eachComponent(m,function(x){var S=b&&b.get(x.id)!=null;if(!S)if(vM(v))if(x instanceof yt)v.type===ds&&!v.notBlur&&!x.get(["emphasis","disabled"])&&dW(x,v,f._api);else{var T=l_(x.mainType,x.componentIndex,v.name,f._api),D=T.focusSelf,M=T.dispatchers;v.type===ds&&D&&!v.notBlur&&s_(x.mainType,x.componentIndex,f._api),M&&L(M,function(A){v.type===ds?hi(A):vi(A)})}else c_(v)&&x instanceof yt&&(yW(x,v,f._api),fM(x),Wn(f))},f),g&&g.eachComponent(m,function(x){var S=b&&b.get(x.id)!=null;S||w(f[d==="series"?"_chartsMap":"_componentsMap"][x.__viewId])},f);function w(x){x&&x.__alive&&x[h]&&x[h](x.__model,g,f._api,v)}},ho={prepareAndUpdate:function(f){fu(this),ho.update.call(this,f,{optionChanged:f.newOption!=null})},update:function(f,h){var v=this._model,d=this._api,p=this._zr,g=this._coordSysMgr,y=this._scheduler;if(!!v){v.setUpdatePayload(f),y.restoreData(v,f),y.performSeriesTasks(v),g.create(v,d),y.performDataProcessorTasks(v,f),b1(this,v),g.update(v,d),t(v),y.performVisualTasks(v,f),w1(this,v,d,f,h);var m=v.get("backgroundColor")||"transparent",_=v.get("darkMode");p.setBackgroundColor(m),_!=null&&_!=="auto"&&p.setDarkMode(_),ya.trigger("afterupdate",v,d)}},updateTransform:function(f){var h=this,v=this._model,d=this._api;if(!!v){v.setUpdatePayload(f);var p=[];v.eachComponent(function(y,m){if(y!=="series"){var _=h.getViewOfComponentModel(m);if(_&&_.__alive)if(_.updateTransform){var b=_.updateTransform(m,v,d,f);b&&b.update&&p.push(_)}else p.push(_)}});var g=ge();v.eachSeries(function(y){var m=h._chartsMap[y.__viewId];if(m.updateTransform){var _=m.updateTransform(y,v,d,f);_&&_.update&&g.set(y.uid,1)}else g.set(y.uid,1)}),t(v),this._scheduler.performVisualTasks(v,f,{setDirty:!0,dirtyMap:g}),sp(this,v,d,f,{},g),ya.trigger("afterupdate",v,d)}},updateView:function(f){var h=this._model;!h||(h.setUpdatePayload(f),ut.markUpdateMethod(f,"updateView"),t(h),this._scheduler.performVisualTasks(h,f,{setDirty:!0}),w1(this,h,this._api,f,{}),ya.trigger("afterupdate",h,this._api))},updateVisual:function(f){var h=this,v=this._model;!v||(v.setUpdatePayload(f),v.eachSeries(function(d){d.getData().clearAllVisual()}),ut.markUpdateMethod(f,"updateVisual"),t(v),this._scheduler.performVisualTasks(v,f,{visualType:"visual",setDirty:!0}),v.eachComponent(function(d,p){if(d!=="series"){var g=h.getViewOfComponentModel(p);g&&g.__alive&&g.updateVisual(p,v,h._api,f)}}),v.eachSeries(function(d){var p=h._chartsMap[d.__viewId];p.updateVisual(d,v,h._api,f)}),ya.trigger("afterupdate",v,this._api))},updateLayout:function(f){ho.update.call(this,f)}},_1=function(f,h,v,d){if(f._disposed){f.id;return}for(var p=f._model,g=f._coordSysMgr.getCoordinateSystems(),y,m=Fc(p,v),_=0;_<g.length;_++){var b=g[_];if(b[h]&&(y=b[h](p,m,d))!=null)return y}},b1=function(f,h){var v=f._chartsMap,d=f._scheduler;h.eachSeries(function(p){d.updateStreamModes(p,v[p.__viewId])})},x1=function(f,h){var v=this,d=this.getModel(),p=f.type,g=f.escapeConnect,y=up[p],m=y.actionInfo,_=(m.update||"update").split(":"),b=_.pop(),w=_[0]!=null&&ka(_[0]);this[Pr]=!0;var x=[f],S=!1;f.batch&&(S=!0,x=J(f.batch,function(E){return E=me(Q({},E),f),E.batch=null,E}));var T=[],D,M=c_(f),A=vM(f);if(A&&cM(this._api),L(x,function(E){if(D=y.action(E,v._model,v._api),D=D||Q({},E),D.type=m.event||D.type,T.push(D),A){var O=N0(f),N=O.queryOptionMap,V=O.mainTypeSpecified,$=V?N.keys()[0]:"series";op(v,b,E,$),Wn(v)}else M?(op(v,b,E,"series"),Wn(v)):w&&op(v,b,E,w.main,w.sub)}),b!=="none"&&!A&&!M&&!w)try{this[cn]?(fu(this),ho.update.call(this,f),this[cn]=null):ho[b].call(this,f)}catch(E){throw this[Pr]=!1,E}if(S?D={type:m.event||p,escapeConnect:g,batch:T}:D=T[0],this[Pr]=!1,!h){var I=this._messageCenter;if(I.trigger(D.type,D),M){var P={type:"selectchanged",escapeConnect:g,selected:mW(d),isFromClick:f.isFromClick||!1,fromAction:f.type,fromActionPayload:f};I.trigger(P.type,P)}}},Cf=function(f){for(var h=this._pendingActions;h.length;){var v=h.shift();x1.call(this,v,f)}},Tf=function(f){!f&&this.trigger("updated")},xI=function(f,h){f.on("rendered",function(v){h.trigger("rendered",v),f.animation.isFinished()&&!h[cn]&&!h._scheduler.unfinished&&!h._pendingActions.length&&h.trigger("finished")})},wI=function(f,h){f.on("mouseover",function(v){var d=v.target,p=As(d,qc);p&&(pW(p,v,h._api),Wn(h))}).on("mouseout",function(v){var d=v.target,p=As(d,qc);p&&(gW(p,v,h._api),Wn(h))}).on("click",function(v){var d=v.target,p=As(d,function(m){return Me(m).dataIndex!=null},!0);if(p){var g=p.selected?"unselect":"select",y=Me(p);h._api.dispatchAction({type:g,dataType:y.dataType,dataIndexInside:y.dataIndex,seriesIndex:y.seriesIndex,isFromClick:!0})}})};function t(f){f.clearColorPalette(),f.eachSeries(function(h){h.clearColorPalette()})}function n(f){var h=[],v=[],d=!1;if(f.eachComponent(function(m,_){var b=_.get("zlevel")||0,w=_.get("z")||0,x=_.getZLevelKey();d=d||!!x,(m==="series"?v:h).push({zlevel:b,z:w,idx:_.componentIndex,type:m,key:x})}),d){var p=h.concat(v),g,y;Nv(p,function(m,_){return m.zlevel===_.zlevel?m.z-_.z:m.zlevel-_.zlevel}),L(p,function(m){var _=f.getComponent(m.type,m.idx),b=m.zlevel,w=m.key;g!=null&&(b=Math.max(g,b)),w?(b===g&&w!==y&&b++,y=w):y&&(b===g&&b++,y=""),g=b,_.setZLevel(b)})}}w1=function(f,h,v,d,p){n(h),SI(f,h,v,d,p),L(f._chartsViews,function(g){g.__alive=!1}),sp(f,h,v,d,p),L(f._chartsViews,function(g){g.__alive||g.remove(h,v)})},SI=function(f,h,v,d,p,g){L(g||f._componentsViews,function(y){var m=y.__model;u(m,y),y.render(m,h,v,d),s(m,y),c(m,y)})},sp=function(f,h,v,d,p,g){var y=f._scheduler;p=Q(p||{},{updatedSeries:h.getSeries()}),ya.trigger("series:beforeupdate",h,v,p);var m=!1;h.eachSeries(function(_){var b=f._chartsMap[_.__viewId];b.__alive=!0;var w=b.renderTask;y.updatePayload(w,d),u(_,b),g&&g.get(_.uid)&&w.dirty(),w.perform(y.getPerformArgs(w))&&(m=!0),b.group.silent=!!_.get("silent"),o(_,b),fM(_)}),y.unfinished=m||y.unfinished,ya.trigger("series:layoutlabels",h,v,p),ya.trigger("series:transition",h,v,p),h.eachSeries(function(_){var b=f._chartsMap[_.__viewId];s(_,b),c(_,b)}),i(f,h),ya.trigger("series:afterupdate",h,v,p)},Wn=function(f){f[g1]=!0,f.getZr().wakeUp()},DI=function(f){!f[g1]||(f.getZr().storage.traverse(function(h){Wl(h)||a(h)}),f[g1]=!1)};function a(f){for(var h=[],v=f.currentStates,d=0;d<v.length;d++){var p=v[d];p==="emphasis"||p==="blur"||p==="select"||h.push(p)}f.selected&&f.states.select&&h.push("select"),f.hoverState===hd&&f.states.emphasis?h.push("emphasis"):f.hoverState===Wc&&f.states.blur&&h.push("blur"),f.useStates(h)}function i(f,h){var v=f._zr,d=v.storage,p=0;d.traverse(function(g){g.isGroup||p++}),p>h.get("hoverLayerThreshold")&&!Ue.node&&!Ue.worker&&h.eachSeries(function(g){if(!g.preventUsingHoverLayer){var y=f._chartsMap[g.__viewId];y.__alive&&y.eachRendered(function(m){m.states.emphasis&&(m.states.emphasis.hoverLayer=!0)})}})}function o(f,h){var v=f.get("blendMode")||null;h.eachRendered(function(d){d.isGroup||(d.style.blend=v)})}function s(f,h){if(!f.preventAutoZ){var v=f.get("z")||0,d=f.get("zlevel")||0;h.eachRendered(function(p){return l(p,v,d,-1/0),!0})}}function l(f,h,v,d){var p=f.getTextContent(),g=f.getTextGuideLine(),y=f.isGroup;if(y)for(var m=f.childrenRef(),_=0;_<m.length;_++)d=Math.max(l(m[_],h,v,d),d);else f.z=h,f.zlevel=v,d=Math.max(f.z2,d);if(p&&(p.z=h,p.zlevel=v,isFinite(d)&&(p.z2=d+2)),g){var b=f.textGuideLineConfig;g.z=h,g.zlevel=v,isFinite(d)&&(g.z2=d+(b&&b.showAbove?1:-1))}return d}function u(f,h){h.eachRendered(function(v){if(!Wl(v)){var d=v.getTextContent(),p=v.getTextGuideLine();v.stateTransition&&(v.stateTransition=null),d&&d.stateTransition&&(d.stateTransition=null),p&&p.stateTransition&&(p.stateTransition=null),v.hasState()?(v.prevStates=v.currentStates,v.clearStates()):v.prevStates&&(v.prevStates=null)}})}function c(f,h){var v=f.getModel("stateAnimation"),d=f.isAnimationEnabled(),p=v.get("duration"),g=p>0?{duration:p,delay:v.get("delay"),easing:v.get("easing")}:null;h.eachRendered(function(y){if(y.states&&y.states.emphasis){if(Wl(y))return;if(y instanceof Be&&SW(y),y.__dirty){var m=y.prevStates;m&&y.useStates(m)}if(d){y.stateTransition=g;var _=y.getTextContent(),b=y.getTextGuideLine();_&&(_.stateTransition=g),b&&(b.stateTransition=g)}y.__dirty&&a(y)}})}CI=function(f){return new(function(h){j(v,h);function v(){return h!==null&&h.apply(this,arguments)||this}return v.prototype.getCoordinateSystems=function(){return f._coordSysMgr.getCoordinateSystems()},v.prototype.getComponentByElement=function(d){for(;d;){var p=d.__ecComponentInfo;if(p!=null)return f._model.getComponent(p.mainType,p.index);d=d.parent}},v.prototype.enterEmphasis=function(d,p){hi(d,p),Wn(f)},v.prototype.leaveEmphasis=function(d,p){vi(d,p),Wn(f)},v.prototype.enterBlur=function(d){oM(d),Wn(f)},v.prototype.leaveBlur=function(d){i_(d),Wn(f)},v.prototype.enterSelect=function(d){sM(d),Wn(f)},v.prototype.leaveSelect=function(d){lM(d),Wn(f)},v.prototype.getModel=function(){return f.getModel()},v.prototype.getViewOfComponentModel=function(d){return f.getViewOfComponentModel(d)},v.prototype.getViewOfSeriesModel=function(d){return f.getViewOfSeriesModel(d)},v}(NA))(f)},TI=function(f){function h(v,d){for(var p=0;p<v.length;p++){var g=v[p];g[y1]=d}}L(Df,function(v,d){f._messageCenter.on(d,function(p){if(fp[f.group]&&f[y1]!==pI){if(p&&p.escapeConnect)return;var g=f.makeActionFromEvent(p),y=[];L(Ps,function(m){m!==f&&m.group===f.group&&y.push(m)}),h(y,pI),L(y,function(m){m[y1]!==s6&&m.dispatchAction(g)}),h(y,l6)}})})}}(),e}(On),S1=lp.prototype;S1.on=gI("on"),S1.off=gI("off"),S1.one=function(r,e,t){var n=this;function a(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];e&&e.apply&&e.apply(this,i),n.off(r,a)}this.on.call(this,r,a,t)};var u6=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function Sde(r){}var up={},Df={},C1=[],T1=[],cp=[],MI={},D1={},Ps={},fp={},c6=+new Date-0,f6=+new Date-0,M1="_echarts_instance_";function h6(r,e,t){var n=!(t&&t.ssr);if(n){var a=A1(r);if(a)return a}var i=new lp(r,e,t);return i.id="ec_"+c6++,Ps[i.id]=i,n&&dD(r,M1,i.id),TI(i),ya.trigger("afterinit",i),i}function v6(r){if(K(r)){var e=r;r=null,L(e,function(t){t.group!=null&&(r=t.group)}),r=r||"g_"+f6++,L(e,function(t){t.group=r})}return fp[r]=!0,r}function AI(r){fp[r]=!1}var d6=AI;function p6(r){ce(r)?r=Ps[r]:r instanceof lp||(r=A1(r)),r instanceof lp&&!r.isDisposed()&&r.dispose()}function A1(r){return Ps[u8(r,M1)]}function g6(r){return Ps[r]}function L1(r,e){MI[r]=e}function I1(r){Ne(T1,r)<0&&T1.push(r)}function P1(r,e){E1(C1,r,e,e6)}function LI(r){hp("afterinit",r)}function II(r){hp("afterupdate",r)}function hp(r,e){ya.on(r,e)}function ma(r,e,t){ye(e)&&(t=e,e="");var n=_e(r)?r.type:[r,r={event:e}][0];r.event=(r.event||n).toLowerCase(),e=r.event,!Df[e]&&(Dr(dI.test(n)&&dI.test(e)),up[n]||(up[n]={action:t,actionInfo:r}),Df[e]=n)}function PI(r,e){ru.register(r,e)}function y6(r){var e=ru.get(r);if(e)return e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice()}function EI(r,e){E1(cp,r,e,cI,"layout")}function vo(r,e){E1(cp,r,e,fI,"visual")}var OI=[];function E1(r,e,t,n,a){if((ye(e)||_e(e))&&(t=e,e=n),!(Ne(OI,t)>=0)){OI.push(t);var i=BL.wrapStageHandler(t,a);i.__prio=e,i.__raw=t,r.push(i)}}function O1(r,e){D1[r]=e}function m6(r){$T({createCanvas:r})}function RI(r,e,t){var n=uI("registerMap");n&&n(r,e,t)}function _6(r){var e=uI("getMap");return e&&e(r)}var NI=D9;vo(p1,K9),vo(ip,J9),vo(ip,eU),vo(p1,pU),vo(ip,gU),vo(hI,UU),I1(HA),P1(KU,o9),O1("default",tU),ma({type:ds,event:ds,update:ds},Ot),ma({type:vd,event:vd,update:vd},Ot),ma({type:jc,event:jc,update:jc},Ot),ma({type:dd,event:dd,update:dd},Ot),ma({type:Yc,event:Yc,update:Yc},Ot),L1("light",hU),L1("dark",vU);var b6={},kI=[],x6={registerPreprocessor:I1,registerProcessor:P1,registerPostInit:LI,registerPostUpdate:II,registerUpdateLifecycle:hp,registerAction:ma,registerCoordinateSystem:PI,registerLayout:EI,registerVisual:vo,registerTransform:NI,registerLoading:O1,registerMap:RI,registerImpl:YU,PRIORITY:vI,ComponentModel:$e,ComponentView:wt,SeriesModel:yt,ChartView:ut,registerComponentModel:function(r){$e.registerClass(r)},registerComponentView:function(r){wt.registerClass(r)},registerSeriesModel:function(r){yt.registerClass(r)},registerChartView:function(r){ut.registerClass(r)},registerSubTypeDefaulter:function(r,e){$e.registerSubTypeDefaulter(r,e)},registerPainter:function(r,e){K2(r,e)}};function ke(r){if(K(r)){L(r,function(e){ke(e)});return}Ne(kI,r)>=0||(kI.push(r),ye(r)&&(r={install:r}),r.install(x6))}function Mf(r){return r==null?0:r.length||1}function BI(r){return r}var w6=function(){function r(e,t,n,a,i,o){this._old=e,this._new=t,this._oldKeyGetter=n||BI,this._newKeyGetter=a||BI,this.context=i,this._diffModeMultiple=o==="multiple"}return r.prototype.add=function(e){return this._add=e,this},r.prototype.update=function(e){return this._update=e,this},r.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},r.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},r.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},r.prototype.remove=function(e){return this._remove=e,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var e=this._old,t=this._new,n={},a=new Array(e.length),i=new Array(t.length);this._initIndexMap(e,null,a,"_oldKeyGetter"),this._initIndexMap(t,n,i,"_newKeyGetter");for(var o=0;o<e.length;o++){var s=a[o],l=n[s],u=Mf(l);if(u>1){var c=l.shift();l.length===1&&(n[s]=l[0]),this._update&&this._update(c,o)}else u===1?(n[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(i,n)},r.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},a={},i=[],o=[];this._initIndexMap(e,n,i,"_oldKeyGetter"),this._initIndexMap(t,a,o,"_newKeyGetter");for(var s=0;s<i.length;s++){var l=i[s],u=n[l],c=a[l],f=Mf(u),h=Mf(c);if(f>1&&h===1)this._updateManyToOne&&this._updateManyToOne(c,u),a[l]=null;else if(f===1&&h>1)this._updateOneToMany&&this._updateOneToMany(c,u),a[l]=null;else if(f===1&&h===1)this._update&&this._update(c,u),a[l]=null;else if(f>1&&h>1)this._updateManyToMany&&this._updateManyToMany(c,u),a[l]=null;else if(f>1)for(var v=0;v<f;v++)this._remove&&this._remove(u[v]);else this._remove&&this._remove(u)}this._performRestAdd(o,a)},r.prototype._performRestAdd=function(e,t){for(var n=0;n<e.length;n++){var a=e[n],i=t[a],o=Mf(i);if(o>1)for(var s=0;s<o;s++)this._add&&this._add(i[s]);else o===1&&this._add&&this._add(i);t[a]=null}},r.prototype._initIndexMap=function(e,t,n,a){for(var i=this._diffModeMultiple,o=0;o<e.length;o++){var s="_ec_"+this[a](e[o],o);if(i||(n[o]=s),!!t){var l=t[s],u=Mf(l);u===0?(t[s]=o,i&&n.push(s)):u===1?t[s]=[l,o]:l.push(o)}}},r}(),pi=w6,S6=function(){function r(e,t){this._encode=e,this._schema=t}return r.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},r.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},r}();function C6(r,e){var t={},n=t.encode={},a=ge(),i=[],o=[],s={};L(r.dimensions,function(h){var v=r.getDimensionInfo(h),d=v.coordDim;if(d){var p=v.coordDimIndex;R1(n,d)[p]=h,v.isExtraCoord||(a.set(d,1),T6(v.type)&&(i[0]=h),R1(s,d)[p]=r.getDimensionIndex(v.name)),v.defaultTooltip&&o.push(h)}bA.each(function(g,y){var m=R1(n,y),_=v.otherDims[y];_!=null&&_!==!1&&(m[_]=v.name)})});var l=[],u={};a.each(function(h,v){var d=n[v];u[v]=d[0],l=l.concat(d)}),t.dataDimsOnCoord=l,t.dataDimIndicesOnCoord=J(l,function(h){return r.getDimensionInfo(h).storeDimIndex}),t.encodeFirstDimNotExtra=u;var c=n.label;c&&c.length&&(i=c.slice());var f=n.tooltip;return f&&f.length?o=f.slice():o.length||(o=i.slice()),n.defaultedLabel=i,n.defaultedTooltip=o,t.userOutput=new S6(s,e),t}function R1(r,e){return r.hasOwnProperty(e)||(r[e]=[]),r[e]}function vp(r){return r==="category"?"ordinal":r==="time"?"time":"float"}function T6(r){return!(r==="ordinal"||r==="time")}var D6=function(){function r(e){this.otherDims={},e!=null&&Q(this,e)}return r}(),dp=D6,M6=Ye(),A6={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},zI=function(){function r(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return r.prototype.isDimensionOmitted=function(){return this._dimOmitted},r.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||(this._dimNameMap=$I(this.source)))},r.prototype.getSourceDimensionIndex=function(e){return Ee(this._dimNameMap.get(e),-1)},r.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},r.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=jA(this.source),n=!HI(e),a="",i=[],o=0,s=0;o<e;o++){var l=void 0,u=void 0,c=void 0,f=this.dimensions[s];if(f&&f.storeDimIndex===o)l=t?f.name:null,u=f.type,c=f.ordinalMeta,s++;else{var h=this.getSourceDimension(o);h&&(l=t?h.name:null,u=h.type)}i.push({property:l,type:u,ordinalMeta:c}),t&&l!=null&&(!f||!f.isCalculationCoord)&&(a+=n?l.replace(/\`/g,"`1").replace(/\$/g,"`2"):l),a+="$",a+=A6[u]||"f",c&&(a+=c.uid),a+="$"}var v=this.source,d=[v.seriesLayoutBy,v.startIndex,a].join("$$");return{dimensions:i,hash:d}},r.prototype.makeOutputDimensionNames=function(){for(var e=[],t=0,n=0;t<this._fullDimCount;t++){var a=void 0,i=this.dimensions[n];if(i&&i.storeDimIndex===t)i.isCalculationCoord||(a=i.name),n++;else{var o=this.getSourceDimension(t);o&&(a=o.name)}e.push(a)}return e},r.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},r}();function FI(r){return r instanceof zI}function VI(r){for(var e=ge(),t=0;t<(r||[]).length;t++){var n=r[t],a=_e(n)?n.name:n;a!=null&&e.get(a)==null&&e.set(a,t)}return e}function $I(r){var e=M6(r);return e.dimNameMap||(e.dimNameMap=VI(r.dimensionsDefine))}function HI(r){return r>30}var Af=_e,po=J,L6=typeof Int32Array=="undefined"?Array:Int32Array,I6="e\0\0",GI=-1,P6=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],E6=["_approximateExtent"],WI,pp,Lf,If,N1,gp,k1,O6=function(){function r(e,t){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var n,a=!1;FI(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(a=!0,n=e),n=n||["x","y"];for(var i={},o=[],s={},l=!1,u={},c=0;c<n.length;c++){var f=n[c],h=ce(f)?new dp({name:f}):f instanceof dp?f:new dp(f),v=h.name;h.type=h.type||"float",h.coordDim||(h.coordDim=v,h.coordDimIndex=0);var d=h.otherDims=h.otherDims||{};o.push(v),i[v]=h,u[v]!=null&&(l=!0),h.createInvertedIndices&&(s[v]=[]),d.itemName===0&&(this._nameDimIdx=c),d.itemId===0&&(this._idDimIdx=c),a&&(h.storeDimIndex=c)}if(this.dimensions=o,this._dimInfos=i,this._initGetDimensionInfo(l),this.hostModel=t,this._invertedIndicesMap=s,this._dimOmitted){var p=this._dimIdxToName=ge();L(o,function(g){p.set(i[g].storeDimIndex,g)})}}return r.prototype.getDimension=function(e){var t=this._recognizeDimIndex(e);if(t==null)return e;if(t=e,!this._dimOmitted)return this.dimensions[t];var n=this._dimIdxToName.get(t);if(n!=null)return n;var a=this._schema.getSourceDimension(t);if(a)return a.name},r.prototype.getDimensionIndex=function(e){var t=this._recognizeDimIndex(e);if(t!=null)return t;if(e==null)return-1;var n=this._getDimInfo(e);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},r.prototype._recognizeDimIndex=function(e){if(je(e)||e!=null&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},r.prototype._getStoreDimIndex=function(e){var t=this.getDimensionIndex(e);return t},r.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},r.prototype._initGetDimensionInfo=function(e){var t=this._dimInfos;this._getDimInfo=e?function(n){return t.hasOwnProperty(n)?t[n]:void 0}:function(n){return t[n]}},r.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},r.prototype.mapDimension=function(e,t){var n=this._dimSummary;if(t==null)return n.encodeFirstDimNotExtra[e];var a=n.encode[e];return a?a[t]:null},r.prototype.mapDimensionsAll=function(e){var t=this._dimSummary,n=t.encode[e];return(n||[]).slice()},r.prototype.getStore=function(){return this._store},r.prototype.initData=function(e,t,n){var a=this,i;if(e instanceof t1&&(i=e),!i){var o=this.dimensions,s=Y_(e)||pr(e)?new ZA(e,o.length):e;i=new t1;var l=po(o,function(u){return{type:a._dimInfos[u].type,property:u}});i.initData(s,l,n)}this._store=i,this._nameList=(t||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,i.count()),this._dimSummary=C6(this,this._schema),this.userOutput=this._dimSummary.userOutput},r.prototype.appendData=function(e){var t=this._store.appendData(e);this._doInit(t[0],t[1])},r.prototype.appendValues=function(e,t){var n=this._store.appendValues(e,t.length),a=n.start,i=n.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),t)for(var s=a;s<i;s++){var l=s-a;this._nameList[s]=t[l],o&&k1(this,s)}},r.prototype._updateOrdinalMeta=function(){for(var e=this._store,t=this.dimensions,n=0;n<t.length;n++){var a=this._dimInfos[t[n]];a.ordinalMeta&&e.collectOrdinalMeta(a.storeDimIndex,a.ordinalMeta)}},r.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return this._idDimIdx==null&&e.getSource().sourceFormat!==uo&&!e.fillStorage},r.prototype._doInit=function(e,t){if(!(e>=t)){var n=this._store,a=n.getProvider();this._updateOrdinalMeta();var i=this._nameList,o=this._idList,s=a.getSource().sourceFormat,l=s===$n;if(l&&!a.pure)for(var u=[],c=e;c<t;c++){var f=a.getItem(c,u);if(!this.hasItemOption&&XG(f)&&(this.hasItemOption=!0),f){var h=f.name;i[c]==null&&h!=null&&(i[c]=qt(h,null));var v=f.id;o[c]==null&&v!=null&&(o[c]=qt(v,null))}}if(this._shouldMakeIdFromName())for(var c=e;c<t;c++)k1(this,c);WI(this)}},r.prototype.getApproximateExtent=function(e){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e))},r.prototype.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},r.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},r.prototype.setCalculationInfo=function(e,t){Af(e)?Q(this._calculationInfo,e):this._calculationInfo[e]=t},r.prototype.getName=function(e){var t=this.getRawIndex(e),n=this._nameList[t];return n==null&&this._nameDimIdx!=null&&(n=Lf(this,this._nameDimIdx,t)),n==null&&(n=""),n},r.prototype._getCategory=function(e,t){var n=this._store.get(e,t),a=this._store.getOrdinalMeta(e);return a?a.categories[n]:n},r.prototype.getId=function(e){return pp(this,this.getRawIndex(e))},r.prototype.count=function(){return this._store.count()},r.prototype.get=function(e,t){var n=this._store,a=this._dimInfos[e];if(a)return n.get(a.storeDimIndex,t)},r.prototype.getByRawIndex=function(e,t){var n=this._store,a=this._dimInfos[e];if(a)return n.getByRawIndex(a.storeDimIndex,t)},r.prototype.getIndices=function(){return this._store.getIndices()},r.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e))},r.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},r.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},r.prototype.getValues=function(e,t){var n=this,a=this._store;return K(e)?a.getValues(po(e,function(i){return n._getStoreDimIndex(i)}),t):a.getValues(e)},r.prototype.hasValue=function(e){for(var t=this._dimSummary.dataDimIndicesOnCoord,n=0,a=t.length;n<a;n++)if(isNaN(this._store.get(t[n],e)))return!1;return!0},r.prototype.indexOfName=function(e){for(var t=0,n=this._store.count();t<n;t++)if(this.getName(t)===e)return t;return-1},r.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},r.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},r.prototype.rawIndexOf=function(e,t){var n=e&&this._invertedIndicesMap[e],a=n[t];return a==null||isNaN(a)?GI:a},r.prototype.indicesOfNearest=function(e,t,n){return this._store.indicesOfNearest(this._getStoreDimIndex(e),t,n)},r.prototype.each=function(e,t,n){ye(e)&&(n=t,t=e,e=[]);var a=n||this,i=po(If(e),this._getStoreDimIndex,this);this._store.each(i,a?fe(t,a):t)},r.prototype.filterSelf=function(e,t,n){ye(e)&&(n=t,t=e,e=[]);var a=n||this,i=po(If(e),this._getStoreDimIndex,this);return this._store=this._store.filter(i,a?fe(t,a):t),this},r.prototype.selectRange=function(e){var t=this,n={},a=Fe(e);return L(a,function(i){var o=t._getStoreDimIndex(i);n[o]=e[i]}),this._store=this._store.selectRange(n),this},r.prototype.mapArray=function(e,t,n){ye(e)&&(n=t,t=e,e=[]),n=n||this;var a=[];return this.each(e,function(){a.push(t&&t.apply(this,arguments))},n),a},r.prototype.map=function(e,t,n,a){var i=n||a||this,o=po(If(e),this._getStoreDimIndex,this),s=gp(this);return s._store=this._store.map(o,i?fe(t,i):t),s},r.prototype.modify=function(e,t,n,a){var i=n||a||this,o=po(If(e),this._getStoreDimIndex,this);this._store.modify(o,i?fe(t,i):t)},r.prototype.downSample=function(e,t,n,a){var i=gp(this);return i._store=this._store.downSample(this._getStoreDimIndex(e),t,n,a),i},r.prototype.lttbDownSample=function(e,t){var n=gp(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(e),t),n},r.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},r.prototype.getItemModel=function(e){var t=this.hostModel,n=this.getRawDataItem(e);return new lt(n,t,t&&t.ecModel)},r.prototype.diff=function(e){var t=this;return new pi(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(n){return pp(e,n)},function(n){return pp(t,n)})},r.prototype.getVisual=function(e){var t=this._visual;return t&&t[e]},r.prototype.setVisual=function(e,t){this._visual=this._visual||{},Af(e)?Q(this._visual,e):this._visual[e]=t},r.prototype.getItemVisual=function(e,t){var n=this._itemVisuals[e],a=n&&n[t];return a==null?this.getVisual(t):a},r.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},r.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,a=n[e];a||(a=n[e]={});var i=a[t];return i==null&&(i=this.getVisual(t),K(i)?i=i.slice():Af(i)&&(i=Q({},i)),a[t]=i),i},r.prototype.setItemVisual=function(e,t,n){var a=this._itemVisuals[e]||{};this._itemVisuals[e]=a,Af(t)?Q(a,t):a[t]=n},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(e,t){Af(e)?Q(this._layout,e):this._layout[e]=t},r.prototype.getLayout=function(e){return this._layout[e]},r.prototype.getItemLayout=function(e){return this._itemLayouts[e]},r.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?Q(this._itemLayouts[e]||{},t):t},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(e,t){var n=this.hostModel&&this.hostModel.seriesIndex;e_(n,this.dataType,e,t),this._graphicEls[e]=t},r.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},r.prototype.eachItemGraphicEl=function(e,t){L(this._graphicEls,function(n,a){n&&e&&e.call(t,n,a)})},r.prototype.cloneShallow=function(e){return e||(e=new r(this._schema?this._schema:po(this.dimensions,this._getDimInfo,this),this.hostModel)),N1(e,this),e._store=this._store,e},r.prototype.wrapMethod=function(e,t){var n=this[e];!ye(n)||(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var a=n.apply(this,arguments);return t.apply(this,[a].concat(Mv(arguments)))})},r.internalField=function(){WI=function(e){var t=e._invertedIndicesMap;L(t,function(n,a){var i=e._dimInfos[a],o=i.ordinalMeta,s=e._store;if(o){n=t[a]=new L6(o.categories.length);for(var l=0;l<n.length;l++)n[l]=GI;for(var l=0;l<s.count();l++)n[s.get(i.storeDimIndex,l)]=l}})},Lf=function(e,t,n){return qt(e._getCategory(t,n),null)},pp=function(e,t){var n=e._idList[t];return n==null&&e._idDimIdx!=null&&(n=Lf(e,e._idDimIdx,t)),n==null&&(n=I6+t),n},If=function(e){return K(e)||(e=e!=null?[e]:[]),e},gp=function(e){var t=new r(e._schema?e._schema:po(e.dimensions,e._getDimInfo,e),e.hostModel);return N1(t,e),t},N1=function(e,t){L(P6.concat(t.__wrappedMethods||[]),function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e.__wrappedMethods=t.__wrappedMethods,L(E6,function(n){e[n]=we(t[n])}),e._calculationInfo=Q({},t._calculationInfo)},k1=function(e,t){var n=e._nameList,a=e._idList,i=e._nameDimIdx,o=e._idDimIdx,s=n[t],l=a[t];if(s==null&&i!=null&&(n[t]=s=Lf(e,i,t)),l==null&&o!=null&&(a[t]=l=Lf(e,o,t)),l==null&&s!=null){var u=e._nameRepeatCount,c=u[s]=(u[s]||0)+1;l=s,c>1&&(l+="__ec__"+c),a[t]=l}}}(),r}(),Er=O6;function R6(r,e){return hu(r,e).dimensions}function hu(r,e){Y_(r)||(r=Z_(r)),e=e||{};var t=e.coordDimensions||[],n=e.dimensionsDefine||r.dimensionsDefine||[],a=ge(),i=[],o=k6(r,t,n,e.dimensionsCount),s=e.canOmitUnusedDimensions&&HI(o),l=n===r.dimensionsDefine,u=l?$I(r):VI(n),c=e.encodeDefine;!c&&e.encodeDefaulter&&(c=e.encodeDefaulter(r,o));for(var f=ge(c),h=new sL(o),v=0;v<h.length;v++)h[v]=-1;function d(D){var M=h[D];if(M<0){var A=n[D],I=_e(A)?A:{name:A},P=new dp,E=I.name;E!=null&&u.get(E)!=null&&(P.name=P.displayName=E),I.type!=null&&(P.type=I.type),I.displayName!=null&&(P.displayName=I.displayName);var O=i.length;return h[D]=O,P.storeDimIndex=D,i.push(P),P}return i[M]}if(!s)for(var v=0;v<o;v++)d(v);f.each(function(D,M){var A=st(D).slice();if(A.length===1&&!ce(A[0])&&A[0]<0){f.set(M,!1);return}var I=f.set(M,[]);L(A,function(P,E){var O=ce(P)?u.get(P):P;O!=null&&O<o&&(I[E]=O,g(d(O),M,E))})});var p=0;L(t,function(D){var M,A,I,P;if(ce(D))M=D,P={};else{P=D,M=P.name;var E=P.ordinalMeta;P.ordinalMeta=null,P=Q({},P),P.ordinalMeta=E,A=P.dimsDef,I=P.otherDims,P.name=P.coordDim=P.coordDimIndex=P.dimsDef=P.otherDims=null}var O=f.get(M);if(O!==!1){if(O=st(O),!O.length)for(var N=0;N<(A&&A.length||1);N++){for(;p<o&&d(p).coordDim!=null;)p++;p<o&&O.push(p++)}L(O,function(V,$){var U=d(V);if(l&&P.type!=null&&(U.type=P.type),g(me(U,P),M,$),U.name==null&&A){var Y=A[$];!_e(Y)&&(Y={name:Y}),U.name=U.displayName=Y.name,U.defaultTooltip=Y.defaultTooltip}I&&me(U.otherDims,I)})}});function g(D,M,A){bA.get(M)!=null?D.otherDims[M]=A:(D.coordDim=M,D.coordDimIndex=A,a.set(M,!0))}var y=e.generateCoord,m=e.generateCoordCount,_=m!=null;m=y?m||1:0;var b=y||"value";function w(D){D.name==null&&(D.name=D.coordDim)}if(s)L(i,function(D){w(D)}),i.sort(function(D,M){return D.storeDimIndex-M.storeDimIndex});else for(var x=0;x<o;x++){var S=d(x),T=S.coordDim;T==null&&(S.coordDim=B6(b,a,_),S.coordDimIndex=0,(!y||m<=0)&&(S.isExtraCoord=!0),m--),w(S),S.type==null&&(CA(r,x)===mr.Must||S.isExtraCoord&&(S.otherDims.itemName!=null||S.otherDims.seriesName!=null))&&(S.type="ordinal")}return N6(i),new zI({source:r,dimensions:i,fullDimensionCount:o,dimensionOmitted:s})}function N6(r){for(var e=ge(),t=0;t<r.length;t++){var n=r[t],a=n.name,i=e.get(a)||0;i>0&&(n.name=a+(i-1)),i++,e.set(a,i)}}function k6(r,e,t,n){var a=Math.max(r.dimensionsDetectedCount||1,e.length,t.length,n||0);return L(e,function(i){var o;_e(i)&&(o=i.dimsDef)&&(a=Math.max(a,o.length))}),a}function B6(r,e,t){if(t||e.hasKey(r)){for(var n=0;e.hasKey(r+n);)n++;r+=n}return e.set(r,!0),r}var z6=function(){function r(e){this.coordSysDims=[],this.axisMap=ge(),this.categoryAxisMap=ge(),this.coordSysName=e}return r}();function F6(r){var e=r.get("coordinateSystem"),t=new z6(e),n=V6[e];if(n)return n(r,t,t.axisMap,t.categoryAxisMap),t}var V6={cartesian2d:function(r,e,t,n){var a=r.getReferringComponents("xAxis",$t).models[0],i=r.getReferringComponents("yAxis",$t).models[0];e.coordSysDims=["x","y"],t.set("x",a),t.set("y",i),vu(a)&&(n.set("x",a),e.firstCategoryDimIndex=0),vu(i)&&(n.set("y",i),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(r,e,t,n){var a=r.getReferringComponents("singleAxis",$t).models[0];e.coordSysDims=["single"],t.set("single",a),vu(a)&&(n.set("single",a),e.firstCategoryDimIndex=0)},polar:function(r,e,t,n){var a=r.getReferringComponents("polar",$t).models[0],i=a.findAxisModel("radiusAxis"),o=a.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],t.set("radius",i),t.set("angle",o),vu(i)&&(n.set("radius",i),e.firstCategoryDimIndex=0),vu(o)&&(n.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(r,e,t,n){e.coordSysDims=["lng","lat"]},parallel:function(r,e,t,n){var a=r.ecModel,i=a.getComponent("parallel",r.get("parallelIndex")),o=e.coordSysDims=i.dimensions.slice();L(i.parallelAxisIndex,function(s,l){var u=a.getComponent("parallelAxis",s),c=o[l];t.set(c,u),vu(u)&&(n.set(c,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})}};function vu(r){return r.get("type")==="category"}function UI(r,e,t){t=t||{};var n=t.byIndex,a=t.stackedCoordDimension,i,o,s;$6(e)?i=e:(o=e.schema,i=o.dimensions,s=e.store);var l=!!(r&&r.get("stack")),u,c,f,h;if(L(i,function(m,_){ce(m)&&(i[_]=m={name:m}),l&&!m.isExtraCoord&&(!n&&!u&&m.ordinalMeta&&(u=m),!c&&m.type!=="ordinal"&&m.type!=="time"&&(!a||a===m.coordDim)&&(c=m))}),c&&!n&&!u&&(n=!0),c){f="__\0ecstackresult_"+r.id,h="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var v=c.coordDim,d=c.type,p=0;L(i,function(m){m.coordDim===v&&p++});var g={name:f,coordDim:v,coordDimIndex:p,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},y={name:h,coordDim:h,coordDimIndex:p+1,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(h,d),y.storeDimIndex=s.ensureCalculationDimension(f,d)),o.appendCalculationDimension(g),o.appendCalculationDimension(y)):(i.push(g),i.push(y))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:h,stackResultDimension:f}}function $6(r){return!FI(r.schema)}function gi(r,e){return!!e&&e===r.getCalculationInfo("stackedDimension")}function B1(r,e){return gi(r,e)?r.getCalculationInfo("stackResultDimension"):e}function H6(r,e){var t=r.get("coordinateSystem"),n=ru.get(t),a;return e&&e.coordSysDims&&(a=J(e.coordSysDims,function(i){var o={name:i},s=e.axisMap.get(i);if(s){var l=s.get("type");o.type=vp(l)}return o})),a||(a=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),a}function G6(r,e,t){var n,a;return t&&L(r,function(i,o){var s=i.coordDim,l=t.categoryAxisMap.get(s);l&&(n==null&&(n=o),i.ordinalMeta=l.getOrdinalMeta(),e&&(i.createInvertedIndices=!0)),i.otherDims.itemName!=null&&(a=!0)}),!a&&n!=null&&(r[n].otherDims.itemName=0),n}function Wa(r,e,t){t=t||{};var n=e.getSourceManager(),a,i=!1;r?(i=!0,a=Z_(r)):(a=n.getSource(),i=a.sourceFormat===$n);var o=F6(e),s=H6(e,o),l=t.useEncodeDefaulter,u=ye(l)?l:l?Ae(SA,s,e):null,c={coordDimensions:s,generateCoord:t.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!i},f=hu(a,c),h=G6(f.dimensions,t.createInvertedIndices,o),v=i?null:n.getSharedDataStore(f),d=UI(e,{schema:f,store:v}),p=new Er(f,e);p.setCalculationInfo(d);var g=h!=null&&W6(a)?function(y,m,_,b){return b===h?_:this.defaultDimValueGetter(y,m,_,b)}:null;return p.hasItemOption=!1,p.initData(i?a:v,null,g),p}function W6(r){if(r.sourceFormat===$n){var e=U6(r.data||[]);return!K(kl(e))}}function U6(r){for(var e=0;e<r.length&&r[e]==null;)e++;return r[e]}var jI=function(){function r(e){this._setting=e||{},this._extent=[1/0,-1/0]}return r.prototype.getSetting=function(e){return this._setting[e]},r.prototype.unionExtent=function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1])},r.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(t)||(n[1]=t)},r.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(e){this._isBlank=e},r}();ad(jI);var yi=jI,j6=0,Y6=function(){function r(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++j6}return r.createByAxisModel=function(e){var t=e.option,n=t.data,a=n&&J(n,q6);return new r({categories:a,needCollect:!a,deduplication:t.dedplication!==!1})},r.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},r.prototype.parseAndCollect=function(e){var t,n=this._needCollect;if(!ce(e)&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var a=this._getOrCreateMap();return t=a.get(e),t==null&&(n?(t=this.categories.length,this.categories[t]=e,a.set(e,t)):t=NaN),t},r.prototype._getOrCreateMap=function(){return this._map||(this._map=ge(this.categories))},r}();function q6(r){return _e(r)&&r.value!=null?r.value:r+""}var z1=Y6;function F1(r){return r.type==="interval"||r.type==="log"}function Z6(r,e,t,n){var a={},i=r[1]-r[0],o=a.interval=P0(i/e,!0);t!=null&&o<t&&(o=a.interval=t),n!=null&&o>n&&(o=a.interval=n);var s=a.intervalPrecision=YI(o),l=a.niceTickExtent=[At(Math.ceil(r[0]/o)*o,s),At(Math.floor(r[1]/o)*o,s)];return X6(l,r),a}function V1(r){var e=Math.pow(10,rd(r)),t=r/e;return t?t===2?t=3:t===3?t=5:t*=2:t=1,At(t*e)}function YI(r){return fa(r)+2}function qI(r,e,t){r[e]=Math.max(Math.min(r[e],t[1]),t[0])}function X6(r,e){!isFinite(r[0])&&(r[0]=e[0]),!isFinite(r[1])&&(r[1]=e[1]),qI(r,0,e),qI(r,1,e),r[0]>r[1]&&(r[0]=r[1])}function yp(r,e){return r>=e[0]&&r<=e[1]}function mp(r,e){return e[1]===e[0]?.5:(r-e[0])/(e[1]-e[0])}function _p(r,e){return r*(e[1]-e[0])+e[0]}var ZI=function(r){j(e,r);function e(t){var n=r.call(this,t)||this;n.type="ordinal";var a=n.getSetting("ordinalMeta");return a||(a=new z1({})),K(a)&&(a=new z1({categories:J(a,function(i){return _e(i)?i.value:i})})),n._ordinalMeta=a,n._extent=n.getSetting("extent")||[0,a.categories.length-1],n}return e.prototype.parse=function(t){return t==null?NaN:ce(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return t=this.parse(t),yp(t,this._extent)&&this._ordinalMeta.categories[t]!=null},e.prototype.normalize=function(t){return t=this._getTickNumber(this.parse(t)),mp(t,this._extent)},e.prototype.scale=function(t){return t=Math.round(_p(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],n=this._extent,a=n[0];a<=n[1];)t.push({value:a}),a++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(t==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var n=t.ordinalNumbers,a=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,n.length);o<l;++o){var u=n[o];a[o]=u,i[u]=o}for(var c=0;o<s;++o){for(;i[c]!=null;)c++;a.push(c),i[c]=o}},e.prototype._getTickNumber=function(t){var n=this._ticksByOrdinalNumber;return n&&t>=0&&t<n.length?n[t]:t},e.prototype.getRawOrdinalNumber=function(t){var n=this._ordinalNumbersByTick;return n&&t>=0&&t<n.length?n[t]:t},e.prototype.getLabel=function(t){if(!this.isBlank()){var n=this.getRawOrdinalNumber(t.value),a=this._ordinalMeta.categories[n];return a==null?"":a+""}},e.prototype.count=function(){return this._extent[1]-this._extent[0]+1},e.prototype.unionExtentFromData=function(t,n){this.unionExtent(t.getApproximateExtent(n))},e.prototype.isInExtentRange=function(t){return t=this._getTickNumber(t),this._extent[0]<=t&&this._extent[1]>=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(yi);yi.registerClass(ZI);var $1=ZI,Es=At,XI=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return yp(t,this._extent)},e.prototype.normalize=function(t){return mp(t,this._extent)},e.prototype.scale=function(t){return _p(t,this._extent)},e.prototype.setExtent=function(t,n){var a=this._extent;isNaN(t)||(a[0]=parseFloat(t)),isNaN(n)||(a[1]=parseFloat(n))},e.prototype.unionExtent=function(t){var n=this._extent;t[0]<n[0]&&(n[0]=t[0]),t[1]>n[1]&&(n[1]=t[1]),this.setExtent(n[0],n[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=YI(t)},e.prototype.getTicks=function(t){var n=this._interval,a=this._extent,i=this._niceExtent,o=this._intervalPrecision,s=[];if(!n)return s;var l=1e4;a[0]<i[0]&&(t?s.push({value:Es(i[0]-n,o)}):s.push({value:a[0]}));for(var u=i[0];u<=i[1]&&(s.push({value:u}),u=Es(u+n,o),u!==s[s.length-1].value);)if(s.length>l)return[];var c=s.length?s[s.length-1].value:i[1];return a[1]>c&&(t?s.push({value:Es(c+n,o)}):s.push({value:a[1]})),s},e.prototype.getMinorTicks=function(t){for(var n=this.getTicks(!0),a=[],i=this.getExtent(),o=1;o<n.length;o++){for(var s=n[o],l=n[o-1],u=0,c=[],f=s.value-l.value,h=f/t;u<t-1;){var v=Es(l.value+(u+1)*h);v>i[0]&&v<i[1]&&c.push(v),u++}a.push(c)}return a},e.prototype.getLabel=function(t,n){if(t==null)return"";var a=n&&n.precision;a==null?a=fa(t.value)||0:a==="auto"&&(a=this._intervalPrecision);var i=Es(t.value,a,!0);return O_(i)},e.prototype.calcNiceTicks=function(t,n,a){t=t||5;var i=this._extent,o=i[1]-i[0];if(!!isFinite(o)){o<0&&(o=-o,i.reverse());var s=Z6(i,t,n,a);this._intervalPrecision=s.intervalPrecision,this._interval=s.interval,this._niceExtent=s.niceTickExtent}},e.prototype.calcNiceExtent=function(t){var n=this._extent;if(n[0]===n[1])if(n[0]!==0){var a=Math.abs(n[0]);t.fixMax||(n[1]+=a/2),n[0]-=a/2}else n[1]=1;var i=n[1]-n[0];isFinite(i)||(n[0]=0,n[1]=1),this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval);var o=this._interval;t.fixMin||(n[0]=Es(Math.floor(n[0]/o)*o)),t.fixMax||(n[1]=Es(Math.ceil(n[1]/o)*o))},e.prototype.setNiceExtent=function(t,n){this._niceExtent=[t,n]},e.type="interval",e}(yi);yi.registerClass(XI);var go=XI,QI=typeof Float32Array!="undefined",Q6=QI?Float32Array:Array;function Ua(r){return K(r)?QI?new Float32Array(r):r:new Q6(r)}var H1="__ec_stack_";function G1(r){return r.get("stack")||H1+r.seriesIndex}function W1(r){return r.dim+r.index}function K6(r){var e=[],t=r.axis,n="axis0";if(t.type==="category"){for(var a=t.getBandWidth(),i=0;i<r.count;i++)e.push(me({bandWidth:a,axisKey:n,stackId:H1+i},r));for(var o=eP(e),s=[],i=0;i<r.count;i++){var l=o[n][H1+i];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}}function KI(r,e){var t=[];return e.eachSeriesByType(r,function(n){nP(n)&&t.push(n)}),t}function J6(r){var e={};L(r,function(l){var u=l.coordinateSystem,c=u.getBaseAxis();if(!(c.type!=="time"&&c.type!=="value"))for(var f=l.getData(),h=c.dim+"_"+c.index,v=f.getDimensionIndex(f.mapDimension(c.dim)),d=f.getStore(),p=0,g=d.count();p<g;++p){var y=d.get(v,p);e[h]?e[h].push(y):e[h]=[y]}});var t={};for(var n in e)if(e.hasOwnProperty(n)){var a=e[n];if(a){a.sort(function(l,u){return l-u});for(var i=null,o=1;o<a.length;++o){var s=a[o]-a[o-1];s>0&&(i=i===null?s:Math.min(i,s))}t[n]=i}}return t}function JI(r){var e=J6(r),t=[];return L(r,function(n){var a=n.coordinateSystem,i=a.getBaseAxis(),o=i.getExtent(),s;if(i.type==="category")s=i.getBandWidth();else if(i.type==="value"||i.type==="time"){var l=i.dim+"_"+i.index,u=e[l],c=Math.abs(o[1]-o[0]),f=i.scale.getExtent(),h=Math.abs(f[1]-f[0]);s=u?c/h*u:c}else{var v=n.getData();s=Math.abs(o[1]-o[0])/v.count()}var d=le(n.get("barWidth"),s),p=le(n.get("barMaxWidth"),s),g=le(n.get("barMinWidth")||(aP(n)?.5:1),s),y=n.get("barGap"),m=n.get("barCategoryGap");t.push({bandWidth:s,barWidth:d,barMaxWidth:p,barMinWidth:g,barGap:y,barCategoryGap:m,axisKey:W1(i),stackId:G1(n)})}),eP(t)}function eP(r){var e={};L(r,function(n,a){var i=n.axisKey,o=n.bandWidth,s=e[i]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},l=s.stacks;e[i]=s;var u=n.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var c=n.barWidth;c&&!l[u].width&&(l[u].width=c,c=Math.min(s.remainedWidth,c),s.remainedWidth-=c);var f=n.barMaxWidth;f&&(l[u].maxWidth=f);var h=n.barMinWidth;h&&(l[u].minWidth=h);var v=n.barGap;v!=null&&(s.gap=v);var d=n.barCategoryGap;d!=null&&(s.categoryGap=d)});var t={};return L(e,function(n,a){t[a]={};var i=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=Fe(i).length;s=Math.max(35-l*4,15)+"%"}var u=le(s,o),c=le(n.gap,1),f=n.remainedWidth,h=n.autoWidthCount,v=(f-u)/(h+(h-1)*c);v=Math.max(v,0),L(i,function(y){var m=y.maxWidth,_=y.minWidth;if(y.width){var b=y.width;m&&(b=Math.min(b,m)),_&&(b=Math.max(b,_)),y.width=b,f-=b+c*b,h--}else{var b=v;m&&m<b&&(b=Math.min(m,f)),_&&_>b&&(b=_),b!==v&&(y.width=b,f-=b+c*b,h--)}}),v=(f-u)/(h+(h-1)*c),v=Math.max(v,0);var d=0,p;L(i,function(y,m){y.width||(y.width=v),p=y,d+=y.width*(1+c)}),p&&(d-=p.width*c);var g=-d/2;L(i,function(y,m){t[a][m]=t[a][m]||{bandWidth:o,offset:g,width:y.width},g+=y.width*(1+c)})}),t}function ej(r,e,t){if(r&&e){var n=r[W1(e)];return n!=null&&t!=null?n[G1(t)]:n}}function tP(r,e){var t=KI(r,e),n=JI(t);L(t,function(a){var i=a.getData(),o=a.coordinateSystem,s=o.getBaseAxis(),l=G1(a),u=n[W1(s)][l],c=u.offset,f=u.width;i.setLayout({bandWidth:u.bandWidth,offset:c,size:f})})}function rP(r){return{seriesType:r,plan:iu(),reset:function(e){if(!!nP(e)){var t=e.getData(),n=e.coordinateSystem,a=n.getBaseAxis(),i=n.getOtherAxis(a),o=t.getDimensionIndex(t.mapDimension(i.dim)),s=t.getDimensionIndex(t.mapDimension(a.dim)),l=e.get("showBackground",!0),u=t.mapDimension(i.dim),c=t.getCalculationInfo("stackResultDimension"),f=gi(t,u)&&!!t.getCalculationInfo("stackedOnSeries"),h=i.isHorizontal(),v=tj(a,i),d=aP(e),p=e.get("barMinHeight")||0,g=c&&t.getDimensionIndex(c),y=t.getLayout("size"),m=t.getLayout("offset");return{progress:function(_,b){for(var w=_.count,x=d&&Ua(w*3),S=d&&l&&Ua(w*3),T=d&&Ua(w),D=n.master.getRect(),M=h?D.width:D.height,A,I=b.getStore(),P=0;(A=_.next())!=null;){var E=I.get(f?g:o,A),O=I.get(s,A),N=v,V=void 0;f&&(V=+E-I.get(o,A));var $=void 0,U=void 0,Y=void 0,ae=void 0;if(h){var H=n.dataToPoint([E,O]);if(f){var q=n.dataToPoint([V,O]);N=q[0]}$=N,U=H[1]+m,Y=H[0]-N,ae=y,Math.abs(Y)<p&&(Y=(Y<0?-1:1)*p)}else{var H=n.dataToPoint([O,E]);if(f){var q=n.dataToPoint([O,V]);N=q[1]}$=H[0]+m,U=N,Y=y,ae=H[1]-N,Math.abs(ae)<p&&(ae=(ae<=0?-1:1)*p)}d?(x[P]=$,x[P+1]=U,x[P+2]=h?Y:ae,S&&(S[P]=h?D.x:$,S[P+1]=h?U:D.y,S[P+2]=M),T[A]=A):b.setItemLayout(A,{x:$,y:U,width:Y,height:ae}),P+=3}d&&b.setLayout({largePoints:x,largeDataIndices:T,largeBackgroundPoints:S,valueAxisHorizontal:h})}}}}}}function nP(r){return r.coordinateSystem&&r.coordinateSystem.type==="cartesian2d"}function aP(r){return r.pipelineContext&&r.pipelineContext.large}function tj(r,e){return e.toGlobalCoord(e.dataToCoord(e.type==="log"?1:0))}var rj=function(r,e,t,n){for(;t<n;){var a=t+n>>>1;r[a][1]<e?t=a+1:n=a}return t},iP=function(r){j(e,r);function e(t){var n=r.call(this,t)||this;return n.type="time",n}return e.prototype.getLabel=function(t){var n=this.getSetting("useUTC");return uf(t.value,iA[x7(Xl(this._minLevelUnit))]||iA.second,n,this.getSetting("locale"))},e.prototype.getFormattedLabel=function(t,n,a){var i=this.getSetting("useUTC"),o=this.getSetting("locale");return w7(t,n,a,o,i)},e.prototype.getTicks=function(){var t=this._interval,n=this._extent,a=[];if(!t)return a;a.push({value:n[0],level:0});var i=this.getSetting("useUTC"),o=uj(this._minLevelUnit,this._approxInterval,i,n);return a=a.concat(o),a.push({value:n[1],level:0}),a},e.prototype.calcNiceExtent=function(t){var n=this._extent;if(n[0]===n[1]&&(n[0]-=Vn,n[1]+=Vn),n[1]===-1/0&&n[0]===1/0){var a=new Date;n[1]=+new Date(a.getFullYear(),a.getMonth(),a.getDate()),n[0]=n[1]-Vn}this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval)},e.prototype.calcNiceTicks=function(t,n,a){t=t||10;var i=this._extent,o=i[1]-i[0];this._approxInterval=o/t,n!=null&&this._approxInterval<n&&(this._approxInterval=n),a!=null&&this._approxInterval>a&&(this._approxInterval=a);var s=bp.length,l=Math.min(rj(bp,this._approxInterval,0,s),s-1);this._interval=bp[l][1],this._minLevelUnit=bp[Math.max(l-1,0)][0]},e.prototype.parse=function(t){return je(t)?t:+bn(t)},e.prototype.contain=function(t){return yp(this.parse(t),this._extent)},e.prototype.normalize=function(t){return mp(this.parse(t),this._extent)},e.prototype.scale=function(t){return _p(t,this._extent)},e.type="time",e}(go),bp=[["second",L_],["minute",I_],["hour",sf],["quarter-day",sf*6],["half-day",sf*12],["day",Vn*1.2],["half-week",Vn*3.5],["week",Vn*7],["month",Vn*31],["quarter",Vn*95],["half-year",aA/2],["year",aA]];function nj(r,e,t,n){var a=bn(e),i=bn(t),o=function(d){return lA(a,d,n)===lA(i,d,n)},s=function(){return o("year")},l=function(){return s()&&o("month")},u=function(){return l()&&o("day")},c=function(){return u()&&o("hour")},f=function(){return c()&&o("minute")},h=function(){return f()&&o("second")},v=function(){return h()&&o("millisecond")};switch(r){case"year":return s();case"month":return l();case"day":return u();case"hour":return c();case"minute":return f();case"second":return h();case"millisecond":return v()}}function aj(r,e){return r/=Vn,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function ij(r){var e=30*Vn;return r/=e,r>6?6:r>3?3:r>2?2:1}function oj(r){return r/=sf,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function oP(r,e){return r/=e?I_:L_,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function sj(r){return P0(r,!0)}function lj(r,e,t){var n=new Date(r);switch(Xl(e)){case"year":case"month":n[uA(t)](0);case"day":n[cA(t)](1);case"hour":n[fA(t)](0);case"minute":n[hA(t)](0);case"second":n[vA(t)](0),n[dA(t)](0)}return n.getTime()}function uj(r,e,t,n){var a=1e4,i=oA,o=0;function s(M,A,I,P,E,O,N){for(var V=new Date(A),$=A,U=V[P]();$<I&&$<=n[1];)N.push({value:$}),U+=M,V[E](U),$=V.getTime();N.push({value:$,notAdd:!0})}function l(M,A,I){var P=[],E=!A.length;if(!nj(Xl(M),n[0],n[1],t)){E&&(A=[{value:lj(new Date(n[0]),M,t)},{value:n[1]}]);for(var O=0;O<A.length-1;O++){var N=A[O].value,V=A[O+1].value;if(N!==V){var $=void 0,U=void 0,Y=void 0,ae=!1;switch(M){case"year":$=Math.max(1,Math.round(e/Vn/365)),U=E_(t),Y=S7(t);break;case"half-year":case"quarter":case"month":$=ij(e),U=Ql(t),Y=uA(t);break;case"week":case"half-week":case"day":$=aj(e),U=kd(t),Y=cA(t),ae=!0;break;case"half-day":case"quarter-day":case"hour":$=oj(e),U=cf(t),Y=fA(t);break;case"minute":$=oP(e,!0),U=Bd(t),Y=hA(t);break;case"second":$=oP(e,!1),U=zd(t),Y=vA(t);break;case"millisecond":$=sj(e),U=Fd(t),Y=dA(t);break}s($,N,V,U,Y,ae,P),M==="year"&&I.length>1&&O===0&&I.unshift({value:I[0].value-$})}}for(var O=0;O<P.length;O++)I.push(P[O]);return P}}for(var u=[],c=[],f=0,h=0,v=0;v<i.length&&o++<a;++v){var d=Xl(i[v]);if(!!b7(i[v])){l(i[v],u[u.length-1]||[],c);var p=i[v+1]?Xl(i[v+1]):null;if(d!==p){if(c.length){h=f,c.sort(function(M,A){return M.value-A.value});for(var g=[],y=0;y<c.length;++y){var m=c[y].value;(y===0||c[y-1].value!==m)&&(g.push(c[y]),m>=n[0]&&m<=n[1]&&f++)}var _=(n[1]-n[0])/e;if(f>_*1.5&&h>_/1.5||(u.push(g),f>_||r===i[v]))break}c=[]}}}for(var b=nt(J(u,function(M){return nt(M,function(A){return A.value>=n[0]&&A.value<=n[1]&&!A.notAdd})}),function(M){return M.length>0}),w=[],x=b.length-1,v=0;v<b.length;++v)for(var S=b[v],T=0;T<S.length;++T)w.push({value:S[T].value,level:x-v});w.sort(function(M,A){return M.value-A.value});for(var D=[],v=0;v<w.length;++v)(v===0||w[v].value!==w[v-1].value)&&D.push(w[v]);return D}yi.registerClass(iP);var sP=iP,lP=yi.prototype,Pf=go.prototype,cj=At,fj=Math.floor,hj=Math.ceil,xp=Math.pow,_a=Math.log,U1=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="log",t.base=10,t._originalScale=new go,t._interval=0,t}return e.prototype.getTicks=function(t){var n=this._originalScale,a=this._extent,i=n.getExtent(),o=Pf.getTicks.call(this,t);return J(o,function(s){var l=s.value,u=At(xp(this.base,l));return u=l===a[0]&&this._fixMin?wp(u,i[0]):u,u=l===a[1]&&this._fixMax?wp(u,i[1]):u,{value:u}},this)},e.prototype.setExtent=function(t,n){var a=_a(this.base);t=_a(Math.max(0,t))/a,n=_a(Math.max(0,n))/a,Pf.setExtent.call(this,t,n)},e.prototype.getExtent=function(){var t=this.base,n=lP.getExtent.call(this);n[0]=xp(t,n[0]),n[1]=xp(t,n[1]);var a=this._originalScale,i=a.getExtent();return this._fixMin&&(n[0]=wp(n[0],i[0])),this._fixMax&&(n[1]=wp(n[1],i[1])),n},e.prototype.unionExtent=function(t){this._originalScale.unionExtent(t);var n=this.base;t[0]=_a(t[0])/_a(n),t[1]=_a(t[1])/_a(n),lP.unionExtent.call(this,t)},e.prototype.unionExtentFromData=function(t,n){this.unionExtent(t.getApproximateExtent(n))},e.prototype.calcNiceTicks=function(t){t=t||10;var n=this._extent,a=n[1]-n[0];if(!(a===1/0||a<=0)){var i=nD(a),o=t/a*i;for(o<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var s=[At(hj(n[0]/i)*i),At(fj(n[1]/i)*i)];this._interval=i,this._niceExtent=s}},e.prototype.calcNiceExtent=function(t){Pf.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return t=_a(t)/_a(this.base),yp(t,this._extent)},e.prototype.normalize=function(t){return t=_a(t)/_a(this.base),mp(t,this._extent)},e.prototype.scale=function(t){return t=_p(t,this._extent),xp(this.base,t)},e.type="log",e}(yi),uP=U1.prototype;uP.getMinorTicks=Pf.getMinorTicks,uP.getLabel=Pf.getLabel;function wp(r,e){return cj(r,fa(e))}yi.registerClass(U1);var vj=U1,dj=function(){function r(e,t,n){this._prepareParams(e,t,n)}return r.prototype._prepareParams=function(e,t,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var a=this._isOrdinal=e.type==="ordinal";this._needCrossZero=e.type==="interval"&&t.getNeedCrossZero&&t.getNeedCrossZero();var i=this._modelMinRaw=t.get("min",!0);ye(i)?this._modelMinNum=Sp(e,i({min:n[0],max:n[1]})):i!=="dataMin"&&(this._modelMinNum=Sp(e,i));var o=this._modelMaxRaw=t.get("max",!0);if(ye(o)?this._modelMaxNum=Sp(e,o({min:n[0],max:n[1]})):o!=="dataMax"&&(this._modelMaxNum=Sp(e,o)),a)this._axisDataLen=t.getCategories().length;else{var s=t.get("boundaryGap"),l=K(s)?s:[s||0,s||0];typeof l[0]=="boolean"||typeof l[1]=="boolean"?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[ca(l[0],1),ca(l[1],1)]}},r.prototype.calculate=function(){var e=this._isOrdinal,t=this._dataMin,n=this._dataMax,a=this._axisDataLen,i=this._boundaryGapInner,o=e?null:n-t||Math.abs(t),s=this._modelMinRaw==="dataMin"?t:this._modelMinNum,l=this._modelMaxRaw==="dataMax"?n:this._modelMaxNum,u=s!=null,c=l!=null;s==null&&(s=e?a?0:NaN:t-i[0]*o),l==null&&(l=e?a?a-1:NaN:n+i[1]*o),(s==null||!isFinite(s))&&(s=NaN),(l==null||!isFinite(l))&&(l=NaN);var f=Tl(s)||Tl(l)||e&&!a;this._needCrossZero&&(s>0&&l>0&&!u&&(s=0),s<0&&l<0&&!c&&(l=0));var h=this._determinedMin,v=this._determinedMax;return h!=null&&(s=h,u=!0),v!=null&&(l=v,c=!0),{min:s,max:l,minFixed:u,maxFixed:c,isBlank:f}},r.prototype.modifyDataMinMax=function(e,t){this[gj[e]]=t},r.prototype.setDeterminedMinMax=function(e,t){var n=pj[e];this[n]=t},r.prototype.freeze=function(){this.frozen=!0},r}(),pj={min:"_determinedMin",max:"_determinedMax"},gj={min:"_dataMin",max:"_dataMax"};function cP(r,e,t){var n=r.rawExtentInfo;return n||(n=new dj(r,e,t),r.rawExtentInfo=n,n)}function Sp(r,e){return e==null?null:Tl(e)?NaN:r.parse(e)}function fP(r,e){var t=r.type,n=cP(r,e,r.getExtent()).calculate();r.setBlank(n.isBlank);var a=n.min,i=n.max,o=e.ecModel;if(o&&t==="time"){var s=KI("bar",o),l=!1;if(L(s,function(f){l=l||f.getBaseAxis()===e.axis}),l){var u=JI(s),c=yj(a,i,e,u);a=c.min,i=c.max}}return{extent:[a,i],fixMin:n.minFixed,fixMax:n.maxFixed}}function yj(r,e,t,n){var a=t.axis.getExtent(),i=a[1]-a[0],o=ej(n,t.axis);if(o===void 0)return{min:r,max:e};var s=1/0;L(o,function(v){s=Math.min(v.offset,s)});var l=-1/0;L(o,function(v){l=Math.max(v.offset+v.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=e-r,f=1-(s+l)/i,h=c/f-c;return e+=h*(l/u),r-=h*(s/u),{min:r,max:e}}function Os(r,e){var t=e,n=fP(r,t),a=n.extent,i=t.get("splitNumber");r instanceof vj&&(r.base=t.get("logBase"));var o=r.type,s=t.get("interval"),l=o==="interval"||o==="time";r.setExtent(a[0],a[1]),r.calcNiceExtent({splitNumber:i,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?t.get("minInterval"):null,maxInterval:l?t.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function Ef(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new $1({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new sP({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(yi.getClass(e)||go)}}function mj(r){var e=r.scale.getExtent(),t=e[0],n=e[1];return!(t>0&&n>0||t<0&&n<0)}function Of(r){var e=r.getLabelModel().get("formatter"),t=r.type==="category"?r.scale.getExtent()[0]:null;return r.scale.type==="time"?function(n){return function(a,i){return r.scale.getFormattedLabel(a,i,n)}}(e):ce(e)?function(n){return function(a){var i=r.scale.getLabel(a),o=n.replace("{value}",i!=null?i:"");return o}}(e):ye(e)?function(n){return function(a,i){return t!=null&&(i=a.value-t),n(j1(r,a),i,a.level!=null?{level:a.level}:null)}}(e):function(n){return r.scale.getLabel(n)}}function j1(r,e){return r.type==="category"?r.scale.getLabel(e):e.value}function _j(r){var e=r.model,t=r.scale;if(!(!e.get(["axisLabel","show"])||t.isBlank())){var n,a,i=t.getExtent();t instanceof $1?a=t.count():(n=t.getTicks(),a=n.length);var o=r.getLabelModel(),s=Of(r),l,u=1;a>40&&(u=Math.ceil(a/40));for(var c=0;c<a;c+=u){var f=n?n[c]:{value:i[0]+c},h=s(f,c),v=o.getTextRect(h),d=bj(v,o.get("rotate")||0);l?l.union(d):l=d}return l}}function bj(r,e){var t=e*Math.PI/180,n=r.width,a=r.height,i=n*Math.abs(Math.cos(t))+Math.abs(a*Math.sin(t)),o=n*Math.abs(Math.sin(t))+Math.abs(a*Math.cos(t)),s=new Re(r.x,r.y,i,o);return s}function Y1(r){var e=r.get("interval");return e==null?"auto":e}function hP(r){return r.type==="category"&&Y1(r.getLabelModel())===0}function Cp(r,e){var t={};return L(r.mapDimensionsAll(e),function(n){t[B1(r,n)]=!0}),Fe(t)}function xj(r,e,t){e&&L(Cp(e,t),function(n){var a=e.getApproximateExtent(n);a[0]<r[0]&&(r[0]=a[0]),a[1]>r[1]&&(r[1]=a[1])})}var du=function(){function r(){}return r.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},r.prototype.getCoordSysModel=function(){},r}();function wj(r){return Wa(null,r)}var Sj={isDimensionStacked:gi,enableDataStack:UI,getStackedDimension:B1};function Cj(r,e){var t=e;e instanceof lt||(t=new lt(e));var n=Ef(t);return n.setExtent(r[0],r[1]),Os(n,t),n}function Tj(r){Et(r,du)}function Dj(r,e){return e=e||{},gt(r,null,null,e.state!=="normal")}var Mj=Object.freeze(Object.defineProperty({__proto__:null,createList:wj,getLayoutRect:Ht,dataStack:Sj,createScale:Cj,mixinAxisModelCommonMethods:Tj,getECData:Me,createTextStyle:Dj,createDimensions:R6,createSymbol:kt,enableHoverEmphasis:no},Symbol.toStringTag,{value:"Module"})),Aj=1e-8;function vP(r,e){return Math.abs(r-e)<Aj}function Rs(r,e,t){var n=0,a=r[0];if(!a)return!1;for(var i=1;i<r.length;i++){var o=r[i];n+=ci(a[0],a[1],o[0],o[1],e,t),a=o}var s=r[0];return(!vP(a[0],s[0])||!vP(a[1],s[1]))&&(n+=ci(a[0],a[1],s[0],s[1],e,t)),n!==0}var Lj=[];function q1(r,e){for(var t=0;t<r.length;t++)sr(r[t],r[t],e)}function dP(r,e,t,n){for(var a=0;a<r.length;a++){var i=r[a];n&&(i=n.project(i)),i&&isFinite(i[0])&&isFinite(i[1])&&(ai(e,e,i),ii(t,t,i))}}function Ij(r){for(var e=0,t=0,n=0,a=r.length,i=r[a-1][0],o=r[a-1][1],s=0;s<a;s++){var l=r[s][0],u=r[s][1],c=i*u-l*o;e+=c,t+=(i+l)*c,n+=(o+u)*c,i=l,o=u}return e?[t/e/3,n/e/3,e]:[r[0][0]||0,r[0][1]||0]}var pP=function(){function r(e){this.name=e}return r.prototype.setCenter=function(e){this._center=e},r.prototype.getCenter=function(){var e=this._center;return e||(e=this._center=this.calcCenter()),e},r}(),gP=function(){function r(e,t){this.type="polygon",this.exterior=e,this.interiors=t}return r}(),yP=function(){function r(e){this.type="linestring",this.points=e}return r}(),mP=function(r){j(e,r);function e(t,n,a){var i=r.call(this,t)||this;return i.type="geoJSON",i.geometries=n,i._center=a&&[a[0],a[1]],i}return e.prototype.calcCenter=function(){for(var t=this.geometries,n,a=0,i=0;i<t.length;i++){var o=t[i],s=o.exterior,l=s&&s.length;l>a&&(n=o,a=l)}if(n)return Ij(n.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},e.prototype.getBoundingRect=function(t){var n=this._rect;if(n&&!t)return n;var a=[1/0,1/0],i=[-1/0,-1/0],o=this.geometries;return L(o,function(s){s.type==="polygon"?dP(s.exterior,a,i,t):L(s.points,function(l){dP(l,a,i,t)})}),isFinite(a[0])&&isFinite(a[1])&&isFinite(i[0])&&isFinite(i[1])||(a[0]=a[1]=i[0]=i[1]=0),n=new Re(a[0],a[1],i[0]-a[0],i[1]-a[1]),t||(this._rect=n),n},e.prototype.contain=function(t){var n=this.getBoundingRect(),a=this.geometries;if(!n.contain(t[0],t[1]))return!1;e:for(var i=0,o=a.length;i<o;i++){var s=a[i];if(s.type==="polygon"){var l=s.exterior,u=s.interiors;if(Rs(l,t[0],t[1])){for(var c=0;c<(u?u.length:0);c++)if(Rs(u[c],t[0],t[1]))continue e;return!0}}}return!1},e.prototype.transformTo=function(t,n,a,i){var o=this.getBoundingRect(),s=o.width/o.height;a?i||(i=a/s):a=s*i;for(var l=new Re(t,n,a,i),u=o.calculateTransform(l),c=this.geometries,f=0;f<c.length;f++){var h=c[f];h.type==="polygon"?(q1(h.exterior,u),L(h.interiors,function(v){q1(v,u)})):L(h.points,function(v){q1(v,u)})}o=this._rect,o.copy(l),this._center=[o.x+o.width/2,o.y+o.height/2]},e.prototype.cloneShallow=function(t){t==null&&(t=this.name);var n=new e(t,this.geometries,this._center);return n._rect=this._rect,n.transformTo=null,n},e}(pP),Pj=function(r){j(e,r);function e(t,n){var a=r.call(this,t)||this;return a.type="geoSVG",a._elOnlyForCalculate=n,a}return e.prototype.calcCenter=function(){for(var t=this._elOnlyForCalculate,n=t.getBoundingRect(),a=[n.x+n.width/2,n.y+n.height/2],i=mc(Lj),o=t;o&&!o.isGeoSVGGraphicRoot;)Ea(i,o.getLocalTransform(),i),o=o.parent;return Yo(i,i),sr(a,a,i),a},e}(pP);function Ej(r){if(!r.UTF8Encoding)return r;var e=r,t=e.UTF8Scale;t==null&&(t=1024);var n=e.features;return L(n,function(a){var i=a.geometry,o=i.encodeOffsets,s=i.coordinates;if(!!o)switch(i.type){case"LineString":i.coordinates=_P(s,o,t);break;case"Polygon":Z1(s,o,t);break;case"MultiLineString":Z1(s,o,t);break;case"MultiPolygon":L(s,function(l,u){return Z1(l,o[u],t)})}}),e.UTF8Encoding=!1,e}function Z1(r,e,t){for(var n=0;n<r.length;n++)r[n]=_P(r[n],e[n],t)}function _P(r,e,t){for(var n=[],a=e[0],i=e[1],o=0;o<r.length;o+=2){var s=r.charCodeAt(o)-64,l=r.charCodeAt(o+1)-64;s=s>>1^-(s&1),l=l>>1^-(l&1),s+=a,l+=i,a=s,i=l,n.push([s/t,l/t])}return n}function X1(r,e){return r=Ej(r),J(nt(r.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var n=t.properties,a=t.geometry,i=[];switch(a.type){case"Polygon":var o=a.coordinates;i.push(new gP(o[0],o.slice(1)));break;case"MultiPolygon":L(a.coordinates,function(l){l[0]&&i.push(new gP(l[0],l.slice(1)))});break;case"LineString":i.push(new yP([a.coordinates]));break;case"MultiLineString":i.push(new yP(a.coordinates))}var s=new mP(n[e||"name"],i,n.cp);return s.properties=n,s})}var Oj=Object.freeze(Object.defineProperty({__proto__:null,linearMap:at,round:At,asc:_n,getPrecision:fa,getPrecisionSafe:tD,getPixelPrecision:A0,getPercentWithPrecision:WG,MAX_SAFE_INTEGER:L0,remRadian:I0,isRadianAroundZero:kc,parseDate:bn,quantity:nD,quantityExponent:rd,nice:P0,quantile:nd,reformIntervals:E0,isNumeric:O0,numericToNumber:Na},Symbol.toStringTag,{value:"Module"})),Rj=Object.freeze(Object.defineProperty({__proto__:null,parse:bn,format:uf},Symbol.toStringTag,{value:"Module"})),Nj=Object.freeze(Object.defineProperty({__proto__:null,extendShape:VM,extendPath:$M,makePath:tf,makeImage:m_,mergePath:xn,resizePath:__,createIcon:jl,updateProps:qe,initProps:xt,getTransform:io,clipPointsByRect:b_,clipRectByRect:WM,registerShape:Fn,getShapeClass:Ad,Group:Te,Image:ur,Text:We,Circle:ha,Ellipse:_d,Sector:Hr,Ring:Kc,Polygon:Gr,Polyline:Wr,Rect:Ge,Line:tr,BezierCurve:Jc,Arc:xd,IncrementalDisplayable:BM,CompoundPath:wd,LinearGradient:Hl,RadialGradient:p_,BoundingRect:Re},Symbol.toStringTag,{value:"Module"})),kj=Object.freeze(Object.defineProperty({__proto__:null,addCommas:O_,toCamelCase:R_,normalizeCssArray:xs,encodeHTML:zr,formatTpl:B_,getTooltipMarker:gA,formatTime:D7,capitalFirst:M7,truncateText:_D,getTextRect:C7},Symbol.toStringTag,{value:"Module"})),Bj=Object.freeze(Object.defineProperty({__proto__:null,map:J,each:L,indexOf:Ne,inherits:Em,reduce:Pn,filter:nt,bind:fe,curry:Ae,isArray:K,isString:ce,isObject:_e,isFunction:ye,extend:Q,defaults:me,clone:we,merge:Pe},Symbol.toStringTag,{value:"Module"})),Rf=Ye();function zj(r){return r.type==="category"?Vj(r):Hj(r)}function Fj(r,e){return r.type==="category"?$j(r,e):{ticks:J(r.scale.getTicks(),function(t){return t.value})}}function Vj(r){var e=r.getLabelModel(),t=bP(r,e);return!e.get("show")||r.scale.isBlank()?{labels:[],labelCategoryInterval:t.labelCategoryInterval}:t}function bP(r,e){var t=xP(r,"labels"),n=Y1(e),a=wP(t,n);if(a)return a;var i,o;return ye(n)?i=TP(r,n):(o=n==="auto"?Gj(r):n,i=CP(r,o)),SP(t,n,{labels:i,labelCategoryInterval:o})}function $j(r,e){var t=xP(r,"ticks"),n=Y1(e),a=wP(t,n);if(a)return a;var i,o;if((!e.get("show")||r.scale.isBlank())&&(i=[]),ye(n))i=TP(r,n,!0);else if(n==="auto"){var s=bP(r,r.getLabelModel());o=s.labelCategoryInterval,i=J(s.labels,function(l){return l.tickValue})}else o=n,i=CP(r,o,!0);return SP(t,n,{ticks:i,tickCategoryInterval:o})}function Hj(r){var e=r.scale.getTicks(),t=Of(r);return{labels:J(e,function(n,a){return{level:n.level,formattedLabel:t(n,a),rawLabel:r.scale.getLabel(n),tickValue:n.value}})}}function xP(r,e){return Rf(r)[e]||(Rf(r)[e]=[])}function wP(r,e){for(var t=0;t<r.length;t++)if(r[t].key===e)return r[t].value}function SP(r,e,t){return r.push({key:e,value:t}),t}function Gj(r){var e=Rf(r).autoInterval;return e!=null?e:Rf(r).autoInterval=r.calculateCategoryInterval()}function Wj(r){var e=Uj(r),t=Of(r),n=(e.axisRotate-e.labelRotate)/180*Math.PI,a=r.scale,i=a.getExtent(),o=a.count();if(i[1]-i[0]<1)return 0;var s=1;o>40&&(s=Math.max(1,Math.floor(o/40)));for(var l=i[0],u=r.dataToCoord(l+1)-r.dataToCoord(l),c=Math.abs(u*Math.cos(n)),f=Math.abs(u*Math.sin(n)),h=0,v=0;l<=i[1];l+=s){var d=0,p=0,g=Rc(t({value:l}),e.font,"center","top");d=g.width*1.3,p=g.height*1.3,h=Math.max(h,d,7),v=Math.max(v,p,7)}var y=h/c,m=v/f;isNaN(y)&&(y=1/0),isNaN(m)&&(m=1/0);var _=Math.max(0,Math.floor(Math.min(y,m))),b=Rf(r.model),w=r.getExtent(),x=b.lastAutoInterval,S=b.lastTickCount;return x!=null&&S!=null&&Math.abs(x-_)<=1&&Math.abs(S-o)<=1&&x>_&&b.axisExtent0===w[0]&&b.axisExtent1===w[1]?_=x:(b.lastTickCount=o,b.lastAutoInterval=_,b.axisExtent0=w[0],b.axisExtent1=w[1]),_}function Uj(r){var e=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function CP(r,e,t){var n=Of(r),a=r.scale,i=a.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=i[0],c=a.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var f=hP(r),h=o.get("showMinLabel")||f,v=o.get("showMaxLabel")||f;h&&u!==i[0]&&p(i[0]);for(var d=u;d<=i[1];d+=l)p(d);v&&d-l!==i[1]&&p(i[1]);function p(g){var y={value:g};s.push(t?g:{formattedLabel:n(y),rawLabel:a.getLabel(y),tickValue:g})}return s}function TP(r,e,t){var n=r.scale,a=Of(r),i=[];return L(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;e(o.value,s)&&i.push(t?l:{formattedLabel:a(o),rawLabel:s,tickValue:l})}),i}var DP=[0,1],jj=function(){function r(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return r.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),a=Math.max(t[0],t[1]);return e>=n&&e<=a},r.prototype.containData=function(e){return this.scale.contain(e)},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(e){return A0(e||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},r.prototype.dataToCoord=function(e,t){var n=this._extent,a=this.scale;return e=a.normalize(e),this.onBand&&a.type==="ordinal"&&(n=n.slice(),MP(n,a.count())),at(e,DP,n,t)},r.prototype.coordToData=function(e,t){var n=this._extent,a=this.scale;this.onBand&&a.type==="ordinal"&&(n=n.slice(),MP(n,a.count()));var i=at(e,n,DP,t);return this.scale.scale(i)},r.prototype.pointToData=function(e,t){},r.prototype.getTicksCoords=function(e){e=e||{};var t=e.tickModel||this.getTickModel(),n=Fj(this,t),a=n.ticks,i=J(a,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=t.get("alignWithLabel");return Yj(this,i,o,e.clamp),i},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),t=e.get("splitNumber");t>0&&t<100||(t=5);var n=this.scale.getMinorTicks(t),a=J(n,function(i){return J(i,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return a},r.prototype.getViewLabels=function(){return zj(this).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),n=t[1]-t[0]+(this.onBand?1:0);n===0&&(n=1);var a=Math.abs(e[1]-e[0]);return Math.abs(a)/n},r.prototype.calculateCategoryInterval=function(){return Wj(this)},r}();function MP(r,e){var t=r[1]-r[0],n=e,a=t/n/2;r[0]+=a,r[1]-=a}function Yj(r,e,t,n){var a=e.length;if(!r.onBand||t||!a)return;var i=r.getExtent(),o,s;if(a===1)e[0].coord=i[0],o=e[1]={coord:i[0]};else{var l=e[a-1].tickValue-e[0].tickValue,u=(e[a-1].coord-e[0].coord)/l;L(e,function(v){v.coord-=u/2});var c=r.scale.getExtent();s=1+c[1]-e[a-1].tickValue,o={coord:e[a-1].coord+u*s},e.push(o)}var f=i[0]>i[1];h(e[0].coord,i[0])&&(n?e[0].coord=i[0]:e.shift()),n&&h(i[0],e[0].coord)&&e.unshift({coord:i[0]}),h(i[1],o.coord)&&(n?o.coord=i[1]:e.pop()),n&&h(o.coord,i[1])&&e.push({coord:i[1]});function h(v,d){return v=At(v),d=At(d),f?v>d:v<d}}var Un=jj;function qj(r){var e=$e.extend(r);return $e.registerClass(e),e}function Zj(r){var e=wt.extend(r);return wt.registerClass(e),e}function Xj(r){var e=yt.extend(r);return yt.registerClass(e),e}function Qj(r){var e=ut.extend(r);return ut.registerClass(e),e}var Nf=Math.PI*2,Ns=Va.CMD,Kj=["top","right","bottom","left"];function Jj(r,e,t,n,a){var i=t.width,o=t.height;switch(r){case"top":n.set(t.x+i/2,t.y-e),a.set(0,-1);break;case"bottom":n.set(t.x+i/2,t.y+o+e),a.set(0,1);break;case"left":n.set(t.x-e,t.y+o/2),a.set(-1,0);break;case"right":n.set(t.x+i+e,t.y+o/2),a.set(1,0);break}}function eY(r,e,t,n,a,i,o,s,l){o-=r,s-=e;var u=Math.sqrt(o*o+s*s);o/=u,s/=u;var c=o*t+r,f=s*t+e;if(Math.abs(n-a)%Nf<1e-4)return l[0]=c,l[1]=f,u-t;if(i){var h=n;n=to(a),a=to(h)}else n=to(n),a=to(a);n>a&&(a+=Nf);var v=Math.atan2(s,o);if(v<0&&(v+=Nf),v>=n&&v<=a||v+Nf>=n&&v+Nf<=a)return l[0]=c,l[1]=f,u-t;var d=t*Math.cos(n)+r,p=t*Math.sin(n)+e,g=t*Math.cos(a)+r,y=t*Math.sin(a)+e,m=(d-o)*(d-o)+(p-s)*(p-s),_=(g-o)*(g-o)+(y-s)*(y-s);return m<_?(l[0]=d,l[1]=p,Math.sqrt(m)):(l[0]=g,l[1]=y,Math.sqrt(_))}function Tp(r,e,t,n,a,i,o,s){var l=a-r,u=i-e,c=t-r,f=n-e,h=Math.sqrt(c*c+f*f);c/=h,f/=h;var v=l*c+u*f,d=v/h;s&&(d=Math.min(Math.max(d,0),1)),d*=h;var p=o[0]=r+d*c,g=o[1]=e+d*f;return Math.sqrt((p-a)*(p-a)+(g-i)*(g-i))}function AP(r,e,t,n,a,i,o){t<0&&(r=r+t,t=-t),n<0&&(e=e+n,n=-n);var s=r+t,l=e+n,u=o[0]=Math.min(Math.max(a,r),s),c=o[1]=Math.min(Math.max(i,e),l);return Math.sqrt((u-a)*(u-a)+(c-i)*(c-i))}var ba=[];function tY(r,e,t){var n=AP(e.x,e.y,e.width,e.height,r.x,r.y,ba);return t.set(ba[0],ba[1]),n}function rY(r,e,t){for(var n=0,a=0,i=0,o=0,s,l,u=1/0,c=e.data,f=r.x,h=r.y,v=0;v<c.length;){var d=c[v++];v===1&&(n=c[v],a=c[v+1],i=n,o=a);var p=u;switch(d){case Ns.M:i=c[v++],o=c[v++],n=i,a=o;break;case Ns.L:p=Tp(n,a,c[v],c[v+1],f,h,ba,!0),n=c[v++],a=c[v++];break;case Ns.C:p=w2(n,a,c[v++],c[v++],c[v++],c[v++],c[v],c[v+1],f,h,ba),n=c[v++],a=c[v++];break;case Ns.Q:p=C2(n,a,c[v++],c[v++],c[v],c[v+1],f,h,ba),n=c[v++],a=c[v++];break;case Ns.A:var g=c[v++],y=c[v++],m=c[v++],_=c[v++],b=c[v++],w=c[v++];v+=1;var x=!!(1-c[v++]);s=Math.cos(b)*m+g,l=Math.sin(b)*_+y,v<=1&&(i=s,o=l);var S=(f-g)*_/m+g;p=eY(g,y,_,b,b+w,x,S,h,ba),n=Math.cos(b+w)*m+g,a=Math.sin(b+w)*_+y;break;case Ns.R:i=n=c[v++],o=a=c[v++];var T=c[v++],D=c[v++];p=AP(i,o,T,D,f,h,ba);break;case Ns.Z:p=Tp(n,a,i,o,f,h,ba,!0),n=i,a=o;break}p<u&&(u=p,t.set(ba[0],ba[1]))}return u}var xa=new Oe,mt=new Oe,Bt=new Oe,ja=new Oe,Ya=new Oe;function LP(r,e){if(!!r){var t=r.getTextGuideLine(),n=r.getTextContent();if(!!(n&&t)){var a=r.textGuideLineConfig||{},i=[[0,0],[0,0],[0,0]],o=a.candidates||Kj,s=n.getBoundingRect().clone();s.applyTransform(n.getComputedTransform());var l=1/0,u=a.anchor,c=r.getComputedTransform(),f=c&&Yo([],c),h=e.get("length2")||0;u&&Bt.copy(u);for(var v=0;v<o.length;v++){var d=o[v];Jj(d,0,s,xa,ja),Oe.scaleAndAdd(mt,xa,ja,h),mt.transform(f);var p=r.getBoundingRect(),g=u?u.distance(mt):r instanceof Be?rY(mt,r.path,Bt):tY(mt,p,Bt);g<l&&(l=g,mt.transform(c),Bt.transform(c),Bt.toArray(i[0]),mt.toArray(i[1]),xa.toArray(i[2]))}IP(i,e.get("minTurnAngle")),t.setShape({points:i})}}}var Dp=[],jr=new Oe;function IP(r,e){if(e<=180&&e>0){e=e/180*Math.PI,xa.fromArray(r[0]),mt.fromArray(r[1]),Bt.fromArray(r[2]),Oe.sub(ja,xa,mt),Oe.sub(Ya,Bt,mt);var t=ja.len(),n=Ya.len();if(!(t<.001||n<.001)){ja.scale(1/t),Ya.scale(1/n);var a=ja.dot(Ya),i=Math.cos(e);if(i<a){var o=Tp(mt.x,mt.y,Bt.x,Bt.y,xa.x,xa.y,Dp,!1);jr.fromArray(Dp),jr.scaleAndAdd(Ya,o/Math.tan(Math.PI-e));var s=Bt.x!==mt.x?(jr.x-mt.x)/(Bt.x-mt.x):(jr.y-mt.y)/(Bt.y-mt.y);if(isNaN(s))return;s<0?Oe.copy(jr,mt):s>1&&Oe.copy(jr,Bt),jr.toArray(r[1])}}}}function nY(r,e,t){if(t<=180&&t>0){t=t/180*Math.PI,xa.fromArray(r[0]),mt.fromArray(r[1]),Bt.fromArray(r[2]),Oe.sub(ja,mt,xa),Oe.sub(Ya,Bt,mt);var n=ja.len(),a=Ya.len();if(!(n<.001||a<.001)){ja.scale(1/n),Ya.scale(1/a);var i=ja.dot(e),o=Math.cos(t);if(i<o){var s=Tp(mt.x,mt.y,Bt.x,Bt.y,xa.x,xa.y,Dp,!1);jr.fromArray(Dp);var l=Math.PI/2,u=Math.acos(Ya.dot(e)),c=l+u-t;if(c>=l)Oe.copy(jr,Bt);else{jr.scaleAndAdd(Ya,s/Math.tan(Math.PI/2-c));var f=Bt.x!==mt.x?(jr.x-mt.x)/(Bt.x-mt.x):(jr.y-mt.y)/(Bt.y-mt.y);if(isNaN(f))return;f<0?Oe.copy(jr,mt):f>1&&Oe.copy(jr,Bt)}jr.toArray(r[1])}}}}function PP(r,e,t,n){var a=t==="normal",i=a?r:r.ensureState(t);i.ignore=e;var o=n.get("smooth");o&&o===!0&&(o=.3),i.shape=i.shape||{},o>0&&(i.shape.smooth=o);var s=n.getModel("lineStyle").getLineStyle();a?r.useStyle(s):i.style=s}function aY(r,e){var t=e.smooth,n=e.points;if(!!n)if(r.moveTo(n[0][0],n[0][1]),t>0&&n.length>=3){var a=ni(n[0],n[1]),i=ni(n[1],n[2]);if(!a||!i){r.lineTo(n[1][0],n[1][1]),r.lineTo(n[2][0],n[2][1]);return}var o=Math.min(a,i)*t,s=yc([],n[1],n[0],o/a),l=yc([],n[1],n[2],o/i),u=yc([],s,l,.5);r.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),r.bezierCurveTo(l[0],l[1],l[0],l[1],n[2][0],n[2][1])}else for(var c=1;c<n.length;c++)r.lineTo(n[c][0],n[c][1])}function Q1(r,e,t){var n=r.getTextGuideLine(),a=r.getTextContent();if(!a){n&&r.removeTextGuideLine();return}for(var i=e.normal,o=i.get("show"),s=a.ignore,l=0;l<Uc.length;l++){var u=Uc[l],c=e[u],f=u==="normal";if(c){var h=c.get("show"),v=f?s:Ee(a.states[u]&&a.states[u].ignore,s);if(v||!Ee(h,o)){var d=f?n:n&&n.states[u];d&&(d.ignore=!0);continue}n||(n=new Wr,r.setTextGuideLine(n),!f&&(s||!o)&&PP(n,!0,"normal",e.normal),r.stateProxy&&(n.stateProxy=r.stateProxy)),PP(n,!1,u,c)}}if(n){me(n.style,t),n.style.fill=null;var p=i.get("showAbove"),g=r.textGuideLineConfig=r.textGuideLineConfig||{};g.showAbove=p||!1,n.buildPath=aY}}function K1(r,e){e=e||"labelLine";for(var t={normal:r.getModel(e)},n=0;n<$r.length;n++){var a=$r[n];t[a]=r.getModel([a,e])}return t}function EP(r){for(var e=[],t=0;t<r.length;t++){var n=r[t];if(!n.defaultAttr.ignore){var a=n.label,i=a.getComputedTransform(),o=a.getBoundingRect(),s=!i||i[1]<1e-5&&i[2]<1e-5,l=a.style.margin||0,u=o.clone();u.applyTransform(i),u.x-=l/2,u.y-=l/2,u.width+=l,u.height+=l;var c=s?new Td(o,i):null;e.push({label:a,labelLine:n.labelLine,rect:u,localRect:o,obb:c,priority:n.priority,defaultAttr:n.defaultAttr,layoutOption:n.computedLayoutOption,axisAligned:s,transform:i})}}return e}function OP(r,e,t,n,a,i){var o=r.length;if(o<2)return;r.sort(function(T,D){return T.rect[e]-D.rect[e]});for(var s=0,l,u=!1,c=0,f=0;f<o;f++){var h=r[f],v=h.rect;l=v[e]-s,l<0&&(v[e]-=l,h.label[e]-=l,u=!0);var d=Math.max(-l,0);c+=d,s=v[e]+v[t]}c>0&&i&&w(-c/o,0,o);var p=r[0],g=r[o-1],y,m;_(),y<0&&x(-y,.8),m<0&&x(m,.8),_(),b(y,m,1),b(m,y,-1),_(),y<0&&S(-y),m<0&&S(m);function _(){y=p.rect[e]-n,m=a-g.rect[e]-g.rect[t]}function b(T,D,M){if(T<0){var A=Math.min(D,-T);if(A>0){w(A*M,0,o);var I=A+T;I<0&&x(-I*M,1)}else x(-T*M,1)}}function w(T,D,M){T!==0&&(u=!0);for(var A=D;A<M;A++){var I=r[A],P=I.rect;P[e]+=T,I.label[e]+=T}}function x(T,D){for(var M=[],A=0,I=1;I<o;I++){var P=r[I-1].rect,E=Math.max(r[I].rect[e]-P[e]-P[t],0);M.push(E),A+=E}if(!!A){var O=Math.min(Math.abs(T)/A,D);if(T>0)for(var I=0;I<o-1;I++){var N=M[I]*O;w(N,0,I+1)}else for(var I=o-1;I>0;I--){var N=M[I-1]*O;w(-N,I,o)}}}function S(T){var D=T<0?-1:1;T=Math.abs(T);for(var M=Math.ceil(T/(o-1)),A=0;A<o-1;A++)if(D>0?w(M,0,A+1):w(-M,o-A-1,o),T-=M,T<=0)return}return u}function iY(r,e,t,n){return OP(r,"x","width",e,t,n)}function RP(r,e,t,n){return OP(r,"y","height",e,t,n)}function NP(r){var e=[];r.sort(function(p,g){return g.priority-p.priority});var t=new Re(0,0,0,0);function n(p){if(!p.ignore){var g=p.ensureState("emphasis");g.ignore==null&&(g.ignore=!1)}p.ignore=!0}for(var a=0;a<r.length;a++){var i=r[a],o=i.axisAligned,s=i.localRect,l=i.transform,u=i.label,c=i.labelLine;t.copy(i.rect),t.width-=.1,t.height-=.1,t.x+=.05,t.y+=.05;for(var f=i.obb,h=!1,v=0;v<e.length;v++){var d=e[v];if(!!t.intersect(d.rect)){if(o&&d.axisAligned){h=!0;break}if(d.obb||(d.obb=new Td(d.localRect,d.transform)),f||(f=new Td(s,l)),f.intersect(d.obb)){h=!0;break}}}h?(n(u),c&&n(c)):(u.attr("ignore",i.defaultAttr.ignore),c&&c.attr("ignore",i.defaultAttr.labelGuideIgnore),e.push(i))}}function oY(r){if(r){for(var e=[],t=0;t<r.length;t++)e.push(r[t].slice());return e}}function sY(r,e){var t=r.label,n=e&&e.getTextGuideLine();return{dataIndex:r.dataIndex,dataType:r.dataType,seriesIndex:r.seriesModel.seriesIndex,text:r.label.style.text,rect:r.hostRect,labelRect:r.rect,align:t.style.align,verticalAlign:t.style.verticalAlign,labelLinePoints:oY(n&&n.shape.points)}}var kP=["align","verticalAlign","width","height","fontSize"],wn=new li,J1=Ye(),lY=Ye();function Mp(r,e,t){for(var n=0;n<t.length;n++){var a=t[n];e[a]!=null&&(r[a]=e[a])}}var Ap=["x","y","rotation"],uY=function(){function r(){this._labelList=[],this._chartViewList=[]}return r.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},r.prototype._addLabel=function(e,t,n,a,i){var o=a.style,s=a.__hostTarget,l=s.textConfig||{},u=a.getComputedTransform(),c=a.getBoundingRect().plain();Re.applyTransform(c,c,u),u?wn.setLocalTransform(u):(wn.x=wn.y=wn.rotation=wn.originX=wn.originY=0,wn.scaleX=wn.scaleY=1);var f=a.__hostTarget,h;if(f){h=f.getBoundingRect().plain();var v=f.getComputedTransform();Re.applyTransform(h,h,v)}var d=h&&f.getTextGuideLine();this._labelList.push({label:a,labelLine:d,seriesModel:n,dataIndex:e,dataType:t,layoutOption:i,computedLayoutOption:null,rect:c,hostRect:h,priority:h?h.width*h.height:0,defaultAttr:{ignore:a.ignore,labelGuideIgnore:d&&d.ignore,x:wn.x,y:wn.y,scaleX:wn.scaleX,scaleY:wn.scaleY,rotation:wn.rotation,style:{x:o.x,y:o.y,align:o.align,verticalAlign:o.verticalAlign,width:o.width,height:o.height,fontSize:o.fontSize},cursor:a.cursor,attachedPos:l.position,attachedRot:l.rotation}})},r.prototype.addLabelsOfSeries=function(e){var t=this;this._chartViewList.push(e);var n=e.__model,a=n.get("labelLayout");!(ye(a)||Fe(a).length)||e.group.traverse(function(i){if(i.ignore)return!0;var o=i.getTextContent(),s=Me(i);o&&!o.disableLabelLayout&&t._addLabel(s.dataIndex,s.dataType,n,o,a)})},r.prototype.updateLayoutConfig=function(e){var t=e.getWidth(),n=e.getHeight();function a(_,b){return function(){LP(_,b)}}for(var i=0;i<this._labelList.length;i++){var o=this._labelList[i],s=o.label,l=s.__hostTarget,u=o.defaultAttr,c=void 0;ye(o.layoutOption)?c=o.layoutOption(sY(o,l)):c=o.layoutOption,c=c||{},o.computedLayoutOption=c;var f=Math.PI/180;l&&l.setTextConfig({local:!1,position:c.x!=null||c.y!=null?null:u.attachedPos,rotation:c.rotate!=null?c.rotate*f:u.attachedRot,offset:[c.dx||0,c.dy||0]});var h=!1;if(c.x!=null?(s.x=le(c.x,t),s.setStyle("x",0),h=!0):(s.x=u.x,s.setStyle("x",u.style.x)),c.y!=null?(s.y=le(c.y,n),s.setStyle("y",0),h=!0):(s.y=u.y,s.setStyle("y",u.style.y)),c.labelLinePoints){var v=l.getTextGuideLine();v&&(v.setShape({points:c.labelLinePoints}),h=!1)}var d=J1(s);d.needsUpdateLabelLine=h,s.rotation=c.rotate!=null?c.rotate*f:u.rotation,s.scaleX=u.scaleX,s.scaleY=u.scaleY;for(var p=0;p<kP.length;p++){var g=kP[p];s.setStyle(g,c[g]!=null?c[g]:u.style[g])}if(c.draggable){if(s.draggable=!0,s.cursor="move",l){var y=o.seriesModel;if(o.dataIndex!=null){var m=o.seriesModel.getData(o.dataType);y=m.getItemModel(o.dataIndex)}s.on("drag",a(l,y.getModel("labelLine")))}}else s.off("drag"),s.cursor=u.cursor}},r.prototype.layout=function(e){var t=e.getWidth(),n=e.getHeight(),a=EP(this._labelList),i=nt(a,function(l){return l.layoutOption.moveOverlap==="shiftX"}),o=nt(a,function(l){return l.layoutOption.moveOverlap==="shiftY"});iY(i,0,t),RP(o,0,n);var s=nt(a,function(l){return l.layoutOption.hideOverlap});NP(s)},r.prototype.processLabelsOverall=function(){var e=this;L(this._chartViewList,function(t){var n=t.__model,a=t.ignoreLabelLineUpdate,i=n.isAnimationEnabled();t.group.traverse(function(o){if(o.ignore&&!o.forceLabelAnimation)return!0;var s=!a,l=o.getTextContent();!s&&l&&(s=J1(l).needsUpdateLabelLine),s&&e._updateLabelLine(o,n),i&&e._animateLabels(o,n)})})},r.prototype._updateLabelLine=function(e,t){var n=e.getTextContent(),a=Me(e),i=a.dataIndex;if(n&&i!=null){var o=t.getData(a.dataType),s=o.getItemModel(i),l={},u=o.getItemVisual(i,"style"),c=o.getVisual("drawType");l.stroke=u[c];var f=s.getModel("labelLine");Q1(e,K1(s),l),LP(e,f)}},r.prototype._animateLabels=function(e,t){var n=e.getTextContent(),a=e.getTextGuideLine();if(n&&(e.forceLabelAnimation||!n.ignore&&!n.invisible&&!e.disableLabelAnimation&&!Wl(e))){var i=J1(n),o=i.oldLayout,s=Me(e),l=s.dataIndex,u={x:n.x,y:n.y,rotation:n.rotation},c=t.getData(s.dataType);if(o){n.attr(o);var h=e.prevStates;h&&(Ne(h,"select")>=0&&n.attr(i.oldLayoutSelect),Ne(h,"emphasis")>=0&&n.attr(i.oldLayoutEmphasis)),qe(n,u,t,l)}else if(n.attr(u),!ql(n).valueAnimation){var f=Ee(n.style.opacity,1);n.style.opacity=0,xt(n,{style:{opacity:f}},t,l)}if(i.oldLayout=u,n.states.select){var v=i.oldLayoutSelect={};Mp(v,u,Ap),Mp(v,n.states.select,Ap)}if(n.states.emphasis){var d=i.oldLayoutEmphasis={};Mp(d,u,Ap),Mp(d,n.states.emphasis,Ap)}eA(n,l,c,t,t)}if(a&&!a.ignore&&!a.invisible){var i=lY(a),o=i.oldLayout,p={points:a.shape.points};o?(a.attr({shape:o}),qe(a,{shape:p},t)):(a.setShape(p),a.style.strokePercent=0,xt(a,{style:{strokePercent:1}},t)),i.oldLayout=p}},r}(),cY=uY,eb=Ye();function fY(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,n){var a=eb(t).labelManager;a||(a=eb(t).labelManager=new cY),a.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(e,t,n){var a=eb(t).labelManager;n.updatedSeries.forEach(function(i){a.addLabelsOfSeries(t.getViewOfSeriesModel(i))}),a.updateLayoutConfig(t),a.layout(t),a.processLabelsOverall()})}var tb=Math.sin,rb=Math.cos,BP=Math.PI,ks=Math.PI*2,hY=180/BP,vY=function(){function r(){}return r.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},r.prototype.moveTo=function(e,t){this._add("M",e,t)},r.prototype.lineTo=function(e,t){this._add("L",e,t)},r.prototype.bezierCurveTo=function(e,t,n,a,i,o){this._add("C",e,t,n,a,i,o)},r.prototype.quadraticCurveTo=function(e,t,n,a){this._add("Q",e,t,n,a)},r.prototype.arc=function(e,t,n,a,i,o){this.ellipse(e,t,n,n,0,a,i,o)},r.prototype.ellipse=function(e,t,n,a,i,o,s,l){var u=s-o,c=!l,f=Math.abs(u),h=Qi(f-ks)||(c?u>=ks:-u>=ks),v=u>0?u%ks:u%ks+ks,d=!1;h?d=!0:Qi(f)?d=!1:d=v>=BP==!!c;var p=e+n*rb(o),g=t+a*tb(o);this._start&&this._add("M",p,g);var y=Math.round(i*hY);if(h){var m=1/this._p,_=(c?1:-1)*(ks-m);this._add("A",n,a,y,1,+c,e+n*rb(o+_),t+a*tb(o+_)),m>.01&&this._add("A",n,a,y,0,+c,p,g)}else{var b=e+n*rb(s),w=t+a*tb(s);this._add("A",n,a,y,+d,+c,b,w)}},r.prototype.rect=function(e,t,n,a){this._add("M",e,t),this._add("l",n,0),this._add("l",0,a),this._add("l",-n,0),this._add("Z")},r.prototype.closePath=function(){this._d.length>0&&this._add("Z")},r.prototype._add=function(e,t,n,a,i,o,s,l,u){for(var c=[],f=this._p,h=1;h<arguments.length;h++){var v=arguments[h];if(isNaN(v)){this._invalid=!0;return}c.push(Math.round(v*f)/f)}this._d.push(e+c.join(" ")),this._start=e==="Z"},r.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},r.prototype.getStr=function(){return this._str},r}(),zP=vY,kf="none",dY=Math.round;function pY(r){var e=r.fill;return e!=null&&e!==kf}function gY(r){var e=r.stroke;return e!=null&&e!==kf}var nb=["lineCap","miterLimit","lineJoin"],yY=J(nb,function(r){return"stroke-"+r.toLowerCase()});function mY(r,e,t,n){var a=e.opacity==null?1:e.opacity;if(t instanceof ur){r("opacity",a);return}if(pY(e)){var i=Ic(e.fill);r("fill",i.color);var o=e.fillOpacity!=null?e.fillOpacity*i.opacity*a:i.opacity*a;(n||o<1)&&r("fill-opacity",o)}else r("fill",kf);if(gY(e)){var s=Ic(e.stroke);r("stroke",s.color);var l=e.strokeNoScale?t.getLineScale():1,u=l?(e.lineWidth||0)/l:0,c=e.strokeOpacity!=null?e.strokeOpacity*s.opacity*a:s.opacity*a,f=e.strokeFirst;if((n||u!==1)&&r("stroke-width",u),(n||f)&&r("paint-order",f?"stroke":"fill"),(n||c<1)&&r("stroke-opacity",c),e.lineDash){var h=f1(t),v=h[0],d=h[1];v&&(d=dY(d||0),r("stroke-dasharray",v.join(",")),(d||n)&&r("stroke-dashoffset",d))}else n&&r("stroke-dasharray",kf);for(var p=0;p<nb.length;p++){var g=nb[p];if(n||e[g]!==fd[g]){var y=e[g]||fd[g];y&&r(yY[p],y)}}}else n&&r("stroke",kf)}var FP="http://www.w3.org/2000/svg",VP="http://www.w3.org/1999/xlink",_Y="http://www.w3.org/2000/xmlns/",bY="http://www.w3.org/XML/1998/namespace";function $P(r){return document.createElementNS(FP,r)}function ar(r,e,t,n,a){return{tag:r,attrs:t||{},children:n,text:a,key:e}}function xY(r,e){var t=[];if(e)for(var n in e){var a=e[n],i=n;a!==!1&&(a!==!0&&a!=null&&(i+='="'+a+'"'),t.push(i))}return"<"+r+" "+t.join(" ")+">"}function wY(r){return"</"+r+">"}function ab(r,e){e=e||{};var t=e.newline?`
219
219
  `:"";function n(a){var i=a.children,o=a.tag,s=a.attrs;return xY(o,s)+zr(a.text)+(i?""+t+J(i,function(l){return n(l)}).join(t)+t:"")+wY(o)}return n(r)}function SY(r,e,t){t=t||{};var n=t.newline?`
220
220
  `:"",a=" {"+n,i=n+"}",o=J(Fe(r),function(l){return l+a+J(Fe(r[l]),function(u){return u+":"+r[l][u]+";"}).join(n)+i}).join(n),s=J(Fe(e),function(l){return"@keyframes "+l+a+J(Fe(e[l]),function(u){return u+a+J(Fe(e[l][u]),function(c){var f=e[l][u][c];return c==="d"&&(f='path("'+f+'")'),c+":"+f+";"}).join(n)+i}).join(n)+i}).join(n);return!o&&!s?"":["<![CDATA[",o,s,"]]>"].join(n)}function ib(r){return{zrId:r,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssClassIdx:0,cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function HP(r,e,t,n){return ar("svg","root",{width:r,height:e,xmlns:FP,"xmlns:xlink":VP,version:"1.1",baseProfile:"full",viewBox:n?"0 0 "+r+" "+e:!1},t)}var GP={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},Bs="transform-origin";function CY(r,e,t){var n=Q({},r.shape);Q(n,e),r.buildPath(t,n);var a=new zP;return a.reset(O2(r)),t.rebuildPath(a,1),a.generateStr(),a.getStr()}function TY(r,e){var t=e.originX,n=e.originY;(t||n)&&(r[Bs]=t+"px "+n+"px")}var DY={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function WP(r,e){var t=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[t]=r,t}function MY(r,e,t){var n=r.shape.paths,a={},i,o;if(L(n,function(l){var u=ib(t.zrId);u.animation=!0,Lp(l,{},u,!0);var c=u.cssAnims,f=u.cssNodes,h=Fe(c),v=h.length;if(!!v){o=h[v-1];var d=c[o];for(var p in d){var g=d[p];a[p]=a[p]||{d:""},a[p].d+=g.d||""}for(var y in f){var m=f[y].animation;m.indexOf(o)>=0&&(i=m)}}}),!!i){e.d=!1;var s=WP(a,t);return i.replace(o,s)}}function UP(r){return ce(r)?GP[r]?"cubic-bezier("+GP[r]+")":Km(r)?r:"":""}function Lp(r,e,t,n){var a=r.animators,i=a.length,o=[];if(r instanceof wd){var s=MY(r,e,t);if(s)o.push(s);else if(!i)return}else if(!i)return;for(var l={},u=0;u<i;u++){var c=a[u],f=[c.getMaxTime()/1e3+"s"],h=UP(c.getClip().easing),v=c.getDelay();h?f.push(h):f.push("linear"),v&&f.push(v/1e3+"s"),c.getLoop()&&f.push("infinite");var d=f.join(" ");l[d]=l[d]||[d,[]],l[d][1].push(c)}function p(m){var _=m[1],b=_.length,w={},x={},S={},T="animation-timing-function";function D(te,ve,R){for(var F=te.getTracks(),G=te.getMaxTime(),re=0;re<F.length;re++){var ne=F[re];if(ne.needsAnimate()){var ee=ne.keyframes,ue=ne.propName;if(R&&(ue=R(ue)),ue)for(var De=0;De<ee.length;De++){var vt=ee[De],rt=Math.round(vt.time/G*100)+"%",Yt=UP(vt.easing),Ct=vt.rawValue;(ce(Ct)||je(Ct))&&(ve[rt]=ve[rt]||{},ve[rt][ue]=vt.rawValue,Yt&&(ve[rt][T]=Yt))}}}}for(var M=0;M<b;M++){var A=_[M],I=A.targetName;I?I==="shape"&&D(A,x):!n&&D(A,w)}for(var P in w){var E={};j2(E,r),Q(E,w[P]);var O=R2(E),N=w[P][T];S[P]=O?{transform:O}:{},TY(S[P],E),N&&(S[P][T]=N)}var V,$=!0;for(var P in x){S[P]=S[P]||{};var U=!V,N=x[P][T];U&&(V=new Va);var Y=V.len();V.reset(),S[P].d=CY(r,x[P],V);var ae=V.len();if(!U&&Y!==ae){$=!1;break}N&&(S[P][T]=N)}if(!$)for(var P in S)delete S[P].d;if(!n)for(var M=0;M<b;M++){var A=_[M],I=A.targetName;I==="style"&&D(A,S,function(F){return DY[F]})}for(var H=Fe(S),q=!0,X,M=1;M<H.length;M++){var Z=H[M-1],ie=H[M];if(S[Z][Bs]!==S[ie][Bs]){q=!1;break}X=S[Z][Bs]}if(q&&X){for(var P in S)S[P][Bs]&&delete S[P][Bs];e[Bs]=X}if(nt(H,function(te){return Fe(S[te]).length>0}).length){var se=WP(S,t);return se+" "+m[0]+" both"}}for(var g in l){var s=p(l[g]);s&&o.push(s)}if(o.length){var y=t.zrId+"-cls-"+t.cssClassIdx++;t.cssNodes["."+y]={animation:o.join(",")},e.class=y}}var Bf=Math.round;function jP(r){return r&&ce(r.src)}function YP(r){return r&&ye(r.toDataURL)}function ob(r,e,t,n){mY(function(a,i){var o=a==="fill"||a==="stroke";o&&E2(i)?JP(e,r,a,n):o&&i0(i)?eE(t,r,a,n):r[a]=i},e,t,!1),RY(t,r,n)}function qP(r){return Qi(r[0]-1)&&Qi(r[1])&&Qi(r[2])&&Qi(r[3]-1)}function AY(r){return Qi(r[4])&&Qi(r[5])}function sb(r,e,t){if(e&&!(AY(e)&&qP(e))){var n=t?10:1e4;r.transform=qP(e)?"translate("+Bf(e[4]*n)/n+" "+Bf(e[5]*n)/n+")":aG(e)}}function ZP(r,e,t){for(var n=r.points,a=[],i=0;i<n.length;i++)a.push(Bf(n[i][0]*t)/t),a.push(Bf(n[i][1]*t)/t);e.points=a.join(" ")}function XP(r){return!r.smooth}function LY(r){var e=J(r,function(t){return typeof t=="string"?[t,t]:t});return function(t,n,a){for(var i=0;i<e.length;i++){var o=e[i],s=t[o[0]];s!=null&&(n[o[1]]=Bf(s*a)/a)}}}var IY={circle:[LY(["cx","cy","r"])],polyline:[ZP,XP],polygon:[ZP,XP]};function PY(r){for(var e=r.animators,t=0;t<e.length;t++)if(e[t].targetName==="shape")return!0;return!1}function QP(r,e){var t=r.style,n=r.shape,a=IY[r.type],i={},o=e.animation,s="path",l=r.style.strokePercent,u=e.compress&&O2(r)||4;if(a&&!e.willUpdate&&!(a[1]&&!a[1](n))&&!(o&&PY(r))&&!(l<1)){s=r.type;var c=Math.pow(10,u);a[0](n,i,c)}else{var f=!r.path||r.shapeChanged();r.path||r.createPathProxy();var h=r.path;f&&(h.beginPath(),r.buildPath(h,r.shape),r.pathUpdated());var v=h.getVersion(),d=r,p=d.__svgPathBuilder;(d.__svgPathVersion!==v||!p||l!==d.__svgPathStrokePercent)&&(p||(p=d.__svgPathBuilder=new zP),p.reset(u),h.rebuildPath(p,l),p.generateStr(),d.__svgPathVersion=v,d.__svgPathStrokePercent=l),i.d=p.getStr()}return sb(i,r.transform),ob(i,t,r,e),e.animation&&Lp(r,i,e),ar(s,r.id+"",i)}function EY(r,e){var t=r.style,n=t.image;if(n&&!ce(n)&&(jP(n)?n=n.src:YP(n)&&(n=n.toDataURL())),!!n){var a=t.x||0,i=t.y||0,o=t.width,s=t.height,l={href:n,width:o,height:s};return a&&(l.x=a),i&&(l.y=i),sb(l,r.transform),ob(l,t,r,e),e.animation&&Lp(r,l,e),ar("image",r.id+"",l)}}function OY(r,e){var t=r.style,n=t.text;if(n!=null&&(n+=""),!(!n||isNaN(t.x)||isNaN(t.y))){var a=t.font||Hi,i=t.x||0,o=oG(t.y||0,Jv(a),t.textBaseline),s=iG[t.textAlign]||t.textAlign,l={"dominant-baseline":"central","text-anchor":s};if(GD(t)){var u="",c=t.fontStyle,f=$D(t.fontSize);if(!parseFloat(f))return;var h=t.fontFamily||VT,v=t.fontWeight;u+="font-size:"+f+";font-family:"+h+";",c&&c!=="normal"&&(u+="font-style:"+c+";"),v&&v!=="normal"&&(u+="font-weight:"+v+";"),l.style=u}else l.style="font: "+a;return n.match(/\s/)&&(l["xml:space"]="preserve"),i&&(l.x=i),o&&(l.y=o),sb(l,r.transform),ob(l,t,r,e),e.animation&&Lp(r,l,e),ar("text",r.id+"",l,void 0,n)}}function KP(r,e){if(r instanceof Be)return QP(r,e);if(r instanceof ur)return EY(r,e);if(r instanceof Gc)return OY(r,e)}function RY(r,e,t){var n=r.style;if(sG(n)){var a=lG(r),i=t.shadowCache,o=i[a];if(!o){var s=r.getGlobalScale(),l=s[0],u=s[1];if(!l||!u)return;var c=n.shadowOffsetX||0,f=n.shadowOffsetY||0,h=n.shadowBlur,v=Ic(n.shadowColor),d=v.opacity,p=v.color,g=h/2/l,y=h/2/u,m=g+" "+y;o=t.zrId+"-s"+t.shadowIdx++,t.defs[o]=ar("filter",o,{id:o,x:"-100%",y:"-100%",width:"300%",height:"300%"},[ar("feDropShadow","",{dx:c/l,dy:f/u,stdDeviation:m,"flood-color":p,"flood-opacity":d})]),i[a]=o}e.filter=Uv(o)}}function JP(r,e,t,n){var a=r[t],i,o={gradientUnits:a.global?"userSpaceOnUse":"objectBoundingBox"};if(I2(a))i="linearGradient",o.x1=a.x,o.y1=a.y,o.x2=a.x2,o.y2=a.y2;else if(P2(a))i="radialGradient",o.cx=Ee(a.x,.5),o.cy=Ee(a.y,.5),o.r=Ee(a.r,.5);else return;for(var s=a.colorStops,l=[],u=0,c=s.length;u<c;++u){var f=a0(s[u].offset)*100+"%",h=s[u].color,v=Ic(h),d=v.color,p=v.opacity,g={offset:f};g["stop-color"]=d,p<1&&(g["stop-opacity"]=p),l.push(ar("stop",u+"",g))}var y=ar(i,"",o,l),m=ab(y),_=n.gradientCache,b=_[m];b||(b=n.zrId+"-g"+n.gradientIdx++,_[m]=b,o.id=b,n.defs[b]=ar(i,b,o,l)),e[t]=Uv(b)}function eE(r,e,t,n){var a=r.style[t],i=r.getBoundingRect(),o={},s=a.repeat,l=s==="no-repeat",u=s==="repeat-x",c=s==="repeat-y",f;if(L2(a)){var h=a.imageWidth,v=a.imageHeight,d=void 0,p=a.image;if(ce(p)?d=p:jP(p)?d=p.src:YP(p)&&(d=p.toDataURL()),typeof Image=="undefined"){var g="Image width/height must been given explictly in svg-ssr renderer.";Dr(h,g),Dr(v,g)}else if(h==null||v==null){var y=function(M,A){if(M){var I=M.elm,P=h||A.width,E=v||A.height;M.tag==="pattern"&&(u?(E=1,P/=i.width):c&&(P=1,E/=i.height)),M.attrs.width=P,M.attrs.height=E,I&&(I.setAttribute("width",P),I.setAttribute("height",E))}},m=F0(d,null,r,function(M){l||y(x,M),y(f,M)});m&&m.width&&m.height&&(h=h||m.width,v=v||m.height)}f=ar("image","img",{href:d,width:h,height:v}),o.width=h,o.height=v}else a.svgElement&&(f=we(a.svgElement),o.width=a.svgWidth,o.height=a.svgHeight);if(!!f){var _,b;l?_=b=1:u?(b=1,_=o.width/i.width):c?(_=1,b=o.height/i.height):o.patternUnits="userSpaceOnUse",_!=null&&!isNaN(_)&&(o.width=_),b!=null&&!isNaN(b)&&(o.height=b);var w=R2(a);w&&(o.patternTransform=w);var x=ar("pattern","",o,[f]),S=ab(x),T=n.patternCache,D=T[S];D||(D=n.zrId+"-p"+n.patternIdx++,T[S]=D,o.id=D,x=n.defs[D]=ar("pattern",D,o,[f])),e[t]=Uv(D)}}function NY(r,e,t){var n=t.clipPathCache,a=t.defs,i=n[r.id];if(!i){i=t.zrId+"-c"+t.clipPathIdx++;var o={id:i};n[r.id]=i,a[i]=ar("clipPath",i,o,[QP(r,t)])}e["clip-path"]=Uv(i)}function tE(r){return document.createTextNode(r)}function zs(r,e,t){r.insertBefore(e,t)}function rE(r,e){r.removeChild(e)}function nE(r,e){r.appendChild(e)}function aE(r){return r.parentNode}function iE(r){return r.nextSibling}function lb(r,e){r.textContent=e}var oE=58,kY=120,BY=ar("","");function ub(r){return r===void 0}function qa(r){return r!==void 0}function zY(r,e,t){for(var n={},a=e;a<=t;++a){var i=r[a].key;i!==void 0&&(n[i]=a)}return n}function zf(r,e){var t=r.key===e.key,n=r.tag===e.tag;return n&&t}function Ff(r){var e,t=r.children,n=r.tag;if(qa(n)){var a=r.elm=$P(n);if(cb(BY,r),K(t))for(e=0;e<t.length;++e){var i=t[e];i!=null&&nE(a,Ff(i))}else qa(r.text)&&!_e(r.text)&&nE(a,tE(r.text))}else r.elm=tE(r.text);return r.elm}function sE(r,e,t,n,a){for(;n<=a;++n){var i=t[n];i!=null&&zs(r,Ff(i),e)}}function Ip(r,e,t,n){for(;t<=n;++t){var a=e[t];if(a!=null)if(qa(a.tag)){var i=aE(a.elm);rE(i,a.elm)}else rE(r,a.elm)}}function cb(r,e){var t,n=e.elm,a=r&&r.attrs||{},i=e.attrs||{};if(a!==i){for(t in i){var o=i[t],s=a[t];s!==o&&(o===!0?n.setAttribute(t,""):o===!1?n.removeAttribute(t):t.charCodeAt(0)!==kY?n.setAttribute(t,o):t==="xmlns:xlink"||t==="xmlns"?n.setAttributeNS(_Y,t,o):t.charCodeAt(3)===oE?n.setAttributeNS(bY,t,o):t.charCodeAt(5)===oE?n.setAttributeNS(VP,t,o):n.setAttribute(t,o))}for(t in a)t in i||n.removeAttribute(t)}}function FY(r,e,t){for(var n=0,a=0,i=e.length-1,o=e[0],s=e[i],l=t.length-1,u=t[0],c=t[l],f,h,v,d;n<=i&&a<=l;)o==null?o=e[++n]:s==null?s=e[--i]:u==null?u=t[++a]:c==null?c=t[--l]:zf(o,u)?(pu(o,u),o=e[++n],u=t[++a]):zf(s,c)?(pu(s,c),s=e[--i],c=t[--l]):zf(o,c)?(pu(o,c),zs(r,o.elm,iE(s.elm)),o=e[++n],c=t[--l]):zf(s,u)?(pu(s,u),zs(r,s.elm,o.elm),s=e[--i],u=t[++a]):(ub(f)&&(f=zY(e,n,i)),h=f[u.key],ub(h)?zs(r,Ff(u),o.elm):(v=e[h],v.tag!==u.tag?zs(r,Ff(u),o.elm):(pu(v,u),e[h]=void 0,zs(r,v.elm,o.elm))),u=t[++a]);(n<=i||a<=l)&&(n>i?(d=t[l+1]==null?null:t[l+1].elm,sE(r,d,t,a,l)):Ip(r,e,n,i))}function pu(r,e){var t=e.elm=r.elm,n=r.children,a=e.children;r!==e&&(cb(r,e),ub(e.text)?qa(n)&&qa(a)?n!==a&&FY(t,n,a):qa(a)?(qa(r.text)&&lb(t,""),sE(t,null,a,0,a.length-1)):qa(n)?Ip(t,n,0,n.length-1):qa(r.text)&&lb(t,""):r.text!==e.text&&(qa(n)&&Ip(t,n,0,n.length-1),lb(t,e.text)))}function VY(r,e){if(zf(r,e))pu(r,e);else{var t=r.elm,n=aE(t);Ff(e),n!==null&&(zs(n,e.elm,iE(t)),Ip(n,[r],0,0))}return e}var $Y=0,HY=function(){function r(e,t,n){if(this.type="svg",this.refreshHover=lE(),this.configLayer=lE(),this.storage=t,this._opts=n=Q({},n),this.root=e,this._id="zr"+$Y++,this._oldVNode=HP(n.width,n.height),e&&!n.ssr){var a=this._viewport=document.createElement("div");a.style.cssText="position:relative;overflow:hidden";var i=this._svgDom=this._oldVNode.elm=$P("svg");cb(null,this._oldVNode),a.appendChild(i),e.appendChild(a)}this.resize(n.width,n.height)}return r.prototype.getType=function(){return this.type},r.prototype.getViewportRoot=function(){return this._viewport},r.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},r.prototype.getSvgDom=function(){return this._svgDom},r.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",VY(this._oldVNode,e),this._oldVNode=e}},r.prototype.renderOneToVNode=function(e){return KP(e,ib(this._id))},r.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),n=this._width,a=this._height,i=ib(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress;var o=[],s=this._bgVNode=GY(n,a,this._backgroundColor,i);s&&o.push(s);var l=e.compress?null:this._mainVNode=ar("g","main",{},[]);this._paintList(t,i,l?l.children:o),l&&o.push(l);var u=J(Fe(i.defs),function(h){return i.defs[h]});if(u.length&&o.push(ar("defs","defs",{},u)),e.animation){var c=SY(i.cssNodes,i.cssAnims,{newline:!0});if(c){var f=ar("style","stl",{},[],c);o.push(f)}}return HP(n,a,o,e.useViewBox)},r.prototype.renderToString=function(e){return e=e||{},ab(this.renderToVNode({animation:Ee(e.cssAnimation,!0),willUpdate:!1,compress:!0,useViewBox:Ee(e.useViewBox,!0)}),{newline:!0})},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e},r.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},r.prototype._paintList=function(e,t,n){for(var a=e.length,i=[],o=0,s,l,u=0,c=0;c<a;c++){var f=e[c];if(!f.invisible){var h=f.__clipPaths,v=h&&h.length||0,d=l&&l.length||0,p=void 0;for(p=Math.max(v-1,d-1);p>=0&&!(h&&l&&h[p]===l[p]);p--);for(var g=d-1;g>p;g--)o--,s=i[o-1];for(var y=p+1;y<v;y++){var m={};NY(h[y],m,t);var _=ar("g","clip-g-"+u++,m,[]);(s?s.children:n).push(_),i[o++]=_,s=_}l=h;var b=KP(f,t);b&&(s?s.children:n).push(b)}}},r.prototype.resize=function(e,t){var n=this._opts,a=this.root,i=this._viewport;if(e!=null&&(n.width=e),t!=null&&(n.height=t),a&&i&&(i.style.display="none",e=uu(a,0,n),t=uu(a,1,n),i.style.display=""),this._width!==e||this._height!==t){if(this._width=e,this._height=t,i){var o=i.style;o.width=e+"px",o.height=t+"px"}if(i0(this._backgroundColor))this.refresh();else{var s=this._svgDom;s&&(s.setAttribute("width",e),s.setAttribute("height",t));var l=this._bgVNode&&this._bgVNode.elm;l&&(l.setAttribute("width",e),l.setAttribute("height",t))}}},r.prototype.getWidth=function(){return this._width},r.prototype.getHeight=function(){return this._height},r.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},r.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},r.prototype.toDataURL=function(e){var t=this.renderToString(),n="data:image/svg+xml;";return e?(t=cG(t),t&&n+"base64,"+t):n+"charset=UTF-8,"+encodeURIComponent(t)},r}();function lE(r){return function(){}}function GY(r,e,t,n){var a;if(t&&t!=="none")if(a=ar("rect","bg",{width:r,height:e,x:"0",y:"0",id:"0"}),E2(t))JP({fill:t},a.attrs,"fill",n);else if(i0(t))eE({style:{fill:t},dirty:Ot,getBoundingRect:function(){return{width:r,height:e}}},a.attrs,"fill",n);else{var i=Ic(t),o=i.color,s=i.opacity;a.attrs.fill=o,s<1&&(a.attrs["fill-opacity"]=s)}return a}var WY=HY;function UY(r){r.registerPainter("svg",WY)}function uE(r,e,t){var n=ia.createCanvas(),a=e.getWidth(),i=e.getHeight(),o=n.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=a+"px",o.height=i+"px",n.setAttribute("data-zr-dom-id",r)),n.width=a*t,n.height=i*t,n}var jY=function(r){_t(e,r);function e(t,n,a){var i=r.call(this)||this;i.motionBlur=!1,i.lastFrameAlpha=.7,i.dpr=1,i.virtual=!1,i.config={},i.incremental=!1,i.zlevel=0,i.maxRepaintRectCount=5,i.__dirty=!0,i.__firstTimePaint=!0,i.__used=!1,i.__drawIndex=0,i.__startIndex=0,i.__endIndex=0,i.__prevStartIndex=null,i.__prevEndIndex=null;var o;a=a||Kv,typeof t=="string"?o=uE(t,n,a):_e(t)&&(o=t,t=o.id),i.id=t,i.dom=o;var s=o.style;return s&&(Rm(o),o.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),i.painter=n,i.dpr=a,i}return e.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},e.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},e.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},e.prototype.setUnpainted=function(){this.__firstTimePaint=!0},e.prototype.createBackBuffer=function(){var t=this.dpr;this.domBack=uE("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),t!==1&&this.ctxBack.scale(t,t)},e.prototype.createRepaintRects=function(t,n,a,i){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o=[],s=this.maxRepaintRectCount,l=!1,u=new Re(0,0,0,0);function c(m){if(!(!m.isFinite()||m.isZero()))if(o.length===0){var _=new Re(0,0,0,0);_.copy(m),o.push(_)}else{for(var b=!1,w=1/0,x=0,S=0;S<o.length;++S){var T=o[S];if(T.intersect(m)){var D=new Re(0,0,0,0);D.copy(T),D.union(m),o[S]=D,b=!0;break}else if(l){u.copy(m),u.union(T);var M=m.width*m.height,A=T.width*T.height,I=u.width*u.height,P=I-M-A;P<w&&(w=P,x=S)}}if(l&&(o[x].union(m),b=!0),!b){var _=new Re(0,0,0,0);_.copy(m),o.push(_)}l||(l=o.length>=s)}}for(var f=this.__startIndex;f<this.__endIndex;++f){var h=t[f];if(h){var v=h.shouldBePainted(a,i,!0,!0),d=h.__isRendered&&(h.__dirty&yn||!v)?h.getPrevPaintRect():null;d&&c(d);var p=v&&(h.__dirty&yn||!h.__isRendered)?h.getPaintRect():null;p&&c(p)}}for(var f=this.__prevStartIndex;f<this.__prevEndIndex;++f){var h=n[f],v=h.shouldBePainted(a,i,!0,!0);if(h&&(!v||!h.__zr)&&h.__isRendered){var d=h.getPrevPaintRect();d&&c(d)}}var g;do{g=!1;for(var f=0;f<o.length;){if(o[f].isZero()){o.splice(f,1);continue}for(var y=f+1;y<o.length;)o[f].intersect(o[y])?(g=!0,o[f].union(o[y]),o.splice(y,1)):y++;f++}}while(g);return this._paintRects=o,o},e.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},e.prototype.resize=function(t,n){var a=this.dpr,i=this.dom,o=i.style,s=this.domBack;o&&(o.width=t+"px",o.height=n+"px"),i.width=t*a,i.height=n*a,s&&(s.width=t*a,s.height=n*a,a!==1&&this.ctxBack.scale(a,a))},e.prototype.clear=function(t,n,a){var i=this.dom,o=this.ctx,s=i.width,l=i.height;n=n||this.clearColor;var u=this.motionBlur&&!t,c=this.lastFrameAlpha,f=this.dpr,h=this;u&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(i,0,0,s/f,l/f));var v=this.domBack;function d(p,g,y,m){if(o.clearRect(p,g,y,m),n&&n!=="transparent"){var _=void 0;if(cc(n)){var b=n.global||n.__width===y&&n.__height===m;_=b&&n.__canvasGradient||c1(o,n,{x:0,y:0,width:y,height:m}),n.__canvasGradient=_,n.__width=y,n.__height=m}else jT(n)&&(n.scaleX=n.scaleX||f,n.scaleY=n.scaleY||f,_=h1(o,n,{dirty:function(){h.setUnpainted(),h.__painter.refresh()}}));o.save(),o.fillStyle=_||n,o.fillRect(p,g,y,m),o.restore()}u&&(o.save(),o.globalAlpha=c,o.drawImage(v,p,g,y,m),o.restore())}!a||u?d(0,0,s,l):a.length&&L(a,function(p){d(p.x*f,p.y*f,p.width*f,p.height*f)})},e}(On),fb=jY,cE=1e5,Fs=314159,Pp=.01,YY=.001;function qY(r){return r?r.__builtin__?!0:!(typeof r.resize!="function"||typeof r.refresh!="function"):!1}function ZY(r,e){var t=document.createElement("div");return t.style.cssText=["position:relative","width:"+r+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",t}var XY=function(){function r(e,t,n,a){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var i=!e.nodeName||e.nodeName.toUpperCase()==="CANVAS";this._opts=n=Q({},n||{}),this.dpr=n.devicePixelRatio||Kv,this._singleCanvas=i,this.root=e;var o=e.style;o&&(Rm(e),e.innerHTML=""),this.storage=t;var s=this._zlevelList;this._prevDisplayList=[];var l=this._layers;if(i){var c=e,f=c.width,h=c.height;n.width!=null&&(f=n.width),n.height!=null&&(h=n.height),this.dpr=n.devicePixelRatio||1,c.width=f*this.dpr,c.height=h*this.dpr,this._width=f,this._height=h;var v=new fb(c,this,this.dpr);v.__builtin__=!0,v.initContext(),l[Fs]=v,v.zlevel=Fs,s.push(Fs),this._domRoot=e}else{this._width=uu(e,0,n),this._height=uu(e,1,n);var u=this._domRoot=ZY(this._width,this._height);e.appendChild(u)}}return r.prototype.getType=function(){return"canvas"},r.prototype.isSingleCanvas=function(){return this._singleCanvas},r.prototype.getViewportRoot=function(){return this._domRoot},r.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},r.prototype.refresh=function(e){var t=this.storage.getDisplayList(!0),n=this._prevDisplayList,a=this._zlevelList;this._redrawId=Math.random(),this._paintList(t,n,e,this._redrawId);for(var i=0;i<a.length;i++){var o=a[i],s=this._layers[o];if(!s.__builtin__&&s.refresh){var l=i===0?this._backgroundColor:null;s.refresh(l)}}return this._opts.useDirtyRect&&(this._prevDisplayList=t.slice()),this},r.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},r.prototype._paintHoverList=function(e){var t=e.length,n=this._hoverlayer;if(n&&n.clear(),!!t){for(var a={inHover:!0,viewWidth:this._width,viewHeight:this._height},i,o=0;o<t;o++){var s=e[o];s.__inHover&&(n||(n=this._hoverlayer=this.getLayer(cE)),i||(i=n.ctx,i.save()),Is(i,s,a,o===t-1))}i&&i.restore()}},r.prototype.getHoverLayer=function(){return this.getLayer(cE)},r.prototype.paintOne=function(e,t){v1(e,t)},r.prototype._paintList=function(e,t,n,a){if(this._redrawId===a){n=n||!1,this._updateLayerStatus(e);var i=this._doPaintList(e,t,n),o=i.finished,s=i.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),s&&this._paintHoverList(e),o)this.eachLayer(function(u){u.afterBrush&&u.afterBrush()});else{var l=this;Xm(function(){l._paintList(e,t,n,a)})}}},r.prototype._compositeManually=function(){var e=this.getLayer(Fs).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),this.eachBuiltinLayer(function(a){a.virtual&&e.drawImage(a.dom,0,0,t,n)})},r.prototype._doPaintList=function(e,t,n){for(var a=this,i=[],o=this._opts.useDirtyRect,s=0;s<this._zlevelList.length;s++){var l=this._zlevelList[s],u=this._layers[l];u.__builtin__&&u!==this._hoverlayer&&(u.__dirty||n)&&i.push(u)}for(var c=!0,f=!1,h=function(p){var g=i[p],y=g.ctx,m=o&&g.createRepaintRects(e,t,v._width,v._height),_=n?g.__startIndex:g.__drawIndex,b=!n&&g.incremental&&Date.now,w=b&&Date.now(),x=g.zlevel===v._zlevelList[0]?v._backgroundColor:null;if(g.__startIndex===g.__endIndex)g.clear(!1,x,m);else if(_===g.__startIndex){var S=e[_];(!S.incremental||!S.notClear||n)&&g.clear(!1,x,m)}_===-1&&(console.error("For some unknown reason. drawIndex is -1"),_=g.__startIndex);var T,D=function(P){var E={inHover:!1,allClipped:!1,prevEl:null,viewWidth:a._width,viewHeight:a._height};for(T=_;T<g.__endIndex;T++){var O=e[T];if(O.__inHover&&(f=!0),a._doPaintEl(O,g,o,P,E,T===g.__endIndex-1),b){var N=Date.now()-w;if(N>15)break}}E.prevElClipPaths&&y.restore()};if(m)if(m.length===0)T=g.__endIndex;else for(var M=v.dpr,A=0;A<m.length;++A){var I=m[A];y.save(),y.beginPath(),y.rect(I.x*M,I.y*M,I.width*M,I.height*M),y.clip(),D(I),y.restore()}else y.save(),D(),y.restore();g.__drawIndex=T,g.__drawIndex<g.__endIndex&&(c=!1)},v=this,d=0;d<i.length;d++)h(d);return Ue.wxa&&L(this._layers,function(p){p&&p.ctx&&p.ctx.draw&&p.ctx.draw()}),{finished:c,needsRefreshHover:f}},r.prototype._doPaintEl=function(e,t,n,a,i,o){var s=t.ctx;if(n){var l=e.getPaintRect();(!a||l&&l.intersect(a))&&(Is(s,e,i,o),e.setPrevPaintRect(l))}else Is(s,e,i,o)},r.prototype.getLayer=function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=Fs);var n=this._layers[e];return n||(n=new fb("zr_"+e,this,this.dpr),n.zlevel=e,n.__builtin__=!0,this._layerConfig[e]?Pe(n,this._layerConfig[e],!0):this._layerConfig[e-Pp]&&Pe(n,this._layerConfig[e-Pp],!0),t&&(n.virtual=t),this.insertLayer(e,n),n.initContext()),n},r.prototype.insertLayer=function(e,t){var n=this._layers,a=this._zlevelList,i=a.length,o=this._domRoot,s=null,l=-1;if(!n[e]&&!!qY(t)){if(i>0&&e>a[0]){for(l=0;l<i-1&&!(a[l]<e&&a[l+1]>e);l++);s=n[a[l]]}if(a.splice(l+1,0,e),n[e]=t,!t.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(t.dom,u.nextSibling):o.appendChild(t.dom)}else o.firstChild?o.insertBefore(t.dom,o.firstChild):o.appendChild(t.dom);t.__painter=this}},r.prototype.eachLayer=function(e,t){for(var n=this._zlevelList,a=0;a<n.length;a++){var i=n[a];e.call(t,this._layers[i],i)}},r.prototype.eachBuiltinLayer=function(e,t){for(var n=this._zlevelList,a=0;a<n.length;a++){var i=n[a],o=this._layers[i];o.__builtin__&&e.call(t,o,i)}},r.prototype.eachOtherLayer=function(e,t){for(var n=this._zlevelList,a=0;a<n.length;a++){var i=n[a],o=this._layers[i];o.__builtin__||e.call(t,o,i)}},r.prototype.getLayers=function(){return this._layers},r.prototype._updateLayerStatus=function(e){this.eachBuiltinLayer(function(f,h){f.__dirty=f.__used=!1});function t(f){i&&(i.__endIndex!==f&&(i.__dirty=!0),i.__endIndex=f)}if(this._singleCanvas)for(var n=1;n<e.length;n++){var a=e[n];if(a.zlevel!==e[n-1].zlevel||a.incremental){this._needsManuallyCompositing=!0;break}}var i=null,o=0,s,l;for(l=0;l<e.length;l++){var a=e[l],u=a.zlevel,c=void 0;s!==u&&(s=u,o=0),a.incremental?(c=this.getLayer(u+YY,this._needsManuallyCompositing),c.incremental=!0,o=1):c=this.getLayer(u+(o>0?Pp:0),this._needsManuallyCompositing),c.__builtin__||Cv("ZLevel "+u+" has been used by unkown layer "+c.id),c!==i&&(c.__used=!0,c.__startIndex!==l&&(c.__dirty=!0),c.__startIndex=l,c.incremental?c.__drawIndex=-1:c.__drawIndex=l,t(l),i=c),a.__dirty&yn&&!a.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=l))}t(l),this.eachBuiltinLayer(function(f,h){!f.__used&&f.getElementCount()>0&&(f.__dirty=!0,f.__startIndex=f.__endIndex=f.__drawIndex=0),f.__dirty&&f.__drawIndex<0&&(f.__drawIndex=f.__startIndex)})},r.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},r.prototype._clearLayer=function(e){e.clear()},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e,L(this._layers,function(t){t.setUnpainted()})},r.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?Pe(n[e],t,!0):n[e]=t;for(var a=0;a<this._zlevelList.length;a++){var i=this._zlevelList[a];if(i===e||i===e+Pp){var o=this._layers[i];Pe(o,n[e],!0)}}}},r.prototype.delLayer=function(e){var t=this._layers,n=this._zlevelList,a=t[e];!a||(a.dom.parentNode.removeChild(a.dom),delete t[e],n.splice(Ne(n,e),1))},r.prototype.resize=function(e,t){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var a=this._opts,i=this.root;if(e!=null&&(a.width=e),t!=null&&(a.height=t),e=uu(i,0,a),t=uu(i,1,a),n.style.display="",this._width!==e||t!==this._height){n.style.width=e+"px",n.style.height=t+"px";for(var o in this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(e,t);this.refresh(!0)}this._width=e,this._height=t}else{if(e==null||t==null)return;this._width=e,this._height=t,this.getLayer(Fs).resize(e,t)}return this},r.prototype.clearLayer=function(e){var t=this._layers[e];t&&t.clear()},r.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},r.prototype.getRenderedCanvas=function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._layers[Fs].dom;var t=new fb("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 a=t.dom.width,i=t.dom.height;this.eachLayer(function(f){f.__builtin__?n.drawImage(f.dom,0,0,a,i):f.renderToCanvas&&(n.save(),f.renderToCanvas(n),n.restore())})}else for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height},s=this.storage.getDisplayList(!0),l=0,u=s.length;l<u;l++){var c=s[l];Is(n,c,o,l===u-1)}return t.dom},r.prototype.getWidth=function(){return this._width},r.prototype.getHeight=function(){return this._height},r}(),QY=XY;function KY(r){r.registerPainter("canvas",QY)}var JY=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t){return Wa(null,this,{useEncodeDefaulter:!0})},e.prototype.getLegendIcon=function(t){var n=new Te,a=kt("line",0,t.itemHeight/2,t.itemWidth,0,t.lineStyle.stroke,!1);n.add(a),a.setStyle(t.lineStyle);var i=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=i==="none"?"circle":i,l=t.itemHeight*.8,u=kt(s,(t.itemWidth-l)/2,(t.itemHeight-l)/2,l,l,t.itemStyle.fill);n.add(u),u.setStyle(t.itemStyle);var c=t.iconRotate==="inherit"?o:t.iconRotate||0;return u.rotation=c*Math.PI/180,u.setOrigin([t.itemWidth/2,t.itemHeight/2]),s.indexOf("empty")>-1&&(u.style.stroke=u.style.fill,u.style.fill="#fff",u.style.lineWidth=2),n},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(yt),eq=JY;function gu(r,e){var t=r.mapDimensionsAll("defaultedLabel"),n=t.length;if(n===1){var a=nu(r,e,t[0]);return a!=null?a+"":null}else if(n){for(var i=[],o=0;o<t.length;o++)i.push(nu(r,e,t[o]));return i.join(" ")}}function fE(r,e){var t=r.mapDimensionsAll("defaultedLabel");if(!K(e))return e+"";for(var n=[],a=0;a<t.length;a++){var i=r.getDimensionIndex(t[a]);i>=0&&n.push(e[i])}return n.join(" ")}var tq=function(r){j(e,r);function e(t,n,a,i){var o=r.call(this)||this;return o.updateData(t,n,a,i),o}return e.prototype._createSymbol=function(t,n,a,i,o){this.removeAll();var s=kt(t,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),s.drift=rq,this._symbolType=t,this.add(s)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){hi(this.childAt(0))},e.prototype.downplay=function(){vi(this.childAt(0))},e.prototype.setZ=function(t,n){var a=this.childAt(0);a.zlevel=t,a.z=n},e.prototype.setDraggable=function(t,n){var a=this.childAt(0);a.draggable=t,a.cursor=!n&&t?"move":a.cursor},e.prototype.updateData=function(t,n,a,i){this.silent=!1;var o=t.getItemVisual(n,"symbol")||"circle",s=t.hostModel,l=e.getSymbolSize(t,n),u=o!==this._symbolType,c=i&&i.disableAnimation;if(u){var f=t.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,t,n,l,f)}else{var h=this.childAt(0);h.silent=!1;var v={scaleX:l[0]/2,scaleY:l[1]/2};c?h.attr(v):qe(h,v,s,n),da(h)}if(this._updateCommon(t,n,l,a,i),u){var h=this.childAt(0);if(!c){var v={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,xt(h,v,s,n)}}c&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,n,a,i,o){var s=this.childAt(0),l=t.hostModel,u,c,f,h,v,d,p,g,y;if(i&&(u=i.emphasisItemStyle,c=i.blurItemStyle,f=i.selectItemStyle,h=i.focus,v=i.blurScope,p=i.labelStatesModels,g=i.hoverScale,y=i.cursorStyle,d=i.emphasisDisabled),!i||t.hasItemOption){var m=i&&i.itemModel?i.itemModel:t.getItemModel(n),_=m.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),f=m.getModel(["select","itemStyle"]).getItemStyle(),c=m.getModel(["blur","itemStyle"]).getItemStyle(),h=_.get("focus"),v=_.get("blurScope"),d=_.get("disabled"),p=rr(m),g=_.getShallow("scale"),y=m.getShallow("cursor")}var b=t.getItemVisual(n,"symbolRotate");s.attr("rotation",(b||0)*Math.PI/180||0);var w=lu(t.getItemVisual(n,"symbolOffset"),a);w&&(s.x=w[0],s.y=w[1]),y&&s.attr("cursor",y);var x=t.getItemVisual(n,"style"),S=x.fill;if(s instanceof ur){var T=s.style;s.useStyle(Q({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},x))}else s.__isEmptyBrush?s.useStyle(Q({},x)):s.useStyle(x),s.style.decal=null,s.setColor(S,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var D=t.getItemVisual(n,"liftZ"),M=this._z2;D!=null?M==null&&(this._z2=s.z2,s.z2+=D):M!=null&&(s.z2=M,this._z2=null);var A=o&&o.useNameLabel;yr(s,p,{labelFetcher:l,labelDataIndex:n,defaultText:I,inheritColor:S,defaultOpacity:x.opacity});function I(O){return A?t.getName(O):gu(t,O)}this._sizeX=a[0]/2,this._sizeY=a[1]/2;var P=s.ensureState("emphasis");P.style=u,s.ensureState("select").style=f,s.ensureState("blur").style=c;var E=g==null||g===!0?Math.max(1.1,3/this._sizeY):isFinite(g)&&g>0?+g:1;P.scaleX=this._sizeX*E,P.scaleY=this._sizeY*E,this.setSymbolScale(1),Lt(this,h,v,d)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,n,a){var i=this.childAt(0),o=Me(this).dataIndex,s=a&&a.animation;if(this.silent=i.silent=!0,a&&a.fadeLabel){var l=i.getTextContent();l&&ao(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){i.removeTextContent()}})}else i.removeTextContent();ao(i,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:t,removeOpt:s})},e.getSymbolSize=function(t,n){return wf(t.getItemVisual(n,"symbolSize"))},e}(Te);function rq(r,e){this.parent.drift(r,e)}var Vf=tq;function hb(r,e,t,n){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(n.isIgnore&&n.isIgnore(t))&&!(n.clipShape&&!n.clipShape.contain(e[0],e[1]))&&r.getItemVisual(t,"symbol")!=="none"}function hE(r){return r!=null&&!_e(r)&&(r={isIgnore:r}),r||{}}function vE(r){var e=r.hostModel,t=e.getModel("emphasis");return{emphasisItemStyle:t.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:t.get("focus"),blurScope:t.get("blurScope"),emphasisDisabled:t.get("disabled"),hoverScale:t.get("scale"),labelStatesModels:rr(e),cursorStyle:e.get("cursor")}}var nq=function(){function r(e){this.group=new Te,this._SymbolCtor=e||Vf}return r.prototype.updateData=function(e,t){this._progressiveEls=null,t=hE(t);var n=this.group,a=e.hostModel,i=this._data,o=this._SymbolCtor,s=t.disableAnimation,l=vE(e),u={disableAnimation:s},c=t.getSymbolPoint||function(f){return e.getItemLayout(f)};i||n.removeAll(),e.diff(i).add(function(f){var h=c(f);if(hb(e,h,f,t)){var v=new o(e,f,l,u);v.setPosition(h),e.setItemGraphicEl(f,v),n.add(v)}}).update(function(f,h){var v=i.getItemGraphicEl(h),d=c(f);if(!hb(e,d,f,t)){n.remove(v);return}var p=e.getItemVisual(f,"symbol")||"circle",g=v&&v.getSymbolType&&v.getSymbolType();if(!v||g&&g!==p)n.remove(v),v=new o(e,f,l,u),v.setPosition(d);else{v.updateData(e,f,l,u);var y={x:d[0],y:d[1]};s?v.attr(y):qe(v,y,a)}n.add(v),e.setItemGraphicEl(f,v)}).remove(function(f){var h=i.getItemGraphicEl(f);h&&h.fadeOut(function(){n.remove(h)},a)}).execute(),this._getSymbolPoint=c,this._data=e},r.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl(function(n,a){var i=e._getSymbolPoint(a);n.setPosition(i),n.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=vE(e),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t,n){this._progressiveEls=[],n=hE(n);function a(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var i=e.start;i<e.end;i++){var o=t.getItemLayout(i);if(hb(t,o,i,n)){var s=new this._SymbolCtor(t,i,this._seriesScope);s.traverse(a),s.setPosition(o),this.group.add(s),t.setItemGraphicEl(i,s),this._progressiveEls.push(s)}}},r.prototype.eachRendered=function(e){oo(this._progressiveEls||this.group,e)},r.prototype.remove=function(e){var t=this.group,n=this._data;n&&e?n.eachItemGraphicEl(function(a){a.fadeOut(function(){t.remove(a)},n.hostModel)}):t.removeAll()},r}(),$f=nq;function dE(r,e,t){var n=r.getBaseAxis(),a=r.getOtherAxis(n),i=aq(a,t),o=n.dim,s=a.dim,l=e.mapDimension(s),u=e.mapDimension(o),c=s==="x"||s==="radius"?1:0,f=J(r.dimensions,function(d){return e.mapDimension(d)}),h=!1,v=e.getCalculationInfo("stackResultDimension");return gi(e,f[0])&&(h=!0,f[0]=v),gi(e,f[1])&&(h=!0,f[1]=v),{dataDimsForPoint:f,valueStart:i,valueAxisDim:s,baseAxisDim:o,stacked:!!h,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function aq(r,e){var t=0,n=r.scale.getExtent();return e==="start"?t=n[0]:e==="end"?t=n[1]:je(e)&&!isNaN(e)?t=e:n[0]>0?t=n[0]:n[1]<0&&(t=n[1]),t}function pE(r,e,t,n){var a=NaN;r.stacked&&(a=t.get(t.getCalculationInfo("stackedOverDimension"),n)),isNaN(a)&&(a=r.valueStart);var i=r.baseDataOffset,o=[];return o[i]=t.get(r.baseDim,n),o[1-i]=a,e.dataToPoint(o)}function iq(r,e){var t=[];return e.diff(r).add(function(n){t.push({cmd:"+",idx:n})}).update(function(n,a){t.push({cmd:"=",idx:a,idx1:n})}).remove(function(n){t.push({cmd:"-",idx:n})}).execute(),t}function oq(r,e,t,n,a,i,o,s){for(var l=iq(r,e),u=[],c=[],f=[],h=[],v=[],d=[],p=[],g=dE(a,e,o),y=r.getLayout("points")||[],m=e.getLayout("points")||[],_=0;_<l.length;_++){var b=l[_],w=!0,x=void 0,S=void 0;switch(b.cmd){case"=":x=b.idx*2,S=b.idx1*2;var T=y[x],D=y[x+1],M=m[S],A=m[S+1];(isNaN(T)||isNaN(D))&&(T=M,D=A),u.push(T,D),c.push(M,A),f.push(t[x],t[x+1]),h.push(n[S],n[S+1]),p.push(e.getRawIndex(b.idx1));break;case"+":var I=b.idx,P=g.dataDimsForPoint,E=a.dataToPoint([e.get(P[0],I),e.get(P[1],I)]);S=I*2,u.push(E[0],E[1]),c.push(m[S],m[S+1]);var O=pE(g,a,e,I);f.push(O[0],O[1]),h.push(n[S],n[S+1]),p.push(e.getRawIndex(I));break;case"-":w=!1}w&&(v.push(b),d.push(d.length))}d.sort(function(Z,ie){return p[Z]-p[ie]});for(var N=u.length,V=Ua(N),$=Ua(N),U=Ua(N),Y=Ua(N),ae=[],_=0;_<d.length;_++){var H=d[_],q=_*2,X=H*2;V[q]=u[X],V[q+1]=u[X+1],$[q]=c[X],$[q+1]=c[X+1],U[q]=f[X],U[q+1]=f[X+1],Y[q]=h[X],Y[q+1]=h[X+1],ae[_]=v[H]}return{current:V,next:$,stackedOnCurrent:U,stackedOnNext:Y,status:ae}}var yo=Math.min,mo=Math.max;function Vs(r,e){return isNaN(r)||isNaN(e)}function vb(r,e,t,n,a,i,o,s,l){for(var u,c,f,h,v,d,p=t,g=0;g<n;g++){var y=e[p*2],m=e[p*2+1];if(p>=a||p<0)break;if(Vs(y,m)){if(l){p+=i;continue}break}if(p===t)r[i>0?"moveTo":"lineTo"](y,m),f=y,h=m;else{var _=y-u,b=m-c;if(_*_+b*b<.5){p+=i;continue}if(o>0){for(var w=p+i,x=e[w*2],S=e[w*2+1];x===y&&S===m&&g<n;)g++,w+=i,p+=i,x=e[w*2],S=e[w*2+1],y=e[p*2],m=e[p*2+1],_=y-u,b=m-c;var T=g+1;if(l)for(;Vs(x,S)&&T<n;)T++,w+=i,x=e[w*2],S=e[w*2+1];var D=.5,M=0,A=0,I=void 0,P=void 0;if(T>=n||Vs(x,S))v=y,d=m;else{M=x-u,A=S-c;var E=y-u,O=x-y,N=m-c,V=S-m,$=void 0,U=void 0;if(s==="x"){$=Math.abs(E),U=Math.abs(O);var Y=M>0?1:-1;v=y-Y*$*o,d=m,I=y+Y*U*o,P=m}else if(s==="y"){$=Math.abs(N),U=Math.abs(V);var ae=A>0?1:-1;v=y,d=m-ae*$*o,I=y,P=m+ae*U*o}else $=Math.sqrt(E*E+N*N),U=Math.sqrt(O*O+V*V),D=U/(U+$),v=y-M*o*(1-D),d=m-A*o*(1-D),I=y+M*o*D,P=m+A*o*D,I=yo(I,mo(x,y)),P=yo(P,mo(S,m)),I=mo(I,yo(x,y)),P=mo(P,yo(S,m)),M=I-y,A=P-m,v=y-M*$/U,d=m-A*$/U,v=yo(v,mo(u,y)),d=yo(d,mo(c,m)),v=mo(v,yo(u,y)),d=mo(d,yo(c,m)),M=y-v,A=m-d,I=y+M*U/$,P=m+A*U/$}r.bezierCurveTo(f,h,v,d,y,m),f=I,h=P}else r.lineTo(y,m)}u=y,c=m,p+=i}return g}var gE=function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r}(),sq=function(r){j(e,r);function e(t){var n=r.call(this,t)||this;return n.type="ec-polyline",n}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new gE},e.prototype.buildPath=function(t,n){var a=n.points,i=0,o=a.length/2;if(n.connectNulls){for(;o>0&&Vs(a[o*2-2],a[o*2-1]);o--);for(;i<o&&Vs(a[i*2],a[i*2+1]);i++);}for(;i<o;)i+=vb(t,a,i,o,o,1,n.smooth,n.smoothMonotone,n.connectNulls)+1},e.prototype.getPointOn=function(t,n){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var a=this.path,i=a.data,o=Va.CMD,s,l,u=n==="x",c=[],f=0;f<i.length;){var h=i[f++],v=void 0,d=void 0,p=void 0,g=void 0,y=void 0,m=void 0,_=void 0;switch(h){case o.M:s=i[f++],l=i[f++];break;case o.L:if(v=i[f++],d=i[f++],_=u?(t-s)/(v-s):(t-l)/(d-l),_<=1&&_>=0){var b=u?(d-l)*_+l:(v-s)*_+s;return u?[t,b]:[b,t]}s=v,l=d;break;case o.C:v=i[f++],d=i[f++],p=i[f++],g=i[f++],y=i[f++],m=i[f++];var w=u?Vv(s,v,p,y,t,c):Vv(l,d,g,m,t,c);if(w>0)for(var x=0;x<w;x++){var S=c[x];if(S<=1&&S>=0){var b=u?er(l,d,g,m,S):er(s,v,p,y,S);return u?[t,b]:[b,t]}}s=y,l=m;break}}},e}(Be),lq=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(gE),yE=function(r){j(e,r);function e(t){var n=r.call(this,t)||this;return n.type="ec-polygon",n}return e.prototype.getDefaultShape=function(){return new lq},e.prototype.buildPath=function(t,n){var a=n.points,i=n.stackedOnPoints,o=0,s=a.length/2,l=n.smoothMonotone;if(n.connectNulls){for(;s>0&&Vs(a[s*2-2],a[s*2-1]);s--);for(;o<s&&Vs(a[o*2],a[o*2+1]);o++);}for(;o<s;){var u=vb(t,a,o,s,s,1,n.smooth,l,n.connectNulls);vb(t,i,o+u-1,u,s,-1,n.stackedOnSmooth,l,n.connectNulls),o+=u+1,t.closePath()}},e}(Be);function mE(r,e,t,n,a){var i=r.getArea(),o=i.x,s=i.y,l=i.width,u=i.height,c=t.get(["lineStyle","width"])||2;o-=c/2,s-=c/2,l+=c,u+=c,o=Math.floor(o),l=Math.round(l);var f=new Ge({shape:{x:o,y:s,width:l,height:u}});if(e){var h=r.getBaseAxis(),v=h.isHorizontal(),d=h.inverse;v?(d&&(f.shape.x+=l),f.shape.width=0):(d||(f.shape.y+=u),f.shape.height=0);var p=ye(a)?function(g){a(g,f)}:null;xt(f,{shape:{width:l,height:u,x:o,y:s}},t,null,n,p)}return f}function _E(r,e,t){var n=r.getArea(),a=At(n.r0,1),i=At(n.r,1),o=new Hr({shape:{cx:At(r.cx,1),cy:At(r.cy,1),r0:a,r:i,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}});if(e){var s=r.getBaseAxis().dim==="angle";s?o.shape.endAngle=n.startAngle:o.shape.r=a,xt(o,{shape:{endAngle:n.endAngle,r:i}},t)}return o}function Ep(r,e,t,n,a){if(r){if(r.type==="polar")return _E(r,e,t);if(r.type==="cartesian2d")return mE(r,e,t,n,a)}else return null;return null}function $s(r,e){return r.type===e}function bE(r,e){if(r.length===e.length){for(var t=0;t<r.length;t++)if(r[t]!==e[t])return;return!0}}function xE(r){for(var e=1/0,t=1/0,n=-1/0,a=-1/0,i=0;i<r.length;){var o=r[i++],s=r[i++];isNaN(o)||(e=Math.min(o,e),n=Math.max(o,n)),isNaN(s)||(t=Math.min(s,t),a=Math.max(s,a))}return[[e,t],[n,a]]}function wE(r,e){var t=xE(r),n=t[0],a=t[1],i=xE(e),o=i[0],s=i[1];return Math.max(Math.abs(n[0]-o[0]),Math.abs(n[1]-o[1]),Math.abs(a[0]-s[0]),Math.abs(a[1]-s[1]))}function SE(r){return je(r)?r:r?.5:0}function uq(r,e,t){if(!t.valueDim)return[];for(var n=e.count(),a=Ua(n*2),i=0;i<n;i++){var o=pE(t,r,e,i);a[i*2]=o[0],a[i*2+1]=o[1]}return a}function _o(r,e,t,n){var a=e.getBaseAxis(),i=a.dim==="x"||a.dim==="radius"?0:1,o=[],s=0,l=[],u=[],c=[],f=[];if(n){for(s=0;s<r.length;s+=2)!isNaN(r[s])&&!isNaN(r[s+1])&&f.push(r[s],r[s+1]);r=f}for(s=0;s<r.length-2;s+=2)switch(c[0]=r[s+2],c[1]=r[s+3],u[0]=r[s],u[1]=r[s+1],o.push(u[0],u[1]),t){case"end":l[i]=c[i],l[1-i]=u[1-i],o.push(l[0],l[1]);break;case"middle":var h=(u[i]+c[i])/2,v=[];l[i]=v[i]=h,l[1-i]=u[1-i],v[1-i]=c[1-i],o.push(l[0],l[1]),o.push(v[0],v[1]);break;default:l[i]=u[i],l[1-i]=c[1-i],o.push(l[0],l[1])}return o.push(r[s++],r[s++]),o}function cq(r,e){var t=[],n=r.length,a,i;function o(c,f,h){var v=c.coord,d=(h-v)/(f.coord-v),p=n0(d,[c.color,f.color]);return{coord:h,color:p}}for(var s=0;s<n;s++){var l=r[s],u=l.coord;if(u<0)a=l;else if(u>e){i?t.push(o(i,l,e)):a&&t.push(o(a,l,0),o(a,l,e));break}else a&&(t.push(o(a,l,0)),a=null),t.push(l),i=l}return t}function fq(r,e,t){var n=r.getVisual("visualMeta");if(!(!n||!n.length||!r.count())&&e.type==="cartesian2d"){for(var a,i,o=n.length-1;o>=0;o--){var s=r.getDimensionInfo(n[o].dimension);if(a=s&&s.coordDim,a==="x"||a==="y"){i=n[o];break}}if(!!i){var l=e.getAxis(a),u=J(i.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),c=u.length,f=i.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),f.reverse());var h=cq(u,a==="x"?t.getWidth():t.getHeight()),v=h.length;if(!v&&c)return u[0].coord<0?f[1]?f[1]:u[c-1].color:f[0]?f[0]:u[0].color;var d=10,p=h[0].coord-d,g=h[v-1].coord+d,y=g-p;if(y<.001)return"transparent";L(h,function(_){_.offset=(_.coord-p)/y}),h.push({offset:v?h[v-1].offset:.5,color:f[1]||"transparent"}),h.unshift({offset:v?h[0].offset:.5,color:f[0]||"transparent"});var m=new Hl(0,0,0,0,h,!0);return m[a]=p,m[a+"2"]=g,m}}}function hq(r,e,t){var n=r.get("showAllSymbol"),a=n==="auto";if(!(n&&!a)){var i=t.getAxesByScale("ordinal")[0];if(!!i&&!(a&&vq(i,e))){var o=e.mapDimension(i.dim),s={};return L(i.getViewLabels(),function(l){var u=i.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function vq(r,e){var t=r.getExtent(),n=Math.abs(t[1]-t[0])/r.scale.count();isNaN(n)&&(n=0);for(var a=e.count(),i=Math.max(1,Math.round(a/5)),o=0;o<a;o+=i)if(Vf.getSymbolSize(e,o)[r.isHorizontal()?1:0]*1.5>n)return!1;return!0}function dq(r,e){return isNaN(r)||isNaN(e)}function pq(r){for(var e=r.length/2;e>0&&dq(r[e*2-2],r[e*2-1]);e--);return e-1}function CE(r,e){return[r[e*2],r[e*2+1]]}function gq(r,e,t){for(var n=r.length/2,a=t==="x"?0:1,i,o,s=0,l=-1,u=0;u<n;u++)if(o=r[u*2+a],!(isNaN(o)||isNaN(r[u*2+1-a]))){if(u===0){i=o;continue}if(i<=e&&o>=e||i>=e&&o<=e){l=u;break}s=u,i=o}return{range:[s,l],t:(e-i)/(o-i)}}function TE(r){if(r.get(["endLabel","show"]))return!0;for(var e=0;e<$r.length;e++)if(r.get([$r[e],"endLabel","show"]))return!0;return!1}function db(r,e,t,n){if($s(e,"cartesian2d")){var a=n.getModel("endLabel"),i=a.get("valueAnimation"),o=n.getData(),s={lastFrameIndex:0},l=TE(n)?function(v,d){r._endLabelOnDuring(v,d,o,s,i,a,e)}:null,u=e.getBaseAxis().isHorizontal(),c=mE(e,t,n,function(){var v=r._endLabel;v&&t&&s.originalX!=null&&v.attr({x:s.originalX,y:s.originalY})},l);if(!n.get("clip",!0)){var f=c.shape,h=Math.max(f.width,f.height);u?(f.y-=h,f.height+=h*2):(f.x-=h,f.width+=h*2)}return l&&l(1,c),c}else return _E(e,t,n)}function yq(r,e){var t=e.getBaseAxis(),n=t.isHorizontal(),a=t.inverse,i=n?a?"right":"left":"center",o=n?"middle":a?"top":"bottom";return{normal:{align:r.get("align")||i,verticalAlign:r.get("verticalAlign")||o}}}var mq=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(){var t=new Te,n=new $f;this.group.add(n.group),this._symbolDraw=n,this._lineGroup=t},e.prototype.render=function(t,n,a){var i=this,o=t.coordinateSystem,s=this.group,l=t.getData(),u=t.getModel("lineStyle"),c=t.getModel("areaStyle"),f=l.getLayout("points")||[],h=o.type==="polar",v=this._coordSys,d=this._symbolDraw,p=this._polyline,g=this._polygon,y=this._lineGroup,m=t.get("animation"),_=!c.isEmpty(),b=c.get("origin"),w=dE(o,l,b),x=_&&uq(o,l,w),S=t.get("showSymbol"),T=t.get("connectNulls"),D=S&&!h&&hq(t,l,o),M=this._data;M&&M.eachItemGraphicEl(function(ie,se){ie.__temp&&(s.remove(ie),M.setItemGraphicEl(se,null))}),S||d.remove(),s.add(y);var A=h?!1:t.get("step"),I;o&&o.getArea&&t.get("clip",!0)&&(I=o.getArea(),I.width!=null?(I.x-=.1,I.y-=.1,I.width+=.2,I.height+=.2):I.r0&&(I.r0-=.5,I.r+=.5)),this._clipShapeForSymbol=I;var P=fq(l,o,a)||l.getVisual("style")[l.getVisual("drawType")];if(!(p&&v.type===o.type&&A===this._step))S&&d.updateData(l,{isIgnore:D,clipShape:I,disableAnimation:!0,getSymbolPoint:function(ie){return[f[ie*2],f[ie*2+1]]}}),m&&this._initSymbolLabelAnimation(l,o,I),A&&(f=_o(f,o,A,T),x&&(x=_o(x,o,A,T))),p=this._newPolyline(f),_?g=this._newPolygon(f,x):g&&(y.remove(g),g=this._polygon=null),h||this._initOrUpdateEndLabel(t,o,ws(P)),y.setClipPath(db(this,o,!0,t));else{_&&!g?g=this._newPolygon(f,x):g&&!_&&(y.remove(g),g=this._polygon=null),h||this._initOrUpdateEndLabel(t,o,ws(P));var E=y.getClipPath();if(E){var O=db(this,o,!1,t);xt(E,{shape:O.shape},t)}else y.setClipPath(db(this,o,!0,t));S&&d.updateData(l,{isIgnore:D,clipShape:I,disableAnimation:!0,getSymbolPoint:function(ie){return[f[ie*2],f[ie*2+1]]}}),(!bE(this._stackedOnPoints,x)||!bE(this._points,f))&&(m?this._doUpdateAnimation(l,x,o,a,A,b,T):(A&&(f=_o(f,o,A,T),x&&(x=_o(x,o,A,T))),p.setShape({points:f}),g&&g.setShape({points:f,stackedOnPoints:x})))}var N=t.getModel("emphasis"),V=N.get("focus"),$=N.get("blurScope"),U=N.get("disabled");if(p.useStyle(me(u.getLineStyle(),{fill:"none",stroke:P,lineJoin:"bevel"})),gr(p,t,"lineStyle"),p.style.lineWidth>0&&t.get(["emphasis","lineStyle","width"])==="bolder"){var Y=p.getState("emphasis").style;Y.lineWidth=+p.style.lineWidth+1}Me(p).seriesIndex=t.seriesIndex,Lt(p,V,$,U);var ae=SE(t.get("smooth")),H=t.get("smoothMonotone");if(p.setShape({smooth:ae,smoothMonotone:H,connectNulls:T}),g){var q=l.getCalculationInfo("stackedOnSeries"),X=0;g.useStyle(me(c.getAreaStyle(),{fill:P,opacity:.7,lineJoin:"bevel",decal:l.getVisual("style").decal})),q&&(X=SE(q.get("smooth"))),g.setShape({smooth:ae,stackedOnSmooth:X,smoothMonotone:H,connectNulls:T}),gr(g,t,"areaStyle"),Me(g).seriesIndex=t.seriesIndex,Lt(g,V,$,U)}var Z=function(ie){i._changePolyState(ie)};l.eachItemGraphicEl(function(ie){ie&&(ie.onHoverStateChange=Z)}),this._polyline.onHoverStateChange=Z,this._data=l,this._coordSys=o,this._stackedOnPoints=x,this._points=f,this._step=A,this._valueOrigin=b,t.get("triggerLineEvent")&&(this.packEventData(t,p),g&&this.packEventData(t,g))},e.prototype.packEventData=function(t,n){Me(n).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,n,a,i){var o=t.getData(),s=ns(o,i);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var c=l[s*2],f=l[s*2+1];if(isNaN(c)||isNaN(f)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,f))return;var h=t.get("zlevel")||0,v=t.get("z")||0;u=new Vf(o,s),u.x=c,u.y=f,u.setZ(h,v);var d=u.getSymbolPath().getTextContent();d&&(d.zlevel=h,d.z=v,d.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else ut.prototype.highlight.call(this,t,n,a,i)},e.prototype.downplay=function(t,n,a,i){var o=t.getData(),s=ns(o,i);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else ut.prototype.downplay.call(this,t,n,a,i)},e.prototype._changePolyState=function(t){var n=this._polygon;gd(this._polyline,t),n&&gd(n,t)},e.prototype._newPolyline=function(t){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new sq({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},e.prototype._newPolygon=function(t,n){var a=this._polygon;return a&&this._lineGroup.remove(a),a=new yE({shape:{points:t,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(a),this._polygon=a,a},e.prototype._initSymbolLabelAnimation=function(t,n,a){var i,o,s=n.getBaseAxis(),l=s.inverse;n.type==="cartesian2d"?(i=s.isHorizontal(),o=!1):n.type==="polar"&&(i=s.dim==="angle",o=!0);var u=t.hostModel,c=u.get("animationDuration");ye(c)&&(c=c(null));var f=u.get("animationDelay")||0,h=ye(f)?f(null):f;t.eachItemGraphicEl(function(v,d){var p=v;if(p){var g=[v.x,v.y],y=void 0,m=void 0,_=void 0;if(a)if(o){var b=a,w=n.pointToCoord(g);i?(y=b.startAngle,m=b.endAngle,_=-w[1]/180*Math.PI):(y=b.r0,m=b.r,_=w[0])}else{var x=a;i?(y=x.x,m=x.x+x.width,_=v.x):(y=x.y+x.height,m=x.y,_=v.y)}var S=m===y?0:(_-y)/(m-y);l&&(S=1-S);var T=ye(f)?f(d):c*S+h,D=p.getSymbolPath(),M=D.getTextContent();p.attr({scaleX:0,scaleY:0}),p.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:T}),M&&M.animateFrom({style:{opacity:0}},{duration:300,delay:T}),D.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(t,n,a){var i=t.getModel("endLabel");if(TE(t)){var o=t.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new We({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var c=pq(l);c>=0&&(yr(s,rr(t,"endLabel"),{inheritColor:a,labelFetcher:t,labelDataIndex:c,defaultText:function(f,h,v){return v!=null?fE(o,v):gu(o,f)},enableTextSetter:!0},yq(i,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,n,a,i,o,s,l){var u=this._endLabel,c=this._polyline;if(u){t<1&&i.originalX==null&&(i.originalX=u.x,i.originalY=u.y);var f=a.getLayout("points"),h=a.hostModel,v=h.get("connectNulls"),d=s.get("precision"),p=s.get("distance")||0,g=l.getBaseAxis(),y=g.isHorizontal(),m=g.inverse,_=n.shape,b=m?y?_.x:_.y+_.height:y?_.x+_.width:_.y,w=(y?p:0)*(m?-1:1),x=(y?0:-p)*(m?-1:1),S=y?"x":"y",T=gq(f,b,S),D=T.range,M=D[1]-D[0],A=void 0;if(M>=1){if(M>1&&!v){var I=CE(f,D[0]);u.attr({x:I[0]+w,y:I[1]+x}),o&&(A=h.getRawValue(D[0]))}else{var I=c.getPointOn(b,S);I&&u.attr({x:I[0]+w,y:I[1]+x});var P=h.getRawValue(D[0]),E=h.getRawValue(D[1]);o&&(A=pD(a,d,P,E,T.t))}i.lastFrameIndex=D[0]}else{var O=t===1||i.lastFrameIndex>0?D[0]:0,I=CE(f,O);o&&(A=h.getRawValue(O)),u.attr({x:I[0]+w,y:I[1]+x})}o&&ql(u).setLabelText(A)}},e.prototype._doUpdateAnimation=function(t,n,a,i,o,s,l){var u=this._polyline,c=this._polygon,f=t.hostModel,h=oq(this._data,t,this._stackedOnPoints,n,this._coordSys,a,this._valueOrigin),v=h.current,d=h.stackedOnCurrent,p=h.next,g=h.stackedOnNext;if(o&&(v=_o(h.current,a,o,l),d=_o(h.stackedOnCurrent,a,o,l),p=_o(h.next,a,o,l),g=_o(h.stackedOnNext,a,o,l)),wE(v,p)>3e3||c&&wE(d,g)>3e3){u.stopAnimation(),u.setShape({points:p}),c&&(c.stopAnimation(),c.setShape({points:p,stackedOnPoints:g}));return}u.shape.__points=h.current,u.shape.points=v;var y={shape:{points:p}};h.current!==v&&(y.shape.__points=h.next),u.stopAnimation(),qe(u,y,f),c&&(c.setShape({points:v,stackedOnPoints:d}),c.stopAnimation(),qe(c,{shape:{stackedOnPoints:g}},f),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var m=[],_=h.status,b=0;b<_.length;b++){var w=_[b].cmd;if(w==="="){var x=t.getItemGraphicEl(_[b].idx1);x&&m.push({el:x,ptIdx:b})}}u.animators&&u.animators.length&&u.animators[0].during(function(){c&&c.dirtyShape();for(var S=u.shape.__points,T=0;T<m.length;T++){var D=m[T].el,M=m[T].ptIdx*2;D.x=S[M],D.y=S[M+1],D.markRedraw()}})},e.prototype.remove=function(t){var n=this.group,a=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),a&&a.eachItemGraphicEl(function(i,o){i.__temp&&(n.remove(i),a.setItemGraphicEl(o,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},e.type="line",e}(ut),_q=mq;function Hf(r,e){return{seriesType:r,plan:iu(),reset:function(t){var n=t.getData(),a=t.coordinateSystem,i=t.pipelineContext,o=e||i.large;if(!!a){var s=J(a.dimensions,function(v){return n.mapDimension(v)}).slice(0,2),l=s.length,u=n.getCalculationInfo("stackResultDimension");gi(n,s[0])&&(s[0]=u),gi(n,s[1])&&(s[1]=u);var c=n.getStore(),f=n.getDimensionIndex(s[0]),h=n.getDimensionIndex(s[1]);return l&&{progress:function(v,d){for(var p=v.end-v.start,g=o&&Ua(p*l),y=[],m=[],_=v.start,b=0;_<v.end;_++){var w=void 0;if(l===1){var x=c.get(f,_);w=a.dataToPoint(x,null,m)}else y[0]=c.get(f,_),y[1]=c.get(h,_),w=a.dataToPoint(y,null,m);o?(g[b++]=w[0],g[b++]=w[1]):d.setItemLayout(_,w.slice())}o&&d.setLayout("points",g)}}}}}}var bq={average:function(r){for(var e=0,t=0,n=0;n<r.length;n++)isNaN(r[n])||(e+=r[n],t++);return t===0?NaN:e/t},sum:function(r){for(var e=0,t=0;t<r.length;t++)e+=r[t]||0;return e},max:function(r){for(var e=-1/0,t=0;t<r.length;t++)r[t]>e&&(e=r[t]);return isFinite(e)?e:NaN},min:function(r){for(var e=1/0,t=0;t<r.length;t++)r[t]<e&&(e=r[t]);return isFinite(e)?e:NaN},nearest:function(r){return r[0]}},xq=function(r){return Math.round(r.length/2)};function DE(r){return{seriesType:r,reset:function(e,t,n){var a=e.getData(),i=e.get("sampling"),o=e.coordinateSystem,s=a.count();if(s>10&&o.type==="cartesian2d"&&i){var l=o.getBaseAxis(),u=o.getOtherAxis(l),c=l.getExtent(),f=n.getDevicePixelRatio(),h=Math.abs(c[1]-c[0])*(f||1),v=Math.round(s/h);if(isFinite(v)&&v>1){i==="lttb"&&e.setData(a.lttbDownSample(a.mapDimension(u.dim),1/v));var d=void 0;ce(i)?d=bq[i]:ye(i)&&(d=i),d&&e.setData(a.downSample(a.mapDimension(u.dim),1/v,d,xq))}}}}}function wq(r){r.registerChartView(_q),r.registerSeriesModel(eq),r.registerLayout(Hf("line",!0)),r.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)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,DE("line"))}var ME=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,n){return Wa(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t,n,a){var i=this.coordinateSystem;if(i&&i.clampData){var o=i.dataToPoint(i.clampData(t));if(a)L(i.getAxes(),function(f,h){if(f.type==="category"){var v=f.getTicksCoords(),d=i.clampData(t)[h];n&&(n[h]==="x1"||n[h]==="y1")&&(d+=1),d>v.length-1&&(d=v.length-1),d<0&&(d=0),v[d]&&(o[h]=f.toGlobalCoord(v[d].coord))}});else{var s=this.getData(),l=s.getLayout("offset"),u=s.getLayout("size"),c=i.getBaseAxis().isHorizontal()?0:1;o[c]+=l+u/2}return o}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(yt);yt.registerClass(ME);var Op=ME,Sq=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(){return Wa(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>t&&(t=n),t},e.prototype.brushSelector=function(t,n,a){return a.rect(n.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=so(Op.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(Op),Cq=Sq,Tq=function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r}(),Dq=function(r){j(e,r);function e(t){var n=r.call(this,t)||this;return n.type="sausage",n}return e.prototype.getDefaultShape=function(){return new Tq},e.prototype.buildPath=function(t,n){var a=n.cx,i=n.cy,o=Math.max(n.r0||0,0),s=Math.max(n.r,0),l=(s-o)*.5,u=o+l,c=n.startAngle,f=n.endAngle,h=n.clockwise,v=Math.PI*2,d=h?f-c<v:c-f<v;d||(c=f-(h?v:-v));var p=Math.cos(c),g=Math.sin(c),y=Math.cos(f),m=Math.sin(f);d?(t.moveTo(p*o+a,g*o+i),t.arc(p*u+a,g*u+i,l,-Math.PI+c,c,!h)):t.moveTo(p*s+a,g*s+i),t.arc(a,i,s,c,f,!h),t.arc(y*u+a,m*u+i,l,f-Math.PI*2,f-Math.PI,!h),o!==0&&t.arc(a,i,o,f,c,h)},e}(Be),Rp=Dq;function Mq(r,e){e=e||{};var t=e.isRoundCap;return function(n,a,i){var o=a.position;if(!o||o instanceof Array)return ed(n,a,i);var s=r(o),l=a.distance!=null?a.distance:5,u=this.shape,c=u.cx,f=u.cy,h=u.r,v=u.r0,d=(h+v)/2,p=u.startAngle,g=u.endAngle,y=(p+g)/2,m=t?Math.abs(h-v)/2:0,_=Math.cos,b=Math.sin,w=c+h*_(p),x=f+h*b(p),S="left",T="top";switch(s){case"startArc":w=c+(v-l)*_(y),x=f+(v-l)*b(y),S="center",T="top";break;case"insideStartArc":w=c+(v+l)*_(y),x=f+(v+l)*b(y),S="center",T="bottom";break;case"startAngle":w=c+d*_(p)+Np(p,l+m,!1),x=f+d*b(p)+kp(p,l+m,!1),S="right",T="middle";break;case"insideStartAngle":w=c+d*_(p)+Np(p,-l+m,!1),x=f+d*b(p)+kp(p,-l+m,!1),S="left",T="middle";break;case"middle":w=c+d*_(y),x=f+d*b(y),S="center",T="middle";break;case"endArc":w=c+(h+l)*_(y),x=f+(h+l)*b(y),S="center",T="bottom";break;case"insideEndArc":w=c+(h-l)*_(y),x=f+(h-l)*b(y),S="center",T="top";break;case"endAngle":w=c+d*_(g)+Np(g,l+m,!0),x=f+d*b(g)+kp(g,l+m,!0),S="left",T="middle";break;case"insideEndAngle":w=c+d*_(g)+Np(g,-l+m,!0),x=f+d*b(g)+kp(g,-l+m,!0),S="right",T="middle";break;default:return ed(n,a,i)}return n=n||{},n.x=w,n.y=x,n.align=S,n.verticalAlign=T,n}}function Aq(r,e,t,n){if(je(n)){r.setTextConfig({rotation:n});return}else if(K(e)){r.setTextConfig({rotation:0});return}var a=r.shape,i=a.clockwise?a.startAngle:a.endAngle,o=a.clockwise?a.endAngle:a.startAngle,s=(i+o)/2,l,u=t(e);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":l=s;break;case"startAngle":case"insideStartAngle":l=i;break;case"endAngle":case"insideEndAngle":l=o;break;default:r.setTextConfig({rotation:0});return}var c=Math.PI*1.5-l;u==="middle"&&c>Math.PI/2&&c<Math.PI*1.5&&(c-=Math.PI),r.setTextConfig({rotation:c})}function Np(r,e,t){return e*Math.sin(r)*(t?-1:1)}function kp(r,e,t){return e*Math.cos(r)*(t?1:-1)}var pb=Math.max,gb=Math.min;function Lq(r,e){var t=r.getArea&&r.getArea();if($s(r,"cartesian2d")){var n=r.getBaseAxis();if(n.type!=="category"||!n.onBand){var a=e.getLayout("bandWidth");n.isHorizontal()?(t.x-=a,t.width+=a*2):(t.y-=a,t.height+=a*2)}}return t}var Iq=function(r){j(e,r);function e(){var t=r.call(this)||this;return t.type=e.type,t._isFirstFrame=!0,t}return e.prototype.render=function(t,n,a,i){this._model=t,this._removeOnRenderedListener(a),this._updateDrawMode(t);var o=t.get("coordinateSystem");(o==="cartesian2d"||o==="polar")&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(t,n,a):this._renderNormal(t,n,a,i))},e.prototype.incrementalPrepareRender=function(t){this._clear(),this._updateDrawMode(t),this._updateLargeClip(t)},e.prototype.incrementalRender=function(t,n){this._progressiveEls=[],this._incrementalRenderLarge(t,n)},e.prototype.eachRendered=function(t){oo(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var n=t.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},e.prototype._renderNormal=function(t,n,a,i){var o=this.group,s=t.getData(),l=this._data,u=t.coordinateSystem,c=u.getBaseAxis(),f;u.type==="cartesian2d"?f=c.isHorizontal():u.type==="polar"&&(f=c.dim==="angle");var h=t.isAnimationEnabled()?t:null,v=Pq(t,u);v&&this._enableRealtimeSort(v,s,a);var d=t.get("clip",!0)||v,p=Lq(u,s);o.removeClipPath();var g=t.get("roundCap",!0),y=t.get("showBackground",!0),m=t.getModel("backgroundStyle"),_=m.get("borderRadius")||0,b=[],w=this._backgroundEls,x=i&&i.isInitSort,S=i&&i.type==="changeAxisOrder";function T(A){var I=Bp[u.type](s,A),P=zq(u,f,I);return P.useStyle(m.getItemStyle()),u.type==="cartesian2d"&&P.setShape("r",_),b[A]=P,P}s.diff(l).add(function(A){var I=s.getItemModel(A),P=Bp[u.type](s,A,I);if(y&&T(A),!(!s.hasValue(A)||!EE[u.type](P))){var E=!1;d&&(E=AE[u.type](p,P));var O=LE[u.type](t,s,A,P,f,h,c.model,!1,g);v&&(O.forceLabelAnimation=!0),RE(O,s,A,I,P,t,f,u.type==="polar"),x?O.attr({shape:P}):v?IE(v,h,O,P,A,f,!1,!1):xt(O,{shape:P},t,A),s.setItemGraphicEl(A,O),o.add(O),O.ignore=E}}).update(function(A,I){var P=s.getItemModel(A),E=Bp[u.type](s,A,P);if(y){var O=void 0;w.length===0?O=T(I):(O=w[I],O.useStyle(m.getItemStyle()),u.type==="cartesian2d"&&O.setShape("r",_),b[A]=O);var N=Bp[u.type](s,A),V=zE(f,N,u);qe(O,{shape:V},h,A)}var $=l.getItemGraphicEl(I);if(!s.hasValue(A)||!EE[u.type](E)){o.remove($);return}var U=!1;if(d&&(U=AE[u.type](p,E),U&&o.remove($)),$?da($):$=LE[u.type](t,s,A,E,f,h,c.model,!!$,g),v&&($.forceLabelAnimation=!0),S){var Y=$.getTextContent();if(Y){var ae=ql(Y);ae.prevValue!=null&&(ae.prevValue=ae.value)}}else RE($,s,A,P,E,t,f,u.type==="polar");x?$.attr({shape:E}):v?IE(v,h,$,E,A,f,!0,S):qe($,{shape:E},t,A,null),s.setItemGraphicEl(A,$),$.ignore=U,o.add($)}).remove(function(A){var I=l.getItemGraphicEl(A);I&&ef(I,t,A)}).execute();var D=this._backgroundGroup||(this._backgroundGroup=new Te);D.removeAll();for(var M=0;M<b.length;++M)D.add(b[M]);o.add(D),this._backgroundEls=b,this._data=s},e.prototype._renderLarge=function(t,n,a){this._clear(),kE(t,this.group),this._updateLargeClip(t)},e.prototype._incrementalRenderLarge=function(t,n){this._removeBackground(),kE(n,this.group,this._progressiveEls,!0)},e.prototype._updateLargeClip=function(t){var n=t.get("clip",!0)&&Ep(t.coordinateSystem,!1,t),a=this.group;n?a.setClipPath(n):a.removeClipPath()},e.prototype._enableRealtimeSort=function(t,n,a){var i=this;if(!!n.count()){var o=t.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(n,t,a),this._isFirstFrame=!1;else{var s=function(l){var u=n.getItemGraphicEl(l),c=u&&u.shape;return c&&Math.abs(o.isHorizontal()?c.height:c.width)||0};this._onRendered=function(){i._updateSortWithinSameData(n,s,o,a)},a.getZr().on("rendered",this._onRendered)}}},e.prototype._dataSort=function(t,n,a){var i=[];return t.each(t.mapDimension(n.dim),function(o,s){var l=a(s);l=l==null?NaN:l,i.push({dataIndex:s,mappedValue:l,ordinalNumber:o})}),i.sort(function(o,s){return s.mappedValue-o.mappedValue}),{ordinalNumbers:J(i,function(o){return o.ordinalNumber})}},e.prototype._isOrderChangedWithinSameData=function(t,n,a){for(var i=a.scale,o=t.mapDimension(a.dim),s=Number.MAX_VALUE,l=0,u=i.getOrdinalMeta().categories.length;l<u;++l){var c=t.rawIndexOf(o,i.getRawOrdinalNumber(l)),f=c<0?Number.MIN_VALUE:n(t.indexOfRawIndex(c));if(f>s)return!0;s=f}return!1},e.prototype._isOrderDifferentInView=function(t,n){for(var a=n.scale,i=a.getExtent(),o=Math.max(0,i[0]),s=Math.min(i[1],a.getOrdinalMeta().categories.length-1);o<=s;++o)if(t.ordinalNumbers[o]!==a.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(t,n,a,i){if(!!this._isOrderChangedWithinSameData(t,n,a)){var o=this._dataSort(t,a,n);this._isOrderDifferentInView(o,a)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",axisId:a.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(t,n,a){var i=n.baseAxis,o=this._dataSort(t,i,function(s){return t.get(t.mapDimension(n.otherAxis.dim),s)});a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:o})},e.prototype.remove=function(t,n){this._clear(this._model),this._removeOnRenderedListener(n)},e.prototype.dispose=function(t,n){this._removeOnRenderedListener(n)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var n=this.group,a=this._data;t&&t.isAnimationEnabled()&&a&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],a.eachItemGraphicEl(function(i){ef(i,t,Me(i).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(ut),AE={cartesian2d:function(r,e){var t=e.width<0?-1:1,n=e.height<0?-1:1;t<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height);var a=r.x+r.width,i=r.y+r.height,o=pb(e.x,r.x),s=gb(e.x+e.width,a),l=pb(e.y,r.y),u=gb(e.y+e.height,i),c=s<o,f=u<l;return e.x=c&&o>a?s:o,e.y=f&&l>i?u:l,e.width=c?0:s-o,e.height=f?0:u-l,t<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height),c||f},polar:function(r,e){var t=e.r0<=e.r?1:-1;if(t<0){var n=e.r;e.r=e.r0,e.r0=n}var a=gb(e.r,r.r),i=pb(e.r0,r.r0);e.r=a,e.r0=i;var o=a-i<0;if(t<0){var n=e.r;e.r=e.r0,e.r0=n}return o}},LE={cartesian2d:function(r,e,t,n,a,i,o,s,l){var u=new Ge({shape:Q({},n),z2:1});if(u.__dataIndex=t,u.name="item",i){var c=u.shape,f=a?"height":"width";c[f]=0}return u},polar:function(r,e,t,n,a,i,o,s,l){var u=!a&&l?Rp:Hr,c=new u({shape:n,z2:1});c.name="item";var f=OE(a);if(c.calculateTextPosition=Mq(f,{isRoundCap:u===Rp}),i){var h=c.shape,v=a?"r":"endAngle",d={};h[v]=a?0:n.startAngle,d[v]=n[v],(s?qe:xt)(c,{shape:d},i)}return c}};function Pq(r,e){var t=r.get("realtimeSort",!0),n=e.getBaseAxis();if(t&&n.type==="category"&&e.type==="cartesian2d")return{baseAxis:n,otherAxis:e.getOtherAxis(n)}}function IE(r,e,t,n,a,i,o,s){var l,u;i?(u={x:n.x,width:n.width},l={y:n.y,height:n.height}):(u={y:n.y,height:n.height},l={x:n.x,width:n.width}),s||(o?qe:xt)(t,{shape:l},e,a,null);var c=e?r.baseAxis.model:null;(o?qe:xt)(t,{shape:u},c,a)}function PE(r,e){for(var t=0;t<e.length;t++)if(!isFinite(r[e[t]]))return!0;return!1}var Eq=["x","y","width","height"],Oq=["cx","cy","r","startAngle","endAngle"],EE={cartesian2d:function(r){return!PE(r,Eq)},polar:function(r){return!PE(r,Oq)}},Bp={cartesian2d:function(r,e,t){var n=r.getItemLayout(e),a=t?Nq(t,n):0,i=n.width>0?1:-1,o=n.height>0?1:-1;return{x:n.x+i*a/2,y:n.y+o*a/2,width:n.width-i*a,height:n.height-o*a}},polar:function(r,e,t){var n=r.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function Rq(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function OE(r){return function(e){var t=e?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+t;default:return n}}}(r)}function RE(r,e,t,n,a,i,o,s){var l=e.getItemVisual(t,"style");s||r.setShape("r",n.get(["itemStyle","borderRadius"])||0),r.useStyle(l);var u=n.getShallow("cursor");u&&r.attr("cursor",u);var c=s?o?a.r>=a.r0?"endArc":"startArc":a.endAngle>=a.startAngle?"endAngle":"startAngle":o?a.height>=0?"bottom":"top":a.width>=0?"right":"left",f=rr(n);yr(r,f,{labelFetcher:i,labelDataIndex:t,defaultText:gu(i.getData(),t),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:c});var h=r.getTextContent();if(s&&h){var v=n.get(["label","position"]);r.textConfig.inside=v==="middle"?!0:null,Aq(r,v==="outside"?c:v,OE(o),n.get(["label","rotate"]))}JM(h,f,i.getRawValue(t),function(p){return fE(e,p)});var d=n.getModel(["emphasis"]);Lt(r,d.get("focus"),d.get("blurScope"),d.get("disabled")),gr(r,n),Rq(a)&&(r.style.fill="none",r.style.stroke="none",L(r.states,function(p){p.style&&(p.style.fill=p.style.stroke="none")}))}function Nq(r,e){var t=r.get(["itemStyle","borderColor"]);if(!t||t==="none")return 0;var n=r.get(["itemStyle","borderWidth"])||0,a=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),i=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(n,a,i)}var kq=function(){function r(){}return r}(),NE=function(r){j(e,r);function e(t){var n=r.call(this,t)||this;return n.type="largeBar",n}return e.prototype.getDefaultShape=function(){return new kq},e.prototype.buildPath=function(t,n){for(var a=n.points,i=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c<a.length;c+=3)l[i]=u,l[o]=a[c+2],s[i]=a[c+i],s[o]=a[c+o],t.rect(s[0],s[1],l[0],l[1])},e}(Be);function kE(r,e,t,n){var a=r.getData(),i=a.getLayout("valueAxisHorizontal")?1:0,o=a.getLayout("largeDataIndices"),s=a.getLayout("size"),l=r.getModel("backgroundStyle"),u=a.getLayout("largeBackgroundPoints");if(u){var c=new NE({shape:{points:u},incremental:!!n,silent:!0,z2:0});c.baseDimIdx=i,c.largeDataIndices=o,c.barWidth=s,c.useStyle(l.getItemStyle()),e.add(c),t&&t.push(c)}var f=new NE({shape:{points:a.getLayout("largePoints")},incremental:!!n,ignoreCoarsePointer:!0,z2:1});f.baseDimIdx=i,f.largeDataIndices=o,f.barWidth=s,e.add(f),f.useStyle(a.getVisual("style")),Me(f).seriesIndex=r.seriesIndex,r.get("silent")||(f.on("mousedown",BE),f.on("mousemove",BE)),t&&t.push(f)}var BE=Qd(function(r){var e=this,t=Bq(e,r.offsetX,r.offsetY);Me(e).dataIndex=t>=0?t:null},30,!1);function Bq(r,e,t){for(var n=r.baseDimIdx,a=1-n,i=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,c=0,f=i.length/3;c<f;c++){var h=c*3;if(l[n]=u,l[a]=i[h+2],s[n]=i[h+n],s[a]=i[h+a],l[a]<0&&(s[a]+=l[a],l[a]=-l[a]),e>=s[0]&&e<=s[0]+l[0]&&t>=s[1]&&t<=s[1]+l[1])return o[c]}return-1}function zE(r,e,t){if($s(t,"cartesian2d")){var n=e,a=t.getArea();return{x:r?n.x:a.x,y:r?a.y:n.y,width:r?n.width:a.width,height:r?a.height:n.height}}else{var a=t.getArea(),i=e;return{cx:a.cx,cy:a.cy,r0:r?a.r0:i.r0,r:r?a.r:i.r,startAngle:r?i.startAngle:0,endAngle:r?i.endAngle:Math.PI*2}}}function zq(r,e,t){var n=r.type==="polar"?Hr:Ge;return new n({shape:zE(e,t,r),silent:!0,z2:0})}var Fq=Iq;function Vq(r){r.registerChartView(Fq),r.registerSeriesModel(Cq),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,Ae(tP,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,rP("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,DE("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var n=e.componentType||"series";t.eachComponent({mainType:n,query:e},function(a){e.sortInfo&&a.axis.setCategorySortInfo(e.sortInfo)})})}var zp=Math.PI*2,FE=Math.PI/180;function VE(r,e){return Ht(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function $E(r,e){var t=VE(r,e),n=r.get("center"),a=r.get("radius");K(a)||(a=[0,a]);var i=le(t.width,e.getWidth()),o=le(t.height,e.getHeight()),s=Math.min(i,o),l=le(a[0],s/2),u=le(a[1],s/2),c,f,h=r.coordinateSystem;if(h){var v=h.dataToPoint(n);c=v[0]||0,f=v[1]||0}else K(n)||(n=[n,n]),c=le(n[0],i)+t.x,f=le(n[1],o)+t.y;return{cx:c,cy:f,r0:l,r:u}}function $q(r,e,t){e.eachSeriesByType(r,function(n){var a=n.getData(),i=a.mapDimension("value"),o=VE(n,t),s=$E(n,t),l=s.cx,u=s.cy,c=s.r,f=s.r0,h=-n.get("startAngle")*FE,v=n.get("minAngle")*FE,d=0;a.each(i,function(M){!isNaN(M)&&d++});var p=a.getSum(i),g=Math.PI/(p||d)*2,y=n.get("clockwise"),m=n.get("roseType"),_=n.get("stillShowZeroSum"),b=a.getDataExtent(i);b[0]=0;var w=zp,x=0,S=h,T=y?1:-1;if(a.setLayout({viewRect:o,r:c}),a.each(i,function(M,A){var I;if(isNaN(M)){a.setItemLayout(A,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:y,cx:l,cy:u,r0:f,r:m?NaN:c});return}m!=="area"?I=p===0&&_?g:M*g:I=zp/d,I<v?(I=v,w-=v):x+=M;var P=S+T*I;a.setItemLayout(A,{angle:I,startAngle:S,endAngle:P,clockwise:y,cx:l,cy:u,r0:f,r:m?at(M,b,[f,c]):c}),S=P}),w<zp&&d)if(w<=.001){var D=zp/d;a.each(i,function(M,A){if(!isNaN(M)){var I=a.getItemLayout(A);I.angle=D,I.startAngle=h+T*A*D,I.endAngle=h+T*(A+1)*D}})}else g=w/x,S=h,a.each(i,function(M,A){if(!isNaN(M)){var I=a.getItemLayout(A),P=I.angle===v?v:M*g;I.startAngle=S,I.endAngle=S+T*P,S+=T*P}})})}function Gf(r){return{seriesType:r,reset:function(e,t){var n=t.findComponents({mainType:"legend"});if(!(!n||!n.length)){var a=e.getData();a.filterSelf(function(i){for(var o=a.getName(i),s=0;s<n.length;s++)if(!n[s].isSelected(o))return!1;return!0})}}}}var Hq=Math.PI/180;function HE(r,e,t,n,a,i,o,s,l,u){if(r.length<2)return;function c(p){for(var g=p.rB,y=g*g,m=0;m<p.list.length;m++){var _=p.list[m],b=Math.abs(_.label.y-t),w=n+_.len,x=w*w,S=Math.sqrt((1-Math.abs(b*b/y))*x),T=e+(S+_.len2)*a,D=T-_.label.x,M=_.targetTextWidth-D*a;GE(_,M,!0),_.label.x=T}}function f(p){for(var g={list:[],maxY:0},y={list:[],maxY:0},m=0;m<p.length;m++)if(p[m].labelAlignTo==="none"){var _=p[m],b=_.label.y>t?y:g,w=Math.abs(_.label.y-t);if(w>=b.maxY){var x=_.label.x-e-_.len2*a,S=n+_.len,T=Math.abs(x)<S?Math.sqrt(w*w/(1-x*x/S/S)):S;b.rB=T,b.maxY=w}b.list.push(_)}c(g),c(y)}for(var h=r.length,v=0;v<h;v++)if(r[v].position==="outer"&&r[v].labelAlignTo==="labelLine"){var d=r[v].label.x-u;r[v].linePoints[1][0]+=d,r[v].label.x=u}RP(r,l,l+o)&&f(r)}function Gq(r,e,t,n,a,i,o,s){for(var l=[],u=[],c=Number.MAX_VALUE,f=-Number.MAX_VALUE,h=0;h<r.length;h++){var v=r[h].label;yb(r[h])||(v.x<e?(c=Math.min(c,v.x),l.push(r[h])):(f=Math.max(f,v.x),u.push(r[h])))}for(var h=0;h<r.length;h++){var d=r[h];if(!yb(d)&&d.linePoints){if(d.labelStyleWidth!=null)continue;var v=d.label,p=d.linePoints,g=void 0;d.labelAlignTo==="edge"?v.x<e?g=p[2][0]-d.labelDistance-o-d.edgeDistance:g=o+a-d.edgeDistance-p[2][0]-d.labelDistance:d.labelAlignTo==="labelLine"?v.x<e?g=c-o-d.bleedMargin:g=o+a-f-d.bleedMargin:v.x<e?g=v.x-o-d.bleedMargin:g=o+a-v.x-d.bleedMargin,d.targetTextWidth=g,GE(d,g)}}HE(u,e,t,n,1,a,i,o,s,f),HE(l,e,t,n,-1,a,i,o,s,c);for(var h=0;h<r.length;h++){var d=r[h];if(!yb(d)&&d.linePoints){var v=d.label,p=d.linePoints,y=d.labelAlignTo==="edge",m=v.style.padding,_=m?m[1]+m[3]:0,b=v.style.backgroundColor?0:_,w=d.rect.width+b,x=p[1][0]-p[2][0];y?v.x<e?p[2][0]=o+d.edgeDistance+w+d.labelDistance:p[2][0]=o+a-d.edgeDistance-w-d.labelDistance:(v.x<e?p[2][0]=v.x+d.labelDistance:p[2][0]=v.x-d.labelDistance,p[1][0]=p[2][0]+x),p[1][1]=p[2][1]=v.y}}}function GE(r,e,t){if(t===void 0&&(t=!1),r.labelStyleWidth==null){var n=r.label,a=n.style,i=r.rect,o=a.backgroundColor,s=a.padding,l=s?s[1]+s[3]:0,u=a.overflow,c=i.width+(o?0:l);if(e<c||t){var f=i.height;if(u&&u.match("break")){n.setStyle("backgroundColor",null),n.setStyle("width",e-l);var h=n.getBoundingRect();n.setStyle("width",Math.ceil(h.width)),n.setStyle("backgroundColor",o)}else{var v=e-l,d=e<c?v:t?v>r.unconstrainedWidth?null:v:null;n.setStyle("width",d)}var p=n.getBoundingRect();i.width=p.width;var g=(n.style.margin||0)+2.1;i.height=p.height+g,i.y-=(i.height-f)/2}}}function yb(r){return r.position==="center"}function Wq(r){var e=r.getData(),t=[],n,a,i=!1,o=(r.get("minShowLabelAngle")||0)*Hq,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,c=s.x,f=s.y,h=s.height;function v(x){x.ignore=!0}function d(x){if(!x.ignore)return!0;for(var S in x.states)if(x.states[S].ignore===!1)return!0;return!1}e.each(function(x){var S=e.getItemGraphicEl(x),T=S.shape,D=S.getTextContent(),M=S.getTextGuideLine(),A=e.getItemModel(x),I=A.getModel("label"),P=I.get("position")||A.get(["emphasis","label","position"]),E=I.get("distanceToLabelLine"),O=I.get("alignTo"),N=le(I.get("edgeDistance"),u),V=I.get("bleedMargin"),$=A.getModel("labelLine"),U=$.get("length");U=le(U,u);var Y=$.get("length2");if(Y=le(Y,u),Math.abs(T.endAngle-T.startAngle)<o){L(D.states,v),D.ignore=!0,M&&(L(M.states,v),M.ignore=!0);return}if(!!d(D)){var ae=(T.startAngle+T.endAngle)/2,H=Math.cos(ae),q=Math.sin(ae),X,Z,ie,se;n=T.cx,a=T.cy;var te=P==="inside"||P==="inner";if(P==="center")X=T.cx,Z=T.cy,se="center";else{var ve=(te?(T.r+T.r0)/2*H:T.r*H)+n,R=(te?(T.r+T.r0)/2*q:T.r*q)+a;if(X=ve+H*3,Z=R+q*3,!te){var F=ve+H*(U+l-T.r),G=R+q*(U+l-T.r),re=F+(H<0?-1:1)*Y,ne=G;O==="edge"?X=H<0?c+N:c+u-N:X=re+(H<0?-E:E),Z=ne,ie=[[ve,R],[F,G],[re,ne]]}se=te?"center":O==="edge"?H>0?"right":"left":H>0?"left":"right"}var ee=Math.PI,ue=0,De=I.get("rotate");if(je(De))ue=De*(ee/180);else if(P==="center")ue=0;else if(De==="radial"||De===!0){var vt=H<0?-ae+ee:-ae;ue=vt}else if(De==="tangential"&&P!=="outside"&&P!=="outer"){var rt=Math.atan2(H,q);rt<0&&(rt=ee*2+rt);var Yt=q>0;Yt&&(rt=ee+rt),ue=rt-ee}if(i=!!ue,D.x=X,D.y=Z,D.rotation=ue,D.setStyle({verticalAlign:"middle"}),te){D.setStyle({align:se});var St=D.states.select;St&&(St.x+=D.x,St.y+=D.y)}else{var Ct=D.getBoundingRect().clone();Ct.applyTransform(D.getComputedTransform());var Qr=(D.style.margin||0)+2.1;Ct.y-=Qr/2,Ct.height+=Qr,t.push({label:D,labelLine:M,position:P,len:U,len2:Y,minTurnAngle:$.get("minTurnAngle"),maxSurfaceAngle:$.get("maxSurfaceAngle"),surfaceNormal:new Oe(H,q),linePoints:ie,textAlign:se,labelDistance:E,labelAlignTo:O,edgeDistance:N,bleedMargin:V,rect:Ct,unconstrainedWidth:Ct.width,labelStyleWidth:D.style.width})}S.setTextConfig({inside:te})}}),!i&&r.get("avoidLabelOverlap")&&Gq(t,n,a,l,u,h,c,f);for(var p=0;p<t.length;p++){var g=t[p],y=g.label,m=g.labelLine,_=isNaN(y.x)||isNaN(y.y);if(y){y.setStyle({align:g.textAlign}),_&&(L(y.states,v),y.ignore=!0);var b=y.states.select;b&&(b.x+=y.x,b.y+=y.y)}if(m){var w=g.linePoints;_||!w?(L(m.states,v),m.ignore=!0):(IP(w,g.minTurnAngle),nY(w,g.surfaceNormal,g.maxSurfaceAngle),m.setShape({points:w}),y.__hostTarget.textGuideLineConfig={anchor:new Oe(w[0][0],w[0][1])})}}}function yu(r,e,t){var n=r.get("borderRadius");if(n==null)return t?{cornerRadius:0}:null;K(n)||(n=[n,n,n,n]);var a=Math.abs(e.r||0-e.r0||0);return{cornerRadius:J(n,function(i){return ca(i,a)})}}var Uq=function(r){j(e,r);function e(t,n,a){var i=r.call(this)||this;i.z2=2;var o=new We;return i.setTextContent(o),i.updateData(t,n,a,!0),i}return e.prototype.updateData=function(t,n,a,i){var o=this,s=t.hostModel,l=t.getItemModel(n),u=l.getModel("emphasis"),c=t.getItemLayout(n),f=Q(yu(l.getModel("itemStyle"),c,!0),c);if(isNaN(f.startAngle)){o.setShape(f);return}if(i){o.setShape(f);var h=s.getShallow("animationType");s.ecModel.ssr?(xt(o,{scaleX:0,scaleY:0},s,{dataIndex:n,isFrom:!0}),o.originX=f.cx,o.originY=f.cy):h==="scale"?(o.shape.r=c.r0,xt(o,{shape:{r:c.r}},s,n)):a!=null?(o.setShape({startAngle:a,endAngle:a}),xt(o,{shape:{startAngle:c.startAngle,endAngle:c.endAngle}},s,n)):(o.shape.endAngle=c.startAngle,qe(o,{shape:{endAngle:c.endAngle}},s,n))}else da(o),qe(o,{shape:f},s,n);o.useStyle(t.getItemVisual(n,"style")),gr(o,l);var v=(c.startAngle+c.endAngle)/2,d=s.get("selectedOffset"),p=Math.cos(v)*d,g=Math.sin(v)*d,y=l.getShallow("cursor");y&&o.attr("cursor",y),this._updateLabel(s,t,n),o.ensureState("emphasis").shape=Q({r:c.r+(u.get("scale")&&u.get("scaleSize")||0)},yu(u.getModel("itemStyle"),c)),Q(o.ensureState("select"),{x:p,y:g,shape:yu(l.getModel(["select","itemStyle"]),c)}),Q(o.ensureState("blur"),{shape:yu(l.getModel(["blur","itemStyle"]),c)});var m=o.getTextGuideLine(),_=o.getTextContent();m&&Q(m.ensureState("select"),{x:p,y:g}),Q(_.ensureState("select"),{x:p,y:g}),Lt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,n,a){var i=this,o=n.getItemModel(a),s=o.getModel("labelLine"),l=n.getItemVisual(a,"style"),u=l&&l.fill,c=l&&l.opacity;yr(i,rr(o),{labelFetcher:n.hostModel,labelDataIndex:a,inheritColor:u,defaultOpacity:c,defaultText:t.getFormattedLabel(a,"normal")||n.getName(a)});var f=i.getTextContent();i.setTextConfig({position:null,rotation:null}),f.attr({z2:10});var h=t.get(["label","position"]);if(h!=="outside"&&h!=="outer")i.removeTextGuideLine();else{var v=this.getTextGuideLine();v||(v=new Wr,this.setTextGuideLine(v)),Q1(this,K1(o),{stroke:u,opacity:Ia(s.get(["lineStyle","opacity"]),c,1)})}},e}(Hr),jq=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,n,a,i){var o=t.getData(),s=this._data,l=this.group,u;if(!s&&o.count()>0){for(var c=o.getItemLayout(0),f=1;isNaN(c&&c.startAngle)&&f<o.count();++f)c=o.getItemLayout(f);c&&(u=c.startAngle)}if(this._emptyCircleSector&&l.remove(this._emptyCircleSector),o.count()===0&&t.get("showEmptyCircle")){var h=new Hr({shape:$E(t,a)});h.useStyle(t.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=h,l.add(h)}o.diff(s).add(function(v){var d=new Uq(o,v,u);o.setItemGraphicEl(v,d),l.add(d)}).update(function(v,d){var p=s.getItemGraphicEl(d);p.updateData(o,v,u),p.off("click"),l.add(p),o.setItemGraphicEl(v,p)}).remove(function(v){var d=s.getItemGraphicEl(v);ef(d,t,v)}).execute(),Wq(t),t.get("animationTypeUpdate")!=="expansion"&&(this._data=o)},e.prototype.dispose=function(){},e.prototype.containPoint=function(t,n){var a=n.getData(),i=a.getItemLayout(0);if(i){var o=t[0]-i.cx,s=t[1]-i.cy,l=Math.sqrt(o*o+s*s);return l<=i.r&&l>=i.r0}},e.type="pie",e}(ut),Yq=jq;function mu(r,e,t){e=K(e)&&{coordDimensions:e}||Q({encodeDefine:r.getEncode()},e);var n=r.getSource(),a=hu(n,e).dimensions,i=new Er(a,r);return i.initData(n,t),i}var qq=function(){function r(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return r.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},r.prototype.containName=function(e){var t=this._getRawData();return t.indexOfName(e)>=0},r.prototype.indexOfName=function(e){var t=this._getDataWithEncodedVisual();return t.indexOfName(e)},r.prototype.getItemVisual=function(e,t){var n=this._getDataWithEncodedVisual();return n.getItemVisual(e,t)},r}(),Wf=qq,Zq=Ye(),Xq=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Wf(fe(this.getData,this),fe(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return mu(this,{coordDimensions:["value"],encodeDefaulter:Ae(F_,this)})},e.prototype.getDataParams=function(t){var n=this.getData(),a=Zq(n),i=a.seats;if(!i){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),i=a.seats=rD(o,n.hostModel.get("percentPrecision"))}var s=r.prototype.getDataParams.call(this,t);return s.percent=i[t]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(t){rs(t,"labelLine",["show"]);var n=t.labelLine,a=t.emphasis.labelLine;n.show=n.show&&t.label.show,a.show=a.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,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%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(yt),Qq=Xq;function Kq(r){return{seriesType:r,reset:function(e,t){var n=e.getData();n.filterSelf(function(a){var i=n.mapDimension("value"),o=n.get(i,a);return!(je(o)&&!isNaN(o)&&o<0)})}}}function Jq(r){r.registerChartView(Yq),r.registerSeriesModel(Qq),WL("pie",r.registerAction),r.registerLayout(Ae($q,"pie")),r.registerProcessor(Gf("pie")),r.registerProcessor(Kq("pie"))}var eZ=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,n){return Wa(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return t==null?this.option.large?5e3:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t==null?this.option.large?1e4:this.get("progressiveThreshold"):t},e.prototype.brushSelector=function(t,n,a){return a.point(n.getItemLayout(t))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},e}(yt),tZ=eZ,WE=4,rZ=function(){function r(){}return r}(),nZ=function(r){j(e,r);function e(t){var n=r.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return e.prototype.getDefaultShape=function(){return new rZ},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,n){var a=n.points,i=n.size,o=this.symbolProxy,s=o.shape,l=t.getContext?t.getContext():t,u=l&&i[0]<WE,c=this.softClipShape,f;if(u){this._ctx=l;return}for(this._ctx=null,f=this._off;f<a.length;){var h=a[f++],v=a[f++];isNaN(h)||isNaN(v)||c&&!c.contain(h,v)||(s.x=h-i[0]/2,s.y=v-i[1]/2,s.width=i[0],s.height=i[1],o.buildPath(t,s,!0))}this.incremental&&(this._off=f,this.notClear=!0)},e.prototype.afterBrush=function(){var t=this.shape,n=t.points,a=t.size,i=this._ctx,o=this.softClipShape,s;if(!!i){for(s=this._off;s<n.length;){var l=n[s++],u=n[s++];isNaN(l)||isNaN(u)||o&&!o.contain(l,u)||i.fillRect(l-a[0]/2,u-a[1]/2,a[0],a[1])}this.incremental&&(this._off=s,this.notClear=!0)}},e.prototype.findDataIndex=function(t,n){for(var a=this.shape,i=a.points,o=a.size,s=Math.max(o[0],4),l=Math.max(o[1],4),u=i.length/2-1;u>=0;u--){var c=u*2,f=i[c]-s/2,h=i[c+1]-l/2;if(t>=f&&n>=h&&t<=f+s&&n<=h+l)return u}return-1},e.prototype.contain=function(t,n){var a=this.transformCoordToLocal(t,n),i=this.getBoundingRect();if(t=a[0],n=a[1],i.contain(t,n)){var o=this.hoverDataIdx=this.findDataIndex(t,n);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var n=this.shape,a=n.points,i=n.size,o=i[0],s=i[1],l=1/0,u=1/0,c=-1/0,f=-1/0,h=0;h<a.length;){var v=a[h++],d=a[h++];l=Math.min(v,l),c=Math.max(v,c),u=Math.min(d,u),f=Math.max(d,f)}t=this._rect=new Re(l-o/2,u-s/2,c-l+o,f-u+s)}return t},e}(Be),aZ=function(){function r(){this.group=new Te}return r.prototype.updateData=function(e,t){this._clear();var n=this._create();n.setShape({points:e.getLayout("points")}),this._setCommon(n,e,t)},r.prototype.updateLayout=function(e){var t=e.getLayout("points");this.group.eachChild(function(n){if(n.startIndex!=null){var a=(n.endIndex-n.startIndex)*2,i=n.startIndex*4*2;t=new Float32Array(t.buffer,i,a)}n.setShape("points",t),n.reset()})},r.prototype.incrementalPrepareUpdate=function(e){this._clear()},r.prototype.incrementalUpdate=function(e,t,n){var a=this._newAdded[0],i=t.getLayout("points"),o=a&&a.shape.points;if(o&&o.length<2e4){var s=o.length,l=new Float32Array(s+i.length);l.set(o),l.set(i,s),a.endIndex=e.end,a.setShape({points:l})}else{this._newAdded=[];var u=this._create();u.startIndex=e.start,u.endIndex=e.end,u.incremental=!0,u.setShape({points:i}),this._setCommon(u,t,n)}},r.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},r.prototype._create=function(){var e=new nZ({cursor:"default"});return e.ignoreCoarsePointer=!0,this.group.add(e),this._newAdded.push(e),e},r.prototype._setCommon=function(e,t,n){var a=t.hostModel;n=n||{};var i=t.getVisual("symbolSize");e.setShape("size",i instanceof Array?i:[i,i]),e.softClipShape=n.clipShape||null,e.symbolProxy=kt(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor;var o=e.shape.size[0]<WE;e.useStyle(a.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var s=t.getVisual("style"),l=s&&s.fill;l&&e.setColor(l);var u=Me(e);u.seriesIndex=a.seriesIndex,e.on("mousemove",function(c){u.dataIndex=null;var f=e.hoverDataIdx;f>=0&&(u.dataIndex=f+(e.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}(),iZ=aZ,oZ=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=t.getData(),o=this._updateSymbolDraw(i,t);o.updateData(i,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,n,a){var i=t.getData(),o=this._updateSymbolDraw(i,t);o.incrementalPrepareUpdate(i),this._finished=!1},e.prototype.incrementalRender=function(t,n,a){this._symbolDraw.incrementalUpdate(t,n.getData(),{clipShape:this._getClipShape(n)}),this._finished=t.end===n.getData().count()},e.prototype.updateTransform=function(t,n,a){var i=t.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var o=Hf("").reset(t,n,a);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){var n=t.coordinateSystem,a=n&&n.getArea&&n.getArea();return t.get("clip",!0)?a:null},e.prototype._updateSymbolDraw=function(t,n){var a=this._symbolDraw,i=n.pipelineContext,o=i.large;return(!a||o!==this._isLargeDraw)&&(a&&a.remove(),a=this._symbolDraw=o?new iZ:new $f,this._isLargeDraw=o,this.group.removeAll()),this.group.add(a.group),a},e.prototype.remove=function(t,n){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(ut),sZ=oZ,lZ=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}($e),uZ=lZ,mb=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",$t).models[0]},e.type="cartesian2dAxis",e}($e);Et(mb,du);var UE={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},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},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},cZ=Pe({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},UE),_b=Pe({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},UE),fZ=Pe({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},_b),hZ=me({logBase:10},_b),jE={category:cZ,value:_b,time:fZ,log:hZ},vZ={value:1,category:1,time:1,log:1};function _u(r,e,t,n){L(vZ,function(a,i){var o=Pe(Pe({},jE[i],!0),n,!0),s=function(l){j(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=e+"Axis."+i,c}return u.prototype.mergeDefaultAndTheme=function(c,f){var h=ff(this),v=h?Kl(c):{},d=f.getTheme();Pe(c,d.get(i+"Axis")),Pe(c,this.getDefaultOption()),c.type=YE(c),h&&lo(c,v,h)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=z1.createByAxisModel(this))},u.prototype.getCategories=function(c){var f=this.option;if(f.type==="category")return c?f.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.type=e+"Axis."+i,u.defaultOption=o,u}(t);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(e+"Axis",YE)}function YE(r){return r.type||(r.data?"category":"value")}var dZ=function(){function r(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return r.prototype.getAxis=function(e){return this._axes[e]},r.prototype.getAxes=function(){return J(this._dimList,function(e){return this._axes[e]},this)},r.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),nt(this.getAxes(),function(t){return t.scale.type===e})},r.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},r}(),pZ=dZ,bb=["x","y"];function qE(r){return r.type==="interval"||r.type==="time"}var gZ=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=bb,t}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!qE(t)||!qE(n))){var a=t.getExtent(),i=n.getExtent(),o=this.dataToPoint([a[0],i[0]]),s=this.dataToPoint([a[1],i[1]]),l=a[1]-a[0],u=i[1]-i[0];if(!(!l||!u)){var c=(s[0]-o[0])/l,f=(s[1]-o[1])/u,h=o[0]-a[0]*c,v=o[1]-i[0]*f,d=this._transform=[c,0,0,f,h,v];this._invTransform=Yo([],d)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var n=this.getAxis("x"),a=this.getAxis("y");return n.contain(n.toLocalCoord(t[0]))&&a.contain(a.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,n){var a=this.dataToPoint(t),i=this.dataToPoint(n),o=this.getArea(),s=new Re(a[0],a[1],i[0]-a[0],i[1]-a[1]);return o.intersect(s)},e.prototype.dataToPoint=function(t,n,a){a=a||[];var i=t[0],o=t[1];if(this._transform&&i!=null&&isFinite(i)&&o!=null&&isFinite(o))return sr(a,t,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return a[0]=s.toGlobalCoord(s.dataToCoord(i,n)),a[1]=l.toGlobalCoord(l.dataToCoord(o,n)),a},e.prototype.clampData=function(t,n){var a=this.getAxis("x").scale,i=this.getAxis("y").scale,o=a.getExtent(),s=i.getExtent(),l=a.parse(t[0]),u=i.parse(t[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),n},e.prototype.pointToData=function(t,n){var a=[];if(this._invTransform)return sr(a,t,this._invTransform);var i=this.getAxis("x"),o=this.getAxis("y");return a[0]=i.coordToData(i.toLocalCoord(t[0]),n),a[1]=o.coordToData(o.toLocalCoord(t[1]),n),a},e.prototype.getOtherAxis=function(t){return this.getAxis(t.dim==="x"?"y":"x")},e.prototype.getArea=function(){var t=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),a=Math.min(t[0],t[1]),i=Math.min(n[0],n[1]),o=Math.max(t[0],t[1])-a,s=Math.max(n[0],n[1])-i;return new Re(a,i,o,s)},e}(pZ),yZ=function(r){j(e,r);function e(t,n,a,i,o){var s=r.call(this,t,n,a)||this;return s.index=0,s.type=i||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.getGlobalExtent=function(t){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),t&&n[0]>n[1]&&n.reverse(),n},e.prototype.pointToData=function(t,n){return this.coordToData(this.toLocalCoord(t[this.dim==="x"?0:1]),n)},e.prototype.setCategorySortInfo=function(t){if(this.type!=="category")return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(Un),mZ=yZ;function xb(r,e,t){t=t||{};var n=r.coordinateSystem,a=e.axis,i={},o=a.getAxesOnZeroOf()[0],s=a.position,l=o?"onZero":s,u=a.dim,c=n.getRect(),f=[c.x,c.x+c.width,c.y,c.y+c.height],h={left:0,right:1,top:0,bottom:1,onZero:2},v=e.get("offset")||0,d=u==="x"?[f[2]-v,f[3]+v]:[f[0]-v,f[1]+v];if(o){var p=o.toGlobalCoord(o.dataToCoord(0));d[h.onZero]=Math.max(Math.min(p,d[1]),d[0])}i.position=[u==="y"?d[h[l]]:f[0],u==="x"?d[h[l]]:f[3]],i.rotation=Math.PI/2*(u==="x"?0:1);var g={top:-1,bottom:1,left:-1,right:1};i.labelDirection=i.tickDirection=i.nameDirection=g[s],i.labelOffset=o?d[h[s]]-d[h.onZero]:0,e.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),Jt(t.labelInside,e.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var y=e.get(["axisLabel","rotate"]);return i.labelRotate=l==="top"?-y:y,i.z2=1,i}function ZE(r){return r.get("coordinateSystem")==="cartesian2d"}function XE(r){var e={xAxisModel:null,yAxisModel:null};return L(e,function(t,n){var a=n.replace(/Model$/,""),i=r.getReferringComponents(a,$t).models[0];e[n]=i}),e}var wb=Math.log;function QE(r,e,t){var n=go.prototype,a=n.getTicks.call(t),i=n.getTicks.call(t,!0),o=a.length-1,s=n.getInterval.call(t),l=fP(r,e),u=l.extent,c=l.fixMin,f=l.fixMax;if(r.type==="log"){var h=wb(r.base);u=[wb(u[0])/h,wb(u[1])/h]}r.setExtent(u[0],u[1]),r.calcNiceExtent({splitNumber:o,fixMin:c,fixMax:f});var v=n.getExtent.call(r);c&&(u[0]=v[0]),f&&(u[1]=v[1]);var d=n.getInterval.call(r),p=u[0],g=u[1];if(c&&f)d=(g-p)/o;else if(c)for(g=u[0]+d*o;g<u[1]&&isFinite(g)&&isFinite(u[1]);)d=V1(d),g=u[0]+d*o;else if(f)for(p=u[1]-d*o;p>u[0]&&isFinite(p)&&isFinite(u[0]);)d=V1(d),p=u[1]-d*o;else{var y=r.getTicks().length-1;y>o&&(d=V1(d));var m=d*o;g=Math.ceil(u[1]/d)*d,p=At(g-m),p<0&&u[0]>=0?(p=0,g=At(m)):g>0&&u[1]<=0&&(g=0,p=-At(m))}var _=(a[0].value-i[0].value)/s,b=(a[o].value-i[o].value)/s;n.setExtent.call(r,p+d*_,g+d*b),n.setInterval.call(r,d),(_||b)&&n.setNiceExtent.call(r,p+d,g-d)}var _Z=function(){function r(e,t,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=bb,this._initCartesian(e,t,n),this.model=e}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(e,t){var n=this._axesMap;this._updateScale(e,this.model);function a(o){var s,l=Fe(o),u=l.length;if(!!u){for(var c=[],f=u-1;f>=0;f--){var h=+l[f],v=o[h],d=v.model,p=v.scale;F1(p)&&d.get("alignTicks")&&d.get("interval")==null?c.push(v):(Os(p,d),F1(p)&&(s=v))}c.length&&(s||(s=c.pop(),Os(s.scale,s.model)),L(c,function(g){QE(g.scale,g.model,s.scale)}))}}a(n.x),a(n.y);var i={};L(n.x,function(o){KE(n,"y",o,i)}),L(n.y,function(o){KE(n,"x",o,i)}),this.resize(this.model,t)},r.prototype.resize=function(e,t,n){var a=e.getBoxLayoutParams(),i=!n&&e.get("containLabel"),o=Ht(a,{width:t.getWidth(),height:t.getHeight()});this._rect=o;var s=this._axesList;l(),i&&(L(s,function(u){if(!u.model.get(["axisLabel","inside"])){var c=_j(u);if(c){var f=u.isHorizontal()?"height":"width",h=u.model.get(["axisLabel","margin"]);o[f]-=c[f]+h,u.position==="top"?o.y+=c.height+h:u.position==="left"&&(o.x+=c.width+h)}}}),l()),L(this._coordsList,function(u){u.calcAffineTransform()});function l(){L(s,function(u){var c=u.isHorizontal(),f=c?[0,o.width]:[0,o.height],h=u.inverse?1:0;u.setExtent(f[h],f[1-h]),bZ(u,c?o.x:o.y)})}},r.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(n!=null)return n[t||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var n="x"+e+"y"+t;return this._coordsMap[n]}_e(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var a=0,i=this._coordsList;a<i.length;a++)if(i[a].getAxis("x").index===e||i[a].getAxis("y").index===t)return i[a]},r.prototype.getCartesians=function(){return this._coordsList.slice()},r.prototype.convertToPixel=function(e,t,n){var a=this._findConvertTarget(t);return a.cartesian?a.cartesian.dataToPoint(n):a.axis?a.axis.toGlobalCoord(a.axis.dataToCoord(n)):null},r.prototype.convertFromPixel=function(e,t,n){var a=this._findConvertTarget(t);return a.cartesian?a.cartesian.pointToData(n):a.axis?a.axis.coordToData(a.axis.toLocalCoord(n)):null},r.prototype._findConvertTarget=function(e){var t=e.seriesModel,n=e.xAxisModel||t&&t.getReferringComponents("xAxis",$t).models[0],a=e.yAxisModel||t&&t.getReferringComponents("yAxis",$t).models[0],i=e.gridModel,o=this._coordsList,s,l;if(t)s=t.coordinateSystem,Ne(o,s)<0&&(s=null);else if(n&&a)s=this.getCartesian(n.componentIndex,a.componentIndex);else if(n)l=this.getAxis("x",n.componentIndex);else if(a)l=this.getAxis("y",a.componentIndex);else if(i){var u=i.coordinateSystem;u===this&&(s=this._coordsList[0])}return{cartesian:s,axis:l}},r.prototype.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},r.prototype._initCartesian=function(e,t,n){var a=this,i=this,o={left:!1,right:!1,top:!1,bottom:!1},s={x:{},y:{}},l={x:0,y:0};if(t.eachComponent("xAxis",u("x"),this),t.eachComponent("yAxis",u("y"),this),!l.x||!l.y){this._axesMap={},this._axesList=[];return}this._axesMap=s,L(s.x,function(c,f){L(s.y,function(h,v){var d="x"+f+"y"+v,p=new gZ(d);p.master=a,p.model=e,a._coordsMap[d]=p,a._coordsList.push(p),p.addAxis(c),p.addAxis(h)})});function u(c){return function(f,h){if(!!Sb(f,e)){var v=f.get("position");c==="x"?v!=="top"&&v!=="bottom"&&(v=o.bottom?"top":"bottom"):v!=="left"&&v!=="right"&&(v=o.left?"right":"left"),o[v]=!0;var d=new mZ(c,Ef(f),[0,0],f.get("type"),v),p=d.type==="category";d.onBand=p&&f.get("boundaryGap"),d.inverse=f.get("inverse"),f.axis=d,d.model=f,d.grid=i,d.index=h,i._axesList.push(d),s[c][h]=d,l[c]++}}}},r.prototype._updateScale=function(e,t){L(this._axesList,function(a){if(a.scale.setExtent(1/0,-1/0),a.type==="category"){var i=a.model.get("categorySortInfo");a.scale.setSortInfo(i)}}),e.eachSeries(function(a){if(ZE(a)){var i=XE(a),o=i.xAxisModel,s=i.yAxisModel;if(!Sb(o,t)||!Sb(s,t))return;var l=this.getCartesian(o.componentIndex,s.componentIndex),u=a.getData(),c=l.getAxis("x"),f=l.getAxis("y");n(u,c),n(u,f)}},this);function n(a,i){L(Cp(a,i.dim),function(o){i.scale.unionExtentFromData(a,o)})}},r.prototype.getTooltipAxes=function(e){var t=[],n=[];return L(this.getCartesians(),function(a){var i=e!=null&&e!=="auto"?a.getAxis(e):a.getBaseAxis(),o=a.getOtherAxis(i);Ne(t,i)<0&&t.push(i),Ne(n,o)<0&&n.push(o)}),{baseAxes:t,otherAxes:n}},r.create=function(e,t){var n=[];return e.eachComponent("grid",function(a,i){var o=new r(a,e,t);o.name="grid_"+i,o.resize(a,t,!0),a.coordinateSystem=o,n.push(o)}),e.eachSeries(function(a){if(!!ZE(a)){var i=XE(a),o=i.xAxisModel,s=i.yAxisModel,l=o.getCoordSysModel(),u=l.coordinateSystem;a.coordinateSystem=u.getCartesian(o.componentIndex,s.componentIndex)}}),n},r.dimensions=bb,r}();function Sb(r,e){return r.getCoordSysModel()===e}function KE(r,e,t,n){t.getAxesOnZeroOf=function(){return i?[i]:[]};var a=r[e],i,o=t.model,s=o.get(["axisLine","onZero"]),l=o.get(["axisLine","onZeroAxisIndex"]);if(!s)return;if(l!=null)JE(a[l])&&(i=a[l]);else for(var u in a)if(a.hasOwnProperty(u)&&JE(a[u])&&!n[c(a[u])]){i=a[u];break}i&&(n[c(i)]=!0);function c(f){return f.dim+"_"+f.index}}function JE(r){return r&&r.type!=="category"&&r.type!=="time"&&mj(r)}function bZ(r,e){var t=r.getExtent(),n=t[0]+t[1];r.toGlobalCoord=r.dim==="x"?function(a){return a+e}:function(a){return n-a+e},r.toLocalCoord=r.dim==="x"?function(a){return a-e}:function(a){return n-a+e}}var xZ=_Z,bo=Math.PI,Hs=function(){function r(e,t){this.group=new Te,this.opt=t,this.axisModel=e,me(t,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new Te({x:t.position[0],y:t.position[1],rotation:t.rotation});n.updateTransform(),this._transformGroup=n}return r.prototype.hasBuilder=function(e){return!!eO[e]},r.prototype.add=function(e){eO[e](this.opt,this.axisModel,this.group,this._transformGroup)},r.prototype.getGroup=function(){return this.group},r.innerTextLayout=function(e,t,n){var a=I0(t-e),i,o;return kc(a)?(o=n>0?"top":"bottom",i="center"):kc(a-bo)?(o=n>0?"bottom":"top",i="center"):(o="middle",a>0&&a<bo?i=n>0?"right":"left":i=n>0?"left":"right"),{rotation:a,textAlign:i,textVerticalAlign:o}},r.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},r.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},r}(),eO={axisLine:function(r,e,t,n){var a=e.get(["axisLine","show"]);if(a==="auto"&&r.handleAutoShown&&(a=r.handleAutoShown("axisLine")),!!a){var i=e.axis.getExtent(),o=n.transform,s=[i[0],0],l=[i[1],0],u=s[0]>l[0];o&&(sr(s,s,o),sr(l,l,o));var c=Q({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),f=new tr({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:c,strokeContainThreshold:r.strokeContainThreshold||5,silent:!0,z2:1});Ul(f.shape,f.style.lineWidth),f.anid="line",t.add(f);var h=e.get(["axisLine","symbol"]);if(h!=null){var v=e.get(["axisLine","symbolSize"]);ce(h)&&(h=[h,h]),(ce(v)||je(v))&&(v=[v,v]);var d=lu(e.get(["axisLine","symbolOffset"])||0,v),p=v[0],g=v[1];L([{rotate:r.rotation+Math.PI/2,offset:d[0],r:0},{rotate:r.rotation-Math.PI/2,offset:d[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(y,m){if(h[m]!=="none"&&h[m]!=null){var _=kt(h[m],-p/2,-g/2,p,g,c.stroke,!0),b=y.r+y.offset,w=u?l:s;_.attr({rotation:y.rotate,x:w[0]+b*Math.cos(r.rotation),y:w[1]-b*Math.sin(r.rotation),silent:!0,z2:11}),t.add(_)}})}}},axisTickLabel:function(r,e,t,n){var a=CZ(t,n,e,r),i=DZ(t,n,e,r);if(SZ(e,i,a),TZ(t,n,e,r.tickDirection),e.get(["axisLabel","hideOverlap"])){var o=EP(J(i,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));NP(o)}},axisName:function(r,e,t,n){var a=Jt(r.axisName,e.get("name"));if(!!a){var i=e.get("nameLocation"),o=r.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,u=e.axis.getExtent(),c=u[0]>u[1]?-1:1,f=[i==="start"?u[0]-c*l:i==="end"?u[1]+c*l:(u[0]+u[1])/2,rO(i)?r.labelOffset+o*l:0],h,v=e.get("nameRotate");v!=null&&(v=v*bo/180);var d;rO(i)?h=Hs.innerTextLayout(r.rotation,v!=null?v:r.rotation,o):(h=wZ(r.rotation,i,v||0,u),d=r.axisNameAvailableWidth,d!=null&&(d=Math.abs(d/Math.sin(h.rotation)),!isFinite(d)&&(d=null)));var p=s.getFont(),g=e.get("nameTruncate",!0)||{},y=g.ellipsis,m=Jt(r.nameTruncateMaxWidth,g.maxWidth,d),_=new We({x:f[0],y:f[1],rotation:h.rotation,silent:Hs.isLabelSilent(e),style:gt(s,{text:a,font:p,overflow:"truncate",width:m,ellipsis:y,fill:s.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:s.get("align")||h.textAlign,verticalAlign:s.get("verticalAlign")||h.textVerticalAlign}),z2:1});if(Yl({el:_,componentModel:e,itemName:a}),_.__fullText=a,_.anid="name",e.get("triggerEvent")){var b=Hs.makeAxisEventDataBase(e);b.targetType="axisName",b.name=a,Me(_).eventData=b}n.add(_),_.updateTransform(),t.add(_),_.decomposeTransform()}}};function wZ(r,e,t,n){var a=I0(t-r),i,o,s=n[0]>n[1],l=e==="start"&&!s||e!=="start"&&s;return kc(a-bo/2)?(o=l?"bottom":"top",i="center"):kc(a-bo*1.5)?(o=l?"top":"bottom",i="center"):(o="middle",a<bo*1.5&&a>bo/2?i=l?"left":"right":i=l?"right":"left"),{rotation:a,textAlign:i,textVerticalAlign:o}}function SZ(r,e,t){if(!hP(r.axis)){var n=r.get(["axisLabel","showMinLabel"]),a=r.get(["axisLabel","showMaxLabel"]);e=e||[],t=t||[];var i=e[0],o=e[1],s=e[e.length-1],l=e[e.length-2],u=t[0],c=t[1],f=t[t.length-1],h=t[t.length-2];n===!1?(jn(i),jn(u)):tO(i,o)&&(n?(jn(o),jn(c)):(jn(i),jn(u))),a===!1?(jn(s),jn(f)):tO(l,s)&&(a?(jn(l),jn(h)):(jn(s),jn(f)))}}function jn(r){r&&(r.ignore=!0)}function tO(r,e){var t=r&&r.getBoundingRect().clone(),n=e&&e.getBoundingRect().clone();if(!(!t||!n)){var a=mc([]);return ji(a,a,-r.rotation),t.applyTransform(Ea([],a,r.getLocalTransform())),n.applyTransform(Ea([],a,e.getLocalTransform())),t.intersect(n)}}function rO(r){return r==="middle"||r==="center"}function nO(r,e,t,n,a){for(var i=[],o=[],s=[],l=0;l<r.length;l++){var u=r[l].coord;o[0]=u,o[1]=0,s[0]=u,s[1]=t,e&&(sr(o,o,e),sr(s,s,e));var c=new tr({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:n,z2:2,autoBatch:!0,silent:!0});Ul(c.shape,c.style.lineWidth),c.anid=a+"_"+r[l].tickValue,i.push(c)}return i}function CZ(r,e,t,n){var a=t.axis,i=t.getModel("axisTick"),o=i.get("show");if(o==="auto"&&n.handleAutoShown&&(o=n.handleAutoShown("axisTick")),!(!o||a.scale.isBlank())){for(var s=i.getModel("lineStyle"),l=n.tickDirection*i.get("length"),u=a.getTicksCoords(),c=nO(u,e.transform,l,me(s.getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])}),"ticks"),f=0;f<c.length;f++)r.add(c[f]);return c}}function TZ(r,e,t,n){var a=t.axis,i=t.getModel("minorTick");if(!(!i.get("show")||a.scale.isBlank())){var o=a.getMinorTicksCoords();if(!!o.length)for(var s=i.getModel("lineStyle"),l=n*i.get("length"),u=me(s.getLineStyle(),me(t.getModel("axisTick").getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])})),c=0;c<o.length;c++)for(var f=nO(o[c],e.transform,l,u,"minorticks_"+c),h=0;h<f.length;h++)r.add(f[h])}}function DZ(r,e,t,n){var a=t.axis,i=Jt(n.axisLabelShow,t.get(["axisLabel","show"]));if(!(!i||a.scale.isBlank())){var o=t.getModel("axisLabel"),s=o.get("margin"),l=a.getViewLabels(),u=(Jt(n.labelRotate,o.get("rotate"))||0)*bo/180,c=Hs.innerTextLayout(n.rotation,u,n.labelDirection),f=t.getCategories&&t.getCategories(!0),h=[],v=Hs.isLabelSilent(t),d=t.get("triggerEvent");return L(l,function(p,g){var y=a.scale.type==="ordinal"?a.scale.getRawOrdinalNumber(p.tickValue):p.tickValue,m=p.formattedLabel,_=p.rawLabel,b=o;if(f&&f[y]){var w=f[y];_e(w)&&w.textStyle&&(b=new lt(w.textStyle,o,t.ecModel))}var x=b.getTextColor()||t.get(["axisLine","lineStyle","color"]),S=a.dataToCoord(y),T=new We({x:S,y:n.labelOffset+n.labelDirection*s,rotation:c.rotation,silent:v,z2:10+(p.level||0),style:gt(b,{text:m,align:b.getShallow("align",!0)||c.textAlign,verticalAlign:b.getShallow("verticalAlign",!0)||b.getShallow("baseline",!0)||c.textVerticalAlign,fill:ye(x)?x(a.type==="category"?_:a.type==="value"?y+"":y,g):x})});if(T.anid="label_"+y,d){var D=Hs.makeAxisEventDataBase(t);D.targetType="axisLabel",D.value=_,D.tickIndex=g,a.type==="category"&&(D.dataIndex=y),Me(T).eventData=D}e.add(T),T.updateTransform(),h.push(T),r.add(T),T.decomposeTransform()}),h}}var mi=Hs;function MZ(r,e){var t={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return AZ(t,r,e),t.seriesInvolved&&IZ(t,r),t}function AZ(r,e,t){var n=e.getComponent("tooltip"),a=e.getComponent("axisPointer"),i=a.get("link",!0)||[],o=[];L(t.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=Uf(s.model),u=r.coordSysAxesInfo[l]={};r.coordSysMap[l]=s;var c=s.model,f=c.getModel("tooltip",n);if(L(s.getAxes(),Ae(p,!1,null)),s.getTooltipAxes&&n&&f.get("show")){var h=f.get("trigger")==="axis",v=f.get(["axisPointer","type"])==="cross",d=s.getTooltipAxes(f.get(["axisPointer","axis"]));(h||v)&&L(d.baseAxes,Ae(p,v?"cross":!0,h)),v&&L(d.otherAxes,Ae(p,"cross",!1))}function p(g,y,m){var _=m.model.getModel("axisPointer",a),b=_.get("show");if(!(!b||b==="auto"&&!g&&!Db(_))){y==null&&(y=_.get("triggerTooltip")),_=g?LZ(m,f,a,e,g,y):_;var w=_.get("snap"),x=Uf(m.model),S=y||w||m.type==="category",T=r.axesInfo[x]={key:x,axis:m,coordSys:s,axisPointerModel:_,triggerTooltip:y,involveSeries:S,snap:w,useHandle:Db(_),seriesModels:[],linkGroup:null};u[x]=T,r.seriesInvolved=r.seriesInvolved||S;var D=PZ(i,m);if(D!=null){var M=o[D]||(o[D]={axesInfo:{}});M.axesInfo[x]=T,M.mapper=i[D].mapper,T.linkGroup=M}}}})}function LZ(r,e,t,n,a,i){var o=e.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};L(s,function(h){l[h]=we(o.get(h))}),l.snap=r.type!=="category"&&!!i,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),a==="cross"){var c=o.get(["label","show"]);if(u.show=c!=null?c:!0,!i){var f=l.lineStyle=o.get("crossStyle");f&&me(u,f.textStyle)}}return r.model.getModel("axisPointer",new lt(l,t,n))}function IZ(r,e){e.eachSeries(function(t){var n=t.coordinateSystem,a=t.get(["tooltip","trigger"],!0),i=t.get(["tooltip","show"],!0);!n||a==="none"||a===!1||a==="item"||i===!1||t.get(["axisPointer","show"],!0)===!1||L(r.coordSysAxesInfo[Uf(n.model)],function(o){var s=o.axis;n.getAxis(s.dim)===s&&(o.seriesModels.push(t),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=t.getData().count())})})}function PZ(r,e){for(var t=e.model,n=e.dim,a=0;a<r.length;a++){var i=r[a]||{};if(Cb(i[n+"AxisId"],t.id)||Cb(i[n+"AxisIndex"],t.componentIndex)||Cb(i[n+"AxisName"],t.name))return a}}function Cb(r,e){return r==="all"||K(r)&&Ne(r,e)>=0||r===e}function EZ(r){var e=Tb(r);if(!!e){var t=e.axisPointerModel,n=e.axis.scale,a=t.option,i=t.get("status"),o=t.get("value");o!=null&&(o=n.parse(o));var s=Db(t);i==null&&(a.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o<l[0]&&(o=l[0]),a.value=o,s&&(a.status=e.axis.scale.isBlank()?"hide":"show")}}function Tb(r){var e=(r.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[Uf(r)]}function OZ(r){var e=Tb(r);return e&&e.axisPointerModel}function Db(r){return!!r.get(["handle","show"])}function Uf(r){return r.type+"||"+r.id}var aO={},RZ=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a,i){this.axisPointerClass&&EZ(t),r.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,a,!0)},e.prototype.updateAxisPointer=function(t,n,a,i){this._doUpdateAxisPointerClass(t,a,!1)},e.prototype.remove=function(t,n){var a=this._axisPointer;a&&a.remove(n)},e.prototype.dispose=function(t,n){this._disposeAxisPointer(n),r.prototype.dispose.apply(this,arguments)},e.prototype._doUpdateAxisPointerClass=function(t,n,a){var i=e.getAxisPointerClass(this.axisPointerClass);if(!!i){var o=OZ(t);o?(this._axisPointer||(this._axisPointer=new i)).render(t,o,n,a):this._disposeAxisPointer(n)}},e.prototype._disposeAxisPointer=function(t){this._axisPointer&&this._axisPointer.dispose(t),this._axisPointer=null},e.registerAxisPointerClass=function(t,n){aO[t]=n},e.getAxisPointerClass=function(t){return t&&aO[t]},e.type="axis",e}(wt),Gs=RZ,Mb=Ye();function iO(r,e,t,n){var a=t.axis;if(!a.scale.isBlank()){var i=t.getModel("splitArea"),o=i.getModel("areaStyle"),s=o.get("color"),l=n.coordinateSystem.getRect(),u=a.getTicksCoords({tickModel:i,clamp:!0});if(!!u.length){var c=s.length,f=Mb(r).splitAreaColors,h=ge(),v=0;if(f)for(var d=0;d<u.length;d++){var p=f.get(u[d].tickValue);if(p!=null){v=(p+(c-1)*d)%c;break}}var g=a.toGlobalCoord(u[0].coord),y=o.getAreaStyle();s=K(s)?s:[s];for(var d=1;d<u.length;d++){var m=a.toGlobalCoord(u[d].coord),_=void 0,b=void 0,w=void 0,x=void 0;a.isHorizontal()?(_=g,b=l.y,w=m-_,x=l.height,g=_+w):(_=l.x,b=g,w=l.width,x=m-b,g=b+x);var S=u[d-1].tickValue;S!=null&&h.set(S,v),e.add(new Ge({anid:S!=null?"area_"+S:null,shape:{x:_,y:b,width:w,height:x},style:me({fill:s[v]},y),autoBatch:!0,silent:!0})),v=(v+1)%c}Mb(r).splitAreaColors=h}}}function oO(r){Mb(r).splitAreaColors=null}var NZ=["axisLine","axisTickLabel","axisName"],kZ=["splitArea","splitLine","minorSplitLine"],sO=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="CartesianAxisPointer",t}return e.prototype.render=function(t,n,a,i){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new Te,this.group.add(this._axisGroup),!!t.get("show")){var s=t.getCoordSysModel(),l=xb(s,t),u=new mi(t,Q({handleAutoShown:function(f){for(var h=s.coordinateSystem.getCartesians(),v=0;v<h.length;v++)if(F1(h[v].getOtherAxis(t.axis).scale))return!0;return!1}},l));L(NZ,u.add,u),this._axisGroup.add(u.getGroup()),L(kZ,function(f){t.get([f,"show"])&&BZ[f](this,this._axisGroup,t,s)},this);var c=i&&i.type==="changeAxisOrder"&&i.isInitSort;c||rf(o,this._axisGroup,t),r.prototype.render.call(this,t,n,a,i)}},e.prototype.remove=function(){oO(this)},e.type="cartesianAxis",e}(Gs),BZ={splitLine:function(r,e,t,n){var a=t.axis;if(!a.scale.isBlank()){var i=t.getModel("splitLine"),o=i.getModel("lineStyle"),s=o.get("color");s=K(s)?s:[s];for(var l=n.coordinateSystem.getRect(),u=a.isHorizontal(),c=0,f=a.getTicksCoords({tickModel:i}),h=[],v=[],d=o.getLineStyle(),p=0;p<f.length;p++){var g=a.toGlobalCoord(f[p].coord);u?(h[0]=g,h[1]=l.y,v[0]=g,v[1]=l.y+l.height):(h[0]=l.x,h[1]=g,v[0]=l.x+l.width,v[1]=g);var y=c++%s.length,m=f[p].tickValue,_=new tr({anid:m!=null?"line_"+f[p].tickValue:null,autoBatch:!0,shape:{x1:h[0],y1:h[1],x2:v[0],y2:v[1]},style:me({stroke:s[y]},d),silent:!0});Ul(_.shape,d.lineWidth),e.add(_)}}},minorSplitLine:function(r,e,t,n){var a=t.axis,i=t.getModel("minorSplitLine"),o=i.getModel("lineStyle"),s=n.coordinateSystem.getRect(),l=a.isHorizontal(),u=a.getMinorTicksCoords();if(!!u.length)for(var c=[],f=[],h=o.getLineStyle(),v=0;v<u.length;v++)for(var d=0;d<u[v].length;d++){var p=a.toGlobalCoord(u[v][d].coord);l?(c[0]=p,c[1]=s.y,f[0]=p,f[1]=s.y+s.height):(c[0]=s.x,c[1]=p,f[0]=s.x+s.width,f[1]=p);var g=new tr({anid:"minor_line_"+u[v][d].tickValue,autoBatch:!0,shape:{x1:c[0],y1:c[1],x2:f[0],y2:f[1]},style:h,silent:!0});Ul(g.shape,h.lineWidth),e.add(g)}},splitArea:function(r,e,t,n){iO(r,e,t,n)}},lO=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="xAxis",e}(sO),zZ=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=lO.type,t}return e.type="yAxis",e}(sO),FZ=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="grid",t}return e.prototype.render=function(t,n){this.group.removeAll(),t.get("show")&&this.group.add(new Ge({shape:t.coordinateSystem.getRect(),style:me({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))},e.type="grid",e}(wt),uO={offset:0};function cO(r){r.registerComponentView(FZ),r.registerComponentModel(uZ),r.registerCoordinateSystem("cartesian2d",xZ),_u(r,"x",mb,uO),_u(r,"y",mb,uO),r.registerComponentView(lO),r.registerComponentView(zZ),r.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}function VZ(r){ke(cO),r.registerSeriesModel(tZ),r.registerChartView(sZ),r.registerLayout(Hf("scatter"))}function $Z(r){r.eachSeriesByType("radar",function(e){var t=e.getData(),n=[],a=e.coordinateSystem;if(!!a){var i=a.getIndicatorAxes();L(i,function(o,s){t.each(t.mapDimension(i[s].dim),function(l,u){n[u]=n[u]||[];var c=a.dataToPoint(l,s);n[u][s]=fO(c)?c:hO(a)})}),t.each(function(o){var s=UT(n[o],function(l){return fO(l)})||hO(a);n[o].push(s.slice()),t.setItemLayout(o,n[o])})}})}function fO(r){return!isNaN(r[0])&&!isNaN(r[1])}function hO(r){return[r.cx,r.cy]}function HZ(r){var e=r.polar;if(e){K(e)||(e=[e]);var t=[];L(e,function(n,a){n.indicator?(n.type&&!n.shape&&(n.shape=n.type),r.radar=r.radar||[],K(r.radar)||(r.radar=[r.radar]),r.radar.push(n)):t.push(n)}),r.polar=t}L(r.series,function(n){n&&n.type==="radar"&&n.polarIndex&&(n.radarIndex=n.polarIndex)})}var GZ=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=t.coordinateSystem,o=this.group,s=t.getData(),l=this._data;function u(h,v){var d=h.getItemVisual(v,"symbol")||"circle";if(d!=="none"){var p=wf(h.getItemVisual(v,"symbolSize")),g=kt(d,-1,-1,2,2),y=h.getItemVisual(v,"symbolRotate")||0;return g.attr({style:{strokeNoScale:!0},z2:100,scaleX:p[0]/2,scaleY:p[1]/2,rotation:y*Math.PI/180||0}),g}}function c(h,v,d,p,g,y){d.removeAll();for(var m=0;m<v.length-1;m++){var _=u(p,g);_&&(_.__dimIdx=m,h[m]?(_.setPosition(h[m]),af[y?"initProps":"updateProps"](_,{x:v[m][0],y:v[m][1]},t,g)):_.setPosition(v[m]),d.add(_))}}function f(h){return J(h,function(v){return[i.cx,i.cy]})}s.diff(l).add(function(h){var v=s.getItemLayout(h);if(!!v){var d=new Gr,p=new Wr,g={shape:{points:v}};d.shape.points=f(v),p.shape.points=f(v),xt(d,g,t,h),xt(p,g,t,h);var y=new Te,m=new Te;y.add(p),y.add(d),y.add(m),c(p.shape.points,v,m,s,h,!0),s.setItemGraphicEl(h,y)}}).update(function(h,v){var d=l.getItemGraphicEl(v),p=d.childAt(0),g=d.childAt(1),y=d.childAt(2),m={shape:{points:s.getItemLayout(h)}};!m.shape.points||(c(p.shape.points,m.shape.points,y,s,h,!1),da(g),da(p),qe(p,m,t),qe(g,m,t),s.setItemGraphicEl(h,d))}).remove(function(h){o.remove(l.getItemGraphicEl(h))}).execute(),s.eachItemGraphicEl(function(h,v){var d=s.getItemModel(v),p=h.childAt(0),g=h.childAt(1),y=h.childAt(2),m=s.getItemVisual(v,"style"),_=m.fill;o.add(h),p.useStyle(me(d.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:_})),gr(p,d,"lineStyle"),gr(g,d,"areaStyle");var b=d.getModel("areaStyle"),w=b.isEmpty()&&b.parentModel.isEmpty();g.ignore=w,L(["emphasis","select","blur"],function(T){var D=d.getModel([T,"areaStyle"]),M=D.isEmpty()&&D.parentModel.isEmpty();g.ensureState(T).ignore=M&&w}),g.useStyle(me(b.getAreaStyle(),{fill:_,opacity:.7,decal:m.decal}));var x=d.getModel("emphasis"),S=x.getModel("itemStyle").getItemStyle();y.eachChild(function(T){if(T instanceof ur){var D=T.style;T.useStyle(Q({image:D.image,x:D.x,y:D.y,width:D.width,height:D.height},m))}else T.useStyle(m),T.setColor(_),T.style.strokeNoScale=!0;var M=T.ensureState("emphasis");M.style=we(S);var A=s.getStore().get(s.getDimensionIndex(T.__dimIdx),v);(A==null||isNaN(A))&&(A=""),yr(T,rr(d),{labelFetcher:s.hostModel,labelDataIndex:v,labelDimIndex:T.__dimIdx,defaultText:A,inheritColor:_,defaultOpacity:m.opacity})}),Lt(h,x.get("focus"),x.get("blurScope"),x.get("disabled"))}),this._data=s},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.type="radar",e}(ut),WZ=GZ,UZ=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Wf(fe(this.getData,this),fe(this.getRawData,this))},e.prototype.getInitialData=function(t,n){return mu(this,{generateCoord:"indicator_",generateCoordCount:1/0})},e.prototype.formatTooltip=function(t,n,a){var i=this.getData(),o=this.coordinateSystem,s=o.getIndicatorAxes(),l=this.getData().getName(t),u=l===""?this.name:l,c=bL(this,t);return nr("section",{header:u,sortBlocks:!0,blocks:J(s,function(f){var h=i.get(i.mapDimension(f.dim),t);return nr("nameValue",{markerType:"subItem",markerColor:c,name:f.name,value:h,sortParam:h})})})},e.prototype.getTooltipPosition=function(t){if(t!=null){for(var n=this.getData(),a=this.coordinateSystem,i=n.getValues(J(a.dimensions,function(u){return n.mapDimension(u)}),t),o=0,s=i.length;o<s;o++)if(!isNaN(i[o])){var l=a.getIndicatorAxes();return a.coordToPoint(l[o].dataToCoord(i[o]),o)}}},e.type="series.radar",e.dependencies=["radar"],e.defaultOption={z:2,colorBy:"data",coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid",join:"round"},label:{position:"top"},symbolSize:8},e}(yt),jZ=UZ,jf=jE.value;function Fp(r,e){return me({show:e},r)}var YZ=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){var t=this.get("boundaryGap"),n=this.get("splitNumber"),a=this.get("scale"),i=this.get("axisLine"),o=this.get("axisTick"),s=this.get("axisLabel"),l=this.get("axisName"),u=this.get(["axisName","show"]),c=this.get(["axisName","formatter"]),f=this.get("axisNameGap"),h=this.get("triggerEvent"),v=J(this.get("indicator")||[],function(d){d.max!=null&&d.max>0&&!d.min?d.min=0:d.min!=null&&d.min<0&&!d.max&&(d.max=0);var p=l;d.color!=null&&(p=me({color:d.color},l));var g=Pe(we(d),{boundaryGap:t,splitNumber:n,scale:a,axisLine:i,axisTick:o,axisLabel:s,name:d.text,showName:u,nameLocation:"end",nameGap:f,nameTextStyle:p,triggerEvent:h},!1);if(ce(c)){var y=g.name;g.name=c.replace("{value}",y!=null?y:"")}else ye(c)&&(g.name=c(g.name,g));var m=new lt(g,null,this.ecModel);return Et(m,du.prototype),m.mainType="radar",m.componentIndex=this.componentIndex,m},this);this._indicatorModels=v},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:Pe({lineStyle:{color:"#bbb"}},jf.axisLine),axisLabel:Fp(jf.axisLabel,!1),axisTick:Fp(jf.axisTick,!1),splitLine:Fp(jf.splitLine,!0),splitArea:Fp(jf.splitArea,!0),indicator:[]},e}($e),qZ=YZ,ZZ=["axisLine","axisTickLabel","axisName"],XZ=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=this.group;i.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var n=t.coordinateSystem,a=n.getIndicatorAxes(),i=J(a,function(o){var s=o.model.get("showName")?o.name:"",l=new mi(o.model,{axisName:s,position:[n.cx,n.cy],rotation:o.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return l});L(i,function(o){L(ZZ,o.add,o),this.group.add(o.getGroup())},this)},e.prototype._buildSplitLineAndArea=function(t){var n=t.coordinateSystem,a=n.getIndicatorAxes();if(!a.length)return;var i=t.get("shape"),o=t.getModel("splitLine"),s=t.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),c=o.get("show"),f=s.get("show"),h=l.get("color"),v=u.get("color"),d=K(h)?h:[h],p=K(v)?v:[v],g=[],y=[];function m(O,N,V){var $=V%N.length;return O[$]=O[$]||[],$}if(i==="circle")for(var _=a[0].getTicksCoords(),b=n.cx,w=n.cy,x=0;x<_.length;x++){if(c){var S=m(g,d,x);g[S].push(new ha({shape:{cx:b,cy:w,r:_[x].coord}}))}if(f&&x<_.length-1){var S=m(y,p,x);y[S].push(new Kc({shape:{cx:b,cy:w,r0:_[x].coord,r:_[x+1].coord}}))}}else for(var T,D=J(a,function(O,N){var V=O.getTicksCoords();return T=T==null?V.length-1:Math.min(V.length-1,T),J(V,function($){return n.coordToPoint($.coord,N)})}),M=[],x=0;x<=T;x++){for(var A=[],I=0;I<a.length;I++)A.push(D[I][x]);if(A[0]&&A.push(A[0].slice()),c){var S=m(g,d,x);g[S].push(new Wr({shape:{points:A}}))}if(f&&M){var S=m(y,p,x-1);y[S].push(new Gr({shape:{points:A.concat(M)}}))}M=A.slice().reverse()}var P=l.getLineStyle(),E=u.getAreaStyle();L(y,function(O,N){this.group.add(xn(O,{style:me({stroke:"none",fill:p[N%p.length]},E),silent:!0}))},this),L(g,function(O,N){this.group.add(xn(O,{style:me({fill:"none",stroke:d[N%d.length]},P),silent:!0}))},this)},e.type="radar",e}(wt),QZ=XZ,KZ=function(r){j(e,r);function e(t,n,a){var i=r.call(this,t,n,a)||this;return i.type="value",i.angle=0,i.name="",i}return e}(Un),JZ=KZ,eX=function(){function r(e,t,n){this.dimensions=[],this._model=e,this._indicatorAxes=J(e.getIndicatorModels(),function(a,i){var o="indicator_"+i,s=new JZ(o,new go);return s.name=a.get("name"),s.model=a,a.axis=s,this.dimensions.push(o),s},this),this.resize(e,n)}return r.prototype.getIndicatorAxes=function(){return this._indicatorAxes},r.prototype.dataToPoint=function(e,t){var n=this._indicatorAxes[t];return this.coordToPoint(n.dataToCoord(e),t)},r.prototype.coordToPoint=function(e,t){var n=this._indicatorAxes[t],a=n.angle,i=this.cx+e*Math.cos(a),o=this.cy-e*Math.sin(a);return[i,o]},r.prototype.pointToData=function(e){var t=e[0]-this.cx,n=e[1]-this.cy,a=Math.sqrt(t*t+n*n);t/=a,n/=a;for(var i=Math.atan2(-n,t),o=1/0,s,l=-1,u=0;u<this._indicatorAxes.length;u++){var c=this._indicatorAxes[u],f=Math.abs(i-c.angle);f<o&&(s=c,l=u,o=f)}return[l,+(s&&s.coordToData(a))]},r.prototype.resize=function(e,t){var n=e.get("center"),a=t.getWidth(),i=t.getHeight(),o=Math.min(a,i)/2;this.cx=le(n[0],a),this.cy=le(n[1],i),this.startAngle=e.get("startAngle")*Math.PI/180;var s=e.get("radius");(ce(s)||je(s))&&(s=[0,s]),this.r0=le(s[0],o),this.r=le(s[1],o),L(this._indicatorAxes,function(l,u){l.setExtent(this.r0,this.r);var c=this.startAngle+u*Math.PI*2/this._indicatorAxes.length;c=Math.atan2(Math.sin(c),Math.cos(c)),l.angle=c},this)},r.prototype.update=function(e,t){var n=this._indicatorAxes,a=this._model;L(n,function(s){s.scale.setExtent(1/0,-1/0)}),e.eachSeriesByType("radar",function(s,l){if(!(s.get("coordinateSystem")!=="radar"||e.getComponent("radar",s.get("radarIndex"))!==a)){var u=s.getData();L(n,function(c){c.scale.unionExtentFromData(u,u.mapDimension(c.dim))})}},this);var i=a.get("splitNumber"),o=new go;o.setExtent(0,i),o.setInterval(1),L(n,function(s,l){QE(s.scale,s.model,o)})},r.prototype.convertToPixel=function(e,t,n){return console.warn("Not implemented."),null},r.prototype.convertFromPixel=function(e,t,n){return console.warn("Not implemented."),null},r.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},r.create=function(e,t){var n=[];return e.eachComponent("radar",function(a){var i=new r(a,e,t);n.push(i),a.coordinateSystem=i}),e.eachSeriesByType("radar",function(a){a.get("coordinateSystem")==="radar"&&(a.coordinateSystem=n[a.get("radarIndex")||0])}),n},r.dimensions=[],r}(),tX=eX;function rX(r){r.registerCoordinateSystem("radar",tX),r.registerComponentModel(qZ),r.registerComponentView(QZ),r.registerVisual({seriesType:"radar",reset:function(e){var t=e.getData();t.each(function(n){t.setItemVisual(n,"legendIcon","roundRect")}),t.setVisual("legendIcon","roundRect")}})}function nX(r){ke(rX),r.registerChartView(WZ),r.registerSeriesModel(jZ),r.registerLayout($Z),r.registerProcessor(Gf("radar")),r.registerPreprocessor(HZ)}var vO="\0_ec_interaction_mutex";function aX(r,e,t){var n=Ab(r);n[e]=t}function iX(r,e,t){var n=Ab(r),a=n[e];a===t&&(n[e]=null)}function dO(r,e){return!!Ab(r)[e]}function Ab(r){return r[vO]||(r[vO]={})}ma({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},Ot);var oX=function(r){j(e,r);function e(t){var n=r.call(this)||this;n._zr=t;var a=fe(n._mousedownHandler,n),i=fe(n._mousemoveHandler,n),o=fe(n._mouseupHandler,n),s=fe(n._mousewheelHandler,n),l=fe(n._pinchHandler,n);return n.enable=function(u,c){this.disable(),this._opt=me(we(c)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),u==null&&(u=!0),(u===!0||u==="move"||u==="pan")&&(t.on("mousedown",a),t.on("mousemove",i),t.on("mouseup",o)),(u===!0||u==="scale"||u==="zoom")&&(t.on("mousewheel",s),t.on("pinch",l))},n.disable=function(){t.off("mousedown",a),t.off("mousemove",i),t.off("mouseup",o),t.off("mousewheel",s),t.off("pinch",l)},n}return e.prototype.isDragging=function(){return this._dragging},e.prototype.isPinching=function(){return this._pinching},e.prototype.setPointerChecker=function(t){this.pointerChecker=t},e.prototype.dispose=function(){this.disable()},e.prototype._mousedownHandler=function(t){if(!n2(t)){for(var n=t.target;n;){if(n.draggable)return;n=n.__hostTarget||n.parent}var a=t.offsetX,i=t.offsetY;this.pointerChecker&&this.pointerChecker(t,a,i)&&(this._x=a,this._y=i,this._dragging=!0)}},e.prototype._mousemoveHandler=function(t){if(!(!this._dragging||!Vp("moveOnMouseMove",t,this._opt)||t.gestureEvent==="pinch"||dO(this._zr,"globalPan"))){var n=t.offsetX,a=t.offsetY,i=this._x,o=this._y,s=n-i,l=a-o;this._x=n,this._y=a,this._opt.preventDefaultMouseMove&&oi(t.event),pO(this,"pan","moveOnMouseMove",t,{dx:s,dy:l,oldX:i,oldY:o,newX:n,newY:a,isAvailableBehavior:null})}},e.prototype._mouseupHandler=function(t){n2(t)||(this._dragging=!1)},e.prototype._mousewheelHandler=function(t){var n=Vp("zoomOnMouseWheel",t,this._opt),a=Vp("moveOnMouseWheel",t,this._opt),i=t.wheelDelta,o=Math.abs(i),s=t.offsetX,l=t.offsetY;if(!(i===0||!n&&!a)){if(n){var u=o>3?1.4:o>1?1.2:1.1,c=i>0?u:1/u;Lb(this,"zoom","zoomOnMouseWheel",t,{scale:c,originX:s,originY:l,isAvailableBehavior:null})}if(a){var f=Math.abs(i),h=(i>0?1:-1)*(f>3?.4:f>1?.15:.05);Lb(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:h,originX:s,originY:l,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){if(!dO(this._zr,"globalPan")){var n=t.pinchScale>1?1.1:1/1.1;Lb(this,"zoom",null,t,{scale:n,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})}},e}(On);function Lb(r,e,t,n,a){r.pointerChecker&&r.pointerChecker(n,a.originX,a.originY)&&(oi(n.event),pO(r,e,t,n,a))}function pO(r,e,t,n,a){a.isAvailableBehavior=fe(Vp,null,t,n),r.trigger(e,a)}function Vp(r,e,t){var n=t[r];return!r||n&&(!ce(n)||e.event[n+"Key"])}var Yf=oX;function Ib(r,e,t){var n=r.target;n.x+=e,n.y+=t,n.dirty()}function Pb(r,e,t,n){var a=r.target,i=r.zoomLimit,o=r.zoom=r.zoom||1;if(o*=e,i){var s=i.min||0,l=i.max||1/0;o=Math.max(Math.min(l,o),s)}var u=o/r.zoom;r.zoom=o,a.x-=(t-a.x)*(u-1),a.y-=(n-a.y)*(u-1),a.scaleX*=u,a.scaleY*=u,a.dirty()}var sX={axisPointer:1,tooltip:1,brush:1};function $p(r,e,t){var n=e.getComponentByElement(r.topTarget),a=n&&n.coordinateSystem;return n&&n!==t&&!sX.hasOwnProperty(n.mainType)&&a&&a.model!==t}function gO(r){if(ce(r)){var e=new DOMParser;r=e.parseFromString(r,"text/xml")}var t=r;for(t.nodeType===9&&(t=t.firstChild);t.nodeName.toLowerCase()!=="svg"||t.nodeType!==1;)t=t.nextSibling;return t}var Eb,Hp={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},yO=Fe(Hp),Gp={"alignment-baseline":"textBaseline","stop-color":"stopColor"},mO=Fe(Gp),lX=function(){function r(){this._defs={},this._root=null}return r.prototype.parse=function(e,t){t=t||{};var n=gO(e);this._defsUsePending=[];var a=new Te;this._root=a;var i=[],o=n.getAttribute("viewBox")||"",s=parseFloat(n.getAttribute("width")||t.width),l=parseFloat(n.getAttribute("height")||t.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),Sn(n,a,null,!0,!1);for(var u=n.firstChild;u;)this._parseNode(u,a,i,null,!1,!1),u=u.nextSibling;fX(this._defs,this._defsUsePending),this._defsUsePending=[];var c,f;if(o){var h=Wp(o);h.length>=4&&(c={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(c&&s!=null&&l!=null&&(f=DO(c,{x:0,y:0,width:s,height:l}),!t.ignoreViewBox)){var v=a;a=new Te,a.add(v),v.scaleX=v.scaleY=f.scale,v.x=f.x,v.y=f.y}return!t.ignoreRootClip&&s!=null&&l!=null&&a.setClipPath(new Ge({shape:{x:0,y:0,width:s,height:l}})),{root:a,width:s,height:l,viewBoxRect:c,viewBoxTransform:f,named:i}},r.prototype._parseNode=function(e,t,n,a,i,o){var s=e.nodeName.toLowerCase(),l,u=a;if(s==="defs"&&(i=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=t;else{if(!i){var c=Eb[s];if(c&&he(Eb,s)){l=c.call(this,e,t);var f=e.getAttribute("name");if(f){var h={name:f,namedFrom:null,svgNodeTagLower:s,el:l};n.push(h),s==="g"&&(u=h)}else a&&n.push({name:a.name,namedFrom:a,svgNodeTagLower:s,el:l});t.add(l)}}var v=_O[s];if(v&&he(_O,s)){var d=v.call(this,e),p=e.getAttribute("id");p&&(this._defs[p]=d)}}if(l&&l.isGroup)for(var g=e.firstChild;g;)g.nodeType===1?this._parseNode(g,l,n,u,i,o):g.nodeType===3&&o&&this._parseText(g,l),g=g.nextSibling},r.prototype._parseText=function(e,t){var n=new Gc({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});Yn(t,n),Sn(e,n,this._defsUsePending,!1,!1),uX(n,t);var a=n.style,i=a.fontSize;i&&i<9&&(a.fontSize=9,n.scaleX*=i/9,n.scaleY*=i/9);var o=(a.fontSize||a.fontFamily)&&[a.fontStyle,a.fontWeight,(a.fontSize||12)+"px",a.fontFamily||"sans-serif"].join(" ");a.font=o;var s=n.getBoundingRect();return this._textX+=s.width,t.add(n),n},r.internalField=function(){Eb={g:function(e,t){var n=new Te;return Yn(t,n),Sn(e,n,this._defsUsePending,!1,!1),n},rect:function(e,t){var n=new Ge;return Yn(t,n),Sn(e,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(e,t){var n=new ha;return Yn(t,n),Sn(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),n.silent=!0,n},line:function(e,t){var n=new tr;return Yn(t,n),Sn(e,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(e,t){var n=new _d;return Yn(t,n),Sn(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(e,t){var n=e.getAttribute("points"),a;n&&(a=wO(n));var i=new Gr({shape:{points:a||[]},silent:!0});return Yn(t,i),Sn(e,i,this._defsUsePending,!1,!1),i},polyline:function(e,t){var n=e.getAttribute("points"),a;n&&(a=wO(n));var i=new Wr({shape:{points:a||[]},silent:!0});return Yn(t,i),Sn(e,i,this._defsUsePending,!1,!1),i},image:function(e,t){var n=new ur;return Yn(t,n),Sn(e,n,this._defsUsePending,!1,!1),n.setStyle({image:e.getAttribute("xlink:href")||e.getAttribute("href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),n.silent=!0,n},text:function(e,t){var n=e.getAttribute("x")||"0",a=e.getAttribute("y")||"0",i=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(i),this._textY=parseFloat(a)+parseFloat(o);var s=new Te;return Yn(t,s),Sn(e,s,this._defsUsePending,!1,!0),s},tspan:function(e,t){var n=e.getAttribute("x"),a=e.getAttribute("y");n!=null&&(this._textX=parseFloat(n)),a!=null&&(this._textY=parseFloat(a));var i=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",s=new Te;return Yn(t,s),Sn(e,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(i),this._textY+=parseFloat(o),s},path:function(e,t){var n=e.getAttribute("d")||"",a=wM(n);return Yn(t,a),Sn(e,a,this._defsUsePending,!1,!1),a.silent=!0,a}}}(),r}(),_O={lineargradient:function(r){var e=parseInt(r.getAttribute("x1")||"0",10),t=parseInt(r.getAttribute("y1")||"0",10),n=parseInt(r.getAttribute("x2")||"10",10),a=parseInt(r.getAttribute("y2")||"0",10),i=new Hl(e,t,n,a);return bO(r,i),xO(r,i),i},radialgradient:function(r){var e=parseInt(r.getAttribute("cx")||"0",10),t=parseInt(r.getAttribute("cy")||"0",10),n=parseInt(r.getAttribute("r")||"0",10),a=new p_(e,t,n);return bO(r,a),xO(r,a),a}};function bO(r,e){var t=r.getAttribute("gradientUnits");t==="userSpaceOnUse"&&(e.global=!0)}function xO(r,e){for(var t=r.firstChild;t;){if(t.nodeType===1&&t.nodeName.toLocaleLowerCase()==="stop"){var n=t.getAttribute("offset"),a=void 0;n&&n.indexOf("%")>0?a=parseInt(n,10)/100:n?a=parseFloat(n):a=0;var i={};TO(t,i,i);var o=i.stopColor||t.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:a,color:o})}t=t.nextSibling}}function Yn(r,e){r&&r.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),me(e.__inheritedStyle,r.__inheritedStyle))}function wO(r){for(var e=Wp(r),t=[],n=0;n<e.length;n+=2){var a=parseFloat(e[n]),i=parseFloat(e[n+1]);t.push([a,i])}return t}function Sn(r,e,t,n,a){var i=e,o=i.__inheritedStyle=i.__inheritedStyle||{},s={};r.nodeType===1&&(dX(r,e),TO(r,o,s),n||pX(r,o,s)),i.style=i.style||{},o.fill!=null&&(i.style.fill=SO(i,"fill",o.fill,t)),o.stroke!=null&&(i.style.stroke=SO(i,"stroke",o.stroke,t)),L(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(l){o[l]!=null&&(i.style[l]=parseFloat(o[l]))}),L(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign"],function(l){o[l]!=null&&(i.style[l]=o[l])}),a&&(i.__selfStyle=s),o.lineDash&&(i.style.lineDash=J(Wp(o.lineDash),function(l){return parseFloat(l)})),(o.visibility==="hidden"||o.visibility==="collapse")&&(i.invisible=!0),o.display==="none"&&(i.ignore=!0)}function uX(r,e){var t=e.__selfStyle;if(t){var n=t.textBaseline,a=n;!n||n==="auto"||n==="baseline"?a="alphabetic":n==="before-edge"||n==="text-before-edge"?a="top":n==="after-edge"||n==="text-after-edge"?a="bottom":(n==="central"||n==="mathematical")&&(a="middle"),r.style.textBaseline=a}var i=e.__inheritedStyle;if(i){var o=i.textAlign,s=o;o&&(o==="middle"&&(s="center"),r.style.textAlign=s)}}var cX=/^url\(\s*#(.*?)\)/;function SO(r,e,t,n){var a=t&&t.match(cX);if(a){var i=En(a[1]);n.push([r,e,i]);return}return t==="none"&&(t=null),t}function fX(r,e){for(var t=0;t<e.length;t++){var n=e[t];n[0].style[n[1]]=r[n[2]]}}var hX=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Wp(r){return r.match(hX)||[]}var vX=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,Ob=Math.PI/180;function dX(r,e){var t=r.getAttribute("transform");if(t){t=t.replace(/,/g," ");var n=[],a=null;t.replace(vX,function(f,h,v){return n.push(h,v),""});for(var i=n.length-1;i>0;i-=2){var o=n[i],s=n[i-1],l=Wp(o);switch(a=a||gn(),s){case"translate":oa(a,a,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":Ev(a,a,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":ji(a,a,-parseFloat(l[0])*Ob);break;case"skewX":var u=Math.tan(parseFloat(l[0])*Ob);Ea(a,[1,0,u,1,0,0],a);break;case"skewY":var c=Math.tan(parseFloat(l[0])*Ob);Ea(a,[1,c,0,1,0,0],a);break;case"matrix":a[0]=parseFloat(l[0]),a[1]=parseFloat(l[1]),a[2]=parseFloat(l[2]),a[3]=parseFloat(l[3]),a[4]=parseFloat(l[4]),a[5]=parseFloat(l[5]);break}}e.setLocalTransform(a)}}var CO=/([^\s:;]+)\s*:\s*([^:;]+)/g;function TO(r,e,t){var n=r.getAttribute("style");if(!!n){CO.lastIndex=0;for(var a;(a=CO.exec(n))!=null;){var i=a[1],o=he(Hp,i)?Hp[i]:null;o&&(e[o]=a[2]);var s=he(Gp,i)?Gp[i]:null;s&&(t[s]=a[2])}}}function pX(r,e,t){for(var n=0;n<yO.length;n++){var a=yO[n],i=r.getAttribute(a);i!=null&&(e[Hp[a]]=i)}for(var n=0;n<mO.length;n++){var a=mO[n],i=r.getAttribute(a);i!=null&&(t[Gp[a]]=i)}}function DO(r,e){var t=e.width/r.width,n=e.height/r.height,a=Math.min(t,n);return{scale:a,x:-(r.x+r.width/2)*a+(e.x+e.width/2),y:-(r.y+r.height/2)*a+(e.y+e.height/2)}}function gX(r,e){var t=new lX;return t.parse(r,e)}var yX=ge(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),mX=function(){function r(e,t){this.type="geoSVG",this._usedGraphicMap=ge(),this._freedGraphics=[],this._mapName=e,this._parsedXML=gO(t)}return r.prototype.load=function(){var e=this._firstGraphic;if(!e){e=this._firstGraphic=this._buildGraphic(this._parsedXML),this._freedGraphics.push(e),this._boundingRect=this._firstGraphic.boundingRect.clone();var t=bX(e.named),n=t.regions,a=t.regionsMap;this._regions=n,this._regionsMap=a}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},r.prototype._buildGraphic=function(e){var t,n;try{t=e&&gX(e,{ignoreViewBox:!0,ignoreRootClip:!0})||{},n=t.root,Dr(n!=null)}catch(g){throw new Error(`Invalid svg format
221
221
  `+g.message)}var a=new Te;a.add(n),a.isGeoSVGGraphicRoot=!0;var i=t.width,o=t.height,s=t.viewBoxRect,l=this._boundingRect;if(!l){var u=void 0,c=void 0,f=void 0,h=void 0;if(i!=null?(u=0,f=i):s&&(u=s.x,f=s.width),o!=null?(c=0,h=o):s&&(c=s.y,h=s.height),u==null||c==null){var v=n.getBoundingRect();u==null&&(u=v.x,f=v.width),c==null&&(c=v.y,h=v.height)}l=this._boundingRect=new Re(u,c,f,h)}if(s){var d=DO(s,l);n.scaleX=n.scaleY=d.scale,n.x=d.x,n.y=d.y}a.setClipPath(new Ge({shape:l.plain()}));var p=[];return L(t.named,function(g){yX.get(g.svgNodeTagLower)!=null&&(p.push(g),_X(g.el))}),{root:a,boundingRect:l,named:p}},r.prototype.useGraphic=function(e){var t=this._usedGraphicMap,n=t.get(e);return n||(n=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),t.set(e,n),n)},r.prototype.freeGraphic=function(e){var t=this._usedGraphicMap,n=t.get(e);n&&(t.removeKey(e),this._freedGraphics.push(n))},r}();function _X(r){r.silent=!1,r.isGroup&&r.traverse(function(e){e.silent=!1})}function bX(r){var e=[],t=ge();return L(r,function(n){if(n.namedFrom==null){var a=new Pj(n.name,n.el);e.push(a),t.set(n.name,a)}}),{regions:e,regionsMap:t}}for(var Rb=[126,25],MO="\u5357\u6D77\u8BF8\u5C9B",Ws=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],Us=0;Us<Ws.length;Us++)for(var bu=0;bu<Ws[Us].length;bu++)Ws[Us][bu][0]/=10.5,Ws[Us][bu][1]/=-10.5/.75,Ws[Us][bu][0]+=Rb[0],Ws[Us][bu][1]+=Rb[1];function xX(r,e){if(r==="china"){for(var t=0;t<e.length;t++)if(e[t].name===MO)return;e.push(new mP(MO,J(Ws,function(n){return{type:"polygon",exterior:n}}),Rb))}}var wX={\u5357\u6D77\u8BF8\u5C9B:[32,80],\u5E7F\u4E1C:[0,-10],\u9999\u6E2F:[10,5],\u6FB3\u95E8:[-10,10],\u5929\u6D25:[5,5]};function SX(r,e){if(r==="china"){var t=wX[e.name];if(t){var n=e.getCenter();n[0]+=t[0]/10.5,n[1]+=-t[1]/(10.5/.75),e.setCenter(n)}}}var CX=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];function TX(r,e){r==="china"&&e.name==="\u53F0\u6E7E"&&e.geometries.push({type:"polygon",exterior:CX[0]})}var DX="name",MX=function(){function r(e,t,n){this.type="geoJSON",this._parsedMap=ge(),this._mapName=e,this._specialAreas=n,this._geoJSON=LX(t)}return r.prototype.load=function(e,t){t=t||DX;var n=this._parsedMap.get(t);if(!n){var a=this._parseToRegions(t);n=this._parsedMap.set(t,{regions:a,boundingRect:AX(a)})}var i=ge(),o=[];return L(n.regions,function(s){var l=s.name;e&&he(e,l)&&(s=s.cloneShallow(l=e[l])),o.push(s),i.set(l,s)}),{regions:o,boundingRect:n.boundingRect||new Re(0,0,0,0),regionsMap:i}},r.prototype._parseToRegions=function(e){var t=this._mapName,n=this._geoJSON,a;try{a=n?X1(n,e):[]}catch(i){throw new Error(`Invalid geoJson format
222
- `+i.message)}return xX(t,a),L(a,function(i){var o=i.name;SX(t,i),TX(t,i);var s=this._specialAreas&&this._specialAreas[o];s&&i.transformTo(s.left,s.top,s.width,s.height)},this),a},r.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},r}();function AX(r){for(var e,t=0;t<r.length;t++){var n=r[t].getBoundingRect();e=e||n.clone(),e.union(n)}return e}function LX(r){return ce(r)?typeof JSON!="undefined"&&JSON.parse?JSON.parse(r):new Function("return ("+r+");")():r}var qf=ge(),_i={registerMap:function(r,e,t){if(e.svg){var n=new mX(r,e.svg);qf.set(r,n)}else{var a=e.geoJson||e.geoJSON;a&&!e.features?t=e.specialAreas:a=e;var n=new MX(r,a,t);qf.set(r,n)}},getGeoResource:function(r){return qf.get(r)},getMapForUser:function(r){var e=qf.get(r);return e&&e.type==="geoJSON"&&e.getMapForUser()},load:function(r,e,t){var n=qf.get(r);if(!!n)return n.load(e,t)}},Nb=["rect","circle","line","ellipse","polygon","polyline","path"],IX=ge(Nb),PX=ge(Nb.concat(["g"])),EX=ge(Nb.concat(["g"])),AO=Ye();function Up(r){var e=r.getItemStyle(),t=r.get("areaColor");return t!=null&&(e.fill=t),e}function LO(r){var e=r.style;e&&(e.stroke=e.stroke||e.fill,e.fill=null)}var OX=function(){function r(e){var t=new Te;this.uid=Zl("ec_map_draw"),this._controller=new Yf(e.getZr()),this._controllerHost={target:t},this.group=t,t.add(this._regionsGroup=new Te),t.add(this._svgGroup=new Te)}return r.prototype.draw=function(e,t,n,a,i){var o=e.mainType==="geo",s=e.getData&&e.getData();o&&t.eachComponent({mainType:"series",subType:"map"},function(y){!s&&y.getHostGeoModel()===e&&(s=y.getData())});var l=e.coordinateSystem,u=this._regionsGroup,c=this.group,f=l.getTransformInfo(),h=f.raw,v=f.roam,d=!u.childAt(0)||i;d?(c.x=v.x,c.y=v.y,c.scaleX=v.scaleX,c.scaleY=v.scaleY,c.dirty()):qe(c,v,e);var p=s&&s.getVisual("visualMeta")&&s.getVisual("visualMeta").length>0,g={api:n,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:p,isGeo:o,transformInfoRaw:h};l.resourceType==="geoJSON"?this._buildGeoJSON(g):l.resourceType==="geoSVG"&&this._buildSVG(g),this._updateController(e,t,n),this._updateMapSelectHandler(e,u,n,a)},r.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=ge(),n=ge(),a=this._regionsGroup,i=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function c(v,d){return d&&(v=d(v)),v&&[v[0]*i.scaleX+i.x,v[1]*i.scaleY+i.y]}function f(v){for(var d=[],p=!u&&l&&l.project,g=0;g<v.length;++g){var y=c(v[g],p);y&&d.push(y)}return d}function h(v){return{shape:{points:f(v)}}}a.removeAll(),L(e.geo.regions,function(v){var d=v.name,p=t.get(d),g=n.get(d)||{},y=g.dataIdx,m=g.regionModel;p||(p=t.set(d,new Te),a.add(p),y=s?s.indexOfName(d):null,m=e.isGeo?o.getRegionModel(d):s?s.getItemModel(y):null,n.set(d,{dataIdx:y,regionModel:m}));var _=[],b=[];L(v.geometries,function(S){if(S.type==="polygon"){var T=[S.exterior].concat(S.interiors||[]);u&&(T=NO(T,u)),L(T,function(M){_.push(new Gr(h(M)))})}else{var D=S.points;u&&(D=NO(D,u,!0)),L(D,function(M){b.push(new Wr(h(M)))})}});var w=c(v.getCenter(),l&&l.project);function x(S,T){if(!!S.length){var D=new wd({culling:!0,segmentIgnoreThreshold:1,shape:{paths:S}});p.add(D),IO(e,D,y,m),PO(e,D,d,m,o,y,w),T&&(LO(D),L(D.states,LO))}}x(_),x(b,!0)}),t.each(function(v,d){var p=n.get(d),g=p.dataIdx,y=p.regionModel;EO(e,v,d,y,o,g),OO(e,v,d,y,o),RO(e,v,d,y,o)},this)},r.prototype._buildSVG=function(e){var t=e.geo.map,n=e.transformInfoRaw;this._svgGroup.x=n.x,this._svgGroup.y=n.y,this._svgGroup.scaleX=n.scaleX,this._svgGroup.scaleY=n.scaleY,this._svgResourceChanged(t)&&(this._freeSVG(),this._useSVG(t));var a=this._svgDispatcherMap=ge(),i=!1;L(this._svgGraphicRecord.named,function(o){var s=o.name,l=e.mapOrGeoModel,u=e.data,c=o.svgNodeTagLower,f=o.el,h=u?u.indexOfName(s):null,v=l.getRegionModel(s);if(IX.get(c)!=null&&f instanceof Bn&&IO(e,f,h,v),f instanceof Bn&&(f.culling=!0),f.z2EmphasisLift=0,!o.namedFrom&&(EX.get(c)!=null&&PO(e,f,s,v,l,h,null),EO(e,f,s,v,l,h),OO(e,f,s,v,l),PX.get(c)!=null)){var d=RO(e,f,s,v,l);d==="self"&&(i=!0);var p=a.get(s)||a.set(s,[]);p.push(f)}},this),this._enableBlurEntireSVG(i,e)},r.prototype._enableBlurEntireSVG=function(e,t){if(e&&t.isGeo){var n=t.mapOrGeoModel.getModel(["blur","itemStyle"]).getItemStyle(),a=n.opacity;this._svgGraphicRecord.root.traverse(function(i){if(!i.isGroup){ps(i);var o=i.ensureState("blur").style||{};o.opacity==null&&a!=null&&(o.opacity=a),i.ensureState("emphasis")}})}},r.prototype.remove=function(){this._regionsGroup.removeAll(),this._regionsGroupByName=null,this._svgGroup.removeAll(),this._freeSVG(),this._controller.dispose(),this._controllerHost=null},r.prototype.findHighDownDispatchers=function(e,t){if(e==null)return[];var n=t.coordinateSystem;if(n.resourceType==="geoJSON"){var a=this._regionsGroupByName;if(a){var i=a.get(e);return i?[i]:[]}}else if(n.resourceType==="geoSVG")return this._svgDispatcherMap&&this._svgDispatcherMap.get(e)||[]},r.prototype._svgResourceChanged=function(e){return this._svgMapName!==e},r.prototype._useSVG=function(e){var t=_i.getGeoResource(e);if(t&&t.type==="geoSVG"){var n=t.useGraphic(this.uid);this._svgGroup.add(n.root),this._svgGraphicRecord=n,this._svgMapName=e}},r.prototype._freeSVG=function(){var e=this._svgMapName;if(e!=null){var t=_i.getGeoResource(e);t&&t.type==="geoSVG"&&t.freeGraphic(this.uid),this._svgGraphicRecord=null,this._svgDispatcherMap=null,this._svgGroup.removeAll(),this._svgMapName=null}},r.prototype._updateController=function(e,t,n){var a=e.coordinateSystem,i=this._controller,o=this._controllerHost;o.zoomLimit=e.get("scaleLimit"),o.zoom=a.getZoom(),i.enable(e.get("roam")||!1);var s=e.mainType;function l(){var u={type:"geoRoam",componentType:s};return u[s+"Id"]=e.id,u}i.off("pan").on("pan",function(u){this._mouseDownFlag=!1,Ib(o,u.dx,u.dy),n.dispatchAction(Q(l(),{dx:u.dx,dy:u.dy,animation:{duration:0}}))},this),i.off("zoom").on("zoom",function(u){this._mouseDownFlag=!1,Pb(o,u.scale,u.originX,u.originY),n.dispatchAction(Q(l(),{zoom:u.scale,originX:u.originX,originY:u.originY,animation:{duration:0}}))},this),i.setPointerChecker(function(u,c,f){return a.containPoint([c,f])&&!$p(u,n,e)})},r.prototype.resetForLabelLayout=function(){this.group.traverse(function(e){var t=e.getTextContent();t&&(t.ignore=AO(t).ignore)})},r.prototype._updateMapSelectHandler=function(e,t,n,a){var i=this;t.off("mousedown"),t.off("click"),e.get("selectedMode")&&(t.on("mousedown",function(){i._mouseDownFlag=!0}),t.on("click",function(o){!i._mouseDownFlag||(i._mouseDownFlag=!1)}))},r}();function IO(r,e,t,n){var a=n.getModel("itemStyle"),i=n.getModel(["emphasis","itemStyle"]),o=n.getModel(["blur","itemStyle"]),s=n.getModel(["select","itemStyle"]),l=Up(a),u=Up(i),c=Up(s),f=Up(o),h=r.data;if(h){var v=h.getItemVisual(t,"style"),d=h.getItemVisual(t,"decal");r.isVisualEncodedByVisualMap&&v.fill&&(l.fill=v.fill),d&&(l.decal=cu(d,r.api))}e.setStyle(l),e.style.strokeNoScale=!0,e.ensureState("emphasis").style=u,e.ensureState("select").style=c,e.ensureState("blur").style=f,ps(e)}function PO(r,e,t,n,a,i,o){var s=r.data,l=r.isGeo,u=s&&isNaN(s.get(s.mapDimension("value"),i)),c=s&&s.getItemLayout(i);if(l||u||c&&c.showLabel){var f=l?t:i,h=void 0;(!s||i>=0)&&(h=a);var v=o?{normal:{align:"center",verticalAlign:"middle"}}:null;yr(e,rr(n),{labelFetcher:h,labelDataIndex:f,defaultText:t},v);var d=e.getTextContent();if(d&&(AO(d).ignore=d.ignore,e.textConfig&&o)){var p=e.getBoundingRect().clone();e.textConfig.layoutRect=p,e.textConfig.position=[(o[0]-p.x)/p.width*100+"%",(o[1]-p.y)/p.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function EO(r,e,t,n,a,i){r.data?r.data.setItemGraphicEl(i,e):Me(e).eventData={componentType:"geo",componentIndex:a.componentIndex,geoIndex:a.componentIndex,name:t,region:n&&n.option||{}}}function OO(r,e,t,n,a){r.data||Yl({el:e,componentModel:a,itemName:t,itemTooltipOption:n.get("tooltip")})}function RO(r,e,t,n,a){e.highDownSilentOnTouch=!!a.get("selectedMode");var i=n.getModel("emphasis"),o=i.get("focus");return Lt(e,o,i.get("blurScope"),i.get("disabled")),r.isGeo&&xW(e,a,t),o}function NO(r,e,t){var n=[],a;function i(){a=[]}function o(){a.length&&(n.push(a),a=[])}var s=e({polygonStart:i,polygonEnd:o,lineStart:i,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&a.push([l,u])},sphere:function(){}});return!t&&s.polygonStart(),L(r,function(l){s.lineStart();for(var u=0;u<l.length;u++)s.point(l[u][0],l[u][1]);s.lineEnd()}),!t&&s.polygonEnd(),n}var kO=OX,RX=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a,i){if(!(i&&i.type==="mapToggleSelect"&&i.from===this.uid)){var o=this.group;if(o.removeAll(),!t.getHostGeoModel()){if(this._mapDraw&&i&&i.type==="geoRoam"&&this._mapDraw.resetForLabelLayout(),i&&i.type==="geoRoam"&&i.componentType==="series"&&i.seriesId===t.id){var s=this._mapDraw;s&&o.add(s.group)}else if(t.needsDrawMap){var s=this._mapDraw||new kO(a);o.add(s.group),s.draw(t,n,a,this,i),this._mapDraw=s}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&n.getComponent("legend")&&this._renderSymbols(t,n,a)}}},e.prototype.remove=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},e.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},e.prototype._renderSymbols=function(t,n,a){var i=t.originalData,o=this.group;i.each(i.mapDimension("value"),function(s,l){if(!isNaN(s)){var u=i.getItemLayout(l);if(!(!u||!u.point)){var c=u.point,f=u.offset,h=new ha({style:{fill:t.getData().getVisual("style").fill},shape:{cx:c[0]+f*9,cy:c[1],r:3},silent:!0,z2:8+(f?0:zl+1)});if(!f){var v=t.mainSeries.getData(),d=i.getName(l),p=v.indexOfName(d),g=i.getItemModel(l),y=g.getModel("label"),m=v.getItemGraphicEl(p);yr(h,rr(g),{labelFetcher:{getFormattedLabel:function(_,b){return t.getFormattedLabel(p,b)}},defaultText:d}),h.disableLabelAnimation=!0,y.get("position")||h.setTextConfig({position:"bottom"}),m.onHoverStateChange=function(_){gd(h,_)}}o.add(h)}}})},e.type="map",e}(ut),NX=RX,kX=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.needsDrawMap=!1,t.seriesGroup=[],t.getTooltipPosition=function(n){if(n!=null){var a=this.getData().getName(n),i=this.coordinateSystem,o=i.getRegion(a);return o&&i.dataToPoint(o.getCenter())}},t}return e.prototype.getInitialData=function(t){for(var n=mu(this,{coordDimensions:["value"],encodeDefaulter:Ae(F_,this)}),a=ge(),i=[],o=0,s=n.count();o<s;o++){var l=n.getName(o);a.set(l,!0)}var u=_i.load(this.getMapType(),this.option.nameMap,this.option.nameProperty);return L(u.regions,function(c){var f=c.name;a.get(f)||i.push(f)}),n.appendValues([],i),n},e.prototype.getHostGeoModel=function(){var t=this.option.geoIndex;return t!=null?this.ecModel.getComponent("geo",t):null},e.prototype.getMapType=function(){return(this.getHostGeoModel()||this).option.map},e.prototype.getRawValue=function(t){var n=this.getData();return n.get(n.mapDimension("value"),t)},e.prototype.getRegionModel=function(t){var n=this.getData();return n.getItemModel(n.indexOfName(t))},e.prototype.formatTooltip=function(t,n,a){for(var i=this.getData(),o=this.getRawValue(t),s=i.getName(t),l=this.seriesGroup,u=[],c=0;c<l.length;c++){var f=l[c].originalData.indexOfName(s),h=i.mapDimension("value");isNaN(l[c].originalData.get(h,f))||u.push(l[c].name)}return nr("section",{header:u.join(", "),noHeader:!u.length,blocks:[nr("nameValue",{name:s,value:o})]})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.getLegendIcon=function(t){var n=t.icon||"roundRect",a=kt(n,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill);return a.setStyle(t.itemStyle),a.style.stroke="none",n.indexOf("empty")>-1&&(a.style.stroke=a.style.fill,a.style.fill="#fff",a.style.lineWidth=2),a},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},e}(yt),BX=kX;function zX(r,e){var t={};return L(r,function(n){n.each(n.mapDimension("value"),function(a,i){var o="ec-"+n.getName(i);t[o]=t[o]||[],isNaN(a)||t[o].push(a)})}),r[0].map(r[0].mapDimension("value"),function(n,a){for(var i="ec-"+r[0].getName(a),o=0,s=1/0,l=-1/0,u=t[i].length,c=0;c<u;c++)s=Math.min(s,t[i][c]),l=Math.max(l,t[i][c]),o+=t[i][c];var f;return e==="min"?f=s:e==="max"?f=l:e==="average"?f=o/u:f=o,u===0?NaN:f})}function FX(r){var e={};r.eachSeriesByType("map",function(t){var n=t.getHostGeoModel(),a=n?"o"+n.id:"i"+t.getMapType();(e[a]=e[a]||[]).push(t)}),L(e,function(t,n){for(var a=zX(J(t,function(o){return o.getData()}),t[0].get("mapValueCalculation")),i=0;i<t.length;i++)t[i].originalData=t[i].getData();for(var i=0;i<t.length;i++)t[i].seriesGroup=t,t[i].needsDrawMap=i===0&&!t[i].getHostGeoModel(),t[i].setData(a.cloneShallow()),t[i].mainSeries=t[0]})}function VX(r){var e={};r.eachSeriesByType("map",function(t){var n=t.getMapType();if(!(t.getHostGeoModel()||e[n])){var a={};L(t.seriesGroup,function(o){var s=o.coordinateSystem,l=o.originalData;o.get("showLegendSymbol")&&r.getComponent("legend")&&l.each(l.mapDimension("value"),function(u,c){var f=l.getName(c),h=s.getRegion(f);if(!(!h||isNaN(u))){var v=a[f]||0,d=s.dataToPoint(h.getCenter());a[f]=v+1,l.setItemLayout(c,{point:d,offset:v})}})});var i=t.getData();i.each(function(o){var s=i.getName(o),l=i.getItemLayout(o)||{};l.showLabel=!a[s],i.setItemLayout(o,l)}),e[n]=!0}})}var BO=sr,$X=function(r){j(e,r);function e(t){var n=r.call(this)||this;return n.type="view",n.dimensions=["x","y"],n._roamTransformable=new li,n._rawTransformable=new li,n.name=t,n}return e.prototype.setBoundingRect=function(t,n,a,i){return this._rect=new Re(t,n,a,i),this._rect},e.prototype.getBoundingRect=function(){return this._rect},e.prototype.setViewRect=function(t,n,a,i){this._transformTo(t,n,a,i),this._viewRect=new Re(t,n,a,i)},e.prototype._transformTo=function(t,n,a,i){var o=this.getBoundingRect(),s=this._rawTransformable;s.transform=o.calculateTransform(new Re(t,n,a,i));var l=s.parent;s.parent=null,s.decomposeTransform(),s.parent=l,this._updateTransform()},e.prototype.setCenter=function(t,n){!t||(this._center=[le(t[0],n.getWidth()),le(t[1],n.getHeight())],this._updateCenterAndZoom())},e.prototype.setZoom=function(t){t=t||1;var n=this.zoomLimit;n&&(n.max!=null&&(t=Math.min(n.max,t)),n.min!=null&&(t=Math.max(n.min,t))),this._zoom=t,this._updateCenterAndZoom()},e.prototype.getDefaultCenter=function(){var t=this.getBoundingRect(),n=t.x+t.width/2,a=t.y+t.height/2;return[n,a]},e.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},e.prototype.getZoom=function(){return this._zoom||1},e.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},e.prototype._updateCenterAndZoom=function(){var t=this._rawTransformable.getLocalTransform(),n=this._roamTransformable,a=this.getDefaultCenter(),i=this.getCenter(),o=this.getZoom();i=sr([],i,t),a=sr([],a,t),n.originX=i[0],n.originY=i[1],n.x=a[0]-i[0],n.y=a[1]-i[1],n.scaleX=n.scaleY=o,this._updateTransform()},e.prototype._updateTransform=function(){var t=this._roamTransformable,n=this._rawTransformable;n.parent=t,t.updateTransform(),n.updateTransform(),Pv(this.transform||(this.transform=[]),n.transform||gn()),this._rawTransform=n.getLocalTransform(),this.invTransform=this.invTransform||[],Yo(this.invTransform,this.transform),this.decomposeTransform()},e.prototype.getTransformInfo=function(){var t=this._rawTransformable,n=this._roamTransformable,a=new li;return a.transform=n.transform,a.decomposeTransform(),{roam:{x:a.x,y:a.y,scaleX:a.scaleX,scaleY:a.scaleY},raw:{x:t.x,y:t.y,scaleX:t.scaleX,scaleY:t.scaleY}}},e.prototype.getViewRect=function(){return this._viewRect},e.prototype.getViewRectAfterRoam=function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},e.prototype.dataToPoint=function(t,n,a){var i=n?this._rawTransform:this.transform;return a=a||[],i?BO(a,t,i):Mr(a,t)},e.prototype.pointToData=function(t){var n=this.invTransform;return n?BO([],t,n):[t[0],t[1]]},e.prototype.convertToPixel=function(t,n,a){var i=zO(n);return i===this?i.dataToPoint(a):null},e.prototype.convertFromPixel=function(t,n,a){var i=zO(n);return i===this?i.pointToData(a):null},e.prototype.containPoint=function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])},e.dimensions=["x","y"],e}(li);function zO(r){var e=r.seriesModel;return e?e.coordinateSystem:null}var Zf=$X,HX={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},FO=["lng","lat"],VO=function(r){j(e,r);function e(t,n,a){var i=r.call(this,t)||this;i.dimensions=FO,i.type="geo",i._nameCoordMap=ge(),i.map=n;var o=a.projection,s=_i.load(n,a.nameMap,a.nameProperty),l=_i.getGeoResource(n);i.resourceType=l?l.type:null;var u=i.regions=s.regions,c=HX[l.type];i._regionsMap=s.regionsMap,i.regions=s.regions,i.projection=o;var f;if(o)for(var h=0;h<u.length;h++){var v=u[h].getBoundingRect(o);f=f||v.clone(),f.union(v)}else f=s.boundingRect;return i.setBoundingRect(f.x,f.y,f.width,f.height),i.aspectScale=o?1:Ee(a.aspectScale,c.aspectScale),i._invertLongitute=o?!1:c.invertLongitute,i}return e.prototype._transformTo=function(t,n,a,i){var o=this.getBoundingRect(),s=this._invertLongitute;o=o.clone(),s&&(o.y=-o.y-o.height);var l=this._rawTransformable;l.transform=o.calculateTransform(new Re(t,n,a,i));var u=l.parent;l.parent=null,l.decomposeTransform(),l.parent=u,s&&(l.scaleY=-l.scaleY),this._updateTransform()},e.prototype.getRegion=function(t){return this._regionsMap.get(t)},e.prototype.getRegionByCoord=function(t){for(var n=this.regions,a=0;a<n.length;a++){var i=n[a];if(i.type==="geoJSON"&&i.contain(t))return n[a]}},e.prototype.addGeoCoord=function(t,n){this._nameCoordMap.set(t,n)},e.prototype.getGeoCoord=function(t){var n=this._regionsMap.get(t);return this._nameCoordMap.get(t)||n&&n.getCenter()},e.prototype.dataToPoint=function(t,n,a){if(ce(t)&&(t=this.getGeoCoord(t)),t){var i=this.projection;return i&&(t=i.project(t)),t&&this.projectedToPoint(t,n,a)}},e.prototype.pointToData=function(t){var n=this.projection;return n&&(t=n.unproject(t)),t&&this.pointToProjected(t)},e.prototype.pointToProjected=function(t){return r.prototype.pointToData.call(this,t)},e.prototype.projectedToPoint=function(t,n,a){return r.prototype.dataToPoint.call(this,t,n,a)},e.prototype.convertToPixel=function(t,n,a){var i=$O(n);return i===this?i.dataToPoint(a):null},e.prototype.convertFromPixel=function(t,n,a){var i=$O(n);return i===this?i.pointToData(a):null},e}(Zf);Et(VO,Zf);function $O(r){var e=r.geoModel,t=r.seriesModel;return e?e.coordinateSystem:t?t.coordinateSystem||(t.getReferringComponents("geo",$t).models[0]||{}).coordinateSystem:null}var HO=VO;function GO(r,e){var t=r.get("boundingCoords");if(t!=null){var n=t[0],a=t[1];if(isFinite(n[0])&&isFinite(n[1])&&isFinite(a[0])&&isFinite(a[1])){var i=this.projection;if(i){var o=n[0],s=n[1],l=a[0],u=a[1];n=[1/0,1/0],a=[-1/0,-1/0];var c=function(x,S,T,D){for(var M=T-x,A=D-S,I=0;I<=100;I++){var P=I/100,E=i.project([x+M*P,S+A*P]);ai(n,n,E),ii(a,a,E)}};c(o,s,l,s),c(l,s,l,u),c(l,u,o,u),c(o,u,l,s)}this.setBoundingRect(n[0],n[1],a[0]-n[0],a[1]-n[1])}}var f=this.getBoundingRect(),h=r.get("layoutCenter"),v=r.get("layoutSize"),d=e.getWidth(),p=e.getHeight(),g=f.width/f.height*this.aspectScale,y=!1,m,_;h&&v&&(m=[le(h[0],d),le(h[1],p)],_=le(v,Math.min(d,p)),!isNaN(m[0])&&!isNaN(m[1])&&!isNaN(_)&&(y=!0));var b;if(y)b={},g>1?(b.width=_,b.height=_/g):(b.height=_,b.width=_*g),b.y=m[1]-b.height/2,b.x=m[0]-b.width/2;else{var w=r.getBoxLayoutParams();w.aspect=g,b=Ht(w,{width:d,height:p})}this.setViewRect(b.x,b.y,b.width,b.height),this.setCenter(r.get("center"),e),this.setZoom(r.get("zoom"))}function GX(r,e){L(e.get("geoCoord"),function(t,n){r.addGeoCoord(n,t)})}var WX=function(){function r(){this.dimensions=FO}return r.prototype.create=function(e,t){var n=[];function a(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}e.eachComponent("geo",function(o,s){var l=o.get("map"),u=new HO(l+s,l,Q({nameMap:o.get("nameMap")},a(o)));u.zoomLimit=o.get("scaleLimit"),n.push(u),o.coordinateSystem=u,u.model=o,u.resize=GO,u.resize(o,t)}),e.eachSeries(function(o){var s=o.get("coordinateSystem");if(s==="geo"){var l=o.get("geoIndex")||0;o.coordinateSystem=n[l]}});var i={};return e.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();i[s]=i[s]||[],i[s].push(o)}}),L(i,function(o,s){var l=J(o,function(c){return c.get("nameMap")}),u=new HO(s,s,Q({nameMap:Tv(l)},a(o[0])));u.zoomLimit=Jt.apply(null,J(o,function(c){return c.get("scaleLimit")})),n.push(u),u.resize=GO,u.resize(o[0],t),L(o,function(c){c.coordinateSystem=u,GX(u,c)})}),n},r.prototype.getFilledRegions=function(e,t,n,a){for(var i=(e||[]).slice(),o=ge(),s=0;s<i.length;s++)o.set(i[s].name,i[s]);var l=_i.load(t,n,a);return L(l.regions,function(u){var c=u.name;!o.get(c)&&i.push({name:c})}),i},r}(),UX=new WX,WO=UX,jX=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n,a){var i=_i.getGeoResource(t.map);if(i&&i.type==="geoJSON"){var o=t.itemStyle=t.itemStyle||{};"color"in o||(o.color="#eee")}this.mergeDefaultAndTheme(t,a),rs(t,"label",["show"])},e.prototype.optionUpdated=function(){var t=this,n=this.option;n.regions=WO.getFilledRegions(n.regions,n.map,n.nameMap,n.nameProperty);var a={};this._optionModelMap=Pn(n.regions||[],function(i,o){var s=o.name;return s&&(i.set(s,new lt(o,t,t.ecModel)),o.selected&&(a[s]=!0)),i},ge()),n.selectedMap||(n.selectedMap=a)},e.prototype.getRegionModel=function(t){return this._optionModelMap.get(t)||new lt(null,this,this.ecModel)},e.prototype.getFormattedLabel=function(t,n){var a=this.getRegionModel(t),i=n==="normal"?a.get(["label","formatter"]):a.get(["emphasis","label","formatter"]),o={name:t};if(ye(i))return o.status=n,i(o);if(ce(i))return i.replace("{a}",t!=null?t:"")},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.select=function(t){var n=this.option,a=n.selectedMode;if(!!a){a!=="multiple"&&(n.selectedMap=null);var i=n.selectedMap||(n.selectedMap={});i[t]=!0}},e.prototype.unSelect=function(t){var n=this.option.selectedMap;n&&(n[t]=!1)},e.prototype.toggleSelected=function(t){this[this.isSelected(t)?"unSelect":"select"](t)},e.prototype.isSelected=function(t){var n=this.option.selectedMap;return!!(n&&n[t])},e.type="geo",e.layoutMode="box",e.defaultOption={z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},e}($e),YX=jX;function UO(r,e){return r.pointToProjected?r.pointToProjected(e):r.pointToData(e)}function kb(r,e,t,n){var a=r.getZoom(),i=r.getCenter(),o=e.zoom,s=r.projectedToPoint?r.projectedToPoint(i):r.dataToPoint(i);if(e.dx!=null&&e.dy!=null&&(s[0]-=e.dx,s[1]-=e.dy,r.setCenter(UO(r,s),n)),o!=null){if(t){var l=t.min||0,u=t.max||1/0;o=Math.max(Math.min(a*o,u),l)/a}r.scaleX*=o,r.scaleY*=o;var c=(e.originX-r.x)*(o-1),f=(e.originY-r.y)*(o-1);r.x-=c,r.y-=f,r.updateTransform(),r.setCenter(UO(r,s),n),r.setZoom(o*a)}return{center:r.getCenter(),zoom:r.getZoom()}}var qX=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.focusBlurEnabled=!0,t}return e.prototype.init=function(t,n){this._api=n},e.prototype.render=function(t,n,a,i){if(this._model=t,!t.get("show")){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;return}this._mapDraw||(this._mapDraw=new kO(a));var o=this._mapDraw;o.draw(t,n,a,this,i),o.group.on("click",this._handleRegionClick,this),o.group.silent=t.get("silent"),this.group.add(o.group),this.updateSelectStatus(t,n,a)},e.prototype._handleRegionClick=function(t){var n;As(t.target,function(a){return(n=Me(a).eventData)!=null},!0),n&&this._api.dispatchAction({type:"geoToggleSelect",geoId:this._model.id,name:n.name})},e.prototype.updateSelectStatus=function(t,n,a){var i=this;this._mapDraw.group.traverse(function(o){var s=Me(o).eventData;if(s)return i._model.isSelected(s.name)?a.enterSelect(o):a.leaveSelect(o),!0})},e.prototype.findHighDownDispatchers=function(t){return this._mapDraw&&this._mapDraw.findHighDownDispatchers(t,this._model)},e.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove()},e.type="geo",e}(wt),ZX=qX;function XX(r,e,t){_i.registerMap(r,e,t)}function jO(r){r.registerCoordinateSystem("geo",WO),r.registerComponentModel(YX),r.registerComponentView(ZX),r.registerImpl("registerMap",XX),r.registerImpl("getMap",function(t){return _i.getMapForUser(t)});function e(t,n){n.update="geo:updateSelectStatus",r.registerAction(n,function(a,i){var o={},s=[];return i.eachComponent({mainType:"geo",query:a},function(l){l[t](a.name);var u=l.coordinateSystem;L(u.regions,function(f){o[f.name]=l.isSelected(f.name)||!1});var c=[];L(o,function(f,h){o[h]&&c.push(h)}),s.push({geoIndex:l.componentIndex,name:c})}),{selected:o,allSelected:s,name:a.name}})}e("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),e("select",{type:"geoSelect",event:"geoselected"}),e("unSelect",{type:"geoUnSelect",event:"geounselected"}),r.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(t,n,a){var i=t.componentType||"series";n.eachComponent({mainType:i,query:t},function(o){var s=o.coordinateSystem;if(s.type==="geo"){var l=kb(s,t,o.get("scaleLimit"),a);o.setCenter&&o.setCenter(l.center),o.setZoom&&o.setZoom(l.zoom),i==="series"&&L(o.seriesGroup,function(u){u.setCenter(l.center),u.setZoom(l.zoom)})}})})}function QX(r){ke(jO),r.registerChartView(NX),r.registerSeriesModel(BX),r.registerLayout(VX),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,FX),WL("map",r.registerAction)}function KX(r){var e=r;e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var t=[e],n,a;n=t.pop();)if(a=n.children,n.isExpand&&a.length)for(var i=a.length,o=i-1;o>=0;o--){var s=a[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},t.push(s)}}function JX(r,e){var t=r.isExpand?r.children:[],n=r.parentNode.children,a=r.hierNode.i?n[r.hierNode.i-1]:null;if(t.length){rQ(r);var i=(t[0].hierNode.prelim+t[t.length-1].hierNode.prelim)/2;a?(r.hierNode.prelim=a.hierNode.prelim+e(r,a),r.hierNode.modifier=r.hierNode.prelim-i):r.hierNode.prelim=i}else a&&(r.hierNode.prelim=a.hierNode.prelim+e(r,a));r.parentNode.hierNode.defaultAncestor=nQ(r,a,r.parentNode.hierNode.defaultAncestor||n[0],e)}function eQ(r){var e=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:e},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function YO(r){return arguments.length?r:oQ}function Xf(r,e){return r-=Math.PI/2,{x:e*Math.cos(r),y:e*Math.sin(r)}}function tQ(r,e){return Ht(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function rQ(r){for(var e=r.children,t=e.length,n=0,a=0;--t>=0;){var i=e[t];i.hierNode.prelim+=n,i.hierNode.modifier+=n,a+=i.hierNode.change,n+=i.hierNode.shift+a}}function nQ(r,e,t,n){if(e){for(var a=r,i=r,o=i.parentNode.children[0],s=e,l=a.hierNode.modifier,u=i.hierNode.modifier,c=o.hierNode.modifier,f=s.hierNode.modifier;s=Bb(s),i=zb(i),s&&i;){a=Bb(a),o=zb(o),a.hierNode.ancestor=r;var h=s.hierNode.prelim+f-i.hierNode.prelim-u+n(s,i);h>0&&(iQ(aQ(s,r,t),r,h),u+=h,l+=h),f+=s.hierNode.modifier,u+=i.hierNode.modifier,l+=a.hierNode.modifier,c+=o.hierNode.modifier}s&&!Bb(a)&&(a.hierNode.thread=s,a.hierNode.modifier+=f-l),i&&!zb(o)&&(o.hierNode.thread=i,o.hierNode.modifier+=u-c,t=r)}return t}function Bb(r){var e=r.children;return e.length&&r.isExpand?e[e.length-1]:r.hierNode.thread}function zb(r){var e=r.children;return e.length&&r.isExpand?e[0]:r.hierNode.thread}function aQ(r,e,t){return r.hierNode.ancestor.parentNode===e.parentNode?r.hierNode.ancestor:t}function iQ(r,e,t){var n=t/(e.hierNode.i-r.hierNode.i);e.hierNode.change-=n,e.hierNode.shift+=t,e.hierNode.modifier+=t,e.hierNode.prelim+=t,r.hierNode.change+=n}function oQ(r,e){return r.parentNode===e.parentNode?1:2}var sQ=function(){function r(){this.parentPoint=[],this.childPoints=[]}return r}(),lQ=function(r){j(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new sQ},e.prototype.buildPath=function(t,n){var a=n.childPoints,i=a.length,o=n.parentPoint,s=a[0],l=a[i-1];if(i===1){t.moveTo(o[0],o[1]),t.lineTo(s[0],s[1]);return}var u=n.orient,c=u==="TB"||u==="BT"?0:1,f=1-c,h=le(n.forkPosition,1),v=[];v[c]=o[c],v[f]=o[f]+(l[f]-o[f])*h,t.moveTo(o[0],o[1]),t.lineTo(v[0],v[1]),t.moveTo(s[0],s[1]),v[c]=s[c],t.lineTo(v[0],v[1]),v[c]=l[c],t.lineTo(v[0],v[1]),t.lineTo(l[0],l[1]);for(var d=1;d<i-1;d++){var p=a[d];t.moveTo(p[0],p[1]),v[c]=p[c],t.lineTo(v[0],v[1])}},e}(Be),uQ=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._mainGroup=new Te,t}return e.prototype.init=function(t,n){this._controller=new Yf(n.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(t,n,a){var i=t.getData(),o=t.layoutInfo,s=this._mainGroup,l=t.get("layout");l==="radial"?(s.x=o.x+o.width/2,s.y=o.y+o.height/2):(s.x=o.x,s.y=o.y),this._updateViewCoordSys(t,a),this._updateController(t,n,a);var u=this._data;i.diff(u).add(function(c){qO(i,c)&&ZO(i,c,null,s,t)}).update(function(c,f){var h=u.getItemGraphicEl(f);if(!qO(i,c)){h&&KO(u,f,h,s,t);return}ZO(i,c,h,s,t)}).remove(function(c){var f=u.getItemGraphicEl(c);f&&KO(u,c,f,s,t)}).execute(),this._nodeScaleRatio=t.get("nodeScaleRatio"),this._updateNodeAndLinkScale(t),t.get("expandAndCollapse")===!0&&i.eachItemGraphicEl(function(c,f){c.off("click").on("click",function(){a.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:f})})}),this._data=i},e.prototype._updateViewCoordSys=function(t,n){var a=t.getData(),i=[];a.each(function(f){var h=a.getItemLayout(f);h&&!isNaN(h.x)&&!isNaN(h.y)&&i.push([+h.x,+h.y])});var o=[],s=[];cd(i,o,s);var l=this._min,u=this._max;s[0]-o[0]===0&&(o[0]=l?l[0]:o[0]-1,s[0]=u?u[0]:s[0]+1),s[1]-o[1]===0&&(o[1]=l?l[1]:o[1]-1,s[1]=u?u[1]:s[1]+1);var c=t.coordinateSystem=new Zf;c.zoomLimit=t.get("scaleLimit"),c.setBoundingRect(o[0],o[1],s[0]-o[0],s[1]-o[1]),c.setCenter(t.get("center"),n),c.setZoom(t.get("zoom")),this.group.attr({x:c.x,y:c.y,scaleX:c.scaleX,scaleY:c.scaleY}),this._min=o,this._max=s},e.prototype._updateController=function(t,n,a){var i=this,o=this._controller,s=this._controllerHost,l=this.group;o.setPointerChecker(function(u,c,f){var h=l.getBoundingRect();return h.applyTransform(l.transform),h.contain(c,f)&&!$p(u,a,t)}),o.enable(t.get("roam")),s.zoomLimit=t.get("scaleLimit"),s.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){Ib(s,u.dx,u.dy),a.dispatchAction({seriesId:t.id,type:"treeRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){Pb(s,u.scale,u.originX,u.originY),a.dispatchAction({seriesId:t.id,type:"treeRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),i._updateNodeAndLinkScale(t),a.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(t){var n=t.getData(),a=this._getNodeGlobalScale(t);n.eachItemGraphicEl(function(i,o){i.setSymbolScale(a)})},e.prototype._getNodeGlobalScale=function(t){var n=t.coordinateSystem;if(n.type!=="view")return 1;var a=this._nodeScaleRatio,i=n.scaleX||1,o=n.getZoom(),s=(o-1)*a+1;return s/i},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype.remove=function(){this._mainGroup.removeAll(),this._data=null},e.type="tree",e}(ut);function qO(r,e){var t=r.getItemLayout(e);return t&&!isNaN(t.x)&&!isNaN(t.y)}function ZO(r,e,t,n,a){var i=!t,o=r.tree.getNodeByDataIndex(e),s=o.getModel(),l=o.getVisual("style").fill,u=o.isExpand===!1&&o.children.length!==0?l:"#fff",c=r.tree.root,f=o.parentNode===c?o:o.parentNode||o,h=r.getItemGraphicEl(f.dataIndex),v=f.getLayout(),d=h?{x:h.__oldX,y:h.__oldY,rawX:h.__radialOldRawX,rawY:h.__radialOldRawY}:v,p=o.getLayout();i?(t=new Vf(r,e,null,{symbolInnerColor:u,useNameLabel:!0}),t.x=d.x,t.y=d.y):t.updateData(r,e,null,{symbolInnerColor:u,useNameLabel:!0}),t.__radialOldRawX=t.__radialRawX,t.__radialOldRawY=t.__radialRawY,t.__radialRawX=p.rawX,t.__radialRawY=p.rawY,n.add(t),r.setItemGraphicEl(e,t),t.__oldX=t.x,t.__oldY=t.y,qe(t,{x:p.x,y:p.y},a);var g=t.getSymbolPath();if(a.get("layout")==="radial"){var y=c.children[0],m=y.getLayout(),_=y.children.length,b=void 0,w=void 0;if(p.x===m.x&&o.isExpand===!0&&y.children.length){var x={x:(y.children[0].getLayout().x+y.children[_-1].getLayout().x)/2,y:(y.children[0].getLayout().y+y.children[_-1].getLayout().y)/2};b=Math.atan2(x.y-m.y,x.x-m.x),b<0&&(b=Math.PI*2+b),w=x.x<m.x,w&&(b=b-Math.PI)}else b=Math.atan2(p.y-m.y,p.x-m.x),b<0&&(b=Math.PI*2+b),o.children.length===0||o.children.length!==0&&o.isExpand===!1?(w=p.x<m.x,w&&(b=b-Math.PI)):(w=p.x>m.x,w||(b=b-Math.PI));var S=w?"left":"right",T=s.getModel("label"),D=T.get("rotate"),M=D*(Math.PI/180),A=g.getTextContent();A&&(g.setTextConfig({position:T.get("position")||S,rotation:D==null?-b:M,origin:"center"}),A.setStyle("verticalAlign","middle"))}var I=s.get(["emphasis","focus"]),P=I==="relative"?hc(o.getAncestorsIndices(),o.getDescendantIndices()):I==="ancestor"?o.getAncestorsIndices():I==="descendant"?o.getDescendantIndices():null;P&&(Me(t).focus=P),cQ(a,o,c,t,d,v,p,n),t.__edge&&(t.onHoverStateChange=function(E){if(E!=="blur"){var O=o.parentNode&&r.getItemGraphicEl(o.parentNode.dataIndex);O&&O.hoverState===Wc||gd(t.__edge,E)}})}function cQ(r,e,t,n,a,i,o,s){var l=e.getModel(),u=r.get("edgeShape"),c=r.get("layout"),f=r.getOrient(),h=r.get(["lineStyle","curveness"]),v=r.get("edgeForkPosition"),d=l.getModel("lineStyle").getLineStyle(),p=n.__edge;if(u==="curve")e.parentNode&&e.parentNode!==t&&(p||(p=n.__edge=new Jc({shape:Fb(c,f,h,a,a)})),qe(p,{shape:Fb(c,f,h,i,o)},r));else if(u==="polyline"&&c==="orthogonal"&&e!==t&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var g=e.children,y=[],m=0;m<g.length;m++){var _=g[m].getLayout();y.push([_.x,_.y])}p||(p=n.__edge=new lQ({shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]],orient:f,forkPosition:v}})),qe(p,{shape:{parentPoint:[o.x,o.y],childPoints:y}},r)}p&&!(u==="polyline"&&!e.isExpand)&&(p.useStyle(me({strokeNoScale:!0,fill:null},d)),gr(p,l,"lineStyle"),ps(p),s.add(p))}function XO(r,e,t,n,a){var i=e.tree.root,o=QO(i,r),s=o.source,l=o.sourceLayout,u=e.getItemGraphicEl(r.dataIndex);if(!!u){var c=e.getItemGraphicEl(s.dataIndex),f=c.__edge,h=u.__edge||(s.isExpand===!1||s.children.length===1?f:void 0),v=n.get("edgeShape"),d=n.get("layout"),p=n.get("orient"),g=n.get(["lineStyle","curveness"]);h&&(v==="curve"?ao(h,{shape:Fb(d,p,g,l,l),style:{opacity:0}},n,{cb:function(){t.remove(h)},removeOpt:a}):v==="polyline"&&n.get("layout")==="orthogonal"&&ao(h,{shape:{parentPoint:[l.x,l.y],childPoints:[[l.x,l.y]]},style:{opacity:0}},n,{cb:function(){t.remove(h)},removeOpt:a}))}}function QO(r,e){for(var t=e.parentNode===r?e:e.parentNode||e,n;n=t.getLayout(),n==null;)t=t.parentNode===r?t:t.parentNode||t;return{source:t,sourceLayout:n}}function KO(r,e,t,n,a){var i=r.tree.getNodeByDataIndex(e),o=r.tree.root,s=QO(o,i).sourceLayout,l={duration:a.get("animationDurationUpdate"),easing:a.get("animationEasingUpdate")};ao(t,{x:s.x+1,y:s.y+1},a,{cb:function(){n.remove(t),r.setItemGraphicEl(e,null)},removeOpt:l}),t.fadeOut(null,r.hostModel,{fadeLabel:!0,animation:l}),i.children.forEach(function(u){XO(u,r,n,a,l)}),XO(i,r,n,a,l)}function Fb(r,e,t,n,a){var i,o,s,l,u,c,f,h;if(r==="radial"){u=n.rawX,f=n.rawY,c=a.rawX,h=a.rawY;var v=Xf(u,f),d=Xf(u,f+(h-f)*t),p=Xf(c,h+(f-h)*t),g=Xf(c,h);return{x1:v.x||0,y1:v.y||0,x2:g.x||0,y2:g.y||0,cpx1:d.x||0,cpy1:d.y||0,cpx2:p.x||0,cpy2:p.y||0}}else u=n.x,f=n.y,c=a.x,h=a.y,(e==="LR"||e==="RL")&&(i=u+(c-u)*t,o=f,s=c+(u-c)*t,l=h),(e==="TB"||e==="BT")&&(i=u,o=f+(h-f)*t,s=c,l=h+(f-h)*t);return{x1:u,y1:f,x2:c,y2:h,cpx1:i,cpy1:o,cpx2:s,cpy2:l}}var fQ=uQ,qn=Ye();function JO(r){var e=r.mainData,t=r.datas;t||(t={main:e},r.datasAttr={main:"data"}),r.datas=r.mainData=null,eR(e,t,r),L(t,function(n){L(e.TRANSFERABLE_METHODS,function(a){n.wrapMethod(a,Ae(hQ,r))})}),e.wrapMethod("cloneShallow",Ae(dQ,r)),L(e.CHANGABLE_METHODS,function(n){e.wrapMethod(n,Ae(vQ,r))}),Dr(t[e.dataType]===e)}function hQ(r,e){if(yQ(this)){var t=Q({},qn(this).datas);t[this.dataType]=e,eR(e,t,r)}else Vb(e,this.dataType,qn(this).mainData,r);return e}function vQ(r,e){return r.struct&&r.struct.update(),e}function dQ(r,e){return L(qn(e).datas,function(t,n){t!==e&&Vb(t.cloneShallow(),n,e,r)}),e}function pQ(r){var e=qn(this).mainData;return r==null||e==null?e:qn(e).datas[r]}function gQ(){var r=qn(this).mainData;return r==null?[{data:r}]:J(Fe(qn(r).datas),function(e){return{type:e,data:qn(r).datas[e]}})}function yQ(r){return qn(r).mainData===r}function eR(r,e,t){qn(r).datas={},L(e,function(n,a){Vb(n,a,r,t)})}function Vb(r,e,t,n){qn(t).datas[e]=r,qn(r).mainData=t,r.dataType=e,n.struct&&(r[n.structAttr]=n.struct,n.struct[n.datasAttr[e]]=r),r.getLinkedData=pQ,r.getLinkedDataAll=gQ}var mQ=function(){function r(e,t){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=e||"",this.hostTree=t}return r.prototype.isRemoved=function(){return this.dataIndex<0},r.prototype.eachNode=function(e,t,n){ye(e)&&(n=t,t=e,e=null),e=e||{},ce(e)&&(e={order:e});var a=e.order||"preorder",i=this[e.attr||"children"],o;a==="preorder"&&(o=t.call(n,this));for(var s=0;!o&&s<i.length;s++)i[s].eachNode(e,t,n);a==="postorder"&&t.call(n,this)},r.prototype.updateDepthAndHeight=function(e){var t=0;this.depth=e;for(var n=0;n<this.children.length;n++){var a=this.children[n];a.updateDepthAndHeight(e+1),a.height>t&&(t=a.height)}this.height=t+1},r.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,n=this.children,a=n.length;t<a;t++){var i=n[t].getNodeById(e);if(i)return i}},r.prototype.contains=function(e){if(e===this)return!0;for(var t=0,n=this.children,a=n.length;t<a;t++){var i=n[t].contains(e);if(i)return i}},r.prototype.getAncestors=function(e){for(var t=[],n=e?this:this.parentNode;n;)t.push(n),n=n.parentNode;return t.reverse(),t},r.prototype.getAncestorsIndices=function(){for(var e=[],t=this;t;)e.push(t.dataIndex),t=t.parentNode;return e.reverse(),e},r.prototype.getDescendantIndices=function(){var e=[];return this.eachNode(function(t){e.push(t.dataIndex)}),e},r.prototype.getValue=function(e){var t=this.hostTree.data;return t.getStore().get(t.getDimensionIndex(e||"value"),this.dataIndex)},r.prototype.setLayout=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},r.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostTree,n=t.data.getItemModel(this.dataIndex);return n.getModel(e)}},r.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},r.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},r.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},r.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},r.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},r.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t<e.length;++t)if(e[t]===this)return t;return-1}return-1},r.prototype.isAncestorOf=function(e){for(var t=e.parentNode;t;){if(t===this)return!0;t=t.parentNode}return!1},r.prototype.isDescendantOf=function(e){return e!==this&&e.isAncestorOf(this)},r}(),_Q=function(){function r(e){this.type="tree",this._nodes=[],this.hostModel=e}return r.prototype.eachNode=function(e,t,n){this.root.eachNode(e,t,n)},r.prototype.getNodeByDataIndex=function(e){var t=this.data.getRawIndex(e);return this._nodes[t]},r.prototype.getNodeById=function(e){return this.root.getNodeById(e)},r.prototype.update=function(){for(var e=this.data,t=this._nodes,n=0,a=t.length;n<a;n++)t[n].dataIndex=-1;for(var n=0,a=e.count();n<a;n++)t[e.getRawIndex(n)].dataIndex=n},r.prototype.clearLayouts=function(){this.data.clearItemLayouts()},r.createTree=function(e,t,n){var a=new r(t),i=[],o=1;s(e);function s(c,f){var h=c.value;o=Math.max(o,K(h)?h.length:1),i.push(c);var v=new mQ(qt(c.name,""),a);f?bQ(v,f):a.root=v,a._nodes.push(v);var d=c.children;if(d)for(var p=0;p<d.length;p++)s(d[p],v)}a.root.updateDepthAndHeight(0);var l=hu(i,{coordDimensions:["value"],dimensionsCount:o}).dimensions,u=new Er(l,t);return u.initData(i),n&&n(u),JO({mainData:u,struct:a,structAttr:"tree"}),a.update(),a},r}();function bQ(r,e){var t=e.children;r.parentNode!==e&&(t.push(r),r.parentNode=e)}var $b=_Q;function Qf(r,e,t){if(r&&Ne(e,r.type)>=0){var n=t.getData().tree.root,a=r.targetNode;if(ce(a)&&(a=n.getNodeById(a)),a&&n.contains(a))return{node:a};var i=r.targetNodeId;if(i!=null&&(a=n.getNodeById(i)))return{node:a}}}function tR(r){for(var e=[];r;)r=r.parentNode,r&&e.push(r);return e.reverse()}function Hb(r,e){var t=tR(r);return Ne(t,e)>=0}function jp(r,e){for(var t=[];r;){var n=r.dataIndex;t.push({name:r.name,dataIndex:n,value:e.getRawValue(n)}),r=r.parentNode}return t.reverse(),t}var xQ=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t){var n={name:t.name,children:t.data},a=t.leaves||{},i=new lt(a,this,this.ecModel),o=$b.createTree(n,this,s);function s(f){f.wrapMethod("getItemModel",function(h,v){var d=o.getNodeByDataIndex(v);return d&&d.children.length&&d.isExpand||(h.parentModel=i),h})}var l=0;o.eachNode("preorder",function(f){f.depth>l&&(l=f.depth)});var u=t.expandAndCollapse,c=u&&t.initialTreeDepth>=0?t.initialTreeDepth:l;return o.root.eachNode("preorder",function(f){var h=f.hostTree.data.getRawDataItem(f.dataIndex);f.isExpand=h&&h.collapsed!=null?!h.collapsed:f.depth<=c}),o.data},e.prototype.getOrient=function(){var t=this.get("orient");return t==="horizontal"?t="LR":t==="vertical"&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,n,a){for(var i=this.getData().tree,o=i.root.children[0],s=i.getNodeByDataIndex(t),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return nr("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(t){var n=r.prototype.getDataParams.apply(this,arguments),a=this.getData().tree.getNodeByDataIndex(t);return n.treeAncestors=jp(a,this),n.collapsed=!a.isExpand,n},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(yt),wQ=xQ;function SQ(r,e,t){for(var n=[r],a=[],i;i=n.pop();)if(a.push(i),i.isExpand){var o=i.children;if(o.length)for(var s=0;s<o.length;s++)n.push(o[s])}for(;i=a.pop();)e(i,t)}function Kf(r,e){for(var t=[r],n;n=t.pop();)if(e(n),n.isExpand){var a=n.children;if(a.length)for(var i=a.length-1;i>=0;i--)t.push(a[i])}}function CQ(r,e){r.eachSeriesByType("tree",function(t){TQ(t,e)})}function TQ(r,e){var t=tQ(r,e);r.layoutInfo=t;var n=r.get("layout"),a=0,i=0,o=null;n==="radial"?(a=2*Math.PI,i=Math.min(t.height,t.width)/2,o=YO(function(_,b){return(_.parentNode===b.parentNode?1:2)/_.depth})):(a=t.width,i=t.height,o=YO());var s=r.getData().tree.root,l=s.children[0];if(l){KX(s),SQ(l,JX,o),s.hierNode.modifier=-l.hierNode.prelim,Kf(l,eQ);var u=l,c=l,f=l;Kf(l,function(_){var b=_.getLayout().x;b<u.getLayout().x&&(u=_),b>c.getLayout().x&&(c=_),_.depth>f.depth&&(f=_)});var h=u===c?1:o(u,c)/2,v=h-u.getLayout().x,d=0,p=0,g=0,y=0;if(n==="radial")d=a/(c.getLayout().x+h+v),p=i/(f.depth-1||1),Kf(l,function(_){g=(_.getLayout().x+v)*d,y=(_.depth-1)*p;var b=Xf(g,y);_.setLayout({x:b.x,y:b.y,rawX:g,rawY:y},!0)});else{var m=r.getOrient();m==="RL"||m==="LR"?(p=i/(c.getLayout().x+h+v),d=a/(f.depth-1||1),Kf(l,function(_){y=(_.getLayout().x+v)*p,g=m==="LR"?(_.depth-1)*d:a-(_.depth-1)*d,_.setLayout({x:g,y},!0)})):(m==="TB"||m==="BT")&&(d=a/(c.getLayout().x+h+v),p=i/(f.depth-1||1),Kf(l,function(_){g=(_.getLayout().x+v)*d,y=m==="TB"?(_.depth-1)*p:i-(_.depth-1)*p,_.setLayout({x:g,y},!0)}))}}}function DQ(r){r.eachSeriesByType("tree",function(e){var t=e.getData(),n=t.tree;n.eachNode(function(a){var i=a.getModel(),o=i.getModel("itemStyle").getItemStyle(),s=t.ensureUniqueItemVisual(a.dataIndex,"style");Q(s,o)})})}function MQ(r){r.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(n){var a=e.dataIndex,i=n.getData().tree,o=i.getNodeByDataIndex(a);o.isExpand=!o.isExpand})}),r.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,t,n){t.eachComponent({mainType:"series",subType:"tree",query:e},function(a){var i=a.coordinateSystem,o=kb(i,e,void 0,n);a.setCenter&&a.setCenter(o.center),a.setZoom&&a.setZoom(o.zoom)})})}function AQ(r){r.registerChartView(fQ),r.registerSeriesModel(wQ),r.registerLayout(CQ),r.registerVisual(DQ),MQ(r)}var rR=["treemapZoomToNode","treemapRender","treemapMove"];function LQ(r){for(var e=0;e<rR.length;e++)r.registerAction({type:rR[e],update:"updateView"},Ot);r.registerAction({type:"treemapRootToNode",update:"updateView"},function(t,n){n.eachComponent({mainType:"series",subType:"treemap",query:t},a);function a(i,o){var s=["treemapZoomToNode","treemapRootToNode"],l=Qf(t,s,i);if(l){var u=i.getViewRoot();u&&(t.direction=Hb(u,l.node)?"rollUp":"drillDown"),i.resetViewRoot(l.node)}}})}function nR(r){var e=r.getData(),t=e.tree,n={};t.eachNode(function(a){for(var i=a;i&&i.depth>1;)i=i.parentNode;var o=G_(r.ecModel,i.name||i.dataIndex+"",n);a.setVisual("decal",o)})}var IQ=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventUsingHoverLayer=!0,t}return e.prototype.getInitialData=function(t,n){var a={name:t.name,children:t.data};aR(a);var i=t.levels||[],o=this.designatedVisualItemStyle={},s=new lt({itemStyle:o},this,n);i=t.levels=PQ(i,n);var l=J(i||[],function(f){return new lt(f,s,n)},this),u=$b.createTree(a,this,c);function c(f){f.wrapMethod("getItemModel",function(h,v){var d=u.getNodeByDataIndex(v),p=d?l[d.depth]:null;return h.parentModel=p||s,h})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,n,a){var i=this.getData(),o=this.getRawValue(t),s=i.getName(t);return nr("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(t){var n=r.prototype.getDataParams.apply(this,arguments),a=this.getData().tree.getNodeByDataIndex(t);return n.treeAncestors=jp(a,this),n.treePathInfo=n.treeAncestors,n},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},Q(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var n=this._idIndexMap;n||(n=this._idIndexMap=ge(),this._idIndexMapCount=0);var a=n.get(t);return a==null&&n.set(t,a=this._idIndexMapCount++),a},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var n=this.getRawData().tree.root;(!t||t!==n&&!n.contains(t))&&(this._viewRoot=n)},e.prototype.enableAriaDecal=function(){nR(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"\u25B6",zoomToNodeRatio:.32*.32,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(yt);function aR(r){var e=0;L(r.children,function(n){aR(n);var a=n.value;K(a)&&(a=a[0]),e+=a});var t=r.value;K(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),K(r.value)?r.value[0]=t:r.value=t}function PQ(r,e){var t=st(e.get("color")),n=st(e.get(["aria","decal","decals"]));if(!!t){r=r||[];var a,i;L(r,function(s){var l=new lt(s),u=l.get("color"),c=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(a=!0),(l.get(["itemStyle","decal"])||c&&c!=="none")&&(i=!0)});var o=r[0]||(r[0]={});return a||(o.color=t.slice()),!i&&n&&(o.decal=n.slice()),r}}var EQ=IQ,OQ=8,iR=8,Gb=5,RQ=function(){function r(e){this.group=new Te,e.add(this.group)}return r.prototype.render=function(e,t,n,a){var i=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!i.get("show")||!n)){var s=i.getModel("itemStyle"),l=i.getModel("emphasis"),u=s.getModel("textStyle"),c=l.getModel(["itemStyle","textStyle"]),f={pos:{left:i.get("left"),right:i.get("right"),top:i.get("top"),bottom:i.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:i.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,f,u),this._renderContent(e,f,s,l,u,c,a),Hd(o,f.pos,f.box)}},r.prototype._prepare=function(e,t,n){for(var a=e;a;a=a.parentNode){var i=qt(a.getModel().get("name"),""),o=n.getTextRect(i),s=Math.max(o.width+OQ*2,t.emptyItemWidth);t.totalWidth+=s+iR,t.renderList.push({node:a,text:i,width:s})}},r.prototype._renderContent=function(e,t,n,a,i,o,s){for(var l=0,u=t.emptyItemWidth,c=e.get(["breadcrumb","height"]),f=A7(t.pos,t.box),h=t.totalWidth,v=t.renderList,d=a.getModel("itemStyle").getItemStyle(),p=v.length-1;p>=0;p--){var g=v[p],y=g.node,m=g.width,_=g.text;h>f.width&&(h-=m-u,m=u,_=null);var b=new Gr({shape:{points:NQ(l,0,m,c,p===v.length-1,p===0)},style:me(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new We({style:gt(i,{text:_})}),textConfig:{position:"inside"},z2:zl*1e4,onclick:Ae(s,y)});b.disableLabelAnimation=!0,b.getTextContent().ensureState("emphasis").style=gt(o,{text:_}),b.ensureState("emphasis").style=d,Lt(b,a.get("focus"),a.get("blurScope"),a.get("disabled")),this.group.add(b),kQ(b,e,y),l+=m+iR}},r.prototype.remove=function(){this.group.removeAll()},r}();function NQ(r,e,t,n,a,i){var o=[[a?r:r-Gb,e],[r+t,e],[r+t,e+n],[a?r:r-Gb,e+n]];return!i&&o.splice(2,0,[r+t+Gb,e+n/2]),!a&&o.push([r,e+n/2]),o}function kQ(r,e,t){Me(r).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:t&&t.dataIndex,name:t&&t.name},treePathInfo:t&&jp(t,e)}}var BQ=RQ,zQ=function(){function r(){this._storage=[],this._elExistsMap={}}return r.prototype.add=function(e,t,n,a,i){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:n,delay:a,easing:i}),!0)},r.prototype.finished=function(e){return this._finishedCallback=e,this},r.prototype.start=function(){for(var e=this,t=this._storage.length,n=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},a=0,i=this._storage.length;a<i;a++){var o=this._storage[a];o.el.animateTo(o.target,{duration:o.duration,delay:o.delay,easing:o.easing,setToFinal:!0,done:n,aborted:n})}return this},r}();function FQ(){return new zQ}var Wb=Te,oR=Ge,sR=3,lR="label",uR="upperLabel",VQ=zl*10,$Q=zl*2,HQ=zl*3,js=is([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),cR=function(r){var e=js(r);return e.stroke=e.fill=e.lineWidth=null,e},Yp=Ye(),GQ=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._state="ready",t._storage=Jf(),t}return e.prototype.render=function(t,n,a,i){var o=n.findComponents({mainType:"series",subType:"treemap",query:i});if(!(Ne(o,t)<0)){this.seriesModel=t,this.api=a,this.ecModel=n;var s=["treemapZoomToNode","treemapRootToNode"],l=Qf(i,s,t),u=i&&i.type,c=t.layoutInfo,f=!this._oldTree,h=this._storage,v=u==="treemapRootToNode"&&l&&h?{rootNodeGroup:h.nodeGroup[l.node.getRawIndex()],direction:i.direction}:null,d=this._giveContainerGroup(c),p=t.get("animation"),g=this._doRender(d,t,v);p&&!f&&(!u||u==="treemapZoomToNode"||u==="treemapRootToNode")?this._doAnimation(d,g,t,v):g.renderFinally(),this._resetController(a),this._renderBreadcrumb(t,a,l)}},e.prototype._giveContainerGroup=function(t){var n=this._containerGroup;return n||(n=this._containerGroup=new Wb,this._initEvents(n),this.group.add(n)),n.x=t.x,n.y=t.y,n},e.prototype._doRender=function(t,n,a){var i=n.getData().tree,o=this._oldTree,s=Jf(),l=Jf(),u=this._storage,c=[];function f(g,y,m,_){return WQ(n,l,u,a,s,c,g,y,m,_)}v(i.root?[i.root]:[],o&&o.root?[o.root]:[],t,i===o||!o,0);var h=d(u);return this._oldTree=i,this._storage=l,{lastsForAnimation:s,willDeleteEls:h,renderFinally:p};function v(g,y,m,_,b){_?(y=g,L(g,function(S,T){!S.isRemoved()&&x(T,T)})):new pi(y,g,w,w).add(x).update(x).remove(Ae(x,null)).execute();function w(S){return S.getId()}function x(S,T){var D=S!=null?g[S]:null,M=T!=null?y[T]:null,A=f(D,M,m,b);A&&v(D&&D.viewChildren||[],M&&M.viewChildren||[],A,_,b+1)}}function d(g){var y=Jf();return g&&L(g,function(m,_){var b=y[_];L(m,function(w){w&&(b.push(w),Yp(w).willDelete=!0)})}),y}function p(){L(h,function(g){L(g,function(y){y.parent&&y.parent.remove(y)})}),L(c,function(g){g.invisible=!0,g.dirty()})}},e.prototype._doAnimation=function(t,n,a,i){var o=a.get("animationDurationUpdate"),s=a.get("animationEasing"),l=(ye(o)?0:o)||0,u=(ye(s)?null:s)||"cubicOut",c=FQ();L(n.willDeleteEls,function(f,h){L(f,function(v,d){if(!v.invisible){var p=v.parent,g,y=Yp(p);if(i&&i.direction==="drillDown")g=p===i.rootNodeGroup?{shape:{x:0,y:0,width:y.nodeWidth,height:y.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var m=0,_=0;y.willDelete||(m=y.nodeWidth/2,_=y.nodeHeight/2),g=h==="nodeGroup"?{x:m,y:_,style:{opacity:0}}:{shape:{x:m,y:_,width:0,height:0},style:{opacity:0}}}g&&c.add(v,g,l,0,u)}})}),L(this._storage,function(f,h){L(f,function(v,d){var p=n.lastsForAnimation[h][d],g={};!p||(v instanceof Te?p.oldX!=null&&(g.x=v.x,g.y=v.y,v.x=p.oldX,v.y=p.oldY):(p.oldShape&&(g.shape=Q({},v.shape),v.setShape(p.oldShape)),p.fadein?(v.setStyle("opacity",0),g.style={opacity:1}):v.style.opacity!==1&&(g.style={opacity:1})),c.add(v,g,l,0,u))})},this),this._state="animating",c.finished(fe(function(){this._state="ready",n.renderFinally()},this)).start()},e.prototype._resetController=function(t){var n=this._controller;n||(n=this._controller=new Yf(t.getZr()),n.enable(this.seriesModel.get("roam")),n.on("pan",fe(this._onPan,this)),n.on("zoom",fe(this._onZoom,this)));var a=new Re(0,0,t.getWidth(),t.getHeight());n.setPointerChecker(function(i,o,s){return a.contain(o,s)})},e.prototype._clearController=function(){var t=this._controller;t&&(t.dispose(),t=null)},e.prototype._onPan=function(t){if(this._state!=="animating"&&(Math.abs(t.dx)>sR||Math.abs(t.dy)>sR)){var n=this.seriesModel.getData().tree.root;if(!n)return;var a=n.getLayout();if(!a)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:a.x+t.dx,y:a.y+t.dy,width:a.width,height:a.height}})}},e.prototype._onZoom=function(t){var n=t.originX,a=t.originY;if(this._state!=="animating"){var i=this.seriesModel.getData().tree.root;if(!i)return;var o=i.getLayout();if(!o)return;var s=new Re(o.x,o.y,o.width,o.height),l=this.seriesModel.layoutInfo;n-=l.x,a-=l.y;var u=gn();oa(u,u,[-n,-a]),Ev(u,u,[t.scale,t.scale]),oa(u,u,[n,a]),s.applyTransform(u),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:s.x,y:s.y,width:s.width,height:s.height}})}},e.prototype._initEvents=function(t){var n=this;t.on("click",function(a){if(n._state==="ready"){var i=n.seriesModel.get("nodeClick",!0);if(!!i){var o=n.findTarget(a.offsetX,a.offsetY);if(!!o){var s=o.node;if(s.getLayout().isLeafRoot)n._rootToNode(o);else if(i==="zoomToNode")n._zoomToNode(o);else if(i==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),c=l.get("target",!0)||"blank";u&&Vd(u,c)}}}}},this)},e.prototype._renderBreadcrumb=function(t,n,a){var i=this;a||(a=t.get("leafDepth",!0)!=null?{node:t.getViewRoot()}:this.findTarget(n.getWidth()/2,n.getHeight()/2),a||(a={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new BQ(this.group))).render(t,n,a.node,function(o){i._state!=="animating"&&(Hb(t.getViewRoot(),o)?i._rootToNode({node:o}):i._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Jf(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,n){var a,i=this.seriesModel.getViewRoot();return i.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(t,n),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)a={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),a},e.type="treemap",e}(ut);function Jf(){return{nodeGroup:[],background:[],content:[]}}function WQ(r,e,t,n,a,i,o,s,l,u){if(!o)return;var c=o.getLayout(),f=r.getData(),h=o.getModel();if(f.setItemGraphicEl(o.dataIndex,null),!c||!c.isInView)return;var v=c.width,d=c.height,p=c.borderWidth,g=c.invisible,y=o.getRawIndex(),m=s&&s.getRawIndex(),_=o.viewChildren,b=c.upperHeight,w=_&&_.length,x=h.getModel("itemStyle"),S=h.getModel(["emphasis","itemStyle"]),T=h.getModel(["blur","itemStyle"]),D=h.getModel(["select","itemStyle"]),M=x.get("borderRadius")||0,A=X("nodeGroup",Wb);if(!A)return;if(l.add(A),A.x=c.x||0,A.y=c.y||0,A.markRedraw(),Yp(A).nodeWidth=v,Yp(A).nodeHeight=d,c.isAboveViewRoot)return A;var I=X("background",oR,u,$Q);I&&U(A,I,w&&c.upperLabelHeight);var P=h.getModel("emphasis"),E=P.get("focus"),O=P.get("blurScope"),N=P.get("disabled"),V=E==="ancestor"?o.getAncestorsIndices():E==="descendant"?o.getDescendantIndices():E;if(w)qc(A)&&gs(A,!1),I&&(gs(I,!N),f.setItemGraphicEl(o.dataIndex,I),u_(I,V,O));else{var $=X("content",oR,u,HQ);$&&Y(A,$),I.disableMorphing=!0,I&&qc(I)&&gs(I,!1),gs(A,!N),f.setItemGraphicEl(o.dataIndex,A),u_(A,V,O)}return A;function U(se,te,ve){var R=Me(te);if(R.dataIndex=o.dataIndex,R.seriesIndex=r.seriesIndex,te.setShape({x:0,y:0,width:v,height:d,r:M}),g)ae(te);else{te.invisible=!1;var F=o.getVisual("style"),G=F.stroke,re=cR(x);re.fill=G;var ne=js(S);ne.fill=S.get("borderColor");var ee=js(T);ee.fill=T.get("borderColor");var ue=js(D);if(ue.fill=D.get("borderColor"),ve){var De=v-2*p;H(te,G,F.opacity,{x:p,y:0,width:De,height:b})}else te.removeTextContent();te.setStyle(re),te.ensureState("emphasis").style=ne,te.ensureState("blur").style=ee,te.ensureState("select").style=ue,ps(te)}se.add(te)}function Y(se,te){var ve=Me(te);ve.dataIndex=o.dataIndex,ve.seriesIndex=r.seriesIndex;var R=Math.max(v-2*p,0),F=Math.max(d-2*p,0);if(te.culling=!0,te.setShape({x:p,y:p,width:R,height:F,r:M}),g)ae(te);else{te.invisible=!1;var G=o.getVisual("style"),re=G.fill,ne=cR(x);ne.fill=re,ne.decal=G.decal;var ee=js(S),ue=js(T),De=js(D);H(te,re,G.opacity,null),te.setStyle(ne),te.ensureState("emphasis").style=ee,te.ensureState("blur").style=ue,te.ensureState("select").style=De,ps(te)}se.add(te)}function ae(se){!se.invisible&&i.push(se)}function H(se,te,ve,R){var F=h.getModel(R?uR:lR),G=qt(h.get("name"),null),re=F.getShallow("show");yr(se,rr(h,R?uR:lR),{defaultText:re?G:null,inheritColor:te,defaultOpacity:ve,labelFetcher:r,labelDataIndex:o.dataIndex});var ne=se.getTextContent();if(!!ne){var ee=ne.style,ue=Av(ee.padding||0);R&&(se.setTextConfig({layoutRect:R}),ne.disableLabelLayout=!0),ne.beforeUpdate=function(){var vt=Math.max((R?R.width:se.shape.width)-ue[1]-ue[3],0),rt=Math.max((R?R.height:se.shape.height)-ue[0]-ue[2],0);(ee.width!==vt||ee.height!==rt)&&ne.setStyle({width:vt,height:rt})},ee.truncateMinChar=2,ee.lineOverflow="truncate",q(ee,R,c);var De=ne.getState("emphasis");q(De?De.style:null,R,c)}}function q(se,te,ve){var R=se?se.text:null;if(!te&&ve.isLeafRoot&&R!=null){var F=r.get("drillDownIcon",!0);se.text=F?F+" "+R:R}}function X(se,te,ve,R){var F=m!=null&&t[se][m],G=a[se];return F?(t[se][m]=null,Z(G,F)):g||(F=new te,F instanceof Bn&&(F.z2=UQ(ve,R)),ie(G,F)),e[se][y]=F}function Z(se,te){var ve=se[y]={};te instanceof Wb?(ve.oldX=te.x,ve.oldY=te.y):ve.oldShape=Q({},te.shape)}function ie(se,te){var ve=se[y]={},R=o.parentNode,F=te instanceof Te;if(R&&(!n||n.direction==="drillDown")){var G=0,re=0,ne=a.background[R.getRawIndex()];!n&&ne&&ne.oldShape&&(G=ne.oldShape.width,re=ne.oldShape.height),F?(ve.oldX=0,ve.oldY=re):ve.oldShape={x:G,y:re,width:0,height:0}}ve.fadein=!F}}function UQ(r,e){return r*VQ+e}var jQ=GQ,eh=L,YQ=_e,qp=-1,Ub=function(){function r(e){var t=e.mappingMethod,n=e.type,a=this.option=we(e);this.type=n,this.mappingMethod=t,this._normalizeData=XQ[t];var i=r.visualHandlers[n];this.applyVisual=i.applyVisual,this.getColorMapper=i.getColorMapper,this._normalizedToVisual=i._normalizedToVisual[t],t==="piecewise"?(jb(a),qQ(a)):t==="category"?a.categories?ZQ(a):jb(a,!0):(Dr(t!=="linear"||a.dataExtent),jb(a))}return r.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},r.prototype.getNormalizer=function(){return fe(this._normalizeData,this)},r.listVisualTypes=function(){return Fe(r.visualHandlers)},r.isValidType=function(e){return r.visualHandlers.hasOwnProperty(e)},r.eachVisual=function(e,t,n){_e(e)?L(e,t,n):t.call(n,e)},r.mapVisual=function(e,t,n){var a,i=K(e)?[]:_e(e)?{}:(a=!0,null);return r.eachVisual(e,function(o,s){var l=t.call(n,o,s);a?i=l:i[s]=l}),i},r.retrieveVisuals=function(e){var t={},n;return e&&eh(r.visualHandlers,function(a,i){e.hasOwnProperty(i)&&(t[i]=e[i],n=!0)}),n?t:null},r.prepareVisualTypes=function(e){if(K(e))e=e.slice();else if(YQ(e)){var t=[];eh(e,function(n,a){t.push(a)}),e=t}else return[];return e.sort(function(n,a){return a==="color"&&n!=="color"&&n.indexOf("color")===0?1:-1}),e},r.dependsOn=function(e,t){return t==="color"?!!(e&&e.indexOf(t)===0):e===t},r.findPieceIndex=function(e,t,n){for(var a,i=1/0,o=0,s=t.length;o<s;o++){var l=t[o].value;if(l!=null){if(l===e||ce(l)&&l===e+"")return o;n&&h(l,o)}}for(var o=0,s=t.length;o<s;o++){var u=t[o],c=u.interval,f=u.close;if(c){if(c[0]===-1/0){if(Xp(f[1],e,c[1]))return o}else if(c[1]===1/0){if(Xp(f[0],c[0],e))return o}else if(Xp(f[0],c[0],e)&&Xp(f[1],e,c[1]))return o;n&&h(c[0],o),n&&h(c[1],o)}}if(n)return e===1/0?t.length-1:e===-1/0?0:a;function h(v,d){var p=Math.abs(v-e);p<i&&(i=p,a=d)}},r.visualHandlers={color:{applyVisual:th("color"),getColorMapper:function(){var e=this.option;return fe(e.mappingMethod==="category"?function(t,n){return!n&&(t=this._normalizeData(t)),rh.call(this,t)}:function(t,n,a){var i=!!a;return!n&&(t=this._normalizeData(t)),a=Mc(t,e.parsedVisual,a),i?a:la(a,"rgba")},this)},_normalizedToVisual:{linear:function(e){return la(Mc(e,this.option.parsedVisual),"rgba")},category:rh,piecewise:function(e,t){var n=qb.call(this,t);return n==null&&(n=la(Mc(e,this.option.parsedVisual),"rgba")),n},fixed:Ys}},colorHue:Zp(function(e,t){return Pl(e,t)}),colorSaturation:Zp(function(e,t){return Pl(e,null,t)}),colorLightness:Zp(function(e,t){return Pl(e,null,null,t)}),colorAlpha:Zp(function(e,t){return Ac(e,t)}),decal:{applyVisual:th("decal"),_normalizedToVisual:{linear:null,category:rh,piecewise:null,fixed:null}},opacity:{applyVisual:th("opacity"),_normalizedToVisual:Yb([0,1])},liftZ:{applyVisual:th("liftZ"),_normalizedToVisual:{linear:Ys,category:Ys,piecewise:Ys,fixed:Ys}},symbol:{applyVisual:function(e,t,n){var a=this.mapValueToVisual(e);n("symbol",a)},_normalizedToVisual:{linear:fR,category:rh,piecewise:function(e,t){var n=qb.call(this,t);return n==null&&(n=fR.call(this,e)),n},fixed:Ys}},symbolSize:{applyVisual:th("symbolSize"),_normalizedToVisual:Yb([0,1])}},r}();function qQ(r){var e=r.pieceList;r.hasSpecialVisual=!1,L(e,function(t,n){t.originIndex=n,t.visual!=null&&(r.hasSpecialVisual=!0)})}function ZQ(r){var e=r.categories,t=r.categoryMap={},n=r.visual;if(eh(e,function(o,s){t[o]=s}),!K(n)){var a=[];_e(n)?eh(n,function(o,s){var l=t[s];a[l!=null?l:qp]=o}):a[qp]=n,n=hR(r,a)}for(var i=e.length-1;i>=0;i--)n[i]==null&&(delete t[e[i]],e.pop())}function jb(r,e){var t=r.visual,n=[];_e(t)?eh(t,function(i){n.push(i)}):t!=null&&n.push(t);var a={color:1,symbol:1};!e&&n.length===1&&!a.hasOwnProperty(r.type)&&(n[1]=n[0]),hR(r,n)}function Zp(r){return{applyVisual:function(e,t,n){var a=this.mapValueToVisual(e);n("color",r(t("color"),a))},_normalizedToVisual:Yb([0,1])}}function fR(r){var e=this.option.visual;return e[Math.round(at(r,[0,1],[0,e.length-1],!0))]||{}}function th(r){return function(e,t,n){n(r,this.mapValueToVisual(e))}}function rh(r){var e=this.option.visual;return e[this.option.loop&&r!==qp?r%e.length:r]}function Ys(){return this.option.visual[0]}function Yb(r){return{linear:function(e){return at(e,r,this.option.visual,!0)},category:rh,piecewise:function(e,t){var n=qb.call(this,t);return n==null&&(n=at(e,r,this.option.visual,!0)),n},fixed:Ys}}function qb(r){var e=this.option,t=e.pieceList;if(e.hasSpecialVisual){var n=Ub.findPieceIndex(r,t),a=t[n];if(a&&a.visual)return a.visual[this.type]}}function hR(r,e){return r.visual=e,r.type==="color"&&(r.parsedVisual=J(e,function(t){var n=Fr(t);return n||[0,0,0,1]})),e}var XQ={linear:function(r){return at(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var e=this.option.pieceList,t=Ub.findPieceIndex(r,e,!0);if(t!=null)return at(t,[0,e.length-1],[0,1],!0)},category:function(r){var e=this.option.categories?this.option.categoryMap[r]:r;return e==null?qp:e},fixed:Ot};function Xp(r,e,t){return r?e<=t:e<t}var _r=Ub,QQ="itemStyle",vR=Ye(),KQ={seriesType:"treemap",reset:function(r){var e=r.getData().tree,t=e.root;t.isRemoved()||dR(t,{},r.getViewRoot().getAncestors(),r)}};function dR(r,e,t,n){var a=r.getModel(),i=r.getLayout(),o=r.hostTree.data;if(!(!i||i.invisible||!i.isInView)){var s=a.getModel(QQ),l=JQ(s,e,n),u=o.ensureUniqueItemVisual(r.dataIndex,"style"),c=s.get("borderColor"),f=s.get("borderColorSaturation"),h;f!=null&&(h=pR(l),c=eK(f,h)),u.stroke=c;var v=r.viewChildren;if(!v||!v.length)h=pR(l),u.fill=h;else{var d=tK(r,a,i,s,l,v);L(v,function(p,g){if(p.depth>=t.length||p===t[p.depth]){var y=rK(a,l,p,g,d,n);dR(p,y,t,n)}})}}}function JQ(r,e,t){var n=Q({},e),a=t.designatedVisualItemStyle;return L(["color","colorAlpha","colorSaturation"],function(i){a[i]=e[i];var o=r.get(i);a[i]=null,o!=null&&(n[i]=o)}),n}function pR(r){var e=Zb(r,"color");if(e){var t=Zb(r,"colorAlpha"),n=Zb(r,"colorSaturation");return n&&(e=Pl(e,null,null,n)),t&&(e=Ac(e,t)),e}}function eK(r,e){return e!=null?Pl(e,null,null,r):null}function Zb(r,e){var t=r[e];if(t!=null&&t!=="none")return t}function tK(r,e,t,n,a,i){if(!(!i||!i.length)){var o=Xb(e,"color")||a.color!=null&&a.color!=="none"&&(Xb(e,"colorAlpha")||Xb(e,"colorSaturation"));if(!!o){var s=e.get("visualMin"),l=e.get("visualMax"),u=t.dataExtent.slice();s!=null&&s<u[0]&&(u[0]=s),l!=null&&l>u[1]&&(u[1]=l);var c=e.get("colorMappingBy"),f={type:o.name,dataExtent:u,visual:o.range};f.type==="color"&&(c==="index"||c==="id")?(f.mappingMethod="category",f.loop=!0):f.mappingMethod="linear";var h=new _r(f);return vR(h).drColorMappingBy=c,h}}}function Xb(r,e){var t=r.get(e);return K(t)&&t.length?{name:e,range:t}:null}function rK(r,e,t,n,a,i){var o=Q({},e);if(a){var s=a.type,l=s==="color"&&vR(a).drColorMappingBy,u=l==="index"?n:l==="id"?i.mapIdToIndex(t.getId()):t.getValue(r.get("visualDimension"));o[s]=a.mapValueToVisual(u)}return o}var nh=Math.max,Qp=Math.min,gR=Jt,Qb=L,yR=["itemStyle","borderWidth"],nK=["itemStyle","gapWidth"],aK=["upperLabel","show"],iK=["upperLabel","height"],oK={seriesType:"treemap",reset:function(r,e,t,n){var a=t.getWidth(),i=t.getHeight(),o=r.option,s=Ht(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),l=o.size||[],u=le(gR(s.width,l[0]),a),c=le(gR(s.height,l[1]),i),f=n&&n.type,h=["treemapZoomToNode","treemapRootToNode"],v=Qf(n,h,r),d=f==="treemapRender"||f==="treemapMove"?n.rootRect:null,p=r.getViewRoot(),g=tR(p);if(f!=="treemapMove"){var y=f==="treemapZoomToNode"?hK(r,v,p,u,c):d?[d.width,d.height]:[u,c],m=o.sort;m&&m!=="asc"&&m!=="desc"&&(m="desc");var _={squareRatio:o.squareRatio,sort:m,leafDepth:o.leafDepth};p.hostTree.clearLayouts();var b={x:0,y:0,width:y[0],height:y[1],area:y[0]*y[1]};p.setLayout(b),mR(p,_,!1,0),b=p.getLayout(),Qb(g,function(x,S){var T=(g[S+1]||p).getValue();x.setLayout(Q({dataExtent:[T,T],borderWidth:0,upperHeight:0},b))})}var w=r.getData().tree.root;w.setLayout(vK(s,d,v),!0),r.setLayoutInfo(s),bR(w,new Re(-s.x,-s.y,a,i),g,p,0)}};function mR(r,e,t,n){var a,i;if(!r.isRemoved()){var o=r.getLayout();a=o.width,i=o.height;var s=r.getModel(),l=s.get(yR),u=s.get(nK)/2,c=xR(s),f=Math.max(l,c),h=l-u,v=f-u;r.setLayout({borderWidth:l,upperHeight:f,upperLabelHeight:c},!0),a=nh(a-2*h,0),i=nh(i-h-v,0);var d=a*i,p=sK(r,s,d,e,t,n);if(!!p.length){var g={x:h,y:v,width:a,height:i},y=Qp(a,i),m=1/0,_=[];_.area=0;for(var b=0,w=p.length;b<w;){var x=p[b];_.push(x),_.area+=x.getLayout().area;var S=fK(_,y,e.squareRatio);S<=m?(b++,m=S):(_.area-=_.pop().getLayout().area,_R(_,y,g,u,!1),y=Qp(g.width,g.height),_.length=_.area=0,m=1/0)}if(_.length&&_R(_,y,g,u,!0),!t){var T=s.get("childrenVisibleMin");T!=null&&d<T&&(t=!0)}for(var b=0,w=p.length;b<w;b++)mR(p[b],e,t,n+1)}}}function sK(r,e,t,n,a,i){var o=r.children||[],s=n.sort;s!=="asc"&&s!=="desc"&&(s=null);var l=n.leafDepth!=null&&n.leafDepth<=i;if(a&&!l)return r.viewChildren=[];o=nt(o,function(v){return!v.isRemoved()}),uK(o,s);var u=cK(e,o,s);if(u.sum===0)return r.viewChildren=[];if(u.sum=lK(e,t,u.sum,s,o),u.sum===0)return r.viewChildren=[];for(var c=0,f=o.length;c<f;c++){var h=o[c].getValue()/u.sum*t;o[c].setLayout({area:h})}return l&&(o.length&&r.setLayout({isLeafRoot:!0},!0),o.length=0),r.viewChildren=o,r.setLayout({dataExtent:u.dataExtent},!0),o}function lK(r,e,t,n,a){if(!n)return t;for(var i=r.get("visibleMin"),o=a.length,s=o,l=o-1;l>=0;l--){var u=a[n==="asc"?o-l-1:l].getValue();u/t*e<i&&(s=l,t-=u)}return n==="asc"?a.splice(0,o-s):a.splice(s,o-s),t}function uK(r,e){return e&&r.sort(function(t,n){var a=e==="asc"?t.getValue()-n.getValue():n.getValue()-t.getValue();return a===0?e==="asc"?t.dataIndex-n.dataIndex:n.dataIndex-t.dataIndex:a}),r}function cK(r,e,t){for(var n=0,a=0,i=e.length;a<i;a++)n+=e[a].getValue();var o=r.get("visualDimension"),s;return!e||!e.length?s=[NaN,NaN]:o==="value"&&t?(s=[e[e.length-1].getValue(),e[0].getValue()],t==="asc"&&s.reverse()):(s=[1/0,-1/0],Qb(e,function(l){var u=l.getValue(o);u<s[0]&&(s[0]=u),u>s[1]&&(s[1]=u)})),{sum:n,dataExtent:s}}function fK(r,e,t){for(var n=0,a=1/0,i=0,o=void 0,s=r.length;i<s;i++)o=r[i].getLayout().area,o&&(o<a&&(a=o),o>n&&(n=o));var l=r.area*r.area,u=e*e*t;return l?nh(u*n/l,l/(u*a)):1/0}function _R(r,e,t,n,a){var i=e===t.width?0:1,o=1-i,s=["x","y"],l=["width","height"],u=t[s[i]],c=e?r.area/e:0;(a||c>t[l[o]])&&(c=t[l[o]]);for(var f=0,h=r.length;f<h;f++){var v=r[f],d={},p=c?v.getLayout().area/c:0,g=d[l[o]]=nh(c-2*n,0),y=t[s[i]]+t[l[i]]-u,m=f===h-1||y<p?y:p,_=d[l[i]]=nh(m-2*n,0);d[s[o]]=t[s[o]]+Qp(n,g/2),d[s[i]]=u+Qp(n,_/2),u+=m,v.setLayout(d,!0)}t[s[o]]+=c,t[l[o]]-=c}function hK(r,e,t,n,a){var i=(e||{}).node,o=[n,a];if(!i||i===t)return o;for(var s,l=n*a,u=l*r.option.zoomToNodeRatio;s=i.parentNode;){for(var c=0,f=s.children,h=0,v=f.length;h<v;h++)c+=f[h].getValue();var d=i.getValue();if(d===0)return o;u*=c/d;var p=s.getModel(),g=p.get(yR),y=Math.max(g,xR(p));u+=4*g*g+(3*g+y)*Math.pow(u,.5),u>L0&&(u=L0),i=s}u<l&&(u=l);var m=Math.pow(u/l,.5);return[n*m,a*m]}function vK(r,e,t){if(e)return{x:e.x,y:e.y};var n={x:0,y:0};if(!t)return n;var a=t.node,i=a.getLayout();if(!i)return n;for(var o=[i.width/2,i.height/2],s=a;s;){var l=s.getLayout();o[0]+=l.x,o[1]+=l.y,s=s.parentNode}return{x:r.width/2-o[0],y:r.height/2-o[1]}}function bR(r,e,t,n,a){var i=r.getLayout(),o=t[a],s=o&&o===r;if(!(o&&!s||a===t.length&&r!==n)){r.setLayout({isInView:!0,invisible:!s&&!e.intersect(i),isAboveViewRoot:s},!0);var l=new Re(e.x-i.x,e.y-i.y,e.width,e.height);Qb(r.viewChildren||[],function(u){bR(u,l,t,n,a+1)})}}function xR(r){return r.get(aK)?r.get(iK):0}function dK(r){r.registerSeriesModel(EQ),r.registerChartView(jQ),r.registerVisual(KQ),r.registerLayout(oK),LQ(r)}function pK(r){var e=r.findComponents({mainType:"legend"});!e||!e.length||r.eachSeriesByType("graph",function(t){var n=t.getCategoriesData(),a=t.getGraph(),i=a.data,o=n.mapArray(n.getName);i.filterSelf(function(s){var l=i.getItemModel(s),u=l.getShallow("category");if(u!=null){je(u)&&(u=o[u]);for(var c=0;c<e.length;c++)if(!e[c].isSelected(u))return!1}return!0})})}function gK(r){var e={};r.eachSeriesByType("graph",function(t){var n=t.getCategoriesData(),a=t.getData(),i={};n.each(function(o){var s=n.getName(o);i["ec-"+s]=o;var l=n.getItemModel(o),u=l.getModel("itemStyle").getItemStyle();u.fill||(u.fill=t.getColorFromPalette(s,e)),n.setItemVisual(o,"style",u);for(var c=["symbol","symbolSize","symbolKeepAspect"],f=0;f<c.length;f++){var h=l.getShallow(c[f],!0);h!=null&&n.setItemVisual(o,c[f],h)}}),n.count()&&a.each(function(o){var s=a.getItemModel(o),l=s.getShallow("category");if(l!=null){ce(l)&&(l=i["ec-"+l]);var u=n.getItemVisual(l,"style"),c=a.ensureUniqueItemVisual(o,"style");Q(c,u);for(var f=["symbol","symbolSize","symbolKeepAspect"],h=0;h<f.length;h++)a.setItemVisual(o,f[h],n.getItemVisual(l,f[h]))}})})}function Kp(r){return r instanceof Array||(r=[r,r]),r}function yK(r){r.eachSeriesByType("graph",function(e){var t=e.getGraph(),n=e.getEdgeData(),a=Kp(e.get("edgeSymbol")),i=Kp(e.get("edgeSymbolSize"));n.setVisual("fromSymbol",a&&a[0]),n.setVisual("toSymbol",a&&a[1]),n.setVisual("fromSymbolSize",i&&i[0]),n.setVisual("toSymbolSize",i&&i[1]),n.setVisual("style",e.getModel("lineStyle").getLineStyle()),n.each(function(o){var s=n.getItemModel(o),l=t.getEdgeByIndex(o),u=Kp(s.getShallow("symbol",!0)),c=Kp(s.getShallow("symbolSize",!0)),f=s.getModel("lineStyle").getLineStyle(),h=n.ensureUniqueItemVisual(o,"style");switch(Q(h,f),h.stroke){case"source":{var v=l.node1.getVisual("style");h.stroke=v&&v.fill;break}case"target":{var v=l.node2.getVisual("style");h.stroke=v&&v.fill;break}}u[0]&&l.setVisual("fromSymbol",u[0]),u[1]&&l.setVisual("toSymbol",u[1]),c[0]&&l.setVisual("fromSymbolSize",c[0]),c[1]&&l.setVisual("toSymbolSize",c[1])})})}var Kb="-->",Jp=function(r){return r.get("autoCurveness")||null},wR=function(r,e){var t=Jp(r),n=20,a=[];if(je(t))n=t;else if(K(t)){r.__curvenessList=t;return}e>n&&(n=e);var i=n%2?n+2:n+3;a=[];for(var o=0;o<i;o++)a.push((o%2?o+1:o)/10*(o%2?-1:1));r.__curvenessList=a},ah=function(r,e,t){var n=[r.id,r.dataIndex].join("."),a=[e.id,e.dataIndex].join(".");return[t.uid,n,a].join(Kb)},SR=function(r){var e=r.split(Kb);return[e[0],e[2],e[1]].join(Kb)},mK=function(r,e){var t=ah(r.node1,r.node2,e);return e.__edgeMap[t]},_K=function(r,e){var t=Jb(ah(r.node1,r.node2,e),e),n=Jb(ah(r.node2,r.node1,e),e);return t+n},Jb=function(r,e){var t=e.__edgeMap;return t[r]?t[r].length:0};function bK(r){!Jp(r)||(r.__curvenessList=[],r.__edgeMap={},wR(r))}function xK(r,e,t,n){if(!!Jp(t)){var a=ah(r,e,t),i=t.__edgeMap,o=i[SR(a)];i[a]&&!o?i[a].isForward=!0:o&&i[a]&&(o.isForward=!0,i[a].isForward=!1),i[a]=i[a]||[],i[a].push(n)}}function ex(r,e,t,n){var a=Jp(e),i=K(a);if(!a)return null;var o=mK(r,e);if(!o)return null;for(var s=-1,l=0;l<o.length;l++)if(o[l]===t){s=l;break}var u=_K(r,e);wR(e,u),r.lineStyle=r.lineStyle||{};var c=ah(r.node1,r.node2,e),f=e.__curvenessList,h=i||u%2?0:1;if(o.isForward)return f[h+s];var v=SR(c),d=Jb(v,e),p=f[s+d+h];return n?i?a&&a[0]===0?(d+h)%2?p:-p:((d%2?0:1)+h)%2?p:-p:(d+h)%2?p:-p:f[s+d+h]}function CR(r){var e=r.coordinateSystem;if(!(e&&e.type!=="view")){var t=r.getGraph();t.eachNode(function(n){var a=n.getModel();n.setLayout([+a.get("x"),+a.get("y")])}),tx(t,r)}}function tx(r,e){r.eachEdge(function(t,n){var a=Ia(t.getModel().get(["lineStyle","curveness"]),-ex(t,e,n,!0),0),i=Pa(t.node1.getLayout()),o=Pa(t.node2.getLayout()),s=[i,o];+a&&s.push([(i[0]+o[0])/2-(i[1]-o[1])*a,(i[1]+o[1])/2-(o[0]-i[0])*a]),t.setLayout(s)})}function wK(r,e){r.eachSeriesByType("graph",function(t){var n=t.get("layout"),a=t.coordinateSystem;if(a&&a.type!=="view"){var i=t.getData(),o=[];L(a.dimensions,function(h){o=o.concat(i.mapDimensionsAll(h))});for(var s=0;s<i.count();s++){for(var l=[],u=!1,c=0;c<o.length;c++){var f=i.get(o[c],s);isNaN(f)||(u=!0),l.push(f)}u?i.setItemLayout(s,a.dataToPoint(l)):i.setItemLayout(s,[NaN,NaN])}tx(i.graph,t)}else(!n||n==="none")&&CR(t)})}function ih(r){var e=r.coordinateSystem;if(e.type!=="view")return 1;var t=r.option.nodeScaleRatio,n=e.scaleX,a=e.getZoom(),i=(a-1)*t+1;return i/n}function oh(r){var e=r.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),+e}var TR=Math.PI,rx=[];function nx(r,e,t,n){var a=r.coordinateSystem;if(!(a&&a.type!=="view")){var i=a.getBoundingRect(),o=r.getData(),s=o.graph,l=i.width/2+i.x,u=i.height/2+i.y,c=Math.min(i.width,i.height)/2,f=o.count();if(o.setLayout({cx:l,cy:u}),!!f){if(t){var h=a.pointToData(n),v=h[0],d=h[1],p=[v-l,d-u];jo(p,p),gc(p,p,c),t.setLayout([l+p[0],u+p[1]],!0);var g=r.get(["circular","rotateLabel"]);DR(t,g,l,u)}SK[e](r,s,o,c,l,u,f),s.eachEdge(function(y,m){var _=Ia(y.getModel().get(["lineStyle","curveness"]),ex(y,r,m),0),b=Pa(y.node1.getLayout()),w=Pa(y.node2.getLayout()),x,S=(b[0]+w[0])/2,T=(b[1]+w[1])/2;+_&&(_*=3,x=[l*_+S*(1-_),u*_+T*(1-_)]),y.setLayout([b,w,x])})}}}var SK={value:function(r,e,t,n,a,i,o){var s=0,l=t.getSum("value"),u=Math.PI*2/(l||o);e.eachNode(function(c){var f=c.getValue("value"),h=u*(l?f:1)/2;s+=h,c.setLayout([n*Math.cos(s)+a,n*Math.sin(s)+i]),s+=h})},symbolSize:function(r,e,t,n,a,i,o){var s=0;rx.length=o;var l=ih(r);e.eachNode(function(f){var h=oh(f);isNaN(h)&&(h=2),h<0&&(h=0),h*=l;var v=Math.asin(h/2/n);isNaN(v)&&(v=TR/2),rx[f.dataIndex]=v,s+=v*2});var u=(2*TR-s)/o/2,c=0;e.eachNode(function(f){var h=u+rx[f.dataIndex];c+=h,(!f.getLayout()||!f.getLayout().fixed)&&f.setLayout([n*Math.cos(c)+a,n*Math.sin(c)+i]),c+=h})}};function DR(r,e,t,n){var a=r.getGraphicEl();if(!!a){var i=r.getModel(),o=i.get(["label","rotate"])||0,s=a.getSymbolPath();if(e){var l=r.getLayout(),u=Math.atan2(l[1]-n,l[0]-t);u<0&&(u=Math.PI*2+u);var c=l[0]<t;c&&(u=u-Math.PI);var f=c?"left":"right";s.setTextConfig({rotation:-u,position:f,origin:"center"});var h=s.ensureState("emphasis");Q(h.textConfig||(h.textConfig={}),{position:f})}else s.setTextConfig({rotation:o*=Math.PI/180})}}function CK(r){r.eachSeriesByType("graph",function(e){e.get("layout")==="circular"&&nx(e,"symbolSize")})}var xu=Lv;function TK(r,e,t){for(var n=r,a=e,i=t.rect,o=i.width,s=i.height,l=[i.x+o/2,i.y+s/2],u=t.gravity==null?.1:t.gravity,c=0;c<n.length;c++){var f=n[c];f.p||(f.p=Gi(o*(Math.random()-.5)+l[0],s*(Math.random()-.5)+l[1])),f.pp=Pa(f.p),f.edges=null}var h=t.friction==null?.6:t.friction,v=h,d,p;return{warmUp:function(){v=h*.8},setFixed:function(g){n[g].fixed=!0},setUnfixed:function(g){n[g].fixed=!1},beforeStep:function(g){d=g},afterStep:function(g){p=g},step:function(g){d&&d(n,a);for(var y=[],m=n.length,_=0;_<a.length;_++){var b=a[_];if(!b.ignoreForceLayout){var w=b.n1,x=b.n2;Wi(y,x.p,w.p);var S=pc(y)-b.d,T=x.w/(w.w+x.w);isNaN(T)&&(T=0),jo(y,y),!w.fixed&&xu(w.p,w.p,y,T*S*v),!x.fixed&&xu(x.p,x.p,y,-(1-T)*S*v)}}for(var _=0;_<m;_++){var D=n[_];D.fixed||(Wi(y,l,D.p),xu(D.p,D.p,y,u*v))}for(var _=0;_<m;_++)for(var w=n[_],M=_+1;M<m;M++){var x=n[M];Wi(y,x.p,w.p);var S=pc(y);S===0&&(QT(y,Math.random()-.5,Math.random()-.5),S=1);var A=(w.rep+x.rep)/S/S;!w.fixed&&xu(w.pp,w.pp,y,A),!x.fixed&&xu(x.pp,x.pp,y,-A)}for(var I=[],_=0;_<m;_++){var D=n[_];D.fixed||(Wi(I,D.p,D.pp),xu(D.p,D.p,I,v),Mr(D.pp,D.p))}v=v*.992;var P=v<.01;p&&p(n,a,P),g&&g(P)}}}function DK(r){r.eachSeriesByType("graph",function(e){var t=e.coordinateSystem;if(!(t&&t.type!=="view"))if(e.get("layout")==="force"){var n=e.preservedPoints||{},a=e.getGraph(),i=a.data,o=a.edgeData,s=e.getModel("force"),l=s.get("initLayout");e.preservedPoints?i.each(function(_){var b=i.getId(_);i.setItemLayout(_,n[b]||[NaN,NaN])}):!l||l==="none"?CR(e):l==="circular"&&nx(e,"value");var u=i.getDataExtent("value"),c=o.getDataExtent("value"),f=s.get("repulsion"),h=s.get("edgeLength"),v=K(f)?f:[f,f],d=K(h)?h:[h,h];d=[d[1],d[0]];var p=i.mapArray("value",function(_,b){var w=i.getItemLayout(b),x=at(_,u,v);return isNaN(x)&&(x=(v[0]+v[1])/2),{w:x,rep:x,fixed:i.getItemModel(b).get("fixed"),p:!w||isNaN(w[0])||isNaN(w[1])?null:w}}),g=o.mapArray("value",function(_,b){var w=a.getEdgeByIndex(b),x=at(_,c,d);isNaN(x)&&(x=(d[0]+d[1])/2);var S=w.getModel(),T=Ia(w.getModel().get(["lineStyle","curveness"]),-ex(w,e,b,!0),0);return{n1:p[w.node1.dataIndex],n2:p[w.node2.dataIndex],d:x,curveness:T,ignoreForceLayout:S.get("ignoreForceLayout")}}),y=t.getBoundingRect(),m=TK(p,g,{rect:y,gravity:s.get("gravity"),friction:s.get("friction")});m.beforeStep(function(_,b){for(var w=0,x=_.length;w<x;w++)_[w].fixed&&Mr(_[w].p,a.getNodeByIndex(w).getLayout())}),m.afterStep(function(_,b,w){for(var x=0,S=_.length;x<S;x++)_[x].fixed||a.getNodeByIndex(x).setLayout(_[x].p),n[i.getId(x)]=_[x].p;for(var x=0,S=b.length;x<S;x++){var T=b[x],D=a.getEdgeByIndex(x),M=T.n1.p,A=T.n2.p,I=D.getLayout();I=I?I.slice():[],I[0]=I[0]||[],I[1]=I[1]||[],Mr(I[0],M),Mr(I[1],A),+T.curveness&&(I[2]=[(M[0]+A[0])/2-(M[1]-A[1])*T.curveness,(M[1]+A[1])/2-(A[0]-M[0])*T.curveness]),D.setLayout(I)}}),e.forceLayout=m,e.preservedPoints=n,m.step()}else e.forceLayout=null})}function MK(r,e,t){var n=Q(r.getBoxLayoutParams(),{aspect:t});return Ht(n,{width:e.getWidth(),height:e.getHeight()})}function AK(r,e){var t=[];return r.eachSeriesByType("graph",function(n){var a=n.get("coordinateSystem");if(!a||a==="view"){var i=n.getData(),o=i.mapArray(function(g){var y=i.getItemModel(g);return[+y.get("x"),+y.get("y")]}),s=[],l=[];cd(o,s,l),l[0]-s[0]===0&&(l[0]+=1,s[0]-=1),l[1]-s[1]===0&&(l[1]+=1,s[1]-=1);var u=(l[0]-s[0])/(l[1]-s[1]),c=MK(n,e,u);isNaN(u)&&(s=[c.x,c.y],l=[c.x+c.width,c.y+c.height]);var f=l[0]-s[0],h=l[1]-s[1],v=c.width,d=c.height,p=n.coordinateSystem=new Zf;p.zoomLimit=n.get("scaleLimit"),p.setBoundingRect(s[0],s[1],f,h),p.setViewRect(c.x,c.y,v,d),p.setCenter(n.get("center"),e),p.setZoom(n.get("zoom")),t.push(p)}}),t}var MR=tr.prototype,ax=Jc.prototype,AR=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r}();(function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e})(AR);function ix(r){return isNaN(+r.cpx1)||isNaN(+r.cpy1)}var LK=function(r){j(e,r);function e(t){var n=r.call(this,t)||this;return n.type="ec-line",n}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new AR},e.prototype.buildPath=function(t,n){ix(n)?MR.buildPath.call(this,t,n):ax.buildPath.call(this,t,n)},e.prototype.pointAt=function(t){return ix(this.shape)?MR.pointAt.call(this,t):ax.pointAt.call(this,t)},e.prototype.tangentAt=function(t){var n=this.shape,a=ix(n)?[n.x2-n.x1,n.y2-n.y1]:ax.tangentAt.call(this,t);return jo(a,a)},e}(Be),IK=LK,ox=["fromSymbol","toSymbol"];function LR(r){return"_"+r+"Type"}function IR(r,e,t){var n=e.getItemVisual(t,r);if(!(!n||n==="none")){var a=e.getItemVisual(t,r+"Size"),i=e.getItemVisual(t,r+"Rotate"),o=e.getItemVisual(t,r+"Offset"),s=e.getItemVisual(t,r+"KeepAspect"),l=wf(a),u=lu(o||0,l),c=kt(n,-l[0]/2+u[0],-l[1]/2+u[1],l[0],l[1],null,s);return c.__specifiedRotation=i==null||isNaN(i)?void 0:+i*Math.PI/180||0,c.name=r,c}}function PK(r){var e=new IK({name:"line",subPixelOptimize:!0});return sx(e.shape,r),e}function sx(r,e){r.x1=e[0][0],r.y1=e[0][1],r.x2=e[1][0],r.y2=e[1][1],r.percent=1;var t=e[2];t?(r.cpx1=t[0],r.cpy1=t[1]):(r.cpx1=NaN,r.cpy1=NaN)}var EK=function(r){j(e,r);function e(t,n,a){var i=r.call(this)||this;return i._createLine(t,n,a),i}return e.prototype._createLine=function(t,n,a){var i=t.hostModel,o=t.getItemLayout(n),s=PK(o);s.shape.percent=0,xt(s,{shape:{percent:1}},i,n),this.add(s),L(ox,function(l){var u=IR(l,t,n);this.add(u),this[LR(l)]=t.getItemVisual(n,l)},this),this._updateCommonStl(t,n,a)},e.prototype.updateData=function(t,n,a){var i=t.hostModel,o=this.childOfName("line"),s=t.getItemLayout(n),l={shape:{}};sx(l.shape,s),qe(o,l,i,n),L(ox,function(u){var c=t.getItemVisual(n,u),f=LR(u);if(this[f]!==c){this.remove(this.childOfName(u));var h=IR(u,t,n);this.add(h)}this[f]=c},this),this._updateCommonStl(t,n,a)},e.prototype.getLinePath=function(){return this.childAt(0)},e.prototype._updateCommonStl=function(t,n,a){var i=t.hostModel,o=this.childOfName("line"),s=a&&a.emphasisLineStyle,l=a&&a.blurLineStyle,u=a&&a.selectLineStyle,c=a&&a.labelStatesModels,f=a&&a.emphasisDisabled,h=a&&a.focus,v=a&&a.blurScope;if(!a||t.hasItemOption){var d=t.getItemModel(n),p=d.getModel("emphasis");s=p.getModel("lineStyle").getLineStyle(),l=d.getModel(["blur","lineStyle"]).getLineStyle(),u=d.getModel(["select","lineStyle"]).getLineStyle(),f=p.get("disabled"),h=p.get("focus"),v=p.get("blurScope"),c=rr(d)}var g=t.getItemVisual(n,"style"),y=g.stroke;o.useStyle(g),o.style.fill=null,o.style.strokeNoScale=!0,o.ensureState("emphasis").style=s,o.ensureState("blur").style=l,o.ensureState("select").style=u,L(ox,function(x){var S=this.childOfName(x);if(S){S.setColor(y),S.style.opacity=g.opacity;for(var T=0;T<$r.length;T++){var D=$r[T],M=o.getState(D);if(M){var A=M.style||{},I=S.ensureState(D),P=I.style||(I.style={});A.stroke!=null&&(P[S.__isEmptyBrush?"stroke":"fill"]=A.stroke),A.opacity!=null&&(P.opacity=A.opacity)}}S.markRedraw()}},this);var m=i.getRawValue(n);yr(this,c,{labelDataIndex:n,labelFetcher:{getFormattedLabel:function(x,S){return i.getFormattedLabel(x,S,t.dataType)}},inheritColor:y||"#000",defaultOpacity:g.opacity,defaultText:(m==null?t.getName(n):isFinite(m)?At(m):m)+""});var _=this.getTextContent();if(_){var b=c.normal;_.__align=_.style.align,_.__verticalAlign=_.style.verticalAlign,_.__position=b.get("position")||"middle";var w=b.get("distance");K(w)||(w=[w,w]),_.__labelDistance=w}this.setTextConfig({position:null,local:!0,inside:!1}),Lt(this,h,v,f)},e.prototype.highlight=function(){hi(this)},e.prototype.downplay=function(){vi(this)},e.prototype.updateLayout=function(t,n){this.setLinePoints(t.getItemLayout(n))},e.prototype.setLinePoints=function(t){var n=this.childOfName("line");sx(n.shape,t),n.dirty()},e.prototype.beforeUpdate=function(){var t=this,n=t.childOfName("fromSymbol"),a=t.childOfName("toSymbol"),i=t.getTextContent();if(!n&&!a&&(!i||i.ignore))return;for(var o=1,s=this.parent;s;)s.scaleX&&(o/=s.scaleX),s=s.parent;var l=t.childOfName("line");if(!this.__dirty&&!l.__dirty)return;var u=l.shape.percent,c=l.pointAt(0),f=l.pointAt(u),h=Wi([],f,c);jo(h,h);function v(M,A){var I=M.__specifiedRotation;if(I==null){var P=l.tangentAt(A);M.attr("rotation",(A===1?-1:1)*Math.PI/2-Math.atan2(P[1],P[0]))}else M.attr("rotation",I)}if(n&&(n.setPosition(c),v(n,0),n.scaleX=n.scaleY=o*u,n.markRedraw()),a&&(a.setPosition(f),v(a,1),a.scaleX=a.scaleY=o*u,a.markRedraw()),i&&!i.ignore){i.x=i.y=0,i.originX=i.originY=0;var d=void 0,p=void 0,g=i.__labelDistance,y=g[0]*o,m=g[1]*o,_=u/2,b=l.tangentAt(_),w=[b[1],-b[0]],x=l.pointAt(_);w[1]>0&&(w[0]=-w[0],w[1]=-w[1]);var S=b[0]<0?-1:1;if(i.__position!=="start"&&i.__position!=="end"){var T=-Math.atan2(b[1],b[0]);f[0]<c[0]&&(T=Math.PI+T),i.rotation=T}var D=void 0;switch(i.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":D=-m,p="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":D=m,p="top";break;default:D=0,p="middle"}switch(i.__position){case"end":i.x=h[0]*y+f[0],i.y=h[1]*m+f[1],d=h[0]>.8?"left":h[0]<-.8?"right":"center",p=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":i.x=-h[0]*y+c[0],i.y=-h[1]*m+c[1],d=h[0]>.8?"right":h[0]<-.8?"left":"center",p=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=y*S+c[0],i.y=c[1]+D,d=b[0]<0?"right":"left",i.originX=-y*S,i.originY=-D;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=x[0],i.y=x[1]+D,d="center",i.originY=-D;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-y*S+f[0],i.y=f[1]+D,d=b[0]>=0?"right":"left",i.originX=y*S,i.originY=-D;break}i.scaleX=i.scaleY=o,i.setStyle({verticalAlign:i.__verticalAlign||p,align:i.__align||d})}},e}(Te),lx=EK,OK=function(){function r(e){this.group=new Te,this._LineCtor=e||lx}return r.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this,a=n.group,i=n._lineData;n._lineData=e,i||a.removeAll();var o=PR(e);e.diff(i).add(function(s){t._doAdd(e,s,o)}).update(function(s,l){t._doUpdate(i,e,l,s,o)}).remove(function(s){a.remove(i.getItemGraphicEl(s))}).execute()},r.prototype.updateLayout=function(){var e=this._lineData;!e||e.eachItemGraphicEl(function(t,n){t.updateLayout(e,n)},this)},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=PR(e),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function n(s){!s.isGroup&&!RK(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var a=e.start;a<e.end;a++){var i=t.getItemLayout(a);if(ux(i)){var o=new this._LineCtor(t,a,this._seriesScope);o.traverse(n),this.group.add(o),t.setItemGraphicEl(a,o),this._progressiveEls.push(o)}}},r.prototype.remove=function(){this.group.removeAll()},r.prototype.eachRendered=function(e){oo(this._progressiveEls||this.group,e)},r.prototype._doAdd=function(e,t,n){var a=e.getItemLayout(t);if(!!ux(a)){var i=new this._LineCtor(e,t,n);e.setItemGraphicEl(t,i),this.group.add(i)}},r.prototype._doUpdate=function(e,t,n,a,i){var o=e.getItemGraphicEl(n);if(!ux(t.getItemLayout(a))){this.group.remove(o);return}o?o.updateData(t,a,i):o=new this._LineCtor(t,a,i),t.setItemGraphicEl(a,o),this.group.add(o)},r}();function RK(r){return r.animators&&r.animators.length>0}function PR(r){var e=r.hostModel,t=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:t.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:t.get("disabled"),blurScope:t.get("blurScope"),focus:t.get("focus"),labelStatesModels:rr(e)}}function ER(r){return isNaN(r[0])||isNaN(r[1])}function ux(r){return r&&!ER(r[0])&&!ER(r[1])}var cx=OK,fx=[],hx=[],vx=[],wu=lr,dx=Ui,OR=Math.abs;function RR(r,e,t){for(var n=r[0],a=r[1],i=r[2],o=1/0,s,l=t*t,u=.1,c=.1;c<=.9;c+=.1){fx[0]=wu(n[0],a[0],i[0],c),fx[1]=wu(n[1],a[1],i[1],c);var f=OR(dx(fx,e)-l);f<o&&(o=f,s=c)}for(var h=0;h<32;h++){var v=s+u;hx[0]=wu(n[0],a[0],i[0],s),hx[1]=wu(n[1],a[1],i[1],s),vx[0]=wu(n[0],a[0],i[0],v),vx[1]=wu(n[1],a[1],i[1],v);var f=dx(hx,e)-l;if(OR(f)<.01)break;var d=dx(vx,e)-l;u/=2,f<0?d>=0?s=s+u:s=s-u:d>=0?s=s-u:s=s+u}return s}function px(r,e){var t=[],n=Cc,a=[[],[],[]],i=[[],[]],o=[];e/=2,r.eachEdge(function(s,l){var u=s.getLayout(),c=s.getVisual("fromSymbol"),f=s.getVisual("toSymbol");u.__original||(u.__original=[Pa(u[0]),Pa(u[1])],u[2]&&u.__original.push(Pa(u[2])));var h=u.__original;if(u[2]!=null){if(Mr(a[0],h[0]),Mr(a[1],h[2]),Mr(a[2],h[1]),c&&c!=="none"){var v=oh(s.node1),d=RR(a,h[0],v*e);n(a[0][0],a[1][0],a[2][0],d,t),a[0][0]=t[3],a[1][0]=t[4],n(a[0][1],a[1][1],a[2][1],d,t),a[0][1]=t[3],a[1][1]=t[4]}if(f&&f!=="none"){var v=oh(s.node2),d=RR(a,h[1],v*e);n(a[0][0],a[1][0],a[2][0],d,t),a[1][0]=t[1],a[2][0]=t[2],n(a[0][1],a[1][1],a[2][1],d,t),a[1][1]=t[1],a[2][1]=t[2]}Mr(u[0],a[0]),Mr(u[1],a[2]),Mr(u[2],a[1])}else{if(Mr(i[0],h[0]),Mr(i[1],h[1]),Wi(o,i[1],i[0]),jo(o,o),c&&c!=="none"){var v=oh(s.node1);Lv(i[0],i[0],o,v*e)}if(f&&f!=="none"){var v=oh(s.node2);Lv(i[1],i[1],o,-v*e)}Mr(u[0],i[0]),Mr(u[1],i[1])}})}function NR(r){return r.type==="view"}var NK=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){var a=new $f,i=new cx,o=this.group;this._controller=new Yf(n.getZr()),this._controllerHost={target:o},o.add(a.group),o.add(i.group),this._symbolDraw=a,this._lineDraw=i,this._firstRender=!0},e.prototype.render=function(t,n,a){var i=this,o=t.coordinateSystem;this._model=t;var s=this._symbolDraw,l=this._lineDraw,u=this.group;if(NR(o)){var c={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?u.attr(c):qe(u,c,t)}px(t.getGraph(),ih(t));var f=t.getData();s.updateData(f);var h=t.getEdgeData();l.updateData(h),this._updateNodeAndLinkScale(),this._updateController(t,n,a),clearTimeout(this._layoutTimeout);var v=t.forceLayout,d=t.get(["force","layoutAnimation"]);v&&this._startForceLayoutIteration(v,d);var p=t.get("layout");f.graph.eachNode(function(_){var b=_.dataIndex,w=_.getGraphicEl(),x=_.getModel();if(!!w){w.off("drag").off("dragend");var S=x.get("draggable");S&&w.on("drag",function(D){switch(p){case"force":v.warmUp(),!i._layouting&&i._startForceLayoutIteration(v,d),v.setFixed(b),f.setItemLayout(b,[w.x,w.y]);break;case"circular":f.setItemLayout(b,[w.x,w.y]),_.setLayout({fixed:!0},!0),nx(t,"symbolSize",_,[D.offsetX,D.offsetY]),i.updateLayout(t);break;case"none":default:f.setItemLayout(b,[w.x,w.y]),tx(t.getGraph(),t),i.updateLayout(t);break}}).on("dragend",function(){v&&v.setUnfixed(b)}),w.setDraggable(S,!!x.get("cursor"));var T=x.get(["emphasis","focus"]);T==="adjacency"&&(Me(w).focus=_.getAdjacentDataIndices())}}),f.graph.eachEdge(function(_){var b=_.getGraphicEl(),w=_.getModel().get(["emphasis","focus"]);!b||w==="adjacency"&&(Me(b).focus={edge:[_.dataIndex],node:[_.node1.dataIndex,_.node2.dataIndex]})});var g=t.get("layout")==="circular"&&t.get(["circular","rotateLabel"]),y=f.getLayout("cx"),m=f.getLayout("cy");f.graph.eachNode(function(_){DR(_,g,y,m)}),this._firstRender=!1},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,n){var a=this;(function i(){t.step(function(o){a.updateLayout(a._model),(a._layouting=!o)&&(n?a._layoutTimeout=setTimeout(i,16):i())})})()},e.prototype._updateController=function(t,n,a){var i=this,o=this._controller,s=this._controllerHost,l=this.group;if(o.setPointerChecker(function(u,c,f){var h=l.getBoundingRect();return h.applyTransform(l.transform),h.contain(c,f)&&!$p(u,a,t)}),!NR(t.coordinateSystem)){o.disable();return}o.enable(t.get("roam")),s.zoomLimit=t.get("scaleLimit"),s.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){Ib(s,u.dx,u.dy),a.dispatchAction({seriesId:t.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){Pb(s,u.scale,u.originX,u.originY),a.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),i._updateNodeAndLinkScale(),px(t.getGraph(),ih(t)),i._lineDraw.updateLayout(),a.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,n=t.getData(),a=ih(t);n.eachItemGraphicEl(function(i,o){i&&i.setSymbolScale(a)})},e.prototype.updateLayout=function(t){px(t.getGraph(),ih(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},e.prototype.remove=function(t,n){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},e.type="graph",e}(ut),kK=NK;function Su(r){return"_EC_"+r}var BK=function(){function r(e){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return r.prototype.isDirected=function(){return this._directed},r.prototype.addNode=function(e,t){e=e==null?""+t:""+e;var n=this._nodesMap;if(!n[Su(e)]){var a=new qs(e,t);return a.hostGraph=this,this.nodes.push(a),n[Su(e)]=a,a}},r.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},r.prototype.getNodeById=function(e){return this._nodesMap[Su(e)]},r.prototype.addEdge=function(e,t,n){var a=this._nodesMap,i=this._edgesMap;if(je(e)&&(e=this.nodes[e]),je(t)&&(t=this.nodes[t]),e instanceof qs||(e=a[Su(e)]),t instanceof qs||(t=a[Su(t)]),!(!e||!t)){var o=e.id+"-"+t.id,s=new kR(e,t,n);return s.hostGraph=this,this._directed&&(e.outEdges.push(s),t.inEdges.push(s)),e.edges.push(s),e!==t&&t.edges.push(s),this.edges.push(s),i[o]=s,s}},r.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},r.prototype.getEdge=function(e,t){e instanceof qs&&(e=e.id),t instanceof qs&&(t=t.id);var n=this._edgesMap;return this._directed?n[e+"-"+t]:n[e+"-"+t]||n[t+"-"+e]},r.prototype.eachNode=function(e,t){for(var n=this.nodes,a=n.length,i=0;i<a;i++)n[i].dataIndex>=0&&e.call(t,n[i],i)},r.prototype.eachEdge=function(e,t){for(var n=this.edges,a=n.length,i=0;i<a;i++)n[i].dataIndex>=0&&n[i].node1.dataIndex>=0&&n[i].node2.dataIndex>=0&&e.call(t,n[i],i)},r.prototype.breadthFirstTraverse=function(e,t,n,a){if(t instanceof qs||(t=this._nodesMap[Su(t)]),!!t){for(var i=n==="out"?"outEdges":n==="in"?"inEdges":"edges",o=0;o<this.nodes.length;o++)this.nodes[o].__visited=!1;if(!e.call(a,t,null))for(var s=[t];s.length;)for(var l=s.shift(),u=l[i],o=0;o<u.length;o++){var c=u[o],f=c.node1===l?c.node2:c.node1;if(!f.__visited){if(e.call(a,f,l))return;s.push(f),f.__visited=!0}}}},r.prototype.update=function(){for(var e=this.data,t=this.edgeData,n=this.nodes,a=this.edges,i=0,o=n.length;i<o;i++)n[i].dataIndex=-1;for(var i=0,o=e.count();i<o;i++)n[e.getRawIndex(i)].dataIndex=i;t.filterSelf(function(s){var l=a[t.getRawIndex(s)];return l.node1.dataIndex>=0&&l.node2.dataIndex>=0});for(var i=0,o=a.length;i<o;i++)a[i].dataIndex=-1;for(var i=0,o=t.count();i<o;i++)a[t.getRawIndex(i)].dataIndex=i},r.prototype.clone=function(){for(var e=new r(this._directed),t=this.nodes,n=this.edges,a=0;a<t.length;a++)e.addNode(t[a].id,t[a].dataIndex);for(var a=0;a<n.length;a++){var i=n[a];e.addEdge(i.node1.id,i.node2.id,i.dataIndex)}return e},r}(),qs=function(){function r(e,t){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=e==null?"":e,this.dataIndex=t==null?-1:t}return r.prototype.degree=function(){return this.edges.length},r.prototype.inDegree=function(){return this.inEdges.length},r.prototype.outDegree=function(){return this.outEdges.length},r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostGraph,n=t.data.getItemModel(this.dataIndex);return n.getModel(e)}},r.prototype.getAdjacentDataIndices=function(){for(var e={edge:[],node:[]},t=0;t<this.edges.length;t++){var n=this.edges[t];n.dataIndex<0||(e.edge.push(n.dataIndex),e.node.push(n.node1.dataIndex,n.node2.dataIndex))}return e},r}(),kR=function(){function r(e,t,n){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=n==null?-1:n}return r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostGraph,n=t.edgeData.getItemModel(this.dataIndex);return n.getModel(e)}},r.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},r}();function BR(r,e){return{getValue:function(t){var n=this[r][e];return n.getStore().get(n.getDimensionIndex(t||"value"),this.dataIndex)},setVisual:function(t,n){this.dataIndex>=0&&this[r][e].setItemVisual(this.dataIndex,t,n)},getVisual:function(t){return this[r][e].getItemVisual(this.dataIndex,t)},setLayout:function(t,n){this.dataIndex>=0&&this[r][e].setItemLayout(this.dataIndex,t,n)},getLayout:function(){return this[r][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[r][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[r][e].getRawIndex(this.dataIndex)}}}Et(qs,BR("hostGraph","data")),Et(kR,BR("hostGraph","edgeData"));var zK=BK;function zR(r,e,t,n,a){for(var i=new zK(n),o=0;o<r.length;o++)i.addNode(Jt(r[o].id,r[o].name,o),o);for(var s=[],l=[],u=0,o=0;o<e.length;o++){var c=e[o],f=c.source,h=c.target;i.addEdge(f,h,u)&&(l.push(c),s.push(Jt(qt(c.id,null),f+" > "+h)),u++)}var v=t.get("coordinateSystem"),d;if(v==="cartesian2d"||v==="polar")d=Wa(r,t);else{var p=ru.get(v),g=p?p.dimensions||[]:[];Ne(g,"value")<0&&g.concat(["value"]);var y=hu(r,{coordDimensions:g,encodeDefine:t.getEncode()}).dimensions;d=new Er(y,t),d.initData(r)}var m=new Er(["value"],t);return m.initData(l,s),a&&a(d,m),JO({mainData:d,struct:i,structAttr:"graph",datas:{node:d,edge:m},datasAttr:{node:"data",edge:"edgeData"}}),i.update(),i}var FK=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments);var n=this;function a(){return n._categoriesData}this.legendVisualProvider=new Wf(a,a),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(t){r.prototype.mergeDefaultAndTheme.apply(this,arguments),rs(t,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,n){var a=t.edges||t.links||[],i=t.data||t.nodes||[],o=this;if(i&&a){bK(this);var s=zR(i,a,this,!0,l);return L(s.edges,function(u){xK(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,c){u.wrapMethod("getItemModel",function(d){var p=o._categoriesModels,g=d.getShallow("category"),y=p[g];return y&&(y.parentModel=d.parentModel,d.parentModel=y),d});var f=lt.prototype.getModel;function h(d,p){var g=f.call(this,d,p);return g.resolveParentPath=v,g}c.wrapMethod("getItemModel",function(d){return d.resolveParentPath=v,d.getModel=h,d});function v(d){if(d&&(d[0]==="label"||d[1]==="label")){var p=d.slice();return d[0]==="label"?p[0]="edgeLabel":d[1]==="label"&&(p[1]="edgeLabel"),p}return d}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,n,a){if(a==="edge"){var i=this.getData(),o=this.getDataParams(t,a),s=i.graph.getEdgeByIndex(t),l=i.getName(s.node1.dataIndex),u=i.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),nr("nameValue",{name:c.join(" > "),value:o.value,noValue:o.value==null})}var f=wL({series:this,dataIndex:t,multipleSeries:n});return f},e.prototype._updateCategoriesData=function(){var t=J(this.option.categories||[],function(a){return a.value!=null?a:Q({value:0},a)}),n=new Er(["value"],this);n.initData(t),this._categoriesData=n,this._categoriesModels=n.mapArray(function(a){return n.getItemModel(a)})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return r.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(yt),VK=FK,$K={type:"graphRoam",event:"graphRoam",update:"none"};function HK(r){r.registerChartView(kK),r.registerSeriesModel(VK),r.registerProcessor(pK),r.registerVisual(gK),r.registerVisual(yK),r.registerLayout(wK),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,CK),r.registerLayout(DK),r.registerCoordinateSystem("graphView",{dimensions:Zf.dimensions,create:AK}),r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},Ot),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},Ot),r.registerAction($K,function(e,t,n){t.eachComponent({mainType:"series",query:e},function(a){var i=a.coordinateSystem,o=kb(i,e,void 0,n);a.setCenter&&a.setCenter(o.center),a.setZoom&&a.setZoom(o.zoom)})})}var GK=function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r}(),WK=function(r){j(e,r);function e(t){var n=r.call(this,t)||this;return n.type="pointer",n}return e.prototype.getDefaultShape=function(){return new GK},e.prototype.buildPath=function(t,n){var a=Math.cos,i=Math.sin,o=n.r,s=n.width,l=n.angle,u=n.x-a(l)*s*(s>=o/3?1:2),c=n.y-i(l)*s*(s>=o/3?1:2);l=n.angle-Math.PI/2,t.moveTo(u,c),t.lineTo(n.x+a(l)*s,n.y+i(l)*s),t.lineTo(n.x+a(n.angle)*o,n.y+i(n.angle)*o),t.lineTo(n.x-a(l)*s,n.y-i(l)*s),t.lineTo(u,c)},e}(Be),UK=WK;function jK(r,e){var t=r.get("center"),n=e.getWidth(),a=e.getHeight(),i=Math.min(n,a),o=le(t[0],e.getWidth()),s=le(t[1],e.getHeight()),l=le(r.get("radius"),i/2);return{cx:o,cy:s,r:l}}function eg(r,e){var t=r==null?"":r+"";return e&&(ce(e)?t=e.replace("{value}",t):ye(e)&&(t=e(r))),t}var YK=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){this.group.removeAll();var i=t.get(["axisLine","lineStyle","color"]),o=jK(t,a);this._renderMain(t,n,a,i,o),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,n,a,i,o){var s=this.group,l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,c=-t.get("endAngle")/180*Math.PI,f=t.getModel("axisLine"),h=f.get("roundCap"),v=h?Rp:Hr,d=f.get("show"),p=f.getModel("lineStyle"),g=p.get("width"),y=[u,c];AD(y,!l),u=y[0],c=y[1];for(var m=c-u,_=u,b=[],w=0;d&&w<i.length;w++){var x=Math.min(Math.max(i[w][0],0),1);c=u+m*x;var S=new v({shape:{startAngle:_,endAngle:c,cx:o.cx,cy:o.cy,clockwise:l,r0:o.r-g,r:o.r},silent:!0});S.setStyle({fill:i[w][1]}),S.setStyle(p.getLineStyle(["color","width"])),b.push(S),_=c}b.reverse(),L(b,function(D){return s.add(D)});var T=function(D){if(D<=0)return i[0][1];var M;for(M=0;M<i.length;M++)if(i[M][0]>=D&&(M===0?0:i[M-1][0])<D)return i[M][1];return i[M-1][1]};this._renderTicks(t,n,a,T,o,u,c,l,g),this._renderTitleAndDetail(t,n,a,T,o),this._renderAnchor(t,o),this._renderPointer(t,n,a,T,o,u,c,l,g)},e.prototype._renderTicks=function(t,n,a,i,o,s,l,u,c){for(var f=this.group,h=o.cx,v=o.cy,d=o.r,p=+t.get("min"),g=+t.get("max"),y=t.getModel("splitLine"),m=t.getModel("axisTick"),_=t.getModel("axisLabel"),b=t.get("splitNumber"),w=m.get("splitNumber"),x=le(y.get("length"),d),S=le(m.get("length"),d),T=s,D=(l-s)/b,M=D/w,A=y.getModel("lineStyle").getLineStyle(),I=m.getModel("lineStyle").getLineStyle(),P=y.get("distance"),E,O,N=0;N<=b;N++){if(E=Math.cos(T),O=Math.sin(T),y.get("show")){var V=P?P+c:c,$=new tr({shape:{x1:E*(d-V)+h,y1:O*(d-V)+v,x2:E*(d-x-V)+h,y2:O*(d-x-V)+v},style:A,silent:!0});A.stroke==="auto"&&$.setStyle({stroke:i(N/b)}),f.add($)}if(_.get("show")){var V=_.get("distance")+P,U=eg(At(N/b*(g-p)+p),_.get("formatter")),Y=i(N/b),ae=E*(d-x-V)+h,H=O*(d-x-V)+v,q=_.get("rotate"),X=0;q==="radial"?(X=-T+2*Math.PI,X>Math.PI/2&&(X+=Math.PI)):q==="tangential"?X=-T-Math.PI/2:je(q)&&(X=q*Math.PI/180),X===0?f.add(new We({style:gt(_,{text:U,x:ae,y:H,verticalAlign:O<-.8?"top":O>.8?"bottom":"middle",align:E<-.4?"left":E>.4?"right":"center"},{inheritColor:Y}),silent:!0})):f.add(new We({style:gt(_,{text:U,x:ae,y:H,verticalAlign:"middle",align:"center"},{inheritColor:Y}),silent:!0,originX:ae,originY:H,rotation:X}))}if(m.get("show")&&N!==b){var V=m.get("distance");V=V?V+c:c;for(var Z=0;Z<=w;Z++){E=Math.cos(T),O=Math.sin(T);var ie=new tr({shape:{x1:E*(d-V)+h,y1:O*(d-V)+v,x2:E*(d-S-V)+h,y2:O*(d-S-V)+v},silent:!0,style:I});I.stroke==="auto"&&ie.setStyle({stroke:i((N+Z/w)/b)}),f.add(ie),T+=M}T-=M}else T+=D}},e.prototype._renderPointer=function(t,n,a,i,o,s,l,u,c){var f=this.group,h=this._data,v=this._progressEls,d=[],p=t.get(["pointer","show"]),g=t.getModel("progress"),y=g.get("show"),m=t.getData(),_=m.mapDimension("value"),b=+t.get("min"),w=+t.get("max"),x=[b,w],S=[s,l];function T(M,A){var I=m.getItemModel(M),P=I.getModel("pointer"),E=le(P.get("width"),o.r),O=le(P.get("length"),o.r),N=t.get(["pointer","icon"]),V=P.get("offsetCenter"),$=le(V[0],o.r),U=le(V[1],o.r),Y=P.get("keepAspect"),ae;return N?ae=kt(N,$-E/2,U-O,E,O,null,Y):ae=new UK({shape:{angle:-Math.PI/2,width:E,r:O,x:$,y:U}}),ae.rotation=-(A+Math.PI/2),ae.x=o.cx,ae.y=o.cy,ae}function D(M,A){var I=g.get("roundCap"),P=I?Rp:Hr,E=g.get("overlap"),O=E?g.get("width"):c/m.count(),N=E?o.r-O:o.r-(M+1)*O,V=E?o.r:o.r-M*O,$=new P({shape:{startAngle:s,endAngle:A,cx:o.cx,cy:o.cy,clockwise:u,r0:N,r:V}});return E&&($.z2=w-m.get(_,M)%w),$}(y||p)&&(m.diff(h).add(function(M){var A=m.get(_,M);if(p){var I=T(M,s);xt(I,{rotation:-((isNaN(+A)?S[0]:at(A,x,S,!0))+Math.PI/2)},t),f.add(I),m.setItemGraphicEl(M,I)}if(y){var P=D(M,s),E=g.get("clip");xt(P,{shape:{endAngle:at(A,x,S,E)}},t),f.add(P),e_(t.seriesIndex,m.dataType,M,P),d[M]=P}}).update(function(M,A){var I=m.get(_,M);if(p){var P=h.getItemGraphicEl(A),E=P?P.rotation:s,O=T(M,E);O.rotation=E,qe(O,{rotation:-((isNaN(+I)?S[0]:at(I,x,S,!0))+Math.PI/2)},t),f.add(O),m.setItemGraphicEl(M,O)}if(y){var N=v[A],V=N?N.shape.endAngle:s,$=D(M,V),U=g.get("clip");qe($,{shape:{endAngle:at(I,x,S,U)}},t),f.add($),e_(t.seriesIndex,m.dataType,M,$),d[M]=$}}).execute(),m.each(function(M){var A=m.getItemModel(M),I=A.getModel("emphasis"),P=I.get("focus"),E=I.get("blurScope"),O=I.get("disabled");if(p){var N=m.getItemGraphicEl(M),V=m.getItemVisual(M,"style"),$=V.fill;if(N instanceof ur){var U=N.style;N.useStyle(Q({image:U.image,x:U.x,y:U.y,width:U.width,height:U.height},V))}else N.useStyle(V),N.type!=="pointer"&&N.setColor($);N.setStyle(A.getModel(["pointer","itemStyle"]).getItemStyle()),N.style.fill==="auto"&&N.setStyle("fill",i(at(m.get(_,M),x,[0,1],!0))),N.z2EmphasisLift=0,gr(N,A),Lt(N,P,E,O)}if(y){var Y=d[M];Y.useStyle(m.getItemVisual(M,"style")),Y.setStyle(A.getModel(["progress","itemStyle"]).getItemStyle()),Y.z2EmphasisLift=0,gr(Y,A),Lt(Y,P,E,O)}}),this._progressEls=d)},e.prototype._renderAnchor=function(t,n){var a=t.getModel("anchor"),i=a.get("show");if(i){var o=a.get("size"),s=a.get("icon"),l=a.get("offsetCenter"),u=a.get("keepAspect"),c=kt(s,n.cx-o/2+le(l[0],n.r),n.cy-o/2+le(l[1],n.r),o,o,null,u);c.z2=a.get("showAbove")?1:0,c.setStyle(a.getModel("itemStyle").getItemStyle()),this.group.add(c)}},e.prototype._renderTitleAndDetail=function(t,n,a,i,o){var s=this,l=t.getData(),u=l.mapDimension("value"),c=+t.get("min"),f=+t.get("max"),h=new Te,v=[],d=[],p=t.isAnimationEnabled(),g=t.get(["pointer","showAbove"]);l.diff(this._data).add(function(y){v[y]=new We({silent:!0}),d[y]=new We({silent:!0})}).update(function(y,m){v[y]=s._titleEls[m],d[y]=s._detailEls[m]}).execute(),l.each(function(y){var m=l.getItemModel(y),_=l.get(u,y),b=new Te,w=i(at(_,[c,f],[0,1],!0)),x=m.getModel("title");if(x.get("show")){var S=x.get("offsetCenter"),T=o.cx+le(S[0],o.r),D=o.cy+le(S[1],o.r),M=v[y];M.attr({z2:g?0:2,style:gt(x,{x:T,y:D,text:l.getName(y),align:"center",verticalAlign:"middle"},{inheritColor:w})}),b.add(M)}var A=m.getModel("detail");if(A.get("show")){var I=A.get("offsetCenter"),P=o.cx+le(I[0],o.r),E=o.cy+le(I[1],o.r),O=le(A.get("width"),o.r),N=le(A.get("height"),o.r),V=t.get(["progress","show"])?l.getItemVisual(y,"style").fill:w,M=d[y],$=A.get("formatter");M.attr({z2:g?0:2,style:gt(A,{x:P,y:E,text:eg(_,$),width:isNaN(O)?null:O,height:isNaN(N)?null:N,align:"center",verticalAlign:"middle"},{inheritColor:V})}),JM(M,{normal:A},_,function(Y){return eg(Y,$)}),p&&eA(M,y,l,t,{getFormattedLabel:function(Y,ae,H,q,X,Z){return eg(Z?Z.interpolatedValue:_,$)}}),b.add(M)}h.add(b)}),this.group.add(h),this._titleEls=v,this._detailEls=d},e.type="gauge",e}(ut),qK=YK,ZK=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="itemStyle",t}return e.prototype.getInitialData=function(t,n){return mu(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(yt),XK=ZK;function QK(r){r.registerChartView(qK),r.registerSeriesModel(XK)}var KK=["itemStyle","opacity"],JK=function(r){j(e,r);function e(t,n){var a=r.call(this)||this,i=a,o=new Wr,s=new We;return i.setTextContent(s),a.setTextGuideLine(o),a.updateData(t,n,!0),a}return e.prototype.updateData=function(t,n,a){var i=this,o=t.hostModel,s=t.getItemModel(n),l=t.getItemLayout(n),u=s.getModel("emphasis"),c=s.get(KK);c=c==null?1:c,a||da(i),i.useStyle(t.getItemVisual(n,"style")),i.style.lineJoin="round",a?(i.setShape({points:l.points}),i.style.opacity=0,xt(i,{style:{opacity:c}},o,n)):qe(i,{style:{opacity:c},shape:{points:l.points}},o,n),gr(i,s),this._updateLabel(t,n),Lt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,n){var a=this,i=this.getTextGuideLine(),o=a.getTextContent(),s=t.hostModel,l=t.getItemModel(n),u=t.getItemLayout(n),c=u.label,f=t.getItemVisual(n,"style"),h=f.fill;yr(o,rr(l),{labelFetcher:t.hostModel,labelDataIndex:n,defaultOpacity:f.opacity,defaultText:t.getName(n)},{normal:{align:c.textAlign,verticalAlign:c.verticalAlign}}),a.setTextConfig({local:!0,inside:!!c.inside,insideStroke:h,outsideFill:h});var v=c.linePoints;i.setShape({points:v}),a.textGuideLineConfig={anchor:v?new Oe(v[0][0],v[0][1]):null},qe(o,{style:{x:c.x,y:c.y}},s,n),o.attr({rotation:c.rotation,originX:c.x,originY:c.y,z2:10}),Q1(a,K1(l),{stroke:h})},e}(Gr),eJ=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,n,a){var i=t.getData(),o=this._data,s=this.group;i.diff(o).add(function(l){var u=new JK(i,l);i.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(i,l),s.add(c),i.setItemGraphicEl(l,c)}).remove(function(l){var u=o.getItemGraphicEl(l);ef(u,t,l)}).execute(),this._data=i},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(ut),tJ=eJ,rJ=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Wf(fe(this.getData,this),fe(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.getInitialData=function(t,n){return mu(this,{coordDimensions:["value"],encodeDefaulter:Ae(F_,this)})},e.prototype._defaultLabelLine=function(t){rs(t,"labelLine",["show"]);var n=t.labelLine,a=t.emphasis.labelLine;n.show=n.show&&t.label.show,a.show=a.show&&t.emphasis.label.show},e.prototype.getDataParams=function(t){var n=this.getData(),a=r.prototype.getDataParams.call(this,t),i=n.mapDimension("value"),o=n.getSum(i);return a.percent=o?+(n.get(i,t)/o*100).toFixed(2):0,a.$vars.push("percent"),a},e.type="series.funnel",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(yt),nJ=rJ;function aJ(r,e){return Ht(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function iJ(r,e){for(var t=r.mapDimension("value"),n=r.mapArray(t,function(l){return l}),a=[],i=e==="ascending",o=0,s=r.count();o<s;o++)a[o]=o;return ye(e)?a.sort(e):e!=="none"&&a.sort(function(l,u){return i?n[l]-n[u]:n[u]-n[l]}),a}function oJ(r){var e=r.hostModel,t=e.get("orient");r.each(function(n){var a=r.getItemModel(n),i=a.getModel("label"),o=i.get("position"),s=a.getModel("labelLine"),l=r.getItemLayout(n),u=l.points,c=o==="inner"||o==="inside"||o==="center"||o==="insideLeft"||o==="insideRight",f,h,v,d;if(c)o==="insideLeft"?(h=(u[0][0]+u[3][0])/2+5,v=(u[0][1]+u[3][1])/2,f="left"):o==="insideRight"?(h=(u[1][0]+u[2][0])/2-5,v=(u[1][1]+u[2][1])/2,f="right"):(h=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,v=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4,f="center"),d=[[h,v],[h,v]];else{var p=void 0,g=void 0,y=void 0,m=void 0,_=s.get("length");o==="left"?(p=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,y=p-_,h=y-5,f="right"):o==="right"?(p=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,y=p+_,h=y+5,f="left"):o==="top"?(p=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,m=g-_,v=m-5,f="center"):o==="bottom"?(p=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,m=g+_,v=m+5,f="center"):o==="rightTop"?(p=t==="horizontal"?u[3][0]:u[1][0],g=t==="horizontal"?u[3][1]:u[1][1],t==="horizontal"?(m=g-_,v=m-5,f="center"):(y=p+_,h=y+5,f="top")):o==="rightBottom"?(p=u[2][0],g=u[2][1],t==="horizontal"?(m=g+_,v=m+5,f="center"):(y=p+_,h=y+5,f="bottom")):o==="leftTop"?(p=u[0][0],g=t==="horizontal"?u[0][1]:u[1][1],t==="horizontal"?(m=g-_,v=m-5,f="center"):(y=p-_,h=y-5,f="right")):o==="leftBottom"?(p=t==="horizontal"?u[1][0]:u[3][0],g=t==="horizontal"?u[1][1]:u[2][1],t==="horizontal"?(m=g+_,v=m+5,f="center"):(y=p-_,h=y-5,f="right")):(p=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,t==="horizontal"?(m=g+_,v=m+5,f="center"):(y=p+_,h=y+5,f="left")),t==="horizontal"?(y=p,h=y):(m=g,v=m),d=[[p,g],[y,m]]}l.label={linePoints:d,x:h,y:v,verticalAlign:"middle",textAlign:f,inside:c}})}function sJ(r,e){r.eachSeriesByType("funnel",function(t){var n=t.getData(),a=n.mapDimension("value"),i=t.get("sort"),o=aJ(t,e),s=t.get("orient"),l=o.width,u=o.height,c=iJ(n,i),f=o.x,h=o.y,v=s==="horizontal"?[le(t.get("minSize"),u),le(t.get("maxSize"),u)]:[le(t.get("minSize"),l),le(t.get("maxSize"),l)],d=n.getDataExtent(a),p=t.get("min"),g=t.get("max");p==null&&(p=Math.min(d[0],0)),g==null&&(g=d[1]);var y=t.get("funnelAlign"),m=t.get("gap"),_=s==="horizontal"?l:u,b=(_-m*(n.count()-1))/n.count(),w=function(E,O){if(s==="horizontal"){var N=n.get(a,E)||0,V=at(N,[p,g],v,!0),$=void 0;switch(y){case"top":$=h;break;case"center":$=h+(u-V)/2;break;case"bottom":$=h+(u-V);break}return[[O,$],[O,$+V]]}var U=n.get(a,E)||0,Y=at(U,[p,g],v,!0),ae;switch(y){case"left":ae=f;break;case"center":ae=f+(l-Y)/2;break;case"right":ae=f+l-Y;break}return[[ae,O],[ae+Y,O]]};i==="ascending"&&(b=-b,m=-m,s==="horizontal"?f+=l:h+=u,c=c.reverse());for(var x=0;x<c.length;x++){var S=c[x],T=c[x+1],D=n.getItemModel(S);if(s==="horizontal"){var M=D.get(["itemStyle","width"]);M==null?M=b:(M=le(M,l),i==="ascending"&&(M=-M));var A=w(S,f),I=w(T,f+M);f+=M+m,n.setItemLayout(S,{points:A.concat(I.slice().reverse())})}else{var P=D.get(["itemStyle","height"]);P==null?P=b:(P=le(P,u),i==="ascending"&&(P=-P));var A=w(S,h),I=w(T,h+P);h+=P+m,n.setItemLayout(S,{points:A.concat(I.slice().reverse())})}}oJ(n)})}function lJ(r){r.registerChartView(tJ),r.registerSeriesModel(nJ),r.registerLayout(sJ),r.registerProcessor(Gf("funnel"))}var uJ=.3,cJ=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._dataGroup=new Te,t._initialized=!1,t}return e.prototype.init=function(){this.group.add(this._dataGroup)},e.prototype.render=function(t,n,a,i){this._progressiveEls=null;var o=this._dataGroup,s=t.getData(),l=this._data,u=t.coordinateSystem,c=u.dimensions,f=$R(t);s.diff(l).add(h).update(v).remove(d).execute();function h(g){var y=VR(s,o,g,c,u);gx(y,s,g,f)}function v(g,y){var m=l.getItemGraphicEl(y),_=FR(s,g,c,u);s.setItemGraphicEl(g,m),qe(m,{shape:{points:_}},t,g),da(m),gx(m,s,g,f)}function d(g){var y=l.getItemGraphicEl(g);o.remove(y)}if(!this._initialized){this._initialized=!0;var p=fJ(u,t,function(){setTimeout(function(){o.removeClipPath()})});o.setClipPath(p)}this._data=s},e.prototype.incrementalPrepareRender=function(t,n,a){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},e.prototype.incrementalRender=function(t,n,a){for(var i=n.getData(),o=n.coordinateSystem,s=o.dimensions,l=$R(n),u=this._progressiveEls=[],c=t.start;c<t.end;c++){var f=VR(i,this._dataGroup,c,s,o);f.incremental=!0,gx(f,i,c,l),u.push(f)}},e.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},e.type="parallel",e}(ut);function fJ(r,e,t){var n=r.model,a=r.getRect(),i=new Ge({shape:{x:a.x,y:a.y,width:a.width,height:a.height}}),o=n.get("layout")==="horizontal"?"width":"height";return i.setShape(o,0),xt(i,{shape:{width:a.width,height:a.height}},e,t),i}function FR(r,e,t,n){for(var a=[],i=0;i<t.length;i++){var o=t[i],s=r.get(r.mapDimension(o),e);hJ(s,n.getAxis(o).type)||a.push(n.dataToPoint(s,o))}return a}function VR(r,e,t,n,a){var i=FR(r,t,n,a),o=new Wr({shape:{points:i},z2:10});return e.add(o),r.setItemGraphicEl(t,o),o}function $R(r){var e=r.get("smooth",!0);return e===!0&&(e=uJ),e=Na(e),Tl(e)&&(e=0),{smooth:e}}function gx(r,e,t,n){r.useStyle(e.getItemVisual(t,"style")),r.style.fill=null,r.setShape("smooth",n.smooth);var a=e.getItemModel(t),i=a.getModel("emphasis");gr(r,a,"lineStyle"),Lt(r,i.get("focus"),i.get("blurScope"),i.get("disabled"))}function hJ(r,e){return e==="category"?r==null:r==null||isNaN(r)}var vJ=cJ,dJ=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.getInitialData=function(t,n){return Wa(null,this,{useEncodeDefaulter:fe(pJ,null,this)})},e.prototype.getRawIndicesByActiveState=function(t){var n=this.coordinateSystem,a=this.getData(),i=[];return n.eachActiveState(a,function(o,s){t===o&&i.push(a.getRawIndex(s))}),i},e.type="series.parallel",e.dependencies=["parallel"],e.defaultOption={z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"},e}(yt);function pJ(r){var e=r.ecModel.getComponent("parallel",r.get("parallelIndex"));if(!!e){var t={};return L(e.dimensions,function(n){var a=gJ(n);t[n]=a}),t}}function gJ(r){return+r.replace("dim","")}var yJ=dJ,mJ=["lineStyle","opacity"],_J={seriesType:"parallel",reset:function(r,e){var t=r.coordinateSystem,n={normal:r.get(["lineStyle","opacity"]),active:r.get("activeOpacity"),inactive:r.get("inactiveOpacity")};return{progress:function(a,i){t.eachActiveState(i,function(o,s){var l=n[o];if(o==="normal"&&i.hasItemOption){var u=i.getItemModel(s).get(mJ,!0);u!=null&&(l=u)}var c=i.ensureUniqueItemVisual(s,"style");c.opacity=l},a.start,a.end)}}}},bJ=_J;function xJ(r){wJ(r),SJ(r)}function wJ(r){if(!r.parallel){var e=!1;L(r.series,function(t){t&&t.type==="parallel"&&(e=!0)}),e&&(r.parallel=[{}])}}function SJ(r){var e=st(r.parallelAxis);L(e,function(t){if(!!_e(t)){var n=t.parallelIndex||0,a=st(r.parallel)[n];a&&a.parallelAxisDefault&&Pe(t,a.parallelAxisDefault,!1)}})}var CJ=5,TJ=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){this._model=t,this._api=a,this._handlers||(this._handlers={},L(DJ,function(i,o){a.getZr().on(o,this._handlers[o]=fe(i,this))},this)),ou(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},e.prototype.dispose=function(t,n){mf(this,"_throttledDispatchExpand"),L(this._handlers,function(a,i){n.getZr().off(i,a)}),this._handlers=null},e.prototype._throttledDispatchExpand=function(t){this._dispatchExpand(t)},e.prototype._dispatchExpand=function(t){t&&this._api.dispatchAction(Q({type:"parallelAxisExpand"},t))},e.type="parallel",e}(wt),DJ={mousedown:function(r){yx(this,"click")&&(this._mouseDownPoint=[r.offsetX,r.offsetY])},mouseup:function(r){var e=this._mouseDownPoint;if(yx(this,"click")&&e){var t=[r.offsetX,r.offsetY],n=Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2);if(n>CJ)return;var a=this._model.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]);a.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:a.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(r){if(!(this._mouseDownPoint||!yx(this,"mousemove"))){var e=this._model,t=e.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]),n=t.behavior;n==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(n==="none"?null:{axisExpandWindow:t.axisExpandWindow,animation:n==="jump"?null:{duration:0}})}}};function yx(r,e){var t=r._model;return t.get("axisExpandable")&&t.get("axisExpandTriggerOn")===e}var MJ=TJ,AJ=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){r.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var n=this.option;t&&Pe(n,t,!0),this._initDimensions()},e.prototype.contains=function(t,n){var a=t.get("parallelIndex");return a!=null&&n.getComponent("parallel",a)===this},e.prototype.setAxisExpand=function(t){L(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(n){t.hasOwnProperty(n)&&(this.option[n]=t[n])},this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],n=this.parallelAxisIndex=[],a=nt(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(i){return(i.get("parallelIndex")||0)===this.componentIndex},this);L(a,function(i){t.push("dim"+i.get("dim")),n.push(i.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}($e),LJ=AJ,IJ=function(r){j(e,r);function e(t,n,a,i,o){var s=r.call(this,t,n,a)||this;return s.type=i||"value",s.axisIndex=o,s}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e}(Un),PJ=IJ;function Zs(r,e,t,n,a,i){r=r||0;var o=t[1]-t[0];if(a!=null&&(a=Cu(a,[0,o])),i!=null&&(i=Math.max(i,a!=null?a:0)),n==="all"){var s=Math.abs(e[1]-e[0]);s=Cu(s,[0,o]),a=i=Cu(s,[a,i]),n=0}e[0]=Cu(e[0],t),e[1]=Cu(e[1],t);var l=mx(e,n);e[n]+=r;var u=a||0,c=t.slice();l.sign<0?c[0]+=u:c[1]-=u,e[n]=Cu(e[n],c);var f;return f=mx(e,n),a!=null&&(f.sign!==l.sign||f.span<a)&&(e[1-n]=e[n]+l.sign*a),f=mx(e,n),i!=null&&f.span>i&&(e[1-n]=e[n]+f.sign*i),e}function mx(r,e){var t=r[e]-r[1-e];return{span:Math.abs(t),sign:t>0?-1:t<0?1:e?-1:1}}function Cu(r,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,r))}var _x=L,HR=Math.min,GR=Math.max,WR=Math.floor,EJ=Math.ceil,UR=At,OJ=Math.PI,RJ=function(){function r(e,t,n){this.type="parallel",this._axesMap=ge(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,n)}return r.prototype._init=function(e,t,n){var a=e.dimensions,i=e.parallelAxisIndex;_x(a,function(o,s){var l=i[s],u=t.getComponent("parallelAxis",l),c=this._axesMap.set(o,new PJ(o,Ef(u),[0,0],u.get("type"),l)),f=c.type==="category";c.onBand=f&&u.get("boundaryGap"),c.inverse=u.get("inverse"),u.axis=c,c.model=u,c.coordinateSystem=u.coordinateSystem=this},this)},r.prototype.update=function(e,t){this._updateAxesFromSeries(this._model,e)},r.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),n=t.axisBase,a=t.layoutBase,i=t.pixelDimIndex,o=e[1-i],s=e[i];return o>=n&&o<=n+t.axisLength&&s>=a&&s<=a+t.layoutLength},r.prototype.getModel=function(){return this._model},r.prototype._updateAxesFromSeries=function(e,t){t.eachSeries(function(n){if(!!e.contains(n,t)){var a=n.getData();_x(this.dimensions,function(i){var o=this._axesMap.get(i);o.scale.unionExtentFromData(a,a.mapDimension(i)),Os(o.scale,o.model)},this)}},this)},r.prototype.resize=function(e,t){this._rect=Ht(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),this._layoutAxes()},r.prototype.getRect=function(){return this._rect},r.prototype._makeLayoutInfo=function(){var e=this._model,t=this._rect,n=["x","y"],a=["width","height"],i=e.get("layout"),o=i==="horizontal"?0:1,s=t[a[o]],l=[0,s],u=this.dimensions.length,c=tg(e.get("axisExpandWidth"),l),f=tg(e.get("axisExpandCount")||0,[0,u]),h=e.get("axisExpandable")&&u>3&&u>f&&f>1&&c>0&&s>0,v=e.get("axisExpandWindow"),d;if(v)d=tg(v[1]-v[0],l),v[1]=v[0]+d;else{d=tg(c*(f-1),l);var p=e.get("axisExpandCenter")||WR(u/2);v=[c*p-d/2],v[1]=v[0]+d}var g=(s-d)/(u-f);g<3&&(g=0);var y=[WR(UR(v[0]/c,1))+1,EJ(UR(v[1]/c,1))-1],m=g/c*v[0];return{layout:i,pixelDimIndex:o,layoutBase:t[n[o]],layoutLength:s,axisBase:t[n[1-o]],axisLength:t[a[1-o]],axisExpandable:h,axisExpandWidth:c,axisCollapseWidth:g,axisExpandWindow:v,axisCount:u,winInnerIndices:y,axisExpandWindow0Pos:m}},r.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,n=this.dimensions,a=this._makeLayoutInfo(),i=a.layout;t.each(function(o){var s=[0,a.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),_x(n,function(o,s){var l=(a.axisExpandable?kJ:NJ)(s,a),u={horizontal:{x:l.position,y:a.axisLength},vertical:{x:0,y:l.position}},c={horizontal:OJ/2,vertical:0},f=[u[i].x+e.x,u[i].y+e.y],h=c[i],v=gn();ji(v,v,h),oa(v,v,f),this._axesLayout[o]={position:f,rotation:h,transform:v,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},r.prototype.getAxis=function(e){return this._axesMap.get(e)},r.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},r.prototype.eachActiveState=function(e,t,n,a){n==null&&(n=0),a==null&&(a=e.count());var i=this._axesMap,o=this.dimensions,s=[],l=[];L(o,function(g){s.push(e.mapDimension(g)),l.push(i.get(g).model)});for(var u=this.hasAxisBrushed(),c=n;c<a;c++){var f=void 0;if(!u)f="normal";else{f="active";for(var h=e.getValues(s,c),v=0,d=o.length;v<d;v++){var p=l[v].getActiveState(h[v]);if(p==="inactive"){f="inactive";break}}}t(f,c)}},r.prototype.hasAxisBrushed=function(){for(var e=this.dimensions,t=this._axesMap,n=!1,a=0,i=e.length;a<i;a++)t.get(e[a]).model.getActiveState()!=="normal"&&(n=!0);return n},r.prototype.axisCoordToPoint=function(e,t){var n=this._axesLayout[t];return pa([e,0],n.transform)},r.prototype.getAxisLayout=function(e){return we(this._axesLayout[e])},r.prototype.getSlidedAxisExpandWindow=function(e){var t=this._makeLayoutInfo(),n=t.pixelDimIndex,a=t.axisExpandWindow.slice(),i=a[1]-a[0],o=[0,t.axisExpandWidth*(t.axisCount-1)];if(!this.containPoint(e))return{behavior:"none",axisExpandWindow:a};var s=e[n]-t.layoutBase-t.axisExpandWindow0Pos,l,u="slide",c=t.axisCollapseWidth,f=this._model.get("axisExpandSlideTriggerArea"),h=f[0]!=null;if(c)h&&c&&s<i*f[0]?(u="jump",l=s-i*f[2]):h&&c&&s>i*(1-f[0])?(u="jump",l=s-i*(1-f[2])):(l=s-i*f[1])>=0&&(l=s-i*(1-f[1]))<=0&&(l=0),l*=t.axisExpandWidth/c,l?Zs(l,a,o,"all"):u="none";else{var v=a[1]-a[0],d=o[1]*s/v;a=[GR(0,d-v/2)],a[1]=HR(o[1],a[0]+v),a[0]=a[1]-v}return{axisExpandWindow:a,behavior:u}},r}();function tg(r,e){return HR(GR(r,e[0]),e[1])}function NJ(r,e){var t=e.layoutLength/(e.axisCount-1);return{position:t*r,axisNameAvailableWidth:t,axisLabelShow:!0}}function kJ(r,e){var t=e.layoutLength,n=e.axisExpandWidth,a=e.axisCount,i=e.axisCollapseWidth,o=e.winInnerIndices,s,l=i,u=!1,c;return r<o[0]?(s=r*i,c=i):r<=o[1]?(s=e.axisExpandWindow0Pos+r*n-e.axisExpandWindow[0],l=n,u=!0):(s=t-(a-1-r)*i,c=i),{position:s,axisNameAvailableWidth:l,axisLabelShow:u,nameTruncateMaxWidth:c}}var BJ=RJ;function zJ(r,e){var t=[];return r.eachComponent("parallel",function(n,a){var i=new BJ(n,r,e);i.name="parallel_"+a,i.resize(n,e),n.coordinateSystem=i,i.model=n,t.push(i)}),r.eachSeries(function(n){if(n.get("coordinateSystem")==="parallel"){var a=n.getReferringComponents("parallel",$t).models[0];n.coordinateSystem=a.coordinateSystem}}),t}var FJ={create:zJ},VJ=FJ,jR=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.activeIntervals=[],t}return e.prototype.getAreaSelectStyle=function(){return is([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},e.prototype.setActiveIntervals=function(t){var n=this.activeIntervals=we(t);if(n)for(var a=n.length-1;a>=0;a--)_n(n[a])},e.prototype.getActiveState=function(t){var n=this.activeIntervals;if(!n.length)return"normal";if(t==null||isNaN(+t))return"inactive";if(n.length===1){var a=n[0];if(a[0]<=t&&t<=a[1])return"active"}else for(var i=0,o=n.length;i<o;i++)if(n[i][0]<=t&&t<=n[i][1])return"active";return"inactive"},e}($e);Et(jR,du);var YR=jR,Xs=!0,sh=Math.min,Tu=Math.max,$J=Math.pow,HJ=1e4,GJ=6,WJ=6,qR="globalPan",UJ={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},jJ={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},ZR={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},YJ=0,qJ=function(r){j(e,r);function e(t){var n=r.call(this)||this;return n._track=[],n._covers=[],n._handlers={},n._zr=t,n.group=new Te,n._uid="brushController_"+YJ++,L(tee,function(a,i){this._handlers[i]=fe(a,this)},n),n}return e.prototype.enableBrush=function(t){return this._brushType&&this._doDisableBrush(),t.brushType&&this._doEnableBrush(t),this},e.prototype._doEnableBrush=function(t){var n=this._zr;this._enableGlobalPan||aX(n,qR,this._uid),L(this._handlers,function(a,i){n.on(i,a)}),this._brushType=t.brushType,this._brushOption=Pe(we(ZR),t,!0)},e.prototype._doDisableBrush=function(){var t=this._zr;iX(t,qR,this._uid),L(this._handlers,function(n,a){t.off(a,n)}),this._brushType=this._brushOption=null},e.prototype.setPanels=function(t){if(t&&t.length){var n=this._panels={};L(t,function(a){n[a.panelId]=we(a)})}else this._panels=null;return this},e.prototype.mount=function(t){t=t||{},this._enableGlobalPan=t.enableGlobalPan;var n=this.group;return this._zr.add(n),n.attr({x:t.x||0,y:t.y||0,rotation:t.rotation||0,scaleX:t.scaleX||1,scaleY:t.scaleY||1}),this._transform=n.getLocalTransform(),this},e.prototype.updateCovers=function(t){t=J(t,function(h){return Pe(we(ZR),h,!0)});var n="\0-brush-index-",a=this._covers,i=this._covers=[],o=this,s=this._creatingCover;return new pi(a,t,u,l).add(c).update(c).remove(f).execute(),this;function l(h,v){return(h.id!=null?h.id:n+v)+"-"+h.brushType}function u(h,v){return l(h.__brushOption,v)}function c(h,v){var d=t[h];if(v!=null&&a[v]===s)i[h]=a[v];else{var p=i[h]=v!=null?(a[v].__brushOption=d,a[v]):QR(o,XR(o,d));bx(o,p)}}function f(h){a[h]!==s&&o.group.remove(a[h])}},e.prototype.unmount=function(){return this.enableBrush(!1),Cx(this),this._zr.remove(this.group),this},e.prototype.dispose=function(){this.unmount(),this.off()},e}(On);function XR(r,e){var t=rg[e.brushType].createCover(r,e);return t.__brushOption=e,JR(t,e),r.group.add(t),t}function QR(r,e){var t=xx(e);return t.endCreating&&(t.endCreating(r,e),JR(e,e.__brushOption)),e}function KR(r,e){var t=e.__brushOption;xx(e).updateCoverShape(r,e,t.range,t)}function JR(r,e){var t=e.z;t==null&&(t=HJ),r.traverse(function(n){n.z=t,n.z2=t})}function bx(r,e){xx(e).updateCommon(r,e),KR(r,e)}function xx(r){return rg[r.__brushOption.brushType]}function Sx(r,e,t){var n=r._panels;if(!n)return Xs;var a,i=r._transform;return L(n,function(o){o.isTargetByCursor(e,t,i)&&(a=o)}),a}function eN(r,e){var t=r._panels;if(!t)return Xs;var n=e.__brushOption.panelId;return n!=null?t[n]:Xs}function Cx(r){var e=r._covers,t=e.length;return L(e,function(n){r.group.remove(n)},r),e.length=0,!!t}function Qs(r,e){var t=J(r._covers,function(n){var a=n.__brushOption,i=we(a.range);return{brushType:a.brushType,panelId:a.panelId,range:i}});r.trigger("brush",{areas:t,isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function ZJ(r){var e=r._track;if(!e.length)return!1;var t=e[e.length-1],n=e[0],a=t[0]-n[0],i=t[1]-n[1],o=$J(a*a+i*i,.5);return o>GJ}function tN(r){var e=r.length-1;return e<0&&(e=0),[r[0],r[e]]}function rN(r,e,t,n){var a=new Te;return a.add(new Ge({name:"main",style:Dx(t),silent:!0,draggable:!0,cursor:"move",drift:Ae(iN,r,e,a,["n","s","w","e"]),ondragend:Ae(Qs,e,{isEnd:!0})})),L(n,function(i){a.add(new Ge({name:i.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Ae(iN,r,e,a,i),ondragend:Ae(Qs,e,{isEnd:!0})}))}),a}function nN(r,e,t,n){var a=n.brushStyle.lineWidth||0,i=Tu(a,WJ),o=t[0][0],s=t[1][0],l=o-a/2,u=s-a/2,c=t[0][1],f=t[1][1],h=c-i+a/2,v=f-i+a/2,d=c-o,p=f-s,g=d+a,y=p+a;bi(r,e,"main",o,s,d,p),n.transformable&&(bi(r,e,"w",l,u,i,y),bi(r,e,"e",h,u,i,y),bi(r,e,"n",l,u,g,i),bi(r,e,"s",l,v,g,i),bi(r,e,"nw",l,u,i,i),bi(r,e,"ne",h,u,i,i),bi(r,e,"sw",l,v,i,i),bi(r,e,"se",h,v,i,i))}function Tx(r,e){var t=e.__brushOption,n=t.transformable,a=e.childAt(0);a.useStyle(Dx(t)),a.attr({silent:!n,cursor:n?"move":"default"}),L([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(i){var o=e.childOfName(i.join("")),s=i.length===1?Mx(r,i[0]):QJ(r,i);o&&o.attr({silent:!n,invisible:!n,cursor:n?jJ[s]+"-resize":null})})}function bi(r,e,t,n,a,i,o){var s=e.childOfName(t);s&&s.setShape(JJ(Ax(r,e,[[n,a],[n+i,a+o]])))}function Dx(r){return me({strokeNoScale:!0},r.brushStyle)}function aN(r,e,t,n){var a=[sh(r,t),sh(e,n)],i=[Tu(r,t),Tu(e,n)];return[[a[0],i[0]],[a[1],i[1]]]}function XJ(r){return io(r.group)}function Mx(r,e){var t={w:"left",e:"right",n:"top",s:"bottom"},n={left:"w",right:"e",top:"n",bottom:"s"},a=Id(t[e],XJ(r));return n[a]}function QJ(r,e){var t=[Mx(r,e[0]),Mx(r,e[1])];return(t[0]==="e"||t[0]==="w")&&t.reverse(),t.join("")}function iN(r,e,t,n,a,i){var o=t.__brushOption,s=r.toRectRange(o.range),l=oN(e,a,i);L(n,function(u){var c=UJ[u];s[c[0]][c[1]]+=l[c[0]]}),o.range=r.fromRectRange(aN(s[0][0],s[1][0],s[0][1],s[1][1])),bx(e,t),Qs(e,{isEnd:!1})}function KJ(r,e,t,n){var a=e.__brushOption.range,i=oN(r,t,n);L(a,function(o){o[0]+=i[0],o[1]+=i[1]}),bx(r,e),Qs(r,{isEnd:!1})}function oN(r,e,t){var n=r.group,a=n.transformCoordToLocal(e,t),i=n.transformCoordToLocal(0,0);return[a[0]-i[0],a[1]-i[1]]}function Ax(r,e,t){var n=eN(r,e);return n&&n!==Xs?n.clipPath(t,r._transform):we(t)}function JJ(r){var e=sh(r[0][0],r[1][0]),t=sh(r[0][1],r[1][1]),n=Tu(r[0][0],r[1][0]),a=Tu(r[0][1],r[1][1]);return{x:e,y:t,width:n-e,height:a-t}}function eee(r,e,t){if(!(!r._brushType||ree(r,e.offsetX,e.offsetY))){var n=r._zr,a=r._covers,i=Sx(r,e,t);if(!r._dragging)for(var o=0;o<a.length;o++){var s=a[o].__brushOption;if(i&&(i===Xs||s.panelId===i.panelId)&&rg[s.brushType].contain(a[o],t[0],t[1]))return}i&&n.setCursorStyle("crosshair")}}function Lx(r){var e=r.event;e.preventDefault&&e.preventDefault()}function Ix(r,e,t){return r.childOfName("main").contain(e,t)}function sN(r,e,t,n){var a=r._creatingCover,i=r._creatingPanel,o=r._brushOption,s;if(r._track.push(t.slice()),ZJ(r)||a){if(i&&!a){o.brushMode==="single"&&Cx(r);var l=we(o);l.brushType=lN(l.brushType,i),l.panelId=i===Xs?null:i.panelId,a=r._creatingCover=XR(r,l),r._covers.push(a)}if(a){var u=rg[lN(r._brushType,i)],c=a.__brushOption;c.range=u.getCreatingRange(Ax(r,a,r._track)),n&&(QR(r,a),u.updateCommon(r,a)),KR(r,a),s={isEnd:n}}}else n&&o.brushMode==="single"&&o.removeOnClick&&Sx(r,e,t)&&Cx(r)&&(s={isEnd:n,removeOnClick:!0});return s}function lN(r,e){return r==="auto"?e.defaultBrushType:r}var tee={mousedown:function(r){if(this._dragging)uN(this,r);else if(!r.target||!r.target.draggable){Lx(r);var e=this.group.transformCoordToLocal(r.offsetX,r.offsetY);this._creatingCover=null;var t=this._creatingPanel=Sx(this,r,e);t&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(r){var e=r.offsetX,t=r.offsetY,n=this.group.transformCoordToLocal(e,t);if(eee(this,r,n),this._dragging){Lx(r);var a=sN(this,r,n,!1);a&&Qs(this,a)}},mouseup:function(r){uN(this,r)}};function uN(r,e){if(r._dragging){Lx(e);var t=e.offsetX,n=e.offsetY,a=r.group.transformCoordToLocal(t,n),i=sN(r,e,a,!0);r._dragging=!1,r._track=[],r._creatingCover=null,i&&Qs(r,i)}}function ree(r,e,t){var n=r._zr;return e<0||e>n.getWidth()||t<0||t>n.getHeight()}var rg={lineX:cN(0),lineY:cN(1),rect:{createCover:function(r,e){function t(n){return n}return rN({toRectRange:t,fromRectRange:t},r,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var e=tN(r);return aN(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(r,e,t,n){nN(r,e,t,n)},updateCommon:Tx,contain:Ix},polygon:{createCover:function(r,e){var t=new Te;return t.add(new Wr({name:"main",style:Dx(e),silent:!0})),t},getCreatingRange:function(r){return r},endCreating:function(r,e){e.remove(e.childAt(0)),e.add(new Gr({name:"main",draggable:!0,drift:Ae(KJ,r,e),ondragend:Ae(Qs,r,{isEnd:!0})}))},updateCoverShape:function(r,e,t,n){e.childAt(0).setShape({points:Ax(r,e,t)})},updateCommon:Tx,contain:Ix}};function cN(r){return{createCover:function(e,t){return rN({toRectRange:function(n){var a=[n,[0,100]];return r&&a.reverse(),a},fromRectRange:function(n){return n[r]}},e,t,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(e){var t=tN(e),n=sh(t[0][r],t[1][r]),a=Tu(t[0][r],t[1][r]);return[n,a]},updateCoverShape:function(e,t,n,a){var i,o=eN(e,t);if(o!==Xs&&o.getLinearBrushOtherExtent)i=o.getLinearBrushOtherExtent(r);else{var s=e._zr;i=[0,[s.getWidth(),s.getHeight()][1-r]]}var l=[n,i];r&&l.reverse(),nN(e,t,l,a)},updateCommon:Tx,contain:Ix}}var Px=qJ;function fN(r){return r=Ex(r),function(e){return b_(e,r)}}function hN(r,e){return r=Ex(r),function(t){var n=e!=null?e:t,a=n?r.width:r.height,i=n?r.x:r.y;return[i,i+(a||0)]}}function vN(r,e,t){var n=Ex(r);return function(a,i){return n.contain(i[0],i[1])&&!$p(a,e,t)}}function Ex(r){return Re.create(r)}var nee=["axisLine","axisTickLabel","axisName"],aee=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){r.prototype.init.apply(this,arguments),(this._brushController=new Px(n.getZr())).on("brush",fe(this._onBrush,this))},e.prototype.render=function(t,n,a,i){if(!iee(t,n,i)){this.axisModel=t,this.api=a,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new Te,this.group.add(this._axisGroup),!!t.get("show")){var s=see(t,n),l=s.coordinateSystem,u=t.getAreaSelectStyle(),c=u.width,f=t.axis.dim,h=l.getAxisLayout(f),v=Q({strokeContainThreshold:c},h),d=new mi(t,v);L(nee,d.add,d),this._axisGroup.add(d.getGroup()),this._refreshBrushController(v,u,t,s,c,a),rf(o,this._axisGroup,t)}}},e.prototype._refreshBrushController=function(t,n,a,i,o,s){var l=a.axis.getExtent(),u=l[1]-l[0],c=Math.min(30,Math.abs(u)*.1),f=Re.create({x:l[0],y:-o/2,width:u,height:o});f.x-=c,f.width+=2*c,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,x:t.position[0],y:t.position[1]}).setPanels([{panelId:"pl",clipPath:fN(f),isTargetByCursor:vN(f,s,i),getLinearBrushOtherExtent:hN(f,0)}]).enableBrush({brushType:"lineX",brushStyle:n,removeOnClick:!0}).updateCovers(oee(a))},e.prototype._onBrush=function(t){var n=t.areas,a=this.axisModel,i=a.axis,o=J(n,function(s){return[i.coordToData(s.range[0],!0),i.coordToData(s.range[1],!0)]});(!a.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:a.id,intervals:o})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e}(wt);function iee(r,e,t){return t&&t.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:t})[0]===r}function oee(r){var e=r.axis;return J(r.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}function see(r,e){return e.getComponent("parallel",r.get("parallelIndex"))}var lee=aee,uee={type:"axisAreaSelect",event:"axisAreaSelected"};function cee(r){r.registerAction(uee,function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(n){n.axis.model.setActiveIntervals(e.intervals)})}),r.registerAction("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(n){n.setAxisExpand(e)})})}var fee={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function dN(r){r.registerComponentView(MJ),r.registerComponentModel(LJ),r.registerCoordinateSystem("parallel",VJ),r.registerPreprocessor(xJ),r.registerComponentModel(YR),r.registerComponentView(lee),_u(r,"parallel",YR,fee),cee(r)}function hee(r){ke(dN),r.registerChartView(vJ),r.registerSeriesModel(yJ),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,bJ)}var vee=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return r}(),dee=function(r){j(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new vee},e.prototype.buildPath=function(t,n){var a=n.extent;t.moveTo(n.x1,n.y1),t.bezierCurveTo(n.cpx1,n.cpy1,n.cpx2,n.cpy2,n.x2,n.y2),n.orient==="vertical"?(t.lineTo(n.x2+a,n.y2),t.bezierCurveTo(n.cpx2+a,n.cpy2,n.cpx1+a,n.cpy1,n.x1+a,n.y1)):(t.lineTo(n.x2,n.y2+a),t.bezierCurveTo(n.cpx2,n.cpy2+a,n.cpx1,n.cpy1+a,n.x1,n.y1+a)),t.closePath()},e.prototype.highlight=function(){hi(this)},e.prototype.downplay=function(){vi(this)},e}(Be),pee=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._focusAdjacencyDisabled=!1,t}return e.prototype.render=function(t,n,a){var i=this,o=t.getGraph(),s=this.group,l=t.layoutInfo,u=l.width,c=l.height,f=t.getData(),h=t.getData("edge"),v=t.get("orient");this._model=t,s.removeAll(),s.x=l.x,s.y=l.y,o.eachEdge(function(d){var p=new dee,g=Me(p);g.dataIndex=d.dataIndex,g.seriesIndex=t.seriesIndex,g.dataType="edge";var y=d.getModel(),m=y.getModel("lineStyle"),_=m.get("curveness"),b=d.node1.getLayout(),w=d.node1.getModel(),x=w.get("localX"),S=w.get("localY"),T=d.node2.getLayout(),D=d.node2.getModel(),M=D.get("localX"),A=D.get("localY"),I=d.getLayout(),P,E,O,N,V,$,U,Y;switch(p.shape.extent=Math.max(1,I.dy),p.shape.orient=v,v==="vertical"?(P=(x!=null?x*u:b.x)+I.sy,E=(S!=null?S*c:b.y)+b.dy,O=(M!=null?M*u:T.x)+I.ty,N=A!=null?A*c:T.y,V=P,$=E*(1-_)+N*_,U=O,Y=E*_+N*(1-_)):(P=(x!=null?x*u:b.x)+b.dx,E=(S!=null?S*c:b.y)+I.sy,O=M!=null?M*u:T.x,N=(A!=null?A*c:T.y)+I.ty,V=P*(1-_)+O*_,$=E,U=P*_+O*(1-_),Y=N),p.setShape({x1:P,y1:E,x2:O,y2:N,cpx1:V,cpy1:$,cpx2:U,cpy2:Y}),p.useStyle(m.getItemStyle()),p.style.fill){case"source":p.style.fill=d.node1.getVisual("color"),p.style.decal=d.node1.getVisual("style").decal;break;case"target":p.style.fill=d.node2.getVisual("color"),p.style.decal=d.node2.getVisual("style").decal;break;case"gradient":var ae=d.node1.getVisual("color"),H=d.node2.getVisual("color");ce(ae)&&ce(H)&&(p.style.fill=new Hl(0,0,+(v==="horizontal"),+(v==="vertical"),[{color:ae,offset:0},{color:H,offset:1}]))}yr(p,rr(y,"edgeLabel"),{labelFetcher:t,labelDataIndex:d.dataIndex,defaultText:""+y.get("value")}),p.setTextConfig({position:"inside"});var q=y.getModel("emphasis");gr(p,y,"lineStyle",function(Z){return Z.getItemStyle()}),s.add(p),h.setItemGraphicEl(d.dataIndex,p);var X=q.get("focus");Lt(p,X==="adjacency"?d.getAdjacentDataIndices():X,q.get("blurScope"),q.get("disabled")),Me(p).dataType="edge"}),o.eachNode(function(d){var p=d.getLayout(),g=d.getModel(),y=g.get("localX"),m=g.get("localY"),_=g.getModel("emphasis"),b=new Ge({shape:{x:y!=null?y*u:p.x,y:m!=null?m*c:p.y,width:p.dx,height:p.dy},style:g.getModel("itemStyle").getItemStyle(),z2:10});yr(b,rr(g),{labelFetcher:t,labelDataIndex:d.dataIndex,defaultText:d.id}),b.disableLabelAnimation=!0,b.setStyle("fill",d.getVisual("color")),b.setStyle("decal",d.getVisual("style").decal),gr(b,g),s.add(b),f.setItemGraphicEl(d.dataIndex,b),Me(b).dataType="node";var w=_.get("focus");Lt(b,w==="adjacency"?d.getAdjacentDataIndices():w,_.get("blurScope"),_.get("disabled"))}),f.eachItemGraphicEl(function(d,p){var g=f.getItemModel(p);g.get("draggable")&&(d.drift=function(y,m){i._focusAdjacencyDisabled=!0,this.shape.x+=y,this.shape.y+=m,this.dirty(),a.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:f.getRawIndex(p),localX:this.shape.x/u,localY:this.shape.y/c})},d.ondragend=function(){i._focusAdjacencyDisabled=!1},d.draggable=!0,d.cursor="move")}),!this._data&&t.isAnimationEnabled()&&s.setClipPath(gee(s.getBoundingRect(),t,function(){s.removeClipPath()})),this._data=t.getData()},e.prototype.dispose=function(){},e.type="sankey",e}(ut);function gee(r,e,t){var n=new Ge({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return xt(n,{shape:{width:r.width+20}},e,t),n}var yee=pee,mee=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,n){var a=t.edges||t.links,i=t.data||t.nodes,o=t.levels;this.levelModels=[];for(var s=this.levelModels,l=0;l<o.length;l++)o[l].depth!=null&&o[l].depth>=0&&(s[o[l].depth]=new lt(o[l],this,n));if(i&&a){var u=zR(i,a,this,!0,c);return u.data}function c(f,h){f.wrapMethod("getItemModel",function(v,d){var p=v.parentModel,g=p.getData().getItemLayout(d);if(g){var y=g.depth,m=p.levelModels[y];m&&(v.parentModel=m)}return v}),h.wrapMethod("getItemModel",function(v,d){var p=v.parentModel,g=p.getGraph().getEdgeByIndex(d),y=g.node1.getLayout();if(y){var m=y.depth,_=p.levelModels[m];_&&(v.parentModel=_)}return v})}},e.prototype.setNodePosition=function(t,n){var a=this.option.data||this.option.nodes,i=a[t];i.localX=n[0],i.localY=n[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,n,a){function i(v){return isNaN(v)||v==null}if(a==="edge"){var o=this.getDataParams(t,a),s=o.data,l=o.value,u=s.source+" -- "+s.target;return nr("nameValue",{name:u,value:l,noValue:i(l)})}else{var c=this.getGraph().getNodeByIndex(t),f=c.getLayout().value,h=this.getDataParams(t,a).data.name;return nr("nameValue",{name:h!=null?h+"":null,value:f,noValue:i(f)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(t,n){var a=r.prototype.getDataParams.call(this,t,n);if(a.value==null&&n==="node"){var i=this.getGraph().getNodeByIndex(t),o=i.getLayout().value;a.value=o}return a},e.type="series.sankey",e.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(yt),_ee=mee;function bee(r,e){r.eachSeriesByType("sankey",function(t){var n=t.get("nodeWidth"),a=t.get("nodeGap"),i=xee(t,e);t.layoutInfo=i;var o=i.width,s=i.height,l=t.getGraph(),u=l.nodes,c=l.edges;See(u);var f=nt(u,function(p){return p.getLayout().value===0}),h=f.length!==0?0:t.get("layoutIterations"),v=t.get("orient"),d=t.get("nodeAlign");wee(u,c,n,a,o,s,h,v,d)})}function xee(r,e){return Ht(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function wee(r,e,t,n,a,i,o,s,l){Cee(r,e,t,a,i,s,l),Aee(r,e,i,a,n,o,s),Bee(r,s)}function See(r){L(r,function(e){var t=wo(e.outEdges,ng),n=wo(e.inEdges,ng),a=e.getValue()||0,i=Math.max(t,n,a);e.setLayout({value:i},!0)})}function Cee(r,e,t,n,a,i,o){for(var s=[],l=[],u=[],c=[],f=0,h=0;h<e.length;h++)s[h]=1;for(var h=0;h<r.length;h++)l[h]=r[h].inEdges.length,l[h]===0&&u.push(r[h]);for(var v=-1;u.length;){for(var d=0;d<u.length;d++){var p=u[d],g=p.hostGraph.data.getRawDataItem(p.dataIndex),y=g.depth!=null&&g.depth>=0;y&&g.depth>v&&(v=g.depth),p.setLayout({depth:y?g.depth:f},!0),i==="vertical"?p.setLayout({dy:t},!0):p.setLayout({dx:t},!0);for(var m=0;m<p.outEdges.length;m++){var _=p.outEdges[m],b=e.indexOf(_);s[b]=0;var w=_.node2,x=r.indexOf(w);--l[x]===0&&c.indexOf(w)<0&&c.push(w)}}++f,u=c,c=[]}for(var h=0;h<s.length;h++)if(s[h]===1)throw new Error("Sankey is a DAG, the original data has cycle!");var S=v>f-1?v:f-1;o&&o!=="left"&&Tee(r,o,i,S);var T=i==="vertical"?(a-t)/S:(n-t)/S;Mee(r,T,i)}function pN(r){var e=r.hostGraph.data.getRawDataItem(r.dataIndex);return e.depth!=null&&e.depth>=0}function Tee(r,e,t,n){if(e==="right"){for(var a=[],i=r,o=0;i.length;){for(var s=0;s<i.length;s++){var l=i[s];l.setLayout({skNodeHeight:o},!0);for(var u=0;u<l.inEdges.length;u++){var c=l.inEdges[u];a.indexOf(c.node1)<0&&a.push(c.node1)}}i=a,a=[],++o}L(r,function(f){pN(f)||f.setLayout({depth:Math.max(0,n-f.getLayout().skNodeHeight)},!0)})}else e==="justify"&&Dee(r,n)}function Dee(r,e){L(r,function(t){!pN(t)&&!t.outEdges.length&&t.setLayout({depth:e},!0)})}function Mee(r,e,t){L(r,function(n){var a=n.getLayout().depth*e;t==="vertical"?n.setLayout({y:a},!0):n.setLayout({x:a},!0)})}function Aee(r,e,t,n,a,i,o){var s=Lee(r,o);Iee(s,e,t,n,a,o),Ox(s,a,t,n,o);for(var l=1;i>0;i--)l*=.99,Pee(s,l,o),Ox(s,a,t,n,o),kee(s,l,o),Ox(s,a,t,n,o)}function Lee(r,e){var t=[],n=e==="vertical"?"y":"x",a=k0(r,function(i){return i.getLayout()[n]});return a.keys.sort(function(i,o){return i-o}),L(a.keys,function(i){t.push(a.buckets.get(i))}),t}function Iee(r,e,t,n,a,i){var o=1/0;L(r,function(s){var l=s.length,u=0;L(s,function(f){u+=f.getLayout().value});var c=i==="vertical"?(n-(l-1)*a)/u:(t-(l-1)*a)/u;c<o&&(o=c)}),L(r,function(s){L(s,function(l,u){var c=l.getLayout().value*o;i==="vertical"?(l.setLayout({x:u},!0),l.setLayout({dx:c},!0)):(l.setLayout({y:u},!0),l.setLayout({dy:c},!0))})}),L(e,function(s){var l=+s.getValue()*o;s.setLayout({dy:l},!0)})}function Ox(r,e,t,n,a){var i=a==="vertical"?"x":"y";L(r,function(o){o.sort(function(p,g){return p.getLayout()[i]-g.getLayout()[i]});for(var s,l,u,c=0,f=o.length,h=a==="vertical"?"dx":"dy",v=0;v<f;v++)l=o[v],u=c-l.getLayout()[i],u>0&&(s=l.getLayout()[i]+u,a==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[i]+l.getLayout()[h]+e;var d=a==="vertical"?n:t;if(u=c-e-d,u>0){s=l.getLayout()[i]-u,a==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),c=s;for(var v=f-2;v>=0;--v)l=o[v],u=l.getLayout()[i]+l.getLayout()[h]+e-c,u>0&&(s=l.getLayout()[i]-u,a==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[i]}})}function Pee(r,e,t){L(r.slice().reverse(),function(n){L(n,function(a){if(a.outEdges.length){var i=wo(a.outEdges,Eee,t)/wo(a.outEdges,ng);if(isNaN(i)){var o=a.outEdges.length;i=o?wo(a.outEdges,Oee,t)/o:0}if(t==="vertical"){var s=a.getLayout().x+(i-xo(a,t))*e;a.setLayout({x:s},!0)}else{var l=a.getLayout().y+(i-xo(a,t))*e;a.setLayout({y:l},!0)}}})})}function Eee(r,e){return xo(r.node2,e)*r.getValue()}function Oee(r,e){return xo(r.node2,e)}function Ree(r,e){return xo(r.node1,e)*r.getValue()}function Nee(r,e){return xo(r.node1,e)}function xo(r,e){return e==="vertical"?r.getLayout().x+r.getLayout().dx/2:r.getLayout().y+r.getLayout().dy/2}function ng(r){return r.getValue()}function wo(r,e,t){for(var n=0,a=r.length,i=-1;++i<a;){var o=+e(r[i],t);isNaN(o)||(n+=o)}return n}function kee(r,e,t){L(r,function(n){L(n,function(a){if(a.inEdges.length){var i=wo(a.inEdges,Ree,t)/wo(a.inEdges,ng);if(isNaN(i)){var o=a.inEdges.length;i=o?wo(a.inEdges,Nee,t)/o:0}if(t==="vertical"){var s=a.getLayout().x+(i-xo(a,t))*e;a.setLayout({x:s},!0)}else{var l=a.getLayout().y+(i-xo(a,t))*e;a.setLayout({y:l},!0)}}})})}function Bee(r,e){var t=e==="vertical"?"x":"y";L(r,function(n){n.outEdges.sort(function(a,i){return a.node2.getLayout()[t]-i.node2.getLayout()[t]}),n.inEdges.sort(function(a,i){return a.node1.getLayout()[t]-i.node1.getLayout()[t]})}),L(r,function(n){var a=0,i=0;L(n.outEdges,function(o){o.setLayout({sy:a},!0),a+=o.getLayout().dy}),L(n.inEdges,function(o){o.setLayout({ty:i},!0),i+=o.getLayout().dy})})}function zee(r){r.eachSeriesByType("sankey",function(e){var t=e.getGraph(),n=t.nodes,a=t.edges;if(n.length){var i=1/0,o=-1/0;L(n,function(s){var l=s.getLayout().value;l<i&&(i=l),l>o&&(o=l)}),L(n,function(s){var l=new _r({type:"color",mappingMethod:"linear",dataExtent:[i,o],visual:e.get("color")}),u=l.mapValueToVisual(s.getLayout().value),c=s.getModel().get(["itemStyle","color"]);c!=null?(s.setVisual("color",c),s.setVisual("style",{fill:c})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}a.length&&L(a,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function Fee(r){r.registerChartView(yee),r.registerSeriesModel(_ee),r.registerLayout(bee),r.registerVisual(zee),r.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(n){n.setNodePosition(e.dataIndex,[e.localX,e.localY])})})}var gN=function(){function r(){}return r.prototype.getInitialData=function(e,t){var n,a=t.getComponent("xAxis",this.get("xAxisIndex")),i=t.getComponent("yAxis",this.get("yAxisIndex")),o=a.get("type"),s=i.get("type"),l;o==="category"?(e.layout="horizontal",n=a.getOrdinalMeta(),l=!0):s==="category"?(e.layout="vertical",n=i.getOrdinalMeta(),l=!0):e.layout=e.layout||"horizontal";var u=["x","y"],c=e.layout==="horizontal"?0:1,f=this._baseAxisDim=u[c],h=u[1-c],v=[a,i],d=v[c].get("type"),p=v[1-c].get("type"),g=e.data;if(g&&l){var y=[];L(g,function(b,w){var x;K(b)?(x=b.slice(),b.unshift(w)):K(b.value)?(x=Q({},b),x.value=x.value.slice(),b.value.unshift(w)):x=b,y.push(x)}),e.data=y}var m=this.defaultValueDimensions,_=[{name:f,type:vp(d),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:h,type:vp(p),dimsDef:m.slice()}];return mu(this,{coordDimensions:_,dimensionsCount:m.length+1,encodeDefaulter:Ae(SA,_,this)})},r.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},r}(),yN=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],t.visualDrawType="stroke",t}return e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},e}(yt);Et(yN,gN,!0);var Vee=yN,$ee=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=t.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=t.get("layout")==="horizontal"?1:0;i.diff(s).add(function(u){if(i.hasValue(u)){var c=i.getItemLayout(u),f=mN(c,i,u,l,!0);i.setItemGraphicEl(u,f),o.add(f)}}).update(function(u,c){var f=s.getItemGraphicEl(c);if(!i.hasValue(u)){o.remove(f);return}var h=i.getItemLayout(u);f?(da(f),_N(h,f,i,u)):f=mN(h,i,u,l),o.add(f),i.setItemGraphicEl(u,f)}).remove(function(u){var c=s.getItemGraphicEl(u);c&&o.remove(c)}).execute(),this._data=i},e.prototype.remove=function(t){var n=this.group,a=this._data;this._data=null,a&&a.eachItemGraphicEl(function(i){i&&n.remove(i)})},e.type="boxplot",e}(ut),Hee=function(){function r(){}return r}(),Gee=function(r){j(e,r);function e(t){var n=r.call(this,t)||this;return n.type="boxplotBoxPath",n}return e.prototype.getDefaultShape=function(){return new Hee},e.prototype.buildPath=function(t,n){var a=n.points,i=0;for(t.moveTo(a[i][0],a[i][1]),i++;i<4;i++)t.lineTo(a[i][0],a[i][1]);for(t.closePath();i<a.length;i++)t.moveTo(a[i][0],a[i][1]),i++,t.lineTo(a[i][0],a[i][1])},e}(Be);function mN(r,e,t,n,a){var i=r.ends,o=new Gee({shape:{points:a?Wee(i,n,r):i}});return _N(r,o,e,t,a),o}function _N(r,e,t,n,a){var i=t.hostModel,o=af[a?"initProps":"updateProps"];o(e,{shape:{points:r.ends}},i,n),e.useStyle(t.getItemVisual(n,"style")),e.style.strokeNoScale=!0,e.z2=100;var s=t.getItemModel(n),l=s.getModel("emphasis");gr(e,s),Lt(e,l.get("focus"),l.get("blurScope"),l.get("disabled"))}function Wee(r,e,t){return J(r,function(n){return n=n.slice(),n[e]=t.initBaseline,n})}var Uee=$ee,lh=L;function jee(r){var e=Yee(r);lh(e,function(t){var n=t.seriesModels;!n.length||(qee(t),lh(n,function(a,i){Zee(a,t.boxOffsetList[i],t.boxWidthList[i])}))})}function Yee(r){var e=[],t=[];return r.eachSeriesByType("boxplot",function(n){var a=n.getBaseAxis(),i=Ne(t,a);i<0&&(i=t.length,t[i]=a,e[i]={axis:a,seriesModels:[]}),e[i].seriesModels.push(n)}),e}function qee(r){var e=r.axis,t=r.seriesModels,n=t.length,a=r.boxWidthList=[],i=r.boxOffsetList=[],o=[],s;if(e.type==="category")s=e.getBandWidth();else{var l=0;lh(t,function(d){l=Math.max(l,d.getData().count())});var u=e.getExtent();s=Math.abs(u[1]-u[0])/l}lh(t,function(d){var p=d.get("boxWidth");K(p)||(p=[p,p]),o.push([le(p[0],s)||0,le(p[1],s)||0])});var c=s*.8-2,f=c/n*.3,h=(c-f*(n-1))/n,v=h/2-c/2;lh(t,function(d,p){i.push(v),v+=f+h,a.push(Math.min(Math.max(h,o[p][0]),o[p][1]))})}function Zee(r,e,t){var n=r.coordinateSystem,a=r.getData(),i=t/2,o=r.get("layout")==="horizontal"?0:1,s=1-o,l=["x","y"],u=a.mapDimension(l[o]),c=a.mapDimensionsAll(l[s]);if(u==null||c.length<5)return;for(var f=0;f<a.count();f++){var h=a.get(u,f),v=_(h,c[2],f),d=_(h,c[0],f),p=_(h,c[1],f),g=_(h,c[3],f),y=_(h,c[4],f),m=[];b(m,p,!1),b(m,g,!0),m.push(d,p,y,g),w(m,d),w(m,y),w(m,v),a.setItemLayout(f,{initBaseline:v[s],ends:m})}function _(x,S,T){var D=a.get(S,T),M=[];M[o]=x,M[s]=D;var A;return isNaN(x)||isNaN(D)?A=[NaN,NaN]:(A=n.dataToPoint(M),A[o]+=e),A}function b(x,S,T){var D=S.slice(),M=S.slice();D[o]+=i,M[o]-=i,T?x.push(D,M):x.push(M,D)}function w(x,S){var T=S.slice(),D=S.slice();T[o]-=i,D[o]+=i,x.push(T,D)}}function Xee(r,e){e=e||{};for(var t=[],n=[],a=e.boundIQR,i=a==="none"||a===0,o=0;o<r.length;o++){var s=_n(r[o].slice()),l=nd(s,.25),u=nd(s,.5),c=nd(s,.75),f=s[0],h=s[s.length-1],v=(a==null?1.5:a)*(c-l),d=i?f:Math.max(f,l-v),p=i?h:Math.min(h,c+v),g=e.itemNameFormatter,y=ye(g)?g({value:o}):ce(g)?g.replace("{value}",o+""):o+"";t.push([y,d,l,u,c,p]);for(var m=0;m<s.length;m++){var _=s[m];if(_<d||_>p){var b=[y,_];n.push(b)}}}return{boxData:t,outliers:n}}var Qee={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==Lr){var n="";tt(n)}var a=Xee(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:a.boxData},{data:a.outliers}]}};function Kee(r){r.registerSeriesModel(Vee),r.registerChartView(Uee),r.registerLayout(jee),r.registerTransform(Qee)}var Jee=["color","borderColor"],ete=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,n,a){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,n,a,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,n):this._incrementalRenderNormal(t,n)},e.prototype.eachRendered=function(t){oo(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var n=t.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},e.prototype._renderNormal=function(t){var n=t.getData(),a=this._data,i=this.group,o=n.getLayout("isSimpleBox"),s=t.get("clip",!0),l=t.coordinateSystem,u=l.getArea&&l.getArea();this._data||i.removeAll(),n.diff(a).add(function(c){if(n.hasValue(c)){var f=n.getItemLayout(c);if(s&&bN(u,f))return;var h=Rx(f,c,!0);xt(h,{shape:{points:f.ends}},t,c),Nx(h,n,c,o),i.add(h),n.setItemGraphicEl(c,h)}}).update(function(c,f){var h=a.getItemGraphicEl(f);if(!n.hasValue(c)){i.remove(h);return}var v=n.getItemLayout(c);if(s&&bN(u,v)){i.remove(h);return}h?(qe(h,{shape:{points:v.ends}},t,c),da(h)):h=Rx(v),Nx(h,n,c,o),i.add(h),n.setItemGraphicEl(c,h)}).remove(function(c){var f=a.getItemGraphicEl(c);f&&i.remove(f)}).execute(),this._data=n},e.prototype._renderLarge=function(t){this._clear(),xN(t,this.group);var n=t.get("clip",!0)?Ep(t.coordinateSystem,!1,t):null;n?this.group.setClipPath(n):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,n){for(var a=n.getData(),i=a.getLayout("isSimpleBox"),o;(o=t.next())!=null;){var s=a.getItemLayout(o),l=Rx(s);Nx(l,a,o,i),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(t,n){xN(n,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(ut),tte=function(){function r(){}return r}(),rte=function(r){j(e,r);function e(t){var n=r.call(this,t)||this;return n.type="normalCandlestickBox",n}return e.prototype.getDefaultShape=function(){return new tte},e.prototype.buildPath=function(t,n){var a=n.points;this.__simpleBox?(t.moveTo(a[4][0],a[4][1]),t.lineTo(a[6][0],a[6][1])):(t.moveTo(a[0][0],a[0][1]),t.lineTo(a[1][0],a[1][1]),t.lineTo(a[2][0],a[2][1]),t.lineTo(a[3][0],a[3][1]),t.closePath(),t.moveTo(a[4][0],a[4][1]),t.lineTo(a[5][0],a[5][1]),t.moveTo(a[6][0],a[6][1]),t.lineTo(a[7][0],a[7][1]))},e}(Be);function Rx(r,e,t){var n=r.ends;return new rte({shape:{points:t?nte(n,r):n},z2:100})}function bN(r,e){for(var t=!0,n=0;n<e.ends.length;n++)if(r.contain(e.ends[n][0],e.ends[n][1])){t=!1;break}return t}function Nx(r,e,t,n){var a=e.getItemModel(t);r.useStyle(e.getItemVisual(t,"style")),r.style.strokeNoScale=!0,r.__simpleBox=n,gr(r,a)}function nte(r,e){return J(r,function(t){return t=t.slice(),t[1]=e.initBaseline,t})}var ate=function(){function r(){}return r}(),kx=function(r){j(e,r);function e(t){var n=r.call(this,t)||this;return n.type="largeCandlestickBox",n}return e.prototype.getDefaultShape=function(){return new ate},e.prototype.buildPath=function(t,n){for(var a=n.points,i=0;i<a.length;)if(this.__sign===a[i++]){var o=a[i++];t.moveTo(o,a[i++]),t.lineTo(o,a[i++])}else i+=3},e}(Be);function xN(r,e,t,n){var a=r.getData(),i=a.getLayout("largePoints"),o=new kx({shape:{points:i},__sign:1,ignoreCoarsePointer:!0});e.add(o);var s=new kx({shape:{points:i},__sign:-1,ignoreCoarsePointer:!0});e.add(s);var l=new kx({shape:{points:i},__sign:0,ignoreCoarsePointer:!0});e.add(l),Bx(1,o,r),Bx(-1,s,r),Bx(0,l,r),n&&(o.incremental=!0,s.incremental=!0),t&&t.push(o,s)}function Bx(r,e,t,n){var a=t.get(["itemStyle",r>0?"borderColor":"borderColor0"])||t.get(["itemStyle",r>0?"color":"color0"]);r===0&&(a=t.get(["itemStyle","borderColorDoji"]));var i=t.getModel("itemStyle").getItemStyle(Jee);e.useStyle(i),e.style.fill=null,e.style.stroke=a}var ite=ete,wN=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],t}return e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(t,n,a){var i=n.getItemLayout(t);return i&&a.rect(i.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(yt);Et(wN,gN,!0);var ote=wN;function ste(r){!r||!K(r.series)||L(r.series,function(e){_e(e)&&e.type==="k"&&(e.type="candlestick")})}var lte=["itemStyle","borderColor"],ute=["itemStyle","borderColor0"],cte=["itemStyle","borderColorDoji"],fte=["itemStyle","color"],hte=["itemStyle","color0"],vte={seriesType:"candlestick",plan:iu(),performRawSeries:!0,reset:function(r,e){function t(i,o){return o.get(i>0?fte:hte)}function n(i,o){return o.get(i===0?cte:i>0?lte:ute)}if(!e.isSeriesFiltered(r)){var a=r.pipelineContext.large;return!a&&{progress:function(i,o){for(var s;(s=i.next())!=null;){var l=o.getItemModel(s),u=o.getItemLayout(s).sign,c=l.getItemStyle();c.fill=t(u,l),c.stroke=n(u,l)||c.fill;var f=o.ensureUniqueItemVisual(s,"style");Q(f,c)}}}}}},dte=vte,pte={seriesType:"candlestick",plan:iu(),reset:function(r){var e=r.coordinateSystem,t=r.getData(),n=gte(r,t),a=0,i=1,o=["x","y"],s=t.getDimensionIndex(t.mapDimension(o[a])),l=J(t.mapDimensionsAll(o[i]),t.getDimensionIndex,t),u=l[0],c=l[1],f=l[2],h=l[3];if(t.setLayout({candleWidth:n,isSimpleBox:n<=1.3}),s<0||l.length<4)return;return{progress:r.pipelineContext.large?d:v};function v(p,g){for(var y,m=g.getStore();(y=p.next())!=null;){var _=m.get(s,y),b=m.get(u,y),w=m.get(c,y),x=m.get(f,y),S=m.get(h,y),T=Math.min(b,w),D=Math.max(b,w),M=V(T,_),A=V(D,_),I=V(x,_),P=V(S,_),E=[];$(E,A,0),$(E,M,1),E.push(Y(P),Y(A),Y(I),Y(M));var O=g.getItemModel(y),N=!!O.get(["itemStyle","borderColorDoji"]);g.setItemLayout(y,{sign:SN(m,y,b,w,c,N),initBaseline:b>w?A[i]:M[i],ends:E,brushRect:U(x,S,_)})}function V(ae,H){var q=[];return q[a]=H,q[i]=ae,isNaN(H)||isNaN(ae)?[NaN,NaN]:e.dataToPoint(q)}function $(ae,H,q){var X=H.slice(),Z=H.slice();X[a]=Ld(X[a]+n/2,1,!1),Z[a]=Ld(Z[a]-n/2,1,!0),q?ae.push(X,Z):ae.push(Z,X)}function U(ae,H,q){var X=V(ae,q),Z=V(H,q);return X[a]-=n/2,Z[a]-=n/2,{x:X[0],y:X[1],width:n,height:Z[1]-X[1]}}function Y(ae){return ae[a]=Ld(ae[a],1),ae}}function d(p,g){for(var y=Ua(p.count*4),m=0,_,b=[],w=[],x,S=g.getStore(),T=!!r.get(["itemStyle","borderColorDoji"]);(x=p.next())!=null;){var D=S.get(s,x),M=S.get(u,x),A=S.get(c,x),I=S.get(f,x),P=S.get(h,x);if(isNaN(D)||isNaN(I)||isNaN(P)){y[m++]=NaN,m+=3;continue}y[m++]=SN(S,x,M,A,c,T),b[a]=D,b[i]=I,_=e.dataToPoint(b,null,w),y[m++]=_?_[0]:NaN,y[m++]=_?_[1]:NaN,b[i]=P,_=e.dataToPoint(b,null,w),y[m++]=_?_[1]:NaN}g.setLayout("largePoints",y)}}};function SN(r,e,t,n,a,i){var o;return t>n?o=-1:t<n?o=1:o=i?0:e>0?r.get(a,e-1)<=n?1:-1:1,o}function gte(r,e){var t=r.getBaseAxis(),n,a=t.type==="category"?t.getBandWidth():(n=t.getExtent(),Math.abs(n[1]-n[0])/e.count()),i=le(Ee(r.get("barMaxWidth"),a),a),o=le(Ee(r.get("barMinWidth"),1),a),s=r.get("barWidth");return s!=null?le(s,a):Math.max(Math.min(a/2,i),o)}var yte=pte;function mte(r){r.registerChartView(ite),r.registerSeriesModel(ote),r.registerPreprocessor(ste),r.registerVisual(dte),r.registerLayout(yte)}function CN(r,e){var t=e.rippleEffectColor||e.color;r.eachChild(function(n){n.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?t:null,fill:e.brushType==="fill"?t:null}})})}var _te=function(r){j(e,r);function e(t,n){var a=r.call(this)||this,i=new Vf(t,n),o=new Te;return a.add(i),a.add(o),a.updateData(t,n),a}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var n=t.symbolType,a=t.color,i=t.rippleNumber,o=this.childAt(1),s=0;s<i;s++){var l=kt(n,-1,-1,2,2,a);l.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var u=-s/i*t.period+t.effectOffset;l.animate("",!0).when(t.period,{scaleX:t.rippleScale/2,scaleY:t.rippleScale/2}).delay(u).start(),l.animateStyle(!0).when(t.period,{opacity:0}).delay(u).start(),o.add(l)}CN(o,t)},e.prototype.updateEffectAnimation=function(t){for(var n=this._effectCfg,a=this.childAt(1),i=["symbolType","period","rippleScale","rippleNumber"],o=0;o<i.length;o++){var s=i[o];if(n[s]!==t[s]){this.stopEffectAnimation(),this.startEffectAnimation(t);return}}CN(a,t)},e.prototype.highlight=function(){hi(this)},e.prototype.downplay=function(){vi(this)},e.prototype.getSymbolType=function(){var t=this.childAt(0);return t&&t.getSymbolType()},e.prototype.updateData=function(t,n){var a=this,i=t.hostModel;this.childAt(0).updateData(t,n);var o=this.childAt(1),s=t.getItemModel(n),l=t.getItemVisual(n,"symbol"),u=wf(t.getItemVisual(n,"symbolSize")),c=t.getItemVisual(n,"style"),f=c&&c.fill,h=s.getModel("emphasis");o.setScale(u),o.traverse(function(g){g.setStyle("fill",f)});var v=lu(t.getItemVisual(n,"symbolOffset"),u);v&&(o.x=v[0],o.y=v[1]);var d=t.getItemVisual(n,"symbolRotate");o.rotation=(d||0)*Math.PI/180||0;var p={};p.showEffectOn=i.get("showEffectOn"),p.rippleScale=s.get(["rippleEffect","scale"]),p.brushType=s.get(["rippleEffect","brushType"]),p.period=s.get(["rippleEffect","period"])*1e3,p.effectOffset=n/t.count(),p.z=i.getShallow("z")||0,p.zlevel=i.getShallow("zlevel")||0,p.symbolType=l,p.color=f,p.rippleEffectColor=s.get(["rippleEffect","color"]),p.rippleNumber=s.get(["rippleEffect","number"]),p.showEffectOn==="render"?(this._effectCfg?this.updateEffectAnimation(p):this.startEffectAnimation(p),this._effectCfg=p):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(g){g==="emphasis"?p.showEffectOn!=="render"&&a.startEffectAnimation(p):g==="normal"&&p.showEffectOn!=="render"&&a.stopEffectAnimation()}),this._effectCfg=p,Lt(this,h.get("focus"),h.get("blurScope"),h.get("disabled"))},e.prototype.fadeOut=function(t){t&&t()},e}(Te),bte=_te,xte=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this._symbolDraw=new $f(bte)},e.prototype.render=function(t,n,a){var i=t.getData(),o=this._symbolDraw;o.updateData(i,{clipShape:this._getClipShape(t)}),this.group.add(o.group)},e.prototype._getClipShape=function(t){var n=t.coordinateSystem,a=n&&n.getArea&&n.getArea();return t.get("clip",!0)?a:null},e.prototype.updateTransform=function(t,n,a){var i=t.getData();this.group.dirty();var o=Hf("").reset(t,n,a);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout()},e.prototype._updateGroupTransform=function(t){var n=t.coordinateSystem;n&&n.getRoamTransform&&(this.group.transform=i2(n.getRoamTransform()),this.group.decomposeTransform())},e.prototype.remove=function(t,n){this._symbolDraw&&this._symbolDraw.remove(!0)},e.type="effectScatter",e}(ut),wte=xte,Ste=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,n){return Wa(null,this,{useEncodeDefaulter:!0})},e.prototype.brushSelector=function(t,n,a){return a.point(n.getItemLayout(t))},e.type="series.effectScatter",e.dependencies=["grid","polar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",clip:!0,rippleEffect:{period:4,scale:2.5,brushType:"fill",number:3},universalTransition:{divideShape:"clone"},symbolSize:10},e}(yt),Cte=Ste;function Tte(r){r.registerChartView(wte),r.registerSeriesModel(Cte),r.registerLayout(Hf("effectScatter"))}var Dte=function(r){j(e,r);function e(t,n,a){var i=r.call(this)||this;return i.add(i.createLine(t,n,a)),i._updateEffectSymbol(t,n),i}return e.prototype.createLine=function(t,n,a){return new lx(t,n,a)},e.prototype._updateEffectSymbol=function(t,n){var a=t.getItemModel(n),i=a.getModel("effect"),o=i.get("symbolSize"),s=i.get("symbol");K(o)||(o=[o,o]);var l=t.getItemVisual(n,"style"),u=i.get("color")||l&&l.stroke,c=this.childAt(1);this._symbolType!==s&&(this.remove(c),c=kt(s,-.5,-.5,1,1,u),c.z2=100,c.culling=!0,this.add(c)),c&&(c.setStyle("shadowColor",u),c.setStyle(i.getItemStyle(["color"])),c.scaleX=o[0],c.scaleY=o[1],c.setColor(u),this._symbolType=s,this._symbolScale=o,this._updateEffectAnimation(t,i,n))},e.prototype._updateEffectAnimation=function(t,n,a){var i=this.childAt(1);if(!!i){var o=t.getItemLayout(a),s=n.get("period")*1e3,l=n.get("loop"),u=n.get("roundTrip"),c=n.get("constantSpeed"),f=Jt(n.get("delay"),function(v){return v/t.count()*s/3});if(i.ignore=!0,this._updateAnimationPoints(i,o),c>0&&(s=this._getLineLength(i)/c*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){i.stopAnimation();var h=void 0;ye(f)?h=f(a):h=f,i.__t>0&&(h=-s*i.__t),this._animateSymbol(i,s,h,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},e.prototype._animateSymbol=function(t,n,a,i,o){if(n>0){t.__t=0;var s=this,l=t.animate("",i).when(o?n*2:n,{__t:o?2:1}).delay(a).during(function(){s._updateSymbolPosition(t)});i||l.done(function(){s.remove(t)}),l.start()}},e.prototype._getLineLength=function(t){return ni(t.__p1,t.__cp1)+ni(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,n){t.__p1=n[0],t.__p2=n[1],t.__cp1=n[2]||[(n[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2]},e.prototype.updateData=function(t,n,a){this.childAt(0).updateData(t,n,a),this._updateEffectSymbol(t,n)},e.prototype._updateSymbolPosition=function(t){var n=t.__p1,a=t.__p2,i=t.__cp1,o=t.__t<1?t.__t:2-t.__t,s=[t.x,t.y],l=s.slice(),u=lr,c=Qm;s[0]=u(n[0],i[0],a[0],o),s[1]=u(n[1],i[1],a[1],o);var f=t.__t<1?c(n[0],i[0],a[0],o):c(a[0],i[0],n[0],1-o),h=t.__t<1?c(n[1],i[1],a[1],o):c(a[1],i[1],n[1],1-o);t.rotation=-Math.atan2(h,f)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(t.__lastT!==void 0&&t.__lastT<t.__t?(t.scaleY=ni(l,s)*1.05,o===1&&(s[0]=l[0]+(s[0]-l[0])/2,s[1]=l[1]+(s[1]-l[1])/2)):t.__lastT===1?t.scaleY=2*ni(n,s):t.scaleY=this._symbolScale[1]),t.__lastT=t.__t,t.ignore=!1,t.x=s[0],t.y=s[1]},e.prototype.updateLayout=function(t,n){this.childAt(0).updateLayout(t,n);var a=t.getItemModel(n).getModel("effect");this._updateEffectAnimation(t,a,n)},e}(Te),TN=Dte,Mte=function(r){j(e,r);function e(t,n,a){var i=r.call(this)||this;return i._createPolyline(t,n,a),i}return e.prototype._createPolyline=function(t,n,a){var i=t.getItemLayout(n),o=new Wr({shape:{points:i}});this.add(o),this._updateCommonStl(t,n,a)},e.prototype.updateData=function(t,n,a){var i=t.hostModel,o=this.childAt(0),s={shape:{points:t.getItemLayout(n)}};qe(o,s,i,n),this._updateCommonStl(t,n,a)},e.prototype._updateCommonStl=function(t,n,a){var i=this.childAt(0),o=t.getItemModel(n),s=a&&a.emphasisLineStyle,l=a&&a.focus,u=a&&a.blurScope,c=a&&a.emphasisDisabled;if(!a||t.hasItemOption){var f=o.getModel("emphasis");s=f.getModel("lineStyle").getLineStyle(),c=f.get("disabled"),l=f.get("focus"),u=f.get("blurScope")}i.useStyle(t.getItemVisual(n,"style")),i.style.fill=null,i.style.strokeNoScale=!0;var h=i.ensureState("emphasis");h.style=s,Lt(this,l,u,c)},e.prototype.updateLayout=function(t,n){var a=this.childAt(0);a.setShape("points",t.getItemLayout(n))},e}(Te),DN=Mte,Ate=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t._lastFrame=0,t._lastFramePercent=0,t}return e.prototype.createLine=function(t,n,a){return new DN(t,n,a)},e.prototype._updateAnimationPoints=function(t,n){this._points=n;for(var a=[0],i=0,o=1;o<n.length;o++){var s=n[o-1],l=n[o];i+=ni(s,l),a.push(i)}if(i===0){this._length=0;return}for(var o=0;o<a.length;o++)a[o]/=i;this._offsets=a,this._length=i},e.prototype._getLineLength=function(){return this._length},e.prototype._updateSymbolPosition=function(t){var n=t.__t<1?t.__t:2-t.__t,a=this._points,i=this._offsets,o=a.length;if(!!i){var s=this._lastFrame,l;if(n<this._lastFramePercent){var u=Math.min(s+1,o-1);for(l=u;l>=0&&!(i[l]<=n);l--);l=Math.min(l,o-2)}else{for(l=s;l<o&&!(i[l]>n);l++);l=Math.min(l-1,o-2)}var c=(n-i[l])/(i[l+1]-i[l]),f=a[l],h=a[l+1];t.x=f[0]*(1-c)+c*h[0],t.y=f[1]*(1-c)+c*h[1];var v=t.__t<1?h[0]-f[0]:f[0]-h[0],d=t.__t<1?h[1]-f[1]:f[1]-h[1];t.rotation=-Math.atan2(d,v)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=n,t.ignore=!1}},e}(TN),Lte=Ate,Ite=function(){function r(){this.polyline=!1,this.curveness=0,this.segs=[]}return r}(),Pte=function(r){j(e,r);function e(t){var n=r.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Ite},e.prototype.buildPath=function(t,n){var a=n.segs,i=n.curveness,o;if(n.polyline)for(o=this._off;o<a.length;){var s=a[o++];if(s>0){t.moveTo(a[o++],a[o++]);for(var l=1;l<s;l++)t.lineTo(a[o++],a[o++])}}else for(o=this._off;o<a.length;){var u=a[o++],c=a[o++],f=a[o++],h=a[o++];if(t.moveTo(u,c),i>0){var v=(u+f)/2-(c-h)*i,d=(c+h)/2-(f-u)*i;t.quadraticCurveTo(v,d,f,h)}else t.lineTo(f,h)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(t,n){var a=this.shape,i=a.segs,o=a.curveness,s=this.style.lineWidth;if(a.polyline)for(var l=0,u=0;u<i.length;){var c=i[u++];if(c>0)for(var f=i[u++],h=i[u++],v=1;v<c;v++){var d=i[u++],p=i[u++];if(eo(f,h,d,p,s,t,n))return l}l++}else for(var l=0,u=0;u<i.length;){var f=i[u++],h=i[u++],d=i[u++],p=i[u++];if(o>0){var g=(f+d)/2-(h-p)*o,y=(h+p)/2-(d-f)*o;if(LD(f,h,g,y,d,p,s,t,n))return l}else if(eo(f,h,d,p,s,t,n))return l;l++}return-1},e.prototype.contain=function(t,n){var a=this.transformCoordToLocal(t,n),i=this.getBoundingRect();if(t=a[0],n=a[1],i.contain(t,n)){var o=this.hoverDataIdx=this.findDataIndex(t,n);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var n=this.shape,a=n.segs,i=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u<a.length;){var c=a[u++],f=a[u++];i=Math.min(c,i),s=Math.max(c,s),o=Math.min(f,o),l=Math.max(f,l)}t=this._rect=new Re(i,o,s,l)}return t},e}(Be),Ete=function(){function r(){this.group=new Te}return r.prototype.updateData=function(e){this._clear();var t=this._create();t.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(t,e)},r.prototype.incrementalPrepareUpdate=function(e){this.group.removeAll(),this._clear()},r.prototype.incrementalUpdate=function(e,t){var n=this._newAdded[0],a=t.getLayout("linesPoints"),i=n&&n.shape.segs;if(i&&i.length<2e4){var o=i.length,s=new Float32Array(o+a.length);s.set(i),s.set(a,o),n.setShape({segs:s})}else{this._newAdded=[];var l=this._create();l.incremental=!0,l.setShape({segs:a}),this._setCommon(l,t),l.__startIndex=e.start}},r.prototype.remove=function(){this._clear()},r.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},r.prototype._create=function(){var e=new Pte({cursor:"default",ignoreCoarsePointer:!0});return this._newAdded.push(e),this.group.add(e),e},r.prototype._setCommon=function(e,t,n){var a=t.hostModel;e.setShape({polyline:a.get("polyline"),curveness:a.get(["lineStyle","curveness"])}),e.useStyle(a.getModel("lineStyle").getLineStyle()),e.style.strokeNoScale=!0;var i=t.getVisual("style");i&&i.stroke&&e.setStyle("stroke",i.stroke),e.setStyle("fill",null);var o=Me(e);o.seriesIndex=a.seriesIndex,e.on("mousemove",function(s){o.dataIndex=null;var l=e.hoverDataIdx;l>0&&(o.dataIndex=l+e.__startIndex)})},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}(),Ote=Ete,Rte={seriesType:"lines",plan:iu(),reset:function(r){var e=r.coordinateSystem;if(!!e){var t=r.get("polyline"),n=r.pipelineContext.large;return{progress:function(a,i){var o=[];if(n){var s=void 0,l=a.end-a.start;if(t){for(var u=0,c=a.start;c<a.end;c++)u+=r.getLineCoordsCount(c);s=new Float32Array(l+u*2)}else s=new Float32Array(l*4);for(var f=0,h=[],c=a.start;c<a.end;c++){var v=r.getLineCoords(c,o);t&&(s[f++]=v);for(var d=0;d<v;d++)h=e.dataToPoint(o[d],!1,h),s[f++]=h[0],s[f++]=h[1]}i.setLayout("linesPoints",s)}else for(var c=a.start;c<a.end;c++){var p=i.getItemModel(c),v=r.getLineCoords(c,o),g=[];if(t)for(var y=0;y<v;y++)g.push(e.dataToPoint(o[y]));else{g[0]=e.dataToPoint(o[0]),g[1]=e.dataToPoint(o[1]);var m=p.get(["lineStyle","curveness"]);+m&&(g[2]=[(g[0][0]+g[1][0])/2-(g[0][1]-g[1][1])*m,(g[0][1]+g[1][1])/2-(g[1][0]-g[0][0])*m])}i.setItemLayout(c,g)}}}}}},MN=Rte,Nte=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=t.getData(),o=this._updateLineDraw(i,t),s=t.get("zlevel"),l=t.get(["effect","trailLength"]),u=a.getZr(),c=u.painter.getType()==="svg";c||u.painter.getLayer(s).clear(!0),this._lastZlevel!=null&&!c&&u.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(t)&&l>0&&(c||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(i);var f=t.get("clip",!0)&&Ep(t.coordinateSystem,!1,t);f?this.group.setClipPath(f):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,n,a){var i=t.getData(),o=this._updateLineDraw(i,t);o.incrementalPrepareUpdate(i),this._clearLayer(a),this._finished=!1},e.prototype.incrementalRender=function(t,n,a){this._lineDraw.incrementalUpdate(t,n.getData()),this._finished=t.end===n.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,n,a){var i=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=MN.reset(t,n,a);s.progress&&s.progress({start:0,end:i.count(),count:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(a)},e.prototype._updateLineDraw=function(t,n){var a=this._lineDraw,i=this._showEffect(n),o=!!n.get("polyline"),s=n.pipelineContext,l=s.large;return(!a||i!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(a&&a.remove(),a=this._lineDraw=l?new Ote:new cx(o?i?Lte:DN:i?TN:lx),this._hasEffet=i,this._isPolyline=o,this._isLargeDraw=l),this.group.add(a.group),a},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var n=t.getZr(),a=n.painter.getType()==="svg";!a&&this._lastZlevel!=null&&n.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,n){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(n)},e.prototype.dispose=function(t,n){this.remove(t,n)},e.type="lines",e}(ut),kte=Nte,Bte=typeof Uint32Array=="undefined"?Array:Uint32Array,zte=typeof Float64Array=="undefined"?Array:Float64Array;function AN(r){var e=r.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(r.data=J(e,function(t){var n=[t[0].coord,t[1].coord],a={coords:n};return t[0].name&&(a.fromName=t[0].name),t[1].name&&(a.toName=t[1].name),Tv([a,t[0],t[1]])}))}var Fte=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.init=function(t){t.data=t.data||[],AN(t);var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count)),r.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(t){if(AN(t),t.data){var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count))}r.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var n=this._processFlatCoordsArray(t.data);n.flatCoords&&(this._flatCoords?(this._flatCoords=hc(this._flatCoords,n.flatCoords),this._flatCoordsOffset=hc(this._flatCoordsOffset,n.flatCoordsOffset)):(this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset),t.data=new Float32Array(n.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var n=this.getData().getItemModel(t),a=n.option instanceof Array?n.option:n.getShallow("coords");return a},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[t*2+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,n){if(this._flatCoordsOffset){for(var a=this._flatCoordsOffset[t*2],i=this._flatCoordsOffset[t*2+1],o=0;o<i;o++)n[o]=n[o]||[],n[o][0]=this._flatCoords[a+o*2],n[o][1]=this._flatCoords[a+o*2+1];return i}else{for(var s=this._getCoordsFromItemModel(t),o=0;o<s.length;o++)n[o]=n[o]||[],n[o][0]=s[o][0],n[o][1]=s[o][1];return s.length}},e.prototype._processFlatCoordsArray=function(t){var n=0;if(this._flatCoords&&(n=this._flatCoords.length),je(t[0])){for(var a=t.length,i=new Bte(a),o=new zte(a),s=0,l=0,u=0,c=0;c<a;){u++;var f=t[c++];i[l++]=s+n,i[l++]=f;for(var h=0;h<f;h++){var v=t[c++],d=t[c++];o[s++]=v,o[s++]=d}}return{flatCoordsOffset:new Uint32Array(i.buffer,0,l),flatCoords:o,count:u}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},e.prototype.getInitialData=function(t,n){var a=new Er(["value"],this);return a.hasItemOption=!1,a.initData(t.data,[],function(i,o,s,l){if(i instanceof Array)return NaN;a.hasItemOption=!0;var u=i.value;if(u!=null)return u instanceof Array?u[l]:u}),a},e.prototype.formatTooltip=function(t,n,a){var i=this.getData(),o=i.getItemModel(t),s=o.get("name");if(s)return s;var l=o.get("fromName"),u=o.get("toName"),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),nr("nameValue",{name:c.join(" > ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return t==null?this.option.large?1e4:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t==null?this.option.large?2e4:this.get("progressiveThreshold"):t},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),n=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&n>0?n+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(yt),Vte=Fte;function ag(r){return r instanceof Array||(r=[r,r]),r}var $te={seriesType:"lines",reset:function(r){var e=ag(r.get("symbol")),t=ag(r.get("symbolSize")),n=r.getData();n.setVisual("fromSymbol",e&&e[0]),n.setVisual("toSymbol",e&&e[1]),n.setVisual("fromSymbolSize",t&&t[0]),n.setVisual("toSymbolSize",t&&t[1]);function a(i,o){var s=i.getItemModel(o),l=ag(s.getShallow("symbol",!0)),u=ag(s.getShallow("symbolSize",!0));l[0]&&i.setItemVisual(o,"fromSymbol",l[0]),l[1]&&i.setItemVisual(o,"toSymbol",l[1]),u[0]&&i.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&i.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:n.hasItemOption?a:null}}},Hte=$te;function Gte(r){r.registerChartView(kte),r.registerSeriesModel(Vte),r.registerLayout(MN),r.registerVisual(Hte)}var Wte=256,Ute=function(){function r(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=ia.createCanvas();this.canvas=e}return r.prototype.update=function(e,t,n,a,i,o){var s=this._getBrush(),l=this._getGradient(i,"inRange"),u=this._getGradient(i,"outOfRange"),c=this.pointSize+this.blurSize,f=this.canvas,h=f.getContext("2d"),v=e.length;f.width=t,f.height=n;for(var d=0;d<v;++d){var p=e[d],g=p[0],y=p[1],m=p[2],_=a(m);h.globalAlpha=_,h.drawImage(s,g-c,y-c)}if(!f.width||!f.height)return f;for(var b=h.getImageData(0,0,f.width,f.height),w=b.data,x=0,S=w.length,T=this.minOpacity,D=this.maxOpacity,M=D-T;x<S;){var _=w[x+3]/256,A=Math.floor(_*(Wte-1))*4;if(_>0){var I=o(_)?l:u;_>0&&(_=_*M+T),w[x++]=I[A],w[x++]=I[A+1],w[x++]=I[A+2],w[x++]=I[A+3]*_*256}else x+=4}return h.putImageData(b,0,0),f},r.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=ia.createCanvas()),t=this.pointSize+this.blurSize,n=t*2;e.width=n,e.height=n;var a=e.getContext("2d");return a.clearRect(0,0,n,n),a.shadowOffsetX=n,a.shadowBlur=this.blurSize,a.shadowColor="#000",a.beginPath(),a.arc(-t,t,this.pointSize,0,Math.PI*2,!0),a.closePath(),a.fill(),e},r.prototype._getGradient=function(e,t){for(var n=this._gradientPixels,a=n[t]||(n[t]=new Uint8ClampedArray(256*4)),i=[0,0,0,0],o=0,s=0;s<256;s++)e[t](s/255,!0,i),a[o++]=i[0],a[o++]=i[1],a[o++]=i[2],a[o++]=i[3];return a},r}(),jte=Ute;function Yte(r,e,t){var n=r[1]-r[0];e=J(e,function(o){return{interval:[(o.interval[0]-r[0])/n,(o.interval[1]-r[0])/n]}});var a=e.length,i=0;return function(o){var s;for(s=i;s<a;s++){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){i=s;break}}if(s===a)for(s=i-1;s>=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){i=s;break}}return s>=0&&s<a&&t[s]}}function qte(r,e){var t=r[1]-r[0];return e=[(e[0]-r[0])/t,(e[1]-r[0])/t],function(n){return n>=e[0]&&n<=e[1]}}function LN(r){var e=r.dimensions;return e[0]==="lng"&&e[1]==="lat"}var Zte=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i;n.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===t&&(i=s)})}),this._progressiveEls=null,this.group.removeAll();var o=t.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"?this._renderOnCartesianAndCalendar(t,a,0,t.getData().count()):LN(o)&&this._renderOnGeo(o,t,i,a)},e.prototype.incrementalPrepareRender=function(t,n,a){this.group.removeAll()},e.prototype.incrementalRender=function(t,n,a,i){var o=n.coordinateSystem;o&&(LN(o)?this.render(n,a,i):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(n,i,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){oo(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,n,a,i,o){var s=t.coordinateSystem,l=$s(s,"cartesian2d"),u,c,f,h;if(l){var v=s.getAxis("x"),d=s.getAxis("y");u=v.getBandWidth()+.5,c=d.getBandWidth()+.5,f=v.scale.getExtent(),h=d.scale.getExtent()}for(var p=this.group,g=t.getData(),y=t.getModel(["emphasis","itemStyle"]).getItemStyle(),m=t.getModel(["blur","itemStyle"]).getItemStyle(),_=t.getModel(["select","itemStyle"]).getItemStyle(),b=t.get(["itemStyle","borderRadius"]),w=rr(t),x=t.getModel("emphasis"),S=x.get("focus"),T=x.get("blurScope"),D=x.get("disabled"),M=l?[g.mapDimension("x"),g.mapDimension("y"),g.mapDimension("value")]:[g.mapDimension("time"),g.mapDimension("value")],A=a;A<i;A++){var I=void 0,P=g.getItemVisual(A,"style");if(l){var E=g.get(M[0],A),O=g.get(M[1],A);if(isNaN(g.get(M[2],A))||isNaN(E)||isNaN(O)||E<f[0]||E>f[1]||O<h[0]||O>h[1])continue;var N=s.dataToPoint([E,O]);I=new Ge({shape:{x:N[0]-u/2,y:N[1]-c/2,width:u,height:c},style:P})}else{if(isNaN(g.get(M[1],A)))continue;I=new Ge({z2:1,shape:s.dataToRect([g.get(M[0],A)]).contentShape,style:P})}if(g.hasItemOption){var V=g.getItemModel(A),$=V.getModel("emphasis");y=$.getModel("itemStyle").getItemStyle(),m=V.getModel(["blur","itemStyle"]).getItemStyle(),_=V.getModel(["select","itemStyle"]).getItemStyle(),b=V.get(["itemStyle","borderRadius"]),S=$.get("focus"),T=$.get("blurScope"),D=$.get("disabled"),w=rr(V)}I.shape.r=b;var U=t.getRawValue(A),Y="-";U&&U[2]!=null&&(Y=U[2]+""),yr(I,w,{labelFetcher:t,labelDataIndex:A,defaultOpacity:P.opacity,defaultText:Y}),I.ensureState("emphasis").style=y,I.ensureState("blur").style=m,I.ensureState("select").style=_,Lt(I,S,T,D),I.incremental=o,o&&(I.states.emphasis.hoverLayer=!0),p.add(I),g.setItemGraphicEl(A,I),this._progressiveEls&&this._progressiveEls.push(I)}},e.prototype._renderOnGeo=function(t,n,a,i){var o=a.targetVisuals.inRange,s=a.targetVisuals.outOfRange,l=n.getData(),u=this._hmLayer||this._hmLayer||new jte;u.blurSize=n.get("blurSize"),u.pointSize=n.get("pointSize"),u.minOpacity=n.get("minOpacity"),u.maxOpacity=n.get("maxOpacity");var c=t.getViewRect().clone(),f=t.getRoamTransform();c.applyTransform(f);var h=Math.max(c.x,0),v=Math.max(c.y,0),d=Math.min(c.width+c.x,i.getWidth()),p=Math.min(c.height+c.y,i.getHeight()),g=d-h,y=p-v,m=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],_=l.mapArray(m,function(S,T,D){var M=t.dataToPoint([S,T]);return M[0]-=h,M[1]-=v,M.push(D),M}),b=a.getExtent(),w=a.type==="visualMap.continuous"?qte(b,a.option.range):Yte(b,a.getPieceList(),a.option.selected);u.update(_,g,y,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},w);var x=new ur({style:{width:g,height:y,x:h,y:v,image:u.canvas},silent:!0});this.group.add(x)},e.type="heatmap",e}(ut),Xte=Zte,Qte=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,n){return Wa(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=ru.get(this.get("coordinateSystem"));if(t&&t.dimensions)return t.dimensions[0]==="lng"&&t.dimensions[1]==="lat"},e.type="series.heatmap",e.dependencies=["grid","geo","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},e}(yt),Kte=Qte;function Jte(r){r.registerChartView(Xte),r.registerSeriesModel(Kte)}var ere=["itemStyle","borderWidth"],IN=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],zx=new ha,tre=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=this.group,o=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis(),c=u.isHorizontal(),f=l.master.getRect(),h={ecSize:{width:a.getWidth(),height:a.getHeight()},seriesModel:t,coordSys:l,coordSysExtent:[[f.x,f.x+f.width],[f.y,f.y+f.height]],isHorizontal:c,valueDim:IN[+c],categoryDim:IN[1-+c]};return o.diff(s).add(function(v){if(!!o.hasValue(v)){var d=BN(o,v),p=PN(o,v,d,h),g=zN(o,h,p);o.setItemGraphicEl(v,g),i.add(g),$N(g,h,p)}}).update(function(v,d){var p=s.getItemGraphicEl(d);if(!o.hasValue(v)){i.remove(p);return}var g=BN(o,v),y=PN(o,v,g,h),m=VN(o,y);p&&m!==p.__pictorialShapeStr&&(i.remove(p),o.setItemGraphicEl(v,null),p=null),p?lre(p,h,y):p=zN(o,h,y,!0),o.setItemGraphicEl(v,p),p.__pictorialSymbolMeta=y,i.add(p),$N(p,h,y)}).remove(function(v){var d=s.getItemGraphicEl(v);d&&FN(s,v,d.__pictorialSymbolMeta.animationModel,d)}).execute(),this._data=o,this.group},e.prototype.remove=function(t,n){var a=this.group,i=this._data;t.get("animation")?i&&i.eachItemGraphicEl(function(o){FN(i,Me(o).dataIndex,t,o)}):a.removeAll()},e.type="pictorialBar",e}(ut);function PN(r,e,t,n){var a=r.getItemLayout(e),i=t.get("symbolRepeat"),o=t.get("symbolClip"),s=t.get("symbolPosition")||"start",l=t.get("symbolRotate"),u=(l||0)*Math.PI/180||0,c=t.get("symbolPatternSize")||2,f=t.isAnimationEnabled(),h={dataIndex:e,layout:a,itemModel:t,symbolType:r.getItemVisual(e,"symbol")||"circle",style:r.getItemVisual(e,"style"),symbolClip:o,symbolRepeat:i,symbolRepeatDirection:t.get("symbolRepeatDirection"),symbolPatternSize:c,rotation:u,animationModel:f?t:null,hoverScale:f&&t.get(["emphasis","scale"]),z2:t.getShallow("z",!0)||0};rre(t,i,a,n,h),nre(r,e,a,i,o,h.boundingLength,h.pxSign,c,n,h),are(t,h.symbolScale,u,n,h);var v=h.symbolSize,d=lu(t.get("symbolOffset"),v);return ire(t,v,a,i,o,d,s,h.valueLineWidth,h.boundingLength,h.repeatCutLength,n,h),h}function rre(r,e,t,n,a){var i=n.valueDim,o=r.get("symbolBoundingData"),s=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(t[i.wh]<=0),c;if(K(o)){var f=[Fx(s,o[0])-l,Fx(s,o[1])-l];f[1]<f[0]&&f.reverse(),c=f[u]}else o!=null?c=Fx(s,o)-l:e?c=n.coordSysExtent[i.index][u]-l:c=t[i.wh];a.boundingLength=c,e&&(a.repeatCutLength=t[i.wh]),a.pxSign=c>0?1:-1}function Fx(r,e){return r.toGlobalCoord(r.dataToCoord(r.scale.parse(e)))}function nre(r,e,t,n,a,i,o,s,l,u){var c=l.valueDim,f=l.categoryDim,h=Math.abs(t[f.wh]),v=r.getItemVisual(e,"symbolSize"),d;K(v)?d=v.slice():v==null?d=["100%","100%"]:d=[v,v],d[f.index]=le(d[f.index],h),d[c.index]=le(d[c.index],n?h:Math.abs(i)),u.symbolSize=d;var p=u.symbolScale=[d[0]/s,d[1]/s];p[c.index]*=(l.isHorizontal?-1:1)*o}function are(r,e,t,n,a){var i=r.get(ere)||0;i&&(zx.attr({scaleX:e[0],scaleY:e[1],rotation:t}),zx.updateTransform(),i/=zx.getLineScale(),i*=e[n.valueDim.index]),a.valueLineWidth=i||0}function ire(r,e,t,n,a,i,o,s,l,u,c,f){var h=c.categoryDim,v=c.valueDim,d=f.pxSign,p=Math.max(e[v.index]+s,0),g=p;if(n){var y=Math.abs(l),m=Jt(r.get("symbolMargin"),"15%")+"",_=!1;m.lastIndexOf("!")===m.length-1&&(_=!0,m=m.slice(0,m.length-1));var b=le(m,e[v.index]),w=Math.max(p+b*2,0),x=_?0:b*2,S=O0(n),T=S?n:HN((y+x)/w),D=y-T*p;b=D/2/(_?T:Math.max(T-1,1)),w=p+b*2,x=_?0:b*2,!S&&n!=="fixed"&&(T=u?HN((Math.abs(u)+x)/w):0),g=T*w-x,f.repeatTimes=T,f.symbolMargin=b}var M=d*(g/2),A=f.pathPosition=[];A[h.index]=t[h.wh]/2,A[v.index]=o==="start"?M:o==="end"?l-M:l/2,i&&(A[0]+=i[0],A[1]+=i[1]);var I=f.bundlePosition=[];I[h.index]=t[h.xy],I[v.index]=t[v.xy];var P=f.barRectShape=Q({},t);P[v.wh]=d*Math.max(Math.abs(t[v.wh]),Math.abs(A[v.index]+M)),P[h.wh]=t[h.wh];var E=f.clipShape={};E[h.xy]=-t[h.xy],E[h.wh]=c.ecSize[h.wh],E[v.xy]=0,E[v.wh]=t[v.wh]}function EN(r){var e=r.symbolPatternSize,t=kt(r.symbolType,-e/2,-e/2,e,e);return t.attr({culling:!0}),t.type!=="image"&&t.setStyle({strokeNoScale:!0}),t}function ON(r,e,t,n){var a=r.__pictorialBundle,i=t.symbolSize,o=t.valueLineWidth,s=t.pathPosition,l=e.valueDim,u=t.repeatTimes||0,c=0,f=i[e.valueDim.index]+o+t.symbolMargin*2;for(Vx(r,function(p){p.__pictorialAnimationIndex=c,p.__pictorialRepeatTimes=u,c<u?Du(p,null,d(c),t,n):Du(p,null,{scaleX:0,scaleY:0},t,n,function(){a.remove(p)}),c++});c<u;c++){var h=EN(t);h.__pictorialAnimationIndex=c,h.__pictorialRepeatTimes=u,a.add(h);var v=d(c);Du(h,{x:v.x,y:v.y,scaleX:0,scaleY:0},{scaleX:v.scaleX,scaleY:v.scaleY,rotation:v.rotation},t,n)}function d(p){var g=s.slice(),y=t.pxSign,m=p;return(t.symbolRepeatDirection==="start"?y>0:y<0)&&(m=u-1-p),g[l.index]=f*(m-u/2+.5)+s[l.index],{x:g[0],y:g[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation}}}function RN(r,e,t,n){var a=r.__pictorialBundle,i=r.__pictorialMainPath;i?Du(i,null,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation},t,n):(i=r.__pictorialMainPath=EN(t),a.add(i),Du(i,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:0,scaleY:0,rotation:t.rotation},{scaleX:t.symbolScale[0],scaleY:t.symbolScale[1]},t,n))}function NN(r,e,t){var n=Q({},e.barRectShape),a=r.__pictorialBarRect;a?Du(a,null,{shape:n},e,t):(a=r.__pictorialBarRect=new Ge({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),a.disableMorphing=!0,r.add(a))}function kN(r,e,t,n){if(t.symbolClip){var a=r.__pictorialClipPath,i=Q({},t.clipShape),o=e.valueDim,s=t.animationModel,l=t.dataIndex;if(a)qe(a,{shape:i},s,l);else{i[o.wh]=0,a=new Ge({shape:i}),r.__pictorialBundle.setClipPath(a),r.__pictorialClipPath=a;var u={};u[o.wh]=t.clipShape[o.wh],af[n?"updateProps":"initProps"](a,{shape:u},s,l)}}}function BN(r,e){var t=r.getItemModel(e);return t.getAnimationDelayParams=ore,t.isAnimationEnabled=sre,t}function ore(r){return{index:r.__pictorialAnimationIndex,count:r.__pictorialRepeatTimes}}function sre(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function zN(r,e,t,n){var a=new Te,i=new Te;return a.add(i),a.__pictorialBundle=i,i.x=t.bundlePosition[0],i.y=t.bundlePosition[1],t.symbolRepeat?ON(a,e,t):RN(a,e,t),NN(a,t,n),kN(a,e,t,n),a.__pictorialShapeStr=VN(r,t),a.__pictorialSymbolMeta=t,a}function lre(r,e,t){var n=t.animationModel,a=t.dataIndex,i=r.__pictorialBundle;qe(i,{x:t.bundlePosition[0],y:t.bundlePosition[1]},n,a),t.symbolRepeat?ON(r,e,t,!0):RN(r,e,t,!0),NN(r,t,!0),kN(r,e,t,!0)}function FN(r,e,t,n){var a=n.__pictorialBarRect;a&&a.removeTextContent();var i=[];Vx(n,function(o){i.push(o)}),n.__pictorialMainPath&&i.push(n.__pictorialMainPath),n.__pictorialClipPath&&(t=null),L(i,function(o){ao(o,{scaleX:0,scaleY:0},t,e,function(){n.parent&&n.parent.remove(n)})}),r.setItemGraphicEl(e,null)}function VN(r,e){return[r.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function Vx(r,e,t){L(r.__pictorialBundle.children(),function(n){n!==r.__pictorialBarRect&&e.call(t,n)})}function Du(r,e,t,n,a,i){e&&r.attr(e),n.symbolClip&&!a?t&&r.attr(t):t&&af[a?"updateProps":"initProps"](r,t,n.animationModel,n.dataIndex,i)}function $N(r,e,t){var n=t.dataIndex,a=t.itemModel,i=a.getModel("emphasis"),o=i.getModel("itemStyle").getItemStyle(),s=a.getModel(["blur","itemStyle"]).getItemStyle(),l=a.getModel(["select","itemStyle"]).getItemStyle(),u=a.getShallow("cursor"),c=i.get("focus"),f=i.get("blurScope"),h=i.get("scale");Vx(r,function(p){if(p instanceof ur){var g=p.style;p.useStyle(Q({image:g.image,x:g.x,y:g.y,width:g.width,height:g.height},t.style))}else p.useStyle(t.style);var y=p.ensureState("emphasis");y.style=o,h&&(y.scaleX=p.scaleX*1.1,y.scaleY=p.scaleY*1.1),p.ensureState("blur").style=s,p.ensureState("select").style=l,u&&(p.cursor=u),p.z2=t.z2});var v=e.valueDim.posDesc[+(t.boundingLength>0)],d=r.__pictorialBarRect;yr(d,rr(a),{labelFetcher:e.seriesModel,labelDataIndex:n,defaultText:gu(e.seriesModel.getData(),n),inheritColor:t.style.fill,defaultOpacity:t.style.opacity,defaultOutsidePosition:v}),Lt(r,c,f,i.get("disabled"))}function HN(r){var e=Math.round(r);return Math.abs(r-e)<1e-4?e:Math.ceil(r)}var ure=tre,cre=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t.defaultSymbol="roundRect",t}return e.prototype.getInitialData=function(t){return t.stack=null,r.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=so(Op.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}(Op),fre=cre;function hre(r){r.registerChartView(ure),r.registerSeriesModel(fre),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,Ae(tP,"pictorialBar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,rP("pictorialBar"))}var vre=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._layers=[],t}return e.prototype.render=function(t,n,a){var i=t.getData(),o=this,s=this.group,l=t.getLayerSeries(),u=i.getLayout("layoutInfo"),c=u.rect,f=u.boundaryGap;s.x=0,s.y=c.y+f[0];function h(g){return g.name}var v=new pi(this._layersSeries||[],l,h,h),d=[];v.add(fe(p,this,"add")).update(fe(p,this,"update")).remove(fe(p,this,"remove")).execute();function p(g,y,m){var _=o._layers;if(g==="remove"){s.remove(_[y]);return}for(var b=[],w=[],x,S=l[y].indices,T=0;T<S.length;T++){var D=i.getItemLayout(S[T]),M=D.x,A=D.y0,I=D.y;b.push(M,A),w.push(M,A+I),x=i.getItemVisual(S[T],"style")}var P,E=i.getItemLayout(S[0]),O=t.getModel("label"),N=O.get("margin"),V=t.getModel("emphasis");if(g==="add"){var $=d[y]=new Te;P=new yE({shape:{points:b,stackedOnPoints:w,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),$.add(P),s.add($),t.isAnimationEnabled()&&P.setClipPath(dre(P.getBoundingRect(),t,function(){P.removeClipPath()}))}else{var $=_[m];P=$.childAt(0),s.add($),d[y]=$,qe(P,{shape:{points:b,stackedOnPoints:w}},t),da(P)}yr(P,rr(t),{labelDataIndex:S[T-1],defaultText:i.getName(S[T-1]),inheritColor:x.fill},{normal:{verticalAlign:"middle"}}),P.setTextConfig({position:null,local:!0});var U=P.getTextContent();U&&(U.x=E.x-N,U.y=E.y0+E.y/2),P.useStyle(x),i.setItemGraphicEl(y,P),gr(P,t),Lt(P,V.get("focus"),V.get("blurScope"),V.get("disabled"))}this._layersSeries=l,this._layers=d},e.type="themeRiver",e}(ut);function dre(r,e,t){var n=new Ge({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return xt(n,{shape:{x:r.x-50,width:r.width+100,height:r.height+20}},e,t),n}var pre=vre,$x=2,gre=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Wf(fe(this.getData,this),fe(this.getRawData,this))},e.prototype.fixData=function(t){var n=t.length,a={},i=k0(t,function(h){return a.hasOwnProperty(h[0]+"")||(a[h[0]+""]=-1),h[2]}),o=[];i.buckets.each(function(h,v){o.push({name:v,dataList:h})});for(var s=o.length,l=0;l<s;++l){for(var u=o[l].name,c=0;c<o[l].dataList.length;++c){var f=o[l].dataList[c][0]+"";a[f]=l}for(var f in a)a.hasOwnProperty(f)&&a[f]!==l&&(a[f]=l,t[n]=[f,0,u],n++)}return t},e.prototype.getInitialData=function(t,n){for(var a=this.getReferringComponents("singleAxis",$t).models[0],i=a.get("type"),o=nt(t.data,function(d){return d[2]!==void 0}),s=this.fixData(o||[]),l=[],u=this.nameMap=ge(),c=0,f=0;f<s.length;++f)l.push(s[f][$x]),u.get(s[f][$x])||(u.set(s[f][$x],c),c++);var h=hu(s,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:vp(i)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,v=new Er(h,this);return v.initData(s),v},e.prototype.getLayerSeries=function(){for(var t=this.getData(),n=t.count(),a=[],i=0;i<n;++i)a[i]=i;var o=t.mapDimension("single"),s=k0(a,function(u){return t.get("name",u)}),l=[];return s.buckets.each(function(u,c){u.sort(function(f,h){return t.get(o,f)-t.get(o,h)}),l.push({name:c,indices:u})}),l},e.prototype.getAxisTooltipData=function(t,n,a){K(t)||(t=t?[t]:[]);for(var i=this.getData(),o=this.getLayerSeries(),s=[],l=o.length,u,c=0;c<l;++c){for(var f=Number.MAX_VALUE,h=-1,v=o[c].indices.length,d=0;d<v;++d){var p=i.get(t[0],o[c].indices[d]),g=Math.abs(p-n);g<=f&&(u=p,f=g,h=o[c].indices[d])}s.push(h)}return{dataIndices:s,nestestValue:u}},e.prototype.formatTooltip=function(t,n,a){var i=this.getData(),o=i.getName(t),s=i.get(i.mapDimension("value"),t);return nr("nameValue",{name:o,value:s})},e.type="series.themeRiver",e.dependencies=["singleAxis"],e.defaultOption={z:2,colorBy:"data",coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",fontSize:11},emphasis:{label:{show:!0}}},e}(yt),yre=gre;function mre(r,e){r.eachSeriesByType("themeRiver",function(t){var n=t.getData(),a=t.coordinateSystem,i={},o=a.getRect();i.rect=o;var s=t.get("boundaryGap"),l=a.getAxis();if(i.boundaryGap=s,l.orient==="horizontal"){s[0]=le(s[0],o.height),s[1]=le(s[1],o.height);var u=o.height-s[0]-s[1];GN(n,t,u)}else{s[0]=le(s[0],o.width),s[1]=le(s[1],o.width);var c=o.width-s[0]-s[1];GN(n,t,c)}n.setLayout("layoutInfo",i)})}function GN(r,e,t){if(!!r.count())for(var n=e.coordinateSystem,a=e.getLayerSeries(),i=r.mapDimension("single"),o=r.mapDimension("value"),s=J(a,function(g){return J(g.indices,function(y){var m=n.dataToPoint(r.get(i,y));return m[1]=r.get(o,y),m})}),l=_re(s),u=l.y0,c=t/l.max,f=a.length,h=a[0].indices.length,v,d=0;d<h;++d){v=u[d]*c,r.setItemLayout(a[0].indices[d],{layerIndex:0,x:s[0][d][0],y0:v,y:s[0][d][1]*c});for(var p=1;p<f;++p)v+=s[p-1][d][1]*c,r.setItemLayout(a[p].indices[d],{layerIndex:p,x:s[p][d][0],y0:v,y:s[p][d][1]*c})}}function _re(r){for(var e=r.length,t=r[0].length,n=[],a=[],i=0,o=0;o<t;++o){for(var s=0,l=0;l<e;++l)s+=r[l][o][1];s>i&&(i=s),n.push(s)}for(var u=0;u<t;++u)a[u]=(i-n[u])/2;i=0;for(var c=0;c<t;++c){var f=n[c]+a[c];f>i&&(i=f)}return{y0:a,max:i}}function bre(r){r.registerChartView(pre),r.registerSeriesModel(yre),r.registerLayout(mre),r.registerProcessor(Gf("themeRiver"))}var xre=2,wre=4,Sre=function(r){j(e,r);function e(t,n,a,i){var o=r.call(this)||this;o.z2=xre,o.textConfig={inside:!0},Me(o).seriesIndex=n.seriesIndex;var s=new We({z2:wre,silent:t.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,t,n,a,i),o}return e.prototype.updateData=function(t,n,a,i,o){this.node=n,n.piece=this,a=a||this._seriesModel,i=i||this._ecModel;var s=this;Me(s).dataIndex=n.dataIndex;var l=n.getModel(),u=l.getModel("emphasis"),c=n.getLayout(),f=Q({},c);f.label=null;var h=n.getVisual("style");h.lineJoin="bevel";var v=n.getVisual("decal");v&&(h.decal=cu(v,o));var d=yu(l.getModel("itemStyle"),f,!0);Q(f,d),L($r,function(m){var _=s.ensureState(m),b=l.getModel([m,"itemStyle"]);_.style=b.getItemStyle();var w=yu(b,f);w&&(_.shape=w)}),t?(s.setShape(f),s.shape.r=c.r0,qe(s,{shape:{r:c.r}},a,n.dataIndex)):(qe(s,{shape:f},a),da(s)),s.useStyle(h),this._updateLabel(a);var p=l.getShallow("cursor");p&&s.attr("cursor",p),this._seriesModel=a||this._seriesModel,this._ecModel=i||this._ecModel;var g=u.get("focus"),y=g==="ancestor"?n.getAncestorsIndices():g==="descendant"?n.getDescendantIndices():g;Lt(this,y,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t){var n=this,a=this.node.getModel(),i=a.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),c=Math.sin(l),f=this,h=f.getTextContent(),v=this.node.dataIndex,d=i.get("minAngle")/180*Math.PI,p=i.get("show")&&!(d!=null&&Math.abs(s)<d);h.ignore=!p,L(Uc,function(y){var m=y==="normal"?a.getModel("label"):a.getModel([y,"label"]),_=y==="normal",b=_?h:h.ensureState(y),w=t.getFormattedLabel(v,y);_&&(w=w||n.node.name),b.style=gt(m,{},null,y!=="normal",!0),w&&(b.style.text=w);var x=m.get("show");x!=null&&!_&&(b.ignore=!x);var S=g(m,"position"),T=_?f:f.states[y],D=T.style.fill;T.textConfig={outsideFill:m.get("color")==="inherit"?D:null,inside:S!=="outside"};var M,A=g(m,"distance")||0,I=g(m,"align");S==="outside"?(M=o.r+A,I=l>Math.PI/2?"right":"left"):!I||I==="center"?(s===2*Math.PI&&o.r0===0?M=0:M=(o.r+o.r0)/2,I="center"):I==="left"?(M=o.r0+A,l>Math.PI/2&&(I="right")):I==="right"&&(M=o.r-A,l>Math.PI/2&&(I="left")),b.style.align=I,b.style.verticalAlign=g(m,"verticalAlign")||"middle",b.x=M*u+o.cx,b.y=M*c+o.cy;var P=g(m,"rotate"),E=0;P==="radial"?(E=-l,E<-Math.PI/2&&(E+=Math.PI)):P==="tangential"?(E=Math.PI/2-l,E>Math.PI/2?E-=Math.PI:E<-Math.PI/2&&(E+=Math.PI)):je(P)&&(E=P*Math.PI/180),b.rotation=E});function g(y,m){var _=y.get(m);return _==null?i.get(m):_}h.dirtyStyle()},e}(Hr),WN=Sre,Hx="sunburstRootToNode",UN="sunburstHighlight",Cre="sunburstUnhighlight";function Tre(r){r.registerAction({type:Hx,update:"updateView"},function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},n);function n(a,i){var o=Qf(e,[Hx],a);if(o){var s=a.getViewRoot();s&&(e.direction=Hb(s,o.node)?"rollUp":"drillDown"),a.resetViewRoot(o.node)}}}),r.registerAction({type:UN,update:"none"},function(e,t,n){e=Q({},e),t.eachComponent({mainType:"series",subType:"sunburst",query:e},a);function a(i){var o=Qf(e,[UN],i);o&&(e.dataIndex=o.node.dataIndex)}n.dispatchAction(Q(e,{type:"highlight"}))}),r.registerAction({type:Cre,update:"updateView"},function(e,t,n){e=Q({},e),n.dispatchAction(Q(e,{type:"downplay"}))})}var Dre=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a,i){var o=this;this.seriesModel=t,this.api=a,this.ecModel=n;var s=t.getData(),l=s.tree.root,u=t.getViewRoot(),c=this.group,f=t.get("renderLabelForZeroData"),h=[];u.eachNode(function(m){h.push(m)});var v=this._oldChildren||[];d(h,v),y(l,u),this._initEvents(),this._oldChildren=h;function d(m,_){if(m.length===0&&_.length===0)return;new pi(_,m,b,b).add(w).update(w).remove(Ae(w,null)).execute();function b(x){return x.getId()}function w(x,S){var T=x==null?null:m[x],D=S==null?null:_[S];p(T,D)}}function p(m,_){if(!f&&m&&!m.getValue()&&(m=null),m!==l&&_!==l){if(_&&_.piece)m?(_.piece.updateData(!1,m,t,n,a),s.setItemGraphicEl(m.dataIndex,_.piece)):g(_);else if(m){var b=new WN(m,t,n,a);c.add(b),s.setItemGraphicEl(m.dataIndex,b)}}}function g(m){!m||m.piece&&(c.remove(m.piece),m.piece=null)}function y(m,_){_.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,m,t,n,a):(o.virtualPiece=new WN(m,t,n,a),c.add(o.virtualPiece)),_.piece.off("click"),o.virtualPiece.on("click",function(b){o._rootToNode(_.parentNode)})):o.virtualPiece&&(c.remove(o.virtualPiece),o.virtualPiece=null)}},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",function(n){var a=!1,i=t.seriesModel.getViewRoot();i.eachNode(function(o){if(!a&&o.piece&&o.piece===n.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")t._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var c=l.get("target",!0)||"_blank";Vd(u,c)}}a=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:Hx,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,n){var a=n.getData(),i=a.getItemLayout(0);if(i){var o=t[0]-i.cx,s=t[1]-i.cy,l=Math.sqrt(o*o+s*s);return l<=i.r&&l>=i.r0}},e.type="sunburst",e}(ut),Mre=Dre,Are=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t,n){var a={name:t.name,children:t.data};jN(a);var i=this._levelModels=J(t.levels||[],function(l){return new lt(l,this,n)},this),o=$b.createTree(a,this,s);function s(l){l.wrapMethod("getItemModel",function(u,c){var f=o.getNodeByDataIndex(c),h=i[f.depth];return h&&(u.parentModel=h),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(t){var n=r.prototype.getDataParams.apply(this,arguments),a=this.getData().tree.getNodeByDataIndex(t);return n.treePathInfo=jp(a,this),n},e.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var n=this.getRawData().tree.root;(!t||t!==n&&!n.contains(t))&&(this._viewRoot=n)},e.prototype.enableAriaDecal=function(){nR(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(yt);function jN(r){var e=0;L(r.children,function(n){jN(n);var a=n.value;K(a)&&(a=a[0]),e+=a});var t=r.value;K(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),K(r.value)?r.value[0]=t:r.value=t}var Lre=Are,YN=Math.PI/180;function Ire(r,e,t){e.eachSeriesByType(r,function(n){var a=n.get("center"),i=n.get("radius");K(i)||(i=[0,i]),K(a)||(a=[a,a]);var o=t.getWidth(),s=t.getHeight(),l=Math.min(o,s),u=le(a[0],o),c=le(a[1],s),f=le(i[0],l/2),h=le(i[1],l/2),v=-n.get("startAngle")*YN,d=n.get("minAngle")*YN,p=n.getData().tree.root,g=n.getViewRoot(),y=g.depth,m=n.get("sort");m!=null&&qN(g,m);var _=0;L(g.children,function(N){!isNaN(N.getValue())&&_++});var b=g.getValue(),w=Math.PI/(b||_)*2,x=g.depth>0,S=g.height-(x?-1:1),T=(h-f)/(S||1),D=n.get("clockwise"),M=n.get("stillShowZeroSum"),A=D?1:-1,I=function(N,V){if(!!N){var $=V;if(N!==p){var U=N.getValue(),Y=b===0&&M?w:U*w;Y<d&&(Y=d),$=V+A*Y;var ae=N.depth-y-(x?-1:1),H=f+T*ae,q=f+T*(ae+1),X=n.getLevelModel(N);if(X){var Z=X.get("r0",!0),ie=X.get("r",!0),se=X.get("radius",!0);se!=null&&(Z=se[0],ie=se[1]),Z!=null&&(H=le(Z,l/2)),ie!=null&&(q=le(ie,l/2))}N.setLayout({angle:Y,startAngle:V,endAngle:$,clockwise:D,cx:u,cy:c,r0:H,r:q})}if(N.children&&N.children.length){var te=0;L(N.children,function(ve){te+=I(ve,V+te)})}return $-V}};if(x){var P=f,E=f+T,O=Math.PI*2;p.setLayout({angle:O,startAngle:v,endAngle:v+O,clockwise:D,cx:u,cy:c,r0:P,r:E})}I(g,v)})}function qN(r,e){var t=r.children||[];r.children=Pre(t,e),t.length&&L(r.children,function(n){qN(n,e)})}function Pre(r,e){if(ye(e)){var t=J(r,function(a,i){var o=a.getValue();return{params:{depth:a.depth,height:a.height,dataIndex:a.dataIndex,getValue:function(){return o}},index:i}});return t.sort(function(a,i){return e(a.params,i.params)}),J(t,function(a){return r[a.index]})}else{var n=e==="asc";return r.sort(function(a,i){var o=(a.getValue()-i.getValue())*(n?1:-1);return o===0?(a.dataIndex-i.dataIndex)*(n?-1:1):o})}}function Ere(r){var e={};function t(n,a,i){for(var o=n;o&&o.depth>1;)o=o.parentNode;var s=a.getColorFromPalette(o.name||o.dataIndex+"",e);return n.depth>1&&ce(s)&&(s=Hv(s,(n.depth-1)/(i-1)*.5)),s}r.eachSeriesByType("sunburst",function(n){var a=n.getData(),i=a.tree;i.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=t(o,n,i.root.height));var u=a.ensureUniqueItemVisual(o.dataIndex,"style");Q(u,l)})})}function Ore(r){r.registerChartView(Mre),r.registerSeriesModel(Lre),r.registerLayout(Ae(Ire,"sunburst")),r.registerProcessor(Ae(Gf,"sunburst")),r.registerVisual(Ere),Tre(r)}var ZN={color:"fill",borderColor:"stroke"},Rre={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},xi=Ye(),Nre=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,n){return Wa(null,this)},e.prototype.getDataParams=function(t,n,a){var i=r.prototype.getDataParams.call(this,t,n);return a&&(i.info=xi(a).info),i},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(yt),kre=Nre;function Bre(r,e){return e=e||[0,0],J(["x","y"],function(t,n){var a=this.getAxis(t),i=e[n],o=r[n]/2;return a.type==="category"?a.getBandWidth():Math.abs(a.dataToCoord(i-o)-a.dataToCoord(i+o))},this)}function zre(r){var e=r.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:fe(Bre,r)}}}function Fre(r,e){return e=e||[0,0],J([0,1],function(t){var n=e[t],a=r[t]/2,i=[],o=[];return i[t]=n-a,o[t]=n+a,i[1-t]=o[1-t]=e[1-t],Math.abs(this.dataToPoint(i)[t]-this.dataToPoint(o)[t])},this)}function Vre(r){var e=r.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:r.getZoom()},api:{coord:function(t){return r.dataToPoint(t)},size:fe(Fre,r)}}}function $re(r,e){var t=this.getAxis(),n=e instanceof Array?e[0]:e,a=(r instanceof Array?r[0]:r)/2;return t.type==="category"?t.getBandWidth():Math.abs(t.dataToCoord(n-a)-t.dataToCoord(n+a))}function Hre(r){var e=r.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:fe($re,r)}}}function Gre(r,e){return e=e||[0,0],J(["Radius","Angle"],function(t,n){var a="get"+t+"Axis",i=this[a](),o=e[n],s=r[n]/2,l=i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(o-s)-i.dataToCoord(o+s));return t==="Angle"&&(l=l*Math.PI/180),l},this)}function Wre(r){var e=r.getRadiusAxis(),t=r.getAngleAxis(),n=e.getExtent();return n[0]>n[1]&&n.reverse(),{coordSys:{type:"polar",cx:r.cx,cy:r.cy,r:n[1],r0:n[0]},api:{coord:function(a){var i=e.dataToRadius(a[0]),o=t.dataToAngle(a[1]),s=r.coordToPoint([i,o]);return s.push(i,o*Math.PI/180),s},size:fe(Gre,r)}}}function Ure(r){var e=r.getRect(),t=r.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:r.getCellWidth(),cellHeight:r.getCellHeight(),rangeInfo:{start:t.start,end:t.end,weeks:t.weeks,dayCount:t.allDay}},api:{coord:function(n,a){return r.dataToPoint(n,a)}}}}function XN(r,e,t,n){return r&&(r.legacy||r.legacy!==!1&&!t&&!n&&e!=="tspan"&&(e==="text"||he(r,"text")))}function QN(r,e,t){var n=r,a,i,o;if(e==="text")o=n;else{o={},he(n,"text")&&(o.text=n.text),he(n,"rich")&&(o.rich=n.rich),he(n,"textFill")&&(o.fill=n.textFill),he(n,"textStroke")&&(o.stroke=n.textStroke),he(n,"fontFamily")&&(o.fontFamily=n.fontFamily),he(n,"fontSize")&&(o.fontSize=n.fontSize),he(n,"fontStyle")&&(o.fontStyle=n.fontStyle),he(n,"fontWeight")&&(o.fontWeight=n.fontWeight),i={type:"text",style:o,silent:!0},a={};var s=he(n,"textPosition");t?a.position=s?n.textPosition:"inside":s&&(a.position=n.textPosition),he(n,"textPosition")&&(a.position=n.textPosition),he(n,"textOffset")&&(a.offset=n.textOffset),he(n,"textRotation")&&(a.rotation=n.textRotation),he(n,"textDistance")&&(a.distance=n.textDistance)}return KN(o,r),L(o.rich,function(l){KN(l,l)}),{textConfig:a,textContent:i}}function KN(r,e){!e||(e.font=e.textFont||e.font,he(e,"textStrokeWidth")&&(r.lineWidth=e.textStrokeWidth),he(e,"textAlign")&&(r.align=e.textAlign),he(e,"textVerticalAlign")&&(r.verticalAlign=e.textVerticalAlign),he(e,"textLineHeight")&&(r.lineHeight=e.textLineHeight),he(e,"textWidth")&&(r.width=e.textWidth),he(e,"textHeight")&&(r.height=e.textHeight),he(e,"textBackgroundColor")&&(r.backgroundColor=e.textBackgroundColor),he(e,"textPadding")&&(r.padding=e.textPadding),he(e,"textBorderColor")&&(r.borderColor=e.textBorderColor),he(e,"textBorderWidth")&&(r.borderWidth=e.textBorderWidth),he(e,"textBorderRadius")&&(r.borderRadius=e.textBorderRadius),he(e,"textBoxShadowColor")&&(r.shadowColor=e.textBoxShadowColor),he(e,"textBoxShadowBlur")&&(r.shadowBlur=e.textBoxShadowBlur),he(e,"textBoxShadowOffsetX")&&(r.shadowOffsetX=e.textBoxShadowOffsetX),he(e,"textBoxShadowOffsetY")&&(r.shadowOffsetY=e.textBoxShadowOffsetY))}function JN(r,e,t){var n=r;n.textPosition=n.textPosition||t.position||"inside",t.offset!=null&&(n.textOffset=t.offset),t.rotation!=null&&(n.textRotation=t.rotation),t.distance!=null&&(n.textDistance=t.distance);var a=n.textPosition.indexOf("inside")>=0,i=r.fill||"#000";ek(n,e);var o=n.textFill==null;return a?o&&(n.textFill=t.insideFill||"#fff",!n.textStroke&&t.insideStroke&&(n.textStroke=t.insideStroke),!n.textStroke&&(n.textStroke=i),n.textStrokeWidth==null&&(n.textStrokeWidth=2)):(o&&(n.textFill=r.fill||t.outsideFill||"#000"),!n.textStroke&&t.outsideStroke&&(n.textStroke=t.outsideStroke)),n.text=e.text,n.rich=e.rich,L(e.rich,function(s){ek(s,s)}),n}function ek(r,e){!e||(he(e,"fill")&&(r.textFill=e.fill),he(e,"stroke")&&(r.textStroke=e.fill),he(e,"lineWidth")&&(r.textStrokeWidth=e.lineWidth),he(e,"font")&&(r.font=e.font),he(e,"fontStyle")&&(r.fontStyle=e.fontStyle),he(e,"fontWeight")&&(r.fontWeight=e.fontWeight),he(e,"fontSize")&&(r.fontSize=e.fontSize),he(e,"fontFamily")&&(r.fontFamily=e.fontFamily),he(e,"align")&&(r.textAlign=e.align),he(e,"verticalAlign")&&(r.textVerticalAlign=e.verticalAlign),he(e,"lineHeight")&&(r.textLineHeight=e.lineHeight),he(e,"width")&&(r.textWidth=e.width),he(e,"height")&&(r.textHeight=e.height),he(e,"backgroundColor")&&(r.textBackgroundColor=e.backgroundColor),he(e,"padding")&&(r.textPadding=e.padding),he(e,"borderColor")&&(r.textBorderColor=e.borderColor),he(e,"borderWidth")&&(r.textBorderWidth=e.borderWidth),he(e,"borderRadius")&&(r.textBorderRadius=e.borderRadius),he(e,"shadowColor")&&(r.textBoxShadowColor=e.shadowColor),he(e,"shadowBlur")&&(r.textBoxShadowBlur=e.shadowBlur),he(e,"shadowOffsetX")&&(r.textBoxShadowOffsetX=e.shadowOffsetX),he(e,"shadowOffsetY")&&(r.textBoxShadowOffsetY=e.shadowOffsetY),he(e,"textShadowColor")&&(r.textShadowColor=e.textShadowColor),he(e,"textShadowBlur")&&(r.textShadowBlur=e.textShadowBlur),he(e,"textShadowOffsetX")&&(r.textShadowOffsetX=e.textShadowOffsetX),he(e,"textShadowOffsetY")&&(r.textShadowOffsetY=e.textShadowOffsetY))}var tk={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},rk=Fe(tk);Pn(Ra,function(r,e){return r[e]=1,r},{}),Ra.join(", ");var ig=["","style","shape","extra"],Mu=Ye();function Gx(r,e,t,n,a){var i=r+"Animation",o=Gl(r,n,a)||{},s=Mu(e).userDuring;return o.duration>0&&(o.during=s?fe(Xre,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=r),Q(o,t[i]),o}function og(r,e,t,n){n=n||{};var a=n.dataIndex,i=n.isInit,o=n.clearStyle,s=t.isAnimationEnabled(),l=Mu(r),u=e.style;l.userDuring=e.during;var c={},f={};if(Kre(r,e,f),ik("shape",e,f),ik("extra",e,f),!i&&s&&(Qre(r,e,c),ak("shape",r,e,c),ak("extra",r,e,c),Jre(r,e,u,c)),f.style=u,jre(r,f,o),qre(r,e),s)if(i){var h={};L(ig,function(d){var p=d?e[d]:e;p&&p.enterFrom&&(d&&(h[d]=h[d]||{}),Q(d?h[d]:h,p.enterFrom))});var v=Gx("enter",r,e,t,a);v.duration>0&&r.animateFrom(h,v)}else Yre(r,e,a||0,t,c);nk(r,e),u?r.dirty():r.markRedraw()}function nk(r,e){for(var t=Mu(r).leaveToProps,n=0;n<ig.length;n++){var a=ig[n],i=a?e[a]:e;i&&i.leaveTo&&(t||(t=Mu(r).leaveToProps={}),a&&(t[a]=t[a]||{}),Q(a?t[a]:t,i.leaveTo))}}function sg(r,e,t,n){if(r){var a=r.parent,i=Mu(r).leaveToProps;if(i){var o=Gx("update",r,e,t,0);o.done=function(){a.remove(r),n&&n()},r.animateTo(i,o)}else a.remove(r),n&&n()}}function Ks(r){return r==="all"}function jre(r,e,t){var n=e.style;if(!r.isGroup&&n){if(t){r.useStyle({});for(var a=r.animators,i=0;i<a.length;i++){var o=a[i];o.targetName==="style"&&o.changeTarget(r.style)}}r.setStyle(n)}e&&(e.style=null,e&&r.attr(e),e.style=n)}function Yre(r,e,t,n,a){if(a){var i=Gx("update",r,e,n,t);i.duration>0&&r.animateFrom(a,i)}}function qre(r,e){he(e,"silent")&&(r.silent=e.silent),he(e,"ignore")&&(r.ignore=e.ignore),r instanceof Bn&&he(e,"invisible")&&(r.invisible=e.invisible),r instanceof Be&&he(e,"autoBatch")&&(r.autoBatch=e.autoBatch)}var Za={},Zre={setTransform:function(r,e){return Za.el[r]=e,this},getTransform:function(r){return Za.el[r]},setShape:function(r,e){var t=Za.el,n=t.shape||(t.shape={});return n[r]=e,t.dirtyShape&&t.dirtyShape(),this},getShape:function(r){var e=Za.el.shape;if(e)return e[r]},setStyle:function(r,e){var t=Za.el,n=t.style;return n&&(n[r]=e,t.dirtyStyle&&t.dirtyStyle()),this},getStyle:function(r){var e=Za.el.style;if(e)return e[r]},setExtra:function(r,e){var t=Za.el.extra||(Za.el.extra={});return t[r]=e,this},getExtra:function(r){var e=Za.el.extra;if(e)return e[r]}};function Xre(){var r=this,e=r.el;if(!!e){var t=Mu(e).userDuring,n=r.userDuring;if(t!==n){r.el=r.userDuring=null;return}Za.el=e,n(Zre)}}function ak(r,e,t,n){var a=t[r];if(!!a){var i=e[r],o;if(i){var s=t.transition,l=a.transition;if(l)if(!o&&(o=n[r]={}),Ks(l))Q(o,i);else for(var u=st(l),c=0;c<u.length;c++){var f=u[c],h=i[f];o[f]=h}else if(Ks(s)||Ne(s,r)>=0){!o&&(o=n[r]={});for(var v=Fe(i),c=0;c<v.length;c++){var f=v[c],h=i[f];ene(a[f],h)&&(o[f]=h)}}}}}function ik(r,e,t){var n=e[r];if(!!n)for(var a=t[r]={},i=Fe(n),o=0;o<i.length;o++){var s=i[o];a[s]=Pc(n[s])}}function Qre(r,e,t){for(var n=e.transition,a=Ks(n)?Ra:st(n||[]),i=0;i<a.length;i++){var o=a[i];if(!(o==="style"||o==="shape"||o==="extra")){var s=r[o];t[o]=s}}}function Kre(r,e,t){for(var n=0;n<rk.length;n++){var a=rk[n],i=tk[a],o=e[a];o&&(t[i[0]]=o[0],t[i[1]]=o[1])}for(var n=0;n<Ra.length;n++){var s=Ra[n];e[s]!=null&&(t[s]=e[s])}}function Jre(r,e,t,n){if(!!t){var a=r.style,i;if(a){var o=t.transition,s=e.transition;if(o&&!Ks(o)){var l=st(o);!i&&(i=n.style={});for(var u=0;u<l.length;u++){var c=l[u],f=a[c];i[c]=f}}else if(r.getAnimationStyleProps&&(Ks(s)||Ks(o)||Ne(s,"style")>=0)){var h=r.getAnimationStyleProps(),v=h?h.style:null;if(v){!i&&(i=n.style={});for(var d=Fe(t),u=0;u<d.length;u++){var c=d[u];if(v[c]){var f=a[c];i[c]=f}}}}}}}function ene(r,e){return pr(r)?r!==e:r!=null&&isFinite(r)}var ok=Ye(),tne=["percent","easing","shape","style","extra"];function sk(r){r.stopAnimation("keyframe"),r.attr(ok(r))}function lg(r,e,t){if(!(!t.isAnimationEnabled()||!e)){if(K(e)){L(e,function(s){lg(r,s,t)});return}var n=e.keyframes,a=e.duration;if(t&&a==null){var i=Gl("enter",t,0);a=i&&i.duration}if(!(!n||!a)){var o=ok(r);L(ig,function(s){if(!(s&&!r[s])){var l;n.sort(function(u,c){return u.percent-c.percent}),L(n,function(u){var c=r.animators,f=s?u[s]:u;if(!!f){var h=Fe(f);if(s||(h=nt(h,function(p){return Ne(tne,p)<0})),!!h.length){l||(l=r.animate(s,e.loop,!0),l.scope="keyframe");for(var v=0;v<c.length;v++)c[v]!==l&&c[v].targetName===l.targetName&&c[v].stopTracks(h);s&&(o[s]=o[s]||{});var d=s?o[s]:o;L(h,function(p){d[p]=((s?r[s]:r)||{})[p]}),l.whenWithKeys(a*u.percent,f,h,u.easing)}}}),l&&l.delay(e.delay||0).duration(a).start(e.easing)}})}}}var wi="emphasis",So="normal",Wx="blur",Ux="select",Co=[So,wi,Wx,Ux],jx={normal:["itemStyle"],emphasis:[wi,"itemStyle"],blur:[Wx,"itemStyle"],select:[Ux,"itemStyle"]},Yx={normal:["label"],emphasis:[wi,"label"],blur:[Wx,"label"],select:[Ux,"label"]},rne=["x","y"],nne="e\0\0",Zn={normal:{},emphasis:{},blur:{},select:{}},ane={cartesian2d:zre,geo:Vre,single:Hre,polar:Wre,calendar:Ure};function qx(r){return r instanceof Be}function Zx(r){return r instanceof Bn}function ine(r,e){e.copyTransform(r),Zx(e)&&Zx(r)&&(e.setStyle(r.style),e.z=r.z,e.z2=r.z2,e.zlevel=r.zlevel,e.invisible=r.invisible,e.ignore=r.ignore,qx(e)&&qx(r)&&e.setShape(r.shape))}var one=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a,i){this._progressiveEls=null;var o=this._data,s=t.getData(),l=this.group,u=uk(t,s,n,a);o||l.removeAll(),s.diff(o).add(function(f){Kx(a,null,f,u(f,i),t,l,s)}).remove(function(f){var h=o.getItemGraphicEl(f);h&&sg(h,xi(h).option,t)}).update(function(f,h){var v=o.getItemGraphicEl(h);Kx(a,v,f,u(f,i),t,l,s)}).execute();var c=t.get("clip",!0)?Ep(t.coordinateSystem,!1,t):null;c?l.setClipPath(c):l.removeClipPath(),this._data=s},e.prototype.incrementalPrepareRender=function(t,n,a){this.group.removeAll(),this._data=null},e.prototype.incrementalRender=function(t,n,a,i,o){var s=n.getData(),l=uk(n,s,a,i),u=this._progressiveEls=[];function c(v){v.isGroup||(v.incremental=!0,v.ensureState("emphasis").hoverLayer=!0)}for(var f=t.start;f<t.end;f++){var h=Kx(null,null,f,l(f,o),n,this.group,s);h&&(h.traverse(c),u.push(h))}},e.prototype.eachRendered=function(t){oo(this._progressiveEls||this.group,t)},e.prototype.filterForExposedEvent=function(t,n,a,i){var o=n.element;if(o==null||a.name===o)return!0;for(;(a=a.__hostTarget||a.parent)&&a!==this.group;)if(a.name===o)return!0;return!1},e.type="custom",e}(ut),sne=one;function Xx(r){var e=r.type,t;if(e==="path"){var n=r.shape,a=n.width!=null&&n.height!=null?{x:n.x||0,y:n.y||0,width:n.width,height:n.height}:null,i=dk(n);t=tf(i,null,a,n.layout||"center"),xi(t).customPathData=i}else if(e==="image")t=new ur({}),xi(t).customImagePath=r.style.image;else if(e==="text")t=new We({});else if(e==="group")t=new Te;else{if(e==="compoundPath")throw new Error('"compoundPath" is not supported yet.');var o=Ad(e);if(!o){var s="";tt(s)}t=new o}return xi(t).customGraphicType=e,t.name=r.name,t.z2EmphasisLift=1,t.z2SelectLift=1,t}function Qx(r,e,t,n,a,i,o){sk(e);var s=a&&a.normal.cfg;s&&e.setTextConfig(s),n&&n.transition==null&&(n.transition=rne);var l=n&&n.style;if(l){if(e.type==="text"){var u=l;he(u,"textFill")&&(u.fill=u.textFill),he(u,"textStroke")&&(u.stroke=u.textStroke)}var c=void 0,f=qx(e)?l.decal:null;r&&f&&(f.dirty=!0,c=cu(f,r)),l.__decalPattern=c}if(Zx(e)&&l){var c=l.__decalPattern;c&&(l.decal=c)}og(e,n,i,{dataIndex:t,isInit:o,clearStyle:!0}),lg(e,n.keyframeAnimation,i)}function lk(r,e,t,n,a){var i=e.isGroup?null:e,o=a&&a[r].cfg;if(i){var s=i.ensureState(r);if(n===!1){var l=i.getState(r);l&&(l.style=null)}else s.style=n||null;o&&(s.textConfig=o),ps(i)}}function lne(r,e,t){if(!r.isGroup){var n=r,a=t.currentZ,i=t.currentZLevel;n.z=a,n.zlevel=i;var o=e.z2;o!=null&&(n.z2=o||0);for(var s=0;s<Co.length;s++)une(n,e,Co[s])}}function une(r,e,t){var n=t===So,a=n?e:ug(e,t),i=a?a.z2:null,o;i!=null&&(o=n?r:r.ensureState(t),o.z2=i||0)}function uk(r,e,t,n){var a=r.get("renderItem"),i=r.coordinateSystem,o={};i&&(o=i.prepareCustoms?i.prepareCustoms(i):ane[i.type](i));for(var s=me({getWidth:n.getWidth,getHeight:n.getHeight,getZr:n.getZr,getDevicePixelRatio:n.getDevicePixelRatio,value:b,style:x,ordinalRawValue:w,styleEmphasis:S,visual:M,barLayout:A,currentSeriesIndices:I,font:P},o.api||{}),l={context:{},seriesId:r.id,seriesName:r.name,seriesIndex:r.seriesIndex,coordSys:o.coordSys,dataInsideLength:e.count(),encode:cne(r.getData())},u,c,f={},h={},v={},d={},p=0;p<Co.length;p++){var g=Co[p];v[g]=r.getModel(jx[g]),d[g]=r.getModel(Yx[g])}function y(E){return E===u?c||(c=e.getItemModel(E)):e.getItemModel(E)}function m(E,O){return e.hasItemOption?E===u?f[O]||(f[O]=y(E).getModel(jx[O])):y(E).getModel(jx[O]):v[O]}function _(E,O){return e.hasItemOption?E===u?h[O]||(h[O]=y(E).getModel(Yx[O])):y(E).getModel(Yx[O]):d[O]}return function(E,O){return u=E,c=null,f={},h={},a&&a(me({dataIndexInside:E,dataIndex:e.getRawIndex(E),actionType:O?O.type:null},l),s)};function b(E,O){return O==null&&(O=u),e.getStore().get(e.getDimensionIndex(E||0),O)}function w(E,O){O==null&&(O=u),E=E||0;var N=e.getDimensionInfo(E);if(!N){var V=e.getDimensionIndex(E);return V>=0?e.getStore().get(V,O):void 0}var $=e.get(N.name,O),U=N&&N.ordinalMeta;return U?U.categories[$]:$}function x(E,O){O==null&&(O=u);var N=e.getItemVisual(O,"style"),V=N&&N.fill,$=N&&N.opacity,U=m(O,So).getItemStyle();V!=null&&(U.fill=V),$!=null&&(U.opacity=$);var Y={inheritColor:ce(V)?V:"#000"},ae=_(O,So),H=gt(ae,null,Y,!1,!0);H.text=ae.getShallow("show")?Ee(r.getFormattedLabel(O,So),gu(e,O)):null;var q=Ed(ae,Y,!1);return D(E,U),U=JN(U,H,q),E&&T(U,E),U.legacy=!0,U}function S(E,O){O==null&&(O=u);var N=m(O,wi).getItemStyle(),V=_(O,wi),$=gt(V,null,null,!0,!0);$.text=V.getShallow("show")?Ia(r.getFormattedLabel(O,wi),r.getFormattedLabel(O,So),gu(e,O)):null;var U=Ed(V,null,!0);return D(E,N),N=JN(N,$,U),E&&T(N,E),N.legacy=!0,N}function T(E,O){for(var N in O)he(O,N)&&(E[N]=O[N])}function D(E,O){E&&(E.textFill&&(O.textFill=E.textFill),E.textPosition&&(O.textPosition=E.textPosition))}function M(E,O){if(O==null&&(O=u),he(ZN,E)){var N=e.getItemVisual(O,"style");return N?N[ZN[E]]:null}if(he(Rre,E))return e.getItemVisual(O,E)}function A(E){if(i.type==="cartesian2d"){var O=i.getBaseAxis();return KU(me({axis:O},E))}}function I(){return t.getCurrentSeriesIndices()}function P(E){return KM(E,t)}}function cne(r){var e={};return L(r.dimensions,function(t){var n=r.getDimensionInfo(t);if(!n.isExtraCoord){var a=n.coordDim,i=e[a]=e[a]||[];i[n.coordDimIndex]=r.getDimensionIndex(t)}}),e}function Kx(r,e,t,n,a,i,o){if(!n){i.remove(e);return}var s=Jx(r,e,t,n,a,i);return s&&o.setItemGraphicEl(t,s),s&&Lt(s,n.focus,n.blurScope,n.emphasisDisabled),s}function Jx(r,e,t,n,a,i){var o=-1,s=e;e&&ck(e,n,a)&&(o=Ne(i.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=Xx(n),s&&ine(s,u)),n.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),Zn.normal.cfg=Zn.normal.conOpt=Zn.emphasis.cfg=Zn.emphasis.conOpt=Zn.blur.cfg=Zn.blur.conOpt=Zn.select.cfg=Zn.select.conOpt=null,Zn.isLegacy=!1,hne(u,t,n,a,l,Zn),fne(u,t,n,a,l),Qx(r,u,t,n,Zn,a,l),he(n,"info")&&(xi(u).info=n.info);for(var c=0;c<Co.length;c++){var f=Co[c];if(f!==So){var h=ug(n,f),v=ew(n,h,f);lk(f,u,h,v,Zn)}}return lne(u,n,a),n.type==="group"&&vne(r,u,t,n,a),o>=0?i.replaceAt(u,o):i.add(u),u}function ck(r,e,t){var n=xi(r),a=e.type,i=e.shape,o=e.style;return t.isUniversalTransitionEnabled()||a!=null&&a!==n.customGraphicType||a==="path"&&yne(i)&&dk(i)!==n.customPathData||a==="image"&&he(o,"image")&&o.image!==n.customImagePath}function fne(r,e,t,n,a){var i=t.clipPath;if(i===!1)r&&r.getClipPath()&&r.removeClipPath();else if(i){var o=r.getClipPath();o&&ck(o,i,n)&&(o=null),o||(o=Xx(i),r.setClipPath(o)),Qx(null,o,e,i,null,n,a)}}function hne(r,e,t,n,a,i){if(!r.isGroup){fk(t,null,i),fk(t,wi,i);var o=i.normal.conOpt,s=i.emphasis.conOpt,l=i.blur.conOpt,u=i.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var c=r.getTextContent();if(o===!1)c&&r.removeTextContent();else{o=i.normal.conOpt=o||{type:"text"},c?c.clearStates():(c=Xx(o),r.setTextContent(c)),Qx(null,c,e,o,null,n,a);for(var f=o&&o.style,h=0;h<Co.length;h++){var v=Co[h];if(v!==So){var d=i[v].conOpt;lk(v,c,d,ew(o,d,v),null)}}f?c.dirty():c.markRedraw()}}}}function fk(r,e,t){var n=e?ug(r,e):r,a=e?ew(r,n,wi):r.style,i=r.type,o=n?n.textConfig:null,s=r.textContent,l=s?e?ug(s,e):s:null;if(a&&(t.isLegacy||XN(a,i,!!o,!!l))){t.isLegacy=!0;var u=QN(a,i,!e);!o&&u.textConfig&&(o=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!e&&l){var c=l;!c.type&&(c.type="text")}var f=e?t[e]:t.normal;f.cfg=o,f.conOpt=l}function ug(r,e){return e?r?r[e]:null:r}function ew(r,e,t){var n=e&&e.style;return n==null&&t===wi&&r&&(n=r.styleEmphasis),n}function vne(r,e,t,n,a){var i=n.children,o=i?i.length:0,s=n.$mergeChildren,l=s==="byName"||n.diffChildrenByName,u=s===!1;if(!(!o&&!l&&!u)){if(l){pne({api:r,oldChildren:e.children()||[],newChildren:i||[],dataIndex:t,seriesModel:a,group:e});return}u&&e.removeAll();for(var c=0;c<o;c++){var f=i[c],h=e.childAt(c);f?(f.ignore==null&&(f.ignore=!1),Jx(r,h,t,f,a,e)):h.ignore=!0}for(var v=e.childCount()-1;v>=c;v--){var d=e.childAt(v);dne(e,d,a)}}}function dne(r,e,t){e&&sg(e,xi(r).option,t)}function pne(r){new pi(r.oldChildren,r.newChildren,hk,hk,r).add(vk).update(vk).remove(gne).execute()}function hk(r,e){var t=r&&r.name;return t!=null?t:nne+e}function vk(r,e){var t=this.context,n=r!=null?t.newChildren[r]:null,a=e!=null?t.oldChildren[e]:null;Jx(t.api,a,t.dataIndex,n,t.seriesModel,t.group)}function gne(r){var e=this.context,t=e.oldChildren[r];t&&sg(t,xi(t).option,e.seriesModel)}function dk(r){return r&&(r.pathData||r.d)}function yne(r){return r&&(he(r,"pathData")||he(r,"d"))}function mne(r){r.registerChartView(sne),r.registerSeriesModel(kre)}var Js=Ye(),pk=we,tw=fe,_ne=function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(e,t,n,a){var i=t.get("value"),o=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=n,!(!a&&this._lastValue===i&&this._lastStatus===o)){this._lastValue=i,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,i,e,t,n);var c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=c;var f=this._moveAnimation=this.determineAnimation(e,t);if(!s)s=this._group=new Te,this.createPointerEl(s,u,e,t),this.createLabelEl(s,u,e,t),n.getZr().add(s);else{var h=Ae(gk,t,f);this.updatePointerEl(s,u,h),this.updateLabelEl(s,u,h,t)}_k(s,t,!0),this._renderHandle(i)}},r.prototype.remove=function(e){this.clear(e)},r.prototype.dispose=function(e){this.clear(e)},r.prototype.determineAnimation=function(e,t){var n=t.get("animation"),a=e.axis,i=a.type==="category",o=t.get("snap");if(!o&&!i)return!1;if(n==="auto"||n==null){var s=this.animationThreshold;if(i&&a.getBandWidth()>s)return!0;if(o){var l=Tb(e).seriesDataCount,u=a.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return n===!0},r.prototype.makeElOption=function(e,t,n,a,i){},r.prototype.createPointerEl=function(e,t,n,a){var i=t.pointer;if(i){var o=Js(e).pointerEl=new af[i.type](pk(t.pointer));e.add(o)}},r.prototype.createLabelEl=function(e,t,n,a){if(t.label){var i=Js(e).labelEl=new We(pk(t.label));e.add(i),mk(i,a)}},r.prototype.updatePointerEl=function(e,t,n){var a=Js(e).pointerEl;a&&t.pointer&&(a.setStyle(t.pointer.style),n(a,{shape:t.pointer.shape}))},r.prototype.updateLabelEl=function(e,t,n,a){var i=Js(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),mk(i,a))},r.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,n=this._api.getZr(),a=this._handle,i=t.getModel("handle"),o=t.get("status");if(!i.get("show")||!o||o==="hide"){a&&n.remove(a),this._handle=null;return}var s;this._handle||(s=!0,a=this._handle=jl(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){oi(u.event)},onmousedown:tw(this._onHandleDragMove,this,0,0),drift:tw(this._onHandleDragMove,this),ondragend:tw(this._onHandleDragEnd,this)}),n.add(a)),_k(a,t,!1),a.setStyle(i.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=i.get("size");K(l)||(l=[l,l]),a.scaleX=l[0]/2,a.scaleY=l[1]/2,ou(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},r.prototype._moveHandleToValue=function(e,t){gk(this._axisPointerModel,!t&&this._moveAnimation,this._handle,rw(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(!!n){this._dragging=!0;var a=this.updateHandleTransform(rw(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=a,n.stopAnimation(),n.attr(rw(a)),Js(n).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(!!e){var t=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(!!e){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,a=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),a&&t.remove(a),this._group=null,this._handle=null,this._payloadInfo=null),mf(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(e,t,n){return n=n||0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}},r}();function gk(r,e,t,n){yk(Js(t).lastProp,n)||(Js(t).lastProp=n,e?qe(t,n,r):(t.stopAnimation(),t.attr(n)))}function yk(r,e){if(_e(r)&&_e(e)){var t=!0;return L(e,function(n,a){t=t&&yk(r[a],n)}),!!t}else return r===e}function mk(r,e){r[e.get(["label","show"])?"show":"hide"]()}function rw(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function _k(r,e,t){var n=e.get("z"),a=e.get("zlevel");r&&r.traverse(function(i){i.type!=="group"&&(n!=null&&(i.z=n),a!=null&&(i.zlevel=a),i.silent=t)})}var nw=_ne;function aw(r){var e=r.get("type"),t=r.getModel(e+"Style"),n;return e==="line"?(n=t.getLineStyle(),n.fill=null):e==="shadow"&&(n=t.getAreaStyle(),n.stroke=null),n}function bk(r,e,t,n,a){var i=t.get("value"),o=xk(i,e.axis,e.ecModel,t.get("seriesDataIndices"),{precision:t.get(["label","precision"]),formatter:t.get(["label","formatter"])}),s=t.getModel("label"),l=xs(s.get("padding")||0),u=s.getFont(),c=Rc(o,u),f=a.position,h=c.width+l[1]+l[3],v=c.height+l[0]+l[2],d=a.align;d==="right"&&(f[0]-=h),d==="center"&&(f[0]-=h/2);var p=a.verticalAlign;p==="bottom"&&(f[1]-=v),p==="middle"&&(f[1]-=v/2),bne(f,h,v,n);var g=s.get("backgroundColor");(!g||g==="auto")&&(g=e.get(["axisLine","lineStyle","color"])),r.label={x:f[0],y:f[1],style:gt(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:g}),z2:10}}function bne(r,e,t,n){var a=n.getWidth(),i=n.getHeight();r[0]=Math.min(r[0]+e,a)-e,r[1]=Math.min(r[1]+t,i)-t,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function xk(r,e,t,n,a){r=e.scale.parse(r);var i=e.scale.getLabel({value:r},{precision:a.precision}),o=a.formatter;if(o){var s={value:j1(e,{value:r}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};L(n,function(l){var u=t.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,f=u&&u.getDataParams(c);f&&s.seriesData.push(f)}),ce(o)?i=o.replace("{value}",i):ye(o)&&(i=o(s))}return i}function iw(r,e,t){var n=gn();return ji(n,n,t.rotation),oa(n,n,t.position),pa([r.dataToCoord(e),(t.labelOffset||0)+(t.labelDirection||1)*(t.labelMargin||0)],n)}function wk(r,e,t,n,a,i){var o=mi.innerTextLayout(t.rotation,0,t.labelDirection);t.labelMargin=a.get(["label","margin"]),bk(e,n,a,i,{position:iw(n.axis,r,t),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function ow(r,e,t){return t=t||0,{x1:r[t],y1:r[1-t],x2:e[t],y2:e[1-t]}}function Sk(r,e,t){return t=t||0,{x:r[t],y:r[1-t],width:e[t],height:e[1-t]}}function Ck(r,e,t,n,a,i){return{cx:r,cy:e,r0:t,r:n,startAngle:a,endAngle:i,clockwise:!0}}var xne=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,n,a,i,o){var s=a.axis,l=s.grid,u=i.get("type"),c=Tk(l,s).getOtherAxis(s).getGlobalExtent(),f=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var h=aw(i),v=wne[u](s,f,c);v.style=h,t.graphicKey=v.type,t.pointer=v}var d=xb(l.model,a);wk(n,t,d,a,i,o)},e.prototype.getHandleTransform=function(t,n,a){var i=xb(n.axis.grid.model,n,{labelInside:!1});i.labelMargin=a.get(["handle","margin"]);var o=iw(n.axis,t,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,n,a,i){var o=a.axis,s=o.grid,l=o.getGlobalExtent(!0),u=Tk(s,o).getOtherAxis(o).getGlobalExtent(),c=o.dim==="x"?0:1,f=[t.x,t.y];f[c]+=n[c],f[c]=Math.min(l[1],f[c]),f[c]=Math.max(l[0],f[c]);var h=(u[1]+u[0])/2,v=[h,h];v[c]=f[c];var d=[{verticalAlign:"middle"},{align:"center"}];return{x:f[0],y:f[1],rotation:t.rotation,cursorPoint:v,tooltipOption:d[c]}},e}(nw);function Tk(r,e){var t={};return t[e.dim+"AxisIndex"]=e.index,r.getCartesian(t)}var wne={line:function(r,e,t){var n=ow([e,t[0]],[e,t[1]],Dk(r));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(r,e,t){var n=Math.max(1,r.getBandWidth()),a=t[1]-t[0];return{type:"Rect",shape:Sk([e-n/2,t[0]],[n,a],Dk(r))}}};function Dk(r){return r.dim==="x"?0:1}var Sne=xne,Cne=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",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:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}($e),Tne=Cne,Si=Ye(),Dne=L;function Mk(r,e,t){if(!Ue.node){var n=e.getZr();Si(n).records||(Si(n).records={}),Mne(n,e);var a=Si(n).records[r]||(Si(n).records[r]={});a.handler=t}}function Mne(r,e){if(Si(r).initialized)return;Si(r).initialized=!0,t("click",Ae(Ak,"click")),t("mousemove",Ae(Ak,"mousemove")),t("globalout",Lne);function t(n,a){r.on(n,function(i){var o=Ine(e);Dne(Si(r).records,function(s){s&&a(s,i,o.dispatchAction)}),Ane(o.pendings,e)})}}function Ane(r,e){var t=r.showTip.length,n=r.hideTip.length,a;t?a=r.showTip[t-1]:n&&(a=r.hideTip[n-1]),a&&(a.dispatchAction=null,e.dispatchAction(a))}function Lne(r,e,t){r.handler("leave",null,t)}function Ak(r,e,t,n){e.handler(r,t,n)}function Ine(r){var e={showTip:[],hideTip:[]},t=function(n){var a=e[n.type];a?a.push(n):(n.dispatchAction=t,r.dispatchAction(n))};return{dispatchAction:t,pendings:e}}function sw(r,e){if(!Ue.node){var t=e.getZr(),n=(Si(t).records||{})[r];n&&(Si(t).records[r]=null)}}var Pne=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=n.getComponent("tooltip"),o=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";Mk("axisPointer",a,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},e.prototype.remove=function(t,n){sw("axisPointer",n)},e.prototype.dispose=function(t,n){sw("axisPointer",n)},e.type="axisPointer",e}(wt),Ene=Pne;function Lk(r,e){var t=[],n=r.seriesIndex,a;if(n==null||!(a=e.getSeriesByIndex(n)))return{point:[]};var i=a.getData(),o=ns(i,r);if(o==null||o<0||K(o))return{point:[]};var s=i.getItemGraphicEl(o),l=a.coordinateSystem;if(a.getTooltipPosition)t=a.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),f=c.dim,h=u.dim,v=f==="x"||f==="radius"?1:0,d=i.mapDimension(h),p=[];p[v]=i.get(d,o),p[1-v]=i.get(i.getCalculationInfo("stackResultDimension"),o),t=l.dataToPoint(p)||[]}else t=l.dataToPoint(i.getValues(J(l.dimensions,function(y){return i.mapDimension(y)}),o))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),t=[g.x+g.width/2,g.y+g.height/2]}return{point:t,el:s}}var Ik=Ye();function One(r,e,t){var n=r.currTrigger,a=[r.x,r.y],i=r,o=r.dispatchAction||fe(t.dispatchAction,t),s=e.getComponent("axisPointer").coordSysAxesInfo;if(!!s){cg(a)&&(a=Lk({seriesIndex:i.seriesIndex,dataIndex:i.dataIndex},e).point);var l=cg(a),u=i.axesInfo,c=s.axesInfo,f=n==="leave"||cg(a),h={},v={},d={list:[],map:{}},p={showPointer:Ae(Nne,v),showTooltip:Ae(kne,d)};L(s.coordSysMap,function(y,m){var _=l||y.containPoint(a);L(s.coordSysAxesInfo[m],function(b,w){var x=b.axis,S=Vne(u,b);if(!f&&_&&(!u||S)){var T=S&&S.value;T==null&&!l&&(T=x.pointToData(a)),T!=null&&Pk(b,T,p,!1,h)}})});var g={};return L(c,function(y,m){var _=y.linkGroup;_&&!v[m]&&L(_.axesInfo,function(b,w){var x=v[w];if(b!==y&&x){var S=x.value;_.mapper&&(S=y.axis.scale.parse(_.mapper(S,Ek(b),Ek(y)))),g[y.key]=S}})}),L(g,function(y,m){Pk(c[m],y,p,!0,h)}),Bne(v,c,h),zne(d,a,r,o),Fne(c,o,t),h}}function Pk(r,e,t,n,a){var i=r.axis;if(!(i.scale.isBlank()||!i.containData(e))){if(!r.involveSeries){t.showPointer(r,e);return}var o=Rne(e,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&a.seriesIndex==null&&Q(a,s[0]),!n&&r.snap&&i.containData(l)&&l!=null&&(e=l),t.showPointer(r,e,s),t.showTooltip(r,o,l)}}function Rne(r,e){var t=e.axis,n=t.dim,a=r,i=[],o=Number.MAX_VALUE,s=-1;return L(e.seriesModels,function(l,u){var c=l.getData().mapDimensionsAll(n),f,h;if(l.getAxisTooltipData){var v=l.getAxisTooltipData(c,r,t);h=v.dataIndices,f=v.nestestValue}else{if(h=l.getData().indicesOfNearest(c[0],r,t.type==="category"?.5:null),!h.length)return;f=l.getData().get(c[0],h[0])}if(!(f==null||!isFinite(f))){var d=r-f,p=Math.abs(d);p<=o&&((p<o||d>=0&&s<0)&&(o=p,s=d,a=f,i.length=0),L(h,function(g){i.push({seriesIndex:l.seriesIndex,dataIndexInside:g,dataIndex:l.getData().getRawIndex(g)})}))}}),{payloadBatch:i,snapToValue:a}}function Nne(r,e,t,n){r[e.key]={value:t,payloadBatch:n}}function kne(r,e,t,n){var a=t.payloadBatch,i=e.axis,o=i.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!a.length)){var l=e.coordSys.model,u=Uf(l),c=r.map[u];c||(c=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(c)),c.dataByAxis.push({axisDim:i.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:a.slice()})}}function Bne(r,e,t){var n=t.axesInfo=[];L(e,function(a,i){var o=a.axisPointerModel.option,s=r[i];s?(!a.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!a.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:a.axis.dim,axisIndex:a.axis.model.componentIndex,value:o.value})})}function zne(r,e,t,n){if(cg(e)||!r.list.length){n({type:"hideTip"});return}var a=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:t.tooltipOption,position:t.position,dataIndexInside:a.dataIndexInside,dataIndex:a.dataIndex,seriesIndex:a.seriesIndex,dataByCoordSys:r.list})}function Fne(r,e,t){var n=t.getZr(),a="axisPointerLastHighlights",i=Ik(n)[a]||{},o=Ik(n)[a]={};L(r,function(u,c){var f=u.axisPointerModel.option;f.status==="show"&&L(f.seriesDataIndices,function(h){var v=h.seriesIndex+" | "+h.dataIndex;o[v]=h})});var s=[],l=[];L(i,function(u,c){!o[c]&&l.push(u)}),L(o,function(u,c){!i[c]&&s.push(u)}),l.length&&t.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&t.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function Vne(r,e){for(var t=0;t<(r||[]).length;t++){var n=r[t];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}function Ek(r){var e=r.axis.model,t={},n=t.axisDim=r.axis.dim;return t.axisIndex=t[n+"AxisIndex"]=e.componentIndex,t.axisName=t[n+"AxisName"]=e.name,t.axisId=t[n+"AxisId"]=e.id,t}function cg(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function uh(r){Gs.registerAxisPointerClass("CartesianAxisPointer",Sne),r.registerComponentModel(Tne),r.registerComponentView(Ene),r.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!K(t)&&(e.axisPointer.link=[t])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=MZ(e,t)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},One)}function $ne(r){ke(cO),ke(uh)}var Hne=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,n,a,i,o){var s=a.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),c=u.getExtent(),f=s.dataToCoord(n),h=i.get("type");if(h&&h!=="none"){var v=aw(i),d=Wne[h](s,l,f,c);d.style=v,t.graphicKey=d.type,t.pointer=d}var p=i.get(["label","margin"]),g=Gne(n,a,i,l,p);bk(t,a,i,o,g)},e}(nw);function Gne(r,e,t,n,a){var i=e.axis,o=i.dataToCoord(r),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=n.getRadiusAxis().getExtent(),u,c,f;if(i.dim==="radius"){var h=gn();ji(h,h,s),oa(h,h,[n.cx,n.cy]),u=pa([o,-a],h);var v=e.getModel("axisLabel").get("rotate")||0,d=mi.innerTextLayout(s,v*Math.PI/180,-1);c=d.textAlign,f=d.textVerticalAlign}else{var p=l[1];u=n.coordToPoint([p+a,o]);var g=n.cx,y=n.cy;c=Math.abs(u[0]-g)/p<.3?"center":u[0]>g?"left":"right",f=Math.abs(u[1]-y)/p<.3?"middle":u[1]>y?"top":"bottom"}return{position:u,align:c,verticalAlign:f}}var Wne={line:function(r,e,t,n){return r.dim==="angle"?{type:"Line",shape:ow(e.coordToPoint([n[0],t]),e.coordToPoint([n[1],t]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:t}}},shadow:function(r,e,t,n){var a=Math.max(1,r.getBandWidth()),i=Math.PI/180;return r.dim==="angle"?{type:"Sector",shape:Ck(e.cx,e.cy,n[0],n[1],(-t-a/2)*i,(-t+a/2)*i)}:{type:"Sector",shape:Ck(e.cx,e.cy,t-a/2,t+a/2,0,Math.PI*2)}}},Une=Hne,jne=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.findAxisModel=function(t){var n,a=this.ecModel;return a.eachComponent(t,function(i){i.getCoordSysModel()===this&&(n=i)},this),n},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}($e),Yne=jne,lw=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",$t).models[0]},e.type="polarAxis",e}($e);Et(lw,du);var qne=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="angleAxis",e}(lw),Zne=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="radiusAxis",e}(lw),uw=function(r){j(e,r);function e(t,n){return r.call(this,"radius",t,n)||this}return e.prototype.pointToData=function(t,n){return this.polar.pointToData(t,n)[this.dim==="radius"?0:1]},e}(Un);uw.prototype.dataToRadius=Un.prototype.dataToCoord,uw.prototype.radiusToData=Un.prototype.coordToData;var Xne=uw,Qne=Ye(),cw=function(r){j(e,r);function e(t,n){return r.call(this,"angle",t,n||[0,360])||this}return e.prototype.pointToData=function(t,n){return this.polar.pointToData(t,n)[this.dim==="radius"?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,n=t.getLabelModel(),a=t.scale,i=a.getExtent(),o=a.count();if(i[1]-i[0]<1)return 0;var s=i[0],l=t.dataToCoord(s+1)-t.dataToCoord(s),u=Math.abs(l),c=Rc(s==null?"":s+"",n.getFont(),"center","top"),f=Math.max(c.height,7),h=f/u;isNaN(h)&&(h=1/0);var v=Math.max(0,Math.floor(h)),d=Qne(t.model),p=d.lastAutoInterval,g=d.lastTickCount;return p!=null&&g!=null&&Math.abs(p-v)<=1&&Math.abs(g-o)<=1&&p>v?v=p:(d.lastTickCount=o,d.lastAutoInterval=v),v},e}(Un);cw.prototype.dataToAngle=Un.prototype.dataToCoord,cw.prototype.angleToData=Un.prototype.coordToData;var Kne=cw,Ok=["radius","angle"],Jne=function(){function r(e){this.dimensions=Ok,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new Xne,this._angleAxis=new Kne,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return r.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},r.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},r.prototype.getAxis=function(e){var t="_"+e+"Axis";return this[t]},r.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},r.prototype.getAxesByScale=function(e){var t=[],n=this._angleAxis,a=this._radiusAxis;return n.scale.type===e&&t.push(n),a.scale.type===e&&t.push(a),t},r.prototype.getAngleAxis=function(){return this._angleAxis},r.prototype.getRadiusAxis=function(){return this._radiusAxis},r.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},r.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},r.prototype.getTooltipAxes=function(e){var t=e!=null&&e!=="auto"?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},r.prototype.dataToPoint=function(e,t){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)])},r.prototype.pointToData=function(e,t){var n=this.pointToCoord(e);return[this._radiusAxis.radiusToData(n[0],t),this._angleAxis.angleToData(n[1],t)]},r.prototype.pointToCoord=function(e){var t=e[0]-this.cx,n=e[1]-this.cy,a=this.getAngleAxis(),i=a.getExtent(),o=Math.min(i[0],i[1]),s=Math.max(i[0],i[1]);a.inverse?o=s-360:s=o+360;var l=Math.sqrt(t*t+n*n);t/=l,n/=l;for(var u=Math.atan2(-n,t)/Math.PI*180,c=u<o?1:-1;u<o||u>s;)u+=c*360;return[l,u]},r.prototype.coordToPoint=function(e){var t=e[0],n=e[1]/180*Math.PI,a=Math.cos(n)*t+this.cx,i=-Math.sin(n)*t+this.cy;return[a,i]},r.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis(),n=t.getExtent().slice();n[0]>n[1]&&n.reverse();var a=e.getExtent(),i=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:n[0],r:n[1],startAngle:-a[0]*i,endAngle:-a[1]*i,clockwise:e.inverse,contain:function(o,s){var l=o-this.cx,u=s-this.cy,c=l*l+u*u-1e-4,f=this.r,h=this.r0;return c<=f*f&&c>=h*h}}},r.prototype.convertToPixel=function(e,t,n){var a=Rk(t);return a===this?this.dataToPoint(n):null},r.prototype.convertFromPixel=function(e,t,n){var a=Rk(t);return a===this?this.pointToData(n):null},r}();function Rk(r){var e=r.seriesModel,t=r.polarModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}var eae=Jne;function tae(r,e,t){var n=e.get("center"),a=t.getWidth(),i=t.getHeight();r.cx=le(n[0],a),r.cy=le(n[1],i);var o=r.getRadiusAxis(),s=Math.min(a,i)/2,l=e.get("radius");l==null?l=[0,"100%"]:K(l)||(l=[0,l]);var u=[le(l[0],s),le(l[1],s)];o.inverse?o.setExtent(u[1],u[0]):o.setExtent(u[0],u[1])}function rae(r,e){var t=this,n=t.getAngleAxis(),a=t.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),a.scale.setExtent(1/0,-1/0),r.eachSeries(function(s){if(s.coordinateSystem===t){var l=s.getData();L(Cp(l,"radius"),function(u){a.scale.unionExtentFromData(l,u)}),L(Cp(l,"angle"),function(u){n.scale.unionExtentFromData(l,u)})}}),Os(n.scale,n.model),Os(a.scale,a.model),n.type==="category"&&!n.onBand){var i=n.getExtent(),o=360/n.scale.count();n.inverse?i[1]+=o:i[1]-=o,n.setExtent(i[0],i[1])}}function nae(r){return r.mainType==="angleAxis"}function Nk(r,e){if(r.type=e.get("type"),r.scale=Ef(e),r.onBand=e.get("boundaryGap")&&r.type==="category",r.inverse=e.get("inverse"),nae(e)){r.inverse=r.inverse!==e.get("clockwise");var t=e.get("startAngle");r.setExtent(t,t+(r.inverse?-360:360))}e.axis=r,r.model=e}var aae={dimensions:Ok,create:function(r,e){var t=[];return r.eachComponent("polar",function(n,a){var i=new eae(a+"");i.update=rae;var o=i.getRadiusAxis(),s=i.getAngleAxis(),l=n.findAxisModel("radiusAxis"),u=n.findAxisModel("angleAxis");Nk(o,l),Nk(s,u),tae(i,n,e),t.push(i),n.coordinateSystem=i,i.model=n}),r.eachSeries(function(n){if(n.get("coordinateSystem")==="polar"){var a=n.getReferringComponents("polar",$t).models[0];n.coordinateSystem=a.coordinateSystem}}),t}},iae=aae,oae=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function fg(r,e,t){e[1]>e[0]&&(e=e.slice().reverse());var n=r.coordToPoint([e[0],t]),a=r.coordToPoint([e[1],t]);return{x1:n[0],y1:n[1],x2:a[0],y2:a[1]}}function hg(r){var e=r.getRadiusAxis();return e.inverse?0:1}function kk(r){var e=r[0],t=r[r.length-1];e&&t&&Math.abs(Math.abs(e.coord-t.coord)-360)<1e-4&&r.pop()}var sae=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="PolarAxisPointer",t}return e.prototype.render=function(t,n){if(this.group.removeAll(),!!t.get("show")){var a=t.axis,i=a.polar,o=i.getRadiusAxis().getExtent(),s=a.getTicksCoords(),l=a.getMinorTicksCoords(),u=J(a.getViewLabels(),function(c){c=we(c);var f=a.scale,h=f.type==="ordinal"?f.getRawOrdinalNumber(c.tickValue):c.tickValue;return c.coord=a.dataToCoord(h),c});kk(u),kk(s),L(oae,function(c){t.get([c,"show"])&&(!a.scale.isBlank()||c==="axisLine")&&lae[c](this.group,t,i,s,l,o,u)},this)}},e.type="angleAxis",e}(Gs),lae={axisLine:function(r,e,t,n,a,i){var o=e.getModel(["axisLine","lineStyle"]),s=hg(t),l=s?0:1,u;i[l]===0?u=new ha({shape:{cx:t.cx,cy:t.cy,r:i[s]},style:o.getLineStyle(),z2:1,silent:!0}):u=new Kc({shape:{cx:t.cx,cy:t.cy,r:i[s],r0:i[l]},style:o.getLineStyle(),z2:1,silent:!0}),u.style.fill=null,r.add(u)},axisTick:function(r,e,t,n,a,i){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=i[hg(t)],u=J(n,function(c){return new tr({shape:fg(t,[l,l+s],c.coord)})});r.add(xn(u,{style:me(o.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(r,e,t,n,a,i){if(!!a.length){for(var o=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=i[hg(t)],c=[],f=0;f<a.length;f++)for(var h=0;h<a[f].length;h++)c.push(new tr({shape:fg(t,[u,u+l],a[f][h].coord)}));r.add(xn(c,{style:me(s.getModel("lineStyle").getLineStyle(),me(o.getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(r,e,t,n,a,i,o){var s=e.getCategories(!0),l=e.getModel("axisLabel"),u=l.get("margin"),c=e.get("triggerEvent");L(o,function(f,h){var v=l,d=f.tickValue,p=i[hg(t)],g=t.coordToPoint([p+u,f.coord]),y=t.cx,m=t.cy,_=Math.abs(g[0]-y)/p<.3?"center":g[0]>y?"left":"right",b=Math.abs(g[1]-m)/p<.3?"middle":g[1]>m?"top":"bottom";if(s&&s[d]){var w=s[d];_e(w)&&w.textStyle&&(v=new lt(w.textStyle,l,l.ecModel))}var x=new We({silent:mi.isLabelSilent(e),style:gt(v,{x:g[0],y:g[1],fill:v.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:f.formattedLabel,align:_,verticalAlign:b})});if(r.add(x),c){var S=mi.makeAxisEventDataBase(e);S.targetType="axisLabel",S.value=f.rawLabel,Me(x).eventData=S}},this)},splitLine:function(r,e,t,n,a,i){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],f=0;f<n.length;f++){var h=u++%l.length;c[h]=c[h]||[],c[h].push(new tr({shape:fg(t,i,n[f].coord)}))}for(var f=0;f<c.length;f++)r.add(xn(c[f],{style:me({stroke:l[f%l.length]},s.getLineStyle()),silent:!0,z:e.get("z")}))},minorSplitLine:function(r,e,t,n,a,i){if(!!a.length){for(var o=e.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=[],u=0;u<a.length;u++)for(var c=0;c<a[u].length;c++)l.push(new tr({shape:fg(t,i,a[u][c].coord)}));r.add(xn(l,{style:s.getLineStyle(),silent:!0,z:e.get("z")}))}},splitArea:function(r,e,t,n,a,i){if(!!n.length){var o=e.getModel("splitArea"),s=o.getModel("areaStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],f=Math.PI/180,h=-n[0].coord*f,v=Math.min(i[0],i[1]),d=Math.max(i[0],i[1]),p=e.get("clockwise"),g=1,y=n.length;g<=y;g++){var m=g===y?n[0].coord:n[g].coord,_=u++%l.length;c[_]=c[_]||[],c[_].push(new Hr({shape:{cx:t.cx,cy:t.cy,r0:v,r:d,startAngle:h,endAngle:-m*f,clockwise:p},silent:!0})),h=-m*f}for(var g=0;g<c.length;g++)r.add(xn(c[g],{style:me({fill:l[g%l.length]},s.getAreaStyle()),silent:!0}))}}},uae=sae,cae=["axisLine","axisTickLabel","axisName"],fae=["splitLine","splitArea","minorSplitLine"],hae=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="PolarAxisPointer",t}return e.prototype.render=function(t,n){if(this.group.removeAll(),!!t.get("show")){var a=this._axisGroup,i=this._axisGroup=new Te;this.group.add(i);var o=t.axis,s=o.polar,l=s.getAngleAxis(),u=o.getTicksCoords(),c=o.getMinorTicksCoords(),f=l.getExtent()[0],h=o.getExtent(),v=dae(s,t,f),d=new mi(t,v);L(cae,d.add,d),i.add(d.getGroup()),rf(a,i,t),L(fae,function(p){t.get([p,"show"])&&!o.scale.isBlank()&&vae[p](this.group,t,s,f,h,u,c)},this)}},e.type="radiusAxis",e}(Gs),vae={splitLine:function(r,e,t,n,a,i){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],f=0;f<i.length;f++){var h=u++%l.length;c[h]=c[h]||[],c[h].push(new ha({shape:{cx:t.cx,cy:t.cy,r:Math.max(i[f].coord,0)}}))}for(var f=0;f<c.length;f++)r.add(xn(c[f],{style:me({stroke:l[f%l.length],fill:null},s.getLineStyle()),silent:!0}))},minorSplitLine:function(r,e,t,n,a,i,o){if(!!o.length){for(var s=e.getModel("minorSplitLine"),l=s.getModel("lineStyle"),u=[],c=0;c<o.length;c++)for(var f=0;f<o[c].length;f++)u.push(new ha({shape:{cx:t.cx,cy:t.cy,r:o[c][f].coord}}));r.add(xn(u,{style:me({fill:null},l.getLineStyle()),silent:!0}))}},splitArea:function(r,e,t,n,a,i){if(!!i.length){var o=e.getModel("splitArea"),s=o.getModel("areaStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],f=i[0].coord,h=1;h<i.length;h++){var v=u++%l.length;c[v]=c[v]||[],c[v].push(new Hr({shape:{cx:t.cx,cy:t.cy,r0:f,r:i[h].coord,startAngle:0,endAngle:Math.PI*2},silent:!0})),f=i[h].coord}for(var h=0;h<c.length;h++)r.add(xn(c[h],{style:me({fill:l[h%l.length]},s.getAreaStyle()),silent:!0}))}}};function dae(r,e,t){return{position:[r.cx,r.cy],rotation:t/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1}}var pae=hae;function Bk(r){return r.get("stack")||"__ec_stack_"+r.seriesIndex}function zk(r,e){return e.dim+r.model.componentIndex}function gae(r,e,t){var n={},a=yae(nt(e.getSeriesByType(r),function(i){return!e.isSeriesFiltered(i)&&i.coordinateSystem&&i.coordinateSystem.type==="polar"}));e.eachSeriesByType(r,function(i){if(i.coordinateSystem.type==="polar"){var o=i.getData(),s=i.coordinateSystem,l=s.getBaseAxis(),u=zk(s,l),c=Bk(i),f=a[u][c],h=f.offset,v=f.width,d=s.getOtherAxis(l),p=i.coordinateSystem.cx,g=i.coordinateSystem.cy,y=i.get("barMinHeight")||0,m=i.get("barMinAngle")||0;n[c]=n[c]||[];for(var _=o.mapDimension(d.dim),b=o.mapDimension(l.dim),w=gi(o,_),x=l.dim!=="radius"||!i.get("roundCap",!0),S=d.dataToCoord(0),T=0,D=o.count();T<D;T++){var M=o.get(_,T),A=o.get(b,T),I=M>=0?"p":"n",P=S;w&&(n[c][A]||(n[c][A]={p:S,n:S}),P=n[c][A][I]);var E=void 0,O=void 0,N=void 0,V=void 0;if(d.dim==="radius"){var $=d.dataToCoord(M)-S,U=l.dataToCoord(A);Math.abs($)<y&&($=($<0?-1:1)*y),E=P,O=P+$,N=U-h,V=N-v,w&&(n[c][A][I]=O)}else{var Y=d.dataToCoord(M,x)-S,ae=l.dataToCoord(A);Math.abs(Y)<m&&(Y=(Y<0?-1:1)*m),E=ae+h,O=E+v,N=P,V=P+Y,w&&(n[c][A][I]=V)}o.setItemLayout(T,{cx:p,cy:g,r0:E,r:O,startAngle:-N*Math.PI/180,endAngle:-V*Math.PI/180,clockwise:N>=V})}}})}function yae(r){var e={};L(r,function(n,a){var i=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=zk(o,s),u=s.getExtent(),c=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/i.count(),f=e[l]||{bandWidth:c,remainedWidth:c,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},h=f.stacks;e[l]=f;var v=Bk(n);h[v]||f.autoWidthCount++,h[v]=h[v]||{width:0,maxWidth:0};var d=le(n.get("barWidth"),c),p=le(n.get("barMaxWidth"),c),g=n.get("barGap"),y=n.get("barCategoryGap");d&&!h[v].width&&(d=Math.min(f.remainedWidth,d),h[v].width=d,f.remainedWidth-=d),p&&(h[v].maxWidth=p),g!=null&&(f.gap=g),y!=null&&(f.categoryGap=y)});var t={};return L(e,function(n,a){t[a]={};var i=n.stacks,o=n.bandWidth,s=le(n.categoryGap,o),l=le(n.gap,1),u=n.remainedWidth,c=n.autoWidthCount,f=(u-s)/(c+(c-1)*l);f=Math.max(f,0),L(i,function(p,g){var y=p.maxWidth;y&&y<f&&(y=Math.min(y,u),p.width&&(y=Math.min(y,p.width)),u-=y,p.width=y,c--)}),f=(u-s)/(c+(c-1)*l),f=Math.max(f,0);var h=0,v;L(i,function(p,g){p.width||(p.width=f),v=p,h+=p.width*(1+l)}),v&&(h-=v.width*l);var d=-h/2;L(i,function(p,g){t[a][g]=t[a][g]||{offset:d,width:p.width},d+=p.width*(1+l)})}),t}var mae={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},_ae={splitNumber:5},bae=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="polar",e}(wt);function xae(r){ke(uh),Gs.registerAxisPointerClass("PolarAxisPointer",Une),r.registerCoordinateSystem("polar",iae),r.registerComponentModel(Yne),r.registerComponentView(bae),_u(r,"angle",qne,mae),_u(r,"radius",Zne,_ae),r.registerComponentView(uae),r.registerComponentView(pae),r.registerLayout(Ae(gae,"bar"))}function fw(r,e){e=e||{};var t=r.coordinateSystem,n=r.axis,a={},i=n.position,o=n.orient,s=t.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};a.position=[o==="vertical"?u.vertical[i]:l[0],o==="horizontal"?u.horizontal[i]:l[3]];var c={horizontal:0,vertical:1};a.rotation=Math.PI/2*c[o];var f={top:-1,bottom:1,right:1,left:-1};a.labelDirection=a.tickDirection=a.nameDirection=f[i],r.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),Jt(e.labelInside,r.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var h=e.rotate;return h==null&&(h=r.get(["axisLabel","rotate"])),a.labelRotation=i==="top"?-h:h,a.z2=1,a}var wae=["axisLine","axisTickLabel","axisName"],Sae=["splitArea","splitLine"],Cae=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="SingleAxisPointer",t}return e.prototype.render=function(t,n,a,i){var o=this.group;o.removeAll();var s=this._axisGroup;this._axisGroup=new Te;var l=fw(t),u=new mi(t,l);L(wae,u.add,u),o.add(this._axisGroup),o.add(u.getGroup()),L(Sae,function(c){t.get([c,"show"])&&Tae[c](this,this.group,this._axisGroup,t)},this),rf(s,this._axisGroup,t),r.prototype.render.call(this,t,n,a,i)},e.prototype.remove=function(){oO(this)},e.type="singleAxis",e}(Gs),Tae={splitLine:function(r,e,t,n){var a=n.axis;if(!a.scale.isBlank()){var i=n.getModel("splitLine"),o=i.getModel("lineStyle"),s=o.get("color");s=s instanceof Array?s:[s];for(var l=o.get("width"),u=n.coordinateSystem.getRect(),c=a.isHorizontal(),f=[],h=0,v=a.getTicksCoords({tickModel:i}),d=[],p=[],g=0;g<v.length;++g){var y=a.toGlobalCoord(v[g].coord);c?(d[0]=y,d[1]=u.y,p[0]=y,p[1]=u.y+u.height):(d[0]=u.x,d[1]=y,p[0]=u.x+u.width,p[1]=y);var m=new tr({shape:{x1:d[0],y1:d[1],x2:p[0],y2:p[1]},silent:!0});Ul(m.shape,l);var _=h++%s.length;f[_]=f[_]||[],f[_].push(m)}for(var b=o.getLineStyle(["color"]),g=0;g<f.length;++g)e.add(xn(f[g],{style:me({stroke:s[g%s.length]},b),silent:!0}))}},splitArea:function(r,e,t,n){iO(r,t,n,n)}},Dae=Cae,Fk=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getCoordSysModel=function(){return this},e.type="singleAxis",e.layoutMode="box",e.defaultOption={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}},e}($e);Et(Fk,du.prototype);var hw=Fk,Mae=function(r){j(e,r);function e(t,n,a,i,o){var s=r.call(this,t,n,a)||this;return s.type=i||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.pointToData=function(t,n){return this.coordinateSystem.pointToData(t)[0]},e}(Un),Aae=Mae,Vk=["single"],Lae=function(){function r(e,t,n){this.type="single",this.dimension="single",this.dimensions=Vk,this.axisPointerEnabled=!0,this.model=e,this._init(e,t,n)}return r.prototype._init=function(e,t,n){var a=this.dimension,i=new Aae(a,Ef(e),[0,0],e.get("type"),e.get("position")),o=i.type==="category";i.onBand=o&&e.get("boundaryGap"),i.inverse=e.get("inverse"),i.orient=e.get("orient"),e.axis=i,i.model=e,i.coordinateSystem=this,this._axis=i},r.prototype.update=function(e,t){e.eachSeries(function(n){if(n.coordinateSystem===this){var a=n.getData();L(a.mapDimensionsAll(this.dimension),function(i){this._axis.scale.unionExtentFromData(a,i)},this),Os(this._axis.scale,this._axis.model)}},this)},r.prototype.resize=function(e,t){this._rect=Ht({left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")},{width:t.getWidth(),height:t.getHeight()}),this._adjustAxis()},r.prototype.getRect=function(){return this._rect},r.prototype._adjustAxis=function(){var e=this._rect,t=this._axis,n=t.isHorizontal(),a=n?[0,e.width]:[0,e.height],i=t.inverse?1:0;t.setExtent(a[i],a[1-i]),this._updateAxisTransform(t,n?e.x:e.y)},r.prototype._updateAxisTransform=function(e,t){var n=e.getExtent(),a=n[0]+n[1],i=e.isHorizontal();e.toGlobalCoord=i?function(o){return o+t}:function(o){return a-o+t},e.toLocalCoord=i?function(o){return o-t}:function(o){return a-o+t}},r.prototype.getAxis=function(){return this._axis},r.prototype.getBaseAxis=function(){return this._axis},r.prototype.getAxes=function(){return[this._axis]},r.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},r.prototype.containPoint=function(e){var t=this.getRect(),n=this.getAxis(),a=n.orient;return a==="horizontal"?n.contain(n.toLocalCoord(e[0]))&&e[1]>=t.y&&e[1]<=t.y+t.height:n.contain(n.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},r.prototype.pointToData=function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e[t.orient==="horizontal"?0:1]))]},r.prototype.dataToPoint=function(e){var t=this.getAxis(),n=this.getRect(),a=[],i=t.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),a[i]=t.toGlobalCoord(t.dataToCoord(+e)),a[1-i]=i===0?n.y+n.height/2:n.x+n.width/2,a},r.prototype.convertToPixel=function(e,t,n){var a=$k(t);return a===this?this.dataToPoint(n):null},r.prototype.convertFromPixel=function(e,t,n){var a=$k(t);return a===this?this.pointToData(n):null},r}();function $k(r){var e=r.seriesModel,t=r.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function Iae(r,e){var t=[];return r.eachComponent("singleAxis",function(n,a){var i=new Lae(n,r,e);i.name="single_"+a,i.resize(n,e),n.coordinateSystem=i,t.push(i)}),r.eachSeries(function(n){if(n.get("coordinateSystem")==="singleAxis"){var a=n.getReferringComponents("singleAxis",$t).models[0];n.coordinateSystem=a&&a.coordinateSystem}}),t}var Pae={create:Iae,dimensions:Vk},Eae=Pae,Hk=["x","y"],Oae=["width","height"],Rae=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,n,a,i,o){var s=a.axis,l=s.coordinateSystem,u=vw(l,1-vg(s)),c=l.dataToPoint(n)[0],f=i.get("type");if(f&&f!=="none"){var h=aw(i),v=Nae[f](s,c,u);v.style=h,t.graphicKey=v.type,t.pointer=v}var d=fw(a);wk(n,t,d,a,i,o)},e.prototype.getHandleTransform=function(t,n,a){var i=fw(n,{labelInside:!1});i.labelMargin=a.get(["handle","margin"]);var o=iw(n.axis,t,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,n,a,i){var o=a.axis,s=o.coordinateSystem,l=vg(o),u=vw(s,l),c=[t.x,t.y];c[l]+=n[l],c[l]=Math.min(u[1],c[l]),c[l]=Math.max(u[0],c[l]);var f=vw(s,1-l),h=(f[1]+f[0])/2,v=[h,h];return v[l]=c[l],{x:c[0],y:c[1],rotation:t.rotation,cursorPoint:v,tooltipOption:{verticalAlign:"middle"}}},e}(nw),Nae={line:function(r,e,t){var n=ow([e,t[0]],[e,t[1]],vg(r));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(r,e,t){var n=r.getBandWidth(),a=t[1]-t[0];return{type:"Rect",shape:Sk([e-n/2,t[0]],[n,a],vg(r))}}};function vg(r){return r.isHorizontal()?0:1}function vw(r,e){var t=r.getRect();return[t[Hk[e]],t[Hk[e]]+t[Oae[e]]]}var kae=Rae,Bae=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="single",e}(wt);function zae(r){ke(uh),Gs.registerAxisPointerClass("SingleAxisPointer",kae),r.registerComponentView(Bae),r.registerComponentView(Dae),r.registerComponentModel(hw),_u(r,"single",hw,hw.defaultOption),r.registerCoordinateSystem("single",Eae)}var Fae=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n,a){var i=Kl(t);r.prototype.init.apply(this,arguments),Gk(t,i)},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),Gk(this.option,t)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}($e);function Gk(r,e){var t=r.cellSize,n;K(t)?n=t:n=r.cellSize=[t,t],n.length===1&&(n[1]=n[0]);var a=J([0,1],function(i){return L7(e,i)&&(n[i]="auto"),n[i]!=null&&n[i]!=="auto"});lo(r,e,{type:"box",ignoreSize:a})}var Vae=Fae,$ae=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=this.group;i.removeAll();var o=t.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=n.getLocaleModel();this._renderDayRect(t,s,i),this._renderLines(t,s,l,i),this._renderYearText(t,s,l,i),this._renderMonthText(t,u,l,i),this._renderWeekText(t,u,s,l,i)},e.prototype._renderDayRect=function(t,n,a){for(var i=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),s=i.getCellWidth(),l=i.getCellHeight(),u=n.start.time;u<=n.end.time;u=i.getNextNDay(u,1).time){var c=i.dataToRect([u],!1).tl,f=new Ge({shape:{x:c[0],y:c[1],width:s,height:l},cursor:"default",style:o});a.add(f)}},e.prototype._renderLines=function(t,n,a,i){var o=this,s=t.coordinateSystem,l=t.getModel(["splitLine","lineStyle"]).getLineStyle(),u=t.get(["splitLine","show"]),c=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var f=n.start,h=0;f.time<=n.end.time;h++){d(f.formatedDate),h===0&&(f=s.getDateInfo(n.start.y+"-"+n.start.m));var v=f.date;v.setMonth(v.getMonth()+1),f=s.getDateInfo(v)}d(s.getNextNDay(n.end.time,1).formatedDate);function d(p){o._firstDayOfMonth.push(s.getDateInfo(p)),o._firstDayPoints.push(s.dataToRect([p],!1).tl);var g=o._getLinePointsOfOneWeek(t,p,a);o._tlpoints.push(g[0]),o._blpoints.push(g[g.length-1]),u&&o._drawSplitline(g,l,i)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,c,a),l,i),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,c,a),l,i)},e.prototype._getEdgesPoints=function(t,n,a){var i=[t[0].slice(),t[t.length-1].slice()],o=a==="horizontal"?0:1;return i[0][o]=i[0][o]-n/2,i[1][o]=i[1][o]+n/2,i},e.prototype._drawSplitline=function(t,n,a){var i=new Wr({z2:20,shape:{points:t},style:n});a.add(i)},e.prototype._getLinePointsOfOneWeek=function(t,n,a){for(var i=t.coordinateSystem,o=i.getDateInfo(n),s=[],l=0;l<7;l++){var u=i.getNextNDay(o.time,l),c=i.dataToRect([u.time],!1);s[2*u.day]=c.tl,s[2*u.day+1]=c[a==="horizontal"?"bl":"tr"]}return s},e.prototype._formatterLabel=function(t,n){return ce(t)&&t?T7(t,n):ye(t)?t(n):n.nameMap},e.prototype._yearTextPositionControl=function(t,n,a,i,o){var s=n[0],l=n[1],u=["center","bottom"];i==="bottom"?(l+=o,u=["center","top"]):i==="left"?s-=o:i==="right"?(s+=o,u=["center","top"]):l-=o;var c=0;return(i==="left"||i==="right")&&(c=Math.PI/2),{rotation:c,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},e.prototype._renderYearText=function(t,n,a,i){var o=t.getModel("yearLabel");if(!!o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=a!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],c=(u[0][0]+u[1][0])/2,f=(u[0][1]+u[1][1])/2,h=a==="horizontal"?0:1,v={top:[c,u[h][1]],bottom:[c,u[1-h][1]],left:[u[1-h][0],f],right:[u[h][0],f]},d=n.start.y;+n.end.y>+n.start.y&&(d=d+"-"+n.end.y);var p=o.get("formatter"),g={start:n.start.y,end:n.end.y,nameMap:d},y=this._formatterLabel(p,g),m=new We({z2:30,style:gt(o,{text:y})});m.attr(this._yearTextPositionControl(m,v[l],a,l,s)),i.add(m)}},e.prototype._monthTextPositionControl=function(t,n,a,i,o){var s="left",l="top",u=t[0],c=t[1];return a==="horizontal"?(c=c+o,n&&(s="center"),i==="start"&&(l="bottom")):(u=u+o,n&&(l="middle"),i==="start"&&(s="right")),{x:u,y:c,align:s,verticalAlign:l}},e.prototype._renderMonthText=function(t,n,a,i){var o=t.getModel("monthLabel");if(!!o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),c=o.get("align"),f=[this._tlpoints,this._blpoints];(!s||ce(s))&&(s&&(n=A_(s)||n),s=n.get(["time","monthAbbr"])||[]);var h=u==="start"?0:1,v=a==="horizontal"?0:1;l=u==="start"?-l:l;for(var d=c==="center",p=0;p<f[h].length-1;p++){var g=f[h][p].slice(),y=this._firstDayOfMonth[p];if(d){var m=this._firstDayPoints[p];g[v]=(m[v]+f[0][p+1][v])/2}var _=o.get("formatter"),b=s[+y.m-1],w={yyyy:y.y,yy:(y.y+"").slice(2),MM:y.m,M:+y.m,nameMap:b},x=this._formatterLabel(_,w),S=new We({z2:30,style:Q(gt(o,{text:x}),this._monthTextPositionControl(g,d,a,u,l))});i.add(S)}}},e.prototype._weekTextPositionControl=function(t,n,a,i,o){var s="center",l="middle",u=t[0],c=t[1],f=a==="start";return n==="horizontal"?(u=u+i+(f?1:-1)*o[0]/2,s=f?"right":"left"):(c=c+i+(f?1:-1)*o[1]/2,l=f?"bottom":"top"),{x:u,y:c,align:s,verticalAlign:l}},e.prototype._renderWeekText=function(t,n,a,i,o){var s=t.getModel("dayLabel");if(!!s.get("show")){var l=t.coordinateSystem,u=s.get("position"),c=s.get("nameMap"),f=s.get("margin"),h=l.getFirstDayOfWeek();if(!c||ce(c)){c&&(n=A_(c)||n);var v=n.get(["time","dayOfWeekShort"]);c=v||J(n.get(["time","dayOfWeekAbbr"]),function(w){return w[0]})}var d=l.getNextNDay(a.end.time,7-a.lweek).time,p=[l.getCellWidth(),l.getCellHeight()];f=le(f,Math.min(p[1],p[0])),u==="start"&&(d=l.getNextNDay(a.start.time,-(7+a.fweek)).time,f=-f);for(var g=0;g<7;g++){var y=l.getNextNDay(d,g),m=l.dataToRect([y.time],!1).center,_=g;_=Math.abs((g+h)%7);var b=new We({z2:30,style:Q(gt(s,{text:c[_]}),this._weekTextPositionControl(m,i,u,f,p))});o.add(b)}}},e.type="calendar",e}(wt),Hae=$ae,dw=864e5,Gae=function(){function r(e,t,n){this.type="calendar",this.dimensions=r.dimensions,this.getDimensionsInfo=r.getDimensionsInfo,this._model=e}return r.getDimensionsInfo=function(){return[{name:"time",type:"time"},"value"]},r.prototype.getRangeInfo=function(){return this._rangeInfo},r.prototype.getModel=function(){return this._model},r.prototype.getRect=function(){return this._rect},r.prototype.getCellWidth=function(){return this._sw},r.prototype.getCellHeight=function(){return this._sh},r.prototype.getOrient=function(){return this._orient},r.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},r.prototype.getDateInfo=function(e){e=bn(e);var t=e.getFullYear(),n=e.getMonth()+1,a=n<10?"0"+n:""+n,i=e.getDate(),o=i<10?"0"+i:""+i,s=e.getDay();return s=Math.abs((s+7-this.getFirstDayOfWeek())%7),{y:t+"",m:a,d:o,day:s,time:e.getTime(),formatedDate:t+"-"+a+"-"+o,date:e}},r.prototype.getNextNDay=function(e,t){return t=t||0,t===0?this.getDateInfo(e):(e=new Date(this.getDateInfo(e).time),e.setDate(e.getDate()+t),this.getDateInfo(e))},r.prototype.update=function(e,t){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var n=this._rangeInfo.weeks||1,a=["width","height"],i=this._model.getCellSize().slice(),o=this._model.getBoxLayoutParams(),s=this._orient==="horizontal"?[n,7]:[7,n];L([0,1],function(f){c(i,f)&&(o[a[f]]=i[f]*s[f])});var l={width:t.getWidth(),height:t.getHeight()},u=this._rect=Ht(o,l);L([0,1],function(f){c(i,f)||(i[f]=u[a[f]]/s[f])});function c(f,h){return f[h]!=null&&f[h]!=="auto"}this._sw=i[0],this._sh=i[1]},r.prototype.dataToPoint=function(e,t){K(e)&&(e=e[0]),t==null&&(t=!0);var n=this.getDateInfo(e),a=this._rangeInfo,i=n.formatedDate;if(t&&!(n.time>=a.start.time&&n.time<a.end.time+dw))return[NaN,NaN];var o=n.day,s=this._getRangeInfo([a.start.time,i]).nthWeek;return this._orient==="vertical"?[this._rect.x+o*this._sw+this._sw/2,this._rect.y+s*this._sh+this._sh/2]:[this._rect.x+s*this._sw+this._sw/2,this._rect.y+o*this._sh+this._sh/2]},r.prototype.pointToData=function(e){var t=this.pointToDate(e);return t&&t.time},r.prototype.dataToRect=function(e,t){var n=this.dataToPoint(e,t);return{contentShape:{x:n[0]-(this._sw-this._lineWidth)/2,y:n[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:n,tl:[n[0]-this._sw/2,n[1]-this._sh/2],tr:[n[0]+this._sw/2,n[1]-this._sh/2],br:[n[0]+this._sw/2,n[1]+this._sh/2],bl:[n[0]-this._sw/2,n[1]+this._sh/2]}},r.prototype.pointToDate=function(e){var t=Math.floor((e[0]-this._rect.x)/this._sw)+1,n=Math.floor((e[1]-this._rect.y)/this._sh)+1,a=this._rangeInfo.range;return this._orient==="vertical"?this._getDateByWeeksAndDay(n,t-1,a):this._getDateByWeeksAndDay(t,n-1,a)},r.prototype.convertToPixel=function(e,t,n){var a=Wk(t);return a===this?a.dataToPoint(n):null},r.prototype.convertFromPixel=function(e,t,n){var a=Wk(t);return a===this?a.pointToData(n):null},r.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},r.prototype._initRangeOption=function(){var e=this._model.get("range"),t;if(K(e)&&e.length===1&&(e=e[0]),K(e))t=e;else{var n=e.toString();if(/^\d{4}$/.test(n)&&(t=[n+"-01-01",n+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(n)){var a=this.getDateInfo(n),i=a.date;i.setMonth(i.getMonth()+1);var o=this.getNextNDay(i,-1);t=[a.formatedDate,o.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(n)&&(t=[n,n])}if(!t)return e;var s=this._getRangeInfo(t);return s.start.time>s.end.time&&t.reverse(),t},r.prototype._getRangeInfo=function(e){var t=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],n;t[0].time>t[1].time&&(n=!0,t.reverse());var a=Math.floor(t[1].time/dw)-Math.floor(t[0].time/dw)+1,i=new Date(t[0].time),o=i.getDate(),s=t[1].date.getDate();i.setDate(o+a-1);var l=i.getDate();if(l!==s)for(var u=i.getTime()-t[1].time>0?1:-1;(l=i.getDate())!==s&&(i.getTime()-t[1].time)*u>0;)a-=u,i.setDate(l-u);var c=Math.floor((a+t[0].day+6)/7),f=n?-c+1:c-1;return n&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:a,weeks:c,nthWeek:f,fweek:t[0].day,lweek:t[1].day}},r.prototype._getDateByWeeksAndDay=function(e,t,n){var a=this._getRangeInfo(n);if(e>a.weeks||e===0&&t<a.fweek||e===a.weeks&&t>a.lweek)return null;var i=(e-1)*7-a.fweek+t,o=new Date(a.start.time);return o.setDate(+a.start.d+i),this.getDateInfo(o)},r.create=function(e,t){var n=[];return e.eachComponent("calendar",function(a){var i=new r(a);n.push(i),a.coordinateSystem=i}),e.eachSeries(function(a){a.get("coordinateSystem")==="calendar"&&(a.coordinateSystem=n[a.get("calendarIndex")||0])}),n},r.dimensions=["time","value"],r}();function Wk(r){var e=r.calendarModel,t=r.seriesModel,n=e?e.coordinateSystem:t?t.coordinateSystem:null;return n}var Wae=Gae;function Uae(r){r.registerComponentModel(Vae),r.registerComponentView(Hae),r.registerCoordinateSystem("calendar",Wae)}function jae(r,e){var t=r.existing;if(e.id=r.keyInfo.id,!e.type&&t&&(e.type=t.type),e.parentId==null){var n=e.parentOption;n?e.parentId=n.id:t&&(e.parentId=t.parentId)}e.parentOption=null}function Uk(r,e){var t;return L(e,function(n){r[n]!=null&&r[n]!=="auto"&&(t=!0)}),t}function Yae(r,e,t){var n=Q({},t),a=r[e],i=t.$action||"merge";i==="merge"?a?(Pe(a,n,!0),lo(a,n,{ignoreSize:!0}),mA(t,a),dg(t,a),dg(t,a,"shape"),dg(t,a,"style"),dg(t,a,"extra"),t.clipPath=a.clipPath):r[e]=n:i==="replace"?r[e]=n:i==="remove"&&a&&(r[e]=null)}var jk=["transition","enterFrom","leaveTo"],qae=jk.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function dg(r,e,t){if(t&&(!r[t]&&e[t]&&(r[t]={}),r=r[t],e=e[t]),!(!r||!e))for(var n=t?jk:qae,a=0;a<n.length;a++){var i=n[a];r[i]==null&&e[i]!=null&&(r[i]=e[i])}}function Zae(r,e){if(!!r&&(r.hv=e.hv=[Uk(e,["left","right"]),Uk(e,["top","bottom"])],r.type==="group")){var t=r,n=e;t.width==null&&(t.width=n.width=0),t.height==null&&(t.height=n.height=0)}}var Xae=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventAutoZ=!0,t}return e.prototype.mergeOption=function(t,n){var a=this.option.elements;this.option.elements=null,r.prototype.mergeOption.call(this,t,n),this.option.elements=a},e.prototype.optionUpdated=function(t,n){var a=this.option,i=(n?a:t).elements,o=a.elements=n?[]:a.elements,s=[];this._flatten(i,s,null);var l=hD(o,s,"normalMerge"),u=this._elOptionsToUpdate=[];L(l,function(c,f){var h=c.newOption;!h||(u.push(h),jae(c,h),Yae(o,f,h),Zae(o[f],h))},this),a.elements=nt(o,function(c){return c&&delete c.$action,c!=null})},e.prototype._flatten=function(t,n,a){L(t,function(i){if(!!i){a&&(i.parentOption=a),n.push(i);var o=i.children;o&&o.length&&this._flatten(o,n,i),delete i.children}},this)},e.prototype.useElOptionsToUpdate=function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t},e.type="graphic",e.defaultOption={elements:[]},e}($e),Yk={path:null,compoundPath:null,group:Te,image:ur,text:We},Xn=Ye(),Qae=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this._elMap=ge()},e.prototype.render=function(t,n,a){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,a)},e.prototype._updateElements=function(t){var n=t.useElOptionsToUpdate();if(!!n){var a=this._elMap,i=this.group,o=t.get("z"),s=t.get("zlevel");L(n,function(l){var u=qt(l.id,null),c=u!=null?a.get(u):null,f=qt(l.parentId,null),h=f!=null?a.get(f):i,v=l.type,d=l.style;v==="text"&&d&&l.hv&&l.hv[1]&&(d.textVerticalAlign=d.textBaseline=d.verticalAlign=d.align=null);var p=l.textContent,g=l.textConfig;if(d&&XN(d,v,!!g,!!p)){var y=QN(d,v,!0);!g&&y.textConfig&&(g=l.textConfig=y.textConfig),!p&&y.textContent&&(p=y.textContent)}var m=Kae(l),_=l.$action||"merge",b=_==="merge",w=_==="replace";if(b){var x=!c,S=c;x?S=qk(u,h,l.type,a):(S&&(Xn(S).isNew=!1),sk(S)),S&&(og(S,m,t,{isInit:x}),Zk(S,l,o,s))}else if(w){pg(c,l,a,t);var T=qk(u,h,l.type,a);T&&(og(T,m,t,{isInit:!0}),Zk(T,l,o,s))}else _==="remove"&&(nk(c,l),pg(c,l,a,t));var D=a.get(u);if(D&&p)if(b){var M=D.getTextContent();M?M.attr(p):D.setTextContent(new We(p))}else w&&D.setTextContent(new We(p));if(D){var A=l.clipPath;if(A){var I=A.type,P=void 0,x=!1;if(b){var E=D.getClipPath();x=!E||Xn(E).type!==I,P=x?pw(I):E}else w&&(x=!0,P=pw(I));D.setClipPath(P),og(P,A,t,{isInit:x}),lg(P,A.keyframeAnimation,t)}var O=Xn(D);D.setTextConfig(g),O.option=l,Jae(D,t,l),Yl({el:D,componentModel:t,itemName:D.name,itemTooltipOption:l.tooltip}),lg(D,l.keyframeAnimation,t)}})}},e.prototype._relocate=function(t,n){for(var a=t.option.elements,i=this.group,o=this._elMap,s=n.getWidth(),l=n.getHeight(),u=["x","y"],c=0;c<a.length;c++){var f=a[c],h=qt(f.id,null),v=h!=null?o.get(h):null;if(!(!v||!v.isGroup)){var d=v.parent,p=d===i,g=Xn(v),y=Xn(d);g.width=le(g.option.width,p?s:y.width)||0,g.height=le(g.option.height,p?l:y.height)||0}}for(var c=a.length-1;c>=0;c--){var f=a[c],h=qt(f.id,null),v=h!=null?o.get(h):null;if(!!v){var d=v.parent,y=Xn(d),m=d===i?{width:s,height:l}:{width:y.width,height:y.height},_={},b=Hd(v,f,m,null,{hv:f.hv,boundingMode:f.bounding},_);if(!Xn(v).isNew&&b){for(var w=f.transition,x={},S=0;S<u.length;S++){var T=u[S],D=_[T];w&&(Ks(w)||Ne(w,T)>=0)?x[T]=D:v[T]=D}qe(v,x,t,0)}else v.attr(_)}}},e.prototype._clear=function(){var t=this,n=this._elMap;n.each(function(a){pg(a,Xn(a).option,n,t._lastGraphicModel)}),this._elMap=ge()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(wt);function pw(r){var e=he(Yk,r)?Yk[r]:Ad(r),t=new e({});return Xn(t).type=r,t}function qk(r,e,t,n){var a=pw(t);return e.add(a),n.set(r,a),Xn(a).id=r,Xn(a).isNew=!0,a}function pg(r,e,t,n){var a=r&&r.parent;a&&(r.type==="group"&&r.traverse(function(i){pg(i,e,t,n)}),sg(r,e,n),t.removeKey(Xn(r).id))}function Zk(r,e,t,n){r.isGroup||L([["cursor",Bn.prototype.cursor],["zlevel",n||0],["z",t||0],["z2",0]],function(a){var i=a[0];he(e,i)?r[i]=Ee(e[i],a[1]):r[i]==null&&(r[i]=a[1])}),L(Fe(e),function(a){if(a.indexOf("on")===0){var i=e[a];r[a]=ye(i)?i:null}}),he(e,"draggable")&&(r.draggable=e.draggable),e.name!=null&&(r.name=e.name),e.id!=null&&(r.id=e.id)}function Kae(r){return r=Q({},r),L(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(yA),function(e){delete r[e]}),r}function Jae(r,e,t){var n=Me(r).eventData;!r.silent&&!r.ignore&&!n&&(n=Me(r).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:r.name}),n&&(n.info=t.info)}function eie(r){r.registerComponentModel(Xae),r.registerComponentView(Qae),r.registerPreprocessor(function(e){var t=e.graphic;K(t)?!t[0]||!t[0].elements?e.graphic=[{elements:t}]:e.graphic=[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var Xk=["x","y","radius","angle","single"],tie=["cartesian2d","polar","singleAxis"];function rie(r){var e=r.get("coordinateSystem");return Ne(tie,e)>=0}function To(r){return r+"Axis"}function nie(r,e){var t=ge(),n=[],a=ge();r.eachComponent({mainType:"dataZoom",query:e},function(c){a.get(c.uid)||s(c)});var i;do i=!1,r.eachComponent("dataZoom",o);while(i);function o(c){!a.get(c.uid)&&l(c)&&(s(c),i=!0)}function s(c){a.set(c.uid,!0),n.push(c),u(c)}function l(c){var f=!1;return c.eachTargetAxis(function(h,v){var d=t.get(h);d&&d[v]&&(f=!0)}),f}function u(c){c.eachTargetAxis(function(f,h){(t.get(f)||t.set(f,[]))[h]=!0})}return n}function Qk(r){var e=r.ecModel,t={infoList:[],infoMap:ge()};return r.eachTargetAxis(function(n,a){var i=e.getComponent(To(n),a);if(!!i){var o=i.getCoordSysModel();if(!!o){var s=o.uid,l=t.infoMap.get(s);l||(l={model:o,axisModels:[]},t.infoList.push(l),t.infoMap.set(s,l)),l.axisModels.push(i)}}}),t}var gw=function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},r}(),aie=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._autoThrottle=!0,t._noTarget=!0,t._rangePropMode=["percent","percent"],t}return e.prototype.init=function(t,n,a){var i=Kk(t);this.settledOption=i,this.mergeDefaultAndTheme(t,a),this._doInit(i)},e.prototype.mergeOption=function(t){var n=Kk(t);Pe(this.option,t,!0),Pe(this.settledOption,n,!0),this._doInit(n)},e.prototype._doInit=function(t){var n=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var a=this.settledOption;L([["start","startValue"],["end","endValue"]],function(i,o){this._rangePropMode[o]==="value"&&(n[i[0]]=a[i[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),n=this._targetAxisInfoMap=ge(),a=this._fillSpecifiedTargetAxis(n);a?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(n,this._orient)),this._noTarget=!0,n.each(function(i){i.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(t){var n=!1;return L(Xk,function(a){var i=this.getReferringComponents(To(a),l8);if(!!i.specified){n=!0;var o=new gw;L(i.models,function(s){o.add(s.componentIndex)}),t.set(a,o)}},this),n},e.prototype._fillAutoTargetAxisByOrient=function(t,n){var a=this.ecModel,i=!0;if(i){var o=n==="vertical"?"y":"x",s=a.findComponents({mainType:o+"Axis"});l(s,o)}if(i){var s=a.findComponents({mainType:"singleAxis",filter:function(c){return c.get("orient",!0)===n}});l(s,"single")}function l(u,c){var f=u[0];if(!!f){var h=new gw;if(h.add(f.componentIndex),t.set(c,h),i=!1,c==="x"||c==="y"){var v=f.getReferringComponents("grid",$t).models[0];v&&L(u,function(d){f.componentIndex!==d.componentIndex&&v===d.getReferringComponents("grid",$t).models[0]&&h.add(d.componentIndex)})}}}i&&L(Xk,function(u){if(!!i){var c=a.findComponents({mainType:To(u),filter:function(h){return h.get("type",!0)==="category"}});if(c[0]){var f=new gw;f.add(c[0].componentIndex),t.set(u,f),i=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis(function(n){!t&&(t=n)},this),t==="y"?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var n=this.ecModel.option;this.option.throttle=n.animation&&n.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var n=this._rangePropMode,a=this.get("rangeMode");L([["start","startValue"],["end","endValue"]],function(i,o){var s=t[i[0]]!=null,l=t[i[1]]!=null;s&&!l?n[o]="percent":!s&&l?n[o]="value":a?n[o]=a[o]:s&&(n[o]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis(function(n,a){t==null&&(t=this.ecModel.getComponent(To(n),a))},this),t},e.prototype.eachTargetAxis=function(t,n){this._targetAxisInfoMap.each(function(a,i){L(a.indexList,function(o){t.call(n,i,o)})})},e.prototype.getAxisProxy=function(t,n){var a=this.getAxisModel(t,n);if(a)return a.__dzAxisProxy},e.prototype.getAxisModel=function(t,n){var a=this._targetAxisInfoMap.get(t);if(a&&a.indexMap[n])return this.ecModel.getComponent(To(t),n)},e.prototype.setRawRange=function(t){var n=this.option,a=this.settledOption;L([["start","startValue"],["end","endValue"]],function(i){(t[i[0]]!=null||t[i[1]]!=null)&&(n[i[0]]=a[i[0]]=t[i[0]],n[i[1]]=a[i[1]]=t[i[1]])},this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var n=this.option;L(["start","startValue","end","endValue"],function(a){n[a]=t[a]})},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,n){if(t==null&&n==null){var a=this.findRepresentativeAxisProxy();if(a)return a.getDataValueWindow()}else return this.getAxisProxy(t,n).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var n,a=this._targetAxisInfoMap.keys(),i=0;i<a.length;i++)for(var o=a[i],s=this._targetAxisInfoMap.get(o),l=0;l<s.indexList.length;l++){var u=this.getAxisProxy(o,s.indexList[l]);if(u.hostedBy(this))return u;n||(n=u)}return n},e.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},e.prototype.getOrient=function(){return this._orient},e.type="dataZoom",e.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],e.defaultOption={z:4,filterMode:"filter",start:0,end:100},e}($e);function Kk(r){var e={};return L(["start","end","startValue","endValue","throttle"],function(t){r.hasOwnProperty(t)&&(e[t]=r[t])}),e}var ch=aie,iie=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.select",e}(ch),oie=iie,sie=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a,i){this.dataZoomModel=t,this.ecModel=n,this.api=a},e.type="dataZoom",e}(wt),yw=sie,lie=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.select",e}(yw),uie=lie,Au=L,Jk=_n,cie=function(){function r(e,t,n,a){this._dimName=e,this._axisIndex=t,this.ecModel=a,this._dataZoomModel=n}return r.prototype.hostedBy=function(e){return this._dataZoomModel===e},r.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},r.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},r.prototype.getTargetSeriesModels=function(){var e=[];return this.ecModel.eachSeries(function(t){if(rie(t)){var n=To(this._dimName),a=t.getReferringComponents(n,$t).models[0];a&&this._axisIndex===a.componentIndex&&e.push(t)}},this),e},r.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},r.prototype.getMinMaxSpan=function(){return we(this._minMaxSpan)},r.prototype.calculateDataWindow=function(e){var t=this._dataExtent,n=this.getAxisModel(),a=n.axis.scale,i=this._dataZoomModel.getRangePropMode(),o=[0,100],s=[],l=[],u;Au(["start","end"],function(h,v){var d=e[h],p=e[h+"Value"];i[v]==="percent"?(d==null&&(d=o[v]),p=a.parse(at(d,o,t))):(u=!0,p=p==null?t[v]:a.parse(p),d=at(p,t,o)),l[v]=p==null||isNaN(p)?t[v]:p,s[v]=d==null||isNaN(d)?o[v]:d}),Jk(l),Jk(s);var c=this._minMaxSpan;u?f(l,s,t,o,!1):f(s,l,o,t,!0);function f(h,v,d,p,g){var y=g?"Span":"ValueSpan";Zs(0,h,d,"all",c["min"+y],c["max"+y]);for(var m=0;m<2;m++)v[m]=at(h[m],d,p,!0),g&&(v[m]=a.parse(v[m]))}return{valueWindow:l,percentWindow:s}},r.prototype.reset=function(e){if(e===this._dataZoomModel){var t=this.getTargetSeriesModels();this._dataExtent=fie(this,this._dimName,t),this._updateMinMaxSpan();var n=this.calculateDataWindow(e.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},r.prototype.filterData=function(e,t){if(e!==this._dataZoomModel)return;var n=this._dimName,a=this.getTargetSeriesModels(),i=e.get("filterMode"),o=this._valueWindow;if(i==="none")return;Au(a,function(l){var u=l.getData(),c=u.mapDimensionsAll(n);if(!!c.length){if(i==="weakFilter"){var f=u.getStore(),h=J(c,function(v){return u.getDimensionIndex(v)},u);u.filterSelf(function(v){for(var d,p,g,y=0;y<c.length;y++){var m=f.get(h[y],v),_=!isNaN(m),b=m<o[0],w=m>o[1];if(_&&!b&&!w)return!0;_&&(g=!0),b&&(d=!0),w&&(p=!0)}return g&&d&&p})}else Au(c,function(v){if(i==="empty")l.setData(u=u.map(v,function(p){return s(p)?p:NaN}));else{var d={};d[v]=o,u.selectRange(d)}});Au(c,function(v){u.setApproximateExtent(o,v)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._dataExtent;Au(["min","max"],function(a){var i=t.get(a+"Span"),o=t.get(a+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?i=at(n[0]+o,n,[0,100],!0):i!=null&&(o=at(i,[0,100],n,!0)-n[0]),e[a+"Span"]=i,e[a+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,n=this._valueWindow;if(!!t){var a=A0(n,[0,500]);a=Math.min(a,20);var i=e.axis.scale.rawExtentInfo;t[0]!==0&&i.setDeterminedMinMax("min",+n[0].toFixed(a)),t[1]!==100&&i.setDeterminedMinMax("max",+n[1].toFixed(a)),i.freeze()}},r}();function fie(r,e,t){var n=[1/0,-1/0];Au(t,function(o){xj(n,o.getData(),e)});var a=r.getAxisModel(),i=cP(a.axis.scale,a,n).calculate();return[i.min,i.max]}var hie=cie,vie={getTargetSeries:function(r){function e(a){r.eachComponent("dataZoom",function(i){i.eachTargetAxis(function(o,s){var l=r.getComponent(To(o),s);a(o,s,l,i)})})}e(function(a,i,o,s){o.__dzAxisProxy=null});var t=[];e(function(a,i,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new hie(a,i,s,r),t.push(o.__dzAxisProxy))});var n=ge();return L(t,function(a){L(a.getTargetSeriesModels(),function(i){n.set(i.uid,i)})}),n},overallReset:function(r,e){r.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(n,a){t.getAxisProxy(n,a).reset(t)}),t.eachTargetAxis(function(n,a){t.getAxisProxy(n,a).filterData(t,e)})}),r.eachComponent("dataZoom",function(t){var n=t.findRepresentativeAxisProxy();if(n){var a=n.getDataPercentWindow(),i=n.getDataValueWindow();t.setCalculatedRange({start:a[0],end:a[1],startValue:i[0],endValue:i[1]})}})}},die=vie;function pie(r){r.registerAction("dataZoom",function(e,t){var n=nie(t,e);L(n,function(a){a.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var e5=!1;function mw(r){e5||(e5=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,die),pie(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function gie(r){r.registerComponentModel(oie),r.registerComponentView(uie),mw(r)}var Qn=function(){function r(){}return r}(),t5={};function Lu(r,e){t5[r]=e}function r5(r){return t5[r]}var yie=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){r.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;L(this.option.feature,function(n,a){var i=r5(a);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(t)),Pe(n,i.defaultOption))})},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},e}($e),mie=yie;function _ie(r,e,t){var n=e.getBoxLayoutParams(),a=e.get("padding"),i={width:t.getWidth(),height:t.getHeight()},o=Ht(n,i,a);Cs(e.get("orient"),r,e.get("itemGap"),o.width,o.height),Hd(r,n,i,a)}function n5(r,e){var t=xs(e.get("padding")),n=e.getItemStyle(["color","opacity"]);return n.fill=e.get("backgroundColor"),r=new Ge({shape:{x:r.x-t[3],y:r.y-t[0],width:r.width+t[1]+t[3],height:r.height+t[0]+t[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1}),r}var bie=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,n,a,i){var o=this.group;if(o.removeAll(),!t.get("show"))return;var s=+t.get("itemSize"),l=t.get("orient")==="vertical",u=t.get("feature")||{},c=this._features||(this._features={}),f=[];L(u,function(d,p){f.push(p)}),new pi(this._featureNames||[],f).add(h).update(h).remove(Ae(h,null)).execute(),this._featureNames=f;function h(d,p){var g=f[d],y=f[p],m=u[g],_=new lt(m,t,t.ecModel),b;if(i&&i.newTitle!=null&&i.featureName===g&&(m.title=i.newTitle),g&&!y){if(xie(g))b={onclick:_.option.onclick,featureName:g};else{var w=r5(g);if(!w)return;b=new w}c[g]=b}else if(b=c[y],!b)return;b.uid=Zl("toolbox-feature"),b.model=_,b.ecModel=n,b.api=a;var x=b instanceof Qn;if(!g&&y){x&&b.dispose&&b.dispose(n,a);return}if(!_.get("show")||x&&b.unusable){x&&b.remove&&b.remove(n,a);return}v(_,b,g),_.setIconStatus=function(S,T){var D=this.option,M=this.iconPaths;D.iconStatus=D.iconStatus||{},D.iconStatus[S]=T,M[S]&&(T==="emphasis"?hi:vi)(M[S])},b instanceof Qn&&b.render&&b.render(_,n,a,i)}function v(d,p,g){var y=d.getModel("iconStyle"),m=d.getModel(["emphasis","iconStyle"]),_=p instanceof Qn&&p.getIcons?p.getIcons():d.get("icon"),b=d.get("title")||{},w,x;ce(_)?(w={},w[g]=_):w=_,ce(b)?(x={},x[g]=b):x=b;var S=d.iconPaths={};L(w,function(T,D){var M=jl(T,{},{x:-s/2,y:-s/2,width:s,height:s});M.setStyle(y.getItemStyle());var A=M.ensureState("emphasis");A.style=m.getItemStyle();var I=new We({style:{text:x[D],align:m.get("textAlign"),borderRadius:m.get("textBorderRadius"),padding:m.get("textPadding"),fill:null},ignore:!0});M.setTextContent(I),Yl({el:M,componentModel:t,itemName:D,formatterParamsExtra:{title:x[D]}}),M.__title=x[D],M.on("mouseover",function(){var P=m.getItemStyle(),E=l?t.get("right")==null&&t.get("left")!=="right"?"right":"left":t.get("bottom")==null&&t.get("top")!=="bottom"?"bottom":"top";I.setStyle({fill:m.get("textFill")||P.fill||P.stroke||"#000",backgroundColor:m.get("textBackgroundColor")}),M.setTextConfig({position:m.get("textPosition")||E}),I.ignore=!t.get("showTitle"),a.enterEmphasis(this)}).on("mouseout",function(){d.get(["iconStatus",D])!=="emphasis"&&a.leaveEmphasis(this),I.hide()}),(d.get(["iconStatus",D])==="emphasis"?hi:vi)(M),o.add(M),M.on("click",fe(p.onclick,p,n,a,D)),S[D]=M})}_ie(o,t,a),o.add(n5(o.getBoundingRect(),t)),l||o.eachChild(function(d){var p=d.__title,g=d.ensureState("emphasis"),y=g.textConfig||(g.textConfig={}),m=d.getTextContent(),_=m&&m.ensureState("emphasis");if(_&&!ye(_)&&p){var b=_.style||(_.style={}),w=Rc(p,We.makeFont(b)),x=d.x+o.x,S=d.y+o.y+s,T=!1;S+w.height>a.getHeight()&&(y.position="top",T=!0);var D=T?-5-w.height:s+10;x+w.width/2>a.getWidth()?(y.position=["100%",D],b.align="right"):x-w.width/2<0&&(y.position=[0,D],b.align="left")}})},e.prototype.updateView=function(t,n,a,i){L(this._features,function(o){o instanceof Qn&&o.updateView&&o.updateView(o.model,n,a,i)})},e.prototype.remove=function(t,n){L(this._features,function(a){a instanceof Qn&&a.remove&&a.remove(t,n)}),this.group.removeAll()},e.prototype.dispose=function(t,n){L(this._features,function(a){a instanceof Qn&&a.dispose&&a.dispose(t,n)})},e.type="toolbox",e}(wt);function xie(r){return r.indexOf("my")===0}var wie=bie,Sie=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,n){var a=this.model,i=a.get("name")||t.get("title.0.text")||"echarts",o=n.getZr().painter.getType()==="svg",s=o?"svg":a.get("type",!0)||"png",l=n.getConnectedDataURL({type:s,backgroundColor:a.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:a.get("connectedBackgroundColor"),excludeComponents:a.get("excludeComponents"),pixelRatio:a.get("pixelRatio")}),u=Ue.browser;if(ye(MouseEvent)&&(u.newEdge||!u.ie&&!u.edge)){var c=document.createElement("a");c.download=i+"."+s,c.target="_blank",c.href=l;var f=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});c.dispatchEvent(f)}else if(window.navigator.msSaveOrOpenBlob||o){var h=l.split(","),v=h[0].indexOf("base64")>-1,d=o?decodeURIComponent(h[1]):h[1];v&&(d=window.atob(d));var p=i+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var g=d.length,y=new Uint8Array(g);g--;)y[g]=d.charCodeAt(g);var m=new Blob([y]);window.navigator.msSaveOrOpenBlob(m,p)}else{var _=document.createElement("iframe");document.body.appendChild(_);var b=_.contentWindow,w=b.document;w.open("image/svg+xml","replace"),w.write(d),w.close(),b.focus(),w.execCommand("SaveAs",!0,p),document.body.removeChild(_)}}else{var x=a.get("lang"),S='<body style="margin:0;"><img src="'+l+'" style="max-width:100%;" title="'+(x&&x[0]||"")+'" /></body>',T=window.open();T.document.write(S),T.document.title=i}},e.getDefaultOption=function(t){var n={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return n},e}(Qn),Cie=Sie,a5="__ec_magicType_stack__",Tie=[["line","bar"],["stack"]],Die=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getIcons=function(){var t=this.model,n=t.get("icon"),a={};return L(t.get("type"),function(i){n[i]&&(a[i]=n[i])}),a},e.getDefaultOption=function(t){var n={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return n},e.prototype.onclick=function(t,n,a){var i=this.model,o=i.get(["seriesIndex",a]);if(!!i5[a]){var s={series:[]},l=function(f){var h=f.subType,v=f.id,d=i5[a](h,v,f,i);d&&(me(d,f.option),s.series.push(d));var p=f.coordinateSystem;if(p&&p.type==="cartesian2d"&&(a==="line"||a==="bar")){var g=p.getAxesByScale("ordinal")[0];if(g){var y=g.dim,m=y+"Axis",_=f.getReferringComponents(m,$t).models[0],b=_.componentIndex;s[m]=s[m]||[];for(var w=0;w<=b;w++)s[m][b]=s[m][b]||{};s[m][b].boundaryGap=a==="bar"}}};L(Tie,function(f){Ne(f,a)>=0&&L(f,function(h){i.setIconStatus(h,"normal")})}),i.setIconStatus(a,"emphasis"),t.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,c=a;a==="stack"&&(u=Pe({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),i.get(["iconStatus",a])!=="emphasis"&&(c="tiled")),n.dispatchAction({type:"changeMagicType",currentType:c,newOption:s,newTitle:u,featureName:"magicType"})}},e}(Qn),i5={line:function(r,e,t,n){if(r==="bar")return Pe({id:e,type:"line",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},n.get(["option","line"])||{},!0)},bar:function(r,e,t,n){if(r==="line")return Pe({id:e,type:"bar",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},n.get(["option","bar"])||{},!0)},stack:function(r,e,t,n){var a=t.get("stack")===a5;if(r==="line"||r==="bar")return n.setIconStatus("stack",a?"normal":"emphasis"),Pe({id:e,stack:a?"":a5},n.get(["option","stack"])||{},!0)}};ma({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,e){e.mergeOption(r.newOption)});var Mie=Die,gg=new Array(60).join("-"),Iu=" ";function Aie(r){var e={},t=[],n=[];return r.eachRawSeries(function(a){var i=a.coordinateSystem;if(i&&(i.type==="cartesian2d"||i.type==="polar")){var o=i.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;e[s]||(e[s]={categoryAxis:o,valueAxis:i.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),e[s].series.push(a)}else t.push(a)}else t.push(a)}),{seriesGroupByCategoryAxis:e,other:t,meta:n}}function Lie(r){var e=[];return L(r,function(t,n){var a=t.categoryAxis,i=t.valueAxis,o=i.dim,s=[" "].concat(J(t.series,function(v){return v.name})),l=[a.model.getCategories()];L(t.series,function(v){var d=v.getRawData();l.push(v.getRawData().mapArray(d.mapDimension(o),function(p){return p}))});for(var u=[s.join(Iu)],c=0;c<l[0].length;c++){for(var f=[],h=0;h<l.length;h++)f.push(l[h][c]);u.push(f.join(Iu))}e.push(u.join(`
222
+ `+i.message)}return xX(t,a),L(a,function(i){var o=i.name;SX(t,i),TX(t,i);var s=this._specialAreas&&this._specialAreas[o];s&&i.transformTo(s.left,s.top,s.width,s.height)},this),a},r.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},r}();function AX(r){for(var e,t=0;t<r.length;t++){var n=r[t].getBoundingRect();e=e||n.clone(),e.union(n)}return e}function LX(r){return ce(r)?typeof JSON!="undefined"&&JSON.parse?JSON.parse(r):new Function("return ("+r+");")():r}var qf=ge(),_i={registerMap:function(r,e,t){if(e.svg){var n=new mX(r,e.svg);qf.set(r,n)}else{var a=e.geoJson||e.geoJSON;a&&!e.features?t=e.specialAreas:a=e;var n=new MX(r,a,t);qf.set(r,n)}},getGeoResource:function(r){return qf.get(r)},getMapForUser:function(r){var e=qf.get(r);return e&&e.type==="geoJSON"&&e.getMapForUser()},load:function(r,e,t){var n=qf.get(r);if(!!n)return n.load(e,t)}},Nb=["rect","circle","line","ellipse","polygon","polyline","path"],IX=ge(Nb),PX=ge(Nb.concat(["g"])),EX=ge(Nb.concat(["g"])),AO=Ye();function Up(r){var e=r.getItemStyle(),t=r.get("areaColor");return t!=null&&(e.fill=t),e}function LO(r){var e=r.style;e&&(e.stroke=e.stroke||e.fill,e.fill=null)}var OX=function(){function r(e){var t=new Te;this.uid=Zl("ec_map_draw"),this._controller=new Yf(e.getZr()),this._controllerHost={target:t},this.group=t,t.add(this._regionsGroup=new Te),t.add(this._svgGroup=new Te)}return r.prototype.draw=function(e,t,n,a,i){var o=e.mainType==="geo",s=e.getData&&e.getData();o&&t.eachComponent({mainType:"series",subType:"map"},function(y){!s&&y.getHostGeoModel()===e&&(s=y.getData())});var l=e.coordinateSystem,u=this._regionsGroup,c=this.group,f=l.getTransformInfo(),h=f.raw,v=f.roam,d=!u.childAt(0)||i;d?(c.x=v.x,c.y=v.y,c.scaleX=v.scaleX,c.scaleY=v.scaleY,c.dirty()):qe(c,v,e);var p=s&&s.getVisual("visualMeta")&&s.getVisual("visualMeta").length>0,g={api:n,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:p,isGeo:o,transformInfoRaw:h};l.resourceType==="geoJSON"?this._buildGeoJSON(g):l.resourceType==="geoSVG"&&this._buildSVG(g),this._updateController(e,t,n),this._updateMapSelectHandler(e,u,n,a)},r.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=ge(),n=ge(),a=this._regionsGroup,i=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function c(v,d){return d&&(v=d(v)),v&&[v[0]*i.scaleX+i.x,v[1]*i.scaleY+i.y]}function f(v){for(var d=[],p=!u&&l&&l.project,g=0;g<v.length;++g){var y=c(v[g],p);y&&d.push(y)}return d}function h(v){return{shape:{points:f(v)}}}a.removeAll(),L(e.geo.regions,function(v){var d=v.name,p=t.get(d),g=n.get(d)||{},y=g.dataIdx,m=g.regionModel;p||(p=t.set(d,new Te),a.add(p),y=s?s.indexOfName(d):null,m=e.isGeo?o.getRegionModel(d):s?s.getItemModel(y):null,n.set(d,{dataIdx:y,regionModel:m}));var _=[],b=[];L(v.geometries,function(S){if(S.type==="polygon"){var T=[S.exterior].concat(S.interiors||[]);u&&(T=NO(T,u)),L(T,function(M){_.push(new Gr(h(M)))})}else{var D=S.points;u&&(D=NO(D,u,!0)),L(D,function(M){b.push(new Wr(h(M)))})}});var w=c(v.getCenter(),l&&l.project);function x(S,T){if(!!S.length){var D=new wd({culling:!0,segmentIgnoreThreshold:1,shape:{paths:S}});p.add(D),IO(e,D,y,m),PO(e,D,d,m,o,y,w),T&&(LO(D),L(D.states,LO))}}x(_),x(b,!0)}),t.each(function(v,d){var p=n.get(d),g=p.dataIdx,y=p.regionModel;EO(e,v,d,y,o,g),OO(e,v,d,y,o),RO(e,v,d,y,o)},this)},r.prototype._buildSVG=function(e){var t=e.geo.map,n=e.transformInfoRaw;this._svgGroup.x=n.x,this._svgGroup.y=n.y,this._svgGroup.scaleX=n.scaleX,this._svgGroup.scaleY=n.scaleY,this._svgResourceChanged(t)&&(this._freeSVG(),this._useSVG(t));var a=this._svgDispatcherMap=ge(),i=!1;L(this._svgGraphicRecord.named,function(o){var s=o.name,l=e.mapOrGeoModel,u=e.data,c=o.svgNodeTagLower,f=o.el,h=u?u.indexOfName(s):null,v=l.getRegionModel(s);if(IX.get(c)!=null&&f instanceof Bn&&IO(e,f,h,v),f instanceof Bn&&(f.culling=!0),f.z2EmphasisLift=0,!o.namedFrom&&(EX.get(c)!=null&&PO(e,f,s,v,l,h,null),EO(e,f,s,v,l,h),OO(e,f,s,v,l),PX.get(c)!=null)){var d=RO(e,f,s,v,l);d==="self"&&(i=!0);var p=a.get(s)||a.set(s,[]);p.push(f)}},this),this._enableBlurEntireSVG(i,e)},r.prototype._enableBlurEntireSVG=function(e,t){if(e&&t.isGeo){var n=t.mapOrGeoModel.getModel(["blur","itemStyle"]).getItemStyle(),a=n.opacity;this._svgGraphicRecord.root.traverse(function(i){if(!i.isGroup){ps(i);var o=i.ensureState("blur").style||{};o.opacity==null&&a!=null&&(o.opacity=a),i.ensureState("emphasis")}})}},r.prototype.remove=function(){this._regionsGroup.removeAll(),this._regionsGroupByName=null,this._svgGroup.removeAll(),this._freeSVG(),this._controller.dispose(),this._controllerHost=null},r.prototype.findHighDownDispatchers=function(e,t){if(e==null)return[];var n=t.coordinateSystem;if(n.resourceType==="geoJSON"){var a=this._regionsGroupByName;if(a){var i=a.get(e);return i?[i]:[]}}else if(n.resourceType==="geoSVG")return this._svgDispatcherMap&&this._svgDispatcherMap.get(e)||[]},r.prototype._svgResourceChanged=function(e){return this._svgMapName!==e},r.prototype._useSVG=function(e){var t=_i.getGeoResource(e);if(t&&t.type==="geoSVG"){var n=t.useGraphic(this.uid);this._svgGroup.add(n.root),this._svgGraphicRecord=n,this._svgMapName=e}},r.prototype._freeSVG=function(){var e=this._svgMapName;if(e!=null){var t=_i.getGeoResource(e);t&&t.type==="geoSVG"&&t.freeGraphic(this.uid),this._svgGraphicRecord=null,this._svgDispatcherMap=null,this._svgGroup.removeAll(),this._svgMapName=null}},r.prototype._updateController=function(e,t,n){var a=e.coordinateSystem,i=this._controller,o=this._controllerHost;o.zoomLimit=e.get("scaleLimit"),o.zoom=a.getZoom(),i.enable(e.get("roam")||!1);var s=e.mainType;function l(){var u={type:"geoRoam",componentType:s};return u[s+"Id"]=e.id,u}i.off("pan").on("pan",function(u){this._mouseDownFlag=!1,Ib(o,u.dx,u.dy),n.dispatchAction(Q(l(),{dx:u.dx,dy:u.dy,animation:{duration:0}}))},this),i.off("zoom").on("zoom",function(u){this._mouseDownFlag=!1,Pb(o,u.scale,u.originX,u.originY),n.dispatchAction(Q(l(),{zoom:u.scale,originX:u.originX,originY:u.originY,animation:{duration:0}}))},this),i.setPointerChecker(function(u,c,f){return a.containPoint([c,f])&&!$p(u,n,e)})},r.prototype.resetForLabelLayout=function(){this.group.traverse(function(e){var t=e.getTextContent();t&&(t.ignore=AO(t).ignore)})},r.prototype._updateMapSelectHandler=function(e,t,n,a){var i=this;t.off("mousedown"),t.off("click"),e.get("selectedMode")&&(t.on("mousedown",function(){i._mouseDownFlag=!0}),t.on("click",function(o){!i._mouseDownFlag||(i._mouseDownFlag=!1)}))},r}();function IO(r,e,t,n){var a=n.getModel("itemStyle"),i=n.getModel(["emphasis","itemStyle"]),o=n.getModel(["blur","itemStyle"]),s=n.getModel(["select","itemStyle"]),l=Up(a),u=Up(i),c=Up(s),f=Up(o),h=r.data;if(h){var v=h.getItemVisual(t,"style"),d=h.getItemVisual(t,"decal");r.isVisualEncodedByVisualMap&&v.fill&&(l.fill=v.fill),d&&(l.decal=cu(d,r.api))}e.setStyle(l),e.style.strokeNoScale=!0,e.ensureState("emphasis").style=u,e.ensureState("select").style=c,e.ensureState("blur").style=f,ps(e)}function PO(r,e,t,n,a,i,o){var s=r.data,l=r.isGeo,u=s&&isNaN(s.get(s.mapDimension("value"),i)),c=s&&s.getItemLayout(i);if(l||u||c&&c.showLabel){var f=l?t:i,h=void 0;(!s||i>=0)&&(h=a);var v=o?{normal:{align:"center",verticalAlign:"middle"}}:null;yr(e,rr(n),{labelFetcher:h,labelDataIndex:f,defaultText:t},v);var d=e.getTextContent();if(d&&(AO(d).ignore=d.ignore,e.textConfig&&o)){var p=e.getBoundingRect().clone();e.textConfig.layoutRect=p,e.textConfig.position=[(o[0]-p.x)/p.width*100+"%",(o[1]-p.y)/p.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function EO(r,e,t,n,a,i){r.data?r.data.setItemGraphicEl(i,e):Me(e).eventData={componentType:"geo",componentIndex:a.componentIndex,geoIndex:a.componentIndex,name:t,region:n&&n.option||{}}}function OO(r,e,t,n,a){r.data||Yl({el:e,componentModel:a,itemName:t,itemTooltipOption:n.get("tooltip")})}function RO(r,e,t,n,a){e.highDownSilentOnTouch=!!a.get("selectedMode");var i=n.getModel("emphasis"),o=i.get("focus");return Lt(e,o,i.get("blurScope"),i.get("disabled")),r.isGeo&&xW(e,a,t),o}function NO(r,e,t){var n=[],a;function i(){a=[]}function o(){a.length&&(n.push(a),a=[])}var s=e({polygonStart:i,polygonEnd:o,lineStart:i,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&a.push([l,u])},sphere:function(){}});return!t&&s.polygonStart(),L(r,function(l){s.lineStart();for(var u=0;u<l.length;u++)s.point(l[u][0],l[u][1]);s.lineEnd()}),!t&&s.polygonEnd(),n}var kO=OX,RX=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a,i){if(!(i&&i.type==="mapToggleSelect"&&i.from===this.uid)){var o=this.group;if(o.removeAll(),!t.getHostGeoModel()){if(this._mapDraw&&i&&i.type==="geoRoam"&&this._mapDraw.resetForLabelLayout(),i&&i.type==="geoRoam"&&i.componentType==="series"&&i.seriesId===t.id){var s=this._mapDraw;s&&o.add(s.group)}else if(t.needsDrawMap){var s=this._mapDraw||new kO(a);o.add(s.group),s.draw(t,n,a,this,i),this._mapDraw=s}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&n.getComponent("legend")&&this._renderSymbols(t,n,a)}}},e.prototype.remove=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},e.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},e.prototype._renderSymbols=function(t,n,a){var i=t.originalData,o=this.group;i.each(i.mapDimension("value"),function(s,l){if(!isNaN(s)){var u=i.getItemLayout(l);if(!(!u||!u.point)){var c=u.point,f=u.offset,h=new ha({style:{fill:t.getData().getVisual("style").fill},shape:{cx:c[0]+f*9,cy:c[1],r:3},silent:!0,z2:8+(f?0:zl+1)});if(!f){var v=t.mainSeries.getData(),d=i.getName(l),p=v.indexOfName(d),g=i.getItemModel(l),y=g.getModel("label"),m=v.getItemGraphicEl(p);yr(h,rr(g),{labelFetcher:{getFormattedLabel:function(_,b){return t.getFormattedLabel(p,b)}},defaultText:d}),h.disableLabelAnimation=!0,y.get("position")||h.setTextConfig({position:"bottom"}),m.onHoverStateChange=function(_){gd(h,_)}}o.add(h)}}})},e.type="map",e}(ut),NX=RX,kX=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.needsDrawMap=!1,t.seriesGroup=[],t.getTooltipPosition=function(n){if(n!=null){var a=this.getData().getName(n),i=this.coordinateSystem,o=i.getRegion(a);return o&&i.dataToPoint(o.getCenter())}},t}return e.prototype.getInitialData=function(t){for(var n=mu(this,{coordDimensions:["value"],encodeDefaulter:Ae(F_,this)}),a=ge(),i=[],o=0,s=n.count();o<s;o++){var l=n.getName(o);a.set(l,!0)}var u=_i.load(this.getMapType(),this.option.nameMap,this.option.nameProperty);return L(u.regions,function(c){var f=c.name;a.get(f)||i.push(f)}),n.appendValues([],i),n},e.prototype.getHostGeoModel=function(){var t=this.option.geoIndex;return t!=null?this.ecModel.getComponent("geo",t):null},e.prototype.getMapType=function(){return(this.getHostGeoModel()||this).option.map},e.prototype.getRawValue=function(t){var n=this.getData();return n.get(n.mapDimension("value"),t)},e.prototype.getRegionModel=function(t){var n=this.getData();return n.getItemModel(n.indexOfName(t))},e.prototype.formatTooltip=function(t,n,a){for(var i=this.getData(),o=this.getRawValue(t),s=i.getName(t),l=this.seriesGroup,u=[],c=0;c<l.length;c++){var f=l[c].originalData.indexOfName(s),h=i.mapDimension("value");isNaN(l[c].originalData.get(h,f))||u.push(l[c].name)}return nr("section",{header:u.join(", "),noHeader:!u.length,blocks:[nr("nameValue",{name:s,value:o})]})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.getLegendIcon=function(t){var n=t.icon||"roundRect",a=kt(n,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill);return a.setStyle(t.itemStyle),a.style.stroke="none",n.indexOf("empty")>-1&&(a.style.stroke=a.style.fill,a.style.fill="#fff",a.style.lineWidth=2),a},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},e}(yt),BX=kX;function zX(r,e){var t={};return L(r,function(n){n.each(n.mapDimension("value"),function(a,i){var o="ec-"+n.getName(i);t[o]=t[o]||[],isNaN(a)||t[o].push(a)})}),r[0].map(r[0].mapDimension("value"),function(n,a){for(var i="ec-"+r[0].getName(a),o=0,s=1/0,l=-1/0,u=t[i].length,c=0;c<u;c++)s=Math.min(s,t[i][c]),l=Math.max(l,t[i][c]),o+=t[i][c];var f;return e==="min"?f=s:e==="max"?f=l:e==="average"?f=o/u:f=o,u===0?NaN:f})}function FX(r){var e={};r.eachSeriesByType("map",function(t){var n=t.getHostGeoModel(),a=n?"o"+n.id:"i"+t.getMapType();(e[a]=e[a]||[]).push(t)}),L(e,function(t,n){for(var a=zX(J(t,function(o){return o.getData()}),t[0].get("mapValueCalculation")),i=0;i<t.length;i++)t[i].originalData=t[i].getData();for(var i=0;i<t.length;i++)t[i].seriesGroup=t,t[i].needsDrawMap=i===0&&!t[i].getHostGeoModel(),t[i].setData(a.cloneShallow()),t[i].mainSeries=t[0]})}function VX(r){var e={};r.eachSeriesByType("map",function(t){var n=t.getMapType();if(!(t.getHostGeoModel()||e[n])){var a={};L(t.seriesGroup,function(o){var s=o.coordinateSystem,l=o.originalData;o.get("showLegendSymbol")&&r.getComponent("legend")&&l.each(l.mapDimension("value"),function(u,c){var f=l.getName(c),h=s.getRegion(f);if(!(!h||isNaN(u))){var v=a[f]||0,d=s.dataToPoint(h.getCenter());a[f]=v+1,l.setItemLayout(c,{point:d,offset:v})}})});var i=t.getData();i.each(function(o){var s=i.getName(o),l=i.getItemLayout(o)||{};l.showLabel=!a[s],i.setItemLayout(o,l)}),e[n]=!0}})}var BO=sr,$X=function(r){j(e,r);function e(t){var n=r.call(this)||this;return n.type="view",n.dimensions=["x","y"],n._roamTransformable=new li,n._rawTransformable=new li,n.name=t,n}return e.prototype.setBoundingRect=function(t,n,a,i){return this._rect=new Re(t,n,a,i),this._rect},e.prototype.getBoundingRect=function(){return this._rect},e.prototype.setViewRect=function(t,n,a,i){this._transformTo(t,n,a,i),this._viewRect=new Re(t,n,a,i)},e.prototype._transformTo=function(t,n,a,i){var o=this.getBoundingRect(),s=this._rawTransformable;s.transform=o.calculateTransform(new Re(t,n,a,i));var l=s.parent;s.parent=null,s.decomposeTransform(),s.parent=l,this._updateTransform()},e.prototype.setCenter=function(t,n){!t||(this._center=[le(t[0],n.getWidth()),le(t[1],n.getHeight())],this._updateCenterAndZoom())},e.prototype.setZoom=function(t){t=t||1;var n=this.zoomLimit;n&&(n.max!=null&&(t=Math.min(n.max,t)),n.min!=null&&(t=Math.max(n.min,t))),this._zoom=t,this._updateCenterAndZoom()},e.prototype.getDefaultCenter=function(){var t=this.getBoundingRect(),n=t.x+t.width/2,a=t.y+t.height/2;return[n,a]},e.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},e.prototype.getZoom=function(){return this._zoom||1},e.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},e.prototype._updateCenterAndZoom=function(){var t=this._rawTransformable.getLocalTransform(),n=this._roamTransformable,a=this.getDefaultCenter(),i=this.getCenter(),o=this.getZoom();i=sr([],i,t),a=sr([],a,t),n.originX=i[0],n.originY=i[1],n.x=a[0]-i[0],n.y=a[1]-i[1],n.scaleX=n.scaleY=o,this._updateTransform()},e.prototype._updateTransform=function(){var t=this._roamTransformable,n=this._rawTransformable;n.parent=t,t.updateTransform(),n.updateTransform(),Pv(this.transform||(this.transform=[]),n.transform||gn()),this._rawTransform=n.getLocalTransform(),this.invTransform=this.invTransform||[],Yo(this.invTransform,this.transform),this.decomposeTransform()},e.prototype.getTransformInfo=function(){var t=this._rawTransformable,n=this._roamTransformable,a=new li;return a.transform=n.transform,a.decomposeTransform(),{roam:{x:a.x,y:a.y,scaleX:a.scaleX,scaleY:a.scaleY},raw:{x:t.x,y:t.y,scaleX:t.scaleX,scaleY:t.scaleY}}},e.prototype.getViewRect=function(){return this._viewRect},e.prototype.getViewRectAfterRoam=function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},e.prototype.dataToPoint=function(t,n,a){var i=n?this._rawTransform:this.transform;return a=a||[],i?BO(a,t,i):Mr(a,t)},e.prototype.pointToData=function(t){var n=this.invTransform;return n?BO([],t,n):[t[0],t[1]]},e.prototype.convertToPixel=function(t,n,a){var i=zO(n);return i===this?i.dataToPoint(a):null},e.prototype.convertFromPixel=function(t,n,a){var i=zO(n);return i===this?i.pointToData(a):null},e.prototype.containPoint=function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])},e.dimensions=["x","y"],e}(li);function zO(r){var e=r.seriesModel;return e?e.coordinateSystem:null}var Zf=$X,HX={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},FO=["lng","lat"],VO=function(r){j(e,r);function e(t,n,a){var i=r.call(this,t)||this;i.dimensions=FO,i.type="geo",i._nameCoordMap=ge(),i.map=n;var o=a.projection,s=_i.load(n,a.nameMap,a.nameProperty),l=_i.getGeoResource(n);i.resourceType=l?l.type:null;var u=i.regions=s.regions,c=HX[l.type];i._regionsMap=s.regionsMap,i.regions=s.regions,i.projection=o;var f;if(o)for(var h=0;h<u.length;h++){var v=u[h].getBoundingRect(o);f=f||v.clone(),f.union(v)}else f=s.boundingRect;return i.setBoundingRect(f.x,f.y,f.width,f.height),i.aspectScale=o?1:Ee(a.aspectScale,c.aspectScale),i._invertLongitute=o?!1:c.invertLongitute,i}return e.prototype._transformTo=function(t,n,a,i){var o=this.getBoundingRect(),s=this._invertLongitute;o=o.clone(),s&&(o.y=-o.y-o.height);var l=this._rawTransformable;l.transform=o.calculateTransform(new Re(t,n,a,i));var u=l.parent;l.parent=null,l.decomposeTransform(),l.parent=u,s&&(l.scaleY=-l.scaleY),this._updateTransform()},e.prototype.getRegion=function(t){return this._regionsMap.get(t)},e.prototype.getRegionByCoord=function(t){for(var n=this.regions,a=0;a<n.length;a++){var i=n[a];if(i.type==="geoJSON"&&i.contain(t))return n[a]}},e.prototype.addGeoCoord=function(t,n){this._nameCoordMap.set(t,n)},e.prototype.getGeoCoord=function(t){var n=this._regionsMap.get(t);return this._nameCoordMap.get(t)||n&&n.getCenter()},e.prototype.dataToPoint=function(t,n,a){if(ce(t)&&(t=this.getGeoCoord(t)),t){var i=this.projection;return i&&(t=i.project(t)),t&&this.projectedToPoint(t,n,a)}},e.prototype.pointToData=function(t){var n=this.projection;return n&&(t=n.unproject(t)),t&&this.pointToProjected(t)},e.prototype.pointToProjected=function(t){return r.prototype.pointToData.call(this,t)},e.prototype.projectedToPoint=function(t,n,a){return r.prototype.dataToPoint.call(this,t,n,a)},e.prototype.convertToPixel=function(t,n,a){var i=$O(n);return i===this?i.dataToPoint(a):null},e.prototype.convertFromPixel=function(t,n,a){var i=$O(n);return i===this?i.pointToData(a):null},e}(Zf);Et(VO,Zf);function $O(r){var e=r.geoModel,t=r.seriesModel;return e?e.coordinateSystem:t?t.coordinateSystem||(t.getReferringComponents("geo",$t).models[0]||{}).coordinateSystem:null}var HO=VO;function GO(r,e){var t=r.get("boundingCoords");if(t!=null){var n=t[0],a=t[1];if(isFinite(n[0])&&isFinite(n[1])&&isFinite(a[0])&&isFinite(a[1])){var i=this.projection;if(i){var o=n[0],s=n[1],l=a[0],u=a[1];n=[1/0,1/0],a=[-1/0,-1/0];var c=function(x,S,T,D){for(var M=T-x,A=D-S,I=0;I<=100;I++){var P=I/100,E=i.project([x+M*P,S+A*P]);ai(n,n,E),ii(a,a,E)}};c(o,s,l,s),c(l,s,l,u),c(l,u,o,u),c(o,u,l,s)}this.setBoundingRect(n[0],n[1],a[0]-n[0],a[1]-n[1])}}var f=this.getBoundingRect(),h=r.get("layoutCenter"),v=r.get("layoutSize"),d=e.getWidth(),p=e.getHeight(),g=f.width/f.height*this.aspectScale,y=!1,m,_;h&&v&&(m=[le(h[0],d),le(h[1],p)],_=le(v,Math.min(d,p)),!isNaN(m[0])&&!isNaN(m[1])&&!isNaN(_)&&(y=!0));var b;if(y)b={},g>1?(b.width=_,b.height=_/g):(b.height=_,b.width=_*g),b.y=m[1]-b.height/2,b.x=m[0]-b.width/2;else{var w=r.getBoxLayoutParams();w.aspect=g,b=Ht(w,{width:d,height:p})}this.setViewRect(b.x,b.y,b.width,b.height),this.setCenter(r.get("center"),e),this.setZoom(r.get("zoom"))}function GX(r,e){L(e.get("geoCoord"),function(t,n){r.addGeoCoord(n,t)})}var WX=function(){function r(){this.dimensions=FO}return r.prototype.create=function(e,t){var n=[];function a(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}e.eachComponent("geo",function(o,s){var l=o.get("map"),u=new HO(l+s,l,Q({nameMap:o.get("nameMap")},a(o)));u.zoomLimit=o.get("scaleLimit"),n.push(u),o.coordinateSystem=u,u.model=o,u.resize=GO,u.resize(o,t)}),e.eachSeries(function(o){var s=o.get("coordinateSystem");if(s==="geo"){var l=o.get("geoIndex")||0;o.coordinateSystem=n[l]}});var i={};return e.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();i[s]=i[s]||[],i[s].push(o)}}),L(i,function(o,s){var l=J(o,function(c){return c.get("nameMap")}),u=new HO(s,s,Q({nameMap:Tv(l)},a(o[0])));u.zoomLimit=Jt.apply(null,J(o,function(c){return c.get("scaleLimit")})),n.push(u),u.resize=GO,u.resize(o[0],t),L(o,function(c){c.coordinateSystem=u,GX(u,c)})}),n},r.prototype.getFilledRegions=function(e,t,n,a){for(var i=(e||[]).slice(),o=ge(),s=0;s<i.length;s++)o.set(i[s].name,i[s]);var l=_i.load(t,n,a);return L(l.regions,function(u){var c=u.name;!o.get(c)&&i.push({name:c})}),i},r}(),UX=new WX,WO=UX,jX=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n,a){var i=_i.getGeoResource(t.map);if(i&&i.type==="geoJSON"){var o=t.itemStyle=t.itemStyle||{};"color"in o||(o.color="#eee")}this.mergeDefaultAndTheme(t,a),rs(t,"label",["show"])},e.prototype.optionUpdated=function(){var t=this,n=this.option;n.regions=WO.getFilledRegions(n.regions,n.map,n.nameMap,n.nameProperty);var a={};this._optionModelMap=Pn(n.regions||[],function(i,o){var s=o.name;return s&&(i.set(s,new lt(o,t,t.ecModel)),o.selected&&(a[s]=!0)),i},ge()),n.selectedMap||(n.selectedMap=a)},e.prototype.getRegionModel=function(t){return this._optionModelMap.get(t)||new lt(null,this,this.ecModel)},e.prototype.getFormattedLabel=function(t,n){var a=this.getRegionModel(t),i=n==="normal"?a.get(["label","formatter"]):a.get(["emphasis","label","formatter"]),o={name:t};if(ye(i))return o.status=n,i(o);if(ce(i))return i.replace("{a}",t!=null?t:"")},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.select=function(t){var n=this.option,a=n.selectedMode;if(!!a){a!=="multiple"&&(n.selectedMap=null);var i=n.selectedMap||(n.selectedMap={});i[t]=!0}},e.prototype.unSelect=function(t){var n=this.option.selectedMap;n&&(n[t]=!1)},e.prototype.toggleSelected=function(t){this[this.isSelected(t)?"unSelect":"select"](t)},e.prototype.isSelected=function(t){var n=this.option.selectedMap;return!!(n&&n[t])},e.type="geo",e.layoutMode="box",e.defaultOption={z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},e}($e),YX=jX;function UO(r,e){return r.pointToProjected?r.pointToProjected(e):r.pointToData(e)}function kb(r,e,t,n){var a=r.getZoom(),i=r.getCenter(),o=e.zoom,s=r.projectedToPoint?r.projectedToPoint(i):r.dataToPoint(i);if(e.dx!=null&&e.dy!=null&&(s[0]-=e.dx,s[1]-=e.dy,r.setCenter(UO(r,s),n)),o!=null){if(t){var l=t.min||0,u=t.max||1/0;o=Math.max(Math.min(a*o,u),l)/a}r.scaleX*=o,r.scaleY*=o;var c=(e.originX-r.x)*(o-1),f=(e.originY-r.y)*(o-1);r.x-=c,r.y-=f,r.updateTransform(),r.setCenter(UO(r,s),n),r.setZoom(o*a)}return{center:r.getCenter(),zoom:r.getZoom()}}var qX=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.focusBlurEnabled=!0,t}return e.prototype.init=function(t,n){this._api=n},e.prototype.render=function(t,n,a,i){if(this._model=t,!t.get("show")){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;return}this._mapDraw||(this._mapDraw=new kO(a));var o=this._mapDraw;o.draw(t,n,a,this,i),o.group.on("click",this._handleRegionClick,this),o.group.silent=t.get("silent"),this.group.add(o.group),this.updateSelectStatus(t,n,a)},e.prototype._handleRegionClick=function(t){var n;As(t.target,function(a){return(n=Me(a).eventData)!=null},!0),n&&this._api.dispatchAction({type:"geoToggleSelect",geoId:this._model.id,name:n.name})},e.prototype.updateSelectStatus=function(t,n,a){var i=this;this._mapDraw.group.traverse(function(o){var s=Me(o).eventData;if(s)return i._model.isSelected(s.name)?a.enterSelect(o):a.leaveSelect(o),!0})},e.prototype.findHighDownDispatchers=function(t){return this._mapDraw&&this._mapDraw.findHighDownDispatchers(t,this._model)},e.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove()},e.type="geo",e}(wt),ZX=qX;function XX(r,e,t){_i.registerMap(r,e,t)}function jO(r){r.registerCoordinateSystem("geo",WO),r.registerComponentModel(YX),r.registerComponentView(ZX),r.registerImpl("registerMap",XX),r.registerImpl("getMap",function(t){return _i.getMapForUser(t)});function e(t,n){n.update="geo:updateSelectStatus",r.registerAction(n,function(a,i){var o={},s=[];return i.eachComponent({mainType:"geo",query:a},function(l){l[t](a.name);var u=l.coordinateSystem;L(u.regions,function(f){o[f.name]=l.isSelected(f.name)||!1});var c=[];L(o,function(f,h){o[h]&&c.push(h)}),s.push({geoIndex:l.componentIndex,name:c})}),{selected:o,allSelected:s,name:a.name}})}e("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),e("select",{type:"geoSelect",event:"geoselected"}),e("unSelect",{type:"geoUnSelect",event:"geounselected"}),r.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(t,n,a){var i=t.componentType||"series";n.eachComponent({mainType:i,query:t},function(o){var s=o.coordinateSystem;if(s.type==="geo"){var l=kb(s,t,o.get("scaleLimit"),a);o.setCenter&&o.setCenter(l.center),o.setZoom&&o.setZoom(l.zoom),i==="series"&&L(o.seriesGroup,function(u){u.setCenter(l.center),u.setZoom(l.zoom)})}})})}function QX(r){ke(jO),r.registerChartView(NX),r.registerSeriesModel(BX),r.registerLayout(VX),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,FX),WL("map",r.registerAction)}function KX(r){var e=r;e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var t=[e],n,a;n=t.pop();)if(a=n.children,n.isExpand&&a.length)for(var i=a.length,o=i-1;o>=0;o--){var s=a[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},t.push(s)}}function JX(r,e){var t=r.isExpand?r.children:[],n=r.parentNode.children,a=r.hierNode.i?n[r.hierNode.i-1]:null;if(t.length){rQ(r);var i=(t[0].hierNode.prelim+t[t.length-1].hierNode.prelim)/2;a?(r.hierNode.prelim=a.hierNode.prelim+e(r,a),r.hierNode.modifier=r.hierNode.prelim-i):r.hierNode.prelim=i}else a&&(r.hierNode.prelim=a.hierNode.prelim+e(r,a));r.parentNode.hierNode.defaultAncestor=nQ(r,a,r.parentNode.hierNode.defaultAncestor||n[0],e)}function eQ(r){var e=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:e},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function YO(r){return arguments.length?r:oQ}function Xf(r,e){return r-=Math.PI/2,{x:e*Math.cos(r),y:e*Math.sin(r)}}function tQ(r,e){return Ht(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function rQ(r){for(var e=r.children,t=e.length,n=0,a=0;--t>=0;){var i=e[t];i.hierNode.prelim+=n,i.hierNode.modifier+=n,a+=i.hierNode.change,n+=i.hierNode.shift+a}}function nQ(r,e,t,n){if(e){for(var a=r,i=r,o=i.parentNode.children[0],s=e,l=a.hierNode.modifier,u=i.hierNode.modifier,c=o.hierNode.modifier,f=s.hierNode.modifier;s=Bb(s),i=zb(i),s&&i;){a=Bb(a),o=zb(o),a.hierNode.ancestor=r;var h=s.hierNode.prelim+f-i.hierNode.prelim-u+n(s,i);h>0&&(iQ(aQ(s,r,t),r,h),u+=h,l+=h),f+=s.hierNode.modifier,u+=i.hierNode.modifier,l+=a.hierNode.modifier,c+=o.hierNode.modifier}s&&!Bb(a)&&(a.hierNode.thread=s,a.hierNode.modifier+=f-l),i&&!zb(o)&&(o.hierNode.thread=i,o.hierNode.modifier+=u-c,t=r)}return t}function Bb(r){var e=r.children;return e.length&&r.isExpand?e[e.length-1]:r.hierNode.thread}function zb(r){var e=r.children;return e.length&&r.isExpand?e[0]:r.hierNode.thread}function aQ(r,e,t){return r.hierNode.ancestor.parentNode===e.parentNode?r.hierNode.ancestor:t}function iQ(r,e,t){var n=t/(e.hierNode.i-r.hierNode.i);e.hierNode.change-=n,e.hierNode.shift+=t,e.hierNode.modifier+=t,e.hierNode.prelim+=t,r.hierNode.change+=n}function oQ(r,e){return r.parentNode===e.parentNode?1:2}var sQ=function(){function r(){this.parentPoint=[],this.childPoints=[]}return r}(),lQ=function(r){j(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new sQ},e.prototype.buildPath=function(t,n){var a=n.childPoints,i=a.length,o=n.parentPoint,s=a[0],l=a[i-1];if(i===1){t.moveTo(o[0],o[1]),t.lineTo(s[0],s[1]);return}var u=n.orient,c=u==="TB"||u==="BT"?0:1,f=1-c,h=le(n.forkPosition,1),v=[];v[c]=o[c],v[f]=o[f]+(l[f]-o[f])*h,t.moveTo(o[0],o[1]),t.lineTo(v[0],v[1]),t.moveTo(s[0],s[1]),v[c]=s[c],t.lineTo(v[0],v[1]),v[c]=l[c],t.lineTo(v[0],v[1]),t.lineTo(l[0],l[1]);for(var d=1;d<i-1;d++){var p=a[d];t.moveTo(p[0],p[1]),v[c]=p[c],t.lineTo(v[0],v[1])}},e}(Be),uQ=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._mainGroup=new Te,t}return e.prototype.init=function(t,n){this._controller=new Yf(n.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(t,n,a){var i=t.getData(),o=t.layoutInfo,s=this._mainGroup,l=t.get("layout");l==="radial"?(s.x=o.x+o.width/2,s.y=o.y+o.height/2):(s.x=o.x,s.y=o.y),this._updateViewCoordSys(t,a),this._updateController(t,n,a);var u=this._data;i.diff(u).add(function(c){qO(i,c)&&ZO(i,c,null,s,t)}).update(function(c,f){var h=u.getItemGraphicEl(f);if(!qO(i,c)){h&&KO(u,f,h,s,t);return}ZO(i,c,h,s,t)}).remove(function(c){var f=u.getItemGraphicEl(c);f&&KO(u,c,f,s,t)}).execute(),this._nodeScaleRatio=t.get("nodeScaleRatio"),this._updateNodeAndLinkScale(t),t.get("expandAndCollapse")===!0&&i.eachItemGraphicEl(function(c,f){c.off("click").on("click",function(){a.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:f})})}),this._data=i},e.prototype._updateViewCoordSys=function(t,n){var a=t.getData(),i=[];a.each(function(f){var h=a.getItemLayout(f);h&&!isNaN(h.x)&&!isNaN(h.y)&&i.push([+h.x,+h.y])});var o=[],s=[];cd(i,o,s);var l=this._min,u=this._max;s[0]-o[0]===0&&(o[0]=l?l[0]:o[0]-1,s[0]=u?u[0]:s[0]+1),s[1]-o[1]===0&&(o[1]=l?l[1]:o[1]-1,s[1]=u?u[1]:s[1]+1);var c=t.coordinateSystem=new Zf;c.zoomLimit=t.get("scaleLimit"),c.setBoundingRect(o[0],o[1],s[0]-o[0],s[1]-o[1]),c.setCenter(t.get("center"),n),c.setZoom(t.get("zoom")),this.group.attr({x:c.x,y:c.y,scaleX:c.scaleX,scaleY:c.scaleY}),this._min=o,this._max=s},e.prototype._updateController=function(t,n,a){var i=this,o=this._controller,s=this._controllerHost,l=this.group;o.setPointerChecker(function(u,c,f){var h=l.getBoundingRect();return h.applyTransform(l.transform),h.contain(c,f)&&!$p(u,a,t)}),o.enable(t.get("roam")),s.zoomLimit=t.get("scaleLimit"),s.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){Ib(s,u.dx,u.dy),a.dispatchAction({seriesId:t.id,type:"treeRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){Pb(s,u.scale,u.originX,u.originY),a.dispatchAction({seriesId:t.id,type:"treeRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),i._updateNodeAndLinkScale(t),a.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(t){var n=t.getData(),a=this._getNodeGlobalScale(t);n.eachItemGraphicEl(function(i,o){i.setSymbolScale(a)})},e.prototype._getNodeGlobalScale=function(t){var n=t.coordinateSystem;if(n.type!=="view")return 1;var a=this._nodeScaleRatio,i=n.scaleX||1,o=n.getZoom(),s=(o-1)*a+1;return s/i},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype.remove=function(){this._mainGroup.removeAll(),this._data=null},e.type="tree",e}(ut);function qO(r,e){var t=r.getItemLayout(e);return t&&!isNaN(t.x)&&!isNaN(t.y)}function ZO(r,e,t,n,a){var i=!t,o=r.tree.getNodeByDataIndex(e),s=o.getModel(),l=o.getVisual("style").fill,u=o.isExpand===!1&&o.children.length!==0?l:"#fff",c=r.tree.root,f=o.parentNode===c?o:o.parentNode||o,h=r.getItemGraphicEl(f.dataIndex),v=f.getLayout(),d=h?{x:h.__oldX,y:h.__oldY,rawX:h.__radialOldRawX,rawY:h.__radialOldRawY}:v,p=o.getLayout();i?(t=new Vf(r,e,null,{symbolInnerColor:u,useNameLabel:!0}),t.x=d.x,t.y=d.y):t.updateData(r,e,null,{symbolInnerColor:u,useNameLabel:!0}),t.__radialOldRawX=t.__radialRawX,t.__radialOldRawY=t.__radialRawY,t.__radialRawX=p.rawX,t.__radialRawY=p.rawY,n.add(t),r.setItemGraphicEl(e,t),t.__oldX=t.x,t.__oldY=t.y,qe(t,{x:p.x,y:p.y},a);var g=t.getSymbolPath();if(a.get("layout")==="radial"){var y=c.children[0],m=y.getLayout(),_=y.children.length,b=void 0,w=void 0;if(p.x===m.x&&o.isExpand===!0&&y.children.length){var x={x:(y.children[0].getLayout().x+y.children[_-1].getLayout().x)/2,y:(y.children[0].getLayout().y+y.children[_-1].getLayout().y)/2};b=Math.atan2(x.y-m.y,x.x-m.x),b<0&&(b=Math.PI*2+b),w=x.x<m.x,w&&(b=b-Math.PI)}else b=Math.atan2(p.y-m.y,p.x-m.x),b<0&&(b=Math.PI*2+b),o.children.length===0||o.children.length!==0&&o.isExpand===!1?(w=p.x<m.x,w&&(b=b-Math.PI)):(w=p.x>m.x,w||(b=b-Math.PI));var S=w?"left":"right",T=s.getModel("label"),D=T.get("rotate"),M=D*(Math.PI/180),A=g.getTextContent();A&&(g.setTextConfig({position:T.get("position")||S,rotation:D==null?-b:M,origin:"center"}),A.setStyle("verticalAlign","middle"))}var I=s.get(["emphasis","focus"]),P=I==="relative"?hc(o.getAncestorsIndices(),o.getDescendantIndices()):I==="ancestor"?o.getAncestorsIndices():I==="descendant"?o.getDescendantIndices():null;P&&(Me(t).focus=P),cQ(a,o,c,t,d,v,p,n),t.__edge&&(t.onHoverStateChange=function(E){if(E!=="blur"){var O=o.parentNode&&r.getItemGraphicEl(o.parentNode.dataIndex);O&&O.hoverState===Wc||gd(t.__edge,E)}})}function cQ(r,e,t,n,a,i,o,s){var l=e.getModel(),u=r.get("edgeShape"),c=r.get("layout"),f=r.getOrient(),h=r.get(["lineStyle","curveness"]),v=r.get("edgeForkPosition"),d=l.getModel("lineStyle").getLineStyle(),p=n.__edge;if(u==="curve")e.parentNode&&e.parentNode!==t&&(p||(p=n.__edge=new Jc({shape:Fb(c,f,h,a,a)})),qe(p,{shape:Fb(c,f,h,i,o)},r));else if(u==="polyline"&&c==="orthogonal"&&e!==t&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var g=e.children,y=[],m=0;m<g.length;m++){var _=g[m].getLayout();y.push([_.x,_.y])}p||(p=n.__edge=new lQ({shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]],orient:f,forkPosition:v}})),qe(p,{shape:{parentPoint:[o.x,o.y],childPoints:y}},r)}p&&!(u==="polyline"&&!e.isExpand)&&(p.useStyle(me({strokeNoScale:!0,fill:null},d)),gr(p,l,"lineStyle"),ps(p),s.add(p))}function XO(r,e,t,n,a){var i=e.tree.root,o=QO(i,r),s=o.source,l=o.sourceLayout,u=e.getItemGraphicEl(r.dataIndex);if(!!u){var c=e.getItemGraphicEl(s.dataIndex),f=c.__edge,h=u.__edge||(s.isExpand===!1||s.children.length===1?f:void 0),v=n.get("edgeShape"),d=n.get("layout"),p=n.get("orient"),g=n.get(["lineStyle","curveness"]);h&&(v==="curve"?ao(h,{shape:Fb(d,p,g,l,l),style:{opacity:0}},n,{cb:function(){t.remove(h)},removeOpt:a}):v==="polyline"&&n.get("layout")==="orthogonal"&&ao(h,{shape:{parentPoint:[l.x,l.y],childPoints:[[l.x,l.y]]},style:{opacity:0}},n,{cb:function(){t.remove(h)},removeOpt:a}))}}function QO(r,e){for(var t=e.parentNode===r?e:e.parentNode||e,n;n=t.getLayout(),n==null;)t=t.parentNode===r?t:t.parentNode||t;return{source:t,sourceLayout:n}}function KO(r,e,t,n,a){var i=r.tree.getNodeByDataIndex(e),o=r.tree.root,s=QO(o,i).sourceLayout,l={duration:a.get("animationDurationUpdate"),easing:a.get("animationEasingUpdate")};ao(t,{x:s.x+1,y:s.y+1},a,{cb:function(){n.remove(t),r.setItemGraphicEl(e,null)},removeOpt:l}),t.fadeOut(null,r.hostModel,{fadeLabel:!0,animation:l}),i.children.forEach(function(u){XO(u,r,n,a,l)}),XO(i,r,n,a,l)}function Fb(r,e,t,n,a){var i,o,s,l,u,c,f,h;if(r==="radial"){u=n.rawX,f=n.rawY,c=a.rawX,h=a.rawY;var v=Xf(u,f),d=Xf(u,f+(h-f)*t),p=Xf(c,h+(f-h)*t),g=Xf(c,h);return{x1:v.x||0,y1:v.y||0,x2:g.x||0,y2:g.y||0,cpx1:d.x||0,cpy1:d.y||0,cpx2:p.x||0,cpy2:p.y||0}}else u=n.x,f=n.y,c=a.x,h=a.y,(e==="LR"||e==="RL")&&(i=u+(c-u)*t,o=f,s=c+(u-c)*t,l=h),(e==="TB"||e==="BT")&&(i=u,o=f+(h-f)*t,s=c,l=h+(f-h)*t);return{x1:u,y1:f,x2:c,y2:h,cpx1:i,cpy1:o,cpx2:s,cpy2:l}}var fQ=uQ,qn=Ye();function JO(r){var e=r.mainData,t=r.datas;t||(t={main:e},r.datasAttr={main:"data"}),r.datas=r.mainData=null,eR(e,t,r),L(t,function(n){L(e.TRANSFERABLE_METHODS,function(a){n.wrapMethod(a,Ae(hQ,r))})}),e.wrapMethod("cloneShallow",Ae(dQ,r)),L(e.CHANGABLE_METHODS,function(n){e.wrapMethod(n,Ae(vQ,r))}),Dr(t[e.dataType]===e)}function hQ(r,e){if(yQ(this)){var t=Q({},qn(this).datas);t[this.dataType]=e,eR(e,t,r)}else Vb(e,this.dataType,qn(this).mainData,r);return e}function vQ(r,e){return r.struct&&r.struct.update(),e}function dQ(r,e){return L(qn(e).datas,function(t,n){t!==e&&Vb(t.cloneShallow(),n,e,r)}),e}function pQ(r){var e=qn(this).mainData;return r==null||e==null?e:qn(e).datas[r]}function gQ(){var r=qn(this).mainData;return r==null?[{data:r}]:J(Fe(qn(r).datas),function(e){return{type:e,data:qn(r).datas[e]}})}function yQ(r){return qn(r).mainData===r}function eR(r,e,t){qn(r).datas={},L(e,function(n,a){Vb(n,a,r,t)})}function Vb(r,e,t,n){qn(t).datas[e]=r,qn(r).mainData=t,r.dataType=e,n.struct&&(r[n.structAttr]=n.struct,n.struct[n.datasAttr[e]]=r),r.getLinkedData=pQ,r.getLinkedDataAll=gQ}var mQ=function(){function r(e,t){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=e||"",this.hostTree=t}return r.prototype.isRemoved=function(){return this.dataIndex<0},r.prototype.eachNode=function(e,t,n){ye(e)&&(n=t,t=e,e=null),e=e||{},ce(e)&&(e={order:e});var a=e.order||"preorder",i=this[e.attr||"children"],o;a==="preorder"&&(o=t.call(n,this));for(var s=0;!o&&s<i.length;s++)i[s].eachNode(e,t,n);a==="postorder"&&t.call(n,this)},r.prototype.updateDepthAndHeight=function(e){var t=0;this.depth=e;for(var n=0;n<this.children.length;n++){var a=this.children[n];a.updateDepthAndHeight(e+1),a.height>t&&(t=a.height)}this.height=t+1},r.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,n=this.children,a=n.length;t<a;t++){var i=n[t].getNodeById(e);if(i)return i}},r.prototype.contains=function(e){if(e===this)return!0;for(var t=0,n=this.children,a=n.length;t<a;t++){var i=n[t].contains(e);if(i)return i}},r.prototype.getAncestors=function(e){for(var t=[],n=e?this:this.parentNode;n;)t.push(n),n=n.parentNode;return t.reverse(),t},r.prototype.getAncestorsIndices=function(){for(var e=[],t=this;t;)e.push(t.dataIndex),t=t.parentNode;return e.reverse(),e},r.prototype.getDescendantIndices=function(){var e=[];return this.eachNode(function(t){e.push(t.dataIndex)}),e},r.prototype.getValue=function(e){var t=this.hostTree.data;return t.getStore().get(t.getDimensionIndex(e||"value"),this.dataIndex)},r.prototype.setLayout=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},r.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostTree,n=t.data.getItemModel(this.dataIndex);return n.getModel(e)}},r.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},r.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},r.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},r.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},r.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},r.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t<e.length;++t)if(e[t]===this)return t;return-1}return-1},r.prototype.isAncestorOf=function(e){for(var t=e.parentNode;t;){if(t===this)return!0;t=t.parentNode}return!1},r.prototype.isDescendantOf=function(e){return e!==this&&e.isAncestorOf(this)},r}(),_Q=function(){function r(e){this.type="tree",this._nodes=[],this.hostModel=e}return r.prototype.eachNode=function(e,t,n){this.root.eachNode(e,t,n)},r.prototype.getNodeByDataIndex=function(e){var t=this.data.getRawIndex(e);return this._nodes[t]},r.prototype.getNodeById=function(e){return this.root.getNodeById(e)},r.prototype.update=function(){for(var e=this.data,t=this._nodes,n=0,a=t.length;n<a;n++)t[n].dataIndex=-1;for(var n=0,a=e.count();n<a;n++)t[e.getRawIndex(n)].dataIndex=n},r.prototype.clearLayouts=function(){this.data.clearItemLayouts()},r.createTree=function(e,t,n){var a=new r(t),i=[],o=1;s(e);function s(c,f){var h=c.value;o=Math.max(o,K(h)?h.length:1),i.push(c);var v=new mQ(qt(c.name,""),a);f?bQ(v,f):a.root=v,a._nodes.push(v);var d=c.children;if(d)for(var p=0;p<d.length;p++)s(d[p],v)}a.root.updateDepthAndHeight(0);var l=hu(i,{coordDimensions:["value"],dimensionsCount:o}).dimensions,u=new Er(l,t);return u.initData(i),n&&n(u),JO({mainData:u,struct:a,structAttr:"tree"}),a.update(),a},r}();function bQ(r,e){var t=e.children;r.parentNode!==e&&(t.push(r),r.parentNode=e)}var $b=_Q;function Qf(r,e,t){if(r&&Ne(e,r.type)>=0){var n=t.getData().tree.root,a=r.targetNode;if(ce(a)&&(a=n.getNodeById(a)),a&&n.contains(a))return{node:a};var i=r.targetNodeId;if(i!=null&&(a=n.getNodeById(i)))return{node:a}}}function tR(r){for(var e=[];r;)r=r.parentNode,r&&e.push(r);return e.reverse()}function Hb(r,e){var t=tR(r);return Ne(t,e)>=0}function jp(r,e){for(var t=[];r;){var n=r.dataIndex;t.push({name:r.name,dataIndex:n,value:e.getRawValue(n)}),r=r.parentNode}return t.reverse(),t}var xQ=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t){var n={name:t.name,children:t.data},a=t.leaves||{},i=new lt(a,this,this.ecModel),o=$b.createTree(n,this,s);function s(f){f.wrapMethod("getItemModel",function(h,v){var d=o.getNodeByDataIndex(v);return d&&d.children.length&&d.isExpand||(h.parentModel=i),h})}var l=0;o.eachNode("preorder",function(f){f.depth>l&&(l=f.depth)});var u=t.expandAndCollapse,c=u&&t.initialTreeDepth>=0?t.initialTreeDepth:l;return o.root.eachNode("preorder",function(f){var h=f.hostTree.data.getRawDataItem(f.dataIndex);f.isExpand=h&&h.collapsed!=null?!h.collapsed:f.depth<=c}),o.data},e.prototype.getOrient=function(){var t=this.get("orient");return t==="horizontal"?t="LR":t==="vertical"&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,n,a){for(var i=this.getData().tree,o=i.root.children[0],s=i.getNodeByDataIndex(t),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return nr("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(t){var n=r.prototype.getDataParams.apply(this,arguments),a=this.getData().tree.getNodeByDataIndex(t);return n.treeAncestors=jp(a,this),n.collapsed=!a.isExpand,n},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(yt),wQ=xQ;function SQ(r,e,t){for(var n=[r],a=[],i;i=n.pop();)if(a.push(i),i.isExpand){var o=i.children;if(o.length)for(var s=0;s<o.length;s++)n.push(o[s])}for(;i=a.pop();)e(i,t)}function Kf(r,e){for(var t=[r],n;n=t.pop();)if(e(n),n.isExpand){var a=n.children;if(a.length)for(var i=a.length-1;i>=0;i--)t.push(a[i])}}function CQ(r,e){r.eachSeriesByType("tree",function(t){TQ(t,e)})}function TQ(r,e){var t=tQ(r,e);r.layoutInfo=t;var n=r.get("layout"),a=0,i=0,o=null;n==="radial"?(a=2*Math.PI,i=Math.min(t.height,t.width)/2,o=YO(function(_,b){return(_.parentNode===b.parentNode?1:2)/_.depth})):(a=t.width,i=t.height,o=YO());var s=r.getData().tree.root,l=s.children[0];if(l){KX(s),SQ(l,JX,o),s.hierNode.modifier=-l.hierNode.prelim,Kf(l,eQ);var u=l,c=l,f=l;Kf(l,function(_){var b=_.getLayout().x;b<u.getLayout().x&&(u=_),b>c.getLayout().x&&(c=_),_.depth>f.depth&&(f=_)});var h=u===c?1:o(u,c)/2,v=h-u.getLayout().x,d=0,p=0,g=0,y=0;if(n==="radial")d=a/(c.getLayout().x+h+v),p=i/(f.depth-1||1),Kf(l,function(_){g=(_.getLayout().x+v)*d,y=(_.depth-1)*p;var b=Xf(g,y);_.setLayout({x:b.x,y:b.y,rawX:g,rawY:y},!0)});else{var m=r.getOrient();m==="RL"||m==="LR"?(p=i/(c.getLayout().x+h+v),d=a/(f.depth-1||1),Kf(l,function(_){y=(_.getLayout().x+v)*p,g=m==="LR"?(_.depth-1)*d:a-(_.depth-1)*d,_.setLayout({x:g,y},!0)})):(m==="TB"||m==="BT")&&(d=a/(c.getLayout().x+h+v),p=i/(f.depth-1||1),Kf(l,function(_){g=(_.getLayout().x+v)*d,y=m==="TB"?(_.depth-1)*p:i-(_.depth-1)*p,_.setLayout({x:g,y},!0)}))}}}function DQ(r){r.eachSeriesByType("tree",function(e){var t=e.getData(),n=t.tree;n.eachNode(function(a){var i=a.getModel(),o=i.getModel("itemStyle").getItemStyle(),s=t.ensureUniqueItemVisual(a.dataIndex,"style");Q(s,o)})})}function MQ(r){r.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(n){var a=e.dataIndex,i=n.getData().tree,o=i.getNodeByDataIndex(a);o.isExpand=!o.isExpand})}),r.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,t,n){t.eachComponent({mainType:"series",subType:"tree",query:e},function(a){var i=a.coordinateSystem,o=kb(i,e,void 0,n);a.setCenter&&a.setCenter(o.center),a.setZoom&&a.setZoom(o.zoom)})})}function AQ(r){r.registerChartView(fQ),r.registerSeriesModel(wQ),r.registerLayout(CQ),r.registerVisual(DQ),MQ(r)}var rR=["treemapZoomToNode","treemapRender","treemapMove"];function LQ(r){for(var e=0;e<rR.length;e++)r.registerAction({type:rR[e],update:"updateView"},Ot);r.registerAction({type:"treemapRootToNode",update:"updateView"},function(t,n){n.eachComponent({mainType:"series",subType:"treemap",query:t},a);function a(i,o){var s=["treemapZoomToNode","treemapRootToNode"],l=Qf(t,s,i);if(l){var u=i.getViewRoot();u&&(t.direction=Hb(u,l.node)?"rollUp":"drillDown"),i.resetViewRoot(l.node)}}})}function nR(r){var e=r.getData(),t=e.tree,n={};t.eachNode(function(a){for(var i=a;i&&i.depth>1;)i=i.parentNode;var o=G_(r.ecModel,i.name||i.dataIndex+"",n);a.setVisual("decal",o)})}var IQ=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventUsingHoverLayer=!0,t}return e.prototype.getInitialData=function(t,n){var a={name:t.name,children:t.data};aR(a);var i=t.levels||[],o=this.designatedVisualItemStyle={},s=new lt({itemStyle:o},this,n);i=t.levels=PQ(i,n);var l=J(i||[],function(f){return new lt(f,s,n)},this),u=$b.createTree(a,this,c);function c(f){f.wrapMethod("getItemModel",function(h,v){var d=u.getNodeByDataIndex(v),p=d?l[d.depth]:null;return h.parentModel=p||s,h})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,n,a){var i=this.getData(),o=this.getRawValue(t),s=i.getName(t);return nr("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(t){var n=r.prototype.getDataParams.apply(this,arguments),a=this.getData().tree.getNodeByDataIndex(t);return n.treeAncestors=jp(a,this),n.treePathInfo=n.treeAncestors,n},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},Q(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var n=this._idIndexMap;n||(n=this._idIndexMap=ge(),this._idIndexMapCount=0);var a=n.get(t);return a==null&&n.set(t,a=this._idIndexMapCount++),a},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var n=this.getRawData().tree.root;(!t||t!==n&&!n.contains(t))&&(this._viewRoot=n)},e.prototype.enableAriaDecal=function(){nR(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"\u25B6",zoomToNodeRatio:.32*.32,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(yt);function aR(r){var e=0;L(r.children,function(n){aR(n);var a=n.value;K(a)&&(a=a[0]),e+=a});var t=r.value;K(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),K(r.value)?r.value[0]=t:r.value=t}function PQ(r,e){var t=st(e.get("color")),n=st(e.get(["aria","decal","decals"]));if(!!t){r=r||[];var a,i;L(r,function(s){var l=new lt(s),u=l.get("color"),c=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(a=!0),(l.get(["itemStyle","decal"])||c&&c!=="none")&&(i=!0)});var o=r[0]||(r[0]={});return a||(o.color=t.slice()),!i&&n&&(o.decal=n.slice()),r}}var EQ=IQ,OQ=8,iR=8,Gb=5,RQ=function(){function r(e){this.group=new Te,e.add(this.group)}return r.prototype.render=function(e,t,n,a){var i=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!i.get("show")||!n)){var s=i.getModel("itemStyle"),l=i.getModel("emphasis"),u=s.getModel("textStyle"),c=l.getModel(["itemStyle","textStyle"]),f={pos:{left:i.get("left"),right:i.get("right"),top:i.get("top"),bottom:i.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:i.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,f,u),this._renderContent(e,f,s,l,u,c,a),Hd(o,f.pos,f.box)}},r.prototype._prepare=function(e,t,n){for(var a=e;a;a=a.parentNode){var i=qt(a.getModel().get("name"),""),o=n.getTextRect(i),s=Math.max(o.width+OQ*2,t.emptyItemWidth);t.totalWidth+=s+iR,t.renderList.push({node:a,text:i,width:s})}},r.prototype._renderContent=function(e,t,n,a,i,o,s){for(var l=0,u=t.emptyItemWidth,c=e.get(["breadcrumb","height"]),f=A7(t.pos,t.box),h=t.totalWidth,v=t.renderList,d=a.getModel("itemStyle").getItemStyle(),p=v.length-1;p>=0;p--){var g=v[p],y=g.node,m=g.width,_=g.text;h>f.width&&(h-=m-u,m=u,_=null);var b=new Gr({shape:{points:NQ(l,0,m,c,p===v.length-1,p===0)},style:me(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new We({style:gt(i,{text:_})}),textConfig:{position:"inside"},z2:zl*1e4,onclick:Ae(s,y)});b.disableLabelAnimation=!0,b.getTextContent().ensureState("emphasis").style=gt(o,{text:_}),b.ensureState("emphasis").style=d,Lt(b,a.get("focus"),a.get("blurScope"),a.get("disabled")),this.group.add(b),kQ(b,e,y),l+=m+iR}},r.prototype.remove=function(){this.group.removeAll()},r}();function NQ(r,e,t,n,a,i){var o=[[a?r:r-Gb,e],[r+t,e],[r+t,e+n],[a?r:r-Gb,e+n]];return!i&&o.splice(2,0,[r+t+Gb,e+n/2]),!a&&o.push([r,e+n/2]),o}function kQ(r,e,t){Me(r).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:t&&t.dataIndex,name:t&&t.name},treePathInfo:t&&jp(t,e)}}var BQ=RQ,zQ=function(){function r(){this._storage=[],this._elExistsMap={}}return r.prototype.add=function(e,t,n,a,i){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:n,delay:a,easing:i}),!0)},r.prototype.finished=function(e){return this._finishedCallback=e,this},r.prototype.start=function(){for(var e=this,t=this._storage.length,n=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},a=0,i=this._storage.length;a<i;a++){var o=this._storage[a];o.el.animateTo(o.target,{duration:o.duration,delay:o.delay,easing:o.easing,setToFinal:!0,done:n,aborted:n})}return this},r}();function FQ(){return new zQ}var Wb=Te,oR=Ge,sR=3,lR="label",uR="upperLabel",VQ=zl*10,$Q=zl*2,HQ=zl*3,js=is([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),cR=function(r){var e=js(r);return e.stroke=e.fill=e.lineWidth=null,e},Yp=Ye(),GQ=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._state="ready",t._storage=Jf(),t}return e.prototype.render=function(t,n,a,i){var o=n.findComponents({mainType:"series",subType:"treemap",query:i});if(!(Ne(o,t)<0)){this.seriesModel=t,this.api=a,this.ecModel=n;var s=["treemapZoomToNode","treemapRootToNode"],l=Qf(i,s,t),u=i&&i.type,c=t.layoutInfo,f=!this._oldTree,h=this._storage,v=u==="treemapRootToNode"&&l&&h?{rootNodeGroup:h.nodeGroup[l.node.getRawIndex()],direction:i.direction}:null,d=this._giveContainerGroup(c),p=t.get("animation"),g=this._doRender(d,t,v);p&&!f&&(!u||u==="treemapZoomToNode"||u==="treemapRootToNode")?this._doAnimation(d,g,t,v):g.renderFinally(),this._resetController(a),this._renderBreadcrumb(t,a,l)}},e.prototype._giveContainerGroup=function(t){var n=this._containerGroup;return n||(n=this._containerGroup=new Wb,this._initEvents(n),this.group.add(n)),n.x=t.x,n.y=t.y,n},e.prototype._doRender=function(t,n,a){var i=n.getData().tree,o=this._oldTree,s=Jf(),l=Jf(),u=this._storage,c=[];function f(g,y,m,_){return WQ(n,l,u,a,s,c,g,y,m,_)}v(i.root?[i.root]:[],o&&o.root?[o.root]:[],t,i===o||!o,0);var h=d(u);return this._oldTree=i,this._storage=l,{lastsForAnimation:s,willDeleteEls:h,renderFinally:p};function v(g,y,m,_,b){_?(y=g,L(g,function(S,T){!S.isRemoved()&&x(T,T)})):new pi(y,g,w,w).add(x).update(x).remove(Ae(x,null)).execute();function w(S){return S.getId()}function x(S,T){var D=S!=null?g[S]:null,M=T!=null?y[T]:null,A=f(D,M,m,b);A&&v(D&&D.viewChildren||[],M&&M.viewChildren||[],A,_,b+1)}}function d(g){var y=Jf();return g&&L(g,function(m,_){var b=y[_];L(m,function(w){w&&(b.push(w),Yp(w).willDelete=!0)})}),y}function p(){L(h,function(g){L(g,function(y){y.parent&&y.parent.remove(y)})}),L(c,function(g){g.invisible=!0,g.dirty()})}},e.prototype._doAnimation=function(t,n,a,i){var o=a.get("animationDurationUpdate"),s=a.get("animationEasing"),l=(ye(o)?0:o)||0,u=(ye(s)?null:s)||"cubicOut",c=FQ();L(n.willDeleteEls,function(f,h){L(f,function(v,d){if(!v.invisible){var p=v.parent,g,y=Yp(p);if(i&&i.direction==="drillDown")g=p===i.rootNodeGroup?{shape:{x:0,y:0,width:y.nodeWidth,height:y.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var m=0,_=0;y.willDelete||(m=y.nodeWidth/2,_=y.nodeHeight/2),g=h==="nodeGroup"?{x:m,y:_,style:{opacity:0}}:{shape:{x:m,y:_,width:0,height:0},style:{opacity:0}}}g&&c.add(v,g,l,0,u)}})}),L(this._storage,function(f,h){L(f,function(v,d){var p=n.lastsForAnimation[h][d],g={};!p||(v instanceof Te?p.oldX!=null&&(g.x=v.x,g.y=v.y,v.x=p.oldX,v.y=p.oldY):(p.oldShape&&(g.shape=Q({},v.shape),v.setShape(p.oldShape)),p.fadein?(v.setStyle("opacity",0),g.style={opacity:1}):v.style.opacity!==1&&(g.style={opacity:1})),c.add(v,g,l,0,u))})},this),this._state="animating",c.finished(fe(function(){this._state="ready",n.renderFinally()},this)).start()},e.prototype._resetController=function(t){var n=this._controller;n||(n=this._controller=new Yf(t.getZr()),n.enable(this.seriesModel.get("roam")),n.on("pan",fe(this._onPan,this)),n.on("zoom",fe(this._onZoom,this)));var a=new Re(0,0,t.getWidth(),t.getHeight());n.setPointerChecker(function(i,o,s){return a.contain(o,s)})},e.prototype._clearController=function(){var t=this._controller;t&&(t.dispose(),t=null)},e.prototype._onPan=function(t){if(this._state!=="animating"&&(Math.abs(t.dx)>sR||Math.abs(t.dy)>sR)){var n=this.seriesModel.getData().tree.root;if(!n)return;var a=n.getLayout();if(!a)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:a.x+t.dx,y:a.y+t.dy,width:a.width,height:a.height}})}},e.prototype._onZoom=function(t){var n=t.originX,a=t.originY;if(this._state!=="animating"){var i=this.seriesModel.getData().tree.root;if(!i)return;var o=i.getLayout();if(!o)return;var s=new Re(o.x,o.y,o.width,o.height),l=this.seriesModel.layoutInfo;n-=l.x,a-=l.y;var u=gn();oa(u,u,[-n,-a]),Ev(u,u,[t.scale,t.scale]),oa(u,u,[n,a]),s.applyTransform(u),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:s.x,y:s.y,width:s.width,height:s.height}})}},e.prototype._initEvents=function(t){var n=this;t.on("click",function(a){if(n._state==="ready"){var i=n.seriesModel.get("nodeClick",!0);if(!!i){var o=n.findTarget(a.offsetX,a.offsetY);if(!!o){var s=o.node;if(s.getLayout().isLeafRoot)n._rootToNode(o);else if(i==="zoomToNode")n._zoomToNode(o);else if(i==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),c=l.get("target",!0)||"blank";u&&Vd(u,c)}}}}},this)},e.prototype._renderBreadcrumb=function(t,n,a){var i=this;a||(a=t.get("leafDepth",!0)!=null?{node:t.getViewRoot()}:this.findTarget(n.getWidth()/2,n.getHeight()/2),a||(a={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new BQ(this.group))).render(t,n,a.node,function(o){i._state!=="animating"&&(Hb(t.getViewRoot(),o)?i._rootToNode({node:o}):i._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Jf(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,n){var a,i=this.seriesModel.getViewRoot();return i.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(t,n),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)a={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),a},e.type="treemap",e}(ut);function Jf(){return{nodeGroup:[],background:[],content:[]}}function WQ(r,e,t,n,a,i,o,s,l,u){if(!o)return;var c=o.getLayout(),f=r.getData(),h=o.getModel();if(f.setItemGraphicEl(o.dataIndex,null),!c||!c.isInView)return;var v=c.width,d=c.height,p=c.borderWidth,g=c.invisible,y=o.getRawIndex(),m=s&&s.getRawIndex(),_=o.viewChildren,b=c.upperHeight,w=_&&_.length,x=h.getModel("itemStyle"),S=h.getModel(["emphasis","itemStyle"]),T=h.getModel(["blur","itemStyle"]),D=h.getModel(["select","itemStyle"]),M=x.get("borderRadius")||0,A=X("nodeGroup",Wb);if(!A)return;if(l.add(A),A.x=c.x||0,A.y=c.y||0,A.markRedraw(),Yp(A).nodeWidth=v,Yp(A).nodeHeight=d,c.isAboveViewRoot)return A;var I=X("background",oR,u,$Q);I&&U(A,I,w&&c.upperLabelHeight);var P=h.getModel("emphasis"),E=P.get("focus"),O=P.get("blurScope"),N=P.get("disabled"),V=E==="ancestor"?o.getAncestorsIndices():E==="descendant"?o.getDescendantIndices():E;if(w)qc(A)&&gs(A,!1),I&&(gs(I,!N),f.setItemGraphicEl(o.dataIndex,I),u_(I,V,O));else{var $=X("content",oR,u,HQ);$&&Y(A,$),I.disableMorphing=!0,I&&qc(I)&&gs(I,!1),gs(A,!N),f.setItemGraphicEl(o.dataIndex,A),u_(A,V,O)}return A;function U(se,te,ve){var R=Me(te);if(R.dataIndex=o.dataIndex,R.seriesIndex=r.seriesIndex,te.setShape({x:0,y:0,width:v,height:d,r:M}),g)ae(te);else{te.invisible=!1;var F=o.getVisual("style"),G=F.stroke,re=cR(x);re.fill=G;var ne=js(S);ne.fill=S.get("borderColor");var ee=js(T);ee.fill=T.get("borderColor");var ue=js(D);if(ue.fill=D.get("borderColor"),ve){var De=v-2*p;H(te,G,F.opacity,{x:p,y:0,width:De,height:b})}else te.removeTextContent();te.setStyle(re),te.ensureState("emphasis").style=ne,te.ensureState("blur").style=ee,te.ensureState("select").style=ue,ps(te)}se.add(te)}function Y(se,te){var ve=Me(te);ve.dataIndex=o.dataIndex,ve.seriesIndex=r.seriesIndex;var R=Math.max(v-2*p,0),F=Math.max(d-2*p,0);if(te.culling=!0,te.setShape({x:p,y:p,width:R,height:F,r:M}),g)ae(te);else{te.invisible=!1;var G=o.getVisual("style"),re=G.fill,ne=cR(x);ne.fill=re,ne.decal=G.decal;var ee=js(S),ue=js(T),De=js(D);H(te,re,G.opacity,null),te.setStyle(ne),te.ensureState("emphasis").style=ee,te.ensureState("blur").style=ue,te.ensureState("select").style=De,ps(te)}se.add(te)}function ae(se){!se.invisible&&i.push(se)}function H(se,te,ve,R){var F=h.getModel(R?uR:lR),G=qt(h.get("name"),null),re=F.getShallow("show");yr(se,rr(h,R?uR:lR),{defaultText:re?G:null,inheritColor:te,defaultOpacity:ve,labelFetcher:r,labelDataIndex:o.dataIndex});var ne=se.getTextContent();if(!!ne){var ee=ne.style,ue=Av(ee.padding||0);R&&(se.setTextConfig({layoutRect:R}),ne.disableLabelLayout=!0),ne.beforeUpdate=function(){var vt=Math.max((R?R.width:se.shape.width)-ue[1]-ue[3],0),rt=Math.max((R?R.height:se.shape.height)-ue[0]-ue[2],0);(ee.width!==vt||ee.height!==rt)&&ne.setStyle({width:vt,height:rt})},ee.truncateMinChar=2,ee.lineOverflow="truncate",q(ee,R,c);var De=ne.getState("emphasis");q(De?De.style:null,R,c)}}function q(se,te,ve){var R=se?se.text:null;if(!te&&ve.isLeafRoot&&R!=null){var F=r.get("drillDownIcon",!0);se.text=F?F+" "+R:R}}function X(se,te,ve,R){var F=m!=null&&t[se][m],G=a[se];return F?(t[se][m]=null,Z(G,F)):g||(F=new te,F instanceof Bn&&(F.z2=UQ(ve,R)),ie(G,F)),e[se][y]=F}function Z(se,te){var ve=se[y]={};te instanceof Wb?(ve.oldX=te.x,ve.oldY=te.y):ve.oldShape=Q({},te.shape)}function ie(se,te){var ve=se[y]={},R=o.parentNode,F=te instanceof Te;if(R&&(!n||n.direction==="drillDown")){var G=0,re=0,ne=a.background[R.getRawIndex()];!n&&ne&&ne.oldShape&&(G=ne.oldShape.width,re=ne.oldShape.height),F?(ve.oldX=0,ve.oldY=re):ve.oldShape={x:G,y:re,width:0,height:0}}ve.fadein=!F}}function UQ(r,e){return r*VQ+e}var jQ=GQ,eh=L,YQ=_e,qp=-1,Ub=function(){function r(e){var t=e.mappingMethod,n=e.type,a=this.option=we(e);this.type=n,this.mappingMethod=t,this._normalizeData=XQ[t];var i=r.visualHandlers[n];this.applyVisual=i.applyVisual,this.getColorMapper=i.getColorMapper,this._normalizedToVisual=i._normalizedToVisual[t],t==="piecewise"?(jb(a),qQ(a)):t==="category"?a.categories?ZQ(a):jb(a,!0):(Dr(t!=="linear"||a.dataExtent),jb(a))}return r.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},r.prototype.getNormalizer=function(){return fe(this._normalizeData,this)},r.listVisualTypes=function(){return Fe(r.visualHandlers)},r.isValidType=function(e){return r.visualHandlers.hasOwnProperty(e)},r.eachVisual=function(e,t,n){_e(e)?L(e,t,n):t.call(n,e)},r.mapVisual=function(e,t,n){var a,i=K(e)?[]:_e(e)?{}:(a=!0,null);return r.eachVisual(e,function(o,s){var l=t.call(n,o,s);a?i=l:i[s]=l}),i},r.retrieveVisuals=function(e){var t={},n;return e&&eh(r.visualHandlers,function(a,i){e.hasOwnProperty(i)&&(t[i]=e[i],n=!0)}),n?t:null},r.prepareVisualTypes=function(e){if(K(e))e=e.slice();else if(YQ(e)){var t=[];eh(e,function(n,a){t.push(a)}),e=t}else return[];return e.sort(function(n,a){return a==="color"&&n!=="color"&&n.indexOf("color")===0?1:-1}),e},r.dependsOn=function(e,t){return t==="color"?!!(e&&e.indexOf(t)===0):e===t},r.findPieceIndex=function(e,t,n){for(var a,i=1/0,o=0,s=t.length;o<s;o++){var l=t[o].value;if(l!=null){if(l===e||ce(l)&&l===e+"")return o;n&&h(l,o)}}for(var o=0,s=t.length;o<s;o++){var u=t[o],c=u.interval,f=u.close;if(c){if(c[0]===-1/0){if(Xp(f[1],e,c[1]))return o}else if(c[1]===1/0){if(Xp(f[0],c[0],e))return o}else if(Xp(f[0],c[0],e)&&Xp(f[1],e,c[1]))return o;n&&h(c[0],o),n&&h(c[1],o)}}if(n)return e===1/0?t.length-1:e===-1/0?0:a;function h(v,d){var p=Math.abs(v-e);p<i&&(i=p,a=d)}},r.visualHandlers={color:{applyVisual:th("color"),getColorMapper:function(){var e=this.option;return fe(e.mappingMethod==="category"?function(t,n){return!n&&(t=this._normalizeData(t)),rh.call(this,t)}:function(t,n,a){var i=!!a;return!n&&(t=this._normalizeData(t)),a=Mc(t,e.parsedVisual,a),i?a:la(a,"rgba")},this)},_normalizedToVisual:{linear:function(e){return la(Mc(e,this.option.parsedVisual),"rgba")},category:rh,piecewise:function(e,t){var n=qb.call(this,t);return n==null&&(n=la(Mc(e,this.option.parsedVisual),"rgba")),n},fixed:Ys}},colorHue:Zp(function(e,t){return Pl(e,t)}),colorSaturation:Zp(function(e,t){return Pl(e,null,t)}),colorLightness:Zp(function(e,t){return Pl(e,null,null,t)}),colorAlpha:Zp(function(e,t){return Ac(e,t)}),decal:{applyVisual:th("decal"),_normalizedToVisual:{linear:null,category:rh,piecewise:null,fixed:null}},opacity:{applyVisual:th("opacity"),_normalizedToVisual:Yb([0,1])},liftZ:{applyVisual:th("liftZ"),_normalizedToVisual:{linear:Ys,category:Ys,piecewise:Ys,fixed:Ys}},symbol:{applyVisual:function(e,t,n){var a=this.mapValueToVisual(e);n("symbol",a)},_normalizedToVisual:{linear:fR,category:rh,piecewise:function(e,t){var n=qb.call(this,t);return n==null&&(n=fR.call(this,e)),n},fixed:Ys}},symbolSize:{applyVisual:th("symbolSize"),_normalizedToVisual:Yb([0,1])}},r}();function qQ(r){var e=r.pieceList;r.hasSpecialVisual=!1,L(e,function(t,n){t.originIndex=n,t.visual!=null&&(r.hasSpecialVisual=!0)})}function ZQ(r){var e=r.categories,t=r.categoryMap={},n=r.visual;if(eh(e,function(o,s){t[o]=s}),!K(n)){var a=[];_e(n)?eh(n,function(o,s){var l=t[s];a[l!=null?l:qp]=o}):a[qp]=n,n=hR(r,a)}for(var i=e.length-1;i>=0;i--)n[i]==null&&(delete t[e[i]],e.pop())}function jb(r,e){var t=r.visual,n=[];_e(t)?eh(t,function(i){n.push(i)}):t!=null&&n.push(t);var a={color:1,symbol:1};!e&&n.length===1&&!a.hasOwnProperty(r.type)&&(n[1]=n[0]),hR(r,n)}function Zp(r){return{applyVisual:function(e,t,n){var a=this.mapValueToVisual(e);n("color",r(t("color"),a))},_normalizedToVisual:Yb([0,1])}}function fR(r){var e=this.option.visual;return e[Math.round(at(r,[0,1],[0,e.length-1],!0))]||{}}function th(r){return function(e,t,n){n(r,this.mapValueToVisual(e))}}function rh(r){var e=this.option.visual;return e[this.option.loop&&r!==qp?r%e.length:r]}function Ys(){return this.option.visual[0]}function Yb(r){return{linear:function(e){return at(e,r,this.option.visual,!0)},category:rh,piecewise:function(e,t){var n=qb.call(this,t);return n==null&&(n=at(e,r,this.option.visual,!0)),n},fixed:Ys}}function qb(r){var e=this.option,t=e.pieceList;if(e.hasSpecialVisual){var n=Ub.findPieceIndex(r,t),a=t[n];if(a&&a.visual)return a.visual[this.type]}}function hR(r,e){return r.visual=e,r.type==="color"&&(r.parsedVisual=J(e,function(t){var n=Fr(t);return n||[0,0,0,1]})),e}var XQ={linear:function(r){return at(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var e=this.option.pieceList,t=Ub.findPieceIndex(r,e,!0);if(t!=null)return at(t,[0,e.length-1],[0,1],!0)},category:function(r){var e=this.option.categories?this.option.categoryMap[r]:r;return e==null?qp:e},fixed:Ot};function Xp(r,e,t){return r?e<=t:e<t}var _r=Ub,QQ="itemStyle",vR=Ye(),KQ={seriesType:"treemap",reset:function(r){var e=r.getData().tree,t=e.root;t.isRemoved()||dR(t,{},r.getViewRoot().getAncestors(),r)}};function dR(r,e,t,n){var a=r.getModel(),i=r.getLayout(),o=r.hostTree.data;if(!(!i||i.invisible||!i.isInView)){var s=a.getModel(QQ),l=JQ(s,e,n),u=o.ensureUniqueItemVisual(r.dataIndex,"style"),c=s.get("borderColor"),f=s.get("borderColorSaturation"),h;f!=null&&(h=pR(l),c=eK(f,h)),u.stroke=c;var v=r.viewChildren;if(!v||!v.length)h=pR(l),u.fill=h;else{var d=tK(r,a,i,s,l,v);L(v,function(p,g){if(p.depth>=t.length||p===t[p.depth]){var y=rK(a,l,p,g,d,n);dR(p,y,t,n)}})}}}function JQ(r,e,t){var n=Q({},e),a=t.designatedVisualItemStyle;return L(["color","colorAlpha","colorSaturation"],function(i){a[i]=e[i];var o=r.get(i);a[i]=null,o!=null&&(n[i]=o)}),n}function pR(r){var e=Zb(r,"color");if(e){var t=Zb(r,"colorAlpha"),n=Zb(r,"colorSaturation");return n&&(e=Pl(e,null,null,n)),t&&(e=Ac(e,t)),e}}function eK(r,e){return e!=null?Pl(e,null,null,r):null}function Zb(r,e){var t=r[e];if(t!=null&&t!=="none")return t}function tK(r,e,t,n,a,i){if(!(!i||!i.length)){var o=Xb(e,"color")||a.color!=null&&a.color!=="none"&&(Xb(e,"colorAlpha")||Xb(e,"colorSaturation"));if(!!o){var s=e.get("visualMin"),l=e.get("visualMax"),u=t.dataExtent.slice();s!=null&&s<u[0]&&(u[0]=s),l!=null&&l>u[1]&&(u[1]=l);var c=e.get("colorMappingBy"),f={type:o.name,dataExtent:u,visual:o.range};f.type==="color"&&(c==="index"||c==="id")?(f.mappingMethod="category",f.loop=!0):f.mappingMethod="linear";var h=new _r(f);return vR(h).drColorMappingBy=c,h}}}function Xb(r,e){var t=r.get(e);return K(t)&&t.length?{name:e,range:t}:null}function rK(r,e,t,n,a,i){var o=Q({},e);if(a){var s=a.type,l=s==="color"&&vR(a).drColorMappingBy,u=l==="index"?n:l==="id"?i.mapIdToIndex(t.getId()):t.getValue(r.get("visualDimension"));o[s]=a.mapValueToVisual(u)}return o}var nh=Math.max,Qp=Math.min,gR=Jt,Qb=L,yR=["itemStyle","borderWidth"],nK=["itemStyle","gapWidth"],aK=["upperLabel","show"],iK=["upperLabel","height"],oK={seriesType:"treemap",reset:function(r,e,t,n){var a=t.getWidth(),i=t.getHeight(),o=r.option,s=Ht(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),l=o.size||[],u=le(gR(s.width,l[0]),a),c=le(gR(s.height,l[1]),i),f=n&&n.type,h=["treemapZoomToNode","treemapRootToNode"],v=Qf(n,h,r),d=f==="treemapRender"||f==="treemapMove"?n.rootRect:null,p=r.getViewRoot(),g=tR(p);if(f!=="treemapMove"){var y=f==="treemapZoomToNode"?hK(r,v,p,u,c):d?[d.width,d.height]:[u,c],m=o.sort;m&&m!=="asc"&&m!=="desc"&&(m="desc");var _={squareRatio:o.squareRatio,sort:m,leafDepth:o.leafDepth};p.hostTree.clearLayouts();var b={x:0,y:0,width:y[0],height:y[1],area:y[0]*y[1]};p.setLayout(b),mR(p,_,!1,0),b=p.getLayout(),Qb(g,function(x,S){var T=(g[S+1]||p).getValue();x.setLayout(Q({dataExtent:[T,T],borderWidth:0,upperHeight:0},b))})}var w=r.getData().tree.root;w.setLayout(vK(s,d,v),!0),r.setLayoutInfo(s),bR(w,new Re(-s.x,-s.y,a,i),g,p,0)}};function mR(r,e,t,n){var a,i;if(!r.isRemoved()){var o=r.getLayout();a=o.width,i=o.height;var s=r.getModel(),l=s.get(yR),u=s.get(nK)/2,c=xR(s),f=Math.max(l,c),h=l-u,v=f-u;r.setLayout({borderWidth:l,upperHeight:f,upperLabelHeight:c},!0),a=nh(a-2*h,0),i=nh(i-h-v,0);var d=a*i,p=sK(r,s,d,e,t,n);if(!!p.length){var g={x:h,y:v,width:a,height:i},y=Qp(a,i),m=1/0,_=[];_.area=0;for(var b=0,w=p.length;b<w;){var x=p[b];_.push(x),_.area+=x.getLayout().area;var S=fK(_,y,e.squareRatio);S<=m?(b++,m=S):(_.area-=_.pop().getLayout().area,_R(_,y,g,u,!1),y=Qp(g.width,g.height),_.length=_.area=0,m=1/0)}if(_.length&&_R(_,y,g,u,!0),!t){var T=s.get("childrenVisibleMin");T!=null&&d<T&&(t=!0)}for(var b=0,w=p.length;b<w;b++)mR(p[b],e,t,n+1)}}}function sK(r,e,t,n,a,i){var o=r.children||[],s=n.sort;s!=="asc"&&s!=="desc"&&(s=null);var l=n.leafDepth!=null&&n.leafDepth<=i;if(a&&!l)return r.viewChildren=[];o=nt(o,function(v){return!v.isRemoved()}),uK(o,s);var u=cK(e,o,s);if(u.sum===0)return r.viewChildren=[];if(u.sum=lK(e,t,u.sum,s,o),u.sum===0)return r.viewChildren=[];for(var c=0,f=o.length;c<f;c++){var h=o[c].getValue()/u.sum*t;o[c].setLayout({area:h})}return l&&(o.length&&r.setLayout({isLeafRoot:!0},!0),o.length=0),r.viewChildren=o,r.setLayout({dataExtent:u.dataExtent},!0),o}function lK(r,e,t,n,a){if(!n)return t;for(var i=r.get("visibleMin"),o=a.length,s=o,l=o-1;l>=0;l--){var u=a[n==="asc"?o-l-1:l].getValue();u/t*e<i&&(s=l,t-=u)}return n==="asc"?a.splice(0,o-s):a.splice(s,o-s),t}function uK(r,e){return e&&r.sort(function(t,n){var a=e==="asc"?t.getValue()-n.getValue():n.getValue()-t.getValue();return a===0?e==="asc"?t.dataIndex-n.dataIndex:n.dataIndex-t.dataIndex:a}),r}function cK(r,e,t){for(var n=0,a=0,i=e.length;a<i;a++)n+=e[a].getValue();var o=r.get("visualDimension"),s;return!e||!e.length?s=[NaN,NaN]:o==="value"&&t?(s=[e[e.length-1].getValue(),e[0].getValue()],t==="asc"&&s.reverse()):(s=[1/0,-1/0],Qb(e,function(l){var u=l.getValue(o);u<s[0]&&(s[0]=u),u>s[1]&&(s[1]=u)})),{sum:n,dataExtent:s}}function fK(r,e,t){for(var n=0,a=1/0,i=0,o=void 0,s=r.length;i<s;i++)o=r[i].getLayout().area,o&&(o<a&&(a=o),o>n&&(n=o));var l=r.area*r.area,u=e*e*t;return l?nh(u*n/l,l/(u*a)):1/0}function _R(r,e,t,n,a){var i=e===t.width?0:1,o=1-i,s=["x","y"],l=["width","height"],u=t[s[i]],c=e?r.area/e:0;(a||c>t[l[o]])&&(c=t[l[o]]);for(var f=0,h=r.length;f<h;f++){var v=r[f],d={},p=c?v.getLayout().area/c:0,g=d[l[o]]=nh(c-2*n,0),y=t[s[i]]+t[l[i]]-u,m=f===h-1||y<p?y:p,_=d[l[i]]=nh(m-2*n,0);d[s[o]]=t[s[o]]+Qp(n,g/2),d[s[i]]=u+Qp(n,_/2),u+=m,v.setLayout(d,!0)}t[s[o]]+=c,t[l[o]]-=c}function hK(r,e,t,n,a){var i=(e||{}).node,o=[n,a];if(!i||i===t)return o;for(var s,l=n*a,u=l*r.option.zoomToNodeRatio;s=i.parentNode;){for(var c=0,f=s.children,h=0,v=f.length;h<v;h++)c+=f[h].getValue();var d=i.getValue();if(d===0)return o;u*=c/d;var p=s.getModel(),g=p.get(yR),y=Math.max(g,xR(p));u+=4*g*g+(3*g+y)*Math.pow(u,.5),u>L0&&(u=L0),i=s}u<l&&(u=l);var m=Math.pow(u/l,.5);return[n*m,a*m]}function vK(r,e,t){if(e)return{x:e.x,y:e.y};var n={x:0,y:0};if(!t)return n;var a=t.node,i=a.getLayout();if(!i)return n;for(var o=[i.width/2,i.height/2],s=a;s;){var l=s.getLayout();o[0]+=l.x,o[1]+=l.y,s=s.parentNode}return{x:r.width/2-o[0],y:r.height/2-o[1]}}function bR(r,e,t,n,a){var i=r.getLayout(),o=t[a],s=o&&o===r;if(!(o&&!s||a===t.length&&r!==n)){r.setLayout({isInView:!0,invisible:!s&&!e.intersect(i),isAboveViewRoot:s},!0);var l=new Re(e.x-i.x,e.y-i.y,e.width,e.height);Qb(r.viewChildren||[],function(u){bR(u,l,t,n,a+1)})}}function xR(r){return r.get(aK)?r.get(iK):0}function dK(r){r.registerSeriesModel(EQ),r.registerChartView(jQ),r.registerVisual(KQ),r.registerLayout(oK),LQ(r)}function pK(r){var e=r.findComponents({mainType:"legend"});!e||!e.length||r.eachSeriesByType("graph",function(t){var n=t.getCategoriesData(),a=t.getGraph(),i=a.data,o=n.mapArray(n.getName);i.filterSelf(function(s){var l=i.getItemModel(s),u=l.getShallow("category");if(u!=null){je(u)&&(u=o[u]);for(var c=0;c<e.length;c++)if(!e[c].isSelected(u))return!1}return!0})})}function gK(r){var e={};r.eachSeriesByType("graph",function(t){var n=t.getCategoriesData(),a=t.getData(),i={};n.each(function(o){var s=n.getName(o);i["ec-"+s]=o;var l=n.getItemModel(o),u=l.getModel("itemStyle").getItemStyle();u.fill||(u.fill=t.getColorFromPalette(s,e)),n.setItemVisual(o,"style",u);for(var c=["symbol","symbolSize","symbolKeepAspect"],f=0;f<c.length;f++){var h=l.getShallow(c[f],!0);h!=null&&n.setItemVisual(o,c[f],h)}}),n.count()&&a.each(function(o){var s=a.getItemModel(o),l=s.getShallow("category");if(l!=null){ce(l)&&(l=i["ec-"+l]);var u=n.getItemVisual(l,"style"),c=a.ensureUniqueItemVisual(o,"style");Q(c,u);for(var f=["symbol","symbolSize","symbolKeepAspect"],h=0;h<f.length;h++)a.setItemVisual(o,f[h],n.getItemVisual(l,f[h]))}})})}function Kp(r){return r instanceof Array||(r=[r,r]),r}function yK(r){r.eachSeriesByType("graph",function(e){var t=e.getGraph(),n=e.getEdgeData(),a=Kp(e.get("edgeSymbol")),i=Kp(e.get("edgeSymbolSize"));n.setVisual("fromSymbol",a&&a[0]),n.setVisual("toSymbol",a&&a[1]),n.setVisual("fromSymbolSize",i&&i[0]),n.setVisual("toSymbolSize",i&&i[1]),n.setVisual("style",e.getModel("lineStyle").getLineStyle()),n.each(function(o){var s=n.getItemModel(o),l=t.getEdgeByIndex(o),u=Kp(s.getShallow("symbol",!0)),c=Kp(s.getShallow("symbolSize",!0)),f=s.getModel("lineStyle").getLineStyle(),h=n.ensureUniqueItemVisual(o,"style");switch(Q(h,f),h.stroke){case"source":{var v=l.node1.getVisual("style");h.stroke=v&&v.fill;break}case"target":{var v=l.node2.getVisual("style");h.stroke=v&&v.fill;break}}u[0]&&l.setVisual("fromSymbol",u[0]),u[1]&&l.setVisual("toSymbol",u[1]),c[0]&&l.setVisual("fromSymbolSize",c[0]),c[1]&&l.setVisual("toSymbolSize",c[1])})})}var Kb="-->",Jp=function(r){return r.get("autoCurveness")||null},wR=function(r,e){var t=Jp(r),n=20,a=[];if(je(t))n=t;else if(K(t)){r.__curvenessList=t;return}e>n&&(n=e);var i=n%2?n+2:n+3;a=[];for(var o=0;o<i;o++)a.push((o%2?o+1:o)/10*(o%2?-1:1));r.__curvenessList=a},ah=function(r,e,t){var n=[r.id,r.dataIndex].join("."),a=[e.id,e.dataIndex].join(".");return[t.uid,n,a].join(Kb)},SR=function(r){var e=r.split(Kb);return[e[0],e[2],e[1]].join(Kb)},mK=function(r,e){var t=ah(r.node1,r.node2,e);return e.__edgeMap[t]},_K=function(r,e){var t=Jb(ah(r.node1,r.node2,e),e),n=Jb(ah(r.node2,r.node1,e),e);return t+n},Jb=function(r,e){var t=e.__edgeMap;return t[r]?t[r].length:0};function bK(r){!Jp(r)||(r.__curvenessList=[],r.__edgeMap={},wR(r))}function xK(r,e,t,n){if(!!Jp(t)){var a=ah(r,e,t),i=t.__edgeMap,o=i[SR(a)];i[a]&&!o?i[a].isForward=!0:o&&i[a]&&(o.isForward=!0,i[a].isForward=!1),i[a]=i[a]||[],i[a].push(n)}}function ex(r,e,t,n){var a=Jp(e),i=K(a);if(!a)return null;var o=mK(r,e);if(!o)return null;for(var s=-1,l=0;l<o.length;l++)if(o[l]===t){s=l;break}var u=_K(r,e);wR(e,u),r.lineStyle=r.lineStyle||{};var c=ah(r.node1,r.node2,e),f=e.__curvenessList,h=i||u%2?0:1;if(o.isForward)return f[h+s];var v=SR(c),d=Jb(v,e),p=f[s+d+h];return n?i?a&&a[0]===0?(d+h)%2?p:-p:((d%2?0:1)+h)%2?p:-p:(d+h)%2?p:-p:f[s+d+h]}function CR(r){var e=r.coordinateSystem;if(!(e&&e.type!=="view")){var t=r.getGraph();t.eachNode(function(n){var a=n.getModel();n.setLayout([+a.get("x"),+a.get("y")])}),tx(t,r)}}function tx(r,e){r.eachEdge(function(t,n){var a=Ia(t.getModel().get(["lineStyle","curveness"]),-ex(t,e,n,!0),0),i=Pa(t.node1.getLayout()),o=Pa(t.node2.getLayout()),s=[i,o];+a&&s.push([(i[0]+o[0])/2-(i[1]-o[1])*a,(i[1]+o[1])/2-(o[0]-i[0])*a]),t.setLayout(s)})}function wK(r,e){r.eachSeriesByType("graph",function(t){var n=t.get("layout"),a=t.coordinateSystem;if(a&&a.type!=="view"){var i=t.getData(),o=[];L(a.dimensions,function(h){o=o.concat(i.mapDimensionsAll(h))});for(var s=0;s<i.count();s++){for(var l=[],u=!1,c=0;c<o.length;c++){var f=i.get(o[c],s);isNaN(f)||(u=!0),l.push(f)}u?i.setItemLayout(s,a.dataToPoint(l)):i.setItemLayout(s,[NaN,NaN])}tx(i.graph,t)}else(!n||n==="none")&&CR(t)})}function ih(r){var e=r.coordinateSystem;if(e.type!=="view")return 1;var t=r.option.nodeScaleRatio,n=e.scaleX,a=e.getZoom(),i=(a-1)*t+1;return i/n}function oh(r){var e=r.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),+e}var TR=Math.PI,rx=[];function nx(r,e,t,n){var a=r.coordinateSystem;if(!(a&&a.type!=="view")){var i=a.getBoundingRect(),o=r.getData(),s=o.graph,l=i.width/2+i.x,u=i.height/2+i.y,c=Math.min(i.width,i.height)/2,f=o.count();if(o.setLayout({cx:l,cy:u}),!!f){if(t){var h=a.pointToData(n),v=h[0],d=h[1],p=[v-l,d-u];jo(p,p),gc(p,p,c),t.setLayout([l+p[0],u+p[1]],!0);var g=r.get(["circular","rotateLabel"]);DR(t,g,l,u)}SK[e](r,s,o,c,l,u,f),s.eachEdge(function(y,m){var _=Ia(y.getModel().get(["lineStyle","curveness"]),ex(y,r,m),0),b=Pa(y.node1.getLayout()),w=Pa(y.node2.getLayout()),x,S=(b[0]+w[0])/2,T=(b[1]+w[1])/2;+_&&(_*=3,x=[l*_+S*(1-_),u*_+T*(1-_)]),y.setLayout([b,w,x])})}}}var SK={value:function(r,e,t,n,a,i,o){var s=0,l=t.getSum("value"),u=Math.PI*2/(l||o);e.eachNode(function(c){var f=c.getValue("value"),h=u*(l?f:1)/2;s+=h,c.setLayout([n*Math.cos(s)+a,n*Math.sin(s)+i]),s+=h})},symbolSize:function(r,e,t,n,a,i,o){var s=0;rx.length=o;var l=ih(r);e.eachNode(function(f){var h=oh(f);isNaN(h)&&(h=2),h<0&&(h=0),h*=l;var v=Math.asin(h/2/n);isNaN(v)&&(v=TR/2),rx[f.dataIndex]=v,s+=v*2});var u=(2*TR-s)/o/2,c=0;e.eachNode(function(f){var h=u+rx[f.dataIndex];c+=h,(!f.getLayout()||!f.getLayout().fixed)&&f.setLayout([n*Math.cos(c)+a,n*Math.sin(c)+i]),c+=h})}};function DR(r,e,t,n){var a=r.getGraphicEl();if(!!a){var i=r.getModel(),o=i.get(["label","rotate"])||0,s=a.getSymbolPath();if(e){var l=r.getLayout(),u=Math.atan2(l[1]-n,l[0]-t);u<0&&(u=Math.PI*2+u);var c=l[0]<t;c&&(u=u-Math.PI);var f=c?"left":"right";s.setTextConfig({rotation:-u,position:f,origin:"center"});var h=s.ensureState("emphasis");Q(h.textConfig||(h.textConfig={}),{position:f})}else s.setTextConfig({rotation:o*=Math.PI/180})}}function CK(r){r.eachSeriesByType("graph",function(e){e.get("layout")==="circular"&&nx(e,"symbolSize")})}var xu=Lv;function TK(r,e,t){for(var n=r,a=e,i=t.rect,o=i.width,s=i.height,l=[i.x+o/2,i.y+s/2],u=t.gravity==null?.1:t.gravity,c=0;c<n.length;c++){var f=n[c];f.p||(f.p=Gi(o*(Math.random()-.5)+l[0],s*(Math.random()-.5)+l[1])),f.pp=Pa(f.p),f.edges=null}var h=t.friction==null?.6:t.friction,v=h,d,p;return{warmUp:function(){v=h*.8},setFixed:function(g){n[g].fixed=!0},setUnfixed:function(g){n[g].fixed=!1},beforeStep:function(g){d=g},afterStep:function(g){p=g},step:function(g){d&&d(n,a);for(var y=[],m=n.length,_=0;_<a.length;_++){var b=a[_];if(!b.ignoreForceLayout){var w=b.n1,x=b.n2;Wi(y,x.p,w.p);var S=pc(y)-b.d,T=x.w/(w.w+x.w);isNaN(T)&&(T=0),jo(y,y),!w.fixed&&xu(w.p,w.p,y,T*S*v),!x.fixed&&xu(x.p,x.p,y,-(1-T)*S*v)}}for(var _=0;_<m;_++){var D=n[_];D.fixed||(Wi(y,l,D.p),xu(D.p,D.p,y,u*v))}for(var _=0;_<m;_++)for(var w=n[_],M=_+1;M<m;M++){var x=n[M];Wi(y,x.p,w.p);var S=pc(y);S===0&&(QT(y,Math.random()-.5,Math.random()-.5),S=1);var A=(w.rep+x.rep)/S/S;!w.fixed&&xu(w.pp,w.pp,y,A),!x.fixed&&xu(x.pp,x.pp,y,-A)}for(var I=[],_=0;_<m;_++){var D=n[_];D.fixed||(Wi(I,D.p,D.pp),xu(D.p,D.p,I,v),Mr(D.pp,D.p))}v=v*.992;var P=v<.01;p&&p(n,a,P),g&&g(P)}}}function DK(r){r.eachSeriesByType("graph",function(e){var t=e.coordinateSystem;if(!(t&&t.type!=="view"))if(e.get("layout")==="force"){var n=e.preservedPoints||{},a=e.getGraph(),i=a.data,o=a.edgeData,s=e.getModel("force"),l=s.get("initLayout");e.preservedPoints?i.each(function(_){var b=i.getId(_);i.setItemLayout(_,n[b]||[NaN,NaN])}):!l||l==="none"?CR(e):l==="circular"&&nx(e,"value");var u=i.getDataExtent("value"),c=o.getDataExtent("value"),f=s.get("repulsion"),h=s.get("edgeLength"),v=K(f)?f:[f,f],d=K(h)?h:[h,h];d=[d[1],d[0]];var p=i.mapArray("value",function(_,b){var w=i.getItemLayout(b),x=at(_,u,v);return isNaN(x)&&(x=(v[0]+v[1])/2),{w:x,rep:x,fixed:i.getItemModel(b).get("fixed"),p:!w||isNaN(w[0])||isNaN(w[1])?null:w}}),g=o.mapArray("value",function(_,b){var w=a.getEdgeByIndex(b),x=at(_,c,d);isNaN(x)&&(x=(d[0]+d[1])/2);var S=w.getModel(),T=Ia(w.getModel().get(["lineStyle","curveness"]),-ex(w,e,b,!0),0);return{n1:p[w.node1.dataIndex],n2:p[w.node2.dataIndex],d:x,curveness:T,ignoreForceLayout:S.get("ignoreForceLayout")}}),y=t.getBoundingRect(),m=TK(p,g,{rect:y,gravity:s.get("gravity"),friction:s.get("friction")});m.beforeStep(function(_,b){for(var w=0,x=_.length;w<x;w++)_[w].fixed&&Mr(_[w].p,a.getNodeByIndex(w).getLayout())}),m.afterStep(function(_,b,w){for(var x=0,S=_.length;x<S;x++)_[x].fixed||a.getNodeByIndex(x).setLayout(_[x].p),n[i.getId(x)]=_[x].p;for(var x=0,S=b.length;x<S;x++){var T=b[x],D=a.getEdgeByIndex(x),M=T.n1.p,A=T.n2.p,I=D.getLayout();I=I?I.slice():[],I[0]=I[0]||[],I[1]=I[1]||[],Mr(I[0],M),Mr(I[1],A),+T.curveness&&(I[2]=[(M[0]+A[0])/2-(M[1]-A[1])*T.curveness,(M[1]+A[1])/2-(A[0]-M[0])*T.curveness]),D.setLayout(I)}}),e.forceLayout=m,e.preservedPoints=n,m.step()}else e.forceLayout=null})}function MK(r,e,t){var n=Q(r.getBoxLayoutParams(),{aspect:t});return Ht(n,{width:e.getWidth(),height:e.getHeight()})}function AK(r,e){var t=[];return r.eachSeriesByType("graph",function(n){var a=n.get("coordinateSystem");if(!a||a==="view"){var i=n.getData(),o=i.mapArray(function(g){var y=i.getItemModel(g);return[+y.get("x"),+y.get("y")]}),s=[],l=[];cd(o,s,l),l[0]-s[0]===0&&(l[0]+=1,s[0]-=1),l[1]-s[1]===0&&(l[1]+=1,s[1]-=1);var u=(l[0]-s[0])/(l[1]-s[1]),c=MK(n,e,u);isNaN(u)&&(s=[c.x,c.y],l=[c.x+c.width,c.y+c.height]);var f=l[0]-s[0],h=l[1]-s[1],v=c.width,d=c.height,p=n.coordinateSystem=new Zf;p.zoomLimit=n.get("scaleLimit"),p.setBoundingRect(s[0],s[1],f,h),p.setViewRect(c.x,c.y,v,d),p.setCenter(n.get("center"),e),p.setZoom(n.get("zoom")),t.push(p)}}),t}var MR=tr.prototype,ax=Jc.prototype,AR=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r}();(function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e})(AR);function ix(r){return isNaN(+r.cpx1)||isNaN(+r.cpy1)}var LK=function(r){j(e,r);function e(t){var n=r.call(this,t)||this;return n.type="ec-line",n}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new AR},e.prototype.buildPath=function(t,n){ix(n)?MR.buildPath.call(this,t,n):ax.buildPath.call(this,t,n)},e.prototype.pointAt=function(t){return ix(this.shape)?MR.pointAt.call(this,t):ax.pointAt.call(this,t)},e.prototype.tangentAt=function(t){var n=this.shape,a=ix(n)?[n.x2-n.x1,n.y2-n.y1]:ax.tangentAt.call(this,t);return jo(a,a)},e}(Be),IK=LK,ox=["fromSymbol","toSymbol"];function LR(r){return"_"+r+"Type"}function IR(r,e,t){var n=e.getItemVisual(t,r);if(!(!n||n==="none")){var a=e.getItemVisual(t,r+"Size"),i=e.getItemVisual(t,r+"Rotate"),o=e.getItemVisual(t,r+"Offset"),s=e.getItemVisual(t,r+"KeepAspect"),l=wf(a),u=lu(o||0,l),c=kt(n,-l[0]/2+u[0],-l[1]/2+u[1],l[0],l[1],null,s);return c.__specifiedRotation=i==null||isNaN(i)?void 0:+i*Math.PI/180||0,c.name=r,c}}function PK(r){var e=new IK({name:"line",subPixelOptimize:!0});return sx(e.shape,r),e}function sx(r,e){r.x1=e[0][0],r.y1=e[0][1],r.x2=e[1][0],r.y2=e[1][1],r.percent=1;var t=e[2];t?(r.cpx1=t[0],r.cpy1=t[1]):(r.cpx1=NaN,r.cpy1=NaN)}var EK=function(r){j(e,r);function e(t,n,a){var i=r.call(this)||this;return i._createLine(t,n,a),i}return e.prototype._createLine=function(t,n,a){var i=t.hostModel,o=t.getItemLayout(n),s=PK(o);s.shape.percent=0,xt(s,{shape:{percent:1}},i,n),this.add(s),L(ox,function(l){var u=IR(l,t,n);this.add(u),this[LR(l)]=t.getItemVisual(n,l)},this),this._updateCommonStl(t,n,a)},e.prototype.updateData=function(t,n,a){var i=t.hostModel,o=this.childOfName("line"),s=t.getItemLayout(n),l={shape:{}};sx(l.shape,s),qe(o,l,i,n),L(ox,function(u){var c=t.getItemVisual(n,u),f=LR(u);if(this[f]!==c){this.remove(this.childOfName(u));var h=IR(u,t,n);this.add(h)}this[f]=c},this),this._updateCommonStl(t,n,a)},e.prototype.getLinePath=function(){return this.childAt(0)},e.prototype._updateCommonStl=function(t,n,a){var i=t.hostModel,o=this.childOfName("line"),s=a&&a.emphasisLineStyle,l=a&&a.blurLineStyle,u=a&&a.selectLineStyle,c=a&&a.labelStatesModels,f=a&&a.emphasisDisabled,h=a&&a.focus,v=a&&a.blurScope;if(!a||t.hasItemOption){var d=t.getItemModel(n),p=d.getModel("emphasis");s=p.getModel("lineStyle").getLineStyle(),l=d.getModel(["blur","lineStyle"]).getLineStyle(),u=d.getModel(["select","lineStyle"]).getLineStyle(),f=p.get("disabled"),h=p.get("focus"),v=p.get("blurScope"),c=rr(d)}var g=t.getItemVisual(n,"style"),y=g.stroke;o.useStyle(g),o.style.fill=null,o.style.strokeNoScale=!0,o.ensureState("emphasis").style=s,o.ensureState("blur").style=l,o.ensureState("select").style=u,L(ox,function(x){var S=this.childOfName(x);if(S){S.setColor(y),S.style.opacity=g.opacity;for(var T=0;T<$r.length;T++){var D=$r[T],M=o.getState(D);if(M){var A=M.style||{},I=S.ensureState(D),P=I.style||(I.style={});A.stroke!=null&&(P[S.__isEmptyBrush?"stroke":"fill"]=A.stroke),A.opacity!=null&&(P.opacity=A.opacity)}}S.markRedraw()}},this);var m=i.getRawValue(n);yr(this,c,{labelDataIndex:n,labelFetcher:{getFormattedLabel:function(x,S){return i.getFormattedLabel(x,S,t.dataType)}},inheritColor:y||"#000",defaultOpacity:g.opacity,defaultText:(m==null?t.getName(n):isFinite(m)?At(m):m)+""});var _=this.getTextContent();if(_){var b=c.normal;_.__align=_.style.align,_.__verticalAlign=_.style.verticalAlign,_.__position=b.get("position")||"middle";var w=b.get("distance");K(w)||(w=[w,w]),_.__labelDistance=w}this.setTextConfig({position:null,local:!0,inside:!1}),Lt(this,h,v,f)},e.prototype.highlight=function(){hi(this)},e.prototype.downplay=function(){vi(this)},e.prototype.updateLayout=function(t,n){this.setLinePoints(t.getItemLayout(n))},e.prototype.setLinePoints=function(t){var n=this.childOfName("line");sx(n.shape,t),n.dirty()},e.prototype.beforeUpdate=function(){var t=this,n=t.childOfName("fromSymbol"),a=t.childOfName("toSymbol"),i=t.getTextContent();if(!n&&!a&&(!i||i.ignore))return;for(var o=1,s=this.parent;s;)s.scaleX&&(o/=s.scaleX),s=s.parent;var l=t.childOfName("line");if(!this.__dirty&&!l.__dirty)return;var u=l.shape.percent,c=l.pointAt(0),f=l.pointAt(u),h=Wi([],f,c);jo(h,h);function v(M,A){var I=M.__specifiedRotation;if(I==null){var P=l.tangentAt(A);M.attr("rotation",(A===1?-1:1)*Math.PI/2-Math.atan2(P[1],P[0]))}else M.attr("rotation",I)}if(n&&(n.setPosition(c),v(n,0),n.scaleX=n.scaleY=o*u,n.markRedraw()),a&&(a.setPosition(f),v(a,1),a.scaleX=a.scaleY=o*u,a.markRedraw()),i&&!i.ignore){i.x=i.y=0,i.originX=i.originY=0;var d=void 0,p=void 0,g=i.__labelDistance,y=g[0]*o,m=g[1]*o,_=u/2,b=l.tangentAt(_),w=[b[1],-b[0]],x=l.pointAt(_);w[1]>0&&(w[0]=-w[0],w[1]=-w[1]);var S=b[0]<0?-1:1;if(i.__position!=="start"&&i.__position!=="end"){var T=-Math.atan2(b[1],b[0]);f[0]<c[0]&&(T=Math.PI+T),i.rotation=T}var D=void 0;switch(i.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":D=-m,p="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":D=m,p="top";break;default:D=0,p="middle"}switch(i.__position){case"end":i.x=h[0]*y+f[0],i.y=h[1]*m+f[1],d=h[0]>.8?"left":h[0]<-.8?"right":"center",p=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":i.x=-h[0]*y+c[0],i.y=-h[1]*m+c[1],d=h[0]>.8?"right":h[0]<-.8?"left":"center",p=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=y*S+c[0],i.y=c[1]+D,d=b[0]<0?"right":"left",i.originX=-y*S,i.originY=-D;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=x[0],i.y=x[1]+D,d="center",i.originY=-D;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-y*S+f[0],i.y=f[1]+D,d=b[0]>=0?"right":"left",i.originX=y*S,i.originY=-D;break}i.scaleX=i.scaleY=o,i.setStyle({verticalAlign:i.__verticalAlign||p,align:i.__align||d})}},e}(Te),lx=EK,OK=function(){function r(e){this.group=new Te,this._LineCtor=e||lx}return r.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this,a=n.group,i=n._lineData;n._lineData=e,i||a.removeAll();var o=PR(e);e.diff(i).add(function(s){t._doAdd(e,s,o)}).update(function(s,l){t._doUpdate(i,e,l,s,o)}).remove(function(s){a.remove(i.getItemGraphicEl(s))}).execute()},r.prototype.updateLayout=function(){var e=this._lineData;!e||e.eachItemGraphicEl(function(t,n){t.updateLayout(e,n)},this)},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=PR(e),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function n(s){!s.isGroup&&!RK(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var a=e.start;a<e.end;a++){var i=t.getItemLayout(a);if(ux(i)){var o=new this._LineCtor(t,a,this._seriesScope);o.traverse(n),this.group.add(o),t.setItemGraphicEl(a,o),this._progressiveEls.push(o)}}},r.prototype.remove=function(){this.group.removeAll()},r.prototype.eachRendered=function(e){oo(this._progressiveEls||this.group,e)},r.prototype._doAdd=function(e,t,n){var a=e.getItemLayout(t);if(!!ux(a)){var i=new this._LineCtor(e,t,n);e.setItemGraphicEl(t,i),this.group.add(i)}},r.prototype._doUpdate=function(e,t,n,a,i){var o=e.getItemGraphicEl(n);if(!ux(t.getItemLayout(a))){this.group.remove(o);return}o?o.updateData(t,a,i):o=new this._LineCtor(t,a,i),t.setItemGraphicEl(a,o),this.group.add(o)},r}();function RK(r){return r.animators&&r.animators.length>0}function PR(r){var e=r.hostModel,t=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:t.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:t.get("disabled"),blurScope:t.get("blurScope"),focus:t.get("focus"),labelStatesModels:rr(e)}}function ER(r){return isNaN(r[0])||isNaN(r[1])}function ux(r){return r&&!ER(r[0])&&!ER(r[1])}var cx=OK,fx=[],hx=[],vx=[],wu=lr,dx=Ui,OR=Math.abs;function RR(r,e,t){for(var n=r[0],a=r[1],i=r[2],o=1/0,s,l=t*t,u=.1,c=.1;c<=.9;c+=.1){fx[0]=wu(n[0],a[0],i[0],c),fx[1]=wu(n[1],a[1],i[1],c);var f=OR(dx(fx,e)-l);f<o&&(o=f,s=c)}for(var h=0;h<32;h++){var v=s+u;hx[0]=wu(n[0],a[0],i[0],s),hx[1]=wu(n[1],a[1],i[1],s),vx[0]=wu(n[0],a[0],i[0],v),vx[1]=wu(n[1],a[1],i[1],v);var f=dx(hx,e)-l;if(OR(f)<.01)break;var d=dx(vx,e)-l;u/=2,f<0?d>=0?s=s+u:s=s-u:d>=0?s=s-u:s=s+u}return s}function px(r,e){var t=[],n=Cc,a=[[],[],[]],i=[[],[]],o=[];e/=2,r.eachEdge(function(s,l){var u=s.getLayout(),c=s.getVisual("fromSymbol"),f=s.getVisual("toSymbol");u.__original||(u.__original=[Pa(u[0]),Pa(u[1])],u[2]&&u.__original.push(Pa(u[2])));var h=u.__original;if(u[2]!=null){if(Mr(a[0],h[0]),Mr(a[1],h[2]),Mr(a[2],h[1]),c&&c!=="none"){var v=oh(s.node1),d=RR(a,h[0],v*e);n(a[0][0],a[1][0],a[2][0],d,t),a[0][0]=t[3],a[1][0]=t[4],n(a[0][1],a[1][1],a[2][1],d,t),a[0][1]=t[3],a[1][1]=t[4]}if(f&&f!=="none"){var v=oh(s.node2),d=RR(a,h[1],v*e);n(a[0][0],a[1][0],a[2][0],d,t),a[1][0]=t[1],a[2][0]=t[2],n(a[0][1],a[1][1],a[2][1],d,t),a[1][1]=t[1],a[2][1]=t[2]}Mr(u[0],a[0]),Mr(u[1],a[2]),Mr(u[2],a[1])}else{if(Mr(i[0],h[0]),Mr(i[1],h[1]),Wi(o,i[1],i[0]),jo(o,o),c&&c!=="none"){var v=oh(s.node1);Lv(i[0],i[0],o,v*e)}if(f&&f!=="none"){var v=oh(s.node2);Lv(i[1],i[1],o,-v*e)}Mr(u[0],i[0]),Mr(u[1],i[1])}})}function NR(r){return r.type==="view"}var NK=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){var a=new $f,i=new cx,o=this.group;this._controller=new Yf(n.getZr()),this._controllerHost={target:o},o.add(a.group),o.add(i.group),this._symbolDraw=a,this._lineDraw=i,this._firstRender=!0},e.prototype.render=function(t,n,a){var i=this,o=t.coordinateSystem;this._model=t;var s=this._symbolDraw,l=this._lineDraw,u=this.group;if(NR(o)){var c={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?u.attr(c):qe(u,c,t)}px(t.getGraph(),ih(t));var f=t.getData();s.updateData(f);var h=t.getEdgeData();l.updateData(h),this._updateNodeAndLinkScale(),this._updateController(t,n,a),clearTimeout(this._layoutTimeout);var v=t.forceLayout,d=t.get(["force","layoutAnimation"]);v&&this._startForceLayoutIteration(v,d);var p=t.get("layout");f.graph.eachNode(function(_){var b=_.dataIndex,w=_.getGraphicEl(),x=_.getModel();if(!!w){w.off("drag").off("dragend");var S=x.get("draggable");S&&w.on("drag",function(D){switch(p){case"force":v.warmUp(),!i._layouting&&i._startForceLayoutIteration(v,d),v.setFixed(b),f.setItemLayout(b,[w.x,w.y]);break;case"circular":f.setItemLayout(b,[w.x,w.y]),_.setLayout({fixed:!0},!0),nx(t,"symbolSize",_,[D.offsetX,D.offsetY]),i.updateLayout(t);break;case"none":default:f.setItemLayout(b,[w.x,w.y]),tx(t.getGraph(),t),i.updateLayout(t);break}}).on("dragend",function(){v&&v.setUnfixed(b)}),w.setDraggable(S,!!x.get("cursor"));var T=x.get(["emphasis","focus"]);T==="adjacency"&&(Me(w).focus=_.getAdjacentDataIndices())}}),f.graph.eachEdge(function(_){var b=_.getGraphicEl(),w=_.getModel().get(["emphasis","focus"]);!b||w==="adjacency"&&(Me(b).focus={edge:[_.dataIndex],node:[_.node1.dataIndex,_.node2.dataIndex]})});var g=t.get("layout")==="circular"&&t.get(["circular","rotateLabel"]),y=f.getLayout("cx"),m=f.getLayout("cy");f.graph.eachNode(function(_){DR(_,g,y,m)}),this._firstRender=!1},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,n){var a=this;(function i(){t.step(function(o){a.updateLayout(a._model),(a._layouting=!o)&&(n?a._layoutTimeout=setTimeout(i,16):i())})})()},e.prototype._updateController=function(t,n,a){var i=this,o=this._controller,s=this._controllerHost,l=this.group;if(o.setPointerChecker(function(u,c,f){var h=l.getBoundingRect();return h.applyTransform(l.transform),h.contain(c,f)&&!$p(u,a,t)}),!NR(t.coordinateSystem)){o.disable();return}o.enable(t.get("roam")),s.zoomLimit=t.get("scaleLimit"),s.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){Ib(s,u.dx,u.dy),a.dispatchAction({seriesId:t.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){Pb(s,u.scale,u.originX,u.originY),a.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),i._updateNodeAndLinkScale(),px(t.getGraph(),ih(t)),i._lineDraw.updateLayout(),a.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,n=t.getData(),a=ih(t);n.eachItemGraphicEl(function(i,o){i&&i.setSymbolScale(a)})},e.prototype.updateLayout=function(t){px(t.getGraph(),ih(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},e.prototype.remove=function(t,n){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},e.type="graph",e}(ut),kK=NK;function Su(r){return"_EC_"+r}var BK=function(){function r(e){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return r.prototype.isDirected=function(){return this._directed},r.prototype.addNode=function(e,t){e=e==null?""+t:""+e;var n=this._nodesMap;if(!n[Su(e)]){var a=new qs(e,t);return a.hostGraph=this,this.nodes.push(a),n[Su(e)]=a,a}},r.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},r.prototype.getNodeById=function(e){return this._nodesMap[Su(e)]},r.prototype.addEdge=function(e,t,n){var a=this._nodesMap,i=this._edgesMap;if(je(e)&&(e=this.nodes[e]),je(t)&&(t=this.nodes[t]),e instanceof qs||(e=a[Su(e)]),t instanceof qs||(t=a[Su(t)]),!(!e||!t)){var o=e.id+"-"+t.id,s=new kR(e,t,n);return s.hostGraph=this,this._directed&&(e.outEdges.push(s),t.inEdges.push(s)),e.edges.push(s),e!==t&&t.edges.push(s),this.edges.push(s),i[o]=s,s}},r.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},r.prototype.getEdge=function(e,t){e instanceof qs&&(e=e.id),t instanceof qs&&(t=t.id);var n=this._edgesMap;return this._directed?n[e+"-"+t]:n[e+"-"+t]||n[t+"-"+e]},r.prototype.eachNode=function(e,t){for(var n=this.nodes,a=n.length,i=0;i<a;i++)n[i].dataIndex>=0&&e.call(t,n[i],i)},r.prototype.eachEdge=function(e,t){for(var n=this.edges,a=n.length,i=0;i<a;i++)n[i].dataIndex>=0&&n[i].node1.dataIndex>=0&&n[i].node2.dataIndex>=0&&e.call(t,n[i],i)},r.prototype.breadthFirstTraverse=function(e,t,n,a){if(t instanceof qs||(t=this._nodesMap[Su(t)]),!!t){for(var i=n==="out"?"outEdges":n==="in"?"inEdges":"edges",o=0;o<this.nodes.length;o++)this.nodes[o].__visited=!1;if(!e.call(a,t,null))for(var s=[t];s.length;)for(var l=s.shift(),u=l[i],o=0;o<u.length;o++){var c=u[o],f=c.node1===l?c.node2:c.node1;if(!f.__visited){if(e.call(a,f,l))return;s.push(f),f.__visited=!0}}}},r.prototype.update=function(){for(var e=this.data,t=this.edgeData,n=this.nodes,a=this.edges,i=0,o=n.length;i<o;i++)n[i].dataIndex=-1;for(var i=0,o=e.count();i<o;i++)n[e.getRawIndex(i)].dataIndex=i;t.filterSelf(function(s){var l=a[t.getRawIndex(s)];return l.node1.dataIndex>=0&&l.node2.dataIndex>=0});for(var i=0,o=a.length;i<o;i++)a[i].dataIndex=-1;for(var i=0,o=t.count();i<o;i++)a[t.getRawIndex(i)].dataIndex=i},r.prototype.clone=function(){for(var e=new r(this._directed),t=this.nodes,n=this.edges,a=0;a<t.length;a++)e.addNode(t[a].id,t[a].dataIndex);for(var a=0;a<n.length;a++){var i=n[a];e.addEdge(i.node1.id,i.node2.id,i.dataIndex)}return e},r}(),qs=function(){function r(e,t){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=e==null?"":e,this.dataIndex=t==null?-1:t}return r.prototype.degree=function(){return this.edges.length},r.prototype.inDegree=function(){return this.inEdges.length},r.prototype.outDegree=function(){return this.outEdges.length},r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostGraph,n=t.data.getItemModel(this.dataIndex);return n.getModel(e)}},r.prototype.getAdjacentDataIndices=function(){for(var e={edge:[],node:[]},t=0;t<this.edges.length;t++){var n=this.edges[t];n.dataIndex<0||(e.edge.push(n.dataIndex),e.node.push(n.node1.dataIndex,n.node2.dataIndex))}return e},r}(),kR=function(){function r(e,t,n){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=n==null?-1:n}return r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostGraph,n=t.edgeData.getItemModel(this.dataIndex);return n.getModel(e)}},r.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},r}();function BR(r,e){return{getValue:function(t){var n=this[r][e];return n.getStore().get(n.getDimensionIndex(t||"value"),this.dataIndex)},setVisual:function(t,n){this.dataIndex>=0&&this[r][e].setItemVisual(this.dataIndex,t,n)},getVisual:function(t){return this[r][e].getItemVisual(this.dataIndex,t)},setLayout:function(t,n){this.dataIndex>=0&&this[r][e].setItemLayout(this.dataIndex,t,n)},getLayout:function(){return this[r][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[r][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[r][e].getRawIndex(this.dataIndex)}}}Et(qs,BR("hostGraph","data")),Et(kR,BR("hostGraph","edgeData"));var zK=BK;function zR(r,e,t,n,a){for(var i=new zK(n),o=0;o<r.length;o++)i.addNode(Jt(r[o].id,r[o].name,o),o);for(var s=[],l=[],u=0,o=0;o<e.length;o++){var c=e[o],f=c.source,h=c.target;i.addEdge(f,h,u)&&(l.push(c),s.push(Jt(qt(c.id,null),f+" > "+h)),u++)}var v=t.get("coordinateSystem"),d;if(v==="cartesian2d"||v==="polar")d=Wa(r,t);else{var p=ru.get(v),g=p?p.dimensions||[]:[];Ne(g,"value")<0&&g.concat(["value"]);var y=hu(r,{coordDimensions:g,encodeDefine:t.getEncode()}).dimensions;d=new Er(y,t),d.initData(r)}var m=new Er(["value"],t);return m.initData(l,s),a&&a(d,m),JO({mainData:d,struct:i,structAttr:"graph",datas:{node:d,edge:m},datasAttr:{node:"data",edge:"edgeData"}}),i.update(),i}var FK=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments);var n=this;function a(){return n._categoriesData}this.legendVisualProvider=new Wf(a,a),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(t){r.prototype.mergeDefaultAndTheme.apply(this,arguments),rs(t,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,n){var a=t.edges||t.links||[],i=t.data||t.nodes||[],o=this;if(i&&a){bK(this);var s=zR(i,a,this,!0,l);return L(s.edges,function(u){xK(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,c){u.wrapMethod("getItemModel",function(d){var p=o._categoriesModels,g=d.getShallow("category"),y=p[g];return y&&(y.parentModel=d.parentModel,d.parentModel=y),d});var f=lt.prototype.getModel;function h(d,p){var g=f.call(this,d,p);return g.resolveParentPath=v,g}c.wrapMethod("getItemModel",function(d){return d.resolveParentPath=v,d.getModel=h,d});function v(d){if(d&&(d[0]==="label"||d[1]==="label")){var p=d.slice();return d[0]==="label"?p[0]="edgeLabel":d[1]==="label"&&(p[1]="edgeLabel"),p}return d}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,n,a){if(a==="edge"){var i=this.getData(),o=this.getDataParams(t,a),s=i.graph.getEdgeByIndex(t),l=i.getName(s.node1.dataIndex),u=i.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),nr("nameValue",{name:c.join(" > "),value:o.value,noValue:o.value==null})}var f=wL({series:this,dataIndex:t,multipleSeries:n});return f},e.prototype._updateCategoriesData=function(){var t=J(this.option.categories||[],function(a){return a.value!=null?a:Q({value:0},a)}),n=new Er(["value"],this);n.initData(t),this._categoriesData=n,this._categoriesModels=n.mapArray(function(a){return n.getItemModel(a)})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return r.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(yt),VK=FK,$K={type:"graphRoam",event:"graphRoam",update:"none"};function HK(r){r.registerChartView(kK),r.registerSeriesModel(VK),r.registerProcessor(pK),r.registerVisual(gK),r.registerVisual(yK),r.registerLayout(wK),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,CK),r.registerLayout(DK),r.registerCoordinateSystem("graphView",{dimensions:Zf.dimensions,create:AK}),r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},Ot),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},Ot),r.registerAction($K,function(e,t,n){t.eachComponent({mainType:"series",query:e},function(a){var i=a.coordinateSystem,o=kb(i,e,void 0,n);a.setCenter&&a.setCenter(o.center),a.setZoom&&a.setZoom(o.zoom)})})}var GK=function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r}(),WK=function(r){j(e,r);function e(t){var n=r.call(this,t)||this;return n.type="pointer",n}return e.prototype.getDefaultShape=function(){return new GK},e.prototype.buildPath=function(t,n){var a=Math.cos,i=Math.sin,o=n.r,s=n.width,l=n.angle,u=n.x-a(l)*s*(s>=o/3?1:2),c=n.y-i(l)*s*(s>=o/3?1:2);l=n.angle-Math.PI/2,t.moveTo(u,c),t.lineTo(n.x+a(l)*s,n.y+i(l)*s),t.lineTo(n.x+a(n.angle)*o,n.y+i(n.angle)*o),t.lineTo(n.x-a(l)*s,n.y-i(l)*s),t.lineTo(u,c)},e}(Be),UK=WK;function jK(r,e){var t=r.get("center"),n=e.getWidth(),a=e.getHeight(),i=Math.min(n,a),o=le(t[0],e.getWidth()),s=le(t[1],e.getHeight()),l=le(r.get("radius"),i/2);return{cx:o,cy:s,r:l}}function eg(r,e){var t=r==null?"":r+"";return e&&(ce(e)?t=e.replace("{value}",t):ye(e)&&(t=e(r))),t}var YK=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){this.group.removeAll();var i=t.get(["axisLine","lineStyle","color"]),o=jK(t,a);this._renderMain(t,n,a,i,o),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,n,a,i,o){var s=this.group,l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,c=-t.get("endAngle")/180*Math.PI,f=t.getModel("axisLine"),h=f.get("roundCap"),v=h?Rp:Hr,d=f.get("show"),p=f.getModel("lineStyle"),g=p.get("width"),y=[u,c];AD(y,!l),u=y[0],c=y[1];for(var m=c-u,_=u,b=[],w=0;d&&w<i.length;w++){var x=Math.min(Math.max(i[w][0],0),1);c=u+m*x;var S=new v({shape:{startAngle:_,endAngle:c,cx:o.cx,cy:o.cy,clockwise:l,r0:o.r-g,r:o.r},silent:!0});S.setStyle({fill:i[w][1]}),S.setStyle(p.getLineStyle(["color","width"])),b.push(S),_=c}b.reverse(),L(b,function(D){return s.add(D)});var T=function(D){if(D<=0)return i[0][1];var M;for(M=0;M<i.length;M++)if(i[M][0]>=D&&(M===0?0:i[M-1][0])<D)return i[M][1];return i[M-1][1]};this._renderTicks(t,n,a,T,o,u,c,l,g),this._renderTitleAndDetail(t,n,a,T,o),this._renderAnchor(t,o),this._renderPointer(t,n,a,T,o,u,c,l,g)},e.prototype._renderTicks=function(t,n,a,i,o,s,l,u,c){for(var f=this.group,h=o.cx,v=o.cy,d=o.r,p=+t.get("min"),g=+t.get("max"),y=t.getModel("splitLine"),m=t.getModel("axisTick"),_=t.getModel("axisLabel"),b=t.get("splitNumber"),w=m.get("splitNumber"),x=le(y.get("length"),d),S=le(m.get("length"),d),T=s,D=(l-s)/b,M=D/w,A=y.getModel("lineStyle").getLineStyle(),I=m.getModel("lineStyle").getLineStyle(),P=y.get("distance"),E,O,N=0;N<=b;N++){if(E=Math.cos(T),O=Math.sin(T),y.get("show")){var V=P?P+c:c,$=new tr({shape:{x1:E*(d-V)+h,y1:O*(d-V)+v,x2:E*(d-x-V)+h,y2:O*(d-x-V)+v},style:A,silent:!0});A.stroke==="auto"&&$.setStyle({stroke:i(N/b)}),f.add($)}if(_.get("show")){var V=_.get("distance")+P,U=eg(At(N/b*(g-p)+p),_.get("formatter")),Y=i(N/b),ae=E*(d-x-V)+h,H=O*(d-x-V)+v,q=_.get("rotate"),X=0;q==="radial"?(X=-T+2*Math.PI,X>Math.PI/2&&(X+=Math.PI)):q==="tangential"?X=-T-Math.PI/2:je(q)&&(X=q*Math.PI/180),X===0?f.add(new We({style:gt(_,{text:U,x:ae,y:H,verticalAlign:O<-.8?"top":O>.8?"bottom":"middle",align:E<-.4?"left":E>.4?"right":"center"},{inheritColor:Y}),silent:!0})):f.add(new We({style:gt(_,{text:U,x:ae,y:H,verticalAlign:"middle",align:"center"},{inheritColor:Y}),silent:!0,originX:ae,originY:H,rotation:X}))}if(m.get("show")&&N!==b){var V=m.get("distance");V=V?V+c:c;for(var Z=0;Z<=w;Z++){E=Math.cos(T),O=Math.sin(T);var ie=new tr({shape:{x1:E*(d-V)+h,y1:O*(d-V)+v,x2:E*(d-S-V)+h,y2:O*(d-S-V)+v},silent:!0,style:I});I.stroke==="auto"&&ie.setStyle({stroke:i((N+Z/w)/b)}),f.add(ie),T+=M}T-=M}else T+=D}},e.prototype._renderPointer=function(t,n,a,i,o,s,l,u,c){var f=this.group,h=this._data,v=this._progressEls,d=[],p=t.get(["pointer","show"]),g=t.getModel("progress"),y=g.get("show"),m=t.getData(),_=m.mapDimension("value"),b=+t.get("min"),w=+t.get("max"),x=[b,w],S=[s,l];function T(M,A){var I=m.getItemModel(M),P=I.getModel("pointer"),E=le(P.get("width"),o.r),O=le(P.get("length"),o.r),N=t.get(["pointer","icon"]),V=P.get("offsetCenter"),$=le(V[0],o.r),U=le(V[1],o.r),Y=P.get("keepAspect"),ae;return N?ae=kt(N,$-E/2,U-O,E,O,null,Y):ae=new UK({shape:{angle:-Math.PI/2,width:E,r:O,x:$,y:U}}),ae.rotation=-(A+Math.PI/2),ae.x=o.cx,ae.y=o.cy,ae}function D(M,A){var I=g.get("roundCap"),P=I?Rp:Hr,E=g.get("overlap"),O=E?g.get("width"):c/m.count(),N=E?o.r-O:o.r-(M+1)*O,V=E?o.r:o.r-M*O,$=new P({shape:{startAngle:s,endAngle:A,cx:o.cx,cy:o.cy,clockwise:u,r0:N,r:V}});return E&&($.z2=w-m.get(_,M)%w),$}(y||p)&&(m.diff(h).add(function(M){var A=m.get(_,M);if(p){var I=T(M,s);xt(I,{rotation:-((isNaN(+A)?S[0]:at(A,x,S,!0))+Math.PI/2)},t),f.add(I),m.setItemGraphicEl(M,I)}if(y){var P=D(M,s),E=g.get("clip");xt(P,{shape:{endAngle:at(A,x,S,E)}},t),f.add(P),e_(t.seriesIndex,m.dataType,M,P),d[M]=P}}).update(function(M,A){var I=m.get(_,M);if(p){var P=h.getItemGraphicEl(A),E=P?P.rotation:s,O=T(M,E);O.rotation=E,qe(O,{rotation:-((isNaN(+I)?S[0]:at(I,x,S,!0))+Math.PI/2)},t),f.add(O),m.setItemGraphicEl(M,O)}if(y){var N=v[A],V=N?N.shape.endAngle:s,$=D(M,V),U=g.get("clip");qe($,{shape:{endAngle:at(I,x,S,U)}},t),f.add($),e_(t.seriesIndex,m.dataType,M,$),d[M]=$}}).execute(),m.each(function(M){var A=m.getItemModel(M),I=A.getModel("emphasis"),P=I.get("focus"),E=I.get("blurScope"),O=I.get("disabled");if(p){var N=m.getItemGraphicEl(M),V=m.getItemVisual(M,"style"),$=V.fill;if(N instanceof ur){var U=N.style;N.useStyle(Q({image:U.image,x:U.x,y:U.y,width:U.width,height:U.height},V))}else N.useStyle(V),N.type!=="pointer"&&N.setColor($);N.setStyle(A.getModel(["pointer","itemStyle"]).getItemStyle()),N.style.fill==="auto"&&N.setStyle("fill",i(at(m.get(_,M),x,[0,1],!0))),N.z2EmphasisLift=0,gr(N,A),Lt(N,P,E,O)}if(y){var Y=d[M];Y.useStyle(m.getItemVisual(M,"style")),Y.setStyle(A.getModel(["progress","itemStyle"]).getItemStyle()),Y.z2EmphasisLift=0,gr(Y,A),Lt(Y,P,E,O)}}),this._progressEls=d)},e.prototype._renderAnchor=function(t,n){var a=t.getModel("anchor"),i=a.get("show");if(i){var o=a.get("size"),s=a.get("icon"),l=a.get("offsetCenter"),u=a.get("keepAspect"),c=kt(s,n.cx-o/2+le(l[0],n.r),n.cy-o/2+le(l[1],n.r),o,o,null,u);c.z2=a.get("showAbove")?1:0,c.setStyle(a.getModel("itemStyle").getItemStyle()),this.group.add(c)}},e.prototype._renderTitleAndDetail=function(t,n,a,i,o){var s=this,l=t.getData(),u=l.mapDimension("value"),c=+t.get("min"),f=+t.get("max"),h=new Te,v=[],d=[],p=t.isAnimationEnabled(),g=t.get(["pointer","showAbove"]);l.diff(this._data).add(function(y){v[y]=new We({silent:!0}),d[y]=new We({silent:!0})}).update(function(y,m){v[y]=s._titleEls[m],d[y]=s._detailEls[m]}).execute(),l.each(function(y){var m=l.getItemModel(y),_=l.get(u,y),b=new Te,w=i(at(_,[c,f],[0,1],!0)),x=m.getModel("title");if(x.get("show")){var S=x.get("offsetCenter"),T=o.cx+le(S[0],o.r),D=o.cy+le(S[1],o.r),M=v[y];M.attr({z2:g?0:2,style:gt(x,{x:T,y:D,text:l.getName(y),align:"center",verticalAlign:"middle"},{inheritColor:w})}),b.add(M)}var A=m.getModel("detail");if(A.get("show")){var I=A.get("offsetCenter"),P=o.cx+le(I[0],o.r),E=o.cy+le(I[1],o.r),O=le(A.get("width"),o.r),N=le(A.get("height"),o.r),V=t.get(["progress","show"])?l.getItemVisual(y,"style").fill:w,M=d[y],$=A.get("formatter");M.attr({z2:g?0:2,style:gt(A,{x:P,y:E,text:eg(_,$),width:isNaN(O)?null:O,height:isNaN(N)?null:N,align:"center",verticalAlign:"middle"},{inheritColor:V})}),JM(M,{normal:A},_,function(Y){return eg(Y,$)}),p&&eA(M,y,l,t,{getFormattedLabel:function(Y,ae,H,q,X,Z){return eg(Z?Z.interpolatedValue:_,$)}}),b.add(M)}h.add(b)}),this.group.add(h),this._titleEls=v,this._detailEls=d},e.type="gauge",e}(ut),qK=YK,ZK=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="itemStyle",t}return e.prototype.getInitialData=function(t,n){return mu(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(yt),XK=ZK;function QK(r){r.registerChartView(qK),r.registerSeriesModel(XK)}var KK=["itemStyle","opacity"],JK=function(r){j(e,r);function e(t,n){var a=r.call(this)||this,i=a,o=new Wr,s=new We;return i.setTextContent(s),a.setTextGuideLine(o),a.updateData(t,n,!0),a}return e.prototype.updateData=function(t,n,a){var i=this,o=t.hostModel,s=t.getItemModel(n),l=t.getItemLayout(n),u=s.getModel("emphasis"),c=s.get(KK);c=c==null?1:c,a||da(i),i.useStyle(t.getItemVisual(n,"style")),i.style.lineJoin="round",a?(i.setShape({points:l.points}),i.style.opacity=0,xt(i,{style:{opacity:c}},o,n)):qe(i,{style:{opacity:c},shape:{points:l.points}},o,n),gr(i,s),this._updateLabel(t,n),Lt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,n){var a=this,i=this.getTextGuideLine(),o=a.getTextContent(),s=t.hostModel,l=t.getItemModel(n),u=t.getItemLayout(n),c=u.label,f=t.getItemVisual(n,"style"),h=f.fill;yr(o,rr(l),{labelFetcher:t.hostModel,labelDataIndex:n,defaultOpacity:f.opacity,defaultText:t.getName(n)},{normal:{align:c.textAlign,verticalAlign:c.verticalAlign}}),a.setTextConfig({local:!0,inside:!!c.inside,insideStroke:h,outsideFill:h});var v=c.linePoints;i.setShape({points:v}),a.textGuideLineConfig={anchor:v?new Oe(v[0][0],v[0][1]):null},qe(o,{style:{x:c.x,y:c.y}},s,n),o.attr({rotation:c.rotation,originX:c.x,originY:c.y,z2:10}),Q1(a,K1(l),{stroke:h})},e}(Gr),eJ=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,n,a){var i=t.getData(),o=this._data,s=this.group;i.diff(o).add(function(l){var u=new JK(i,l);i.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(i,l),s.add(c),i.setItemGraphicEl(l,c)}).remove(function(l){var u=o.getItemGraphicEl(l);ef(u,t,l)}).execute(),this._data=i},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(ut),tJ=eJ,rJ=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Wf(fe(this.getData,this),fe(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.getInitialData=function(t,n){return mu(this,{coordDimensions:["value"],encodeDefaulter:Ae(F_,this)})},e.prototype._defaultLabelLine=function(t){rs(t,"labelLine",["show"]);var n=t.labelLine,a=t.emphasis.labelLine;n.show=n.show&&t.label.show,a.show=a.show&&t.emphasis.label.show},e.prototype.getDataParams=function(t){var n=this.getData(),a=r.prototype.getDataParams.call(this,t),i=n.mapDimension("value"),o=n.getSum(i);return a.percent=o?+(n.get(i,t)/o*100).toFixed(2):0,a.$vars.push("percent"),a},e.type="series.funnel",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(yt),nJ=rJ;function aJ(r,e){return Ht(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function iJ(r,e){for(var t=r.mapDimension("value"),n=r.mapArray(t,function(l){return l}),a=[],i=e==="ascending",o=0,s=r.count();o<s;o++)a[o]=o;return ye(e)?a.sort(e):e!=="none"&&a.sort(function(l,u){return i?n[l]-n[u]:n[u]-n[l]}),a}function oJ(r){var e=r.hostModel,t=e.get("orient");r.each(function(n){var a=r.getItemModel(n),i=a.getModel("label"),o=i.get("position"),s=a.getModel("labelLine"),l=r.getItemLayout(n),u=l.points,c=o==="inner"||o==="inside"||o==="center"||o==="insideLeft"||o==="insideRight",f,h,v,d;if(c)o==="insideLeft"?(h=(u[0][0]+u[3][0])/2+5,v=(u[0][1]+u[3][1])/2,f="left"):o==="insideRight"?(h=(u[1][0]+u[2][0])/2-5,v=(u[1][1]+u[2][1])/2,f="right"):(h=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,v=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4,f="center"),d=[[h,v],[h,v]];else{var p=void 0,g=void 0,y=void 0,m=void 0,_=s.get("length");o==="left"?(p=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,y=p-_,h=y-5,f="right"):o==="right"?(p=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,y=p+_,h=y+5,f="left"):o==="top"?(p=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,m=g-_,v=m-5,f="center"):o==="bottom"?(p=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,m=g+_,v=m+5,f="center"):o==="rightTop"?(p=t==="horizontal"?u[3][0]:u[1][0],g=t==="horizontal"?u[3][1]:u[1][1],t==="horizontal"?(m=g-_,v=m-5,f="center"):(y=p+_,h=y+5,f="top")):o==="rightBottom"?(p=u[2][0],g=u[2][1],t==="horizontal"?(m=g+_,v=m+5,f="center"):(y=p+_,h=y+5,f="bottom")):o==="leftTop"?(p=u[0][0],g=t==="horizontal"?u[0][1]:u[1][1],t==="horizontal"?(m=g-_,v=m-5,f="center"):(y=p-_,h=y-5,f="right")):o==="leftBottom"?(p=t==="horizontal"?u[1][0]:u[3][0],g=t==="horizontal"?u[1][1]:u[2][1],t==="horizontal"?(m=g+_,v=m+5,f="center"):(y=p-_,h=y-5,f="right")):(p=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,t==="horizontal"?(m=g+_,v=m+5,f="center"):(y=p+_,h=y+5,f="left")),t==="horizontal"?(y=p,h=y):(m=g,v=m),d=[[p,g],[y,m]]}l.label={linePoints:d,x:h,y:v,verticalAlign:"middle",textAlign:f,inside:c}})}function sJ(r,e){r.eachSeriesByType("funnel",function(t){var n=t.getData(),a=n.mapDimension("value"),i=t.get("sort"),o=aJ(t,e),s=t.get("orient"),l=o.width,u=o.height,c=iJ(n,i),f=o.x,h=o.y,v=s==="horizontal"?[le(t.get("minSize"),u),le(t.get("maxSize"),u)]:[le(t.get("minSize"),l),le(t.get("maxSize"),l)],d=n.getDataExtent(a),p=t.get("min"),g=t.get("max");p==null&&(p=Math.min(d[0],0)),g==null&&(g=d[1]);var y=t.get("funnelAlign"),m=t.get("gap"),_=s==="horizontal"?l:u,b=(_-m*(n.count()-1))/n.count(),w=function(E,O){if(s==="horizontal"){var N=n.get(a,E)||0,V=at(N,[p,g],v,!0),$=void 0;switch(y){case"top":$=h;break;case"center":$=h+(u-V)/2;break;case"bottom":$=h+(u-V);break}return[[O,$],[O,$+V]]}var U=n.get(a,E)||0,Y=at(U,[p,g],v,!0),ae;switch(y){case"left":ae=f;break;case"center":ae=f+(l-Y)/2;break;case"right":ae=f+l-Y;break}return[[ae,O],[ae+Y,O]]};i==="ascending"&&(b=-b,m=-m,s==="horizontal"?f+=l:h+=u,c=c.reverse());for(var x=0;x<c.length;x++){var S=c[x],T=c[x+1],D=n.getItemModel(S);if(s==="horizontal"){var M=D.get(["itemStyle","width"]);M==null?M=b:(M=le(M,l),i==="ascending"&&(M=-M));var A=w(S,f),I=w(T,f+M);f+=M+m,n.setItemLayout(S,{points:A.concat(I.slice().reverse())})}else{var P=D.get(["itemStyle","height"]);P==null?P=b:(P=le(P,u),i==="ascending"&&(P=-P));var A=w(S,h),I=w(T,h+P);h+=P+m,n.setItemLayout(S,{points:A.concat(I.slice().reverse())})}}oJ(n)})}function lJ(r){r.registerChartView(tJ),r.registerSeriesModel(nJ),r.registerLayout(sJ),r.registerProcessor(Gf("funnel"))}var uJ=.3,cJ=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._dataGroup=new Te,t._initialized=!1,t}return e.prototype.init=function(){this.group.add(this._dataGroup)},e.prototype.render=function(t,n,a,i){this._progressiveEls=null;var o=this._dataGroup,s=t.getData(),l=this._data,u=t.coordinateSystem,c=u.dimensions,f=$R(t);s.diff(l).add(h).update(v).remove(d).execute();function h(g){var y=VR(s,o,g,c,u);gx(y,s,g,f)}function v(g,y){var m=l.getItemGraphicEl(y),_=FR(s,g,c,u);s.setItemGraphicEl(g,m),qe(m,{shape:{points:_}},t,g),da(m),gx(m,s,g,f)}function d(g){var y=l.getItemGraphicEl(g);o.remove(y)}if(!this._initialized){this._initialized=!0;var p=fJ(u,t,function(){setTimeout(function(){o.removeClipPath()})});o.setClipPath(p)}this._data=s},e.prototype.incrementalPrepareRender=function(t,n,a){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},e.prototype.incrementalRender=function(t,n,a){for(var i=n.getData(),o=n.coordinateSystem,s=o.dimensions,l=$R(n),u=this._progressiveEls=[],c=t.start;c<t.end;c++){var f=VR(i,this._dataGroup,c,s,o);f.incremental=!0,gx(f,i,c,l),u.push(f)}},e.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},e.type="parallel",e}(ut);function fJ(r,e,t){var n=r.model,a=r.getRect(),i=new Ge({shape:{x:a.x,y:a.y,width:a.width,height:a.height}}),o=n.get("layout")==="horizontal"?"width":"height";return i.setShape(o,0),xt(i,{shape:{width:a.width,height:a.height}},e,t),i}function FR(r,e,t,n){for(var a=[],i=0;i<t.length;i++){var o=t[i],s=r.get(r.mapDimension(o),e);hJ(s,n.getAxis(o).type)||a.push(n.dataToPoint(s,o))}return a}function VR(r,e,t,n,a){var i=FR(r,t,n,a),o=new Wr({shape:{points:i},z2:10});return e.add(o),r.setItemGraphicEl(t,o),o}function $R(r){var e=r.get("smooth",!0);return e===!0&&(e=uJ),e=Na(e),Tl(e)&&(e=0),{smooth:e}}function gx(r,e,t,n){r.useStyle(e.getItemVisual(t,"style")),r.style.fill=null,r.setShape("smooth",n.smooth);var a=e.getItemModel(t),i=a.getModel("emphasis");gr(r,a,"lineStyle"),Lt(r,i.get("focus"),i.get("blurScope"),i.get("disabled"))}function hJ(r,e){return e==="category"?r==null:r==null||isNaN(r)}var vJ=cJ,dJ=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.getInitialData=function(t,n){return Wa(null,this,{useEncodeDefaulter:fe(pJ,null,this)})},e.prototype.getRawIndicesByActiveState=function(t){var n=this.coordinateSystem,a=this.getData(),i=[];return n.eachActiveState(a,function(o,s){t===o&&i.push(a.getRawIndex(s))}),i},e.type="series.parallel",e.dependencies=["parallel"],e.defaultOption={z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"},e}(yt);function pJ(r){var e=r.ecModel.getComponent("parallel",r.get("parallelIndex"));if(!!e){var t={};return L(e.dimensions,function(n){var a=gJ(n);t[n]=a}),t}}function gJ(r){return+r.replace("dim","")}var yJ=dJ,mJ=["lineStyle","opacity"],_J={seriesType:"parallel",reset:function(r,e){var t=r.coordinateSystem,n={normal:r.get(["lineStyle","opacity"]),active:r.get("activeOpacity"),inactive:r.get("inactiveOpacity")};return{progress:function(a,i){t.eachActiveState(i,function(o,s){var l=n[o];if(o==="normal"&&i.hasItemOption){var u=i.getItemModel(s).get(mJ,!0);u!=null&&(l=u)}var c=i.ensureUniqueItemVisual(s,"style");c.opacity=l},a.start,a.end)}}}},bJ=_J;function xJ(r){wJ(r),SJ(r)}function wJ(r){if(!r.parallel){var e=!1;L(r.series,function(t){t&&t.type==="parallel"&&(e=!0)}),e&&(r.parallel=[{}])}}function SJ(r){var e=st(r.parallelAxis);L(e,function(t){if(!!_e(t)){var n=t.parallelIndex||0,a=st(r.parallel)[n];a&&a.parallelAxisDefault&&Pe(t,a.parallelAxisDefault,!1)}})}var CJ=5,TJ=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){this._model=t,this._api=a,this._handlers||(this._handlers={},L(DJ,function(i,o){a.getZr().on(o,this._handlers[o]=fe(i,this))},this)),ou(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},e.prototype.dispose=function(t,n){mf(this,"_throttledDispatchExpand"),L(this._handlers,function(a,i){n.getZr().off(i,a)}),this._handlers=null},e.prototype._throttledDispatchExpand=function(t){this._dispatchExpand(t)},e.prototype._dispatchExpand=function(t){t&&this._api.dispatchAction(Q({type:"parallelAxisExpand"},t))},e.type="parallel",e}(wt),DJ={mousedown:function(r){yx(this,"click")&&(this._mouseDownPoint=[r.offsetX,r.offsetY])},mouseup:function(r){var e=this._mouseDownPoint;if(yx(this,"click")&&e){var t=[r.offsetX,r.offsetY],n=Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2);if(n>CJ)return;var a=this._model.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]);a.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:a.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(r){if(!(this._mouseDownPoint||!yx(this,"mousemove"))){var e=this._model,t=e.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]),n=t.behavior;n==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(n==="none"?null:{axisExpandWindow:t.axisExpandWindow,animation:n==="jump"?null:{duration:0}})}}};function yx(r,e){var t=r._model;return t.get("axisExpandable")&&t.get("axisExpandTriggerOn")===e}var MJ=TJ,AJ=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){r.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var n=this.option;t&&Pe(n,t,!0),this._initDimensions()},e.prototype.contains=function(t,n){var a=t.get("parallelIndex");return a!=null&&n.getComponent("parallel",a)===this},e.prototype.setAxisExpand=function(t){L(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(n){t.hasOwnProperty(n)&&(this.option[n]=t[n])},this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],n=this.parallelAxisIndex=[],a=nt(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(i){return(i.get("parallelIndex")||0)===this.componentIndex},this);L(a,function(i){t.push("dim"+i.get("dim")),n.push(i.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}($e),LJ=AJ,IJ=function(r){j(e,r);function e(t,n,a,i,o){var s=r.call(this,t,n,a)||this;return s.type=i||"value",s.axisIndex=o,s}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e}(Un),PJ=IJ;function Zs(r,e,t,n,a,i){r=r||0;var o=t[1]-t[0];if(a!=null&&(a=Cu(a,[0,o])),i!=null&&(i=Math.max(i,a!=null?a:0)),n==="all"){var s=Math.abs(e[1]-e[0]);s=Cu(s,[0,o]),a=i=Cu(s,[a,i]),n=0}e[0]=Cu(e[0],t),e[1]=Cu(e[1],t);var l=mx(e,n);e[n]+=r;var u=a||0,c=t.slice();l.sign<0?c[0]+=u:c[1]-=u,e[n]=Cu(e[n],c);var f;return f=mx(e,n),a!=null&&(f.sign!==l.sign||f.span<a)&&(e[1-n]=e[n]+l.sign*a),f=mx(e,n),i!=null&&f.span>i&&(e[1-n]=e[n]+f.sign*i),e}function mx(r,e){var t=r[e]-r[1-e];return{span:Math.abs(t),sign:t>0?-1:t<0?1:e?-1:1}}function Cu(r,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,r))}var _x=L,HR=Math.min,GR=Math.max,WR=Math.floor,EJ=Math.ceil,UR=At,OJ=Math.PI,RJ=function(){function r(e,t,n){this.type="parallel",this._axesMap=ge(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,n)}return r.prototype._init=function(e,t,n){var a=e.dimensions,i=e.parallelAxisIndex;_x(a,function(o,s){var l=i[s],u=t.getComponent("parallelAxis",l),c=this._axesMap.set(o,new PJ(o,Ef(u),[0,0],u.get("type"),l)),f=c.type==="category";c.onBand=f&&u.get("boundaryGap"),c.inverse=u.get("inverse"),u.axis=c,c.model=u,c.coordinateSystem=u.coordinateSystem=this},this)},r.prototype.update=function(e,t){this._updateAxesFromSeries(this._model,e)},r.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),n=t.axisBase,a=t.layoutBase,i=t.pixelDimIndex,o=e[1-i],s=e[i];return o>=n&&o<=n+t.axisLength&&s>=a&&s<=a+t.layoutLength},r.prototype.getModel=function(){return this._model},r.prototype._updateAxesFromSeries=function(e,t){t.eachSeries(function(n){if(!!e.contains(n,t)){var a=n.getData();_x(this.dimensions,function(i){var o=this._axesMap.get(i);o.scale.unionExtentFromData(a,a.mapDimension(i)),Os(o.scale,o.model)},this)}},this)},r.prototype.resize=function(e,t){this._rect=Ht(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),this._layoutAxes()},r.prototype.getRect=function(){return this._rect},r.prototype._makeLayoutInfo=function(){var e=this._model,t=this._rect,n=["x","y"],a=["width","height"],i=e.get("layout"),o=i==="horizontal"?0:1,s=t[a[o]],l=[0,s],u=this.dimensions.length,c=tg(e.get("axisExpandWidth"),l),f=tg(e.get("axisExpandCount")||0,[0,u]),h=e.get("axisExpandable")&&u>3&&u>f&&f>1&&c>0&&s>0,v=e.get("axisExpandWindow"),d;if(v)d=tg(v[1]-v[0],l),v[1]=v[0]+d;else{d=tg(c*(f-1),l);var p=e.get("axisExpandCenter")||WR(u/2);v=[c*p-d/2],v[1]=v[0]+d}var g=(s-d)/(u-f);g<3&&(g=0);var y=[WR(UR(v[0]/c,1))+1,EJ(UR(v[1]/c,1))-1],m=g/c*v[0];return{layout:i,pixelDimIndex:o,layoutBase:t[n[o]],layoutLength:s,axisBase:t[n[1-o]],axisLength:t[a[1-o]],axisExpandable:h,axisExpandWidth:c,axisCollapseWidth:g,axisExpandWindow:v,axisCount:u,winInnerIndices:y,axisExpandWindow0Pos:m}},r.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,n=this.dimensions,a=this._makeLayoutInfo(),i=a.layout;t.each(function(o){var s=[0,a.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),_x(n,function(o,s){var l=(a.axisExpandable?kJ:NJ)(s,a),u={horizontal:{x:l.position,y:a.axisLength},vertical:{x:0,y:l.position}},c={horizontal:OJ/2,vertical:0},f=[u[i].x+e.x,u[i].y+e.y],h=c[i],v=gn();ji(v,v,h),oa(v,v,f),this._axesLayout[o]={position:f,rotation:h,transform:v,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},r.prototype.getAxis=function(e){return this._axesMap.get(e)},r.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},r.prototype.eachActiveState=function(e,t,n,a){n==null&&(n=0),a==null&&(a=e.count());var i=this._axesMap,o=this.dimensions,s=[],l=[];L(o,function(g){s.push(e.mapDimension(g)),l.push(i.get(g).model)});for(var u=this.hasAxisBrushed(),c=n;c<a;c++){var f=void 0;if(!u)f="normal";else{f="active";for(var h=e.getValues(s,c),v=0,d=o.length;v<d;v++){var p=l[v].getActiveState(h[v]);if(p==="inactive"){f="inactive";break}}}t(f,c)}},r.prototype.hasAxisBrushed=function(){for(var e=this.dimensions,t=this._axesMap,n=!1,a=0,i=e.length;a<i;a++)t.get(e[a]).model.getActiveState()!=="normal"&&(n=!0);return n},r.prototype.axisCoordToPoint=function(e,t){var n=this._axesLayout[t];return pa([e,0],n.transform)},r.prototype.getAxisLayout=function(e){return we(this._axesLayout[e])},r.prototype.getSlidedAxisExpandWindow=function(e){var t=this._makeLayoutInfo(),n=t.pixelDimIndex,a=t.axisExpandWindow.slice(),i=a[1]-a[0],o=[0,t.axisExpandWidth*(t.axisCount-1)];if(!this.containPoint(e))return{behavior:"none",axisExpandWindow:a};var s=e[n]-t.layoutBase-t.axisExpandWindow0Pos,l,u="slide",c=t.axisCollapseWidth,f=this._model.get("axisExpandSlideTriggerArea"),h=f[0]!=null;if(c)h&&c&&s<i*f[0]?(u="jump",l=s-i*f[2]):h&&c&&s>i*(1-f[0])?(u="jump",l=s-i*(1-f[2])):(l=s-i*f[1])>=0&&(l=s-i*(1-f[1]))<=0&&(l=0),l*=t.axisExpandWidth/c,l?Zs(l,a,o,"all"):u="none";else{var v=a[1]-a[0],d=o[1]*s/v;a=[GR(0,d-v/2)],a[1]=HR(o[1],a[0]+v),a[0]=a[1]-v}return{axisExpandWindow:a,behavior:u}},r}();function tg(r,e){return HR(GR(r,e[0]),e[1])}function NJ(r,e){var t=e.layoutLength/(e.axisCount-1);return{position:t*r,axisNameAvailableWidth:t,axisLabelShow:!0}}function kJ(r,e){var t=e.layoutLength,n=e.axisExpandWidth,a=e.axisCount,i=e.axisCollapseWidth,o=e.winInnerIndices,s,l=i,u=!1,c;return r<o[0]?(s=r*i,c=i):r<=o[1]?(s=e.axisExpandWindow0Pos+r*n-e.axisExpandWindow[0],l=n,u=!0):(s=t-(a-1-r)*i,c=i),{position:s,axisNameAvailableWidth:l,axisLabelShow:u,nameTruncateMaxWidth:c}}var BJ=RJ;function zJ(r,e){var t=[];return r.eachComponent("parallel",function(n,a){var i=new BJ(n,r,e);i.name="parallel_"+a,i.resize(n,e),n.coordinateSystem=i,i.model=n,t.push(i)}),r.eachSeries(function(n){if(n.get("coordinateSystem")==="parallel"){var a=n.getReferringComponents("parallel",$t).models[0];n.coordinateSystem=a.coordinateSystem}}),t}var FJ={create:zJ},VJ=FJ,jR=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.activeIntervals=[],t}return e.prototype.getAreaSelectStyle=function(){return is([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},e.prototype.setActiveIntervals=function(t){var n=this.activeIntervals=we(t);if(n)for(var a=n.length-1;a>=0;a--)_n(n[a])},e.prototype.getActiveState=function(t){var n=this.activeIntervals;if(!n.length)return"normal";if(t==null||isNaN(+t))return"inactive";if(n.length===1){var a=n[0];if(a[0]<=t&&t<=a[1])return"active"}else for(var i=0,o=n.length;i<o;i++)if(n[i][0]<=t&&t<=n[i][1])return"active";return"inactive"},e}($e);Et(jR,du);var YR=jR,Xs=!0,sh=Math.min,Tu=Math.max,$J=Math.pow,HJ=1e4,GJ=6,WJ=6,qR="globalPan",UJ={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},jJ={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},ZR={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},YJ=0,qJ=function(r){j(e,r);function e(t){var n=r.call(this)||this;return n._track=[],n._covers=[],n._handlers={},n._zr=t,n.group=new Te,n._uid="brushController_"+YJ++,L(tee,function(a,i){this._handlers[i]=fe(a,this)},n),n}return e.prototype.enableBrush=function(t){return this._brushType&&this._doDisableBrush(),t.brushType&&this._doEnableBrush(t),this},e.prototype._doEnableBrush=function(t){var n=this._zr;this._enableGlobalPan||aX(n,qR,this._uid),L(this._handlers,function(a,i){n.on(i,a)}),this._brushType=t.brushType,this._brushOption=Pe(we(ZR),t,!0)},e.prototype._doDisableBrush=function(){var t=this._zr;iX(t,qR,this._uid),L(this._handlers,function(n,a){t.off(a,n)}),this._brushType=this._brushOption=null},e.prototype.setPanels=function(t){if(t&&t.length){var n=this._panels={};L(t,function(a){n[a.panelId]=we(a)})}else this._panels=null;return this},e.prototype.mount=function(t){t=t||{},this._enableGlobalPan=t.enableGlobalPan;var n=this.group;return this._zr.add(n),n.attr({x:t.x||0,y:t.y||0,rotation:t.rotation||0,scaleX:t.scaleX||1,scaleY:t.scaleY||1}),this._transform=n.getLocalTransform(),this},e.prototype.updateCovers=function(t){t=J(t,function(h){return Pe(we(ZR),h,!0)});var n="\0-brush-index-",a=this._covers,i=this._covers=[],o=this,s=this._creatingCover;return new pi(a,t,u,l).add(c).update(c).remove(f).execute(),this;function l(h,v){return(h.id!=null?h.id:n+v)+"-"+h.brushType}function u(h,v){return l(h.__brushOption,v)}function c(h,v){var d=t[h];if(v!=null&&a[v]===s)i[h]=a[v];else{var p=i[h]=v!=null?(a[v].__brushOption=d,a[v]):QR(o,XR(o,d));bx(o,p)}}function f(h){a[h]!==s&&o.group.remove(a[h])}},e.prototype.unmount=function(){return this.enableBrush(!1),Cx(this),this._zr.remove(this.group),this},e.prototype.dispose=function(){this.unmount(),this.off()},e}(On);function XR(r,e){var t=rg[e.brushType].createCover(r,e);return t.__brushOption=e,JR(t,e),r.group.add(t),t}function QR(r,e){var t=xx(e);return t.endCreating&&(t.endCreating(r,e),JR(e,e.__brushOption)),e}function KR(r,e){var t=e.__brushOption;xx(e).updateCoverShape(r,e,t.range,t)}function JR(r,e){var t=e.z;t==null&&(t=HJ),r.traverse(function(n){n.z=t,n.z2=t})}function bx(r,e){xx(e).updateCommon(r,e),KR(r,e)}function xx(r){return rg[r.__brushOption.brushType]}function Sx(r,e,t){var n=r._panels;if(!n)return Xs;var a,i=r._transform;return L(n,function(o){o.isTargetByCursor(e,t,i)&&(a=o)}),a}function eN(r,e){var t=r._panels;if(!t)return Xs;var n=e.__brushOption.panelId;return n!=null?t[n]:Xs}function Cx(r){var e=r._covers,t=e.length;return L(e,function(n){r.group.remove(n)},r),e.length=0,!!t}function Qs(r,e){var t=J(r._covers,function(n){var a=n.__brushOption,i=we(a.range);return{brushType:a.brushType,panelId:a.panelId,range:i}});r.trigger("brush",{areas:t,isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function ZJ(r){var e=r._track;if(!e.length)return!1;var t=e[e.length-1],n=e[0],a=t[0]-n[0],i=t[1]-n[1],o=$J(a*a+i*i,.5);return o>GJ}function tN(r){var e=r.length-1;return e<0&&(e=0),[r[0],r[e]]}function rN(r,e,t,n){var a=new Te;return a.add(new Ge({name:"main",style:Dx(t),silent:!0,draggable:!0,cursor:"move",drift:Ae(iN,r,e,a,["n","s","w","e"]),ondragend:Ae(Qs,e,{isEnd:!0})})),L(n,function(i){a.add(new Ge({name:i.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Ae(iN,r,e,a,i),ondragend:Ae(Qs,e,{isEnd:!0})}))}),a}function nN(r,e,t,n){var a=n.brushStyle.lineWidth||0,i=Tu(a,WJ),o=t[0][0],s=t[1][0],l=o-a/2,u=s-a/2,c=t[0][1],f=t[1][1],h=c-i+a/2,v=f-i+a/2,d=c-o,p=f-s,g=d+a,y=p+a;bi(r,e,"main",o,s,d,p),n.transformable&&(bi(r,e,"w",l,u,i,y),bi(r,e,"e",h,u,i,y),bi(r,e,"n",l,u,g,i),bi(r,e,"s",l,v,g,i),bi(r,e,"nw",l,u,i,i),bi(r,e,"ne",h,u,i,i),bi(r,e,"sw",l,v,i,i),bi(r,e,"se",h,v,i,i))}function Tx(r,e){var t=e.__brushOption,n=t.transformable,a=e.childAt(0);a.useStyle(Dx(t)),a.attr({silent:!n,cursor:n?"move":"default"}),L([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(i){var o=e.childOfName(i.join("")),s=i.length===1?Mx(r,i[0]):QJ(r,i);o&&o.attr({silent:!n,invisible:!n,cursor:n?jJ[s]+"-resize":null})})}function bi(r,e,t,n,a,i,o){var s=e.childOfName(t);s&&s.setShape(JJ(Ax(r,e,[[n,a],[n+i,a+o]])))}function Dx(r){return me({strokeNoScale:!0},r.brushStyle)}function aN(r,e,t,n){var a=[sh(r,t),sh(e,n)],i=[Tu(r,t),Tu(e,n)];return[[a[0],i[0]],[a[1],i[1]]]}function XJ(r){return io(r.group)}function Mx(r,e){var t={w:"left",e:"right",n:"top",s:"bottom"},n={left:"w",right:"e",top:"n",bottom:"s"},a=Id(t[e],XJ(r));return n[a]}function QJ(r,e){var t=[Mx(r,e[0]),Mx(r,e[1])];return(t[0]==="e"||t[0]==="w")&&t.reverse(),t.join("")}function iN(r,e,t,n,a,i){var o=t.__brushOption,s=r.toRectRange(o.range),l=oN(e,a,i);L(n,function(u){var c=UJ[u];s[c[0]][c[1]]+=l[c[0]]}),o.range=r.fromRectRange(aN(s[0][0],s[1][0],s[0][1],s[1][1])),bx(e,t),Qs(e,{isEnd:!1})}function KJ(r,e,t,n){var a=e.__brushOption.range,i=oN(r,t,n);L(a,function(o){o[0]+=i[0],o[1]+=i[1]}),bx(r,e),Qs(r,{isEnd:!1})}function oN(r,e,t){var n=r.group,a=n.transformCoordToLocal(e,t),i=n.transformCoordToLocal(0,0);return[a[0]-i[0],a[1]-i[1]]}function Ax(r,e,t){var n=eN(r,e);return n&&n!==Xs?n.clipPath(t,r._transform):we(t)}function JJ(r){var e=sh(r[0][0],r[1][0]),t=sh(r[0][1],r[1][1]),n=Tu(r[0][0],r[1][0]),a=Tu(r[0][1],r[1][1]);return{x:e,y:t,width:n-e,height:a-t}}function eee(r,e,t){if(!(!r._brushType||ree(r,e.offsetX,e.offsetY))){var n=r._zr,a=r._covers,i=Sx(r,e,t);if(!r._dragging)for(var o=0;o<a.length;o++){var s=a[o].__brushOption;if(i&&(i===Xs||s.panelId===i.panelId)&&rg[s.brushType].contain(a[o],t[0],t[1]))return}i&&n.setCursorStyle("crosshair")}}function Lx(r){var e=r.event;e.preventDefault&&e.preventDefault()}function Ix(r,e,t){return r.childOfName("main").contain(e,t)}function sN(r,e,t,n){var a=r._creatingCover,i=r._creatingPanel,o=r._brushOption,s;if(r._track.push(t.slice()),ZJ(r)||a){if(i&&!a){o.brushMode==="single"&&Cx(r);var l=we(o);l.brushType=lN(l.brushType,i),l.panelId=i===Xs?null:i.panelId,a=r._creatingCover=XR(r,l),r._covers.push(a)}if(a){var u=rg[lN(r._brushType,i)],c=a.__brushOption;c.range=u.getCreatingRange(Ax(r,a,r._track)),n&&(QR(r,a),u.updateCommon(r,a)),KR(r,a),s={isEnd:n}}}else n&&o.brushMode==="single"&&o.removeOnClick&&Sx(r,e,t)&&Cx(r)&&(s={isEnd:n,removeOnClick:!0});return s}function lN(r,e){return r==="auto"?e.defaultBrushType:r}var tee={mousedown:function(r){if(this._dragging)uN(this,r);else if(!r.target||!r.target.draggable){Lx(r);var e=this.group.transformCoordToLocal(r.offsetX,r.offsetY);this._creatingCover=null;var t=this._creatingPanel=Sx(this,r,e);t&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(r){var e=r.offsetX,t=r.offsetY,n=this.group.transformCoordToLocal(e,t);if(eee(this,r,n),this._dragging){Lx(r);var a=sN(this,r,n,!1);a&&Qs(this,a)}},mouseup:function(r){uN(this,r)}};function uN(r,e){if(r._dragging){Lx(e);var t=e.offsetX,n=e.offsetY,a=r.group.transformCoordToLocal(t,n),i=sN(r,e,a,!0);r._dragging=!1,r._track=[],r._creatingCover=null,i&&Qs(r,i)}}function ree(r,e,t){var n=r._zr;return e<0||e>n.getWidth()||t<0||t>n.getHeight()}var rg={lineX:cN(0),lineY:cN(1),rect:{createCover:function(r,e){function t(n){return n}return rN({toRectRange:t,fromRectRange:t},r,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var e=tN(r);return aN(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(r,e,t,n){nN(r,e,t,n)},updateCommon:Tx,contain:Ix},polygon:{createCover:function(r,e){var t=new Te;return t.add(new Wr({name:"main",style:Dx(e),silent:!0})),t},getCreatingRange:function(r){return r},endCreating:function(r,e){e.remove(e.childAt(0)),e.add(new Gr({name:"main",draggable:!0,drift:Ae(KJ,r,e),ondragend:Ae(Qs,r,{isEnd:!0})}))},updateCoverShape:function(r,e,t,n){e.childAt(0).setShape({points:Ax(r,e,t)})},updateCommon:Tx,contain:Ix}};function cN(r){return{createCover:function(e,t){return rN({toRectRange:function(n){var a=[n,[0,100]];return r&&a.reverse(),a},fromRectRange:function(n){return n[r]}},e,t,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(e){var t=tN(e),n=sh(t[0][r],t[1][r]),a=Tu(t[0][r],t[1][r]);return[n,a]},updateCoverShape:function(e,t,n,a){var i,o=eN(e,t);if(o!==Xs&&o.getLinearBrushOtherExtent)i=o.getLinearBrushOtherExtent(r);else{var s=e._zr;i=[0,[s.getWidth(),s.getHeight()][1-r]]}var l=[n,i];r&&l.reverse(),nN(e,t,l,a)},updateCommon:Tx,contain:Ix}}var Px=qJ;function fN(r){return r=Ex(r),function(e){return b_(e,r)}}function hN(r,e){return r=Ex(r),function(t){var n=e!=null?e:t,a=n?r.width:r.height,i=n?r.x:r.y;return[i,i+(a||0)]}}function vN(r,e,t){var n=Ex(r);return function(a,i){return n.contain(i[0],i[1])&&!$p(a,e,t)}}function Ex(r){return Re.create(r)}var nee=["axisLine","axisTickLabel","axisName"],aee=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){r.prototype.init.apply(this,arguments),(this._brushController=new Px(n.getZr())).on("brush",fe(this._onBrush,this))},e.prototype.render=function(t,n,a,i){if(!iee(t,n,i)){this.axisModel=t,this.api=a,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new Te,this.group.add(this._axisGroup),!!t.get("show")){var s=see(t,n),l=s.coordinateSystem,u=t.getAreaSelectStyle(),c=u.width,f=t.axis.dim,h=l.getAxisLayout(f),v=Q({strokeContainThreshold:c},h),d=new mi(t,v);L(nee,d.add,d),this._axisGroup.add(d.getGroup()),this._refreshBrushController(v,u,t,s,c,a),rf(o,this._axisGroup,t)}}},e.prototype._refreshBrushController=function(t,n,a,i,o,s){var l=a.axis.getExtent(),u=l[1]-l[0],c=Math.min(30,Math.abs(u)*.1),f=Re.create({x:l[0],y:-o/2,width:u,height:o});f.x-=c,f.width+=2*c,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,x:t.position[0],y:t.position[1]}).setPanels([{panelId:"pl",clipPath:fN(f),isTargetByCursor:vN(f,s,i),getLinearBrushOtherExtent:hN(f,0)}]).enableBrush({brushType:"lineX",brushStyle:n,removeOnClick:!0}).updateCovers(oee(a))},e.prototype._onBrush=function(t){var n=t.areas,a=this.axisModel,i=a.axis,o=J(n,function(s){return[i.coordToData(s.range[0],!0),i.coordToData(s.range[1],!0)]});(!a.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:a.id,intervals:o})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e}(wt);function iee(r,e,t){return t&&t.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:t})[0]===r}function oee(r){var e=r.axis;return J(r.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}function see(r,e){return e.getComponent("parallel",r.get("parallelIndex"))}var lee=aee,uee={type:"axisAreaSelect",event:"axisAreaSelected"};function cee(r){r.registerAction(uee,function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(n){n.axis.model.setActiveIntervals(e.intervals)})}),r.registerAction("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(n){n.setAxisExpand(e)})})}var fee={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function dN(r){r.registerComponentView(MJ),r.registerComponentModel(LJ),r.registerCoordinateSystem("parallel",VJ),r.registerPreprocessor(xJ),r.registerComponentModel(YR),r.registerComponentView(lee),_u(r,"parallel",YR,fee),cee(r)}function hee(r){ke(dN),r.registerChartView(vJ),r.registerSeriesModel(yJ),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,bJ)}var vee=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return r}(),dee=function(r){j(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new vee},e.prototype.buildPath=function(t,n){var a=n.extent;t.moveTo(n.x1,n.y1),t.bezierCurveTo(n.cpx1,n.cpy1,n.cpx2,n.cpy2,n.x2,n.y2),n.orient==="vertical"?(t.lineTo(n.x2+a,n.y2),t.bezierCurveTo(n.cpx2+a,n.cpy2,n.cpx1+a,n.cpy1,n.x1+a,n.y1)):(t.lineTo(n.x2,n.y2+a),t.bezierCurveTo(n.cpx2,n.cpy2+a,n.cpx1,n.cpy1+a,n.x1,n.y1+a)),t.closePath()},e.prototype.highlight=function(){hi(this)},e.prototype.downplay=function(){vi(this)},e}(Be),pee=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._focusAdjacencyDisabled=!1,t}return e.prototype.render=function(t,n,a){var i=this,o=t.getGraph(),s=this.group,l=t.layoutInfo,u=l.width,c=l.height,f=t.getData(),h=t.getData("edge"),v=t.get("orient");this._model=t,s.removeAll(),s.x=l.x,s.y=l.y,o.eachEdge(function(d){var p=new dee,g=Me(p);g.dataIndex=d.dataIndex,g.seriesIndex=t.seriesIndex,g.dataType="edge";var y=d.getModel(),m=y.getModel("lineStyle"),_=m.get("curveness"),b=d.node1.getLayout(),w=d.node1.getModel(),x=w.get("localX"),S=w.get("localY"),T=d.node2.getLayout(),D=d.node2.getModel(),M=D.get("localX"),A=D.get("localY"),I=d.getLayout(),P,E,O,N,V,$,U,Y;switch(p.shape.extent=Math.max(1,I.dy),p.shape.orient=v,v==="vertical"?(P=(x!=null?x*u:b.x)+I.sy,E=(S!=null?S*c:b.y)+b.dy,O=(M!=null?M*u:T.x)+I.ty,N=A!=null?A*c:T.y,V=P,$=E*(1-_)+N*_,U=O,Y=E*_+N*(1-_)):(P=(x!=null?x*u:b.x)+b.dx,E=(S!=null?S*c:b.y)+I.sy,O=M!=null?M*u:T.x,N=(A!=null?A*c:T.y)+I.ty,V=P*(1-_)+O*_,$=E,U=P*_+O*(1-_),Y=N),p.setShape({x1:P,y1:E,x2:O,y2:N,cpx1:V,cpy1:$,cpx2:U,cpy2:Y}),p.useStyle(m.getItemStyle()),p.style.fill){case"source":p.style.fill=d.node1.getVisual("color"),p.style.decal=d.node1.getVisual("style").decal;break;case"target":p.style.fill=d.node2.getVisual("color"),p.style.decal=d.node2.getVisual("style").decal;break;case"gradient":var ae=d.node1.getVisual("color"),H=d.node2.getVisual("color");ce(ae)&&ce(H)&&(p.style.fill=new Hl(0,0,+(v==="horizontal"),+(v==="vertical"),[{color:ae,offset:0},{color:H,offset:1}]))}yr(p,rr(y,"edgeLabel"),{labelFetcher:t,labelDataIndex:d.dataIndex,defaultText:""+y.get("value")}),p.setTextConfig({position:"inside"});var q=y.getModel("emphasis");gr(p,y,"lineStyle",function(Z){return Z.getItemStyle()}),s.add(p),h.setItemGraphicEl(d.dataIndex,p);var X=q.get("focus");Lt(p,X==="adjacency"?d.getAdjacentDataIndices():X,q.get("blurScope"),q.get("disabled")),Me(p).dataType="edge"}),o.eachNode(function(d){var p=d.getLayout(),g=d.getModel(),y=g.get("localX"),m=g.get("localY"),_=g.getModel("emphasis"),b=new Ge({shape:{x:y!=null?y*u:p.x,y:m!=null?m*c:p.y,width:p.dx,height:p.dy},style:g.getModel("itemStyle").getItemStyle(),z2:10});yr(b,rr(g),{labelFetcher:t,labelDataIndex:d.dataIndex,defaultText:d.id}),b.disableLabelAnimation=!0,b.setStyle("fill",d.getVisual("color")),b.setStyle("decal",d.getVisual("style").decal),gr(b,g),s.add(b),f.setItemGraphicEl(d.dataIndex,b),Me(b).dataType="node";var w=_.get("focus");Lt(b,w==="adjacency"?d.getAdjacentDataIndices():w,_.get("blurScope"),_.get("disabled"))}),f.eachItemGraphicEl(function(d,p){var g=f.getItemModel(p);g.get("draggable")&&(d.drift=function(y,m){i._focusAdjacencyDisabled=!0,this.shape.x+=y,this.shape.y+=m,this.dirty(),a.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:f.getRawIndex(p),localX:this.shape.x/u,localY:this.shape.y/c})},d.ondragend=function(){i._focusAdjacencyDisabled=!1},d.draggable=!0,d.cursor="move")}),!this._data&&t.isAnimationEnabled()&&s.setClipPath(gee(s.getBoundingRect(),t,function(){s.removeClipPath()})),this._data=t.getData()},e.prototype.dispose=function(){},e.type="sankey",e}(ut);function gee(r,e,t){var n=new Ge({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return xt(n,{shape:{width:r.width+20}},e,t),n}var yee=pee,mee=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,n){var a=t.edges||t.links,i=t.data||t.nodes,o=t.levels;this.levelModels=[];for(var s=this.levelModels,l=0;l<o.length;l++)o[l].depth!=null&&o[l].depth>=0&&(s[o[l].depth]=new lt(o[l],this,n));if(i&&a){var u=zR(i,a,this,!0,c);return u.data}function c(f,h){f.wrapMethod("getItemModel",function(v,d){var p=v.parentModel,g=p.getData().getItemLayout(d);if(g){var y=g.depth,m=p.levelModels[y];m&&(v.parentModel=m)}return v}),h.wrapMethod("getItemModel",function(v,d){var p=v.parentModel,g=p.getGraph().getEdgeByIndex(d),y=g.node1.getLayout();if(y){var m=y.depth,_=p.levelModels[m];_&&(v.parentModel=_)}return v})}},e.prototype.setNodePosition=function(t,n){var a=this.option.data||this.option.nodes,i=a[t];i.localX=n[0],i.localY=n[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,n,a){function i(v){return isNaN(v)||v==null}if(a==="edge"){var o=this.getDataParams(t,a),s=o.data,l=o.value,u=s.source+" -- "+s.target;return nr("nameValue",{name:u,value:l,noValue:i(l)})}else{var c=this.getGraph().getNodeByIndex(t),f=c.getLayout().value,h=this.getDataParams(t,a).data.name;return nr("nameValue",{name:h!=null?h+"":null,value:f,noValue:i(f)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(t,n){var a=r.prototype.getDataParams.call(this,t,n);if(a.value==null&&n==="node"){var i=this.getGraph().getNodeByIndex(t),o=i.getLayout().value;a.value=o}return a},e.type="series.sankey",e.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(yt),_ee=mee;function bee(r,e){r.eachSeriesByType("sankey",function(t){var n=t.get("nodeWidth"),a=t.get("nodeGap"),i=xee(t,e);t.layoutInfo=i;var o=i.width,s=i.height,l=t.getGraph(),u=l.nodes,c=l.edges;See(u);var f=nt(u,function(p){return p.getLayout().value===0}),h=f.length!==0?0:t.get("layoutIterations"),v=t.get("orient"),d=t.get("nodeAlign");wee(u,c,n,a,o,s,h,v,d)})}function xee(r,e){return Ht(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function wee(r,e,t,n,a,i,o,s,l){Cee(r,e,t,a,i,s,l),Aee(r,e,i,a,n,o,s),Bee(r,s)}function See(r){L(r,function(e){var t=wo(e.outEdges,ng),n=wo(e.inEdges,ng),a=e.getValue()||0,i=Math.max(t,n,a);e.setLayout({value:i},!0)})}function Cee(r,e,t,n,a,i,o){for(var s=[],l=[],u=[],c=[],f=0,h=0;h<e.length;h++)s[h]=1;for(var h=0;h<r.length;h++)l[h]=r[h].inEdges.length,l[h]===0&&u.push(r[h]);for(var v=-1;u.length;){for(var d=0;d<u.length;d++){var p=u[d],g=p.hostGraph.data.getRawDataItem(p.dataIndex),y=g.depth!=null&&g.depth>=0;y&&g.depth>v&&(v=g.depth),p.setLayout({depth:y?g.depth:f},!0),i==="vertical"?p.setLayout({dy:t},!0):p.setLayout({dx:t},!0);for(var m=0;m<p.outEdges.length;m++){var _=p.outEdges[m],b=e.indexOf(_);s[b]=0;var w=_.node2,x=r.indexOf(w);--l[x]===0&&c.indexOf(w)<0&&c.push(w)}}++f,u=c,c=[]}for(var h=0;h<s.length;h++)if(s[h]===1)throw new Error("Sankey is a DAG, the original data has cycle!");var S=v>f-1?v:f-1;o&&o!=="left"&&Tee(r,o,i,S);var T=i==="vertical"?(a-t)/S:(n-t)/S;Mee(r,T,i)}function pN(r){var e=r.hostGraph.data.getRawDataItem(r.dataIndex);return e.depth!=null&&e.depth>=0}function Tee(r,e,t,n){if(e==="right"){for(var a=[],i=r,o=0;i.length;){for(var s=0;s<i.length;s++){var l=i[s];l.setLayout({skNodeHeight:o},!0);for(var u=0;u<l.inEdges.length;u++){var c=l.inEdges[u];a.indexOf(c.node1)<0&&a.push(c.node1)}}i=a,a=[],++o}L(r,function(f){pN(f)||f.setLayout({depth:Math.max(0,n-f.getLayout().skNodeHeight)},!0)})}else e==="justify"&&Dee(r,n)}function Dee(r,e){L(r,function(t){!pN(t)&&!t.outEdges.length&&t.setLayout({depth:e},!0)})}function Mee(r,e,t){L(r,function(n){var a=n.getLayout().depth*e;t==="vertical"?n.setLayout({y:a},!0):n.setLayout({x:a},!0)})}function Aee(r,e,t,n,a,i,o){var s=Lee(r,o);Iee(s,e,t,n,a,o),Ox(s,a,t,n,o);for(var l=1;i>0;i--)l*=.99,Pee(s,l,o),Ox(s,a,t,n,o),kee(s,l,o),Ox(s,a,t,n,o)}function Lee(r,e){var t=[],n=e==="vertical"?"y":"x",a=k0(r,function(i){return i.getLayout()[n]});return a.keys.sort(function(i,o){return i-o}),L(a.keys,function(i){t.push(a.buckets.get(i))}),t}function Iee(r,e,t,n,a,i){var o=1/0;L(r,function(s){var l=s.length,u=0;L(s,function(f){u+=f.getLayout().value});var c=i==="vertical"?(n-(l-1)*a)/u:(t-(l-1)*a)/u;c<o&&(o=c)}),L(r,function(s){L(s,function(l,u){var c=l.getLayout().value*o;i==="vertical"?(l.setLayout({x:u},!0),l.setLayout({dx:c},!0)):(l.setLayout({y:u},!0),l.setLayout({dy:c},!0))})}),L(e,function(s){var l=+s.getValue()*o;s.setLayout({dy:l},!0)})}function Ox(r,e,t,n,a){var i=a==="vertical"?"x":"y";L(r,function(o){o.sort(function(p,g){return p.getLayout()[i]-g.getLayout()[i]});for(var s,l,u,c=0,f=o.length,h=a==="vertical"?"dx":"dy",v=0;v<f;v++)l=o[v],u=c-l.getLayout()[i],u>0&&(s=l.getLayout()[i]+u,a==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[i]+l.getLayout()[h]+e;var d=a==="vertical"?n:t;if(u=c-e-d,u>0){s=l.getLayout()[i]-u,a==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),c=s;for(var v=f-2;v>=0;--v)l=o[v],u=l.getLayout()[i]+l.getLayout()[h]+e-c,u>0&&(s=l.getLayout()[i]-u,a==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[i]}})}function Pee(r,e,t){L(r.slice().reverse(),function(n){L(n,function(a){if(a.outEdges.length){var i=wo(a.outEdges,Eee,t)/wo(a.outEdges,ng);if(isNaN(i)){var o=a.outEdges.length;i=o?wo(a.outEdges,Oee,t)/o:0}if(t==="vertical"){var s=a.getLayout().x+(i-xo(a,t))*e;a.setLayout({x:s},!0)}else{var l=a.getLayout().y+(i-xo(a,t))*e;a.setLayout({y:l},!0)}}})})}function Eee(r,e){return xo(r.node2,e)*r.getValue()}function Oee(r,e){return xo(r.node2,e)}function Ree(r,e){return xo(r.node1,e)*r.getValue()}function Nee(r,e){return xo(r.node1,e)}function xo(r,e){return e==="vertical"?r.getLayout().x+r.getLayout().dx/2:r.getLayout().y+r.getLayout().dy/2}function ng(r){return r.getValue()}function wo(r,e,t){for(var n=0,a=r.length,i=-1;++i<a;){var o=+e(r[i],t);isNaN(o)||(n+=o)}return n}function kee(r,e,t){L(r,function(n){L(n,function(a){if(a.inEdges.length){var i=wo(a.inEdges,Ree,t)/wo(a.inEdges,ng);if(isNaN(i)){var o=a.inEdges.length;i=o?wo(a.inEdges,Nee,t)/o:0}if(t==="vertical"){var s=a.getLayout().x+(i-xo(a,t))*e;a.setLayout({x:s},!0)}else{var l=a.getLayout().y+(i-xo(a,t))*e;a.setLayout({y:l},!0)}}})})}function Bee(r,e){var t=e==="vertical"?"x":"y";L(r,function(n){n.outEdges.sort(function(a,i){return a.node2.getLayout()[t]-i.node2.getLayout()[t]}),n.inEdges.sort(function(a,i){return a.node1.getLayout()[t]-i.node1.getLayout()[t]})}),L(r,function(n){var a=0,i=0;L(n.outEdges,function(o){o.setLayout({sy:a},!0),a+=o.getLayout().dy}),L(n.inEdges,function(o){o.setLayout({ty:i},!0),i+=o.getLayout().dy})})}function zee(r){r.eachSeriesByType("sankey",function(e){var t=e.getGraph(),n=t.nodes,a=t.edges;if(n.length){var i=1/0,o=-1/0;L(n,function(s){var l=s.getLayout().value;l<i&&(i=l),l>o&&(o=l)}),L(n,function(s){var l=new _r({type:"color",mappingMethod:"linear",dataExtent:[i,o],visual:e.get("color")}),u=l.mapValueToVisual(s.getLayout().value),c=s.getModel().get(["itemStyle","color"]);c!=null?(s.setVisual("color",c),s.setVisual("style",{fill:c})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}a.length&&L(a,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function Fee(r){r.registerChartView(yee),r.registerSeriesModel(_ee),r.registerLayout(bee),r.registerVisual(zee),r.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(n){n.setNodePosition(e.dataIndex,[e.localX,e.localY])})})}var gN=function(){function r(){}return r.prototype.getInitialData=function(e,t){var n,a=t.getComponent("xAxis",this.get("xAxisIndex")),i=t.getComponent("yAxis",this.get("yAxisIndex")),o=a.get("type"),s=i.get("type"),l;o==="category"?(e.layout="horizontal",n=a.getOrdinalMeta(),l=!0):s==="category"?(e.layout="vertical",n=i.getOrdinalMeta(),l=!0):e.layout=e.layout||"horizontal";var u=["x","y"],c=e.layout==="horizontal"?0:1,f=this._baseAxisDim=u[c],h=u[1-c],v=[a,i],d=v[c].get("type"),p=v[1-c].get("type"),g=e.data;if(g&&l){var y=[];L(g,function(b,w){var x;K(b)?(x=b.slice(),b.unshift(w)):K(b.value)?(x=Q({},b),x.value=x.value.slice(),b.value.unshift(w)):x=b,y.push(x)}),e.data=y}var m=this.defaultValueDimensions,_=[{name:f,type:vp(d),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:h,type:vp(p),dimsDef:m.slice()}];return mu(this,{coordDimensions:_,dimensionsCount:m.length+1,encodeDefaulter:Ae(SA,_,this)})},r.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},r}(),yN=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],t.visualDrawType="stroke",t}return e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},e}(yt);Et(yN,gN,!0);var Vee=yN,$ee=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=t.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=t.get("layout")==="horizontal"?1:0;i.diff(s).add(function(u){if(i.hasValue(u)){var c=i.getItemLayout(u),f=mN(c,i,u,l,!0);i.setItemGraphicEl(u,f),o.add(f)}}).update(function(u,c){var f=s.getItemGraphicEl(c);if(!i.hasValue(u)){o.remove(f);return}var h=i.getItemLayout(u);f?(da(f),_N(h,f,i,u)):f=mN(h,i,u,l),o.add(f),i.setItemGraphicEl(u,f)}).remove(function(u){var c=s.getItemGraphicEl(u);c&&o.remove(c)}).execute(),this._data=i},e.prototype.remove=function(t){var n=this.group,a=this._data;this._data=null,a&&a.eachItemGraphicEl(function(i){i&&n.remove(i)})},e.type="boxplot",e}(ut),Hee=function(){function r(){}return r}(),Gee=function(r){j(e,r);function e(t){var n=r.call(this,t)||this;return n.type="boxplotBoxPath",n}return e.prototype.getDefaultShape=function(){return new Hee},e.prototype.buildPath=function(t,n){var a=n.points,i=0;for(t.moveTo(a[i][0],a[i][1]),i++;i<4;i++)t.lineTo(a[i][0],a[i][1]);for(t.closePath();i<a.length;i++)t.moveTo(a[i][0],a[i][1]),i++,t.lineTo(a[i][0],a[i][1])},e}(Be);function mN(r,e,t,n,a){var i=r.ends,o=new Gee({shape:{points:a?Wee(i,n,r):i}});return _N(r,o,e,t,a),o}function _N(r,e,t,n,a){var i=t.hostModel,o=af[a?"initProps":"updateProps"];o(e,{shape:{points:r.ends}},i,n),e.useStyle(t.getItemVisual(n,"style")),e.style.strokeNoScale=!0,e.z2=100;var s=t.getItemModel(n),l=s.getModel("emphasis");gr(e,s),Lt(e,l.get("focus"),l.get("blurScope"),l.get("disabled"))}function Wee(r,e,t){return J(r,function(n){return n=n.slice(),n[e]=t.initBaseline,n})}var Uee=$ee,lh=L;function jee(r){var e=Yee(r);lh(e,function(t){var n=t.seriesModels;!n.length||(qee(t),lh(n,function(a,i){Zee(a,t.boxOffsetList[i],t.boxWidthList[i])}))})}function Yee(r){var e=[],t=[];return r.eachSeriesByType("boxplot",function(n){var a=n.getBaseAxis(),i=Ne(t,a);i<0&&(i=t.length,t[i]=a,e[i]={axis:a,seriesModels:[]}),e[i].seriesModels.push(n)}),e}function qee(r){var e=r.axis,t=r.seriesModels,n=t.length,a=r.boxWidthList=[],i=r.boxOffsetList=[],o=[],s;if(e.type==="category")s=e.getBandWidth();else{var l=0;lh(t,function(d){l=Math.max(l,d.getData().count())});var u=e.getExtent();s=Math.abs(u[1]-u[0])/l}lh(t,function(d){var p=d.get("boxWidth");K(p)||(p=[p,p]),o.push([le(p[0],s)||0,le(p[1],s)||0])});var c=s*.8-2,f=c/n*.3,h=(c-f*(n-1))/n,v=h/2-c/2;lh(t,function(d,p){i.push(v),v+=f+h,a.push(Math.min(Math.max(h,o[p][0]),o[p][1]))})}function Zee(r,e,t){var n=r.coordinateSystem,a=r.getData(),i=t/2,o=r.get("layout")==="horizontal"?0:1,s=1-o,l=["x","y"],u=a.mapDimension(l[o]),c=a.mapDimensionsAll(l[s]);if(u==null||c.length<5)return;for(var f=0;f<a.count();f++){var h=a.get(u,f),v=_(h,c[2],f),d=_(h,c[0],f),p=_(h,c[1],f),g=_(h,c[3],f),y=_(h,c[4],f),m=[];b(m,p,!1),b(m,g,!0),m.push(d,p,y,g),w(m,d),w(m,y),w(m,v),a.setItemLayout(f,{initBaseline:v[s],ends:m})}function _(x,S,T){var D=a.get(S,T),M=[];M[o]=x,M[s]=D;var A;return isNaN(x)||isNaN(D)?A=[NaN,NaN]:(A=n.dataToPoint(M),A[o]+=e),A}function b(x,S,T){var D=S.slice(),M=S.slice();D[o]+=i,M[o]-=i,T?x.push(D,M):x.push(M,D)}function w(x,S){var T=S.slice(),D=S.slice();T[o]-=i,D[o]+=i,x.push(T,D)}}function Xee(r,e){e=e||{};for(var t=[],n=[],a=e.boundIQR,i=a==="none"||a===0,o=0;o<r.length;o++){var s=_n(r[o].slice()),l=nd(s,.25),u=nd(s,.5),c=nd(s,.75),f=s[0],h=s[s.length-1],v=(a==null?1.5:a)*(c-l),d=i?f:Math.max(f,l-v),p=i?h:Math.min(h,c+v),g=e.itemNameFormatter,y=ye(g)?g({value:o}):ce(g)?g.replace("{value}",o+""):o+"";t.push([y,d,l,u,c,p]);for(var m=0;m<s.length;m++){var _=s[m];if(_<d||_>p){var b=[y,_];n.push(b)}}}return{boxData:t,outliers:n}}var Qee={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==Lr){var n="";tt(n)}var a=Xee(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:a.boxData},{data:a.outliers}]}};function Kee(r){r.registerSeriesModel(Vee),r.registerChartView(Uee),r.registerLayout(jee),r.registerTransform(Qee)}var Jee=["color","borderColor"],ete=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,n,a){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,n,a,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,n):this._incrementalRenderNormal(t,n)},e.prototype.eachRendered=function(t){oo(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var n=t.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},e.prototype._renderNormal=function(t){var n=t.getData(),a=this._data,i=this.group,o=n.getLayout("isSimpleBox"),s=t.get("clip",!0),l=t.coordinateSystem,u=l.getArea&&l.getArea();this._data||i.removeAll(),n.diff(a).add(function(c){if(n.hasValue(c)){var f=n.getItemLayout(c);if(s&&bN(u,f))return;var h=Rx(f,c,!0);xt(h,{shape:{points:f.ends}},t,c),Nx(h,n,c,o),i.add(h),n.setItemGraphicEl(c,h)}}).update(function(c,f){var h=a.getItemGraphicEl(f);if(!n.hasValue(c)){i.remove(h);return}var v=n.getItemLayout(c);if(s&&bN(u,v)){i.remove(h);return}h?(qe(h,{shape:{points:v.ends}},t,c),da(h)):h=Rx(v),Nx(h,n,c,o),i.add(h),n.setItemGraphicEl(c,h)}).remove(function(c){var f=a.getItemGraphicEl(c);f&&i.remove(f)}).execute(),this._data=n},e.prototype._renderLarge=function(t){this._clear(),xN(t,this.group);var n=t.get("clip",!0)?Ep(t.coordinateSystem,!1,t):null;n?this.group.setClipPath(n):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,n){for(var a=n.getData(),i=a.getLayout("isSimpleBox"),o;(o=t.next())!=null;){var s=a.getItemLayout(o),l=Rx(s);Nx(l,a,o,i),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(t,n){xN(n,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(ut),tte=function(){function r(){}return r}(),rte=function(r){j(e,r);function e(t){var n=r.call(this,t)||this;return n.type="normalCandlestickBox",n}return e.prototype.getDefaultShape=function(){return new tte},e.prototype.buildPath=function(t,n){var a=n.points;this.__simpleBox?(t.moveTo(a[4][0],a[4][1]),t.lineTo(a[6][0],a[6][1])):(t.moveTo(a[0][0],a[0][1]),t.lineTo(a[1][0],a[1][1]),t.lineTo(a[2][0],a[2][1]),t.lineTo(a[3][0],a[3][1]),t.closePath(),t.moveTo(a[4][0],a[4][1]),t.lineTo(a[5][0],a[5][1]),t.moveTo(a[6][0],a[6][1]),t.lineTo(a[7][0],a[7][1]))},e}(Be);function Rx(r,e,t){var n=r.ends;return new rte({shape:{points:t?nte(n,r):n},z2:100})}function bN(r,e){for(var t=!0,n=0;n<e.ends.length;n++)if(r.contain(e.ends[n][0],e.ends[n][1])){t=!1;break}return t}function Nx(r,e,t,n){var a=e.getItemModel(t);r.useStyle(e.getItemVisual(t,"style")),r.style.strokeNoScale=!0,r.__simpleBox=n,gr(r,a)}function nte(r,e){return J(r,function(t){return t=t.slice(),t[1]=e.initBaseline,t})}var ate=function(){function r(){}return r}(),kx=function(r){j(e,r);function e(t){var n=r.call(this,t)||this;return n.type="largeCandlestickBox",n}return e.prototype.getDefaultShape=function(){return new ate},e.prototype.buildPath=function(t,n){for(var a=n.points,i=0;i<a.length;)if(this.__sign===a[i++]){var o=a[i++];t.moveTo(o,a[i++]),t.lineTo(o,a[i++])}else i+=3},e}(Be);function xN(r,e,t,n){var a=r.getData(),i=a.getLayout("largePoints"),o=new kx({shape:{points:i},__sign:1,ignoreCoarsePointer:!0});e.add(o);var s=new kx({shape:{points:i},__sign:-1,ignoreCoarsePointer:!0});e.add(s);var l=new kx({shape:{points:i},__sign:0,ignoreCoarsePointer:!0});e.add(l),Bx(1,o,r),Bx(-1,s,r),Bx(0,l,r),n&&(o.incremental=!0,s.incremental=!0),t&&t.push(o,s)}function Bx(r,e,t,n){var a=t.get(["itemStyle",r>0?"borderColor":"borderColor0"])||t.get(["itemStyle",r>0?"color":"color0"]);r===0&&(a=t.get(["itemStyle","borderColorDoji"]));var i=t.getModel("itemStyle").getItemStyle(Jee);e.useStyle(i),e.style.fill=null,e.style.stroke=a}var ite=ete,wN=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],t}return e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(t,n,a){var i=n.getItemLayout(t);return i&&a.rect(i.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(yt);Et(wN,gN,!0);var ote=wN;function ste(r){!r||!K(r.series)||L(r.series,function(e){_e(e)&&e.type==="k"&&(e.type="candlestick")})}var lte=["itemStyle","borderColor"],ute=["itemStyle","borderColor0"],cte=["itemStyle","borderColorDoji"],fte=["itemStyle","color"],hte=["itemStyle","color0"],vte={seriesType:"candlestick",plan:iu(),performRawSeries:!0,reset:function(r,e){function t(i,o){return o.get(i>0?fte:hte)}function n(i,o){return o.get(i===0?cte:i>0?lte:ute)}if(!e.isSeriesFiltered(r)){var a=r.pipelineContext.large;return!a&&{progress:function(i,o){for(var s;(s=i.next())!=null;){var l=o.getItemModel(s),u=o.getItemLayout(s).sign,c=l.getItemStyle();c.fill=t(u,l),c.stroke=n(u,l)||c.fill;var f=o.ensureUniqueItemVisual(s,"style");Q(f,c)}}}}}},dte=vte,pte={seriesType:"candlestick",plan:iu(),reset:function(r){var e=r.coordinateSystem,t=r.getData(),n=gte(r,t),a=0,i=1,o=["x","y"],s=t.getDimensionIndex(t.mapDimension(o[a])),l=J(t.mapDimensionsAll(o[i]),t.getDimensionIndex,t),u=l[0],c=l[1],f=l[2],h=l[3];if(t.setLayout({candleWidth:n,isSimpleBox:n<=1.3}),s<0||l.length<4)return;return{progress:r.pipelineContext.large?d:v};function v(p,g){for(var y,m=g.getStore();(y=p.next())!=null;){var _=m.get(s,y),b=m.get(u,y),w=m.get(c,y),x=m.get(f,y),S=m.get(h,y),T=Math.min(b,w),D=Math.max(b,w),M=V(T,_),A=V(D,_),I=V(x,_),P=V(S,_),E=[];$(E,A,0),$(E,M,1),E.push(Y(P),Y(A),Y(I),Y(M));var O=g.getItemModel(y),N=!!O.get(["itemStyle","borderColorDoji"]);g.setItemLayout(y,{sign:SN(m,y,b,w,c,N),initBaseline:b>w?A[i]:M[i],ends:E,brushRect:U(x,S,_)})}function V(ae,H){var q=[];return q[a]=H,q[i]=ae,isNaN(H)||isNaN(ae)?[NaN,NaN]:e.dataToPoint(q)}function $(ae,H,q){var X=H.slice(),Z=H.slice();X[a]=Ld(X[a]+n/2,1,!1),Z[a]=Ld(Z[a]-n/2,1,!0),q?ae.push(X,Z):ae.push(Z,X)}function U(ae,H,q){var X=V(ae,q),Z=V(H,q);return X[a]-=n/2,Z[a]-=n/2,{x:X[0],y:X[1],width:n,height:Z[1]-X[1]}}function Y(ae){return ae[a]=Ld(ae[a],1),ae}}function d(p,g){for(var y=Ua(p.count*4),m=0,_,b=[],w=[],x,S=g.getStore(),T=!!r.get(["itemStyle","borderColorDoji"]);(x=p.next())!=null;){var D=S.get(s,x),M=S.get(u,x),A=S.get(c,x),I=S.get(f,x),P=S.get(h,x);if(isNaN(D)||isNaN(I)||isNaN(P)){y[m++]=NaN,m+=3;continue}y[m++]=SN(S,x,M,A,c,T),b[a]=D,b[i]=I,_=e.dataToPoint(b,null,w),y[m++]=_?_[0]:NaN,y[m++]=_?_[1]:NaN,b[i]=P,_=e.dataToPoint(b,null,w),y[m++]=_?_[1]:NaN}g.setLayout("largePoints",y)}}};function SN(r,e,t,n,a,i){var o;return t>n?o=-1:t<n?o=1:o=i?0:e>0?r.get(a,e-1)<=n?1:-1:1,o}function gte(r,e){var t=r.getBaseAxis(),n,a=t.type==="category"?t.getBandWidth():(n=t.getExtent(),Math.abs(n[1]-n[0])/e.count()),i=le(Ee(r.get("barMaxWidth"),a),a),o=le(Ee(r.get("barMinWidth"),1),a),s=r.get("barWidth");return s!=null?le(s,a):Math.max(Math.min(a/2,i),o)}var yte=pte;function mte(r){r.registerChartView(ite),r.registerSeriesModel(ote),r.registerPreprocessor(ste),r.registerVisual(dte),r.registerLayout(yte)}function CN(r,e){var t=e.rippleEffectColor||e.color;r.eachChild(function(n){n.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?t:null,fill:e.brushType==="fill"?t:null}})})}var _te=function(r){j(e,r);function e(t,n){var a=r.call(this)||this,i=new Vf(t,n),o=new Te;return a.add(i),a.add(o),a.updateData(t,n),a}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var n=t.symbolType,a=t.color,i=t.rippleNumber,o=this.childAt(1),s=0;s<i;s++){var l=kt(n,-1,-1,2,2,a);l.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var u=-s/i*t.period+t.effectOffset;l.animate("",!0).when(t.period,{scaleX:t.rippleScale/2,scaleY:t.rippleScale/2}).delay(u).start(),l.animateStyle(!0).when(t.period,{opacity:0}).delay(u).start(),o.add(l)}CN(o,t)},e.prototype.updateEffectAnimation=function(t){for(var n=this._effectCfg,a=this.childAt(1),i=["symbolType","period","rippleScale","rippleNumber"],o=0;o<i.length;o++){var s=i[o];if(n[s]!==t[s]){this.stopEffectAnimation(),this.startEffectAnimation(t);return}}CN(a,t)},e.prototype.highlight=function(){hi(this)},e.prototype.downplay=function(){vi(this)},e.prototype.getSymbolType=function(){var t=this.childAt(0);return t&&t.getSymbolType()},e.prototype.updateData=function(t,n){var a=this,i=t.hostModel;this.childAt(0).updateData(t,n);var o=this.childAt(1),s=t.getItemModel(n),l=t.getItemVisual(n,"symbol"),u=wf(t.getItemVisual(n,"symbolSize")),c=t.getItemVisual(n,"style"),f=c&&c.fill,h=s.getModel("emphasis");o.setScale(u),o.traverse(function(g){g.setStyle("fill",f)});var v=lu(t.getItemVisual(n,"symbolOffset"),u);v&&(o.x=v[0],o.y=v[1]);var d=t.getItemVisual(n,"symbolRotate");o.rotation=(d||0)*Math.PI/180||0;var p={};p.showEffectOn=i.get("showEffectOn"),p.rippleScale=s.get(["rippleEffect","scale"]),p.brushType=s.get(["rippleEffect","brushType"]),p.period=s.get(["rippleEffect","period"])*1e3,p.effectOffset=n/t.count(),p.z=i.getShallow("z")||0,p.zlevel=i.getShallow("zlevel")||0,p.symbolType=l,p.color=f,p.rippleEffectColor=s.get(["rippleEffect","color"]),p.rippleNumber=s.get(["rippleEffect","number"]),p.showEffectOn==="render"?(this._effectCfg?this.updateEffectAnimation(p):this.startEffectAnimation(p),this._effectCfg=p):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(g){g==="emphasis"?p.showEffectOn!=="render"&&a.startEffectAnimation(p):g==="normal"&&p.showEffectOn!=="render"&&a.stopEffectAnimation()}),this._effectCfg=p,Lt(this,h.get("focus"),h.get("blurScope"),h.get("disabled"))},e.prototype.fadeOut=function(t){t&&t()},e}(Te),bte=_te,xte=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this._symbolDraw=new $f(bte)},e.prototype.render=function(t,n,a){var i=t.getData(),o=this._symbolDraw;o.updateData(i,{clipShape:this._getClipShape(t)}),this.group.add(o.group)},e.prototype._getClipShape=function(t){var n=t.coordinateSystem,a=n&&n.getArea&&n.getArea();return t.get("clip",!0)?a:null},e.prototype.updateTransform=function(t,n,a){var i=t.getData();this.group.dirty();var o=Hf("").reset(t,n,a);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout()},e.prototype._updateGroupTransform=function(t){var n=t.coordinateSystem;n&&n.getRoamTransform&&(this.group.transform=i2(n.getRoamTransform()),this.group.decomposeTransform())},e.prototype.remove=function(t,n){this._symbolDraw&&this._symbolDraw.remove(!0)},e.type="effectScatter",e}(ut),wte=xte,Ste=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,n){return Wa(null,this,{useEncodeDefaulter:!0})},e.prototype.brushSelector=function(t,n,a){return a.point(n.getItemLayout(t))},e.type="series.effectScatter",e.dependencies=["grid","polar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",clip:!0,rippleEffect:{period:4,scale:2.5,brushType:"fill",number:3},universalTransition:{divideShape:"clone"},symbolSize:10},e}(yt),Cte=Ste;function Tte(r){r.registerChartView(wte),r.registerSeriesModel(Cte),r.registerLayout(Hf("effectScatter"))}var Dte=function(r){j(e,r);function e(t,n,a){var i=r.call(this)||this;return i.add(i.createLine(t,n,a)),i._updateEffectSymbol(t,n),i}return e.prototype.createLine=function(t,n,a){return new lx(t,n,a)},e.prototype._updateEffectSymbol=function(t,n){var a=t.getItemModel(n),i=a.getModel("effect"),o=i.get("symbolSize"),s=i.get("symbol");K(o)||(o=[o,o]);var l=t.getItemVisual(n,"style"),u=i.get("color")||l&&l.stroke,c=this.childAt(1);this._symbolType!==s&&(this.remove(c),c=kt(s,-.5,-.5,1,1,u),c.z2=100,c.culling=!0,this.add(c)),c&&(c.setStyle("shadowColor",u),c.setStyle(i.getItemStyle(["color"])),c.scaleX=o[0],c.scaleY=o[1],c.setColor(u),this._symbolType=s,this._symbolScale=o,this._updateEffectAnimation(t,i,n))},e.prototype._updateEffectAnimation=function(t,n,a){var i=this.childAt(1);if(!!i){var o=t.getItemLayout(a),s=n.get("period")*1e3,l=n.get("loop"),u=n.get("roundTrip"),c=n.get("constantSpeed"),f=Jt(n.get("delay"),function(v){return v/t.count()*s/3});if(i.ignore=!0,this._updateAnimationPoints(i,o),c>0&&(s=this._getLineLength(i)/c*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){i.stopAnimation();var h=void 0;ye(f)?h=f(a):h=f,i.__t>0&&(h=-s*i.__t),this._animateSymbol(i,s,h,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},e.prototype._animateSymbol=function(t,n,a,i,o){if(n>0){t.__t=0;var s=this,l=t.animate("",i).when(o?n*2:n,{__t:o?2:1}).delay(a).during(function(){s._updateSymbolPosition(t)});i||l.done(function(){s.remove(t)}),l.start()}},e.prototype._getLineLength=function(t){return ni(t.__p1,t.__cp1)+ni(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,n){t.__p1=n[0],t.__p2=n[1],t.__cp1=n[2]||[(n[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2]},e.prototype.updateData=function(t,n,a){this.childAt(0).updateData(t,n,a),this._updateEffectSymbol(t,n)},e.prototype._updateSymbolPosition=function(t){var n=t.__p1,a=t.__p2,i=t.__cp1,o=t.__t<1?t.__t:2-t.__t,s=[t.x,t.y],l=s.slice(),u=lr,c=Qm;s[0]=u(n[0],i[0],a[0],o),s[1]=u(n[1],i[1],a[1],o);var f=t.__t<1?c(n[0],i[0],a[0],o):c(a[0],i[0],n[0],1-o),h=t.__t<1?c(n[1],i[1],a[1],o):c(a[1],i[1],n[1],1-o);t.rotation=-Math.atan2(h,f)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(t.__lastT!==void 0&&t.__lastT<t.__t?(t.scaleY=ni(l,s)*1.05,o===1&&(s[0]=l[0]+(s[0]-l[0])/2,s[1]=l[1]+(s[1]-l[1])/2)):t.__lastT===1?t.scaleY=2*ni(n,s):t.scaleY=this._symbolScale[1]),t.__lastT=t.__t,t.ignore=!1,t.x=s[0],t.y=s[1]},e.prototype.updateLayout=function(t,n){this.childAt(0).updateLayout(t,n);var a=t.getItemModel(n).getModel("effect");this._updateEffectAnimation(t,a,n)},e}(Te),TN=Dte,Mte=function(r){j(e,r);function e(t,n,a){var i=r.call(this)||this;return i._createPolyline(t,n,a),i}return e.prototype._createPolyline=function(t,n,a){var i=t.getItemLayout(n),o=new Wr({shape:{points:i}});this.add(o),this._updateCommonStl(t,n,a)},e.prototype.updateData=function(t,n,a){var i=t.hostModel,o=this.childAt(0),s={shape:{points:t.getItemLayout(n)}};qe(o,s,i,n),this._updateCommonStl(t,n,a)},e.prototype._updateCommonStl=function(t,n,a){var i=this.childAt(0),o=t.getItemModel(n),s=a&&a.emphasisLineStyle,l=a&&a.focus,u=a&&a.blurScope,c=a&&a.emphasisDisabled;if(!a||t.hasItemOption){var f=o.getModel("emphasis");s=f.getModel("lineStyle").getLineStyle(),c=f.get("disabled"),l=f.get("focus"),u=f.get("blurScope")}i.useStyle(t.getItemVisual(n,"style")),i.style.fill=null,i.style.strokeNoScale=!0;var h=i.ensureState("emphasis");h.style=s,Lt(this,l,u,c)},e.prototype.updateLayout=function(t,n){var a=this.childAt(0);a.setShape("points",t.getItemLayout(n))},e}(Te),DN=Mte,Ate=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t._lastFrame=0,t._lastFramePercent=0,t}return e.prototype.createLine=function(t,n,a){return new DN(t,n,a)},e.prototype._updateAnimationPoints=function(t,n){this._points=n;for(var a=[0],i=0,o=1;o<n.length;o++){var s=n[o-1],l=n[o];i+=ni(s,l),a.push(i)}if(i===0){this._length=0;return}for(var o=0;o<a.length;o++)a[o]/=i;this._offsets=a,this._length=i},e.prototype._getLineLength=function(){return this._length},e.prototype._updateSymbolPosition=function(t){var n=t.__t<1?t.__t:2-t.__t,a=this._points,i=this._offsets,o=a.length;if(!!i){var s=this._lastFrame,l;if(n<this._lastFramePercent){var u=Math.min(s+1,o-1);for(l=u;l>=0&&!(i[l]<=n);l--);l=Math.min(l,o-2)}else{for(l=s;l<o&&!(i[l]>n);l++);l=Math.min(l-1,o-2)}var c=(n-i[l])/(i[l+1]-i[l]),f=a[l],h=a[l+1];t.x=f[0]*(1-c)+c*h[0],t.y=f[1]*(1-c)+c*h[1];var v=t.__t<1?h[0]-f[0]:f[0]-h[0],d=t.__t<1?h[1]-f[1]:f[1]-h[1];t.rotation=-Math.atan2(d,v)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=n,t.ignore=!1}},e}(TN),Lte=Ate,Ite=function(){function r(){this.polyline=!1,this.curveness=0,this.segs=[]}return r}(),Pte=function(r){j(e,r);function e(t){var n=r.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Ite},e.prototype.buildPath=function(t,n){var a=n.segs,i=n.curveness,o;if(n.polyline)for(o=this._off;o<a.length;){var s=a[o++];if(s>0){t.moveTo(a[o++],a[o++]);for(var l=1;l<s;l++)t.lineTo(a[o++],a[o++])}}else for(o=this._off;o<a.length;){var u=a[o++],c=a[o++],f=a[o++],h=a[o++];if(t.moveTo(u,c),i>0){var v=(u+f)/2-(c-h)*i,d=(c+h)/2-(f-u)*i;t.quadraticCurveTo(v,d,f,h)}else t.lineTo(f,h)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(t,n){var a=this.shape,i=a.segs,o=a.curveness,s=this.style.lineWidth;if(a.polyline)for(var l=0,u=0;u<i.length;){var c=i[u++];if(c>0)for(var f=i[u++],h=i[u++],v=1;v<c;v++){var d=i[u++],p=i[u++];if(eo(f,h,d,p,s,t,n))return l}l++}else for(var l=0,u=0;u<i.length;){var f=i[u++],h=i[u++],d=i[u++],p=i[u++];if(o>0){var g=(f+d)/2-(h-p)*o,y=(h+p)/2-(d-f)*o;if(LD(f,h,g,y,d,p,s,t,n))return l}else if(eo(f,h,d,p,s,t,n))return l;l++}return-1},e.prototype.contain=function(t,n){var a=this.transformCoordToLocal(t,n),i=this.getBoundingRect();if(t=a[0],n=a[1],i.contain(t,n)){var o=this.hoverDataIdx=this.findDataIndex(t,n);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var n=this.shape,a=n.segs,i=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u<a.length;){var c=a[u++],f=a[u++];i=Math.min(c,i),s=Math.max(c,s),o=Math.min(f,o),l=Math.max(f,l)}t=this._rect=new Re(i,o,s,l)}return t},e}(Be),Ete=function(){function r(){this.group=new Te}return r.prototype.updateData=function(e){this._clear();var t=this._create();t.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(t,e)},r.prototype.incrementalPrepareUpdate=function(e){this.group.removeAll(),this._clear()},r.prototype.incrementalUpdate=function(e,t){var n=this._newAdded[0],a=t.getLayout("linesPoints"),i=n&&n.shape.segs;if(i&&i.length<2e4){var o=i.length,s=new Float32Array(o+a.length);s.set(i),s.set(a,o),n.setShape({segs:s})}else{this._newAdded=[];var l=this._create();l.incremental=!0,l.setShape({segs:a}),this._setCommon(l,t),l.__startIndex=e.start}},r.prototype.remove=function(){this._clear()},r.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},r.prototype._create=function(){var e=new Pte({cursor:"default",ignoreCoarsePointer:!0});return this._newAdded.push(e),this.group.add(e),e},r.prototype._setCommon=function(e,t,n){var a=t.hostModel;e.setShape({polyline:a.get("polyline"),curveness:a.get(["lineStyle","curveness"])}),e.useStyle(a.getModel("lineStyle").getLineStyle()),e.style.strokeNoScale=!0;var i=t.getVisual("style");i&&i.stroke&&e.setStyle("stroke",i.stroke),e.setStyle("fill",null);var o=Me(e);o.seriesIndex=a.seriesIndex,e.on("mousemove",function(s){o.dataIndex=null;var l=e.hoverDataIdx;l>0&&(o.dataIndex=l+e.__startIndex)})},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}(),Ote=Ete,Rte={seriesType:"lines",plan:iu(),reset:function(r){var e=r.coordinateSystem;if(!!e){var t=r.get("polyline"),n=r.pipelineContext.large;return{progress:function(a,i){var o=[];if(n){var s=void 0,l=a.end-a.start;if(t){for(var u=0,c=a.start;c<a.end;c++)u+=r.getLineCoordsCount(c);s=new Float32Array(l+u*2)}else s=new Float32Array(l*4);for(var f=0,h=[],c=a.start;c<a.end;c++){var v=r.getLineCoords(c,o);t&&(s[f++]=v);for(var d=0;d<v;d++)h=e.dataToPoint(o[d],!1,h),s[f++]=h[0],s[f++]=h[1]}i.setLayout("linesPoints",s)}else for(var c=a.start;c<a.end;c++){var p=i.getItemModel(c),v=r.getLineCoords(c,o),g=[];if(t)for(var y=0;y<v;y++)g.push(e.dataToPoint(o[y]));else{g[0]=e.dataToPoint(o[0]),g[1]=e.dataToPoint(o[1]);var m=p.get(["lineStyle","curveness"]);+m&&(g[2]=[(g[0][0]+g[1][0])/2-(g[0][1]-g[1][1])*m,(g[0][1]+g[1][1])/2-(g[1][0]-g[0][0])*m])}i.setItemLayout(c,g)}}}}}},MN=Rte,Nte=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=t.getData(),o=this._updateLineDraw(i,t),s=t.get("zlevel"),l=t.get(["effect","trailLength"]),u=a.getZr(),c=u.painter.getType()==="svg";c||u.painter.getLayer(s).clear(!0),this._lastZlevel!=null&&!c&&u.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(t)&&l>0&&(c||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(i);var f=t.get("clip",!0)&&Ep(t.coordinateSystem,!1,t);f?this.group.setClipPath(f):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,n,a){var i=t.getData(),o=this._updateLineDraw(i,t);o.incrementalPrepareUpdate(i),this._clearLayer(a),this._finished=!1},e.prototype.incrementalRender=function(t,n,a){this._lineDraw.incrementalUpdate(t,n.getData()),this._finished=t.end===n.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,n,a){var i=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=MN.reset(t,n,a);s.progress&&s.progress({start:0,end:i.count(),count:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(a)},e.prototype._updateLineDraw=function(t,n){var a=this._lineDraw,i=this._showEffect(n),o=!!n.get("polyline"),s=n.pipelineContext,l=s.large;return(!a||i!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(a&&a.remove(),a=this._lineDraw=l?new Ote:new cx(o?i?Lte:DN:i?TN:lx),this._hasEffet=i,this._isPolyline=o,this._isLargeDraw=l),this.group.add(a.group),a},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var n=t.getZr(),a=n.painter.getType()==="svg";!a&&this._lastZlevel!=null&&n.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,n){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(n)},e.prototype.dispose=function(t,n){this.remove(t,n)},e.type="lines",e}(ut),kte=Nte,Bte=typeof Uint32Array=="undefined"?Array:Uint32Array,zte=typeof Float64Array=="undefined"?Array:Float64Array;function AN(r){var e=r.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(r.data=J(e,function(t){var n=[t[0].coord,t[1].coord],a={coords:n};return t[0].name&&(a.fromName=t[0].name),t[1].name&&(a.toName=t[1].name),Tv([a,t[0],t[1]])}))}var Fte=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.init=function(t){t.data=t.data||[],AN(t);var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count)),r.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(t){if(AN(t),t.data){var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count))}r.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var n=this._processFlatCoordsArray(t.data);n.flatCoords&&(this._flatCoords?(this._flatCoords=hc(this._flatCoords,n.flatCoords),this._flatCoordsOffset=hc(this._flatCoordsOffset,n.flatCoordsOffset)):(this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset),t.data=new Float32Array(n.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var n=this.getData().getItemModel(t),a=n.option instanceof Array?n.option:n.getShallow("coords");return a},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[t*2+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,n){if(this._flatCoordsOffset){for(var a=this._flatCoordsOffset[t*2],i=this._flatCoordsOffset[t*2+1],o=0;o<i;o++)n[o]=n[o]||[],n[o][0]=this._flatCoords[a+o*2],n[o][1]=this._flatCoords[a+o*2+1];return i}else{for(var s=this._getCoordsFromItemModel(t),o=0;o<s.length;o++)n[o]=n[o]||[],n[o][0]=s[o][0],n[o][1]=s[o][1];return s.length}},e.prototype._processFlatCoordsArray=function(t){var n=0;if(this._flatCoords&&(n=this._flatCoords.length),je(t[0])){for(var a=t.length,i=new Bte(a),o=new zte(a),s=0,l=0,u=0,c=0;c<a;){u++;var f=t[c++];i[l++]=s+n,i[l++]=f;for(var h=0;h<f;h++){var v=t[c++],d=t[c++];o[s++]=v,o[s++]=d}}return{flatCoordsOffset:new Uint32Array(i.buffer,0,l),flatCoords:o,count:u}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},e.prototype.getInitialData=function(t,n){var a=new Er(["value"],this);return a.hasItemOption=!1,a.initData(t.data,[],function(i,o,s,l){if(i instanceof Array)return NaN;a.hasItemOption=!0;var u=i.value;if(u!=null)return u instanceof Array?u[l]:u}),a},e.prototype.formatTooltip=function(t,n,a){var i=this.getData(),o=i.getItemModel(t),s=o.get("name");if(s)return s;var l=o.get("fromName"),u=o.get("toName"),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),nr("nameValue",{name:c.join(" > ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return t==null?this.option.large?1e4:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t==null?this.option.large?2e4:this.get("progressiveThreshold"):t},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),n=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&n>0?n+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(yt),Vte=Fte;function ag(r){return r instanceof Array||(r=[r,r]),r}var $te={seriesType:"lines",reset:function(r){var e=ag(r.get("symbol")),t=ag(r.get("symbolSize")),n=r.getData();n.setVisual("fromSymbol",e&&e[0]),n.setVisual("toSymbol",e&&e[1]),n.setVisual("fromSymbolSize",t&&t[0]),n.setVisual("toSymbolSize",t&&t[1]);function a(i,o){var s=i.getItemModel(o),l=ag(s.getShallow("symbol",!0)),u=ag(s.getShallow("symbolSize",!0));l[0]&&i.setItemVisual(o,"fromSymbol",l[0]),l[1]&&i.setItemVisual(o,"toSymbol",l[1]),u[0]&&i.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&i.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:n.hasItemOption?a:null}}},Hte=$te;function Gte(r){r.registerChartView(kte),r.registerSeriesModel(Vte),r.registerLayout(MN),r.registerVisual(Hte)}var Wte=256,Ute=function(){function r(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=ia.createCanvas();this.canvas=e}return r.prototype.update=function(e,t,n,a,i,o){var s=this._getBrush(),l=this._getGradient(i,"inRange"),u=this._getGradient(i,"outOfRange"),c=this.pointSize+this.blurSize,f=this.canvas,h=f.getContext("2d"),v=e.length;f.width=t,f.height=n;for(var d=0;d<v;++d){var p=e[d],g=p[0],y=p[1],m=p[2],_=a(m);h.globalAlpha=_,h.drawImage(s,g-c,y-c)}if(!f.width||!f.height)return f;for(var b=h.getImageData(0,0,f.width,f.height),w=b.data,x=0,S=w.length,T=this.minOpacity,D=this.maxOpacity,M=D-T;x<S;){var _=w[x+3]/256,A=Math.floor(_*(Wte-1))*4;if(_>0){var I=o(_)?l:u;_>0&&(_=_*M+T),w[x++]=I[A],w[x++]=I[A+1],w[x++]=I[A+2],w[x++]=I[A+3]*_*256}else x+=4}return h.putImageData(b,0,0),f},r.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=ia.createCanvas()),t=this.pointSize+this.blurSize,n=t*2;e.width=n,e.height=n;var a=e.getContext("2d");return a.clearRect(0,0,n,n),a.shadowOffsetX=n,a.shadowBlur=this.blurSize,a.shadowColor="#000",a.beginPath(),a.arc(-t,t,this.pointSize,0,Math.PI*2,!0),a.closePath(),a.fill(),e},r.prototype._getGradient=function(e,t){for(var n=this._gradientPixels,a=n[t]||(n[t]=new Uint8ClampedArray(256*4)),i=[0,0,0,0],o=0,s=0;s<256;s++)e[t](s/255,!0,i),a[o++]=i[0],a[o++]=i[1],a[o++]=i[2],a[o++]=i[3];return a},r}(),jte=Ute;function Yte(r,e,t){var n=r[1]-r[0];e=J(e,function(o){return{interval:[(o.interval[0]-r[0])/n,(o.interval[1]-r[0])/n]}});var a=e.length,i=0;return function(o){var s;for(s=i;s<a;s++){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){i=s;break}}if(s===a)for(s=i-1;s>=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){i=s;break}}return s>=0&&s<a&&t[s]}}function qte(r,e){var t=r[1]-r[0];return e=[(e[0]-r[0])/t,(e[1]-r[0])/t],function(n){return n>=e[0]&&n<=e[1]}}function LN(r){var e=r.dimensions;return e[0]==="lng"&&e[1]==="lat"}var Zte=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i;n.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===t&&(i=s)})}),this._progressiveEls=null,this.group.removeAll();var o=t.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"?this._renderOnCartesianAndCalendar(t,a,0,t.getData().count()):LN(o)&&this._renderOnGeo(o,t,i,a)},e.prototype.incrementalPrepareRender=function(t,n,a){this.group.removeAll()},e.prototype.incrementalRender=function(t,n,a,i){var o=n.coordinateSystem;o&&(LN(o)?this.render(n,a,i):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(n,i,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){oo(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,n,a,i,o){var s=t.coordinateSystem,l=$s(s,"cartesian2d"),u,c,f,h;if(l){var v=s.getAxis("x"),d=s.getAxis("y");u=v.getBandWidth()+.5,c=d.getBandWidth()+.5,f=v.scale.getExtent(),h=d.scale.getExtent()}for(var p=this.group,g=t.getData(),y=t.getModel(["emphasis","itemStyle"]).getItemStyle(),m=t.getModel(["blur","itemStyle"]).getItemStyle(),_=t.getModel(["select","itemStyle"]).getItemStyle(),b=t.get(["itemStyle","borderRadius"]),w=rr(t),x=t.getModel("emphasis"),S=x.get("focus"),T=x.get("blurScope"),D=x.get("disabled"),M=l?[g.mapDimension("x"),g.mapDimension("y"),g.mapDimension("value")]:[g.mapDimension("time"),g.mapDimension("value")],A=a;A<i;A++){var I=void 0,P=g.getItemVisual(A,"style");if(l){var E=g.get(M[0],A),O=g.get(M[1],A);if(isNaN(g.get(M[2],A))||isNaN(E)||isNaN(O)||E<f[0]||E>f[1]||O<h[0]||O>h[1])continue;var N=s.dataToPoint([E,O]);I=new Ge({shape:{x:N[0]-u/2,y:N[1]-c/2,width:u,height:c},style:P})}else{if(isNaN(g.get(M[1],A)))continue;I=new Ge({z2:1,shape:s.dataToRect([g.get(M[0],A)]).contentShape,style:P})}if(g.hasItemOption){var V=g.getItemModel(A),$=V.getModel("emphasis");y=$.getModel("itemStyle").getItemStyle(),m=V.getModel(["blur","itemStyle"]).getItemStyle(),_=V.getModel(["select","itemStyle"]).getItemStyle(),b=V.get(["itemStyle","borderRadius"]),S=$.get("focus"),T=$.get("blurScope"),D=$.get("disabled"),w=rr(V)}I.shape.r=b;var U=t.getRawValue(A),Y="-";U&&U[2]!=null&&(Y=U[2]+""),yr(I,w,{labelFetcher:t,labelDataIndex:A,defaultOpacity:P.opacity,defaultText:Y}),I.ensureState("emphasis").style=y,I.ensureState("blur").style=m,I.ensureState("select").style=_,Lt(I,S,T,D),I.incremental=o,o&&(I.states.emphasis.hoverLayer=!0),p.add(I),g.setItemGraphicEl(A,I),this._progressiveEls&&this._progressiveEls.push(I)}},e.prototype._renderOnGeo=function(t,n,a,i){var o=a.targetVisuals.inRange,s=a.targetVisuals.outOfRange,l=n.getData(),u=this._hmLayer||this._hmLayer||new jte;u.blurSize=n.get("blurSize"),u.pointSize=n.get("pointSize"),u.minOpacity=n.get("minOpacity"),u.maxOpacity=n.get("maxOpacity");var c=t.getViewRect().clone(),f=t.getRoamTransform();c.applyTransform(f);var h=Math.max(c.x,0),v=Math.max(c.y,0),d=Math.min(c.width+c.x,i.getWidth()),p=Math.min(c.height+c.y,i.getHeight()),g=d-h,y=p-v,m=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],_=l.mapArray(m,function(S,T,D){var M=t.dataToPoint([S,T]);return M[0]-=h,M[1]-=v,M.push(D),M}),b=a.getExtent(),w=a.type==="visualMap.continuous"?qte(b,a.option.range):Yte(b,a.getPieceList(),a.option.selected);u.update(_,g,y,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},w);var x=new ur({style:{width:g,height:y,x:h,y:v,image:u.canvas},silent:!0});this.group.add(x)},e.type="heatmap",e}(ut),Xte=Zte,Qte=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,n){return Wa(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=ru.get(this.get("coordinateSystem"));if(t&&t.dimensions)return t.dimensions[0]==="lng"&&t.dimensions[1]==="lat"},e.type="series.heatmap",e.dependencies=["grid","geo","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},e}(yt),Kte=Qte;function Jte(r){r.registerChartView(Xte),r.registerSeriesModel(Kte)}var ere=["itemStyle","borderWidth"],IN=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],zx=new ha,tre=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=this.group,o=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis(),c=u.isHorizontal(),f=l.master.getRect(),h={ecSize:{width:a.getWidth(),height:a.getHeight()},seriesModel:t,coordSys:l,coordSysExtent:[[f.x,f.x+f.width],[f.y,f.y+f.height]],isHorizontal:c,valueDim:IN[+c],categoryDim:IN[1-+c]};return o.diff(s).add(function(v){if(!!o.hasValue(v)){var d=BN(o,v),p=PN(o,v,d,h),g=zN(o,h,p);o.setItemGraphicEl(v,g),i.add(g),$N(g,h,p)}}).update(function(v,d){var p=s.getItemGraphicEl(d);if(!o.hasValue(v)){i.remove(p);return}var g=BN(o,v),y=PN(o,v,g,h),m=VN(o,y);p&&m!==p.__pictorialShapeStr&&(i.remove(p),o.setItemGraphicEl(v,null),p=null),p?lre(p,h,y):p=zN(o,h,y,!0),o.setItemGraphicEl(v,p),p.__pictorialSymbolMeta=y,i.add(p),$N(p,h,y)}).remove(function(v){var d=s.getItemGraphicEl(v);d&&FN(s,v,d.__pictorialSymbolMeta.animationModel,d)}).execute(),this._data=o,this.group},e.prototype.remove=function(t,n){var a=this.group,i=this._data;t.get("animation")?i&&i.eachItemGraphicEl(function(o){FN(i,Me(o).dataIndex,t,o)}):a.removeAll()},e.type="pictorialBar",e}(ut);function PN(r,e,t,n){var a=r.getItemLayout(e),i=t.get("symbolRepeat"),o=t.get("symbolClip"),s=t.get("symbolPosition")||"start",l=t.get("symbolRotate"),u=(l||0)*Math.PI/180||0,c=t.get("symbolPatternSize")||2,f=t.isAnimationEnabled(),h={dataIndex:e,layout:a,itemModel:t,symbolType:r.getItemVisual(e,"symbol")||"circle",style:r.getItemVisual(e,"style"),symbolClip:o,symbolRepeat:i,symbolRepeatDirection:t.get("symbolRepeatDirection"),symbolPatternSize:c,rotation:u,animationModel:f?t:null,hoverScale:f&&t.get(["emphasis","scale"]),z2:t.getShallow("z",!0)||0};rre(t,i,a,n,h),nre(r,e,a,i,o,h.boundingLength,h.pxSign,c,n,h),are(t,h.symbolScale,u,n,h);var v=h.symbolSize,d=lu(t.get("symbolOffset"),v);return ire(t,v,a,i,o,d,s,h.valueLineWidth,h.boundingLength,h.repeatCutLength,n,h),h}function rre(r,e,t,n,a){var i=n.valueDim,o=r.get("symbolBoundingData"),s=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(t[i.wh]<=0),c;if(K(o)){var f=[Fx(s,o[0])-l,Fx(s,o[1])-l];f[1]<f[0]&&f.reverse(),c=f[u]}else o!=null?c=Fx(s,o)-l:e?c=n.coordSysExtent[i.index][u]-l:c=t[i.wh];a.boundingLength=c,e&&(a.repeatCutLength=t[i.wh]),a.pxSign=c>0?1:-1}function Fx(r,e){return r.toGlobalCoord(r.dataToCoord(r.scale.parse(e)))}function nre(r,e,t,n,a,i,o,s,l,u){var c=l.valueDim,f=l.categoryDim,h=Math.abs(t[f.wh]),v=r.getItemVisual(e,"symbolSize"),d;K(v)?d=v.slice():v==null?d=["100%","100%"]:d=[v,v],d[f.index]=le(d[f.index],h),d[c.index]=le(d[c.index],n?h:Math.abs(i)),u.symbolSize=d;var p=u.symbolScale=[d[0]/s,d[1]/s];p[c.index]*=(l.isHorizontal?-1:1)*o}function are(r,e,t,n,a){var i=r.get(ere)||0;i&&(zx.attr({scaleX:e[0],scaleY:e[1],rotation:t}),zx.updateTransform(),i/=zx.getLineScale(),i*=e[n.valueDim.index]),a.valueLineWidth=i||0}function ire(r,e,t,n,a,i,o,s,l,u,c,f){var h=c.categoryDim,v=c.valueDim,d=f.pxSign,p=Math.max(e[v.index]+s,0),g=p;if(n){var y=Math.abs(l),m=Jt(r.get("symbolMargin"),"15%")+"",_=!1;m.lastIndexOf("!")===m.length-1&&(_=!0,m=m.slice(0,m.length-1));var b=le(m,e[v.index]),w=Math.max(p+b*2,0),x=_?0:b*2,S=O0(n),T=S?n:HN((y+x)/w),D=y-T*p;b=D/2/(_?T:Math.max(T-1,1)),w=p+b*2,x=_?0:b*2,!S&&n!=="fixed"&&(T=u?HN((Math.abs(u)+x)/w):0),g=T*w-x,f.repeatTimes=T,f.symbolMargin=b}var M=d*(g/2),A=f.pathPosition=[];A[h.index]=t[h.wh]/2,A[v.index]=o==="start"?M:o==="end"?l-M:l/2,i&&(A[0]+=i[0],A[1]+=i[1]);var I=f.bundlePosition=[];I[h.index]=t[h.xy],I[v.index]=t[v.xy];var P=f.barRectShape=Q({},t);P[v.wh]=d*Math.max(Math.abs(t[v.wh]),Math.abs(A[v.index]+M)),P[h.wh]=t[h.wh];var E=f.clipShape={};E[h.xy]=-t[h.xy],E[h.wh]=c.ecSize[h.wh],E[v.xy]=0,E[v.wh]=t[v.wh]}function EN(r){var e=r.symbolPatternSize,t=kt(r.symbolType,-e/2,-e/2,e,e);return t.attr({culling:!0}),t.type!=="image"&&t.setStyle({strokeNoScale:!0}),t}function ON(r,e,t,n){var a=r.__pictorialBundle,i=t.symbolSize,o=t.valueLineWidth,s=t.pathPosition,l=e.valueDim,u=t.repeatTimes||0,c=0,f=i[e.valueDim.index]+o+t.symbolMargin*2;for(Vx(r,function(p){p.__pictorialAnimationIndex=c,p.__pictorialRepeatTimes=u,c<u?Du(p,null,d(c),t,n):Du(p,null,{scaleX:0,scaleY:0},t,n,function(){a.remove(p)}),c++});c<u;c++){var h=EN(t);h.__pictorialAnimationIndex=c,h.__pictorialRepeatTimes=u,a.add(h);var v=d(c);Du(h,{x:v.x,y:v.y,scaleX:0,scaleY:0},{scaleX:v.scaleX,scaleY:v.scaleY,rotation:v.rotation},t,n)}function d(p){var g=s.slice(),y=t.pxSign,m=p;return(t.symbolRepeatDirection==="start"?y>0:y<0)&&(m=u-1-p),g[l.index]=f*(m-u/2+.5)+s[l.index],{x:g[0],y:g[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation}}}function RN(r,e,t,n){var a=r.__pictorialBundle,i=r.__pictorialMainPath;i?Du(i,null,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation},t,n):(i=r.__pictorialMainPath=EN(t),a.add(i),Du(i,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:0,scaleY:0,rotation:t.rotation},{scaleX:t.symbolScale[0],scaleY:t.symbolScale[1]},t,n))}function NN(r,e,t){var n=Q({},e.barRectShape),a=r.__pictorialBarRect;a?Du(a,null,{shape:n},e,t):(a=r.__pictorialBarRect=new Ge({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),a.disableMorphing=!0,r.add(a))}function kN(r,e,t,n){if(t.symbolClip){var a=r.__pictorialClipPath,i=Q({},t.clipShape),o=e.valueDim,s=t.animationModel,l=t.dataIndex;if(a)qe(a,{shape:i},s,l);else{i[o.wh]=0,a=new Ge({shape:i}),r.__pictorialBundle.setClipPath(a),r.__pictorialClipPath=a;var u={};u[o.wh]=t.clipShape[o.wh],af[n?"updateProps":"initProps"](a,{shape:u},s,l)}}}function BN(r,e){var t=r.getItemModel(e);return t.getAnimationDelayParams=ore,t.isAnimationEnabled=sre,t}function ore(r){return{index:r.__pictorialAnimationIndex,count:r.__pictorialRepeatTimes}}function sre(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function zN(r,e,t,n){var a=new Te,i=new Te;return a.add(i),a.__pictorialBundle=i,i.x=t.bundlePosition[0],i.y=t.bundlePosition[1],t.symbolRepeat?ON(a,e,t):RN(a,e,t),NN(a,t,n),kN(a,e,t,n),a.__pictorialShapeStr=VN(r,t),a.__pictorialSymbolMeta=t,a}function lre(r,e,t){var n=t.animationModel,a=t.dataIndex,i=r.__pictorialBundle;qe(i,{x:t.bundlePosition[0],y:t.bundlePosition[1]},n,a),t.symbolRepeat?ON(r,e,t,!0):RN(r,e,t,!0),NN(r,t,!0),kN(r,e,t,!0)}function FN(r,e,t,n){var a=n.__pictorialBarRect;a&&a.removeTextContent();var i=[];Vx(n,function(o){i.push(o)}),n.__pictorialMainPath&&i.push(n.__pictorialMainPath),n.__pictorialClipPath&&(t=null),L(i,function(o){ao(o,{scaleX:0,scaleY:0},t,e,function(){n.parent&&n.parent.remove(n)})}),r.setItemGraphicEl(e,null)}function VN(r,e){return[r.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function Vx(r,e,t){L(r.__pictorialBundle.children(),function(n){n!==r.__pictorialBarRect&&e.call(t,n)})}function Du(r,e,t,n,a,i){e&&r.attr(e),n.symbolClip&&!a?t&&r.attr(t):t&&af[a?"updateProps":"initProps"](r,t,n.animationModel,n.dataIndex,i)}function $N(r,e,t){var n=t.dataIndex,a=t.itemModel,i=a.getModel("emphasis"),o=i.getModel("itemStyle").getItemStyle(),s=a.getModel(["blur","itemStyle"]).getItemStyle(),l=a.getModel(["select","itemStyle"]).getItemStyle(),u=a.getShallow("cursor"),c=i.get("focus"),f=i.get("blurScope"),h=i.get("scale");Vx(r,function(p){if(p instanceof ur){var g=p.style;p.useStyle(Q({image:g.image,x:g.x,y:g.y,width:g.width,height:g.height},t.style))}else p.useStyle(t.style);var y=p.ensureState("emphasis");y.style=o,h&&(y.scaleX=p.scaleX*1.1,y.scaleY=p.scaleY*1.1),p.ensureState("blur").style=s,p.ensureState("select").style=l,u&&(p.cursor=u),p.z2=t.z2});var v=e.valueDim.posDesc[+(t.boundingLength>0)],d=r.__pictorialBarRect;yr(d,rr(a),{labelFetcher:e.seriesModel,labelDataIndex:n,defaultText:gu(e.seriesModel.getData(),n),inheritColor:t.style.fill,defaultOpacity:t.style.opacity,defaultOutsidePosition:v}),Lt(r,c,f,i.get("disabled"))}function HN(r){var e=Math.round(r);return Math.abs(r-e)<1e-4?e:Math.ceil(r)}var ure=tre,cre=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t.defaultSymbol="roundRect",t}return e.prototype.getInitialData=function(t){return t.stack=null,r.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=so(Op.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}(Op),fre=cre;function hre(r){r.registerChartView(ure),r.registerSeriesModel(fre),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,Ae(tP,"pictorialBar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,rP("pictorialBar"))}var vre=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._layers=[],t}return e.prototype.render=function(t,n,a){var i=t.getData(),o=this,s=this.group,l=t.getLayerSeries(),u=i.getLayout("layoutInfo"),c=u.rect,f=u.boundaryGap;s.x=0,s.y=c.y+f[0];function h(g){return g.name}var v=new pi(this._layersSeries||[],l,h,h),d=[];v.add(fe(p,this,"add")).update(fe(p,this,"update")).remove(fe(p,this,"remove")).execute();function p(g,y,m){var _=o._layers;if(g==="remove"){s.remove(_[y]);return}for(var b=[],w=[],x,S=l[y].indices,T=0;T<S.length;T++){var D=i.getItemLayout(S[T]),M=D.x,A=D.y0,I=D.y;b.push(M,A),w.push(M,A+I),x=i.getItemVisual(S[T],"style")}var P,E=i.getItemLayout(S[0]),O=t.getModel("label"),N=O.get("margin"),V=t.getModel("emphasis");if(g==="add"){var $=d[y]=new Te;P=new yE({shape:{points:b,stackedOnPoints:w,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),$.add(P),s.add($),t.isAnimationEnabled()&&P.setClipPath(dre(P.getBoundingRect(),t,function(){P.removeClipPath()}))}else{var $=_[m];P=$.childAt(0),s.add($),d[y]=$,qe(P,{shape:{points:b,stackedOnPoints:w}},t),da(P)}yr(P,rr(t),{labelDataIndex:S[T-1],defaultText:i.getName(S[T-1]),inheritColor:x.fill},{normal:{verticalAlign:"middle"}}),P.setTextConfig({position:null,local:!0});var U=P.getTextContent();U&&(U.x=E.x-N,U.y=E.y0+E.y/2),P.useStyle(x),i.setItemGraphicEl(y,P),gr(P,t),Lt(P,V.get("focus"),V.get("blurScope"),V.get("disabled"))}this._layersSeries=l,this._layers=d},e.type="themeRiver",e}(ut);function dre(r,e,t){var n=new Ge({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return xt(n,{shape:{x:r.x-50,width:r.width+100,height:r.height+20}},e,t),n}var pre=vre,$x=2,gre=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Wf(fe(this.getData,this),fe(this.getRawData,this))},e.prototype.fixData=function(t){var n=t.length,a={},i=k0(t,function(h){return a.hasOwnProperty(h[0]+"")||(a[h[0]+""]=-1),h[2]}),o=[];i.buckets.each(function(h,v){o.push({name:v,dataList:h})});for(var s=o.length,l=0;l<s;++l){for(var u=o[l].name,c=0;c<o[l].dataList.length;++c){var f=o[l].dataList[c][0]+"";a[f]=l}for(var f in a)a.hasOwnProperty(f)&&a[f]!==l&&(a[f]=l,t[n]=[f,0,u],n++)}return t},e.prototype.getInitialData=function(t,n){for(var a=this.getReferringComponents("singleAxis",$t).models[0],i=a.get("type"),o=nt(t.data,function(d){return d[2]!==void 0}),s=this.fixData(o||[]),l=[],u=this.nameMap=ge(),c=0,f=0;f<s.length;++f)l.push(s[f][$x]),u.get(s[f][$x])||(u.set(s[f][$x],c),c++);var h=hu(s,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:vp(i)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,v=new Er(h,this);return v.initData(s),v},e.prototype.getLayerSeries=function(){for(var t=this.getData(),n=t.count(),a=[],i=0;i<n;++i)a[i]=i;var o=t.mapDimension("single"),s=k0(a,function(u){return t.get("name",u)}),l=[];return s.buckets.each(function(u,c){u.sort(function(f,h){return t.get(o,f)-t.get(o,h)}),l.push({name:c,indices:u})}),l},e.prototype.getAxisTooltipData=function(t,n,a){K(t)||(t=t?[t]:[]);for(var i=this.getData(),o=this.getLayerSeries(),s=[],l=o.length,u,c=0;c<l;++c){for(var f=Number.MAX_VALUE,h=-1,v=o[c].indices.length,d=0;d<v;++d){var p=i.get(t[0],o[c].indices[d]),g=Math.abs(p-n);g<=f&&(u=p,f=g,h=o[c].indices[d])}s.push(h)}return{dataIndices:s,nestestValue:u}},e.prototype.formatTooltip=function(t,n,a){var i=this.getData(),o=i.getName(t),s=i.get(i.mapDimension("value"),t);return nr("nameValue",{name:o,value:s})},e.type="series.themeRiver",e.dependencies=["singleAxis"],e.defaultOption={z:2,colorBy:"data",coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",fontSize:11},emphasis:{label:{show:!0}}},e}(yt),yre=gre;function mre(r,e){r.eachSeriesByType("themeRiver",function(t){var n=t.getData(),a=t.coordinateSystem,i={},o=a.getRect();i.rect=o;var s=t.get("boundaryGap"),l=a.getAxis();if(i.boundaryGap=s,l.orient==="horizontal"){s[0]=le(s[0],o.height),s[1]=le(s[1],o.height);var u=o.height-s[0]-s[1];GN(n,t,u)}else{s[0]=le(s[0],o.width),s[1]=le(s[1],o.width);var c=o.width-s[0]-s[1];GN(n,t,c)}n.setLayout("layoutInfo",i)})}function GN(r,e,t){if(!!r.count())for(var n=e.coordinateSystem,a=e.getLayerSeries(),i=r.mapDimension("single"),o=r.mapDimension("value"),s=J(a,function(g){return J(g.indices,function(y){var m=n.dataToPoint(r.get(i,y));return m[1]=r.get(o,y),m})}),l=_re(s),u=l.y0,c=t/l.max,f=a.length,h=a[0].indices.length,v,d=0;d<h;++d){v=u[d]*c,r.setItemLayout(a[0].indices[d],{layerIndex:0,x:s[0][d][0],y0:v,y:s[0][d][1]*c});for(var p=1;p<f;++p)v+=s[p-1][d][1]*c,r.setItemLayout(a[p].indices[d],{layerIndex:p,x:s[p][d][0],y0:v,y:s[p][d][1]*c})}}function _re(r){for(var e=r.length,t=r[0].length,n=[],a=[],i=0,o=0;o<t;++o){for(var s=0,l=0;l<e;++l)s+=r[l][o][1];s>i&&(i=s),n.push(s)}for(var u=0;u<t;++u)a[u]=(i-n[u])/2;i=0;for(var c=0;c<t;++c){var f=n[c]+a[c];f>i&&(i=f)}return{y0:a,max:i}}function bre(r){r.registerChartView(pre),r.registerSeriesModel(yre),r.registerLayout(mre),r.registerProcessor(Gf("themeRiver"))}var xre=2,wre=4,Sre=function(r){j(e,r);function e(t,n,a,i){var o=r.call(this)||this;o.z2=xre,o.textConfig={inside:!0},Me(o).seriesIndex=n.seriesIndex;var s=new We({z2:wre,silent:t.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,t,n,a,i),o}return e.prototype.updateData=function(t,n,a,i,o){this.node=n,n.piece=this,a=a||this._seriesModel,i=i||this._ecModel;var s=this;Me(s).dataIndex=n.dataIndex;var l=n.getModel(),u=l.getModel("emphasis"),c=n.getLayout(),f=Q({},c);f.label=null;var h=n.getVisual("style");h.lineJoin="bevel";var v=n.getVisual("decal");v&&(h.decal=cu(v,o));var d=yu(l.getModel("itemStyle"),f,!0);Q(f,d),L($r,function(m){var _=s.ensureState(m),b=l.getModel([m,"itemStyle"]);_.style=b.getItemStyle();var w=yu(b,f);w&&(_.shape=w)}),t?(s.setShape(f),s.shape.r=c.r0,qe(s,{shape:{r:c.r}},a,n.dataIndex)):(qe(s,{shape:f},a),da(s)),s.useStyle(h),this._updateLabel(a);var p=l.getShallow("cursor");p&&s.attr("cursor",p),this._seriesModel=a||this._seriesModel,this._ecModel=i||this._ecModel;var g=u.get("focus"),y=g==="ancestor"?n.getAncestorsIndices():g==="descendant"?n.getDescendantIndices():g;Lt(this,y,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t){var n=this,a=this.node.getModel(),i=a.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),c=Math.sin(l),f=this,h=f.getTextContent(),v=this.node.dataIndex,d=i.get("minAngle")/180*Math.PI,p=i.get("show")&&!(d!=null&&Math.abs(s)<d);h.ignore=!p,L(Uc,function(y){var m=y==="normal"?a.getModel("label"):a.getModel([y,"label"]),_=y==="normal",b=_?h:h.ensureState(y),w=t.getFormattedLabel(v,y);_&&(w=w||n.node.name),b.style=gt(m,{},null,y!=="normal",!0),w&&(b.style.text=w);var x=m.get("show");x!=null&&!_&&(b.ignore=!x);var S=g(m,"position"),T=_?f:f.states[y],D=T.style.fill;T.textConfig={outsideFill:m.get("color")==="inherit"?D:null,inside:S!=="outside"};var M,A=g(m,"distance")||0,I=g(m,"align");S==="outside"?(M=o.r+A,I=l>Math.PI/2?"right":"left"):!I||I==="center"?(s===2*Math.PI&&o.r0===0?M=0:M=(o.r+o.r0)/2,I="center"):I==="left"?(M=o.r0+A,l>Math.PI/2&&(I="right")):I==="right"&&(M=o.r-A,l>Math.PI/2&&(I="left")),b.style.align=I,b.style.verticalAlign=g(m,"verticalAlign")||"middle",b.x=M*u+o.cx,b.y=M*c+o.cy;var P=g(m,"rotate"),E=0;P==="radial"?(E=-l,E<-Math.PI/2&&(E+=Math.PI)):P==="tangential"?(E=Math.PI/2-l,E>Math.PI/2?E-=Math.PI:E<-Math.PI/2&&(E+=Math.PI)):je(P)&&(E=P*Math.PI/180),b.rotation=E});function g(y,m){var _=y.get(m);return _==null?i.get(m):_}h.dirtyStyle()},e}(Hr),WN=Sre,Hx="sunburstRootToNode",UN="sunburstHighlight",Cre="sunburstUnhighlight";function Tre(r){r.registerAction({type:Hx,update:"updateView"},function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},n);function n(a,i){var o=Qf(e,[Hx],a);if(o){var s=a.getViewRoot();s&&(e.direction=Hb(s,o.node)?"rollUp":"drillDown"),a.resetViewRoot(o.node)}}}),r.registerAction({type:UN,update:"none"},function(e,t,n){e=Q({},e),t.eachComponent({mainType:"series",subType:"sunburst",query:e},a);function a(i){var o=Qf(e,[UN],i);o&&(e.dataIndex=o.node.dataIndex)}n.dispatchAction(Q(e,{type:"highlight"}))}),r.registerAction({type:Cre,update:"updateView"},function(e,t,n){e=Q({},e),n.dispatchAction(Q(e,{type:"downplay"}))})}var Dre=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a,i){var o=this;this.seriesModel=t,this.api=a,this.ecModel=n;var s=t.getData(),l=s.tree.root,u=t.getViewRoot(),c=this.group,f=t.get("renderLabelForZeroData"),h=[];u.eachNode(function(m){h.push(m)});var v=this._oldChildren||[];d(h,v),y(l,u),this._initEvents(),this._oldChildren=h;function d(m,_){if(m.length===0&&_.length===0)return;new pi(_,m,b,b).add(w).update(w).remove(Ae(w,null)).execute();function b(x){return x.getId()}function w(x,S){var T=x==null?null:m[x],D=S==null?null:_[S];p(T,D)}}function p(m,_){if(!f&&m&&!m.getValue()&&(m=null),m!==l&&_!==l){if(_&&_.piece)m?(_.piece.updateData(!1,m,t,n,a),s.setItemGraphicEl(m.dataIndex,_.piece)):g(_);else if(m){var b=new WN(m,t,n,a);c.add(b),s.setItemGraphicEl(m.dataIndex,b)}}}function g(m){!m||m.piece&&(c.remove(m.piece),m.piece=null)}function y(m,_){_.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,m,t,n,a):(o.virtualPiece=new WN(m,t,n,a),c.add(o.virtualPiece)),_.piece.off("click"),o.virtualPiece.on("click",function(b){o._rootToNode(_.parentNode)})):o.virtualPiece&&(c.remove(o.virtualPiece),o.virtualPiece=null)}},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",function(n){var a=!1,i=t.seriesModel.getViewRoot();i.eachNode(function(o){if(!a&&o.piece&&o.piece===n.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")t._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var c=l.get("target",!0)||"_blank";Vd(u,c)}}a=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:Hx,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,n){var a=n.getData(),i=a.getItemLayout(0);if(i){var o=t[0]-i.cx,s=t[1]-i.cy,l=Math.sqrt(o*o+s*s);return l<=i.r&&l>=i.r0}},e.type="sunburst",e}(ut),Mre=Dre,Are=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t,n){var a={name:t.name,children:t.data};jN(a);var i=this._levelModels=J(t.levels||[],function(l){return new lt(l,this,n)},this),o=$b.createTree(a,this,s);function s(l){l.wrapMethod("getItemModel",function(u,c){var f=o.getNodeByDataIndex(c),h=i[f.depth];return h&&(u.parentModel=h),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(t){var n=r.prototype.getDataParams.apply(this,arguments),a=this.getData().tree.getNodeByDataIndex(t);return n.treePathInfo=jp(a,this),n},e.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var n=this.getRawData().tree.root;(!t||t!==n&&!n.contains(t))&&(this._viewRoot=n)},e.prototype.enableAriaDecal=function(){nR(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(yt);function jN(r){var e=0;L(r.children,function(n){jN(n);var a=n.value;K(a)&&(a=a[0]),e+=a});var t=r.value;K(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),K(r.value)?r.value[0]=t:r.value=t}var Lre=Are,YN=Math.PI/180;function Ire(r,e,t){e.eachSeriesByType(r,function(n){var a=n.get("center"),i=n.get("radius");K(i)||(i=[0,i]),K(a)||(a=[a,a]);var o=t.getWidth(),s=t.getHeight(),l=Math.min(o,s),u=le(a[0],o),c=le(a[1],s),f=le(i[0],l/2),h=le(i[1],l/2),v=-n.get("startAngle")*YN,d=n.get("minAngle")*YN,p=n.getData().tree.root,g=n.getViewRoot(),y=g.depth,m=n.get("sort");m!=null&&qN(g,m);var _=0;L(g.children,function(N){!isNaN(N.getValue())&&_++});var b=g.getValue(),w=Math.PI/(b||_)*2,x=g.depth>0,S=g.height-(x?-1:1),T=(h-f)/(S||1),D=n.get("clockwise"),M=n.get("stillShowZeroSum"),A=D?1:-1,I=function(N,V){if(!!N){var $=V;if(N!==p){var U=N.getValue(),Y=b===0&&M?w:U*w;Y<d&&(Y=d),$=V+A*Y;var ae=N.depth-y-(x?-1:1),H=f+T*ae,q=f+T*(ae+1),X=n.getLevelModel(N);if(X){var Z=X.get("r0",!0),ie=X.get("r",!0),se=X.get("radius",!0);se!=null&&(Z=se[0],ie=se[1]),Z!=null&&(H=le(Z,l/2)),ie!=null&&(q=le(ie,l/2))}N.setLayout({angle:Y,startAngle:V,endAngle:$,clockwise:D,cx:u,cy:c,r0:H,r:q})}if(N.children&&N.children.length){var te=0;L(N.children,function(ve){te+=I(ve,V+te)})}return $-V}};if(x){var P=f,E=f+T,O=Math.PI*2;p.setLayout({angle:O,startAngle:v,endAngle:v+O,clockwise:D,cx:u,cy:c,r0:P,r:E})}I(g,v)})}function qN(r,e){var t=r.children||[];r.children=Pre(t,e),t.length&&L(r.children,function(n){qN(n,e)})}function Pre(r,e){if(ye(e)){var t=J(r,function(a,i){var o=a.getValue();return{params:{depth:a.depth,height:a.height,dataIndex:a.dataIndex,getValue:function(){return o}},index:i}});return t.sort(function(a,i){return e(a.params,i.params)}),J(t,function(a){return r[a.index]})}else{var n=e==="asc";return r.sort(function(a,i){var o=(a.getValue()-i.getValue())*(n?1:-1);return o===0?(a.dataIndex-i.dataIndex)*(n?-1:1):o})}}function Ere(r){var e={};function t(n,a,i){for(var o=n;o&&o.depth>1;)o=o.parentNode;var s=a.getColorFromPalette(o.name||o.dataIndex+"",e);return n.depth>1&&ce(s)&&(s=Hv(s,(n.depth-1)/(i-1)*.5)),s}r.eachSeriesByType("sunburst",function(n){var a=n.getData(),i=a.tree;i.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=t(o,n,i.root.height));var u=a.ensureUniqueItemVisual(o.dataIndex,"style");Q(u,l)})})}function Ore(r){r.registerChartView(Mre),r.registerSeriesModel(Lre),r.registerLayout(Ae(Ire,"sunburst")),r.registerProcessor(Ae(Gf,"sunburst")),r.registerVisual(Ere),Tre(r)}var ZN={color:"fill",borderColor:"stroke"},Rre={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},xi=Ye(),Nre=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,n){return Wa(null,this)},e.prototype.getDataParams=function(t,n,a){var i=r.prototype.getDataParams.call(this,t,n);return a&&(i.info=xi(a).info),i},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(yt),kre=Nre;function Bre(r,e){return e=e||[0,0],J(["x","y"],function(t,n){var a=this.getAxis(t),i=e[n],o=r[n]/2;return a.type==="category"?a.getBandWidth():Math.abs(a.dataToCoord(i-o)-a.dataToCoord(i+o))},this)}function zre(r){var e=r.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:fe(Bre,r)}}}function Fre(r,e){return e=e||[0,0],J([0,1],function(t){var n=e[t],a=r[t]/2,i=[],o=[];return i[t]=n-a,o[t]=n+a,i[1-t]=o[1-t]=e[1-t],Math.abs(this.dataToPoint(i)[t]-this.dataToPoint(o)[t])},this)}function Vre(r){var e=r.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:r.getZoom()},api:{coord:function(t){return r.dataToPoint(t)},size:fe(Fre,r)}}}function $re(r,e){var t=this.getAxis(),n=e instanceof Array?e[0]:e,a=(r instanceof Array?r[0]:r)/2;return t.type==="category"?t.getBandWidth():Math.abs(t.dataToCoord(n-a)-t.dataToCoord(n+a))}function Hre(r){var e=r.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:fe($re,r)}}}function Gre(r,e){return e=e||[0,0],J(["Radius","Angle"],function(t,n){var a="get"+t+"Axis",i=this[a](),o=e[n],s=r[n]/2,l=i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(o-s)-i.dataToCoord(o+s));return t==="Angle"&&(l=l*Math.PI/180),l},this)}function Wre(r){var e=r.getRadiusAxis(),t=r.getAngleAxis(),n=e.getExtent();return n[0]>n[1]&&n.reverse(),{coordSys:{type:"polar",cx:r.cx,cy:r.cy,r:n[1],r0:n[0]},api:{coord:function(a){var i=e.dataToRadius(a[0]),o=t.dataToAngle(a[1]),s=r.coordToPoint([i,o]);return s.push(i,o*Math.PI/180),s},size:fe(Gre,r)}}}function Ure(r){var e=r.getRect(),t=r.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:r.getCellWidth(),cellHeight:r.getCellHeight(),rangeInfo:{start:t.start,end:t.end,weeks:t.weeks,dayCount:t.allDay}},api:{coord:function(n,a){return r.dataToPoint(n,a)}}}}function XN(r,e,t,n){return r&&(r.legacy||r.legacy!==!1&&!t&&!n&&e!=="tspan"&&(e==="text"||he(r,"text")))}function QN(r,e,t){var n=r,a,i,o;if(e==="text")o=n;else{o={},he(n,"text")&&(o.text=n.text),he(n,"rich")&&(o.rich=n.rich),he(n,"textFill")&&(o.fill=n.textFill),he(n,"textStroke")&&(o.stroke=n.textStroke),he(n,"fontFamily")&&(o.fontFamily=n.fontFamily),he(n,"fontSize")&&(o.fontSize=n.fontSize),he(n,"fontStyle")&&(o.fontStyle=n.fontStyle),he(n,"fontWeight")&&(o.fontWeight=n.fontWeight),i={type:"text",style:o,silent:!0},a={};var s=he(n,"textPosition");t?a.position=s?n.textPosition:"inside":s&&(a.position=n.textPosition),he(n,"textPosition")&&(a.position=n.textPosition),he(n,"textOffset")&&(a.offset=n.textOffset),he(n,"textRotation")&&(a.rotation=n.textRotation),he(n,"textDistance")&&(a.distance=n.textDistance)}return KN(o,r),L(o.rich,function(l){KN(l,l)}),{textConfig:a,textContent:i}}function KN(r,e){!e||(e.font=e.textFont||e.font,he(e,"textStrokeWidth")&&(r.lineWidth=e.textStrokeWidth),he(e,"textAlign")&&(r.align=e.textAlign),he(e,"textVerticalAlign")&&(r.verticalAlign=e.textVerticalAlign),he(e,"textLineHeight")&&(r.lineHeight=e.textLineHeight),he(e,"textWidth")&&(r.width=e.textWidth),he(e,"textHeight")&&(r.height=e.textHeight),he(e,"textBackgroundColor")&&(r.backgroundColor=e.textBackgroundColor),he(e,"textPadding")&&(r.padding=e.textPadding),he(e,"textBorderColor")&&(r.borderColor=e.textBorderColor),he(e,"textBorderWidth")&&(r.borderWidth=e.textBorderWidth),he(e,"textBorderRadius")&&(r.borderRadius=e.textBorderRadius),he(e,"textBoxShadowColor")&&(r.shadowColor=e.textBoxShadowColor),he(e,"textBoxShadowBlur")&&(r.shadowBlur=e.textBoxShadowBlur),he(e,"textBoxShadowOffsetX")&&(r.shadowOffsetX=e.textBoxShadowOffsetX),he(e,"textBoxShadowOffsetY")&&(r.shadowOffsetY=e.textBoxShadowOffsetY))}function JN(r,e,t){var n=r;n.textPosition=n.textPosition||t.position||"inside",t.offset!=null&&(n.textOffset=t.offset),t.rotation!=null&&(n.textRotation=t.rotation),t.distance!=null&&(n.textDistance=t.distance);var a=n.textPosition.indexOf("inside")>=0,i=r.fill||"#000";ek(n,e);var o=n.textFill==null;return a?o&&(n.textFill=t.insideFill||"#fff",!n.textStroke&&t.insideStroke&&(n.textStroke=t.insideStroke),!n.textStroke&&(n.textStroke=i),n.textStrokeWidth==null&&(n.textStrokeWidth=2)):(o&&(n.textFill=r.fill||t.outsideFill||"#000"),!n.textStroke&&t.outsideStroke&&(n.textStroke=t.outsideStroke)),n.text=e.text,n.rich=e.rich,L(e.rich,function(s){ek(s,s)}),n}function ek(r,e){!e||(he(e,"fill")&&(r.textFill=e.fill),he(e,"stroke")&&(r.textStroke=e.fill),he(e,"lineWidth")&&(r.textStrokeWidth=e.lineWidth),he(e,"font")&&(r.font=e.font),he(e,"fontStyle")&&(r.fontStyle=e.fontStyle),he(e,"fontWeight")&&(r.fontWeight=e.fontWeight),he(e,"fontSize")&&(r.fontSize=e.fontSize),he(e,"fontFamily")&&(r.fontFamily=e.fontFamily),he(e,"align")&&(r.textAlign=e.align),he(e,"verticalAlign")&&(r.textVerticalAlign=e.verticalAlign),he(e,"lineHeight")&&(r.textLineHeight=e.lineHeight),he(e,"width")&&(r.textWidth=e.width),he(e,"height")&&(r.textHeight=e.height),he(e,"backgroundColor")&&(r.textBackgroundColor=e.backgroundColor),he(e,"padding")&&(r.textPadding=e.padding),he(e,"borderColor")&&(r.textBorderColor=e.borderColor),he(e,"borderWidth")&&(r.textBorderWidth=e.borderWidth),he(e,"borderRadius")&&(r.textBorderRadius=e.borderRadius),he(e,"shadowColor")&&(r.textBoxShadowColor=e.shadowColor),he(e,"shadowBlur")&&(r.textBoxShadowBlur=e.shadowBlur),he(e,"shadowOffsetX")&&(r.textBoxShadowOffsetX=e.shadowOffsetX),he(e,"shadowOffsetY")&&(r.textBoxShadowOffsetY=e.shadowOffsetY),he(e,"textShadowColor")&&(r.textShadowColor=e.textShadowColor),he(e,"textShadowBlur")&&(r.textShadowBlur=e.textShadowBlur),he(e,"textShadowOffsetX")&&(r.textShadowOffsetX=e.textShadowOffsetX),he(e,"textShadowOffsetY")&&(r.textShadowOffsetY=e.textShadowOffsetY))}var tk={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},rk=Fe(tk);Pn(Ra,function(r,e){return r[e]=1,r},{}),Ra.join(", ");var ig=["","style","shape","extra"],Mu=Ye();function Gx(r,e,t,n,a){var i=r+"Animation",o=Gl(r,n,a)||{},s=Mu(e).userDuring;return o.duration>0&&(o.during=s?fe(Xre,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=r),Q(o,t[i]),o}function og(r,e,t,n){n=n||{};var a=n.dataIndex,i=n.isInit,o=n.clearStyle,s=t.isAnimationEnabled(),l=Mu(r),u=e.style;l.userDuring=e.during;var c={},f={};if(Kre(r,e,f),ik("shape",e,f),ik("extra",e,f),!i&&s&&(Qre(r,e,c),ak("shape",r,e,c),ak("extra",r,e,c),Jre(r,e,u,c)),f.style=u,jre(r,f,o),qre(r,e),s)if(i){var h={};L(ig,function(d){var p=d?e[d]:e;p&&p.enterFrom&&(d&&(h[d]=h[d]||{}),Q(d?h[d]:h,p.enterFrom))});var v=Gx("enter",r,e,t,a);v.duration>0&&r.animateFrom(h,v)}else Yre(r,e,a||0,t,c);nk(r,e),u?r.dirty():r.markRedraw()}function nk(r,e){for(var t=Mu(r).leaveToProps,n=0;n<ig.length;n++){var a=ig[n],i=a?e[a]:e;i&&i.leaveTo&&(t||(t=Mu(r).leaveToProps={}),a&&(t[a]=t[a]||{}),Q(a?t[a]:t,i.leaveTo))}}function sg(r,e,t,n){if(r){var a=r.parent,i=Mu(r).leaveToProps;if(i){var o=Gx("update",r,e,t,0);o.done=function(){a.remove(r),n&&n()},r.animateTo(i,o)}else a.remove(r),n&&n()}}function Ks(r){return r==="all"}function jre(r,e,t){var n=e.style;if(!r.isGroup&&n){if(t){r.useStyle({});for(var a=r.animators,i=0;i<a.length;i++){var o=a[i];o.targetName==="style"&&o.changeTarget(r.style)}}r.setStyle(n)}e&&(e.style=null,e&&r.attr(e),e.style=n)}function Yre(r,e,t,n,a){if(a){var i=Gx("update",r,e,n,t);i.duration>0&&r.animateFrom(a,i)}}function qre(r,e){he(e,"silent")&&(r.silent=e.silent),he(e,"ignore")&&(r.ignore=e.ignore),r instanceof Bn&&he(e,"invisible")&&(r.invisible=e.invisible),r instanceof Be&&he(e,"autoBatch")&&(r.autoBatch=e.autoBatch)}var Za={},Zre={setTransform:function(r,e){return Za.el[r]=e,this},getTransform:function(r){return Za.el[r]},setShape:function(r,e){var t=Za.el,n=t.shape||(t.shape={});return n[r]=e,t.dirtyShape&&t.dirtyShape(),this},getShape:function(r){var e=Za.el.shape;if(e)return e[r]},setStyle:function(r,e){var t=Za.el,n=t.style;return n&&(n[r]=e,t.dirtyStyle&&t.dirtyStyle()),this},getStyle:function(r){var e=Za.el.style;if(e)return e[r]},setExtra:function(r,e){var t=Za.el.extra||(Za.el.extra={});return t[r]=e,this},getExtra:function(r){var e=Za.el.extra;if(e)return e[r]}};function Xre(){var r=this,e=r.el;if(!!e){var t=Mu(e).userDuring,n=r.userDuring;if(t!==n){r.el=r.userDuring=null;return}Za.el=e,n(Zre)}}function ak(r,e,t,n){var a=t[r];if(!!a){var i=e[r],o;if(i){var s=t.transition,l=a.transition;if(l)if(!o&&(o=n[r]={}),Ks(l))Q(o,i);else for(var u=st(l),c=0;c<u.length;c++){var f=u[c],h=i[f];o[f]=h}else if(Ks(s)||Ne(s,r)>=0){!o&&(o=n[r]={});for(var v=Fe(i),c=0;c<v.length;c++){var f=v[c],h=i[f];ene(a[f],h)&&(o[f]=h)}}}}}function ik(r,e,t){var n=e[r];if(!!n)for(var a=t[r]={},i=Fe(n),o=0;o<i.length;o++){var s=i[o];a[s]=Pc(n[s])}}function Qre(r,e,t){for(var n=e.transition,a=Ks(n)?Ra:st(n||[]),i=0;i<a.length;i++){var o=a[i];if(!(o==="style"||o==="shape"||o==="extra")){var s=r[o];t[o]=s}}}function Kre(r,e,t){for(var n=0;n<rk.length;n++){var a=rk[n],i=tk[a],o=e[a];o&&(t[i[0]]=o[0],t[i[1]]=o[1])}for(var n=0;n<Ra.length;n++){var s=Ra[n];e[s]!=null&&(t[s]=e[s])}}function Jre(r,e,t,n){if(!!t){var a=r.style,i;if(a){var o=t.transition,s=e.transition;if(o&&!Ks(o)){var l=st(o);!i&&(i=n.style={});for(var u=0;u<l.length;u++){var c=l[u],f=a[c];i[c]=f}}else if(r.getAnimationStyleProps&&(Ks(s)||Ks(o)||Ne(s,"style")>=0)){var h=r.getAnimationStyleProps(),v=h?h.style:null;if(v){!i&&(i=n.style={});for(var d=Fe(t),u=0;u<d.length;u++){var c=d[u];if(v[c]){var f=a[c];i[c]=f}}}}}}}function ene(r,e){return pr(r)?r!==e:r!=null&&isFinite(r)}var ok=Ye(),tne=["percent","easing","shape","style","extra"];function sk(r){r.stopAnimation("keyframe"),r.attr(ok(r))}function lg(r,e,t){if(!(!t.isAnimationEnabled()||!e)){if(K(e)){L(e,function(s){lg(r,s,t)});return}var n=e.keyframes,a=e.duration;if(t&&a==null){var i=Gl("enter",t,0);a=i&&i.duration}if(!(!n||!a)){var o=ok(r);L(ig,function(s){if(!(s&&!r[s])){var l;n.sort(function(u,c){return u.percent-c.percent}),L(n,function(u){var c=r.animators,f=s?u[s]:u;if(!!f){var h=Fe(f);if(s||(h=nt(h,function(p){return Ne(tne,p)<0})),!!h.length){l||(l=r.animate(s,e.loop,!0),l.scope="keyframe");for(var v=0;v<c.length;v++)c[v]!==l&&c[v].targetName===l.targetName&&c[v].stopTracks(h);s&&(o[s]=o[s]||{});var d=s?o[s]:o;L(h,function(p){d[p]=((s?r[s]:r)||{})[p]}),l.whenWithKeys(a*u.percent,f,h,u.easing)}}}),l&&l.delay(e.delay||0).duration(a).start(e.easing)}})}}}var wi="emphasis",So="normal",Wx="blur",Ux="select",Co=[So,wi,Wx,Ux],jx={normal:["itemStyle"],emphasis:[wi,"itemStyle"],blur:[Wx,"itemStyle"],select:[Ux,"itemStyle"]},Yx={normal:["label"],emphasis:[wi,"label"],blur:[Wx,"label"],select:[Ux,"label"]},rne=["x","y"],nne="e\0\0",Zn={normal:{},emphasis:{},blur:{},select:{}},ane={cartesian2d:zre,geo:Vre,single:Hre,polar:Wre,calendar:Ure};function qx(r){return r instanceof Be}function Zx(r){return r instanceof Bn}function ine(r,e){e.copyTransform(r),Zx(e)&&Zx(r)&&(e.setStyle(r.style),e.z=r.z,e.z2=r.z2,e.zlevel=r.zlevel,e.invisible=r.invisible,e.ignore=r.ignore,qx(e)&&qx(r)&&e.setShape(r.shape))}var one=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a,i){this._progressiveEls=null;var o=this._data,s=t.getData(),l=this.group,u=uk(t,s,n,a);o||l.removeAll(),s.diff(o).add(function(f){Kx(a,null,f,u(f,i),t,l,s)}).remove(function(f){var h=o.getItemGraphicEl(f);h&&sg(h,xi(h).option,t)}).update(function(f,h){var v=o.getItemGraphicEl(h);Kx(a,v,f,u(f,i),t,l,s)}).execute();var c=t.get("clip",!0)?Ep(t.coordinateSystem,!1,t):null;c?l.setClipPath(c):l.removeClipPath(),this._data=s},e.prototype.incrementalPrepareRender=function(t,n,a){this.group.removeAll(),this._data=null},e.prototype.incrementalRender=function(t,n,a,i,o){var s=n.getData(),l=uk(n,s,a,i),u=this._progressiveEls=[];function c(v){v.isGroup||(v.incremental=!0,v.ensureState("emphasis").hoverLayer=!0)}for(var f=t.start;f<t.end;f++){var h=Kx(null,null,f,l(f,o),n,this.group,s);h&&(h.traverse(c),u.push(h))}},e.prototype.eachRendered=function(t){oo(this._progressiveEls||this.group,t)},e.prototype.filterForExposedEvent=function(t,n,a,i){var o=n.element;if(o==null||a.name===o)return!0;for(;(a=a.__hostTarget||a.parent)&&a!==this.group;)if(a.name===o)return!0;return!1},e.type="custom",e}(ut),sne=one;function Xx(r){var e=r.type,t;if(e==="path"){var n=r.shape,a=n.width!=null&&n.height!=null?{x:n.x||0,y:n.y||0,width:n.width,height:n.height}:null,i=dk(n);t=tf(i,null,a,n.layout||"center"),xi(t).customPathData=i}else if(e==="image")t=new ur({}),xi(t).customImagePath=r.style.image;else if(e==="text")t=new We({});else if(e==="group")t=new Te;else{if(e==="compoundPath")throw new Error('"compoundPath" is not supported yet.');var o=Ad(e);if(!o){var s="";tt(s)}t=new o}return xi(t).customGraphicType=e,t.name=r.name,t.z2EmphasisLift=1,t.z2SelectLift=1,t}function Qx(r,e,t,n,a,i,o){sk(e);var s=a&&a.normal.cfg;s&&e.setTextConfig(s),n&&n.transition==null&&(n.transition=rne);var l=n&&n.style;if(l){if(e.type==="text"){var u=l;he(u,"textFill")&&(u.fill=u.textFill),he(u,"textStroke")&&(u.stroke=u.textStroke)}var c=void 0,f=qx(e)?l.decal:null;r&&f&&(f.dirty=!0,c=cu(f,r)),l.__decalPattern=c}if(Zx(e)&&l){var c=l.__decalPattern;c&&(l.decal=c)}og(e,n,i,{dataIndex:t,isInit:o,clearStyle:!0}),lg(e,n.keyframeAnimation,i)}function lk(r,e,t,n,a){var i=e.isGroup?null:e,o=a&&a[r].cfg;if(i){var s=i.ensureState(r);if(n===!1){var l=i.getState(r);l&&(l.style=null)}else s.style=n||null;o&&(s.textConfig=o),ps(i)}}function lne(r,e,t){if(!r.isGroup){var n=r,a=t.currentZ,i=t.currentZLevel;n.z=a,n.zlevel=i;var o=e.z2;o!=null&&(n.z2=o||0);for(var s=0;s<Co.length;s++)une(n,e,Co[s])}}function une(r,e,t){var n=t===So,a=n?e:ug(e,t),i=a?a.z2:null,o;i!=null&&(o=n?r:r.ensureState(t),o.z2=i||0)}function uk(r,e,t,n){var a=r.get("renderItem"),i=r.coordinateSystem,o={};i&&(o=i.prepareCustoms?i.prepareCustoms(i):ane[i.type](i));for(var s=me({getWidth:n.getWidth,getHeight:n.getHeight,getZr:n.getZr,getDevicePixelRatio:n.getDevicePixelRatio,value:b,style:x,ordinalRawValue:w,styleEmphasis:S,visual:M,barLayout:A,currentSeriesIndices:I,font:P},o.api||{}),l={context:{},seriesId:r.id,seriesName:r.name,seriesIndex:r.seriesIndex,coordSys:o.coordSys,dataInsideLength:e.count(),encode:cne(r.getData())},u,c,f={},h={},v={},d={},p=0;p<Co.length;p++){var g=Co[p];v[g]=r.getModel(jx[g]),d[g]=r.getModel(Yx[g])}function y(E){return E===u?c||(c=e.getItemModel(E)):e.getItemModel(E)}function m(E,O){return e.hasItemOption?E===u?f[O]||(f[O]=y(E).getModel(jx[O])):y(E).getModel(jx[O]):v[O]}function _(E,O){return e.hasItemOption?E===u?h[O]||(h[O]=y(E).getModel(Yx[O])):y(E).getModel(Yx[O]):d[O]}return function(E,O){return u=E,c=null,f={},h={},a&&a(me({dataIndexInside:E,dataIndex:e.getRawIndex(E),actionType:O?O.type:null},l),s)};function b(E,O){return O==null&&(O=u),e.getStore().get(e.getDimensionIndex(E||0),O)}function w(E,O){O==null&&(O=u),E=E||0;var N=e.getDimensionInfo(E);if(!N){var V=e.getDimensionIndex(E);return V>=0?e.getStore().get(V,O):void 0}var $=e.get(N.name,O),U=N&&N.ordinalMeta;return U?U.categories[$]:$}function x(E,O){O==null&&(O=u);var N=e.getItemVisual(O,"style"),V=N&&N.fill,$=N&&N.opacity,U=m(O,So).getItemStyle();V!=null&&(U.fill=V),$!=null&&(U.opacity=$);var Y={inheritColor:ce(V)?V:"#000"},ae=_(O,So),H=gt(ae,null,Y,!1,!0);H.text=ae.getShallow("show")?Ee(r.getFormattedLabel(O,So),gu(e,O)):null;var q=Ed(ae,Y,!1);return D(E,U),U=JN(U,H,q),E&&T(U,E),U.legacy=!0,U}function S(E,O){O==null&&(O=u);var N=m(O,wi).getItemStyle(),V=_(O,wi),$=gt(V,null,null,!0,!0);$.text=V.getShallow("show")?Ia(r.getFormattedLabel(O,wi),r.getFormattedLabel(O,So),gu(e,O)):null;var U=Ed(V,null,!0);return D(E,N),N=JN(N,$,U),E&&T(N,E),N.legacy=!0,N}function T(E,O){for(var N in O)he(O,N)&&(E[N]=O[N])}function D(E,O){E&&(E.textFill&&(O.textFill=E.textFill),E.textPosition&&(O.textPosition=E.textPosition))}function M(E,O){if(O==null&&(O=u),he(ZN,E)){var N=e.getItemVisual(O,"style");return N?N[ZN[E]]:null}if(he(Rre,E))return e.getItemVisual(O,E)}function A(E){if(i.type==="cartesian2d"){var O=i.getBaseAxis();return K6(me({axis:O},E))}}function I(){return t.getCurrentSeriesIndices()}function P(E){return KM(E,t)}}function cne(r){var e={};return L(r.dimensions,function(t){var n=r.getDimensionInfo(t);if(!n.isExtraCoord){var a=n.coordDim,i=e[a]=e[a]||[];i[n.coordDimIndex]=r.getDimensionIndex(t)}}),e}function Kx(r,e,t,n,a,i,o){if(!n){i.remove(e);return}var s=Jx(r,e,t,n,a,i);return s&&o.setItemGraphicEl(t,s),s&&Lt(s,n.focus,n.blurScope,n.emphasisDisabled),s}function Jx(r,e,t,n,a,i){var o=-1,s=e;e&&ck(e,n,a)&&(o=Ne(i.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=Xx(n),s&&ine(s,u)),n.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),Zn.normal.cfg=Zn.normal.conOpt=Zn.emphasis.cfg=Zn.emphasis.conOpt=Zn.blur.cfg=Zn.blur.conOpt=Zn.select.cfg=Zn.select.conOpt=null,Zn.isLegacy=!1,hne(u,t,n,a,l,Zn),fne(u,t,n,a,l),Qx(r,u,t,n,Zn,a,l),he(n,"info")&&(xi(u).info=n.info);for(var c=0;c<Co.length;c++){var f=Co[c];if(f!==So){var h=ug(n,f),v=ew(n,h,f);lk(f,u,h,v,Zn)}}return lne(u,n,a),n.type==="group"&&vne(r,u,t,n,a),o>=0?i.replaceAt(u,o):i.add(u),u}function ck(r,e,t){var n=xi(r),a=e.type,i=e.shape,o=e.style;return t.isUniversalTransitionEnabled()||a!=null&&a!==n.customGraphicType||a==="path"&&yne(i)&&dk(i)!==n.customPathData||a==="image"&&he(o,"image")&&o.image!==n.customImagePath}function fne(r,e,t,n,a){var i=t.clipPath;if(i===!1)r&&r.getClipPath()&&r.removeClipPath();else if(i){var o=r.getClipPath();o&&ck(o,i,n)&&(o=null),o||(o=Xx(i),r.setClipPath(o)),Qx(null,o,e,i,null,n,a)}}function hne(r,e,t,n,a,i){if(!r.isGroup){fk(t,null,i),fk(t,wi,i);var o=i.normal.conOpt,s=i.emphasis.conOpt,l=i.blur.conOpt,u=i.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var c=r.getTextContent();if(o===!1)c&&r.removeTextContent();else{o=i.normal.conOpt=o||{type:"text"},c?c.clearStates():(c=Xx(o),r.setTextContent(c)),Qx(null,c,e,o,null,n,a);for(var f=o&&o.style,h=0;h<Co.length;h++){var v=Co[h];if(v!==So){var d=i[v].conOpt;lk(v,c,d,ew(o,d,v),null)}}f?c.dirty():c.markRedraw()}}}}function fk(r,e,t){var n=e?ug(r,e):r,a=e?ew(r,n,wi):r.style,i=r.type,o=n?n.textConfig:null,s=r.textContent,l=s?e?ug(s,e):s:null;if(a&&(t.isLegacy||XN(a,i,!!o,!!l))){t.isLegacy=!0;var u=QN(a,i,!e);!o&&u.textConfig&&(o=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!e&&l){var c=l;!c.type&&(c.type="text")}var f=e?t[e]:t.normal;f.cfg=o,f.conOpt=l}function ug(r,e){return e?r?r[e]:null:r}function ew(r,e,t){var n=e&&e.style;return n==null&&t===wi&&r&&(n=r.styleEmphasis),n}function vne(r,e,t,n,a){var i=n.children,o=i?i.length:0,s=n.$mergeChildren,l=s==="byName"||n.diffChildrenByName,u=s===!1;if(!(!o&&!l&&!u)){if(l){pne({api:r,oldChildren:e.children()||[],newChildren:i||[],dataIndex:t,seriesModel:a,group:e});return}u&&e.removeAll();for(var c=0;c<o;c++){var f=i[c],h=e.childAt(c);f?(f.ignore==null&&(f.ignore=!1),Jx(r,h,t,f,a,e)):h.ignore=!0}for(var v=e.childCount()-1;v>=c;v--){var d=e.childAt(v);dne(e,d,a)}}}function dne(r,e,t){e&&sg(e,xi(r).option,t)}function pne(r){new pi(r.oldChildren,r.newChildren,hk,hk,r).add(vk).update(vk).remove(gne).execute()}function hk(r,e){var t=r&&r.name;return t!=null?t:nne+e}function vk(r,e){var t=this.context,n=r!=null?t.newChildren[r]:null,a=e!=null?t.oldChildren[e]:null;Jx(t.api,a,t.dataIndex,n,t.seriesModel,t.group)}function gne(r){var e=this.context,t=e.oldChildren[r];t&&sg(t,xi(t).option,e.seriesModel)}function dk(r){return r&&(r.pathData||r.d)}function yne(r){return r&&(he(r,"pathData")||he(r,"d"))}function mne(r){r.registerChartView(sne),r.registerSeriesModel(kre)}var Js=Ye(),pk=we,tw=fe,_ne=function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(e,t,n,a){var i=t.get("value"),o=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=n,!(!a&&this._lastValue===i&&this._lastStatus===o)){this._lastValue=i,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,i,e,t,n);var c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=c;var f=this._moveAnimation=this.determineAnimation(e,t);if(!s)s=this._group=new Te,this.createPointerEl(s,u,e,t),this.createLabelEl(s,u,e,t),n.getZr().add(s);else{var h=Ae(gk,t,f);this.updatePointerEl(s,u,h),this.updateLabelEl(s,u,h,t)}_k(s,t,!0),this._renderHandle(i)}},r.prototype.remove=function(e){this.clear(e)},r.prototype.dispose=function(e){this.clear(e)},r.prototype.determineAnimation=function(e,t){var n=t.get("animation"),a=e.axis,i=a.type==="category",o=t.get("snap");if(!o&&!i)return!1;if(n==="auto"||n==null){var s=this.animationThreshold;if(i&&a.getBandWidth()>s)return!0;if(o){var l=Tb(e).seriesDataCount,u=a.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return n===!0},r.prototype.makeElOption=function(e,t,n,a,i){},r.prototype.createPointerEl=function(e,t,n,a){var i=t.pointer;if(i){var o=Js(e).pointerEl=new af[i.type](pk(t.pointer));e.add(o)}},r.prototype.createLabelEl=function(e,t,n,a){if(t.label){var i=Js(e).labelEl=new We(pk(t.label));e.add(i),mk(i,a)}},r.prototype.updatePointerEl=function(e,t,n){var a=Js(e).pointerEl;a&&t.pointer&&(a.setStyle(t.pointer.style),n(a,{shape:t.pointer.shape}))},r.prototype.updateLabelEl=function(e,t,n,a){var i=Js(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),mk(i,a))},r.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,n=this._api.getZr(),a=this._handle,i=t.getModel("handle"),o=t.get("status");if(!i.get("show")||!o||o==="hide"){a&&n.remove(a),this._handle=null;return}var s;this._handle||(s=!0,a=this._handle=jl(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){oi(u.event)},onmousedown:tw(this._onHandleDragMove,this,0,0),drift:tw(this._onHandleDragMove,this),ondragend:tw(this._onHandleDragEnd,this)}),n.add(a)),_k(a,t,!1),a.setStyle(i.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=i.get("size");K(l)||(l=[l,l]),a.scaleX=l[0]/2,a.scaleY=l[1]/2,ou(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},r.prototype._moveHandleToValue=function(e,t){gk(this._axisPointerModel,!t&&this._moveAnimation,this._handle,rw(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(!!n){this._dragging=!0;var a=this.updateHandleTransform(rw(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=a,n.stopAnimation(),n.attr(rw(a)),Js(n).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(!!e){var t=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(!!e){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,a=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),a&&t.remove(a),this._group=null,this._handle=null,this._payloadInfo=null),mf(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(e,t,n){return n=n||0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}},r}();function gk(r,e,t,n){yk(Js(t).lastProp,n)||(Js(t).lastProp=n,e?qe(t,n,r):(t.stopAnimation(),t.attr(n)))}function yk(r,e){if(_e(r)&&_e(e)){var t=!0;return L(e,function(n,a){t=t&&yk(r[a],n)}),!!t}else return r===e}function mk(r,e){r[e.get(["label","show"])?"show":"hide"]()}function rw(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function _k(r,e,t){var n=e.get("z"),a=e.get("zlevel");r&&r.traverse(function(i){i.type!=="group"&&(n!=null&&(i.z=n),a!=null&&(i.zlevel=a),i.silent=t)})}var nw=_ne;function aw(r){var e=r.get("type"),t=r.getModel(e+"Style"),n;return e==="line"?(n=t.getLineStyle(),n.fill=null):e==="shadow"&&(n=t.getAreaStyle(),n.stroke=null),n}function bk(r,e,t,n,a){var i=t.get("value"),o=xk(i,e.axis,e.ecModel,t.get("seriesDataIndices"),{precision:t.get(["label","precision"]),formatter:t.get(["label","formatter"])}),s=t.getModel("label"),l=xs(s.get("padding")||0),u=s.getFont(),c=Rc(o,u),f=a.position,h=c.width+l[1]+l[3],v=c.height+l[0]+l[2],d=a.align;d==="right"&&(f[0]-=h),d==="center"&&(f[0]-=h/2);var p=a.verticalAlign;p==="bottom"&&(f[1]-=v),p==="middle"&&(f[1]-=v/2),bne(f,h,v,n);var g=s.get("backgroundColor");(!g||g==="auto")&&(g=e.get(["axisLine","lineStyle","color"])),r.label={x:f[0],y:f[1],style:gt(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:g}),z2:10}}function bne(r,e,t,n){var a=n.getWidth(),i=n.getHeight();r[0]=Math.min(r[0]+e,a)-e,r[1]=Math.min(r[1]+t,i)-t,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function xk(r,e,t,n,a){r=e.scale.parse(r);var i=e.scale.getLabel({value:r},{precision:a.precision}),o=a.formatter;if(o){var s={value:j1(e,{value:r}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};L(n,function(l){var u=t.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,f=u&&u.getDataParams(c);f&&s.seriesData.push(f)}),ce(o)?i=o.replace("{value}",i):ye(o)&&(i=o(s))}return i}function iw(r,e,t){var n=gn();return ji(n,n,t.rotation),oa(n,n,t.position),pa([r.dataToCoord(e),(t.labelOffset||0)+(t.labelDirection||1)*(t.labelMargin||0)],n)}function wk(r,e,t,n,a,i){var o=mi.innerTextLayout(t.rotation,0,t.labelDirection);t.labelMargin=a.get(["label","margin"]),bk(e,n,a,i,{position:iw(n.axis,r,t),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function ow(r,e,t){return t=t||0,{x1:r[t],y1:r[1-t],x2:e[t],y2:e[1-t]}}function Sk(r,e,t){return t=t||0,{x:r[t],y:r[1-t],width:e[t],height:e[1-t]}}function Ck(r,e,t,n,a,i){return{cx:r,cy:e,r0:t,r:n,startAngle:a,endAngle:i,clockwise:!0}}var xne=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,n,a,i,o){var s=a.axis,l=s.grid,u=i.get("type"),c=Tk(l,s).getOtherAxis(s).getGlobalExtent(),f=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var h=aw(i),v=wne[u](s,f,c);v.style=h,t.graphicKey=v.type,t.pointer=v}var d=xb(l.model,a);wk(n,t,d,a,i,o)},e.prototype.getHandleTransform=function(t,n,a){var i=xb(n.axis.grid.model,n,{labelInside:!1});i.labelMargin=a.get(["handle","margin"]);var o=iw(n.axis,t,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,n,a,i){var o=a.axis,s=o.grid,l=o.getGlobalExtent(!0),u=Tk(s,o).getOtherAxis(o).getGlobalExtent(),c=o.dim==="x"?0:1,f=[t.x,t.y];f[c]+=n[c],f[c]=Math.min(l[1],f[c]),f[c]=Math.max(l[0],f[c]);var h=(u[1]+u[0])/2,v=[h,h];v[c]=f[c];var d=[{verticalAlign:"middle"},{align:"center"}];return{x:f[0],y:f[1],rotation:t.rotation,cursorPoint:v,tooltipOption:d[c]}},e}(nw);function Tk(r,e){var t={};return t[e.dim+"AxisIndex"]=e.index,r.getCartesian(t)}var wne={line:function(r,e,t){var n=ow([e,t[0]],[e,t[1]],Dk(r));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(r,e,t){var n=Math.max(1,r.getBandWidth()),a=t[1]-t[0];return{type:"Rect",shape:Sk([e-n/2,t[0]],[n,a],Dk(r))}}};function Dk(r){return r.dim==="x"?0:1}var Sne=xne,Cne=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",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:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}($e),Tne=Cne,Si=Ye(),Dne=L;function Mk(r,e,t){if(!Ue.node){var n=e.getZr();Si(n).records||(Si(n).records={}),Mne(n,e);var a=Si(n).records[r]||(Si(n).records[r]={});a.handler=t}}function Mne(r,e){if(Si(r).initialized)return;Si(r).initialized=!0,t("click",Ae(Ak,"click")),t("mousemove",Ae(Ak,"mousemove")),t("globalout",Lne);function t(n,a){r.on(n,function(i){var o=Ine(e);Dne(Si(r).records,function(s){s&&a(s,i,o.dispatchAction)}),Ane(o.pendings,e)})}}function Ane(r,e){var t=r.showTip.length,n=r.hideTip.length,a;t?a=r.showTip[t-1]:n&&(a=r.hideTip[n-1]),a&&(a.dispatchAction=null,e.dispatchAction(a))}function Lne(r,e,t){r.handler("leave",null,t)}function Ak(r,e,t,n){e.handler(r,t,n)}function Ine(r){var e={showTip:[],hideTip:[]},t=function(n){var a=e[n.type];a?a.push(n):(n.dispatchAction=t,r.dispatchAction(n))};return{dispatchAction:t,pendings:e}}function sw(r,e){if(!Ue.node){var t=e.getZr(),n=(Si(t).records||{})[r];n&&(Si(t).records[r]=null)}}var Pne=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=n.getComponent("tooltip"),o=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";Mk("axisPointer",a,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},e.prototype.remove=function(t,n){sw("axisPointer",n)},e.prototype.dispose=function(t,n){sw("axisPointer",n)},e.type="axisPointer",e}(wt),Ene=Pne;function Lk(r,e){var t=[],n=r.seriesIndex,a;if(n==null||!(a=e.getSeriesByIndex(n)))return{point:[]};var i=a.getData(),o=ns(i,r);if(o==null||o<0||K(o))return{point:[]};var s=i.getItemGraphicEl(o),l=a.coordinateSystem;if(a.getTooltipPosition)t=a.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),f=c.dim,h=u.dim,v=f==="x"||f==="radius"?1:0,d=i.mapDimension(h),p=[];p[v]=i.get(d,o),p[1-v]=i.get(i.getCalculationInfo("stackResultDimension"),o),t=l.dataToPoint(p)||[]}else t=l.dataToPoint(i.getValues(J(l.dimensions,function(y){return i.mapDimension(y)}),o))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),t=[g.x+g.width/2,g.y+g.height/2]}return{point:t,el:s}}var Ik=Ye();function One(r,e,t){var n=r.currTrigger,a=[r.x,r.y],i=r,o=r.dispatchAction||fe(t.dispatchAction,t),s=e.getComponent("axisPointer").coordSysAxesInfo;if(!!s){cg(a)&&(a=Lk({seriesIndex:i.seriesIndex,dataIndex:i.dataIndex},e).point);var l=cg(a),u=i.axesInfo,c=s.axesInfo,f=n==="leave"||cg(a),h={},v={},d={list:[],map:{}},p={showPointer:Ae(Nne,v),showTooltip:Ae(kne,d)};L(s.coordSysMap,function(y,m){var _=l||y.containPoint(a);L(s.coordSysAxesInfo[m],function(b,w){var x=b.axis,S=Vne(u,b);if(!f&&_&&(!u||S)){var T=S&&S.value;T==null&&!l&&(T=x.pointToData(a)),T!=null&&Pk(b,T,p,!1,h)}})});var g={};return L(c,function(y,m){var _=y.linkGroup;_&&!v[m]&&L(_.axesInfo,function(b,w){var x=v[w];if(b!==y&&x){var S=x.value;_.mapper&&(S=y.axis.scale.parse(_.mapper(S,Ek(b),Ek(y)))),g[y.key]=S}})}),L(g,function(y,m){Pk(c[m],y,p,!0,h)}),Bne(v,c,h),zne(d,a,r,o),Fne(c,o,t),h}}function Pk(r,e,t,n,a){var i=r.axis;if(!(i.scale.isBlank()||!i.containData(e))){if(!r.involveSeries){t.showPointer(r,e);return}var o=Rne(e,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&a.seriesIndex==null&&Q(a,s[0]),!n&&r.snap&&i.containData(l)&&l!=null&&(e=l),t.showPointer(r,e,s),t.showTooltip(r,o,l)}}function Rne(r,e){var t=e.axis,n=t.dim,a=r,i=[],o=Number.MAX_VALUE,s=-1;return L(e.seriesModels,function(l,u){var c=l.getData().mapDimensionsAll(n),f,h;if(l.getAxisTooltipData){var v=l.getAxisTooltipData(c,r,t);h=v.dataIndices,f=v.nestestValue}else{if(h=l.getData().indicesOfNearest(c[0],r,t.type==="category"?.5:null),!h.length)return;f=l.getData().get(c[0],h[0])}if(!(f==null||!isFinite(f))){var d=r-f,p=Math.abs(d);p<=o&&((p<o||d>=0&&s<0)&&(o=p,s=d,a=f,i.length=0),L(h,function(g){i.push({seriesIndex:l.seriesIndex,dataIndexInside:g,dataIndex:l.getData().getRawIndex(g)})}))}}),{payloadBatch:i,snapToValue:a}}function Nne(r,e,t,n){r[e.key]={value:t,payloadBatch:n}}function kne(r,e,t,n){var a=t.payloadBatch,i=e.axis,o=i.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!a.length)){var l=e.coordSys.model,u=Uf(l),c=r.map[u];c||(c=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(c)),c.dataByAxis.push({axisDim:i.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:a.slice()})}}function Bne(r,e,t){var n=t.axesInfo=[];L(e,function(a,i){var o=a.axisPointerModel.option,s=r[i];s?(!a.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!a.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:a.axis.dim,axisIndex:a.axis.model.componentIndex,value:o.value})})}function zne(r,e,t,n){if(cg(e)||!r.list.length){n({type:"hideTip"});return}var a=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:t.tooltipOption,position:t.position,dataIndexInside:a.dataIndexInside,dataIndex:a.dataIndex,seriesIndex:a.seriesIndex,dataByCoordSys:r.list})}function Fne(r,e,t){var n=t.getZr(),a="axisPointerLastHighlights",i=Ik(n)[a]||{},o=Ik(n)[a]={};L(r,function(u,c){var f=u.axisPointerModel.option;f.status==="show"&&L(f.seriesDataIndices,function(h){var v=h.seriesIndex+" | "+h.dataIndex;o[v]=h})});var s=[],l=[];L(i,function(u,c){!o[c]&&l.push(u)}),L(o,function(u,c){!i[c]&&s.push(u)}),l.length&&t.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&t.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function Vne(r,e){for(var t=0;t<(r||[]).length;t++){var n=r[t];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}function Ek(r){var e=r.axis.model,t={},n=t.axisDim=r.axis.dim;return t.axisIndex=t[n+"AxisIndex"]=e.componentIndex,t.axisName=t[n+"AxisName"]=e.name,t.axisId=t[n+"AxisId"]=e.id,t}function cg(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function uh(r){Gs.registerAxisPointerClass("CartesianAxisPointer",Sne),r.registerComponentModel(Tne),r.registerComponentView(Ene),r.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!K(t)&&(e.axisPointer.link=[t])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=MZ(e,t)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},One)}function $ne(r){ke(cO),ke(uh)}var Hne=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,n,a,i,o){var s=a.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),c=u.getExtent(),f=s.dataToCoord(n),h=i.get("type");if(h&&h!=="none"){var v=aw(i),d=Wne[h](s,l,f,c);d.style=v,t.graphicKey=d.type,t.pointer=d}var p=i.get(["label","margin"]),g=Gne(n,a,i,l,p);bk(t,a,i,o,g)},e}(nw);function Gne(r,e,t,n,a){var i=e.axis,o=i.dataToCoord(r),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=n.getRadiusAxis().getExtent(),u,c,f;if(i.dim==="radius"){var h=gn();ji(h,h,s),oa(h,h,[n.cx,n.cy]),u=pa([o,-a],h);var v=e.getModel("axisLabel").get("rotate")||0,d=mi.innerTextLayout(s,v*Math.PI/180,-1);c=d.textAlign,f=d.textVerticalAlign}else{var p=l[1];u=n.coordToPoint([p+a,o]);var g=n.cx,y=n.cy;c=Math.abs(u[0]-g)/p<.3?"center":u[0]>g?"left":"right",f=Math.abs(u[1]-y)/p<.3?"middle":u[1]>y?"top":"bottom"}return{position:u,align:c,verticalAlign:f}}var Wne={line:function(r,e,t,n){return r.dim==="angle"?{type:"Line",shape:ow(e.coordToPoint([n[0],t]),e.coordToPoint([n[1],t]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:t}}},shadow:function(r,e,t,n){var a=Math.max(1,r.getBandWidth()),i=Math.PI/180;return r.dim==="angle"?{type:"Sector",shape:Ck(e.cx,e.cy,n[0],n[1],(-t-a/2)*i,(-t+a/2)*i)}:{type:"Sector",shape:Ck(e.cx,e.cy,t-a/2,t+a/2,0,Math.PI*2)}}},Une=Hne,jne=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.findAxisModel=function(t){var n,a=this.ecModel;return a.eachComponent(t,function(i){i.getCoordSysModel()===this&&(n=i)},this),n},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}($e),Yne=jne,lw=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",$t).models[0]},e.type="polarAxis",e}($e);Et(lw,du);var qne=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="angleAxis",e}(lw),Zne=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="radiusAxis",e}(lw),uw=function(r){j(e,r);function e(t,n){return r.call(this,"radius",t,n)||this}return e.prototype.pointToData=function(t,n){return this.polar.pointToData(t,n)[this.dim==="radius"?0:1]},e}(Un);uw.prototype.dataToRadius=Un.prototype.dataToCoord,uw.prototype.radiusToData=Un.prototype.coordToData;var Xne=uw,Qne=Ye(),cw=function(r){j(e,r);function e(t,n){return r.call(this,"angle",t,n||[0,360])||this}return e.prototype.pointToData=function(t,n){return this.polar.pointToData(t,n)[this.dim==="radius"?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,n=t.getLabelModel(),a=t.scale,i=a.getExtent(),o=a.count();if(i[1]-i[0]<1)return 0;var s=i[0],l=t.dataToCoord(s+1)-t.dataToCoord(s),u=Math.abs(l),c=Rc(s==null?"":s+"",n.getFont(),"center","top"),f=Math.max(c.height,7),h=f/u;isNaN(h)&&(h=1/0);var v=Math.max(0,Math.floor(h)),d=Qne(t.model),p=d.lastAutoInterval,g=d.lastTickCount;return p!=null&&g!=null&&Math.abs(p-v)<=1&&Math.abs(g-o)<=1&&p>v?v=p:(d.lastTickCount=o,d.lastAutoInterval=v),v},e}(Un);cw.prototype.dataToAngle=Un.prototype.dataToCoord,cw.prototype.angleToData=Un.prototype.coordToData;var Kne=cw,Ok=["radius","angle"],Jne=function(){function r(e){this.dimensions=Ok,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new Xne,this._angleAxis=new Kne,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return r.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},r.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},r.prototype.getAxis=function(e){var t="_"+e+"Axis";return this[t]},r.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},r.prototype.getAxesByScale=function(e){var t=[],n=this._angleAxis,a=this._radiusAxis;return n.scale.type===e&&t.push(n),a.scale.type===e&&t.push(a),t},r.prototype.getAngleAxis=function(){return this._angleAxis},r.prototype.getRadiusAxis=function(){return this._radiusAxis},r.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},r.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},r.prototype.getTooltipAxes=function(e){var t=e!=null&&e!=="auto"?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},r.prototype.dataToPoint=function(e,t){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)])},r.prototype.pointToData=function(e,t){var n=this.pointToCoord(e);return[this._radiusAxis.radiusToData(n[0],t),this._angleAxis.angleToData(n[1],t)]},r.prototype.pointToCoord=function(e){var t=e[0]-this.cx,n=e[1]-this.cy,a=this.getAngleAxis(),i=a.getExtent(),o=Math.min(i[0],i[1]),s=Math.max(i[0],i[1]);a.inverse?o=s-360:s=o+360;var l=Math.sqrt(t*t+n*n);t/=l,n/=l;for(var u=Math.atan2(-n,t)/Math.PI*180,c=u<o?1:-1;u<o||u>s;)u+=c*360;return[l,u]},r.prototype.coordToPoint=function(e){var t=e[0],n=e[1]/180*Math.PI,a=Math.cos(n)*t+this.cx,i=-Math.sin(n)*t+this.cy;return[a,i]},r.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis(),n=t.getExtent().slice();n[0]>n[1]&&n.reverse();var a=e.getExtent(),i=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:n[0],r:n[1],startAngle:-a[0]*i,endAngle:-a[1]*i,clockwise:e.inverse,contain:function(o,s){var l=o-this.cx,u=s-this.cy,c=l*l+u*u-1e-4,f=this.r,h=this.r0;return c<=f*f&&c>=h*h}}},r.prototype.convertToPixel=function(e,t,n){var a=Rk(t);return a===this?this.dataToPoint(n):null},r.prototype.convertFromPixel=function(e,t,n){var a=Rk(t);return a===this?this.pointToData(n):null},r}();function Rk(r){var e=r.seriesModel,t=r.polarModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}var eae=Jne;function tae(r,e,t){var n=e.get("center"),a=t.getWidth(),i=t.getHeight();r.cx=le(n[0],a),r.cy=le(n[1],i);var o=r.getRadiusAxis(),s=Math.min(a,i)/2,l=e.get("radius");l==null?l=[0,"100%"]:K(l)||(l=[0,l]);var u=[le(l[0],s),le(l[1],s)];o.inverse?o.setExtent(u[1],u[0]):o.setExtent(u[0],u[1])}function rae(r,e){var t=this,n=t.getAngleAxis(),a=t.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),a.scale.setExtent(1/0,-1/0),r.eachSeries(function(s){if(s.coordinateSystem===t){var l=s.getData();L(Cp(l,"radius"),function(u){a.scale.unionExtentFromData(l,u)}),L(Cp(l,"angle"),function(u){n.scale.unionExtentFromData(l,u)})}}),Os(n.scale,n.model),Os(a.scale,a.model),n.type==="category"&&!n.onBand){var i=n.getExtent(),o=360/n.scale.count();n.inverse?i[1]+=o:i[1]-=o,n.setExtent(i[0],i[1])}}function nae(r){return r.mainType==="angleAxis"}function Nk(r,e){if(r.type=e.get("type"),r.scale=Ef(e),r.onBand=e.get("boundaryGap")&&r.type==="category",r.inverse=e.get("inverse"),nae(e)){r.inverse=r.inverse!==e.get("clockwise");var t=e.get("startAngle");r.setExtent(t,t+(r.inverse?-360:360))}e.axis=r,r.model=e}var aae={dimensions:Ok,create:function(r,e){var t=[];return r.eachComponent("polar",function(n,a){var i=new eae(a+"");i.update=rae;var o=i.getRadiusAxis(),s=i.getAngleAxis(),l=n.findAxisModel("radiusAxis"),u=n.findAxisModel("angleAxis");Nk(o,l),Nk(s,u),tae(i,n,e),t.push(i),n.coordinateSystem=i,i.model=n}),r.eachSeries(function(n){if(n.get("coordinateSystem")==="polar"){var a=n.getReferringComponents("polar",$t).models[0];n.coordinateSystem=a.coordinateSystem}}),t}},iae=aae,oae=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function fg(r,e,t){e[1]>e[0]&&(e=e.slice().reverse());var n=r.coordToPoint([e[0],t]),a=r.coordToPoint([e[1],t]);return{x1:n[0],y1:n[1],x2:a[0],y2:a[1]}}function hg(r){var e=r.getRadiusAxis();return e.inverse?0:1}function kk(r){var e=r[0],t=r[r.length-1];e&&t&&Math.abs(Math.abs(e.coord-t.coord)-360)<1e-4&&r.pop()}var sae=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="PolarAxisPointer",t}return e.prototype.render=function(t,n){if(this.group.removeAll(),!!t.get("show")){var a=t.axis,i=a.polar,o=i.getRadiusAxis().getExtent(),s=a.getTicksCoords(),l=a.getMinorTicksCoords(),u=J(a.getViewLabels(),function(c){c=we(c);var f=a.scale,h=f.type==="ordinal"?f.getRawOrdinalNumber(c.tickValue):c.tickValue;return c.coord=a.dataToCoord(h),c});kk(u),kk(s),L(oae,function(c){t.get([c,"show"])&&(!a.scale.isBlank()||c==="axisLine")&&lae[c](this.group,t,i,s,l,o,u)},this)}},e.type="angleAxis",e}(Gs),lae={axisLine:function(r,e,t,n,a,i){var o=e.getModel(["axisLine","lineStyle"]),s=hg(t),l=s?0:1,u;i[l]===0?u=new ha({shape:{cx:t.cx,cy:t.cy,r:i[s]},style:o.getLineStyle(),z2:1,silent:!0}):u=new Kc({shape:{cx:t.cx,cy:t.cy,r:i[s],r0:i[l]},style:o.getLineStyle(),z2:1,silent:!0}),u.style.fill=null,r.add(u)},axisTick:function(r,e,t,n,a,i){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=i[hg(t)],u=J(n,function(c){return new tr({shape:fg(t,[l,l+s],c.coord)})});r.add(xn(u,{style:me(o.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(r,e,t,n,a,i){if(!!a.length){for(var o=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=i[hg(t)],c=[],f=0;f<a.length;f++)for(var h=0;h<a[f].length;h++)c.push(new tr({shape:fg(t,[u,u+l],a[f][h].coord)}));r.add(xn(c,{style:me(s.getModel("lineStyle").getLineStyle(),me(o.getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(r,e,t,n,a,i,o){var s=e.getCategories(!0),l=e.getModel("axisLabel"),u=l.get("margin"),c=e.get("triggerEvent");L(o,function(f,h){var v=l,d=f.tickValue,p=i[hg(t)],g=t.coordToPoint([p+u,f.coord]),y=t.cx,m=t.cy,_=Math.abs(g[0]-y)/p<.3?"center":g[0]>y?"left":"right",b=Math.abs(g[1]-m)/p<.3?"middle":g[1]>m?"top":"bottom";if(s&&s[d]){var w=s[d];_e(w)&&w.textStyle&&(v=new lt(w.textStyle,l,l.ecModel))}var x=new We({silent:mi.isLabelSilent(e),style:gt(v,{x:g[0],y:g[1],fill:v.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:f.formattedLabel,align:_,verticalAlign:b})});if(r.add(x),c){var S=mi.makeAxisEventDataBase(e);S.targetType="axisLabel",S.value=f.rawLabel,Me(x).eventData=S}},this)},splitLine:function(r,e,t,n,a,i){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],f=0;f<n.length;f++){var h=u++%l.length;c[h]=c[h]||[],c[h].push(new tr({shape:fg(t,i,n[f].coord)}))}for(var f=0;f<c.length;f++)r.add(xn(c[f],{style:me({stroke:l[f%l.length]},s.getLineStyle()),silent:!0,z:e.get("z")}))},minorSplitLine:function(r,e,t,n,a,i){if(!!a.length){for(var o=e.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=[],u=0;u<a.length;u++)for(var c=0;c<a[u].length;c++)l.push(new tr({shape:fg(t,i,a[u][c].coord)}));r.add(xn(l,{style:s.getLineStyle(),silent:!0,z:e.get("z")}))}},splitArea:function(r,e,t,n,a,i){if(!!n.length){var o=e.getModel("splitArea"),s=o.getModel("areaStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],f=Math.PI/180,h=-n[0].coord*f,v=Math.min(i[0],i[1]),d=Math.max(i[0],i[1]),p=e.get("clockwise"),g=1,y=n.length;g<=y;g++){var m=g===y?n[0].coord:n[g].coord,_=u++%l.length;c[_]=c[_]||[],c[_].push(new Hr({shape:{cx:t.cx,cy:t.cy,r0:v,r:d,startAngle:h,endAngle:-m*f,clockwise:p},silent:!0})),h=-m*f}for(var g=0;g<c.length;g++)r.add(xn(c[g],{style:me({fill:l[g%l.length]},s.getAreaStyle()),silent:!0}))}}},uae=sae,cae=["axisLine","axisTickLabel","axisName"],fae=["splitLine","splitArea","minorSplitLine"],hae=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="PolarAxisPointer",t}return e.prototype.render=function(t,n){if(this.group.removeAll(),!!t.get("show")){var a=this._axisGroup,i=this._axisGroup=new Te;this.group.add(i);var o=t.axis,s=o.polar,l=s.getAngleAxis(),u=o.getTicksCoords(),c=o.getMinorTicksCoords(),f=l.getExtent()[0],h=o.getExtent(),v=dae(s,t,f),d=new mi(t,v);L(cae,d.add,d),i.add(d.getGroup()),rf(a,i,t),L(fae,function(p){t.get([p,"show"])&&!o.scale.isBlank()&&vae[p](this.group,t,s,f,h,u,c)},this)}},e.type="radiusAxis",e}(Gs),vae={splitLine:function(r,e,t,n,a,i){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],f=0;f<i.length;f++){var h=u++%l.length;c[h]=c[h]||[],c[h].push(new ha({shape:{cx:t.cx,cy:t.cy,r:Math.max(i[f].coord,0)}}))}for(var f=0;f<c.length;f++)r.add(xn(c[f],{style:me({stroke:l[f%l.length],fill:null},s.getLineStyle()),silent:!0}))},minorSplitLine:function(r,e,t,n,a,i,o){if(!!o.length){for(var s=e.getModel("minorSplitLine"),l=s.getModel("lineStyle"),u=[],c=0;c<o.length;c++)for(var f=0;f<o[c].length;f++)u.push(new ha({shape:{cx:t.cx,cy:t.cy,r:o[c][f].coord}}));r.add(xn(u,{style:me({fill:null},l.getLineStyle()),silent:!0}))}},splitArea:function(r,e,t,n,a,i){if(!!i.length){var o=e.getModel("splitArea"),s=o.getModel("areaStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],f=i[0].coord,h=1;h<i.length;h++){var v=u++%l.length;c[v]=c[v]||[],c[v].push(new Hr({shape:{cx:t.cx,cy:t.cy,r0:f,r:i[h].coord,startAngle:0,endAngle:Math.PI*2},silent:!0})),f=i[h].coord}for(var h=0;h<c.length;h++)r.add(xn(c[h],{style:me({fill:l[h%l.length]},s.getAreaStyle()),silent:!0}))}}};function dae(r,e,t){return{position:[r.cx,r.cy],rotation:t/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1}}var pae=hae;function Bk(r){return r.get("stack")||"__ec_stack_"+r.seriesIndex}function zk(r,e){return e.dim+r.model.componentIndex}function gae(r,e,t){var n={},a=yae(nt(e.getSeriesByType(r),function(i){return!e.isSeriesFiltered(i)&&i.coordinateSystem&&i.coordinateSystem.type==="polar"}));e.eachSeriesByType(r,function(i){if(i.coordinateSystem.type==="polar"){var o=i.getData(),s=i.coordinateSystem,l=s.getBaseAxis(),u=zk(s,l),c=Bk(i),f=a[u][c],h=f.offset,v=f.width,d=s.getOtherAxis(l),p=i.coordinateSystem.cx,g=i.coordinateSystem.cy,y=i.get("barMinHeight")||0,m=i.get("barMinAngle")||0;n[c]=n[c]||[];for(var _=o.mapDimension(d.dim),b=o.mapDimension(l.dim),w=gi(o,_),x=l.dim!=="radius"||!i.get("roundCap",!0),S=d.dataToCoord(0),T=0,D=o.count();T<D;T++){var M=o.get(_,T),A=o.get(b,T),I=M>=0?"p":"n",P=S;w&&(n[c][A]||(n[c][A]={p:S,n:S}),P=n[c][A][I]);var E=void 0,O=void 0,N=void 0,V=void 0;if(d.dim==="radius"){var $=d.dataToCoord(M)-S,U=l.dataToCoord(A);Math.abs($)<y&&($=($<0?-1:1)*y),E=P,O=P+$,N=U-h,V=N-v,w&&(n[c][A][I]=O)}else{var Y=d.dataToCoord(M,x)-S,ae=l.dataToCoord(A);Math.abs(Y)<m&&(Y=(Y<0?-1:1)*m),E=ae+h,O=E+v,N=P,V=P+Y,w&&(n[c][A][I]=V)}o.setItemLayout(T,{cx:p,cy:g,r0:E,r:O,startAngle:-N*Math.PI/180,endAngle:-V*Math.PI/180,clockwise:N>=V})}}})}function yae(r){var e={};L(r,function(n,a){var i=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=zk(o,s),u=s.getExtent(),c=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/i.count(),f=e[l]||{bandWidth:c,remainedWidth:c,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},h=f.stacks;e[l]=f;var v=Bk(n);h[v]||f.autoWidthCount++,h[v]=h[v]||{width:0,maxWidth:0};var d=le(n.get("barWidth"),c),p=le(n.get("barMaxWidth"),c),g=n.get("barGap"),y=n.get("barCategoryGap");d&&!h[v].width&&(d=Math.min(f.remainedWidth,d),h[v].width=d,f.remainedWidth-=d),p&&(h[v].maxWidth=p),g!=null&&(f.gap=g),y!=null&&(f.categoryGap=y)});var t={};return L(e,function(n,a){t[a]={};var i=n.stacks,o=n.bandWidth,s=le(n.categoryGap,o),l=le(n.gap,1),u=n.remainedWidth,c=n.autoWidthCount,f=(u-s)/(c+(c-1)*l);f=Math.max(f,0),L(i,function(p,g){var y=p.maxWidth;y&&y<f&&(y=Math.min(y,u),p.width&&(y=Math.min(y,p.width)),u-=y,p.width=y,c--)}),f=(u-s)/(c+(c-1)*l),f=Math.max(f,0);var h=0,v;L(i,function(p,g){p.width||(p.width=f),v=p,h+=p.width*(1+l)}),v&&(h-=v.width*l);var d=-h/2;L(i,function(p,g){t[a][g]=t[a][g]||{offset:d,width:p.width},d+=p.width*(1+l)})}),t}var mae={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},_ae={splitNumber:5},bae=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="polar",e}(wt);function xae(r){ke(uh),Gs.registerAxisPointerClass("PolarAxisPointer",Une),r.registerCoordinateSystem("polar",iae),r.registerComponentModel(Yne),r.registerComponentView(bae),_u(r,"angle",qne,mae),_u(r,"radius",Zne,_ae),r.registerComponentView(uae),r.registerComponentView(pae),r.registerLayout(Ae(gae,"bar"))}function fw(r,e){e=e||{};var t=r.coordinateSystem,n=r.axis,a={},i=n.position,o=n.orient,s=t.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};a.position=[o==="vertical"?u.vertical[i]:l[0],o==="horizontal"?u.horizontal[i]:l[3]];var c={horizontal:0,vertical:1};a.rotation=Math.PI/2*c[o];var f={top:-1,bottom:1,right:1,left:-1};a.labelDirection=a.tickDirection=a.nameDirection=f[i],r.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),Jt(e.labelInside,r.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var h=e.rotate;return h==null&&(h=r.get(["axisLabel","rotate"])),a.labelRotation=i==="top"?-h:h,a.z2=1,a}var wae=["axisLine","axisTickLabel","axisName"],Sae=["splitArea","splitLine"],Cae=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="SingleAxisPointer",t}return e.prototype.render=function(t,n,a,i){var o=this.group;o.removeAll();var s=this._axisGroup;this._axisGroup=new Te;var l=fw(t),u=new mi(t,l);L(wae,u.add,u),o.add(this._axisGroup),o.add(u.getGroup()),L(Sae,function(c){t.get([c,"show"])&&Tae[c](this,this.group,this._axisGroup,t)},this),rf(s,this._axisGroup,t),r.prototype.render.call(this,t,n,a,i)},e.prototype.remove=function(){oO(this)},e.type="singleAxis",e}(Gs),Tae={splitLine:function(r,e,t,n){var a=n.axis;if(!a.scale.isBlank()){var i=n.getModel("splitLine"),o=i.getModel("lineStyle"),s=o.get("color");s=s instanceof Array?s:[s];for(var l=o.get("width"),u=n.coordinateSystem.getRect(),c=a.isHorizontal(),f=[],h=0,v=a.getTicksCoords({tickModel:i}),d=[],p=[],g=0;g<v.length;++g){var y=a.toGlobalCoord(v[g].coord);c?(d[0]=y,d[1]=u.y,p[0]=y,p[1]=u.y+u.height):(d[0]=u.x,d[1]=y,p[0]=u.x+u.width,p[1]=y);var m=new tr({shape:{x1:d[0],y1:d[1],x2:p[0],y2:p[1]},silent:!0});Ul(m.shape,l);var _=h++%s.length;f[_]=f[_]||[],f[_].push(m)}for(var b=o.getLineStyle(["color"]),g=0;g<f.length;++g)e.add(xn(f[g],{style:me({stroke:s[g%s.length]},b),silent:!0}))}},splitArea:function(r,e,t,n){iO(r,t,n,n)}},Dae=Cae,Fk=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getCoordSysModel=function(){return this},e.type="singleAxis",e.layoutMode="box",e.defaultOption={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}},e}($e);Et(Fk,du.prototype);var hw=Fk,Mae=function(r){j(e,r);function e(t,n,a,i,o){var s=r.call(this,t,n,a)||this;return s.type=i||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.pointToData=function(t,n){return this.coordinateSystem.pointToData(t)[0]},e}(Un),Aae=Mae,Vk=["single"],Lae=function(){function r(e,t,n){this.type="single",this.dimension="single",this.dimensions=Vk,this.axisPointerEnabled=!0,this.model=e,this._init(e,t,n)}return r.prototype._init=function(e,t,n){var a=this.dimension,i=new Aae(a,Ef(e),[0,0],e.get("type"),e.get("position")),o=i.type==="category";i.onBand=o&&e.get("boundaryGap"),i.inverse=e.get("inverse"),i.orient=e.get("orient"),e.axis=i,i.model=e,i.coordinateSystem=this,this._axis=i},r.prototype.update=function(e,t){e.eachSeries(function(n){if(n.coordinateSystem===this){var a=n.getData();L(a.mapDimensionsAll(this.dimension),function(i){this._axis.scale.unionExtentFromData(a,i)},this),Os(this._axis.scale,this._axis.model)}},this)},r.prototype.resize=function(e,t){this._rect=Ht({left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")},{width:t.getWidth(),height:t.getHeight()}),this._adjustAxis()},r.prototype.getRect=function(){return this._rect},r.prototype._adjustAxis=function(){var e=this._rect,t=this._axis,n=t.isHorizontal(),a=n?[0,e.width]:[0,e.height],i=t.inverse?1:0;t.setExtent(a[i],a[1-i]),this._updateAxisTransform(t,n?e.x:e.y)},r.prototype._updateAxisTransform=function(e,t){var n=e.getExtent(),a=n[0]+n[1],i=e.isHorizontal();e.toGlobalCoord=i?function(o){return o+t}:function(o){return a-o+t},e.toLocalCoord=i?function(o){return o-t}:function(o){return a-o+t}},r.prototype.getAxis=function(){return this._axis},r.prototype.getBaseAxis=function(){return this._axis},r.prototype.getAxes=function(){return[this._axis]},r.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},r.prototype.containPoint=function(e){var t=this.getRect(),n=this.getAxis(),a=n.orient;return a==="horizontal"?n.contain(n.toLocalCoord(e[0]))&&e[1]>=t.y&&e[1]<=t.y+t.height:n.contain(n.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},r.prototype.pointToData=function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e[t.orient==="horizontal"?0:1]))]},r.prototype.dataToPoint=function(e){var t=this.getAxis(),n=this.getRect(),a=[],i=t.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),a[i]=t.toGlobalCoord(t.dataToCoord(+e)),a[1-i]=i===0?n.y+n.height/2:n.x+n.width/2,a},r.prototype.convertToPixel=function(e,t,n){var a=$k(t);return a===this?this.dataToPoint(n):null},r.prototype.convertFromPixel=function(e,t,n){var a=$k(t);return a===this?this.pointToData(n):null},r}();function $k(r){var e=r.seriesModel,t=r.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function Iae(r,e){var t=[];return r.eachComponent("singleAxis",function(n,a){var i=new Lae(n,r,e);i.name="single_"+a,i.resize(n,e),n.coordinateSystem=i,t.push(i)}),r.eachSeries(function(n){if(n.get("coordinateSystem")==="singleAxis"){var a=n.getReferringComponents("singleAxis",$t).models[0];n.coordinateSystem=a&&a.coordinateSystem}}),t}var Pae={create:Iae,dimensions:Vk},Eae=Pae,Hk=["x","y"],Oae=["width","height"],Rae=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,n,a,i,o){var s=a.axis,l=s.coordinateSystem,u=vw(l,1-vg(s)),c=l.dataToPoint(n)[0],f=i.get("type");if(f&&f!=="none"){var h=aw(i),v=Nae[f](s,c,u);v.style=h,t.graphicKey=v.type,t.pointer=v}var d=fw(a);wk(n,t,d,a,i,o)},e.prototype.getHandleTransform=function(t,n,a){var i=fw(n,{labelInside:!1});i.labelMargin=a.get(["handle","margin"]);var o=iw(n.axis,t,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,n,a,i){var o=a.axis,s=o.coordinateSystem,l=vg(o),u=vw(s,l),c=[t.x,t.y];c[l]+=n[l],c[l]=Math.min(u[1],c[l]),c[l]=Math.max(u[0],c[l]);var f=vw(s,1-l),h=(f[1]+f[0])/2,v=[h,h];return v[l]=c[l],{x:c[0],y:c[1],rotation:t.rotation,cursorPoint:v,tooltipOption:{verticalAlign:"middle"}}},e}(nw),Nae={line:function(r,e,t){var n=ow([e,t[0]],[e,t[1]],vg(r));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(r,e,t){var n=r.getBandWidth(),a=t[1]-t[0];return{type:"Rect",shape:Sk([e-n/2,t[0]],[n,a],vg(r))}}};function vg(r){return r.isHorizontal()?0:1}function vw(r,e){var t=r.getRect();return[t[Hk[e]],t[Hk[e]]+t[Oae[e]]]}var kae=Rae,Bae=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="single",e}(wt);function zae(r){ke(uh),Gs.registerAxisPointerClass("SingleAxisPointer",kae),r.registerComponentView(Bae),r.registerComponentView(Dae),r.registerComponentModel(hw),_u(r,"single",hw,hw.defaultOption),r.registerCoordinateSystem("single",Eae)}var Fae=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n,a){var i=Kl(t);r.prototype.init.apply(this,arguments),Gk(t,i)},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),Gk(this.option,t)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}($e);function Gk(r,e){var t=r.cellSize,n;K(t)?n=t:n=r.cellSize=[t,t],n.length===1&&(n[1]=n[0]);var a=J([0,1],function(i){return L7(e,i)&&(n[i]="auto"),n[i]!=null&&n[i]!=="auto"});lo(r,e,{type:"box",ignoreSize:a})}var Vae=Fae,$ae=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=this.group;i.removeAll();var o=t.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=n.getLocaleModel();this._renderDayRect(t,s,i),this._renderLines(t,s,l,i),this._renderYearText(t,s,l,i),this._renderMonthText(t,u,l,i),this._renderWeekText(t,u,s,l,i)},e.prototype._renderDayRect=function(t,n,a){for(var i=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),s=i.getCellWidth(),l=i.getCellHeight(),u=n.start.time;u<=n.end.time;u=i.getNextNDay(u,1).time){var c=i.dataToRect([u],!1).tl,f=new Ge({shape:{x:c[0],y:c[1],width:s,height:l},cursor:"default",style:o});a.add(f)}},e.prototype._renderLines=function(t,n,a,i){var o=this,s=t.coordinateSystem,l=t.getModel(["splitLine","lineStyle"]).getLineStyle(),u=t.get(["splitLine","show"]),c=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var f=n.start,h=0;f.time<=n.end.time;h++){d(f.formatedDate),h===0&&(f=s.getDateInfo(n.start.y+"-"+n.start.m));var v=f.date;v.setMonth(v.getMonth()+1),f=s.getDateInfo(v)}d(s.getNextNDay(n.end.time,1).formatedDate);function d(p){o._firstDayOfMonth.push(s.getDateInfo(p)),o._firstDayPoints.push(s.dataToRect([p],!1).tl);var g=o._getLinePointsOfOneWeek(t,p,a);o._tlpoints.push(g[0]),o._blpoints.push(g[g.length-1]),u&&o._drawSplitline(g,l,i)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,c,a),l,i),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,c,a),l,i)},e.prototype._getEdgesPoints=function(t,n,a){var i=[t[0].slice(),t[t.length-1].slice()],o=a==="horizontal"?0:1;return i[0][o]=i[0][o]-n/2,i[1][o]=i[1][o]+n/2,i},e.prototype._drawSplitline=function(t,n,a){var i=new Wr({z2:20,shape:{points:t},style:n});a.add(i)},e.prototype._getLinePointsOfOneWeek=function(t,n,a){for(var i=t.coordinateSystem,o=i.getDateInfo(n),s=[],l=0;l<7;l++){var u=i.getNextNDay(o.time,l),c=i.dataToRect([u.time],!1);s[2*u.day]=c.tl,s[2*u.day+1]=c[a==="horizontal"?"bl":"tr"]}return s},e.prototype._formatterLabel=function(t,n){return ce(t)&&t?T7(t,n):ye(t)?t(n):n.nameMap},e.prototype._yearTextPositionControl=function(t,n,a,i,o){var s=n[0],l=n[1],u=["center","bottom"];i==="bottom"?(l+=o,u=["center","top"]):i==="left"?s-=o:i==="right"?(s+=o,u=["center","top"]):l-=o;var c=0;return(i==="left"||i==="right")&&(c=Math.PI/2),{rotation:c,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},e.prototype._renderYearText=function(t,n,a,i){var o=t.getModel("yearLabel");if(!!o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=a!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],c=(u[0][0]+u[1][0])/2,f=(u[0][1]+u[1][1])/2,h=a==="horizontal"?0:1,v={top:[c,u[h][1]],bottom:[c,u[1-h][1]],left:[u[1-h][0],f],right:[u[h][0],f]},d=n.start.y;+n.end.y>+n.start.y&&(d=d+"-"+n.end.y);var p=o.get("formatter"),g={start:n.start.y,end:n.end.y,nameMap:d},y=this._formatterLabel(p,g),m=new We({z2:30,style:gt(o,{text:y})});m.attr(this._yearTextPositionControl(m,v[l],a,l,s)),i.add(m)}},e.prototype._monthTextPositionControl=function(t,n,a,i,o){var s="left",l="top",u=t[0],c=t[1];return a==="horizontal"?(c=c+o,n&&(s="center"),i==="start"&&(l="bottom")):(u=u+o,n&&(l="middle"),i==="start"&&(s="right")),{x:u,y:c,align:s,verticalAlign:l}},e.prototype._renderMonthText=function(t,n,a,i){var o=t.getModel("monthLabel");if(!!o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),c=o.get("align"),f=[this._tlpoints,this._blpoints];(!s||ce(s))&&(s&&(n=A_(s)||n),s=n.get(["time","monthAbbr"])||[]);var h=u==="start"?0:1,v=a==="horizontal"?0:1;l=u==="start"?-l:l;for(var d=c==="center",p=0;p<f[h].length-1;p++){var g=f[h][p].slice(),y=this._firstDayOfMonth[p];if(d){var m=this._firstDayPoints[p];g[v]=(m[v]+f[0][p+1][v])/2}var _=o.get("formatter"),b=s[+y.m-1],w={yyyy:y.y,yy:(y.y+"").slice(2),MM:y.m,M:+y.m,nameMap:b},x=this._formatterLabel(_,w),S=new We({z2:30,style:Q(gt(o,{text:x}),this._monthTextPositionControl(g,d,a,u,l))});i.add(S)}}},e.prototype._weekTextPositionControl=function(t,n,a,i,o){var s="center",l="middle",u=t[0],c=t[1],f=a==="start";return n==="horizontal"?(u=u+i+(f?1:-1)*o[0]/2,s=f?"right":"left"):(c=c+i+(f?1:-1)*o[1]/2,l=f?"bottom":"top"),{x:u,y:c,align:s,verticalAlign:l}},e.prototype._renderWeekText=function(t,n,a,i,o){var s=t.getModel("dayLabel");if(!!s.get("show")){var l=t.coordinateSystem,u=s.get("position"),c=s.get("nameMap"),f=s.get("margin"),h=l.getFirstDayOfWeek();if(!c||ce(c)){c&&(n=A_(c)||n);var v=n.get(["time","dayOfWeekShort"]);c=v||J(n.get(["time","dayOfWeekAbbr"]),function(w){return w[0]})}var d=l.getNextNDay(a.end.time,7-a.lweek).time,p=[l.getCellWidth(),l.getCellHeight()];f=le(f,Math.min(p[1],p[0])),u==="start"&&(d=l.getNextNDay(a.start.time,-(7+a.fweek)).time,f=-f);for(var g=0;g<7;g++){var y=l.getNextNDay(d,g),m=l.dataToRect([y.time],!1).center,_=g;_=Math.abs((g+h)%7);var b=new We({z2:30,style:Q(gt(s,{text:c[_]}),this._weekTextPositionControl(m,i,u,f,p))});o.add(b)}}},e.type="calendar",e}(wt),Hae=$ae,dw=864e5,Gae=function(){function r(e,t,n){this.type="calendar",this.dimensions=r.dimensions,this.getDimensionsInfo=r.getDimensionsInfo,this._model=e}return r.getDimensionsInfo=function(){return[{name:"time",type:"time"},"value"]},r.prototype.getRangeInfo=function(){return this._rangeInfo},r.prototype.getModel=function(){return this._model},r.prototype.getRect=function(){return this._rect},r.prototype.getCellWidth=function(){return this._sw},r.prototype.getCellHeight=function(){return this._sh},r.prototype.getOrient=function(){return this._orient},r.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},r.prototype.getDateInfo=function(e){e=bn(e);var t=e.getFullYear(),n=e.getMonth()+1,a=n<10?"0"+n:""+n,i=e.getDate(),o=i<10?"0"+i:""+i,s=e.getDay();return s=Math.abs((s+7-this.getFirstDayOfWeek())%7),{y:t+"",m:a,d:o,day:s,time:e.getTime(),formatedDate:t+"-"+a+"-"+o,date:e}},r.prototype.getNextNDay=function(e,t){return t=t||0,t===0?this.getDateInfo(e):(e=new Date(this.getDateInfo(e).time),e.setDate(e.getDate()+t),this.getDateInfo(e))},r.prototype.update=function(e,t){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var n=this._rangeInfo.weeks||1,a=["width","height"],i=this._model.getCellSize().slice(),o=this._model.getBoxLayoutParams(),s=this._orient==="horizontal"?[n,7]:[7,n];L([0,1],function(f){c(i,f)&&(o[a[f]]=i[f]*s[f])});var l={width:t.getWidth(),height:t.getHeight()},u=this._rect=Ht(o,l);L([0,1],function(f){c(i,f)||(i[f]=u[a[f]]/s[f])});function c(f,h){return f[h]!=null&&f[h]!=="auto"}this._sw=i[0],this._sh=i[1]},r.prototype.dataToPoint=function(e,t){K(e)&&(e=e[0]),t==null&&(t=!0);var n=this.getDateInfo(e),a=this._rangeInfo,i=n.formatedDate;if(t&&!(n.time>=a.start.time&&n.time<a.end.time+dw))return[NaN,NaN];var o=n.day,s=this._getRangeInfo([a.start.time,i]).nthWeek;return this._orient==="vertical"?[this._rect.x+o*this._sw+this._sw/2,this._rect.y+s*this._sh+this._sh/2]:[this._rect.x+s*this._sw+this._sw/2,this._rect.y+o*this._sh+this._sh/2]},r.prototype.pointToData=function(e){var t=this.pointToDate(e);return t&&t.time},r.prototype.dataToRect=function(e,t){var n=this.dataToPoint(e,t);return{contentShape:{x:n[0]-(this._sw-this._lineWidth)/2,y:n[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:n,tl:[n[0]-this._sw/2,n[1]-this._sh/2],tr:[n[0]+this._sw/2,n[1]-this._sh/2],br:[n[0]+this._sw/2,n[1]+this._sh/2],bl:[n[0]-this._sw/2,n[1]+this._sh/2]}},r.prototype.pointToDate=function(e){var t=Math.floor((e[0]-this._rect.x)/this._sw)+1,n=Math.floor((e[1]-this._rect.y)/this._sh)+1,a=this._rangeInfo.range;return this._orient==="vertical"?this._getDateByWeeksAndDay(n,t-1,a):this._getDateByWeeksAndDay(t,n-1,a)},r.prototype.convertToPixel=function(e,t,n){var a=Wk(t);return a===this?a.dataToPoint(n):null},r.prototype.convertFromPixel=function(e,t,n){var a=Wk(t);return a===this?a.pointToData(n):null},r.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},r.prototype._initRangeOption=function(){var e=this._model.get("range"),t;if(K(e)&&e.length===1&&(e=e[0]),K(e))t=e;else{var n=e.toString();if(/^\d{4}$/.test(n)&&(t=[n+"-01-01",n+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(n)){var a=this.getDateInfo(n),i=a.date;i.setMonth(i.getMonth()+1);var o=this.getNextNDay(i,-1);t=[a.formatedDate,o.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(n)&&(t=[n,n])}if(!t)return e;var s=this._getRangeInfo(t);return s.start.time>s.end.time&&t.reverse(),t},r.prototype._getRangeInfo=function(e){var t=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],n;t[0].time>t[1].time&&(n=!0,t.reverse());var a=Math.floor(t[1].time/dw)-Math.floor(t[0].time/dw)+1,i=new Date(t[0].time),o=i.getDate(),s=t[1].date.getDate();i.setDate(o+a-1);var l=i.getDate();if(l!==s)for(var u=i.getTime()-t[1].time>0?1:-1;(l=i.getDate())!==s&&(i.getTime()-t[1].time)*u>0;)a-=u,i.setDate(l-u);var c=Math.floor((a+t[0].day+6)/7),f=n?-c+1:c-1;return n&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:a,weeks:c,nthWeek:f,fweek:t[0].day,lweek:t[1].day}},r.prototype._getDateByWeeksAndDay=function(e,t,n){var a=this._getRangeInfo(n);if(e>a.weeks||e===0&&t<a.fweek||e===a.weeks&&t>a.lweek)return null;var i=(e-1)*7-a.fweek+t,o=new Date(a.start.time);return o.setDate(+a.start.d+i),this.getDateInfo(o)},r.create=function(e,t){var n=[];return e.eachComponent("calendar",function(a){var i=new r(a);n.push(i),a.coordinateSystem=i}),e.eachSeries(function(a){a.get("coordinateSystem")==="calendar"&&(a.coordinateSystem=n[a.get("calendarIndex")||0])}),n},r.dimensions=["time","value"],r}();function Wk(r){var e=r.calendarModel,t=r.seriesModel,n=e?e.coordinateSystem:t?t.coordinateSystem:null;return n}var Wae=Gae;function Uae(r){r.registerComponentModel(Vae),r.registerComponentView(Hae),r.registerCoordinateSystem("calendar",Wae)}function jae(r,e){var t=r.existing;if(e.id=r.keyInfo.id,!e.type&&t&&(e.type=t.type),e.parentId==null){var n=e.parentOption;n?e.parentId=n.id:t&&(e.parentId=t.parentId)}e.parentOption=null}function Uk(r,e){var t;return L(e,function(n){r[n]!=null&&r[n]!=="auto"&&(t=!0)}),t}function Yae(r,e,t){var n=Q({},t),a=r[e],i=t.$action||"merge";i==="merge"?a?(Pe(a,n,!0),lo(a,n,{ignoreSize:!0}),mA(t,a),dg(t,a),dg(t,a,"shape"),dg(t,a,"style"),dg(t,a,"extra"),t.clipPath=a.clipPath):r[e]=n:i==="replace"?r[e]=n:i==="remove"&&a&&(r[e]=null)}var jk=["transition","enterFrom","leaveTo"],qae=jk.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function dg(r,e,t){if(t&&(!r[t]&&e[t]&&(r[t]={}),r=r[t],e=e[t]),!(!r||!e))for(var n=t?jk:qae,a=0;a<n.length;a++){var i=n[a];r[i]==null&&e[i]!=null&&(r[i]=e[i])}}function Zae(r,e){if(!!r&&(r.hv=e.hv=[Uk(e,["left","right"]),Uk(e,["top","bottom"])],r.type==="group")){var t=r,n=e;t.width==null&&(t.width=n.width=0),t.height==null&&(t.height=n.height=0)}}var Xae=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventAutoZ=!0,t}return e.prototype.mergeOption=function(t,n){var a=this.option.elements;this.option.elements=null,r.prototype.mergeOption.call(this,t,n),this.option.elements=a},e.prototype.optionUpdated=function(t,n){var a=this.option,i=(n?a:t).elements,o=a.elements=n?[]:a.elements,s=[];this._flatten(i,s,null);var l=hD(o,s,"normalMerge"),u=this._elOptionsToUpdate=[];L(l,function(c,f){var h=c.newOption;!h||(u.push(h),jae(c,h),Yae(o,f,h),Zae(o[f],h))},this),a.elements=nt(o,function(c){return c&&delete c.$action,c!=null})},e.prototype._flatten=function(t,n,a){L(t,function(i){if(!!i){a&&(i.parentOption=a),n.push(i);var o=i.children;o&&o.length&&this._flatten(o,n,i),delete i.children}},this)},e.prototype.useElOptionsToUpdate=function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t},e.type="graphic",e.defaultOption={elements:[]},e}($e),Yk={path:null,compoundPath:null,group:Te,image:ur,text:We},Xn=Ye(),Qae=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this._elMap=ge()},e.prototype.render=function(t,n,a){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,a)},e.prototype._updateElements=function(t){var n=t.useElOptionsToUpdate();if(!!n){var a=this._elMap,i=this.group,o=t.get("z"),s=t.get("zlevel");L(n,function(l){var u=qt(l.id,null),c=u!=null?a.get(u):null,f=qt(l.parentId,null),h=f!=null?a.get(f):i,v=l.type,d=l.style;v==="text"&&d&&l.hv&&l.hv[1]&&(d.textVerticalAlign=d.textBaseline=d.verticalAlign=d.align=null);var p=l.textContent,g=l.textConfig;if(d&&XN(d,v,!!g,!!p)){var y=QN(d,v,!0);!g&&y.textConfig&&(g=l.textConfig=y.textConfig),!p&&y.textContent&&(p=y.textContent)}var m=Kae(l),_=l.$action||"merge",b=_==="merge",w=_==="replace";if(b){var x=!c,S=c;x?S=qk(u,h,l.type,a):(S&&(Xn(S).isNew=!1),sk(S)),S&&(og(S,m,t,{isInit:x}),Zk(S,l,o,s))}else if(w){pg(c,l,a,t);var T=qk(u,h,l.type,a);T&&(og(T,m,t,{isInit:!0}),Zk(T,l,o,s))}else _==="remove"&&(nk(c,l),pg(c,l,a,t));var D=a.get(u);if(D&&p)if(b){var M=D.getTextContent();M?M.attr(p):D.setTextContent(new We(p))}else w&&D.setTextContent(new We(p));if(D){var A=l.clipPath;if(A){var I=A.type,P=void 0,x=!1;if(b){var E=D.getClipPath();x=!E||Xn(E).type!==I,P=x?pw(I):E}else w&&(x=!0,P=pw(I));D.setClipPath(P),og(P,A,t,{isInit:x}),lg(P,A.keyframeAnimation,t)}var O=Xn(D);D.setTextConfig(g),O.option=l,Jae(D,t,l),Yl({el:D,componentModel:t,itemName:D.name,itemTooltipOption:l.tooltip}),lg(D,l.keyframeAnimation,t)}})}},e.prototype._relocate=function(t,n){for(var a=t.option.elements,i=this.group,o=this._elMap,s=n.getWidth(),l=n.getHeight(),u=["x","y"],c=0;c<a.length;c++){var f=a[c],h=qt(f.id,null),v=h!=null?o.get(h):null;if(!(!v||!v.isGroup)){var d=v.parent,p=d===i,g=Xn(v),y=Xn(d);g.width=le(g.option.width,p?s:y.width)||0,g.height=le(g.option.height,p?l:y.height)||0}}for(var c=a.length-1;c>=0;c--){var f=a[c],h=qt(f.id,null),v=h!=null?o.get(h):null;if(!!v){var d=v.parent,y=Xn(d),m=d===i?{width:s,height:l}:{width:y.width,height:y.height},_={},b=Hd(v,f,m,null,{hv:f.hv,boundingMode:f.bounding},_);if(!Xn(v).isNew&&b){for(var w=f.transition,x={},S=0;S<u.length;S++){var T=u[S],D=_[T];w&&(Ks(w)||Ne(w,T)>=0)?x[T]=D:v[T]=D}qe(v,x,t,0)}else v.attr(_)}}},e.prototype._clear=function(){var t=this,n=this._elMap;n.each(function(a){pg(a,Xn(a).option,n,t._lastGraphicModel)}),this._elMap=ge()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(wt);function pw(r){var e=he(Yk,r)?Yk[r]:Ad(r),t=new e({});return Xn(t).type=r,t}function qk(r,e,t,n){var a=pw(t);return e.add(a),n.set(r,a),Xn(a).id=r,Xn(a).isNew=!0,a}function pg(r,e,t,n){var a=r&&r.parent;a&&(r.type==="group"&&r.traverse(function(i){pg(i,e,t,n)}),sg(r,e,n),t.removeKey(Xn(r).id))}function Zk(r,e,t,n){r.isGroup||L([["cursor",Bn.prototype.cursor],["zlevel",n||0],["z",t||0],["z2",0]],function(a){var i=a[0];he(e,i)?r[i]=Ee(e[i],a[1]):r[i]==null&&(r[i]=a[1])}),L(Fe(e),function(a){if(a.indexOf("on")===0){var i=e[a];r[a]=ye(i)?i:null}}),he(e,"draggable")&&(r.draggable=e.draggable),e.name!=null&&(r.name=e.name),e.id!=null&&(r.id=e.id)}function Kae(r){return r=Q({},r),L(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(yA),function(e){delete r[e]}),r}function Jae(r,e,t){var n=Me(r).eventData;!r.silent&&!r.ignore&&!n&&(n=Me(r).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:r.name}),n&&(n.info=t.info)}function eie(r){r.registerComponentModel(Xae),r.registerComponentView(Qae),r.registerPreprocessor(function(e){var t=e.graphic;K(t)?!t[0]||!t[0].elements?e.graphic=[{elements:t}]:e.graphic=[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var Xk=["x","y","radius","angle","single"],tie=["cartesian2d","polar","singleAxis"];function rie(r){var e=r.get("coordinateSystem");return Ne(tie,e)>=0}function To(r){return r+"Axis"}function nie(r,e){var t=ge(),n=[],a=ge();r.eachComponent({mainType:"dataZoom",query:e},function(c){a.get(c.uid)||s(c)});var i;do i=!1,r.eachComponent("dataZoom",o);while(i);function o(c){!a.get(c.uid)&&l(c)&&(s(c),i=!0)}function s(c){a.set(c.uid,!0),n.push(c),u(c)}function l(c){var f=!1;return c.eachTargetAxis(function(h,v){var d=t.get(h);d&&d[v]&&(f=!0)}),f}function u(c){c.eachTargetAxis(function(f,h){(t.get(f)||t.set(f,[]))[h]=!0})}return n}function Qk(r){var e=r.ecModel,t={infoList:[],infoMap:ge()};return r.eachTargetAxis(function(n,a){var i=e.getComponent(To(n),a);if(!!i){var o=i.getCoordSysModel();if(!!o){var s=o.uid,l=t.infoMap.get(s);l||(l={model:o,axisModels:[]},t.infoList.push(l),t.infoMap.set(s,l)),l.axisModels.push(i)}}}),t}var gw=function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},r}(),aie=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._autoThrottle=!0,t._noTarget=!0,t._rangePropMode=["percent","percent"],t}return e.prototype.init=function(t,n,a){var i=Kk(t);this.settledOption=i,this.mergeDefaultAndTheme(t,a),this._doInit(i)},e.prototype.mergeOption=function(t){var n=Kk(t);Pe(this.option,t,!0),Pe(this.settledOption,n,!0),this._doInit(n)},e.prototype._doInit=function(t){var n=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var a=this.settledOption;L([["start","startValue"],["end","endValue"]],function(i,o){this._rangePropMode[o]==="value"&&(n[i[0]]=a[i[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),n=this._targetAxisInfoMap=ge(),a=this._fillSpecifiedTargetAxis(n);a?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(n,this._orient)),this._noTarget=!0,n.each(function(i){i.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(t){var n=!1;return L(Xk,function(a){var i=this.getReferringComponents(To(a),l8);if(!!i.specified){n=!0;var o=new gw;L(i.models,function(s){o.add(s.componentIndex)}),t.set(a,o)}},this),n},e.prototype._fillAutoTargetAxisByOrient=function(t,n){var a=this.ecModel,i=!0;if(i){var o=n==="vertical"?"y":"x",s=a.findComponents({mainType:o+"Axis"});l(s,o)}if(i){var s=a.findComponents({mainType:"singleAxis",filter:function(c){return c.get("orient",!0)===n}});l(s,"single")}function l(u,c){var f=u[0];if(!!f){var h=new gw;if(h.add(f.componentIndex),t.set(c,h),i=!1,c==="x"||c==="y"){var v=f.getReferringComponents("grid",$t).models[0];v&&L(u,function(d){f.componentIndex!==d.componentIndex&&v===d.getReferringComponents("grid",$t).models[0]&&h.add(d.componentIndex)})}}}i&&L(Xk,function(u){if(!!i){var c=a.findComponents({mainType:To(u),filter:function(h){return h.get("type",!0)==="category"}});if(c[0]){var f=new gw;f.add(c[0].componentIndex),t.set(u,f),i=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis(function(n){!t&&(t=n)},this),t==="y"?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var n=this.ecModel.option;this.option.throttle=n.animation&&n.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var n=this._rangePropMode,a=this.get("rangeMode");L([["start","startValue"],["end","endValue"]],function(i,o){var s=t[i[0]]!=null,l=t[i[1]]!=null;s&&!l?n[o]="percent":!s&&l?n[o]="value":a?n[o]=a[o]:s&&(n[o]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis(function(n,a){t==null&&(t=this.ecModel.getComponent(To(n),a))},this),t},e.prototype.eachTargetAxis=function(t,n){this._targetAxisInfoMap.each(function(a,i){L(a.indexList,function(o){t.call(n,i,o)})})},e.prototype.getAxisProxy=function(t,n){var a=this.getAxisModel(t,n);if(a)return a.__dzAxisProxy},e.prototype.getAxisModel=function(t,n){var a=this._targetAxisInfoMap.get(t);if(a&&a.indexMap[n])return this.ecModel.getComponent(To(t),n)},e.prototype.setRawRange=function(t){var n=this.option,a=this.settledOption;L([["start","startValue"],["end","endValue"]],function(i){(t[i[0]]!=null||t[i[1]]!=null)&&(n[i[0]]=a[i[0]]=t[i[0]],n[i[1]]=a[i[1]]=t[i[1]])},this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var n=this.option;L(["start","startValue","end","endValue"],function(a){n[a]=t[a]})},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,n){if(t==null&&n==null){var a=this.findRepresentativeAxisProxy();if(a)return a.getDataValueWindow()}else return this.getAxisProxy(t,n).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var n,a=this._targetAxisInfoMap.keys(),i=0;i<a.length;i++)for(var o=a[i],s=this._targetAxisInfoMap.get(o),l=0;l<s.indexList.length;l++){var u=this.getAxisProxy(o,s.indexList[l]);if(u.hostedBy(this))return u;n||(n=u)}return n},e.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},e.prototype.getOrient=function(){return this._orient},e.type="dataZoom",e.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],e.defaultOption={z:4,filterMode:"filter",start:0,end:100},e}($e);function Kk(r){var e={};return L(["start","end","startValue","endValue","throttle"],function(t){r.hasOwnProperty(t)&&(e[t]=r[t])}),e}var ch=aie,iie=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.select",e}(ch),oie=iie,sie=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a,i){this.dataZoomModel=t,this.ecModel=n,this.api=a},e.type="dataZoom",e}(wt),yw=sie,lie=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.select",e}(yw),uie=lie,Au=L,Jk=_n,cie=function(){function r(e,t,n,a){this._dimName=e,this._axisIndex=t,this.ecModel=a,this._dataZoomModel=n}return r.prototype.hostedBy=function(e){return this._dataZoomModel===e},r.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},r.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},r.prototype.getTargetSeriesModels=function(){var e=[];return this.ecModel.eachSeries(function(t){if(rie(t)){var n=To(this._dimName),a=t.getReferringComponents(n,$t).models[0];a&&this._axisIndex===a.componentIndex&&e.push(t)}},this),e},r.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},r.prototype.getMinMaxSpan=function(){return we(this._minMaxSpan)},r.prototype.calculateDataWindow=function(e){var t=this._dataExtent,n=this.getAxisModel(),a=n.axis.scale,i=this._dataZoomModel.getRangePropMode(),o=[0,100],s=[],l=[],u;Au(["start","end"],function(h,v){var d=e[h],p=e[h+"Value"];i[v]==="percent"?(d==null&&(d=o[v]),p=a.parse(at(d,o,t))):(u=!0,p=p==null?t[v]:a.parse(p),d=at(p,t,o)),l[v]=p==null||isNaN(p)?t[v]:p,s[v]=d==null||isNaN(d)?o[v]:d}),Jk(l),Jk(s);var c=this._minMaxSpan;u?f(l,s,t,o,!1):f(s,l,o,t,!0);function f(h,v,d,p,g){var y=g?"Span":"ValueSpan";Zs(0,h,d,"all",c["min"+y],c["max"+y]);for(var m=0;m<2;m++)v[m]=at(h[m],d,p,!0),g&&(v[m]=a.parse(v[m]))}return{valueWindow:l,percentWindow:s}},r.prototype.reset=function(e){if(e===this._dataZoomModel){var t=this.getTargetSeriesModels();this._dataExtent=fie(this,this._dimName,t),this._updateMinMaxSpan();var n=this.calculateDataWindow(e.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},r.prototype.filterData=function(e,t){if(e!==this._dataZoomModel)return;var n=this._dimName,a=this.getTargetSeriesModels(),i=e.get("filterMode"),o=this._valueWindow;if(i==="none")return;Au(a,function(l){var u=l.getData(),c=u.mapDimensionsAll(n);if(!!c.length){if(i==="weakFilter"){var f=u.getStore(),h=J(c,function(v){return u.getDimensionIndex(v)},u);u.filterSelf(function(v){for(var d,p,g,y=0;y<c.length;y++){var m=f.get(h[y],v),_=!isNaN(m),b=m<o[0],w=m>o[1];if(_&&!b&&!w)return!0;_&&(g=!0),b&&(d=!0),w&&(p=!0)}return g&&d&&p})}else Au(c,function(v){if(i==="empty")l.setData(u=u.map(v,function(p){return s(p)?p:NaN}));else{var d={};d[v]=o,u.selectRange(d)}});Au(c,function(v){u.setApproximateExtent(o,v)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._dataExtent;Au(["min","max"],function(a){var i=t.get(a+"Span"),o=t.get(a+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?i=at(n[0]+o,n,[0,100],!0):i!=null&&(o=at(i,[0,100],n,!0)-n[0]),e[a+"Span"]=i,e[a+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,n=this._valueWindow;if(!!t){var a=A0(n,[0,500]);a=Math.min(a,20);var i=e.axis.scale.rawExtentInfo;t[0]!==0&&i.setDeterminedMinMax("min",+n[0].toFixed(a)),t[1]!==100&&i.setDeterminedMinMax("max",+n[1].toFixed(a)),i.freeze()}},r}();function fie(r,e,t){var n=[1/0,-1/0];Au(t,function(o){xj(n,o.getData(),e)});var a=r.getAxisModel(),i=cP(a.axis.scale,a,n).calculate();return[i.min,i.max]}var hie=cie,vie={getTargetSeries:function(r){function e(a){r.eachComponent("dataZoom",function(i){i.eachTargetAxis(function(o,s){var l=r.getComponent(To(o),s);a(o,s,l,i)})})}e(function(a,i,o,s){o.__dzAxisProxy=null});var t=[];e(function(a,i,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new hie(a,i,s,r),t.push(o.__dzAxisProxy))});var n=ge();return L(t,function(a){L(a.getTargetSeriesModels(),function(i){n.set(i.uid,i)})}),n},overallReset:function(r,e){r.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(n,a){t.getAxisProxy(n,a).reset(t)}),t.eachTargetAxis(function(n,a){t.getAxisProxy(n,a).filterData(t,e)})}),r.eachComponent("dataZoom",function(t){var n=t.findRepresentativeAxisProxy();if(n){var a=n.getDataPercentWindow(),i=n.getDataValueWindow();t.setCalculatedRange({start:a[0],end:a[1],startValue:i[0],endValue:i[1]})}})}},die=vie;function pie(r){r.registerAction("dataZoom",function(e,t){var n=nie(t,e);L(n,function(a){a.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var e5=!1;function mw(r){e5||(e5=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,die),pie(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function gie(r){r.registerComponentModel(oie),r.registerComponentView(uie),mw(r)}var Qn=function(){function r(){}return r}(),t5={};function Lu(r,e){t5[r]=e}function r5(r){return t5[r]}var yie=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){r.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;L(this.option.feature,function(n,a){var i=r5(a);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(t)),Pe(n,i.defaultOption))})},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},e}($e),mie=yie;function _ie(r,e,t){var n=e.getBoxLayoutParams(),a=e.get("padding"),i={width:t.getWidth(),height:t.getHeight()},o=Ht(n,i,a);Cs(e.get("orient"),r,e.get("itemGap"),o.width,o.height),Hd(r,n,i,a)}function n5(r,e){var t=xs(e.get("padding")),n=e.getItemStyle(["color","opacity"]);return n.fill=e.get("backgroundColor"),r=new Ge({shape:{x:r.x-t[3],y:r.y-t[0],width:r.width+t[1]+t[3],height:r.height+t[0]+t[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1}),r}var bie=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,n,a,i){var o=this.group;if(o.removeAll(),!t.get("show"))return;var s=+t.get("itemSize"),l=t.get("orient")==="vertical",u=t.get("feature")||{},c=this._features||(this._features={}),f=[];L(u,function(d,p){f.push(p)}),new pi(this._featureNames||[],f).add(h).update(h).remove(Ae(h,null)).execute(),this._featureNames=f;function h(d,p){var g=f[d],y=f[p],m=u[g],_=new lt(m,t,t.ecModel),b;if(i&&i.newTitle!=null&&i.featureName===g&&(m.title=i.newTitle),g&&!y){if(xie(g))b={onclick:_.option.onclick,featureName:g};else{var w=r5(g);if(!w)return;b=new w}c[g]=b}else if(b=c[y],!b)return;b.uid=Zl("toolbox-feature"),b.model=_,b.ecModel=n,b.api=a;var x=b instanceof Qn;if(!g&&y){x&&b.dispose&&b.dispose(n,a);return}if(!_.get("show")||x&&b.unusable){x&&b.remove&&b.remove(n,a);return}v(_,b,g),_.setIconStatus=function(S,T){var D=this.option,M=this.iconPaths;D.iconStatus=D.iconStatus||{},D.iconStatus[S]=T,M[S]&&(T==="emphasis"?hi:vi)(M[S])},b instanceof Qn&&b.render&&b.render(_,n,a,i)}function v(d,p,g){var y=d.getModel("iconStyle"),m=d.getModel(["emphasis","iconStyle"]),_=p instanceof Qn&&p.getIcons?p.getIcons():d.get("icon"),b=d.get("title")||{},w,x;ce(_)?(w={},w[g]=_):w=_,ce(b)?(x={},x[g]=b):x=b;var S=d.iconPaths={};L(w,function(T,D){var M=jl(T,{},{x:-s/2,y:-s/2,width:s,height:s});M.setStyle(y.getItemStyle());var A=M.ensureState("emphasis");A.style=m.getItemStyle();var I=new We({style:{text:x[D],align:m.get("textAlign"),borderRadius:m.get("textBorderRadius"),padding:m.get("textPadding"),fill:null},ignore:!0});M.setTextContent(I),Yl({el:M,componentModel:t,itemName:D,formatterParamsExtra:{title:x[D]}}),M.__title=x[D],M.on("mouseover",function(){var P=m.getItemStyle(),E=l?t.get("right")==null&&t.get("left")!=="right"?"right":"left":t.get("bottom")==null&&t.get("top")!=="bottom"?"bottom":"top";I.setStyle({fill:m.get("textFill")||P.fill||P.stroke||"#000",backgroundColor:m.get("textBackgroundColor")}),M.setTextConfig({position:m.get("textPosition")||E}),I.ignore=!t.get("showTitle"),a.enterEmphasis(this)}).on("mouseout",function(){d.get(["iconStatus",D])!=="emphasis"&&a.leaveEmphasis(this),I.hide()}),(d.get(["iconStatus",D])==="emphasis"?hi:vi)(M),o.add(M),M.on("click",fe(p.onclick,p,n,a,D)),S[D]=M})}_ie(o,t,a),o.add(n5(o.getBoundingRect(),t)),l||o.eachChild(function(d){var p=d.__title,g=d.ensureState("emphasis"),y=g.textConfig||(g.textConfig={}),m=d.getTextContent(),_=m&&m.ensureState("emphasis");if(_&&!ye(_)&&p){var b=_.style||(_.style={}),w=Rc(p,We.makeFont(b)),x=d.x+o.x,S=d.y+o.y+s,T=!1;S+w.height>a.getHeight()&&(y.position="top",T=!0);var D=T?-5-w.height:s+10;x+w.width/2>a.getWidth()?(y.position=["100%",D],b.align="right"):x-w.width/2<0&&(y.position=[0,D],b.align="left")}})},e.prototype.updateView=function(t,n,a,i){L(this._features,function(o){o instanceof Qn&&o.updateView&&o.updateView(o.model,n,a,i)})},e.prototype.remove=function(t,n){L(this._features,function(a){a instanceof Qn&&a.remove&&a.remove(t,n)}),this.group.removeAll()},e.prototype.dispose=function(t,n){L(this._features,function(a){a instanceof Qn&&a.dispose&&a.dispose(t,n)})},e.type="toolbox",e}(wt);function xie(r){return r.indexOf("my")===0}var wie=bie,Sie=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,n){var a=this.model,i=a.get("name")||t.get("title.0.text")||"echarts",o=n.getZr().painter.getType()==="svg",s=o?"svg":a.get("type",!0)||"png",l=n.getConnectedDataURL({type:s,backgroundColor:a.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:a.get("connectedBackgroundColor"),excludeComponents:a.get("excludeComponents"),pixelRatio:a.get("pixelRatio")}),u=Ue.browser;if(ye(MouseEvent)&&(u.newEdge||!u.ie&&!u.edge)){var c=document.createElement("a");c.download=i+"."+s,c.target="_blank",c.href=l;var f=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});c.dispatchEvent(f)}else if(window.navigator.msSaveOrOpenBlob||o){var h=l.split(","),v=h[0].indexOf("base64")>-1,d=o?decodeURIComponent(h[1]):h[1];v&&(d=window.atob(d));var p=i+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var g=d.length,y=new Uint8Array(g);g--;)y[g]=d.charCodeAt(g);var m=new Blob([y]);window.navigator.msSaveOrOpenBlob(m,p)}else{var _=document.createElement("iframe");document.body.appendChild(_);var b=_.contentWindow,w=b.document;w.open("image/svg+xml","replace"),w.write(d),w.close(),b.focus(),w.execCommand("SaveAs",!0,p),document.body.removeChild(_)}}else{var x=a.get("lang"),S='<body style="margin:0;"><img src="'+l+'" style="max-width:100%;" title="'+(x&&x[0]||"")+'" /></body>',T=window.open();T.document.write(S),T.document.title=i}},e.getDefaultOption=function(t){var n={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return n},e}(Qn),Cie=Sie,a5="__ec_magicType_stack__",Tie=[["line","bar"],["stack"]],Die=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getIcons=function(){var t=this.model,n=t.get("icon"),a={};return L(t.get("type"),function(i){n[i]&&(a[i]=n[i])}),a},e.getDefaultOption=function(t){var n={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return n},e.prototype.onclick=function(t,n,a){var i=this.model,o=i.get(["seriesIndex",a]);if(!!i5[a]){var s={series:[]},l=function(f){var h=f.subType,v=f.id,d=i5[a](h,v,f,i);d&&(me(d,f.option),s.series.push(d));var p=f.coordinateSystem;if(p&&p.type==="cartesian2d"&&(a==="line"||a==="bar")){var g=p.getAxesByScale("ordinal")[0];if(g){var y=g.dim,m=y+"Axis",_=f.getReferringComponents(m,$t).models[0],b=_.componentIndex;s[m]=s[m]||[];for(var w=0;w<=b;w++)s[m][b]=s[m][b]||{};s[m][b].boundaryGap=a==="bar"}}};L(Tie,function(f){Ne(f,a)>=0&&L(f,function(h){i.setIconStatus(h,"normal")})}),i.setIconStatus(a,"emphasis"),t.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,c=a;a==="stack"&&(u=Pe({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),i.get(["iconStatus",a])!=="emphasis"&&(c="tiled")),n.dispatchAction({type:"changeMagicType",currentType:c,newOption:s,newTitle:u,featureName:"magicType"})}},e}(Qn),i5={line:function(r,e,t,n){if(r==="bar")return Pe({id:e,type:"line",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},n.get(["option","line"])||{},!0)},bar:function(r,e,t,n){if(r==="line")return Pe({id:e,type:"bar",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},n.get(["option","bar"])||{},!0)},stack:function(r,e,t,n){var a=t.get("stack")===a5;if(r==="line"||r==="bar")return n.setIconStatus("stack",a?"normal":"emphasis"),Pe({id:e,stack:a?"":a5},n.get(["option","stack"])||{},!0)}};ma({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,e){e.mergeOption(r.newOption)});var Mie=Die,gg=new Array(60).join("-"),Iu=" ";function Aie(r){var e={},t=[],n=[];return r.eachRawSeries(function(a){var i=a.coordinateSystem;if(i&&(i.type==="cartesian2d"||i.type==="polar")){var o=i.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;e[s]||(e[s]={categoryAxis:o,valueAxis:i.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),e[s].series.push(a)}else t.push(a)}else t.push(a)}),{seriesGroupByCategoryAxis:e,other:t,meta:n}}function Lie(r){var e=[];return L(r,function(t,n){var a=t.categoryAxis,i=t.valueAxis,o=i.dim,s=[" "].concat(J(t.series,function(v){return v.name})),l=[a.model.getCategories()];L(t.series,function(v){var d=v.getRawData();l.push(v.getRawData().mapArray(d.mapDimension(o),function(p){return p}))});for(var u=[s.join(Iu)],c=0;c<l[0].length;c++){for(var f=[],h=0;h<l.length;h++)f.push(l[h][c]);u.push(f.join(Iu))}e.push(u.join(`
223
223
  `))}),e.join(`
224
224
 
225
225
  `+gg+`
@@ -240,7 +240,7 @@ yyyy`);var n=bn(e),a=t?"getUTC":"get",i=n[a+"FullYear"](),o=n[a+"Month"]()+1,s=n
240
240
 
241
241
  `:"<br/>",y=f.join(g);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t,u)?this._updatePosition(s,v,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,y,u,Math.random()+"",o[0],o[1],v,null,h)})},e.prototype._showSeriesItemTooltip=function(t,n,a){var i=this._ecModel,o=Me(n),s=o.seriesIndex,l=i.getSeriesByIndex(s),u=o.dataModel||l,c=o.dataIndex,f=o.dataType,h=u.getData(f),v=this._renderMode,d=t.positionDefault,p=fh([h.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),g=p.get("trigger");if(!(g!=null&&g!=="item")){var y=u.getDataParams(c,f),m=new a1;y.marker=m.makeTooltipMarker("item",ws(y.color),v);var _=tL(u.formatTooltip(c,!1,f)),b=p.get("order"),w=p.get("valueFormatter"),x=_.frag,S=x?mL(w?Q({valueFormatter:w},x):x,m,v,b,i.get("useUTC"),p.get("textStyle")):_.text,T="item_"+u.name+"_"+c;this._showOrMove(p,function(){this._showTooltipContent(p,S,y,T,t.offsetX,t.offsetY,t.position,t.target,m)}),a({type:"showTip",dataIndexInside:c,dataIndex:h.getRawIndex(c),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,n,a){var i=Me(n),o=i.tooltipConfig,s=o.option||{};if(ce(s)){var l=s;s={content:l,formatter:l}}var u=[s],c=this._ecModel.getComponent(i.componentMainType,i.componentIndex);c&&u.push(c),u.push({formatter:s.content});var f=t.positionDefault,h=fh(u,this._tooltipModel,f?{position:f}:null),v=h.get("content"),d=Math.random()+"",p=new a1;this._showOrMove(h,function(){var g=we(h.get("formatterParams")||{});this._showTooltipContent(h,v,g,d,t.offsetX,t.offsetY,t.position,n,p)}),a({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,n,a,i,o,s,l,u,c){if(this._ticket="",!(!t.get("showContent")||!t.get("show"))){var f=this._tooltipContent;f.setEnterable(t.get("enterable"));var h=t.get("formatter");l=l||t.get("position");var v=n,d=this._getNearestPoint([o,s],a,t.get("trigger"),t.get("borderColor")),p=d.color;if(h)if(ce(h)){var g=t.ecModel.get("useUTC"),y=K(a)?a[0]:a,m=y&&y.axisType&&y.axisType.indexOf("time")>=0;v=h,m&&(v=uf(y.axisValue,v,g)),v=B_(v,a,!0)}else if(ye(h)){var _=fe(function(b,w){b===this._ticket&&(f.setContent(w,c,t,p,l),this._updatePosition(t,l,o,s,f,a,u))},this);this._ticket=i,v=h(a,i,_)}else v=h;f.setContent(v,c,t,p,l),f.show(t,p),this._updatePosition(t,l,o,s,f,a,u)}},e.prototype._getNearestPoint=function(t,n,a,i){if(a==="axis"||K(n))return{color:i||(this._renderMode==="html"?"#fff":"none")};if(!K(n))return{color:i||n.color||n.borderColor}},e.prototype._updatePosition=function(t,n,a,i,o,s,l){var u=this._api.getWidth(),c=this._api.getHeight();n=n||t.get("position");var f=o.getSize(),h=t.get("align"),v=t.get("verticalAlign"),d=l&&l.getBoundingRect().clone();if(l&&d.applyTransform(l.transform),ye(n)&&(n=n([a,i],s,o.el,d,{viewSize:[u,c],contentSize:f.slice()})),K(n))a=le(n[0],u),i=le(n[1],c);else if(_e(n)){var p=n;p.width=f[0],p.height=f[1];var g=Ht(p,{width:u,height:c});a=g.x,i=g.y,h=null,v=null}else if(ce(n)&&l){var y=xoe(n,d,f,t.get("borderWidth"));a=y[0],i=y[1]}else{var y=_oe(a,i,o,u,c,h?null:20,v?null:20);a=y[0],i=y[1]}if(h&&(a-=C5(h)?f[0]/2:h==="right"?f[0]:0),v&&(i-=C5(v)?f[1]/2:v==="bottom"?f[1]:0),p5(t)){var y=boe(a,i,o,u,c);a=y[0],i=y[1]}o.moveTo(a,i)},e.prototype._updateContentNotChangedOnAxis=function(t,n){var a=this._lastDataByCoordSys,i=this._cbParamsList,o=!!a&&a.length===t.length;return o&&L(a,function(s,l){var u=s.dataByAxis||[],c=t[l]||{},f=c.dataByAxis||[];o=o&&u.length===f.length,o&&L(u,function(h,v){var d=f[v]||{},p=h.seriesDataIndices||[],g=d.seriesDataIndices||[];o=o&&h.value===d.value&&h.axisType===d.axisType&&h.axisId===d.axisId&&p.length===g.length,o&&L(p,function(y,m){var _=g[m];o=o&&y.seriesIndex===_.seriesIndex&&y.dataIndex===_.dataIndex}),i&&L(h.seriesDataIndices,function(y){var m=y.seriesIndex,_=n[m],b=i[m];_&&b&&b.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=t,this._cbParamsList=n,!!o},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,n){Ue.node||!n.getDom()||(mf(this,"_updatePosition"),this._tooltipContent.dispose(),sw("itemTooltip",n))},e.type="tooltip",e}(wt);function fh(r,e,t){var n=e.ecModel,a;t?(a=new lt(t,n,n),a=new lt(e.option,a,n)):a=e;for(var i=r.length-1;i>=0;i--){var o=r[i];o&&(o instanceof lt&&(o=o.get("tooltip",!0)),ce(o)&&(o={formatter:o}),o&&(a=new lt(o,a,n)))}return a}function S5(r,e){return r.dispatchAction||fe(e.dispatchAction,e)}function _oe(r,e,t,n,a,i,o){var s=t.getSize(),l=s[0],u=s[1];return i!=null&&(r+l+i+2>n?r-=l+i:r+=i),o!=null&&(e+u+o>a?e-=u+o:e+=o),[r,e]}function boe(r,e,t,n,a){var i=t.getSize(),o=i[0],s=i[1];return r=Math.min(r+o,n)-o,e=Math.min(e+s,a)-s,r=Math.max(r,0),e=Math.max(e,0),[r,e]}function xoe(r,e,t,n){var a=t[0],i=t[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=e.width,c=e.height;switch(r){case"inside":s=e.x+u/2-a/2,l=e.y+c/2-i/2;break;case"top":s=e.x+u/2-a/2,l=e.y-i-o;break;case"bottom":s=e.x+u/2-a/2,l=e.y+c+o;break;case"left":s=e.x-a-o,l=e.y+c/2-i/2;break;case"right":s=e.x+u+o,l=e.y+c/2-i/2}return[s,l]}function C5(r){return r==="center"||r==="middle"}function woe(r,e,t){var n=N0(r).queryOptionMap,a=n.keys()[0];if(!(!a||a==="series")){var i=Vc(e,a,n.get(a),{useDefault:!1,enableAll:!1,enableNone:!1}),o=i.models[0];if(!!o){var s=t.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var c=Me(u).tooltipConfig;if(c&&c.name===r.name)return l=u,!0}),l)return{componentMainType:a,componentIndex:o.componentIndex,el:l}}}}var Soe=moe;function Coe(r){ke(uh),r.registerComponentModel(noe),r.registerComponentView(Soe),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Ot),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Ot)}var Toe=["rect","polygon","keep","clear"];function Doe(r,e){var t=st(r?r.brush:[]);if(!!t.length){var n=[];L(t,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(n=n.concat(u))});var a=r&&r.toolbox;K(a)&&(a=a[0]),a||(a={feature:{}},r.toolbox=[a]);var i=a.feature||(a.feature={}),o=i.brush||(i.brush={}),s=o.type||(o.type=[]);s.push.apply(s,n),Moe(s),e&&!s.length&&s.push.apply(s,Toe)}}function Moe(r){var e={};L(r,function(t){e[t]=1}),r.length=0,L(e,function(t,n){r.push(n)})}var T5=L;function D5(r){if(r){for(var e in r)if(r.hasOwnProperty(e))return!0}}function Mw(r,e,t){var n={};return T5(e,function(i){var o=n[i]=a();T5(r[i],function(s,l){if(!!_r.isValidType(l)){var u={type:l,visual:s};t&&t(u,i),o[l]=new _r(u),l==="opacity"&&(u=we(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new _r(u))}})}),n;function a(){var i=function(){};i.prototype.__hidden=i.prototype;var o=new i;return o}}function M5(r,e,t){var n;L(t,function(a){e.hasOwnProperty(a)&&D5(e[a])&&(n=!0)}),n&&L(t,function(a){e.hasOwnProperty(a)&&D5(e[a])?r[a]=we(e[a]):delete r[a]})}function Aoe(r,e,t,n,a,i){var o={};L(r,function(f){var h=_r.prepareVisualTypes(e[f]);o[f]=h});var s;function l(f){return u1(t,s,f)}function u(f,h){GL(t,s,f,h)}i==null?t.each(c):t.each([i],c);function c(f,h){s=i==null?f:h;var v=t.getRawDataItem(s);if(!(v&&v.visualMap===!1))for(var d=n.call(a,f),p=e[d],g=o[d],y=0,m=g.length;y<m;y++){var _=g[y];p[_]&&p[_].applyVisual(f,l,u)}}}function Loe(r,e,t,n){var a={};return L(r,function(i){var o=_r.prepareVisualTypes(e[i]);a[i]=o}),{progress:function(o,s){var l;n!=null&&(l=s.getDimensionIndex(n));function u(w){return u1(s,f,w)}function c(w,x){GL(s,f,w,x)}for(var f,h=s.getStore();(f=o.next())!=null;){var v=s.getRawDataItem(f);if(!(v&&v.visualMap===!1))for(var d=n!=null?h.get(l,f):f,p=t(d),g=e[p],y=a[p],m=0,_=y.length;m<_;m++){var b=y[m];g[b]&&g[b].applyVisual(d,u,c)}}}}}function Ioe(r){var e=r.brushType,t={point:function(n){return A5[e].point(n,t,r)},rect:function(n){return A5[e].rect(n,t,r)}};return t}var A5={lineX:L5(0),lineY:L5(1),rect:{point:function(r,e,t){return r&&t.boundingRect.contain(r[0],r[1])},rect:function(r,e,t){return r&&t.boundingRect.intersect(r)}},polygon:{point:function(r,e,t){return r&&t.boundingRect.contain(r[0],r[1])&&Rs(t.range,r[0],r[1])},rect:function(r,e,t){var n=t.range;if(!r||n.length<=1)return!1;var a=r.x,i=r.y,o=r.width,s=r.height,l=n[0];if(Rs(n,a,i)||Rs(n,a+o,i)||Rs(n,a,i+s)||Rs(n,a+o,i+s)||Re.create(r).contain(l[0],l[1])||nf(a,i,a+o,i,n)||nf(a,i,a,i+s,n)||nf(a+o,i,a+o,i+s,n)||nf(a,i+s,a+o,i+s,n))return!0}}};function L5(r){var e=["x","y"],t=["width","height"];return{point:function(n,a,i){if(n){var o=i.range,s=n[r];return hh(s,o)}},rect:function(n,a,i){if(n){var o=i.range,s=[n[e[r]],n[e[r]]+n[t[r]]];return s[1]<s[0]&&s.reverse(),hh(s[0],o)||hh(s[1],o)||hh(o[0],s)||hh(o[1],s)}}}}function hh(r,e){return e[0]<=r&&r<=e[1]}var I5=["inBrush","outOfBrush"],Aw="__ecBrushSelect",Lw="__ecInBrushSelectEvent";function P5(r){r.eachComponent({mainType:"brush"},function(e){var t=e.brushTargetManager=new Sw(e.option,r);t.setInputRanges(e.areas,r)})}function Poe(r,e,t){var n=[],a,i;r.eachComponent({mainType:"brush"},function(o){t&&t.type==="takeGlobalCursor"&&o.setBrushOption(t.key==="brush"?t.brushOption:{brushType:!1})}),P5(r),r.eachComponent({mainType:"brush"},function(o,s){var l={brushId:o.id,brushIndex:s,brushName:o.name,areas:we(o.areas),selected:[]};n.push(l);var u=o.option,c=u.brushLink,f=[],h=[],v=[],d=!1;s||(a=u.throttleType,i=u.throttleDelay);var p=J(o.areas,function(w){var x=Noe[w.brushType],S=me({boundingRect:x?x(w):void 0},w);return S.selectors=Ioe(S),S}),g=Mw(o.option,I5,function(w){w.mappingMethod="fixed"});K(c)&&L(c,function(w){f[w]=1});function y(w){return c==="all"||!!f[w]}function m(w){return!!w.length}r.eachSeries(function(w,x){var S=v[x]=[];w.subType==="parallel"?_(w,x):b(w,x,S)});function _(w,x){var S=w.coordinateSystem;d=d||S.hasAxisBrushed(),y(x)&&S.eachActiveState(w.getData(),function(T,D){T==="active"&&(h[D]=1)})}function b(w,x,S){if(!(!w.brushSelector||Roe(o,x))&&(L(p,function(D){o.brushTargetManager.controlSeries(D,w,r)&&S.push(D),d=d||m(S)}),y(x)&&m(S))){var T=w.getData();T.each(function(D){E5(w,S,T,D)&&(h[D]=1)})}}r.eachSeries(function(w,x){var S={seriesId:w.id,seriesIndex:x,seriesName:w.name,dataIndex:[]};l.selected.push(S);var T=v[x],D=w.getData(),M=y(x)?function(A){return h[A]?(S.dataIndex.push(D.getRawIndex(A)),"inBrush"):"outOfBrush"}:function(A){return E5(w,T,D,A)?(S.dataIndex.push(D.getRawIndex(A)),"inBrush"):"outOfBrush"};(y(x)?d:m(T))&&Aoe(I5,g,D,M)})}),Eoe(e,a,i,n,t)}function Eoe(r,e,t,n,a){if(!!a){var i=r.getZr();if(!i[Lw]){i[Aw]||(i[Aw]=Ooe);var o=ou(i,Aw,t,e);o(r,n)}}}function Ooe(r,e){if(!r.isDisposed()){var t=r.getZr();t[Lw]=!0,r.dispatchAction({type:"brushSelect",batch:e}),t[Lw]=!1}}function E5(r,e,t,n){for(var a=0,i=e.length;a<i;a++){var o=e[a];if(r.brushSelector(n,t,o.selectors,o))return!0}}function Roe(r,e){var t=r.option.seriesIndex;return t!=null&&t!=="all"&&(K(t)?Ne(t,e)<0:e!==t)}var Noe={rect:function(r){return O5(r.range)},polygon:function(r){for(var e,t=r.range,n=0,a=t.length;n<a;n++){e=e||[[1/0,-1/0],[1/0,-1/0]];var i=t[n];i[0]<e[0][0]&&(e[0][0]=i[0]),i[0]>e[0][1]&&(e[0][1]=i[0]),i[1]<e[1][0]&&(e[1][0]=i[1]),i[1]>e[1][1]&&(e[1][1]=i[1])}return e&&O5(e)}};function O5(r){return new Re(r[0][0],r[1][0],r[0][1]-r[0][0],r[1][1]-r[1][0])}var koe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){this.ecModel=t,this.api=n,this.model,(this._brushController=new Px(n.getZr())).on("brush",fe(this._onBrush,this)).mount()},e.prototype.render=function(t,n,a,i){this.model=t,this._updateController(t,n,a,i)},e.prototype.updateTransform=function(t,n,a,i){P5(n),this._updateController(t,n,a,i)},e.prototype.updateVisual=function(t,n,a,i){this.updateTransform(t,n,a,i)},e.prototype.updateView=function(t,n,a,i){this._updateController(t,n,a,i)},e.prototype._updateController=function(t,n,a,i){(!i||i.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(a)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var n=this.model.id,a=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:n,areas:we(a),$from:n}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:n,areas:we(a),$from:n})},e.type="brush",e}(wt),Boe=koe,zoe="#ddd",Foe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.areas=[],t.brushOption={},t}return e.prototype.optionUpdated=function(t,n){var a=this.option;!n&&M5(a,t,["inBrush","outOfBrush"]);var i=a.inBrush=a.inBrush||{};a.outOfBrush=a.outOfBrush||{color:zoe},i.hasOwnProperty("liftZ")||(i.liftZ=5)},e.prototype.setAreas=function(t){!t||(this.areas=J(t,function(n){return R5(this.option,n)},this))},e.prototype.setBrushOption=function(t){this.brushOption=R5(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},e}($e);function R5(r,e){return Pe({brushType:r.brushType,brushMode:r.brushMode,transformable:r.transformable,brushStyle:new lt(r.brushStyle).getItemStyle(),removeOnClick:r.removeOnClick,z:r.z},e,!0)}var Voe=Foe,$oe=["rect","polygon","lineX","lineY","keep","clear"],Hoe=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,n,a){var i,o,s;n.eachComponent({mainType:"brush"},function(l){i=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=i,this._brushMode=o,L(t.get("type",!0),function(l){t.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===i)?"emphasis":"normal")})},e.prototype.updateView=function(t,n,a){this.render(t,n,a)},e.prototype.getIcons=function(){var t=this.model,n=t.get("icon",!0),a={};return L(t.get("type",!0),function(i){n[i]&&(a[i]=n[i])}),a},e.prototype.onclick=function(t,n,a){var i=this._brushType,o=this._brushMode;a==="clear"?(n.dispatchAction({type:"axisAreaSelect",intervals:[]}),n.dispatchAction({type:"brush",command:"clear",areas:[]})):n.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:a==="keep"?i:i===a?!1:a,brushMode:a==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(t){var n={show:!0,type:$oe.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocaleModel().get(["toolbox","brush","title"])};return n},e}(Qn),Goe=Hoe;function Woe(r){r.registerComponentView(Boe),r.registerComponentModel(Voe),r.registerPreprocessor(Doe),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,Poe),r.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(n){n.setAreas(e.areas)})}),r.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},Ot),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Ot),Lu("brush",Goe)}var Uoe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}($e),joe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){if(this.group.removeAll(),!!t.get("show")){var i=this.group,o=t.getModel("textStyle"),s=t.getModel("subtextStyle"),l=t.get("textAlign"),u=Ee(t.get("textBaseline"),t.get("textVerticalAlign")),c=new We({style:gt(o,{text:t.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),f=c.getBoundingRect(),h=t.get("subtext"),v=new We({style:gt(s,{text:h,fill:s.getTextColor(),y:f.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),p=t.get("sublink"),g=t.get("triggerEvent",!0);c.silent=!d&&!g,v.silent=!p&&!g,d&&c.on("click",function(){Vd(d,"_"+t.get("target"))}),p&&v.on("click",function(){Vd(p,"_"+t.get("subtarget"))}),Me(c).eventData=Me(v).eventData=g?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(c),h&&i.add(v);var y=i.getBoundingRect(),m=t.getBoxLayoutParams();m.width=y.width,m.height=y.height;var _=Ht(m,{width:a.getWidth(),height:a.getHeight()},t.get("padding"));l||(l=t.get("left")||t.get("right"),l==="middle"&&(l="center"),l==="right"?_.x+=_.width:l==="center"&&(_.x+=_.width/2)),u||(u=t.get("top")||t.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?_.y+=_.height:u==="middle"&&(_.y+=_.height/2),u=u||"top"),i.x=_.x,i.y=_.y,i.markRedraw();var b={align:l,verticalAlign:u};c.setStyle(b),v.setStyle(b),y=i.getBoundingRect();var w=_.margin,x=t.getItemStyle(["color","opacity"]);x.fill=t.get("backgroundColor");var S=new Ge({shape:{x:y.x-w[3],y:y.y-w[0],width:y.width+w[1]+w[3],height:y.height+w[0]+w[2],r:t.get("borderRadius")},style:x,subPixelOptimize:!0,silent:!0});i.add(S)}},e.type="title",e}(wt);function Yoe(r){r.registerComponentModel(Uoe),r.registerComponentView(joe)}var qoe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode="box",t}return e.prototype.init=function(t,n,a){this.mergeDefaultAndTheme(t,a),this._initData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){t==null&&(t=this.option.currentIndex);var n=this._data.count();this.option.loop?t=(t%n+n)%n:(t>=n&&(t=n-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t=this.option,n=t.data||[],a=t.axisType,i=this._names=[],o;a==="category"?(o=[],L(n,function(u,c){var f=qt(kl(u),""),h;_e(u)?(h=we(u),h.value=c):h=c,o.push(h),i.push(f)})):o=n;var s={category:"ordinal",time:"time",value:"number"}[a]||"number",l=this._data=new Er([{name:"value",type:s}],this);l.initData(o,i)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}($e),N5=qoe,k5=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline.slider",e.defaultOption=so(N5.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),e}(N5);Et(k5,K_.prototype);var Zoe=k5,Xoe=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline",e}(wt),Qoe=Xoe,Koe=function(r){j(e,r);function e(t,n,a,i){var o=r.call(this,t,n,a)||this;return o.type=i||"value",o}return e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},e}(Un),Joe=Koe,Iw=Math.PI,B5=Ye(),ese=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){this.api=n},e.prototype.render=function(t,n,a){if(this.model=t,this.api=a,this.ecModel=n,this.group.removeAll(),t.get("show",!0)){var i=this._layout(t,a),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(i,t);t.formatTooltip=function(u){var c=l.scale.getLabel({value:u});return nr("nameValue",{noName:!0,value:c})},L(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](i,o,l,t)},this),this._renderAxisLabel(i,s,l,t),this._position(i,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,n){var a=t.get(["label","position"]),i=t.get("orient"),o=rse(t,n),s;a==null||a==="auto"?s=i==="horizontal"?o.y+o.height/2<n.getHeight()/2?"-":"+":o.x+o.width/2<n.getWidth()/2?"+":"-":ce(a)?s={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[i][a]:s=a;var l={horizontal:"center",vertical:s>=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:Iw/2},f=i==="vertical"?o.height:o.width,h=t.getModel("controlStyle"),v=h.get("show",!0),d=v?h.get("itemSize"):0,p=v?h.get("itemGap"):0,g=d+p,y=t.get(["label","rotate"])||0;y=y*Iw/180;var m,_,b,w=h.get("position",!0),x=v&&h.get("showPlayBtn",!0),S=v&&h.get("showPrevBtn",!0),T=v&&h.get("showNextBtn",!0),D=0,M=f;w==="left"||w==="bottom"?(x&&(m=[0,0],D+=g),S&&(_=[D,0],D+=g),T&&(b=[M-d,0],M-=g)):(x&&(m=[M-d,0],M-=g),S&&(_=[0,0],D+=g),T&&(b=[M-d,0],M-=g));var A=[D,M];return t.get("inverse")&&A.reverse(),{viewRect:o,mainLength:f,orient:i,rotation:c[i],labelRotation:y,labelPosOpt:s,labelAlign:t.get(["label","align"])||l[i],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||u[i],playPosition:m,prevBtnPosition:_,nextBtnPosition:b,axisExtent:A,controlSize:d,controlGap:p}},e.prototype._position=function(t,n){var a=this._mainGroup,i=this._labelGroup,o=t.viewRect;if(t.orient==="vertical"){var s=gn(),l=o.x,u=o.y+o.height;oa(s,s,[-l,-u]),ji(s,s,-Iw/2),oa(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var c=m(o),f=m(a.getBoundingRect()),h=m(i.getBoundingRect()),v=[a.x,a.y],d=[i.x,i.y];d[0]=v[0]=c[0][0];var p=t.labelPosOpt;if(p==null||ce(p)){var g=p==="+"?0:1;_(v,f,c,1,g),_(d,h,c,1,1-g)}else{var g=p>=0?0:1;_(v,f,c,1,g),d[1]=v[1]+p}a.setPosition(v),i.setPosition(d),a.rotation=i.rotation=t.rotation,y(a),y(i);function y(b){b.originX=c[0][0]-b.x,b.originY=c[1][0]-b.y}function m(b){return[[b.x,b.x+b.width],[b.y,b.y+b.height]]}function _(b,w,x,S,T){b[S]+=x[S][T]-w[S][T]}},e.prototype._createAxis=function(t,n){var a=n.getData(),i=n.get("axisType"),o=tse(n,i);o.getTicks=function(){return a.mapArray(["value"],function(u){return{value:u}})};var s=a.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new Joe("value",o,t.axisExtent,i);return l.model=n,l},e.prototype._createGroup=function(t){var n=this[t]=new Te;return this.group.add(n),n},e.prototype._renderAxisLine=function(t,n,a,i){var o=a.getExtent();if(!!i.get(["lineStyle","show"])){var s=new tr({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:Q({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});n.add(s);var l=this._progressLine=new tr({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:me({lineCap:"round",lineWidth:s.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});n.add(l)}},e.prototype._renderAxisTick=function(t,n,a,i){var o=this,s=i.getData(),l=a.scale.getTicks();this._tickSymbols=[],L(l,function(u){var c=a.dataToCoord(u.value),f=s.getItemModel(u.value),h=f.getModel("itemStyle"),v=f.getModel(["emphasis","itemStyle"]),d=f.getModel(["progress","itemStyle"]),p={x:c,y:0,onclick:fe(o._changeTimeline,o,u.value)},g=z5(f,h,n,p);g.ensureState("emphasis").style=v.getItemStyle(),g.ensureState("progress").style=d.getItemStyle(),no(g);var y=Me(g);f.get("tooltip")?(y.dataIndex=u.value,y.dataModel=i):y.dataIndex=y.dataModel=null,o._tickSymbols.push(g)})},e.prototype._renderAxisLabel=function(t,n,a,i){var o=this,s=a.getLabelModel();if(!!s.get("show")){var l=i.getData(),u=a.getViewLabels();this._tickLabels=[],L(u,function(c){var f=c.tickValue,h=l.getItemModel(f),v=h.getModel("label"),d=h.getModel(["emphasis","label"]),p=h.getModel(["progress","label"]),g=a.dataToCoord(c.tickValue),y=new We({x:g,y:0,rotation:t.labelRotation-t.rotation,onclick:fe(o._changeTimeline,o,f),silent:!1,style:gt(v,{text:c.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});y.ensureState("emphasis").style=gt(d),y.ensureState("progress").style=gt(p),n.add(y),no(y),B5(y).dataIndex=f,o._tickLabels.push(y)})}},e.prototype._renderControl=function(t,n,a,i){var o=t.controlSize,s=t.rotation,l=i.getModel("controlStyle").getItemStyle(),u=i.getModel(["emphasis","controlStyle"]).getItemStyle(),c=i.getPlayState(),f=i.get("inverse",!0);h(t.nextBtnPosition,"next",fe(this._changeTimeline,this,f?"-":"+")),h(t.prevBtnPosition,"prev",fe(this._changeTimeline,this,f?"+":"-")),h(t.playPosition,c?"stop":"play",fe(this._handlePlayClick,this,!c),!0);function h(v,d,p,g){if(!!v){var y=ca(Ee(i.get(["controlStyle",d+"BtnSize"]),o),o),m=[0,-y/2,y,y],_=nse(i,d+"Icon",m,{x:v[0],y:v[1],originX:o/2,originY:0,rotation:g?-s:0,rectHover:!0,style:l,onclick:p});_.ensureState("emphasis").style=u,n.add(_),no(_)}}},e.prototype._renderCurrentPointer=function(t,n,a,i){var o=i.getData(),s=i.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,c={onCreate:function(f){f.draggable=!0,f.drift=fe(u._handlePointerDrag,u),f.ondragend=fe(u._handlePointerDragend,u),F5(f,u._progressLine,s,a,i,!0)},onUpdate:function(f){F5(f,u._progressLine,s,a,i)}};this._currentPointer=z5(l,l,this._mainGroup,{},this._currentPointer,c)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,n,a){this._clearTimer(),this._pointerChangeTimeline([a.offsetX,a.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,n){var a=this._toAxisCoord(t)[0],i=this._axis,o=_n(i.getExtent().slice());a>o[1]&&(a=o[1]),a<o[0]&&(a=o[0]),this._currentPointer.x=a,this._currentPointer.markRedraw();var s=this._progressLine;s&&(s.shape.x2=a,s.dirty());var l=this._findNearestTick(a),u=this.model;(n||l!==u.getCurrentIndex()&&u.get("realtime"))&&this._changeTimeline(l)},e.prototype._doPlayStop=function(){var t=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(function(){var n=t.model;t._changeTimeline(n.getCurrentIndex()+(n.get("rewind",!0)?-1:1))},this.model.get("playInterval")))},e.prototype._toAxisCoord=function(t){var n=this._mainGroup.getLocalTransform();return pa(t,n,!0)},e.prototype._findNearestTick=function(t){var n=this.model.getData(),a=1/0,i,o=this._axis;return n.each(["value"],function(s,l){var u=o.dataToCoord(s),c=Math.abs(u-t);c<a&&(a=c,i=l)}),i},e.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},e.prototype._changeTimeline=function(t){var n=this.model.getCurrentIndex();t==="+"?t=n+1:t==="-"&&(t=n-1),this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})},e.prototype._updateTicksStatus=function(){var t=this.model.getCurrentIndex(),n=this._tickSymbols,a=this._tickLabels;if(n)for(var i=0;i<n.length;i++)n&&n[i]&&n[i].toggleState("progress",i<t);if(a)for(var i=0;i<a.length;i++)a&&a[i]&&a[i].toggleState("progress",B5(a[i]).dataIndex<=t)},e.type="timeline.slider",e}(Qoe);function tse(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new $1({ordinalMeta:r.getCategories(),extent:[1/0,-1/0]});case"time":return new sP({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new go}}function rse(r,e){return Ht(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},r.get("padding"))}function nse(r,e,t,n){var a=n.style,i=jl(r.get(["controlStyle",e]),n||{},new Re(t[0],t[1],t[2],t[3]));return a&&i.setStyle(a),i}function z5(r,e,t,n,a,i){var o=e.get("color");if(a)a.setColor(o),t.add(a),i&&i.onUpdate(a);else{var s=r.get("symbol");a=kt(s,-1,-1,2,2,o),a.setStyle("strokeNoScale",!0),t.add(a),i&&i.onCreate(a)}var l=e.getItemStyle(["color"]);a.setStyle(l),n=Pe({rectHover:!0,z2:100},n,!0);var u=wf(r.get("symbolSize"));n.scaleX=u[0]/2,n.scaleY=u[1]/2;var c=lu(r.get("symbolOffset"),u);c&&(n.x=(n.x||0)+c[0],n.y=(n.y||0)+c[1]);var f=r.get("symbolRotate");return n.rotation=(f||0)*Math.PI/180||0,a.attr(n),a.updateTransform(),a}function F5(r,e,t,n,a,i){if(!r.dragging){var o=a.getModel("checkpointStyle"),s=n.dataToCoord(a.getData().get("value",t));if(i||!o.get("animation",!0))r.attr({x:s,y:0}),e&&e.attr({shape:{x2:s}});else{var l={duration:o.get("animationDuration",!0),easing:o.get("animationEasing",!0)};r.stopAnimation(null,!0),r.animateTo({x:s,y:0},l),e&&e.animateTo({shape:{x2:s}},l)}}}var ase=ese;function ise(r){r.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(e,t,n){var a=t.getComponent("timeline");return a&&e.currentIndex!=null&&(a.setCurrentIndex(e.currentIndex),!a.get("loop",!0)&&a.isIndexMax()&&a.getPlayState()&&(a.setPlayState(!1),n.dispatchAction({type:"timelinePlayChange",playState:!1,from:e.from}))),t.resetOption("timeline",{replaceMerge:a.get("replaceMerge",!0)}),me({currentIndex:a.option.currentIndex},e)}),r.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(e,t){var n=t.getComponent("timeline");n&&e.playState!=null&&n.setPlayState(e.playState)})}function ose(r){var e=r&&r.timeline;K(e)||(e=e?[e]:[]),L(e,function(t){!t||sse(t)})}function sse(r){var e=r.type,t={number:"value",time:"time"};if(t[e]&&(r.axisType=t[e],delete r.type),V5(r),el(r,"controlPosition")){var n=r.controlStyle||(r.controlStyle={});el(n,"position")||(n.position=r.controlPosition),n.position==="none"&&!el(n,"show")&&(n.show=!1,delete n.position),delete r.controlPosition}L(r.data||[],function(a){_e(a)&&!K(a)&&(!el(a,"value")&&el(a,"name")&&(a.value=a.name),V5(a))})}function V5(r){var e=r.itemStyle||(r.itemStyle={}),t=e.emphasis||(e.emphasis={}),n=r.label||r.label||{},a=n.normal||(n.normal={}),i={normal:1,emphasis:1};L(n,function(o,s){!i[s]&&!el(a,s)&&(a[s]=o)}),t.label&&!el(n,"emphasis")&&(n.emphasis=t.label,delete t.label)}function el(r,e){return r.hasOwnProperty(e)}function lse(r){r.registerComponentModel(Zoe),r.registerComponentView(ase),r.registerSubTypeDefaulter("timeline",function(){return"slider"}),ise(r),r.registerPreprocessor(ose)}function Pw(r,e){if(!r)return!1;for(var t=K(r)?r:[r],n=0;n<t.length;n++)if(t[n]&&t[n][e])return!0;return!1}function mg(r){rs(r,"label",["show"])}var _g=Ye(),$5=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.createdBySelf=!1,t}return e.prototype.init=function(t,n,a){this.mergeDefaultAndTheme(t,a),this._mergeOption(t,a,!1,!0)},e.prototype.isAnimationEnabled=function(){if(Ue.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},e.prototype.mergeOption=function(t,n){this._mergeOption(t,n,!1,!1)},e.prototype._mergeOption=function(t,n,a,i){var o=this.mainType;a||n.eachSeries(function(s){var l=s.get(this.mainType,!0),u=_g(s)[o];if(!l||!l.data){_g(s)[o]=null;return}u?u._mergeOption(l,n,!0):(i&&mg(l),L(l.data,function(c){c instanceof Array?(mg(c[0]),mg(c[1])):mg(c)}),u=this.createMarkerModelFromSeries(l,this,n),Q(u,{mainType:this.mainType,seriesIndex:s.seriesIndex,name:s.name,createdBySelf:!0}),u.__hostSeries=s),_g(s)[o]=u},this)},e.prototype.formatTooltip=function(t,n,a){var i=this.getData(),o=this.getRawValue(t),s=i.getName(t);return nr("section",{header:this.name,blocks:[nr("nameValue",{name:s,value:o,noName:!s,noValue:o==null})]})},e.prototype.getData=function(){return this._data},e.prototype.setData=function(t){this._data=t},e.getMarkerModelFromSeries=function(t,n){return _g(t)[n]},e.type="marker",e.dependencies=["series","grid","polar","geo"],e}($e);Et($5,K_.prototype);var Mo=$5,use=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,n,a){return new e(t,n,a)},e.type="markPoint",e.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},e}(Mo),cse=use;function Ew(r){return!(isNaN(parseFloat(r.x))&&isNaN(parseFloat(r.y)))}function fse(r){return!isNaN(parseFloat(r.x))&&!isNaN(parseFloat(r.y))}function bg(r,e,t,n,a,i){var o=[],s=gi(e,n),l=s?e.getCalculationInfo("stackResultDimension"):n,u=Rw(e,l,r),c=e.indicesOfNearest(l,u)[0];o[a]=e.get(t,c),o[i]=e.get(l,c);var f=e.get(n,c),h=fa(e.get(n,c));return h=Math.min(h,20),h>=0&&(o[i]=+o[i].toFixed(h)),[o,f]}var Ow={min:Ae(bg,"min"),max:Ae(bg,"max"),average:Ae(bg,"average"),median:Ae(bg,"median")};function vh(r,e){if(!!e){var t=r.getData(),n=r.coordinateSystem,a=n.dimensions;if(!fse(e)&&!K(e.coord)&&n){var i=H5(e,t,n,r);if(e=we(e),e.type&&Ow[e.type]&&i.baseAxis&&i.valueAxis){var o=Ne(a,i.baseAxis.dim),s=Ne(a,i.valueAxis.dim),l=Ow[e.type](t,i.baseDataDim,i.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else e.coord=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis]}if(e.coord==null)e.coord=[];else for(var u=e.coord,c=0;c<2;c++)Ow[u[c]]&&(u[c]=Rw(t,t.mapDimension(a[c]),u[c]));return e}}function H5(r,e,t,n){var a={};return r.valueIndex!=null||r.valueDim!=null?(a.valueDataDim=r.valueIndex!=null?e.getDimension(r.valueIndex):r.valueDim,a.valueAxis=t.getAxis(hse(n,a.valueDataDim)),a.baseAxis=t.getOtherAxis(a.valueAxis),a.baseDataDim=e.mapDimension(a.baseAxis.dim)):(a.baseAxis=n.getBaseAxis(),a.valueAxis=t.getOtherAxis(a.baseAxis),a.baseDataDim=e.mapDimension(a.baseAxis.dim),a.valueDataDim=e.mapDimension(a.valueAxis.dim)),a}function hse(r,e){var t=r.getData().getDimensionInfo(e);return t&&t.coordDim}function dh(r,e){return r&&r.containData&&e.coord&&!Ew(e)?r.containData(e.coord):!0}function vse(r,e,t){return r&&r.containZone&&e.coord&&t.coord&&!Ew(e)&&!Ew(t)?r.containZone(e.coord,t.coord):!0}function G5(r,e){return r?function(t,n,a,i){var o=i<2?t.coord&&t.coord[i]:t.value;return co(o,e[i])}:function(t,n,a,i){return co(t.value,e[i])}}function Rw(r,e,t){if(t==="average"){var n=0,a=0;return r.each(e,function(i,o){isNaN(i)||(n+=i,a++)}),n/a}else return t==="median"?r.getMedian(e):r.getDataExtent(e)[t==="max"?1:0]}var Nw=Ye(),dse=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this.markerGroupMap=ge()},e.prototype.render=function(t,n,a){var i=this,o=this.markerGroupMap;o.each(function(s){Nw(s).keep=!1}),n.eachSeries(function(s){var l=Mo.getMarkerModelFromSeries(s,i.type);l&&i.renderSeries(s,l,n,a)}),o.each(function(s){!Nw(s).keep&&i.group.remove(s.group)})},e.prototype.markKeep=function(t){Nw(t).keep=!0},e.prototype.toggleBlurSeries=function(t,n){var a=this;L(t,function(i){var o=Mo.getMarkerModelFromSeries(i,a.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(n?oM(l):i_(l))})}})},e.type="marker",e}(wt),kw=dse;function W5(r,e,t){var n=e.coordinateSystem;r.each(function(a){var i=r.getItemModel(a),o,s=le(i.get("x"),t.getWidth()),l=le(i.get("y"),t.getHeight());if(!isNaN(s)&&!isNaN(l))o=[s,l];else if(e.getMarkerPosition)o=e.getMarkerPosition(r.getValues(r.dimensions,a));else if(n){var u=r.get(n.dimensions[0],a),c=r.get(n.dimensions[1],a);o=n.dataToPoint([u,c])}isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),r.setItemLayout(a,o)})}var pse=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,n,a){n.eachSeries(function(i){var o=Mo.getMarkerModelFromSeries(i,"markPoint");o&&(W5(o.getData(),i,a),this.markerGroupMap.get(i.id).updateLayout())},this)},e.prototype.renderSeries=function(t,n,a,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new $f),f=gse(o,t,n);n.setData(f),W5(n.getData(),t,i),f.each(function(h){var v=f.getItemModel(h),d=v.getShallow("symbol"),p=v.getShallow("symbolSize"),g=v.getShallow("symbolRotate"),y=v.getShallow("symbolOffset"),m=v.getShallow("symbolKeepAspect");if(ye(d)||ye(p)||ye(g)||ye(y)){var _=n.getRawValue(h),b=n.getDataParams(h);ye(d)&&(d=d(_,b)),ye(p)&&(p=p(_,b)),ye(g)&&(g=g(_,b)),ye(y)&&(y=y(_,b))}var w=v.getModel("itemStyle").getItemStyle(),x=xf(l,"color");w.fill||(w.fill=x),f.setItemVisual(h,{symbol:d,symbolSize:p,symbolRotate:g,symbolOffset:y,symbolKeepAspect:m,style:w})}),c.updateData(f),this.group.add(c.group),f.eachItemGraphicEl(function(h){h.traverse(function(v){Me(v).dataModel=n})}),this.markKeep(c),c.group.silent=n.get("silent")||t.get("silent")},e.type="markPoint",e}(kw);function gse(r,e,t){var n;r?n=J(r&&r.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return Q(Q({},l),{name:s,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var a=new Er(n,t),i=J(t.get("data"),Ae(vh,e));r&&(i=nt(i,Ae(dh,r)));var o=G5(!!r,n);return a.initData(i,null,o),a}var yse=pse;function mse(r){r.registerComponentModel(cse),r.registerComponentView(yse),r.registerPreprocessor(function(e){Pw(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var _se=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,n,a){return new e(t,n,a)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(Mo),bse=_se,xg=Ye(),xse=function(r,e,t,n){var a=r.getData(),i;if(K(n))i=n;else{var o=n.type;if(o==="min"||o==="max"||o==="average"||o==="median"||n.xAxis!=null||n.yAxis!=null){var s=void 0,l=void 0;if(n.yAxis!=null||n.xAxis!=null)s=e.getAxis(n.yAxis!=null?"y":"x"),l=Jt(n.yAxis,n.xAxis);else{var u=H5(n,a,e,r);s=u.valueAxis;var c=B1(a,u.valueDataDim);l=Rw(a,c,o)}var f=s.dim==="x"?0:1,h=1-f,v=we(n),d={coord:[]};v.type=null,v.coord=[],v.coord[h]=-1/0,d.coord[h]=1/0;var p=t.get("precision");p>=0&&je(l)&&(l=+l.toFixed(Math.min(p,20))),v.coord[f]=d.coord[f]=l,i=[v,d,{type:o,valueIndex:n.valueIndex,value:l}]}else i=[]}var g=[vh(r,i[0]),vh(r,i[1]),Q({},i[2])];return g[2].type=g[2].type||null,Pe(g[2],g[0]),Pe(g[2],g[1]),g};function wg(r){return!isNaN(r)&&!isFinite(r)}function U5(r,e,t,n){var a=1-r,i=n.dimensions[r];return wg(e[a])&&wg(t[a])&&e[r]===t[r]&&n.getAxis(i).containData(e[r])}function wse(r,e){if(r.type==="cartesian2d"){var t=e[0].coord,n=e[1].coord;if(t&&n&&(U5(1,t,n,r)||U5(0,t,n,r)))return!0}return dh(r,e[0])&&dh(r,e[1])}function Bw(r,e,t,n,a){var i=n.coordinateSystem,o=r.getItemModel(e),s,l=le(o.get("x"),a.getWidth()),u=le(o.get("y"),a.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition)s=n.getMarkerPosition(r.getValues(r.dimensions,e));else{var c=i.dimensions,f=r.get(c[0],e),h=r.get(c[1],e);s=i.dataToPoint([f,h])}if($s(i,"cartesian2d")){var v=i.getAxis("x"),d=i.getAxis("y"),c=i.dimensions;wg(r.get(c[0],e))?s[0]=v.toGlobalCoord(v.getExtent()[t?0:1]):wg(r.get(c[1],e))&&(s[1]=d.toGlobalCoord(d.getExtent()[t?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}r.setItemLayout(e,s)}var Sse=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,n,a){n.eachSeries(function(i){var o=Mo.getMarkerModelFromSeries(i,"markLine");if(o){var s=o.getData(),l=xg(o).from,u=xg(o).to;l.each(function(c){Bw(l,c,!0,i,a),Bw(u,c,!1,i,a)}),s.each(function(c){s.setItemLayout(c,[l.getItemLayout(c),u.getItemLayout(c)])}),this.markerGroupMap.get(i.id).updateLayout()}},this)},e.prototype.renderSeries=function(t,n,a,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new cx);this.group.add(c.group);var f=Cse(o,t,n),h=f.from,v=f.to,d=f.line;xg(n).from=h,xg(n).to=v,n.setData(d);var p=n.get("symbol"),g=n.get("symbolSize"),y=n.get("symbolRotate"),m=n.get("symbolOffset");K(p)||(p=[p,p]),K(g)||(g=[g,g]),K(y)||(y=[y,y]),K(m)||(m=[m,m]),f.from.each(function(b){_(h,b,!0),_(v,b,!1)}),d.each(function(b){var w=d.getItemModel(b).getModel("lineStyle").getLineStyle();d.setItemLayout(b,[h.getItemLayout(b),v.getItemLayout(b)]),w.stroke==null&&(w.stroke=h.getItemVisual(b,"style").fill),d.setItemVisual(b,{fromSymbolKeepAspect:h.getItemVisual(b,"symbolKeepAspect"),fromSymbolOffset:h.getItemVisual(b,"symbolOffset"),fromSymbolRotate:h.getItemVisual(b,"symbolRotate"),fromSymbolSize:h.getItemVisual(b,"symbolSize"),fromSymbol:h.getItemVisual(b,"symbol"),toSymbolKeepAspect:v.getItemVisual(b,"symbolKeepAspect"),toSymbolOffset:v.getItemVisual(b,"symbolOffset"),toSymbolRotate:v.getItemVisual(b,"symbolRotate"),toSymbolSize:v.getItemVisual(b,"symbolSize"),toSymbol:v.getItemVisual(b,"symbol"),style:w})}),c.updateData(d),f.line.eachItemGraphicEl(function(b){Me(b).dataModel=n,b.traverse(function(w){Me(w).dataModel=n})});function _(b,w,x){var S=b.getItemModel(w);Bw(b,w,x,t,i);var T=S.getModel("itemStyle").getItemStyle();T.fill==null&&(T.fill=xf(l,"color")),b.setItemVisual(w,{symbolKeepAspect:S.get("symbolKeepAspect"),symbolOffset:Ee(S.get("symbolOffset",!0),m[x?0:1]),symbolRotate:Ee(S.get("symbolRotate",!0),y[x?0:1]),symbolSize:Ee(S.get("symbolSize"),g[x?0:1]),symbol:Ee(S.get("symbol",!0),p[x?0:1]),style:T})}this.markKeep(c),c.group.silent=n.get("silent")||t.get("silent")},e.type="markLine",e}(kw);function Cse(r,e,t){var n;r?n=J(r&&r.dimensions,function(u){var c=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return Q(Q({},c),{name:u,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var a=new Er(n,t),i=new Er(n,t),o=new Er([],t),s=J(t.get("data"),Ae(xse,e,r,t));r&&(s=nt(s,Ae(wse,r)));var l=G5(!!r,n);return a.initData(J(s,function(u){return u[0]}),null,l),i.initData(J(s,function(u){return u[1]}),null,l),o.initData(J(s,function(u){return u[2]})),o.hasItemOption=!0,{from:a,to:i,line:o}}var Tse=Sse;function Dse(r){r.registerComponentModel(bse),r.registerComponentView(Tse),r.registerPreprocessor(function(e){Pw(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var Mse=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,n,a){return new e(t,n,a)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(Mo),Ase=Mse,Sg=Ye(),Lse=function(r,e,t,n){var a=n[0],i=n[1];if(!(!a||!i)){var o=vh(r,a),s=vh(r,i),l=o.coord,u=s.coord;l[0]=Jt(l[0],-1/0),l[1]=Jt(l[1],-1/0),u[0]=Jt(u[0],1/0),u[1]=Jt(u[1],1/0);var c=Tv([{},o,s]);return c.coord=[o.coord,s.coord],c.x0=o.x,c.y0=o.y,c.x1=s.x,c.y1=s.y,c}};function Cg(r){return!isNaN(r)&&!isFinite(r)}function j5(r,e,t,n){var a=1-r;return Cg(e[a])&&Cg(t[a])}function Ise(r,e){var t=e.coord[0],n=e.coord[1],a={coord:t,x:e.x0,y:e.y0},i={coord:n,x:e.x1,y:e.y1};return $s(r,"cartesian2d")?t&&n&&(j5(1,t,n)||j5(0,t,n))?!0:vse(r,a,i):dh(r,a)||dh(r,i)}function Y5(r,e,t,n,a){var i=n.coordinateSystem,o=r.getItemModel(e),s,l=le(o.get(t[0]),a.getWidth()),u=le(o.get(t[1]),a.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition){var c=r.getValues(["x0","y0"],e),f=r.getValues(["x1","y1"],e),h=i.clampData(c),v=i.clampData(f),d=[];t[0]==="x0"?d[0]=h[0]>v[0]?f[0]:c[0]:d[0]=h[0]>v[0]?c[0]:f[0],t[1]==="y0"?d[1]=h[1]>v[1]?f[1]:c[1]:d[1]=h[1]>v[1]?c[1]:f[1],s=n.getMarkerPosition(d,t,!0)}else{var p=r.get(t[0],e),g=r.get(t[1],e),y=[p,g];i.clampData&&i.clampData(y,y),s=i.dataToPoint(y,!0)}if($s(i,"cartesian2d")){var m=i.getAxis("x"),_=i.getAxis("y"),p=r.get(t[0],e),g=r.get(t[1],e);Cg(p)?s[0]=m.toGlobalCoord(m.getExtent()[t[0]==="x0"?0:1]):Cg(g)&&(s[1]=_.toGlobalCoord(_.getExtent()[t[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var q5=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],Pse=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,n,a){n.eachSeries(function(i){var o=Mo.getMarkerModelFromSeries(i,"markArea");if(o){var s=o.getData();s.each(function(l){var u=J(q5,function(f){return Y5(s,l,f,i,a)});s.setItemLayout(l,u);var c=s.getItemGraphicEl(l);c.setShape("points",u)})}},this)},e.prototype.renderSeries=function(t,n,a,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,{group:new Te});this.group.add(c.group),this.markKeep(c);var f=Ese(o,t,n);n.setData(f),f.each(function(h){var v=J(q5,function(T){return Y5(f,h,T,t,i)}),d=o.getAxis("x").scale,p=o.getAxis("y").scale,g=d.getExtent(),y=p.getExtent(),m=[d.parse(f.get("x0",h)),d.parse(f.get("x1",h))],_=[p.parse(f.get("y0",h)),p.parse(f.get("y1",h))];_n(m),_n(_);var b=!(g[0]>m[1]||g[1]<m[0]||y[0]>_[1]||y[1]<_[0]),w=!b;f.setItemLayout(h,{points:v,allClipped:w});var x=f.getItemModel(h).getModel("itemStyle").getItemStyle(),S=xf(l,"color");x.fill||(x.fill=S,ce(x.fill)&&(x.fill=Ac(x.fill,.4))),x.stroke||(x.stroke=S),f.setItemVisual(h,"style",x)}),f.diff(Sg(c).data).add(function(h){var v=f.getItemLayout(h);if(!v.allClipped){var d=new Gr({shape:{points:v.points}});f.setItemGraphicEl(h,d),c.group.add(d)}}).update(function(h,v){var d=Sg(c).data.getItemGraphicEl(v),p=f.getItemLayout(h);p.allClipped?d&&c.group.remove(d):(d?qe(d,{shape:{points:p.points}},n,h):d=new Gr({shape:{points:p.points}}),f.setItemGraphicEl(h,d),c.group.add(d))}).remove(function(h){var v=Sg(c).data.getItemGraphicEl(h);c.group.remove(v)}).execute(),f.eachItemGraphicEl(function(h,v){var d=f.getItemModel(v),p=f.getItemVisual(v,"style");h.useStyle(f.getItemVisual(v,"style")),yr(h,rr(d),{labelFetcher:n,labelDataIndex:v,defaultText:f.getName(v)||"",inheritColor:ce(p.fill)?Ac(p.fill,1):"#000"}),gr(h,d),Lt(h,null,null,d.get(["emphasis","disabled"])),Me(h).dataModel=n}),Sg(c).data=f,c.group.silent=n.get("silent")||t.get("silent")},e.type="markArea",e}(kw);function Ese(r,e,t){var n,a,i=["x0","y0","x1","y1"];if(r){var o=J(r&&r.dimensions,function(u){var c=e.getData(),f=c.getDimensionInfo(c.mapDimension(u))||{};return Q(Q({},f),{name:u,ordinalMeta:null})});a=J(i,function(u,c){return{name:u,type:o[c%2].type}}),n=new Er(a,t)}else a=[{name:"value",type:"float"}],n=new Er(a,t);var s=J(t.get("data"),Ae(Lse,e,r,t));r&&(s=nt(s,Ae(Ise,r)));var l=r?function(u,c,f,h){var v=u.coord[Math.floor(h/2)][h%2];return co(v,a[h])}:function(u,c,f,h){return co(u.value,a[h])};return n.initData(s,null,l),n.hasItemOption=!0,n}var Ose=Pse;function Rse(r){r.registerComponentModel(Ase),r.registerComponentView(Ose),r.registerPreprocessor(function(e){Pw(e.series,"markArea")&&(e.markArea=e.markArea||{})})}var Nse=function(r,e){if(e==="all")return{type:"all",title:r.getLocaleModel().get(["legend","selector","all"])};if(e==="inverse")return{type:"inverse",title:r.getLocaleModel().get(["legend","selector","inverse"])}},kse=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.prototype.init=function(t,n,a){this.mergeDefaultAndTheme(t,a),t.selected=t.selected||{},this._updateSelector(t)},e.prototype.mergeOption=function(t,n){r.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},e.prototype._updateSelector=function(t){var n=t.selector,a=this.ecModel;n===!0&&(n=t.selector=["all","inverse"]),K(n)&&L(n,function(i,o){ce(i)&&(i={type:i}),n[o]=Pe(i,Nse(a,i.type))})},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&this.get("selectedMode")==="single"){for(var n=!1,a=0;a<t.length;a++){var i=t[a].get("name");if(this.isSelected(i)){this.select(i),n=!0;break}}!n&&this.select(t[0].get("name"))}},e.prototype._updateData=function(t){var n=[],a=[];t.eachRawSeries(function(l){var u=l.name;a.push(u);var c;if(l.legendVisualProvider){var f=l.legendVisualProvider,h=f.getAllNames();t.isSeriesFiltered(l)||(a=a.concat(h)),h.length?n=n.concat(h):c=!0}else c=!0;c&&R0(l)&&n.push(l.name)}),this._availableNames=a;var i=this.get("data")||n,o=ge(),s=J(i,function(l){return(ce(l)||je(l))&&(l={name:l}),o.get(l.name)?null:(o.set(l.name,!0),new lt(l,this,this.ecModel))},this);this._data=nt(s,function(l){return!!l})},e.prototype.getData=function(){return this._data},e.prototype.select=function(t){var n=this.option.selected,a=this.get("selectedMode");if(a==="single"){var i=this._data;L(i,function(o){n[o.get("name")]=!1})}n[t]=!0},e.prototype.unSelect=function(t){this.get("selectedMode")!=="single"&&(this.option.selected[t]=!1)},e.prototype.toggleSelected=function(t){var n=this.option.selected;n.hasOwnProperty(t)||(n[t]=!0),this[n[t]?"unSelect":"select"](t)},e.prototype.allSelect=function(){var t=this._data,n=this.option.selected;L(t,function(a){n[a.get("name",!0)]=!0})},e.prototype.inverseSelect=function(){var t=this._data,n=this.option.selected;L(t,function(a){var i=a.get("name",!0);n.hasOwnProperty(i)||(n[i]=!0),n[i]=!n[i]})},e.prototype.isSelected=function(t){var n=this.option.selected;return!(n.hasOwnProperty(t)&&!n[t])&&Ne(this._availableNames,t)>=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",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:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e}($e),zw=kse,Pu=Ae,Fw=L,Tg=Te,Bse=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!1,t}return e.prototype.init=function(){this.group.add(this._contentGroup=new Tg),this.group.add(this._selectorGroup=new Tg),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,n,a){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!t.get("show",!0)){var o=t.get("align"),s=t.get("orient");(!o||o==="auto")&&(o=t.get("left")==="right"&&s==="vertical"?"right":"left");var l=t.get("selector",!0),u=t.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,t,n,a,l,s,u);var c=t.getBoxLayoutParams(),f={width:a.getWidth(),height:a.getHeight()},h=t.get("padding"),v=Ht(c,f,h),d=this.layoutInner(t,o,v,i,l,u),p=Ht(me({width:d.width,height:d.height},c),f,h);this.group.x=p.x-d.x,this.group.y=p.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=n5(d,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,n,a,i,o,s,l){var u=this.getContentGroup(),c=ge(),f=n.get("selectedMode"),h=[];a.eachRawSeries(function(v){!v.get("legendHoverLink")&&h.push(v.id)}),Fw(n.getData(),function(v,d){var p=v.get("name");if(!this.newlineDisabled&&(p===""||p===`
242
242
  `)){var g=new Tg;g.newline=!0,u.add(g);return}var y=a.getSeriesByName(p)[0];if(!c.get(p))if(y){var m=y.getData(),_=m.getVisual("legendLineStyle")||{},b=m.getVisual("legendIcon"),w=m.getVisual("style"),x=this._createItem(y,p,d,v,n,t,_,w,b,f,i);x.on("click",Pu(Z5,p,null,i,h)).on("mouseover",Pu(Vw,y.name,null,i,h)).on("mouseout",Pu($w,y.name,null,i,h)),c.set(p,!0)}else a.eachRawSeries(function(S){if(!c.get(p)&&S.legendVisualProvider){var T=S.legendVisualProvider;if(!T.containName(p))return;var D=T.indexOfName(p),M=T.getItemVisual(D,"style"),A=T.getItemVisual(D,"legendIcon"),I=Fr(M.fill);I&&I[3]===0&&(I[3]=.2,M=Q(Q({},M),{fill:la(I,"rgba")}));var P=this._createItem(S,p,d,v,n,t,{},M,A,f,i);P.on("click",Pu(Z5,null,p,i,h)).on("mouseover",Pu(Vw,null,p,i,h)).on("mouseout",Pu($w,null,p,i,h)),c.set(p,!0)}},this)},this),o&&this._createSelector(o,n,i,s,l)},e.prototype._createSelector=function(t,n,a,i,o){var s=this.getSelectorGroup();Fw(t,function(u){var c=u.type,f=new We({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){a.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect"})}});s.add(f);var h=n.getModel("selectorLabel"),v=n.getModel(["emphasis","selectorLabel"]);yr(f,{normal:h,emphasis:v},{defaultText:u.title}),no(f)})},e.prototype._createItem=function(t,n,a,i,o,s,l,u,c,f,h){var v=t.visualDrawType,d=o.get("itemWidth"),p=o.get("itemHeight"),g=o.isSelected(n),y=i.get("symbolRotate"),m=i.get("symbolKeepAspect"),_=i.get("icon");c=_||c||"roundRect";var b=zse(c,i,l,u,v,g,h),w=new Tg,x=i.getModel("textStyle");if(ye(t.getLegendIcon)&&(!_||_==="inherit"))w.add(t.getLegendIcon({itemWidth:d,itemHeight:p,icon:c,iconRotate:y,itemStyle:b.itemStyle,lineStyle:b.lineStyle,symbolKeepAspect:m}));else{var S=_==="inherit"&&t.getData().getVisual("symbol")?y==="inherit"?t.getData().getVisual("symbolRotate"):y:0;w.add(Fse({itemWidth:d,itemHeight:p,icon:c,iconRotate:S,itemStyle:b.itemStyle,lineStyle:b.lineStyle,symbolKeepAspect:m}))}var T=s==="left"?d+5:-5,D=s,M=o.get("formatter"),A=n;ce(M)&&M?A=M.replace("{name}",n!=null?n:""):ye(M)&&(A=M(n));var I=i.get("inactiveColor");w.add(new We({style:gt(x,{text:A,x:T,y:p/2,fill:g?x.getTextColor():I,align:D,verticalAlign:"middle"})}));var P=new Ge({shape:w.getBoundingRect(),invisible:!0}),E=i.getModel("tooltip");return E.get("show")&&Yl({el:P,componentModel:o,itemName:n,itemTooltipOption:E.option}),w.add(P),w.eachChild(function(O){O.silent=!0}),P.silent=!f,this.getContentGroup().add(w),no(w),w.__legendDataIndex=a,w},e.prototype.layoutInner=function(t,n,a,i,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();Cs(t.get("orient"),l,t.get("itemGap"),a.width,a.height);var c=l.getBoundingRect(),f=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),o){Cs("horizontal",u,t.get("selectorItemGap",!0));var h=u.getBoundingRect(),v=[-h.x,-h.y],d=t.get("selectorButtonGap",!0),p=t.getOrient().index,g=p===0?"width":"height",y=p===0?"height":"width",m=p===0?"y":"x";s==="end"?v[p]+=c[g]+d:f[p]+=h[g]+d,v[1-p]+=c[y]/2-h[y]/2,u.x=v[0],u.y=v[1],l.x=f[0],l.y=f[1];var _={x:0,y:0};return _[g]=c[g]+d+h[g],_[y]=Math.max(c[y],h[y]),_[m]=Math.min(0,h[m]+v[1-p]),_}else return l.x=f[0],l.y=f[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(wt);function zse(r,e,t,n,a,i,o){function s(g,y){g.lineWidth==="auto"&&(g.lineWidth=y.lineWidth>0?2:0),Fw(g,function(m,_){g[_]==="inherit"&&(g[_]=y[_])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),c=r.lastIndexOf("empty",0)===0?"fill":"stroke",f=l.getShallow("decal");u.decal=!f||f==="inherit"?n.decal:cu(f,o),u.fill==="inherit"&&(u.fill=n[a]),u.stroke==="inherit"&&(u.stroke=n[c]),u.opacity==="inherit"&&(u.opacity=(a==="fill"?n:t).opacity),s(u,n);var h=e.getModel("lineStyle"),v=h.getLineStyle();if(s(v,t),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),v.stroke==="auto"&&(v.stroke=n.fill),!i){var d=e.get("inactiveBorderWidth"),p=u[c];u.lineWidth=d==="auto"?n.lineWidth>0&&p?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),v.stroke=h.get("inactiveColor"),v.lineWidth=h.get("inactiveWidth")}return{itemStyle:u,lineStyle:v}}function Fse(r){var e=r.icon||"roundRect",t=kt(e,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return t.setStyle(r.itemStyle),t.rotation=(r.iconRotate||0)*Math.PI/180,t.setOrigin([r.itemWidth/2,r.itemHeight/2]),e.indexOf("empty")>-1&&(t.style.stroke=t.style.fill,t.style.fill="#fff",t.style.lineWidth=2),t}function Z5(r,e,t,n){$w(r,e,t,n),t.dispatchAction({type:"legendToggleSelect",name:r!=null?r:e}),Vw(r,e,t,n)}function X5(r){for(var e=r.getZr().storage.getDisplayList(),t,n=0,a=e.length;n<a&&!(t=e[n].states.emphasis);)n++;return t&&t.hoverLayer}function Vw(r,e,t,n){X5(t)||t.dispatchAction({type:"highlight",seriesName:r,name:e,excludeSeriesId:n})}function $w(r,e,t,n){X5(t)||t.dispatchAction({type:"downplay",seriesName:r,name:e,excludeSeriesId:n})}var Q5=Bse;function Vse(r){var e=r.findComponents({mainType:"legend"});e&&e.length&&r.filterSeries(function(t){for(var n=0;n<e.length;n++)if(!e[n].isSelected(t.name))return!1;return!0})}function ph(r,e,t){var n={},a=r==="toggleSelected",i;return t.eachComponent("legend",function(o){a&&i!=null?o[i?"select":"unSelect"](e.name):r==="allSelect"||r==="inverseSelect"?o[r]():(o[r](e.name),i=o.isSelected(e.name));var s=o.getData();L(s,function(l){var u=l.get("name");if(!(u===`
243
- `||u==="")){var c=o.isSelected(u);n.hasOwnProperty(u)?n[u]=n[u]&&c:n[u]=c}})}),r==="allSelect"||r==="inverseSelect"?{selected:n}:{name:e.name,selected:n}}function $se(r){r.registerAction("legendToggleSelect","legendselectchanged",Ae(ph,"toggleSelected")),r.registerAction("legendAllSelect","legendselectall",Ae(ph,"allSelect")),r.registerAction("legendInverseSelect","legendinverseselect",Ae(ph,"inverseSelect")),r.registerAction("legendSelect","legendselected",Ae(ph,"select")),r.registerAction("legendUnSelect","legendunselected",Ae(ph,"unSelect"))}function K5(r){r.registerComponentModel(zw),r.registerComponentView(Q5),r.registerProcessor(r.PRIORITY.PROCESSOR.SERIES_FILTER,Vse),r.registerSubTypeDefaulter("legend",function(){return"plain"}),$se(r)}var Hse=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.setScrollDataIndex=function(t){this.option.scrollDataIndex=t},e.prototype.init=function(t,n,a){var i=Kl(t);r.prototype.init.call(this,t,n,a),J5(this,t,i)},e.prototype.mergeOption=function(t,n){r.prototype.mergeOption.call(this,t,n),J5(this,this.option,t)},e.type="legend.scroll",e.defaultOption=so(zw.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),e}(zw);function J5(r,e,t){var n=r.getOrient(),a=[1,1];a[n.index]=0,lo(e,t,{type:"box",ignoreSize:!!a})}var Gse=Hse,eB=Te,Hw=["width","height"],Gw=["x","y"],Wse=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!0,t._currentIndex=0,t}return e.prototype.init=function(){r.prototype.init.call(this),this.group.add(this._containerGroup=new eB),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new eB)},e.prototype.resetInner=function(){r.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},e.prototype.renderInner=function(t,n,a,i,o,s,l){var u=this;r.prototype.renderInner.call(this,t,n,a,i,o,s,l);var c=this._controllerGroup,f=n.get("pageIconSize",!0),h=K(f)?f:[f,f];d("pagePrev",0);var v=n.getModel("pageTextStyle");c.add(new We({name:"pageText",style:{text:"xx/xx",fill:v.getTextColor(),font:v.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),d("pageNext",1);function d(p,g){var y=p+"DataIndex",m=jl(n.get("pageIcons",!0)[n.getOrient().name][g],{onclick:fe(u._pageGo,u,y,n,i)},{x:-h[0]/2,y:-h[1]/2,width:h[0],height:h[1]});m.name=p,c.add(m)}},e.prototype.layoutInner=function(t,n,a,i,o,s){var l=this.getSelectorGroup(),u=t.getOrient().index,c=Hw[u],f=Gw[u],h=Hw[1-u],v=Gw[1-u];o&&Cs("horizontal",l,t.get("selectorItemGap",!0));var d=t.get("selectorButtonGap",!0),p=l.getBoundingRect(),g=[-p.x,-p.y],y=we(a);o&&(y[c]=a[c]-p[c]-d);var m=this._layoutContentAndController(t,i,y,u,c,h,v,f);if(o){if(s==="end")g[u]+=m[c]+d;else{var _=p[c]+d;g[u]-=_,m[f]-=_}m[c]+=p[c]+d,g[1-u]+=m[v]+m[h]/2-p[h]/2,m[h]=Math.max(m[h],p[h]),m[v]=Math.min(m[v],p[v]+g[1-u]),l.x=g[0],l.y=g[1],l.markRedraw()}return m},e.prototype._layoutContentAndController=function(t,n,a,i,o,s,l,u){var c=this.getContentGroup(),f=this._containerGroup,h=this._controllerGroup;Cs(t.get("orient"),c,t.get("itemGap"),i?a.width:null,i?null:a.height),Cs("horizontal",h,t.get("pageButtonItemGap",!0));var v=c.getBoundingRect(),d=h.getBoundingRect(),p=this._showController=v[o]>a[o],g=[-v.x,-v.y];n||(g[i]=c[u]);var y=[0,0],m=[-d.x,-d.y],_=Ee(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(p){var b=t.get("pageButtonPosition",!0);b==="end"?m[i]+=a[o]-d[o]:y[i]+=d[o]+_}m[1-i]+=v[s]/2-d[s]/2,c.setPosition(g),f.setPosition(y),h.setPosition(m);var w={x:0,y:0};if(w[o]=p?a[o]:v[o],w[s]=Math.max(v[s],d[s]),w[l]=Math.min(0,d[l]+m[1-i]),f.__rectSize=a[o],p){var x={x:0,y:0};x[o]=Math.max(a[o]-d[o]-_,0),x[s]=w[s],f.setClipPath(new Ge({shape:x})),f.__rectSize=x[o]}else h.eachChild(function(T){T.attr({invisible:!0,silent:!0})});var S=this._getPageInfo(t);return S.pageIndex!=null&&qe(c,{x:S.contentPosition[0],y:S.contentPosition[1]},p?t:null),this._updatePageInfoView(t,S),w},e.prototype._pageGo=function(t,n,a){var i=this._getPageInfo(n)[t];i!=null&&a.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:n.id})},e.prototype._updatePageInfoView=function(t,n){var a=this._controllerGroup;L(["pagePrev","pageNext"],function(c){var f=c+"DataIndex",h=n[f]!=null,v=a.childOfName(c);v&&(v.setStyle("fill",h?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),v.cursor=h?"pointer":"default")});var i=a.childOfName("pageText"),o=t.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;i&&o&&i.setStyle("text",ce(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},e.prototype._getPageInfo=function(t){var n=t.get("scrollDataIndex",!0),a=this.getContentGroup(),i=this._containerGroup.__rectSize,o=t.getOrient().index,s=Hw[o],l=Gw[o],u=this._findTargetItemIndex(n),c=a.children(),f=c[u],h=c.length,v=h?1:0,d={contentPosition:[a.x,a.y],pageCount:v,pageIndex:v-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return d;var p=b(f);d.contentPosition[o]=-p.s;for(var g=u+1,y=p,m=p,_=null;g<=h;++g)_=b(c[g]),(!_&&m.e>y.s+i||_&&!w(_,y.s))&&(m.i>y.i?y=m:y=_,y&&(d.pageNextDataIndex==null&&(d.pageNextDataIndex=y.i),++d.pageCount)),m=_;for(var g=u-1,y=p,m=p,_=null;g>=-1;--g)_=b(c[g]),(!_||!w(m,_.s))&&y.i<m.i&&(m=y,d.pagePrevDataIndex==null&&(d.pagePrevDataIndex=y.i),++d.pageCount,++d.pageIndex),y=_;return d;function b(x){if(x){var S=x.getBoundingRect(),T=S[l]+x[l];return{s:T,e:T+S[s],i:x.__legendDataIndex}}}function w(x,S){return x.e>=S&&x.s<=S+i}},e.prototype._findTargetItemIndex=function(t){if(!this._showController)return 0;var n,a=this.getContentGroup(),i;return a.eachChild(function(o,s){var l=o.__legendDataIndex;i==null&&l!=null&&(i=s),l===t&&(n=s)}),n!=null?n:i},e.type="legend.scroll",e}(Q5),Use=Wse;function jse(r){r.registerAction("legendScroll","legendscroll",function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},function(a){a.setScrollDataIndex(n)})})}function Yse(r){ke(K5),r.registerComponentModel(Gse),r.registerComponentView(Use),jse(r)}function qse(r){ke(K5),ke(Yse)}var Zse=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.inside",e.defaultOption=so(ch.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(ch),Xse=Zse,Ww=Ye();function Qse(r,e,t){Ww(r).coordSysRecordMap.each(function(n){var a=n.dataZoomInfoMap.get(e.uid);a&&(a.getRange=t)})}function Kse(r,e){for(var t=Ww(r).coordSysRecordMap,n=t.keys(),a=0;a<n.length;a++){var i=n[a],o=t.get(i),s=o.dataZoomInfoMap;if(s){var l=e.uid,u=s.get(l);u&&(s.removeKey(l),s.keys().length||tB(t,o))}}}function tB(r,e){if(e){r.removeKey(e.model.uid);var t=e.controller;t&&t.dispose()}}function Jse(r,e){var t={model:e,containsPoint:Ae(tle,e),dispatchAction:Ae(ele,r),dataZoomInfoMap:null,controller:null},n=t.controller=new Yf(r.getZr());return L(["pan","zoom","scrollMove"],function(a){n.on(a,function(i){var o=[];t.dataZoomInfoMap.each(function(s){if(!!i.isAvailableBehavior(s.model.option)){var l=(s.getRange||{})[a],u=l&&l(s.dzReferCoordSysInfo,t.model.mainType,t.controller,i);!s.model.get("disabled",!0)&&u&&o.push({dataZoomId:s.model.id,start:u[0],end:u[1]})}}),o.length&&t.dispatchAction(o)})}),t}function ele(r,e){r.isDisposed()||r.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function tle(r,e,t,n){return r.coordinateSystem.containPoint([t,n])}function rle(r){var e,t="type_",n={type_true:2,type_move:1,type_false:0,type_undefined:-1},a=!0;return r.each(function(i){var o=i.model,s=o.get("disabled",!0)?!1:o.get("zoomLock",!0)?"move":!0;n[t+s]>n[t+e]&&(e=s),a=a&&o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!a}}}function nle(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(e,t){var n=Ww(t),a=n.coordSysRecordMap||(n.coordSysRecordMap=ge());a.each(function(i){i.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(i){var o=Qk(i);L(o.infoList,function(s){var l=s.model.uid,u=a.get(l)||a.set(l,Jse(t,s.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=ge());c.set(i.uid,{dzReferCoordSysInfo:s,model:i,getRange:null})})}),a.each(function(i){var o=i.controller,s,l=i.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){tB(a,i);return}var c=rle(l);o.enable(c.controlType,c.opt),o.setPointerChecker(i.containsPoint),ou(i,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var ale=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return e.prototype.render=function(t,n,a){if(r.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),Qse(a,t,{pan:fe(Uw.pan,this),zoom:fe(Uw.zoom,this),scrollMove:fe(Uw.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){Kse(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(yw),Uw={zoom:function(r,e,t,n){var a=this.range,i=a.slice(),o=r.axisModels[0];if(!!o){var s=jw[e](null,[n.originX,n.originY],o,t,r),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(i[1]-i[0])+i[0],u=Math.max(1/n.scale,0);i[0]=(i[0]-l)*u+l,i[1]=(i[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(Zs(0,i,[0,100],0,c.minSpan,c.maxSpan),this.range=i,a[0]!==i[0]||a[1]!==i[1])return i}},pan:rB(function(r,e,t,n,a,i){var o=jw[n]([i.oldX,i.oldY],[i.newX,i.newY],e,a,t);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:rB(function(r,e,t,n,a,i){var o=jw[n]([0,0],[i.scrollDelta,i.scrollDelta],e,a,t);return o.signal*(r[1]-r[0])*i.scrollDelta})};function rB(r){return function(e,t,n,a){var i=this.range,o=i.slice(),s=e.axisModels[0];if(!!s){var l=r(o,s,e,t,n,a);if(Zs(l,o,[0,100],"all"),this.range=o,i[0]!==o[0]||i[1]!==o[1])return o}}}var jw={grid:function(r,e,t,n,a){var i=t.axis,o={},s=a.model.coordinateSystem.getRect();return r=r||[0,0],i.dim==="x"?(o.pixel=e[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=i.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=i.inverse?-1:1),o},polar:function(r,e,t,n,a){var i=t.axis,o={},s=a.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return r=r?s.pointToCoord(r):[0,0],e=s.pointToCoord(e),t.mainType==="radiusAxis"?(o.pixel=e[0]-r[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=i.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=i.inverse?-1:1),o},singleAxis:function(r,e,t,n,a){var i=t.axis,o=a.model.coordinateSystem.getRect(),s={};return r=r||[0,0],i.orient==="horizontal"?(s.pixel=e[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=i.inverse?1:-1):(s.pixel=e[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=i.inverse?-1:1),s}},ile=ale;function nB(r){mw(r),r.registerComponentModel(Xse),r.registerComponentView(ile),nle(r)}var ole=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=so(ch.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},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:"#fff",borderColor:"#ACB8D1"},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:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(ch),sle=ole,gh=Ge,aB=7,lle=1,Yw=30,ule=7,yh="horizontal",iB="vertical",cle=5,fle=["line","bar","candlestick","scatter"],hle={easing:"cubicOut",duration:100,delay:0},vle=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._displayables={},t}return e.prototype.init=function(t,n){this.api=n,this._onBrush=fe(this._onBrush,this),this._onBrushEnd=fe(this._onBrushEnd,this)},e.prototype.render=function(t,n,a,i){if(r.prototype.render.apply(this,arguments),ou(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),t.get("show")===!1){this.group.removeAll();return}if(t.noTarget()){this._clear(),this.group.removeAll();return}(!i||i.type!=="dataZoom"||i.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){mf(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var n=this._displayables.sliderGroup=new Te;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(n),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,n=this.api,a=t.get("brushSelect"),i=a?ule:0,o=this._findCoordRect(),s={width:n.getWidth(),height:n.getHeight()},l=this._orient===yh?{right:s.width-o.x-o.width,top:s.height-Yw-aB-i,width:o.width,height:Yw}:{right:aB,top:o.y,width:Yw,height:o.height},u=Kl(t.option);L(["right","top","width","height"],function(f){u[f]==="ph"&&(u[f]=l[f])});var c=Ht(u,s);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===iB&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,n=this._location,a=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),o=i&&i.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(a===yh&&!o?{scaleY:l?1:-1,scaleX:1}:a===yh&&o?{scaleY:l?1:-1,scaleX:-1}:a===iB&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=t.getBoundingRect([s]);t.x=n.x-u.x,t.y=n.y-u.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,n=this._size,a=this._displayables.sliderGroup,i=t.get("brushSelect");a.add(new gh({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new gh({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:fe(this._onClickPanel,this)}),s=this.api.getZr();i?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),a.add(o)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!t)return;var n=this._size,a=this._shadowSize||[],i=t.series,o=i.getRawData(),s=i.getShadowDim&&i.getShadowDim(),l=s&&o.getDimensionInfo(s)?i.getShadowDim():t.otherDim;if(l==null)return;var u=this._shadowPolygonPts,c=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||n[0]!==a[0]||n[1]!==a[1]){var f=o.getDataExtent(l),h=(f[1]-f[0])*.3;f=[f[0]-h,f[1]+h];var v=[0,n[1]],d=[0,n[0]],p=[[n[0],0],[0,0]],g=[],y=d[1]/(o.count()-1),m=0,_=Math.round(o.count()/n[0]),b;o.each([l],function(D,M){if(_>0&&M%_){m+=y;return}var A=D==null||isNaN(D)||D==="",I=A?0:at(D,f,v,!0);A&&!b&&M?(p.push([p[p.length-1][0],0]),g.push([g[g.length-1][0],0])):!A&&b&&(p.push([m,0]),g.push([m,0])),p.push([m,I]),g.push([m,I]),m+=y,b=A}),u=this._shadowPolygonPts=p,c=this._shadowPolylinePts=g}this._shadowData=o,this._shadowDim=l,this._shadowSize=[n[0],n[1]];var w=this.dataZoomModel;function x(D){var M=w.getModel(D?"selectedDataBackground":"dataBackground"),A=new Te,I=new Gr({shape:{points:u},segmentIgnoreThreshold:1,style:M.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),P=new Wr({shape:{points:c},segmentIgnoreThreshold:1,style:M.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return A.add(I),A.add(P),A}for(var S=0;S<3;S++){var T=x(S===1);this._displayables.sliderGroup.add(T),this._displayables.dataShadowSegs.push(T)}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,n=t.get("showDataShadow");if(n!==!1){var a,i=this.ecModel;return t.eachTargetAxis(function(o,s){var l=t.getAxisProxy(o,s).getTargetSeriesModels();L(l,function(u){if(!a&&!(n!==!0&&Ne(fle,u.get("type"))<0)){var c=i.getComponent(To(o),s).axis,f=dle(o),h,v=u.coordinateSystem;f!=null&&v.getOtherAxis&&(h=v.getOtherAxis(c).inverse),f=u.getData().mapDimension(f),a={thisAxis:c,series:u,thisDim:o,otherDim:f,otherAxisInverse:h}}},this)},this),a}},e.prototype._renderHandle=function(){var t=this.group,n=this._displayables,a=n.handles=[null,null],i=n.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,c=l.get("borderRadius")||0,f=l.get("brushSelect"),h=n.filler=new gh({silent:f,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(h),o.add(new gh({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:c},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:lle,fill:"rgba(0,0,0,0)"}})),L([0,1],function(_){var b=l.get("handleIcon");!tp[b]&&b.indexOf("path://")<0&&b.indexOf("image://")<0&&(b="path://"+b);var w=kt(b,-1,0,2,2,null,!0);w.attr({cursor:oB(this._orient),draggable:!0,drift:fe(this._onDragMove,this,_),ondragend:fe(this._onDragEnd,this),onmouseover:fe(this._showDataInfo,this,!0),onmouseout:fe(this._showDataInfo,this,!1),z2:5});var x=w.getBoundingRect(),S=l.get("handleSize");this._handleHeight=le(S,this._size[1]),this._handleWidth=x.width/x.height*this._handleHeight,w.setStyle(l.getModel("handleStyle").getItemStyle()),w.style.strokeNoScale=!0,w.rectHover=!0,w.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),no(w);var T=l.get("handleColor");T!=null&&(w.style.fill=T),o.add(a[_]=w);var D=l.getModel("textStyle");t.add(i[_]=new We({silent:!0,invisible:!0,style:gt(D,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:D.getTextColor(),font:D.getFont()}),z2:10}))},this);var v=h;if(f){var d=le(l.get("moveHandleSize"),s[1]),p=n.moveHandle=new Ge({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:d}}),g=d*.8,y=n.moveHandleIcon=kt(l.get("moveHandleIcon"),-g/2,-g/2,g,g,"#fff",!0);y.silent=!0,y.y=s[1]+d/2-.5,p.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(s[1]/2,Math.max(d,10));v=n.moveZone=new Ge({invisible:!0,shape:{y:s[1]-m,height:d+m}}),v.on("mouseover",function(){u.enterEmphasis(p)}).on("mouseout",function(){u.leaveEmphasis(p)}),o.add(p),o.add(y),o.add(v)}v.attr({draggable:!0,cursor:oB(this._orient),drift:fe(this._onDragMove,this,"all"),ondragstart:fe(this._showDataInfo,this,!0),ondragend:fe(this._onDragEnd,this),onmouseover:fe(this._showDataInfo,this,!0),onmouseout:fe(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[at(t[0],[0,100],n,!0),at(t[1],[0,100],n,!0)]},e.prototype._updateInterval=function(t,n){var a=this.dataZoomModel,i=this._handleEnds,o=this._getViewExtent(),s=a.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];Zs(n,i,o,a.get("zoomLock")?"all":t,s.minSpan!=null?at(s.minSpan,l,o,!0):null,s.maxSpan!=null?at(s.maxSpan,l,o,!0):null);var u=this._range,c=this._range=_n([at(i[0],o,l,!0),at(i[1],o,l,!0)]);return!u||u[0]!==c[0]||u[1]!==c[1]},e.prototype._updateView=function(t){var n=this._displayables,a=this._handleEnds,i=_n(a.slice()),o=this._size;L([0,1],function(v){var d=n.handles[v],p=this._handleHeight;d.attr({scaleX:p/2,scaleY:p/2,x:a[v]+(v?-1:1),y:o[1]/2-p/2})},this),n.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:o[1]});var s={x:i[0],width:i[1]-i[0]};n.moveHandle&&(n.moveHandle.setShape(s),n.moveZone.setShape(s),n.moveZone.getBoundingRect(),n.moveHandleIcon&&n.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=n.dataShadowSegs,u=[0,i[0],i[1],o[0]],c=0;c<l.length;c++){var f=l[c],h=f.getClipPath();h||(h=new Ge,f.setClipPath(h)),h.setShape({x:u[c],y:0,width:u[c+1]-u[c],height:o[1]})}this._updateDataInfo(t)},e.prototype._updateDataInfo=function(t){var n=this.dataZoomModel,a=this._displayables,i=a.handleLabels,o=this._orient,s=["",""];if(n.get("showDetail")){var l=n.findRepresentativeAxisProxy();if(l){var u=l.getAxisModel().axis,c=this._range,f=t?l.calculateDataWindow({start:c[0],end:c[1]}).valueWindow:l.getDataValueWindow();s=[this._formatLabel(f[0],u),this._formatLabel(f[1],u)]}}var h=_n(this._handleEnds.slice());v.call(this,0),v.call(this,1);function v(d){var p=io(a.handles[d].parent,this.group),g=Id(d===0?"right":"left",p),y=this._handleWidth/2+cle,m=pa([h[d]+(d===0?-y:y),this._size[1]/2],p);i[d].setStyle({x:m[0],y:m[1],verticalAlign:o===yh?"middle":g,align:o===yh?g:"center",text:s[d]})}},e.prototype._formatLabel=function(t,n){var a=this.dataZoomModel,i=a.get("labelFormatter"),o=a.get("labelPrecision");(o==null||o==="auto")&&(o=n.getPixelPrecision());var s=t==null||isNaN(t)?"":n.type==="category"||n.type==="time"?n.scale.getLabel({value:Math.round(t)}):t.toFixed(Math.min(o,20));return ye(i)?i(t,s):ce(i)?i.replace("{value}",s):s},e.prototype._showDataInfo=function(t){t=this._dragging||t;var n=this._displayables,a=n.handleLabels;a[0].attr("invisible",!t),a[1].attr("invisible",!t),n.moveHandle&&this.api[t?"enterEmphasis":"leaveEmphasis"](n.moveHandle,1)},e.prototype._onDragMove=function(t,n,a,i){this._dragging=!0,oi(i.event);var o=this._displayables.sliderGroup.getLocalTransform(),s=pa([n,a],o,!0),l=this._updateInterval(t,s[0]),u=this.dataZoomModel.get("realtime");this._updateView(!u),l&&u&&this._dispatchZoomAction(!0)},e.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1);var t=this.dataZoomModel.get("realtime");!t&&this._dispatchZoomAction(!1)},e.prototype._onClickPanel=function(t){var n=this._size,a=this._displayables.sliderGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(a[0]<0||a[0]>n[0]||a[1]<0||a[1]>n[1])){var i=this._handleEnds,o=(i[0]+i[1])/2,s=this._updateInterval("all",a[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var n=t.offsetX,a=t.offsetY;this._brushStart=new Oe(n,a),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(!!this._brushing){var n=this._displayables.brushRect;if(this._brushing=!1,!!n){n.attr("ignore",!0);var a=n.shape,i=+new Date;if(!(i-this._brushStartTime<200&&Math.abs(a.width)<5)){var o=this._getViewExtent(),s=[0,100];this._range=_n([at(a.x,o,s,!0),at(a.x+a.width,o,s,!0)]),this._handleEnds=[a.x,a.x+a.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(oi(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,n){var a=this._displayables,i=this.dataZoomModel,o=a.brushRect;o||(o=a.brushRect=new gh({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),a.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(t,n),c=l.transformCoordToLocal(s.x,s.y),f=this._size;u[0]=Math.max(Math.min(f[0],u[0]),0),o.setShape({x:c[0],y:0,width:u[0]-c[0],height:f[1]})},e.prototype._dispatchZoomAction=function(t){var n=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?hle:null,start:n[0],end:n[1]})},e.prototype._findCoordRect=function(){var t,n=Qk(this.dataZoomModel).infoList;if(!t&&n.length){var a=n[0].model.coordinateSystem;t=a.getRect&&a.getRect()}if(!t){var i=this.api.getWidth(),o=this.api.getHeight();t={x:i*.2,y:o*.2,width:i*.6,height:o*.6}}return t},e.type="dataZoom.slider",e}(yw);function dle(r){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[r]}function oB(r){return r==="vertical"?"ns-resize":"ew-resize"}var ple=vle;function sB(r){r.registerComponentModel(sle),r.registerComponentView(ple),mw(r)}function gle(r){ke(nB),ke(sB)}var yle={get:function(r,e,t){var n=we((mle[r]||{})[e]);return t&&K(n)?n[n.length-1]:n}},mle={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},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]}},lB=yle,uB=_r.mapVisual,_le=_r.eachVisual,ble=K,cB=L,xle=_n,wle=at,Sle=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.stateList=["inRange","outOfRange"],t.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],t.layoutMode={type:"box",ignoreSize:!0},t.dataBound=[-1/0,1/0],t.targetVisuals={},t.controllerVisuals={},t}return e.prototype.init=function(t,n,a){this.mergeDefaultAndTheme(t,a)},e.prototype.optionUpdated=function(t,n){var a=this.option;!n&&M5(a,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var n=this.stateList;t=fe(t,this),this.controllerVisuals=Mw(this.option.controller,n,t),this.targetVisuals=Mw(this.option.target,n,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,n=[];return t==null||t==="all"?this.ecModel.eachSeries(function(a,i){n.push(i)}):n=st(t),n},e.prototype.eachTargetSeries=function(t,n){L(this.getTargetSeriesIndices(),function(a){var i=this.ecModel.getSeriesByIndex(a);i&&t.call(n,i)},this)},e.prototype.isTargetSeries=function(t){var n=!1;return this.eachTargetSeries(function(a){a===t&&(n=!0)}),n},e.prototype.formatValueText=function(t,n,a){var i=this.option,o=i.precision,s=this.dataBound,l=i.formatter,u;a=a||["<",">"],K(t)&&(t=t.slice(),u=!0);var c=n?t:u?[f(t[0]),f(t[1])]:f(t);if(ce(l))return l.replace("{value}",u?c[0]:c).replace("{value2}",u?c[1]:c);if(ye(l))return u?l(t[0],t[1]):l(t);if(u)return t[0]===s[0]?a[0]+" "+c[1]:t[1]===s[1]?a[1]+" "+c[0]:c[0]+" - "+c[1];return c;function f(h){return h===s[0]?"min":h===s[1]?"max":(+h).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,n=xle([t.min,t.max]);this._dataExtent=n},e.prototype.getDataDimensionIndex=function(t){var n=this.option.dimension;if(n!=null)return t.getDimensionIndex(n);for(var a=t.dimensions,i=a.length-1;i>=0;i--){var o=a[i],s=t.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,n=this.option,a={inRange:n.inRange,outOfRange:n.outOfRange},i=n.target||(n.target={}),o=n.controller||(n.controller={});Pe(i,a),Pe(o,a);var s=this.isCategory();l.call(this,i),l.call(this,o),u.call(this,i,"inRange","outOfRange"),c.call(this,o);function l(f){ble(n.color)&&!f.inRange&&(f.inRange={color:n.color.slice().reverse()}),f.inRange=f.inRange||{color:t.get("gradientColor")}}function u(f,h,v){var d=f[h],p=f[v];d&&!p&&(p=f[v]={},cB(d,function(g,y){if(!!_r.isValidType(y)){var m=lB.get(y,"inactive",s);m!=null&&(p[y]=m,y==="color"&&!p.hasOwnProperty("opacity")&&!p.hasOwnProperty("colorAlpha")&&(p.opacity=[0,0]))}}))}function c(f){var h=(f.inRange||{}).symbol||(f.outOfRange||{}).symbol,v=(f.inRange||{}).symbolSize||(f.outOfRange||{}).symbolSize,d=this.get("inactiveColor"),p=this.getItemSymbol(),g=p||"roundRect";cB(this.stateList,function(y){var m=this.itemSize,_=f[y];_||(_=f[y]={color:s?d:[d]}),_.symbol==null&&(_.symbol=h&&we(h)||(s?g:[g])),_.symbolSize==null&&(_.symbolSize=v&&we(v)||(s?m[0]:[m[0],m[0]])),_.symbol=uB(_.symbol,function(x){return x==="none"?g:x});var b=_.symbolSize;if(b!=null){var w=-1/0;_le(b,function(x){x>w&&(w=x)}),_.symbolSize=uB(b,function(x){return wle(x,[0,w],[0,m[0]],!0)})}},this)}},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}($e),Dg=Sle,fB=[20,140],Cle=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(t,n){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(a){a.mappingMethod="linear",a.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){r.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=fB[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=fB[1])},e.prototype._resetRange=function(){var t=this.getExtent(),n=this.option.range;!n||n.auto?(t.auto=1,this.option.range=t):K(n)&&(n[0]>n[1]&&n.reverse(),n[0]=Math.max(n[0],t[0]),n[1]=Math.min(n[1],t[1]))},e.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),L(this.stateList,function(t){var n=this.option.controller[t].symbolSize;n&&n[0]!==n[1]&&(n[0]=n[1]/3)},this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),n=_n((this.get("range")||[]).slice());return n[0]>t[1]&&(n[0]=t[1]),n[1]>t[1]&&(n[1]=t[1]),n[0]<t[0]&&(n[0]=t[0]),n[1]<t[0]&&(n[1]=t[0]),n},e.prototype.getValueState=function(t){var n=this.option.range,a=this.getExtent();return(n[0]<=a[0]||n[0]<=t)&&(n[1]>=a[1]||t<=n[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var n=[];return this.eachTargetSeries(function(a){var i=[],o=a.getData();o.each(this.getDataDimensionIndex(o),function(s,l){t[0]<=s&&s<=t[1]&&i.push(l)},this),n.push({seriesId:a.id,dataIndex:i})},this),n},e.prototype.getVisualMeta=function(t){var n=hB(this,"outOfRange",this.getExtent()),a=hB(this,"inRange",this.option.range.slice()),i=[];function o(v,d){i.push({value:v,color:t(v,d)})}for(var s=0,l=0,u=a.length,c=n.length;l<c&&(!a.length||n[l]<=a[0]);l++)n[l]<a[s]&&o(n[l],"outOfRange");for(var f=1;s<u;s++,f=0)f&&i.length&&o(a[s],"outOfRange"),o(a[s],"inRange");for(var f=1;l<c;l++)(!a.length||a[a.length-1]<n[l])&&(f&&(i.length&&o(i[i.length-1].value,"outOfRange"),f=0),o(n[l],"outOfRange"));var h=i.length;return{stops:i,outerColors:[h?i[0].color:"transparent",h?i[h-1].color:"transparent"]}},e.type="visualMap.continuous",e.defaultOption=so(Dg.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:"#fff",borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}}),e}(Dg);function hB(r,e,t){if(t[0]===t[1])return t.slice();for(var n=200,a=(t[1]-t[0])/n,i=t[0],o=[],s=0;s<=n&&i<t[1];s++)o.push(i),i+=a;return o.push(t[1]),o}var Tle=Cle,Dle=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.autoPositionValues={left:1,right:1,top:1,bottom:1},t}return e.prototype.init=function(t,n){this.ecModel=t,this.api=n},e.prototype.render=function(t,n,a,i){if(this.visualMapModel=t,t.get("show")===!1){this.group.removeAll();return}this.doRender(t,n,a,i)},e.prototype.renderBackground=function(t){var n=this.visualMapModel,a=xs(n.get("padding")||0),i=t.getBoundingRect();t.add(new Ge({z2:-1,silent:!0,shape:{x:i.x-a[3],y:i.y-a[0],width:i.width+a[3]+a[1],height:i.height+a[0]+a[2]},style:{fill:n.get("backgroundColor"),stroke:n.get("borderColor"),lineWidth:n.get("borderWidth")}}))},e.prototype.getControllerVisual=function(t,n,a){a=a||{};var i=a.forceState,o=this.visualMapModel,s={};if(n==="color"){var l=o.get("contentColor");s.color=l}function u(v){return s[v]}function c(v,d){s[v]=d}var f=o.controllerVisuals[i||o.getValueState(t)],h=_r.prepareVisualTypes(f);return L(h,function(v){var d=f[v];a.convertOpacityToAlpha&&v==="opacity"&&(v="colorAlpha",d=f.__alphaForOpacity),_r.dependsOn(v,n)&&d&&d.applyVisual(t,u,c)}),s[n]},e.prototype.positionGroup=function(t){var n=this.visualMapModel,a=this.api;Hd(t,n.getBoxLayoutParams(),{width:a.getWidth(),height:a.getHeight()})},e.prototype.doRender=function(t,n,a,i){},e.type="visualMap",e}(wt),vB=Dle,dB=[["left","right","width"],["top","bottom","height"]];function pB(r,e,t){var n=r.option,a=n.align;if(a!=null&&a!=="auto")return a;for(var i={width:e.getWidth(),height:e.getHeight()},o=n.orient==="horizontal"?1:0,s=dB[o],l=[0,null,10],u={},c=0;c<3;c++)u[dB[1-o][c]]=l[c],u[s[c]]=c===2?t[0]:n[s[c]];var f=[["x","width",3],["y","height",0]][o],h=Ht(u,i,n.padding);return s[(h.margin[f[2]]||0)+h[f[0]]+h[f[1]]*.5<i[f[1]]*.5?0:1]}function Mg(r,e){return L(r||[],function(t){t.dataIndex!=null&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null),t.highlightKey="visualMap"+(e?e.componentIndex:"")}),r}var Xa=at,Mle=L,gB=Math.min,qw=Math.max,Ale=12,Lle=6,Ile=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._shapes={},t._dataInterval=[],t._handleEnds=[],t._hoverLinkDataIndices=[],t}return e.prototype.doRender=function(t,n,a,i){this._api=a,(!i||i.type!=="selectDataRange"||i.from!==this.uid)&&this._buildView()},e.prototype._buildView=function(){this.group.removeAll();var t=this.visualMapModel,n=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(n);var a=t.get("text");this._renderEndsText(n,a,0),this._renderEndsText(n,a,1),this._updateView(!0),this.renderBackground(n),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(n)},e.prototype._renderEndsText=function(t,n,a){if(!!n){var i=n[1-a];i=i!=null?i+"":"";var o=this.visualMapModel,s=o.get("textGap"),l=o.itemSize,u=this._shapes.mainGroup,c=this._applyTransform([l[0]/2,a===0?-s:l[1]+s],u),f=this._applyTransform(a===0?"bottom":"top",u),h=this._orient,v=this.visualMapModel.textStyleModel;this.group.add(new We({style:gt(v,{x:c[0],y:c[1],verticalAlign:h==="horizontal"?"middle":f,align:h==="horizontal"?f:"center",text:i})}))}},e.prototype._renderBar=function(t){var n=this.visualMapModel,a=this._shapes,i=n.itemSize,o=this._orient,s=this._useHandle,l=pB(n,this.api,i),u=a.mainGroup=this._createBarGroup(l),c=new Te;u.add(c),c.add(a.outOfRange=yB()),c.add(a.inRange=yB(null,s?_B(this._orient):null,fe(this._dragHandle,this,"all",!1),fe(this._dragHandle,this,"all",!0))),c.setClipPath(new Ge({shape:{x:0,y:0,width:i[0],height:i[1],r:3}}));var f=n.textStyleModel.getTextRect("\u56FD"),h=qw(f.width,f.height);s&&(a.handleThumbs=[],a.handleLabels=[],a.handleLabelPoints=[],this._createHandle(n,u,0,i,h,o),this._createHandle(n,u,1,i,h,o)),this._createIndicator(n,u,i,h,o),t.add(u)},e.prototype._createHandle=function(t,n,a,i,o,s){var l=fe(this._dragHandle,this,a,!1),u=fe(this._dragHandle,this,a,!0),c=ca(t.get("handleSize"),i[0]),f=kt(t.get("handleIcon"),-c/2,-c/2,c,c,null,!0),h=_B(this._orient);f.attr({cursor:h,draggable:!0,drift:l,ondragend:u,onmousemove:function(y){oi(y.event)}}),f.x=i[0]/2,f.useStyle(t.getModel("handleStyle").getItemStyle()),f.setStyle({strokeNoScale:!0,strokeFirst:!0}),f.style.lineWidth*=2,f.ensureState("emphasis").style=t.getModel(["emphasis","handleStyle"]).getItemStyle(),gs(f,!0),n.add(f);var v=this.visualMapModel.textStyleModel,d=new We({cursor:h,draggable:!0,drift:l,onmousemove:function(y){oi(y.event)},ondragend:u,style:gt(v,{x:0,y:0,text:""})});d.ensureState("blur").style={opacity:.1},d.stateTransition={duration:200},this.group.add(d);var p=[c,0],g=this._shapes;g.handleThumbs[a]=f,g.handleLabelPoints[a]=p,g.handleLabels[a]=d},e.prototype._createIndicator=function(t,n,a,i,o){var s=ca(t.get("indicatorSize"),a[0]),l=kt(t.get("indicatorIcon"),-s/2,-s/2,s,s,null,!0);l.attr({cursor:"move",invisible:!0,silent:!0,x:a[0]/2});var u=t.getModel("indicatorStyle").getItemStyle();if(l instanceof ur){var c=l.style;l.useStyle(Q({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},u))}else l.useStyle(u);n.add(l);var f=this.visualMapModel.textStyleModel,h=new We({silent:!0,invisible:!0,style:gt(f,{x:0,y:0,text:""})});this.group.add(h);var v=[(o==="horizontal"?i/2:Lle)+a[0]/2,0],d=this._shapes;d.indicator=l,d.indicatorLabel=h,d.indicatorLabelPoint=v,this._firstShowIndicator=!0},e.prototype._dragHandle=function(t,n,a,i){if(!!this._useHandle){if(this._dragging=!n,!n){var o=this._applyTransform([a,i],this._shapes.mainGroup,!0);this._updateInterval(t,o[1]),this._hideIndicator(),this._updateView()}n===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),n?!this._hovering&&this._clearHoverLinkToSeries():mB(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},e.prototype._resetInterval=function(){var t=this.visualMapModel,n=this._dataInterval=t.getSelected(),a=t.getExtent(),i=[0,t.itemSize[1]];this._handleEnds=[Xa(n[0],a,i,!0),Xa(n[1],a,i,!0)]},e.prototype._updateInterval=function(t,n){n=n||0;var a=this.visualMapModel,i=this._handleEnds,o=[0,a.itemSize[1]];Zs(n,i,o,t,0);var s=a.getExtent();this._dataInterval=[Xa(i[0],o,s,!0),Xa(i[1],o,s,!0)]},e.prototype._updateView=function(t){var n=this.visualMapModel,a=n.getExtent(),i=this._shapes,o=[0,n.itemSize[1]],s=t?o:this._handleEnds,l=this._createBarVisual(this._dataInterval,a,s,"inRange"),u=this._createBarVisual(a,a,o,"outOfRange");i.inRange.setStyle({fill:l.barColor}).setShape("points",l.barPoints),i.outOfRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),this._updateHandle(s,l)},e.prototype._createBarVisual=function(t,n,a,i){var o={forceState:i,convertOpacityToAlpha:!0},s=this._makeColorGradient(t,o),l=[this.getControllerVisual(t[0],"symbolSize",o),this.getControllerVisual(t[1],"symbolSize",o)],u=this._createBarPoints(a,l);return{barColor:new Hl(0,0,0,1,s),barPoints:u,handlesColor:[s[0].color,s[s.length-1].color]}},e.prototype._makeColorGradient=function(t,n){var a=100,i=[],o=(t[1]-t[0])/a;i.push({color:this.getControllerVisual(t[0],"color",n),offset:0});for(var s=1;s<a;s++){var l=t[0]+o*s;if(l>t[1])break;i.push({color:this.getControllerVisual(l,"color",n),offset:s/a})}return i.push({color:this.getControllerVisual(t[1],"color",n),offset:1}),i},e.prototype._createBarPoints=function(t,n){var a=this.visualMapModel.itemSize;return[[a[0]-n[0],t[0]],[a[0],t[0]],[a[0],t[1]],[a[0]-n[1],t[1]]]},e.prototype._createBarGroup=function(t){var n=this._orient,a=this.visualMapModel.get("inverse");return new Te(n==="horizontal"&&!a?{scaleX:t==="bottom"?1:-1,rotation:Math.PI/2}:n==="horizontal"&&a?{scaleX:t==="bottom"?-1:1,rotation:-Math.PI/2}:n==="vertical"&&!a?{scaleX:t==="left"?1:-1,scaleY:-1}:{scaleX:t==="left"?1:-1})},e.prototype._updateHandle=function(t,n){if(!!this._useHandle){var a=this._shapes,i=this.visualMapModel,o=a.handleThumbs,s=a.handleLabels,l=i.itemSize,u=i.getExtent();Mle([0,1],function(c){var f=o[c];f.setStyle("fill",n.handlesColor[c]),f.y=t[c];var h=Xa(t[c],[0,l[1]],u,!0),v=this.getControllerVisual(h,"symbolSize");f.scaleX=f.scaleY=v/l[0],f.x=l[0]-v/2;var d=pa(a.handleLabelPoints[c],io(f,this.group));s[c].setStyle({x:d[0],y:d[1],text:i.formatValueText(this._dataInterval[c]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",a.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(t,n,a,i){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],c=this._shapes,f=c.indicator;if(!!f){f.attr("invisible",!1);var h={convertOpacityToAlpha:!0},v=this.getControllerVisual(t,"color",h),d=this.getControllerVisual(t,"symbolSize"),p=Xa(t,s,u,!0),g=l[0]-d/2,y={x:f.x,y:f.y};f.y=p,f.x=g;var m=pa(c.indicatorLabelPoint,io(f,this.group)),_=c.indicatorLabel;_.attr("invisible",!1);var b=this._applyTransform("left",c.mainGroup),w=this._orient,x=w==="horizontal";_.setStyle({text:(a||"")+o.formatValueText(n),verticalAlign:x?b:"middle",align:x?"center":b});var S={x:g,y:p,style:{fill:v}},T={style:{x:m[0],y:m[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var D={duration:100,easing:"cubicInOut",additive:!0};f.x=y.x,f.y=y.y,f.animateTo(S,D),_.animateTo(T,D)}else f.attr(S),_.attr(T);this._firstShowIndicator=!1;var M=this._shapes.handleLabels;if(M)for(var A=0;A<M.length;A++)this._api.enterBlur(M[A])}},e.prototype._enableHoverLinkToSeries=function(){var t=this;this._shapes.mainGroup.on("mousemove",function(n){if(t._hovering=!0,!t._dragging){var a=t.visualMapModel.itemSize,i=t._applyTransform([n.offsetX,n.offsetY],t._shapes.mainGroup,!0,!0);i[1]=gB(qw(0,i[1]),a[1]),t._doHoverLinkToSeries(i[1],0<=i[0]&&i[0]<=a[0])}}).on("mouseout",function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()})},e.prototype._enableHoverLinkFromSeries=function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},e.prototype._doHoverLinkToSeries=function(t,n){var a=this.visualMapModel,i=a.itemSize;if(!!a.option.hoverLink){var o=[0,i[1]],s=a.getExtent();t=gB(qw(o[0],t),o[1]);var l=Ple(a,s,o),u=[t-l,t+l],c=Xa(t,o,s,!0),f=[Xa(u[0],o,s,!0),Xa(u[1],o,s,!0)];u[0]<o[0]&&(f[0]=-1/0),u[1]>o[1]&&(f[1]=1/0),n&&(f[0]===-1/0?this._showIndicator(c,f[1],"< ",l):f[1]===1/0?this._showIndicator(c,f[0],"> ",l):this._showIndicator(c,c,"\u2248 ",l));var h=this._hoverLinkDataIndices,v=[];(n||mB(a))&&(v=this._hoverLinkDataIndices=a.findTargetDataIndices(f));var d=o8(h,v);this._dispatchHighDown("downplay",Mg(d[0],a)),this._dispatchHighDown("highlight",Mg(d[1],a))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var n;if(As(t.target,function(l){var u=Me(l);if(u.dataIndex!=null)return n=u,!0},!0),!!n){var a=this.ecModel.getSeriesByIndex(n.seriesIndex),i=this.visualMapModel;if(!!i.isTargetSeries(a)){var o=a.getData(n.dataType),s=o.getStore().get(i.getDataDimensionIndex(o),n.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},e.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var n=this._shapes.handleLabels;if(n)for(var a=0;a<n.length;a++)this._api.leaveBlur(n[a])},e.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",Mg(t,this.visualMapModel)),t.length=0},e.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},e.prototype._applyTransform=function(t,n,a,i){var o=io(n,i?null:this.group);return K(t)?pa(t,o,a):Id(t,o,a)},e.prototype._dispatchHighDown=function(t,n){n&&n.length&&this.api.dispatchAction({type:t,batch:n})},e.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},e.prototype.remove=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},e.type="visualMap.continuous",e}(vB);function yB(r,e,t,n){return new Gr({shape:{points:r},draggable:!!t,cursor:e,drift:t,onmousemove:function(a){oi(a.event)},ondragend:n})}function Ple(r,e,t){var n=Ale/2,a=r.get("hoverLinkDataSize");return a&&(n=Xa(a,e,t,!0)/2),n}function mB(r){var e=r.get("hoverLinkOnHandle");return!!(e==null?r.get("realtime"):e)}function _B(r){return r==="vertical"?"ns-resize":"ew-resize"}var Ele=Ile,Ole={type:"selectDataRange",event:"dataRangeSelected",update:"update"},Rle=function(r,e){e.eachComponent({mainType:"visualMap",query:r},function(t){t.setSelected(r.selected)})},Nle=[{createOnAllSeries:!0,reset:function(r,e){var t=[];return e.eachComponent("visualMap",function(n){var a=r.pipelineContext;!n.isTargetSeries(r)||a&&a.large||t.push(Loe(n.stateList,n.targetVisuals,fe(n.getValueState,n),n.getDataDimensionIndex(r.getData())))}),t}},{createOnAllSeries:!0,reset:function(r,e){var t=r.getData(),n=[];e.eachComponent("visualMap",function(a){if(a.isTargetSeries(r)){var i=a.getVisualMeta(fe(kle,null,r,a))||{stops:[],outerColors:[]},o=a.getDataDimensionIndex(t);o>=0&&(i.dimension=o,n.push(i))}}),r.getData().setVisual("visualMeta",n)}}];function kle(r,e,t,n){for(var a=e.targetVisuals[n],i=_r.prepareVisualTypes(a),o={color:xf(r.getData(),"color")},s=0,l=i.length;s<l;s++){var u=i[s],c=a[u==="opacity"?"__alphaForOpacity":u];c&&c.applyVisual(t,f,h)}return o.color;function f(v){return o[v]}function h(v,d){o[v]=d}}var bB=L;function Ble(r){var e=r&&r.visualMap;K(e)||(e=e?[e]:[]),bB(e,function(t){if(!!t){Eu(t,"splitList")&&!Eu(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var n=t.pieces;n&&K(n)&&bB(n,function(a){_e(a)&&(Eu(a,"start")&&!Eu(a,"min")&&(a.min=a.start),Eu(a,"end")&&!Eu(a,"max")&&(a.max=a.end))})}})}function Eu(r,e){return r&&r.hasOwnProperty&&r.hasOwnProperty(e)}var xB=!1;function wB(r){xB||(xB=!0,r.registerSubTypeDefaulter("visualMap",function(e){return!e.categories&&(!(e.pieces?e.pieces.length>0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),r.registerAction(Ole,Rle),L(Nle,function(e){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,e)}),r.registerPreprocessor(Ble))}function SB(r){r.registerComponentModel(Tle),r.registerComponentView(Ele),wB(r)}var zle=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._pieceList=[],t}return e.prototype.optionUpdated=function(t,n){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var a=this._mode=this._determineMode();this._pieceList=[],Fle[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var i=this.option.categories;this.resetVisual(function(o,s){a==="categories"?(o.mappingMethod="category",o.categories=we(i)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=J(this._pieceList,function(l){return l=we(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var t=this.option,n={},a=_r.listVisualTypes(),i=this.isCategory();L(t.pieces,function(s){L(a,function(l){s.hasOwnProperty(l)&&(n[l]=1)})}),L(n,function(s,l){var u=!1;L(this.stateList,function(c){u=u||o(t,c,l)||o(t.target,c,l)},this),!u&&L(this.stateList,function(c){(t[c]||(t[c]={}))[l]=lB.get(l,c==="inRange"?"active":"inactive",i)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}r.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,n){var a=this.option,i=this._pieceList,o=(n?a:t).selected||{};if(a.selected=o,L(i,function(l,u){var c=this.getSelectedMapKey(l);o.hasOwnProperty(c)||(o[c]=!0)},this),a.selectedMode==="single"){var s=!1;L(i,function(l,u){var c=this.getSelectedMapKey(l);o[c]&&(s?o[c]=!1:s=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return this._mode==="categories"?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=we(t)},e.prototype.getValueState=function(t){var n=_r.findPieceIndex(t,this._pieceList);return n!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[n])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var n=[],a=this._pieceList;return this.eachTargetSeries(function(i){var o=[],s=i.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var c=_r.findPieceIndex(l,a);c===t&&o.push(u)},this),n.push({seriesId:i.id,dataIndex:o})},this),n},e.prototype.getRepresentValue=function(t){var n;if(this.isCategory())n=t.value;else if(t.value!=null)n=t.value;else{var a=t.interval||[];n=a[0]===-1/0&&a[1]===1/0?0:(a[0]+a[1])/2}return n},e.prototype.getVisualMeta=function(t){if(this.isCategory())return;var n=[],a=["",""],i=this;function o(c,f){var h=i.getRepresentValue({interval:c});f||(f=i.getValueState(h));var v=t(h,f);c[0]===-1/0?a[0]=v:c[1]===1/0?a[1]=v:n.push({value:c[0],color:v},{value:c[1],color:v})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return L(s,function(c){var f=c.interval;f&&(f[0]>u&&o([u,f[0]],"outOfRange"),o(f.slice()),u=f[1])},this),{stops:n,outerColors:a}},e.type="visualMap.piecewise",e.defaultOption=so(Dg.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(Dg),Fle={splitNumber:function(r){var e=this.option,t=Math.min(e.precision,20),n=this.getExtent(),a=e.splitNumber;a=Math.max(parseInt(a,10),1),e.splitNumber=a;for(var i=(n[1]-n[0])/a;+i.toFixed(t)!==i&&t<5;)t++;e.precision=t,i=+i.toFixed(t),e.minOpen&&r.push({interval:[-1/0,n[0]],close:[0,0]});for(var o=0,s=n[0];o<a;s+=i,o++){var l=o===a-1?n[1]:s+i;r.push({interval:[s,l],close:[1,1]})}e.maxOpen&&r.push({interval:[n[1],1/0],close:[0,0]}),E0(r),L(r,function(u,c){u.index=c,u.text=this.formatValueText(u.interval)},this)},categories:function(r){var e=this.option;L(e.categories,function(t){r.push({text:this.formatValueText(t,!0),value:t})},this),CB(e,r)},pieces:function(r){var e=this.option;L(e.pieces,function(t,n){_e(t)||(t={value:t});var a={text:"",index:n};if(t.label!=null&&(a.text=t.label),t.hasOwnProperty("value")){var i=a.value=t.value;a.interval=[i,i],a.close=[1,1]}else{for(var o=a.interval=[],s=a.close=[0,0],l=[1,0,1],u=[-1/0,1/0],c=[],f=0;f<2;f++){for(var h=[["gte","gt","min"],["lte","lt","max"]][f],v=0;v<3&&o[f]==null;v++)o[f]=t[h[v]],s[f]=l[v],c[f]=v===2;o[f]==null&&(o[f]=u[f])}c[0]&&o[1]===1/0&&(s[0]=0),c[1]&&o[0]===-1/0&&(s[1]=0),o[0]===o[1]&&s[0]&&s[1]&&(a.value=o[0])}a.visual=_r.retrieveVisuals(t),r.push(a)},this),CB(e,r),E0(r),L(r,function(t){var n=t.close,a=[["<","\u2264"][n[1]],[">","\u2265"][n[0]]];t.text=t.text||this.formatValueText(t.value!=null?t.value:t.interval,!1,a)},this)}};function CB(r,e){var t=r.inverse;(r.orient==="vertical"?!t:t)&&e.reverse()}var Vle=zle,$le=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.doRender=function(){var t=this.group;t.removeAll();var n=this.visualMapModel,a=n.get("textGap"),i=n.textStyleModel,o=i.getFont(),s=i.getTextColor(),l=this._getItemAlign(),u=n.itemSize,c=this._getViewData(),f=c.endsText,h=Jt(n.get("showLabel",!0),!f);f&&this._renderEndsText(t,f[0],u,h,l),L(c.viewPieceList,function(v){var d=v.piece,p=new Te;p.onclick=fe(this._onItemClick,this,d),this._enableHoverLink(p,v.indexInModelPieceList);var g=n.getRepresentValue(d);if(this._createItemSymbol(p,g,[0,0,u[0],u[1]]),h){var y=this.visualMapModel.getValueState(g);p.add(new We({style:{x:l==="right"?-a:u[0]+a,y:u[1]/2,text:d.text,verticalAlign:"middle",align:l,font:o,fill:s,opacity:y==="outOfRange"?.5:1}}))}t.add(p)},this),f&&this._renderEndsText(t,f[1],u,h,l),Cs(n.get("orient"),t,n.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,n){var a=this;t.on("mouseover",function(){return i("highlight")}).on("mouseout",function(){return i("downplay")});var i=function(o){var s=a.visualMapModel;s.option.hoverLink&&a.api.dispatchAction({type:o,batch:Mg(s.findTargetDataIndices(n),s)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,n=t.option;if(n.orient==="vertical")return pB(t,this.api,t.itemSize);var a=n.align;return(!a||a==="auto")&&(a="left"),a},e.prototype._renderEndsText=function(t,n,a,i,o){if(!!n){var s=new Te,l=this.visualMapModel.textStyleModel;s.add(new We({style:gt(l,{x:i?o==="right"?a[0]:0:a[0]/2,y:a[1]/2,verticalAlign:"middle",align:i?o:"center",text:n})})),t.add(s)}},e.prototype._getViewData=function(){var t=this.visualMapModel,n=J(t.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),a=t.get("text"),i=t.get("orient"),o=t.get("inverse");return(i==="horizontal"?o:!o)?n.reverse():a&&(a=a.slice().reverse()),{viewPieceList:n,endsText:a}},e.prototype._createItemSymbol=function(t,n,a){t.add(kt(this.getControllerVisual(n,"symbol"),a[0],a[1],a[2],a[3],this.getControllerVisual(n,"color")))},e.prototype._onItemClick=function(t){var n=this.visualMapModel,a=n.option,i=a.selectedMode;if(!!i){var o=we(a.selected),s=n.getSelectedMapKey(t);i==="single"||i===!0?(o[s]=!0,L(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},e.type="visualMap.piecewise",e}(vB),Hle=$le;function TB(r){r.registerComponentModel(Vle),r.registerComponentView(Hle),wB(r)}function Gle(r){ke(SB),ke(TB)}var Wle={label:{enabled:!0},decal:{show:!1}},DB=Ye(),Ule={};function jle(r,e){var t=r.getModel("aria");if(!t.get("enabled"))return;var n=we(Wle);Pe(n.label,r.getLocaleModel().get("aria"),!1),Pe(t.option,n,!1),a(),i();function a(){var u=t.getModel("decal"),c=u.get("show");if(c){var f=ge();r.eachSeries(function(h){if(!h.isColorBySeries()){var v=f.get(h.type);v||(v={},f.set(h.type,v)),DB(h).scope=v}}),r.eachRawSeries(function(h){if(r.isSeriesFiltered(h))return;if(ye(h.enableAriaDecal)){h.enableAriaDecal();return}var v=h.getData();if(h.isColorBySeries()){var m=G_(h.ecModel,h.name,Ule,r.getSeriesCount()),_=v.getVisual("decal");v.setVisual("decal",b(_,m))}else{var d=h.getRawData(),p={},g=DB(h).scope;v.each(function(w){var x=v.getRawIndex(w);p[x]=w});var y=d.count();d.each(function(w){var x=p[w],S=d.getName(w)||w+"",T=G_(h.ecModel,S,g,y),D=v.getItemVisual(x,"decal");v.setItemVisual(x,"decal",b(D,T))})}function b(w,x){var S=w?Q(Q({},x),w):x;return S.dirty=!0,S}})}}function i(){var u=r.getLocaleModel().get("aria"),c=t.getModel("label");if(c.option=me(c.option,u),!!c.get("enabled")){var f=e.getZr().dom;if(c.get("description")){f.setAttribute("aria-label",c.get("description"));return}var h=r.getSeriesCount(),v=c.get(["data","maxCount"])||10,d=c.get(["series","maxCount"])||10,p=Math.min(h,d),g;if(!(h<1)){var y=s();if(y){var m=c.get(["general","withTitle"]);g=o(m,{title:y})}else g=c.get(["general","withoutTitle"]);var _=[],b=h>1?c.get(["series","multiple","prefix"]):c.get(["series","single","prefix"]);g+=o(b,{seriesCount:h}),r.eachSeries(function(T,D){if(D<p){var M=void 0,A=T.get("name"),I=A?"withName":"withoutName";M=h>1?c.get(["series","multiple",I]):c.get(["series","single",I]),M=o(M,{seriesId:T.seriesIndex,seriesName:T.get("name"),seriesType:l(T.subType)});var P=T.getData();if(P.count()>v){var E=c.get(["data","partialData"]);M+=o(E,{displayCnt:v})}else M+=c.get(["data","allData"]);for(var O=c.get(["data","separator","middle"]),N=c.get(["data","separator","end"]),V=[],$=0;$<P.count();$++)if($<v){var U=P.getName($),Y=P.getValues($),ae=c.get(["data",U?"withName":"withoutName"]);V.push(o(ae,{name:U,value:Y.join(O)}))}M+=V.join(O)+N,_.push(M)}});var w=c.getModel(["series","multiple","separator"]),x=w.get("middle"),S=w.get("end");g+=_.join(x)+S,f.setAttribute("aria-label",g)}}}function o(u,c){if(!ce(u))return u;var f=u;return L(c,function(h,v){f=f.replace(new RegExp("\\{\\s*"+v+"\\s*\\}","g"),h)}),f}function s(){var u=r.get("title");return u&&u.length&&(u=u[0]),u&&u.text}function l(u){return r.getLocaleModel().get(["series","typeNames"])[u]||"\u81EA\u5B9A\u4E49\u56FE"}}function Yle(r){if(!(!r||!r.aria)){var e=r.aria;e.show!=null&&(e.enabled=e.show),e.label=e.label||{},L(["description","general","series","data"],function(t){e[t]!=null&&(e.label[t]=e[t])})}}function qle(r){r.registerPreprocessor(Yle),r.registerVisual(r.PRIORITY.VISUAL.ARIA,jle)}var MB={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},Zle=function(){function r(e){var t=this._condVal=ce(e)?new RegExp(e):YT(e)?e:null;if(t==null){var n="";tt(n)}}return r.prototype.evaluate=function(e){var t=typeof e;return ce(t)?this._condVal.test(e):je(t)?this._condVal.test(e+""):!1},r}(),Xle=function(){function r(){}return r.prototype.evaluate=function(){return this.value},r}(),Qle=function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(!e[t].evaluate())return!1;return!0},r}(),Kle=function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(e[t].evaluate())return!0;return!1},r}(),Jle=function(){function r(){}return r.prototype.evaluate=function(){return!this.child.evaluate()},r}(),eue=function(){function r(){}return r.prototype.evaluate=function(){for(var e=!!this.valueParser,t=this.getValue,n=t(this.valueGetterParam),a=e?this.valueParser(n):null,i=0;i<this.subCondList.length;i++)if(!this.subCondList[i].evaluate(e?a:n))return!1;return!0},r}();function Zw(r,e){if(r===!0||r===!1){var t=new Xle;return t.value=r,t}var n="";return LB(r)||tt(n),r.and?AB("and",r,e):r.or?AB("or",r,e):r.not?tue(r,e):rue(r,e)}function AB(r,e,t){var n=e[r],a="";K(n)||tt(a),n.length||tt(a);var i=r==="and"?new Qle:new Kle;return i.children=J(n,function(o){return Zw(o,t)}),i.children.length||tt(a),i}function tue(r,e){var t=r.not,n="";LB(t)||tt(n);var a=new Jle;return a.child=Zw(t,e),a.child||tt(n),a}function rue(r,e){for(var t="",n=e.prepareGetValue(r),a=[],i=Fe(r),o=r.parser,s=o?nL(o):null,l=0;l<i.length;l++){var u=i[l];if(!(u==="parser"||e.valueGetterAttrMap.get(u))){var c=he(MB,u)?MB[u]:u,f=r[u],h=s?s(f):f,v=_9(c,h)||c==="reg"&&new Zle(h);v||tt(t),a.push(v)}}a.length||tt(t);var d=new eue;return d.valueGetterParam=n,d.valueParser=s,d.getValue=e.getValue,d.subCondList=a,d}function LB(r){return _e(r)&&!pr(r)}var nue=function(){function r(e,t){this._cond=Zw(e,t)}return r.prototype.evaluate=function(){return this._cond.evaluate()},r}();function aue(r,e){return new nue(r,e)}var iue={type:"echarts:filter",transform:function(r){for(var e=r.upstream,t,n=aue(r.config,{valueGetterAttrMap:ge({dimension:!0}),prepareGetValue:function(s){var l="",u=s.dimension;he(s,"dimension")||tt(l);var c=e.getDimensionInfo(u);return c||tt(l),{dimIdx:c.index}},getValue:function(s){return e.retrieveValueFromItem(t,s.dimIdx)}}),a=[],i=0,o=e.count();i<o;i++)t=e.getRawDataItem(i),n.evaluate()&&a.push(t);return{data:a}}},oue={type:"echarts:sort",transform:function(r){var e=r.upstream,t=r.config,n="",a=st(t);a.length||tt(n);var i=[];L(a,function(c){var f=c.dimension,h=c.order,v=c.parser,d=c.incomparable;if(f==null&&tt(n),h!=="asc"&&h!=="desc"&&tt(n),d&&d!=="min"&&d!=="max"){var p="";tt(p)}if(h!=="asc"&&h!=="desc"){var g="";tt(g)}var y=e.getDimensionInfo(f);y||tt(n);var m=v?nL(v):null;v&&!m&&tt(n),i.push({dimIdx:y.index,parser:m,comparator:new iL(h,d)})});var o=e.sourceFormat;o!==Lr&&o!==Hn&&tt(n);for(var s=[],l=0,u=e.count();l<u;l++)s.push(e.getRawDataItem(l));return s.sort(function(c,f){for(var h=0;h<i.length;h++){var v=i[h],d=e.retrieveValueFromItem(c,v.dimIdx),p=e.retrieveValueFromItem(f,v.dimIdx);v.parser&&(d=v.parser(d),p=v.parser(p));var g=v.comparator.evaluate(d,p);if(g!==0)return g}return 0}),{data:s}}};function sue(r){r.registerTransform(iue),r.registerTransform(oue)}var lue=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataset",t}return e.prototype.init=function(t,n,a){r.prototype.init.call(this,t,n,a),this._sourceManager=new fL(this),hL(this)},e.prototype.mergeOption=function(t,n){r.prototype.mergeOption.call(this,t,n),hL(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:Ga},e}($e),uue=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataset",t}return e.type="dataset",e}(wt);function cue(r){r.registerComponentModel(lue),r.registerComponentView(uue)}var Qa=Va.CMD;function Ou(r,e){return Math.abs(r-e)<1e-5}function Xw(r){var e=r.data,t=r.len(),n=[],a,i=0,o=0,s=0,l=0;function u(P,E){a&&a.length>2&&n.push(a),a=[P,E]}function c(P,E,O,N){Ou(P,O)&&Ou(E,N)||a.push(P,E,O,N,O,N)}function f(P,E,O,N,V,$){var U=Math.abs(E-P),Y=Math.tan(U/4)*4/3,ae=E<P?-1:1,H=Math.cos(P),q=Math.sin(P),X=Math.cos(E),Z=Math.sin(E),ie=H*V+O,se=q*$+N,te=X*V+O,ve=Z*$+N,R=V*Y*ae,F=$*Y*ae;a.push(ie-R*q,se+F*H,te+R*Z,ve-F*X,te,ve)}for(var h,v,d,p,g=0;g<t;){var y=e[g++],m=g===1;switch(m&&(i=e[g],o=e[g+1],s=i,l=o,(y===Qa.L||y===Qa.C||y===Qa.Q)&&(a=[s,l])),y){case Qa.M:i=s=e[g++],o=l=e[g++],u(s,l);break;case Qa.L:h=e[g++],v=e[g++],c(i,o,h,v),i=h,o=v;break;case Qa.C:a.push(e[g++],e[g++],e[g++],e[g++],i=e[g++],o=e[g++]);break;case Qa.Q:h=e[g++],v=e[g++],d=e[g++],p=e[g++],a.push(i+2/3*(h-i),o+2/3*(v-o),d+2/3*(h-d),p+2/3*(v-p),d,p),i=d,o=p;break;case Qa.A:var _=e[g++],b=e[g++],w=e[g++],x=e[g++],S=e[g++],T=e[g++]+S;g+=1;var D=!e[g++];h=Math.cos(S)*w+_,v=Math.sin(S)*x+b,m?(s=h,l=v,u(s,l)):c(i,o,h,v),i=Math.cos(T)*w+_,o=Math.sin(T)*x+b;for(var M=(D?-1:1)*Math.PI/2,A=S;D?A>T:A<T;A+=M){var I=D?Math.max(A+M,T):Math.min(A+M,T);f(A,I,_,b,w,x)}break;case Qa.R:s=i=e[g++],l=o=e[g++],h=s+e[g++],v=l+e[g++],u(h,l),c(h,l,h,v),c(h,v,s,v),c(s,v,s,l),c(s,l,h,l);break;case Qa.Z:a&&c(i,o,s,l),i=s,o=l;break}}return a&&a.length>2&&n.push(a),n}function Qw(r,e,t,n,a,i,o,s,l,u){if(Ou(r,t)&&Ou(e,n)&&Ou(a,o)&&Ou(i,s)){l.push(o,s);return}var c=2/u,f=c*c,h=o-r,v=s-e,d=Math.sqrt(h*h+v*v);h/=d,v/=d;var p=t-r,g=n-e,y=a-o,m=i-s,_=p*p+g*g,b=y*y+m*m;if(_<f&&b<f){l.push(o,s);return}var w=h*p+v*g,x=-h*y-v*m,S=_-w*w,T=b-x*x;if(S<f&&w>=0&&T<f&&x>=0){l.push(o,s);return}var D=[],M=[];Zi(r,t,a,o,.5,D),Zi(e,n,i,s,.5,M),Qw(D[0],M[0],D[1],M[1],D[2],M[2],D[3],M[3],l,u),Qw(D[4],M[4],D[5],M[5],D[6],M[6],D[7],M[7],l,u)}function fue(r,e){var t=Xw(r),n=[];e=e||1;for(var a=0;a<t.length;a++){var i=t[a],o=[],s=i[0],l=i[1];o.push(s,l);for(var u=2;u<i.length;){var c=i[u++],f=i[u++],h=i[u++],v=i[u++],d=i[u++],p=i[u++];Qw(s,l,c,f,h,v,d,p,o,e),s=d,l=p}n.push(o)}return n}function IB(r,e,t){var n=r[e],a=r[1-e],i=Math.abs(n/a),o=Math.ceil(Math.sqrt(i*t)),s=Math.floor(t/o);s===0&&(s=1,o=t);for(var l=[],u=0;u<o;u++)l.push(s);var c=o*s,f=t-c;if(f>0)for(var u=0;u<f;u++)l[u%o]+=1;return l}function PB(r,e,t){for(var n=r.r0,a=r.r,i=r.startAngle,o=r.endAngle,s=Math.abs(o-i),l=s*a,u=a-n,c=l>Math.abs(u),f=IB([l,u],c?0:1,e),h=(c?s:u)/f.length,v=0;v<f.length;v++)for(var d=(c?u:s)/f[v],p=0;p<f[v];p++){var g={};c?(g.startAngle=i+h*v,g.endAngle=i+h*(v+1),g.r0=n+d*p,g.r=n+d*(p+1)):(g.startAngle=i+d*p,g.endAngle=i+d*(p+1),g.r0=n+h*v,g.r=n+h*(v+1)),g.clockwise=r.clockwise,g.cx=r.cx,g.cy=r.cy,t.push(g)}}function hue(r,e,t){for(var n=r.width,a=r.height,i=n>a,o=IB([n,a],i?0:1,e),s=i?"width":"height",l=i?"height":"width",u=i?"x":"y",c=i?"y":"x",f=r[s]/o.length,h=0;h<o.length;h++)for(var v=r[l]/o[h],d=0;d<o[h];d++){var p={};p[u]=h*f,p[c]=d*v,p[s]=f,p[l]=v,p.x+=r.x,p.y+=r.y,t.push(p)}}function EB(r,e,t,n){return r*n-t*e}function vue(r,e,t,n,a,i,o,s){var l=t-r,u=n-e,c=o-a,f=s-i,h=EB(c,f,l,u);if(Math.abs(h)<1e-6)return null;var v=r-a,d=e-i,p=EB(v,d,c,f)/h;return p<0||p>1?null:new Oe(p*l+r,p*u+e)}function due(r,e,t){var n=new Oe;Oe.sub(n,t,e),n.normalize();var a=new Oe;Oe.sub(a,r,e);var i=a.dot(n);return i}function Ru(r,e){var t=r[r.length-1];t&&t[0]===e[0]&&t[1]===e[1]||r.push(e)}function pue(r,e,t){for(var n=r.length,a=[],i=0;i<n;i++){var o=r[i],s=r[(i+1)%n],l=vue(o[0],o[1],s[0],s[1],e.x,e.y,t.x,t.y);l&&a.push({projPt:due(l,e,t),pt:l,idx:i})}if(a.length<2)return[{points:r},{points:r}];a.sort(function(g,y){return g.projPt-y.projPt});var u=a[0],c=a[a.length-1];if(c.idx<u.idx){var f=u;u=c,c=f}for(var h=[u.pt.x,u.pt.y],v=[c.pt.x,c.pt.y],d=[h],p=[v],i=u.idx+1;i<=c.idx;i++)Ru(d,r[i].slice());Ru(d,v),Ru(d,h);for(var i=c.idx+1;i<=u.idx+n;i++)Ru(p,r[i%n].slice());return Ru(p,h),Ru(p,v),[{points:d},{points:p}]}function OB(r){var e=r.points,t=[],n=[];cd(e,t,n);var a=new Re(t[0],t[1],n[0]-t[0],n[1]-t[1]),i=a.width,o=a.height,s=a.x,l=a.y,u=new Oe,c=new Oe;return i>o?(u.x=c.x=s+i/2,u.y=l,c.y=l+o):(u.y=c.y=l+o/2,u.x=s,c.x=s+i),pue(e,u,c)}function Ag(r,e,t,n){if(t===1)n.push(e);else{var a=Math.floor(t/2),i=r(e);Ag(r,i[0],a,n),Ag(r,i[1],t-a,n)}return n}function gue(r,e){for(var t=[],n=0;n<e;n++)t.push(v_(r));return t}function yue(r,e){e.setStyle(r.style),e.z=r.z,e.z2=r.z2,e.zlevel=r.zlevel}function mue(r){for(var e=[],t=0;t<r.length;)e.push([r[t++],r[t++]]);return e}function _ue(r,e){var t=[],n=r.shape,a;switch(r.type){case"rect":hue(n,e,t),a=Ge;break;case"sector":PB(n,e,t),a=Hr;break;case"circle":PB({r0:0,r:n.r,startAngle:0,endAngle:Math.PI*2,cx:n.cx,cy:n.cy},e,t),a=Hr;break;default:var i=r.getComputedTransform(),o=i?Math.sqrt(Math.max(i[0]*i[0]+i[1]*i[1],i[2]*i[2]+i[3]*i[3])):1,s=J(fue(r.getUpdatedPathProxy(),o),function(y){return mue(y)}),l=s.length;if(l===0)Ag(OB,{points:s[0]},e,t);else if(l===e)for(var u=0;u<l;u++)t.push({points:s[u]});else{var c=0,f=J(s,function(y){var m=[],_=[];cd(y,m,_);var b=(_[1]-m[1])*(_[0]-m[0]);return c+=b,{poly:y,area:b}});f.sort(function(y,m){return m.area-y.area});for(var h=e,u=0;u<l;u++){var v=f[u];if(h<=0)break;var d=u===l-1?h:Math.ceil(v.area/c*e);d<0||(Ag(OB,{points:v.poly},d,t),h-=d)}}a=Gr;break}if(!a)return gue(r,e);for(var p=[],u=0;u<t.length;u++){var g=new a;g.setShape(t[u]),yue(r,g),p.push(g)}return p}function bue(r,e){var t=r.length,n=e.length;if(t===n)return[r,e];for(var a=[],i=[],o=t<n?r:e,s=Math.min(t,n),l=Math.abs(n-t)/6,u=(s-2)/6,c=Math.ceil(l/u)+1,f=[o[0],o[1]],h=l,v=2;v<s;){var d=o[v-2],p=o[v-1],g=o[v++],y=o[v++],m=o[v++],_=o[v++],b=o[v++],w=o[v++];if(h<=0){f.push(g,y,m,_,b,w);continue}for(var x=Math.min(h,c-1)+1,S=1;S<=x;S++){var T=S/x;Zi(d,g,m,b,T,a),Zi(p,y,_,w,T,i),d=a[3],p=i[3],f.push(a[1],i[1],a[2],i[2],d,p),g=a[5],y=i[5],m=a[6],_=i[6]}h-=x-1}return o===r?[f,e]:[r,f]}function RB(r,e){for(var t=r.length,n=r[t-2],a=r[t-1],i=[],o=0;o<e.length;)i[o++]=n,i[o++]=a;return i}function xue(r,e){for(var t,n,a,i=[],o=[],s=0;s<Math.max(r.length,e.length);s++){var l=r[s],u=e[s],c=void 0,f=void 0;l?u?(t=bue(l,u),c=t[0],f=t[1],n=c,a=f):(f=RB(a||l,l),c=l):(c=RB(n||u,u),f=u),i.push(c),o.push(f)}return[i,o]}function NB(r){for(var e=0,t=0,n=0,a=r.length,i=0,o=a-2;i<a;o=i,i+=2){var s=r[o],l=r[o+1],u=r[i],c=r[i+1],f=s*c-u*l;e+=f,t+=(s+u)*f,n+=(l+c)*f}return e===0?[r[0]||0,r[1]||0]:[t/e/3,n/e/3,e]}function wue(r,e,t,n){for(var a=(r.length-2)/6,i=1/0,o=0,s=r.length,l=s-2,u=0;u<a;u++){for(var c=u*6,f=0,h=0;h<s;h+=2){var v=h===0?c:(c+h-2)%l+2,d=r[v]-t[0],p=r[v+1]-t[1],g=e[h]-n[0],y=e[h+1]-n[1],m=g-d,_=y-p;f+=m*m+_*_}f<i&&(i=f,o=u)}return o}function Sue(r){for(var e=[],t=r.length,n=0;n<t;n+=2)e[n]=r[t-n-2],e[n+1]=r[t-n-1];return e}function Cue(r,e,t,n){for(var a=[],i,o=0;o<r.length;o++){var s=r[o],l=e[o],u=NB(s),c=NB(l);i==null&&(i=u[2]<0!=c[2]<0);var f=[],h=[],v=0,d=1/0,p=[],g=s.length;i&&(s=Sue(s));for(var y=wue(s,l,u,c)*6,m=g-2,_=0;_<m;_+=2){var b=(y+_)%m+2;f[_+2]=s[b]-u[0],f[_+3]=s[b+1]-u[1]}if(f[0]=s[y]-u[0],f[1]=s[y+1]-u[1],t>0)for(var w=n/t,x=-n/2;x<=n/2;x+=w){for(var S=Math.sin(x),T=Math.cos(x),D=0,_=0;_<s.length;_+=2){var M=f[_],A=f[_+1],I=l[_]-c[0],P=l[_+1]-c[1],E=I*T-P*S,O=I*S+P*T;p[_]=E,p[_+1]=O;var N=E-M,V=O-A;D+=N*N+V*V}if(D<d){d=D,v=x;for(var $=0;$<p.length;$++)h[$]=p[$]}}else for(var U=0;U<g;U+=2)h[U]=l[U]-c[0],h[U+1]=l[U+1]-c[1];a.push({from:f,to:h,fromCp:u,toCp:c,rotation:-v})}return a}function Lg(r){return r.__isCombineMorphing}var kB="__mOriginal_";function Ig(r,e,t){var n=kB+e,a=r[n]||r[e];r[n]||(r[n]=r[e]);var i=t.replace,o=t.after,s=t.before;r[e]=function(){var l=arguments,u;return s&&s.apply(this,l),i?u=i.apply(this,l):u=a.apply(this,l),o&&o.apply(this,l),u}}function mh(r,e){var t=kB+e;r[t]&&(r[e]=r[t],r[t]=null)}function BB(r,e){for(var t=0;t<r.length;t++)for(var n=r[t],a=0;a<n.length;){var i=n[a],o=n[a+1];n[a++]=e[0]*i+e[2]*o+e[4],n[a++]=e[1]*i+e[3]*o+e[5]}}function zB(r,e){var t=r.getUpdatedPathProxy(),n=e.getUpdatedPathProxy(),a=xue(Xw(t),Xw(n)),i=a[0],o=a[1],s=r.getComputedTransform(),l=e.getComputedTransform();function u(){this.transform=null}s&&BB(i,s),l&&BB(o,l),Ig(e,"updateTransform",{replace:u}),e.transform=null;var c=Cue(i,o,10,Math.PI),f=[];Ig(e,"buildPath",{replace:function(h){for(var v=e.__morphT,d=1-v,p=[],g=0;g<c.length;g++){var y=c[g],m=y.from,_=y.to,b=y.rotation*v,w=y.fromCp,x=y.toCp,S=Math.sin(b),T=Math.cos(b);yc(p,w,x,v);for(var D=0;D<m.length;D+=2){var M=m[D],A=m[D+1],I=_[D],P=_[D+1],E=M*d+I*v,O=A*d+P*v;f[D]=E*T-O*S+p[0],f[D+1]=E*S+O*T+p[1]}var N=f[0],V=f[1];h.moveTo(N,V);for(var D=2;D<m.length;){var I=f[D++],P=f[D++],$=f[D++],U=f[D++],Y=f[D++],ae=f[D++];N===I&&V===P&&$===Y&&U===ae?h.lineTo(Y,ae):h.bezierCurveTo(I,P,$,U,Y,ae),N=Y,V=ae}}}})}function Kw(r,e,t){if(!r||!e)return e;var n=t.done,a=t.during;zB(r,e),e.__morphT=0;function i(){mh(e,"buildPath"),mh(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape()}return e.animateTo({__morphT:1},me({during:function(o){e.dirtyShape(),a&&a(o)},done:function(){i(),n&&n()}},t)),e}function Tue(r,e,t,n,a,i){var o=16;r=a===t?0:Math.round(32767*(r-t)/(a-t)),e=i===n?0:Math.round(32767*(e-n)/(i-n));for(var s=0,l,u=(1<<o)/2;u>0;u/=2){var c=0,f=0;(r&u)>0&&(c=1),(e&u)>0&&(f=1),s+=u*u*(3*c^f),f===0&&(c===1&&(r=u-1-r,e=u-1-e),l=r,r=e,e=l)}return s}function Pg(r){var e=1/0,t=1/0,n=-1/0,a=-1/0,i=J(r,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),c=l.x+l.width/2+(u?u[4]:0),f=l.y+l.height/2+(u?u[5]:0);return e=Math.min(c,e),t=Math.min(f,t),n=Math.max(c,n),a=Math.max(f,a),[c,f]}),o=J(i,function(s,l){return{cp:s,z:Tue(s[0],s[1],e,t,n,a),path:r[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function FB(r){return _ue(r.path,r.count)}function Jw(){return{fromIndividuals:[],toIndividuals:[],count:0}}function Due(r,e,t){var n=[];function a(w){for(var x=0;x<w.length;x++){var S=w[x];Lg(S)?a(S.childrenRef()):S instanceof Be&&n.push(S)}}a(r);var i=n.length;if(!i)return Jw();var o=t.dividePath||FB,s=o({path:e,count:i});if(s.length!==i)return console.error("Invalid morphing: unmatched splitted path"),Jw();n=Pg(n),s=Pg(s);for(var l=t.done,u=t.during,c=t.individualDelay,f=new li,h=0;h<i;h++){var v=n[h],d=s[h];d.parent=e,d.copyTransform(f),c||zB(v,d)}e.__isCombineMorphing=!0,e.childrenRef=function(){return s};function p(w){for(var x=0;x<s.length;x++)s[x].addSelfToZr(w)}Ig(e,"addSelfToZr",{after:function(w){p(w)}}),Ig(e,"removeSelfFromZr",{after:function(w){for(var x=0;x<s.length;x++)s[x].removeSelfFromZr(w)}});function g(){e.__isCombineMorphing=!1,e.__morphT=-1,e.childrenRef=null,mh(e,"addSelfToZr"),mh(e,"removeSelfFromZr")}var y=s.length;if(c)for(var m=y,_=function(){m--,m===0&&(g(),l&&l())},h=0;h<y;h++){var b=c?me({delay:(t.delay||0)+c(h,y,n[h],s[h]),done:_},t):t;Kw(n[h],s[h],b)}else e.__morphT=0,e.animateTo({__morphT:1},me({during:function(w){for(var x=0;x<y;x++){var S=s[x];S.__morphT=e.__morphT,S.dirtyShape()}u&&u(w)},done:function(){g();for(var w=0;w<r.length;w++)mh(r[w],"updateTransform");l&&l()}},t));return e.__zr&&p(e.__zr),{fromIndividuals:n,toIndividuals:s,count:y}}function Mue(r,e,t){var n=e.length,a=[],i=t.dividePath||FB;function o(v){for(var d=0;d<v.length;d++){var p=v[d];Lg(p)?o(p.childrenRef()):p instanceof Be&&a.push(p)}}if(Lg(r)){o(r.childrenRef());var s=a.length;if(s<n)for(var l=0,u=s;u<n;u++)a.push(v_(a[l++%s]));a.length=n}else{a=i({path:r,count:n});for(var c=r.getComputedTransform(),u=0;u<a.length;u++)a[u].setLocalTransform(c);if(a.length!==n)return console.error("Invalid morphing: unmatched splitted path"),Jw()}a=Pg(a),e=Pg(e);for(var f=t.individualDelay,u=0;u<n;u++){var h=f?me({delay:(t.delay||0)+f(u,n,a[u],e[u])},t):t;Kw(a[u],e[u],h)}return{fromIndividuals:a,toIndividuals:e,count:e.length}}function VB(r){return K(r[0])}function $B(r,e){for(var t=[],n=r.length,a=0;a<n;a++)t.push({one:r[a],many:[]});for(var a=0;a<e.length;a++){var i=e[a].length,o=void 0;for(o=0;o<i;o++)t[o%n].many.push(e[a][o])}for(var s=0,a=n-1;a>=0;a--)if(!t[a].many.length){var l=t[s].many;if(l.length<=1)if(s)s=0;else return t;var i=l.length,u=Math.ceil(i/2);t[a].many=l.slice(u,i),t[s].many=l.slice(0,u),s++}return t}var Aue={clone:function(r){for(var e=[],t=1-Math.pow(1-r.path.style.opacity,1/r.count),n=0;n<r.count;n++){var a=v_(r.path);a.setStyle("opacity",t),e.push(a)}return e},split:null};function eS(r,e,t,n,a,i){if(!r.length||!e.length)return;var o=Gl("update",n,a);if(!(o&&o.duration>0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,c;VB(r)&&(u=r,c=e),VB(e)&&(u=e,c=r);function f(y,m,_,b,w){var x=y.many,S=y.one;if(x.length===1&&!w){var T=m?x[0]:S,D=m?S:x[0];if(Lg(T))f({many:[T],one:D},!0,_,b,!0);else{var M=s?me({delay:s(_,b)},l):l;Kw(T,D,M),i(T,D,T,D,M)}}else for(var A=me({dividePath:Aue[t],individualDelay:s&&function(V,$,U,Y){return s(V+_,b)}},l),I=m?Due(x,S,A):Mue(S,x,A),P=I.fromIndividuals,E=I.toIndividuals,O=P.length,N=0;N<O;N++){var M=s?me({delay:s(N,O)},l):l;i(P[N],E[N],m?x[N]:y.one,m?y.one:x[N],M)}}for(var h=u?u===r:r.length>e.length,v=u?$B(c,u):$B(h?e:r,[h?r:e]),d=0,p=0;p<v.length;p++)d+=v[p].many.length;for(var g=0,p=0;p<v.length;p++)f(v[p],h,g,d),g+=v[p].many.length}function tl(r){if(!r)return[];if(K(r)){for(var e=[],t=0;t<r.length;t++)e.push(tl(r[t]));return e}var n=[];return r.traverse(function(a){a instanceof Be&&!a.disableMorphing&&!a.invisible&&!a.ignore&&n.push(a)}),n}var HB=1e4,Lue=Ye();function Iue(r){for(var e=r.dimensions,t=0;t<e.length;t++){var n=r.getDimensionInfo(e[t]);if(n&&n.otherDims.itemGroupId===0)return e[t]}}function GB(r){var e=[];return L(r,function(t){var n=t.data;if(!(n.count()>HB))for(var a=n.getIndices(),i=Iue(n),o=0;o<a.length;o++)e.push({dataGroupId:t.dataGroupId,data:n,dim:t.dim||i,divide:t.divide,dataIndex:o})}),e}function tS(r,e,t){r.traverse(function(n){n instanceof Be&&xt(n,{style:{opacity:0}},e,{dataIndex:t,isFrom:!0})})}function rS(r){if(r.parent){var e=r.getComputedTransform();r.setLocalTransform(e),r.parent.remove(r)}}function Nu(r){r.stopAnimation(),r.isGroup&&r.traverse(function(e){e.stopAnimation()})}function Pue(r,e,t){var n=Gl("update",t,e);n&&r.traverse(function(a){if(a instanceof Bn){var i=JW(a);i&&a.animateFrom({style:i},n)}})}function Eue(r,e){var t=r.length;if(t!==e.length)return!1;for(var n=0;n<t;n++){var a=r[n],i=e[n];if(a.data.getId(a.dataIndex)!==i.data.getId(i.dataIndex))return!1}return!0}function WB(r,e,t){var n=GB(r),a=GB(e);function i(y,m,_,b,w){(_||y)&&m.animateFrom({style:_&&_!==y?Q(Q({},_.style),y.style):y.style},w)}function o(y){for(var m=0;m<y.length;m++)if(y[m].dim)return y[m].dim}var s=o(n),l=o(a),u=!1;function c(y,m){return function(_){var b=_.data,w=_.dataIndex;if(m)return b.getId(w);var x=_.dataGroupId,S=y?s||l:l||s,T=S&&b.getDimensionInfo(S),D=T&&T.ordinalMeta;if(T){var M=b.get(T.name,w);return D&&D.categories[M]||M+""}var A=b.getRawDataItem(w);return A&&A.groupId?A.groupId+"":x||b.getId(w)}}var f=Eue(n,a),h={};if(!f)for(var v=0;v<a.length;v++){var d=a[v],p=d.data.getItemGraphicEl(d.dataIndex);p&&(h[p.id]=!0)}function g(y,m){var _=n[m],b=a[y],w=b.data.hostModel,x=_.data.getItemGraphicEl(_.dataIndex),S=b.data.getItemGraphicEl(b.dataIndex);if(x===S){S&&Pue(S,b.dataIndex,w);return}x&&h[x.id]||S&&(Nu(S),x?(Nu(x),rS(x),u=!0,eS(tl(x),tl(S),b.divide,w,y,i)):tS(S,w,y))}new pi(n,a,c(!0,f),c(!1,f),null,"multiple").update(g).updateManyToOne(function(y,m){var _=a[y],b=_.data,w=b.hostModel,x=b.getItemGraphicEl(_.dataIndex),S=nt(J(m,function(T){return n[T].data.getItemGraphicEl(n[T].dataIndex)}),function(T){return T&&T!==x&&!h[T.id]});x&&(Nu(x),S.length?(L(S,function(T){Nu(T),rS(T)}),u=!0,eS(tl(S),tl(x),_.divide,w,y,i)):tS(x,w,_.dataIndex))}).updateOneToMany(function(y,m){var _=n[m],b=_.data.getItemGraphicEl(_.dataIndex);if(!(b&&h[b.id])){var w=nt(J(y,function(S){return a[S].data.getItemGraphicEl(a[S].dataIndex)}),function(S){return S&&S!==b}),x=a[y[0]].data.hostModel;w.length&&(L(w,function(S){return Nu(S)}),b?(Nu(b),rS(b),u=!0,eS(tl(b),tl(w),_.divide,x,y[0],i)):L(w,function(S){return tS(S,x,y[0])}))}}).updateManyToMany(function(y,m){new pi(m,y,function(_){return n[_].data.getId(n[_].dataIndex)},function(_){return a[_].data.getId(a[_].dataIndex)}).update(function(_,b){g(y[_],m[b])}).execute()}).execute(),u&&L(e,function(y){var m=y.data,_=m.hostModel,b=_&&t.getViewOfSeriesModel(_),w=Gl("update",_,0);b&&_.isAnimationEnabled()&&w&&w.duration>0&&b.group.traverse(function(x){x instanceof Be&&!x.animators.length&&x.animateFrom({style:{opacity:0}},w)})})}function UB(r){var e=r.getModel("universalTransition").get("seriesKey");return e||r.id}function jB(r){return K(r)?r.sort().join(","):r}function Ao(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function Oue(r,e){var t=ge(),n=ge(),a=ge();return L(r.oldSeries,function(i,o){var s=r.oldDataGroupIds[o],l=r.oldData[o],u=UB(i),c=jB(u);n.set(c,{dataGroupId:s,data:l}),K(u)&&L(u,function(f){a.set(f,{key:c,dataGroupId:s,data:l})})}),L(e.updatedSeries,function(i){if(i.isUniversalTransitionEnabled()&&i.isAnimationEnabled()){var o=i.get("dataGroupId"),s=i.getData(),l=UB(i),u=jB(l),c=n.get(u);if(c)t.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:Ao(c.data),data:c.data}],newSeries:[{dataGroupId:o,divide:Ao(s),data:s}]});else if(K(l)){var f=[];L(l,function(d){var p=n.get(d);p.data&&f.push({dataGroupId:p.dataGroupId,divide:Ao(p.data),data:p.data})}),f.length&&t.set(u,{oldSeries:f,newSeries:[{dataGroupId:o,data:s,divide:Ao(s)}]})}else{var h=a.get(l);if(h){var v=t.get(h.key);v||(v={oldSeries:[{dataGroupId:h.dataGroupId,data:h.data,divide:Ao(h.data)}],newSeries:[]},t.set(h.key,v)),v.newSeries.push({dataGroupId:o,data:s,divide:Ao(s)})}}}}),t}function YB(r,e){for(var t=0;t<r.length;t++){var n=e.seriesIndex!=null&&e.seriesIndex===r[t].seriesIndex||e.seriesId!=null&&e.seriesId===r[t].id;if(n)return t}}function Rue(r,e,t,n){var a=[],i=[];L(st(r.from),function(o){var s=YB(e.oldSeries,o);s>=0&&a.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:Ao(e.oldData[s]),dim:o.dimension})}),L(st(r.to),function(o){var s=YB(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();i.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:Ao(l),dim:o.dimension})}}),a.length>0&&i.length>0&&WB(a,i,n)}function Nue(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,n){L(st(n.seriesTransition),function(a){L(st(a.to),function(i){for(var o=n.updatedSeries,s=0;s<o.length;s++)(i.seriesIndex!=null&&i.seriesIndex===o[s].seriesIndex||i.seriesId!=null&&i.seriesId===o[s].id)&&(o[s][qd]=!0)})})}),r.registerUpdateLifecycle("series:transition",function(e,t,n){var a=Lue(t);if(a.oldSeries&&n.updatedSeries&&n.optionChanged){var i=n.seriesTransition;if(i)L(st(i),function(v){Rue(v,a,n,t)});else{var o=Oue(a,n);L(o.keys(),function(v){var d=o.get(v);WB(d.oldSeries,d.newSeries,t)})}L(n.updatedSeries,function(v){v[qd]&&(v[qd]=!1)})}for(var s=e.getSeries(),l=a.oldSeries=[],u=a.oldDataGroupIds=[],c=a.oldData=[],f=0;f<s.length;f++){var h=s[f].getData();h.count()<HB&&(l.push(s[f]),u.push(s[f].get("dataGroupId")),c.push(h))}})}ke([KY]),ke([UY]),ke([wq,Vq,Jq,VZ,nX,QX,AQ,dK,HK,QK,lJ,hee,Fee,Kee,mte,Tte,Gte,Jte,hre,bre,Ore,mne]),ke($ne),ke(xae),ke(jO),ke(zae),ke(dN),ke(Uae),ke(eie),ke(toe),ke(Coe),ke(uh),ke(Woe),ke(Yoe),ke(lse),ke(mse),ke(Dse),ke(Rse),ke(qse),ke(gle),ke(nB),ke(sB),ke(Gle),ke(SB),ke(TB),ke(qle),ke(sue),ke(cue),ke(Nue),ke(fY);var kue=Object.freeze(Object.defineProperty({__proto__:null,registerLocale:M_,version:q6,dependencies:Z6,PRIORITY:vI,init:hU,connect:vU,disConnect:AI,disconnect:dU,dispose:pU,getInstanceByDom:A1,getInstanceById:gU,registerTheme:L1,registerPreprocessor:I1,registerProcessor:P1,registerPostInit:LI,registerPostUpdate:II,registerUpdateLifecycle:hp,registerAction:ma,registerCoordinateSystem:PI,getCoordinateSystemDimensions:yU,registerLayout:EI,registerVisual:vo,registerLoading:O1,setCanvasCreator:mU,registerMap:RI,getMap:_U,registerTransform:NI,dataTool:bU,throttle:Qd,use:ke,setPlatformAPI:$T,parseGeoJSON:X1,parseGeoJson:X1,env:Ue,Model:lt,Axis:Un,innerDrawElementOnCanvas:v1,zrender:HG,matrix:LH,vector:vH,zrUtil:oH,color:nG,helper:Mj,number:Oj,time:Rj,graphic:Nj,format:kj,util:Bj,List:Er,ComponentModel:$e,ComponentView:wt,SeriesModel:yt,ChartView:ut,extendComponentModel:qj,extendComponentView:Zj,extendSeriesModel:Xj,extendChartView:Qj},Symbol.toStringTag,{value:"Module"})),rl={},ku={},qB={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var e=1,t=function(){return"".concat(e++)};r.default=t})(qB);var Eg={},Og={},nS={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var e=function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,i=null;return function(){for(var o=this,s=arguments.length,l=new Array(s),u=0;u<s;u++)l[u]=arguments[u];clearTimeout(i),i=setTimeout(function(){n.apply(o,l)},a)}};r.default=e})(nS);var Ci={};Object.defineProperty(Ci,"__esModule",{value:!0}),Ci.SensorTabIndex=Ci.SensorClassName=Ci.SizeSensorId=void 0;var Bue="size-sensor-id";Ci.SizeSensorId=Bue;var zue="size-sensor-object";Ci.SensorClassName=zue;var Fue="-1";Ci.SensorTabIndex=Fue,Object.defineProperty(Og,"__esModule",{value:!0}),Og.createSensor=void 0;var Vue=$ue(nS),ZB=Ci;function $ue(r){return r&&r.__esModule?r:{default:r}}var Hue=function(e){var t=void 0,n=[],a=function(){getComputedStyle(e).position==="static"&&(e.style.position="relative");var c=document.createElement("object");return c.onload=function(){c.contentDocument.defaultView.addEventListener("resize",i),i()},c.style.display="block",c.style.position="absolute",c.style.top="0",c.style.left="0",c.style.height="100%",c.style.width="100%",c.style.overflow="hidden",c.style.pointerEvents="none",c.style.zIndex="-1",c.style.opacity="0",c.setAttribute("class",ZB.SensorClassName),c.setAttribute("tabindex",ZB.SensorTabIndex),c.type="text/html",e.appendChild(c),c.data="about:blank",c},i=(0,Vue.default)(function(){n.forEach(function(u){u(e)})}),o=function(c){t||(t=a()),n.indexOf(c)===-1&&n.push(c)},s=function(){t&&t.parentNode&&(t.contentDocument&&t.contentDocument.defaultView.removeEventListener("resize",i),t.parentNode.removeChild(t),t=void 0,n=[])},l=function(c){var f=n.indexOf(c);f!==-1&&n.splice(f,1),n.length===0&&t&&s()};return{element:e,bind:o,destroy:s,unbind:l}};Og.createSensor=Hue;var Rg={};Object.defineProperty(Rg,"__esModule",{value:!0}),Rg.createSensor=void 0;var Gue=Wue(nS);function Wue(r){return r&&r.__esModule?r:{default:r}}var Uue=function(e){var t=void 0,n=[],a=(0,Gue.default)(function(){n.forEach(function(u){u(e)})}),i=function(){var c=new ResizeObserver(a);return c.observe(e),a(),c},o=function(c){t||(t=i()),n.indexOf(c)===-1&&n.push(c)},s=function(){t.disconnect(),n=[],t=void 0},l=function(c){var f=n.indexOf(c);f!==-1&&n.splice(f,1),n.length===0&&t&&s()};return{element:e,bind:o,destroy:s,unbind:l}};Rg.createSensor=Uue,Object.defineProperty(Eg,"__esModule",{value:!0}),Eg.createSensor=void 0;var jue=Og,Yue=Rg,que=typeof ResizeObserver!="undefined"?Yue.createSensor:jue.createSensor;Eg.createSensor=que,Object.defineProperty(ku,"__esModule",{value:!0}),ku.removeSensor=ku.getSensor=void 0;var Zue=Que(qB),Xue=Eg,Ng=Ci;function Que(r){return r&&r.__esModule?r:{default:r}}var _h={},Kue=function(e){var t=e.getAttribute(Ng.SizeSensorId);if(t&&_h[t])return _h[t];var n=(0,Zue.default)();e.setAttribute(Ng.SizeSensorId,n);var a=(0,Xue.createSensor)(e);return _h[n]=a,a};ku.getSensor=Kue;var Jue=function(e){var t=e.element.getAttribute(Ng.SizeSensorId);e.element.removeAttribute(Ng.SizeSensorId),e.destroy(),t&&_h[t]&&delete _h[t]};ku.removeSensor=Jue,Object.defineProperty(rl,"__esModule",{value:!0}),rl.ver=QB=rl.clear=XB=rl.bind=void 0;var aS=ku,ece=function(e,t){var n=(0,aS.getSensor)(e);return n.bind(t),function(){n.unbind(t)}},XB=rl.bind=ece,tce=function(e){var t=(0,aS.getSensor)(e);(0,aS.removeSensor)(t)},QB=rl.clear=tce,rce="1.0.1";rl.ver=rce;function KB(r,e){var t={};return e.forEach(function(n){t[n]=r[n]}),t}function iS(r){return typeof r=="function"}function nce(r){return typeof r=="string"}var Bu=function r(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,a,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(a=n;a--!==0;)if(!r(e[a],t[a]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(a=n;a--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[a]))return!1;for(a=n;a--!==0;){var o=i[a];if(!r(e[o],t[o]))return!1}return!0}return e!==e&&t!==t},ace=function(r){FT(e,r);function e(t){var n=r.call(this,t)||this;return n.echarts=t.echarts,n.ele=null,n.isInitialResize=!0,n}return e.prototype.componentDidMount=function(){this.renderNewEcharts()},e.prototype.componentDidUpdate=function(t){var n=this.props.shouldSetOption;if(!(iS(n)&&!n(t,this.props))){if(!Bu(t.theme,this.props.theme)||!Bu(t.opts,this.props.opts)||!Bu(t.onEvents,this.props.onEvents)){this.dispose(),this.renderNewEcharts();return}var a=["option","notMerge","lazyUpdate","showLoading","loadingOption"];Bu(KB(this.props,a),KB(t,a))||this.updateEChartsOption(),(!Bu(t.style,this.props.style)||!Bu(t.className,this.props.className))&&this.resize()}},e.prototype.componentWillUnmount=function(){this.dispose()},e.prototype.getEchartsInstance=function(){return this.echarts.getInstanceByDom(this.ele)||this.echarts.init(this.ele,this.props.theme,this.props.opts)},e.prototype.dispose=function(){if(this.ele){try{QB(this.ele)}catch(t){console.warn(t)}this.echarts.dispose(this.ele)}},e.prototype.renderNewEcharts=function(){var t=this,n=this.props,a=n.onEvents,i=n.onChartReady,o=this.updateEChartsOption();this.bindEvents(o,a||{}),iS(i)&&i(o),this.ele&&XB(this.ele,function(){t.resize()})},e.prototype.bindEvents=function(t,n){function a(o,s){nce(o)&&iS(s)&&t.on(o,function(l){s(l,t)})}for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&a(i,n[i])},e.prototype.updateEChartsOption=function(){var t=this.props,n=t.option,a=t.notMerge,i=a===void 0?!1:a,o=t.lazyUpdate,s=o===void 0?!1:o,l=t.showLoading,u=t.loadingOption,c=u===void 0?null:u,f=this.getEchartsInstance();return f.setOption(n,i,s),l?f.showLoading(c):f.hideLoading(),f},e.prototype.resize=function(){var t=this.getEchartsInstance();if(!this.isInitialResize)try{t.resize()}catch(n){console.warn(n)}this.isInitialResize=!1},e.prototype.render=function(){var t=this,n=this.props,a=n.style,i=n.className,o=i===void 0?"":i,s=Dm({height:300},a);return C("div",{ref:function(l){t.ele=l},style:s,className:"echarts-for-react "+o})},e}(B.PureComponent),ot=function(r){FT(e,r);function e(t){var n=r.call(this,t)||this;return n.echarts=kue,n}return e}(ace);const kg=(r,e)=>{r==="external"?window.open(e,"_blank"):window.location.replace(e)},JB=(r,e,t)=>{const{card:n}=r;switch(!0){case!n.isEnable:return;case n.dynamic==="metricId":{const a=n.route.replace("{{metric.metricId}}",e);kg(n.routeType,a);break}case n.dynamic==="uuid":{const a=n.route.replace("{{metric.uuid}}",t);kg(n.routeType,a);break}case n.dynamic==="none":{kg(n.routeType,n.route);break}default:console.warn("Unhandled click behaviour configuration");break}},Wt=(r,e)=>{if(r.isEnable){const t=r.route.replace("{{value}}",`${e}`.replace(/"/g,""));kg(r.routeType,t)}},ice=({data:r,margins:e,legendSettings:t,labelSettings:n,axisSettings:a,enableSaveAs:i,colors:o,updateGroup:s,isEnableGroupBy:l,backGroundColor:u,customSettings:c,chartClickConfig:f})=>{var v;const h={toolbox:{feature:{saveAsImage:i&&{name:"databrain"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},...o!=null&&o.length?{color:o}:{},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"cross",label:{backgroundColor:"#6a7985"}}},legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,data:r.datasets.map(d=>d.label)},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},xAxis:[{type:"category",boundaryGap:!1,data:r.labels,splitLine:{show:(c==null?void 0:c.hideSplitLines)==="horizontal"||(c==null?void 0:c.hideSplitLines)==="none"},axisLine:{show:(c==null?void 0:c.hideAxisLines)==="y"||(c==null?void 0:c.hideAxisLines)==="none"},axisLabel:{show:(c==null?void 0:c.axisLabels)==="y"||(c==null?void 0:c.axisLabels)==="none"}}],yAxis:[{type:"value",position:a.axis,splitLine:{show:(c==null?void 0:c.hideSplitLines)==="vertical"||(c==null?void 0:c.hideSplitLines)==="none"},axisLine:{show:(c==null?void 0:c.hideAxisLines)==="x"||(c==null?void 0:c.hideAxisLines)==="none"},axisLabel:{show:(c==null?void 0:c.axisLabels)==="x"||(c==null?void 0:c.axisLabels)==="none"}}],series:(v=r.datasets)==null?void 0:v.map(d=>({data:d.data,type:"line",name:d.label,stack:"Total",areaStyle:{},emphasis:{focus:"series"},label:{show:n.show,position:n.position},showBackground:u==null?void 0:u.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"}}))};return z(Ce,{children:[!l&&C(ot,{style:{width:"100%",height:"90%"},option:h,onEvents:{click:d=>{var p;Wt(f,((p=d==null?void 0:d.name)==null?void 0:p.split(" ").join("_"))||"undefined")}}}),l&&s&&C(ot,{style:{width:"100%",height:"90%"},option:h,onEvents:{click:d=>{s(d.name)}}})]})},oce=({data:r,colors:e,updateGroup:t,isEnableGroupBy:n,backGroundColor:a,legendSettings:i,labelSettings:o,axisSettings:s,margins:l,customSettings:u,chartClickConfig:c})=>{var h,v;const f={toolbox:{feature:{saveAsImage:{name:"databrain"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"}},...e!=null&&e.length?{color:e}:{},grid:{left:`${l.marginLeft}%`,bottom:`${l.marginBottom}%`,top:`${l.marginTop}%`,right:`${l.marginRight}%`,containLabel:!0},xAxis:{type:"category",data:r.labels,axisTick:{alignWithLabel:!0},axisLabel:{show:(u==null?void 0:u.axisLabels)==="y"||(u==null?void 0:u.axisLabels)==="none",interval:0,rotate:50,hideOverlap:!0,overflow:"truncate"},splitLine:{show:(u==null?void 0:u.hideSplitLines)==="horizontal"||(u==null?void 0:u.hideSplitLines)==="none"},axisLine:{show:(u==null?void 0:u.hideAxisLines)==="y"||(u==null?void 0:u.hideAxisLines)==="none"}},yAxis:{type:"value",position:s.axis,splitLine:{show:(u==null?void 0:u.hideSplitLines)==="vertical"||(u==null?void 0:u.hideSplitLines)==="none"},axisLine:{show:(u==null?void 0:u.hideAxisLines)==="x"||(u==null?void 0:u.hideAxisLines)==="none"},axisLabel:{show:(u==null?void 0:u.axisLabels)==="x"||(u==null?void 0:u.axisLabels)==="none"}},legend:{data:(h=r.datasets)==null?void 0:h.map(d=>d.label),show:i.show,top:i.top,left:i.left,right:i.right,bottom:i.bottom,orient:i.position},series:(v=r.datasets)==null?void 0:v.map(d=>({data:d.data,type:"bar",name:d.label,barWidth:`${(u==null?void 0:u.barWidth)||0}%`,label:{show:o.show,position:o.position},showBackground:a==null?void 0:a.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"},itemStyle:{borderRadius:u==null?void 0:u.barRadius}}))};return z(Ce,{children:[!n&&C(ot,{style:{width:"100%",height:"90%"},option:f,onEvents:{click:d=>{var p;Wt(c,((p=d==null?void 0:d.name)==null?void 0:p.split(" ").join("_"))||"undefined")}}}),n&&t&&C(ot,{style:{width:"100%",height:"90%"},option:f,onEvents:{click:d=>{t(d.name)}}})]})},sce=({data:r,margins:e,legendSettings:t,labelSettings:n,enableSaveAs:a,colors:i,updateGroup:o,isEnableGroupBy:s,backGroundColor:l,customSettings:u,chartClickConfig:c})=>{var d;const f=["bar","line"];let h=1;const v={grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},...i!=null&&i.length?{color:i}:{},toolbox:{feature:{saveAsImage:a&&{name:"databrain"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"cross",crossStyle:{color:"#999"}}},legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,data:r.datasets.map(p=>p.label)},xAxis:[{type:"category",data:r.labels,axisPointer:{type:"shadow"},splitLine:{show:(u==null?void 0:u.hideSplitLines)==="horizontal"||(u==null?void 0:u.hideSplitLines)==="none"},axisLine:{show:(u==null?void 0:u.hideAxisLines)==="y"||(u==null?void 0:u.hideAxisLines)==="none"},axisLabel:{show:(u==null?void 0:u.axisLabels)==="y"||(u==null?void 0:u.axisLabels)==="none"}}],yAxis:[{type:"value",min:0,max:9e3,interval:3e3,splitLine:{show:(u==null?void 0:u.hideSplitLines)==="vertical"||(u==null?void 0:u.hideSplitLines)==="none"},axisLine:{show:(u==null?void 0:u.hideAxisLines)==="x"||(u==null?void 0:u.hideAxisLines)==="none"},axisLabel:{show:(u==null?void 0:u.axisLabels)==="x"||(u==null?void 0:u.axisLabels)==="none"}},{type:"value",min:0,max:25,interval:5,splitLine:{show:(u==null?void 0:u.hideSplitLines)==="vertical"||(u==null?void 0:u.hideSplitLines)==="none"},axisLine:{show:(u==null?void 0:u.hideAxisLines)==="x"||(u==null?void 0:u.hideAxisLines)==="none"},axisLabel:{show:(u==null?void 0:u.axisLabels)==="x"||(u==null?void 0:u.axisLabels)==="none"}}],series:(d=r.datasets)==null?void 0:d.map(p=>(h===0?h=1:h=0,{name:p.label,type:f[h],tooltip:{valueFormatter(g){return`${g}`}},data:p.data,label:{show:n.show,position:n.position},showBackground:l.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"}}))};return z(Ce,{children:[!s&&C(ot,{style:{width:"100%",height:"90%"},option:v,onEvents:{click:p=>{var g;Wt(c,((g=p==null?void 0:p.name)==null?void 0:g.split(" ").join("_"))||"undefined")}}}),s&&o&&C(ot,{style:{width:"100%",height:"90%"},option:v,onEvents:{click:p=>{o(p.name)}}})]})},lce=({data:r,margins:e,legendSettings:t,labelSettings:n,axisSettings:a,enableSaveAs:i,colors:o,updateGroup:s,isEnableGroupBy:l,customSettings:u,chartClickConfig:c})=>{var h,v;const f={tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"line",lineStyle:{color:"rgba(0,0,0,0.2)",width:1,type:"solid"}}},...o!=null&&o.length?{color:o}:{},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},toolbox:{feature:{saveAsImage:i&&{name:"databrain"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},xAxis:{type:"category",boundaryGap:!1,data:r.labels,splitLine:{show:u.hideSplitLines==="horizontal"||u.hideSplitLines==="none"},axisLine:{show:u.hideAxisLines==="y"||u.hideAxisLines==="none"},axisLabel:{show:u.axisLabels==="y"||u.axisLabels==="none"}},yAxis:{type:"value",position:a.axis,splitLine:{show:u.hideSplitLines==="vertical"||u.hideSplitLines==="none"},axisLine:{show:u.hideAxisLines==="x"||u.hideAxisLines==="none"},axisLabel:{show:u.axisLabels==="x"||u.axisLabels==="none"}},legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,data:(h=r.datasets)==null?void 0:h.map(d=>d.label)},series:(v=r.datasets)==null?void 0:v.map(d=>({data:d.data,type:"line",name:d.label,label:{show:n.show,position:n.position},emphasis:{focus:"series"}}))};return z(Ce,{children:[!l&&C(ot,{style:{width:"100%",height:"90%"},option:f}),l&&s&&C(ot,{style:{width:"100%",height:"90%"},option:f,onEvents:{click:d=>{Wt(c,d.name)}}})]})},uce=({data:r,margins:e,legendSettings:t,labelSettings:n,enableSaveAs:a,colors:i,updateGroup:o,isEnableGroupBy:s,chartClickConfig:l})=>{var f,h,v;if(((h=(f=r==null?void 0:r.datasets[0])==null?void 0:f.data)==null?void 0:h.length)>1){const d=[];let p=100;(v=r==null?void 0:r.datasets)==null||v.map(y=>{const m=[];let _=0;y.data.map(b=>{const w={value:b,name:r.labels[_]};m.push(w),_+=1}),d.push([y.label,m])});const g={toolbox:{feature:{saveAsImage:a&&{name:"databrain"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},tooltip:{trigger:"item",backgroundColor:"black",textStyle:{color:"white"}},...i!=null&&i.length?{color:i}:{},legend:{show:t.show,top:t.position==="horizontal"?"420px":t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,type:"scroll"},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},series:d.map(y=>(p-=20,{name:y[0],type:"pie",radius:`${p}%`,data:y[1],emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},label:{show:n.show,position:n.position},labelLine:{show:!1}}))};return z(Ce,{children:[s&&C(Ce,{children:C(ot,{style:{width:"100%",height:"100%"},option:g,onEvents:{click:y=>{o(y.name)}}})}),!s&&C(Ce,{children:C(ot,{style:{width:"100%",height:"100%"},option:g,onEvents:{click:y=>{var m;Wt(l,((m=y==null?void 0:y.name)==null?void 0:m.split(" ").join("_"))||"undefined")}}})})]})}const u=r==null?void 0:r.datasets.map((d,p)=>({value:d.data,name:r==null?void 0:r.labels[p]})),c={toolbox:{feature:{saveAsImage:a&&{name:"databrain"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},tooltip:{trigger:"item",backgroundColor:"black",textStyle:{color:"white"}},...i!=null&&i.length?{color:i}:{},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},legend:{data:r==null?void 0:r.labels,show:t.show,top:t.position==="horizontal"?"420px":t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,type:"scroll"},series:{type:"pie",radius:"80%",data:u,label:{show:!1},labelLine:{show:!1}}};return C(Ce,{children:z(Ce,{children:[s&&C(Ce,{children:C(ot,{style:{width:"100%",height:"100%"},option:c,onEvents:{click:d=>{o(d.name)}}})}),!s&&C(Ce,{children:C(ot,{style:{width:"100%",height:"100%"},option:c,onEvents:{click:d=>{var p;Wt(l,((p=d==null?void 0:d.name)==null?void 0:p.split(" ").join("_"))||"undefined")}}})})]})})},cce=({data:r,margins:e,legendSettings:t,labelSettings:n,enableSaveAs:a,colors:i,updateGroup:o,isEnableGroupBy:s,backGroundColor:l,customSettings:u,chartClickConfig:c})=>{var h;const f={toolbox:{feature:{saveAsImage:a&&{name:"databrain"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},...i!=null&&i.length?{color:i}:{},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"cross",label:{backgroundColor:"#6a7985"}}},legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,data:r.datasets.map(v=>v.label)},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},xAxis:{type:"value",boundaryGap:[0,.01],splitLine:{show:(u==null?void 0:u.hideSplitLines)==="horizontal"||(u==null?void 0:u.hideSplitLines)==="none"},axisLine:{show:(u==null?void 0:u.hideAxisLines)==="y"||(u==null?void 0:u.hideAxisLines)==="none"},axisLabel:{show:(u==null?void 0:u.axisLabels)==="y"||(u==null?void 0:u.axisLabels)==="none"}},yAxis:{type:"category",data:r.labels,splitLine:{show:(u==null?void 0:u.hideSplitLines)==="vertical"||(u==null?void 0:u.hideSplitLines)==="none"},axisLine:{show:(u==null?void 0:u.hideAxisLines)==="x"||(u==null?void 0:u.hideAxisLines)==="none"},axisLabel:{show:(u==null?void 0:u.axisLabels)==="x"||(u==null?void 0:u.axisLabels)==="none"}},series:(h=r.datasets)==null?void 0:h.map(v=>({data:v.data,type:"bar",name:v.label,barWidth:`${u==null?void 0:u.barWidth}%`,emphasis:{focus:"series"},label:{show:n.show,position:n.position},showBackground:l.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"},itemStyle:{borderRadius:u==null?void 0:u.barRadius}}))};return z(Ce,{children:[!s&&C(ot,{style:{width:"100%",height:"90%"},option:f,onEvents:{click:v=>{var d;Wt(c,((d=v==null?void 0:v.name)==null?void 0:d.split(" ").join("_"))||"undefined")}}}),s&&o&&C(ot,{style:{width:"100%",height:"90%"},option:f,onEvents:{click:v=>{o(v.name)}}})]})},fce=({data:r,margins:e,legendSettings:t,labelSettings:n,axisSettings:a,enableSaveAs:i,colors:o,updateGroup:s,isEnableGroupBy:l,backGroundColor:u,customSettings:c,chartClickConfig:f})=>{var v;const h={toolbox:{feature:{saveAsImage:i&&{name:"databrain"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},...o!=null&&o.length?{color:o}:{},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"},formatter:d=>`${d.map(p=>`${p.seriesName}: ${p.value}<br />`).join("")}`},xAxis:{type:"category",data:r.labels,splitLine:{show:(c==null?void 0:c.hideSplitLines)==="horizontal"||(c==null?void 0:c.hideSplitLines)==="none"},axisLine:{show:(c==null?void 0:c.hideAxisLines)==="y"||(c==null?void 0:c.hideAxisLines)==="none"},axisLabel:{show:(c==null?void 0:c.axisLabels)==="y"||(c==null?void 0:c.axisLabels)==="none"}},yAxis:{type:"value",position:a.axis,splitLine:{show:(c==null?void 0:c.hideSplitLines)==="vertical"||(c==null?void 0:c.hideSplitLines)==="none"},axisLine:{show:(c==null?void 0:c.hideAxisLines)==="x"||(c==null?void 0:c.hideAxisLines)==="none"},axisLabel:{show:(c==null?void 0:c.axisLabels)==="x"||(c==null?void 0:c.axisLabels)==="none"}},legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,data:r.datasets.map(d=>d.label)},series:(v=r.datasets)==null?void 0:v.map(d=>({symbolSize:10,data:d.data,type:"scatter",name:d.label,label:{show:n.show,position:n.position},showBackground:u.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"}}))};return z(Ce,{children:[!l&&C(ot,{style:{width:"100%",height:"90%"},option:h,onEvents:{click:d=>{var p;Wt(f,((p=d==null?void 0:d.name)==null?void 0:p.split(" ").join("_"))||"undefined")}}}),l&&s&&C(ot,{style:{width:"100%",height:"90%"},option:h,onEvents:{click:d=>{s(d.name)}}})]})},hce=({data:r,margins:e,labelSettings:t,axisSettings:n,enableSaveAs:a,colors:i,updateGroup:o,isEnableGroupBy:s,backGroundColor:l,customSettings:u,chartClickConfig:c})=>{var h,v;const f={toolbox:{feature:{saveAsImage:a&&{name:"databrain"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},...i!=null&&i.length?{color:i}:{},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"},formatter(d){const p=d[1];return`${p.name}<br/>${p.value}`}},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},xAxis:{type:"category",data:r.labels,splitLine:{show:(u==null?void 0:u.hideSplitLines)==="horizontal"||(u==null?void 0:u.hideSplitLines)==="none"},axisLine:{show:(u==null?void 0:u.hideAxisLines)==="y"||(u==null?void 0:u.hideAxisLines)==="none"},axisLabel:{show:(u==null?void 0:u.axisLabels)==="y"||(u==null?void 0:u.axisLabels)==="none"}},yAxis:{type:"value",position:n.axis,splitLine:{show:(u==null?void 0:u.hideSplitLines)==="vertical"||(u==null?void 0:u.hideSplitLines)==="none"},axisLine:{show:(u==null?void 0:u.hideAxisLines)==="x"||(u==null?void 0:u.hideAxisLines)==="none"},axisLabel:{show:(u==null?void 0:u.axisLabels)==="x"||(u==null?void 0:u.axisLabels)==="none"}},series:[{name:"Placeholder",type:"bar",stack:"Total",itemStyle:{borderColor:"transparent",color:"transparent"},emphasis:{itemStyle:{borderColor:"transparent",color:"transparent"}},data:(h=r.datasets)==null?void 0:h[1],showBackground:l.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"}},{name:"Life Cost",type:"bar",stack:"Total",label:{show:t.show,position:t.position},data:(v=r.datasets)==null?void 0:v[0]}]};return z(Ce,{children:[!s&&C(ot,{style:{width:"100%",height:"90%"},option:f,onEvents:{click:d=>{var p;Wt(c,((p=d==null?void 0:d.name)==null?void 0:p.split(" ").join("_"))||"undefined")}}}),s&&o&&C(ot,{style:{width:"100%",height:"90%"},option:f,onEvents:{click:d=>{o(d.name)}}})]})},vce=({funnelData:r,margins:e,legendSettings:t,labelSettings:n,colors:a,chartClickConfig:i})=>{const o={tooltip:{trigger:"item",formatter:"{b} : {c}k",backgroundColor:"black",textStyle:{color:"white"}},...a!=null&&a.length?{color:a}:{},legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,data:r==null?void 0:r.name},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},series:[{name:"Funnel",type:"funnel",left:"10%",top:60,bottom:60,width:"80%",height:"60%",min:0,max:100,minSize:"0%",maxSize:"100%",sort:"descending",gap:3,label:{show:n.show,position:n.position},labelLine:{length:10,lineStyle:{width:1,type:"solid"}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{fontSize:20}},data:r}]};return C(Ce,{children:C(ot,{style:{width:"100%",height:"90%"},option:o,onEvents:{click:s=>{var l;Wt(i,((l=s==null?void 0:s.name)==null?void 0:l.split(" ").join("_"))||"undefined")}}})})},dce=({data:r,margins:e,legendSettings:t,labelSettings:n,axisSettings:a,enableSaveAs:i,colors:o,updateGroup:s,isEnableGroupBy:l,customSettings:u,chartClickConfig:c})=>{var d;const f=[];let h=8;(d=r==null?void 0:r.datasets)==null||d.map(p=>{const g=[];let y=0;const m=p.label;p.data.map(_=>{g.push([r.labels[y],_,m]),y+=1}),f.push(g)});const v={tooltip:{backgroundColor:"black",textStyle:{color:"white"}},...o!=null&&o.length?{color:o}:{},toolbox:{feature:{saveAsImage:i&&{name:"databrain"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,data:f.map(p=>p[0][2])},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},xAxis:{splitLine:{show:(u==null?void 0:u.hideSplitLines)==="horizontal"||(u==null?void 0:u.hideSplitLines)==="none",lineStyle:{type:"dashed"}},axisLine:{show:(u==null?void 0:u.hideAxisLines)==="y"||(u==null?void 0:u.hideAxisLines)==="none"},axisLabel:{show:(u==null?void 0:u.axisLabels)==="y"||(u==null?void 0:u.axisLabels)==="none"}},yAxis:{position:a.axis,scale:!0,splitLine:{show:(u==null?void 0:u.hideSplitLines)==="vertical"||(u==null?void 0:u.hideSplitLines)==="none",lineStyle:{type:"dashed"}},axisLine:{show:(u==null?void 0:u.hideAxisLines)==="x"||(u==null?void 0:u.hideAxisLines)==="none"},axisLabel:{show:(u==null?void 0:u.axisLabels)==="x"||(u==null?void 0:u.axisLabels)==="none"}},series:f.map(p=>{h+=3;const g="0123456789ABCDEF";let y="#";for(let m=0;m<6;m+=1)y+=g[Math.floor(Math.random()*16)];return{name:p[0][2],data:p.map(m=>({name:m[0],value:m[1]})),type:"scatter",symbolSize:h,emphasis:{focus:"series"},itemStyle:{shadowBlur:10,shadowColor:"rgba(120, 36, 50, 0.5)",shadowOffsetY:5,color:y},label:{show:n.show,position:n.position}}})};return z(Ce,{children:[!l&&C(ot,{style:{width:"100%",height:"90%"},option:v,onEvents:{click:p=>{var g;Wt(c,((g=p==null?void 0:p.name)==null?void 0:g.split(" ").join("_"))||"undefined")}}}),l&&s&&C(ot,{style:{width:"100%",height:"90%"},option:v,onEvents:{click:p=>{s(p.name)}}})]})},pce=({data:r,margins:e,legendSettings:t,labelSettings:n,enableSaveAs:a,colors:i,updateGroup:o,isEnableGroupBy:s,chartClickConfig:l})=>{var f,h;if(((f=r==null?void 0:r.labels)==null?void 0:f.length)>1){const v=[];let d=70,p=100;(h=r==null?void 0:r.datasets)==null||h.map(y=>{const m=[];let _=0;y.data.map(b=>{const w={value:b,name:r.labels[_]};m.push(w),_+=1}),v.push([y.label,m])});const g={toolbox:{feature:{saveAsImage:a&&{name:"databrain"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},...i!=null&&i.length?{color:i}:{},tooltip:{trigger:"item",backgroundColor:"black",textStyle:{color:"white"}},legend:{show:t.show,top:t.position==="horizontal"?"420px":t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,type:"scroll"},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},series:v.map(y=>(d-=20,p-=20,{name:y[0],type:"pie",radius:[`${d}%`,`${p}%`],avoidLabelOverlap:!1,label:{show:n.show,position:n.position},data:y[1],labelLine:{show:!1}}))};return z(Ce,{children:[!s&&C(ot,{style:{width:"100%",height:"90%"},option:g}),s&&o&&C(ot,{style:{width:"100%",height:"90%"},option:g,onEvents:{click:y=>{o(y.name)}}})]})}const u=r==null?void 0:r.datasets.map((v,d)=>({value:v.data,name:r==null?void 0:r.labels[d]})),c={toolbox:{feature:{saveAsImage:a&&{name:"databrain"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},...i!=null&&i.length?{color:i}:{},tooltip:{trigger:"item",backgroundColor:"black",textStyle:{color:"white"}},legend:{data:r==null?void 0:r.labels,orient:"vertical",left:"left",type:"scroll"},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},series:{type:"pie",radius:["30%","70%"],avoidLabelOverlap:!1,label:{show:n.show,position:n.position},data:u,labelLine:{show:!1}}};return z(Ce,{children:[!s&&C(ot,{style:{width:"100%",height:"90%"},option:c,onEvents:{click:v=>{var d;Wt(l,((d=v==null?void 0:v.name)==null?void 0:d.split(" ").join("_"))||"undefined")}}}),s&&o&&C(ot,{style:{width:"100%",height:"90%"},option:c,onEvents:{click:v=>{o(v.name)}}})]})},gce=({data:r,margins:e,legendSettings:t,labelSettings:n,axisSettings:a,enableSaveAs:i,colors:o,updateGroup:s,isEnableGroupBy:l,backGroundColor:u,customSettings:c,chartClickConfig:f})=>{var p;const h=["start","middle","end"];let v=2;const d={toolbox:{feature:{saveAsImage:i&&{name:"databrain"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},...o!=null&&o.length?{color:o}:{},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"}},legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,data:r.datasets.map(g=>g.label)},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},xAxis:{type:"category",data:r.labels,splitLine:{show:(c==null?void 0:c.hideSplitLines)==="horizontal"||(c==null?void 0:c.hideSplitLines)==="none"},axisLine:{show:(c==null?void 0:c.hideAxisLines)==="y"||(c==null?void 0:c.hideAxisLines)==="none"},axisLabel:{show:(c==null?void 0:c.axisLabels)==="y"||(c==null?void 0:c.axisLabels)==="none"}},yAxis:{type:"value",position:a.axis,splitLine:{show:(c==null?void 0:c.hideSplitLines)==="vertical"||(c==null?void 0:c.hideSplitLines)==="none"},axisLine:{show:(c==null?void 0:c.hideAxisLines)==="x"||(c==null?void 0:c.hideAxisLines)==="none"},axisLabel:{show:(c==null?void 0:c.axisLabels)==="x"||(c==null?void 0:c.axisLabels)==="none"}},series:(p=r.datasets)==null?void 0:p.map(g=>(v===0?v=1:v===1?v=2:v=0,{name:g.label,type:"line",step:h[v],data:g.data,areaStyle:{},label:{show:n.show,position:n.position},showBackground:u.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"}}))};return z(Ce,{children:[!l&&C(ot,{style:{width:"100%",height:"90%"},option:d,onEvents:{click:g=>{var y;Wt(f,((y=g==null?void 0:g.name)==null?void 0:y.split(" ").join("_"))||"undefined")}}}),l&&s&&C(ot,{style:{width:"100%",height:"90%"},option:d,onEvents:{click:g=>{s(g.name)}}})]})},yce=({data:r,margins:e,legendSettings:t,labelSettings:n,axisSettings:a,enableSaveAs:i,colors:o,updateGroup:s,isEnableGroupBy:l,backGroundColor:u,customSettings:c,chartClickConfig:f})=>{var v,d;const h={toolbox:{feature:{saveAsImage:i&&{name:"databrain"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"}},...o!=null&&o.length?{color:o}:{},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,data:r.datasets.map(p=>p.label)},xAxis:[{type:"category",data:r.labels,axisTick:{alignWithLabel:!0},splitLine:{show:(c==null?void 0:c.hideSplitLines)==="horizontal"||(c==null?void 0:c.hideSplitLines)==="none"},axisLine:{show:(c==null?void 0:c.hideAxisLines)==="y"||(c==null?void 0:c.hideAxisLines)==="none"},axisLabel:{show:(c==null?void 0:c.axisLabels)==="y"||(c==null?void 0:c.axisLabels)==="none"}}],yAxis:[{type:"value",position:a.axis,splitLine:{show:(c==null?void 0:c.hideSplitLines)==="vertical"||(c==null?void 0:c.hideSplitLines)==="none"},axisLine:{show:(c==null?void 0:c.hideAxisLines)==="x"||(c==null?void 0:c.hideAxisLines)==="none"},axisLabel:{show:(c==null?void 0:c.axisLabels)==="x"||(c==null?void 0:c.axisLabels)==="none"}}],series:[{name:(v=r.datasets[0])==null?void 0:v.label,type:"bar",barWidth:"100%",data:(d=r.datasets[0])==null?void 0:d.data,label:{show:n.show,position:n.position},showBackground:u.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"}}]};return z(Ce,{children:[!l&&C(ot,{style:{width:"100%",height:"90%"},option:h,onEvents:{click:p=>{var g;Wt(f,((g=p==null?void 0:p.name)==null?void 0:g.split(" ").join("_"))||"undefined")}}}),l&&s&&C(ot,{style:{width:"100%",height:"90%"},option:h,onEvents:{click:p=>{s(p.name)}}})]})},mce=({gaugeData:r,margins:e,legendSettings:t,enableSaveAs:n,colors:a,chartClickConfig:i})=>{const o=Array.isArray(r)?r:[],s=o.reduce((c,f)=>c+f.value,0),l=Math.floor(s/o.length),u={toolbox:{feature:{saveAsImage:n&&{name:"databrain"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},...a!=null&&a.length?{color:a}:{},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position},series:[{type:"gauge",center:["50%","60%"],startAngle:200,endAngle:-20,min:0,max:l+100,splitNumber:12,itemStyle:{color:"blue"},progress:{show:!0,width:20},pointer:{show:!0},axisLine:{lineStyle:{width:30}},axisTick:{distance:-45,splitNumber:5,lineStyle:{width:2,color:"#999"}},splitLine:{distance:-52,length:14,lineStyle:{width:3,color:"#999"}},axisLabel:{distance:-8,color:"black",fontSize:10},anchor:{show:!1},data:[{value:l}]}]};return C(ot,{style:{width:"100%",height:"113%"},option:u,onEvents:{click:c=>{var f;Wt(i,((f=c==null?void 0:c.name)==null?void 0:f.split(" ").join("_"))||"undefined")}}})},_ce=({data:r,margins:e,enableSaveAs:t,colors:n,backGroundColor:a,chartClickConfig:i})=>{var u,c,f;const o=[],s=[];if((r==null?void 0:r.length)&&((u=r==null?void 0:r[0])==null?void 0:u[0])!==((c=r==null?void 0:r[1])==null?void 0:c[0])){const h=[r==null?void 0:r[0],r==null?void 0:r[1]];h==null||h.map(v=>{v.map(d=>{o.includes(d)||o.push(d)})});for(let v=0;v<((f=r==null?void 0:r[0])==null?void 0:f.length);v+=1)s.push({source:r[0][v],target:r[1][v],value:r[2][v]})}const l={toolbox:{feature:{saveAsImage:t&&{name:"databrain"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},...n!=null&&n.length?{color:n}:{},tooltip:{trigger:"item",triggerOn:"mousemove",backgroundColor:"black",textStyle:{color:"white"}},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},series:{type:"sankey",layout:"none",emphasis:{focus:"adjacency"},data:o==null?void 0:o.map(h=>({name:h})),links:s,showBackground:a.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"}}};return C(Ce,{children:C(ot,{style:{width:"100%",height:"100%"},option:l,onEvents:{click:h=>{var v;Wt(i,((v=h==null?void 0:h.name)==null?void 0:v.split(" ").join("_"))||"undefined")}}})})},bce=({data:r,margins:e,legendSettings:t,labelSettings:n,axisSettings:a,enableSaveAs:i,colors:o,updateGroup:s,isEnableGroupBy:l,backGroundColor:u,customSettings:c,chartClickConfig:f})=>{var v,d;const h={toolbox:{feature:{saveAsImage:i&&{name:"databrain"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},...o!=null&&o.length?{color:o}:{},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"},formatter:p=>`${p.map(g=>`${g.seriesName}: ${g.value}<br />`).join("")}`},xAxis:{type:"category",data:r==null?void 0:r.labels,splitLine:{show:(c==null?void 0:c.hideSplitLines)==="horizontal"||(c==null?void 0:c.hideSplitLines)==="none"},axisLine:{show:(c==null?void 0:c.hideAxisLines)==="y"||(c==null?void 0:c.hideAxisLines)==="none"},axisLabel:{show:(c==null?void 0:c.axisLabels)==="y"||(c==null?void 0:c.axisLabels)==="none"}},yAxis:{type:"value",position:a.axis,splitLine:{show:(c==null?void 0:c.hideSplitLines)==="vertical"||(c==null?void 0:c.hideSplitLines)==="none"},axisLine:{show:(c==null?void 0:c.hideAxisLines)==="x"||(c==null?void 0:c.hideAxisLines)==="none"},axisLabel:{show:(c==null?void 0:c.axisLabels)==="x"||(c==null?void 0:c.axisLabels)==="none"}},legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,data:(v=r==null?void 0:r.datasets)==null?void 0:v.map(p=>p.label)},series:(d=r==null?void 0:r.datasets)==null?void 0:d.map(p=>({data:p.data,type:"bar",name:p.label,stack:"x",barWidth:`${c==null?void 0:c.barWidth}%`,emphasis:{focus:"series"},label:{show:n.show,position:n.position},showBackground:u.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"},itemStyle:{borderRadius:c==null?void 0:c.barRadius}}))};return z(Ce,{children:[!l&&C(ot,{style:{width:"100%",height:"90%"},option:h,onEvents:{click:p=>{var g;Wt(f,((g=p==null?void 0:p.name)==null?void 0:g.split(" ").join("_"))||"undefined")}}}),l&&s&&C(ot,{style:{width:"100%",height:"90%"},option:h,onEvents:{click:p=>{s(p.name)}}})]})};var xce={container:"_container_1vqip_1",label:"_label_1vqip_7",sync:"_sync_1vqip_13"};const e4=({data:r,customSettings:e,chartClickConfig:t})=>{var f,h,v,d;const n={fontSize:`${e.subHeaderFontSize}px`||"14px"},a={fontSize:`${e.fontSize}px`||"30px"},i=t.isEnable?"hover:cursor-pointer":"hover:cursor-text",o=new Intl.NumberFormat,s=(p,g)=>{let y="";if(g)switch(parseInt(p,10).toString().length){case 1:case 2:case 3:y=p;break;case 4:y=`${p.toString().slice(0,1)}.${p.toString().slice(1,3)}k`;break;case 5:y=`${p.toString().slice(0,2)}.${p.toString().slice(2,4)}k`;break;case 6:y=`${p.toString().slice(0,3)}.${p.toString().slice(3,5)}k`;break;case 7:y=`${p.toString().slice(0,1)}.${p.toString().slice(1,3)}M`;break;case 8:y=`${p.toString().slice(0,2)}.${p.toString().slice(2,4)}M`;break;case 9:y=`${p.toString().slice(0,3)}.${p.toString().slice(3,5)}M`;break;case 10:y=`${p.toString().slice(0,1)}.${p.toString().slice(1,3)}B`;break}else switch(parseInt(p,10).toString().length){case 1:case 2:case 3:y=p;break;case 4:y=`${p.toString().slice(0,1)}k`;break;case 5:y=`${p.toString().slice(0,2)}k`;break;case 6:y=`${p.toString().slice(0,3)}k`;break;case 7:y=`${p.toString().slice(0,1)}M`;break;case 8:y=`${p.toString().slice(0,2)}M`;break;case 9:y=`${p.toString().slice(0,3)}M`;break;case 10:y=`${p.toString().slice(0,1)}B`;break}return y},l=(p,g)=>{switch(g){case"original":return p;case"3s":case"adaptive":return s(p,!0);case"d":return parseInt(p,10).toLocaleString();case"1s":{let y=p.toString().slice(0,1);for(let _=1;_<p.toString().length;_+=1)y+=0;return s(y,!1)}case"1f":{const y=parseFloat(p.toFixed(1)),m=o.format(y);return p.toString().includes(".")?m:`${m}.${Array(2).join("0")}`}case"2f":{const y=parseFloat(p.toFixed(2)),m=o.format(y);return p.toString().includes(".")?p.toString().split(".")[1].length>1?m:`${m}.${Array(2).join("0")}`:`${m}.${Array(3).join("0")}`}case"3f":{const y=parseFloat(p.toFixed(3)),m=o.format(y);return p.toString().includes(".")?p.toString().split(".")[1].length>1?m:`${m}.${Array(3).join("0")}`:`${m}.${Array(4).join("0")}`}case"+":return`+${o.format(p)}`;case"$":{const y=parseFloat(p.toFixed(2)),m=o.format(y);return p.toString().includes(".")?p.toString().split(".")[1].length>1?`$${m}`:`$${m}.${Array(2).join("0")}`:`$${m}.${Array(3).join("0")}`}case"1%":{const y=p*100,m=o.format(y);return p.toString().includes(".")?`${m}%`:`${m}.${Array(2).join("0")}%`}case"2%":{const y=p*100,m=parseFloat(p.toFixed(2)),_=o.format(m);return y.toString().includes(".")?p.toString().split(".")[1].length>1?`${_}%`:`${_}.${Array(2).join("0")}`:`${_}.${Array(3).join("0")}%`}case"3%":{const y=p*100,m=parseFloat(p.toFixed(3)),_=o.format(m);return y.toString().includes(".")?p.toString().split(".")[1].length>1?`${_}%`:`${_}.${Array(3).join("0")}`:`${_}.${Array(4).join("0")}%`}case"ms1":{const y=Math.floor(p/1e3),m=p%1e3;return`${y}.${m.toString().slice(0,1)}s`}case"ms2":{const y=Math.floor(p/1e3),m=p%1e3,_=p-Math.floor(p),b=Math.floor(_*1e3),w=_*1e3-b,x=Math.floor(w*1e3);let S="";return y&&(S+=`${y}s `),m&&(S+=`${m}ms `),b&&(S+=`${b}\xB5s`),x&&(S+=`${x}ns`),S}default:return p}},u=(p,g)=>{const y=p.toString().slice(0,4),m=p.toString().slice(5,7),_=p.toString().slice(8,10),b=p.toString().slice(11,19);switch(g){case"dd-mm-yyyy":return`${_}-${m}-${y}`;case"mm-dd-yyyy":return`${m}-${_}-${y}`;case"yyyy-mm-dd":return`${y}-${m}-${_}`;case"dd/mm/yyyy":return`${_}/${m}/${y}`;case"mm/dd/yyyy":return`${m}/${_}/${y}`;case"yyyy/mm/dd":return`${y}/${m}/${_}`;case"hh:mm:ss":return b;default:return p}},c=((f=r[0])==null?void 0:f.value)&&((h=r[0])==null?void 0:h.value.toString().length)>16?u((v=r[0])==null?void 0:v.value,e.dateFormatter):l((d=r[0])==null?void 0:d.value,e.numberFormatter);return z("div",{className:xce.container,children:[C("div",{style:a,onClick:()=>{Wt(t,c||"")},className:i,children:(r==null?void 0:r.length)&&C(Ce,{children:c})}),C("div",{style:n,onClick:()=>{Wt(t,e.displayText||"")},children:e.subHeaderShow&&e.displayText})]})},wce=({data:r,margins:e,legendSettings:t,axisSettings:n,enableSaveAs:a,colors:i,customSettings:o,chartClickConfig:s})=>{var f;const l=[],u=[];(f=r==null?void 0:r.datasets)==null||f.map(h=>{l.push(h.data),u.push(h.label)});const c={toolbox:{feature:{saveAsImage:a&&{name:"databrain"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},...i!=null&&i.length?{color:i}:{},title:[{text:"Box Plot",left:"center"}],legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,data:r.datasets.map(h=>h.label)},dataset:[{source:l},{transform:{type:"boxplot",config:{itemNameFormatter:"expr {value}"}}},{fromDatasetIndex:1,fromTransformResult:1}],tooltip:{trigger:"item",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"}},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},xAxis:{type:"category",boundaryGap:!0,nameGap:30,splitArea:{show:!1},splitLine:{show:(o==null?void 0:o.hideSplitLines)==="horizontal"||(o==null?void 0:o.hideSplitLines)==="none"},axisLine:{show:(o==null?void 0:o.hideAxisLines)==="y"||(o==null?void 0:o.hideAxisLines)==="none"},axisLabel:{show:(o==null?void 0:o.axisLabels)==="y"||(o==null?void 0:o.axisLabels)==="none"}},yAxis:{type:"value",position:n.axis,splitArea:{show:!0},splitLine:{show:(o==null?void 0:o.hideSplitLines)==="vertical"||(o==null?void 0:o.hideSplitLines)==="none"},axisLine:{show:(o==null?void 0:o.hideAxisLines)==="x"||(o==null?void 0:o.hideAxisLines)==="none"},axisLabel:{show:(o==null?void 0:o.axisLabels)==="x"||(o==null?void 0:o.axisLabels)==="none"}},series:[{name:"boxplot",type:"boxplot",datasetIndex:1},{name:"outlier",type:"scatter",datasetIndex:2}]};return C(Ce,{children:C(ot,{style:{width:"100%",height:"90%"},option:c,onEvents:{click:h=>{var v;Wt(s,((v=h==null?void 0:h.name)==null?void 0:v.split(" ").join("_"))||"undefined")}}})})};var Cn={tableSection:"_tableSection_tcrid_1",tableContainer:"_tableContainer_tcrid_5",tableDiv:"_tableDiv_tcrid_9",table:"_table_tcrid_1",tableHead:"_tableHead_tcrid_17",tableHeadColHash:"_tableHeadColHash_tcrid_21",tableCol:"_tableCol_tcrid_25",tableColLabel:"_tableColLabel_tcrid_29",data:"_data_tcrid_33",tableBodyColHash:"_tableBodyColHash_tcrid_37",tableBodyColHashLabel:"_tableBodyColHashLabel_tcrid_41","table-loader-container":"_table-loader-container_tcrid_45","table-error-message":"_table-error-message_tcrid_49",noData:"_noData_tcrid_53"},t4={exports:{}};/*!
243
+ `||u==="")){var c=o.isSelected(u);n.hasOwnProperty(u)?n[u]=n[u]&&c:n[u]=c}})}),r==="allSelect"||r==="inverseSelect"?{selected:n}:{name:e.name,selected:n}}function $se(r){r.registerAction("legendToggleSelect","legendselectchanged",Ae(ph,"toggleSelected")),r.registerAction("legendAllSelect","legendselectall",Ae(ph,"allSelect")),r.registerAction("legendInverseSelect","legendinverseselect",Ae(ph,"inverseSelect")),r.registerAction("legendSelect","legendselected",Ae(ph,"select")),r.registerAction("legendUnSelect","legendunselected",Ae(ph,"unSelect"))}function K5(r){r.registerComponentModel(zw),r.registerComponentView(Q5),r.registerProcessor(r.PRIORITY.PROCESSOR.SERIES_FILTER,Vse),r.registerSubTypeDefaulter("legend",function(){return"plain"}),$se(r)}var Hse=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.setScrollDataIndex=function(t){this.option.scrollDataIndex=t},e.prototype.init=function(t,n,a){var i=Kl(t);r.prototype.init.call(this,t,n,a),J5(this,t,i)},e.prototype.mergeOption=function(t,n){r.prototype.mergeOption.call(this,t,n),J5(this,this.option,t)},e.type="legend.scroll",e.defaultOption=so(zw.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),e}(zw);function J5(r,e,t){var n=r.getOrient(),a=[1,1];a[n.index]=0,lo(e,t,{type:"box",ignoreSize:!!a})}var Gse=Hse,eB=Te,Hw=["width","height"],Gw=["x","y"],Wse=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!0,t._currentIndex=0,t}return e.prototype.init=function(){r.prototype.init.call(this),this.group.add(this._containerGroup=new eB),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new eB)},e.prototype.resetInner=function(){r.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},e.prototype.renderInner=function(t,n,a,i,o,s,l){var u=this;r.prototype.renderInner.call(this,t,n,a,i,o,s,l);var c=this._controllerGroup,f=n.get("pageIconSize",!0),h=K(f)?f:[f,f];d("pagePrev",0);var v=n.getModel("pageTextStyle");c.add(new We({name:"pageText",style:{text:"xx/xx",fill:v.getTextColor(),font:v.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),d("pageNext",1);function d(p,g){var y=p+"DataIndex",m=jl(n.get("pageIcons",!0)[n.getOrient().name][g],{onclick:fe(u._pageGo,u,y,n,i)},{x:-h[0]/2,y:-h[1]/2,width:h[0],height:h[1]});m.name=p,c.add(m)}},e.prototype.layoutInner=function(t,n,a,i,o,s){var l=this.getSelectorGroup(),u=t.getOrient().index,c=Hw[u],f=Gw[u],h=Hw[1-u],v=Gw[1-u];o&&Cs("horizontal",l,t.get("selectorItemGap",!0));var d=t.get("selectorButtonGap",!0),p=l.getBoundingRect(),g=[-p.x,-p.y],y=we(a);o&&(y[c]=a[c]-p[c]-d);var m=this._layoutContentAndController(t,i,y,u,c,h,v,f);if(o){if(s==="end")g[u]+=m[c]+d;else{var _=p[c]+d;g[u]-=_,m[f]-=_}m[c]+=p[c]+d,g[1-u]+=m[v]+m[h]/2-p[h]/2,m[h]=Math.max(m[h],p[h]),m[v]=Math.min(m[v],p[v]+g[1-u]),l.x=g[0],l.y=g[1],l.markRedraw()}return m},e.prototype._layoutContentAndController=function(t,n,a,i,o,s,l,u){var c=this.getContentGroup(),f=this._containerGroup,h=this._controllerGroup;Cs(t.get("orient"),c,t.get("itemGap"),i?a.width:null,i?null:a.height),Cs("horizontal",h,t.get("pageButtonItemGap",!0));var v=c.getBoundingRect(),d=h.getBoundingRect(),p=this._showController=v[o]>a[o],g=[-v.x,-v.y];n||(g[i]=c[u]);var y=[0,0],m=[-d.x,-d.y],_=Ee(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(p){var b=t.get("pageButtonPosition",!0);b==="end"?m[i]+=a[o]-d[o]:y[i]+=d[o]+_}m[1-i]+=v[s]/2-d[s]/2,c.setPosition(g),f.setPosition(y),h.setPosition(m);var w={x:0,y:0};if(w[o]=p?a[o]:v[o],w[s]=Math.max(v[s],d[s]),w[l]=Math.min(0,d[l]+m[1-i]),f.__rectSize=a[o],p){var x={x:0,y:0};x[o]=Math.max(a[o]-d[o]-_,0),x[s]=w[s],f.setClipPath(new Ge({shape:x})),f.__rectSize=x[o]}else h.eachChild(function(T){T.attr({invisible:!0,silent:!0})});var S=this._getPageInfo(t);return S.pageIndex!=null&&qe(c,{x:S.contentPosition[0],y:S.contentPosition[1]},p?t:null),this._updatePageInfoView(t,S),w},e.prototype._pageGo=function(t,n,a){var i=this._getPageInfo(n)[t];i!=null&&a.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:n.id})},e.prototype._updatePageInfoView=function(t,n){var a=this._controllerGroup;L(["pagePrev","pageNext"],function(c){var f=c+"DataIndex",h=n[f]!=null,v=a.childOfName(c);v&&(v.setStyle("fill",h?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),v.cursor=h?"pointer":"default")});var i=a.childOfName("pageText"),o=t.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;i&&o&&i.setStyle("text",ce(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},e.prototype._getPageInfo=function(t){var n=t.get("scrollDataIndex",!0),a=this.getContentGroup(),i=this._containerGroup.__rectSize,o=t.getOrient().index,s=Hw[o],l=Gw[o],u=this._findTargetItemIndex(n),c=a.children(),f=c[u],h=c.length,v=h?1:0,d={contentPosition:[a.x,a.y],pageCount:v,pageIndex:v-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return d;var p=b(f);d.contentPosition[o]=-p.s;for(var g=u+1,y=p,m=p,_=null;g<=h;++g)_=b(c[g]),(!_&&m.e>y.s+i||_&&!w(_,y.s))&&(m.i>y.i?y=m:y=_,y&&(d.pageNextDataIndex==null&&(d.pageNextDataIndex=y.i),++d.pageCount)),m=_;for(var g=u-1,y=p,m=p,_=null;g>=-1;--g)_=b(c[g]),(!_||!w(m,_.s))&&y.i<m.i&&(m=y,d.pagePrevDataIndex==null&&(d.pagePrevDataIndex=y.i),++d.pageCount,++d.pageIndex),y=_;return d;function b(x){if(x){var S=x.getBoundingRect(),T=S[l]+x[l];return{s:T,e:T+S[s],i:x.__legendDataIndex}}}function w(x,S){return x.e>=S&&x.s<=S+i}},e.prototype._findTargetItemIndex=function(t){if(!this._showController)return 0;var n,a=this.getContentGroup(),i;return a.eachChild(function(o,s){var l=o.__legendDataIndex;i==null&&l!=null&&(i=s),l===t&&(n=s)}),n!=null?n:i},e.type="legend.scroll",e}(Q5),Use=Wse;function jse(r){r.registerAction("legendScroll","legendscroll",function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},function(a){a.setScrollDataIndex(n)})})}function Yse(r){ke(K5),r.registerComponentModel(Gse),r.registerComponentView(Use),jse(r)}function qse(r){ke(K5),ke(Yse)}var Zse=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.inside",e.defaultOption=so(ch.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(ch),Xse=Zse,Ww=Ye();function Qse(r,e,t){Ww(r).coordSysRecordMap.each(function(n){var a=n.dataZoomInfoMap.get(e.uid);a&&(a.getRange=t)})}function Kse(r,e){for(var t=Ww(r).coordSysRecordMap,n=t.keys(),a=0;a<n.length;a++){var i=n[a],o=t.get(i),s=o.dataZoomInfoMap;if(s){var l=e.uid,u=s.get(l);u&&(s.removeKey(l),s.keys().length||tB(t,o))}}}function tB(r,e){if(e){r.removeKey(e.model.uid);var t=e.controller;t&&t.dispose()}}function Jse(r,e){var t={model:e,containsPoint:Ae(tle,e),dispatchAction:Ae(ele,r),dataZoomInfoMap:null,controller:null},n=t.controller=new Yf(r.getZr());return L(["pan","zoom","scrollMove"],function(a){n.on(a,function(i){var o=[];t.dataZoomInfoMap.each(function(s){if(!!i.isAvailableBehavior(s.model.option)){var l=(s.getRange||{})[a],u=l&&l(s.dzReferCoordSysInfo,t.model.mainType,t.controller,i);!s.model.get("disabled",!0)&&u&&o.push({dataZoomId:s.model.id,start:u[0],end:u[1]})}}),o.length&&t.dispatchAction(o)})}),t}function ele(r,e){r.isDisposed()||r.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function tle(r,e,t,n){return r.coordinateSystem.containPoint([t,n])}function rle(r){var e,t="type_",n={type_true:2,type_move:1,type_false:0,type_undefined:-1},a=!0;return r.each(function(i){var o=i.model,s=o.get("disabled",!0)?!1:o.get("zoomLock",!0)?"move":!0;n[t+s]>n[t+e]&&(e=s),a=a&&o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!a}}}function nle(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(e,t){var n=Ww(t),a=n.coordSysRecordMap||(n.coordSysRecordMap=ge());a.each(function(i){i.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(i){var o=Qk(i);L(o.infoList,function(s){var l=s.model.uid,u=a.get(l)||a.set(l,Jse(t,s.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=ge());c.set(i.uid,{dzReferCoordSysInfo:s,model:i,getRange:null})})}),a.each(function(i){var o=i.controller,s,l=i.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){tB(a,i);return}var c=rle(l);o.enable(c.controlType,c.opt),o.setPointerChecker(i.containsPoint),ou(i,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var ale=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return e.prototype.render=function(t,n,a){if(r.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),Qse(a,t,{pan:fe(Uw.pan,this),zoom:fe(Uw.zoom,this),scrollMove:fe(Uw.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){Kse(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(yw),Uw={zoom:function(r,e,t,n){var a=this.range,i=a.slice(),o=r.axisModels[0];if(!!o){var s=jw[e](null,[n.originX,n.originY],o,t,r),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(i[1]-i[0])+i[0],u=Math.max(1/n.scale,0);i[0]=(i[0]-l)*u+l,i[1]=(i[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(Zs(0,i,[0,100],0,c.minSpan,c.maxSpan),this.range=i,a[0]!==i[0]||a[1]!==i[1])return i}},pan:rB(function(r,e,t,n,a,i){var o=jw[n]([i.oldX,i.oldY],[i.newX,i.newY],e,a,t);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:rB(function(r,e,t,n,a,i){var o=jw[n]([0,0],[i.scrollDelta,i.scrollDelta],e,a,t);return o.signal*(r[1]-r[0])*i.scrollDelta})};function rB(r){return function(e,t,n,a){var i=this.range,o=i.slice(),s=e.axisModels[0];if(!!s){var l=r(o,s,e,t,n,a);if(Zs(l,o,[0,100],"all"),this.range=o,i[0]!==o[0]||i[1]!==o[1])return o}}}var jw={grid:function(r,e,t,n,a){var i=t.axis,o={},s=a.model.coordinateSystem.getRect();return r=r||[0,0],i.dim==="x"?(o.pixel=e[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=i.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=i.inverse?-1:1),o},polar:function(r,e,t,n,a){var i=t.axis,o={},s=a.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return r=r?s.pointToCoord(r):[0,0],e=s.pointToCoord(e),t.mainType==="radiusAxis"?(o.pixel=e[0]-r[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=i.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=i.inverse?-1:1),o},singleAxis:function(r,e,t,n,a){var i=t.axis,o=a.model.coordinateSystem.getRect(),s={};return r=r||[0,0],i.orient==="horizontal"?(s.pixel=e[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=i.inverse?1:-1):(s.pixel=e[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=i.inverse?-1:1),s}},ile=ale;function nB(r){mw(r),r.registerComponentModel(Xse),r.registerComponentView(ile),nle(r)}var ole=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=so(ch.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},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:"#fff",borderColor:"#ACB8D1"},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:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(ch),sle=ole,gh=Ge,aB=7,lle=1,Yw=30,ule=7,yh="horizontal",iB="vertical",cle=5,fle=["line","bar","candlestick","scatter"],hle={easing:"cubicOut",duration:100,delay:0},vle=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._displayables={},t}return e.prototype.init=function(t,n){this.api=n,this._onBrush=fe(this._onBrush,this),this._onBrushEnd=fe(this._onBrushEnd,this)},e.prototype.render=function(t,n,a,i){if(r.prototype.render.apply(this,arguments),ou(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),t.get("show")===!1){this.group.removeAll();return}if(t.noTarget()){this._clear(),this.group.removeAll();return}(!i||i.type!=="dataZoom"||i.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){mf(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var n=this._displayables.sliderGroup=new Te;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(n),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,n=this.api,a=t.get("brushSelect"),i=a?ule:0,o=this._findCoordRect(),s={width:n.getWidth(),height:n.getHeight()},l=this._orient===yh?{right:s.width-o.x-o.width,top:s.height-Yw-aB-i,width:o.width,height:Yw}:{right:aB,top:o.y,width:Yw,height:o.height},u=Kl(t.option);L(["right","top","width","height"],function(f){u[f]==="ph"&&(u[f]=l[f])});var c=Ht(u,s);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===iB&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,n=this._location,a=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),o=i&&i.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(a===yh&&!o?{scaleY:l?1:-1,scaleX:1}:a===yh&&o?{scaleY:l?1:-1,scaleX:-1}:a===iB&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=t.getBoundingRect([s]);t.x=n.x-u.x,t.y=n.y-u.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,n=this._size,a=this._displayables.sliderGroup,i=t.get("brushSelect");a.add(new gh({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new gh({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:fe(this._onClickPanel,this)}),s=this.api.getZr();i?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),a.add(o)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!t)return;var n=this._size,a=this._shadowSize||[],i=t.series,o=i.getRawData(),s=i.getShadowDim&&i.getShadowDim(),l=s&&o.getDimensionInfo(s)?i.getShadowDim():t.otherDim;if(l==null)return;var u=this._shadowPolygonPts,c=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||n[0]!==a[0]||n[1]!==a[1]){var f=o.getDataExtent(l),h=(f[1]-f[0])*.3;f=[f[0]-h,f[1]+h];var v=[0,n[1]],d=[0,n[0]],p=[[n[0],0],[0,0]],g=[],y=d[1]/(o.count()-1),m=0,_=Math.round(o.count()/n[0]),b;o.each([l],function(D,M){if(_>0&&M%_){m+=y;return}var A=D==null||isNaN(D)||D==="",I=A?0:at(D,f,v,!0);A&&!b&&M?(p.push([p[p.length-1][0],0]),g.push([g[g.length-1][0],0])):!A&&b&&(p.push([m,0]),g.push([m,0])),p.push([m,I]),g.push([m,I]),m+=y,b=A}),u=this._shadowPolygonPts=p,c=this._shadowPolylinePts=g}this._shadowData=o,this._shadowDim=l,this._shadowSize=[n[0],n[1]];var w=this.dataZoomModel;function x(D){var M=w.getModel(D?"selectedDataBackground":"dataBackground"),A=new Te,I=new Gr({shape:{points:u},segmentIgnoreThreshold:1,style:M.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),P=new Wr({shape:{points:c},segmentIgnoreThreshold:1,style:M.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return A.add(I),A.add(P),A}for(var S=0;S<3;S++){var T=x(S===1);this._displayables.sliderGroup.add(T),this._displayables.dataShadowSegs.push(T)}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,n=t.get("showDataShadow");if(n!==!1){var a,i=this.ecModel;return t.eachTargetAxis(function(o,s){var l=t.getAxisProxy(o,s).getTargetSeriesModels();L(l,function(u){if(!a&&!(n!==!0&&Ne(fle,u.get("type"))<0)){var c=i.getComponent(To(o),s).axis,f=dle(o),h,v=u.coordinateSystem;f!=null&&v.getOtherAxis&&(h=v.getOtherAxis(c).inverse),f=u.getData().mapDimension(f),a={thisAxis:c,series:u,thisDim:o,otherDim:f,otherAxisInverse:h}}},this)},this),a}},e.prototype._renderHandle=function(){var t=this.group,n=this._displayables,a=n.handles=[null,null],i=n.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,c=l.get("borderRadius")||0,f=l.get("brushSelect"),h=n.filler=new gh({silent:f,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(h),o.add(new gh({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:c},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:lle,fill:"rgba(0,0,0,0)"}})),L([0,1],function(_){var b=l.get("handleIcon");!tp[b]&&b.indexOf("path://")<0&&b.indexOf("image://")<0&&(b="path://"+b);var w=kt(b,-1,0,2,2,null,!0);w.attr({cursor:oB(this._orient),draggable:!0,drift:fe(this._onDragMove,this,_),ondragend:fe(this._onDragEnd,this),onmouseover:fe(this._showDataInfo,this,!0),onmouseout:fe(this._showDataInfo,this,!1),z2:5});var x=w.getBoundingRect(),S=l.get("handleSize");this._handleHeight=le(S,this._size[1]),this._handleWidth=x.width/x.height*this._handleHeight,w.setStyle(l.getModel("handleStyle").getItemStyle()),w.style.strokeNoScale=!0,w.rectHover=!0,w.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),no(w);var T=l.get("handleColor");T!=null&&(w.style.fill=T),o.add(a[_]=w);var D=l.getModel("textStyle");t.add(i[_]=new We({silent:!0,invisible:!0,style:gt(D,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:D.getTextColor(),font:D.getFont()}),z2:10}))},this);var v=h;if(f){var d=le(l.get("moveHandleSize"),s[1]),p=n.moveHandle=new Ge({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:d}}),g=d*.8,y=n.moveHandleIcon=kt(l.get("moveHandleIcon"),-g/2,-g/2,g,g,"#fff",!0);y.silent=!0,y.y=s[1]+d/2-.5,p.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(s[1]/2,Math.max(d,10));v=n.moveZone=new Ge({invisible:!0,shape:{y:s[1]-m,height:d+m}}),v.on("mouseover",function(){u.enterEmphasis(p)}).on("mouseout",function(){u.leaveEmphasis(p)}),o.add(p),o.add(y),o.add(v)}v.attr({draggable:!0,cursor:oB(this._orient),drift:fe(this._onDragMove,this,"all"),ondragstart:fe(this._showDataInfo,this,!0),ondragend:fe(this._onDragEnd,this),onmouseover:fe(this._showDataInfo,this,!0),onmouseout:fe(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[at(t[0],[0,100],n,!0),at(t[1],[0,100],n,!0)]},e.prototype._updateInterval=function(t,n){var a=this.dataZoomModel,i=this._handleEnds,o=this._getViewExtent(),s=a.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];Zs(n,i,o,a.get("zoomLock")?"all":t,s.minSpan!=null?at(s.minSpan,l,o,!0):null,s.maxSpan!=null?at(s.maxSpan,l,o,!0):null);var u=this._range,c=this._range=_n([at(i[0],o,l,!0),at(i[1],o,l,!0)]);return!u||u[0]!==c[0]||u[1]!==c[1]},e.prototype._updateView=function(t){var n=this._displayables,a=this._handleEnds,i=_n(a.slice()),o=this._size;L([0,1],function(v){var d=n.handles[v],p=this._handleHeight;d.attr({scaleX:p/2,scaleY:p/2,x:a[v]+(v?-1:1),y:o[1]/2-p/2})},this),n.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:o[1]});var s={x:i[0],width:i[1]-i[0]};n.moveHandle&&(n.moveHandle.setShape(s),n.moveZone.setShape(s),n.moveZone.getBoundingRect(),n.moveHandleIcon&&n.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=n.dataShadowSegs,u=[0,i[0],i[1],o[0]],c=0;c<l.length;c++){var f=l[c],h=f.getClipPath();h||(h=new Ge,f.setClipPath(h)),h.setShape({x:u[c],y:0,width:u[c+1]-u[c],height:o[1]})}this._updateDataInfo(t)},e.prototype._updateDataInfo=function(t){var n=this.dataZoomModel,a=this._displayables,i=a.handleLabels,o=this._orient,s=["",""];if(n.get("showDetail")){var l=n.findRepresentativeAxisProxy();if(l){var u=l.getAxisModel().axis,c=this._range,f=t?l.calculateDataWindow({start:c[0],end:c[1]}).valueWindow:l.getDataValueWindow();s=[this._formatLabel(f[0],u),this._formatLabel(f[1],u)]}}var h=_n(this._handleEnds.slice());v.call(this,0),v.call(this,1);function v(d){var p=io(a.handles[d].parent,this.group),g=Id(d===0?"right":"left",p),y=this._handleWidth/2+cle,m=pa([h[d]+(d===0?-y:y),this._size[1]/2],p);i[d].setStyle({x:m[0],y:m[1],verticalAlign:o===yh?"middle":g,align:o===yh?g:"center",text:s[d]})}},e.prototype._formatLabel=function(t,n){var a=this.dataZoomModel,i=a.get("labelFormatter"),o=a.get("labelPrecision");(o==null||o==="auto")&&(o=n.getPixelPrecision());var s=t==null||isNaN(t)?"":n.type==="category"||n.type==="time"?n.scale.getLabel({value:Math.round(t)}):t.toFixed(Math.min(o,20));return ye(i)?i(t,s):ce(i)?i.replace("{value}",s):s},e.prototype._showDataInfo=function(t){t=this._dragging||t;var n=this._displayables,a=n.handleLabels;a[0].attr("invisible",!t),a[1].attr("invisible",!t),n.moveHandle&&this.api[t?"enterEmphasis":"leaveEmphasis"](n.moveHandle,1)},e.prototype._onDragMove=function(t,n,a,i){this._dragging=!0,oi(i.event);var o=this._displayables.sliderGroup.getLocalTransform(),s=pa([n,a],o,!0),l=this._updateInterval(t,s[0]),u=this.dataZoomModel.get("realtime");this._updateView(!u),l&&u&&this._dispatchZoomAction(!0)},e.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1);var t=this.dataZoomModel.get("realtime");!t&&this._dispatchZoomAction(!1)},e.prototype._onClickPanel=function(t){var n=this._size,a=this._displayables.sliderGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(a[0]<0||a[0]>n[0]||a[1]<0||a[1]>n[1])){var i=this._handleEnds,o=(i[0]+i[1])/2,s=this._updateInterval("all",a[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var n=t.offsetX,a=t.offsetY;this._brushStart=new Oe(n,a),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(!!this._brushing){var n=this._displayables.brushRect;if(this._brushing=!1,!!n){n.attr("ignore",!0);var a=n.shape,i=+new Date;if(!(i-this._brushStartTime<200&&Math.abs(a.width)<5)){var o=this._getViewExtent(),s=[0,100];this._range=_n([at(a.x,o,s,!0),at(a.x+a.width,o,s,!0)]),this._handleEnds=[a.x,a.x+a.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(oi(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,n){var a=this._displayables,i=this.dataZoomModel,o=a.brushRect;o||(o=a.brushRect=new gh({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),a.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(t,n),c=l.transformCoordToLocal(s.x,s.y),f=this._size;u[0]=Math.max(Math.min(f[0],u[0]),0),o.setShape({x:c[0],y:0,width:u[0]-c[0],height:f[1]})},e.prototype._dispatchZoomAction=function(t){var n=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?hle:null,start:n[0],end:n[1]})},e.prototype._findCoordRect=function(){var t,n=Qk(this.dataZoomModel).infoList;if(!t&&n.length){var a=n[0].model.coordinateSystem;t=a.getRect&&a.getRect()}if(!t){var i=this.api.getWidth(),o=this.api.getHeight();t={x:i*.2,y:o*.2,width:i*.6,height:o*.6}}return t},e.type="dataZoom.slider",e}(yw);function dle(r){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[r]}function oB(r){return r==="vertical"?"ns-resize":"ew-resize"}var ple=vle;function sB(r){r.registerComponentModel(sle),r.registerComponentView(ple),mw(r)}function gle(r){ke(nB),ke(sB)}var yle={get:function(r,e,t){var n=we((mle[r]||{})[e]);return t&&K(n)?n[n.length-1]:n}},mle={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},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]}},lB=yle,uB=_r.mapVisual,_le=_r.eachVisual,ble=K,cB=L,xle=_n,wle=at,Sle=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.stateList=["inRange","outOfRange"],t.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],t.layoutMode={type:"box",ignoreSize:!0},t.dataBound=[-1/0,1/0],t.targetVisuals={},t.controllerVisuals={},t}return e.prototype.init=function(t,n,a){this.mergeDefaultAndTheme(t,a)},e.prototype.optionUpdated=function(t,n){var a=this.option;!n&&M5(a,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var n=this.stateList;t=fe(t,this),this.controllerVisuals=Mw(this.option.controller,n,t),this.targetVisuals=Mw(this.option.target,n,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,n=[];return t==null||t==="all"?this.ecModel.eachSeries(function(a,i){n.push(i)}):n=st(t),n},e.prototype.eachTargetSeries=function(t,n){L(this.getTargetSeriesIndices(),function(a){var i=this.ecModel.getSeriesByIndex(a);i&&t.call(n,i)},this)},e.prototype.isTargetSeries=function(t){var n=!1;return this.eachTargetSeries(function(a){a===t&&(n=!0)}),n},e.prototype.formatValueText=function(t,n,a){var i=this.option,o=i.precision,s=this.dataBound,l=i.formatter,u;a=a||["<",">"],K(t)&&(t=t.slice(),u=!0);var c=n?t:u?[f(t[0]),f(t[1])]:f(t);if(ce(l))return l.replace("{value}",u?c[0]:c).replace("{value2}",u?c[1]:c);if(ye(l))return u?l(t[0],t[1]):l(t);if(u)return t[0]===s[0]?a[0]+" "+c[1]:t[1]===s[1]?a[1]+" "+c[0]:c[0]+" - "+c[1];return c;function f(h){return h===s[0]?"min":h===s[1]?"max":(+h).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,n=xle([t.min,t.max]);this._dataExtent=n},e.prototype.getDataDimensionIndex=function(t){var n=this.option.dimension;if(n!=null)return t.getDimensionIndex(n);for(var a=t.dimensions,i=a.length-1;i>=0;i--){var o=a[i],s=t.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,n=this.option,a={inRange:n.inRange,outOfRange:n.outOfRange},i=n.target||(n.target={}),o=n.controller||(n.controller={});Pe(i,a),Pe(o,a);var s=this.isCategory();l.call(this,i),l.call(this,o),u.call(this,i,"inRange","outOfRange"),c.call(this,o);function l(f){ble(n.color)&&!f.inRange&&(f.inRange={color:n.color.slice().reverse()}),f.inRange=f.inRange||{color:t.get("gradientColor")}}function u(f,h,v){var d=f[h],p=f[v];d&&!p&&(p=f[v]={},cB(d,function(g,y){if(!!_r.isValidType(y)){var m=lB.get(y,"inactive",s);m!=null&&(p[y]=m,y==="color"&&!p.hasOwnProperty("opacity")&&!p.hasOwnProperty("colorAlpha")&&(p.opacity=[0,0]))}}))}function c(f){var h=(f.inRange||{}).symbol||(f.outOfRange||{}).symbol,v=(f.inRange||{}).symbolSize||(f.outOfRange||{}).symbolSize,d=this.get("inactiveColor"),p=this.getItemSymbol(),g=p||"roundRect";cB(this.stateList,function(y){var m=this.itemSize,_=f[y];_||(_=f[y]={color:s?d:[d]}),_.symbol==null&&(_.symbol=h&&we(h)||(s?g:[g])),_.symbolSize==null&&(_.symbolSize=v&&we(v)||(s?m[0]:[m[0],m[0]])),_.symbol=uB(_.symbol,function(x){return x==="none"?g:x});var b=_.symbolSize;if(b!=null){var w=-1/0;_le(b,function(x){x>w&&(w=x)}),_.symbolSize=uB(b,function(x){return wle(x,[0,w],[0,m[0]],!0)})}},this)}},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}($e),Dg=Sle,fB=[20,140],Cle=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(t,n){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(a){a.mappingMethod="linear",a.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){r.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=fB[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=fB[1])},e.prototype._resetRange=function(){var t=this.getExtent(),n=this.option.range;!n||n.auto?(t.auto=1,this.option.range=t):K(n)&&(n[0]>n[1]&&n.reverse(),n[0]=Math.max(n[0],t[0]),n[1]=Math.min(n[1],t[1]))},e.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),L(this.stateList,function(t){var n=this.option.controller[t].symbolSize;n&&n[0]!==n[1]&&(n[0]=n[1]/3)},this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),n=_n((this.get("range")||[]).slice());return n[0]>t[1]&&(n[0]=t[1]),n[1]>t[1]&&(n[1]=t[1]),n[0]<t[0]&&(n[0]=t[0]),n[1]<t[0]&&(n[1]=t[0]),n},e.prototype.getValueState=function(t){var n=this.option.range,a=this.getExtent();return(n[0]<=a[0]||n[0]<=t)&&(n[1]>=a[1]||t<=n[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var n=[];return this.eachTargetSeries(function(a){var i=[],o=a.getData();o.each(this.getDataDimensionIndex(o),function(s,l){t[0]<=s&&s<=t[1]&&i.push(l)},this),n.push({seriesId:a.id,dataIndex:i})},this),n},e.prototype.getVisualMeta=function(t){var n=hB(this,"outOfRange",this.getExtent()),a=hB(this,"inRange",this.option.range.slice()),i=[];function o(v,d){i.push({value:v,color:t(v,d)})}for(var s=0,l=0,u=a.length,c=n.length;l<c&&(!a.length||n[l]<=a[0]);l++)n[l]<a[s]&&o(n[l],"outOfRange");for(var f=1;s<u;s++,f=0)f&&i.length&&o(a[s],"outOfRange"),o(a[s],"inRange");for(var f=1;l<c;l++)(!a.length||a[a.length-1]<n[l])&&(f&&(i.length&&o(i[i.length-1].value,"outOfRange"),f=0),o(n[l],"outOfRange"));var h=i.length;return{stops:i,outerColors:[h?i[0].color:"transparent",h?i[h-1].color:"transparent"]}},e.type="visualMap.continuous",e.defaultOption=so(Dg.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:"#fff",borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}}),e}(Dg);function hB(r,e,t){if(t[0]===t[1])return t.slice();for(var n=200,a=(t[1]-t[0])/n,i=t[0],o=[],s=0;s<=n&&i<t[1];s++)o.push(i),i+=a;return o.push(t[1]),o}var Tle=Cle,Dle=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.autoPositionValues={left:1,right:1,top:1,bottom:1},t}return e.prototype.init=function(t,n){this.ecModel=t,this.api=n},e.prototype.render=function(t,n,a,i){if(this.visualMapModel=t,t.get("show")===!1){this.group.removeAll();return}this.doRender(t,n,a,i)},e.prototype.renderBackground=function(t){var n=this.visualMapModel,a=xs(n.get("padding")||0),i=t.getBoundingRect();t.add(new Ge({z2:-1,silent:!0,shape:{x:i.x-a[3],y:i.y-a[0],width:i.width+a[3]+a[1],height:i.height+a[0]+a[2]},style:{fill:n.get("backgroundColor"),stroke:n.get("borderColor"),lineWidth:n.get("borderWidth")}}))},e.prototype.getControllerVisual=function(t,n,a){a=a||{};var i=a.forceState,o=this.visualMapModel,s={};if(n==="color"){var l=o.get("contentColor");s.color=l}function u(v){return s[v]}function c(v,d){s[v]=d}var f=o.controllerVisuals[i||o.getValueState(t)],h=_r.prepareVisualTypes(f);return L(h,function(v){var d=f[v];a.convertOpacityToAlpha&&v==="opacity"&&(v="colorAlpha",d=f.__alphaForOpacity),_r.dependsOn(v,n)&&d&&d.applyVisual(t,u,c)}),s[n]},e.prototype.positionGroup=function(t){var n=this.visualMapModel,a=this.api;Hd(t,n.getBoxLayoutParams(),{width:a.getWidth(),height:a.getHeight()})},e.prototype.doRender=function(t,n,a,i){},e.type="visualMap",e}(wt),vB=Dle,dB=[["left","right","width"],["top","bottom","height"]];function pB(r,e,t){var n=r.option,a=n.align;if(a!=null&&a!=="auto")return a;for(var i={width:e.getWidth(),height:e.getHeight()},o=n.orient==="horizontal"?1:0,s=dB[o],l=[0,null,10],u={},c=0;c<3;c++)u[dB[1-o][c]]=l[c],u[s[c]]=c===2?t[0]:n[s[c]];var f=[["x","width",3],["y","height",0]][o],h=Ht(u,i,n.padding);return s[(h.margin[f[2]]||0)+h[f[0]]+h[f[1]]*.5<i[f[1]]*.5?0:1]}function Mg(r,e){return L(r||[],function(t){t.dataIndex!=null&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null),t.highlightKey="visualMap"+(e?e.componentIndex:"")}),r}var Xa=at,Mle=L,gB=Math.min,qw=Math.max,Ale=12,Lle=6,Ile=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._shapes={},t._dataInterval=[],t._handleEnds=[],t._hoverLinkDataIndices=[],t}return e.prototype.doRender=function(t,n,a,i){this._api=a,(!i||i.type!=="selectDataRange"||i.from!==this.uid)&&this._buildView()},e.prototype._buildView=function(){this.group.removeAll();var t=this.visualMapModel,n=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(n);var a=t.get("text");this._renderEndsText(n,a,0),this._renderEndsText(n,a,1),this._updateView(!0),this.renderBackground(n),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(n)},e.prototype._renderEndsText=function(t,n,a){if(!!n){var i=n[1-a];i=i!=null?i+"":"";var o=this.visualMapModel,s=o.get("textGap"),l=o.itemSize,u=this._shapes.mainGroup,c=this._applyTransform([l[0]/2,a===0?-s:l[1]+s],u),f=this._applyTransform(a===0?"bottom":"top",u),h=this._orient,v=this.visualMapModel.textStyleModel;this.group.add(new We({style:gt(v,{x:c[0],y:c[1],verticalAlign:h==="horizontal"?"middle":f,align:h==="horizontal"?f:"center",text:i})}))}},e.prototype._renderBar=function(t){var n=this.visualMapModel,a=this._shapes,i=n.itemSize,o=this._orient,s=this._useHandle,l=pB(n,this.api,i),u=a.mainGroup=this._createBarGroup(l),c=new Te;u.add(c),c.add(a.outOfRange=yB()),c.add(a.inRange=yB(null,s?_B(this._orient):null,fe(this._dragHandle,this,"all",!1),fe(this._dragHandle,this,"all",!0))),c.setClipPath(new Ge({shape:{x:0,y:0,width:i[0],height:i[1],r:3}}));var f=n.textStyleModel.getTextRect("\u56FD"),h=qw(f.width,f.height);s&&(a.handleThumbs=[],a.handleLabels=[],a.handleLabelPoints=[],this._createHandle(n,u,0,i,h,o),this._createHandle(n,u,1,i,h,o)),this._createIndicator(n,u,i,h,o),t.add(u)},e.prototype._createHandle=function(t,n,a,i,o,s){var l=fe(this._dragHandle,this,a,!1),u=fe(this._dragHandle,this,a,!0),c=ca(t.get("handleSize"),i[0]),f=kt(t.get("handleIcon"),-c/2,-c/2,c,c,null,!0),h=_B(this._orient);f.attr({cursor:h,draggable:!0,drift:l,ondragend:u,onmousemove:function(y){oi(y.event)}}),f.x=i[0]/2,f.useStyle(t.getModel("handleStyle").getItemStyle()),f.setStyle({strokeNoScale:!0,strokeFirst:!0}),f.style.lineWidth*=2,f.ensureState("emphasis").style=t.getModel(["emphasis","handleStyle"]).getItemStyle(),gs(f,!0),n.add(f);var v=this.visualMapModel.textStyleModel,d=new We({cursor:h,draggable:!0,drift:l,onmousemove:function(y){oi(y.event)},ondragend:u,style:gt(v,{x:0,y:0,text:""})});d.ensureState("blur").style={opacity:.1},d.stateTransition={duration:200},this.group.add(d);var p=[c,0],g=this._shapes;g.handleThumbs[a]=f,g.handleLabelPoints[a]=p,g.handleLabels[a]=d},e.prototype._createIndicator=function(t,n,a,i,o){var s=ca(t.get("indicatorSize"),a[0]),l=kt(t.get("indicatorIcon"),-s/2,-s/2,s,s,null,!0);l.attr({cursor:"move",invisible:!0,silent:!0,x:a[0]/2});var u=t.getModel("indicatorStyle").getItemStyle();if(l instanceof ur){var c=l.style;l.useStyle(Q({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},u))}else l.useStyle(u);n.add(l);var f=this.visualMapModel.textStyleModel,h=new We({silent:!0,invisible:!0,style:gt(f,{x:0,y:0,text:""})});this.group.add(h);var v=[(o==="horizontal"?i/2:Lle)+a[0]/2,0],d=this._shapes;d.indicator=l,d.indicatorLabel=h,d.indicatorLabelPoint=v,this._firstShowIndicator=!0},e.prototype._dragHandle=function(t,n,a,i){if(!!this._useHandle){if(this._dragging=!n,!n){var o=this._applyTransform([a,i],this._shapes.mainGroup,!0);this._updateInterval(t,o[1]),this._hideIndicator(),this._updateView()}n===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),n?!this._hovering&&this._clearHoverLinkToSeries():mB(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},e.prototype._resetInterval=function(){var t=this.visualMapModel,n=this._dataInterval=t.getSelected(),a=t.getExtent(),i=[0,t.itemSize[1]];this._handleEnds=[Xa(n[0],a,i,!0),Xa(n[1],a,i,!0)]},e.prototype._updateInterval=function(t,n){n=n||0;var a=this.visualMapModel,i=this._handleEnds,o=[0,a.itemSize[1]];Zs(n,i,o,t,0);var s=a.getExtent();this._dataInterval=[Xa(i[0],o,s,!0),Xa(i[1],o,s,!0)]},e.prototype._updateView=function(t){var n=this.visualMapModel,a=n.getExtent(),i=this._shapes,o=[0,n.itemSize[1]],s=t?o:this._handleEnds,l=this._createBarVisual(this._dataInterval,a,s,"inRange"),u=this._createBarVisual(a,a,o,"outOfRange");i.inRange.setStyle({fill:l.barColor}).setShape("points",l.barPoints),i.outOfRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),this._updateHandle(s,l)},e.prototype._createBarVisual=function(t,n,a,i){var o={forceState:i,convertOpacityToAlpha:!0},s=this._makeColorGradient(t,o),l=[this.getControllerVisual(t[0],"symbolSize",o),this.getControllerVisual(t[1],"symbolSize",o)],u=this._createBarPoints(a,l);return{barColor:new Hl(0,0,0,1,s),barPoints:u,handlesColor:[s[0].color,s[s.length-1].color]}},e.prototype._makeColorGradient=function(t,n){var a=100,i=[],o=(t[1]-t[0])/a;i.push({color:this.getControllerVisual(t[0],"color",n),offset:0});for(var s=1;s<a;s++){var l=t[0]+o*s;if(l>t[1])break;i.push({color:this.getControllerVisual(l,"color",n),offset:s/a})}return i.push({color:this.getControllerVisual(t[1],"color",n),offset:1}),i},e.prototype._createBarPoints=function(t,n){var a=this.visualMapModel.itemSize;return[[a[0]-n[0],t[0]],[a[0],t[0]],[a[0],t[1]],[a[0]-n[1],t[1]]]},e.prototype._createBarGroup=function(t){var n=this._orient,a=this.visualMapModel.get("inverse");return new Te(n==="horizontal"&&!a?{scaleX:t==="bottom"?1:-1,rotation:Math.PI/2}:n==="horizontal"&&a?{scaleX:t==="bottom"?-1:1,rotation:-Math.PI/2}:n==="vertical"&&!a?{scaleX:t==="left"?1:-1,scaleY:-1}:{scaleX:t==="left"?1:-1})},e.prototype._updateHandle=function(t,n){if(!!this._useHandle){var a=this._shapes,i=this.visualMapModel,o=a.handleThumbs,s=a.handleLabels,l=i.itemSize,u=i.getExtent();Mle([0,1],function(c){var f=o[c];f.setStyle("fill",n.handlesColor[c]),f.y=t[c];var h=Xa(t[c],[0,l[1]],u,!0),v=this.getControllerVisual(h,"symbolSize");f.scaleX=f.scaleY=v/l[0],f.x=l[0]-v/2;var d=pa(a.handleLabelPoints[c],io(f,this.group));s[c].setStyle({x:d[0],y:d[1],text:i.formatValueText(this._dataInterval[c]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",a.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(t,n,a,i){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],c=this._shapes,f=c.indicator;if(!!f){f.attr("invisible",!1);var h={convertOpacityToAlpha:!0},v=this.getControllerVisual(t,"color",h),d=this.getControllerVisual(t,"symbolSize"),p=Xa(t,s,u,!0),g=l[0]-d/2,y={x:f.x,y:f.y};f.y=p,f.x=g;var m=pa(c.indicatorLabelPoint,io(f,this.group)),_=c.indicatorLabel;_.attr("invisible",!1);var b=this._applyTransform("left",c.mainGroup),w=this._orient,x=w==="horizontal";_.setStyle({text:(a||"")+o.formatValueText(n),verticalAlign:x?b:"middle",align:x?"center":b});var S={x:g,y:p,style:{fill:v}},T={style:{x:m[0],y:m[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var D={duration:100,easing:"cubicInOut",additive:!0};f.x=y.x,f.y=y.y,f.animateTo(S,D),_.animateTo(T,D)}else f.attr(S),_.attr(T);this._firstShowIndicator=!1;var M=this._shapes.handleLabels;if(M)for(var A=0;A<M.length;A++)this._api.enterBlur(M[A])}},e.prototype._enableHoverLinkToSeries=function(){var t=this;this._shapes.mainGroup.on("mousemove",function(n){if(t._hovering=!0,!t._dragging){var a=t.visualMapModel.itemSize,i=t._applyTransform([n.offsetX,n.offsetY],t._shapes.mainGroup,!0,!0);i[1]=gB(qw(0,i[1]),a[1]),t._doHoverLinkToSeries(i[1],0<=i[0]&&i[0]<=a[0])}}).on("mouseout",function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()})},e.prototype._enableHoverLinkFromSeries=function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},e.prototype._doHoverLinkToSeries=function(t,n){var a=this.visualMapModel,i=a.itemSize;if(!!a.option.hoverLink){var o=[0,i[1]],s=a.getExtent();t=gB(qw(o[0],t),o[1]);var l=Ple(a,s,o),u=[t-l,t+l],c=Xa(t,o,s,!0),f=[Xa(u[0],o,s,!0),Xa(u[1],o,s,!0)];u[0]<o[0]&&(f[0]=-1/0),u[1]>o[1]&&(f[1]=1/0),n&&(f[0]===-1/0?this._showIndicator(c,f[1],"< ",l):f[1]===1/0?this._showIndicator(c,f[0],"> ",l):this._showIndicator(c,c,"\u2248 ",l));var h=this._hoverLinkDataIndices,v=[];(n||mB(a))&&(v=this._hoverLinkDataIndices=a.findTargetDataIndices(f));var d=o8(h,v);this._dispatchHighDown("downplay",Mg(d[0],a)),this._dispatchHighDown("highlight",Mg(d[1],a))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var n;if(As(t.target,function(l){var u=Me(l);if(u.dataIndex!=null)return n=u,!0},!0),!!n){var a=this.ecModel.getSeriesByIndex(n.seriesIndex),i=this.visualMapModel;if(!!i.isTargetSeries(a)){var o=a.getData(n.dataType),s=o.getStore().get(i.getDataDimensionIndex(o),n.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},e.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var n=this._shapes.handleLabels;if(n)for(var a=0;a<n.length;a++)this._api.leaveBlur(n[a])},e.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",Mg(t,this.visualMapModel)),t.length=0},e.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},e.prototype._applyTransform=function(t,n,a,i){var o=io(n,i?null:this.group);return K(t)?pa(t,o,a):Id(t,o,a)},e.prototype._dispatchHighDown=function(t,n){n&&n.length&&this.api.dispatchAction({type:t,batch:n})},e.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},e.prototype.remove=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},e.type="visualMap.continuous",e}(vB);function yB(r,e,t,n){return new Gr({shape:{points:r},draggable:!!t,cursor:e,drift:t,onmousemove:function(a){oi(a.event)},ondragend:n})}function Ple(r,e,t){var n=Ale/2,a=r.get("hoverLinkDataSize");return a&&(n=Xa(a,e,t,!0)/2),n}function mB(r){var e=r.get("hoverLinkOnHandle");return!!(e==null?r.get("realtime"):e)}function _B(r){return r==="vertical"?"ns-resize":"ew-resize"}var Ele=Ile,Ole={type:"selectDataRange",event:"dataRangeSelected",update:"update"},Rle=function(r,e){e.eachComponent({mainType:"visualMap",query:r},function(t){t.setSelected(r.selected)})},Nle=[{createOnAllSeries:!0,reset:function(r,e){var t=[];return e.eachComponent("visualMap",function(n){var a=r.pipelineContext;!n.isTargetSeries(r)||a&&a.large||t.push(Loe(n.stateList,n.targetVisuals,fe(n.getValueState,n),n.getDataDimensionIndex(r.getData())))}),t}},{createOnAllSeries:!0,reset:function(r,e){var t=r.getData(),n=[];e.eachComponent("visualMap",function(a){if(a.isTargetSeries(r)){var i=a.getVisualMeta(fe(kle,null,r,a))||{stops:[],outerColors:[]},o=a.getDataDimensionIndex(t);o>=0&&(i.dimension=o,n.push(i))}}),r.getData().setVisual("visualMeta",n)}}];function kle(r,e,t,n){for(var a=e.targetVisuals[n],i=_r.prepareVisualTypes(a),o={color:xf(r.getData(),"color")},s=0,l=i.length;s<l;s++){var u=i[s],c=a[u==="opacity"?"__alphaForOpacity":u];c&&c.applyVisual(t,f,h)}return o.color;function f(v){return o[v]}function h(v,d){o[v]=d}}var bB=L;function Ble(r){var e=r&&r.visualMap;K(e)||(e=e?[e]:[]),bB(e,function(t){if(!!t){Eu(t,"splitList")&&!Eu(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var n=t.pieces;n&&K(n)&&bB(n,function(a){_e(a)&&(Eu(a,"start")&&!Eu(a,"min")&&(a.min=a.start),Eu(a,"end")&&!Eu(a,"max")&&(a.max=a.end))})}})}function Eu(r,e){return r&&r.hasOwnProperty&&r.hasOwnProperty(e)}var xB=!1;function wB(r){xB||(xB=!0,r.registerSubTypeDefaulter("visualMap",function(e){return!e.categories&&(!(e.pieces?e.pieces.length>0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),r.registerAction(Ole,Rle),L(Nle,function(e){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,e)}),r.registerPreprocessor(Ble))}function SB(r){r.registerComponentModel(Tle),r.registerComponentView(Ele),wB(r)}var zle=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._pieceList=[],t}return e.prototype.optionUpdated=function(t,n){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var a=this._mode=this._determineMode();this._pieceList=[],Fle[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var i=this.option.categories;this.resetVisual(function(o,s){a==="categories"?(o.mappingMethod="category",o.categories=we(i)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=J(this._pieceList,function(l){return l=we(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var t=this.option,n={},a=_r.listVisualTypes(),i=this.isCategory();L(t.pieces,function(s){L(a,function(l){s.hasOwnProperty(l)&&(n[l]=1)})}),L(n,function(s,l){var u=!1;L(this.stateList,function(c){u=u||o(t,c,l)||o(t.target,c,l)},this),!u&&L(this.stateList,function(c){(t[c]||(t[c]={}))[l]=lB.get(l,c==="inRange"?"active":"inactive",i)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}r.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,n){var a=this.option,i=this._pieceList,o=(n?a:t).selected||{};if(a.selected=o,L(i,function(l,u){var c=this.getSelectedMapKey(l);o.hasOwnProperty(c)||(o[c]=!0)},this),a.selectedMode==="single"){var s=!1;L(i,function(l,u){var c=this.getSelectedMapKey(l);o[c]&&(s?o[c]=!1:s=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return this._mode==="categories"?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=we(t)},e.prototype.getValueState=function(t){var n=_r.findPieceIndex(t,this._pieceList);return n!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[n])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var n=[],a=this._pieceList;return this.eachTargetSeries(function(i){var o=[],s=i.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var c=_r.findPieceIndex(l,a);c===t&&o.push(u)},this),n.push({seriesId:i.id,dataIndex:o})},this),n},e.prototype.getRepresentValue=function(t){var n;if(this.isCategory())n=t.value;else if(t.value!=null)n=t.value;else{var a=t.interval||[];n=a[0]===-1/0&&a[1]===1/0?0:(a[0]+a[1])/2}return n},e.prototype.getVisualMeta=function(t){if(this.isCategory())return;var n=[],a=["",""],i=this;function o(c,f){var h=i.getRepresentValue({interval:c});f||(f=i.getValueState(h));var v=t(h,f);c[0]===-1/0?a[0]=v:c[1]===1/0?a[1]=v:n.push({value:c[0],color:v},{value:c[1],color:v})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return L(s,function(c){var f=c.interval;f&&(f[0]>u&&o([u,f[0]],"outOfRange"),o(f.slice()),u=f[1])},this),{stops:n,outerColors:a}},e.type="visualMap.piecewise",e.defaultOption=so(Dg.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(Dg),Fle={splitNumber:function(r){var e=this.option,t=Math.min(e.precision,20),n=this.getExtent(),a=e.splitNumber;a=Math.max(parseInt(a,10),1),e.splitNumber=a;for(var i=(n[1]-n[0])/a;+i.toFixed(t)!==i&&t<5;)t++;e.precision=t,i=+i.toFixed(t),e.minOpen&&r.push({interval:[-1/0,n[0]],close:[0,0]});for(var o=0,s=n[0];o<a;s+=i,o++){var l=o===a-1?n[1]:s+i;r.push({interval:[s,l],close:[1,1]})}e.maxOpen&&r.push({interval:[n[1],1/0],close:[0,0]}),E0(r),L(r,function(u,c){u.index=c,u.text=this.formatValueText(u.interval)},this)},categories:function(r){var e=this.option;L(e.categories,function(t){r.push({text:this.formatValueText(t,!0),value:t})},this),CB(e,r)},pieces:function(r){var e=this.option;L(e.pieces,function(t,n){_e(t)||(t={value:t});var a={text:"",index:n};if(t.label!=null&&(a.text=t.label),t.hasOwnProperty("value")){var i=a.value=t.value;a.interval=[i,i],a.close=[1,1]}else{for(var o=a.interval=[],s=a.close=[0,0],l=[1,0,1],u=[-1/0,1/0],c=[],f=0;f<2;f++){for(var h=[["gte","gt","min"],["lte","lt","max"]][f],v=0;v<3&&o[f]==null;v++)o[f]=t[h[v]],s[f]=l[v],c[f]=v===2;o[f]==null&&(o[f]=u[f])}c[0]&&o[1]===1/0&&(s[0]=0),c[1]&&o[0]===-1/0&&(s[1]=0),o[0]===o[1]&&s[0]&&s[1]&&(a.value=o[0])}a.visual=_r.retrieveVisuals(t),r.push(a)},this),CB(e,r),E0(r),L(r,function(t){var n=t.close,a=[["<","\u2264"][n[1]],[">","\u2265"][n[0]]];t.text=t.text||this.formatValueText(t.value!=null?t.value:t.interval,!1,a)},this)}};function CB(r,e){var t=r.inverse;(r.orient==="vertical"?!t:t)&&e.reverse()}var Vle=zle,$le=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.doRender=function(){var t=this.group;t.removeAll();var n=this.visualMapModel,a=n.get("textGap"),i=n.textStyleModel,o=i.getFont(),s=i.getTextColor(),l=this._getItemAlign(),u=n.itemSize,c=this._getViewData(),f=c.endsText,h=Jt(n.get("showLabel",!0),!f);f&&this._renderEndsText(t,f[0],u,h,l),L(c.viewPieceList,function(v){var d=v.piece,p=new Te;p.onclick=fe(this._onItemClick,this,d),this._enableHoverLink(p,v.indexInModelPieceList);var g=n.getRepresentValue(d);if(this._createItemSymbol(p,g,[0,0,u[0],u[1]]),h){var y=this.visualMapModel.getValueState(g);p.add(new We({style:{x:l==="right"?-a:u[0]+a,y:u[1]/2,text:d.text,verticalAlign:"middle",align:l,font:o,fill:s,opacity:y==="outOfRange"?.5:1}}))}t.add(p)},this),f&&this._renderEndsText(t,f[1],u,h,l),Cs(n.get("orient"),t,n.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,n){var a=this;t.on("mouseover",function(){return i("highlight")}).on("mouseout",function(){return i("downplay")});var i=function(o){var s=a.visualMapModel;s.option.hoverLink&&a.api.dispatchAction({type:o,batch:Mg(s.findTargetDataIndices(n),s)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,n=t.option;if(n.orient==="vertical")return pB(t,this.api,t.itemSize);var a=n.align;return(!a||a==="auto")&&(a="left"),a},e.prototype._renderEndsText=function(t,n,a,i,o){if(!!n){var s=new Te,l=this.visualMapModel.textStyleModel;s.add(new We({style:gt(l,{x:i?o==="right"?a[0]:0:a[0]/2,y:a[1]/2,verticalAlign:"middle",align:i?o:"center",text:n})})),t.add(s)}},e.prototype._getViewData=function(){var t=this.visualMapModel,n=J(t.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),a=t.get("text"),i=t.get("orient"),o=t.get("inverse");return(i==="horizontal"?o:!o)?n.reverse():a&&(a=a.slice().reverse()),{viewPieceList:n,endsText:a}},e.prototype._createItemSymbol=function(t,n,a){t.add(kt(this.getControllerVisual(n,"symbol"),a[0],a[1],a[2],a[3],this.getControllerVisual(n,"color")))},e.prototype._onItemClick=function(t){var n=this.visualMapModel,a=n.option,i=a.selectedMode;if(!!i){var o=we(a.selected),s=n.getSelectedMapKey(t);i==="single"||i===!0?(o[s]=!0,L(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},e.type="visualMap.piecewise",e}(vB),Hle=$le;function TB(r){r.registerComponentModel(Vle),r.registerComponentView(Hle),wB(r)}function Gle(r){ke(SB),ke(TB)}var Wle={label:{enabled:!0},decal:{show:!1}},DB=Ye(),Ule={};function jle(r,e){var t=r.getModel("aria");if(!t.get("enabled"))return;var n=we(Wle);Pe(n.label,r.getLocaleModel().get("aria"),!1),Pe(t.option,n,!1),a(),i();function a(){var u=t.getModel("decal"),c=u.get("show");if(c){var f=ge();r.eachSeries(function(h){if(!h.isColorBySeries()){var v=f.get(h.type);v||(v={},f.set(h.type,v)),DB(h).scope=v}}),r.eachRawSeries(function(h){if(r.isSeriesFiltered(h))return;if(ye(h.enableAriaDecal)){h.enableAriaDecal();return}var v=h.getData();if(h.isColorBySeries()){var m=G_(h.ecModel,h.name,Ule,r.getSeriesCount()),_=v.getVisual("decal");v.setVisual("decal",b(_,m))}else{var d=h.getRawData(),p={},g=DB(h).scope;v.each(function(w){var x=v.getRawIndex(w);p[x]=w});var y=d.count();d.each(function(w){var x=p[w],S=d.getName(w)||w+"",T=G_(h.ecModel,S,g,y),D=v.getItemVisual(x,"decal");v.setItemVisual(x,"decal",b(D,T))})}function b(w,x){var S=w?Q(Q({},x),w):x;return S.dirty=!0,S}})}}function i(){var u=r.getLocaleModel().get("aria"),c=t.getModel("label");if(c.option=me(c.option,u),!!c.get("enabled")){var f=e.getZr().dom;if(c.get("description")){f.setAttribute("aria-label",c.get("description"));return}var h=r.getSeriesCount(),v=c.get(["data","maxCount"])||10,d=c.get(["series","maxCount"])||10,p=Math.min(h,d),g;if(!(h<1)){var y=s();if(y){var m=c.get(["general","withTitle"]);g=o(m,{title:y})}else g=c.get(["general","withoutTitle"]);var _=[],b=h>1?c.get(["series","multiple","prefix"]):c.get(["series","single","prefix"]);g+=o(b,{seriesCount:h}),r.eachSeries(function(T,D){if(D<p){var M=void 0,A=T.get("name"),I=A?"withName":"withoutName";M=h>1?c.get(["series","multiple",I]):c.get(["series","single",I]),M=o(M,{seriesId:T.seriesIndex,seriesName:T.get("name"),seriesType:l(T.subType)});var P=T.getData();if(P.count()>v){var E=c.get(["data","partialData"]);M+=o(E,{displayCnt:v})}else M+=c.get(["data","allData"]);for(var O=c.get(["data","separator","middle"]),N=c.get(["data","separator","end"]),V=[],$=0;$<P.count();$++)if($<v){var U=P.getName($),Y=P.getValues($),ae=c.get(["data",U?"withName":"withoutName"]);V.push(o(ae,{name:U,value:Y.join(O)}))}M+=V.join(O)+N,_.push(M)}});var w=c.getModel(["series","multiple","separator"]),x=w.get("middle"),S=w.get("end");g+=_.join(x)+S,f.setAttribute("aria-label",g)}}}function o(u,c){if(!ce(u))return u;var f=u;return L(c,function(h,v){f=f.replace(new RegExp("\\{\\s*"+v+"\\s*\\}","g"),h)}),f}function s(){var u=r.get("title");return u&&u.length&&(u=u[0]),u&&u.text}function l(u){return r.getLocaleModel().get(["series","typeNames"])[u]||"\u81EA\u5B9A\u4E49\u56FE"}}function Yle(r){if(!(!r||!r.aria)){var e=r.aria;e.show!=null&&(e.enabled=e.show),e.label=e.label||{},L(["description","general","series","data"],function(t){e[t]!=null&&(e.label[t]=e[t])})}}function qle(r){r.registerPreprocessor(Yle),r.registerVisual(r.PRIORITY.VISUAL.ARIA,jle)}var MB={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},Zle=function(){function r(e){var t=this._condVal=ce(e)?new RegExp(e):YT(e)?e:null;if(t==null){var n="";tt(n)}}return r.prototype.evaluate=function(e){var t=typeof e;return ce(t)?this._condVal.test(e):je(t)?this._condVal.test(e+""):!1},r}(),Xle=function(){function r(){}return r.prototype.evaluate=function(){return this.value},r}(),Qle=function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(!e[t].evaluate())return!1;return!0},r}(),Kle=function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(e[t].evaluate())return!0;return!1},r}(),Jle=function(){function r(){}return r.prototype.evaluate=function(){return!this.child.evaluate()},r}(),eue=function(){function r(){}return r.prototype.evaluate=function(){for(var e=!!this.valueParser,t=this.getValue,n=t(this.valueGetterParam),a=e?this.valueParser(n):null,i=0;i<this.subCondList.length;i++)if(!this.subCondList[i].evaluate(e?a:n))return!1;return!0},r}();function Zw(r,e){if(r===!0||r===!1){var t=new Xle;return t.value=r,t}var n="";return LB(r)||tt(n),r.and?AB("and",r,e):r.or?AB("or",r,e):r.not?tue(r,e):rue(r,e)}function AB(r,e,t){var n=e[r],a="";K(n)||tt(a),n.length||tt(a);var i=r==="and"?new Qle:new Kle;return i.children=J(n,function(o){return Zw(o,t)}),i.children.length||tt(a),i}function tue(r,e){var t=r.not,n="";LB(t)||tt(n);var a=new Jle;return a.child=Zw(t,e),a.child||tt(n),a}function rue(r,e){for(var t="",n=e.prepareGetValue(r),a=[],i=Fe(r),o=r.parser,s=o?nL(o):null,l=0;l<i.length;l++){var u=i[l];if(!(u==="parser"||e.valueGetterAttrMap.get(u))){var c=he(MB,u)?MB[u]:u,f=r[u],h=s?s(f):f,v=_9(c,h)||c==="reg"&&new Zle(h);v||tt(t),a.push(v)}}a.length||tt(t);var d=new eue;return d.valueGetterParam=n,d.valueParser=s,d.getValue=e.getValue,d.subCondList=a,d}function LB(r){return _e(r)&&!pr(r)}var nue=function(){function r(e,t){this._cond=Zw(e,t)}return r.prototype.evaluate=function(){return this._cond.evaluate()},r}();function aue(r,e){return new nue(r,e)}var iue={type:"echarts:filter",transform:function(r){for(var e=r.upstream,t,n=aue(r.config,{valueGetterAttrMap:ge({dimension:!0}),prepareGetValue:function(s){var l="",u=s.dimension;he(s,"dimension")||tt(l);var c=e.getDimensionInfo(u);return c||tt(l),{dimIdx:c.index}},getValue:function(s){return e.retrieveValueFromItem(t,s.dimIdx)}}),a=[],i=0,o=e.count();i<o;i++)t=e.getRawDataItem(i),n.evaluate()&&a.push(t);return{data:a}}},oue={type:"echarts:sort",transform:function(r){var e=r.upstream,t=r.config,n="",a=st(t);a.length||tt(n);var i=[];L(a,function(c){var f=c.dimension,h=c.order,v=c.parser,d=c.incomparable;if(f==null&&tt(n),h!=="asc"&&h!=="desc"&&tt(n),d&&d!=="min"&&d!=="max"){var p="";tt(p)}if(h!=="asc"&&h!=="desc"){var g="";tt(g)}var y=e.getDimensionInfo(f);y||tt(n);var m=v?nL(v):null;v&&!m&&tt(n),i.push({dimIdx:y.index,parser:m,comparator:new iL(h,d)})});var o=e.sourceFormat;o!==Lr&&o!==Hn&&tt(n);for(var s=[],l=0,u=e.count();l<u;l++)s.push(e.getRawDataItem(l));return s.sort(function(c,f){for(var h=0;h<i.length;h++){var v=i[h],d=e.retrieveValueFromItem(c,v.dimIdx),p=e.retrieveValueFromItem(f,v.dimIdx);v.parser&&(d=v.parser(d),p=v.parser(p));var g=v.comparator.evaluate(d,p);if(g!==0)return g}return 0}),{data:s}}};function sue(r){r.registerTransform(iue),r.registerTransform(oue)}var lue=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataset",t}return e.prototype.init=function(t,n,a){r.prototype.init.call(this,t,n,a),this._sourceManager=new fL(this),hL(this)},e.prototype.mergeOption=function(t,n){r.prototype.mergeOption.call(this,t,n),hL(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:Ga},e}($e),uue=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataset",t}return e.type="dataset",e}(wt);function cue(r){r.registerComponentModel(lue),r.registerComponentView(uue)}var Qa=Va.CMD;function Ou(r,e){return Math.abs(r-e)<1e-5}function Xw(r){var e=r.data,t=r.len(),n=[],a,i=0,o=0,s=0,l=0;function u(P,E){a&&a.length>2&&n.push(a),a=[P,E]}function c(P,E,O,N){Ou(P,O)&&Ou(E,N)||a.push(P,E,O,N,O,N)}function f(P,E,O,N,V,$){var U=Math.abs(E-P),Y=Math.tan(U/4)*4/3,ae=E<P?-1:1,H=Math.cos(P),q=Math.sin(P),X=Math.cos(E),Z=Math.sin(E),ie=H*V+O,se=q*$+N,te=X*V+O,ve=Z*$+N,R=V*Y*ae,F=$*Y*ae;a.push(ie-R*q,se+F*H,te+R*Z,ve-F*X,te,ve)}for(var h,v,d,p,g=0;g<t;){var y=e[g++],m=g===1;switch(m&&(i=e[g],o=e[g+1],s=i,l=o,(y===Qa.L||y===Qa.C||y===Qa.Q)&&(a=[s,l])),y){case Qa.M:i=s=e[g++],o=l=e[g++],u(s,l);break;case Qa.L:h=e[g++],v=e[g++],c(i,o,h,v),i=h,o=v;break;case Qa.C:a.push(e[g++],e[g++],e[g++],e[g++],i=e[g++],o=e[g++]);break;case Qa.Q:h=e[g++],v=e[g++],d=e[g++],p=e[g++],a.push(i+2/3*(h-i),o+2/3*(v-o),d+2/3*(h-d),p+2/3*(v-p),d,p),i=d,o=p;break;case Qa.A:var _=e[g++],b=e[g++],w=e[g++],x=e[g++],S=e[g++],T=e[g++]+S;g+=1;var D=!e[g++];h=Math.cos(S)*w+_,v=Math.sin(S)*x+b,m?(s=h,l=v,u(s,l)):c(i,o,h,v),i=Math.cos(T)*w+_,o=Math.sin(T)*x+b;for(var M=(D?-1:1)*Math.PI/2,A=S;D?A>T:A<T;A+=M){var I=D?Math.max(A+M,T):Math.min(A+M,T);f(A,I,_,b,w,x)}break;case Qa.R:s=i=e[g++],l=o=e[g++],h=s+e[g++],v=l+e[g++],u(h,l),c(h,l,h,v),c(h,v,s,v),c(s,v,s,l),c(s,l,h,l);break;case Qa.Z:a&&c(i,o,s,l),i=s,o=l;break}}return a&&a.length>2&&n.push(a),n}function Qw(r,e,t,n,a,i,o,s,l,u){if(Ou(r,t)&&Ou(e,n)&&Ou(a,o)&&Ou(i,s)){l.push(o,s);return}var c=2/u,f=c*c,h=o-r,v=s-e,d=Math.sqrt(h*h+v*v);h/=d,v/=d;var p=t-r,g=n-e,y=a-o,m=i-s,_=p*p+g*g,b=y*y+m*m;if(_<f&&b<f){l.push(o,s);return}var w=h*p+v*g,x=-h*y-v*m,S=_-w*w,T=b-x*x;if(S<f&&w>=0&&T<f&&x>=0){l.push(o,s);return}var D=[],M=[];Zi(r,t,a,o,.5,D),Zi(e,n,i,s,.5,M),Qw(D[0],M[0],D[1],M[1],D[2],M[2],D[3],M[3],l,u),Qw(D[4],M[4],D[5],M[5],D[6],M[6],D[7],M[7],l,u)}function fue(r,e){var t=Xw(r),n=[];e=e||1;for(var a=0;a<t.length;a++){var i=t[a],o=[],s=i[0],l=i[1];o.push(s,l);for(var u=2;u<i.length;){var c=i[u++],f=i[u++],h=i[u++],v=i[u++],d=i[u++],p=i[u++];Qw(s,l,c,f,h,v,d,p,o,e),s=d,l=p}n.push(o)}return n}function IB(r,e,t){var n=r[e],a=r[1-e],i=Math.abs(n/a),o=Math.ceil(Math.sqrt(i*t)),s=Math.floor(t/o);s===0&&(s=1,o=t);for(var l=[],u=0;u<o;u++)l.push(s);var c=o*s,f=t-c;if(f>0)for(var u=0;u<f;u++)l[u%o]+=1;return l}function PB(r,e,t){for(var n=r.r0,a=r.r,i=r.startAngle,o=r.endAngle,s=Math.abs(o-i),l=s*a,u=a-n,c=l>Math.abs(u),f=IB([l,u],c?0:1,e),h=(c?s:u)/f.length,v=0;v<f.length;v++)for(var d=(c?u:s)/f[v],p=0;p<f[v];p++){var g={};c?(g.startAngle=i+h*v,g.endAngle=i+h*(v+1),g.r0=n+d*p,g.r=n+d*(p+1)):(g.startAngle=i+d*p,g.endAngle=i+d*(p+1),g.r0=n+h*v,g.r=n+h*(v+1)),g.clockwise=r.clockwise,g.cx=r.cx,g.cy=r.cy,t.push(g)}}function hue(r,e,t){for(var n=r.width,a=r.height,i=n>a,o=IB([n,a],i?0:1,e),s=i?"width":"height",l=i?"height":"width",u=i?"x":"y",c=i?"y":"x",f=r[s]/o.length,h=0;h<o.length;h++)for(var v=r[l]/o[h],d=0;d<o[h];d++){var p={};p[u]=h*f,p[c]=d*v,p[s]=f,p[l]=v,p.x+=r.x,p.y+=r.y,t.push(p)}}function EB(r,e,t,n){return r*n-t*e}function vue(r,e,t,n,a,i,o,s){var l=t-r,u=n-e,c=o-a,f=s-i,h=EB(c,f,l,u);if(Math.abs(h)<1e-6)return null;var v=r-a,d=e-i,p=EB(v,d,c,f)/h;return p<0||p>1?null:new Oe(p*l+r,p*u+e)}function due(r,e,t){var n=new Oe;Oe.sub(n,t,e),n.normalize();var a=new Oe;Oe.sub(a,r,e);var i=a.dot(n);return i}function Ru(r,e){var t=r[r.length-1];t&&t[0]===e[0]&&t[1]===e[1]||r.push(e)}function pue(r,e,t){for(var n=r.length,a=[],i=0;i<n;i++){var o=r[i],s=r[(i+1)%n],l=vue(o[0],o[1],s[0],s[1],e.x,e.y,t.x,t.y);l&&a.push({projPt:due(l,e,t),pt:l,idx:i})}if(a.length<2)return[{points:r},{points:r}];a.sort(function(g,y){return g.projPt-y.projPt});var u=a[0],c=a[a.length-1];if(c.idx<u.idx){var f=u;u=c,c=f}for(var h=[u.pt.x,u.pt.y],v=[c.pt.x,c.pt.y],d=[h],p=[v],i=u.idx+1;i<=c.idx;i++)Ru(d,r[i].slice());Ru(d,v),Ru(d,h);for(var i=c.idx+1;i<=u.idx+n;i++)Ru(p,r[i%n].slice());return Ru(p,h),Ru(p,v),[{points:d},{points:p}]}function OB(r){var e=r.points,t=[],n=[];cd(e,t,n);var a=new Re(t[0],t[1],n[0]-t[0],n[1]-t[1]),i=a.width,o=a.height,s=a.x,l=a.y,u=new Oe,c=new Oe;return i>o?(u.x=c.x=s+i/2,u.y=l,c.y=l+o):(u.y=c.y=l+o/2,u.x=s,c.x=s+i),pue(e,u,c)}function Ag(r,e,t,n){if(t===1)n.push(e);else{var a=Math.floor(t/2),i=r(e);Ag(r,i[0],a,n),Ag(r,i[1],t-a,n)}return n}function gue(r,e){for(var t=[],n=0;n<e;n++)t.push(v_(r));return t}function yue(r,e){e.setStyle(r.style),e.z=r.z,e.z2=r.z2,e.zlevel=r.zlevel}function mue(r){for(var e=[],t=0;t<r.length;)e.push([r[t++],r[t++]]);return e}function _ue(r,e){var t=[],n=r.shape,a;switch(r.type){case"rect":hue(n,e,t),a=Ge;break;case"sector":PB(n,e,t),a=Hr;break;case"circle":PB({r0:0,r:n.r,startAngle:0,endAngle:Math.PI*2,cx:n.cx,cy:n.cy},e,t),a=Hr;break;default:var i=r.getComputedTransform(),o=i?Math.sqrt(Math.max(i[0]*i[0]+i[1]*i[1],i[2]*i[2]+i[3]*i[3])):1,s=J(fue(r.getUpdatedPathProxy(),o),function(y){return mue(y)}),l=s.length;if(l===0)Ag(OB,{points:s[0]},e,t);else if(l===e)for(var u=0;u<l;u++)t.push({points:s[u]});else{var c=0,f=J(s,function(y){var m=[],_=[];cd(y,m,_);var b=(_[1]-m[1])*(_[0]-m[0]);return c+=b,{poly:y,area:b}});f.sort(function(y,m){return m.area-y.area});for(var h=e,u=0;u<l;u++){var v=f[u];if(h<=0)break;var d=u===l-1?h:Math.ceil(v.area/c*e);d<0||(Ag(OB,{points:v.poly},d,t),h-=d)}}a=Gr;break}if(!a)return gue(r,e);for(var p=[],u=0;u<t.length;u++){var g=new a;g.setShape(t[u]),yue(r,g),p.push(g)}return p}function bue(r,e){var t=r.length,n=e.length;if(t===n)return[r,e];for(var a=[],i=[],o=t<n?r:e,s=Math.min(t,n),l=Math.abs(n-t)/6,u=(s-2)/6,c=Math.ceil(l/u)+1,f=[o[0],o[1]],h=l,v=2;v<s;){var d=o[v-2],p=o[v-1],g=o[v++],y=o[v++],m=o[v++],_=o[v++],b=o[v++],w=o[v++];if(h<=0){f.push(g,y,m,_,b,w);continue}for(var x=Math.min(h,c-1)+1,S=1;S<=x;S++){var T=S/x;Zi(d,g,m,b,T,a),Zi(p,y,_,w,T,i),d=a[3],p=i[3],f.push(a[1],i[1],a[2],i[2],d,p),g=a[5],y=i[5],m=a[6],_=i[6]}h-=x-1}return o===r?[f,e]:[r,f]}function RB(r,e){for(var t=r.length,n=r[t-2],a=r[t-1],i=[],o=0;o<e.length;)i[o++]=n,i[o++]=a;return i}function xue(r,e){for(var t,n,a,i=[],o=[],s=0;s<Math.max(r.length,e.length);s++){var l=r[s],u=e[s],c=void 0,f=void 0;l?u?(t=bue(l,u),c=t[0],f=t[1],n=c,a=f):(f=RB(a||l,l),c=l):(c=RB(n||u,u),f=u),i.push(c),o.push(f)}return[i,o]}function NB(r){for(var e=0,t=0,n=0,a=r.length,i=0,o=a-2;i<a;o=i,i+=2){var s=r[o],l=r[o+1],u=r[i],c=r[i+1],f=s*c-u*l;e+=f,t+=(s+u)*f,n+=(l+c)*f}return e===0?[r[0]||0,r[1]||0]:[t/e/3,n/e/3,e]}function wue(r,e,t,n){for(var a=(r.length-2)/6,i=1/0,o=0,s=r.length,l=s-2,u=0;u<a;u++){for(var c=u*6,f=0,h=0;h<s;h+=2){var v=h===0?c:(c+h-2)%l+2,d=r[v]-t[0],p=r[v+1]-t[1],g=e[h]-n[0],y=e[h+1]-n[1],m=g-d,_=y-p;f+=m*m+_*_}f<i&&(i=f,o=u)}return o}function Sue(r){for(var e=[],t=r.length,n=0;n<t;n+=2)e[n]=r[t-n-2],e[n+1]=r[t-n-1];return e}function Cue(r,e,t,n){for(var a=[],i,o=0;o<r.length;o++){var s=r[o],l=e[o],u=NB(s),c=NB(l);i==null&&(i=u[2]<0!=c[2]<0);var f=[],h=[],v=0,d=1/0,p=[],g=s.length;i&&(s=Sue(s));for(var y=wue(s,l,u,c)*6,m=g-2,_=0;_<m;_+=2){var b=(y+_)%m+2;f[_+2]=s[b]-u[0],f[_+3]=s[b+1]-u[1]}if(f[0]=s[y]-u[0],f[1]=s[y+1]-u[1],t>0)for(var w=n/t,x=-n/2;x<=n/2;x+=w){for(var S=Math.sin(x),T=Math.cos(x),D=0,_=0;_<s.length;_+=2){var M=f[_],A=f[_+1],I=l[_]-c[0],P=l[_+1]-c[1],E=I*T-P*S,O=I*S+P*T;p[_]=E,p[_+1]=O;var N=E-M,V=O-A;D+=N*N+V*V}if(D<d){d=D,v=x;for(var $=0;$<p.length;$++)h[$]=p[$]}}else for(var U=0;U<g;U+=2)h[U]=l[U]-c[0],h[U+1]=l[U+1]-c[1];a.push({from:f,to:h,fromCp:u,toCp:c,rotation:-v})}return a}function Lg(r){return r.__isCombineMorphing}var kB="__mOriginal_";function Ig(r,e,t){var n=kB+e,a=r[n]||r[e];r[n]||(r[n]=r[e]);var i=t.replace,o=t.after,s=t.before;r[e]=function(){var l=arguments,u;return s&&s.apply(this,l),i?u=i.apply(this,l):u=a.apply(this,l),o&&o.apply(this,l),u}}function mh(r,e){var t=kB+e;r[t]&&(r[e]=r[t],r[t]=null)}function BB(r,e){for(var t=0;t<r.length;t++)for(var n=r[t],a=0;a<n.length;){var i=n[a],o=n[a+1];n[a++]=e[0]*i+e[2]*o+e[4],n[a++]=e[1]*i+e[3]*o+e[5]}}function zB(r,e){var t=r.getUpdatedPathProxy(),n=e.getUpdatedPathProxy(),a=xue(Xw(t),Xw(n)),i=a[0],o=a[1],s=r.getComputedTransform(),l=e.getComputedTransform();function u(){this.transform=null}s&&BB(i,s),l&&BB(o,l),Ig(e,"updateTransform",{replace:u}),e.transform=null;var c=Cue(i,o,10,Math.PI),f=[];Ig(e,"buildPath",{replace:function(h){for(var v=e.__morphT,d=1-v,p=[],g=0;g<c.length;g++){var y=c[g],m=y.from,_=y.to,b=y.rotation*v,w=y.fromCp,x=y.toCp,S=Math.sin(b),T=Math.cos(b);yc(p,w,x,v);for(var D=0;D<m.length;D+=2){var M=m[D],A=m[D+1],I=_[D],P=_[D+1],E=M*d+I*v,O=A*d+P*v;f[D]=E*T-O*S+p[0],f[D+1]=E*S+O*T+p[1]}var N=f[0],V=f[1];h.moveTo(N,V);for(var D=2;D<m.length;){var I=f[D++],P=f[D++],$=f[D++],U=f[D++],Y=f[D++],ae=f[D++];N===I&&V===P&&$===Y&&U===ae?h.lineTo(Y,ae):h.bezierCurveTo(I,P,$,U,Y,ae),N=Y,V=ae}}}})}function Kw(r,e,t){if(!r||!e)return e;var n=t.done,a=t.during;zB(r,e),e.__morphT=0;function i(){mh(e,"buildPath"),mh(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape()}return e.animateTo({__morphT:1},me({during:function(o){e.dirtyShape(),a&&a(o)},done:function(){i(),n&&n()}},t)),e}function Tue(r,e,t,n,a,i){var o=16;r=a===t?0:Math.round(32767*(r-t)/(a-t)),e=i===n?0:Math.round(32767*(e-n)/(i-n));for(var s=0,l,u=(1<<o)/2;u>0;u/=2){var c=0,f=0;(r&u)>0&&(c=1),(e&u)>0&&(f=1),s+=u*u*(3*c^f),f===0&&(c===1&&(r=u-1-r,e=u-1-e),l=r,r=e,e=l)}return s}function Pg(r){var e=1/0,t=1/0,n=-1/0,a=-1/0,i=J(r,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),c=l.x+l.width/2+(u?u[4]:0),f=l.y+l.height/2+(u?u[5]:0);return e=Math.min(c,e),t=Math.min(f,t),n=Math.max(c,n),a=Math.max(f,a),[c,f]}),o=J(i,function(s,l){return{cp:s,z:Tue(s[0],s[1],e,t,n,a),path:r[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function FB(r){return _ue(r.path,r.count)}function Jw(){return{fromIndividuals:[],toIndividuals:[],count:0}}function Due(r,e,t){var n=[];function a(w){for(var x=0;x<w.length;x++){var S=w[x];Lg(S)?a(S.childrenRef()):S instanceof Be&&n.push(S)}}a(r);var i=n.length;if(!i)return Jw();var o=t.dividePath||FB,s=o({path:e,count:i});if(s.length!==i)return console.error("Invalid morphing: unmatched splitted path"),Jw();n=Pg(n),s=Pg(s);for(var l=t.done,u=t.during,c=t.individualDelay,f=new li,h=0;h<i;h++){var v=n[h],d=s[h];d.parent=e,d.copyTransform(f),c||zB(v,d)}e.__isCombineMorphing=!0,e.childrenRef=function(){return s};function p(w){for(var x=0;x<s.length;x++)s[x].addSelfToZr(w)}Ig(e,"addSelfToZr",{after:function(w){p(w)}}),Ig(e,"removeSelfFromZr",{after:function(w){for(var x=0;x<s.length;x++)s[x].removeSelfFromZr(w)}});function g(){e.__isCombineMorphing=!1,e.__morphT=-1,e.childrenRef=null,mh(e,"addSelfToZr"),mh(e,"removeSelfFromZr")}var y=s.length;if(c)for(var m=y,_=function(){m--,m===0&&(g(),l&&l())},h=0;h<y;h++){var b=c?me({delay:(t.delay||0)+c(h,y,n[h],s[h]),done:_},t):t;Kw(n[h],s[h],b)}else e.__morphT=0,e.animateTo({__morphT:1},me({during:function(w){for(var x=0;x<y;x++){var S=s[x];S.__morphT=e.__morphT,S.dirtyShape()}u&&u(w)},done:function(){g();for(var w=0;w<r.length;w++)mh(r[w],"updateTransform");l&&l()}},t));return e.__zr&&p(e.__zr),{fromIndividuals:n,toIndividuals:s,count:y}}function Mue(r,e,t){var n=e.length,a=[],i=t.dividePath||FB;function o(v){for(var d=0;d<v.length;d++){var p=v[d];Lg(p)?o(p.childrenRef()):p instanceof Be&&a.push(p)}}if(Lg(r)){o(r.childrenRef());var s=a.length;if(s<n)for(var l=0,u=s;u<n;u++)a.push(v_(a[l++%s]));a.length=n}else{a=i({path:r,count:n});for(var c=r.getComputedTransform(),u=0;u<a.length;u++)a[u].setLocalTransform(c);if(a.length!==n)return console.error("Invalid morphing: unmatched splitted path"),Jw()}a=Pg(a),e=Pg(e);for(var f=t.individualDelay,u=0;u<n;u++){var h=f?me({delay:(t.delay||0)+f(u,n,a[u],e[u])},t):t;Kw(a[u],e[u],h)}return{fromIndividuals:a,toIndividuals:e,count:e.length}}function VB(r){return K(r[0])}function $B(r,e){for(var t=[],n=r.length,a=0;a<n;a++)t.push({one:r[a],many:[]});for(var a=0;a<e.length;a++){var i=e[a].length,o=void 0;for(o=0;o<i;o++)t[o%n].many.push(e[a][o])}for(var s=0,a=n-1;a>=0;a--)if(!t[a].many.length){var l=t[s].many;if(l.length<=1)if(s)s=0;else return t;var i=l.length,u=Math.ceil(i/2);t[a].many=l.slice(u,i),t[s].many=l.slice(0,u),s++}return t}var Aue={clone:function(r){for(var e=[],t=1-Math.pow(1-r.path.style.opacity,1/r.count),n=0;n<r.count;n++){var a=v_(r.path);a.setStyle("opacity",t),e.push(a)}return e},split:null};function eS(r,e,t,n,a,i){if(!r.length||!e.length)return;var o=Gl("update",n,a);if(!(o&&o.duration>0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,c;VB(r)&&(u=r,c=e),VB(e)&&(u=e,c=r);function f(y,m,_,b,w){var x=y.many,S=y.one;if(x.length===1&&!w){var T=m?x[0]:S,D=m?S:x[0];if(Lg(T))f({many:[T],one:D},!0,_,b,!0);else{var M=s?me({delay:s(_,b)},l):l;Kw(T,D,M),i(T,D,T,D,M)}}else for(var A=me({dividePath:Aue[t],individualDelay:s&&function(V,$,U,Y){return s(V+_,b)}},l),I=m?Due(x,S,A):Mue(S,x,A),P=I.fromIndividuals,E=I.toIndividuals,O=P.length,N=0;N<O;N++){var M=s?me({delay:s(N,O)},l):l;i(P[N],E[N],m?x[N]:y.one,m?y.one:x[N],M)}}for(var h=u?u===r:r.length>e.length,v=u?$B(c,u):$B(h?e:r,[h?r:e]),d=0,p=0;p<v.length;p++)d+=v[p].many.length;for(var g=0,p=0;p<v.length;p++)f(v[p],h,g,d),g+=v[p].many.length}function tl(r){if(!r)return[];if(K(r)){for(var e=[],t=0;t<r.length;t++)e.push(tl(r[t]));return e}var n=[];return r.traverse(function(a){a instanceof Be&&!a.disableMorphing&&!a.invisible&&!a.ignore&&n.push(a)}),n}var HB=1e4,Lue=Ye();function Iue(r){for(var e=r.dimensions,t=0;t<e.length;t++){var n=r.getDimensionInfo(e[t]);if(n&&n.otherDims.itemGroupId===0)return e[t]}}function GB(r){var e=[];return L(r,function(t){var n=t.data;if(!(n.count()>HB))for(var a=n.getIndices(),i=Iue(n),o=0;o<a.length;o++)e.push({dataGroupId:t.dataGroupId,data:n,dim:t.dim||i,divide:t.divide,dataIndex:o})}),e}function tS(r,e,t){r.traverse(function(n){n instanceof Be&&xt(n,{style:{opacity:0}},e,{dataIndex:t,isFrom:!0})})}function rS(r){if(r.parent){var e=r.getComputedTransform();r.setLocalTransform(e),r.parent.remove(r)}}function Nu(r){r.stopAnimation(),r.isGroup&&r.traverse(function(e){e.stopAnimation()})}function Pue(r,e,t){var n=Gl("update",t,e);n&&r.traverse(function(a){if(a instanceof Bn){var i=JW(a);i&&a.animateFrom({style:i},n)}})}function Eue(r,e){var t=r.length;if(t!==e.length)return!1;for(var n=0;n<t;n++){var a=r[n],i=e[n];if(a.data.getId(a.dataIndex)!==i.data.getId(i.dataIndex))return!1}return!0}function WB(r,e,t){var n=GB(r),a=GB(e);function i(y,m,_,b,w){(_||y)&&m.animateFrom({style:_&&_!==y?Q(Q({},_.style),y.style):y.style},w)}function o(y){for(var m=0;m<y.length;m++)if(y[m].dim)return y[m].dim}var s=o(n),l=o(a),u=!1;function c(y,m){return function(_){var b=_.data,w=_.dataIndex;if(m)return b.getId(w);var x=_.dataGroupId,S=y?s||l:l||s,T=S&&b.getDimensionInfo(S),D=T&&T.ordinalMeta;if(T){var M=b.get(T.name,w);return D&&D.categories[M]||M+""}var A=b.getRawDataItem(w);return A&&A.groupId?A.groupId+"":x||b.getId(w)}}var f=Eue(n,a),h={};if(!f)for(var v=0;v<a.length;v++){var d=a[v],p=d.data.getItemGraphicEl(d.dataIndex);p&&(h[p.id]=!0)}function g(y,m){var _=n[m],b=a[y],w=b.data.hostModel,x=_.data.getItemGraphicEl(_.dataIndex),S=b.data.getItemGraphicEl(b.dataIndex);if(x===S){S&&Pue(S,b.dataIndex,w);return}x&&h[x.id]||S&&(Nu(S),x?(Nu(x),rS(x),u=!0,eS(tl(x),tl(S),b.divide,w,y,i)):tS(S,w,y))}new pi(n,a,c(!0,f),c(!1,f),null,"multiple").update(g).updateManyToOne(function(y,m){var _=a[y],b=_.data,w=b.hostModel,x=b.getItemGraphicEl(_.dataIndex),S=nt(J(m,function(T){return n[T].data.getItemGraphicEl(n[T].dataIndex)}),function(T){return T&&T!==x&&!h[T.id]});x&&(Nu(x),S.length?(L(S,function(T){Nu(T),rS(T)}),u=!0,eS(tl(S),tl(x),_.divide,w,y,i)):tS(x,w,_.dataIndex))}).updateOneToMany(function(y,m){var _=n[m],b=_.data.getItemGraphicEl(_.dataIndex);if(!(b&&h[b.id])){var w=nt(J(y,function(S){return a[S].data.getItemGraphicEl(a[S].dataIndex)}),function(S){return S&&S!==b}),x=a[y[0]].data.hostModel;w.length&&(L(w,function(S){return Nu(S)}),b?(Nu(b),rS(b),u=!0,eS(tl(b),tl(w),_.divide,x,y[0],i)):L(w,function(S){return tS(S,x,y[0])}))}}).updateManyToMany(function(y,m){new pi(m,y,function(_){return n[_].data.getId(n[_].dataIndex)},function(_){return a[_].data.getId(a[_].dataIndex)}).update(function(_,b){g(y[_],m[b])}).execute()}).execute(),u&&L(e,function(y){var m=y.data,_=m.hostModel,b=_&&t.getViewOfSeriesModel(_),w=Gl("update",_,0);b&&_.isAnimationEnabled()&&w&&w.duration>0&&b.group.traverse(function(x){x instanceof Be&&!x.animators.length&&x.animateFrom({style:{opacity:0}},w)})})}function UB(r){var e=r.getModel("universalTransition").get("seriesKey");return e||r.id}function jB(r){return K(r)?r.sort().join(","):r}function Ao(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function Oue(r,e){var t=ge(),n=ge(),a=ge();return L(r.oldSeries,function(i,o){var s=r.oldDataGroupIds[o],l=r.oldData[o],u=UB(i),c=jB(u);n.set(c,{dataGroupId:s,data:l}),K(u)&&L(u,function(f){a.set(f,{key:c,dataGroupId:s,data:l})})}),L(e.updatedSeries,function(i){if(i.isUniversalTransitionEnabled()&&i.isAnimationEnabled()){var o=i.get("dataGroupId"),s=i.getData(),l=UB(i),u=jB(l),c=n.get(u);if(c)t.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:Ao(c.data),data:c.data}],newSeries:[{dataGroupId:o,divide:Ao(s),data:s}]});else if(K(l)){var f=[];L(l,function(d){var p=n.get(d);p.data&&f.push({dataGroupId:p.dataGroupId,divide:Ao(p.data),data:p.data})}),f.length&&t.set(u,{oldSeries:f,newSeries:[{dataGroupId:o,data:s,divide:Ao(s)}]})}else{var h=a.get(l);if(h){var v=t.get(h.key);v||(v={oldSeries:[{dataGroupId:h.dataGroupId,data:h.data,divide:Ao(h.data)}],newSeries:[]},t.set(h.key,v)),v.newSeries.push({dataGroupId:o,data:s,divide:Ao(s)})}}}}),t}function YB(r,e){for(var t=0;t<r.length;t++){var n=e.seriesIndex!=null&&e.seriesIndex===r[t].seriesIndex||e.seriesId!=null&&e.seriesId===r[t].id;if(n)return t}}function Rue(r,e,t,n){var a=[],i=[];L(st(r.from),function(o){var s=YB(e.oldSeries,o);s>=0&&a.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:Ao(e.oldData[s]),dim:o.dimension})}),L(st(r.to),function(o){var s=YB(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();i.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:Ao(l),dim:o.dimension})}}),a.length>0&&i.length>0&&WB(a,i,n)}function Nue(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,n){L(st(n.seriesTransition),function(a){L(st(a.to),function(i){for(var o=n.updatedSeries,s=0;s<o.length;s++)(i.seriesIndex!=null&&i.seriesIndex===o[s].seriesIndex||i.seriesId!=null&&i.seriesId===o[s].id)&&(o[s][qd]=!0)})})}),r.registerUpdateLifecycle("series:transition",function(e,t,n){var a=Lue(t);if(a.oldSeries&&n.updatedSeries&&n.optionChanged){var i=n.seriesTransition;if(i)L(st(i),function(v){Rue(v,a,n,t)});else{var o=Oue(a,n);L(o.keys(),function(v){var d=o.get(v);WB(d.oldSeries,d.newSeries,t)})}L(n.updatedSeries,function(v){v[qd]&&(v[qd]=!1)})}for(var s=e.getSeries(),l=a.oldSeries=[],u=a.oldDataGroupIds=[],c=a.oldData=[],f=0;f<s.length;f++){var h=s[f].getData();h.count()<HB&&(l.push(s[f]),u.push(s[f].get("dataGroupId")),c.push(h))}})}ke([KY]),ke([UY]),ke([wq,Vq,Jq,VZ,nX,QX,AQ,dK,HK,QK,lJ,hee,Fee,Kee,mte,Tte,Gte,Jte,hre,bre,Ore,mne]),ke($ne),ke(xae),ke(jO),ke(zae),ke(dN),ke(Uae),ke(eie),ke(toe),ke(Coe),ke(uh),ke(Woe),ke(Yoe),ke(lse),ke(mse),ke(Dse),ke(Rse),ke(qse),ke(gle),ke(nB),ke(sB),ke(Gle),ke(SB),ke(TB),ke(qle),ke(sue),ke(cue),ke(Nue),ke(fY);var kue=Object.freeze(Object.defineProperty({__proto__:null,registerLocale:M_,version:qU,dependencies:ZU,PRIORITY:vI,init:h6,connect:v6,disConnect:AI,disconnect:d6,dispose:p6,getInstanceByDom:A1,getInstanceById:g6,registerTheme:L1,registerPreprocessor:I1,registerProcessor:P1,registerPostInit:LI,registerPostUpdate:II,registerUpdateLifecycle:hp,registerAction:ma,registerCoordinateSystem:PI,getCoordinateSystemDimensions:y6,registerLayout:EI,registerVisual:vo,registerLoading:O1,setCanvasCreator:m6,registerMap:RI,getMap:_6,registerTransform:NI,dataTool:b6,throttle:Qd,use:ke,setPlatformAPI:$T,parseGeoJSON:X1,parseGeoJson:X1,env:Ue,Model:lt,Axis:Un,innerDrawElementOnCanvas:v1,zrender:HG,matrix:LH,vector:vH,zrUtil:oH,color:nG,helper:Mj,number:Oj,time:Rj,graphic:Nj,format:kj,util:Bj,List:Er,ComponentModel:$e,ComponentView:wt,SeriesModel:yt,ChartView:ut,extendComponentModel:qj,extendComponentView:Zj,extendSeriesModel:Xj,extendChartView:Qj},Symbol.toStringTag,{value:"Module"})),rl={},ku={},qB={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var e=1,t=function(){return"".concat(e++)};r.default=t})(qB);var Eg={},Og={},nS={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var e=function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,i=null;return function(){for(var o=this,s=arguments.length,l=new Array(s),u=0;u<s;u++)l[u]=arguments[u];clearTimeout(i),i=setTimeout(function(){n.apply(o,l)},a)}};r.default=e})(nS);var Ci={};Object.defineProperty(Ci,"__esModule",{value:!0}),Ci.SensorTabIndex=Ci.SensorClassName=Ci.SizeSensorId=void 0;var Bue="size-sensor-id";Ci.SizeSensorId=Bue;var zue="size-sensor-object";Ci.SensorClassName=zue;var Fue="-1";Ci.SensorTabIndex=Fue,Object.defineProperty(Og,"__esModule",{value:!0}),Og.createSensor=void 0;var Vue=$ue(nS),ZB=Ci;function $ue(r){return r&&r.__esModule?r:{default:r}}var Hue=function(e){var t=void 0,n=[],a=function(){getComputedStyle(e).position==="static"&&(e.style.position="relative");var c=document.createElement("object");return c.onload=function(){c.contentDocument.defaultView.addEventListener("resize",i),i()},c.style.display="block",c.style.position="absolute",c.style.top="0",c.style.left="0",c.style.height="100%",c.style.width="100%",c.style.overflow="hidden",c.style.pointerEvents="none",c.style.zIndex="-1",c.style.opacity="0",c.setAttribute("class",ZB.SensorClassName),c.setAttribute("tabindex",ZB.SensorTabIndex),c.type="text/html",e.appendChild(c),c.data="about:blank",c},i=(0,Vue.default)(function(){n.forEach(function(u){u(e)})}),o=function(c){t||(t=a()),n.indexOf(c)===-1&&n.push(c)},s=function(){t&&t.parentNode&&(t.contentDocument&&t.contentDocument.defaultView.removeEventListener("resize",i),t.parentNode.removeChild(t),t=void 0,n=[])},l=function(c){var f=n.indexOf(c);f!==-1&&n.splice(f,1),n.length===0&&t&&s()};return{element:e,bind:o,destroy:s,unbind:l}};Og.createSensor=Hue;var Rg={};Object.defineProperty(Rg,"__esModule",{value:!0}),Rg.createSensor=void 0;var Gue=Wue(nS);function Wue(r){return r&&r.__esModule?r:{default:r}}var Uue=function(e){var t=void 0,n=[],a=(0,Gue.default)(function(){n.forEach(function(u){u(e)})}),i=function(){var c=new ResizeObserver(a);return c.observe(e),a(),c},o=function(c){t||(t=i()),n.indexOf(c)===-1&&n.push(c)},s=function(){t.disconnect(),n=[],t=void 0},l=function(c){var f=n.indexOf(c);f!==-1&&n.splice(f,1),n.length===0&&t&&s()};return{element:e,bind:o,destroy:s,unbind:l}};Rg.createSensor=Uue,Object.defineProperty(Eg,"__esModule",{value:!0}),Eg.createSensor=void 0;var jue=Og,Yue=Rg,que=typeof ResizeObserver!="undefined"?Yue.createSensor:jue.createSensor;Eg.createSensor=que,Object.defineProperty(ku,"__esModule",{value:!0}),ku.removeSensor=ku.getSensor=void 0;var Zue=Que(qB),Xue=Eg,Ng=Ci;function Que(r){return r&&r.__esModule?r:{default:r}}var _h={},Kue=function(e){var t=e.getAttribute(Ng.SizeSensorId);if(t&&_h[t])return _h[t];var n=(0,Zue.default)();e.setAttribute(Ng.SizeSensorId,n);var a=(0,Xue.createSensor)(e);return _h[n]=a,a};ku.getSensor=Kue;var Jue=function(e){var t=e.element.getAttribute(Ng.SizeSensorId);e.element.removeAttribute(Ng.SizeSensorId),e.destroy(),t&&_h[t]&&delete _h[t]};ku.removeSensor=Jue,Object.defineProperty(rl,"__esModule",{value:!0}),rl.ver=QB=rl.clear=XB=rl.bind=void 0;var aS=ku,ece=function(e,t){var n=(0,aS.getSensor)(e);return n.bind(t),function(){n.unbind(t)}},XB=rl.bind=ece,tce=function(e){var t=(0,aS.getSensor)(e);(0,aS.removeSensor)(t)},QB=rl.clear=tce,rce="1.0.1";rl.ver=rce;function KB(r,e){var t={};return e.forEach(function(n){t[n]=r[n]}),t}function iS(r){return typeof r=="function"}function nce(r){return typeof r=="string"}var Bu=function r(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,a,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(a=n;a--!==0;)if(!r(e[a],t[a]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(a=n;a--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[a]))return!1;for(a=n;a--!==0;){var o=i[a];if(!r(e[o],t[o]))return!1}return!0}return e!==e&&t!==t},ace=function(r){FT(e,r);function e(t){var n=r.call(this,t)||this;return n.echarts=t.echarts,n.ele=null,n.isInitialResize=!0,n}return e.prototype.componentDidMount=function(){this.renderNewEcharts()},e.prototype.componentDidUpdate=function(t){var n=this.props.shouldSetOption;if(!(iS(n)&&!n(t,this.props))){if(!Bu(t.theme,this.props.theme)||!Bu(t.opts,this.props.opts)||!Bu(t.onEvents,this.props.onEvents)){this.dispose(),this.renderNewEcharts();return}var a=["option","notMerge","lazyUpdate","showLoading","loadingOption"];Bu(KB(this.props,a),KB(t,a))||this.updateEChartsOption(),(!Bu(t.style,this.props.style)||!Bu(t.className,this.props.className))&&this.resize()}},e.prototype.componentWillUnmount=function(){this.dispose()},e.prototype.getEchartsInstance=function(){return this.echarts.getInstanceByDom(this.ele)||this.echarts.init(this.ele,this.props.theme,this.props.opts)},e.prototype.dispose=function(){if(this.ele){try{QB(this.ele)}catch(t){console.warn(t)}this.echarts.dispose(this.ele)}},e.prototype.renderNewEcharts=function(){var t=this,n=this.props,a=n.onEvents,i=n.onChartReady,o=this.updateEChartsOption();this.bindEvents(o,a||{}),iS(i)&&i(o),this.ele&&XB(this.ele,function(){t.resize()})},e.prototype.bindEvents=function(t,n){function a(o,s){nce(o)&&iS(s)&&t.on(o,function(l){s(l,t)})}for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&a(i,n[i])},e.prototype.updateEChartsOption=function(){var t=this.props,n=t.option,a=t.notMerge,i=a===void 0?!1:a,o=t.lazyUpdate,s=o===void 0?!1:o,l=t.showLoading,u=t.loadingOption,c=u===void 0?null:u,f=this.getEchartsInstance();return f.setOption(n,i,s),l?f.showLoading(c):f.hideLoading(),f},e.prototype.resize=function(){var t=this.getEchartsInstance();if(!this.isInitialResize)try{t.resize()}catch(n){console.warn(n)}this.isInitialResize=!1},e.prototype.render=function(){var t=this,n=this.props,a=n.style,i=n.className,o=i===void 0?"":i,s=Dm({height:300},a);return C("div",{ref:function(l){t.ele=l},style:s,className:"echarts-for-react "+o})},e}(B.PureComponent),ot=function(r){FT(e,r);function e(t){var n=r.call(this,t)||this;return n.echarts=kue,n}return e}(ace);const kg=(r,e)=>{r==="external"?window.open(e,"_blank"):window.location.replace(e)},JB=(r,e,t)=>{const{card:n}=r;switch(!0){case!n.isEnable:return;case n.dynamic==="metricId":{const a=n.route.replace("{{metric.metricId}}",e);kg(n.routeType,a);break}case n.dynamic==="uuid":{const a=n.route.replace("{{metric.uuid}}",t);kg(n.routeType,a);break}case n.dynamic==="none":{kg(n.routeType,n.route);break}default:console.warn("Unhandled click behaviour configuration");break}},Wt=(r,e)=>{if(r.isEnable){const t=r.route.replace("{{value}}",`${e}`.replace(/"/g,""));kg(r.routeType,t)}},ice=({data:r,margins:e,legendSettings:t,labelSettings:n,axisSettings:a,enableSaveAs:i,colors:o,updateGroup:s,isEnableGroupBy:l,backGroundColor:u,customSettings:c,chartClickConfig:f})=>{var v;const h={toolbox:{feature:{saveAsImage:i&&{name:"databrain"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},...o!=null&&o.length?{color:o}:{},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"cross",label:{backgroundColor:"#6a7985"}}},legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,data:r.datasets.map(d=>d.label)},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},xAxis:[{type:"category",boundaryGap:!1,data:r.labels,splitLine:{show:(c==null?void 0:c.hideSplitLines)==="horizontal"||(c==null?void 0:c.hideSplitLines)==="none"},axisLine:{show:(c==null?void 0:c.hideAxisLines)==="y"||(c==null?void 0:c.hideAxisLines)==="none"},axisLabel:{show:(c==null?void 0:c.axisLabels)==="y"||(c==null?void 0:c.axisLabels)==="none"}}],yAxis:[{type:"value",position:a.axis,splitLine:{show:(c==null?void 0:c.hideSplitLines)==="vertical"||(c==null?void 0:c.hideSplitLines)==="none"},axisLine:{show:(c==null?void 0:c.hideAxisLines)==="x"||(c==null?void 0:c.hideAxisLines)==="none"},axisLabel:{show:(c==null?void 0:c.axisLabels)==="x"||(c==null?void 0:c.axisLabels)==="none"}}],series:(v=r.datasets)==null?void 0:v.map(d=>({data:d.data,type:"line",name:d.label,stack:"Total",areaStyle:{},emphasis:{focus:"series"},label:{show:n.show,position:n.position},showBackground:u==null?void 0:u.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"}}))};return z(Ce,{children:[!l&&C(ot,{style:{width:"100%",height:"90%"},option:h,onEvents:{click:d=>{var p;Wt(f,((p=d==null?void 0:d.name)==null?void 0:p.split(" ").join("_"))||"undefined")}}}),l&&s&&C(ot,{style:{width:"100%",height:"90%"},option:h,onEvents:{click:d=>{s(d.name)}}})]})},oce=({data:r,colors:e,updateGroup:t,isEnableGroupBy:n,backGroundColor:a,legendSettings:i,labelSettings:o,axisSettings:s,margins:l,customSettings:u,chartClickConfig:c})=>{var h,v;const f={toolbox:{feature:{saveAsImage:{name:"databrain"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"}},...e!=null&&e.length?{color:e}:{},grid:{left:`${l.marginLeft}%`,bottom:`${l.marginBottom}%`,top:`${l.marginTop}%`,right:`${l.marginRight}%`,containLabel:!0},xAxis:{type:"category",data:r.labels,axisTick:{alignWithLabel:!0},axisLabel:{show:(u==null?void 0:u.axisLabels)==="y"||(u==null?void 0:u.axisLabels)==="none",interval:0,rotate:50,hideOverlap:!0,overflow:"truncate"},splitLine:{show:(u==null?void 0:u.hideSplitLines)==="horizontal"||(u==null?void 0:u.hideSplitLines)==="none"},axisLine:{show:(u==null?void 0:u.hideAxisLines)==="y"||(u==null?void 0:u.hideAxisLines)==="none"}},yAxis:{type:"value",position:s.axis,splitLine:{show:(u==null?void 0:u.hideSplitLines)==="vertical"||(u==null?void 0:u.hideSplitLines)==="none"},axisLine:{show:(u==null?void 0:u.hideAxisLines)==="x"||(u==null?void 0:u.hideAxisLines)==="none"},axisLabel:{show:(u==null?void 0:u.axisLabels)==="x"||(u==null?void 0:u.axisLabels)==="none"}},legend:{data:(h=r.datasets)==null?void 0:h.map(d=>d.label),show:i.show,top:i.top,left:i.left,right:i.right,bottom:i.bottom,orient:i.position},series:(v=r.datasets)==null?void 0:v.map(d=>({data:d.data,type:"bar",name:d.label,barWidth:`${(u==null?void 0:u.barWidth)||0}%`,label:{show:o.show,position:o.position},showBackground:a==null?void 0:a.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"},itemStyle:{borderRadius:u==null?void 0:u.barRadius}}))};return z(Ce,{children:[!n&&C(ot,{style:{width:"100%",height:"90%"},option:f,onEvents:{click:d=>{var p;Wt(c,((p=d==null?void 0:d.name)==null?void 0:p.split(" ").join("_"))||"undefined")}}}),n&&t&&C(ot,{style:{width:"100%",height:"90%"},option:f,onEvents:{click:d=>{t(d.name)}}})]})},sce=({data:r,margins:e,legendSettings:t,labelSettings:n,enableSaveAs:a,colors:i,updateGroup:o,isEnableGroupBy:s,backGroundColor:l,customSettings:u,chartClickConfig:c})=>{var d;const f=["bar","line"];let h=1;const v={grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},...i!=null&&i.length?{color:i}:{},toolbox:{feature:{saveAsImage:a&&{name:"databrain"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"cross",crossStyle:{color:"#999"}}},legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,data:r.datasets.map(p=>p.label)},xAxis:[{type:"category",data:r.labels,axisPointer:{type:"shadow"},splitLine:{show:(u==null?void 0:u.hideSplitLines)==="horizontal"||(u==null?void 0:u.hideSplitLines)==="none"},axisLine:{show:(u==null?void 0:u.hideAxisLines)==="y"||(u==null?void 0:u.hideAxisLines)==="none"},axisLabel:{show:(u==null?void 0:u.axisLabels)==="y"||(u==null?void 0:u.axisLabels)==="none"}}],yAxis:[{type:"value",min:0,max:9e3,interval:3e3,splitLine:{show:(u==null?void 0:u.hideSplitLines)==="vertical"||(u==null?void 0:u.hideSplitLines)==="none"},axisLine:{show:(u==null?void 0:u.hideAxisLines)==="x"||(u==null?void 0:u.hideAxisLines)==="none"},axisLabel:{show:(u==null?void 0:u.axisLabels)==="x"||(u==null?void 0:u.axisLabels)==="none"}},{type:"value",min:0,max:25,interval:5,splitLine:{show:(u==null?void 0:u.hideSplitLines)==="vertical"||(u==null?void 0:u.hideSplitLines)==="none"},axisLine:{show:(u==null?void 0:u.hideAxisLines)==="x"||(u==null?void 0:u.hideAxisLines)==="none"},axisLabel:{show:(u==null?void 0:u.axisLabels)==="x"||(u==null?void 0:u.axisLabels)==="none"}}],series:(d=r.datasets)==null?void 0:d.map(p=>(h===0?h=1:h=0,{name:p.label,type:f[h],tooltip:{valueFormatter(g){return`${g}`}},data:p.data,label:{show:n.show,position:n.position},showBackground:l.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"}}))};return z(Ce,{children:[!s&&C(ot,{style:{width:"100%",height:"90%"},option:v,onEvents:{click:p=>{var g;Wt(c,((g=p==null?void 0:p.name)==null?void 0:g.split(" ").join("_"))||"undefined")}}}),s&&o&&C(ot,{style:{width:"100%",height:"90%"},option:v,onEvents:{click:p=>{o(p.name)}}})]})},lce=({data:r,margins:e,legendSettings:t,labelSettings:n,axisSettings:a,enableSaveAs:i,colors:o,updateGroup:s,isEnableGroupBy:l,customSettings:u,chartClickConfig:c})=>{var h,v;const f={tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"line",lineStyle:{color:"rgba(0,0,0,0.2)",width:1,type:"solid"}}},...o!=null&&o.length?{color:o}:{},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},toolbox:{feature:{saveAsImage:i&&{name:"databrain"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},xAxis:{type:"category",boundaryGap:!1,data:r.labels,splitLine:{show:u.hideSplitLines==="horizontal"||u.hideSplitLines==="none"},axisLine:{show:u.hideAxisLines==="y"||u.hideAxisLines==="none"},axisLabel:{show:u.axisLabels==="y"||u.axisLabels==="none"}},yAxis:{type:"value",position:a.axis,splitLine:{show:u.hideSplitLines==="vertical"||u.hideSplitLines==="none"},axisLine:{show:u.hideAxisLines==="x"||u.hideAxisLines==="none"},axisLabel:{show:u.axisLabels==="x"||u.axisLabels==="none"}},legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,data:(h=r.datasets)==null?void 0:h.map(d=>d.label)},series:(v=r.datasets)==null?void 0:v.map(d=>({data:d.data,type:"line",name:d.label,label:{show:n.show,position:n.position},emphasis:{focus:"series"}}))};return z(Ce,{children:[!l&&C(ot,{style:{width:"100%",height:"90%"},option:f}),l&&s&&C(ot,{style:{width:"100%",height:"90%"},option:f,onEvents:{click:d=>{Wt(c,d.name)}}})]})},uce=({data:r,margins:e,legendSettings:t,labelSettings:n,enableSaveAs:a,colors:i,updateGroup:o,isEnableGroupBy:s,chartClickConfig:l})=>{var f,h,v;if(((h=(f=r==null?void 0:r.datasets[0])==null?void 0:f.data)==null?void 0:h.length)>1){const d=[];let p=100;(v=r==null?void 0:r.datasets)==null||v.map(y=>{const m=[];let _=0;y.data.map(b=>{const w={value:b,name:r.labels[_]};m.push(w),_+=1}),d.push([y.label,m])});const g={toolbox:{feature:{saveAsImage:a&&{name:"databrain"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},tooltip:{trigger:"item",backgroundColor:"black",textStyle:{color:"white"}},...i!=null&&i.length?{color:i}:{},legend:{show:t.show,top:t.position==="horizontal"?"420px":t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,type:"scroll"},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},series:d.map(y=>(p-=20,{name:y[0],type:"pie",radius:`${p}%`,data:y[1],emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},label:{show:n.show,position:n.position},labelLine:{show:!1}}))};return z(Ce,{children:[s&&C(Ce,{children:C(ot,{style:{width:"100%",height:"100%"},option:g,onEvents:{click:y=>{o(y.name)}}})}),!s&&C(Ce,{children:C(ot,{style:{width:"100%",height:"100%"},option:g,onEvents:{click:y=>{var m;Wt(l,((m=y==null?void 0:y.name)==null?void 0:m.split(" ").join("_"))||"undefined")}}})})]})}const u=r==null?void 0:r.datasets.map((d,p)=>({value:d.data,name:r==null?void 0:r.labels[p]})),c={toolbox:{feature:{saveAsImage:a&&{name:"databrain"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},tooltip:{trigger:"item",backgroundColor:"black",textStyle:{color:"white"}},...i!=null&&i.length?{color:i}:{},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},legend:{data:r==null?void 0:r.labels,show:t.show,top:t.position==="horizontal"?"420px":t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,type:"scroll"},series:{type:"pie",radius:"80%",data:u,label:{show:!1},labelLine:{show:!1}}};return C(Ce,{children:z(Ce,{children:[s&&C(Ce,{children:C(ot,{style:{width:"100%",height:"100%"},option:c,onEvents:{click:d=>{o(d.name)}}})}),!s&&C(Ce,{children:C(ot,{style:{width:"100%",height:"100%"},option:c,onEvents:{click:d=>{var p;Wt(l,((p=d==null?void 0:d.name)==null?void 0:p.split(" ").join("_"))||"undefined")}}})})]})})},cce=({data:r,margins:e,legendSettings:t,labelSettings:n,enableSaveAs:a,colors:i,updateGroup:o,isEnableGroupBy:s,backGroundColor:l,customSettings:u,chartClickConfig:c})=>{var h;const f={toolbox:{feature:{saveAsImage:a&&{name:"databrain"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},...i!=null&&i.length?{color:i}:{},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"cross",label:{backgroundColor:"#6a7985"}}},legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,data:r.datasets.map(v=>v.label)},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},xAxis:{type:"value",boundaryGap:[0,.01],splitLine:{show:(u==null?void 0:u.hideSplitLines)==="horizontal"||(u==null?void 0:u.hideSplitLines)==="none"},axisLine:{show:(u==null?void 0:u.hideAxisLines)==="y"||(u==null?void 0:u.hideAxisLines)==="none"},axisLabel:{show:(u==null?void 0:u.axisLabels)==="y"||(u==null?void 0:u.axisLabels)==="none"}},yAxis:{type:"category",data:r.labels,splitLine:{show:(u==null?void 0:u.hideSplitLines)==="vertical"||(u==null?void 0:u.hideSplitLines)==="none"},axisLine:{show:(u==null?void 0:u.hideAxisLines)==="x"||(u==null?void 0:u.hideAxisLines)==="none"},axisLabel:{show:(u==null?void 0:u.axisLabels)==="x"||(u==null?void 0:u.axisLabels)==="none"}},series:(h=r.datasets)==null?void 0:h.map(v=>({data:v.data,type:"bar",name:v.label,barWidth:`${u==null?void 0:u.barWidth}%`,emphasis:{focus:"series"},label:{show:n.show,position:n.position},showBackground:l.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"},itemStyle:{borderRadius:u==null?void 0:u.barRadius}}))};return z(Ce,{children:[!s&&C(ot,{style:{width:"100%",height:"90%"},option:f,onEvents:{click:v=>{var d;Wt(c,((d=v==null?void 0:v.name)==null?void 0:d.split(" ").join("_"))||"undefined")}}}),s&&o&&C(ot,{style:{width:"100%",height:"90%"},option:f,onEvents:{click:v=>{o(v.name)}}})]})},fce=({data:r,margins:e,legendSettings:t,labelSettings:n,axisSettings:a,enableSaveAs:i,colors:o,updateGroup:s,isEnableGroupBy:l,backGroundColor:u,customSettings:c,chartClickConfig:f})=>{var v;const h={toolbox:{feature:{saveAsImage:i&&{name:"databrain"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},...o!=null&&o.length?{color:o}:{},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"},formatter:d=>`${d.map(p=>`${p.seriesName}: ${p.value}<br />`).join("")}`},xAxis:{type:"category",data:r.labels,splitLine:{show:(c==null?void 0:c.hideSplitLines)==="horizontal"||(c==null?void 0:c.hideSplitLines)==="none"},axisLine:{show:(c==null?void 0:c.hideAxisLines)==="y"||(c==null?void 0:c.hideAxisLines)==="none"},axisLabel:{show:(c==null?void 0:c.axisLabels)==="y"||(c==null?void 0:c.axisLabels)==="none"}},yAxis:{type:"value",position:a.axis,splitLine:{show:(c==null?void 0:c.hideSplitLines)==="vertical"||(c==null?void 0:c.hideSplitLines)==="none"},axisLine:{show:(c==null?void 0:c.hideAxisLines)==="x"||(c==null?void 0:c.hideAxisLines)==="none"},axisLabel:{show:(c==null?void 0:c.axisLabels)==="x"||(c==null?void 0:c.axisLabels)==="none"}},legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,data:r.datasets.map(d=>d.label)},series:(v=r.datasets)==null?void 0:v.map(d=>({symbolSize:10,data:d.data,type:"scatter",name:d.label,label:{show:n.show,position:n.position},showBackground:u.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"}}))};return z(Ce,{children:[!l&&C(ot,{style:{width:"100%",height:"90%"},option:h,onEvents:{click:d=>{var p;Wt(f,((p=d==null?void 0:d.name)==null?void 0:p.split(" ").join("_"))||"undefined")}}}),l&&s&&C(ot,{style:{width:"100%",height:"90%"},option:h,onEvents:{click:d=>{s(d.name)}}})]})},hce=({data:r,margins:e,labelSettings:t,axisSettings:n,enableSaveAs:a,colors:i,updateGroup:o,isEnableGroupBy:s,backGroundColor:l,customSettings:u,chartClickConfig:c})=>{var h,v;const f={toolbox:{feature:{saveAsImage:a&&{name:"databrain"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},...i!=null&&i.length?{color:i}:{},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"},formatter(d){const p=d[1];return`${p.name}<br/>${p.value}`}},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},xAxis:{type:"category",data:r.labels,splitLine:{show:(u==null?void 0:u.hideSplitLines)==="horizontal"||(u==null?void 0:u.hideSplitLines)==="none"},axisLine:{show:(u==null?void 0:u.hideAxisLines)==="y"||(u==null?void 0:u.hideAxisLines)==="none"},axisLabel:{show:(u==null?void 0:u.axisLabels)==="y"||(u==null?void 0:u.axisLabels)==="none"}},yAxis:{type:"value",position:n.axis,splitLine:{show:(u==null?void 0:u.hideSplitLines)==="vertical"||(u==null?void 0:u.hideSplitLines)==="none"},axisLine:{show:(u==null?void 0:u.hideAxisLines)==="x"||(u==null?void 0:u.hideAxisLines)==="none"},axisLabel:{show:(u==null?void 0:u.axisLabels)==="x"||(u==null?void 0:u.axisLabels)==="none"}},series:[{name:"Placeholder",type:"bar",stack:"Total",itemStyle:{borderColor:"transparent",color:"transparent"},emphasis:{itemStyle:{borderColor:"transparent",color:"transparent"}},data:(h=r.datasets)==null?void 0:h[1],showBackground:l.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"}},{name:"Life Cost",type:"bar",stack:"Total",label:{show:t.show,position:t.position},data:(v=r.datasets)==null?void 0:v[0]}]};return z(Ce,{children:[!s&&C(ot,{style:{width:"100%",height:"90%"},option:f,onEvents:{click:d=>{var p;Wt(c,((p=d==null?void 0:d.name)==null?void 0:p.split(" ").join("_"))||"undefined")}}}),s&&o&&C(ot,{style:{width:"100%",height:"90%"},option:f,onEvents:{click:d=>{o(d.name)}}})]})},vce=({funnelData:r,margins:e,legendSettings:t,labelSettings:n,colors:a,chartClickConfig:i})=>{const o={tooltip:{trigger:"item",formatter:"{b} : {c}k",backgroundColor:"black",textStyle:{color:"white"}},...a!=null&&a.length?{color:a}:{},legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,data:r==null?void 0:r.name},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},series:[{name:"Funnel",type:"funnel",left:"10%",top:60,bottom:60,width:"80%",height:"60%",min:0,max:100,minSize:"0%",maxSize:"100%",sort:"descending",gap:3,label:{show:n.show,position:n.position},labelLine:{length:10,lineStyle:{width:1,type:"solid"}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{fontSize:20}},data:r}]};return C(Ce,{children:C(ot,{style:{width:"100%",height:"90%"},option:o,onEvents:{click:s=>{var l;Wt(i,((l=s==null?void 0:s.name)==null?void 0:l.split(" ").join("_"))||"undefined")}}})})},dce=({data:r,margins:e,legendSettings:t,labelSettings:n,axisSettings:a,enableSaveAs:i,colors:o,updateGroup:s,isEnableGroupBy:l,customSettings:u,chartClickConfig:c})=>{var d;const f=[];let h=8;(d=r==null?void 0:r.datasets)==null||d.map(p=>{const g=[];let y=0;const m=p.label;p.data.map(_=>{g.push([r.labels[y],_,m]),y+=1}),f.push(g)});const v={tooltip:{backgroundColor:"black",textStyle:{color:"white"}},...o!=null&&o.length?{color:o}:{},toolbox:{feature:{saveAsImage:i&&{name:"databrain"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,data:f.map(p=>p[0][2])},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},xAxis:{splitLine:{show:(u==null?void 0:u.hideSplitLines)==="horizontal"||(u==null?void 0:u.hideSplitLines)==="none",lineStyle:{type:"dashed"}},axisLine:{show:(u==null?void 0:u.hideAxisLines)==="y"||(u==null?void 0:u.hideAxisLines)==="none"},axisLabel:{show:(u==null?void 0:u.axisLabels)==="y"||(u==null?void 0:u.axisLabels)==="none"}},yAxis:{position:a.axis,scale:!0,splitLine:{show:(u==null?void 0:u.hideSplitLines)==="vertical"||(u==null?void 0:u.hideSplitLines)==="none",lineStyle:{type:"dashed"}},axisLine:{show:(u==null?void 0:u.hideAxisLines)==="x"||(u==null?void 0:u.hideAxisLines)==="none"},axisLabel:{show:(u==null?void 0:u.axisLabels)==="x"||(u==null?void 0:u.axisLabels)==="none"}},series:f.map(p=>{h+=3;const g="0123456789ABCDEF";let y="#";for(let m=0;m<6;m+=1)y+=g[Math.floor(Math.random()*16)];return{name:p[0][2],data:p.map(m=>({name:m[0],value:m[1]})),type:"scatter",symbolSize:h,emphasis:{focus:"series"},itemStyle:{shadowBlur:10,shadowColor:"rgba(120, 36, 50, 0.5)",shadowOffsetY:5,color:y},label:{show:n.show,position:n.position}}})};return z(Ce,{children:[!l&&C(ot,{style:{width:"100%",height:"90%"},option:v,onEvents:{click:p=>{var g;Wt(c,((g=p==null?void 0:p.name)==null?void 0:g.split(" ").join("_"))||"undefined")}}}),l&&s&&C(ot,{style:{width:"100%",height:"90%"},option:v,onEvents:{click:p=>{s(p.name)}}})]})},pce=({data:r,margins:e,legendSettings:t,labelSettings:n,enableSaveAs:a,colors:i,updateGroup:o,isEnableGroupBy:s,chartClickConfig:l})=>{var f,h;if(((f=r==null?void 0:r.labels)==null?void 0:f.length)>1){const v=[];let d=70,p=100;(h=r==null?void 0:r.datasets)==null||h.map(y=>{const m=[];let _=0;y.data.map(b=>{const w={value:b,name:r.labels[_]};m.push(w),_+=1}),v.push([y.label,m])});const g={toolbox:{feature:{saveAsImage:a&&{name:"databrain"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},...i!=null&&i.length?{color:i}:{},tooltip:{trigger:"item",backgroundColor:"black",textStyle:{color:"white"}},legend:{show:t.show,top:t.position==="horizontal"?"420px":t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,type:"scroll"},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},series:v.map(y=>(d-=20,p-=20,{name:y[0],type:"pie",radius:[`${d}%`,`${p}%`],avoidLabelOverlap:!1,label:{show:n.show,position:n.position},data:y[1],labelLine:{show:!1}}))};return z(Ce,{children:[!s&&C(ot,{style:{width:"100%",height:"90%"},option:g}),s&&o&&C(ot,{style:{width:"100%",height:"90%"},option:g,onEvents:{click:y=>{o(y.name)}}})]})}const u=r==null?void 0:r.datasets.map((v,d)=>({value:v.data,name:r==null?void 0:r.labels[d]})),c={toolbox:{feature:{saveAsImage:a&&{name:"databrain"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},...i!=null&&i.length?{color:i}:{},tooltip:{trigger:"item",backgroundColor:"black",textStyle:{color:"white"}},legend:{data:r==null?void 0:r.labels,orient:"vertical",left:"left",type:"scroll"},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},series:{type:"pie",radius:["30%","70%"],avoidLabelOverlap:!1,label:{show:n.show,position:n.position},data:u,labelLine:{show:!1}}};return z(Ce,{children:[!s&&C(ot,{style:{width:"100%",height:"90%"},option:c,onEvents:{click:v=>{var d;Wt(l,((d=v==null?void 0:v.name)==null?void 0:d.split(" ").join("_"))||"undefined")}}}),s&&o&&C(ot,{style:{width:"100%",height:"90%"},option:c,onEvents:{click:v=>{o(v.name)}}})]})},gce=({data:r,margins:e,legendSettings:t,labelSettings:n,axisSettings:a,enableSaveAs:i,colors:o,updateGroup:s,isEnableGroupBy:l,backGroundColor:u,customSettings:c,chartClickConfig:f})=>{var p;const h=["start","middle","end"];let v=2;const d={toolbox:{feature:{saveAsImage:i&&{name:"databrain"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},...o!=null&&o.length?{color:o}:{},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"}},legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,data:r.datasets.map(g=>g.label)},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},xAxis:{type:"category",data:r.labels,splitLine:{show:(c==null?void 0:c.hideSplitLines)==="horizontal"||(c==null?void 0:c.hideSplitLines)==="none"},axisLine:{show:(c==null?void 0:c.hideAxisLines)==="y"||(c==null?void 0:c.hideAxisLines)==="none"},axisLabel:{show:(c==null?void 0:c.axisLabels)==="y"||(c==null?void 0:c.axisLabels)==="none"}},yAxis:{type:"value",position:a.axis,splitLine:{show:(c==null?void 0:c.hideSplitLines)==="vertical"||(c==null?void 0:c.hideSplitLines)==="none"},axisLine:{show:(c==null?void 0:c.hideAxisLines)==="x"||(c==null?void 0:c.hideAxisLines)==="none"},axisLabel:{show:(c==null?void 0:c.axisLabels)==="x"||(c==null?void 0:c.axisLabels)==="none"}},series:(p=r.datasets)==null?void 0:p.map(g=>(v===0?v=1:v===1?v=2:v=0,{name:g.label,type:"line",step:h[v],data:g.data,areaStyle:{},label:{show:n.show,position:n.position},showBackground:u.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"}}))};return z(Ce,{children:[!l&&C(ot,{style:{width:"100%",height:"90%"},option:d,onEvents:{click:g=>{var y;Wt(f,((y=g==null?void 0:g.name)==null?void 0:y.split(" ").join("_"))||"undefined")}}}),l&&s&&C(ot,{style:{width:"100%",height:"90%"},option:d,onEvents:{click:g=>{s(g.name)}}})]})},yce=({data:r,margins:e,legendSettings:t,labelSettings:n,axisSettings:a,enableSaveAs:i,colors:o,updateGroup:s,isEnableGroupBy:l,backGroundColor:u,customSettings:c,chartClickConfig:f})=>{var v,d;const h={toolbox:{feature:{saveAsImage:i&&{name:"databrain"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"}},...o!=null&&o.length?{color:o}:{},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,data:r.datasets.map(p=>p.label)},xAxis:[{type:"category",data:r.labels,axisTick:{alignWithLabel:!0},splitLine:{show:(c==null?void 0:c.hideSplitLines)==="horizontal"||(c==null?void 0:c.hideSplitLines)==="none"},axisLine:{show:(c==null?void 0:c.hideAxisLines)==="y"||(c==null?void 0:c.hideAxisLines)==="none"},axisLabel:{show:(c==null?void 0:c.axisLabels)==="y"||(c==null?void 0:c.axisLabels)==="none"}}],yAxis:[{type:"value",position:a.axis,splitLine:{show:(c==null?void 0:c.hideSplitLines)==="vertical"||(c==null?void 0:c.hideSplitLines)==="none"},axisLine:{show:(c==null?void 0:c.hideAxisLines)==="x"||(c==null?void 0:c.hideAxisLines)==="none"},axisLabel:{show:(c==null?void 0:c.axisLabels)==="x"||(c==null?void 0:c.axisLabels)==="none"}}],series:[{name:(v=r.datasets[0])==null?void 0:v.label,type:"bar",barWidth:"100%",data:(d=r.datasets[0])==null?void 0:d.data,label:{show:n.show,position:n.position},showBackground:u.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"}}]};return z(Ce,{children:[!l&&C(ot,{style:{width:"100%",height:"90%"},option:h,onEvents:{click:p=>{var g;Wt(f,((g=p==null?void 0:p.name)==null?void 0:g.split(" ").join("_"))||"undefined")}}}),l&&s&&C(ot,{style:{width:"100%",height:"90%"},option:h,onEvents:{click:p=>{s(p.name)}}})]})},mce=({gaugeData:r,margins:e,legendSettings:t,enableSaveAs:n,colors:a,chartClickConfig:i})=>{const o=Array.isArray(r)?r:[],s=o.reduce((c,f)=>c+f.value,0),l=Math.floor(s/o.length),u={toolbox:{feature:{saveAsImage:n&&{name:"databrain"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},...a!=null&&a.length?{color:a}:{},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position},series:[{type:"gauge",center:["50%","60%"],startAngle:200,endAngle:-20,min:0,max:l+100,splitNumber:12,itemStyle:{color:"blue"},progress:{show:!0,width:20},pointer:{show:!0},axisLine:{lineStyle:{width:30}},axisTick:{distance:-45,splitNumber:5,lineStyle:{width:2,color:"#999"}},splitLine:{distance:-52,length:14,lineStyle:{width:3,color:"#999"}},axisLabel:{distance:-8,color:"black",fontSize:10},anchor:{show:!1},data:[{value:l}]}]};return C(ot,{style:{width:"100%",height:"113%"},option:u,onEvents:{click:c=>{var f;Wt(i,((f=c==null?void 0:c.name)==null?void 0:f.split(" ").join("_"))||"undefined")}}})},_ce=({data:r,margins:e,enableSaveAs:t,colors:n,backGroundColor:a,chartClickConfig:i})=>{var u,c,f;const o=[],s=[];if((r==null?void 0:r.length)&&((u=r==null?void 0:r[0])==null?void 0:u[0])!==((c=r==null?void 0:r[1])==null?void 0:c[0])){const h=[r==null?void 0:r[0],r==null?void 0:r[1]];h==null||h.map(v=>{v.map(d=>{o.includes(d)||o.push(d)})});for(let v=0;v<((f=r==null?void 0:r[0])==null?void 0:f.length);v+=1)s.push({source:r[0][v],target:r[1][v],value:r[2][v]})}const l={toolbox:{feature:{saveAsImage:t&&{name:"databrain"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},...n!=null&&n.length?{color:n}:{},tooltip:{trigger:"item",triggerOn:"mousemove",backgroundColor:"black",textStyle:{color:"white"}},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},series:{type:"sankey",layout:"none",emphasis:{focus:"adjacency"},data:o==null?void 0:o.map(h=>({name:h})),links:s,showBackground:a.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"}}};return C(Ce,{children:C(ot,{style:{width:"100%",height:"100%"},option:l,onEvents:{click:h=>{var v;Wt(i,((v=h==null?void 0:h.name)==null?void 0:v.split(" ").join("_"))||"undefined")}}})})},bce=({data:r,margins:e,legendSettings:t,labelSettings:n,axisSettings:a,enableSaveAs:i,colors:o,updateGroup:s,isEnableGroupBy:l,backGroundColor:u,customSettings:c,chartClickConfig:f})=>{var v,d;const h={toolbox:{feature:{saveAsImage:i&&{name:"databrain"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},...o!=null&&o.length?{color:o}:{},tooltip:{trigger:"axis",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"},formatter:p=>`${p.map(g=>`${g.seriesName}: ${g.value}<br />`).join("")}`},xAxis:{type:"category",data:r==null?void 0:r.labels,splitLine:{show:(c==null?void 0:c.hideSplitLines)==="horizontal"||(c==null?void 0:c.hideSplitLines)==="none"},axisLine:{show:(c==null?void 0:c.hideAxisLines)==="y"||(c==null?void 0:c.hideAxisLines)==="none"},axisLabel:{show:(c==null?void 0:c.axisLabels)==="y"||(c==null?void 0:c.axisLabels)==="none"}},yAxis:{type:"value",position:a.axis,splitLine:{show:(c==null?void 0:c.hideSplitLines)==="vertical"||(c==null?void 0:c.hideSplitLines)==="none"},axisLine:{show:(c==null?void 0:c.hideAxisLines)==="x"||(c==null?void 0:c.hideAxisLines)==="none"},axisLabel:{show:(c==null?void 0:c.axisLabels)==="x"||(c==null?void 0:c.axisLabels)==="none"}},legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,data:(v=r==null?void 0:r.datasets)==null?void 0:v.map(p=>p.label)},series:(d=r==null?void 0:r.datasets)==null?void 0:d.map(p=>({data:p.data,type:"bar",name:p.label,stack:"x",barWidth:`${c==null?void 0:c.barWidth}%`,emphasis:{focus:"series"},label:{show:n.show,position:n.position},showBackground:u.show,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"},itemStyle:{borderRadius:c==null?void 0:c.barRadius}}))};return z(Ce,{children:[!l&&C(ot,{style:{width:"100%",height:"90%"},option:h,onEvents:{click:p=>{var g;Wt(f,((g=p==null?void 0:p.name)==null?void 0:g.split(" ").join("_"))||"undefined")}}}),l&&s&&C(ot,{style:{width:"100%",height:"90%"},option:h,onEvents:{click:p=>{s(p.name)}}})]})};var xce={container:"_container_w4vgp_1",label:"_label_w4vgp_7",sync:"_sync_w4vgp_13"};const e4=({data:r,customSettings:e,chartClickConfig:t})=>{var f,h,v,d;const n={fontSize:`${e.subHeaderFontSize}px`||"14px"},a={fontSize:`${e.fontSize}px`||"30px"},i=t.isEnable?"hover:cursor-pointer":"hover:cursor-text",o=new Intl.NumberFormat,s=(p,g)=>{let y="";if(g)switch(parseInt(p,10).toString().length){case 1:case 2:case 3:y=p;break;case 4:y=`${p.toString().slice(0,1)}.${p.toString().slice(1,3)}k`;break;case 5:y=`${p.toString().slice(0,2)}.${p.toString().slice(2,4)}k`;break;case 6:y=`${p.toString().slice(0,3)}.${p.toString().slice(3,5)}k`;break;case 7:y=`${p.toString().slice(0,1)}.${p.toString().slice(1,3)}M`;break;case 8:y=`${p.toString().slice(0,2)}.${p.toString().slice(2,4)}M`;break;case 9:y=`${p.toString().slice(0,3)}.${p.toString().slice(3,5)}M`;break;case 10:y=`${p.toString().slice(0,1)}.${p.toString().slice(1,3)}B`;break}else switch(parseInt(p,10).toString().length){case 1:case 2:case 3:y=p;break;case 4:y=`${p.toString().slice(0,1)}k`;break;case 5:y=`${p.toString().slice(0,2)}k`;break;case 6:y=`${p.toString().slice(0,3)}k`;break;case 7:y=`${p.toString().slice(0,1)}M`;break;case 8:y=`${p.toString().slice(0,2)}M`;break;case 9:y=`${p.toString().slice(0,3)}M`;break;case 10:y=`${p.toString().slice(0,1)}B`;break}return y},l=(p,g)=>{switch(g){case"original":return p;case"3s":case"adaptive":return s(p,!0);case"d":return parseInt(p,10).toLocaleString();case"1s":{let y=p.toString().slice(0,1);for(let _=1;_<p.toString().length;_+=1)y+=0;return s(y,!1)}case"1f":{const y=parseFloat(p.toFixed(1)),m=o.format(y);return p.toString().includes(".")?m:`${m}.${Array(2).join("0")}`}case"2f":{const y=parseFloat(p.toFixed(2)),m=o.format(y);return p.toString().includes(".")?p.toString().split(".")[1].length>1?m:`${m}.${Array(2).join("0")}`:`${m}.${Array(3).join("0")}`}case"3f":{const y=parseFloat(p.toFixed(3)),m=o.format(y);return p.toString().includes(".")?p.toString().split(".")[1].length>1?m:`${m}.${Array(3).join("0")}`:`${m}.${Array(4).join("0")}`}case"+":return`+${o.format(p)}`;case"$":{const y=parseFloat(p.toFixed(2)),m=o.format(y);return p.toString().includes(".")?p.toString().split(".")[1].length>1?`$${m}`:`$${m}.${Array(2).join("0")}`:`$${m}.${Array(3).join("0")}`}case"1%":{const y=p*100,m=o.format(y);return p.toString().includes(".")?`${m}%`:`${m}.${Array(2).join("0")}%`}case"2%":{const y=p*100,m=parseFloat(p.toFixed(2)),_=o.format(m);return y.toString().includes(".")?p.toString().split(".")[1].length>1?`${_}%`:`${_}.${Array(2).join("0")}`:`${_}.${Array(3).join("0")}%`}case"3%":{const y=p*100,m=parseFloat(p.toFixed(3)),_=o.format(m);return y.toString().includes(".")?p.toString().split(".")[1].length>1?`${_}%`:`${_}.${Array(3).join("0")}`:`${_}.${Array(4).join("0")}%`}case"ms1":{const y=Math.floor(p/1e3),m=p%1e3;return`${y}.${m.toString().slice(0,1)}s`}case"ms2":{const y=Math.floor(p/1e3),m=p%1e3,_=p-Math.floor(p),b=Math.floor(_*1e3),w=_*1e3-b,x=Math.floor(w*1e3);let S="";return y&&(S+=`${y}s `),m&&(S+=`${m}ms `),b&&(S+=`${b}\xB5s`),x&&(S+=`${x}ns`),S}default:return p}},u=(p,g)=>{const y=p.toString().slice(0,4),m=p.toString().slice(5,7),_=p.toString().slice(8,10),b=p.toString().slice(11,19);switch(g){case"dd-mm-yyyy":return`${_}-${m}-${y}`;case"mm-dd-yyyy":return`${m}-${_}-${y}`;case"yyyy-mm-dd":return`${y}-${m}-${_}`;case"dd/mm/yyyy":return`${_}/${m}/${y}`;case"mm/dd/yyyy":return`${m}/${_}/${y}`;case"yyyy/mm/dd":return`${y}/${m}/${_}`;case"hh:mm:ss":return b;default:return p}},c=((f=r[0])==null?void 0:f.value)&&((h=r[0])==null?void 0:h.value.toString().length)>16?u((v=r[0])==null?void 0:v.value,e.dateFormatter):l((d=r[0])==null?void 0:d.value,e.numberFormatter);return z("div",{className:xce.container,children:[C("div",{style:a,onClick:()=>{Wt(t,c||"")},className:i,children:(r==null?void 0:r.length)&&C(Ce,{children:c})}),C("div",{style:n,onClick:()=>{Wt(t,e.displayText||"")},children:e.subHeaderShow&&e.displayText})]})},wce=({data:r,margins:e,legendSettings:t,axisSettings:n,enableSaveAs:a,colors:i,customSettings:o,chartClickConfig:s})=>{var f;const l=[],u=[];(f=r==null?void 0:r.datasets)==null||f.map(h=>{l.push(h.data),u.push(h.label)});const c={toolbox:{feature:{saveAsImage:a&&{name:"databrain"}},emphasis:{iconStyle:{borderColor:"#5865F6"}}},...i!=null&&i.length?{color:i}:{},title:[{text:"Box Plot",left:"center"}],legend:{show:t.show,top:t.top,left:t.left,right:t.right,bottom:t.bottom,orient:t.position,data:r.datasets.map(h=>h.label)},dataset:[{source:l},{transform:{type:"boxplot",config:{itemNameFormatter:"expr {value}"}}},{fromDatasetIndex:1,fromTransformResult:1}],tooltip:{trigger:"item",backgroundColor:"black",textStyle:{color:"white"},axisPointer:{type:"shadow"}},grid:{left:`${e.marginLeft}%`,bottom:`${e.marginBottom}%`,top:`${e.marginTop}%`,right:`${e.marginRight}%`,containLabel:!0},xAxis:{type:"category",boundaryGap:!0,nameGap:30,splitArea:{show:!1},splitLine:{show:(o==null?void 0:o.hideSplitLines)==="horizontal"||(o==null?void 0:o.hideSplitLines)==="none"},axisLine:{show:(o==null?void 0:o.hideAxisLines)==="y"||(o==null?void 0:o.hideAxisLines)==="none"},axisLabel:{show:(o==null?void 0:o.axisLabels)==="y"||(o==null?void 0:o.axisLabels)==="none"}},yAxis:{type:"value",position:n.axis,splitArea:{show:!0},splitLine:{show:(o==null?void 0:o.hideSplitLines)==="vertical"||(o==null?void 0:o.hideSplitLines)==="none"},axisLine:{show:(o==null?void 0:o.hideAxisLines)==="x"||(o==null?void 0:o.hideAxisLines)==="none"},axisLabel:{show:(o==null?void 0:o.axisLabels)==="x"||(o==null?void 0:o.axisLabels)==="none"}},series:[{name:"boxplot",type:"boxplot",datasetIndex:1},{name:"outlier",type:"scatter",datasetIndex:2}]};return C(Ce,{children:C(ot,{style:{width:"100%",height:"90%"},option:c,onEvents:{click:h=>{var v;Wt(s,((v=h==null?void 0:h.name)==null?void 0:v.split(" ").join("_"))||"undefined")}}})})};var Cn={tableSection:"_tableSection_rwcfo_1",tableContainer:"_tableContainer_rwcfo_5",tableDiv:"_tableDiv_rwcfo_9",table:"_table_rwcfo_1",tableHead:"_tableHead_rwcfo_17",tableHeadColHash:"_tableHeadColHash_rwcfo_21",tableCol:"_tableCol_rwcfo_25",tableColLabel:"_tableColLabel_rwcfo_29",data:"_data_rwcfo_33",tableBodyColHash:"_tableBodyColHash_rwcfo_37",tableBodyColHashLabel:"_tableBodyColHashLabel_rwcfo_41","table-loader-container":"_table-loader-container_rwcfo_45","table-error-message":"_table-error-message_rwcfo_49",noData:"_noData_rwcfo_53"},t4={exports:{}};/*!
244
244
  Copyright (c) 2018 Jed Watson.
245
245
  Licensed under the MIT License (MIT), see
246
246
  http://jedwatson.github.io/classnames
@@ -320,8 +320,8 @@ YEAR(${t}) =
320
320
  CASE
321
321
  WHEN MONTH(NOW()) = 1 THEN YEAR(NOW())-1
322
322
  ELSE YEAR(NOW())
323
- END`;if(r==="This Month")return e?`MONTH(${t}) = MONTH(NOW()) AND YEAR(${t}) = YEAR(NOW())`:`MONTH(${t}) = MONTH(NOW()) AND YEAR(${t}) = YEAR(NOW())`;const a=r.split(" - ")[0],i=r.split(" - ")[1];return e?`${t} BETWEEN '${a} 00:00:00' AND '${i} 23:59:59'`:`${t} BETWEEN '${a}' AND '${i}'`};var Ufe=Object.freeze(Object.defineProperty({__proto__:null,getModifiedQuery:Wfe,getTimeFilterValue:FS,groupArray:X4,groupByMultipleKeys:n4,updateGroupData:wa,findKeys:oS},Symbol.toStringTag,{value:"Module"}));const Q4=({columnName:r,dbName:e,onChangeFilterValue:t,name:n})=>{const[a,i]=B.useState(""),o=e.toLowerCase()==="bigquery",s=e.toLowerCase()==="mysql",l=e.toLowerCase()==="mongodb";return C(zS,{setTimeGrainValue:i,timeGrainValue:a,onChange:u=>{const c=FS({col:o||s?r:l?`\`${r}\``:`"${r}"`,timeGrainValue:u,database:e,isTimeStamp:!1});t(n,c)}})};var VS={filterButton:"_filterButton_rl2m8_1",container:"_container_rl2m8_5",dropdown:"_dropdown_rl2m8_9"},Xt={container:"_container_170ju_1",wrapper:"_wrapper_170ju_5",label:"_label_170ju_9",floatingLabel:"_floatingLabel_170ju_13",dropdown:"_dropdown_170ju_17",options:"_options_170ju_21",checkedOption:"_checkedOption_170ju_25",option:"_option_170ju_21",icon:"_icon_170ju_33",text:"_text_170ju_37",floatingText:"_floatingText_170ju_41",search:"_search_170ju_45",loadMore:"_loadMore_170ju_49"};const jfe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"m10.6 16.2l7.05-7.05l-1.4-1.4l-5.65 5.65l-2.85-2.85l-1.4 1.4ZM5 21q-.825 0-1.413-.587Q3 19.825 3 19V5q0-.825.587-1.413Q4.175 3 5 3h14q.825 0 1.413.587Q21 4.175 21 5v14q0 .825-.587 1.413Q19.825 21 19 21Z"})}),$S=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M5 21q-.825 0-1.413-.587Q3 19.825 3 19V5q0-.825.587-1.413Q4.175 3 5 3h14q.825 0 1.413.587Q21 4.175 21 5v14q0 .825-.587 1.413Q19.825 21 19 21Zm0-2h14V5H5v14Z"})}),Nr=({label:r,labelVariant:e="floating",selectedOption:t,onChange:n,className:a,options:i,isDisabled:o,children:s,Icon:l,isSearchEnabled:u,closeControl:c})=>{const[f,h]=B.useState(!1),v=B.useRef(null),[d,p]=B.useState(""),[g,y]=B.useState(20);return ty({wrapRef:v,onOutsideClick:()=>h(!1)}),B.useEffect(()=>{!(c!=null&&c.close)||h(!1)},[c==null?void 0:c.close]),z("div",{className:Kn(Xt.container,a),ref:v,children:[r?C(de,{variant:"span",styleClass:e==="floating"?"custom":"font-14",className:`${Xt.label} ${e==="floating"?Xt.floatingLabel:""}`,children:r}):null,z(Le,{type:"button",variant:"custom",isDisabled:o,className:Xt.wrapper,onClick:()=>h(!f),children:[z(de,{variant:"p",styleClass:"font-14",className:`${Xt.text} ${e==="floating"?Xt.floatingText:""}`,children:[l&&C(l,{className:Xt.icon}),t.label||"Select An Option"]}),C(ry,{})]}),f&&!o&&z("div",{className:Xt.dropdown,children:[u&&C(Ch,{className:Xt.search,setSearchKeyword:p}),z("div",{className:Xt.options,children:[(d?i.filter(m=>m.label.toLowerCase().includes(d)):i.slice(0,g)).map(m=>{const _=m.value===t.value;return C(Le,{type:"button",variant:"custom",className:_?Xt.checkedOption:Xt.option,onClick:()=>{n(m),h(!1)},children:m.label},m.key||m.value)}),g<=i.length&&C(Le,{variant:"secondary",type:"button",onClick:()=>y(m=>m+20),className:Xt.loadMore,children:"Load More"})]}),s]})]})},K4=pe.default.memo(({label:r,labelVariant:e="floating",selectedOptions:t,onChange:n,className:a,options:i,isDisabled:o,children:s,isSearchEnabled:l})=>{const[u,c]=B.useState(!1),f=B.useRef(null),[h,v]=B.useState(""),[d,p]=B.useState(20);return ty({wrapRef:f,onOutsideClick:()=>c(!1)}),z("div",{className:Kn(Xt.container,a),ref:f,children:[r?C(de,{variant:"span",styleClass:e==="floating"?"custom":"font-14",className:`${Xt.label} ${e==="floating"?"absolute left-2 top-1 text-xs":""}`,children:r}):null,z(Le,{type:"button",variant:"custom",isDisabled:o,className:Xt.wrapper,onClick:()=>c(!u),children:[C(de,{variant:"p",styleClass:"font-14",className:e==="floating"?"mt-2.5":"",children:"Select 1 or more option"}),C(ry,{})]}),u&&!o&&z("div",{className:Xt.dropdown,children:[l&&C(Ch,{className:"p-2 mb-3",setSearchKeyword:v}),z("div",{className:Xt.options,children:[(h?i.filter(g=>g.label.toLowerCase().includes(h)):i.slice(0,d)).map(g=>{const y=!!t.find(m=>m.value===g.value);return z(Le,{type:"button",variant:"custom",className:y?Xt.checkedOption:Xt.option,onClick:()=>{const m=y?t.filter(_=>_.value!==g.value):[...t,g];n(m)},children:[y?C(jfe,{}):C($S,{}),g.label]},g.key||g.value)}),d<=i.length&&C(Le,{variant:"secondary",type:"button",onClick:()=>p(g=>g+20),className:"w-full text-blue-700 text-center",children:"Load More"})]}),s]})]})}),HS=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M7 6h10l-5.01 6.3L7 6zm-2.75-.39C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39A.998.998 0 0 0 18.95 4H5.04c-.83 0-1.3.95-.79 1.61z"})}),GS=({rlsConditions:r,onChangeFilterValue:e,dbName:t,iconClass:n="",...a})=>C(Dh,{...a,buttonClass:a.buttonClass?a.buttonClass:VS.filterButton,button:C(HS,{className:n}),children:C("div",{className:VS.container,children:r.map(i=>C("div",{className:VS.dropdown,children:i.datatype!=="date"?C(Nr,{label:i.name,selectedOption:{value:i.value||i.options[0],label:i.value||i.options[0]},options:i.options.map(o=>({value:o,label:o})),onChange:o=>{e(i.name,o.value)}}):C(Q4,{columnName:i.columnName,dbName:t,name:i.name,onChangeFilterValue:e})}))})});var J4="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMDAgMzAwIj48ZGVmcz48c3R5bGU+LmNscy0xe3N0cm9rZTojMTgyYzYwO30uY2xzLTEsLmNscy0ye2ZpbGw6bm9uZTtzdHJva2UtbGluZWNhcDpyb3VuZDtzdHJva2UtbGluZWpvaW46cm91bmQ7fS5jbHMtM3tmaWxsOiM1ODY1ZjY7b3BhY2l0eTouMTt9LmNscy00e2ZpbGw6I2YyZjNmNDt9LmNscy01e2ZpbGw6I2MxYzdjOTt9LmNscy02e2ZpbGw6I2RhZGVkZjt9LmNscy03e2ZpbGw6IzE4MmM2MDt9LmNscy0ye3N0cm9rZTojNTg2NWY2O3N0cm9rZS13aWR0aDo0cHg7fTwvc3R5bGU+PC9kZWZzPjxwYXRoIGNsYXNzPSJjbHMtMSIgZD0ibTIxMC41LDIwMC44M2MuNC0uNjYuNjgtMS40LjgyLTIuMiwxLjU4LTguODcsMy4xNS0xNy43NSw0LjczLTI2LjYyLDIuMDMtMTEuNDQsNC4wNi0yMi44OCw2LjA5LTM0LjMyLjcyLTQuMDgsMS43Ny04LjI1LDIuMTYtMTIuMzguNDMtNC41Ni0yLjA5LTkuNjgtNi44Ni0xMC42Ni0uMDEsMC0uMDMsMC0uMDQsMC0yLjQtLjQ5LTUuMDItLjIyLTcuNDUtLjIyaC00NC4yMmMtLjUyLDAtMi4zMy0uMzEtMi43NywwbC0yNC4yOCwxNy4yMmgtNjEuNjFjLTMuOTcsMC02Ljk5LDMuNTYtNi4zNCw3LjQ3bDkuNzUsNTkuNDJjLjUxLDMuMTEsMy4yLDUuMzksNi4zNCw1LjM5aDExNy44NiIvPjxwYXRoIGNsYXNzPSJjbHMtMSIgZD0ibTIwNywxMTQuNDN2LTguNTRjMC0zLjU1LTIuODgtNi40My02LjQzLTYuNDNoLTE3LjE5Ii8+PHBhdGggY2xhc3M9ImNscy0xIiBkPSJtMTAzLjQ3LDk5LjQ2aC0xNS4xMmMtMy41NSwwLTYuNDMsMi44OC02LjQzLDYuNDN2MjUuNDgiLz48Zz48bGluZSBjbGFzcz0iY2xzLTIiIHgxPSIxMTQuMTIiIHkxPSI5NC4wOCIgeDI9IjE0NC44NCIgeTI9Ijk0LjA4Ii8+PGc+PHJlY3QgY2xhc3M9ImNscy02IiB4PSIxMTIuNjEiIHk9IjEwMi40MyIgd2lkdGg9IjE4Ljk3IiBoZWlnaHQ9IjMuMiIvPjxyZWN0IGNsYXNzPSJjbHMtNCIgeD0iMTM3LjYxIiB5PSIxMDIuNDMiIHdpZHRoPSI4LjkiIGhlaWdodD0iMy4yIi8+PC9nPjwvZz48cGF0aCBjbGFzcz0iY2xzLTMiIGQ9Im0xNjQuOTgsODEuNDZsLS4wOCwxNi4yOHMuMTUsMy4yNC4zLDMuNjIuNiwxLjUxLDEuMTMsMS44OCwxLjAyLjc5LDEuNzcsMS4wNi45NC40OSwyLjExLjQ5LDE4LjE3LjA0LDE4LjE3LjA0bC0yMy40MS0yMy4zN1oiLz48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Im0xODguNTEsMTA0LjkxdjkuNTIiLz48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Im0xMDMuNTMsMTMxLjM3di00NC45NWMwLTIuODQsMi4zLTUuMTUsNS4xNS01LjE1LDE4Ljc3LDAsMzcuNTQsMCw1Ni4zMSwwIi8+PHBhdGggY2xhc3M9ImNscy0xIiBkPSJtMTY1LjAxLDgxLjI3djE4LjM1YzAsMi44NCwyLjMxLDUuMTUsNS4xNSw1LjE1aDE4LjM1cy0yMy41LTIzLjYyLTIzLjUtMjMuNVoiLz48Y2lyY2xlIGNsYXNzPSJjbHMtMSIgY3g9IjE2OC4yMSIgY3k9IjE2My4yNyIgcj0iMjQuOTYiLz48Y2lyY2xlIGNsYXNzPSJjbHMtMSIgY3g9IjE2OC4yMSIgY3k9IjE2My4yNyIgcj0iMzEuMjUiLz48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Im0xOTIuNTcsMTgzLjMzYzkuNjIsOS42MiwzMC4yOCwzMC4yOCwzMC4yOCwzMC4yOCwxLjE3LDEuMTcsMS4xNywzLjA3LDAsNC4yNHMtMy4wNywxLjE3LTQuMjQsMGMwLDAtMjAuNTgtMjAuNTgtMzAuMjItMzAuMjIiLz48Zz48cGF0aCBjbGFzcz0iY2xzLTUiIGQ9Im0xNjguNjYsMTcwLjkzYy0uNzQsMC0xLjM0LjI0LTEuODEuNzItLjQ3LjQ4LS43MSwxLjA5LS43MSwxLjgzcy4yNCwxLjMyLjcxLDEuODFjLjQ3LjQ5LDEuMDcuNzQsMS44MS43NHMxLjM0LS4yNSwxLjgxLS43NGMuNDctLjQ5LjcxLTEuMS43MS0xLjgxcy0uMjQtMS4zNC0uNzEtMS44M2MtLjQ3LS40OC0xLjA4LS43Mi0xLjgxLS43MloiLz48cGF0aCBjbGFzcz0iY2xzLTUiIGQ9Im0xNzQuNjksMTUzLjc3Yy0uNjItMS4wMi0xLjQ5LTEuODItMi42LTIuNC0xLjEyLS41Ny0yLjQtLjg2LTMuODUtLjg2LTEuNjgsMC0zLjE3LjQtNC40NywxLjE5cy0yLjI5LDEuOTQtMi45OCwzLjQzbDIuNzYsMi4yOGMuNDYtMS4wNiwxLjA3LTEuODYsMS44NS0yLjQuNzctLjU0LDEuNjUtLjgxLDIuNjQtLjgxLjc2LDAsMS40MS4xNCwxLjk3LjQxLjU1LjI4Ljk4LjY3LDEuMjgsMS4xNy4zLjUxLjQ1LDEuMS40NSwxLjc5cy0uMTYsMS4yOS0uNDcsMS44MWMtLjMxLjUyLS43NS45Mi0xLjMxLDEuMjEtLjU2LjI5LTEuMjIuNDMtMS45OC40M2gtLjkzdjYuNjZoMy4yOGwuMjYtMy43M2MuNzEtLjI0LDEuMzctLjU1LDEuOTUtLjkzLjk5LS42NCwxLjc1LTEuNDUsMi4yOS0yLjQxLjU0LS45Ny44MS0yLjA3LjgxLTMuMzEsMC0xLjMzLS4zMS0yLjUxLS45My0zLjU0WiIvPjwvZz48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Im04NS41NSwyMDMuOTdjLjY4LDIuODksMy4yNiw0Ljk2LDYuMjYsNC45NmgxMTcuNzMiLz48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Im0yMTUuMzcsMjA2LjA0Yy40Ny0uNzEuOC0xLjUyLjk1LTIuNCwxLjU4LTguODcsMy4xNS0xNy43NSw0LjczLTI2LjYyLDIuMDMtMTEuNDQsNC4wNi0yMi44OCw2LjA5LTM0LjMyLjcyLTQuMDgsMS43Ny04LjI1LDIuMTYtMTIuMzguMzktNC4xNi0xLjY4LTguNzktNS42Ny0xMC4zMSIvPjxwYXRoIGNsYXNzPSJjbHMtNyIgZD0ibTIyMy41MSwxMjAuMDhzLjQ5LDEuNjIuNTMsMS43My4zMiwyLjQ0LjMyLDIuNDRsLS4wNCwxLjkxLTEuMzgsNy4xMy0zLjM5LDE5LjMxLTIuODksMTUuOTItMi45NiwxNi43Ni0yLjQ0LDEzLjE2LS45MiwyLjY1LDQuOTgsNS4xNS44NS0yLjE1LjgxLTQuMDYsMS40OC04LjMzLDIuODItMTUuNzEsMi4xNS0xMi4xMSwxLjk0LTExLjM2LDIuNzUtMTQuNzUuODgtNC42OS4yOC0yLjU4LjA3LTIuMTItLjYtMi43NS0xLjI0LTIuMzYtMS4wOS0xLjU5LTIuMDEtMS4zMS0uOTItLjI4WiIvPjxwb2x5Z29uIGNsYXNzPSJjbHMtNyIgcG9pbnRzPSI4NS42OCAyMDMuOTMgMjA0LjU1IDIwMy44NCAyMDkuMzUgMjA4LjczIDE0OC40OCAyMDguODggOTAuOTUgMjA5LjAyIDg5LjUgMjA4LjY2IDg3Ljk4IDIwNy45MiA4Ni44MiAyMDYuNTggODYuMDEgMjA1LjAzIDg1LjY4IDIwMy45MyIvPjwvc3ZnPg==";const ez=({globalFilters:r={tableName:"",filters:[]},metricItem:e,onMaximize:t,client:n,colors:a,param:i,companyTenancyType:o,renderHeaderName:s})=>{var St;const l={};if(i!=null&&i.values)for(const bt in i.values){const Qt=`${bt}_variable`;l[Qt]=i.values[bt]}const[u,c]=B.useState(""),[f,h]=B.useState(""),[v,d]=B.useState([]),[p,g]=B.useState(""),[y,m]=B.useState(""),[_,b]=B.useState([]),[w,x]=B.useState(""),[S,T]=B.useState([]),[D,M]=B.useState([]),[A,I]=B.useState({card:{isEnable:!1,baseUrl:"",dynamic:"none",route:"",routeType:"internal"},chart:{isEnable:!1,baseUrl:"",dynamic:"{{value}}",route:"/{{value}}",routeType:"internal"}}),{data:P,isLoading:E}=MT({id:e==null?void 0:e.id,clientId:n,tenancyLevel:o,rlsConditions:o==="DATABASE"?D.map(bt=>({...bt,tableName:`${n}.${bt.tableName.split(".").slice(1).join(".")}`})):D,globalFilters:o==="DATABASE"?{...r,tableName:`${n}.${r.tableName.split(".").slice(1).join(".")}`}:r,filterValues:l}),O=(St=P==null?void 0:P.externalMetricQuery)==null?void 0:St.data,[N,V]=B.useState({marginTop:20,marginBottom:20,marginLeft:5,marginRight:5}),[$,U]=B.useState({show:!0,top:0,left:0,right:0,bottom:0,position:"horizontal"}),[Y,ae]=B.useState({axis:"left",show:!1,position:"hidden"}),[H,q]=B.useState({axis:"left"}),[X,Z]=B.useState({hideSplitLines:"none",hideAxisLines:"none",barWidth:40,barRadius:0,axisLabels:"none",fontSize:14,subHeaderShow:!1,displayText:"",subHeaderFontSize:0,dateFormatter:"none",numberFormatter:"original"}),[ie,se]=B.useState({show:!1}),[te,ve]=B.useState(!1),[R,F]=B.useState([]),[G,re]=B.useState(),[ne,ee]=B.useState([]);B.useEffect(()=>{d(e==null?void 0:e.chartOptions.yAxisList),h(e==null?void 0:e.chartOptions.xAxis),g(e==null?void 0:e.chartOptions.step),m(e==null?void 0:e.chartOptions.measure),c(e==null?void 0:e.chartOptions.chartType),b(e==null?void 0:e.chartOptions.sankeyValues),x(e==null?void 0:e.chartOptions.singleValue),V(e==null?void 0:e.chartOptions.margins),U(e==null?void 0:e.chartOptions.legendSettings),ae(e==null?void 0:e.chartOptions.labelSettings),q(e!=null&&e.chartOptions.axisSettings?e==null?void 0:e.chartOptions.axisSettings:"left"),se(e!=null&&e.chartOptions.backGroundColor?e==null?void 0:e.chartOptions.backGroundColor:"false"),Z(e!=null&&e.chartOptions.customSettings?e==null?void 0:e.chartOptions.customSettings:{hideSplitLines:"none",hideAxisLines:"none",barWidth:40,barRadius:0,axisLabels:"none",fontSize:14,subHeaderShow:!1,displayText:"",subHeaderFontSize:0,dateFormatter:"none",numberFormatter:"original"}),ve(e==null?void 0:e.isEnableGroupBy),F(e==null?void 0:e.selectedGroupBy),re(e==null?void 0:e.groupBy),M((e==null?void 0:e.rlsConditions)||[]),I(e.clickActions||{card:{isEnable:!1,baseUrl:"",dynamic:"none",route:"",routeType:"internal"},chart:{isEnable:!1,baseUrl:"",dynamic:"{{value}}",route:"/{{value}}",routeType:"internal"}})},[e]),B.useEffect(()=>{T(O!=null?O:[])},[O]);const{labels:ue,datasets:De,funnelData:vt,sankeyData:rt,singleValueData:Yt}=pm({data:te?ne:S,measure:y,sankeyValues:_,singleValue:w,step:p,xAxis:f,yAxisList:v});B.useEffect(()=>{if(ne.length&&te){const bt=oS(ne[0]);h(bt.stringKeys[0]),d(bt.numberKeys)}},[ne,te]),B.useEffect(()=>{ne.length===0&&te&&R.length&&(S==null?void 0:S.length)&&(re({column:R[0]}),wa(S,[R[0]],R,ee))},[ne,te,R]),B.useEffect(()=>{(S==null?void 0:S.length)&&R.length&&te&&wa(S,[R[0]],R,ee)},[S,R,te]);const Ct=bt=>{if((G==null?void 0:G.column)&&bt&&bt!=="undefined"){if(R.lastIndexOf(G.column)!==R.length-1){const Qt=R.indexOf(G.column),Ta=G.column;re({column:R[Qt+1],parentColumn:{column:G.column,value:bt}}),wa(S==null?void 0:S.filter(or=>or[Ta]===bt),[R[Qt+1]],R,ee)}R.lastIndexOf(G.column)===R.length-1&&(re({column:R[0]}),wa(S,[R[0]],R,ee))}else re({column:R[0]}),wa(S,[R[0]],R,ee)},Qr=(bt,Qt)=>M(Ta=>Ta.map(or=>or.name===bt?{...or,value:Qt}:or));return C(Ce,{children:z("div",{className:dt.cardContainer,children:[z("div",{className:dt.listHeader,children:[z(de,{variant:"h3",styleClass:"primary",className:dt.metricName,children:[s?s(e.name):C(Le,{type:"button",variant:"custom",isDisabled:!A.card.isEnable,className:"disabled:cursor-text",onClick:()=>JB(A,e.metricId,e.id),children:e.name}),e.description&&C("span",{className:dt.metricDescription,children:e.description})]}),z("div",{className:dt.features,children:[!!D.length&&C(GS,{rlsConditions:D.filter(bt=>bt.isAddOnMetrics),onChangeFilterValue:Qr,dbName:e==null?void 0:e.companyIntegration.name,buttonClass:dt.popup,iconClass:dt.popupIcon,position:"bottom-right"}),z(Dh,{buttonClass:dt.popup,button:C(Dce,{className:dt.popupIcon}),menuClass:dt.popupMenu,position:"bottom-right",children:[z(Le,{type:"button",variant:"custom",className:dt.popupItem,onClick:()=>t({labels:ue,data:{labels:ue,datasets:De},chartType:u,funnelData:vt,sankeyData:rt,singleValueData:Yt,margins:N,legendSettings:$,labelSettings:Y,axisSettings:H,customSettings:X,backGroundColor:ie,enableSaveAs:!0,chartClickConfig:A.chart}),children:[C(Mce,{})," Enter Fullscreen"]}),C(kT,{data:S,fileName:e.name,className:`${dt.popupItem} ${dt.csvBtn}`,text:"Save As CSV"})]})]})]}),u&&z("div",{className:dt.metricData,children:[!E&&!S.length?C("div",{className:dt.noData,children:z("div",{className:dt.noDataContent,children:[C("img",{src:J4,alt:"",width:"300px",height:"300px"}),C("div",{className:dt.noDataText,children:"No Data Available"})]})}):null,E&&C("div",{className:dt.loading,children:C(zu,{style:{width:"50px",height:"50px",color:"blue"}})}),S!=null&&S.length?C(Bg,{labels:ue,data:{labels:ue,datasets:De},chartType:u,funnelData:vt,sankeyData:rt,singleValueData:Yt,margins:N,legendSettings:$,labelSettings:Y,axisSettings:H,enableSaveAs:!0,colors:a,updateGroup:Ct,isEnableGroupBy:te,customSettings:X,backGroundColor:ie,chartClickConfig:A.chart}):null]})]})})},tz=({globalFilters:r={tableName:"",filters:[]},metricItem:e,client:t,param:n,companyTenancyType:a,renderHeaderName:i})=>{var M;const o={};if(n!=null&&n.values)for(const A in n.values){const I=`${A}_variable`;o[I]=n.values[A]}const[s,l]=B.useState(""),[u,c]=B.useState(""),[f,h]=B.useState([]),[v,d]=B.useState([]),[p,g]=B.useState({card:{isEnable:!1,baseUrl:"",dynamic:"none",route:"",routeType:"internal"},chart:{isEnable:!1,baseUrl:"",dynamic:"{{value}}",route:"/{{value}}",routeType:"internal"}}),[y,m]=B.useState({hideSplitLines:"none",hideAxisLines:"none",barWidth:40,barRadius:0,axisLabels:"none",fontSize:14,subHeaderShow:!1,displayText:"",subHeaderFontSize:0,dateFormatter:"none",numberFormatter:"original"}),{data:_,isLoading:b}=MT({id:e==null?void 0:e.id,clientId:t,tenancyLevel:a,rlsConditions:a==="DATABASE"?v.map(A=>({...A,tableName:`${t}.${A.tableName.split(".").slice(1).join(".")}`})):v,globalFilters:a==="DATABASE"?{...r,tableName:`${t}.${r.tableName.split(".").slice(1).join(".")}`}:r,filterValues:o}),w=(M=_==null?void 0:_.externalMetricQuery)==null?void 0:M.data;B.useEffect(()=>{l(e==null?void 0:e.chartOptions.chartType),c(e==null?void 0:e.chartOptions.singleValue),d((e==null?void 0:e.rlsConditions)||[]),m(e!=null&&e.chartOptions.customSettings?e==null?void 0:e.chartOptions.customSettings:{hideSplitLines:"none",hideAxisLines:"none",barWidth:40,barRadius:0,axisLabels:"none",fontSize:14,subHeaderShow:!1,displayText:"",subHeaderFontSize:0,dateFormatter:"none",numberFormatter:"original"}),g(e.clickActions||{card:{isEnable:!1,baseUrl:"",dynamic:"none",route:"",routeType:"internal"},chart:{isEnable:!1,baseUrl:"",dynamic:"{{value}}",route:"/{{value}}",routeType:"internal"}})},[e]),B.useEffect(()=>{h(w!=null?w:[])},[w]);const x=f,S=x!=null&&x.length?x==null?void 0:x.map(A=>A[u]):"",T=[{value:S[0]}],D=(A,I)=>d(P=>P.map(E=>E.name===A?{...E,value:I}:E));return C(Ce,{children:z("div",{className:dt.cardContainer,children:[z("div",{className:dt.listHeader,children:[z(de,{variant:"h3",styleClass:"primary",className:dt.metricName,children:[i?i(e.name):C(Le,{type:"button",variant:"custom",isDisabled:!p.card.isEnable,className:"disabled:cursor-text",onClick:()=>JB(p,e.metricId,e.id),children:e.name}),e.description&&C("span",{className:dt.metricDescription,children:e.description})]}),C("div",{className:dt.features,children:!!(v!=null&&v.length)&&C(GS,{rlsConditions:v.filter(A=>A.isAddOnMetrics),onChangeFilterValue:D,dbName:e==null?void 0:e.companyIntegration.name,buttonClass:dt.popup,iconClass:dt.popupIcon,position:"bottom-right"})})]}),s&&C("div",{className:`${dt.metricData} ${dt.singleValueData}`,children:b?C(zu,{style:{width:"50px",height:"50px",color:"blue"}}):C(Ce,{children:S.length?C(e4,{data:T,customSettings:y,chartClickConfig:p.chart}):C("div",{className:dt.noData,children:z("div",{className:dt.noDataContent,children:[C("img",{src:J4,alt:"",width:"300px",height:"300px"}),C("div",{className:dt.noDataText,children:"No Data Available"})]})})})})]})})};var Yfe={fullscreen:"_fullscreen_1wo1t_1"},Hu={modal:"_modal_ul4ir_1",popup:"_popup_ul4ir_9",header:"_header_ul4ir_17",headerTitle:"_headerTitle_ul4ir_25",content:"_content_ul4ir_33",footer:"_footer_ul4ir_41"};const qfe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M13.46 12L19 17.54V19h-1.46L12 13.46L6.46 19H5v-1.46L10.54 12L5 6.46V5h1.46L12 10.54L17.54 5H19v1.46L13.46 12Z"})}),Ai=({children:r,isOpen:e,onClose:t,headerTitle:n,customHeader:a,icon:i})=>{const[o,s]=B.useState();return B.useEffect(()=>{const l=document.getElementById("databrain-root-portal")||document.createElement("div");l.setAttribute("id","databrain-root-portal"),document.body.appendChild(l),s(l)},[]),e?Oh.default.createPortal(C("div",{className:Hu.modal,onClick:t,children:z("div",{className:Hu.popup,onClick:l=>{l.stopPropagation()},children:[C("section",{className:Hu.header,children:a||z(Ce,{children:[z("span",{className:Hu.headerTitle,children:[i,n]}),C(Le,{variant:"custom",type:"button",onClick:t,children:C(qfe,{})})]})}),C("section",{className:Hu.content,children:r})]})}),o):null},Gu=({children:r,className:e})=>C("section",{className:`${Hu.footer} ${e}`,children:r}),WS=({isShow:r,onCancel:e,chart:t})=>C(Ai,{isOpen:r,onClose:e,headerTitle:"Chart Preview",children:C("div",{className:Yfe.fullscreen,children:t&&C(Bg,{labels:t.labels,data:t.data,chartType:t.chartType,funnelData:t.funnelData,sankeyData:t.sankeyData,singleValueData:t.singleValueData,margins:t.margins,legendSettings:t.legendSettings,labelSettings:t.labelSettings,axisSettings:t.axisSettings,backGroundColor:t.backGroundColor,enableSaveAs:!0,customSettings:t.customSettings,chartClickConfig:{isEnable:!1,baseUrl:"",dynamic:"{{value}}",route:"/{{value}}",routeType:"internal"}})})}),rz=Cy.exports.WidthProvider(Cy.exports.Responsive),nz=({chartColors:r,globalFilters:e,client:t,isLiveMode:n,externalDashboardMetrics:a,isMetricListLoading:i,breakpoint:o,layoutCols:s,params:l,companyTenancyType:u="TABLE"})=>{const[c,f]=B.useState(!1),[h,v]=B.useState(),d=a==null?void 0:a.map(m=>m.externalMetric),p=d==null?void 0:d.filter(m=>!m.isCreatedByClient),g=d==null?void 0:d.filter(m=>m.isCreatedByClient&&m.clientId===t),y=[...p||[],...g||[]].filter(m=>n?m.isLive===n:!0);return C(Ce,{children:y.length?z(Ce,{children:[C("div",{className:oc["MetricList-container"],children:C(rz,{layouts:{lg:y.map(({resizeAttributes:m,id:_})=>({i:_,w:m.width,h:m.height,x:m.xAxis,y:m.yAxis,minW:3,minH:6,maxH:15}))},isResizable:!1,isDraggable:!1,isDroppable:!1,rowHeight:30,width:1200,breakpoints:o!=null?o:{lg:1200,md:996,sm:768,xs:480,xxs:0},cols:s!=null?s:{lg:12,md:10,sm:6,xs:4,xxs:2},children:y.map(m=>C("div",{className:oc["MetricList-wrapper"],children:m.chartOptions.chartType==="single value"?C(tz,{metricItem:m,client:t,globalFilters:e,param:l==null?void 0:l.find(_=>_.metricId===m.metricId),companyTenancyType:u}):C(ez,{metricItem:m,onMaximize:_=>{v(_),f(!0)},client:t,colors:r,globalFilters:e,param:l==null?void 0:l.find(_=>_.metricId===m.metricId),companyTenancyType:u})},m.id))})}),C(WS,{onCancel:()=>f(!1),isShow:c,chart:h})]}):C(Ce,{children:i?C("div",{className:oc["alt-container"],children:C(zu,{style:{width:"50px",height:"50px",color:"blue"}})}):C("div",{className:oc["noMetric-container"],children:C("div",{className:oc["noMetric-wrapper"],children:C(de,{variant:"h2",styleClass:"primary",children:"No metrics created yet"})})})})})};var Wu={"header-container":"_header-container_pimqu_1","btn-container":"_btn-container_pimqu_5","back-btn":"_back-btn_pimqu_9","sql-btn":"_sql-btn_pimqu_13","save-btn":"_save-btn_pimqu_17"};const Zfe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m11 5l-7 7l7 7m-7-7h16"})}),Xfe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:z("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[C("path",{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"}),C("path",{d:"M17 21v-8H7v8M7 3v5h8"})]})}),Qfe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"m8 18l-6-6l6-6l1.425 1.425l-4.6 4.6L9.4 16.6Zm8 0l-1.425-1.425l4.6-4.6L14.6 7.4L16 6l6 6Z"})}),az=({setShowMetricCreateModal:r,isDisableSaveBtn:e,Heading:t,isDisableSqlBtn:n,setShowSaveMetricModal:a,setShowSqlModal:i})=>z("div",{className:Wu["header-container"],children:[z("div",{className:Wu["btn-container"],children:[C(Le,{type:"button",variant:"custom",size:"default",onClick:()=>r(!1),className:Wu["back-btn"],children:C(Zfe,{})}),C(de,{variant:"h1",styleClass:"primary",children:t})]}),z("div",{className:Wu["btn-container"],children:[z(Le,{type:"button",variant:"custom",className:Wu["sql-btn"],onClick:()=>i(!0),isDisabled:n,children:[C(Qfe,{}),"SQL"]}),z(Le,{type:"submit",variant:"primary",className:Wu["save-btn"],isDisabled:e,onClick:()=>a(!0),children:[C(Xfe,{}),"Save to Dashboard"]})]})]});var ny={"create-btn":"_create-btn_6ovk2_1","modal-container":"_modal-container_6ovk2_5","query-modal":"_query-modal_6ovk2_9",floatingCreateButton:"_floatingCreateButton_6ovk2_13",floatingCreateButtonIcon:"_floatingCreateButtonIcon_6ovk2_17"},Mh={container:"_container_32zer_1",header:"_header_32zer_5",wrapper:"_wrapper_32zer_9","col-container":"_col-container_32zer_13",column:"_column_32zer_17"};const Kfe=r=>C("svg",{viewBox:"0 0 21 21",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"m13.5 5.5l-2 10m-2-10l-2 10m-1-7h9m-10 4h9"})}),Jfe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M8 2h8a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2m0 8v4h8v-4H8m0 6v4h8v-4H8M8 4v4h8V4H8Z"})}),ehe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M9.62 12L12 5.67L14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2Z"})}),the=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M15 20v-2h3V6h-3V4h5v16ZM4 20V4h5v2H6v12h3v2Z"})}),rhe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M5 22q-.825 0-1.413-.587Q3 20.825 3 20V6q0-.825.587-1.412Q4.175 4 5 4h1V2h2v2h8V2h2v2h1q.825 0 1.413.588Q21 5.175 21 6v14q0 .825-.587 1.413Q19.825 22 19 22Zm0-2h14V10H5v10ZM5 8h14V6H5Zm0 0V6v2Z"})}),nhe=r=>z("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...r,children:[C("path",{fill:"currentColor",d:"M23 23a7 7 0 1 1 7-7a7.008 7.008 0 0 1-7 7Zm0-12a5 5 0 1 0 5 5a5.005 5.005 0 0 0-5-5Z"}),C("circle",{cx:9,cy:16,r:7,fill:"currentColor"})]}),US=({datatype:r})=>ym.includes(r.toLowerCase())?C(Kfe,{}):mm.includes(r.toLowerCase())||r.toLowerCase().includes("char")?C(ehe,{}):ET.includes(r.toLowerCase())?C(the,{}):_m.includes(r.toLowerCase())?C(rhe,{}):bm.includes(r.toLowerCase())?C(nhe,{}):C(Jfe,{}),ahe=r=>C("svg",{viewBox:"0 0 21 21",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"m17.498 15.498l-.01-10a2 2 0 0 0-2-1.998h-10a2 2 0 0 0-1.995 1.85l-.006.152l.01 10a2 2 0 0 0 2 1.998h10a2 2 0 0 0 1.995-1.85zM7.5 3.5v13.817m10-9.817h-14"})}),iz=({setselectTable:r,selectTable:e,tableList:t,columnList:n})=>z("div",{className:Mh.container,children:[C("div",{className:Mh.header,children:C(Nr,{onChange:r,selectedOption:e,options:t,Icon:ahe,labelVariant:"static"})}),z("div",{className:Mh.wrapper,children:[C(de,{variant:"h1",styleClass:"primary",children:"Columns"}),C("div",{className:Mh["col-container"],children:n.map(({as:a,datatype:i})=>z("div",{className:Mh.column,children:[C(US,{datatype:i}),C(de,{variant:"p",styleClass:"font-14",children:a})]},a))})]})]});var ze={container:"_container_3ro5s_1",header:"_header_3ro5s_7",headerText:"_headerText_3ro5s_13",tab:"_tab_3ro5s_19",tabText:"_tabText_3ro5s_25",tabHeading:"_tabHeading_3ro5s_31",form:"_form_3ro5s_37",inputWrapper:"_inputWrapper_3ro5s_43",input:"_input_3ro5s_43",selectWrapper:"_selectWrapper_3ro5s_55",select:"_select_3ro5s_55",label:"_label_3ro5s_67",series:"_series_3ro5s_73",legendWrapper:"_legendWrapper_3ro5s_79",seriesWrapper:"_seriesWrapper_3ro5s_85",valueLabelWrapper:"_valueLabelWrapper_3ro5s_91",singleCheckBox:"_singleCheckBox_3ro5s_97"},jS={tab:"_tab_ksqsk_1",button:"_button_ksqsk_7",activeTab:"_activeTab_ksqsk_15"};const YS=({options:r,activeTab:e,setActiveTab:t,className:n="",tabText:a=""})=>C("div",{className:`${jS.tab} ${n}`,children:r.map(i=>C(Le,{variant:"custom",type:"button",className:`${jS.button} ${e===i&&jS.activeTab} ${a}`,onClick:()=>t(i),children:i},i))});var oz={container:"_container_1v094_1",tooltip:"_tooltip_1v094_7"};const ihe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:z("g",{fill:"none",stroke:"currentColor",strokeWidth:2,children:[C("circle",{cx:12,cy:12,r:10}),C("path",{strokeLinecap:"round",d:"M12 7h.01"}),C("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 11h2v5m-2 0h4"})]})}),sz=({children:r,content:e,className:t=""})=>z("span",{className:`${oz.container} ${t}`,children:[e,C("span",{className:oz.tooltip,children:r})]}),Li=({children:r,className:e})=>C(sz,{className:e,content:C(ihe,{color:"#182C60"}),children:r}),ohe=({setMargins:r,margins:e,legendSettings:t,setLegendSettings:n,labelSettings:a,setLabelSettings:i,axisSettings:o,setAxisSettings:s,chartType:l,setChartType:u,customSettings:c,setCustomSettings:f,backGroundColor:h,setBackGroundColor:v})=>{const d=["Margins","Legend","Custom"],p=["Margins","Custom"],[g,y]=B.useState("Margins");return z("div",{className:ze.container,children:[C(YS,{options:l!=="single value"?d:p,activeTab:g,setActiveTab:y,className:ze.tab,tabText:ze.tabText}),z("form",{className:ze.form,children:[g==="Margins"&&z("div",{className:ze.inputWrapper,children:[C("div",{className:ze.input,children:C(It,{type:"number",label:"Top",onChange:m=>r(_=>({..._,marginTop:parseInt(m.target.value,10)})),defaultValue:e.marginTop})}),C("div",{className:ze.input,children:C(It,{type:"number",label:"Bottom",onChange:m=>r(_=>({..._,marginBottom:parseInt(m.target.value,10)})),defaultValue:e.marginBottom})}),C("div",{className:ze.input,children:C(It,{type:"number",label:"Left",defaultValue:e.marginLeft,onChange:m=>r(_=>({..._,marginLeft:parseInt(m.target.value,10)}))})}),C("div",{className:ze.input,children:C(It,{type:"number",label:"Right",defaultValue:e.marginRight,onChange:m=>r(_=>({..._,marginRight:parseInt(m.target.value,10)}))})})]}),g==="Legend"&&z("div",{className:ze.legendWrapper,children:[C(It,{type:"checkbox",label:"Show Legend",checked:t.show,onChange:m=>n(_=>({..._,show:m.target.checked}))}),z("div",{children:[C(de,{variant:"h1",styleClass:"primary",children:"Position"}),z("div",{className:ze.inputWrapper,children:[C("div",{className:ze.input,children:C(It,{type:"number",label:"Top",defaultValue:t.top,onChange:m=>n(_=>({..._,top:parseInt(m.target.value,10)}))})}),C("div",{className:ze.input,children:C(It,{type:"number",label:"Bottom",defaultValue:t.bottom,onChange:m=>n(_=>({..._,bottom:parseInt(m.target.value,10)}))})}),C("div",{className:ze.input,children:C(It,{type:"number",label:"Left",defaultValue:t.left,onChange:m=>n(_=>({..._,left:parseInt(m.target.value,10)}))})}),C("div",{className:ze.input,children:C(It,{type:"number",label:"Right",defaultValue:t.right,onChange:m=>n(_=>({..._,right:parseInt(m.target.value,10)}))})})]})]}),z("div",{className:ze.selectWrapper,children:[C(de,{variant:"h1",styleClass:"primary",children:"Appearance"}),C("div",{className:ze.select,children:C(Zt,{value:t.position,options:[{label:"Horizontal",value:"horizontal"},{label:"Vertical",value:"vertical"}],onChange:m=>n(_=>({..._,position:m}))})})]})]}),g==="Custom"&&z("div",{className:ze.series,children:[C(de,{styleClass:"font-14c",variant:"p",className:ze.tabHeading,children:"Chart preferences"}),l!=="single value"&&z(Ce,{children:[z("div",{className:ze.seriesWrapper,children:[C(de,{variant:"h1",styleClass:"primary",children:"Value labels"}),C("div",{className:ze.valueLabelWrapper,children:C(Zt,{value:a.position,options:[{label:"Hidden",value:"hidden"},{label:"Top",value:"top"},{label:"Bottom",value:"bottom"},{label:"Right",value:"right"},{label:"Left",value:"left"},{label:"Inside",value:"inside"}],onChange:m=>i(m==="hidden"?_=>({..._,show:!1,position:m}):_=>({..._,show:!0,position:m}))})})]}),l!=="pie"&&l!=="doughnut"&&l!=="funnel"&&l!=="gauge"&&l!=="sankey"&&l!=="singleValue"&&l!=="table"&&z(Ce,{children:[z("div",{className:ze.seriesWrapper,children:[C(de,{variant:"h1",styleClass:"font-14",className:"font-medium",children:"Axis"}),C("div",{className:ze.select,children:C(Zt,{value:o.axis,options:[{label:"Left",value:"left"},{label:"Right",value:"right"}],onChange:m=>s(_=>({..._,axis:m}))})})]}),l==="bar"||l==="row"||l==="stack"||l==="histogram"?C(It,{type:"checkbox",label:"Show Bar Background",checked:h.show,onChange:m=>v(_=>({..._,show:m.target.checked}))}):null,z("div",{className:ze.seriesWrapper,children:[z(de,{variant:"h1",styleClass:"font-14",className:ze.label,children:["Hide Axis labels",C(Li,{children:"Axis labels represents the x and y axis values"})]}),C("div",{className:ze.select,children:C(Zt,{value:c.axisLabels,options:[{label:"Hide X-axis labels",value:"x"},{label:"Hide Y-axis labels",value:"y"},{label:"Hide both X and Y(axis) labels",value:"both"},{label:"None",value:"none"}],onChange:m=>f(_=>({..._,axisLabels:m}))})})]}),z("div",{className:ze.seriesWrapper,children:[z(de,{variant:"h1",styleClass:"font-14",className:ze.label,children:["Hide Splitlines",C(Li,{children:"Splitline is the reference lines that run along the directional x and y axis which act as reference markers"})]}),C("div",{className:ze.select,children:C(Zt,{value:c.hideSplitLines,options:[{label:"Hide horizontal splitline",value:"horizontal"},{label:"Hide vertical splitline",value:"vertical"},{label:"Hide both splitline",value:"both"},{label:"None",value:"none"}],onChange:m=>f(_=>({..._,hideSplitLines:m}))})})]}),z("div",{className:ze.seriesWrapper,children:[z(de,{variant:"h1",styleClass:"font-14",className:ze.label,children:["Hide Axis Line",C(Li,{children:"The x-axis and y-axis lines act as a graph base from which the chart starts"})]}),C("div",{className:ze.select,children:C(Zt,{value:c.hideAxisLines,options:[{label:"Hide X-axis line",value:"x"},{label:"Hide Y-axis line",value:"y"},{label:"Hide both X and Y(axis) lines",value:"both"},{label:"None",value:"none"}],onChange:m=>f(_=>({..._,hideAxisLines:m}))})})]}),l==="bar"||l==="row"||l==="stack"?z(Ce,{children:[z("div",{className:ze.seriesWrapper,children:[z(de,{variant:"h1",styleClass:"font-14",className:ze.label,children:["Modify Bar width",C(Li,{children:"The width of each individual bar rectangle of the graph"})]}),C(It,{type:"number",label:"",onChange:m=>f(_=>({..._,barWidth:parseInt(m.target.value,10)})),defaultValue:c.barWidth})]}),z("div",{className:ze.seriesWrapper,children:[z(de,{variant:"h1",styleClass:"font-14",className:ze.label,children:["Modify Bar radius",C(Li,{children:"The property that rounds the corners of the element's outer border edge"})]}),C(It,{type:"number",label:"",onChange:m=>f(_=>({..._,barRadius:parseInt(m.target.value,10)})),defaultValue:c.barRadius})]})]}):null]})]}),l==="single value"&&z(Ce,{children:[z("div",{className:ze.seriesWrapper,children:[C(de,{variant:"h1",styleClass:"font-14",className:ze.label,children:"Single Value Chart Font Size"}),C(It,{type:"number",label:"",onChange:m=>f(_=>({..._,fontSize:parseInt(m.target.value,10)})),defaultValue:c.fontSize})]}),z("div",{className:ze.singleCheckBox,children:[C(It,{type:"checkbox",label:"",checked:c.subHeaderShow,onChange:m=>f(_=>({..._,subHeaderShow:m.target.checked}))}),z(de,{variant:"h1",styleClass:"font-14",className:ze.label,children:["Single Value Sub-Header",C(Li,{children:"Single Value Sub-Header"})]})]}),c.subHeaderShow&&z(Ce,{children:[z("div",{className:ze.seriesWrapper,children:[C(de,{variant:"h1",styleClass:"font-14",className:ze.label,children:"Sub-Header Display Text"}),C(It,{type:"text",label:"",placeholder:"Enter the text to display",onChange:m=>f(_=>({..._,displayText:m.target.value})),defaultValue:c.displayText})]}),z("div",{className:ze.seriesWrapper,children:[C(de,{variant:"h1",styleClass:"font-14",className:ze.label,children:"Sub-Header Font Size"}),C(It,{type:"number",label:"",onChange:m=>f(_=>({..._,subHeaderFontSize:parseInt(m.target.value,10)})),defaultValue:c.subHeaderFontSize})]})]}),z("div",{className:ze.seriesWrapper,children:[C(de,{variant:"h1",styleClass:"primary",children:"Date formatting"}),C("div",{className:ze.valueLabelWrapper,children:C(Zt,{value:c.dateFormatter,options:[{label:"None",value:"none"},{label:"dd-mm-yyyy",value:"dd-mm-yyyy"},{label:"mm-dd-yyyy",value:"mm-dd-yyyy"},{label:"yyyy-mm-dd",value:"yyyy-mm-dd"},{label:"dd/mm/yyyy",value:"dd/mm/yyyy"},{label:"mm/dd/yyyy",value:"mm/dd/yyyy"},{label:"yyyy/mm/dd",value:"yyyy/mm/dd"},{label:"hh:mm:ss",value:"hh:mm:ss"}],onChange:m=>f(_=>({..._,dateFormatter:m}))})})]}),z("div",{className:ze.seriesWrapper,children:[C(de,{variant:"h1",styleClass:"primary",children:"Number formatting"}),C("div",{className:ze.valueLabelWrapper,children:C(Zt,{value:c.numberFormatter,options:[{label:"Original value",value:"original"},{label:"Adaptive formatting",value:"adaptive"},{label:",d (12345.432 => 12,345)",value:"d"},{label:".1s (12345.432 => 10k)",value:"1s"},{label:".3s (12345.432 => 12.3k)",value:"3s"},{label:",.1% (12345.432 => 1,234,543.2%)",value:"1%"},{label:",.2% (12345.432 => 1234543.20%)",value:"2%"},{label:",.3% (12345.432 => 1234543.200%)",value:"3%"},{label:".4r (12345.432 => 12350)",value:"4r"},{label:",.1f (12345.432 => 12,345.4)",value:"1f"},{label:",.2f (12345.432 => 12,345.43)",value:"2f"},{label:",.3f (12345.432 => 12,345.432)",value:"3f"},{label:"+, (12345.432 => +12,345.432)",value:"+"},{label:"$,.2f (12345.432 => $12,345.43)",value:"$"},{label:"Duration in ms (66000 => 1m 6s)",value:"ms1"},{label:"Duration in ms (1.40008 => 1ms 400\u03BCs 80ns)",value:"ms2"}],onChange:m=>f(_=>({..._,numberFormatter:m}))})})]})]})]})]})]})};var Zr={"chartButton-header":"_chartButton-header_6600c_1","settingsTab-header-control":"_settingsTab-header-control_6600c_9",chartButtonContainer:"_chartButtonContainer_6600c_17",tabContainer:"_tabContainer_6600c_25",tab:"_tab_6600c_25",tabText:"_tabText_6600c_41",chartButtons:"_chartButtons_6600c_49",chartButton:"_chartButton_6600c_1",chartButtonSelected:"_chartButtonSelected_6600c_65",chartTypesButton:"_chartTypesButton_6600c_73",button:"_button_6600c_81",propertyButton:"_propertyButton_6600c_89",settings:"_settings_6600c_9",crossIcon:"_crossIcon_6600c_105"};const ay=({value:r,options:e,control:t})=>{const[n,a]=B.useState("");return C(j4,{control:t,label:"",options:e,onChange:a,name:n||r})};var it={chartOptions:"_chartOptions_jdb8o_1",chartOption:"_chartOption_jdb8o_1",chartOptionBtn:"_chartOptionBtn_jdb8o_13",chartOptionText:"_chartOptionText_jdb8o_19",container:"_container_jdb8o_25",field:"_field_jdb8o_31",fieldText:"_fieldText_jdb8o_37",doneBtn:"_doneBtn_jdb8o_43",measureText:"_measureText_jdb8o_49",singleValueMeasure:"_singleValueMeasure_jdb8o_55",plus:"_plus_jdb8o_61",plusIcon:"_plusIcon_jdb8o_67",form:"_form_jdb8o_73",chartType:"_chartType_jdb8o_79"};const qS=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:z("g",{fill:"none",stroke:"currentColor",strokeWidth:2,children:[C("path",{strokeLinecap:"round",d:"M12 8v4m0 0v4m0-4h4m-4 0H8"}),C("circle",{cx:12,cy:12,r:10})]})}),lz=({data:r,setXAxis:e,xAxis:t,setYAxisList:n,chartType:a,setStep:i,setMeasure:o,step:s,measure:l,setSankeyValues:u,setSettingsShow:c,singleValue:f,setSingleValue:h})=>{const v=r?Object.keys(r[0]).map(O=>({value:O,label:O})):[];v.push({value:"NONE",label:"NONE"});const[d,p]=B.useState([v==null?void 0:v[0]]),[g,y]=B.useState(""),[m,_]=B.useState(""),[b,w]=B.useState(""),[x,S]=B.useState(1),[T,D]=B.useState("show"),M=()=>{if(x<(v==null?void 0:v.length)){const O=[...d,v[x]];p(O),x===v.length-1&&D("hidden")}S(x+1)},{handleSubmit:A,control:I}=wS(),P=O=>{const N=Object.values(O);n(N.filter(V=>V!==void 0&&V!=="NONE")),c(!1)},E=()=>{u([g,m,b])};return a===BT?z("div",{className:it.container,children:[z("div",{className:it.field,children:[C(de,{styleClass:"font-14",className:it.fieldText,variant:"h4",children:"Source"}),C(Zt,{label:"",options:v,onChange:y,value:g})]}),z("div",{className:it.field,children:[C(de,{styleClass:"font-14",className:it.fieldText,variant:"h4",children:"Target"}),C(Zt,{label:"",options:v,onChange:_,value:m})]}),z("div",{children:[C(de,{styleClass:"font-14",className:it.fieldText,variant:"h4",children:"Value"}),C(Zt,{label:"",options:v,onChange:w,value:b})]}),C(Le,{type:"submit",variant:"primary",size:"default",className:it.doneBtn,onClick:()=>{E(),c(!1)},children:"Done"})]}):a===wm?C(Ce,{children:!!(a===wm||Sm)&&z("div",{className:it.container,children:[C(de,{styleClass:"font-14",className:it.field,variant:"h4",children:"Dimension"}),C(Zt,{label:"",options:v,onChange:e,value:t}),C(de,{styleClass:"font-14",className:it.measureText,variant:"h4",children:"Measure"}),C("div",{className:it.plus,children:C(qS,{className:`${it.plusIcon} ${T}`,onClick:()=>M()})}),z("form",{onSubmit:A(P),className:it.form,children:[d.map(O=>C(ay,{value:O.value,options:v,control:I},O.value)),C(Le,{type:"submit",variant:"primary",size:"default",className:it.doneBtn,children:"Done"})]})]})}):a===Sm?z(Ce,{children:["(",z("div",{className:it.container,children:[C(de,{styleClass:"font-14",className:it.field,variant:"h4",children:"Dimension"}),C(Zt,{label:"",options:v,onChange:e,value:t}),C(de,{styleClass:"font-14",className:it.measureText,variant:"h4",children:"Measure"}),C("div",{className:it.plus,children:C(qS,{className:`${it.plusIcon} ${T}`,onClick:()=>M()})}),z("form",{onSubmit:A(P),className:it.form,children:[d.map(O=>C(ay,{value:O.value,options:v,control:I},O.value)),C(Le,{type:"submit",variant:"primary",size:"default",className:it.doneBtn,children:"Done"})]})]}),")"]}):a==="single value"?z(Ce,{children:[C(de,{styleClass:"font-14",className:`${it.singleValueMeasure}`,variant:"h4",children:"Measure"}),C(Zt,{label:"",options:v,onChange:h,value:f}),C(Le,{type:"button",variant:"primary",size:"default",className:it.doneBtn,onClick:()=>c(!1),children:"Done"})]}):C(Ce,{children:z("div",{className:it.container,children:[a!=="gauge"&&a!==zT&&a!=="table"&&z(Ce,{children:[z(de,{styleClass:"font-14",className:it.field,variant:"h4",children:[a!=="funnel"&&a!=="row"&&"X-axis",a==="funnel"&&"Step",a==="row"&&"Y-axis"]}),a==="funnel"?C(Zt,{label:"",options:v,onChange:i,value:s}):C(Zt,{label:"",options:v,onChange:e,value:t})]}),z("div",{className:`${it.chartType}
324
- ${a!=="gauge"?it.measureText:""}`,children:[z(de,{styleClass:"font-14",variant:"h1",className:it.field,children:[a!=="funnel"&&a!=="gauge"&&a!=="row"&&a!=="boxplot"&&a!=="table"&&"Y-axis",(a==="funnel"||a==="gauge"||a==="boxplot"||a==="table")&&"Measure",a==="row"&&"X-axis"]}),a!=="funnel"&&a!=="gauge"&&C(qS,{className:`${it.plusIcon} ${T}`,onClick:()=>M()})]}),z("form",{onSubmit:A(P),className:it.form,children:[a==="funnel"||a==="gauge"?C(Zt,{label:"",options:v,onChange:o,value:l}):d.map(O=>C(ay,{value:O.value,options:v,control:I},O.value)),C(Le,{type:"submit",variant:"primary",size:"default",className:it.doneBtn,children:"Done"})]})]})})},she=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"m3.5 18.5l6-6l4 4L22 6.92L20.59 5.5l-7.09 8l-4-4L2 17l1.5 1.5Z"})}),lhe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M3 22V8h4v14H3m7 0V2h4v20h-4m7 0v-8h4v8h-4Z"})}),uhe=r=>z("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:[C("path",{fill:"currentColor",d:"M4 21h17v-2H5V3H3v17a1 1 0 0 0 1 1z"}),C("circle",{cx:10,cy:8,r:2,fill:"currentColor"}),C("circle",{cx:18,cy:12,r:2,fill:"currentColor"}),C("circle",{cx:11.5,cy:13.5,r:1.5,fill:"currentColor"}),C("circle",{cx:16.5,cy:6.5,r:1.5,fill:"currentColor"})]}),che=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M4 22H2V2h2v20Zm11-1H5v-3h10v3Zm3-5H5v-3h13v3Zm3-5H5V8h16v3Zm-8-5H5V3h8v3Z"})}),fhe=r=>C("svg",{viewBox:"0 0 1024 1024",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-616-64h536c4.4 0 8-3.6 8-8V284c0-7.2-8.7-10.7-13.7-5.7L592 488.6l-125.4-124a8.03 8.03 0 0 0-11.3 0l-189 189.6a7.87 7.87 0 0 0-2.3 5.6V720c0 4.4 3.6 8 8 8z"})}),hhe=r=>z("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...r,children:[C("path",{fill:"currentColor",d:"M27 28V16h-8v12h-4V12H7v16H4V2H2v26a2 2 0 0 0 2 2h26v-2Zm-14 0H9V14h4Zm12 0h-4V18h4Z"}),C("path",{fill:"currentColor",d:"M22.786 14a1.988 1.988 0 0 1-1.18-.387L11.205 5.987L8.242 10L6.637 8.806l2.982-4a1.998 1.998 0 0 1 2.749-.446L22.789 12l3.604-4.86L28 8.33l-3.604 4.862a2.001 2.001 0 0 1-1.61.808Z"})]}),vhe=r=>C("svg",{viewBox:"0 0 16 16",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M7.5 1.018a7 7 0 0 0-4.79 11.566L7.5 7.793V1.018zm1 0V7.5h6.482A7.001 7.001 0 0 0 8.5 1.018zM14.982 8.5H8.207l-4.79 4.79A7 7 0 0 0 14.982 8.5zM0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8z"})}),dhe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M12.051 21.949a10 10 0 0 1-1-19.949v4.04a5.994 5.994 0 1 0 6.91 6.909H22a10.015 10.015 0 0 1-9.95 9Zm9.95-11h-4.04a5.993 5.993 0 0 0-4.91-4.909V2a10.022 10.022 0 0 1 8.95 8.948v.001Z"})}),phe=r=>C("svg",{viewBox:"0 0 16 16",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M1.5 1.5A.5.5 0 0 1 2 1h12a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-.128.334L10 8.692V13.5a.5.5 0 0 1-.342.474l-3 1A.5.5 0 0 1 6 14.5V8.692L1.628 3.834A.5.5 0 0 1 1.5 3.5v-2zm1 .5v1.308l4.372 4.858A.5.5 0 0 1 7 8.5v5.306l2-.666V8.5a.5.5 0 0 1 .128-.334L13.5 3.308V2h-11z"})}),ghe=r=>z("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...r,children:[C("path",{fill:"currentColor",d:"M28 28V18h-2v10h-4V4h-2v24H10V14H8v14H4V2H2v26a2.002 2.002 0 0 0 2 2h26v-2Z"}),C("path",{fill:"currentColor",d:"M14 4h2v14h-2z"})]}),yhe=r=>z("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...r,children:[C("path",{fill:"currentColor",d:"M30 30H4a2 2 0 0 1-2-2V2h2v26h26Z"}),C("path",{fill:"currentColor",d:"M10 16a2 2 0 1 1-2 2a2 2 0 0 1 2-2m0-2a4 4 0 1 0 4 4a4 4 0 0 0-4-4zm11-8a4 4 0 1 1-4 4a4 4 0 0 1 4-4m0-2a6 6 0 1 0 6 6a6 6 0 0 0-6-6zm3.5 17a1.5 1.5 0 1 1-1.5 1.5a1.5 1.5 0 0 1 1.5-1.5m0-2a3.5 3.5 0 1 0 3.5 3.5a3.5 3.5 0 0 0-3.5-3.5z"})]}),mhe=r=>C("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M22 10V6H10v6H4V2H2v26a2.002 2.002 0 0 0 2 2h26V10Zm-10 4V8h8v4h8v10h-6v-6H12v6H4v-8ZM4 28v-4h10v-6h6v6h8v4Z"})}),_he=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M3 4h1v9h3V7h5v4h4v4h4v6H3V4m13 12v4h3v-4h-3m-4-4v8h3v-8h-3M8 8v12h3V8H8m-4 6v6h3v-6H4Z"})}),bhe=r=>C("svg",{viewBox:"0 0 20 20",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M8.127 13.6c-.689 1.197-.225 2.18.732 2.732c.956.553 2.041.465 2.732-.732c.689-1.195 5.047-11.865 4.668-12.084c-.379-.219-7.442 8.888-8.132 10.084zM10 6c.438 0 .864.037 1.281.109c.438-.549.928-1.154 1.405-1.728A9.664 9.664 0 0 0 10 4C4.393 4 0 8.729 0 14.766c0 .371.016.742.049 1.103c.049.551.54.955 1.084.908c.551-.051.957-.535.908-1.086A10.462 10.462 0 0 1 2 14.766C2 9.85 5.514 6 10 6zm7.219 1.25c-.279.75-.574 1.514-.834 2.174C17.4 10.894 18 12.738 18 14.766c0 .316-.015.635-.043.943a1.001 1.001 0 0 0 1.992.182c.033-.37.051-.748.051-1.125c0-2.954-1.053-5.59-2.781-7.516z"})}),xhe=r=>C("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M30 2H2v14h6.111a7.036 7.036 0 0 1 3.13.74L15.764 19l-4.522 2.26a7.036 7.036 0 0 1-3.13.74H2v8h7.223a9.045 9.045 0 0 0 4.025-.95l8.622-4.31A7.036 7.036 0 0 1 25 24h5V14h-5a7.036 7.036 0 0 1-3.13-.74L15.348 10H30ZM8 4h16v4H8ZM4 4h2v10H4Zm0 20h2v4H4Zm16.975-1.05l-8.622 4.31a7.036 7.036 0 0 1-3.13.74H8v-4h.111a9.045 9.045 0 0 0 4.025-.95L18 20.118l1.864.932a9.045 9.045 0 0 0 4.025.95H24v.058a9.052 9.052 0 0 0-3.025.892ZM28 22h-2v-6h2ZM12.354 10.74l8.621 4.31a9.052 9.052 0 0 0 3.025.89V20h-.111a7.036 7.036 0 0 1-3.13-.74l-8.622-4.31A9.045 9.045 0 0 0 8.11 14H8v-4h1.223a7.036 7.036 0 0 1 3.13.74ZM28 8h-2V4h2Z"})}),whe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M22 21H2V3h2v16h2v-2h4v2h2v-3h4v3h2v-2h4v4m-4-7h4v2h-4v-2m-6-8h4v3h-4V6m4 9h-4v-5h4v5M6 10h4v2H6v-2m4 6H6v-3h4v3Z"})}),She=r=>C("svg",{viewBox:"0 0 16 16",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M2.873 11.297V4.142H1.699L0 5.379v1.137l1.64-1.18h.06v5.961h1.174Zm3.213-5.09v-.063c0-.618.44-1.169 1.196-1.169c.676 0 1.174.44 1.174 1.106c0 .624-.42 1.101-.807 1.526L4.99 10.553v.744h4.78v-.99H6.643v-.069L8.41 8.252c.65-.724 1.237-1.332 1.237-2.27C9.646 4.849 8.723 4 7.308 4c-1.573 0-2.36 1.064-2.36 2.15v.057h1.138Zm6.559 1.883h.786c.823 0 1.374.481 1.379 1.179c.01.707-.55 1.216-1.421 1.21c-.77-.005-1.326-.419-1.379-.953h-1.095c.042 1.053.938 1.918 2.464 1.918c1.478 0 2.642-.839 2.62-2.144c-.02-1.143-.922-1.651-1.551-1.714v-.063c.535-.09 1.347-.66 1.326-1.678c-.026-1.053-.933-1.855-2.359-1.845c-1.5.005-2.317.88-2.348 1.898h1.116c.032-.498.498-.944 1.206-.944c.703 0 1.206.435 1.206 1.07c.005.64-.504 1.106-1.2 1.106h-.75v.96Z"})}),Che=r=>z("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...r,children:[C("path",{fill:"currentColor",d:"M22 6V4H12v2h4v2h-4v12h4v2h-4v2h10v-2h-4v-2h4V8h-4V6Zm-8 12v-3h6v3Zm6-5h-6v-3h6Z"}),C("path",{fill:"currentColor",d:"M30 30H4a2 2 0 0 1-2-2V2h2v26h26Z"})]}),The=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M8 16h5v-5H8v5Zm0-7h12V4H8Zm7 7h5v-5h-5Zm-7 2q-.825 0-1.412-.587Q6 16.825 6 16V4q0-.825.588-1.413Q7.175 2 8 2h12q.825 0 1.413.587Q22 3.175 22 4v12q0 .825-.587 1.413Q20.825 18 20 18Zm-4 4q-.825 0-1.412-.587Q2 20.825 2 20V6h2v14h14v2Z"})}),uz=({setChartType:r})=>{const e=[{name:"Line",icon:she},{name:"Bar",icon:lhe},{name:"Combo",icon:hhe},{name:"Scatter",icon:uhe},{name:"Row",icon:che},{name:"Area",icon:fhe},{name:"Pie",icon:vhe},{name:"Waterfall",icon:ghe},{name:"Funnel",icon:phe},{name:"Bubble",icon:yhe},{name:"Doughnut",icon:dhe},{name:"Stepped",icon:mhe},{name:"Histogram",icon:_he},{name:"Gauge",icon:bhe},{name:"Sankey",icon:xhe},{name:"Stack",icon:whe},{name:"Single value",icon:She},{name:"BoxPlot",icon:Che},{name:"Table",icon:The}];return C("div",{className:it.chartOptions,children:e.map(t=>z("div",{className:it.chartOption,children:[C(Le,{type:"button",variant:"custom",className:it.chartOptionBtn,onClick:()=>{r(t.name.toLowerCase())},children:C(t.icon,{style:{color:"blue",width:"20px",height:"20px"}})},t.name),C(de,{variant:"p",styleClass:"tertiary",className:it.chartOptionText,children:t.name})]},t.name))})},Dhe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M7 3H5v6h2V3m12 0h-2v10h2V3M3 13h2v8h2v-8h2v-2H3v2m12-6h-2V3h-2v4H9v2h6V7m-4 14h2V11h-2v10m4-6v2h2v4h2v-4h2v-2h-6Z"})}),Mhe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:2,d:"M20 20L4 4m16 0L4 20"})}),Ahe=({chartType:r,setChartType:e,data:t,setXAxis:n,setYAxisList:a,xAxis:i,setMeasure:o,setStep:s,step:l,measure:u,setSankeyValues:c,singleValue:f,setSingleValue:h,setSettingsShow:v,setMargins:d,margins:p,legendSettings:g,setLegendSettings:y,labelSettings:m,setLabelSettings:_,axisSettings:b,setAxisSettings:w,customSettings:x,setCustomSettings:S,backGroundColor:T,setBackGroundColor:D})=>{const[M,A]=B.useState(uc),I="Chart types",P="Chart properties",[E,O]=B.useState(I);return z("div",{className:Zr.chartButtonContainer,children:[z("div",{className:Zr["chartButton-header"],children:[z(de,{styleClass:"font-14c",variant:"h1",className:Zr.settings,children:[C(Dhe,{}),"Chart Settings"]}),C("div",{className:Zr.crossIcon,children:C(Mhe,{onClick:()=>v(!1)})})]}),z("div",{className:Zr.chartButtons,children:[z("div",{className:Zr["settingsTab-header-control"],children:[C(Le,{type:"button",variant:"custom",className:`${Zr.chartButton} ${M===uc&&Zr.chartButtonSelected}`,onClick:()=>A(uc),children:"General"}),C(Le,{type:"button",variant:"custom",className:`${Zr.chartButton} ${M===xv&&Zr.chartButtonSelected}`,onClick:()=>A(xv),children:"Configuration"})]}),M===uc&&z(Ce,{children:[C("div",{className:Zr.tabContainer,children:C(YS,{activeTab:E,options:[I,P],setActiveTab:O,className:Zr.tab,tabText:Zr.tabText})}),E===I&&C("div",{className:Zr.button,children:C(uz,{setChartType:e})}),E===P&&C(Ce,{children:r&&C("div",{className:Zr.button,children:C(lz,{data:t,setXAxis:n,xAxis:i,setYAxisList:a,chartType:r,setStep:s,setMeasure:o,step:l,measure:u,setSankeyValues:c,singleValue:f,setSingleValue:h,setSettingsShow:v})})})]}),M===xv&&C(ohe,{setMargins:d,margins:p,legendSettings:g,setLegendSettings:y,labelSettings:m,setLabelSettings:_,axisSettings:b,setAxisSettings:w,customSettings:x,setCustomSettings:S,chartType:r,setChartType:e,backGroundColor:T,setBackGroundColor:D})]})]})};var jt={"outputTab-header":"_outputTab-header_1jfcs_1",searchCommand:"_searchCommand_1jfcs_9","chartTab-container":"_chartTab-container_1jfcs_17",chartText:"_chartText_1jfcs_25",charts:"_charts_1jfcs_33",metricChart:"_metricChart_1jfcs_41",metricChartEmpty:"_metricChartEmpty_1jfcs_49","chartTab-wrapper":"_chartTab-wrapper_1jfcs_57","chartTab-wrapper-head":"_chartTab-wrapper-head_1jfcs_65",fullQuery:"_fullQuery_1jfcs_73",noQuery:"_noQuery_1jfcs_81","tableTab-header":"_tableTab-header_1jfcs_89","chartButton-header":"_chartButton-header_1jfcs_97",chartButtonContainer:"_chartButtonContainer_1jfcs_105",searchWrapper:"_searchWrapper_1jfcs_113",searchIcon:"_searchIcon_1jfcs_121",chartConfigure:"_chartConfigure_1jfcs_129",chartSettings:"_chartSettings_1jfcs_137",labels:"_labels_1jfcs_145",chartButtons:"_chartButtons_1jfcs_153",chartButton:"_chartButton_1jfcs_97"};const cz=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:2,d:"m21 21l-4.486-4.494M19 10.5a8.5 8.5 0 1 1-17 0a8.5 8.5 0 0 1 17 0Z"})}),Lhe=r=>C("svg",{viewBox:"0 0 16 16",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M11.5 4a.5.5 0 0 0 .5.5h1.75a.75.75 0 0 1 0 1.5H12a2 2 0 0 1-2-2V2.25a.75.75 0 0 1 1.5 0V4Zm0 8a.5.5 0 0 1 .5-.5h1.75a.75.75 0 0 0 0-1.5H12a2 2 0 0 0-2 2v1.75a.75.75 0 0 0 1.5 0V12ZM4 11.5a.5.5 0 0 1 .5.5v1.75a.75.75 0 0 0 1.5 0V12a2 2 0 0 0-2-2H2.25a.75.75 0 0 0 0 1.5H4ZM4.5 4a.5.5 0 0 1-.5.5H2.25a.75.75 0 0 0 0 1.5H4a2 2 0 0 0 2-2V2.25a.75.75 0 0 0-1.5 0V4Z"})}),fz=({labels:r,datasets:e,funnelData:t,chartType:n,setChartType:a,data:i,setXAxis:o,setYAxisList:s,xAxis:l,setMeasure:u,setStep:c,step:f,measure:h,setSankeyValues:v,sankeyData:d,singleValue:p,setSingleValue:g,singleValueData:y,setMargins:m,margins:_,legendSettings:b,setLegendSettings:w,labelSettings:x,setLabelSettings:S,customSettings:T,setCustomSettings:D,axisSettings:M,setAxisSettings:A,updateGroup:I,isLoading:P,isEnableGroupBy:E,backGroundColor:O,setBackGroundColor:N})=>{const[V,$]=B.useState(!1),[U,Y]=B.useState(!1);return z("div",{className:jt["chartTab-container"],children:[!(i!=null&&i.length)&&P&&C("div",{className:jt["loader-container"],children:C(zu,{style:{width:"50px",height:"50px",color:"blue"}})}),!(i!=null&&i.length)&&!P&&z("div",{className:jt.metricChartEmpty,children:[C("div",{className:jt.searchWrapper,children:C(cz,{className:jt.searchIcon})}),C("div",{className:jt.message,children:C(de,{styleClass:"font-14b",variant:"p",children:"Uh-oh, Nothing to display"})}),C("div",{className:jt.chartButton,children:C(de,{styleClass:"font-14a",variant:"p",children:"No data found! Run a query to display charts"})})]}),!!(i!=null&&i.length)&&!P&&z("div",{className:jt.metricChart,children:[C(de,{styleClass:"primary",variant:"p",className:"",children:"Preview"}),z("div",{className:jt["chartTab-wrapper"],children:[z("div",{className:jt["chartTab-wrapper-head"],children:[C(de,{styleClass:"primary",variant:"p",className:"",children:"Charts"}),z("div",{className:jt.chartButtons,children:[C(Le,{type:"button",variant:"custom",className:jt.chartButton,onClick:()=>{$(!V)},children:"Chart Settings"}),C(Le,{type:"button",variant:"custom",className:r!=null&&r.length?jt.fullQuery:jt.noQuery,onClick:r!=null&&r.length?()=>Y(!0):void 0,children:C(Lhe,{})})]})]}),V&&C("div",{className:jt.chartSettings,children:C(Ahe,{chartType:n,setChartType:a,data:i,setXAxis:o,setYAxisList:s,xAxis:l,setMeasure:u,setStep:c,step:f,measure:h,setSankeyValues:v,singleValue:p,setSingleValue:g,setSettingsShow:$,setMargins:m,margins:_,legendSettings:b,setLegendSettings:w,labelSettings:x,setLabelSettings:S,axisSettings:M,setAxisSettings:A,customSettings:T,setCustomSettings:D,backGroundColor:O,setBackGroundColor:N})}),r!=null&&r.length?C("div",{className:jt.labels,children:C(Bg,{labels:r,data:{labels:r,datasets:e},chartType:n,funnelData:t,sankeyData:d,singleValueData:y,margins:_,legendSettings:b,labelSettings:x,axisSettings:M,customSettings:T,backGroundColor:O,updateGroup:I,isEnableGroupBy:E,chartClickConfig:{isEnable:!1,baseUrl:"",dynamic:"{{value}}",route:"/{{value}}",routeType:"internal"},enableSaveAs:!0})}):z("div",{className:jt.metricChartEmpty,children:[C("div",{className:jt.searchWrapper,children:C(cz,{className:jt.searchIcon})}),C("div",{className:jt.message,children:C(de,{styleClass:"font-14b",variant:"p",children:"Uh-oh, Nothing to display"})}),C("div",{className:jt.chartButton,children:C(de,{styleClass:"font-14a",variant:"p",children:"Choose an appropriate chart type and start visulaizing your data"})})]})]})]}),C(WS,{isShow:U,onCancel:()=>Y(!1),chart:{labels:r,data:{labels:r,datasets:e},chartType:n,funnelData:t,sankeyData:d,singleValueData:y,margins:_,legendSettings:b,labelSettings:x,axisSettings:M,customSettings:T,backGroundColor:O,enableSaveAs:!0,chartClickConfig:{isEnable:!1,baseUrl:"",dynamic:"{{value}}",route:"/{{value}}",routeType:"internal"}}})]})};var iy={container:"_container_1jc0r_1",wrapper:"_wrapper_1jc0r_5",text:"_text_1jc0r_9",table:"_table_1jc0r_12"},Oo={container:"_container_1uho5_1",table:"_table_1uho5_9",tableHead:"_tableHead_1uho5_17",tableRow:"_tableRow_1uho5_25",tableHeadCol:"_tableHeadCol_1uho5_33",tableRowCol:"_tableRowCol_1uho5_41",empty:"_empty_1uho5_49",error:"_error_1uho5_57"};const hz=({data:r,isError:e})=>z("div",{className:Oo.container,children:[!!(r!=null&&r.length)&&!e&&z("table",{className:Oo.table,children:[C("thead",{className:Oo.tableHead,children:C("tr",{className:Oo.tableRow,children:Object.keys(r[0]).map(t=>C("th",{className:Oo.tableHeadCol,scope:"col",children:C(de,{styleClass:"font-14c",variant:"h1",children:t})},t))})}),C("tbody",{children:r==null?void 0:r.map((t,n)=>C("tr",{children:Object.keys(r[0]).map((a,i)=>C("td",{className:Oo.tableRowCol,children:C(de,{styleClass:"font-14",variant:"p",children:JSON.stringify(t[a])})},i))},n))})]}),!(r!=null&&r.length)&&!e&&C("div",{className:Oo.empty,children:"Table is empty"}),e&&C("div",{className:Oo.error,children:r.message})]}),Ihe=({previewTableDataList:r})=>C("div",{className:iy.container,children:C("div",{className:iy.wrapper,children:r==null?void 0:r.map(e=>z("div",{className:iy.text,children:[C(de,{variant:"h1",styleClass:"primary",className:"",children:e.name}),C("div",{className:iy.table,children:C(hz,{data:e.data,isError:e.isError})})]},e.name))})});var Ii={container:"_container_12jmm_1",header:"_header_12jmm_5","text-container":"_text-container_12jmm_9","btn-container":"_btn-container_12jmm_13",tabButton:"_tabButton_12jmm_16",selectedTab:"_selectedTab_12jmm_19",table:"_table_12jmm_22"},Xr={"table-loader-container":"_table-loader-container_1j4gc_1",tableData:"_tableData_1j4gc_7",tableHeadCol:"_tableHeadCol_1j4gc_13",tableRow:"_tableRow_1j4gc_19",tableRowCol:"_tableRowCol_1j4gc_25",row:"_row_1j4gc_31",container:"_container_1j4gc_37",table:"_table_1j4gc_1",previewTable:"_previewTable_1j4gc_49",preview:"_preview_1j4gc_49",previewText:"_previewText_1j4gc_61",noData:"_noData_1j4gc_67",error:"_error_1j4gc_73",errorMsg:"_errorMsg_1j4gc_79",tableIcon:"_tableIcon_1j4gc_85"};const Phe=r=>C("svg",{viewBox:"0 0 15 15",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"none",stroke:"currentColor",d:"M.5 4.5h14m-10-4v14m-3-14h12a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1h-12a1 1 0 0 1-1-1v-12a1 1 0 0 1 1-1Z"})}),vz=({data:r,isLoading:e,error:t})=>C("div",{className:Xr.container,children:z("div",{className:Xr.previewTable,children:[C("div",{className:Xr.preview,children:C(de,{styleClass:"font-14c",variant:"h1",className:Xr.previewText,children:"Preview"})}),z("div",{className:Xr.tableData,children:[e&&!(r!=null&&r.length)&&C("div",{className:Xr["table-loader-container"],children:C(zu,{style:{width:"50px",height:"50px",color:"blue"}})}),!!(r!=null&&r.length)&&!e&&z("table",{className:Xr.table,children:[C("thead",{children:C("tr",{className:Xr.row,children:Object.keys(r[0]).map(n=>C("th",{className:Xr.tableHeadCol,scope:"col",children:C(de,{styleClass:"font-14c",variant:"h1",children:n})},n))})}),C("tbody",{children:r.map((n,a)=>C("tr",{className:Xr.tableRow,children:Object.keys(r[0]).map((i,o)=>C("td",{className:Xr.tableRowCol,children:C(de,{styleClass:"font-14",variant:"p",children:JSON.stringify(n[i])})},o))},a))})]}),!(r!=null&&r.length)&&!e&&!t.length&&z("div",{className:Xr.noData,children:[C(Phe,{className:Xr.tableIcon,width:"60px",height:"60px"}),C(de,{styleClass:"font-14b",variant:"p",children:"No data available to preview"}),C(de,{styleClass:"font-14a",variant:"p",children:"Run your query to preview data"})]}),t&&C("div",{className:Xr.error,children:C(de,{styleClass:"primary",className:Xr.errorMsg,variant:"p",children:t})})]})]})}),dz=({outpuTableData:r,outputError:e,isOutputLoading:t,previewTableDataList:n})=>{const[a,i]=B.useState(lc);return z("div",{className:Ii.container,children:[z("div",{className:Ii.header,children:[z("div",{className:Ii["text-container"],children:[C(de,{styleClass:"font-14c",variant:"h1",children:"Tables"}),C(de,{styleClass:"font-14",variant:"p",children:"Preview your selected table & output table values"})]}),z("div",{className:Ii["btn-container"],children:[C(Le,{type:"button",variant:"custom",className:`${Ii.tabButton} ${a===bv&&Ii.selectedTab}`,onClick:()=>i(bv),children:"Input Table"}),C(Le,{type:"button",variant:"custom",className:`${Ii.tabButton} ${a===lc&&Ii.selectedTab}`,onClick:()=>i(lc),children:"Output Table"})]})]}),a===bv&&C(Ihe,{previewTableDataList:n}),a===lc&&C("div",{className:Ii.table,children:C(vz,{data:r,isLoading:t,error:e})})]})};var Pi={"main-container":"_main-container_wy97p_1","outputTab-header":"_outputTab-header_wy97p_5",wrapper:"_wrapper_wy97p_9",searchCommand:"_searchCommand_wy97p_12",tabButton:"_tabButton_wy97p_15",tabActive:"_tabActive_wy97p_18"};const Ehe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M7 21V7h14v14Zm2-10h10V9H9Zm4 4h2v-2h-2Zm0 4h2v-2h-2Zm-4-4h2v-2H9Zm8 0h2v-2h-2Zm-8 4h2v-2H9Zm8 0h2v-2h-2ZM3 17V3h14v3h-2V5H5v10h1v2Z"})}),Ohe=r=>C("svg",{viewBox:"0 0 256 256",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M232 208a8 8 0 0 1-8 8H32a8 8 0 0 1-8-8V48a8 8 0 0 1 16 0v108.7l50.3-50.4a8.1 8.1 0 0 1 11.4 0l26.3 26.4L188.7 72H168a8 8 0 0 1 0-16h40a8 8 0 0 1 8 8v40a8 8 0 0 1-16 0V83.3l-66.3 66.4a8.1 8.1 0 0 1-11.4 0L96 123.3l-56 56V200h184a8 8 0 0 1 8 8Z"})}),pz=({data:r,error:e,isLoading:t,labels:n,funnelData:a,chartType:i,datasets:o,setChartType:s,setXAxis:l,setYAxisList:u,xAxis:c,setMeasure:f,setStep:h,step:v,measure:d,setSankeyValues:p,sankeyData:g,previewTableDataList:y,singleValue:m,setSingleValue:_,singleValueData:b,setMargins:w,margins:x,legendSettings:S,setLegendSettings:T,labelSettings:D,setLabelSettings:M,axisSettings:A,setAxisSettings:I,customSettings:P,setCustomSettings:E,updateGroup:O,isEnableGroupBy:N,backGroundColor:V,setBackGroundColor:$,moreTabs:U})=>{var H;const[Y,ae]=B.useState(sc);return z("div",{className:Pi["main-container"],children:[z("div",{className:Pi["outputTab-header"],children:[z(Le,{type:"button",variant:"custom",className:`${Pi.tabButton} ${Y===sc&&Pi.tabActive}`,onClick:()=>ae(sc),children:[C(Ehe,{})," Tables"]}),z(Le,{type:"button",variant:"custom",className:`${Pi.tabButton} ${Y===_v&&Pi.tabActive}`,onClick:()=>ae(_v),children:[C(Ohe,{}),"Visualizations"]}),U==null?void 0:U.map(q=>C(Le,{type:"button",variant:"custom",className:`${Pi.tabButton} ${Y===q.name&&Pi.tabActive}`,onClick:()=>ae(q.name),children:q.tab},q.name))]}),z("div",{className:Pi.wrapper,children:[Y===sc&&C(dz,{outpuTableData:r,isOutputLoading:t,outputError:e,previewTableDataList:y}),Y===_v&&C(fz,{labels:n,funnelData:a,chartType:i,datasets:o,data:r,setChartType:s,setXAxis:l,setYAxisList:u,xAxis:c,setMeasure:f,setStep:h,step:v,measure:d,setSankeyValues:p,sankeyData:g,singleValue:m,setSingleValue:_,singleValueData:b,setMargins:w,margins:x,legendSettings:S,setLegendSettings:T,labelSettings:D,setLabelSettings:M,axisSettings:A,setAxisSettings:I,customSettings:P,setCustomSettings:E,updateGroup:O,isEnableGroupBy:N,isLoading:t,backGroundColor:V,setBackGroundColor:$}),(H=U==null?void 0:U.find(q=>q.name===Y))==null?void 0:H.tabContent]})]})};var He={"form-container":"_form-container_vmreb_1","field-container":"_field-container_vmreb_5","field-label":"_field-label_vmreb_9","field-wrapper":"_field-wrapper_vmreb_13","field-inner-container":"_field-inner-container_vmreb_17","field-value":"_field-value_vmreb_21","field-add-btn":"_field-add-btn_vmreb_25","field-value-container":"_field-value-container_vmreb_29","field-prompt":"_field-prompt_vmreb_33",group:"_group_vmreb_1",tooltipWrapper:"_tooltipWrapper_vmreb_37",tooltip:"_tooltip_vmreb_37",dropdown:"_dropdown_vmreb_49",filterDropdown:"_filterDropdown_vmreb_53",filterValues:"_filterValues_vmreb_57",columnText:"_columnText_vmreb_61",disabled:"_disabled_vmreb_65",checkIcon:"_checkIcon_vmreb_69",generateButton:"_generateButton_vmreb_73"};const Ah=r=>C("svg",{viewBox:"0 0 15 15",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.782 4.032a.575.575 0 1 0-.813-.814L7.5 6.687L4.032 3.218a.575.575 0 0 0-.814.814L6.687 7.5l-3.469 3.468a.575.575 0 0 0 .814.814L7.5 8.313l3.469 3.469a.575.575 0 0 0 .813-.814L8.313 7.5l3.469-3.468Z",clipRule:"evenodd"})}),oy=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:z("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[C("circle",{cx:12,cy:12,r:10}),C("path",{d:"M12 8v8m-4-4h8"})]})}),Rhe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M12 2A10 10 0 0 0 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10h-2a8 8 0 0 1-8 8a8 8 0 0 1-8-8a8 8 0 0 1 8-8V2m6.78 1a.69.69 0 0 0-.48.2l-1.22 1.21l2.5 2.5L20.8 5.7c.26-.26.26-.7 0-.95L19.25 3.2c-.13-.13-.3-.2-.47-.2m-2.41 2.12L9 12.5V15h2.5l7.37-7.38l-2.5-2.5Z"})}),gz=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M5 21q-.825 0-1.413-.587Q3 19.825 3 19V5q0-.825.587-1.413Q4.175 3 5 3h14q.825 0 1.413.587Q21 4.175 21 5v14q0 .825-.587 1.413Q19.825 21 19 21Zm5.6-5.225q.2 0 .375-.062q.175-.063.325-.213l5.675-5.675q.275-.275.275-.675t-.3-.7q-.275-.275-.7-.275q-.425 0-.7.275L10.6 13.4l-2.175-2.175q-.275-.275-.675-.275t-.7.3q-.275.275-.275.7q0 .425.275.7L9.9 15.5q.15.15.325.213q.175.062.375.062Z"})}),yz=({dateTimeColumnList:r,columnList:e,database:t,companyId:n,tableName:a,setData:i,setError:o,setLoading:s,setQuery:l,isEnableGroupBy:u,setSelectedGroupBy:c})=>{const[f,h]=B.useState([]),[v,d]=B.useState(""),[p,g]=B.useState({value:"",label:""}),[y,m]=B.useState([]),[_,b]=B.useState([]),[w,x]=B.useState(""),[S,T]=B.useState(""),[D,M]=B.useState([]),[A,I]=B.useState([]),[P,E]=B.useState(!1),[O,N]=B.useState(!1),[V,$]=B.useState(!1),[U,Y]=B.useState(!1),[ae,H]=B.useState(!1),[q,X]=B.useState(!1),[Z,ie]=B.useState([]),[se,te]=B.useState(""),[ve,R]=B.useState({value:"",label:""}),[F,G]=B.useState({value:"",label:""}),[re,ne]=B.useState({value:"",label:""}),[ee,ue]=B.useState({value:"10",label:"10"}),[De,vt]=B.useState({value:"",label:""}),[rt,Yt]=B.useState({value:"",label:""}),[Ct,Qr]=B.useState({value:"",label:""}),[St,bt]=B.useState({value:"",label:""}),[Qt,Ta]=B.useState({value:"",label:""});B.useEffect(()=>{e.length&&(M([]),h([]),R(e[0]),m([]),G(e[0]),vt(e[0]),x(""),ne(e[0]),b([]),H(!1),X(!1),d(""),T(""))},[e]),B.useEffect(()=>{r.length?g({value:r[0].name,label:r[0].as}):g({value:"",label:""})},[r]);const{generateDatasetMetric:or,isGeneratingDataset:Ni,generateError:Uu,fetchColumnValues:Kr}=ey();B.useEffect(()=>{De.value&&(I([]),Ta({value:"",label:""}),Kr({companyId:n,tableName:a,columnName:De.value},{onSuccess(Ie){var xr;const ft=(xr=Ie.fetchColumnData)==null?void 0:xr.data;if(ft!=null&&ft.length){const Qe=ft.map(Pt=>({value:(Pt==null?void 0:Pt.value)||"",label:(Pt==null?void 0:Pt.label)||""}));ie(Qe)}}}))},[De]);const ju=!f.length&&!y.length,ll=!r.length,Ih=!p.value,ul=!!f.length,ki=!!y.length,Jr=t==="Bigquery",Tn=t==="MySql",Da=t==="MongoDB",Dn=St.value==="IS NULL"||St.value==="IS NOT NULL",Ja=St.value==="IN"||St.value==="NOT IN",ct=Dn?!0:Ja?!!A.length:!!Qt.value,hn=y.length?!1:!Ct.value;return B.useEffect(()=>{var Ie;if(v&&p.value&&r.length){const ft=(Ie=r.find(Kt=>Kt.name===p.value))==null?void 0:Ie.datatype,xr=(ft==null?void 0:ft.toLowerCase())!=="date",Qe=p.value,Pt=FS({timeGrainValue:v,isTimeStamp:xr,col:Jr||Tn?Qe:Da?`\`${Qe}\``:`"${Qe}"`,database:t});T(Pt)}},[v,p]),B.useEffect(()=>{y.length&&(H(!1),M([]),x(""))},[y]),B.useEffect(()=>{Dn&&Ta({value:"",label:""})},[St]),B.useEffect(()=>{u&&c(D)},[D,u]),z("div",{className:He["form-container"],children:[!ll&&z("div",{className:He["field-container"],children:[C(de,{variant:"h1",styleClass:"custom",className:He["field-label"],children:"Time Filter"}),C("div",{className:He["field-wrapper"],children:z("div",{className:He["field-inner-container"],children:[C(Nr,{onChange:g,selectedOption:p,options:r.map(({name:Ie,as:ft})=>({value:Ie,label:ft})),isDisabled:ll,labelVariant:"static",label:"Time Column"}),C(zS,{setTimeGrainValue:d,timeGrainValue:v,isShowlabel:!0,isDisabled:Ih}),v&&z(Le,{type:"button",variant:"custom",className:He["field-value"],onClick:()=>d(""),children:[v," ",C(Ah,{})]})]})})]}),!ki&&z("div",{className:He["field-container"],children:[z(de,{variant:"h1",styleClass:"custom",className:He["field-label"],children:["Metric Creation",C(Li,{children:"configure metric columns"})]}),C("div",{className:He["field-wrapper"],children:z("div",{className:He["field-inner-container"],children:[C(de,{variant:"p",styleClass:"font-14",children:"Metric Fields"}),z(Le,{type:"button",variant:"secondary",className:He["field-add-btn"],onClick:()=>{E(!0),te("")},isDisabled:ki,children:[C(oy,{})," Add Aggregate Column"]}),C("div",{className:He["field-value-container"],children:f.map(Ie=>z(Le,{type:"button",variant:"custom",className:He["field-value"],onClick:()=>h(ft=>ft.filter(xr=>xr.as!==Ie.as)),children:[Ie.as," ",C(Ah,{})]},Ie.as))}),z(Ai,{headerTitle:ve.value&&rt.value?`${rt.value}(${ve.value})`:"Create metric",isOpen:P,onClose:()=>E(!1),children:[z("div",{className:He.dropdown,children:[C(Nr,{onChange:R,selectedOption:ve,options:e,labelVariant:"static",label:"Columns"}),C(Nr,{onChange:Yt,selectedOption:rt,options:gm,labelVariant:"static",label:"Aggregate"}),C(It,{label:"As",type:"text",placeholder:"Save as",name:"alias",onChange:Ie=>te(Ie.target.value)})]}),C(Gu,{children:C(Le,{type:"button",variant:"primary",size:"small",className:He.disabled,isDisabled:!rt.value||!ve.value,onClick:()=>{h(Ie=>[...Ie,{value:`${rt.value}(${Jr||Tn?`${ve.value}`:Da?`\`${ve.value}\``:`"${ve.value}"`})`,as:Jr?se||"_result":se||`${rt.value}(${ve.label})`}]),E(!1)},children:"Save"})})]}),C(de,{variant:"p",styleClass:"font-14",children:"Group By"}),C(Th,{options:e,onChange:M,value:D,name:"Dimensions",placeHolder:"Select Columns"})]})})]}),!ul&&z("div",{className:He["field-container"],children:[z(de,{variant:"h1",styleClass:"custom",className:He["field-label"],children:["Columns",C(Li,{children:"select columns for raw records query"})]}),C("div",{className:He["field-wrapper"],children:z("div",{className:He["field-inner-container"],children:[C(de,{variant:"p",styleClass:"font-14",children:"Select Columns"}),z(Le,{type:"button",variant:"secondary",className:He["field-add-btn"],onClick:()=>{N(!0),te("")},isDisabled:ul,children:[C(oy,{})," Add Column"]}),C("div",{className:He["field-value-container"],children:y.map(Ie=>z(Le,{type:"button",variant:"custom",className:He["field-value"],onClick:()=>m(ft=>ft.filter(xr=>xr.as!==Ie.as)),children:[Ie.as," ",C(Ah,{})]},Ie.as))}),z(Ai,{headerTitle:F.value?`${F.value}`:"Select Column",isOpen:O,onClose:()=>N(!1),children:[z("div",{className:He.dropdown,children:[C(Nr,{onChange:G,selectedOption:F,options:e,labelVariant:"static",label:"Columns"}),C(It,{label:"As",type:"text",placeholder:"Save as",name:"alias",onChange:Ie=>te(Ie.target.value)})]}),C(Gu,{children:C(Le,{type:"button",variant:"primary",size:"small",className:He.disabled,isDisabled:!F.value,onClick:()=>{y.find(Ie=>Ie.as===se)||m(Ie=>[...Ie,{value:`${F.value}`,as:se||`${F.label}`}]),N(!1)},children:"Save"})})]})]})})]}),z("div",{className:He["field-container"],children:[C(de,{variant:"h1",styleClass:"custom",className:He["field-label"],children:"category filters"}),C("div",{className:He["field-wrapper"],children:z("div",{className:He["field-inner-container"],children:[C(de,{variant:"p",styleClass:"font-14",children:"Filter by"}),z(Le,{type:"button",variant:"secondary",className:He["field-add-btn"],onClick:()=>Y(!0),children:[C(oy,{})," Add Filter Category"]}),C("div",{className:He["field-value-container"],children:_.map(Ie=>z(Le,{type:"button",variant:"custom",className:He["field-value"],onClick:()=>b(ft=>ft.filter(xr=>xr!==Ie)),children:[Ie," ",C(Ah,{})]},Ie))}),z(Ai,{headerTitle:De.value&&St.value?`${De.value} ${St.value} ${Ja?`(${A.map(Ie=>`'${Ie}'`).join(", ")})`:`${Qt.value?`'${Qt.value}'`:""}`}`:"Add Filter",isOpen:U,onClose:()=>Y(!1),children:[z("div",{className:He.filterDropdown,children:[C(Nr,{onChange:vt,selectedOption:De,options:e,labelVariant:"static",label:"Column"}),C(Nr,{onChange:bt,selectedOption:St,options:gv,labelVariant:"static",label:"Operator"}),Ja?z("div",{className:He.filterValue,children:[C(de,{variant:"p",styleClass:"font-14",children:"Filter Value"}),C(Th,{options:Z,onChange:I,value:A,name:"Filters",placeHolder:"Select Multiple Filters"})]}):C(Nr,{onChange:Ta,selectedOption:Qt,options:Z,isDisabled:Dn,labelVariant:"static",label:"Filter Value"})]}),C(Gu,{children:C(Le,{type:"button",variant:"primary",size:"small",isDisabled:!De.value||!St.value||!ct,className:He.disabled,onClick:()=>{b(Ie=>[...Ie,`${Jr||Tn?`${De.value}`:Da?`\`${De.value}\``:`"${De.value}"`} ${St.value} ${Ja?`(${A.map(ft=>`'${ft}'`).join(", ")})`:`${Qt.value?`'${Qt.value}'`:""}`}`]),Y(!1)},children:"Save"})})]}),C(de,{variant:"p",styleClass:"font-14",children:"Sort By"}),z(Le,{type:"button",variant:"secondary",className:He["field-add-btn"],onClick:()=>$(!0),children:[w?C(Rhe,{}):C(oy,{})," ",w?"Edit":"Add"," Sort Category"]}),w&&z(Le,{type:"button",variant:"custom",className:He["field-value"],onClick:()=>x(""),children:[w," ",C(Ah,{})]}),z(Ai,{headerTitle:y.length?re.value?`${re.value}`:"Create sort":re.value&&Ct.value?`${Ct.value}(${re.value})`:"Create sort",isOpen:V,onClose:()=>$(!1),children:[z("div",{className:He.dropdown,children:[C(Nr,{onChange:ne,selectedOption:re,options:e,labelVariant:"static",label:"Column"}),!y.length&&C(Nr,{onChange:Qr,selectedOption:Ct,options:gm,labelVariant:"static",label:"Aggregate"})]}),C(Gu,{children:C(Le,{type:"button",variant:"primary",size:"small",isDisabled:!re.value||hn,className:He.disabled,onClick:()=>{y.length?x(`${Jr||Tn?`${re.value}`:`${re.value}`}`):x(`${Ct.value}(${Jr||Tn?`${re.value}`:Da?`\`${re.value}\``:`"${re.value}"`})`),$(!1)},children:"Save"})})]})]})})]}),C(Nr,{onChange:ue,options:PT,selectedOption:ee,labelVariant:"static",label:"Row Limit"}),!y.length&&!!r.length&&z(de,{styleClass:"font-14",variant:"p",className:He.columnText,children:[C(Le,{type:"button",variant:"custom",onClick:()=>H(Ie=>!Ie),isDisabled:!p.value||!!y.length,children:ae?C(gz,{className:He.checkIcon}):C($S,{})}),"Include Time"]}),z(de,{styleClass:"font-14",variant:"p",className:He.columnText,children:[C(Le,{type:"button",variant:"custom",onClick:()=>X(Ie=>!Ie),children:q?C(gz,{className:He.checkIcon}):C($S,{})}),"Sort Descending"]}),C(Le,{type:"button",variant:"primary",className:He.generateButton,isDisabled:Ni||ju,onClick:()=>{var Ie,ft,xr;o(""),s(!0),i([]),l(""),Ni&&s(!0),or({companyId:n,userInputs:{columns:y.map(Qe=>Jr||Tn?`${Qe.value} AS ${Qe.as} `:Da?`\`${Qe.value}\` AS "${Qe.as}"`:`"${Qe.value}" AS "${Qe.as}"`),dimensions:Jr||Tn?D.map(Qe=>{var Pt,Kt;return{name:(Pt=e.find(kr=>kr.value===Qe))==null?void 0:Pt.value,as:(Kt=e.find(kr=>kr.value===Qe))==null?void 0:Kt.label}}):Da?D.map(Qe=>{var Pt,Kt;return{name:`\`${(Pt=e.find(kr=>kr.value===Qe))==null?void 0:Pt.value}\``,as:(Kt=e.find(kr=>kr.value===Qe))==null?void 0:Kt.label}}):D.map(Qe=>{var Pt,Kt;return{name:`"${(Pt=e.find(kr=>kr.value===Qe))==null?void 0:Pt.value}"`,as:(Kt=e.find(kr=>kr.value===Qe))==null?void 0:Kt.label}}),metrics:f.map(Qe=>Jr?`${Qe.value} AS ${Qe.as}`:`${Qe.value} AS "${Qe.as}"`),sort:w,isSortDescending:q,filters:_,tableName:a,rowLimit:ee.value,timeFilter:{filter:S,column:Jr||Tn?{name:p.value,as:(Ie=e.find(Qe=>Qe.value===p.value))==null?void 0:Ie.label}:Da?{name:`\`${p.value}\``,as:(ft=e.find(Qe=>Qe.value===p.value))==null?void 0:ft.label}:{name:`"${p.value}"`,as:(xr=e.find(Qe=>Qe.value===p.value))==null?void 0:xr.label},isInclude:ae}}},{onSuccess(Qe){var ly,uy,cy;const Pt=(ly=Qe.generateDatasetMetrics)==null?void 0:ly.error,Kt=(uy=Qe.generateDatasetMetrics)==null?void 0:uy.result,kr=(cy=Qe.generateDatasetMetrics)==null?void 0:cy.query;(Pt||Uu)&&(o(Pt.message||xm),s(!1),i([]),l("")),Kt&&kr&&(o(""),s(!1),i(Array.isArray(Kt)?Kt:[]),l(kr))}})},children:"Generate"})]})};var sy={container:"_container_7zhjn_1",header:"_header_7zhjn_5",enableGroupBy:"_enableGroupBy_7zhjn_8",enableGroupButton:"_enableGroupButton_7zhjn_11"};const mz=({dateTimeColumnList:r,columnList:e,database:t,companyId:n,tableName:a,setData:i,setError:o,setLoading:s,setQuery:l,isEnableGroupBy:u,setEnableGroupBy:c,setSelectedGroupBy:f})=>z("div",{className:sy.container,children:[z("div",{className:sy.header,children:["Data",c&&z(Le,{type:"button",variant:"custom",onClick:()=>c(!u),className:`${u&&sy.enableGroupBy} ${sy.enableGroupButton}`,children:[u?"Disable":"Enable"," Drill down"]})]}),C(yz,{dateTimeColumnList:r,columnList:e,database:t,companyId:n,tableName:a,setData:i,setError:o,setQuery:l,setLoading:s,isEnableGroupBy:u,setSelectedGroupBy:f})]});var Ei={form:"_form_qtwuf_1",container:"_container_qtwuf_7",field:"_field_qtwuf_13",fieldLabel:"_fieldLabel_qtwuf_19",save:"_save_qtwuf_25",cancel:"_cancel_qtwuf_31",error:"_error_qtwuf_37"},ZS={label:"_label_1vo1x_1",textarea:"_textarea_1vo1x_9",resizable:"_resizable_1vo1x_17"};const _z=({id:r,label:e,placeholder:t,rows:n,cols:a,resizable:i=!0,register:o,error:s,defaultValue:l,value:u,onFocus:c,onBlur:f,className:h})=>z("div",{className:h,children:[C("label",{htmlFor:r,className:ZS.label,children:e}),C("textarea",{id:r,name:r,rows:n,cols:a,placeholder:t,className:Kn(ZS.textarea,`${i?null:ZS.resizable}`),defaultValue:l,...o,value:u,onFocus:c,onBlur:f}),s&&C(sS,{message:s.message})]});var Oi={group:"_group_13otg_1",button:"_button_13otg_9",checkbox:"_checkbox_13otg_17",switch:"_switch_13otg_25",enabled:"_enabled_13otg_43",notenabled:"_notenabled_13otg_59",label:"_label_13otg_75",labelActive:"_labelActive_13otg_83",labelInactive:"_labelInactive_13otg_91"};const bz=({enabled:r,onChange:e,label:t,className:n="",placeholder:a,labelClassName:i,defaultEnabled:o})=>z("div",{className:`${Oi.group} ${n}`,children:[t?C(de,{styleClass:"font-14",variant:"p",className:i,children:t}):null,C("input",{type:"checkbox",id:"toggle",checked:o,onChange:({target:s})=>e==null?void 0:e(s.checked),className:Oi.checkbox}),z("label",{htmlFor:"toggle",className:Oi.button,children:[C("span",{className:`${Oi.switch} ${r?Oi.enabled:Oi.notenabled}`}),a?C("span",{className:`
323
+ END`;if(r==="This Month")return e?`MONTH(${t}) = MONTH(NOW()) AND YEAR(${t}) = YEAR(NOW())`:`MONTH(${t}) = MONTH(NOW()) AND YEAR(${t}) = YEAR(NOW())`;const a=r.split(" - ")[0],i=r.split(" - ")[1];return e?`${t} BETWEEN '${a} 00:00:00' AND '${i} 23:59:59'`:`${t} BETWEEN '${a}' AND '${i}'`};var Ufe=Object.freeze(Object.defineProperty({__proto__:null,getModifiedQuery:Wfe,getTimeFilterValue:FS,groupArray:X4,groupByMultipleKeys:n4,updateGroupData:wa,findKeys:oS},Symbol.toStringTag,{value:"Module"}));const Q4=({columnName:r,dbName:e,onChangeFilterValue:t,name:n})=>{const[a,i]=B.useState(""),o=e.toLowerCase()==="bigquery",s=e.toLowerCase()==="mysql",l=e.toLowerCase()==="mongodb";return C(zS,{setTimeGrainValue:i,timeGrainValue:a,onChange:u=>{const c=FS({col:o||s?r:l?`\`${r}\``:`"${r}"`,timeGrainValue:u,database:e,isTimeStamp:!1});t(n,c)}})};var VS={filterButton:"_filterButton_rl2m8_1",container:"_container_rl2m8_5",dropdown:"_dropdown_rl2m8_9"},Xt={container:"_container_170ju_1",wrapper:"_wrapper_170ju_5",label:"_label_170ju_9",floatingLabel:"_floatingLabel_170ju_13",dropdown:"_dropdown_170ju_17",options:"_options_170ju_21",checkedOption:"_checkedOption_170ju_25",option:"_option_170ju_21",icon:"_icon_170ju_33",text:"_text_170ju_37",floatingText:"_floatingText_170ju_41",search:"_search_170ju_45",loadMore:"_loadMore_170ju_49"};const jfe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"m10.6 16.2l7.05-7.05l-1.4-1.4l-5.65 5.65l-2.85-2.85l-1.4 1.4ZM5 21q-.825 0-1.413-.587Q3 19.825 3 19V5q0-.825.587-1.413Q4.175 3 5 3h14q.825 0 1.413.587Q21 4.175 21 5v14q0 .825-.587 1.413Q19.825 21 19 21Z"})}),$S=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M5 21q-.825 0-1.413-.587Q3 19.825 3 19V5q0-.825.587-1.413Q4.175 3 5 3h14q.825 0 1.413.587Q21 4.175 21 5v14q0 .825-.587 1.413Q19.825 21 19 21Zm0-2h14V5H5v14Z"})}),Nr=({label:r,labelVariant:e="floating",selectedOption:t,onChange:n,className:a,options:i,isDisabled:o,children:s,Icon:l,isSearchEnabled:u,closeControl:c})=>{const[f,h]=B.useState(!1),v=B.useRef(null),[d,p]=B.useState(""),[g,y]=B.useState(20);return ty({wrapRef:v,onOutsideClick:()=>h(!1)}),B.useEffect(()=>{!(c!=null&&c.close)||h(!1)},[c==null?void 0:c.close]),z("div",{className:Kn(Xt.container,a),ref:v,children:[r?C(de,{variant:"span",styleClass:e==="floating"?"custom":"font-14",className:`${Xt.label} ${e==="floating"?Xt.floatingLabel:""}`,children:r}):null,z(Le,{type:"button",variant:"custom",isDisabled:o,className:Xt.wrapper,onClick:()=>h(!f),children:[z(de,{variant:"p",styleClass:"font-14",className:`${Xt.text} ${e==="floating"?Xt.floatingText:""}`,children:[l&&C(l,{className:Xt.icon}),t.label||"Select An Option"]}),C(ry,{})]}),f&&!o&&z("div",{className:Xt.dropdown,children:[u&&C(Ch,{className:Xt.search,setSearchKeyword:p}),z("div",{className:Xt.options,children:[(d?i.filter(m=>m.label.toLowerCase().includes(d)):i.slice(0,g)).map(m=>{const _=m.value===t.value;return C(Le,{type:"button",variant:"custom",className:_?Xt.checkedOption:Xt.option,onClick:()=>{n(m),h(!1)},children:m.label},m.key||m.value)}),g<=i.length&&C(Le,{variant:"secondary",type:"button",onClick:()=>y(m=>m+20),className:Xt.loadMore,children:"Load More"})]}),s]})]})},K4=pe.default.memo(({label:r,labelVariant:e="floating",selectedOptions:t,onChange:n,className:a,options:i,isDisabled:o,children:s,isSearchEnabled:l})=>{const[u,c]=B.useState(!1),f=B.useRef(null),[h,v]=B.useState(""),[d,p]=B.useState(20);return ty({wrapRef:f,onOutsideClick:()=>c(!1)}),z("div",{className:Kn(Xt.container,a),ref:f,children:[r?C(de,{variant:"span",styleClass:e==="floating"?"custom":"font-14",className:`${Xt.label} ${e==="floating"?"absolute left-2 top-1 text-xs":""}`,children:r}):null,z(Le,{type:"button",variant:"custom",isDisabled:o,className:Xt.wrapper,onClick:()=>c(!u),children:[C(de,{variant:"p",styleClass:"font-14",className:e==="floating"?"mt-2.5":"",children:"Select 1 or more option"}),C(ry,{})]}),u&&!o&&z("div",{className:Xt.dropdown,children:[l&&C(Ch,{className:"p-2 mb-3",setSearchKeyword:v}),z("div",{className:Xt.options,children:[(h?i.filter(g=>g.label.toLowerCase().includes(h)):i.slice(0,d)).map(g=>{const y=!!t.find(m=>m.value===g.value);return z(Le,{type:"button",variant:"custom",className:y?Xt.checkedOption:Xt.option,onClick:()=>{const m=y?t.filter(_=>_.value!==g.value):[...t,g];n(m)},children:[y?C(jfe,{}):C($S,{}),g.label]},g.key||g.value)}),d<=i.length&&C(Le,{variant:"secondary",type:"button",onClick:()=>p(g=>g+20),className:"w-full text-blue-700 text-center",children:"Load More"})]}),s]})]})}),HS=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M7 6h10l-5.01 6.3L7 6zm-2.75-.39C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39A.998.998 0 0 0 18.95 4H5.04c-.83 0-1.3.95-.79 1.61z"})}),GS=({rlsConditions:r,onChangeFilterValue:e,dbName:t,iconClass:n="",...a})=>C(Dh,{...a,buttonClass:a.buttonClass?a.buttonClass:VS.filterButton,button:C(HS,{className:n}),children:C("div",{className:VS.container,children:r.map(i=>C("div",{className:VS.dropdown,children:i.datatype!=="date"?C(Nr,{label:i.name,selectedOption:{value:i.value||i.options[0],label:i.value||i.options[0]},options:i.options.map(o=>({value:o,label:o})),onChange:o=>{e(i.name,o.value)}}):C(Q4,{columnName:i.columnName,dbName:t,name:i.name,onChangeFilterValue:e})}))})});var J4="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMDAgMzAwIj48ZGVmcz48c3R5bGU+LmNscy0xe3N0cm9rZTojMTgyYzYwO30uY2xzLTEsLmNscy0ye2ZpbGw6bm9uZTtzdHJva2UtbGluZWNhcDpyb3VuZDtzdHJva2UtbGluZWpvaW46cm91bmQ7fS5jbHMtM3tmaWxsOiM1ODY1ZjY7b3BhY2l0eTouMTt9LmNscy00e2ZpbGw6I2YyZjNmNDt9LmNscy01e2ZpbGw6I2MxYzdjOTt9LmNscy02e2ZpbGw6I2RhZGVkZjt9LmNscy03e2ZpbGw6IzE4MmM2MDt9LmNscy0ye3N0cm9rZTojNTg2NWY2O3N0cm9rZS13aWR0aDo0cHg7fTwvc3R5bGU+PC9kZWZzPjxwYXRoIGNsYXNzPSJjbHMtMSIgZD0ibTIxMC41LDIwMC44M2MuNC0uNjYuNjgtMS40LjgyLTIuMiwxLjU4LTguODcsMy4xNS0xNy43NSw0LjczLTI2LjYyLDIuMDMtMTEuNDQsNC4wNi0yMi44OCw2LjA5LTM0LjMyLjcyLTQuMDgsMS43Ny04LjI1LDIuMTYtMTIuMzguNDMtNC41Ni0yLjA5LTkuNjgtNi44Ni0xMC42Ni0uMDEsMC0uMDMsMC0uMDQsMC0yLjQtLjQ5LTUuMDItLjIyLTcuNDUtLjIyaC00NC4yMmMtLjUyLDAtMi4zMy0uMzEtMi43NywwbC0yNC4yOCwxNy4yMmgtNjEuNjFjLTMuOTcsMC02Ljk5LDMuNTYtNi4zNCw3LjQ3bDkuNzUsNTkuNDJjLjUxLDMuMTEsMy4yLDUuMzksNi4zNCw1LjM5aDExNy44NiIvPjxwYXRoIGNsYXNzPSJjbHMtMSIgZD0ibTIwNywxMTQuNDN2LTguNTRjMC0zLjU1LTIuODgtNi40My02LjQzLTYuNDNoLTE3LjE5Ii8+PHBhdGggY2xhc3M9ImNscy0xIiBkPSJtMTAzLjQ3LDk5LjQ2aC0xNS4xMmMtMy41NSwwLTYuNDMsMi44OC02LjQzLDYuNDN2MjUuNDgiLz48Zz48bGluZSBjbGFzcz0iY2xzLTIiIHgxPSIxMTQuMTIiIHkxPSI5NC4wOCIgeDI9IjE0NC44NCIgeTI9Ijk0LjA4Ii8+PGc+PHJlY3QgY2xhc3M9ImNscy02IiB4PSIxMTIuNjEiIHk9IjEwMi40MyIgd2lkdGg9IjE4Ljk3IiBoZWlnaHQ9IjMuMiIvPjxyZWN0IGNsYXNzPSJjbHMtNCIgeD0iMTM3LjYxIiB5PSIxMDIuNDMiIHdpZHRoPSI4LjkiIGhlaWdodD0iMy4yIi8+PC9nPjwvZz48cGF0aCBjbGFzcz0iY2xzLTMiIGQ9Im0xNjQuOTgsODEuNDZsLS4wOCwxNi4yOHMuMTUsMy4yNC4zLDMuNjIuNiwxLjUxLDEuMTMsMS44OCwxLjAyLjc5LDEuNzcsMS4wNi45NC40OSwyLjExLjQ5LDE4LjE3LjA0LDE4LjE3LjA0bC0yMy40MS0yMy4zN1oiLz48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Im0xODguNTEsMTA0LjkxdjkuNTIiLz48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Im0xMDMuNTMsMTMxLjM3di00NC45NWMwLTIuODQsMi4zLTUuMTUsNS4xNS01LjE1LDE4Ljc3LDAsMzcuNTQsMCw1Ni4zMSwwIi8+PHBhdGggY2xhc3M9ImNscy0xIiBkPSJtMTY1LjAxLDgxLjI3djE4LjM1YzAsMi44NCwyLjMxLDUuMTUsNS4xNSw1LjE1aDE4LjM1cy0yMy41LTIzLjYyLTIzLjUtMjMuNVoiLz48Y2lyY2xlIGNsYXNzPSJjbHMtMSIgY3g9IjE2OC4yMSIgY3k9IjE2My4yNyIgcj0iMjQuOTYiLz48Y2lyY2xlIGNsYXNzPSJjbHMtMSIgY3g9IjE2OC4yMSIgY3k9IjE2My4yNyIgcj0iMzEuMjUiLz48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Im0xOTIuNTcsMTgzLjMzYzkuNjIsOS42MiwzMC4yOCwzMC4yOCwzMC4yOCwzMC4yOCwxLjE3LDEuMTcsMS4xNywzLjA3LDAsNC4yNHMtMy4wNywxLjE3LTQuMjQsMGMwLDAtMjAuNTgtMjAuNTgtMzAuMjItMzAuMjIiLz48Zz48cGF0aCBjbGFzcz0iY2xzLTUiIGQ9Im0xNjguNjYsMTcwLjkzYy0uNzQsMC0xLjM0LjI0LTEuODEuNzItLjQ3LjQ4LS43MSwxLjA5LS43MSwxLjgzcy4yNCwxLjMyLjcxLDEuODFjLjQ3LjQ5LDEuMDcuNzQsMS44MS43NHMxLjM0LS4yNSwxLjgxLS43NGMuNDctLjQ5LjcxLTEuMS43MS0xLjgxcy0uMjQtMS4zNC0uNzEtMS44M2MtLjQ3LS40OC0xLjA4LS43Mi0xLjgxLS43MloiLz48cGF0aCBjbGFzcz0iY2xzLTUiIGQ9Im0xNzQuNjksMTUzLjc3Yy0uNjItMS4wMi0xLjQ5LTEuODItMi42LTIuNC0xLjEyLS41Ny0yLjQtLjg2LTMuODUtLjg2LTEuNjgsMC0zLjE3LjQtNC40NywxLjE5cy0yLjI5LDEuOTQtMi45OCwzLjQzbDIuNzYsMi4yOGMuNDYtMS4wNiwxLjA3LTEuODYsMS44NS0yLjQuNzctLjU0LDEuNjUtLjgxLDIuNjQtLjgxLjc2LDAsMS40MS4xNCwxLjk3LjQxLjU1LjI4Ljk4LjY3LDEuMjgsMS4xNy4zLjUxLjQ1LDEuMS40NSwxLjc5cy0uMTYsMS4yOS0uNDcsMS44MWMtLjMxLjUyLS43NS45Mi0xLjMxLDEuMjEtLjU2LjI5LTEuMjIuNDMtMS45OC40M2gtLjkzdjYuNjZoMy4yOGwuMjYtMy43M2MuNzEtLjI0LDEuMzctLjU1LDEuOTUtLjkzLjk5LS42NCwxLjc1LTEuNDUsMi4yOS0yLjQxLjU0LS45Ny44MS0yLjA3LjgxLTMuMzEsMC0xLjMzLS4zMS0yLjUxLS45My0zLjU0WiIvPjwvZz48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Im04NS41NSwyMDMuOTdjLjY4LDIuODksMy4yNiw0Ljk2LDYuMjYsNC45NmgxMTcuNzMiLz48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Im0yMTUuMzcsMjA2LjA0Yy40Ny0uNzEuOC0xLjUyLjk1LTIuNCwxLjU4LTguODcsMy4xNS0xNy43NSw0LjczLTI2LjYyLDIuMDMtMTEuNDQsNC4wNi0yMi44OCw2LjA5LTM0LjMyLjcyLTQuMDgsMS43Ny04LjI1LDIuMTYtMTIuMzguMzktNC4xNi0xLjY4LTguNzktNS42Ny0xMC4zMSIvPjxwYXRoIGNsYXNzPSJjbHMtNyIgZD0ibTIyMy41MSwxMjAuMDhzLjQ5LDEuNjIuNTMsMS43My4zMiwyLjQ0LjMyLDIuNDRsLS4wNCwxLjkxLTEuMzgsNy4xMy0zLjM5LDE5LjMxLTIuODksMTUuOTItMi45NiwxNi43Ni0yLjQ0LDEzLjE2LS45MiwyLjY1LDQuOTgsNS4xNS44NS0yLjE1LjgxLTQuMDYsMS40OC04LjMzLDIuODItMTUuNzEsMi4xNS0xMi4xMSwxLjk0LTExLjM2LDIuNzUtMTQuNzUuODgtNC42OS4yOC0yLjU4LjA3LTIuMTItLjYtMi43NS0xLjI0LTIuMzYtMS4wOS0xLjU5LTIuMDEtMS4zMS0uOTItLjI4WiIvPjxwb2x5Z29uIGNsYXNzPSJjbHMtNyIgcG9pbnRzPSI4NS42OCAyMDMuOTMgMjA0LjU1IDIwMy44NCAyMDkuMzUgMjA4LjczIDE0OC40OCAyMDguODggOTAuOTUgMjA5LjAyIDg5LjUgMjA4LjY2IDg3Ljk4IDIwNy45MiA4Ni44MiAyMDYuNTggODYuMDEgMjA1LjAzIDg1LjY4IDIwMy45MyIvPjwvc3ZnPg==";const e3=({globalFilters:r={tableName:"",filters:[]},metricItem:e,onMaximize:t,client:n,colors:a,param:i,companyTenancyType:o,renderHeaderName:s})=>{var St;const l={};if(i!=null&&i.values)for(const bt in i.values){const Qt=`${bt}_variable`;l[Qt]=i.values[bt]}const[u,c]=B.useState(""),[f,h]=B.useState(""),[v,d]=B.useState([]),[p,g]=B.useState(""),[y,m]=B.useState(""),[_,b]=B.useState([]),[w,x]=B.useState(""),[S,T]=B.useState([]),[D,M]=B.useState([]),[A,I]=B.useState({card:{isEnable:!1,baseUrl:"",dynamic:"none",route:"",routeType:"internal"},chart:{isEnable:!1,baseUrl:"",dynamic:"{{value}}",route:"/{{value}}",routeType:"internal"}}),{data:P,isLoading:E}=MT({id:e==null?void 0:e.id,clientId:n,tenancyLevel:o,rlsConditions:o==="DATABASE"?D.map(bt=>({...bt,tableName:`${n}.${bt.tableName.split(".").slice(1).join(".")}`})):D,globalFilters:o==="DATABASE"?{...r,tableName:`${n}.${r.tableName.split(".").slice(1).join(".")}`}:r,filterValues:l}),O=(St=P==null?void 0:P.externalMetricQuery)==null?void 0:St.data,[N,V]=B.useState({marginTop:20,marginBottom:20,marginLeft:5,marginRight:5}),[$,U]=B.useState({show:!0,top:0,left:0,right:0,bottom:0,position:"horizontal"}),[Y,ae]=B.useState({axis:"left",show:!1,position:"hidden"}),[H,q]=B.useState({axis:"left"}),[X,Z]=B.useState({hideSplitLines:"none",hideAxisLines:"none",barWidth:40,barRadius:0,axisLabels:"none",fontSize:14,subHeaderShow:!1,displayText:"",subHeaderFontSize:0,dateFormatter:"none",numberFormatter:"original"}),[ie,se]=B.useState({show:!1}),[te,ve]=B.useState(!1),[R,F]=B.useState([]),[G,re]=B.useState(),[ne,ee]=B.useState([]);B.useEffect(()=>{d(e==null?void 0:e.chartOptions.yAxisList),h(e==null?void 0:e.chartOptions.xAxis),g(e==null?void 0:e.chartOptions.step),m(e==null?void 0:e.chartOptions.measure),c(e==null?void 0:e.chartOptions.chartType),b(e==null?void 0:e.chartOptions.sankeyValues),x(e==null?void 0:e.chartOptions.singleValue),V(e==null?void 0:e.chartOptions.margins),U(e==null?void 0:e.chartOptions.legendSettings),ae(e==null?void 0:e.chartOptions.labelSettings),q(e!=null&&e.chartOptions.axisSettings?e==null?void 0:e.chartOptions.axisSettings:"left"),se(e!=null&&e.chartOptions.backGroundColor?e==null?void 0:e.chartOptions.backGroundColor:"false"),Z(e!=null&&e.chartOptions.customSettings?e==null?void 0:e.chartOptions.customSettings:{hideSplitLines:"none",hideAxisLines:"none",barWidth:40,barRadius:0,axisLabels:"none",fontSize:14,subHeaderShow:!1,displayText:"",subHeaderFontSize:0,dateFormatter:"none",numberFormatter:"original"}),ve(e==null?void 0:e.isEnableGroupBy),F(e==null?void 0:e.selectedGroupBy),re(e==null?void 0:e.groupBy),M((e==null?void 0:e.rlsConditions)||[]),I(e.clickActions||{card:{isEnable:!1,baseUrl:"",dynamic:"none",route:"",routeType:"internal"},chart:{isEnable:!1,baseUrl:"",dynamic:"{{value}}",route:"/{{value}}",routeType:"internal"}})},[e]),B.useEffect(()=>{T(O!=null?O:[])},[O]);const{labels:ue,datasets:De,funnelData:vt,sankeyData:rt,singleValueData:Yt}=pm({data:te?ne:S,measure:y,sankeyValues:_,singleValue:w,step:p,xAxis:f,yAxisList:v});B.useEffect(()=>{if(ne.length&&te){const bt=oS(ne[0]);h(bt.stringKeys[0]),d(bt.numberKeys)}},[ne,te]),B.useEffect(()=>{ne.length===0&&te&&R.length&&(S==null?void 0:S.length)&&(re({column:R[0]}),wa(S,[R[0]],R,ee))},[ne,te,R]),B.useEffect(()=>{(S==null?void 0:S.length)&&R.length&&te&&wa(S,[R[0]],R,ee)},[S,R,te]);const Ct=bt=>{if((G==null?void 0:G.column)&&bt&&bt!=="undefined"){if(R.lastIndexOf(G.column)!==R.length-1){const Qt=R.indexOf(G.column),Ta=G.column;re({column:R[Qt+1],parentColumn:{column:G.column,value:bt}}),wa(S==null?void 0:S.filter(or=>or[Ta]===bt),[R[Qt+1]],R,ee)}R.lastIndexOf(G.column)===R.length-1&&(re({column:R[0]}),wa(S,[R[0]],R,ee))}else re({column:R[0]}),wa(S,[R[0]],R,ee)},Qr=(bt,Qt)=>M(Ta=>Ta.map(or=>or.name===bt?{...or,value:Qt}:or));return C(Ce,{children:z("div",{className:dt.cardContainer,children:[z("div",{className:dt.listHeader,children:[z(de,{variant:"h3",styleClass:"primary",className:dt.metricName,children:[s?s(e.name):C(Le,{type:"button",variant:"custom",isDisabled:!A.card.isEnable,className:"disabled:cursor-text",onClick:()=>JB(A,e.metricId,e.id),children:e.name}),e.description&&C("span",{className:dt.metricDescription,children:e.description})]}),z("div",{className:dt.features,children:[!!D.length&&C(GS,{rlsConditions:D.filter(bt=>bt.isAddOnMetrics),onChangeFilterValue:Qr,dbName:e==null?void 0:e.companyIntegration.name,buttonClass:dt.popup,iconClass:dt.popupIcon,position:"bottom-right"}),z(Dh,{buttonClass:dt.popup,button:C(Dce,{className:dt.popupIcon}),menuClass:dt.popupMenu,position:"bottom-right",children:[z(Le,{type:"button",variant:"custom",className:dt.popupItem,onClick:()=>t({labels:ue,data:{labels:ue,datasets:De},chartType:u,funnelData:vt,sankeyData:rt,singleValueData:Yt,margins:N,legendSettings:$,labelSettings:Y,axisSettings:H,customSettings:X,backGroundColor:ie,enableSaveAs:!0,chartClickConfig:A.chart}),children:[C(Mce,{})," Enter Fullscreen"]}),C(kT,{data:S,fileName:e.name,className:`${dt.popupItem} ${dt.csvBtn}`,text:"Save As CSV"})]})]})]}),u&&z("div",{className:dt.metricData,children:[!E&&!S.length?C("div",{className:dt.noData,children:z("div",{className:dt.noDataContent,children:[C("img",{src:J4,alt:"",width:"300px",height:"300px"}),C("div",{className:dt.noDataText,children:"No Data Available"})]})}):null,E&&C("div",{className:dt.loading,children:C(zu,{style:{width:"50px",height:"50px",color:"blue"}})}),S!=null&&S.length?C(Bg,{labels:ue,data:{labels:ue,datasets:De},chartType:u,funnelData:vt,sankeyData:rt,singleValueData:Yt,margins:N,legendSettings:$,labelSettings:Y,axisSettings:H,enableSaveAs:!0,colors:a,updateGroup:Ct,isEnableGroupBy:te,customSettings:X,backGroundColor:ie,chartClickConfig:A.chart}):null]})]})})},t3=({globalFilters:r={tableName:"",filters:[]},metricItem:e,client:t,param:n,companyTenancyType:a,renderHeaderName:i})=>{var M;const o={};if(n!=null&&n.values)for(const A in n.values){const I=`${A}_variable`;o[I]=n.values[A]}const[s,l]=B.useState(""),[u,c]=B.useState(""),[f,h]=B.useState([]),[v,d]=B.useState([]),[p,g]=B.useState({card:{isEnable:!1,baseUrl:"",dynamic:"none",route:"",routeType:"internal"},chart:{isEnable:!1,baseUrl:"",dynamic:"{{value}}",route:"/{{value}}",routeType:"internal"}}),[y,m]=B.useState({hideSplitLines:"none",hideAxisLines:"none",barWidth:40,barRadius:0,axisLabels:"none",fontSize:14,subHeaderShow:!1,displayText:"",subHeaderFontSize:0,dateFormatter:"none",numberFormatter:"original"}),{data:_,isLoading:b}=MT({id:e==null?void 0:e.id,clientId:t,tenancyLevel:a,rlsConditions:a==="DATABASE"?v.map(A=>({...A,tableName:`${t}.${A.tableName.split(".").slice(1).join(".")}`})):v,globalFilters:a==="DATABASE"?{...r,tableName:`${t}.${r.tableName.split(".").slice(1).join(".")}`}:r,filterValues:o}),w=(M=_==null?void 0:_.externalMetricQuery)==null?void 0:M.data;B.useEffect(()=>{l(e==null?void 0:e.chartOptions.chartType),c(e==null?void 0:e.chartOptions.singleValue),d((e==null?void 0:e.rlsConditions)||[]),m(e!=null&&e.chartOptions.customSettings?e==null?void 0:e.chartOptions.customSettings:{hideSplitLines:"none",hideAxisLines:"none",barWidth:40,barRadius:0,axisLabels:"none",fontSize:14,subHeaderShow:!1,displayText:"",subHeaderFontSize:0,dateFormatter:"none",numberFormatter:"original"}),g(e.clickActions||{card:{isEnable:!1,baseUrl:"",dynamic:"none",route:"",routeType:"internal"},chart:{isEnable:!1,baseUrl:"",dynamic:"{{value}}",route:"/{{value}}",routeType:"internal"}})},[e]),B.useEffect(()=>{h(w!=null?w:[])},[w]);const x=f,S=x!=null&&x.length?x==null?void 0:x.map(A=>A[u]):"",T=[{value:S[0]}],D=(A,I)=>d(P=>P.map(E=>E.name===A?{...E,value:I}:E));return C(Ce,{children:z("div",{className:dt.cardContainer,children:[z("div",{className:dt.listHeader,children:[z(de,{variant:"h3",styleClass:"primary",className:dt.metricName,children:[i?i(e.name):C(Le,{type:"button",variant:"custom",isDisabled:!p.card.isEnable,className:"disabled:cursor-text",onClick:()=>JB(p,e.metricId,e.id),children:e.name}),e.description&&C("span",{className:dt.metricDescription,children:e.description})]}),C("div",{className:dt.features,children:!!(v!=null&&v.length)&&C(GS,{rlsConditions:v.filter(A=>A.isAddOnMetrics),onChangeFilterValue:D,dbName:e==null?void 0:e.companyIntegration.name,buttonClass:dt.popup,iconClass:dt.popupIcon,position:"bottom-right"})})]}),s&&C("div",{className:`${dt.metricData} ${dt.singleValueData}`,children:b?C(zu,{style:{width:"50px",height:"50px",color:"blue"}}):C(Ce,{children:S.length?C(e4,{data:T,customSettings:y,chartClickConfig:p.chart}):C("div",{className:dt.noData,children:z("div",{className:dt.noDataContent,children:[C("img",{src:J4,alt:"",width:"300px",height:"300px"}),C("div",{className:dt.noDataText,children:"No Data Available"})]})})})})]})})};var Yfe={fullscreen:"_fullscreen_1wo1t_1"},Hu={modal:"_modal_ul4ir_1",popup:"_popup_ul4ir_9",header:"_header_ul4ir_17",headerTitle:"_headerTitle_ul4ir_25",content:"_content_ul4ir_33",footer:"_footer_ul4ir_41"};const qfe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M13.46 12L19 17.54V19h-1.46L12 13.46L6.46 19H5v-1.46L10.54 12L5 6.46V5h1.46L12 10.54L17.54 5H19v1.46L13.46 12Z"})}),Ai=({children:r,isOpen:e,onClose:t,headerTitle:n,customHeader:a,icon:i})=>{const[o,s]=B.useState();return B.useEffect(()=>{const l=document.getElementById("databrain-root-portal")||document.createElement("div");l.setAttribute("id","databrain-root-portal"),document.body.appendChild(l),s(l)},[]),e?Oh.default.createPortal(C("div",{className:Hu.modal,onClick:t,children:z("div",{className:Hu.popup,onClick:l=>{l.stopPropagation()},children:[C("section",{className:Hu.header,children:a||z(Ce,{children:[z("span",{className:Hu.headerTitle,children:[i,n]}),C(Le,{variant:"custom",type:"button",onClick:t,children:C(qfe,{})})]})}),C("section",{className:Hu.content,children:r})]})}),o):null},Gu=({children:r,className:e})=>C("section",{className:`${Hu.footer} ${e}`,children:r}),WS=({isShow:r,onCancel:e,chart:t})=>C(Ai,{isOpen:r,onClose:e,headerTitle:"Chart Preview",children:C("div",{className:Yfe.fullscreen,children:t&&C(Bg,{labels:t.labels,data:t.data,chartType:t.chartType,funnelData:t.funnelData,sankeyData:t.sankeyData,singleValueData:t.singleValueData,margins:t.margins,legendSettings:t.legendSettings,labelSettings:t.labelSettings,axisSettings:t.axisSettings,backGroundColor:t.backGroundColor,enableSaveAs:!0,customSettings:t.customSettings,chartClickConfig:{isEnable:!1,baseUrl:"",dynamic:"{{value}}",route:"/{{value}}",routeType:"internal"}})})}),r3=Cy.exports.WidthProvider(Cy.exports.Responsive),n3=({chartColors:r,globalFilters:e,client:t,isLiveMode:n,externalDashboardMetrics:a,isMetricListLoading:i,breakpoint:o,layoutCols:s,params:l,companyTenancyType:u="TABLE"})=>{const[c,f]=B.useState(!1),[h,v]=B.useState(),d=a==null?void 0:a.map(m=>m.externalMetric),p=d==null?void 0:d.filter(m=>!m.isCreatedByClient),g=d==null?void 0:d.filter(m=>m.isCreatedByClient&&m.clientId===t),y=[...p||[],...g||[]].filter(m=>n?m.isLive===n:!0);return C(Ce,{children:y.length?z(Ce,{children:[C("div",{className:oc["MetricList-container"],children:C(r3,{layouts:{lg:y.map(({resizeAttributes:m,id:_})=>({i:_,w:m.width,h:m.height,x:m.xAxis,y:m.yAxis,minW:3,minH:6,maxH:15}))},isResizable:!1,isDraggable:!1,isDroppable:!1,rowHeight:30,width:1200,breakpoints:o!=null?o:{lg:1200,md:996,sm:768,xs:480,xxs:0},cols:s!=null?s:{lg:12,md:10,sm:6,xs:4,xxs:2},children:y.map(m=>C("div",{className:oc["MetricList-wrapper"],children:m.chartOptions.chartType==="single value"?C(t3,{metricItem:m,client:t,globalFilters:e,param:l==null?void 0:l.find(_=>_.metricId===m.metricId),companyTenancyType:u}):C(e3,{metricItem:m,onMaximize:_=>{v(_),f(!0)},client:t,colors:r,globalFilters:e,param:l==null?void 0:l.find(_=>_.metricId===m.metricId),companyTenancyType:u})},m.id))})}),C(WS,{onCancel:()=>f(!1),isShow:c,chart:h})]}):C(Ce,{children:i?C("div",{className:oc["alt-container"],children:C(zu,{style:{width:"50px",height:"50px",color:"blue"}})}):C("div",{className:oc["noMetric-container"],children:C("div",{className:oc["noMetric-wrapper"],children:C(de,{variant:"h2",styleClass:"primary",children:"No metrics created yet"})})})})})};var Wu={"header-container":"_header-container_pimqu_1","btn-container":"_btn-container_pimqu_5","back-btn":"_back-btn_pimqu_9","sql-btn":"_sql-btn_pimqu_13","save-btn":"_save-btn_pimqu_17"};const Zfe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m11 5l-7 7l7 7m-7-7h16"})}),Xfe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:z("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[C("path",{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"}),C("path",{d:"M17 21v-8H7v8M7 3v5h8"})]})}),Qfe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"m8 18l-6-6l6-6l1.425 1.425l-4.6 4.6L9.4 16.6Zm8 0l-1.425-1.425l4.6-4.6L14.6 7.4L16 6l6 6Z"})}),a3=({setShowMetricCreateModal:r,isDisableSaveBtn:e,Heading:t,isDisableSqlBtn:n,setShowSaveMetricModal:a,setShowSqlModal:i})=>z("div",{className:Wu["header-container"],children:[z("div",{className:Wu["btn-container"],children:[C(Le,{type:"button",variant:"custom",size:"default",onClick:()=>r(!1),className:Wu["back-btn"],children:C(Zfe,{})}),C(de,{variant:"h1",styleClass:"primary",children:t})]}),z("div",{className:Wu["btn-container"],children:[z(Le,{type:"button",variant:"custom",className:Wu["sql-btn"],onClick:()=>i(!0),isDisabled:n,children:[C(Qfe,{}),"SQL"]}),z(Le,{type:"submit",variant:"primary",className:Wu["save-btn"],isDisabled:e,onClick:()=>a(!0),children:[C(Xfe,{}),"Save to Dashboard"]})]})]});var ny={"create-btn":"_create-btn_6ovk2_1","modal-container":"_modal-container_6ovk2_5","query-modal":"_query-modal_6ovk2_9",floatingCreateButton:"_floatingCreateButton_6ovk2_13",floatingCreateButtonIcon:"_floatingCreateButtonIcon_6ovk2_17"},Mh={container:"_container_32zer_1",header:"_header_32zer_5",wrapper:"_wrapper_32zer_9","col-container":"_col-container_32zer_13",column:"_column_32zer_17"};const Kfe=r=>C("svg",{viewBox:"0 0 21 21",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"m13.5 5.5l-2 10m-2-10l-2 10m-1-7h9m-10 4h9"})}),Jfe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M8 2h8a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2m0 8v4h8v-4H8m0 6v4h8v-4H8M8 4v4h8V4H8Z"})}),ehe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M9.62 12L12 5.67L14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2Z"})}),the=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M15 20v-2h3V6h-3V4h5v16ZM4 20V4h5v2H6v12h3v2Z"})}),rhe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M5 22q-.825 0-1.413-.587Q3 20.825 3 20V6q0-.825.587-1.412Q4.175 4 5 4h1V2h2v2h8V2h2v2h1q.825 0 1.413.588Q21 5.175 21 6v14q0 .825-.587 1.413Q19.825 22 19 22Zm0-2h14V10H5v10ZM5 8h14V6H5Zm0 0V6v2Z"})}),nhe=r=>z("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...r,children:[C("path",{fill:"currentColor",d:"M23 23a7 7 0 1 1 7-7a7.008 7.008 0 0 1-7 7Zm0-12a5 5 0 1 0 5 5a5.005 5.005 0 0 0-5-5Z"}),C("circle",{cx:9,cy:16,r:7,fill:"currentColor"})]}),US=({datatype:r})=>ym.includes(r.toLowerCase())?C(Kfe,{}):mm.includes(r.toLowerCase())||r.toLowerCase().includes("char")?C(ehe,{}):ET.includes(r.toLowerCase())?C(the,{}):_m.includes(r.toLowerCase())?C(rhe,{}):bm.includes(r.toLowerCase())?C(nhe,{}):C(Jfe,{}),ahe=r=>C("svg",{viewBox:"0 0 21 21",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"m17.498 15.498l-.01-10a2 2 0 0 0-2-1.998h-10a2 2 0 0 0-1.995 1.85l-.006.152l.01 10a2 2 0 0 0 2 1.998h10a2 2 0 0 0 1.995-1.85zM7.5 3.5v13.817m10-9.817h-14"})}),i3=({setselectTable:r,selectTable:e,tableList:t,columnList:n})=>z("div",{className:Mh.container,children:[C("div",{className:Mh.header,children:C(Nr,{onChange:r,selectedOption:e,options:t,Icon:ahe,labelVariant:"static"})}),z("div",{className:Mh.wrapper,children:[C(de,{variant:"h1",styleClass:"primary",children:"Columns"}),C("div",{className:Mh["col-container"],children:n.map(({as:a,datatype:i})=>z("div",{className:Mh.column,children:[C(US,{datatype:i}),C(de,{variant:"p",styleClass:"font-14",children:a})]},a))})]})]});var ze={container:"_container_1cslw_1",header:"_header_1cslw_7",headerText:"_headerText_1cslw_13",tab:"_tab_1cslw_19",tabText:"_tabText_1cslw_25",tabHeading:"_tabHeading_1cslw_31",form:"_form_1cslw_37",inputWrapper:"_inputWrapper_1cslw_43",input:"_input_1cslw_43",selectWrapper:"_selectWrapper_1cslw_55",select:"_select_1cslw_55",label:"_label_1cslw_67",series:"_series_1cslw_73",legendWrapper:"_legendWrapper_1cslw_79",seriesWrapper:"_seriesWrapper_1cslw_85",valueLabelWrapper:"_valueLabelWrapper_1cslw_91",singleCheckBox:"_singleCheckBox_1cslw_97"},jS={tab:"_tab_ksqsk_1",button:"_button_ksqsk_7",activeTab:"_activeTab_ksqsk_15"};const YS=({options:r,activeTab:e,setActiveTab:t,className:n="",tabText:a=""})=>C("div",{className:`${jS.tab} ${n}`,children:r.map(i=>C(Le,{variant:"custom",type:"button",className:`${jS.button} ${e===i&&jS.activeTab} ${a}`,onClick:()=>t(i),children:i},i))});var o3={container:"_container_1v094_1",tooltip:"_tooltip_1v094_7"};const ihe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:z("g",{fill:"none",stroke:"currentColor",strokeWidth:2,children:[C("circle",{cx:12,cy:12,r:10}),C("path",{strokeLinecap:"round",d:"M12 7h.01"}),C("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 11h2v5m-2 0h4"})]})}),s3=({children:r,content:e,className:t=""})=>z("span",{className:`${o3.container} ${t}`,children:[e,C("span",{className:o3.tooltip,children:r})]}),Li=({children:r,className:e})=>C(s3,{className:e,content:C(ihe,{color:"#182C60"}),children:r}),ohe=({setMargins:r,margins:e,legendSettings:t,setLegendSettings:n,labelSettings:a,setLabelSettings:i,axisSettings:o,setAxisSettings:s,chartType:l,setChartType:u,customSettings:c,setCustomSettings:f,backGroundColor:h,setBackGroundColor:v})=>{const d=["Margins","Legend","Custom"],p=["Margins","Custom"],[g,y]=B.useState("Margins");return z("div",{className:ze.container,children:[C("div",{className:"h-[10%]",children:C(YS,{options:l!=="single value"?d:p,activeTab:g,setActiveTab:y,className:ze.tab,tabText:ze.tabText})}),z("form",{className:ze.form,children:[g==="Margins"&&z("div",{className:ze.inputWrapper,children:[C("div",{className:ze.input,children:C(It,{type:"number",label:"Top",onChange:m=>r(_=>({..._,marginTop:parseInt(m.target.value,10)})),defaultValue:e.marginTop})}),C("div",{className:ze.input,children:C(It,{type:"number",label:"Bottom",onChange:m=>r(_=>({..._,marginBottom:parseInt(m.target.value,10)})),defaultValue:e.marginBottom})}),C("div",{className:ze.input,children:C(It,{type:"number",label:"Left",defaultValue:e.marginLeft,onChange:m=>r(_=>({..._,marginLeft:parseInt(m.target.value,10)}))})}),C("div",{className:ze.input,children:C(It,{type:"number",label:"Right",defaultValue:e.marginRight,onChange:m=>r(_=>({..._,marginRight:parseInt(m.target.value,10)}))})})]}),g==="Legend"&&z("div",{className:ze.legendWrapper,children:[C(It,{type:"checkbox",label:"Show Legend",checked:t.show,onChange:m=>n(_=>({..._,show:m.target.checked}))}),z("div",{children:[C(de,{variant:"h1",styleClass:"primary",children:"Position"}),z("div",{className:ze.inputWrapper,children:[C("div",{className:ze.input,children:C(It,{type:"number",label:"Top",defaultValue:t.top,onChange:m=>n(_=>({..._,top:parseInt(m.target.value,10)}))})}),C("div",{className:ze.input,children:C(It,{type:"number",label:"Bottom",defaultValue:t.bottom,onChange:m=>n(_=>({..._,bottom:parseInt(m.target.value,10)}))})}),C("div",{className:ze.input,children:C(It,{type:"number",label:"Left",defaultValue:t.left,onChange:m=>n(_=>({..._,left:parseInt(m.target.value,10)}))})}),C("div",{className:ze.input,children:C(It,{type:"number",label:"Right",defaultValue:t.right,onChange:m=>n(_=>({..._,right:parseInt(m.target.value,10)}))})})]})]}),z("div",{className:ze.selectWrapper,children:[C(de,{variant:"h1",styleClass:"primary",children:"Appearance"}),C("div",{className:ze.select,children:C(Zt,{value:t.position,options:[{label:"Horizontal",value:"horizontal"},{label:"Vertical",value:"vertical"}],onChange:m=>n(_=>({..._,position:m}))})})]})]}),g==="Custom"&&z("div",{className:ze.series,children:[C(de,{styleClass:"font-14c",variant:"p",className:ze.tabHeading,children:"Chart preferences"}),l!=="single value"&&z(Ce,{children:[z("div",{className:ze.seriesWrapper,children:[C(de,{variant:"h1",styleClass:"primary",children:"Value labels"}),C("div",{className:ze.valueLabelWrapper,children:C(Zt,{value:a.position,options:[{label:"Hidden",value:"hidden"},{label:"Top",value:"top"},{label:"Bottom",value:"bottom"},{label:"Right",value:"right"},{label:"Left",value:"left"},{label:"Inside",value:"inside"}],onChange:m=>i(m==="hidden"?_=>({..._,show:!1,position:m}):_=>({..._,show:!0,position:m}))})})]}),l!=="pie"&&l!=="doughnut"&&l!=="funnel"&&l!=="gauge"&&l!=="sankey"&&l!=="singleValue"&&l!=="table"&&z(Ce,{children:[z("div",{className:ze.seriesWrapper,children:[C(de,{variant:"h1",styleClass:"font-14",className:"font-medium",children:"Axis"}),C("div",{className:ze.select,children:C(Zt,{value:o.axis,options:[{label:"Left",value:"left"},{label:"Right",value:"right"}],onChange:m=>s(_=>({..._,axis:m}))})})]}),l==="bar"||l==="row"||l==="stack"||l==="histogram"?C(It,{type:"checkbox",label:"Show Bar Background",checked:h.show,onChange:m=>v(_=>({..._,show:m.target.checked}))}):null,z("div",{className:ze.seriesWrapper,children:[z(de,{variant:"h1",styleClass:"font-14",className:ze.label,children:["Hide Axis labels",C(Li,{children:"Axis labels represents the x and y axis values"})]}),C("div",{className:ze.select,children:C(Zt,{value:c.axisLabels,options:[{label:"Hide X-axis labels",value:"x"},{label:"Hide Y-axis labels",value:"y"},{label:"Hide both X and Y(axis) labels",value:"both"},{label:"None",value:"none"}],onChange:m=>f(_=>({..._,axisLabels:m}))})})]}),z("div",{className:ze.seriesWrapper,children:[z(de,{variant:"h1",styleClass:"font-14",className:ze.label,children:["Hide Splitlines",C(Li,{children:"Splitline is the reference lines that run along the directional x and y axis which act as reference markers"})]}),C("div",{className:ze.select,children:C(Zt,{value:c.hideSplitLines,options:[{label:"Hide horizontal splitline",value:"horizontal"},{label:"Hide vertical splitline",value:"vertical"},{label:"Hide both splitline",value:"both"},{label:"None",value:"none"}],onChange:m=>f(_=>({..._,hideSplitLines:m}))})})]}),z("div",{className:ze.seriesWrapper,children:[z(de,{variant:"h1",styleClass:"font-14",className:ze.label,children:["Hide Axis Line",C(Li,{children:"The x-axis and y-axis lines act as a graph base from which the chart starts"})]}),C("div",{className:ze.select,children:C(Zt,{value:c.hideAxisLines,options:[{label:"Hide X-axis line",value:"x"},{label:"Hide Y-axis line",value:"y"},{label:"Hide both X and Y(axis) lines",value:"both"},{label:"None",value:"none"}],onChange:m=>f(_=>({..._,hideAxisLines:m}))})})]}),l==="bar"||l==="row"||l==="stack"?z(Ce,{children:[z("div",{className:ze.seriesWrapper,children:[z(de,{variant:"h1",styleClass:"font-14",className:ze.label,children:["Modify Bar width",C(Li,{children:"The width of each individual bar rectangle of the graph"})]}),C(It,{type:"number",label:"",onChange:m=>f(_=>({..._,barWidth:parseInt(m.target.value,10)})),defaultValue:c.barWidth})]}),z("div",{className:ze.seriesWrapper,children:[z(de,{variant:"h1",styleClass:"font-14",className:ze.label,children:["Modify Bar radius",C(Li,{children:"The property that rounds the corners of the element's outer border edge"})]}),C(It,{type:"number",label:"",onChange:m=>f(_=>({..._,barRadius:parseInt(m.target.value,10)})),defaultValue:c.barRadius})]})]}):null]})]}),l==="single value"&&z(Ce,{children:[z("div",{className:ze.seriesWrapper,children:[C(de,{variant:"h1",styleClass:"font-14",className:ze.label,children:"Single Value Chart Font Size"}),C(It,{type:"number",label:"",onChange:m=>f(_=>({..._,fontSize:parseInt(m.target.value,10)})),defaultValue:c.fontSize})]}),z("div",{className:ze.singleCheckBox,children:[C(It,{type:"checkbox",label:"",checked:c.subHeaderShow,onChange:m=>f(_=>({..._,subHeaderShow:m.target.checked}))}),z(de,{variant:"h1",styleClass:"font-14",className:ze.label,children:["Single Value Sub-Header",C(Li,{children:"Single Value Sub-Header"})]})]}),c.subHeaderShow&&z(Ce,{children:[z("div",{className:ze.seriesWrapper,children:[C(de,{variant:"h1",styleClass:"font-14",className:ze.label,children:"Sub-Header Display Text"}),C(It,{type:"text",label:"",placeholder:"Enter the text to display",onChange:m=>f(_=>({..._,displayText:m.target.value})),defaultValue:c.displayText})]}),z("div",{className:ze.seriesWrapper,children:[C(de,{variant:"h1",styleClass:"font-14",className:ze.label,children:"Sub-Header Font Size"}),C(It,{type:"number",label:"",onChange:m=>f(_=>({..._,subHeaderFontSize:parseInt(m.target.value,10)})),defaultValue:c.subHeaderFontSize})]})]}),z("div",{className:ze.seriesWrapper,children:[C(de,{variant:"h1",styleClass:"primary",children:"Date formatting"}),C("div",{className:ze.valueLabelWrapper,children:C(Zt,{value:c.dateFormatter,options:[{label:"None",value:"none"},{label:"dd-mm-yyyy",value:"dd-mm-yyyy"},{label:"mm-dd-yyyy",value:"mm-dd-yyyy"},{label:"yyyy-mm-dd",value:"yyyy-mm-dd"},{label:"dd/mm/yyyy",value:"dd/mm/yyyy"},{label:"mm/dd/yyyy",value:"mm/dd/yyyy"},{label:"yyyy/mm/dd",value:"yyyy/mm/dd"},{label:"hh:mm:ss",value:"hh:mm:ss"}],onChange:m=>f(_=>({..._,dateFormatter:m}))})})]}),z("div",{className:ze.seriesWrapper,children:[C(de,{variant:"h1",styleClass:"primary",children:"Number formatting"}),C("div",{className:ze.valueLabelWrapper,children:C(Zt,{value:c.numberFormatter,options:[{label:"Original value",value:"original"},{label:"Adaptive formatting",value:"adaptive"},{label:",d (12345.432 => 12,345)",value:"d"},{label:".1s (12345.432 => 10k)",value:"1s"},{label:".3s (12345.432 => 12.3k)",value:"3s"},{label:",.1% (12345.432 => 1,234,543.2%)",value:"1%"},{label:",.2% (12345.432 => 1234543.20%)",value:"2%"},{label:",.3% (12345.432 => 1234543.200%)",value:"3%"},{label:".4r (12345.432 => 12350)",value:"4r"},{label:",.1f (12345.432 => 12,345.4)",value:"1f"},{label:",.2f (12345.432 => 12,345.43)",value:"2f"},{label:",.3f (12345.432 => 12,345.432)",value:"3f"},{label:"+, (12345.432 => +12,345.432)",value:"+"},{label:"$,.2f (12345.432 => $12,345.43)",value:"$"},{label:"Duration in ms (66000 => 1m 6s)",value:"ms1"},{label:"Duration in ms (1.40008 => 1ms 400\u03BCs 80ns)",value:"ms2"}],onChange:m=>f(_=>({..._,numberFormatter:m}))})})]})]})]})]})]})};var Zr={chartButtonContainer:"_chartButtonContainer_mrrhu_1","chartButton-header":"_chartButton-header_mrrhu_7","settingsTab-header-control":"_settingsTab-header-control_mrrhu_15",tabContainer:"_tabContainer_mrrhu_23",tab:"_tab_mrrhu_23",tabText:"_tabText_mrrhu_39",chartButtons:"_chartButtons_mrrhu_47",chartButton:"_chartButton_mrrhu_1",chartButtonSelected:"_chartButtonSelected_mrrhu_63",chartTypesButton:"_chartTypesButton_mrrhu_71",button:"_button_mrrhu_79",propertyButton:"_propertyButton_mrrhu_87",settings:"_settings_mrrhu_15",crossIcon:"_crossIcon_mrrhu_103"};const ay=({value:r,options:e,control:t})=>{const[n,a]=B.useState("");return C(j4,{control:t,label:"",options:e,onChange:a,name:n||r})};var it={chartOptions:"_chartOptions_yt3j5_1",chartOption:"_chartOption_yt3j5_1",chartOptionBtn:"_chartOptionBtn_yt3j5_13",chartOptionText:"_chartOptionText_yt3j5_19",container:"_container_yt3j5_25",field:"_field_yt3j5_31",fieldText:"_fieldText_yt3j5_37",doneBtn:"_doneBtn_yt3j5_43",measureText:"_measureText_yt3j5_49",singleValueMeasure:"_singleValueMeasure_yt3j5_55",plus:"_plus_yt3j5_61",plusIcon:"_plusIcon_yt3j5_67",form:"_form_yt3j5_73",chartType:"_chartType_yt3j5_79"};const qS=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:z("g",{fill:"none",stroke:"currentColor",strokeWidth:2,children:[C("path",{strokeLinecap:"round",d:"M12 8v4m0 0v4m0-4h4m-4 0H8"}),C("circle",{cx:12,cy:12,r:10})]})}),l3=({data:r,setXAxis:e,xAxis:t,setYAxisList:n,chartType:a,setStep:i,setMeasure:o,step:s,measure:l,setSankeyValues:u,setSettingsShow:c,singleValue:f,setSingleValue:h})=>{const v=r?Object.keys(r[0]).map(O=>({value:O,label:O})):[];v.push({value:"NONE",label:"NONE"});const[d,p]=B.useState([v==null?void 0:v[0]]),[g,y]=B.useState(""),[m,_]=B.useState(""),[b,w]=B.useState(""),[x,S]=B.useState(1),[T,D]=B.useState("show"),M=()=>{if(x<(v==null?void 0:v.length)){const O=[...d,v[x]];p(O),x===v.length-1&&D("hidden")}S(x+1)},{handleSubmit:A,control:I}=wS(),P=O=>{const N=Object.values(O);n(N.filter(V=>V!==void 0&&V!=="NONE")),c(!1)},E=()=>{u([g,m,b])};return a===BT?z("div",{className:it.container,children:[z("div",{className:it.field,children:[C(de,{styleClass:"font-14",className:it.fieldText,variant:"h4",children:"Source"}),C(Zt,{label:"",options:v,onChange:y,value:g})]}),z("div",{className:it.field,children:[C(de,{styleClass:"font-14",className:it.fieldText,variant:"h4",children:"Target"}),C(Zt,{label:"",options:v,onChange:_,value:m})]}),z("div",{children:[C(de,{styleClass:"font-14",className:it.fieldText,variant:"h4",children:"Value"}),C(Zt,{label:"",options:v,onChange:w,value:b})]}),C(Le,{type:"submit",variant:"primary",size:"default",className:it.doneBtn,onClick:()=>{E(),c(!1)},children:"Done"})]}):a===wm?C(Ce,{children:!!(a===wm||Sm)&&z("div",{className:it.container,children:[C(de,{styleClass:"font-14",className:it.field,variant:"h4",children:"Dimension"}),C(Zt,{label:"",options:v,onChange:e,value:t}),C(de,{styleClass:"font-14",className:it.measureText,variant:"h4",children:"Measure"}),C("div",{className:it.plus,children:C(qS,{className:`${it.plusIcon} ${T}`,onClick:()=>M()})}),z("form",{onSubmit:A(P),className:it.form,children:[d.map(O=>C(ay,{value:O.value,options:v,control:I},O.value)),C(Le,{type:"submit",variant:"primary",size:"default",className:it.doneBtn,children:"Done"})]})]})}):a===Sm?z(Ce,{children:["(",z("div",{className:it.container,children:[C(de,{styleClass:"font-14",className:it.field,variant:"h4",children:"Dimension"}),C(Zt,{label:"",options:v,onChange:e,value:t}),C(de,{styleClass:"font-14",className:it.measureText,variant:"h4",children:"Measure"}),C("div",{className:it.plus,children:C(qS,{className:`${it.plusIcon} ${T}`,onClick:()=>M()})}),z("form",{onSubmit:A(P),className:it.form,children:[d.map(O=>C(ay,{value:O.value,options:v,control:I},O.value)),C(Le,{type:"submit",variant:"primary",size:"default",className:it.doneBtn,children:"Done"})]})]}),")"]}):a==="single value"?z(Ce,{children:[C(de,{styleClass:"font-14",className:`${it.singleValueMeasure}`,variant:"h4",children:"Measure"}),C(Zt,{label:"",options:v,onChange:h,value:f}),C(Le,{type:"button",variant:"primary",size:"default",className:it.doneBtn,onClick:()=>c(!1),children:"Done"})]}):C(Ce,{children:z("div",{className:it.container,children:[a!=="gauge"&&a!==zT&&a!=="table"&&z(Ce,{children:[z(de,{styleClass:"font-14",className:it.field,variant:"h4",children:[a!=="funnel"&&a!=="row"&&"X-axis",a==="funnel"&&"Step",a==="row"&&"Y-axis"]}),a==="funnel"?C(Zt,{label:"",options:v,onChange:i,value:s}):C(Zt,{label:"",options:v,onChange:e,value:t})]}),z("div",{className:`${it.chartType}
324
+ ${a!=="gauge"?it.measureText:""}`,children:[z(de,{styleClass:"font-14",variant:"h1",className:it.field,children:[a!=="funnel"&&a!=="gauge"&&a!=="row"&&a!=="boxplot"&&a!=="table"&&"Y-axis",(a==="funnel"||a==="gauge"||a==="boxplot"||a==="table")&&"Measure",a==="row"&&"X-axis"]}),a!=="funnel"&&a!=="gauge"&&C(qS,{className:`${it.plusIcon} ${T}`,onClick:()=>M()})]}),z("form",{onSubmit:A(P),className:it.form,children:[a==="funnel"||a==="gauge"?C(Zt,{label:"",options:v,onChange:o,value:l}):d.map(O=>C(ay,{value:O.value,options:v,control:I},O.value)),C(Le,{type:"submit",variant:"primary",size:"default",className:it.doneBtn,children:"Done"})]})]})})},she=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"m3.5 18.5l6-6l4 4L22 6.92L20.59 5.5l-7.09 8l-4-4L2 17l1.5 1.5Z"})}),lhe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M3 22V8h4v14H3m7 0V2h4v20h-4m7 0v-8h4v8h-4Z"})}),uhe=r=>z("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:[C("path",{fill:"currentColor",d:"M4 21h17v-2H5V3H3v17a1 1 0 0 0 1 1z"}),C("circle",{cx:10,cy:8,r:2,fill:"currentColor"}),C("circle",{cx:18,cy:12,r:2,fill:"currentColor"}),C("circle",{cx:11.5,cy:13.5,r:1.5,fill:"currentColor"}),C("circle",{cx:16.5,cy:6.5,r:1.5,fill:"currentColor"})]}),che=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M4 22H2V2h2v20Zm11-1H5v-3h10v3Zm3-5H5v-3h13v3Zm3-5H5V8h16v3Zm-8-5H5V3h8v3Z"})}),fhe=r=>C("svg",{viewBox:"0 0 1024 1024",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-616-64h536c4.4 0 8-3.6 8-8V284c0-7.2-8.7-10.7-13.7-5.7L592 488.6l-125.4-124a8.03 8.03 0 0 0-11.3 0l-189 189.6a7.87 7.87 0 0 0-2.3 5.6V720c0 4.4 3.6 8 8 8z"})}),hhe=r=>z("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...r,children:[C("path",{fill:"currentColor",d:"M27 28V16h-8v12h-4V12H7v16H4V2H2v26a2 2 0 0 0 2 2h26v-2Zm-14 0H9V14h4Zm12 0h-4V18h4Z"}),C("path",{fill:"currentColor",d:"M22.786 14a1.988 1.988 0 0 1-1.18-.387L11.205 5.987L8.242 10L6.637 8.806l2.982-4a1.998 1.998 0 0 1 2.749-.446L22.789 12l3.604-4.86L28 8.33l-3.604 4.862a2.001 2.001 0 0 1-1.61.808Z"})]}),vhe=r=>C("svg",{viewBox:"0 0 16 16",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M7.5 1.018a7 7 0 0 0-4.79 11.566L7.5 7.793V1.018zm1 0V7.5h6.482A7.001 7.001 0 0 0 8.5 1.018zM14.982 8.5H8.207l-4.79 4.79A7 7 0 0 0 14.982 8.5zM0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8z"})}),dhe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M12.051 21.949a10 10 0 0 1-1-19.949v4.04a5.994 5.994 0 1 0 6.91 6.909H22a10.015 10.015 0 0 1-9.95 9Zm9.95-11h-4.04a5.993 5.993 0 0 0-4.91-4.909V2a10.022 10.022 0 0 1 8.95 8.948v.001Z"})}),phe=r=>C("svg",{viewBox:"0 0 16 16",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M1.5 1.5A.5.5 0 0 1 2 1h12a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-.128.334L10 8.692V13.5a.5.5 0 0 1-.342.474l-3 1A.5.5 0 0 1 6 14.5V8.692L1.628 3.834A.5.5 0 0 1 1.5 3.5v-2zm1 .5v1.308l4.372 4.858A.5.5 0 0 1 7 8.5v5.306l2-.666V8.5a.5.5 0 0 1 .128-.334L13.5 3.308V2h-11z"})}),ghe=r=>z("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...r,children:[C("path",{fill:"currentColor",d:"M28 28V18h-2v10h-4V4h-2v24H10V14H8v14H4V2H2v26a2.002 2.002 0 0 0 2 2h26v-2Z"}),C("path",{fill:"currentColor",d:"M14 4h2v14h-2z"})]}),yhe=r=>z("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...r,children:[C("path",{fill:"currentColor",d:"M30 30H4a2 2 0 0 1-2-2V2h2v26h26Z"}),C("path",{fill:"currentColor",d:"M10 16a2 2 0 1 1-2 2a2 2 0 0 1 2-2m0-2a4 4 0 1 0 4 4a4 4 0 0 0-4-4zm11-8a4 4 0 1 1-4 4a4 4 0 0 1 4-4m0-2a6 6 0 1 0 6 6a6 6 0 0 0-6-6zm3.5 17a1.5 1.5 0 1 1-1.5 1.5a1.5 1.5 0 0 1 1.5-1.5m0-2a3.5 3.5 0 1 0 3.5 3.5a3.5 3.5 0 0 0-3.5-3.5z"})]}),mhe=r=>C("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M22 10V6H10v6H4V2H2v26a2.002 2.002 0 0 0 2 2h26V10Zm-10 4V8h8v4h8v10h-6v-6H12v6H4v-8ZM4 28v-4h10v-6h6v6h8v4Z"})}),_he=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M3 4h1v9h3V7h5v4h4v4h4v6H3V4m13 12v4h3v-4h-3m-4-4v8h3v-8h-3M8 8v12h3V8H8m-4 6v6h3v-6H4Z"})}),bhe=r=>C("svg",{viewBox:"0 0 20 20",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M8.127 13.6c-.689 1.197-.225 2.18.732 2.732c.956.553 2.041.465 2.732-.732c.689-1.195 5.047-11.865 4.668-12.084c-.379-.219-7.442 8.888-8.132 10.084zM10 6c.438 0 .864.037 1.281.109c.438-.549.928-1.154 1.405-1.728A9.664 9.664 0 0 0 10 4C4.393 4 0 8.729 0 14.766c0 .371.016.742.049 1.103c.049.551.54.955 1.084.908c.551-.051.957-.535.908-1.086A10.462 10.462 0 0 1 2 14.766C2 9.85 5.514 6 10 6zm7.219 1.25c-.279.75-.574 1.514-.834 2.174C17.4 10.894 18 12.738 18 14.766c0 .316-.015.635-.043.943a1.001 1.001 0 0 0 1.992.182c.033-.37.051-.748.051-1.125c0-2.954-1.053-5.59-2.781-7.516z"})}),xhe=r=>C("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M30 2H2v14h6.111a7.036 7.036 0 0 1 3.13.74L15.764 19l-4.522 2.26a7.036 7.036 0 0 1-3.13.74H2v8h7.223a9.045 9.045 0 0 0 4.025-.95l8.622-4.31A7.036 7.036 0 0 1 25 24h5V14h-5a7.036 7.036 0 0 1-3.13-.74L15.348 10H30ZM8 4h16v4H8ZM4 4h2v10H4Zm0 20h2v4H4Zm16.975-1.05l-8.622 4.31a7.036 7.036 0 0 1-3.13.74H8v-4h.111a9.045 9.045 0 0 0 4.025-.95L18 20.118l1.864.932a9.045 9.045 0 0 0 4.025.95H24v.058a9.052 9.052 0 0 0-3.025.892ZM28 22h-2v-6h2ZM12.354 10.74l8.621 4.31a9.052 9.052 0 0 0 3.025.89V20h-.111a7.036 7.036 0 0 1-3.13-.74l-8.622-4.31A9.045 9.045 0 0 0 8.11 14H8v-4h1.223a7.036 7.036 0 0 1 3.13.74ZM28 8h-2V4h2Z"})}),whe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M22 21H2V3h2v16h2v-2h4v2h2v-3h4v3h2v-2h4v4m-4-7h4v2h-4v-2m-6-8h4v3h-4V6m4 9h-4v-5h4v5M6 10h4v2H6v-2m4 6H6v-3h4v3Z"})}),She=r=>C("svg",{viewBox:"0 0 16 16",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M2.873 11.297V4.142H1.699L0 5.379v1.137l1.64-1.18h.06v5.961h1.174Zm3.213-5.09v-.063c0-.618.44-1.169 1.196-1.169c.676 0 1.174.44 1.174 1.106c0 .624-.42 1.101-.807 1.526L4.99 10.553v.744h4.78v-.99H6.643v-.069L8.41 8.252c.65-.724 1.237-1.332 1.237-2.27C9.646 4.849 8.723 4 7.308 4c-1.573 0-2.36 1.064-2.36 2.15v.057h1.138Zm6.559 1.883h.786c.823 0 1.374.481 1.379 1.179c.01.707-.55 1.216-1.421 1.21c-.77-.005-1.326-.419-1.379-.953h-1.095c.042 1.053.938 1.918 2.464 1.918c1.478 0 2.642-.839 2.62-2.144c-.02-1.143-.922-1.651-1.551-1.714v-.063c.535-.09 1.347-.66 1.326-1.678c-.026-1.053-.933-1.855-2.359-1.845c-1.5.005-2.317.88-2.348 1.898h1.116c.032-.498.498-.944 1.206-.944c.703 0 1.206.435 1.206 1.07c.005.64-.504 1.106-1.2 1.106h-.75v.96Z"})}),Che=r=>z("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...r,children:[C("path",{fill:"currentColor",d:"M22 6V4H12v2h4v2h-4v12h4v2h-4v2h10v-2h-4v-2h4V8h-4V6Zm-8 12v-3h6v3Zm6-5h-6v-3h6Z"}),C("path",{fill:"currentColor",d:"M30 30H4a2 2 0 0 1-2-2V2h2v26h26Z"})]}),The=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M8 16h5v-5H8v5Zm0-7h12V4H8Zm7 7h5v-5h-5Zm-7 2q-.825 0-1.412-.587Q6 16.825 6 16V4q0-.825.588-1.413Q7.175 2 8 2h12q.825 0 1.413.587Q22 3.175 22 4v12q0 .825-.587 1.413Q20.825 18 20 18Zm-4 4q-.825 0-1.412-.587Q2 20.825 2 20V6h2v14h14v2Z"})}),u3=({setChartType:r})=>{const e=[{name:"Line",icon:she},{name:"Bar",icon:lhe},{name:"Combo",icon:hhe},{name:"Scatter",icon:uhe},{name:"Row",icon:che},{name:"Area",icon:fhe},{name:"Pie",icon:vhe},{name:"Waterfall",icon:ghe},{name:"Funnel",icon:phe},{name:"Bubble",icon:yhe},{name:"Doughnut",icon:dhe},{name:"Stepped",icon:mhe},{name:"Histogram",icon:_he},{name:"Gauge",icon:bhe},{name:"Sankey",icon:xhe},{name:"Stack",icon:whe},{name:"Single value",icon:She},{name:"BoxPlot",icon:Che},{name:"Table",icon:The}];return C("div",{className:it.chartOptions,children:e.map(t=>z("div",{className:it.chartOption,children:[C(Le,{type:"button",variant:"custom",className:it.chartOptionBtn,onClick:()=>{r(t.name.toLowerCase())},children:C(t.icon,{style:{color:"blue",width:"20px",height:"20px"}})},t.name),C(de,{variant:"p",styleClass:"tertiary",className:it.chartOptionText,children:t.name})]},t.name))})},Dhe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M7 3H5v6h2V3m12 0h-2v10h2V3M3 13h2v8h2v-8h2v-2H3v2m12-6h-2V3h-2v4H9v2h6V7m-4 14h2V11h-2v10m4-6v2h2v4h2v-4h2v-2h-6Z"})}),Mhe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:2,d:"M20 20L4 4m16 0L4 20"})}),Ahe=({chartType:r,setChartType:e,data:t,setXAxis:n,setYAxisList:a,xAxis:i,setMeasure:o,setStep:s,step:l,measure:u,setSankeyValues:c,singleValue:f,setSingleValue:h,setSettingsShow:v,setMargins:d,margins:p,legendSettings:g,setLegendSettings:y,labelSettings:m,setLabelSettings:_,axisSettings:b,setAxisSettings:w,customSettings:x,setCustomSettings:S,backGroundColor:T,setBackGroundColor:D})=>{const[M,A]=B.useState(uc),I="Chart types",P="Chart properties",[E,O]=B.useState(I);return z("div",{className:Zr.chartButtonContainer,children:[z("div",{className:Zr["chartButton-header"],children:[z(de,{styleClass:"font-14c",variant:"h1",className:Zr.settings,children:[C(Dhe,{}),"Chart Settings"]}),C("div",{className:Zr.crossIcon,children:C(Mhe,{onClick:()=>v(!1)})})]}),z("div",{className:Zr.chartButtons,children:[z("div",{className:Zr["settingsTab-header-control"],children:[C(Le,{type:"button",variant:"custom",className:`${Zr.chartButton} ${M===uc&&Zr.chartButtonSelected}`,onClick:()=>A(uc),children:"General"}),C(Le,{type:"button",variant:"custom",className:`${Zr.chartButton} ${M===xv&&Zr.chartButtonSelected}`,onClick:()=>A(xv),children:"Configuration"})]}),M===uc&&z(Ce,{children:[C("div",{className:Zr.tabContainer,children:C(YS,{activeTab:E,options:[I,P],setActiveTab:O,className:Zr.tab,tabText:Zr.tabText})}),E===I&&C("div",{className:Zr.button,children:C(u3,{setChartType:e})}),E===P&&C(Ce,{children:r&&C("div",{className:Zr.button,children:C(l3,{data:t,setXAxis:n,xAxis:i,setYAxisList:a,chartType:r,setStep:s,setMeasure:o,step:l,measure:u,setSankeyValues:c,singleValue:f,setSingleValue:h,setSettingsShow:v})})})]}),M===xv&&C(ohe,{setMargins:d,margins:p,legendSettings:g,setLegendSettings:y,labelSettings:m,setLabelSettings:_,axisSettings:b,setAxisSettings:w,customSettings:x,setCustomSettings:S,chartType:r,setChartType:e,backGroundColor:T,setBackGroundColor:D})]})]})};var jt={"outputTab-header":"_outputTab-header_x33uc_1",searchCommand:"_searchCommand_x33uc_9","chartTab-container":"_chartTab-container_x33uc_17",chartText:"_chartText_x33uc_25",charts:"_charts_x33uc_33",metricChart:"_metricChart_x33uc_41",metricChartEmpty:"_metricChartEmpty_x33uc_49","chartTab-wrapper":"_chartTab-wrapper_x33uc_57","chartTab-wrapper-head":"_chartTab-wrapper-head_x33uc_65",fullQuery:"_fullQuery_x33uc_73",noQuery:"_noQuery_x33uc_81","tableTab-header":"_tableTab-header_x33uc_89","chartButton-header":"_chartButton-header_x33uc_97",chartButtonContainer:"_chartButtonContainer_x33uc_105",searchWrapper:"_searchWrapper_x33uc_113",searchIcon:"_searchIcon_x33uc_121",chartConfigure:"_chartConfigure_x33uc_129",chartSettings:"_chartSettings_x33uc_137",labels:"_labels_x33uc_145",chartButtons:"_chartButtons_x33uc_153",chartButton:"_chartButton_x33uc_97"};const c3=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:2,d:"m21 21l-4.486-4.494M19 10.5a8.5 8.5 0 1 1-17 0a8.5 8.5 0 0 1 17 0Z"})}),Lhe=r=>C("svg",{viewBox:"0 0 16 16",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M11.5 4a.5.5 0 0 0 .5.5h1.75a.75.75 0 0 1 0 1.5H12a2 2 0 0 1-2-2V2.25a.75.75 0 0 1 1.5 0V4Zm0 8a.5.5 0 0 1 .5-.5h1.75a.75.75 0 0 0 0-1.5H12a2 2 0 0 0-2 2v1.75a.75.75 0 0 0 1.5 0V12ZM4 11.5a.5.5 0 0 1 .5.5v1.75a.75.75 0 0 0 1.5 0V12a2 2 0 0 0-2-2H2.25a.75.75 0 0 0 0 1.5H4ZM4.5 4a.5.5 0 0 1-.5.5H2.25a.75.75 0 0 0 0 1.5H4a2 2 0 0 0 2-2V2.25a.75.75 0 0 0-1.5 0V4Z"})}),f3=({labels:r,datasets:e,funnelData:t,chartType:n,setChartType:a,data:i,setXAxis:o,setYAxisList:s,xAxis:l,setMeasure:u,setStep:c,step:f,measure:h,setSankeyValues:v,sankeyData:d,singleValue:p,setSingleValue:g,singleValueData:y,setMargins:m,margins:_,legendSettings:b,setLegendSettings:w,labelSettings:x,setLabelSettings:S,customSettings:T,setCustomSettings:D,axisSettings:M,setAxisSettings:A,updateGroup:I,isLoading:P,isEnableGroupBy:E,backGroundColor:O,setBackGroundColor:N})=>{const[V,$]=B.useState(!1),[U,Y]=B.useState(!1);return z("div",{className:jt["chartTab-container"],children:[!(i!=null&&i.length)&&P&&C("div",{className:jt["loader-container"],children:C(zu,{style:{width:"50px",height:"50px",color:"blue"}})}),!(i!=null&&i.length)&&!P&&z("div",{className:jt.metricChartEmpty,children:[C("div",{className:jt.searchWrapper,children:C(c3,{className:jt.searchIcon})}),C("div",{className:jt.message,children:C(de,{styleClass:"font-14b",variant:"p",children:"Uh-oh, Nothing to display"})}),C("div",{className:jt.chartButton,children:C(de,{styleClass:"font-14a",variant:"p",children:"No data found! Run a query to display charts"})})]}),!!(i!=null&&i.length)&&!P&&z("div",{className:jt.metricChart,children:[C("div",{className:"h-[10%]",children:C(de,{styleClass:"primary",variant:"p",className:"",children:"Preview"})}),z("div",{className:jt["chartTab-wrapper"],children:[z("div",{className:jt["chartTab-wrapper-head"],children:[C(de,{styleClass:"primary",variant:"p",className:"",children:"Charts"}),z("div",{className:jt.chartButtons,children:[C(Le,{type:"button",variant:"custom",className:jt.chartButton,onClick:()=>{$(!V)},children:"Chart Settings"}),C(Le,{type:"button",variant:"custom",className:r!=null&&r.length?jt.fullQuery:jt.noQuery,onClick:r!=null&&r.length?()=>Y(!0):void 0,children:C(Lhe,{})})]})]}),V&&C("div",{className:jt.chartSettings,children:C(Ahe,{chartType:n,setChartType:a,data:i,setXAxis:o,setYAxisList:s,xAxis:l,setMeasure:u,setStep:c,step:f,measure:h,setSankeyValues:v,singleValue:p,setSingleValue:g,setSettingsShow:$,setMargins:m,margins:_,legendSettings:b,setLegendSettings:w,labelSettings:x,setLabelSettings:S,axisSettings:M,setAxisSettings:A,customSettings:T,setCustomSettings:D,backGroundColor:O,setBackGroundColor:N})}),r!=null&&r.length?C("div",{className:jt.labels,children:C(Bg,{labels:r,data:{labels:r,datasets:e},chartType:n,funnelData:t,sankeyData:d,singleValueData:y,margins:_,legendSettings:b,labelSettings:x,axisSettings:M,customSettings:T,backGroundColor:O,updateGroup:I,isEnableGroupBy:E,chartClickConfig:{isEnable:!1,baseUrl:"",dynamic:"{{value}}",route:"/{{value}}",routeType:"internal"},enableSaveAs:!0})}):z("div",{className:jt.metricChartEmpty,children:[C("div",{className:jt.searchWrapper,children:C(c3,{className:jt.searchIcon})}),C("div",{className:jt.message,children:C(de,{styleClass:"font-14b",variant:"p",children:"Uh-oh, Nothing to display"})}),C("div",{className:jt.chartButton,children:C(de,{styleClass:"font-14a",variant:"p",children:"Choose an appropriate chart type and start visulaizing your data"})})]})]})]}),C(WS,{isShow:U,onCancel:()=>Y(!1),chart:{labels:r,data:{labels:r,datasets:e},chartType:n,funnelData:t,sankeyData:d,singleValueData:y,margins:_,legendSettings:b,labelSettings:x,axisSettings:M,customSettings:T,backGroundColor:O,enableSaveAs:!0,chartClickConfig:{isEnable:!1,baseUrl:"",dynamic:"{{value}}",route:"/{{value}}",routeType:"internal"}}})]})};var iy={container:"_container_1jc0r_1",wrapper:"_wrapper_1jc0r_5",text:"_text_1jc0r_9",table:"_table_1jc0r_12"},Oo={container:"_container_1uho5_1",table:"_table_1uho5_9",tableHead:"_tableHead_1uho5_17",tableRow:"_tableRow_1uho5_25",tableHeadCol:"_tableHeadCol_1uho5_33",tableRowCol:"_tableRowCol_1uho5_41",empty:"_empty_1uho5_49",error:"_error_1uho5_57"};const h3=({data:r,isError:e})=>z("div",{className:Oo.container,children:[!!(r!=null&&r.length)&&!e&&z("table",{className:Oo.table,children:[C("thead",{className:Oo.tableHead,children:C("tr",{className:Oo.tableRow,children:Object.keys(r[0]).map(t=>C("th",{className:Oo.tableHeadCol,scope:"col",children:C(de,{styleClass:"font-14c",variant:"h1",children:t})},t))})}),C("tbody",{children:r==null?void 0:r.map((t,n)=>C("tr",{children:Object.keys(r[0]).map((a,i)=>C("td",{className:Oo.tableRowCol,children:C(de,{styleClass:"font-14",variant:"p",children:JSON.stringify(t[a])})},i))},n))})]}),!(r!=null&&r.length)&&!e&&C("div",{className:Oo.empty,children:"Table is empty"}),e&&C("div",{className:Oo.error,children:r.message})]}),Ihe=({previewTableDataList:r})=>C("div",{className:iy.container,children:C("div",{className:iy.wrapper,children:r==null?void 0:r.map(e=>z("div",{className:iy.text,children:[C(de,{variant:"h1",styleClass:"primary",className:"",children:e.name}),C("div",{className:iy.table,children:C(h3,{data:e.data,isError:e.isError})})]},e.name))})});var Ii={container:"_container_12jmm_1",header:"_header_12jmm_5","text-container":"_text-container_12jmm_9","btn-container":"_btn-container_12jmm_13",tabButton:"_tabButton_12jmm_16",selectedTab:"_selectedTab_12jmm_19",table:"_table_12jmm_22"},Xr={"table-loader-container":"_table-loader-container_1j4gc_1",tableData:"_tableData_1j4gc_7",tableHeadCol:"_tableHeadCol_1j4gc_13",tableRow:"_tableRow_1j4gc_19",tableRowCol:"_tableRowCol_1j4gc_25",row:"_row_1j4gc_31",container:"_container_1j4gc_37",table:"_table_1j4gc_1",previewTable:"_previewTable_1j4gc_49",preview:"_preview_1j4gc_49",previewText:"_previewText_1j4gc_61",noData:"_noData_1j4gc_67",error:"_error_1j4gc_73",errorMsg:"_errorMsg_1j4gc_79",tableIcon:"_tableIcon_1j4gc_85"};const Phe=r=>C("svg",{viewBox:"0 0 15 15",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"none",stroke:"currentColor",d:"M.5 4.5h14m-10-4v14m-3-14h12a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1h-12a1 1 0 0 1-1-1v-12a1 1 0 0 1 1-1Z"})}),v3=({data:r,isLoading:e,error:t})=>C("div",{className:Xr.container,children:z("div",{className:Xr.previewTable,children:[C("div",{className:Xr.preview,children:C(de,{styleClass:"font-14c",variant:"h1",className:Xr.previewText,children:"Preview"})}),z("div",{className:Xr.tableData,children:[e&&!(r!=null&&r.length)&&C("div",{className:Xr["table-loader-container"],children:C(zu,{style:{width:"50px",height:"50px",color:"blue"}})}),!!(r!=null&&r.length)&&!e&&z("table",{className:Xr.table,children:[C("thead",{children:C("tr",{className:Xr.row,children:Object.keys(r[0]).map(n=>C("th",{className:Xr.tableHeadCol,scope:"col",children:C(de,{styleClass:"font-14c",variant:"h1",children:n})},n))})}),C("tbody",{children:r.map((n,a)=>C("tr",{className:Xr.tableRow,children:Object.keys(r[0]).map((i,o)=>C("td",{className:Xr.tableRowCol,children:C(de,{styleClass:"font-14",variant:"p",children:JSON.stringify(n[i])})},o))},a))})]}),!(r!=null&&r.length)&&!e&&!t.length&&z("div",{className:Xr.noData,children:[C(Phe,{className:Xr.tableIcon,width:"60px",height:"60px"}),C(de,{styleClass:"font-14b",variant:"p",children:"No data available to preview"}),C(de,{styleClass:"font-14a",variant:"p",children:"Run your query to preview data"})]}),t&&C("div",{className:Xr.error,children:C(de,{styleClass:"primary",className:Xr.errorMsg,variant:"p",children:t})})]})]})}),d3=({outpuTableData:r,outputError:e,isOutputLoading:t,previewTableDataList:n})=>{const[a,i]=B.useState(lc);return z("div",{className:Ii.container,children:[z("div",{className:Ii.header,children:[z("div",{className:Ii["text-container"],children:[C(de,{styleClass:"font-14c",variant:"h1",children:"Tables"}),C(de,{styleClass:"font-14",variant:"p",children:"Preview your selected table & output table values"})]}),z("div",{className:Ii["btn-container"],children:[C(Le,{type:"button",variant:"custom",className:`${Ii.tabButton} ${a===bv&&Ii.selectedTab}`,onClick:()=>i(bv),children:"Input Table"}),C(Le,{type:"button",variant:"custom",className:`${Ii.tabButton} ${a===lc&&Ii.selectedTab}`,onClick:()=>i(lc),children:"Output Table"})]})]}),a===bv&&C(Ihe,{previewTableDataList:n}),a===lc&&C("div",{className:Ii.table,children:C(v3,{data:r,isLoading:t,error:e})})]})};var Pi={"main-container":"_main-container_wy97p_1","outputTab-header":"_outputTab-header_wy97p_5",wrapper:"_wrapper_wy97p_9",searchCommand:"_searchCommand_wy97p_12",tabButton:"_tabButton_wy97p_15",tabActive:"_tabActive_wy97p_18"};const Ehe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M7 21V7h14v14Zm2-10h10V9H9Zm4 4h2v-2h-2Zm0 4h2v-2h-2Zm-4-4h2v-2H9Zm8 0h2v-2h-2Zm-8 4h2v-2H9Zm8 0h2v-2h-2ZM3 17V3h14v3h-2V5H5v10h1v2Z"})}),Ohe=r=>C("svg",{viewBox:"0 0 256 256",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M232 208a8 8 0 0 1-8 8H32a8 8 0 0 1-8-8V48a8 8 0 0 1 16 0v108.7l50.3-50.4a8.1 8.1 0 0 1 11.4 0l26.3 26.4L188.7 72H168a8 8 0 0 1 0-16h40a8 8 0 0 1 8 8v40a8 8 0 0 1-16 0V83.3l-66.3 66.4a8.1 8.1 0 0 1-11.4 0L96 123.3l-56 56V200h184a8 8 0 0 1 8 8Z"})}),p3=({data:r,error:e,isLoading:t,labels:n,funnelData:a,chartType:i,datasets:o,setChartType:s,setXAxis:l,setYAxisList:u,xAxis:c,setMeasure:f,setStep:h,step:v,measure:d,setSankeyValues:p,sankeyData:g,previewTableDataList:y,singleValue:m,setSingleValue:_,singleValueData:b,setMargins:w,margins:x,legendSettings:S,setLegendSettings:T,labelSettings:D,setLabelSettings:M,axisSettings:A,setAxisSettings:I,customSettings:P,setCustomSettings:E,updateGroup:O,isEnableGroupBy:N,backGroundColor:V,setBackGroundColor:$,moreTabs:U})=>{var H;const[Y,ae]=B.useState(sc);return z("div",{className:Pi["main-container"],children:[z("div",{className:Pi["outputTab-header"],children:[z(Le,{type:"button",variant:"custom",className:`${Pi.tabButton} ${Y===sc&&Pi.tabActive}`,onClick:()=>ae(sc),children:[C(Ehe,{})," Tables"]}),z(Le,{type:"button",variant:"custom",className:`${Pi.tabButton} ${Y===_v&&Pi.tabActive}`,onClick:()=>ae(_v),children:[C(Ohe,{}),"Visualizations"]}),U==null?void 0:U.map(q=>C(Le,{type:"button",variant:"custom",className:`${Pi.tabButton} ${Y===q.name&&Pi.tabActive}`,onClick:()=>ae(q.name),children:q.tab},q.name))]}),z("div",{className:Pi.wrapper,children:[Y===sc&&C(d3,{outpuTableData:r,isOutputLoading:t,outputError:e,previewTableDataList:y}),Y===_v&&C(f3,{labels:n,funnelData:a,chartType:i,datasets:o,data:r,setChartType:s,setXAxis:l,setYAxisList:u,xAxis:c,setMeasure:f,setStep:h,step:v,measure:d,setSankeyValues:p,sankeyData:g,singleValue:m,setSingleValue:_,singleValueData:b,setMargins:w,margins:x,legendSettings:S,setLegendSettings:T,labelSettings:D,setLabelSettings:M,axisSettings:A,setAxisSettings:I,customSettings:P,setCustomSettings:E,updateGroup:O,isEnableGroupBy:N,isLoading:t,backGroundColor:V,setBackGroundColor:$}),(H=U==null?void 0:U.find(q=>q.name===Y))==null?void 0:H.tabContent]})]})};var He={"form-container":"_form-container_vmreb_1","field-container":"_field-container_vmreb_5","field-label":"_field-label_vmreb_9","field-wrapper":"_field-wrapper_vmreb_13","field-inner-container":"_field-inner-container_vmreb_17","field-value":"_field-value_vmreb_21","field-add-btn":"_field-add-btn_vmreb_25","field-value-container":"_field-value-container_vmreb_29","field-prompt":"_field-prompt_vmreb_33",group:"_group_vmreb_1",tooltipWrapper:"_tooltipWrapper_vmreb_37",tooltip:"_tooltip_vmreb_37",dropdown:"_dropdown_vmreb_49",filterDropdown:"_filterDropdown_vmreb_53",filterValues:"_filterValues_vmreb_57",columnText:"_columnText_vmreb_61",disabled:"_disabled_vmreb_65",checkIcon:"_checkIcon_vmreb_69",generateButton:"_generateButton_vmreb_73"};const Ah=r=>C("svg",{viewBox:"0 0 15 15",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.782 4.032a.575.575 0 1 0-.813-.814L7.5 6.687L4.032 3.218a.575.575 0 0 0-.814.814L6.687 7.5l-3.469 3.468a.575.575 0 0 0 .814.814L7.5 8.313l3.469 3.469a.575.575 0 0 0 .813-.814L8.313 7.5l3.469-3.468Z",clipRule:"evenodd"})}),oy=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:z("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[C("circle",{cx:12,cy:12,r:10}),C("path",{d:"M12 8v8m-4-4h8"})]})}),Rhe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M12 2A10 10 0 0 0 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10h-2a8 8 0 0 1-8 8a8 8 0 0 1-8-8a8 8 0 0 1 8-8V2m6.78 1a.69.69 0 0 0-.48.2l-1.22 1.21l2.5 2.5L20.8 5.7c.26-.26.26-.7 0-.95L19.25 3.2c-.13-.13-.3-.2-.47-.2m-2.41 2.12L9 12.5V15h2.5l7.37-7.38l-2.5-2.5Z"})}),g3=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M5 21q-.825 0-1.413-.587Q3 19.825 3 19V5q0-.825.587-1.413Q4.175 3 5 3h14q.825 0 1.413.587Q21 4.175 21 5v14q0 .825-.587 1.413Q19.825 21 19 21Zm5.6-5.225q.2 0 .375-.062q.175-.063.325-.213l5.675-5.675q.275-.275.275-.675t-.3-.7q-.275-.275-.7-.275q-.425 0-.7.275L10.6 13.4l-2.175-2.175q-.275-.275-.675-.275t-.7.3q-.275.275-.275.7q0 .425.275.7L9.9 15.5q.15.15.325.213q.175.062.375.062Z"})}),y3=({dateTimeColumnList:r,columnList:e,database:t,companyId:n,tableName:a,setData:i,setError:o,setLoading:s,setQuery:l,isEnableGroupBy:u,setSelectedGroupBy:c})=>{const[f,h]=B.useState([]),[v,d]=B.useState(""),[p,g]=B.useState({value:"",label:""}),[y,m]=B.useState([]),[_,b]=B.useState([]),[w,x]=B.useState(""),[S,T]=B.useState(""),[D,M]=B.useState([]),[A,I]=B.useState([]),[P,E]=B.useState(!1),[O,N]=B.useState(!1),[V,$]=B.useState(!1),[U,Y]=B.useState(!1),[ae,H]=B.useState(!1),[q,X]=B.useState(!1),[Z,ie]=B.useState([]),[se,te]=B.useState(""),[ve,R]=B.useState({value:"",label:""}),[F,G]=B.useState({value:"",label:""}),[re,ne]=B.useState({value:"",label:""}),[ee,ue]=B.useState({value:"10",label:"10"}),[De,vt]=B.useState({value:"",label:""}),[rt,Yt]=B.useState({value:"",label:""}),[Ct,Qr]=B.useState({value:"",label:""}),[St,bt]=B.useState({value:"",label:""}),[Qt,Ta]=B.useState({value:"",label:""});B.useEffect(()=>{e.length&&(M([]),h([]),R(e[0]),m([]),G(e[0]),vt(e[0]),x(""),ne(e[0]),b([]),H(!1),X(!1),d(""),T(""))},[e]),B.useEffect(()=>{r.length?g({value:r[0].name,label:r[0].as}):g({value:"",label:""})},[r]);const{generateDatasetMetric:or,isGeneratingDataset:Ni,generateError:Uu,fetchColumnValues:Kr}=ey();B.useEffect(()=>{De.value&&(I([]),Ta({value:"",label:""}),Kr({companyId:n,tableName:a,columnName:De.value},{onSuccess(Ie){var xr;const ft=(xr=Ie.fetchColumnData)==null?void 0:xr.data;if(ft!=null&&ft.length){const Qe=ft.map(Pt=>({value:(Pt==null?void 0:Pt.value)||"",label:(Pt==null?void 0:Pt.label)||""}));ie(Qe)}}}))},[De]);const ju=!f.length&&!y.length,ll=!r.length,Ih=!p.value,ul=!!f.length,ki=!!y.length,Jr=t==="Bigquery",Tn=t==="MySql",Da=t==="MongoDB",Dn=St.value==="IS NULL"||St.value==="IS NOT NULL",Ja=St.value==="IN"||St.value==="NOT IN",ct=Dn?!0:Ja?!!A.length:!!Qt.value,hn=y.length?!1:!Ct.value;return B.useEffect(()=>{var Ie;if(v&&p.value&&r.length){const ft=(Ie=r.find(Kt=>Kt.name===p.value))==null?void 0:Ie.datatype,xr=(ft==null?void 0:ft.toLowerCase())!=="date",Qe=p.value,Pt=FS({timeGrainValue:v,isTimeStamp:xr,col:Jr||Tn?Qe:Da?`\`${Qe}\``:`"${Qe}"`,database:t});T(Pt)}},[v,p]),B.useEffect(()=>{y.length&&(H(!1),M([]),x(""))},[y]),B.useEffect(()=>{Dn&&Ta({value:"",label:""})},[St]),B.useEffect(()=>{u&&c(D)},[D,u]),z("div",{className:He["form-container"],children:[!ll&&z("div",{className:He["field-container"],children:[C(de,{variant:"h1",styleClass:"custom",className:He["field-label"],children:"Time Filter"}),C("div",{className:He["field-wrapper"],children:z("div",{className:He["field-inner-container"],children:[C(Nr,{onChange:g,selectedOption:p,options:r.map(({name:Ie,as:ft})=>({value:Ie,label:ft})),isDisabled:ll,labelVariant:"static",label:"Time Column"}),C(zS,{setTimeGrainValue:d,timeGrainValue:v,isShowlabel:!0,isDisabled:Ih}),v&&z(Le,{type:"button",variant:"custom",className:He["field-value"],onClick:()=>d(""),children:[v," ",C(Ah,{})]})]})})]}),!ki&&z("div",{className:He["field-container"],children:[z(de,{variant:"h1",styleClass:"custom",className:He["field-label"],children:["Metric Creation",C(Li,{children:"configure metric columns"})]}),C("div",{className:He["field-wrapper"],children:z("div",{className:He["field-inner-container"],children:[C(de,{variant:"p",styleClass:"font-14",children:"Metric Fields"}),z(Le,{type:"button",variant:"secondary",className:He["field-add-btn"],onClick:()=>{E(!0),te("")},isDisabled:ki,children:[C(oy,{})," Add Aggregate Column"]}),C("div",{className:He["field-value-container"],children:f.map(Ie=>z(Le,{type:"button",variant:"custom",className:He["field-value"],onClick:()=>h(ft=>ft.filter(xr=>xr.as!==Ie.as)),children:[Ie.as," ",C(Ah,{})]},Ie.as))}),z(Ai,{headerTitle:ve.value&&rt.value?`${rt.value}(${ve.value})`:"Create metric",isOpen:P,onClose:()=>E(!1),children:[z("div",{className:He.dropdown,children:[C(Nr,{onChange:R,selectedOption:ve,options:e,labelVariant:"static",label:"Columns"}),C(Nr,{onChange:Yt,selectedOption:rt,options:gm,labelVariant:"static",label:"Aggregate"}),C(It,{label:"As",type:"text",placeholder:"Save as",name:"alias",onChange:Ie=>te(Ie.target.value)})]}),C(Gu,{children:C(Le,{type:"button",variant:"primary",size:"small",className:He.disabled,isDisabled:!rt.value||!ve.value,onClick:()=>{h(Ie=>[...Ie,{value:`${rt.value}(${Jr||Tn?`${ve.value}`:Da?`\`${ve.value}\``:`"${ve.value}"`})`,as:Jr?se||"_result":se||`${rt.value}(${ve.label})`}]),E(!1)},children:"Save"})})]}),C(de,{variant:"p",styleClass:"font-14",children:"Group By"}),C(Th,{options:e,onChange:M,value:D,name:"Dimensions",placeHolder:"Select Columns"})]})})]}),!ul&&z("div",{className:He["field-container"],children:[z(de,{variant:"h1",styleClass:"custom",className:He["field-label"],children:["Columns",C(Li,{children:"select columns for raw records query"})]}),C("div",{className:He["field-wrapper"],children:z("div",{className:He["field-inner-container"],children:[C(de,{variant:"p",styleClass:"font-14",children:"Select Columns"}),z(Le,{type:"button",variant:"secondary",className:He["field-add-btn"],onClick:()=>{N(!0),te("")},isDisabled:ul,children:[C(oy,{})," Add Column"]}),C("div",{className:He["field-value-container"],children:y.map(Ie=>z(Le,{type:"button",variant:"custom",className:He["field-value"],onClick:()=>m(ft=>ft.filter(xr=>xr.as!==Ie.as)),children:[Ie.as," ",C(Ah,{})]},Ie.as))}),z(Ai,{headerTitle:F.value?`${F.value}`:"Select Column",isOpen:O,onClose:()=>N(!1),children:[z("div",{className:He.dropdown,children:[C(Nr,{onChange:G,selectedOption:F,options:e,labelVariant:"static",label:"Columns"}),C(It,{label:"As",type:"text",placeholder:"Save as",name:"alias",onChange:Ie=>te(Ie.target.value)})]}),C(Gu,{children:C(Le,{type:"button",variant:"primary",size:"small",className:He.disabled,isDisabled:!F.value,onClick:()=>{y.find(Ie=>Ie.as===se)||m(Ie=>[...Ie,{value:`${F.value}`,as:se||`${F.label}`}]),N(!1)},children:"Save"})})]})]})})]}),z("div",{className:He["field-container"],children:[C(de,{variant:"h1",styleClass:"custom",className:He["field-label"],children:"category filters"}),C("div",{className:He["field-wrapper"],children:z("div",{className:He["field-inner-container"],children:[C(de,{variant:"p",styleClass:"font-14",children:"Filter by"}),z(Le,{type:"button",variant:"secondary",className:He["field-add-btn"],onClick:()=>Y(!0),children:[C(oy,{})," Add Filter Category"]}),C("div",{className:He["field-value-container"],children:_.map(Ie=>z(Le,{type:"button",variant:"custom",className:He["field-value"],onClick:()=>b(ft=>ft.filter(xr=>xr!==Ie)),children:[Ie," ",C(Ah,{})]},Ie))}),z(Ai,{headerTitle:De.value&&St.value?`${De.value} ${St.value} ${Ja?`(${A.map(Ie=>`'${Ie}'`).join(", ")})`:`${Qt.value?`'${Qt.value}'`:""}`}`:"Add Filter",isOpen:U,onClose:()=>Y(!1),children:[z("div",{className:He.filterDropdown,children:[C(Nr,{onChange:vt,selectedOption:De,options:e,labelVariant:"static",label:"Column"}),C(Nr,{onChange:bt,selectedOption:St,options:gv,labelVariant:"static",label:"Operator"}),Ja?z("div",{className:He.filterValue,children:[C(de,{variant:"p",styleClass:"font-14",children:"Filter Value"}),C(Th,{options:Z,onChange:I,value:A,name:"Filters",placeHolder:"Select Multiple Filters"})]}):C(Nr,{onChange:Ta,selectedOption:Qt,options:Z,isDisabled:Dn,labelVariant:"static",label:"Filter Value"})]}),C(Gu,{children:C(Le,{type:"button",variant:"primary",size:"small",isDisabled:!De.value||!St.value||!ct,className:He.disabled,onClick:()=>{b(Ie=>[...Ie,`${Jr||Tn?`${De.value}`:Da?`\`${De.value}\``:`"${De.value}"`} ${St.value} ${Ja?`(${A.map(ft=>`'${ft}'`).join(", ")})`:`${Qt.value?`'${Qt.value}'`:""}`}`]),Y(!1)},children:"Save"})})]}),C(de,{variant:"p",styleClass:"font-14",children:"Sort By"}),z(Le,{type:"button",variant:"secondary",className:He["field-add-btn"],onClick:()=>$(!0),children:[w?C(Rhe,{}):C(oy,{})," ",w?"Edit":"Add"," Sort Category"]}),w&&z(Le,{type:"button",variant:"custom",className:He["field-value"],onClick:()=>x(""),children:[w," ",C(Ah,{})]}),z(Ai,{headerTitle:y.length?re.value?`${re.value}`:"Create sort":re.value&&Ct.value?`${Ct.value}(${re.value})`:"Create sort",isOpen:V,onClose:()=>$(!1),children:[z("div",{className:He.dropdown,children:[C(Nr,{onChange:ne,selectedOption:re,options:e,labelVariant:"static",label:"Column"}),!y.length&&C(Nr,{onChange:Qr,selectedOption:Ct,options:gm,labelVariant:"static",label:"Aggregate"})]}),C(Gu,{children:C(Le,{type:"button",variant:"primary",size:"small",isDisabled:!re.value||hn,className:He.disabled,onClick:()=>{y.length?x(`${Jr||Tn?`${re.value}`:`${re.value}`}`):x(`${Ct.value}(${Jr||Tn?`${re.value}`:Da?`\`${re.value}\``:`"${re.value}"`})`),$(!1)},children:"Save"})})]})]})})]}),C(Nr,{onChange:ue,options:PT,selectedOption:ee,labelVariant:"static",label:"Row Limit"}),!y.length&&!!r.length&&z(de,{styleClass:"font-14",variant:"p",className:He.columnText,children:[C(Le,{type:"button",variant:"custom",onClick:()=>H(Ie=>!Ie),isDisabled:!p.value||!!y.length,children:ae?C(g3,{className:He.checkIcon}):C($S,{})}),"Include Time"]}),z(de,{styleClass:"font-14",variant:"p",className:He.columnText,children:[C(Le,{type:"button",variant:"custom",onClick:()=>X(Ie=>!Ie),children:q?C(g3,{className:He.checkIcon}):C($S,{})}),"Sort Descending"]}),C(Le,{type:"button",variant:"primary",className:He.generateButton,isDisabled:Ni||ju,onClick:()=>{var Ie,ft,xr;o(""),s(!0),i([]),l(""),Ni&&s(!0),or({companyId:n,userInputs:{columns:y.map(Qe=>Jr||Tn?`${Qe.value} AS ${Qe.as} `:Da?`\`${Qe.value}\` AS "${Qe.as}"`:`"${Qe.value}" AS "${Qe.as}"`),dimensions:Jr||Tn?D.map(Qe=>{var Pt,Kt;return{name:(Pt=e.find(kr=>kr.value===Qe))==null?void 0:Pt.value,as:(Kt=e.find(kr=>kr.value===Qe))==null?void 0:Kt.label}}):Da?D.map(Qe=>{var Pt,Kt;return{name:`\`${(Pt=e.find(kr=>kr.value===Qe))==null?void 0:Pt.value}\``,as:(Kt=e.find(kr=>kr.value===Qe))==null?void 0:Kt.label}}):D.map(Qe=>{var Pt,Kt;return{name:`"${(Pt=e.find(kr=>kr.value===Qe))==null?void 0:Pt.value}"`,as:(Kt=e.find(kr=>kr.value===Qe))==null?void 0:Kt.label}}),metrics:f.map(Qe=>Jr?`${Qe.value} AS ${Qe.as}`:`${Qe.value} AS "${Qe.as}"`),sort:w,isSortDescending:q,filters:_,tableName:a,rowLimit:ee.value,timeFilter:{filter:S,column:Jr||Tn?{name:p.value,as:(Ie=e.find(Qe=>Qe.value===p.value))==null?void 0:Ie.label}:Da?{name:`\`${p.value}\``,as:(ft=e.find(Qe=>Qe.value===p.value))==null?void 0:ft.label}:{name:`"${p.value}"`,as:(xr=e.find(Qe=>Qe.value===p.value))==null?void 0:xr.label},isInclude:ae}}},{onSuccess(Qe){var ly,uy,cy;const Pt=(ly=Qe.generateDatasetMetrics)==null?void 0:ly.error,Kt=(uy=Qe.generateDatasetMetrics)==null?void 0:uy.result,kr=(cy=Qe.generateDatasetMetrics)==null?void 0:cy.query;(Pt||Uu)&&(o(Pt.message||xm),s(!1),i([]),l("")),Kt&&kr&&(o(""),s(!1),i(Array.isArray(Kt)?Kt:[]),l(kr))}})},children:"Generate"})]})};var sy={container:"_container_7zhjn_1",header:"_header_7zhjn_5",enableGroupBy:"_enableGroupBy_7zhjn_8",enableGroupButton:"_enableGroupButton_7zhjn_11"};const m3=({dateTimeColumnList:r,columnList:e,database:t,companyId:n,tableName:a,setData:i,setError:o,setLoading:s,setQuery:l,isEnableGroupBy:u,setEnableGroupBy:c,setSelectedGroupBy:f})=>z("div",{className:sy.container,children:[z("div",{className:sy.header,children:["Data",c&&z(Le,{type:"button",variant:"custom",onClick:()=>c(!u),className:`${u&&sy.enableGroupBy} ${sy.enableGroupButton}`,children:[u?"Disable":"Enable"," Drill down"]})]}),C(y3,{dateTimeColumnList:r,columnList:e,database:t,companyId:n,tableName:a,setData:i,setError:o,setQuery:l,setLoading:s,isEnableGroupBy:u,setSelectedGroupBy:f})]});var Ei={form:"_form_qtwuf_1",container:"_container_qtwuf_7",field:"_field_qtwuf_13",fieldLabel:"_fieldLabel_qtwuf_19",save:"_save_qtwuf_25",cancel:"_cancel_qtwuf_31",error:"_error_qtwuf_37"},ZS={label:"_label_1vo1x_1",textarea:"_textarea_1vo1x_9",resizable:"_resizable_1vo1x_17"};const _3=({id:r,label:e,placeholder:t,rows:n,cols:a,resizable:i=!0,register:o,error:s,defaultValue:l,value:u,onFocus:c,onBlur:f,className:h})=>z("div",{className:h,children:[C("label",{htmlFor:r,className:ZS.label,children:e}),C("textarea",{id:r,name:r,rows:n,cols:a,placeholder:t,className:Kn(ZS.textarea,`${i?null:ZS.resizable}`),defaultValue:l,...o,value:u,onFocus:c,onBlur:f}),s&&C(sS,{message:s.message})]});var Oi={group:"_group_13otg_1",button:"_button_13otg_9",checkbox:"_checkbox_13otg_17",switch:"_switch_13otg_25",enabled:"_enabled_13otg_43",notenabled:"_notenabled_13otg_59",label:"_label_13otg_75",labelActive:"_labelActive_13otg_83",labelInactive:"_labelInactive_13otg_91"};const b3=({enabled:r,onChange:e,label:t,className:n="",placeholder:a,labelClassName:i,defaultEnabled:o})=>z("div",{className:`${Oi.group} ${n}`,children:[t?C(de,{styleClass:"font-14",variant:"p",className:i,children:t}):null,C("input",{type:"checkbox",id:"toggle",checked:o,onChange:({target:s})=>e==null?void 0:e(s.checked),className:Oi.checkbox}),z("label",{htmlFor:"toggle",className:Oi.button,children:[C("span",{className:`${Oi.switch} ${r?Oi.enabled:Oi.notenabled}`}),a?C("span",{className:`
325
325
  ${Oi.label}
326
326
  ${r?Oi.labelActive:Oi.labelInactive}
327
- `,children:a}):null]})]}),xz=({onSubmit:r,defaultValues:e,onCancel:t,isEmbedded:n=!0,dashboardIds:a,onDashboardChange:i,companyId:o,error:s})=>{var g,y,m;const{register:l,handleSubmit:u}=wS(),[c,f]=B.useState((g=e==null?void 0:e.isLive)!=null?g:!1),h=u(_=>{r({..._,isLive:c})}),{data:v}=w$({companyId:o}),d=v==null?void 0:v.externalDashboards,p=n?(y=d==null?void 0:d.filter(_=>_.id===a[0]).map(_=>({value:_.id,label:_.name})))!=null?y:[]:(m=d==null?void 0:d.map(_=>({value:_.id,label:_.name})))!=null?m:[];return z("form",{className:Ei.form,onSubmit:h,children:[z("div",{className:Ei.container,children:[C("div",{className:Ei.field,children:C(Th,{label:"Dashboards",options:p,name:"dashboards",value:a,onChange:i})}),C(It,{name:"name",type:"text",placeholder:"What is the name of metric?",label:"Metric Name",register:l("name",{required:!0}),defaultValue:e==null?void 0:e.name}),C(It,{name:"name",type:"text",placeholder:"Unique Id to identify metric",label:"Metric ID",register:l("metricId",{required:!0,disabled:!!(e!=null&&e.metricId)}),defaultValue:e==null?void 0:e.metricId}),C(_z,{className:Ei.field,id:"desc",placeholder:"What is the name of metric?",label:"Description",rows:5,register:l("description"),defaultValue:e==null?void 0:e.description}),!n&&C(bz,{className:Ei.field,labelClassName:Ei.fieldLabel,enabled:c,onChange:f,label:"Publish Type",placeholder:c?"LIVE MODE":"TEST MODE",defaultEnabled:e==null?void 0:e.isLive})]}),!!s&&C(de,{variant:"p",styleClass:"font-14",className:Ei.error,children:s}),z(Gu,{children:[C(Le,{type:"reset",variant:"secondary",className:Ei.cancel,onClick:t,size:"default",children:"Cancel"}),C(Le,{type:"submit",variant:"primary",size:"small",className:Ei.save,isDisabled:!p.length||!a.length,children:"Save"})]})]})},Nhe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2Z"})}),wz=({clientId:r,companyId:e,mode:t,externalDashboardId:n,variant:a="static"})=>{var Ja;const[i,o]=B.useState(!1),[s,l]=B.useState(""),[u,c]=B.useState(),[f,h]=B.useState([]),[v,d]=B.useState(""),[p,g]=B.useState(!1),[y,m]=B.useState([]),[_,b]=B.useState(),[w,x]=B.useState(!1),[S,T]=B.useState(!1),[D,M]=B.useState(!1),[A,I]=B.useState({value:"",label:""}),[P,E]=B.useState([]);B.useEffect(()=>{y.length&&b({column:y[0]})},[y]);const{mutate:O}=g$(),N=B.useMemo(()=>P.map(ct=>({value:ct.tableName,label:ct.tableName})),[P]),V=B.useMemo(()=>P.find(ct=>ct.tableName===A.value),[A.value,P]),$=B.useMemo(()=>(V==null?void 0:V.columns.map(({name:ct,as:hn})=>({value:ct,label:hn})))||[],[V]);B.useEffect(()=>{N.length&&I(N[0])},[N]);const U=B.useMemo(()=>(V==null?void 0:V.columns.filter(({datatype:ct})=>_m.includes(ct.toLowerCase())))||[],[V]),[Y,ae]=B.useState();B.useEffect(()=>{r&&e&&O({clientId:r,companyId:e},{onSuccess(ct){var ft;const hn=(ft=ct.companySubsetTableData)==null?void 0:ft.error,Ie=ct.companySubsetTableData;hn?l(hn.message):(ae({id:Ie==null?void 0:Ie.companyIntegrationId,name:Ie==null?void 0:Ie.dbName}),E(Ie==null?void 0:Ie.tableList))}})},[r,e,O]);const[H,q]=B.useState("bar"),[X,Z]=B.useState(),[ie,se]=B.useState(),[te,ve]=B.useState(),[R,F]=B.useState({marginTop:20,marginBottom:20,marginLeft:5,marginRight:5}),[G,re]=B.useState({show:!0,top:0,left:0,right:0,bottom:0,position:"horizontal"}),[ne,ee]=B.useState({hideSplitLines:"none",hideAxisLines:"none",barWidth:40,barRadius:0,axisLabels:"none",fontSize:14,subHeaderShow:!1,displayText:"",subHeaderFontSize:0,dateFormatter:"none",numberFormatter:"original"}),[ue,De]=B.useState({axis:"left",show:!1,position:"hidden"}),[vt,rt]=B.useState({axis:"left"}),[Yt,Ct]=B.useState({show:!1}),[Qr]=B.useState(),[St,bt]=B.useState(),[Qt,Ta]=B.useState(),[or,Ni]=B.useState(),[Uu,Kr]=B.useState(),{datasets:ju,funnelData:ll,labels:Ih,sankeyData:ul,singleValueData:ki}=pm({data:p?f:u,measure:or,sankeyValues:te,singleValue:Qt,step:ie,xAxis:X,yAxisList:St});B.useEffect(()=>{if(f.length&&p){const ct=oS(f[0]);Z(ct.stringKeys[0]),bt(ct.numberKeys),se(ct.stringKeys[0]),Ni(ct.numberKeys[0])}},[f]),B.useEffect(()=>{if((u==null?void 0:u.length)&&!p){const ct=Object.keys(u[0]);Z(ct[0]),bt(ct.slice(1))}},[u,p]);const{createExternalMetric:Jr,error:Tn}=Z4({query:v,xAxis:X,backGroundColor:Yt,customSettings:ne,chartType:H,yAxisList:St,step:ie,measure:or,sankeyValues:te,singleValue:Qt,companyIntegrationId:Y==null?void 0:Y.id,integrationName:Y==null?void 0:Y.name,margins:R,legendSettings:G,labelSettings:ue,axisSettings:vt,metricQuery:Qr,outputColumns:void 0,selectedColumns:void 0,clientId:r,isEmbedded:!0,companyId:e,mode:t,dashboardIds:[n],isEnableGroupBy:p,groupBy:_,selectedGroupBy:y}),{mutate:Da}=A$();B.useEffect(()=>{A.value&&Da({companyId:e,tableName:A.value,limit:10},{onSuccess(ct){var Ie;const hn=(Ie=ct.previewTable)==null?void 0:Ie.data;Kr(hn?[hn]:void 0)}})},[A]),B.useEffect(()=>{(u==null?void 0:u.length)&&y.length&&wa(u,[y[0]],y,h)},[u]);const Dn=ct=>{if((_==null?void 0:_.column)&&ct&&ct!=="undefined"){if(y.lastIndexOf(_.column)!==y.length-1){const hn=y.indexOf(_.column),Ie=_.column;b({column:y[hn+1],parentColumn:{column:_.column,value:ct}}),wa(u==null?void 0:u.filter(ft=>ft[Ie]===ct),[y[hn+1]],y,h)}y.lastIndexOf(_.column)===y.length-1&&(b({column:y[0]}),wa(u,[y[0]],y,h))}else b({column:y[0]}),wa(u,[y[0]],y,h)};return B.useEffect(()=>{f.length===0&&p&&y.length&&(u==null?void 0:u.length)&&(b({column:y[0]}),wa(u,[y[0]],y,h))},[f,p,y]),z(Ce,{children:[C(Le,{type:"button",variant:a==="floating"?"custom":"primary",size:"large",className:a==="floating"?ny.floatingCreateButton:"",onClick:()=>x(!0),children:a==="floating"?C(Nhe,{className:ny.floatingCreateButtonIcon}):"Create Metric"}),C(Ai,{headerTitle:"Create Metric",isOpen:w,onClose:()=>x(!1),customHeader:C(az,{Heading:"Create Metric",setShowMetricCreateModal:x,isDisableSqlBtn:!v,isDisableSaveBtn:!(or!=null&&or.length)&&!((Ja=St==null?void 0:St.filter(ct=>ct))!=null&&Ja.length)&&!Qt,setShowSqlModal:T,setShowSaveMetricModal:M}),children:z("div",{className:ny["modal-container"],children:[C(iz,{setselectTable:I,selectTable:A,tableList:N,columnList:(V==null?void 0:V.columns)||[]}),C(mz,{dateTimeColumnList:U,columnList:$,database:(Y==null?void 0:Y.name)||"",companyId:e,tableName:A.value,setData:c,setError:l,setQuery:d,setLoading:o,isEnableGroupBy:p,setEnableGroupBy:g,setSelectedGroupBy:m}),C(pz,{data:p?f:u,error:s,isLoading:i,labels:Ih,funnelData:ll,chartType:H,datasets:ju,setChartType:q,setXAxis:Z,setYAxisList:bt,xAxis:X,setMeasure:Ni,setStep:se,step:ie,measure:or,setSankeyValues:ve,sankeyData:ul,previewTableDataList:Uu,singleValue:Qt,setSingleValue:Ta,singleValueData:ki,setMargins:F,margins:R,legendSettings:G,setLegendSettings:re,labelSettings:ue,setLabelSettings:De,axisSettings:vt,setAxisSettings:rt,updateGroup:Dn,isEnableGroupBy:p,backGroundColor:Yt,setBackGroundColor:Ct,customSettings:ne,setCustomSettings:ee})]})}),C(Ai,{headerTitle:"Generated Query",isOpen:S,onClose:()=>T(!1),children:C("div",{className:ny["query-modal"],children:v})}),C(Ai,{isOpen:D,onClose:()=>M(!1),headerTitle:"Save To Dashboard",children:C(xz,{onCancel:()=>M(!1),onSubmit:Jr,dashboardIds:[n],onDashboardChange:()=>{},companyId:e,error:Tn,isEmbedded:!0})})]})};var fn={container:"_container_i4dx9_1",form:"_form_i4dx9_7",filterHeader:"_filterHeader_i4dx9_13",titleContent:"_titleContent_i4dx9_19",title:"_title_i4dx9_19",buttons:"_buttons_i4dx9_31",apply:"_apply_i4dx9_37",applyIcon:"_applyIcon_i4dx9_43",reset:"_reset_i4dx9_49",filterFields:"_filterFields_i4dx9_55",filters:"_filters_i4dx9_61",filterItem:"_filterItem_i4dx9_67",filterItemOperator:"_filterItemOperator_i4dx9_73",remove:"_remove_i4dx9_79"},Ri={button:"_button_6buzy_1",menu:"_menu_6buzy_7",menuContainer:"_menuContainer_6buzy_13",buttonText:"_buttonText_6buzy_19",buttonIcon:"_buttonIcon_6buzy_25",filterName:"_filterName_6buzy_31",filterDropdown:"_filterDropdown_6buzy_37"};const Sz=({companyId:r,filter:e,onChange:t,selectedOption:n,autoSelected:a=!0,...i})=>{const[o,s]=B.useState([]),{fetchColumnValues:l}=ey();return B.useEffect(()=>{l({companyId:r,tableName:e.tableName,columnName:e.columnName},{onSuccess:u=>{var f;if(!((f=u.fetchColumnData)!=null&&f.data))return;const c=[];u.fetchColumnData.data.forEach(h=>{h&&c.push({label:h.label,value:h.value})}),s(c)}})},[e.tableName,e.columnName,r]),B.useEffect(()=>{o.length&&o[0]&&a&&t(o[0])},[o.length,o[0],a,e.columnName]),C(Nr,{onChange:t,selectedOption:e.defaultValue?{label:e.defaultValue,value:e.defaultValue}:n,isDisabled:!!e.defaultValue,options:o,label:e.columnName,...i})},Cz=pe.default.memo(({filter:r,companyId:e,autoSelected:t,onChange:n,selectedOptions:a,...i})=>{const[o,s]=B.useState([]),{fetchColumnValues:l}=ey();return B.useEffect(()=>{l({companyId:e,tableName:r.tableName,columnName:r.columnName},{onSuccess:u=>{var f;if(!((f=u.fetchColumnData)!=null&&f.data))return;const c=[];u.fetchColumnData.data.forEach(h=>{h&&c.push({label:h.label,value:h.value})}),s(c)}})},[r.tableName,r.columnName,e]),B.useEffect(()=>{o.length&&o[0]&&t&&n([o[0]])},[o.length,o[0],t,r.columnName]),C(K4,{onChange:n,selectedOptions:r.defaultValue?[{label:r.defaultValue,value:r.defaultValue}]:a,isDisabled:!!r.defaultValue,options:o,label:r.columnName,...i})}),XS=r=>["IN","NOT IN"].includes(r),Lh=r=>["IS NULL","IS NOT NULL"].includes(r),Tz=({filter:r,onChange:e,isResetted:t,companyId:n,tableName:a})=>{const[i,o]=B.useState({value:"",label:""}),[s,l]=B.useState({value:"",label:""}),[u,c]=B.useState([]),f=B.useMemo(()=>OT(r.dataType),[r.dataType]);return B.useEffect(()=>{!i.value||s.value!==""&&u.length||e({column:r.name,operator:i.value,value:Lh(i.value)?null:s.value||u.map(h=>h.value)})},[i,s.value,u]),B.useEffect(()=>{!t||(o({label:"",value:""}),l({label:"",value:""}),c([]))},[t]),C(Ce,{children:z(Dh,{buttonClass:Ri.button,menuClass:Ri.menu,position:"bottom-left",menuContainerClass:Ri.menuContainer,button:z(Ce,{children:[z("span",{className:Ri.buttonText,children:[C(US,{datatype:r.as||"unknown"}),r.name]}),C("span",{className:Ri.buttonIcon,children:C(ry,{})})]}),children:[C(de,{variant:"p",styleClass:"font-14",className:Ri.filterName,children:r.name}),C(Nr,{label:"Operator",labelVariant:"static",selectedOption:i,onChange:h=>o(h),options:gv}),i.value&&!Lh(i.value)?C(Ce,{children:f==="boolean"?C(Nr,{options:[{value:"true",label:"TRUE"},{value:"false",label:"FALSE"}],selectedOption:s,onChange:l,label:"Filter Value",labelVariant:"static",className:Ri.filterDropdown}):C(Ce,{children:XS(i.value)?C(Cz,{selectedOptions:u,onChange:c,filter:{tableName:a,columnName:r.name},companyId:n,isSearchEnabled:!0,label:"Filter Value",labelVariant:"static",className:Ri.filterDropdown,autoSelected:!1}):C(Sz,{selectedOption:s,onChange:l,filter:{tableName:a,columnName:r.name},companyId:n,isSearchEnabled:!0,label:"Filter Value",labelVariant:"static",className:Ri.filterDropdown,autoSelected:!1})})}):null]})})},khe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"none",stroke:"currentColor",strokeWidth:2,d:"M20 8c-1.403-2.96-4.463-5-8-5a9 9 0 1 0 0 18a9 9 0 0 0 9-9m0-9v6h-6"})}),Bhe=r=>C("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M24 9.4L22.6 8L16 14.6L9.4 8L8 9.4l6.6 6.6L8 22.6L9.4 24l6.6-6.6l6.6 6.6l1.4-1.4l-6.6-6.6L24 9.4z"})}),zhe=r=>XS(r.operator)?r.value.map(e=>["true","false"].includes(e)?e==="true":!Number.isNaN(e)&&Number(e)?Number(e):`'${e}'`):Lh(r.operator)?null:["true","false"].includes(r.value)?r.value==="true":!Number.isNaN(r.value)&&Number(r.value)?Number(r.value):`'${r.value}'`,Dz=({filters:r,onApply:e,companyId:t,renderAdditionalHeaderContent:n})=>{const[a,i]=B.useState([]),o=()=>{i([]),e({tableName:"",filters:[]})},s=l=>{l.preventDefault();const u=a.map(c=>{const f={column:c.column,operator:c.operator},h=zhe({operator:c.operator,value:c.value});return h!=null&&Object.assign(f,{...f,value:h}),f});e({tableName:r[0].tableName,filters:u})};return C(Ce,{children:z("div",{className:fn.container,children:[z("form",{className:fn.form,onSubmit:s,onReset:o,children:[z("div",{className:fn.filterHeader,children:[z("div",{className:fn.titleContent,children:[C(de,{variant:"p",styleClass:"primary",className:fn.title,children:"Filters:"}),n?n():null]}),z("div",{className:fn.buttons,children:[z(Le,{type:"submit",variant:"outlined",className:fn.apply,children:[C(HS,{className:fn.applyIcon})," Apply"]}),z(Le,{type:"reset",variant:"secondary",className:fn.reset,children:[C(khe,{})," Reset Filters"]})]})]}),C("div",{className:fn.filterFields,children:r[0].columns.map(l=>C(Tz,{tableName:r[0].tableName,filter:l,isResetted:!a.find(u=>u.column===l.name),onChange:u=>i(c=>{const f=c.findIndex(v=>v.column===u.column);if(f===-1)return[...c,u];const h=[...c];return h[f]=u,h}),companyId:t},l.name))})]}),a.length?C("ul",{className:fn.filters,children:a.map(l=>{var u;return z("li",{className:fn.filterItem,children:[l.column,C("span",{className:fn.filterItemOperator,children:((u=gv.find(c=>c.value===l.operator))==null?void 0:u.label)||""}),Lh(l.operator)?null:C(Ce,{children:Array.isArray(l.value)?`[${l.value.map(c=>c).join(",")}]`:l.value}),C(Le,{type:"button",variant:"custom",className:fn.remove,onClick:()=>i(c=>c.filter(f=>f.column!==l.column)),children:C(Bhe,{})})]},l.column)})}):null]})})},Fhe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"m16.95 6l-3.57 4.55l1.43 1.43c1.03-1.31 4.98-6.37 4.98-6.37A.998.998 0 0 0 19 4H6.83l2 2h8.12zM2.81 2.81L1.39 4.22L10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-2.17l5.78 5.78l1.41-1.41L2.81 2.81z"})}),Vhe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:z("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:2,children:[C("path",{d:"M3 5h4m14 0H11m-8 7h12m6 0h-2M3 19h2m16 0H9"}),C("circle",{cx:9,cy:5,r:2}),C("circle",{cx:17,cy:12,r:2}),C("circle",{cx:7,cy:19,r:2})]})}),Mz=pe.default.memo(({token:r,options:e,theme:t})=>{var u,c;const{data:n,isLoading:a}=q4(r),[i,o]=B.useState(!1),[s,l]=B.useState({tableName:"",filters:[]});return C(Ce,{children:z("div",{className:en["embedDashboard-container"],children:[((u=n.externalDashboard)==null?void 0:u.id)&&!a&&z(Ce,{children:[z("div",{className:(e==null?void 0:e.headerVariant)==="floating"?en["embedDashboard-header-floating"]:en["embedDashboard-header-static"],children:[(e==null?void 0:e.headerVariant)==="floating"&&C("span",{className:en.floatingButton,children:C(Vhe,{className:en.floatingButtonIcon})}),z("div",{className:(e==null?void 0:e.headerVariant)==="floating"?en.floatingContainer:en.staticContainer,children:[n.externalDashboard.filters.length?C(Le,{type:"button",variant:"custom",size:"large",className:(e==null?void 0:e.headerVariant)==="floating"?en.floatingFilterButton:en.filter,onClick:()=>o(f=>!f),children:i?C(Fhe,{className:en.floatingFilterButtonIcon}):C(HS,{className:en.floatingFilterButtonIcon})}):null,!(e!=null&&e.disableMetricCreation)&&n.isAllowedToCreateMetrics&&C(wz,{clientId:n.clientId,companyId:n.companyId,mode:n.mode,externalDashboardId:n.externalDashboard.id,variant:e==null?void 0:e.headerVariant})]})]}),z("div",{className:en["embedDashboard-wrapper"],children:[n.externalDashboard.filters.length&&i?C(Dz,{companyId:n.companyId,filters:n.externalDashboard.filters,onApply:f=>l(f)}):null,C(nz,{client:n.clientId,isLiveMode:n.mode,externalDashboardMetrics:n.externalDashboardMetrics,isMetricListLoading:a,globalFilters:s,breakpoint:t==null?void 0:t.breakpoint,layoutCols:t==null?void 0:t.metricLayoutCols,chartColors:e==null?void 0:e.chartColors,params:Array.isArray(n.rlsSettings)?n.rlsSettings:[],companyTenancyType:n.companyTenancyType})]})]}),a&&C("div",{className:en["alt-container"],children:C(zu,{style:{width:"50px",height:"50px",color:"blue"}})}),!a&&!((c=n.externalDashboard)!=null&&c.id)&&C("div",{className:en["alt-container"],children:"Invalid token or Dashboard id"})]})})});var Az={container:"_container_7vfcn_1",windowIcon:"_windowIcon_7vfcn_7"};const $he=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:z("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:1.5,children:[C("path",{d:"M15 21H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v10"}),C("path",{strokeLinejoin:"round",d:"M2 7h20M5 5.01l.01-.011M8 5.01l.01-.011M11 5.01l.01-.011M18 22.243l2.121-2.122m0 0L22.243 18m-2.122 2.121L18 18m2.121 2.121l2.122 2.122"})]})}),Lz=()=>z("div",{role:"alert",className:Az.container,children:[C($he,{className:Az.windowIcon}),C(de,{variant:"p",styleClass:"font-20",children:"Something went wrong!"}),C(Le,{variant:"primary",size:"large",type:"button",onClick:()=>location.reload(),children:"Try again"})]}),Hhe=new c3,Iz=({children:r})=>C(Uz,{FallbackComponent:Lz,children:C(g3,{client:Hhe,children:r})}),Ghe=pe.default.memo(({token:r,options:e,theme:t})=>(B.useEffect(()=>{!t||!Object.keys(t).length||LT(t)},[t]),C(Iz,{children:C(Mz,{token:r,options:e})})));var Whe=Object.freeze(Object.defineProperty({__proto__:null,SOMETHING_WENT_WRONG:xm,CHART_TYPES:Mt,STATUS_TAB:z$,STREAM_TAB:F$,CLIENT_NAME_VAR:V$,RLS_CONDITIONS:$$,CHART_TAB:_v,TABLE_TAB:sc,QUERY_TAB:H$,INPUT_TABLE:bv,OUTPUT_TABLE:lc,DOUGHNUT:wm,PIE:Sm,SANKEY:BT,BOXPLOT:zT,TABLE:G$,GENERAL:uc,CONFIG:xv,DESTINATIONS:Cm,operatorList:gv,RowLimitList:PT,AggregateList:gm,NUMBER_TYPES:ym,STRING_TYPES:mm,DATE_TYPES:_m,ARRAY_TYPES:ET,BOOLEAN_TYPES:bm},Symbol.toStringTag,{value:"Module"})),Uhe=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),jhe=Object.freeze(Object.defineProperty({__proto__:null,Button:Le,ChartConfig:lz,ChartModalOptions:uz,SelectField:ay,DataType:US,Error:sS,ErrorFallback:Lz,ExternalMetricForm:xz,FilterDropDown:Sz,MultiFilterDropdown:Cz,FloatingDropDown:Nr,MultiFloatingDropDown:K4,FullScreenChart:WS,isInFilterOperator:XS,isNullFilterOperator:Lh,FilterField:Tz,GlobalFilters:Dz,Tooltip:sz,InfoTooltip:Li,InputField:It,CsvDownloadButton:kT,MetricChart:Bg,EmbeddedMetricCreation:wz,MetricForm:yz,ConstructMetric:mz,Dataset:iz,Header:az,MetricOutput:pz,ChartTab:fz,TableTab:dz,MetricFilters:GS,MultipleTimeGrain:Q4,GridLayout:rz,ExternalMetricList:nz,MetricCard:ez,SingleValueCard:tz,MetricTable:hz,Modal:Ai,ModalFooter:Gu,PopoverMenu:Dh,SearchTab:Ch,Select:Zt,HookSelect:j4,SelectWithSubValue:Y4,DropDown:kfe,MultiSelect:Th,HookMultiSelect:Bfe,Tab:YS,Table:vz,Text:de,TextAreaField:_z,TimeGrainField:zS,ToggleButton:bz},Symbol.toStringTag,{value:"Module"}));Sr.Dashboard=Ghe,Sr.EmbeddedDashboard=Mz,Sr.PluginProvider=Iz,Sr.Ui=jhe,Sr.consts=Whe,Sr.helpers=Ufe,Sr.hooks=Vfe,Sr.types=Uhe,Sr.utils=I$,Object.defineProperties(Sr,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
327
+ `,children:a}):null]})]}),x3=({onSubmit:r,defaultValues:e,onCancel:t,isEmbedded:n=!0,dashboardIds:a,onDashboardChange:i,companyId:o,error:s})=>{var g,y,m;const{register:l,handleSubmit:u}=wS(),[c,f]=B.useState((g=e==null?void 0:e.isLive)!=null?g:!1),h=u(_=>{r({..._,isLive:c})}),{data:v}=w$({companyId:o}),d=v==null?void 0:v.externalDashboards,p=n?(y=d==null?void 0:d.filter(_=>_.id===a[0]).map(_=>({value:_.id,label:_.name})))!=null?y:[]:(m=d==null?void 0:d.map(_=>({value:_.id,label:_.name})))!=null?m:[];return z("form",{className:Ei.form,onSubmit:h,children:[z("div",{className:Ei.container,children:[C("div",{className:Ei.field,children:C(Th,{label:"Dashboards",options:p,name:"dashboards",value:a,onChange:i})}),C(It,{name:"name",type:"text",placeholder:"What is the name of metric?",label:"Metric Name",register:l("name",{required:!0}),defaultValue:e==null?void 0:e.name}),C(It,{name:"name",type:"text",placeholder:"Unique Id to identify metric",label:"Metric ID",register:l("metricId",{required:!0,disabled:!!(e!=null&&e.metricId)}),defaultValue:e==null?void 0:e.metricId}),C(_3,{className:Ei.field,id:"desc",placeholder:"What is the name of metric?",label:"Description",rows:5,register:l("description"),defaultValue:e==null?void 0:e.description}),!n&&C(b3,{className:Ei.field,labelClassName:Ei.fieldLabel,enabled:c,onChange:f,label:"Publish Type",placeholder:c?"LIVE MODE":"TEST MODE",defaultEnabled:e==null?void 0:e.isLive})]}),!!s&&C(de,{variant:"p",styleClass:"font-14",className:Ei.error,children:s}),z(Gu,{children:[C(Le,{type:"reset",variant:"secondary",className:Ei.cancel,onClick:t,size:"default",children:"Cancel"}),C(Le,{type:"submit",variant:"primary",size:"small",className:Ei.save,isDisabled:!p.length||!a.length,children:"Save"})]})]})},Nhe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2Z"})}),w3=({clientId:r,companyId:e,mode:t,externalDashboardId:n,variant:a="static"})=>{var Ja;const[i,o]=B.useState(!1),[s,l]=B.useState(""),[u,c]=B.useState(),[f,h]=B.useState([]),[v,d]=B.useState(""),[p,g]=B.useState(!1),[y,m]=B.useState([]),[_,b]=B.useState(),[w,x]=B.useState(!1),[S,T]=B.useState(!1),[D,M]=B.useState(!1),[A,I]=B.useState({value:"",label:""}),[P,E]=B.useState([]);B.useEffect(()=>{y.length&&b({column:y[0]})},[y]);const{mutate:O}=g$(),N=B.useMemo(()=>P.map(ct=>({value:ct.tableName,label:ct.tableName})),[P]),V=B.useMemo(()=>P.find(ct=>ct.tableName===A.value),[A.value,P]),$=B.useMemo(()=>(V==null?void 0:V.columns.map(({name:ct,as:hn})=>({value:ct,label:hn})))||[],[V]);B.useEffect(()=>{N.length&&I(N[0])},[N]);const U=B.useMemo(()=>(V==null?void 0:V.columns.filter(({datatype:ct})=>_m.includes(ct.toLowerCase())))||[],[V]),[Y,ae]=B.useState();B.useEffect(()=>{r&&e&&O({clientId:r,companyId:e},{onSuccess(ct){var ft;const hn=(ft=ct.companySubsetTableData)==null?void 0:ft.error,Ie=ct.companySubsetTableData;hn?l(hn.message):(ae({id:Ie==null?void 0:Ie.companyIntegrationId,name:Ie==null?void 0:Ie.dbName}),E(Ie==null?void 0:Ie.tableList))}})},[r,e,O]);const[H,q]=B.useState("bar"),[X,Z]=B.useState(),[ie,se]=B.useState(),[te,ve]=B.useState(),[R,F]=B.useState({marginTop:20,marginBottom:20,marginLeft:5,marginRight:5}),[G,re]=B.useState({show:!0,top:0,left:0,right:0,bottom:0,position:"horizontal"}),[ne,ee]=B.useState({hideSplitLines:"none",hideAxisLines:"none",barWidth:40,barRadius:0,axisLabels:"none",fontSize:14,subHeaderShow:!1,displayText:"",subHeaderFontSize:0,dateFormatter:"none",numberFormatter:"original"}),[ue,De]=B.useState({axis:"left",show:!1,position:"hidden"}),[vt,rt]=B.useState({axis:"left"}),[Yt,Ct]=B.useState({show:!1}),[Qr]=B.useState(),[St,bt]=B.useState(),[Qt,Ta]=B.useState(),[or,Ni]=B.useState(),[Uu,Kr]=B.useState(),{datasets:ju,funnelData:ll,labels:Ih,sankeyData:ul,singleValueData:ki}=pm({data:p?f:u,measure:or,sankeyValues:te,singleValue:Qt,step:ie,xAxis:X,yAxisList:St});B.useEffect(()=>{if(f.length&&p){const ct=oS(f[0]);Z(ct.stringKeys[0]),bt(ct.numberKeys),se(ct.stringKeys[0]),Ni(ct.numberKeys[0])}},[f]),B.useEffect(()=>{if((u==null?void 0:u.length)&&!p){const ct=Object.keys(u[0]);Z(ct[0]),bt(ct.slice(1))}},[u,p]);const{createExternalMetric:Jr,error:Tn}=Z4({query:v,xAxis:X,backGroundColor:Yt,customSettings:ne,chartType:H,yAxisList:St,step:ie,measure:or,sankeyValues:te,singleValue:Qt,companyIntegrationId:Y==null?void 0:Y.id,integrationName:Y==null?void 0:Y.name,margins:R,legendSettings:G,labelSettings:ue,axisSettings:vt,metricQuery:Qr,outputColumns:void 0,selectedColumns:void 0,clientId:r,isEmbedded:!0,companyId:e,mode:t,dashboardIds:[n],isEnableGroupBy:p,groupBy:_,selectedGroupBy:y}),{mutate:Da}=A$();B.useEffect(()=>{A.value&&Da({companyId:e,tableName:A.value,limit:10},{onSuccess(ct){var Ie;const hn=(Ie=ct.previewTable)==null?void 0:Ie.data;Kr(hn?[hn]:void 0)}})},[A]),B.useEffect(()=>{(u==null?void 0:u.length)&&y.length&&wa(u,[y[0]],y,h)},[u]);const Dn=ct=>{if((_==null?void 0:_.column)&&ct&&ct!=="undefined"){if(y.lastIndexOf(_.column)!==y.length-1){const hn=y.indexOf(_.column),Ie=_.column;b({column:y[hn+1],parentColumn:{column:_.column,value:ct}}),wa(u==null?void 0:u.filter(ft=>ft[Ie]===ct),[y[hn+1]],y,h)}y.lastIndexOf(_.column)===y.length-1&&(b({column:y[0]}),wa(u,[y[0]],y,h))}else b({column:y[0]}),wa(u,[y[0]],y,h)};return B.useEffect(()=>{f.length===0&&p&&y.length&&(u==null?void 0:u.length)&&(b({column:y[0]}),wa(u,[y[0]],y,h))},[f,p,y]),z(Ce,{children:[C(Le,{type:"button",variant:a==="floating"?"custom":"primary",size:"large",className:a==="floating"?ny.floatingCreateButton:"",onClick:()=>x(!0),children:a==="floating"?C(Nhe,{className:ny.floatingCreateButtonIcon}):"Create Metric"}),C(Ai,{headerTitle:"Create Metric",isOpen:w,onClose:()=>x(!1),customHeader:C(a3,{Heading:"Create Metric",setShowMetricCreateModal:x,isDisableSqlBtn:!v,isDisableSaveBtn:!(or!=null&&or.length)&&!((Ja=St==null?void 0:St.filter(ct=>ct))!=null&&Ja.length)&&!Qt,setShowSqlModal:T,setShowSaveMetricModal:M}),children:z("div",{className:ny["modal-container"],children:[C(i3,{setselectTable:I,selectTable:A,tableList:N,columnList:(V==null?void 0:V.columns)||[]}),C(m3,{dateTimeColumnList:U,columnList:$,database:(Y==null?void 0:Y.name)||"",companyId:e,tableName:A.value,setData:c,setError:l,setQuery:d,setLoading:o,isEnableGroupBy:p,setEnableGroupBy:g,setSelectedGroupBy:m}),C(p3,{data:p?f:u,error:s,isLoading:i,labels:Ih,funnelData:ll,chartType:H,datasets:ju,setChartType:q,setXAxis:Z,setYAxisList:bt,xAxis:X,setMeasure:Ni,setStep:se,step:ie,measure:or,setSankeyValues:ve,sankeyData:ul,previewTableDataList:Uu,singleValue:Qt,setSingleValue:Ta,singleValueData:ki,setMargins:F,margins:R,legendSettings:G,setLegendSettings:re,labelSettings:ue,setLabelSettings:De,axisSettings:vt,setAxisSettings:rt,updateGroup:Dn,isEnableGroupBy:p,backGroundColor:Yt,setBackGroundColor:Ct,customSettings:ne,setCustomSettings:ee})]})}),C(Ai,{headerTitle:"Generated Query",isOpen:S,onClose:()=>T(!1),children:C("div",{className:ny["query-modal"],children:v})}),C(Ai,{isOpen:D,onClose:()=>M(!1),headerTitle:"Save To Dashboard",children:C(x3,{onCancel:()=>M(!1),onSubmit:Jr,dashboardIds:[n],onDashboardChange:()=>{},companyId:e,error:Tn,isEmbedded:!0})})]})};var fn={container:"_container_i4dx9_1",form:"_form_i4dx9_7",filterHeader:"_filterHeader_i4dx9_13",titleContent:"_titleContent_i4dx9_19",title:"_title_i4dx9_19",buttons:"_buttons_i4dx9_31",apply:"_apply_i4dx9_37",applyIcon:"_applyIcon_i4dx9_43",reset:"_reset_i4dx9_49",filterFields:"_filterFields_i4dx9_55",filters:"_filters_i4dx9_61",filterItem:"_filterItem_i4dx9_67",filterItemOperator:"_filterItemOperator_i4dx9_73",remove:"_remove_i4dx9_79"},Ri={button:"_button_6buzy_1",menu:"_menu_6buzy_7",menuContainer:"_menuContainer_6buzy_13",buttonText:"_buttonText_6buzy_19",buttonIcon:"_buttonIcon_6buzy_25",filterName:"_filterName_6buzy_31",filterDropdown:"_filterDropdown_6buzy_37"};const S3=({companyId:r,filter:e,onChange:t,selectedOption:n,autoSelected:a=!0,...i})=>{const[o,s]=B.useState([]),{fetchColumnValues:l}=ey();return B.useEffect(()=>{l({companyId:r,tableName:e.tableName,columnName:e.columnName},{onSuccess:u=>{var f;if(!((f=u.fetchColumnData)!=null&&f.data))return;const c=[];u.fetchColumnData.data.forEach(h=>{h&&c.push({label:h.label,value:h.value})}),s(c)}})},[e.tableName,e.columnName,r]),B.useEffect(()=>{o.length&&o[0]&&a&&t(o[0])},[o.length,o[0],a,e.columnName]),C(Nr,{onChange:t,selectedOption:e.defaultValue?{label:e.defaultValue,value:e.defaultValue}:n,isDisabled:!!e.defaultValue,options:o,label:e.columnName,...i})},C3=pe.default.memo(({filter:r,companyId:e,autoSelected:t,onChange:n,selectedOptions:a,...i})=>{const[o,s]=B.useState([]),{fetchColumnValues:l}=ey();return B.useEffect(()=>{l({companyId:e,tableName:r.tableName,columnName:r.columnName},{onSuccess:u=>{var f;if(!((f=u.fetchColumnData)!=null&&f.data))return;const c=[];u.fetchColumnData.data.forEach(h=>{h&&c.push({label:h.label,value:h.value})}),s(c)}})},[r.tableName,r.columnName,e]),B.useEffect(()=>{o.length&&o[0]&&t&&n([o[0]])},[o.length,o[0],t,r.columnName]),C(K4,{onChange:n,selectedOptions:r.defaultValue?[{label:r.defaultValue,value:r.defaultValue}]:a,isDisabled:!!r.defaultValue,options:o,label:r.columnName,...i})}),XS=r=>["IN","NOT IN"].includes(r),Lh=r=>["IS NULL","IS NOT NULL"].includes(r),T3=({filter:r,onChange:e,isResetted:t,companyId:n,tableName:a})=>{const[i,o]=B.useState({value:"",label:""}),[s,l]=B.useState({value:"",label:""}),[u,c]=B.useState([]),f=B.useMemo(()=>OT(r.dataType),[r.dataType]);return B.useEffect(()=>{!i.value||s.value!==""&&u.length||e({column:r.name,operator:i.value,value:Lh(i.value)?null:s.value||u.map(h=>h.value)})},[i,s.value,u]),B.useEffect(()=>{!t||(o({label:"",value:""}),l({label:"",value:""}),c([]))},[t]),C(Ce,{children:z(Dh,{buttonClass:Ri.button,menuClass:Ri.menu,position:"bottom-left",menuContainerClass:Ri.menuContainer,button:z(Ce,{children:[z("span",{className:Ri.buttonText,children:[C(US,{datatype:r.as||"unknown"}),r.name]}),C("span",{className:Ri.buttonIcon,children:C(ry,{})})]}),children:[C(de,{variant:"p",styleClass:"font-14",className:Ri.filterName,children:r.name}),C(Nr,{label:"Operator",labelVariant:"static",selectedOption:i,onChange:h=>o(h),options:gv}),i.value&&!Lh(i.value)?C(Ce,{children:f==="boolean"?C(Nr,{options:[{value:"true",label:"TRUE"},{value:"false",label:"FALSE"}],selectedOption:s,onChange:l,label:"Filter Value",labelVariant:"static",className:Ri.filterDropdown}):C(Ce,{children:XS(i.value)?C(C3,{selectedOptions:u,onChange:c,filter:{tableName:a,columnName:r.name},companyId:n,isSearchEnabled:!0,label:"Filter Value",labelVariant:"static",className:Ri.filterDropdown,autoSelected:!1}):C(S3,{selectedOption:s,onChange:l,filter:{tableName:a,columnName:r.name},companyId:n,isSearchEnabled:!0,label:"Filter Value",labelVariant:"static",className:Ri.filterDropdown,autoSelected:!1})})}):null]})})},khe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"none",stroke:"currentColor",strokeWidth:2,d:"M20 8c-1.403-2.96-4.463-5-8-5a9 9 0 1 0 0 18a9 9 0 0 0 9-9m0-9v6h-6"})}),Bhe=r=>C("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M24 9.4L22.6 8L16 14.6L9.4 8L8 9.4l6.6 6.6L8 22.6L9.4 24l6.6-6.6l6.6 6.6l1.4-1.4l-6.6-6.6L24 9.4z"})}),zhe=r=>XS(r.operator)?r.value.map(e=>["true","false"].includes(e)?e==="true":!Number.isNaN(e)&&Number(e)?Number(e):`'${e}'`):Lh(r.operator)?null:["true","false"].includes(r.value)?r.value==="true":!Number.isNaN(r.value)&&Number(r.value)?Number(r.value):`'${r.value}'`,D3=({filters:r,onApply:e,companyId:t,renderAdditionalHeaderContent:n})=>{const[a,i]=B.useState([]),o=()=>{i([]),e({tableName:"",filters:[]})},s=l=>{l.preventDefault();const u=a.map(c=>{const f={column:c.column,operator:c.operator},h=zhe({operator:c.operator,value:c.value});return h!=null&&Object.assign(f,{...f,value:h}),f});e({tableName:r[0].tableName,filters:u})};return C(Ce,{children:z("div",{className:fn.container,children:[z("form",{className:fn.form,onSubmit:s,onReset:o,children:[z("div",{className:fn.filterHeader,children:[z("div",{className:fn.titleContent,children:[C(de,{variant:"p",styleClass:"primary",className:fn.title,children:"Filters:"}),n?n():null]}),z("div",{className:fn.buttons,children:[z(Le,{type:"submit",variant:"outlined",className:fn.apply,children:[C(HS,{className:fn.applyIcon})," Apply"]}),z(Le,{type:"reset",variant:"secondary",className:fn.reset,children:[C(khe,{})," Reset Filters"]})]})]}),C("div",{className:fn.filterFields,children:r[0].columns.map(l=>C(T3,{tableName:r[0].tableName,filter:l,isResetted:!a.find(u=>u.column===l.name),onChange:u=>i(c=>{const f=c.findIndex(v=>v.column===u.column);if(f===-1)return[...c,u];const h=[...c];return h[f]=u,h}),companyId:t},l.name))})]}),a.length?C("ul",{className:fn.filters,children:a.map(l=>{var u;return z("li",{className:fn.filterItem,children:[l.column,C("span",{className:fn.filterItemOperator,children:((u=gv.find(c=>c.value===l.operator))==null?void 0:u.label)||""}),Lh(l.operator)?null:C(Ce,{children:Array.isArray(l.value)?`[${l.value.map(c=>c).join(",")}]`:l.value}),C(Le,{type:"button",variant:"custom",className:fn.remove,onClick:()=>i(c=>c.filter(f=>f.column!==l.column)),children:C(Bhe,{})})]},l.column)})}):null]})})},Fhe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"m16.95 6l-3.57 4.55l1.43 1.43c1.03-1.31 4.98-6.37 4.98-6.37A.998.998 0 0 0 19 4H6.83l2 2h8.12zM2.81 2.81L1.39 4.22L10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-2.17l5.78 5.78l1.41-1.41L2.81 2.81z"})}),Vhe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:z("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:2,children:[C("path",{d:"M3 5h4m14 0H11m-8 7h12m6 0h-2M3 19h2m16 0H9"}),C("circle",{cx:9,cy:5,r:2}),C("circle",{cx:17,cy:12,r:2}),C("circle",{cx:7,cy:19,r:2})]})}),M3=pe.default.memo(({token:r,options:e,theme:t})=>{var u,c;const{data:n,isLoading:a}=q4(r),[i,o]=B.useState(!1),[s,l]=B.useState({tableName:"",filters:[]});return C(Ce,{children:z("div",{className:en["embedDashboard-container"],children:[((u=n.externalDashboard)==null?void 0:u.id)&&!a&&z(Ce,{children:[z("div",{className:(e==null?void 0:e.headerVariant)==="floating"?en["embedDashboard-header-floating"]:en["embedDashboard-header-static"],children:[(e==null?void 0:e.headerVariant)==="floating"&&C("span",{className:en.floatingButton,children:C(Vhe,{className:en.floatingButtonIcon})}),z("div",{className:(e==null?void 0:e.headerVariant)==="floating"?en.floatingContainer:en.staticContainer,children:[n.externalDashboard.filters.length?C(Le,{type:"button",variant:"custom",size:"large",className:(e==null?void 0:e.headerVariant)==="floating"?en.floatingFilterButton:en.filter,onClick:()=>o(f=>!f),children:i?C(Fhe,{className:en.floatingFilterButtonIcon}):C(HS,{className:en.floatingFilterButtonIcon})}):null,!(e!=null&&e.disableMetricCreation)&&n.isAllowedToCreateMetrics&&C(w3,{clientId:n.clientId,companyId:n.companyId,mode:n.mode,externalDashboardId:n.externalDashboard.id,variant:e==null?void 0:e.headerVariant})]})]}),z("div",{className:en["embedDashboard-wrapper"],children:[n.externalDashboard.filters.length&&i?C(D3,{companyId:n.companyId,filters:n.externalDashboard.filters,onApply:f=>l(f)}):null,C(n3,{client:n.clientId,isLiveMode:n.mode,externalDashboardMetrics:n.externalDashboardMetrics,isMetricListLoading:a,globalFilters:s,breakpoint:t==null?void 0:t.breakpoint,layoutCols:t==null?void 0:t.metricLayoutCols,chartColors:e==null?void 0:e.chartColors,params:Array.isArray(n.rlsSettings)?n.rlsSettings:[],companyTenancyType:n.companyTenancyType})]})]}),a&&C("div",{className:en["alt-container"],children:C(zu,{style:{width:"50px",height:"50px",color:"blue"}})}),!a&&!((c=n.externalDashboard)!=null&&c.id)&&C("div",{className:en["alt-container"],children:"Invalid token or Dashboard id"})]})})});var A3={container:"_container_7vfcn_1",windowIcon:"_windowIcon_7vfcn_7"};const $he=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:z("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:1.5,children:[C("path",{d:"M15 21H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v10"}),C("path",{strokeLinejoin:"round",d:"M2 7h20M5 5.01l.01-.011M8 5.01l.01-.011M11 5.01l.01-.011M18 22.243l2.121-2.122m0 0L22.243 18m-2.122 2.121L18 18m2.121 2.121l2.122 2.122"})]})}),L3=()=>z("div",{role:"alert",className:A3.container,children:[C($he,{className:A3.windowIcon}),C(de,{variant:"p",styleClass:"font-20",children:"Something went wrong!"}),C(Le,{variant:"primary",size:"large",type:"button",onClick:()=>location.reload(),children:"Try again"})]}),Hhe=new cz,I3=({children:r})=>C(U3,{FallbackComponent:L3,children:C(gz,{client:Hhe,children:r})}),Ghe=pe.default.memo(({token:r,options:e,theme:t})=>(B.useEffect(()=>{!t||!Object.keys(t).length||LT(t)},[t]),C(I3,{children:C(M3,{token:r,options:e})})));var Whe=Object.freeze(Object.defineProperty({__proto__:null,SOMETHING_WENT_WRONG:xm,CHART_TYPES:Mt,STATUS_TAB:z$,STREAM_TAB:F$,CLIENT_NAME_VAR:V$,RLS_CONDITIONS:$$,CHART_TAB:_v,TABLE_TAB:sc,QUERY_TAB:H$,INPUT_TABLE:bv,OUTPUT_TABLE:lc,DOUGHNUT:wm,PIE:Sm,SANKEY:BT,BOXPLOT:zT,TABLE:G$,GENERAL:uc,CONFIG:xv,DESTINATIONS:Cm,operatorList:gv,RowLimitList:PT,AggregateList:gm,NUMBER_TYPES:ym,STRING_TYPES:mm,DATE_TYPES:_m,ARRAY_TYPES:ET,BOOLEAN_TYPES:bm},Symbol.toStringTag,{value:"Module"})),Uhe=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),jhe=Object.freeze(Object.defineProperty({__proto__:null,Button:Le,ChartConfig:l3,ChartModalOptions:u3,SelectField:ay,DataType:US,Error:sS,ErrorFallback:L3,ExternalMetricForm:x3,FilterDropDown:S3,MultiFilterDropdown:C3,FloatingDropDown:Nr,MultiFloatingDropDown:K4,FullScreenChart:WS,isInFilterOperator:XS,isNullFilterOperator:Lh,FilterField:T3,GlobalFilters:D3,Tooltip:s3,InfoTooltip:Li,InputField:It,CsvDownloadButton:kT,MetricChart:Bg,EmbeddedMetricCreation:w3,MetricForm:y3,ConstructMetric:m3,Dataset:i3,Header:a3,MetricOutput:p3,ChartTab:f3,TableTab:d3,MetricFilters:GS,MultipleTimeGrain:Q4,GridLayout:r3,ExternalMetricList:n3,MetricCard:e3,SingleValueCard:t3,MetricTable:h3,Modal:Ai,ModalFooter:Gu,PopoverMenu:Dh,SearchTab:Ch,Select:Zt,HookSelect:j4,SelectWithSubValue:Y4,DropDown:kfe,MultiSelect:Th,HookMultiSelect:Bfe,Tab:YS,Table:v3,Text:de,TextAreaField:_3,TimeGrainField:zS,ToggleButton:b3},Symbol.toStringTag,{value:"Module"}));Sr.Dashboard=Ghe,Sr.EmbeddedDashboard=M3,Sr.PluginProvider=I3,Sr.Ui=jhe,Sr.consts=Whe,Sr.helpers=Ufe,Sr.hooks=Vfe,Sr.types=Uhe,Sr.utils=I$,Object.defineProperties(Sr,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});