@databrainhq/plugin 0.7.13 → 0.7.14

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.
Files changed (106) hide show
  1. package/package.json +2 -3
  2. package/dist/components/Button/index.d.ts +0 -13
  3. package/dist/components/ChartModal/ChartConfig.d.ts +0 -18
  4. package/dist/components/ChartModal/ChartModalOptions.d.ts +0 -6
  5. package/dist/components/ChartModal/SelectField.d.ts +0 -2
  6. package/dist/components/ChartModal/index.d.ts +0 -3
  7. package/dist/components/Charts/AreaChart.d.ts +0 -3
  8. package/dist/components/Charts/BarChart.d.ts +0 -24
  9. package/dist/components/Charts/BoxPlot.d.ts +0 -3
  10. package/dist/components/Charts/BubbleChart.d.ts +0 -3
  11. package/dist/components/Charts/ComboChart.d.ts +0 -3
  12. package/dist/components/Charts/DoughnutChart.d.ts +0 -3
  13. package/dist/components/Charts/FunnelChart.d.ts +0 -3
  14. package/dist/components/Charts/GaugeChart.d.ts +0 -3
  15. package/dist/components/Charts/Histogram.d.ts +0 -3
  16. package/dist/components/Charts/LineChart.d.ts +0 -25
  17. package/dist/components/Charts/PieChart.d.ts +0 -3
  18. package/dist/components/Charts/RowChart.d.ts +0 -3
  19. package/dist/components/Charts/SankeyChart.d.ts +0 -3
  20. package/dist/components/Charts/ScatterChart.d.ts +0 -3
  21. package/dist/components/Charts/SingleValueChart/index.d.ts +0 -3
  22. package/dist/components/Charts/StackedBarChart.d.ts +0 -3
  23. package/dist/components/Charts/SteppedAreaChart.d.ts +0 -3
  24. package/dist/components/Charts/Table/TableChart.d.ts +0 -3
  25. package/dist/components/Charts/WaterfallChart.d.ts +0 -3
  26. package/dist/components/DataType/index.d.ts +0 -2
  27. package/dist/components/Error/index.d.ts +0 -6
  28. package/dist/components/ErrorFallback/index.d.ts +0 -2
  29. package/dist/components/ExternalMetricForm/index.d.ts +0 -15
  30. package/dist/components/FilterDropDown/index.d.ts +0 -11
  31. package/dist/components/FilterField/index.d.ts +0 -21
  32. package/dist/components/FloatingDropDown/index.d.ts +0 -23
  33. package/dist/components/FullScreenChart/index.d.ts +0 -9
  34. package/dist/components/GlobalFilters/index.d.ts +0 -11
  35. package/dist/components/InfoTooltip/index.d.ts +0 -8
  36. package/dist/components/InputField/index.d.ts +0 -15
  37. package/dist/components/MetricChart/CsvDownloadButton.d.ts +0 -10
  38. package/dist/components/MetricChart/MetricChart.d.ts +0 -36
  39. package/dist/components/MetricChart/index.d.ts +0 -2
  40. package/dist/components/MetricCreation/MetricCreation.d.ts +0 -3
  41. package/dist/components/MetricCreation/components/ConstructMetric/ConstructMetric.d.ts +0 -3
  42. package/dist/components/MetricCreation/components/ConstructMetric/components/MetricForm/index.d.ts +0 -3
  43. package/dist/components/MetricCreation/components/ConstructMetric/index.d.ts +0 -2
  44. package/dist/components/MetricCreation/components/Dataset/index.d.ts +0 -3
  45. package/dist/components/MetricCreation/components/Header/index.d.ts +0 -3
  46. package/dist/components/MetricCreation/components/MetricOutput/MetricOutput.d.ts +0 -3
  47. package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/components/ChartConfigure/index.d.ts +0 -20
  48. package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/components/ChartSettings/index.d.ts +0 -32
  49. package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/index.d.ts +0 -50
  50. package/dist/components/MetricCreation/components/MetricOutput/components/TableTab/components/InputTables/index.d.ts +0 -2
  51. package/dist/components/MetricCreation/components/MetricOutput/components/TableTab/index.d.ts +0 -9
  52. package/dist/components/MetricCreation/components/MetricOutput/index.d.ts +0 -3
  53. package/dist/components/MetricCreation/index.d.ts +0 -5
  54. package/dist/components/MetricList/MetricList.d.ts +0 -45
  55. package/dist/components/MetricList/components/MetricCard.d.ts +0 -18
  56. package/dist/components/MetricList/components/SingleValueCard.d.ts +0 -3
  57. package/dist/components/MetricList/index.d.ts +0 -3
  58. package/dist/components/MetricTable/index.d.ts +0 -7
  59. package/dist/components/Modal/Modal.d.ts +0 -9
  60. package/dist/components/Modal/ModalFooter.d.ts +0 -5
  61. package/dist/components/Modal/index.d.ts +0 -2
  62. package/dist/components/PopoverMenu/index.d.ts +0 -11
  63. package/dist/components/SearchTab/index.d.ts +0 -2
  64. package/dist/components/Select/index.d.ts +0 -48
  65. package/dist/components/Tab/index.d.ts +0 -10
  66. package/dist/components/Table/index.d.ts +0 -8
  67. package/dist/components/Text/index.d.ts +0 -10
  68. package/dist/components/TextAreaField/index.d.ts +0 -19
  69. package/dist/components/TimeGrainField/index.d.ts +0 -13
  70. package/dist/components/ToggleButton/index.d.ts +0 -12
  71. package/dist/components/index.d.ts +0 -27
  72. package/dist/consts/app.d.ts +0 -39
  73. package/dist/consts/index.d.ts +0 -2
  74. package/dist/consts/metricOptions.d.ts +0 -17
  75. package/dist/containers/Dashboard/Dashboard.d.ts +0 -4
  76. package/dist/containers/Dashboard/EmbededDashboard.d.ts +0 -12
  77. package/dist/containers/Dashboard/index.d.ts +0 -2
  78. package/dist/containers/index.d.ts +0 -1
  79. package/dist/helpers/cardActions.d.ts +0 -4
  80. package/dist/helpers/getModifiedQuery.d.ts +0 -6
  81. package/dist/helpers/getTimeFilterValue.d.ts +0 -8
  82. package/dist/helpers/groupArray.d.ts +0 -1
  83. package/dist/helpers/groupBy.d.ts +0 -6
  84. package/dist/helpers/index.d.ts +0 -4
  85. package/dist/hooks/index.d.ts +0 -5
  86. package/dist/hooks/useEmbeddedDashboard.d.ts +0 -53
  87. package/dist/hooks/useExternalMetric.d.ts +0 -39
  88. package/dist/hooks/useGenerateDatasetMetrics.d.ts +0 -13
  89. package/dist/hooks/useGenerateEmbeddedMetric.d.ts +0 -15
  90. package/dist/hooks/useOutsideAlerter.d.ts +0 -7
  91. package/dist/index.d.ts +0 -7
  92. package/dist/index.es.js +0 -91987
  93. package/dist/index.umd.js +0 -328
  94. package/dist/style.css +0 -1
  95. package/dist/types/app.d.ts +0 -132
  96. package/dist/types/index.d.ts +0 -2
  97. package/dist/types/metricCreate.d.ts +0 -132
  98. package/dist/typings.d.ts +0 -17
  99. package/dist/utils/arrayToCsvString.d.ts +0 -6
  100. package/dist/utils/colors.d.ts +0 -1
  101. package/dist/utils/fetcher.d.ts +0 -1
  102. package/dist/utils/generated/graphql.d.ts +0 -1746
  103. package/dist/utils/getChartAttributes.d.ts +0 -27
  104. package/dist/utils/getFormattedDataType.d.ts +0 -1
  105. package/dist/utils/index.d.ts +0 -5
  106. package/dist/utils/theme.d.ts +0 -87
package/dist/index.umd.js DELETED
@@ -1,328 +0,0 @@
1
- (function(Tr,z){typeof exports=="object"&&typeof module!="undefined"?z(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],z):(Tr=typeof globalThis!="undefined"?globalThis:Tr||self,z(Tr.Databrain={},Tr.React,Tr.ReactDOM))})(this,function(Tr,z,H4){"use strict";function KS(r){return r&&typeof r=="object"&&"default"in r?r:{default:r}}function G4(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 _y=G4(z),pe=KS(z),zh=KS(H4);function by(r,e){return by=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},by(r,e)}function ko(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,by(r,e)}var W4=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])})},JS={error:null},U4=function(r){ko(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=JS,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(JS)},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&&W4(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(_y.isValidElement(l))return l;if(typeof o=="function")return o(u);if(s)return _y.createElement(s,u);throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},e}(_y.Component),ml=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 Je(){return Je=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},Je.apply(this,arguments)}var Bh=typeof window=="undefined";function dr(){}function j4(r,e){return typeof r=="function"?r(e):r}function xy(r){return typeof r=="number"&&r>=0&&r!==1/0}function Fh(r){return Array.isArray(r)?r:[r]}function eC(r,e){return Math.max(r+(e||0)-Date.now(),0)}function Vh(r,e,t){return Ju(r)?typeof e=="function"?Je({},t,{queryKey:r,queryFn:e}):Je({},e,{queryKey:r}):r}function Y4(r,e,t){return Ju(r)?typeof e=="function"?Je({},t,{mutationKey:r,mutationFn:e}):Je({},e,{mutationKey:r}):typeof r=="function"?Je({},e,{mutationFn:r}):Je({},r)}function zi(r,e,t){return Ju(r)?[Je({},e,{queryKey:r}),t]:[r||{},e]}function q4(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 tC(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(Ju(s)){if(n){if(e.queryHash!==wy(s,e.options))return!1}else if(!$h(e.queryKey,s))return!1}var u=q4(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 rC(r,e){var t=r.exact,n=r.fetching,a=r.predicate,i=r.mutationKey;if(Ju(i)){if(!e.options.mutationKey)return!1;if(t){if(zo(e.options.mutationKey)!==zo(i))return!1}else if(!$h(e.options.mutationKey,i))return!1}return!(typeof n=="boolean"&&e.state.status==="loading"!==n||a&&!a(e))}function wy(r,e){var t=(e==null?void 0:e.queryKeyHashFn)||zo;return t(r)}function zo(r){var e=Fh(r);return Z4(e)}function Z4(r){return JSON.stringify(r,function(e,t){return Sy(t)?Object.keys(t).sort().reduce(function(n,a){return n[a]=t[a],n},{}):t})}function $h(r,e){return nC(Fh(r),Fh(e))}function nC(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!nC(r[t],e[t])}):!1}function Hh(r,e){if(r===e)return r;var t=Array.isArray(r)&&Array.isArray(e);if(t||Sy(r)&&Sy(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]=Hh(r[u],e[u]),o[u]===r[u]&&s++}return n===i&&s===n?r:o}return e}function X4(r,e){if(r&&!e||e&&!r)return!1;for(var t in r)if(r[t]!==e[t])return!1;return!0}function Sy(r){if(!aC(r))return!1;var e=r.constructor;if(typeof e=="undefined")return!0;var t=e.prototype;return!(!aC(t)||!t.hasOwnProperty("isPrototypeOf"))}function aC(r){return Object.prototype.toString.call(r)==="[object Object]"}function Ju(r){return typeof r=="string"||Array.isArray(r)}function Q4(r){return new Promise(function(e){setTimeout(e,r)})}function iC(r){Promise.resolve().then(r).catch(function(e){return setTimeout(function(){throw e})})}function oC(){if(typeof AbortController=="function")return new AbortController}var K4=function(r){ko(e,r);function e(){var n;return n=r.call(this)||this,n.setup=function(a){var i;if(!Bh&&((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}(ml),ec=new K4,J4=function(r){ko(e,r);function e(){var n;return n=r.call(this)||this,n.setup=function(a){var i;if(!Bh&&((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}(ml),Gh=new J4;function e3(r){return Math.min(1e3*Math.pow(2,r),3e4)}function Wh(r){return typeof(r==null?void 0:r.cancel)=="function"}var sC=function(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent};function Uh(r){return r instanceof sC}var lC=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 sC(p)),t.abort==null||t.abort(),Wh(v)))try{v.cancel()}catch{}},t.isTransportCancelable=Wh(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),Q4(_).then(function(){if(!ec.isFocused()||!Gh.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):iC(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&&iC(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,uC=console;function jh(){return uC}function r3(r){uC=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=Je({},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(),xy(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=j4(n,s);return(i=(o=this.options).isDataEqual)!=null&&i.call(o,s,l)?l=s:this.options.structuralSharing!==!1&&(l=Hh(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(dr).catch(dr):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||!eC(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=Fh(this.queryKey),h=oC(),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 lC({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(_){Uh(_)&&_.silent||i.dispatch({type:"error",error:_}),Uh(_)||(i.cache.config.onError==null||i.cache.config.onError(_,i),jh().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 Je({},n,{fetchFailureCount:n.fetchFailureCount+1});case"pause":return Je({},n,{isPaused:!0});case"continue":return Je({},n,{isPaused:!1});case"fetch":return Je({},n,{fetchFailureCount:0,fetchMeta:(i=a.meta)!=null?i:null,isFetching:!0,isPaused:!1},!n.dataUpdatedAt&&{error:null,status:"loading"});case"success":return Je({},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 Uh(s)&&s.revert&&this.revertState?Je({},this.revertState):Je({},n,{error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return Je({},n,{isInvalidated:!0});case"setState":return Je({},n,a.state);default:return n}},r}(),a3=function(r){ko(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:wy(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=zi(a,i),s=o[0];return typeof s.exact=="undefined"&&(s.exact=!0),this.queries.find(function(l){return tC(s,l)})},t.findAll=function(a,i){var o=zi(a,i),s=o[0];return Object.keys(s).length>0?this.queries.filter(function(l){return tC(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}(ml),i3=function(){function r(t){this.options=Je({},t.defaultOptions,t.options),this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.observers=[],this.state=t.state||cC(),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(dr).catch(dr)):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),jh().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 lC({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 cC(){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 Je({},r,{failureCount:r.failureCount+1});case"pause":return Je({},r,{isPaused:!0});case"continue":return Je({},r,{isPaused:!1});case"loading":return Je({},r,{context:e.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:e.variables});case"success":return Je({},r,{data:e.data,error:null,status:"success",isPaused:!1});case"error":return Je({},r,{data:void 0,error:e.error,failureCount:r.failureCount+1,isPaused:!1,status:"error"});case"setState":return Je({},r,e.state);default:return r}}var s3=function(r){ko(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 rC(a,i)})},t.findAll=function(a){return this.mutations.filter(function(i){return rC(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(dr)})},Promise.resolve())})},e}(ml);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=oC(),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=_($),q=Promise.resolve(U).then(function(H){return b(E,N,H,V)});if(Wh(U)){var te=q;te.cancel=U.cancel}return q},x;if(!v.length)x=w([]);else if(f){var S=typeof c!="undefined",T=S?c:fC(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 q=l&&v[$]?l(v[$],$,v):!0;if(q){var te=P?d[$]:fC(e.options,U);return w(U,P,te)}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(),Wh(x)&&x.cancel()},A}}}}function fC(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=ec.subscribe(function(){ec.isFocused()&&Gh.isOnline()&&(n.mutationCache.onFocus(),n.queryCache.onFocus())}),this.unsubscribeOnline=Gh.subscribe(function(){ec.isFocused()&&Gh.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=zi(n,a),o=i[0];return o.fetching=!0,this.queryCache.findAll(o).length},e.isMutating=function(n){return this.mutationCache.findAll(Je({},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=Vh(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=zi(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=zi(n,a,i),l=s[0],u=s[1],c=this.queryCache,f=Je({},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=zi(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(dr).catch(dr)},e.invalidateQueries=function(n,a,i){var o,s,l,u=this,c=zi(n,a,i),f=c[0],h=c[1],v=Je({},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=zi(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,Je({},u,{meta:{refetchPage:l==null?void 0:l.refetchPage}}))})}),f=Promise.all(c).then(dr);return u!=null&&u.throwOnError||(f=f.catch(dr)),f},e.fetchQuery=function(n,a,i){var o=Vh(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(dr).catch(dr)},e.fetchInfiniteQuery=function(n,a,i){var o=Vh(n,a,i);return o.behavior=l3(),this.fetchQuery(o)},e.prefetchInfiniteQuery=function(n,a,i){return this.fetchInfiniteQuery(n,a,i).then(dr).catch(dr)},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(dr).catch(dr)},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 $h(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 $h(n,i.mutationKey)}))==null?void 0:a.defaultOptions:void 0},e.defaultQueryOptions=function(n){if(n!=null&&n._defaulted)return n;var a=Je({},this.defaultOptions.queries,this.getQueryDefaults(n==null?void 0:n.queryKey),n,{_defaulted:!0});return!a.queryHash&&a.queryKey&&(a.queryHash=wy(a.queryKey,a)),a},e.defaultQueryObserverOptions=function(n){return this.defaultQueryOptions(n)},e.defaultMutationOptions=function(n){return n!=null&&n._defaulted?n:Je({},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){ko(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),hC(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},t.onUnsubscribe=function(){this.listeners.length||this.destroy()},t.shouldFetchOnReconnect=function(){return Cy(this.currentQuery,this.options,this.options.refetchOnReconnect)},t.shouldFetchOnWindowFocus=function(){return Cy(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&&vC(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(Je({},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(dr)),i},t.updateStaleTimeout=function(){var a=this;if(this.clearStaleTimeout(),!(Bh||this.currentResult.isStale||!xy(this.options.staleTime))){var i=eC(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,!(Bh||this.options.enabled===!1||!xy(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(function(){(i.options.refetchIntervalInBackground||ec.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&&hC(a,i),D=S&&vC(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=Hh(l==null?void 0:l.data,x)),this.selectResult=x,this.selectError=null}catch(I){jh().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=Hh(l==null?void 0:l.data,M)),this.selectError=null}catch(I){jh().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:Ty(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,!X4(this.currentResult,i)){var o={cache:!0};(a==null?void 0:a.listeners)!==!1&&this.shouldNotifyListeners(this.currentResult,i)&&(o.listeners=!0),this.notify(Je({},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"&&!Uh(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}(ml);function h3(r,e){return e.enabled!==!1&&!r.state.dataUpdatedAt&&!(r.state.status==="error"&&e.retryOnMount===!1)}function hC(r,e){return h3(r,e)||r.state.dataUpdatedAt>0&&Cy(r,e,e.refetchOnMount)}function Cy(r,e,t){if(e.enabled!==!1){var n=typeof t=="function"?t(r):t;return n==="always"||n!==!1&&Ty(r,e)}return!1}function vC(r,e,t,n){return t.enabled!==!1&&(r!==e||n.enabled===!1)&&(!t.suspense||r.state.status!=="error")&&Ty(r,t)}function Ty(r,e){return r.isStaleByTime(e.staleTime)}var v3=function(r){ko(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,Je({},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:cC(),i=Je({},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}(ml),d3=zh.default.unstable_batchedUpdates;Dt.setBatchNotifyFunction(d3);var p3=console;r3(p3);var dC=pe.default.createContext(void 0),pC=pe.default.createContext(!1);function gC(r){return r&&typeof window!="undefined"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=dC),window.ReactQueryClientContext):dC}var yC=function(){var e=pe.default.useContext(gC(pe.default.useContext(pC)));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=gC(a);return pe.default.createElement(pC.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 mC(r,e,t){return typeof e=="function"?e.apply(void 0,t):typeof e=="boolean"?e:!!r}function _l(r,e,t){var n=pe.default.useRef(!1),a=pe.default.useState(0),i=a[1],o=Y4(r,e,t),s=yC(),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(dr)},[]);if(u.error&&mC(void 0,l.current.options.useErrorBoundary,[u.error]))throw u.error;return Je({},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=yC(),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&&mC(s.suspense,s.useErrorBoundary,[c.error,u.getCurrentQuery()]))throw c.error;return s.notifyOnChangeProps==="tracked"&&(c=u.trackResult(c,s)),c}function bl(r,e,t){var n=Vh(r,e,t);return b3(n,f3)}var tn={container:"_container_10z7z_1",static:"_static_10z7z_391",fixed:"_fixed_10z7z_1",absolute:"_absolute_10z7z_1","left-2":"_left-2_10z7z_1","top-1":"_top-1_10z7z_1","mt-2.5":"_mt-2.5_10z7z_1","mt-2":"_mt-2_10z7z_1","mb-3":"_mb-3_10z7z_1",flex:"_flex_10z7z_1",table:"_table_10z7z_1",grid:"_grid_10z7z_1",hidden:"_hidden_10z7z_1","h-screen":"_h-screen_10z7z_1","h-[10%]":"_h-[10%]_10z7z_1","w-screen":"_w-screen_10z7z_1","w-full":"_w-full_10z7z_1",transform:"_transform_10z7z_1",resize:"_resize_10z7z_1","overflow-x-hidden":"_overflow-x-hidden_10z7z_1",truncate:"_truncate_10z7z_1",border:"_border_10z7z_1","p-2":"_p-2_10z7z_1","text-center":"_text-center_10z7z_1","text-sm":"_text-sm_10z7z_1","text-xs":"_text-xs_10z7z_1","text-blue-700":"_text-blue-700_10z7z_1",shadow:"_shadow_10z7z_1",filter:"_filter_10z7z_351","!filter":"_!filter_10z7z_1","embedDashboard-container":"_embedDashboard-container_10z7z_311","embedDashboard-header-static":"_embedDashboard-header-static_10z7z_319","embedDashboard-header-floating":"_embedDashboard-header-floating_10z7z_327","embedDashboard-wrapper":"_embedDashboard-wrapper_10z7z_335","alt-container":"_alt-container_10z7z_343",floatingFilterButton:"_floatingFilterButton_10z7z_359",floatingFilterButtonIcon:"_floatingFilterButtonIcon_10z7z_367",floatingButton:"_floatingButton_10z7z_375",floatingButtonIcon:"_floatingButtonIcon_10z7z_383",staticContainer:"_staticContainer_10z7z_391",floatingContainer:"_floatingContainer_10z7z_399","hover:cursor-pointer":"_hover:cursor-pointer_10z7z_1","hover:cursor-text":"_hover:cursor-text_10z7z_1","disabled:cursor-text":"_disabled:cursor-text_10z7z_1"},Yh=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 Dy={exports:{}},tc={},rc={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]",q="[object Uint16Array]",te="[object Uint32Array]",H=/[\\^$.*+?()[\]{}|]/g,Y=/^\[object .+?Constructor\]$/,X=/^(?:0|[1-9]\d*)$/,Z={};Z[P]=Z[E]=Z[O]=Z[N]=Z[V]=Z[$]=Z[U]=Z[q]=Z[te]=!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 Yh=="object"&&Yh&&Yh.Object===Object&&Yh,se=typeof self=="object"&&self&&self.Object===Object&&self,ne=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,ae=function(){try{return G&&G.binding&&G.binding("util")}catch{}}(),re=ae&&ae.isTypedArray;function K(k,W){for(var oe=-1,we=k==null?0:k.length,Tt=0,Qe=[];++oe<we;){var Gt=k[oe];W(Gt,oe,k)&&(Qe[Tt++]=Gt)}return Qe}function ue(k,W){for(var oe=-1,we=W.length,Tt=k.length;++oe<we;)k[Tt+oe]=W[oe];return k}function Re(k,W){for(var oe=-1,we=k==null?0:k.length;++oe<we;)if(W(k[oe],oe,k))return!0;return!1}function mt(k,W){for(var oe=-1,we=Array(k);++oe<k;)we[oe]=W(oe);return we}function Xe(k){return function(W){return k(W)}}function Zt(k,W){return k.has(W)}function St(k,W){return k==null?void 0:k[W]}function Jr(k){var W=-1,oe=Array(k.size);return k.forEach(function(we,Tt){oe[++W]=[Tt,we]}),oe}function fr(k,W){return function(oe){return k(W(oe))}}function st(k){var W=-1,oe=Array(k.size);return k.forEach(function(we){oe[++W]=we}),oe}var Ot=Array.prototype,ta=Function.prototype,or=Object.prototype,vn=ne["__core-js_shared__"],ul=ta.toString,en=or.hasOwnProperty,cl=function(){var k=/[^.]+$/.exec(vn&&vn.keys&&vn.keys.IE_PROTO||"");return k?"Symbol(src)_1."+k:""}(),Qu=or.toString,Oh=RegExp("^"+ul.call(en).replace(H,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),fl=F?ne.Buffer:void 0,Po=ne.Symbol,hl=ne.Uint8Array,vl=or.propertyIsEnumerable,dn=Ot.splice,hr=Po?Po.toStringTag:void 0,ra=Object.getOwnPropertySymbols,Eo=fl?fl.isBuffer:void 0,lt=fr(Object.keys,Object),zr=Ku(ne,"DataView"),Ht=Ku(ne,"Map"),De=Ku(ne,"Promise"),rt=Ku(ne,"Set"),Ct=Ku(ne,"WeakMap"),Ue=Ku(Object,"create"),Kt=gl(zr),pn=gl(Ht),Br=gl(De),fy=gl(rt),hy=gl(Ct),Rh=Po?Po.prototype:void 0,XS=Rh?Rh.valueOf:void 0;function dl(k){var W=-1,oe=k==null?0:k.length;for(this.clear();++W<oe;){var we=k[W];this.set(we[0],we[1])}}function qhe(){this.__data__=Ue?Ue(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(Ue){var oe=W[k];return oe===n?void 0:oe}return en.call(W,k)?W[k]:void 0}function Qhe(k){var W=this.__data__;return Ue?W[k]!==void 0:en.call(W,k)}function Khe(k,W){var oe=this.__data__;return this.size+=this.has(k)?0:1,oe[k]=Ue&&W===void 0?n:W,this}dl.prototype.clear=qhe,dl.prototype.delete=Zhe,dl.prototype.get=Xhe,dl.prototype.has=Qhe,dl.prototype.set=Khe;function Ni(k){var W=-1,oe=k==null?0:k.length;for(this.clear();++W<oe;){var we=k[W];this.set(we[0],we[1])}}function Jhe(){this.__data__=[],this.size=0}function eve(k){var W=this.__data__,oe=dy(W,k);if(oe<0)return!1;var we=W.length-1;return oe==we?W.pop():dn.call(W,oe,1),--this.size,!0}function tve(k){var W=this.__data__,oe=dy(W,k);return oe<0?void 0:W[oe][1]}function rve(k){return dy(this.__data__,k)>-1}function nve(k,W){var oe=this.__data__,we=dy(oe,k);return we<0?(++this.size,oe.push([k,W])):oe[we][1]=W,this}Ni.prototype.clear=Jhe,Ni.prototype.delete=eve,Ni.prototype.get=tve,Ni.prototype.has=rve,Ni.prototype.set=nve;function pl(k){var W=-1,oe=k==null?0:k.length;for(this.clear();++W<oe;){var we=k[W];this.set(we[0],we[1])}}function ave(){this.size=0,this.__data__={hash:new dl,map:new(Ht||Ni),string:new dl}}function ive(k){var W=py(this,k).delete(k);return this.size-=W?1:0,W}function ove(k){return py(this,k).get(k)}function sve(k){return py(this,k).has(k)}function lve(k,W){var oe=py(this,k),we=oe.size;return oe.set(k,W),this.size+=oe.size==we?0:1,this}pl.prototype.clear=ave,pl.prototype.delete=ive,pl.prototype.get=ove,pl.prototype.has=sve,pl.prototype.set=lve;function vy(k){var W=-1,oe=k==null?0:k.length;for(this.__data__=new pl;++W<oe;)this.add(k[W])}function uve(k){return this.__data__.set(k,n),this}function cve(k){return this.__data__.has(k)}vy.prototype.add=vy.prototype.push=uve,vy.prototype.has=cve;function Oo(k){var W=this.__data__=new Ni(k);this.size=W.size}function fve(){this.__data__=new Ni,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 Ni){var we=oe.__data__;if(!Ht||we.length<t-1)return we.push([k,W]),this.size=++oe.size,this;oe=this.__data__=new pl(we)}return oe.set(k,W),this.size=oe.size,this}Oo.prototype.clear=fve,Oo.prototype.delete=hve,Oo.prototype.get=vve,Oo.prototype.has=dve,Oo.prototype.set=pve;function gve(k,W){var oe=gy(k),we=!oe&&Pve(k),Tt=!oe&&!we&&QS(k),Qe=!oe&&!we&&!Tt&&V4(k),Gt=oe||we||Tt||Qe,vr=Gt?mt(k.length,String):[],Cr=vr.length;for(var Rt in k)(W||en.call(k,Rt))&&!(Gt&&(Rt=="length"||Tt&&(Rt=="offset"||Rt=="parent")||Qe&&(Rt=="buffer"||Rt=="byteLength"||Rt=="byteOffset")||Dve(Rt,Cr)))&&vr.push(Rt);return vr}function dy(k,W){for(var oe=k.length;oe--;)if(k4(k[oe][0],W))return oe;return-1}function yve(k,W,oe){var we=W(k);return gy(k)?we:ue(we,oe(k))}function Nh(k){return k==null?k===void 0?D:y:hr&&hr in Object(k)?Cve(k):Ive(k)}function E4(k){return kh(k)&&Nh(k)==s}function O4(k,W,oe,we,Tt){return k===W?!0:k==null||W==null||!kh(k)&&!kh(W)?k!==k&&W!==W:mve(k,W,oe,we,O4,Tt)}function mve(k,W,oe,we,Tt,Qe){var Gt=gy(k),vr=gy(W),Cr=Gt?l:Ro(k),Rt=vr?l:Ro(W);Cr=Cr==s?m:Cr,Rt=Rt==s?m:Rt;var An=Cr==m,Ma=Rt==m,Fr=Cr==Rt;if(Fr&&QS(k)){if(!QS(W))return!1;Gt=!0,An=!1}if(Fr&&!An)return Qe||(Qe=new Oo),Gt||V4(k)?R4(k,W,oe,we,Tt,Qe):wve(k,W,Cr,oe,we,Tt,Qe);if(!(oe&a)){var na=An&&en.call(k,"__wrapped__"),aa=Ma&&en.call(W,"__wrapped__");if(na||aa){var No=na?k.value():k,ki=aa?W.value():W;return Qe||(Qe=new Oo),Tt(No,ki,oe,we,Qe)}}return Fr?(Qe||(Qe=new Oo),Sve(k,W,oe,we,Tt,Qe)):!1}function _ve(k){if(!F4(k)||Ave(k))return!1;var W=z4(k)?Oh:Y;return W.test(gl(k))}function bve(k){return kh(k)&&B4(k.length)&&!!Z[Nh(k)]}function xve(k){if(!Lve(k))return lt(k);var W=[];for(var oe in Object(k))en.call(k,oe)&&oe!="constructor"&&W.push(oe);return W}function R4(k,W,oe,we,Tt,Qe){var Gt=oe&a,vr=k.length,Cr=W.length;if(vr!=Cr&&!(Gt&&Cr>vr))return!1;var Rt=Qe.get(k);if(Rt&&Qe.get(W))return Rt==W;var An=-1,Ma=!0,Fr=oe&i?new vy:void 0;for(Qe.set(k,W),Qe.set(W,k);++An<vr;){var na=k[An],aa=W[An];if(we)var No=Gt?we(aa,na,An,W,k,Qe):we(na,aa,An,k,W,Qe);if(No!==void 0){if(No)continue;Ma=!1;break}if(Fr){if(!Re(W,function(ki,yl){if(!Zt(Fr,yl)&&(na===ki||Tt(na,ki,oe,we,Qe)))return Fr.push(yl)})){Ma=!1;break}}else if(!(na===aa||Tt(na,aa,oe,we,Qe))){Ma=!1;break}}return Qe.delete(k),Qe.delete(W),Ma}function wve(k,W,oe,we,Tt,Qe,Gt){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||!Qe(new hl(k),new hl(W)));case c:case f:case g:return k4(+k,+W);case h:return k.name==W.name&&k.message==W.message;case w:case S:return k==W+"";case p:var vr=Jr;case x:var Cr=we&a;if(vr||(vr=st),k.size!=W.size&&!Cr)return!1;var Rt=Gt.get(k);if(Rt)return Rt==W;we|=i,Gt.set(k,W);var An=R4(vr(k),vr(W),we,Tt,Qe,Gt);return Gt.delete(k),An;case T:if(XS)return XS.call(k)==XS.call(W)}return!1}function Sve(k,W,oe,we,Tt,Qe){var Gt=oe&a,vr=N4(k),Cr=vr.length,Rt=N4(W),An=Rt.length;if(Cr!=An&&!Gt)return!1;for(var Ma=Cr;Ma--;){var Fr=vr[Ma];if(!(Gt?Fr in W:en.call(W,Fr)))return!1}var na=Qe.get(k);if(na&&Qe.get(W))return na==W;var aa=!0;Qe.set(k,W),Qe.set(W,k);for(var No=Gt;++Ma<Cr;){Fr=vr[Ma];var ki=k[Fr],yl=W[Fr];if(we)var $4=Gt?we(yl,ki,Fr,W,k,Qe):we(ki,yl,Fr,k,W,Qe);if(!($4===void 0?ki===yl||Tt(ki,yl,oe,we,Qe):$4)){aa=!1;break}No||(No=Fr=="constructor")}if(aa&&!No){var yy=k.constructor,my=W.constructor;yy!=my&&"constructor"in k&&"constructor"in W&&!(typeof yy=="function"&&yy instanceof yy&&typeof my=="function"&&my instanceof my)&&(aa=!1)}return Qe.delete(k),Qe.delete(W),aa}function N4(k){return yve(k,Rve,Tve)}function py(k,W){var oe=k.__data__;return Mve(W)?oe[typeof W=="string"?"string":"hash"]:oe.map}function Ku(k,W){var oe=St(k,W);return _ve(oe)?oe:void 0}function Cve(k){var W=en.call(k,hr),oe=k[hr];try{k[hr]=void 0;var we=!0}catch{}var Tt=Qu.call(k);return we&&(W?k[hr]=oe:delete k[hr]),Tt}var Tve=ra?function(k){return k==null?[]:(k=Object(k),K(ra(k),function(W){return vl.call(k,W)}))}:Nve,Ro=Nh;(zr&&Ro(new zr(new ArrayBuffer(1)))!=I||Ht&&Ro(new Ht)!=p||De&&Ro(De.resolve())!=_||rt&&Ro(new rt)!=x||Ct&&Ro(new Ct)!=M)&&(Ro=function(k){var W=Nh(k),oe=W==m?k.constructor:void 0,we=oe?gl(oe):"";if(we)switch(we){case Kt:return I;case pn:return p;case Br:return _;case fy:return x;case hy: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!!cl&&cl in k}function Lve(k){var W=k&&k.constructor,oe=typeof W=="function"&&W.prototype||or;return k===oe}function Ive(k){return Qu.call(k)}function gl(k){if(k!=null){try{return ul.call(k)}catch{}try{return k+""}catch{}}return""}function k4(k,W){return k===W||k!==k&&W!==W}var Pve=E4(function(){return arguments}())?E4:function(k){return kh(k)&&en.call(k,"callee")&&!vl.call(k,"callee")},gy=Array.isArray;function Eve(k){return k!=null&&B4(k.length)&&!z4(k)}var QS=Eo||kve;function Ove(k,W){return O4(k,W)}function z4(k){if(!F4(k))return!1;var W=Nh(k);return W==v||W==d||W==u||W==b}function B4(k){return typeof k=="number"&&k>-1&&k%1==0&&k<=o}function F4(k){var W=typeof k;return k!=null&&(W=="object"||W=="function")}function kh(k){return k!=null&&typeof k=="object"}var V4=re?Xe(re):bve;function Rve(k){return Eve(k)?gve(k):xve(k)}function Nve(){return[]}function kve(){return!1}r.exports=Ove})(rc,rc.exports);function _C(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=_C(r[e]))&&(n&&(n+=" "),n+=t);else for(e in r)r[e]&&(n&&(n+=" "),n+=e);return n}function bC(){for(var r,e,t=0,n="";t<arguments.length;)(r=arguments[t++])&&(e=_C(r))&&(n&&(n+=" "),n+=e);return n}var w3=Object.freeze(Object.defineProperty({__proto__:null,clsx:bC,default:bC},Symbol.toStringTag,{value:"Module"})),qh=x3(w3),et={},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(et,"__esModule",{value:!0}),et.bottom=Ay,et.childrenEqual=M3,et.cloneLayout=CC,et.cloneLayoutItem=Bo,et.collides=Zh,et.compact=DC,et.compactItem=MC,et.compactType=k3,et.correctBounds=AC,et.fastPositionEqual=L3,et.fastRGLPropsEqual=void 0,et.getAllCollisions=LC,et.getFirstCollision=xl,et.getLayoutItem=Iy,et.getStatics=Py,et.modifyLayout=TC,et.moveElement=Ey,et.moveElementAwayFromCollision=Oy,et.noop=void 0,et.perc=P3,et.setTopLeft=O3,et.setTransform=E3,et.sortLayoutItems=Ry,et.sortLayoutItemsByColRow=PC,et.sortLayoutItemsByRowCol=IC,et.synchronizeLayoutWithChildren=R3,et.validateLayout=N3,et.withLayoutItem=D3;var C3=xC(rc.exports),My=xC(pe.default);function xC(r){return r&&r.__esModule?r:{default:r}}function wC(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 SC(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?wC(Object(t),!0).forEach(function(n){T3(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):wC(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 Ay(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 CC(r){for(var e=Array(r.length),t=0,n=r.length;t<n;t++)e[t]=Bo(r[t]);return e}function TC(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=Iy(r,e);return n?(n=t(Bo(n)),r=TC(r,n),[r,n]):[r,null]}function Bo(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)(My.default.Children.map(r,function(t){return t==null?void 0:t.key}),My.default.Children.map(e,function(t){return t==null?void 0:t.key}))}var A3=S3;et.fastRGLPropsEqual=A3;function L3(r,e){return r.left===e.left&&r.top===e.top&&r.width===e.width&&r.height===e.height}function Zh(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 DC(r,e,t){for(var n=Py(r),a=Ry(r,e),i=Array(r.length),o=0,s=a.length;o<s;o++){var l=Bo(a[o]);l.static||(l=MC(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 Ly(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;Zh(e,s)&&Ly(r,s,t+e[a],n)}}e[n]=t}function MC(r,e,t,n,a){var i=t==="vertical",o=t==="horizontal";if(i)for(e.y=Math.min(Ay(r),e.y);e.y>0&&!xl(r,e);)e.y--;else if(o)for(;e.x>0&&!xl(r,e);)e.x--;for(var s;s=xl(r,e);)o?Ly(a,e,s.x+s.w,"x"):Ly(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 AC(r,e){for(var t=Py(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(;xl(t,i);)i.y++}return r}function Iy(r,e){for(var t=0,n=r.length;t<n;t++)if(r[t].i===e)return r[t]}function xl(r,e){for(var t=0,n=r.length;t<n;t++)if(Zh(r[t],e))return r[t]}function LC(r,e){return r.filter(function(t){return Zh(t,e)})}function Py(r){return r.filter(function(e){return e.static})}function Ey(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=Ry(r,o),h=o==="vertical"&&typeof n=="number"?c>=n:o==="horizontal"&&typeof t=="number"?u>=t:!1;h&&(f=f.reverse());var v=LC(f,e),d=v.length>0;if(d&&l)return CC(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=Oy(r,y,e,a,o):r=Oy(r,e,y,a,o))}return r}function Oy(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(!xl(r,u))return"Doing reverse collision on ".concat(t.i," up to [").concat(u.x,",").concat(u.y,"]."),Ey(r,t,o?u.x:void 0,s?u.y:void 0,n,l,a)}return Ey(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 Ry(r,e){return e==="horizontal"?PC(r):e==="vertical"?IC(r):r}function IC(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 PC(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=[];My.default.Children.forEach(e,function(s){if((s==null?void 0:s.key)!=null){var l=Iy(r,String(s.key));if(l)i.push(Bo(l));else{var u=s.props["data-grid"]||s.props._grid;u?i.push(Bo(SC(SC({},u),{},{i:s.key}))):i.push(Bo({w:1,h:1,x:0,y:Ay(i),i:String(s.key)}))}}});var o=AC(i,{cols:t});return a?o:DC(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 rde(){}var z3=function(){};et.noop=z3;var ti={};Object.defineProperty(ti,"__esModule",{value:!0}),ti.calcGridColWidth=Xh,ti.calcGridItemPosition=B3,ti.calcGridItemWHPx=Ny,ti.calcWH=V3,ti.calcXY=F3,ti.clamp=nc;function Xh(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 Ny(r,e,t){return Number.isFinite(r)?Math.round(e*r+Math.max(0,r-1)*t):r}function B3(r,e,t,n,a,i){var o=r.margin,s=r.containerPadding,l=r.rowHeight,u=Xh(r),c={};return i&&i.resizing?(c.width=Math.round(i.resizing.width),c.height=Math.round(i.resizing.height)):(c.width=Ny(n,u,o[0]),c.height=Ny(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=Xh(r),c=Math.round((t-i[0])/(u+i[0])),f=Math.round((e-i[1])/(s+i[1]));return c=nc(c,0,o-n),f=nc(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=Xh(r),c=Math.round((e+i[0])/(u+i[0])),f=Math.round((t+i[1])/(l+i[1]));return c=nc(c,0,s-n),f=nc(f,0,o-a),{w:c,h:f}}function nc(r,e,t){return Math.max(Math.min(r,t),e)}var Qh={},ri={exports:{}},$3="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",H3=$3,G3=H3;function EC(){}function OC(){}OC.resetWarningCache=EC;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:OC,resetWarningCache:EC};return t.PropTypes=t,t};ri.exports=W3();var ac={exports:{}},RC={},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 Fo={};Object.defineProperty(Fo,"__esModule",{value:!0}),Fo.browserPrefixToKey=kC,Fo.browserPrefixToStyle=X3,Fo.default=void 0,Fo.getPrefix=NC;var ky=["Moz","Webkit","O","ms"];function NC(){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<ky.length;a++)if(kC(t,ky[a])in n)return ky[a];return""}function kC(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=NC();Fo.default=K3;function zy(r){return zy=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},zy(r)}Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.addClassName=GC,Nt.addEvent=tF,Nt.addUserSelectStyles=hF,Nt.createCSSTransform=lF,Nt.createSVGTransform=uF,Nt.getTouch=cF,Nt.getTouchIdentifier=fF,Nt.getTranslation=By,Nt.innerHeight=iF,Nt.innerWidth=oF,Nt.matchesSelector=HC,Nt.matchesSelectorAndParentsTo=eF,Nt.offsetXYFromParent=sF,Nt.outerHeight=nF,Nt.outerWidth=aF,Nt.removeClassName=WC,Nt.removeEvent=rF,Nt.removeUserSelectStyles=vF;var gn=Aa,zC=J3(Fo);function BC(r){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(BC=function(a){return a?t:e})(r)}function J3(r,e){if(!e&&r&&r.__esModule)return r;if(r===null||zy(r)!=="object"&&typeof r!="function")return{default:r};var t=BC(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 FC(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 VC(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?FC(Object(t),!0).forEach(function(n){$C(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):FC(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function $C(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}var Kh="";function HC(r,e){return Kh||(Kh=(0,gn.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(t){return(0,gn.isFunction)(r[t])})),(0,gn.isFunction)(r[Kh])?r[Kh](e):!1}function eF(r,e,t){var n=r;do{if(HC(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=VC({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=VC({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,gn.int)(t.borderTopWidth),e+=(0,gn.int)(t.borderBottomWidth),e}function aF(r){var e=r.clientWidth,t=r.ownerDocument.defaultView.getComputedStyle(r);return e+=(0,gn.int)(t.borderLeftWidth),e+=(0,gn.int)(t.borderRightWidth),e}function iF(r){var e=r.clientHeight,t=r.ownerDocument.defaultView.getComputedStyle(r);return e-=(0,gn.int)(t.paddingTop),e-=(0,gn.int)(t.paddingBottom),e}function oF(r){var e=r.clientWidth,t=r.ownerDocument.defaultView.getComputedStyle(r);return e-=(0,gn.int)(t.paddingLeft),e-=(0,gn.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=By(r,e,"px");return $C({},(0,zC.browserPrefixToKey)("transform",zC.default),t)}function uF(r,e){var t=By(r,e,"");return t}function By(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,gn.findInArray)(r.targetTouches,function(t){return e===t.identifier})||r.changedTouches&&(0,gn.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
- `,e.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
3
- `,r.getElementsByTagName("head")[0].appendChild(e)),r.body&&GC(r.body,"react-draggable-transparent-selection")}}function vF(r){if(!!r)try{if(r.body&&WC(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 GC(r,e){r.classList?r.classList.add(e):r.className.match(new RegExp("(?:^|\\s)".concat(e,"(?!\\S)")))||(r.className+=" ".concat(e))}function WC(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 yn=Aa,wl=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=Fy(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,yn.int)(c.paddingLeft)+(0,yn.int)(u.marginLeft),top:-a.offsetTop+(0,yn.int)(c.paddingTop)+(0,yn.int)(u.marginTop),right:(0,wl.innerWidth)(l)-(0,wl.outerWidth)(a)-a.offsetLeft+(0,yn.int)(c.paddingRight)-(0,yn.int)(u.marginRight),bottom:(0,wl.innerHeight)(l)-(0,wl.outerHeight)(a)-a.offsetTop+(0,yn.int)(c.paddingBottom)-(0,yn.int)(u.marginBottom)}}return(0,yn.isNum)(n.right)&&(e=Math.min(e,n.right)),(0,yn.isNum)(n.bottom)&&(t=Math.min(t,n.bottom)),(0,yn.isNum)(n.left)&&(e=Math.max(e,n.left)),(0,yn.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,wl.getTouch)(r,e):null;if(typeof e=="number"&&!n)return null;var a=Fy(t),i=t.props.offsetParent||a.offsetParent||a.ownerDocument.body;return(0,wl.offsetXYFromParent)(n||r,i,t.props.scale)}function _F(r,e,t){var n=r.state,a=!(0,yn.isNum)(n.lastX),i=Fy(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 Fy(r){var e=r.findDOMNode();if(!e)throw new Error("<DraggableCore>: Unmounted during event!");return e}var Jh={},ev={};Object.defineProperty(ev,"__esModule",{value:!0}),ev.default=wF;function wF(){}function tv(r){return tv=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},tv(r)}Object.defineProperty(Jh,"__esModule",{value:!0}),Jh.default=void 0;var Vy=CF(pe.default),mn=Hy(ri.exports),SF=Hy(zh.default),Dr=Nt,Bi=La,$y=Aa,ic=Hy(ev);function Hy(r){return r&&r.__esModule?r:{default:r}}function UC(r){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(UC=function(a){return a?t:e})(r)}function CF(r,e){if(!e&&r&&r.__esModule)return r;if(r===null||tv(r)!=="object"&&typeof r!="function")return{default:r};var t=UC(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 jC(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
- 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 YC(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 YC(r,e)}}function YC(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 qC(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&&qC(r.prototype,e),t&&qC(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&&Gy(r,e)}function Gy(r,e){return Gy=Object.setPrototypeOf||function(n,a){return n.__proto__=a,n},Gy(r,e)}function EF(r){var e=RF();return function(){var n=rv(r),a;if(e){var i=rv(this).constructor;a=Reflect.construct(n,arguments,i)}else a=n.apply(this,arguments);return OF(this,a)}}function OF(r,e){if(e&&(tv(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Mr(r)}function Mr(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 rv(r){return rv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},rv(r)}function Ln(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}var ia={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}},Fi=ia.mouse,nv=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)),Ln(Mr(n),"state",{dragging:!1,lastX:NaN,lastY:NaN,touchIdentifier:null}),Ln(Mr(n),"mounted",!1),Ln(Mr(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,Dr.matchesSelectorAndParentsTo)(s.target,n.props.handle,l)||n.props.cancel&&(0,Dr.matchesSelectorAndParentsTo)(s.target,n.props.cancel,l))){s.type==="touchstart"&&s.preventDefault();var c=(0,Dr.getTouchIdentifier)(s);n.setState({touchIdentifier:c});var f=(0,Bi.getControlPosition)(s,c,Mr(n));if(f!=null){var h=f.x,v=f.y,d=(0,Bi.createCoreData)(Mr(n),h,v);(0,ic.default)("DraggableCore: handleDragStart: %j",d),(0,ic.default)("calling",n.props.onStart);var p=n.props.onStart(s,d);p===!1||n.mounted===!1||(n.props.enableUserSelectHack&&(0,Dr.addUserSelectStyles)(u),n.setState({dragging:!0,lastX:h,lastY:v}),(0,Dr.addEvent)(u,Fi.move,n.handleDrag),(0,Dr.addEvent)(u,Fi.stop,n.handleDragStop))}}}),Ln(Mr(n),"handleDrag",function(s){var l=(0,Bi.getControlPosition)(s,n.state.touchIdentifier,Mr(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,Bi.snapToGrid)(n.props.grid,f,h),d=jC(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,Bi.createCoreData)(Mr(n),u,c);(0,ic.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})}}),Ln(Mr(n),"handleDragStop",function(s){if(!!n.state.dragging){var l=(0,Bi.getControlPosition)(s,n.state.touchIdentifier,Mr(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,Bi.snapToGrid)(n.props.grid,f,h),d=jC(v,2);f=d[0],h=d[1],u=n.state.lastX+f,c=n.state.lastY+h}var p=(0,Bi.createCoreData)(Mr(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,Dr.removeUserSelectStyles)(y.ownerDocument),(0,ic.default)("DraggableCore: handleDragStop: %j",p),n.setState({dragging:!1,lastX:NaN,lastY:NaN}),y&&((0,ic.default)("DraggableCore: Removing handlers"),(0,Dr.removeEvent)(y.ownerDocument,Fi.move,n.handleDrag),(0,Dr.removeEvent)(y.ownerDocument,Fi.stop,n.handleDragStop))}}}),Ln(Mr(n),"onMouseDown",function(s){return Fi=ia.mouse,n.handleDragStart(s)}),Ln(Mr(n),"onMouseUp",function(s){return Fi=ia.mouse,n.handleDragStop(s)}),Ln(Mr(n),"onTouchStart",function(s){return Fi=ia.touch,n.handleDragStart(s)}),Ln(Mr(n),"onTouchEnd",function(s){return Fi=ia.touch,n.handleDragStop(s)}),n}return IF(t,[{key:"componentDidMount",value:function(){this.mounted=!0;var a=this.findDOMNode();a&&(0,Dr.addEvent)(a,ia.touch.start,this.onTouchStart,{passive:!1})}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var a=this.findDOMNode();if(a){var i=a.ownerDocument;(0,Dr.removeEvent)(i,ia.mouse.move,this.handleDrag),(0,Dr.removeEvent)(i,ia.touch.move,this.handleDrag),(0,Dr.removeEvent)(i,ia.mouse.stop,this.handleDragStop),(0,Dr.removeEvent)(i,ia.touch.stop,this.handleDragStop),(0,Dr.removeEvent)(a,ia.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,Dr.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 Vy.cloneElement(Vy.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}]),t}(Vy.Component);Jh.default=nv,Ln(nv,"displayName","DraggableCore"),Ln(nv,"propTypes",{allowAnyClick:mn.default.bool,disabled:mn.default.bool,enableUserSelectHack:mn.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:mn.default.arrayOf(mn.default.number),handle:mn.default.string,cancel:mn.default.string,nodeRef:mn.default.object,onStart:mn.default.func,onDrag:mn.default.func,onStop:mn.default.func,onMouseDown:mn.default.func,scale:mn.default.number,className:$y.dontSetMe,style:$y.dontSetMe,transform:$y.dontSetMe}),Ln(nv,"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(Y){return typeof Y}:function(Y){return Y&&typeof Symbol=="function"&&Y.constructor===Symbol&&Y!==Symbol.prototype?"symbol":typeof Y},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(ri.exports),a=h(zh.default),i=h(qh),o=Nt,s=La,l=Aa,u=h(Jh),c=h(ev),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 Y=new WeakMap,X=new WeakMap;return(v=function(ie){return ie?X:Y})(H)}function d(H,Y){if(!Y&&H&&H.__esModule)return H;if(H===null||e(H)!=="object"&&typeof H!="function")return{default:H};var X=v(Y);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 ne=ie?Object.getOwnPropertyDescriptor(H,se):null;ne&&(ne.get||ne.set)?Object.defineProperty(Z,se,ne):Z[se]=H[se]}return Z.default=H,X&&X.set(H,Z),Z}function p(){return p=Object.assign||function(H){for(var Y=1;Y<arguments.length;Y++){var X=arguments[Y];for(var Z in X)Object.prototype.hasOwnProperty.call(X,Z)&&(H[Z]=X[Z])}return H},p.apply(this,arguments)}function g(H,Y){if(H==null)return{};var X=y(H,Y),Z,ie;if(Object.getOwnPropertySymbols){var se=Object.getOwnPropertySymbols(H);for(ie=0;ie<se.length;ie++)Z=se[ie],!(Y.indexOf(Z)>=0)&&(!Object.prototype.propertyIsEnumerable.call(H,Z)||(X[Z]=H[Z]))}return X}function y(H,Y){if(H==null)return{};var X={},Z=Object.keys(H),ie,se;for(se=0;se<Z.length;se++)ie=Z[se],!(Y.indexOf(ie)>=0)&&(X[ie]=H[ie]);return X}function m(H,Y){var X=Object.keys(H);if(Object.getOwnPropertySymbols){var Z=Object.getOwnPropertySymbols(H);Y&&(Z=Z.filter(function(ie){return Object.getOwnPropertyDescriptor(H,ie).enumerable})),X.push.apply(X,Z)}return X}function _(H){for(var Y=1;Y<arguments.length;Y++){var X=arguments[Y]!=null?arguments[Y]:{};Y%2?m(Object(X),!0).forEach(function(Z){q(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,Y){return D(H)||T(H,Y)||x(H,Y)||w()}function w(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
5
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function x(H,Y){if(!!H){if(typeof H=="string")return S(H,Y);var X=Object.prototype.toString.call(H).slice(8,-1);if(X==="Object"&&H.constructor&&(X=H.constructor.name),X==="Map"||X==="Set")return Array.from(H);if(X==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(X))return S(H,Y)}}function S(H,Y){(Y==null||Y>H.length)&&(Y=H.length);for(var X=0,Z=new Array(Y);X<Y;X++)Z[X]=H[X];return Z}function T(H,Y){var X=H==null?null:typeof Symbol!="undefined"&&H[Symbol.iterator]||H["@@iterator"];if(X!=null){var Z=[],ie=!0,se=!1,ne,ve;try{for(X=X.call(H);!(ie=(ne=X.next()).done)&&(Z.push(ne.value),!(Y&&Z.length===Y));ie=!0);}catch(R){se=!0,ve=R}finally{try{!ie&&X.return!=null&&X.return()}finally{if(se)throw ve}}return Z}}function D(H){if(Array.isArray(H))return H}function M(H,Y){if(!(H instanceof Y))throw new TypeError("Cannot call a class as a function")}function A(H,Y){for(var X=0;X<Y.length;X++){var Z=Y[X];Z.enumerable=Z.enumerable||!1,Z.configurable=!0,"value"in Z&&(Z.writable=!0),Object.defineProperty(H,Z.key,Z)}}function I(H,Y,X){return Y&&A(H.prototype,Y),X&&A(H,X),Object.defineProperty(H,"prototype",{writable:!1}),H}function P(H,Y){if(typeof Y!="function"&&Y!==null)throw new TypeError("Super expression must either be null or a function");H.prototype=Object.create(Y&&Y.prototype,{constructor:{value:H,writable:!0,configurable:!0}}),Object.defineProperty(H,"prototype",{writable:!1}),Y&&E(H,Y)}function E(H,Y){return E=Object.setPrototypeOf||function(Z,ie){return Z.__proto__=ie,Z},E(H,Y)}function O(H){var Y=$();return function(){var Z=U(H),ie;if(Y){var se=U(this).constructor;ie=Reflect.construct(Z,arguments,se)}else ie=Z.apply(this,arguments);return N(this,ie)}}function N(H,Y){if(Y&&(e(Y)==="object"||typeof Y=="function"))return Y;if(Y!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return V(H)}function V(H){if(H===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return H}function $(){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 U(H){return U=Object.setPrototypeOf?Object.getPrototypeOf:function(X){return X.__proto__||Object.getPrototypeOf(X)},U(H)}function q(H,Y,X){return Y in H?Object.defineProperty(H,Y,{value:X,enumerable:!0,configurable:!0,writable:!0}):H[Y]=X,H}var te=function(H){P(X,H);var Y=O(X);function X(Z){var ie;return M(this,X),ie=Y.call(this,Z),q(V(ie),"onDragStart",function(se,ne){(0,c.default)("Draggable: onDragStart: %j",ne);var ve=ie.props.onStart(se,(0,s.createDraggableData)(V(ie),ne));if(ve===!1)return!1;ie.setState({dragging:!0,dragged:!0})}),q(V(ie),"onDrag",function(se,ne){if(!ie.state.dragging)return!1;(0,c.default)("Draggable: onDrag: %j",ne);var ve=(0,s.createDraggableData)(V(ie),ne),R={x:ve.x,y:ve.y};if(ie.props.bounds){var F=R.x,G=R.y;R.x+=ie.state.slackX,R.y+=ie.state.slackY;var ae=(0,s.getBoundPosition)(V(ie),R.x,R.y),re=b(ae,2),K=re[0],ue=re[1];R.x=K,R.y=ue,R.slackX=ie.state.slackX+(F-R.x),R.slackY=ie.state.slackY+(G-R.y),ve.x=R.x,ve.y=R.y,ve.deltaX=R.x-ie.state.x,ve.deltaY=R.y-ie.state.y}var Re=ie.props.onDrag(se,ve);if(Re===!1)return!1;ie.setState(R)}),q(V(ie),"onDragStop",function(se,ne){if(!ie.state.dragging)return!1;var ve=ie.props.onStop(se,(0,s.createDraggableData)(V(ie),ne));if(ve===!1)return!1;(0,c.default)("Draggable: onDragStop: %j",ne);var R={dragging:!1,slackX:0,slackY:0},F=Boolean(ie.props.position);if(F){var G=ie.props.position,ae=G.x,re=G.y;R.x=ae,R.y=re}ie.setState(R)}),ie.state={dragging:!1,dragged:!1,x:Z.position?Z.position.x:Z.defaultPosition.x,y:Z.position?Z.position.y:Z.defaultPosition.y,prevPropsPosition:_({},Z.position),slackX:0,slackY:0,isElementSVG:!1},Z.position&&!(Z.onDrag||Z.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element."),ie}return I(X,[{key:"componentDidMount",value:function(){typeof window.SVGElement!="undefined"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}},{key:"componentWillUnmount",value:function(){this.setState({dragging:!1})}},{key:"findDOMNode",value:function(){var ie,se,ne;return(ie=(se=this.props)===null||se===void 0||(ne=se.nodeRef)===null||ne===void 0?void 0:ne.current)!==null&&ie!==void 0?ie:a.default.findDOMNode(this)}},{key:"render",value:function(){var ie,se=this.props;se.axis,se.bounds;var ne=se.children,ve=se.defaultPosition,R=se.defaultClassName,F=se.defaultClassNameDragging,G=se.defaultClassNameDragged,ae=se.position,re=se.positionOffset;se.scale;var K=g(se,f),ue={},Re=null,mt=Boolean(ae),Xe=!mt||this.state.dragging,Zt=ae||ve,St={x:(0,s.canDragX)(this)&&Xe?this.state.x:Zt.x,y:(0,s.canDragY)(this)&&Xe?this.state.y:Zt.y};this.state.isElementSVG?Re=(0,o.createSVGTransform)(St,re):ue=(0,o.createCSSTransform)(St,re);var Jr=(0,i.default)(ne.props.className||"",R,(ie={},q(ie,F,this.state.dragging),q(ie,G,this.state.dragged),ie));return t.createElement(u.default,p({},K,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(ne),{className:Jr,style:_(_({},ne.props.style),ue),transform:Re}))}}],[{key:"getDerivedStateFromProps",value:function(ie,se){var ne=ie.position,ve=se.prevPropsPosition;return ne&&(!ve||ne.x!==ve.x||ne.y!==ve.y)?((0,c.default)("Draggable: getDerivedStateFromProps %j",{position:ne,prevPropsPosition:ve}),{x:ne.x,y:ne.y,prevPropsPosition:_({},ne)}):null}}]),X}(t.Component);r.default=te,q(te,"displayName","Draggable"),q(te,"propTypes",_(_({},u.default.propTypes),{},{axis:n.default.oneOf(["both","x","y","none"]),bounds:n.default.oneOfType([n.default.shape({left:n.default.number,right:n.default.number,top:n.default.number,bottom:n.default.number}),n.default.string,n.default.oneOf([!1])]),defaultClassName:n.default.string,defaultClassNameDragging:n.default.string,defaultClassNameDragged:n.default.string,defaultPosition:n.default.shape({x:n.default.number,y:n.default.number}),positionOffset:n.default.shape({x:n.default.oneOfType([n.default.number,n.default.string]),y:n.default.oneOfType([n.default.number,n.default.string])}),position:n.default.shape({x:n.default.number,y:n.default.number}),className:l.dontSetMe,style:l.dontSetMe,transform:l.dontSetMe})),q(te,"defaultProps",_(_({},u.default.defaultProps),{},{axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1}))}(RC);var ZC=RC,XC=ZC.default,NF=ZC.DraggableCore;ac.exports=XC,ac.exports.default=XC,ac.exports.DraggableCore=NF;var av={exports:{}},oc={},Wy={};Wy.__esModule=!0,Wy.cloneElement=FF;var kF=zF(pe.default);function zF(r){return r&&r.__esModule?r:{default:r}}function QC(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 KC(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?QC(Object(t),!0).forEach(function(n){BF(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):QC(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function BF(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function FF(r,e){return e.style&&r.props.style&&(e.style=KC(KC({},r.props.style),e.style)),e.className&&r.props.className&&(e.className=r.props.className+" "+e.className),kF.default.cloneElement(r,e)}var sc={};sc.__esModule=!0,sc.resizableProps=void 0;var tt=VF(ri.exports);function VF(r){return r&&r.__esModule?r:{default:r}}var $F={axis:tt.default.oneOf(["both","x","y","none"]),className:tt.default.string,children:tt.default.element.isRequired,draggableOpts:tt.default.shape({allowAnyClick:tt.default.bool,cancel:tt.default.string,children:tt.default.node,disabled:tt.default.bool,enableUserSelectHack:tt.default.bool,offsetParent:tt.default.node,grid:tt.default.arrayOf(tt.default.number),handle:tt.default.string,nodeRef:tt.default.object,onStart:tt.default.func,onDrag:tt.default.func,onStop:tt.default.func,onMouseDown:tt.default.func,scale:tt.default.number}),height:tt.default.number.isRequired,handle:tt.default.oneOfType([tt.default.node,tt.default.func]),handleSize:tt.default.arrayOf(tt.default.number),lockAspectRatio:tt.default.bool,maxConstraints:tt.default.arrayOf(tt.default.number),minConstraints:tt.default.arrayOf(tt.default.number),onResizeStop:tt.default.func,onResizeStart:tt.default.func,onResize:tt.default.func,resizeHandles:tt.default.arrayOf(tt.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:tt.default.number,width:tt.default.number.isRequired};sc.resizableProps=$F,oc.__esModule=!0,oc.default=void 0;var lc=jF(pe.default),HF=ac.exports,GF=Wy,WF=sc,UF=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];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 jF(r,e){if(!e&&r&&r.__esModule)return r;if(r===null||typeof 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 Uy(){return Uy=Object.assign||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},Uy.apply(this,arguments)}function YF(r,e){if(r==null)return{};var t={},n=Object.keys(r),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(t[a]=r[a]);return t}function eT(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 jy(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?eT(Object(t),!0).forEach(function(n){qF(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):eT(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function qF(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function ZF(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,Yy(r,e)}function Yy(r,e){return Yy=Object.setPrototypeOf||function(n,a){return n.__proto__=a,n},Yy(r,e)}var qy=function(r){ZF(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.handleRefs={},n.lastHandleRect=null,n.slack=null,n}var t=e.prototype;return t.componentWillUnmount=function(){this.resetData()},t.resetData=function(){this.lastHandleRect=this.slack=null},t.runConstraints=function(a,i){var o=this.props,s=o.minConstraints,l=o.maxConstraints,u=o.lockAspectRatio;if(!s&&!l&&!u)return[a,i];if(u){var c=this.props.width/this.props.height,f=a-this.props.width,h=i-this.props.height;Math.abs(f)>Math.abs(h*c)?i=a/c:a=i*c}var v=a,d=i,p=this.slack||[0,0],g=p[0],y=p[1];return a+=g,i+=y,s&&(a=Math.max(s[0],a),i=Math.max(s[1],i)),l&&(a=Math.min(l[0],a),i=Math.min(l[1],i)),this.slack=[g+(v-a),y+(d-i)],[a,i]},t.resizeHandler=function(a,i){var o=this;return function(s,l){var u=l.node,c=l.deltaX,f=l.deltaY;a==="onResizeStart"&&o.resetData();var h=(o.props.axis==="both"||o.props.axis==="x")&&i!=="n"&&i!=="s",v=(o.props.axis==="both"||o.props.axis==="y")&&i!=="e"&&i!=="w";if(!(!h&&!v)){var d=i[0],p=i[i.length-1],g=u.getBoundingClientRect();if(o.lastHandleRect!=null){if(p==="w"){var y=g.left-o.lastHandleRect.left;c+=y}if(d==="n"){var m=g.top-o.lastHandleRect.top;f+=m}}o.lastHandleRect=g,p==="w"&&(c=-c),d==="n"&&(f=-f);var _=o.props.width+(h?c/o.props.transformScale:0),b=o.props.height+(v?f/o.props.transformScale:0),w=o.runConstraints(_,b);_=w[0],b=w[1];var x=_!==o.props.width||b!==o.props.height,S=typeof o.props[a]=="function"?o.props[a]:null,T=a==="onResize"&&!x;S&&!T&&(s.persist==null||s.persist(),S(s,{node:u,size:{width:_,height:b},handle:i})),a==="onResizeStop"&&o.resetData()}}},t.renderResizeHandle=function(a,i){var o=this.props.handle;if(!o)return lc.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+a,ref:i});if(typeof o=="function")return o(a,i);var s=typeof o.type=="string",l=jy({ref:i},s?{}:{handleAxis:a});return lc.cloneElement(o,l)},t.render=function(){var a=this,i=this.props,o=i.children,s=i.className,l=i.draggableOpts;i.width,i.height,i.handle,i.handleSize,i.lockAspectRatio,i.axis,i.minConstraints,i.maxConstraints,i.onResize,i.onResizeStop,i.onResizeStart;var u=i.resizeHandles;i.transformScale;var c=YF(i,UF);return(0,GF.cloneElement)(o,jy(jy({},c),{},{className:(s?s+" ":"")+"react-resizable",children:[].concat(o.props.children,u.map(function(f){var h,v=(h=a.handleRefs[f])!=null?h:a.handleRefs[f]=lc.createRef();return lc.createElement(HF.DraggableCore,Uy({},l,{nodeRef:v,key:"resizableHandle-"+f,onStop:a.resizeHandler("onResizeStop",f),onStart:a.resizeHandler("onResizeStart",f),onDrag:a.resizeHandler("onResize",f)}),a.renderResizeHandle(f,v))}))}))},e}(lc.Component);oc.default=qy,qy.propTypes=WF.resizableProps,qy.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1};var iv={};iv.__esModule=!0,iv.default=void 0;var Zy=eV(pe.default),XF=tT(ri.exports),QF=tT(oc),KF=sc,JF=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function tT(r){return r&&r.__esModule?r:{default:r}}function rT(r){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(rT=function(a){return a?t:e})(r)}function eV(r,e){if(!e&&r&&r.__esModule)return r;if(r===null||typeof r!="object"&&typeof r!="function")return{default:r};var t=rT(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 Xy(){return Xy=Object.assign||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},Xy.apply(this,arguments)}function nT(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 ov(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?nT(Object(t),!0).forEach(function(n){tV(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):nT(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function tV(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function rV(r,e){if(r==null)return{};var t={},n=Object.keys(r),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(t[a]=r[a]);return t}function nV(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,Qy(r,e)}function Qy(r,e){return Qy=Object.setPrototypeOf||function(n,a){return n.__proto__=a,n},Qy(r,e)}var aT=function(r){nV(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={width:n.props.width,height:n.props.height,propsWidth:n.props.width,propsHeight:n.props.height},n.onResize=function(s,l){var u=l.size;n.props.onResize?(s.persist==null||s.persist(),n.setState(u,function(){return n.props.onResize&&n.props.onResize(s,l)})):n.setState(u)},n}e.getDerivedStateFromProps=function(a,i){return i.propsWidth!==a.width||i.propsHeight!==a.height?{width:a.width,height:a.height,propsWidth:a.width,propsHeight:a.height}:null};var t=e.prototype;return t.render=function(){var a=this.props,i=a.handle,o=a.handleSize;a.onResize;var s=a.onResizeStart,l=a.onResizeStop,u=a.draggableOpts,c=a.minConstraints,f=a.maxConstraints,h=a.lockAspectRatio,v=a.axis;a.width,a.height;var d=a.resizeHandles,p=a.style,g=a.transformScale,y=rV(a,JF);return Zy.createElement(QF.default,{axis:v,draggableOpts:u,handle:i,handleSize:o,height:this.state.height,lockAspectRatio:h,maxConstraints:f,minConstraints:c,onResizeStart:s,onResize:this.onResize,onResizeStop:l,resizeHandles:d,transformScale:g,width:this.state.width},Zy.createElement("div",Xy({},y,{style:ov(ov({},p),{},{width:this.state.width+"px",height:this.state.height+"px"})})))},e}(Zy.Component);iv.default=aT,aT.propTypes=ov(ov({},KF.resizableProps),{},{children:XF.default.element}),av.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")},av.exports.Resizable=oc.default,av.exports.ResizableBox=iv.default;var ni={};Object.defineProperty(ni,"__esModule",{value:!0}),ni.resizeHandleType=ni.resizeHandleAxesType=ni.default=void 0;var Ke=iT(ri.exports),aV=iT(pe.default);function iT(r){return r&&r.__esModule?r:{default:r}}var oT=Ke.default.arrayOf(Ke.default.oneOf(["s","w","e","n","sw","nw","se","ne"]));ni.resizeHandleAxesType=oT;var sT=Ke.default.oneOfType([Ke.default.node,Ke.default.func]);ni.resizeHandleType=sT;var iV={className:Ke.default.string,style:Ke.default.object,width:Ke.default.number,autoSize:Ke.default.bool,cols:Ke.default.number,draggableCancel:Ke.default.string,draggableHandle:Ke.default.string,verticalCompact:function(e){e.verticalCompact},compactType:Ke.default.oneOf(["vertical","horizontal"]),layout:function(e){var t=e.layout;t!==void 0&&et.validateLayout(t,"layout")},margin:Ke.default.arrayOf(Ke.default.number),containerPadding:Ke.default.arrayOf(Ke.default.number),rowHeight:Ke.default.number,maxRows:Ke.default.number,isBounded:Ke.default.bool,isDraggable:Ke.default.bool,isResizable:Ke.default.bool,allowOverlap:Ke.default.bool,preventCollision:Ke.default.bool,useCSSTransforms:Ke.default.bool,transformScale:Ke.default.number,isDroppable:Ke.default.bool,resizeHandles:oT,resizeHandle:sT,onLayoutChange:Ke.default.func,onDragStart:Ke.default.func,onDrag:Ke.default.func,onDragStop:Ke.default.func,onResizeStart:Ke.default.func,onResize:Ke.default.func,onResizeStop:Ke.default.func,onDrop:Ke.default.func,droppingItem:Ke.default.shape({i:Ke.default.string.isRequired,w:Ke.default.number.isRequired,h:Ke.default.number.isRequired}),children:function(e,t){var n=e[t],a={};aV.default.Children.forEach(n,function(i){if((i==null?void 0:i.key)!=null){if(a[i.key])throw new Error('Duplicate child key "'+i.key+'" found! This will cause problems in ReactGridLayout.');a[i.key]=!0}})},innerRef:Ke.default.any};ni.default=iV;function Ky(r){return Ky=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},Ky(r)}Object.defineProperty(Qh,"__esModule",{value:!0}),Qh.default=void 0;var Sl=Jy(pe.default),vt=Jy(ri.exports),oV=ac.exports,sV=av.exports,uc=et,pr=ti,lT=ni,lV=Jy(qh);function Jy(r){return r&&r.__esModule?r:{default:r}}function uT(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 em(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?uT(Object(t),!0).forEach(function(n){oa(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):uT(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function uV(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function cT(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 cV(r,e,t){return e&&cT(r.prototype,e),t&&cT(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r}function fV(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&&tm(r,e)}function tm(r,e){return tm=Object.setPrototypeOf||function(n,a){return n.__proto__=a,n},tm(r,e)}function hV(r){var e=dV();return function(){var n=sv(r),a;if(e){var i=sv(this).constructor;a=Reflect.construct(n,arguments,i)}else a=n.apply(this,arguments);return vV(this,a)}}function vV(r,e){if(e&&(Ky(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return In(r)}function In(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function dV(){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 sv(r){return sv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},sv(r)}function oa(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}var rm=function(r){fV(t,r);var e=hV(t);function t(){var n;uV(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)),oa(In(n),"state",{resizing:null,dragging:null,className:""}),oa(In(n),"elementRef",Sl.default.createRef()),oa(In(n),"onDragStart",function(s,l){var u=l.node,c=n.props,f=c.onDragStart,h=c.transformScale;if(!!f){var v={top:0,left:0},d=u.offsetParent;if(!!d){var p=d.getBoundingClientRect(),g=u.getBoundingClientRect(),y=g.left/h,m=p.left/h,_=g.top/h,b=p.top/h;v.left=y-m+d.scrollLeft,v.top=_-b+d.scrollTop,n.setState({dragging:v});var w=(0,pr.calcXY)(n.getPositionParams(),v.top,v.left,n.props.w,n.props.h),x=w.x,S=w.y;return f.call(In(n),n.props.i,x,S,{e:s,node:u,newPosition:v})}}}),oa(In(n),"onDrag",function(s,l){var u=l.node,c=l.deltaX,f=l.deltaY,h=n.props.onDrag;if(!!h){if(!n.state.dragging)throw new Error("onDrag called before onDragStart.");var v=n.state.dragging.top+f,d=n.state.dragging.left+c,p=n.props,g=p.isBounded,y=p.i,m=p.w,_=p.h,b=p.containerWidth,w=n.getPositionParams();if(g){var x=u.offsetParent;if(x){var S=n.props,T=S.margin,D=S.rowHeight,M=x.clientHeight-(0,pr.calcGridItemWHPx)(_,D,T[1]);v=(0,pr.clamp)(v,0,M);var A=(0,pr.calcGridColWidth)(w),I=b-(0,pr.calcGridItemWHPx)(m,A,T[0]);d=(0,pr.clamp)(d,0,I)}}var P={top:v,left:d};n.setState({dragging:P});var E=(0,pr.calcXY)(w,v,d,m,_),O=E.x,N=E.y;return h.call(In(n),y,O,N,{e:s,node:u,newPosition:P})}}),oa(In(n),"onDragStop",function(s,l){var u=l.node,c=n.props.onDragStop;if(!!c){if(!n.state.dragging)throw new Error("onDragEnd called before onDragStart.");var f=n.props,h=f.w,v=f.h,d=f.i,p=n.state.dragging,g=p.left,y=p.top,m={top:y,left:g};n.setState({dragging:null});var _=(0,pr.calcXY)(n.getPositionParams(),y,g,h,v),b=_.x,w=_.y;return c.call(In(n),d,b,w,{e:s,node:u,newPosition:m})}}),oa(In(n),"onResizeStop",function(s,l){n.onResizeHandler(s,l,"onResizeStop")}),oa(In(n),"onResizeStart",function(s,l){n.onResizeHandler(s,l,"onResizeStart")}),oa(In(n),"onResize",function(s,l){n.onResizeHandler(s,l,"onResize")}),n}return cV(t,[{key:"shouldComponentUpdate",value:function(a,i){if(this.props.children!==a.children||this.props.droppingPosition!==a.droppingPosition)return!0;var o=(0,pr.calcGridItemPosition)(this.getPositionParams(this.props),this.props.x,this.props.y,this.props.w,this.props.h,this.state),s=(0,pr.calcGridItemPosition)(this.getPositionParams(a),a.x,a.y,a.w,a.h,i);return!(0,uc.fastPositionEqual)(o,s)||this.props.useCSSTransforms!==a.useCSSTransforms}},{key:"componentDidMount",value:function(){this.moveDroppingItem({})}},{key:"componentDidUpdate",value:function(a){this.moveDroppingItem(a)}},{key:"moveDroppingItem",value:function(a){var i=this.props.droppingPosition;if(!!i){var o=this.elementRef.current;if(!!o){var s=a.droppingPosition||{left:0,top:0},l=this.state.dragging,u=l&&i.left!==s.left||i.top!==s.top;if(!l)this.onDragStart(i.e,{node:o,deltaX:i.left,deltaY:i.top});else if(u){var c=i.left-l.left,f=i.top-l.top;this.onDrag(i.e,{node:o,deltaX:c,deltaY:f})}}}}},{key:"getPositionParams",value:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props;return{cols:a.cols,containerPadding:a.containerPadding,containerWidth:a.containerWidth,margin:a.margin,maxRows:a.maxRows,rowHeight:a.rowHeight}}},{key:"createStyle",value:function(a){var i=this.props,o=i.usePercentages,s=i.containerWidth,l=i.useCSSTransforms,u;return l?u=(0,uc.setTransform)(a):(u=(0,uc.setTopLeft)(a),o&&(u.left=(0,uc.perc)(a.left/s),u.width=(0,uc.perc)(a.width/s))),u}},{key:"mixinDraggable",value:function(a,i){return Sl.default.createElement(oV.DraggableCore,{disabled:!i,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,handle:this.props.handle,cancel:".react-resizable-handle"+(this.props.cancel?","+this.props.cancel:""),scale:this.props.transformScale,nodeRef:this.elementRef},a)}},{key:"mixinResizable",value:function(a,i,o){var s=this.props,l=s.cols,u=s.x,c=s.minW,f=s.minH,h=s.maxW,v=s.maxH,d=s.transformScale,p=s.resizeHandles,g=s.resizeHandle,y=this.getPositionParams(),m=(0,pr.calcGridItemPosition)(y,0,0,l-u,0).width,_=(0,pr.calcGridItemPosition)(y,0,0,c,f),b=(0,pr.calcGridItemPosition)(y,0,0,h,v),w=[_.width,_.height],x=[Math.min(b.width,m),Math.min(b.height,1/0)];return Sl.default.createElement(sV.Resizable,{draggableOpts:{disabled:!o},className:o?void 0:"react-resizable-hide",width:i.width,height:i.height,minConstraints:w,maxConstraints:x,onResizeStop:this.onResizeStop,onResizeStart:this.onResizeStart,onResize:this.onResize,transformScale:d,resizeHandles:p,handle:g},a)}},{key:"onResizeHandler",value:function(a,i,o){var s=i.node,l=i.size,u=this.props[o];if(!!u){var c=this.props,f=c.cols,h=c.x,v=c.y,d=c.i,p=c.maxH,g=c.minH,y=this.props,m=y.minW,_=y.maxW,b=(0,pr.calcWH)(this.getPositionParams(),l.width,l.height,h,v),w=b.w,x=b.h;m=Math.max(m,1),_=Math.min(_,f-h),w=(0,pr.clamp)(w,m,_),x=(0,pr.clamp)(x,g,p),this.setState({resizing:o==="onResizeStop"?null:l}),u.call(this,d,w,x,{e:a,node:s,size:l})}}},{key:"render",value:function(){var a=this.props,i=a.x,o=a.y,s=a.w,l=a.h,u=a.isDraggable,c=a.isResizable,f=a.droppingPosition,h=a.useCSSTransforms,v=(0,pr.calcGridItemPosition)(this.getPositionParams(),i,o,s,l,this.state),d=Sl.default.Children.only(this.props.children),p=Sl.default.cloneElement(d,{ref:this.elementRef,className:(0,lV.default)("react-grid-item",d.props.className,this.props.className,{static:this.props.static,resizing:Boolean(this.state.resizing),"react-draggable":u,"react-draggable-dragging":Boolean(this.state.dragging),dropping:Boolean(f),cssTransforms:h}),style:em(em(em({},this.props.style),d.props.style),this.createStyle(v))});return p=this.mixinResizable(p,v,c),p=this.mixinDraggable(p,u),p}}]),t}(Sl.default.Component);Qh.default=rm,oa(rm,"propTypes",{children:vt.default.element,cols:vt.default.number.isRequired,containerWidth:vt.default.number.isRequired,rowHeight:vt.default.number.isRequired,margin:vt.default.array.isRequired,maxRows:vt.default.number.isRequired,containerPadding:vt.default.array.isRequired,x:vt.default.number.isRequired,y:vt.default.number.isRequired,w:vt.default.number.isRequired,h:vt.default.number.isRequired,minW:function(e,t){var n=e[t];if(typeof n!="number")return new Error("minWidth not Number");if(n>e.w||n>e.maxW)return new Error("minWidth larger than item width/maxWidth")},maxW:function(e,t){var n=e[t];if(typeof n!="number")return new Error("maxWidth not Number");if(n<e.w||n<e.minW)return new Error("maxWidth smaller than item width/minWidth")},minH:function(e,t){var n=e[t];if(typeof n!="number")return new Error("minHeight not Number");if(n>e.h||n>e.maxH)return new Error("minHeight larger than item height/maxHeight")},maxH:function(e,t){var n=e[t];if(typeof n!="number")return new Error("maxHeight not Number");if(n<e.h||n<e.minH)return new Error("maxHeight smaller than item height/minHeight")},i:vt.default.string.isRequired,resizeHandles:lT.resizeHandleAxesType,resizeHandle:lT.resizeHandleType,onDragStop:vt.default.func,onDragStart:vt.default.func,onDrag:vt.default.func,onResizeStop:vt.default.func,onResizeStart:vt.default.func,onResize:vt.default.func,isDraggable:vt.default.bool.isRequired,isResizable:vt.default.bool.isRequired,isBounded:vt.default.bool.isRequired,static:vt.default.bool,useCSSTransforms:vt.default.bool.isRequired,transformScale:vt.default.number,className:vt.default.string,handle:vt.default.string,cancel:vt.default.string,droppingPosition:vt.default.shape({e:vt.default.object.isRequired,left:vt.default.number.isRequired,top:vt.default.number.isRequired})}),oa(rm,"defaultProps",{className:"",cancel:"",handle:"",minH:1,minW:1,maxH:1/0,maxW:1/0,transformScale:1});function lv(r){return lv=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},lv(r)}Object.defineProperty(tc,"__esModule",{value:!0}),tc.default=void 0;var Vo=mV(pe.default),nm=uv(rc.exports),pV=uv(qh),Ve=et,gV=ti,fT=uv(Qh),yV=uv(ni);function uv(r){return r&&r.__esModule?r:{default:r}}function hT(r){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(hT=function(a){return a?t:e})(r)}function mV(r,e){if(!e&&r&&r.__esModule)return r;if(r===null||lv(r)!=="object"&&typeof r!="function")return{default:r};var t=hT(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 _V(r){return wV(r)||xV(r)||dT(r)||bV()}function bV(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
6
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xV(r){if(typeof Symbol!="undefined"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function wV(r){if(Array.isArray(r))return am(r)}function vT(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 $o(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?vT(Object(t),!0).forEach(function(n){gr(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):vT(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function SV(r,e){return DV(r)||TV(r,e)||dT(r,e)||CV()}function CV(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
7
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dT(r,e){if(!!r){if(typeof r=="string")return am(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 am(r,e)}}function am(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 TV(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 DV(r){if(Array.isArray(r))return r}function MV(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function pT(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 AV(r,e,t){return e&&pT(r.prototype,e),t&&pT(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r}function LV(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&&im(r,e)}function im(r,e){return im=Object.setPrototypeOf||function(n,a){return n.__proto__=a,n},im(r,e)}function IV(r){var e=EV();return function(){var n=cv(r),a;if(e){var i=cv(this).constructor;a=Reflect.construct(n,arguments,i)}else a=n.apply(this,arguments);return PV(this,a)}}function PV(r,e){if(e&&(lv(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return rn(r)}function rn(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function EV(){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 cv(r){return cv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},cv(r)}function gr(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}var gT="react-grid-layout",yT=!1;try{yT=/firefox/i.test(navigator.userAgent)}catch{}var fv=function(r){LV(t,r);var e=IV(t);function t(){var n;MV(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)),gr(rn(n),"state",{activeDrag:null,layout:(0,Ve.synchronizeLayoutWithChildren)(n.props.layout,n.props.children,n.props.cols,(0,Ve.compactType)(n.props),n.props.allowOverlap),mounted:!1,oldDragItem:null,oldLayout:null,oldResizeItem:null,droppingDOMNode:null,children:[]}),gr(rn(n),"dragEnterCounter",0),gr(rn(n),"onDragStart",function(s,l,u,c){var f=c.e,h=c.node,v=n.state.layout,d=(0,Ve.getLayoutItem)(v,s);if(!!d)return n.setState({oldDragItem:(0,Ve.cloneLayoutItem)(d),oldLayout:v}),n.props.onDragStart(v,d,d,null,f,h)}),gr(rn(n),"onDrag",function(s,l,u,c){var f=c.e,h=c.node,v=n.state.oldDragItem,d=n.state.layout,p=n.props,g=p.cols,y=p.allowOverlap,m=p.preventCollision,_=(0,Ve.getLayoutItem)(d,s);if(!!_){var b={w:_.w,h:_.h,x:_.x,y:_.y,placeholder:!0,i:s},w=!0;d=(0,Ve.moveElement)(d,_,l,u,w,m,(0,Ve.compactType)(n.props),g,y),n.props.onDrag(d,v,_,b,f,h),n.setState({layout:y?d:(0,Ve.compact)(d,(0,Ve.compactType)(n.props),g),activeDrag:b})}}),gr(rn(n),"onDragStop",function(s,l,u,c){var f=c.e,h=c.node;if(!!n.state.activeDrag){var v=n.state.oldDragItem,d=n.state.layout,p=n.props,g=p.cols,y=p.preventCollision,m=p.allowOverlap,_=(0,Ve.getLayoutItem)(d,s);if(!!_){var b=!0;d=(0,Ve.moveElement)(d,_,l,u,b,y,(0,Ve.compactType)(n.props),g,m),n.props.onDragStop(d,v,_,null,f,h);var w=m?d:(0,Ve.compact)(d,(0,Ve.compactType)(n.props),g),x=n.state.oldLayout;n.setState({activeDrag:null,layout:w,oldDragItem:null,oldLayout:null}),n.onLayoutMaybeChanged(w,x)}}}),gr(rn(n),"onResizeStart",function(s,l,u,c){var f=c.e,h=c.node,v=n.state.layout,d=(0,Ve.getLayoutItem)(v,s);!d||(n.setState({oldResizeItem:(0,Ve.cloneLayoutItem)(d),oldLayout:n.state.layout}),n.props.onResizeStart(v,d,d,null,f,h))}),gr(rn(n),"onResize",function(s,l,u,c){var f=c.e,h=c.node,v=n.state,d=v.layout,p=v.oldResizeItem,g=n.props,y=g.cols,m=g.preventCollision,_=g.allowOverlap,b=(0,Ve.withLayoutItem)(d,s,function(D){var M;if(m&&!_){var A=(0,Ve.getAllCollisions)(d,$o($o({},D),{},{w:l,h:u})).filter(function(E){return E.i!==D.i});if(M=A.length>0,M){var I=1/0,P=1/0;A.forEach(function(E){E.x>D.x&&(I=Math.min(I,E.x)),E.y>D.y&&(P=Math.min(P,E.y))}),Number.isFinite(I)&&(D.w=I-D.x),Number.isFinite(P)&&(D.h=P-D.y)}}return M||(D.w=l,D.h=u),D}),w=SV(b,2),x=w[0],S=w[1];if(!!S){var T={w:S.w,h:S.h,x:S.x,y:S.y,static:!0,i:s};n.props.onResize(x,p,S,T,f,h),n.setState({layout:_?x:(0,Ve.compact)(x,(0,Ve.compactType)(n.props),y),activeDrag:T})}}),gr(rn(n),"onResizeStop",function(s,l,u,c){var f=c.e,h=c.node,v=n.state,d=v.layout,p=v.oldResizeItem,g=n.props,y=g.cols,m=g.allowOverlap,_=(0,Ve.getLayoutItem)(d,s);n.props.onResizeStop(d,p,_,null,f,h);var b=m?d:(0,Ve.compact)(d,(0,Ve.compactType)(n.props),y),w=n.state.oldLayout;n.setState({activeDrag:null,layout:b,oldResizeItem:null,oldLayout:null}),n.onLayoutMaybeChanged(b,w)}),gr(rn(n),"onDragOver",function(s){var l;if(s.preventDefault(),s.stopPropagation(),yT&&!((l=s.nativeEvent.target)!==null&&l!==void 0&&l.classList.contains(gT)))return!1;var u=n.props,c=u.droppingItem,f=u.onDropDragOver,h=u.margin,v=u.cols,d=u.rowHeight,p=u.maxRows,g=u.width,y=u.containerPadding,m=u.transformScale,_=f==null?void 0:f(s);if(_===!1)return n.state.droppingDOMNode&&n.removeDroppingPlaceholder(),!1;var b=$o($o({},c),_),w=n.state.layout,x=s.nativeEvent,S=x.layerX,T=x.layerY,D={left:S/m,top:T/m,e:s};if(n.state.droppingDOMNode){if(n.state.droppingPosition){var I=n.state.droppingPosition,P=I.left,E=I.top,O=P!=S||E!=T;O&&n.setState({droppingPosition:D})}}else{var M={cols:v,margin:h,maxRows:p,rowHeight:d,containerWidth:g,containerPadding:y||h},A=(0,gV.calcXY)(M,T,S,b.w,b.h);n.setState({droppingDOMNode:Vo.createElement("div",{key:b.i}),droppingPosition:D,layout:[].concat(_V(w),[$o($o({},b),{},{x:A.x,y:A.y,static:!1,isDraggable:!0})])})}}),gr(rn(n),"removeDroppingPlaceholder",function(){var s=n.props,l=s.droppingItem,u=s.cols,c=n.state.layout,f=(0,Ve.compact)(c.filter(function(h){return h.i!==l.i}),(0,Ve.compactType)(n.props),u);n.setState({layout:f,droppingDOMNode:null,activeDrag:null,droppingPosition:void 0})}),gr(rn(n),"onDragLeave",function(s){s.preventDefault(),s.stopPropagation(),n.dragEnterCounter--,n.dragEnterCounter===0&&n.removeDroppingPlaceholder()}),gr(rn(n),"onDragEnter",function(s){s.preventDefault(),s.stopPropagation(),n.dragEnterCounter++}),gr(rn(n),"onDrop",function(s){s.preventDefault(),s.stopPropagation();var l=n.props.droppingItem,u=n.state.layout,c=u.find(function(f){return f.i===l.i});n.dragEnterCounter=0,n.removeDroppingPlaceholder(),n.props.onDrop(u,c,s)}),n}return AV(t,[{key:"componentDidMount",value:function(){this.setState({mounted:!0}),this.onLayoutMaybeChanged(this.state.layout,this.props.layout)}},{key:"shouldComponentUpdate",value:function(a,i){return this.props.children!==a.children||!(0,Ve.fastRGLPropsEqual)(this.props,a,nm.default)||this.state.activeDrag!==i.activeDrag||this.state.mounted!==i.mounted||this.state.droppingPosition!==i.droppingPosition}},{key:"componentDidUpdate",value:function(a,i){if(!this.state.activeDrag){var o=this.state.layout,s=i.layout;this.onLayoutMaybeChanged(o,s)}}},{key:"containerHeight",value:function(){if(!!this.props.autoSize){var a=(0,Ve.bottom)(this.state.layout),i=this.props.containerPadding?this.props.containerPadding[1]:this.props.margin[1];return a*this.props.rowHeight+(a-1)*this.props.margin[1]+i*2+"px"}}},{key:"onLayoutMaybeChanged",value:function(a,i){i||(i=this.state.layout),(0,nm.default)(i,a)||this.props.onLayoutChange(a)}},{key:"placeholder",value:function(){var a=this.state.activeDrag;if(!a)return null;var i=this.props,o=i.width,s=i.cols,l=i.margin,u=i.containerPadding,c=i.rowHeight,f=i.maxRows,h=i.useCSSTransforms,v=i.transformScale;return Vo.createElement(fT.default,{w:a.w,h:a.h,x:a.x,y:a.y,i:a.i,className:"react-grid-placeholder",containerWidth:o,cols:s,margin:l,containerPadding:u||l,maxRows:f,rowHeight:c,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:h,transformScale:v},Vo.createElement("div",null))}},{key:"processGridItem",value:function(a,i){if(!(!a||!a.key)){var o=(0,Ve.getLayoutItem)(this.state.layout,String(a.key));if(!o)return null;var s=this.props,l=s.width,u=s.cols,c=s.margin,f=s.containerPadding,h=s.rowHeight,v=s.maxRows,d=s.isDraggable,p=s.isResizable,g=s.isBounded,y=s.useCSSTransforms,m=s.transformScale,_=s.draggableCancel,b=s.draggableHandle,w=s.resizeHandles,x=s.resizeHandle,S=this.state,T=S.mounted,D=S.droppingPosition,M=typeof o.isDraggable=="boolean"?o.isDraggable:!o.static&&d,A=typeof o.isResizable=="boolean"?o.isResizable:!o.static&&p,I=o.resizeHandles||w,P=M&&g&&o.isBounded!==!1;return Vo.createElement(fT.default,{containerWidth:l,cols:u,margin:c,containerPadding:f||c,maxRows:v,rowHeight:h,cancel:_,handle:b,onDragStop:this.onDragStop,onDragStart:this.onDragStart,onDrag:this.onDrag,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,isDraggable:M,isResizable:A,isBounded:P,useCSSTransforms:y&&T,usePercentages:!T,transformScale:m,w:o.w,h:o.h,x:o.x,y:o.y,i:o.i,minH:o.minH,minW:o.minW,maxH:o.maxH,maxW:o.maxW,static:o.static,droppingPosition:i?D:void 0,resizeHandles:I,resizeHandle:x},a)}}},{key:"render",value:function(){var a=this,i=this.props,o=i.className,s=i.style,l=i.isDroppable,u=i.innerRef,c=(0,pV.default)(gT,o),f=$o({height:this.containerHeight()},s);return Vo.createElement("div",{ref:u,className:c,style:f,onDrop:l?this.onDrop:Ve.noop,onDragLeave:l?this.onDragLeave:Ve.noop,onDragEnter:l?this.onDragEnter:Ve.noop,onDragOver:l?this.onDragOver:Ve.noop},Vo.Children.map(this.props.children,function(h){return a.processGridItem(h)}),l&&this.state.droppingDOMNode&&this.processGridItem(this.state.droppingDOMNode,!0),this.placeholder())}}],[{key:"getDerivedStateFromProps",value:function(a,i){var o;if(i.activeDrag)return null;if(!(0,nm.default)(a.layout,i.propsLayout)||a.compactType!==i.compactType?o=a.layout:(0,Ve.childrenEqual)(a.children,i.children)||(o=i.layout),o){var s=(0,Ve.synchronizeLayoutWithChildren)(o,a.children,a.cols,(0,Ve.compactType)(a),a.allowOverlap);return{layout:s,compactType:a.compactType,children:a.children,propsLayout:a.layout}}return null}}]),t}(Vo.Component);tc.default=fv,gr(fv,"displayName","ReactGridLayout"),gr(fv,"propTypes",yV.default),gr(fv,"defaultProps",{autoSize:!0,cols:12,className:"",style:{},draggableHandle:"",draggableCancel:"",containerPadding:null,rowHeight:150,maxRows:1/0,layout:[],margin:[10,10],isBounded:!1,isDraggable:!0,isResizable:!0,allowOverlap:!1,isDroppable:!1,useCSSTransforms:!0,transformScale:1,verticalCompact:!0,compactType:"vertical",preventCollision:!1,droppingItem:{i:"__dropping-elem__",h:1,w:1},resizeHandles:["se"],onLayoutChange:Ve.noop,onDragStart:Ve.noop,onDrag:Ve.noop,onDragStop:Ve.noop,onResizeStart:Ve.noop,onResize:Ve.noop,onResizeStop:Ve.noop,onDrop:Ve.noop,onDropDragOver:Ve.noop});var hv={},Ho={};Object.defineProperty(Ho,"__esModule",{value:!0}),Ho.findOrGenerateResponsiveLayout=NV,Ho.getBreakpointFromWidth=OV,Ho.getColsFromBreakpoint=RV,Ho.sortBreakpoints=om;var vv=et;function OV(r,e){for(var t=om(r),n=t[0],a=1,i=t.length;a<i;a++){var o=t[a];e>r[o]&&(n=o)}return n}function RV(r,e){if(!e[r])throw new Error("ResponsiveReactGridLayout: `cols` entry for breakpoint "+r+" is missing!");return e[r]}function NV(r,e,t,n,a,i){if(r[t])return(0,vv.cloneLayout)(r[t]);for(var o=r[n],s=om(e),l=s.slice(s.indexOf(t)),u=0,c=l.length;u<c;u++){var f=l[u];if(r[f]){o=r[f];break}}return o=(0,vv.cloneLayout)(o||[]),(0,vv.compact)((0,vv.correctBounds)(o,{cols:a}),i,a)}function om(r){var e=Object.keys(r);return e.sort(function(t,n){return r[t]-r[n]})}function dv(r){return dv=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},dv(r)}Object.defineProperty(hv,"__esModule",{value:!0}),hv.default=void 0;var mT=BV(pe.default),nn=lm(ri.exports),sm=lm(rc.exports),Cl=et,Go=Ho,kV=lm(tc),zV=["breakpoint","breakpoints","cols","layouts","margin","containerPadding","onBreakpointChange","onLayoutChange","onWidthChange"];function lm(r){return r&&r.__esModule?r:{default:r}}function _T(r){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(_T=function(a){return a?t:e})(r)}function BV(r,e){if(!e&&r&&r.__esModule)return r;if(r===null||dv(r)!=="object"&&typeof r!="function")return{default:r};var t=_T(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 um(){return um=Object.assign||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},um.apply(this,arguments)}function FV(r,e){if(r==null)return{};var t=VV(r,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(r,n)||(t[n]=r[n]))}return t}function VV(r,e){if(r==null)return{};var t={},n=Object.keys(r),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(t[a]=r[a]);return t}function bT(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 cm(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?bT(Object(t),!0).forEach(function(n){Tl(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):bT(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function $V(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function xT(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 HV(r,e,t){return e&&xT(r.prototype,e),t&&xT(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r}function GV(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&&fm(r,e)}function fm(r,e){return fm=Object.setPrototypeOf||function(n,a){return n.__proto__=a,n},fm(r,e)}function WV(r){var e=jV();return function(){var n=pv(r),a;if(e){var i=pv(this).constructor;a=Reflect.construct(n,arguments,i)}else a=n.apply(this,arguments);return UV(this,a)}}function UV(r,e){if(e&&(dv(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return hm(r)}function hm(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function jV(){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 pv(r){return pv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},pv(r)}function Tl(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}var wT=function(e){return Object.prototype.toString.call(e)};function gv(r,e){return r==null?null:Array.isArray(r)?r:r[e]}var vm=function(r){GV(t,r);var e=WV(t);function t(){var n;$V(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)),Tl(hm(n),"state",n.generateInitialState()),Tl(hm(n),"onLayoutChange",function(s){n.props.onLayoutChange(s,cm(cm({},n.props.layouts),{},Tl({},n.state.breakpoint,s)))}),n}return HV(t,[{key:"generateInitialState",value:function(){var a=this.props,i=a.width,o=a.breakpoints,s=a.layouts,l=a.cols,u=(0,Go.getBreakpointFromWidth)(o,i),c=(0,Go.getColsFromBreakpoint)(u,l),f=this.props.verticalCompact===!1?null:this.props.compactType,h=(0,Go.findOrGenerateResponsiveLayout)(s,o,u,u,c,f);return{layout:h,breakpoint:u,cols:c}}},{key:"componentDidUpdate",value:function(a){(this.props.width!=a.width||this.props.breakpoint!==a.breakpoint||!(0,sm.default)(this.props.breakpoints,a.breakpoints)||!(0,sm.default)(this.props.cols,a.cols))&&this.onWidthChange(a)}},{key:"onWidthChange",value:function(a){var i=this.props,o=i.breakpoints,s=i.cols,l=i.layouts,u=i.compactType,c=this.props.breakpoint||(0,Go.getBreakpointFromWidth)(this.props.breakpoints,this.props.width),f=this.state.breakpoint,h=(0,Go.getColsFromBreakpoint)(c,s),v=cm({},l);if(f!==c||a.breakpoints!==o||a.cols!==s){f in v||(v[f]=(0,Cl.cloneLayout)(this.state.layout));var d=(0,Go.findOrGenerateResponsiveLayout)(v,o,c,f,h,u);d=(0,Cl.synchronizeLayoutWithChildren)(d,this.props.children,h,u,this.props.allowOverlap),v[c]=d,this.props.onLayoutChange(d,v),this.props.onBreakpointChange(c,h),this.setState({breakpoint:c,layout:d,cols:h})}var p=gv(this.props.margin,c),g=gv(this.props.containerPadding,c);this.props.onWidthChange(this.props.width,p,h,g)}},{key:"render",value:function(){var a=this.props;a.breakpoint,a.breakpoints,a.cols,a.layouts;var i=a.margin,o=a.containerPadding;a.onBreakpointChange,a.onLayoutChange,a.onWidthChange;var s=FV(a,zV);return mT.createElement(kV.default,um({},s,{margin:gv(i,this.state.breakpoint),containerPadding:gv(o,this.state.breakpoint),onLayoutChange:this.onLayoutChange,layout:this.state.layout,cols:this.state.cols}))}}],[{key:"getDerivedStateFromProps",value:function(a,i){if(!(0,sm.default)(a.layouts,i.layouts)){var o=i.breakpoint,s=i.cols,l=(0,Go.findOrGenerateResponsiveLayout)(a.layouts,a.breakpoints,o,o,s,a.compactType);return{layout:l,layouts:a.layouts}}return null}}]),t}(mT.Component);hv.default=vm,Tl(vm,"propTypes",{breakpoint:nn.default.string,breakpoints:nn.default.object,allowOverlap:nn.default.bool,cols:nn.default.object,margin:nn.default.oneOfType([nn.default.array,nn.default.object]),containerPadding:nn.default.oneOfType([nn.default.array,nn.default.object]),layouts:function(e,t){if(wT(e[t])!=="[object Object]")throw new Error("Layout property must be an object. Received: "+wT(e[t]));Object.keys(e[t]).forEach(function(n){if(!(n in e.breakpoints))throw new Error("Each key in layouts must align with a key in breakpoints.");(0,Cl.validateLayout)(e.layouts[n],"layouts."+n)})},width:nn.default.number.isRequired,onBreakpointChange:nn.default.func,onLayoutChange:nn.default.func,onWidthChange:nn.default.func}),Tl(vm,"defaultProps",{breakpoints:{lg:1200,md:996,sm:768,xs:480,xxs:0},cols:{lg:12,md:10,sm:6,xs:4,xxs:2},containerPadding:{lg:null,md:null,sm:null,xs:null,xxs:null},layouts:{},margin:[10,10],allowOverlap:!1,onBreakpointChange:Cl.noop,onLayoutChange:Cl.noop,onWidthChange:Cl.noop});var dm={};function yv(r){return yv=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},yv(r)}Object.defineProperty(dm,"__esModule",{value:!0}),dm.default=o$;var mv=XV(pe.default),YV=ST(ri.exports),qV=ST(qh),ZV=["measureBeforeMount"];function ST(r){return r&&r.__esModule?r:{default:r}}function CT(r){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(CT=function(a){return a?t:e})(r)}function XV(r,e){if(!e&&r&&r.__esModule)return r;if(r===null||yv(r)!=="object"&&typeof r!="function")return{default:r};var t=CT(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 pm(){return pm=Object.assign||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},pm.apply(this,arguments)}function QV(r,e){if(r==null)return{};var t=KV(r,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(r,n)||(t[n]=r[n]))}return t}function KV(r,e){if(r==null)return{};var t={},n=Object.keys(r),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(t[a]=r[a]);return t}function JV(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function TT(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 e$(r,e,t){return e&&TT(r.prototype,e),t&&TT(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r}function t$(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&&gm(r,e)}function gm(r,e){return gm=Object.setPrototypeOf||function(n,a){return n.__proto__=a,n},gm(r,e)}function r$(r){var e=a$();return function(){var n=_v(r),a;if(e){var i=_v(this).constructor;a=Reflect.construct(n,arguments,i)}else a=n.apply(this,arguments);return n$(this,a)}}function n$(r,e){if(e&&(yv(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return cc(r)}function cc(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function a$(){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 _v(r){return _v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},_v(r)}function Dl(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}var i$="react-grid-layout";function o$(r){var e;return e=function(t){t$(a,t);var n=r$(a);function a(){var i;JV(this,a);for(var o=arguments.length,s=new Array(o),l=0;l<o;l++)s[l]=arguments[l];return i=n.call.apply(n,[this].concat(s)),Dl(cc(i),"state",{width:1280}),Dl(cc(i),"elementRef",mv.createRef()),Dl(cc(i),"mounted",!1),Dl(cc(i),"onWindowResize",function(){if(!!i.mounted){var u=i.elementRef.current;u instanceof HTMLElement&&u.offsetWidth&&i.setState({width:u.offsetWidth})}}),i}return e$(a,[{key:"componentDidMount",value:function(){this.mounted=!0,window.addEventListener("resize",this.onWindowResize),this.onWindowResize()}},{key:"componentWillUnmount",value:function(){this.mounted=!1,window.removeEventListener("resize",this.onWindowResize)}},{key:"render",value:function(){var o=this.props,s=o.measureBeforeMount,l=QV(o,ZV);return s&&!this.mounted?mv.createElement("div",{className:(0,qV.default)(this.props.className,i$),style:this.props.style,ref:this.elementRef}):mv.createElement(r,pm({innerRef:this.elementRef},l,this.state))}}]),a}(mv.Component),Dl(e,"defaultProps",{measureBeforeMount:!1}),Dl(e,"propTypes",{measureBeforeMount:YV.default.bool}),e}(function(r){r.exports=tc.default,r.exports.utils=et,r.exports.Responsive=hv.default,r.exports.Responsive.utils=Ho,r.exports.WidthProvider=dm.default})(Dy);var nde="",fc={"MetricList-container":"_MetricList-container_1b506_1","MetricList-wrapper":"_MetricList-wrapper_1b506_9","noMetric-container":"_noMetric-container_1b506_17","noMetric-wrapper":"_noMetric-wrapper_1b506_25","alt-container":"_alt-container_1b506_33"},_t={cardContainer:"_cardContainer_jf7tb_1",listHeader:"_listHeader_jf7tb_9",metricName:"_metricName_jf7tb_17",metricDescription:"_metricDescription_jf7tb_25",popup:"_popup_jf7tb_33",metricFilter:"_metricFilter_jf7tb_41",popupIcon:"_popupIcon_jf7tb_49",popupMenu:"_popupMenu_jf7tb_57",popupItem:"_popupItem_jf7tb_65",csvBtn:"_csvBtn_jf7tb_73",metricData:"_metricData_jf7tb_81",singleValueData:"_singleValueData_jf7tb_89",singleValue:"_singleValue_jf7tb_89",noData:"_noData_jf7tb_105",noDataContent:"_noDataContent_jf7tb_113",noDataText:"_noDataText_jf7tb_121",loading:"_loading_jf7tb_129",features:"_features_jf7tb_137"};const Pn=(r,e,t)=>async()=>{const a=await(await fetch("https://backend.usedatabrain.com/v1/graphql",{method:"POST",headers:{"Content-Type":"application/json","X-Hasura-Role":"anonymous",...t},body:JSON.stringify({query:r,variables:e})})).json();if(a.errors){const{message:i}=a.errors[0];throw new Error(i)}return a.data},s$=`
8
- mutation CreateExternalMetric($chartOptions: jsonb = "", $companyId: uuid = "", $companyIntegrationId: uuid = "", $description: String = "", $inputFields: jsonb = "", $integrationName: String = "", $metricId: String = "", $metricQuery: String = "", $name: String = "", $outputColumns: String = "", $query: String = "", $isLive: Boolean, $clientId: String = "", $isCreatedByClient: Boolean = false, $createdBy: String = "", $timeGrain: String = "", $externalDashboardIds: [externalDashboardMetrics_insert_input!] = {}, $selectedGroupBy: jsonb = [], $isEnableGroupBy: Boolean = false, $groupBy: jsonb = {}) {
9
- insert_externalMetrics_one(
10
- object: {chartOptions: $chartOptions, companyId: $companyId, companyIntegrationId: $companyIntegrationId, description: $description, inputFields: $inputFields, integrationName: $integrationName, metricId: $metricId, metricQuery: $metricQuery, name: $name, outputColumns: $outputColumns, query: $query, isLive: $isLive, clientId: $clientId, isCreatedByClient: $isCreatedByClient, createdBy: $createdBy, timeGrain: $timeGrain, externalDashboardMetrics: {data: $externalDashboardIds}, selectedGroupBy: $selectedGroupBy, isEnableGroupBy: $isEnableGroupBy, groupBy: $groupBy}
11
- ) {
12
- id
13
- externalDashboardMetrics {
14
- externalDashboardId
15
- }
16
- }
17
- }
18
- `,l$=r=>_l(["CreateExternalMetric"],e=>Pn(s$,e)(),r),u$=`
19
- mutation FetchColumnData($companyId: String = "", $tableName: String = "", $columnName: String = "") {
20
- fetchColumnData(
21
- input: {columnName: $columnName, companyId: $companyId, tableName: $tableName}
22
- ) {
23
- data {
24
- label
25
- value
26
- }
27
- error {
28
- message
29
- }
30
- }
31
- }
32
- `,c$=r=>_l(["FetchColumnData"],e=>Pn(u$,e)(),r),f$=`
33
- mutation GenerateDatasetMetrics($companyId: String = "", $userInputs: json = "") {
34
- generateDatasetMetrics(input: {companyId: $companyId, userInputs: $userInputs}) {
35
- error
36
- query
37
- result
38
- }
39
- }
40
- `,h$=r=>_l(["GenerateDatasetMetrics"],e=>Pn(f$,e)(),r),v$=`
41
- mutation GenerateEmbeddedMetic($clientId: String = "", $companyId: String = "", $queryPrompt: String = "", $timeGrain: String = "") {
42
- generateEmbeddedMetic(
43
- input: {clientId: $clientId, companyId: $companyId, queryPrompt: $queryPrompt, timeGrain: $timeGrain}
44
- ) {
45
- query
46
- result
47
- error {
48
- message
49
- }
50
- }
51
- }
52
- `,d$=r=>_l(["GenerateEmbeddedMetic"],e=>Pn(v$,e)(),r),p$=`
53
- mutation CompanySubsetTableData($clientId: String = "", $companyId: String = "") {
54
- companySubsetTableData(input: {clientId: $clientId, companyId: $companyId}) {
55
- companyIntegrationId
56
- dbName
57
- error {
58
- message
59
- }
60
- tableList {
61
- tableName
62
- columns {
63
- datatype
64
- name
65
- as
66
- }
67
- clientColumn
68
- }
69
- }
70
- }
71
- `,g$=r=>_l(["CompanySubsetTableData"],e=>Pn(p$,e)(),r),y$=`
72
- query EmbeddedDashboardMetrics($where: externalDashboardMetrics_bool_exp) {
73
- externalDashboardMetrics(where: $where) {
74
- externalMetricId
75
- externalDashboardId
76
- externalMetric {
77
- chartOptions
78
- clientId
79
- companyId
80
- companyIntegrationId
81
- createdAt
82
- createdBy
83
- description
84
- id
85
- inputFields
86
- integrationName
87
- isCreatedByClient
88
- isLive
89
- metricId
90
- metricQuery
91
- name
92
- outputColumns
93
- query
94
- resizeAttributes
95
- timeGrain
96
- updatedAt
97
- selectedGroupBy
98
- isEnableGroupBy
99
- groupBy
100
- rlsConditions
101
- companyIntegration {
102
- name
103
- }
104
- clickActions
105
- }
106
- }
107
- }
108
- `,m$=(r,e)=>bl(r===void 0?["EmbeddedDashboardMetrics"]:["EmbeddedDashboardMetrics",r],Pn(y$,r),e),_$=`
109
- query GetExternalDashboardId($externalDashboardId: String = "") {
110
- externalDashboards(where: {externalDashboardId: {_eq: $externalDashboardId}}) {
111
- id
112
- filters
113
- }
114
- }
115
- `,b$=(r,e)=>bl(r===void 0?["GetExternalDashboardId"]:["GetExternalDashboardId",r],Pn(_$,r),e),x$=`
116
- query ExternalDashboardList($companyId: uuid = "") {
117
- externalDashboards(where: {companyId: {_eq: $companyId}}) {
118
- externalDashboardId
119
- name
120
- id
121
- }
122
- }
123
- `,w$=(r,e)=>bl(r===void 0?["ExternalDashboardList"]:["ExternalDashboardList",r],Pn(x$,r),e),S$=`
124
- query GuestTokenParams($id: uuid = "") {
125
- guestTokens_by_pk(id: $id) {
126
- clientId
127
- companyId
128
- id
129
- params
130
- }
131
- }
132
- `,C$=(r,e)=>bl(r===void 0?["GuestTokenParams"]:["GuestTokenParams",r],Pn(S$,r),e),T$=`
133
- query MetricCreationAccess($companyId: uuid = "") {
134
- companySubsetTables(where: {companyId: {_eq: $companyId}}) {
135
- isAllowMetricCreation
136
- }
137
- }
138
- `,D$=(r,e)=>bl(r===void 0?["MetricCreationAccess"]:["MetricCreationAccess",r],Pn(T$,r),e),M$=`
139
- mutation PreviewTable($companyId: String = "", $tableName: String = "", $limit: Int = 10) {
140
- previewTable(
141
- input: {companyId: $companyId, tableName: $tableName, limit: $limit}
142
- ) {
143
- data {
144
- data
145
- isError
146
- name
147
- }
148
- error {
149
- message
150
- }
151
- }
152
- }
153
- `,A$=r=>_l(["PreviewTable"],e=>Pn(M$,e)(),r),L$=`
154
- query QueryExternalMetric($id: String = "", $clientId: String = "", $globalFilters: json = "", $rlsConditions: json = [], $filterValues: json = "", $tenancyLevel: String = "") {
155
- externalMetricQuery(
156
- input: {externalMetricId: $id, clientId: $clientId, globalFilters: $globalFilters, rlsConditions: $rlsConditions, filterValues: $filterValues, tenancyLevel: $tenancyLevel}
157
- ) {
158
- data
159
- timeTaken
160
- }
161
- }
162
- `,DT=(r,e)=>bl(r===void 0?["QueryExternalMetric"]:["QueryExternalMetric",r],Pn(L$,r),e);var MT={csvlink:"_csvlink_azd6y_1",noChart:"_noChart_azd6y_7"};const AT=r=>{const e=document.documentElement;r.colors&&Object.entries(r.colors).forEach(([t,n])=>{e.style.setProperty(`--databrainhq-plugin-color-${t}`,`${n}`)}),r.border&&Object.entries(r.border).forEach(([t,n])=>{e.style.setProperty(`--databrainhq-plugin-border-${t}`,`${n}`)}),r.shadow&&Object.entries(r.shadow).forEach(([t,n])=>{e.style.setProperty(`--databrainhq-plugin-shadow-${t}`,`${n}`)}),r.typography&&Object.entries(r.typography).forEach(([t,n])=>{e.style.setProperty(`--databrainhq-plugin-typography-${t}`,`${n}`)}),r.breakpoint&&Object.entries(r.breakpoint).forEach(([t,n])=>{e.style.setProperty(`--databrainhq-plugin-breakpoint-${t}`,`${n}`)})},LT=["rgb(56, 72, 211)","rgb(251, 208, 98)","rgb(234 88 12)","rgb(245 158 11)","rgb(234 179 8)","rgb(34 197 94)","rgb(4 120 87)","rgb(15 118 110)","rgb(8 145 178)","rgb(219 234 254)","rgb(30 58 138)","rgb(139 92 246)"],ym=({data:r,measure:e,sankeyValues:t,singleValue:n,step:a,xAxis:i,yAxisList:o})=>{const s=Array.isArray(r)?r.map(h=>i&&h[i]):[],l=o==null?void 0:o.map((h,v)=>({label:h,data:Array.isArray(r)?r.map(d=>d[o[v]]):[],borderColor:LT[v]})),u=Array.isArray(r)?r.map(h=>e&&a&&{value:h[e],name:h[a]}):[],c=t==null?void 0:t.map((h,v)=>Array.isArray(r)?r.map(d=>d[t[v]]):[]),f=Array.isArray(r)?r.map(h=>n&&{value:h[n],label:n}):[];return{labels:s,datasets:l,funnelData:u,sankeyData:c,singleValueData:f}},bv=[{value:"=",label:"Equal to (=)"},{value:"<>",label:"Not equal to (!=)"},{value:"<",label:"Less than (<)"},{value:"<=",label:"Less or equal (<=)"},{value:">",label:"Greater than (>)"},{value:">=",label:"Greater or equal (>=)"},{value:"IN",label:"In"},{value:"NOT IN",label:"Not in"},{value:"LIKE (case sensitive)",label:"Like (case sensitive)"},{value:"REGEX",label:"Regex"},{value:"IS NOT NULL",label:"Is not null"},{value:"IS NULL",label:"Is null"}],IT=[{value:"100",label:"100"},{value:"500",label:"500"},{value:"1000",label:"1000"},{value:"2000",label:"2000"},{value:"5000",label:"5000"}],mm=[{value:"AVG",label:"AVG"},{value:"SUM",label:"SUM"},{value:"COUNT",label:"COUNT"},{value:"COUNT_DISTINCT",label:"COUNT_DISTINCT"},{value:"MAX",label:"MAX"},{value:"MIN",label:"MIN"}],_m=["fixed","real","int","bigint","float","number","integer","int64","float64","double precision","smallint"],bm=["varchar","text","char","text","character(36)","string"],xm=["timestamp_ltz","date","timestamp","timestamp without time zone","timestamp with time zone","datetime"],PT=["array","text[]"],wm=["boolean","bool"],ET=r=>_m.includes(r.toLowerCase())?"number":bm.includes(r.toLowerCase())||r.toLowerCase().includes("char")?"text":wm.includes(r.toLowerCase())?"boolean":"text",OT=r=>{const e="data:text/csv;charset=utf-8,";if(!r.length)return e;const t=[],n=r[0],a=Object.keys(n);t.push(`S.NO,${a.join(",").toUpperCase()}`),r.forEach((s,l)=>{const u=Object.values(s).map(c=>{if(typeof c=="number")return c;try{if(c!=null&&c.includes(","))return`"${c}"`}catch{return c}return c});t.push(`${l+1},${u.join(",")}`)});const i=t.join(`
163
- `);return encodeURI(e+i)};var I$=Object.freeze(Object.defineProperty({__proto__:null,applyTheme:AT,getChartAttributes:ym,colors:LT,getFormattedDataType:ET,objectArrayToCsvString:OT},Symbol.toStringTag,{value:"Module"})),xv={exports:{}},wv={};/**
164
- * @license React
165
- * react-jsx-runtime.production.min.js
166
- *
167
- * Copyright (c) Facebook, Inc. and its affiliates.
168
- *
169
- * This source code is licensed under the MIT license found in the
170
- * LICENSE file in the root directory of this source tree.
171
- */var P$=pe.default,E$=Symbol.for("react.element"),O$=Symbol.for("react.fragment"),R$=Object.prototype.hasOwnProperty,N$=P$.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,k$={key:!0,ref:!0,__self:!0,__source:!0};function RT(r,e,t){var n,a={},i=null,o=null;t!==void 0&&(i=""+t),e.key!==void 0&&(i=""+e.key),e.ref!==void 0&&(o=e.ref);for(n in e)R$.call(e,n)&&!k$.hasOwnProperty(n)&&(a[n]=e[n]);if(r&&r.defaultProps)for(n in e=r.defaultProps,e)a[n]===void 0&&(a[n]=e[n]);return{$$typeof:E$,type:r,key:i,ref:o,props:a,_owner:N$.current}}wv.Fragment=O$,wv.jsx=RT,wv.jsxs=RT,xv.exports=wv;const C=xv.exports.jsx,B=xv.exports.jsxs,Se=xv.exports.Fragment,z$=r=>C("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M6 3v26h20V9.6l-.3-.3l-6-6l-.3-.3H6zm2 2h10v6h6v16H8V5zm12 1.4L22.6 9H20V6.4zM15 13v5h-3l4 4l4-4h-3v-5h-2zm-3 10v2h8v-2h-8z"})}),NT=({data:r=[],fileName:e="export",className:t,iconClass:n="",text:a=""})=>B("a",{href:OT(r),download:`${e}.csv`,className:t!=null?t:MT.csvlink,target:"_self",children:[C(z$,{className:n}),a]}),Sm="something went wrong, please try again",Mt={line:"line",stepped:"stepped",bar:"bar",stack:"stack",histogram:"histogram",bubble:"bubble",scatter:"scatter",row:"row",area:"area",combo:"combo",pie:"pie",doughnut:"doughnut",waterfall:"waterfall",funnel:"funnel",gauge:"gauge",sankey:"sankey",singleValue:"single value",boxplot:"boxplot",table:"table"},B$="STATUS_TAB",F$="STREAM_TAB",V$="client_id_variable",$$={"is equal to":"=","is not equal to":"!=","is greater than":">","is less than":"<","is greater than or equal to":">=","is less than or equal to":"<="},Sv="CHART_TAB",hc="TABLE_TAB",H$="QUERY_TAB",vc="INPUT_TABLE",Ml="OUTPUT_TABLE",Cm="doughnut",Tm="pie",kT="sankey",zT="boxplot",G$="table",Wo="general",Al="configuration",Dm={Snowflake:"Snowflake",Redshift:"Redshift",BigQuery:"BigQuery",Postges:"Postgres"};var Mm=function(r,e){return Mm=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])},Mm(r,e)};function BT(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Mm(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var Am=function(){return Am=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Am.apply(this,arguments)};/*! *****************************************************************************
172
- Copyright (c) Microsoft Corporation.
173
-
174
- Permission to use, copy, modify, and/or distribute this software for any
175
- purpose with or without fee is hereby granted.
176
-
177
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
178
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
179
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
180
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
181
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
182
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
183
- PERFORMANCE OF THIS SOFTWARE.
184
- ***************************************************************************** */var Lm=function(r,e){return Lm=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])},Lm(r,e)};function j(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Lm(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var W$=function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r}(),U$=function(){function r(){this.browser=new W$,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window!="undefined"}return r}(),Uo=new U$;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(Uo.wxa=!0,Uo.touchEventsSupported=!0):typeof document=="undefined"&&typeof self!="undefined"?Uo.worker=!0:typeof navigator=="undefined"?(Uo.node=!0,Uo.svgSupported=!0):j$(navigator.userAgent,Uo);function j$(r,e){var t=e.browser,n=r.match(/Firefox\/([\d.]+)/),a=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),i=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);n&&(t.firefox=!0,t.version=n[1]),a&&(t.ie=!0,t.version=a[1]),i&&(t.edge=!0,t.version=i[1],t.newEdge=+i[1].split(".")[0]>18),o&&(t.weChat=!0),e.svgSupported=typeof SVGRect!="undefined",e.touchEventsSupported="ontouchstart"in window&&!t.ie&&!t.edge,e.pointerEventsSupported="onpointerdown"in window&&(t.edge||t.ie&&+t.version>=11),e.domSupported=typeof document!="undefined";var s=document.documentElement.style;e.transform3dSupported=(t.ie&&"transition"in s||t.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||t.ie&&+t.version>=9}var je=Uo,Im=12,FT="sans-serif",Vi=Im+"px "+FT,Y$=20,q$=100,Z$="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function X$(r){var e={};if(typeof JSON=="undefined")return e;for(var t=0;t<r.length;t++){var n=String.fromCharCode(t+32),a=(r.charCodeAt(t)-Y$)/q$;e[n]=a}return e}var Q$=X$(Z$),sa={createCanvas:function(){return typeof document!="undefined"&&document.createElement("canvas")},measureText:function(){var r,e;return function(t,n){if(!r){var a=sa.createCanvas();r=a&&a.getContext("2d")}if(r)return e!==n&&(e=r.font=n||Vi),r.measureText(t);t=t||"",n=n||Vi;var i=/(\d+)px/.exec(n),o=i&&+i[1]||Im,s=0;if(n.indexOf("mono")>=0)s=o*t.length;else for(var l=0;l<t.length;l++){var u=Q$[t[l]];s+=u==null?o:u*o}return{width:s}}}(),loadImage:function(r,e,t){var n=new Image;return n.onload=e,n.onerror=t,n.src=r,n}};function VT(r){for(var e in sa)r[e]&&(sa[e]=r[e])}var $T=En(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(r,e){return r["[object "+e+"]"]=!0,r},{}),HT=En(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(r,e){return r["[object "+e+"Array]"]=!0,r},{}),Ll=Object.prototype.toString,Cv=Array.prototype,K$=Cv.forEach,J$=Cv.filter,Pm=Cv.slice,eH=Cv.map,GT=function(){}.constructor,Tv=GT?GT.prototype:null,Em="__proto__",tH=2311;function Om(){return tH++}function Dv(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];typeof console!="undefined"&&console.error.apply(console,r)}function xe(r){if(r==null||typeof r!="object")return r;var e=r,t=Ll.call(r);if(t==="[object Array]"){if(!El(r)){e=[];for(var n=0,a=r.length;n<a;n++)e[n]=xe(r[n])}}else if(HT[t]){if(!El(r)){var i=r.constructor;if(i.from)e=i.from(r);else{e=new i(r.length);for(var n=0,a=r.length;n<a;n++)e[n]=r[n]}}}else if(!$T[t]&&!El(r)&&!Il(r)){e={};for(var o in r)r.hasOwnProperty(o)&&o!==Em&&(e[o]=xe(r[o]))}return e}function Ie(r,e,t){if(!_e(e)||!_e(r))return t?xe(e):r;for(var n in e)if(e.hasOwnProperty(n)&&n!==Em){var a=r[n],i=e[n];_e(i)&&_e(a)&&!J(i)&&!J(a)&&!Il(i)&&!Il(a)&&!Nm(i)&&!Nm(a)&&!El(i)&&!El(a)?Ie(a,i,t):(t||!(n in r))&&(r[n]=xe(e[n]))}return r}function Mv(r,e){for(var t=r[0],n=1,a=r.length;n<a;n++)t=Ie(t,r[n],e);return t}function Q(r,e){if(Object.assign)Object.assign(r,e);else for(var t in e)e.hasOwnProperty(t)&&t!==Em&&(r[t]=e[t]);return r}function me(r,e,t){for(var n=Fe(e),a=0;a<n.length;a++){var i=n[a];(t?e[i]!=null:r[i]==null)&&(r[i]=e[i])}return r}var rH=sa.createCanvas;function Ne(r,e){if(r){if(r.indexOf)return r.indexOf(e);for(var t=0,n=r.length;t<n;t++)if(r[t]===e)return t}return-1}function Rm(r,e){var t=r.prototype;function n(){}n.prototype=e.prototype,r.prototype=new n;for(var a in t)t.hasOwnProperty(a)&&(r.prototype[a]=t[a]);r.prototype.constructor=r,r.superClass=e}function Pt(r,e,t){if(r="prototype"in r?r.prototype:r,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var n=Object.getOwnPropertyNames(e),a=0;a<n.length;a++){var i=n[a];i!=="constructor"&&(t?e[i]!=null:r[i]==null)&&(r[i]=e[i])}else me(r,e,t)}function yr(r){return!r||typeof r=="string"?!1:typeof r.length=="number"}function L(r,e,t){if(!!(r&&e))if(r.forEach&&r.forEach===K$)r.forEach(e,t);else if(r.length===+r.length)for(var n=0,a=r.length;n<a;n++)e.call(t,r[n],n,r);else for(var i in r)r.hasOwnProperty(i)&&e.call(t,r[i],i,r)}function ee(r,e,t){if(!r)return[];if(!e)return Lv(r);if(r.map&&r.map===eH)return r.map(e,t);for(var n=[],a=0,i=r.length;a<i;a++)n.push(e.call(t,r[a],a,r));return n}function En(r,e,t,n){if(!!(r&&e)){for(var a=0,i=r.length;a<i;a++)t=e.call(n,t,r[a],a,r);return t}}function at(r,e,t){if(!r)return[];if(!e)return Lv(r);if(r.filter&&r.filter===J$)return r.filter(e,t);for(var n=[],a=0,i=r.length;a<i;a++)e.call(t,r[a],a,r)&&n.push(r[a]);return n}function WT(r,e,t){if(!!(r&&e)){for(var n=0,a=r.length;n<a;n++)if(e.call(t,r[n],n,r))return r[n]}}function Fe(r){if(!r)return[];if(Object.keys)return Object.keys(r);var e=[];for(var t in r)r.hasOwnProperty(t)&&e.push(t);return e}function nH(r,e){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];return function(){return r.apply(e,t.concat(Pm.call(arguments)))}}var fe=Tv&&ye(Tv.bind)?Tv.call.bind(Tv.bind):nH;function Ae(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return function(){return r.apply(this,e.concat(Pm.call(arguments)))}}function J(r){return Array.isArray?Array.isArray(r):Ll.call(r)==="[object Array]"}function ye(r){return typeof r=="function"}function ce(r){return typeof r=="string"}function Av(r){return Ll.call(r)==="[object String]"}function Ye(r){return typeof r=="number"}function _e(r){var e=typeof r;return e==="function"||!!r&&e==="object"}function Nm(r){return!!$T[Ll.call(r)]}function an(r){return!!HT[Ll.call(r)]}function Il(r){return typeof r=="object"&&typeof r.nodeType=="number"&&typeof r.ownerDocument=="object"}function dc(r){return r.colorStops!=null}function UT(r){return r.image!=null}function jT(r){return Ll.call(r)==="[object RegExp]"}function Pl(r){return r!==r}function Jt(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];for(var t=0,n=r.length;t<n;t++)if(r[t]!=null)return r[t]}function Pe(r,e){return r!=null?r:e}function Ia(r,e,t){return r!=null?r:e!=null?e:t}function Lv(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return Pm.apply(r,e)}function Iv(r){if(typeof r=="number")return[r,r,r,r];var e=r.length;return e===2?[r[0],r[1],r[0],r[1]]:e===3?[r[0],r[1],r[2],r[1]]:r}function Ar(r,e){if(!r)throw new Error(e)}function On(r){return r==null?null:typeof r.trim=="function"?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var YT="__ec_primitive__";function pc(r){r[YT]=!0}function El(r){return r[YT]}var aH=function(){function r(){this.data={}}return r.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},r.prototype.has=function(e){return this.data.hasOwnProperty(e)},r.prototype.get=function(e){return this.data[e]},r.prototype.set=function(e,t){return this.data[e]=t,this},r.prototype.keys=function(){return Fe(this.data)},r.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},r}(),qT=typeof Map=="function";function iH(){return qT?new Map:new aH}var ZT=function(){function r(e){var t=J(e);this.data=iH();var n=this;e instanceof r?e.each(a):e&&L(e,a);function a(i,o){t?n.set(i,o):n.set(o,i)}}return r.prototype.hasKey=function(e){return this.data.has(e)},r.prototype.get=function(e){return this.data.get(e)},r.prototype.set=function(e,t){return this.data.set(e,t),t},r.prototype.each=function(e,t){this.data.forEach(function(n,a){e.call(t,n,a)})},r.prototype.keys=function(){var e=this.data.keys();return qT?Array.from(e):e},r.prototype.removeKey=function(e){this.data.delete(e)},r}();function ge(r){return new ZT(r)}function gc(r,e){for(var t=new r.constructor(r.length+e.length),n=0;n<r.length;n++)t[n]=r[n];for(var a=r.length,n=0;n<e.length;n++)t[n+a]=e[n];return t}function yc(r,e){var t;if(Object.create)t=Object.create(r);else{var n=function(){};n.prototype=r,t=new n}return e&&Q(t,e),t}function km(r){var e=r.style;e.webkitUserSelect="none",e.userSelect="none",e.webkitTapHighlightColor="rgba(0,0,0,0)",e["-webkit-touch-callout"]="none"}function he(r,e){return r.hasOwnProperty(e)}function Et(){}var mc=180/Math.PI,oH=Object.freeze(Object.defineProperty({__proto__:null,guid:Om,logError:Dv,clone:xe,merge:Ie,mergeAll:Mv,extend:Q,defaults:me,createCanvas:rH,indexOf:Ne,inherits:Rm,mixin:Pt,isArrayLike:yr,each:L,map:ee,reduce:En,filter:at,find:WT,keys:Fe,bind:fe,curry:Ae,isArray:J,isFunction:ye,isString:ce,isStringSafe:Av,isNumber:Ye,isObject:_e,isBuiltInObject:Nm,isTypedArray:an,isDom:Il,isGradientObject:dc,isImagePatternObject:UT,isRegExp:jT,eqNaN:Pl,retrieve:Jt,retrieve2:Pe,retrieve3:Ia,slice:Lv,normalizeCssArray:Iv,assert:Ar,trim:On,setAsPrimitive:pc,isPrimitive:El,HashMap:ZT,createHashMap:ge,concatArray:gc,createObject:yc,disableUserSelect:km,hasOwn:he,noop:Et,RADIAN_TO_DEGREE:mc},Symbol.toStringTag,{value:"Module"}));/*! *****************************************************************************
185
- Copyright (c) Microsoft Corporation.
186
-
187
- Permission to use, copy, modify, and/or distribute this software for any
188
- purpose with or without fee is hereby granted.
189
-
190
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
191
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
192
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
193
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
194
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
195
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
196
- PERFORMANCE OF THIS SOFTWARE.
197
- ***************************************************************************** */var zm=function(r,e){return zm=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])},zm(r,e)};function bt(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");zm(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function $i(r,e){return r==null&&(r=0),e==null&&(e=0),[r,e]}function Lr(r,e){return r[0]=e[0],r[1]=e[1],r}function Pa(r){return[r[0],r[1]]}function XT(r,e,t){return r[0]=e,r[1]=t,r}function Bm(r,e,t){return r[0]=e[0]+t[0],r[1]=e[1]+t[1],r}function Pv(r,e,t,n){return r[0]=e[0]+t[0]*n,r[1]=e[1]+t[1]*n,r}function Hi(r,e,t){return r[0]=e[0]-t[0],r[1]=e[1]-t[1],r}function _c(r){return Math.sqrt(Fm(r))}var sH=_c;function Fm(r){return r[0]*r[0]+r[1]*r[1]}var lH=Fm;function uH(r,e,t){return r[0]=e[0]*t[0],r[1]=e[1]*t[1],r}function cH(r,e,t){return r[0]=e[0]/t[0],r[1]=e[1]/t[1],r}function fH(r,e){return r[0]*e[0]+r[1]*e[1]}function bc(r,e,t){return r[0]=e[0]*t,r[1]=e[1]*t,r}function jo(r,e){var t=_c(e);return t===0?(r[0]=0,r[1]=0):(r[0]=e[0]/t,r[1]=e[1]/t),r}function Ev(r,e){return Math.sqrt((r[0]-e[0])*(r[0]-e[0])+(r[1]-e[1])*(r[1]-e[1]))}var ai=Ev;function QT(r,e){return(r[0]-e[0])*(r[0]-e[0])+(r[1]-e[1])*(r[1]-e[1])}var Gi=QT;function hH(r,e){return r[0]=-e[0],r[1]=-e[1],r}function xc(r,e,t,n){return r[0]=e[0]+n*(t[0]-e[0]),r[1]=e[1]+n*(t[1]-e[1]),r}function sr(r,e,t){var n=e[0],a=e[1];return r[0]=t[0]*n+t[2]*a+t[4],r[1]=t[1]*n+t[3]*a+t[5],r}function ii(r,e,t){return r[0]=Math.min(e[0],t[0]),r[1]=Math.min(e[1],t[1]),r}function oi(r,e,t){return r[0]=Math.max(e[0],t[0]),r[1]=Math.max(e[1],t[1]),r}var vH=Object.freeze(Object.defineProperty({__proto__:null,create:$i,copy:Lr,clone:Pa,set:XT,add:Bm,scaleAndAdd:Pv,sub:Hi,len:_c,length:sH,lenSquare:Fm,lengthSquare:lH,mul:uH,div:cH,dot:fH,scale:bc,normalize:jo,distance:Ev,dist:ai,distanceSquare:QT,distSquare:Gi,negate:hH,lerp:xc,applyTransform:sr,min:ii,max:oi},Symbol.toStringTag,{value:"Module"})),Ol=function(){function r(e,t){this.target=e,this.topTarget=t&&t.topTarget}return r}(),dH=function(){function r(e){this.handler=e,e.on("mousedown",this._dragStart,this),e.on("mousemove",this._drag,this),e.on("mouseup",this._dragEnd,this)}return r.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new Ol(t,e),"dragstart",e.event))},r.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,a=e.offsetY,i=n-this._x,o=a-this._y;this._x=n,this._y=a,t.drift(i,o,e),this.handler.dispatchToElement(new Ol(t,e),"drag",e.event);var s=this.handler.findHover(n,a,t).target,l=this._dropTarget;this._dropTarget=s,t!==s&&(l&&s!==l&&this.handler.dispatchToElement(new Ol(l,e),"dragleave",e.event),s&&s!==l&&this.handler.dispatchToElement(new Ol(s,e),"dragenter",e.event))}},r.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new Ol(t,e),"dragend",e.event),this._dropTarget&&this.handler.dispatchToElement(new Ol(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null},r}(),pH=dH,gH=function(){function r(e){e&&(this._$eventProcessor=e)}return r.prototype.on=function(e,t,n,a){this._$handlers||(this._$handlers={});var i=this._$handlers;if(typeof t=="function"&&(a=n,n=t,t=null),!n||!e)return this;var o=this._$eventProcessor;t!=null&&o&&o.normalizeQuery&&(t=o.normalizeQuery(t)),i[e]||(i[e]=[]);for(var s=0;s<i[e].length;s++)if(i[e][s].h===n)return this;var l={h:n,query:t,ctx:a||this,callAtLast:n.zrEventfulCallAtLast},u=i[e].length-1,c=i[e][u];return c&&c.callAtLast?i[e].splice(u,0,l):i[e].push(l),this},r.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},r.prototype.off=function(e,t){var n=this._$handlers;if(!n)return this;if(!e)return this._$handlers={},this;if(t){if(n[e]){for(var a=[],i=0,o=n[e].length;i<o;i++)n[e][i].h!==t&&a.push(n[e][i]);n[e]=a}n[e]&&n[e].length===0&&delete n[e]}else delete n[e];return this},r.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var a=this._$handlers[e],i=this._$eventProcessor;if(a)for(var o=t.length,s=a.length,l=0;l<s;l++){var u=a[l];if(!(i&&i.filter&&u.query!=null&&!i.filter(e,u.query)))switch(o){case 0:u.h.call(u.ctx);break;case 1:u.h.call(u.ctx,t[0]);break;case 2:u.h.call(u.ctx,t[0],t[1]);break;default:u.h.apply(u.ctx,t);break}}return i&&i.afterTrigger&&i.afterTrigger(e),this},r.prototype.triggerWithContext=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var a=this._$handlers[e],i=this._$eventProcessor;if(a)for(var o=t.length,s=t[o-1],l=a.length,u=0;u<l;u++){var c=a[u];if(!(i&&i.filter&&c.query!=null&&!i.filter(e,c.query)))switch(o){case 0:c.h.call(s);break;case 1:c.h.call(s,t[0]);break;case 2:c.h.call(s,t[0],t[1]);break;default:c.h.apply(s,t.slice(1,o-1));break}}return i&&i.afterTrigger&&i.afterTrigger(e),this},r}(),Rn=gH,yH=Math.log(2);function Vm(r,e,t,n,a,i){var o=n+"-"+a,s=r.length;if(i.hasOwnProperty(o))return i[o];if(e===1){var l=Math.round(Math.log((1<<s)-1&~a)/yH);return r[t][l]}for(var u=n|1<<t,c=t+1;n&1<<c;)c++;for(var f=0,h=0,v=0;h<s;h++){var d=1<<h;d&a||(f+=(v%2?-1:1)*r[t][h]*Vm(r,e-1,c,u,a|d,i),v++)}return i[o]=f,f}function KT(r,e){var t=[[r[0],r[1],1,0,0,0,-e[0]*r[0],-e[0]*r[1]],[0,0,0,r[0],r[1],1,-e[1]*r[0],-e[1]*r[1]],[r[2],r[3],1,0,0,0,-e[2]*r[2],-e[2]*r[3]],[0,0,0,r[2],r[3],1,-e[3]*r[2],-e[3]*r[3]],[r[4],r[5],1,0,0,0,-e[4]*r[4],-e[4]*r[5]],[0,0,0,r[4],r[5],1,-e[5]*r[4],-e[5]*r[5]],[r[6],r[7],1,0,0,0,-e[6]*r[6],-e[6]*r[7]],[0,0,0,r[6],r[7],1,-e[7]*r[6],-e[7]*r[7]]],n={},a=Vm(t,8,0,0,0,n);if(a!==0){for(var i=[],o=0;o<8;o++)for(var s=0;s<8;s++)i[s]==null&&(i[s]=0),i[s]+=((o+s)%2?-1:1)*Vm(t,7,o===0?1:0,1<<o,1<<s,n)/a*e[o];return function(l,u,c){var f=u*i[6]+c*i[7]+1;l[0]=(u*i[0]+c*i[1]+i[2])/f,l[1]=(u*i[3]+c*i[4]+i[5])/f}}}var JT="___zrEVENTSAVED",$m=[];function mH(r,e,t,n,a){return Hm($m,e,n,a,!0)&&Hm(r,t,$m[0],$m[1])}function Hm(r,e,t,n,a){if(e.getBoundingClientRect&&je.domSupported&&!e2(e)){var i=e[JT]||(e[JT]={}),o=_H(e,i),s=bH(o,i,a);if(s)return s(r,t,n),!0}return!1}function _H(r,e){var t=e.markers;if(t)return t;t=e.markers=[];for(var n=["left","right"],a=["top","bottom"],i=0;i<4;i++){var o=document.createElement("div"),s=o.style,l=i%2,u=(i>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",a[u]+":0",n[1-l]+":auto",a[1-u]+":auto",""].join("!important;"),r.appendChild(o),t.push(o)}return t}function bH(r,e,t){for(var n=t?"invTrans":"trans",a=e[n],i=e.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var c=r[u].getBoundingClientRect(),f=2*u,h=c.left,v=c.top;o.push(h,v),l=l&&i&&h===i[f]&&v===i[f+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&a?a:(e.srcCoords=o,e[n]=t?KT(s,o):KT(o,s))}function e2(r){return r.nodeName.toUpperCase()==="CANVAS"}var xH=/([&<>"'])/g,wH={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Vr(r){return r==null?"":(r+"").replace(xH,function(e,t){return wH[t]})}var SH=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Gm=[],CH=je.browser.firefox&&+je.browser.version.split(".")[0]<39;function Wm(r,e,t,n){return t=t||{},n?t2(r,e,t):CH&&e.layerX!=null&&e.layerX!==e.offsetX?(t.zrX=e.layerX,t.zrY=e.layerY):e.offsetX!=null?(t.zrX=e.offsetX,t.zrY=e.offsetY):t2(r,e,t),t}function t2(r,e,t){if(je.domSupported&&r.getBoundingClientRect){var n=e.clientX,a=e.clientY;if(e2(r)){var i=r.getBoundingClientRect();t.zrX=n-i.left,t.zrY=a-i.top;return}else if(Hm(Gm,r,n,a)){t.zrX=Gm[0],t.zrY=Gm[1];return}}t.zrX=t.zrY=0}function Um(r){return r||window.event}function Nn(r,e,t){if(e=Um(e),e.zrX!=null)return e;var n=e.type,a=n&&n.indexOf("touch")>=0;if(a){var o=n!=="touchend"?e.targetTouches[0]:e.changedTouches[0];o&&Wm(r,o,e,t)}else{Wm(r,e,e,t);var i=TH(e);e.zrDelta=i?i/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&SH.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function TH(r){var e=r.wheelDelta;if(e)return e;var t=r.deltaX,n=r.deltaY;if(t==null||n==null)return e;var a=Math.abs(n!==0?n:t),i=n>0?-1:n<0?1:t>0?-1:1;return 3*a*i}function jm(r,e,t,n){r.addEventListener(e,t,n)}function DH(r,e,t,n){r.removeEventListener(e,t,n)}var si=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function r2(r){return r.which===2||r.which===3}var MH=function(){function r(){this._track=[]}return r.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(e,t,n){var a=e.touches;if(!!a){for(var i={points:[],touches:[],target:t,event:e},o=0,s=a.length;o<s;o++){var l=a[o],u=Wm(n,l,{});i.points.push([u.zrX,u.zrY]),i.touches.push(l)}this._track.push(i)}},r.prototype._recognize=function(e){for(var t in Ym)if(Ym.hasOwnProperty(t)){var n=Ym[t](this._track,e);if(n)return n}},r}();function n2(r){var e=r[1][0]-r[0][0],t=r[1][1]-r[0][1];return Math.sqrt(e*e+t*t)}function AH(r){return[(r[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2]}var Ym={pinch:function(r,e){var t=r.length;if(!!t){var n=(r[t-1]||{}).points,a=(r[t-2]||{}).points||n;if(a&&a.length>1&&n&&n.length>1){var i=n2(n)/n2(a);!isFinite(i)&&(i=1),e.pinchScale=i;var o=AH(n);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:r[0].target,event:e}}}}};function _n(){return[1,0,0,1,0,0]}function wc(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function Ov(r,e){return 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}function Ea(r,e,t){var n=e[0]*t[0]+e[2]*t[1],a=e[1]*t[0]+e[3]*t[1],i=e[0]*t[2]+e[2]*t[3],o=e[1]*t[2]+e[3]*t[3],s=e[0]*t[4]+e[2]*t[5]+e[4],l=e[1]*t[4]+e[3]*t[5]+e[5];return r[0]=n,r[1]=a,r[2]=i,r[3]=o,r[4]=s,r[5]=l,r}function la(r,e,t){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4]+t[0],r[5]=e[5]+t[1],r}function Wi(r,e,t){var n=e[0],a=e[2],i=e[4],o=e[1],s=e[3],l=e[5],u=Math.sin(t),c=Math.cos(t);return r[0]=n*c+o*u,r[1]=-n*u+o*c,r[2]=a*c+s*u,r[3]=-a*u+c*s,r[4]=c*i+u*l,r[5]=c*l-u*i,r}function Rv(r,e,t){var n=t[0],a=t[1];return r[0]=e[0]*n,r[1]=e[1]*a,r[2]=e[2]*n,r[3]=e[3]*a,r[4]=e[4]*n,r[5]=e[5]*a,r}function Yo(r,e){var t=e[0],n=e[2],a=e[4],i=e[1],o=e[3],s=e[5],l=t*o-i*n;return l?(l=1/l,r[0]=o*l,r[1]=-i*l,r[2]=-n*l,r[3]=t*l,r[4]=(n*s-o*a)*l,r[5]=(i*a-t*s)*l,r):null}function a2(r){var e=_n();return Ov(e,r),e}var LH=Object.freeze(Object.defineProperty({__proto__:null,create:_n,identity:wc,copy:Ov,mul:Ea,translate:la,rotate:Wi,scale:Rv,invert:Yo,clone:a2},Symbol.toStringTag,{value:"Module"})),IH=function(){function r(e,t){this.x=e||0,this.y=t||0}return r.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(e,t){return this.x=e,this.y=t,this},r.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},r.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},r.prototype.scale=function(e){this.x*=e,this.y*=e},r.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},r.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},r.prototype.dot=function(e){return this.x*e.x+this.y*e.y},r.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},r.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},r.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},r.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},r.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.transform=function(e){if(!!e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},r.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},r.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},r.set=function(e,t,n){e.x=t,e.y=n},r.copy=function(e,t){e.x=t.x,e.y=t.y},r.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},r.lenSquare=function(e){return e.x*e.x+e.y*e.y},r.dot=function(e,t){return e.x*t.x+e.y*t.y},r.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},r.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},r.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},r.scaleAndAdd=function(e,t,n,a){e.x=t.x+n.x*a,e.y=t.y+n.y*a},r.lerp=function(e,t,n,a){var i=1-a;e.x=i*t.x+a*n.x,e.y=i*t.y+a*n.y},r}(),Ee=IH,Nv=Math.min,kv=Math.max,qo=new Ee,Zo=new Ee,Xo=new Ee,Qo=new Ee,Sc=new Ee,Cc=new Ee,PH=function(){function r(e,t,n,a){n<0&&(e=e+n,n=-n),a<0&&(t=t+a,a=-a),this.x=e,this.y=t,this.width=n,this.height=a}return r.prototype.union=function(e){var t=Nv(e.x,this.x),n=Nv(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=kv(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=kv(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=t,this.y=n},r.prototype.applyTransform=function(e){r.applyTransform(this,this,e)},r.prototype.calculateTransform=function(e){var t=this,n=e.width/t.width,a=e.height/t.height,i=_n();return la(i,i,[-t.x,-t.y]),Rv(i,i,[n,a]),la(i,i,[e.x,e.y]),i},r.prototype.intersect=function(e,t){if(!e)return!1;e instanceof r||(e=r.create(e));var n=this,a=n.x,i=n.x+n.width,o=n.y,s=n.y+n.height,l=e.x,u=e.x+e.width,c=e.y,f=e.y+e.height,h=!(i<l||u<a||s<c||f<o);if(t){var v=1/0,d=0,p=Math.abs(i-l),g=Math.abs(u-a),y=Math.abs(s-c),m=Math.abs(f-o),_=Math.min(p,g),b=Math.min(y,m);i<l||u<a?_>d&&(d=_,p<g?Ee.set(Cc,-p,0):Ee.set(Cc,g,0)):_<v&&(v=_,p<g?Ee.set(Sc,p,0):Ee.set(Sc,-g,0)),s<c||f<o?b>d&&(d=b,y<m?Ee.set(Cc,0,-y):Ee.set(Cc,0,m)):_<v&&(v=_,y<m?Ee.set(Sc,0,y):Ee.set(Sc,0,-m))}return t&&Ee.copy(t,h?Sc:Cc),h},r.prototype.contain=function(e,t){var n=this;return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(e){r.copy(this,e)},r.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},r.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},r.prototype.isZero=function(){return this.width===0||this.height===0},r.create=function(e){return new r(e.x,e.y,e.width,e.height)},r.copy=function(e,t){e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height},r.applyTransform=function(e,t,n){if(!n){e!==t&&r.copy(e,t);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var a=n[0],i=n[3],o=n[4],s=n[5];e.x=t.x*a+o,e.y=t.y*i+s,e.width=t.width*a,e.height=t.height*i,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}qo.x=Xo.x=t.x,qo.y=Qo.y=t.y,Zo.x=Qo.x=t.x+t.width,Zo.y=Xo.y=t.y+t.height,qo.transform(n),Qo.transform(n),Zo.transform(n),Xo.transform(n),e.x=Nv(qo.x,Zo.x,Xo.x,Qo.x),e.y=Nv(qo.y,Zo.y,Xo.y,Qo.y);var l=kv(qo.x,Zo.x,Xo.x,Qo.x),u=kv(qo.y,Zo.y,Xo.y,Qo.y);e.width=l-e.x,e.height=u-e.y},r}(),Oe=PH,i2="silent";function EH(r,e,t){return{type:r,event:t,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:t.zrX,offsetY:t.zrY,gestureEvent:t.gestureEvent,pinchX:t.pinchX,pinchY:t.pinchY,pinchScale:t.pinchScale,wheelDelta:t.zrDelta,zrByTouch:t.zrByTouch,which:t.which,stop:OH}}function OH(){si(this.event)}var RH=function(r){bt(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.handler=null,t}return e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(Rn),Tc=function(){function r(e,t){this.x=e,this.y=t}return r}(),NH=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],qm=new Oe(0,0,0,0),o2=function(r){bt(e,r);function e(t,n,a,i,o){var s=r.call(this)||this;return s._hovered=new Tc(0,0),s.storage=t,s.painter=n,s.painterRoot=i,s._pointerSize=o,a=a||new RH,s.proxy=null,s.setHandlerProxy(a),s._draggingMgr=new pH(s),s}return e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(L(NH,function(n){t.on&&t.on(n,this[n],this)},this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var n=t.zrX,a=t.zrY,i=l2(this,n,a),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=i?new Tc(n,a):this.findHover(n,a),u=l.target,c=this.proxy;c.setCursor&&c.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",t),this.dispatchToElement(l,"mousemove",t),u&&u!==s&&this.dispatchToElement(l,"mouseover",t)},e.prototype.mouseout=function(t){var n=t.zrEventControl;n!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",t),n!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new Tc(0,0)},e.prototype.dispatch=function(t,n){var a=this[t];a&&a.call(this,n)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var n=this.proxy;n.setCursor&&n.setCursor(t)},e.prototype.dispatchToElement=function(t,n,a){t=t||{};var i=t.target;if(!(i&&i.silent)){for(var o="on"+n,s=EH(n,t,a);i&&(i[o]&&(s.cancelBubble=!!i[o].call(i,s)),i.trigger(n,s),i=i.__hostTarget?i.__hostTarget:i.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(n,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(n,s)}))}},e.prototype.findHover=function(t,n,a){var i=this.storage.getDisplayList(),o=new Tc(t,n);if(s2(i,o,t,n,a),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,c=new Oe(t-u,n-u,l,l),f=i.length-1;f>=0;f--){var h=i[f];h!==a&&!h.ignore&&!h.ignoreCoarsePointer&&(!h.parent||!h.parent.ignoreCoarsePointer)&&(qm.copy(h.getBoundingRect()),h.transform&&qm.applyTransform(h.transform),qm.intersect(c)&&s.push(h))}if(s.length)for(var v=4,d=Math.PI/12,p=Math.PI*2,g=0;g<u;g+=v)for(var y=0;y<p;y+=d){var m=t+g*Math.cos(y),_=n+g*Math.sin(y);if(s2(s,o,m,_,a),o.target)return o}}return o},e.prototype.processGesture=function(t,n){this._gestureMgr||(this._gestureMgr=new MH);var a=this._gestureMgr;n==="start"&&a.clear();var i=a.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if(n==="end"&&a.clear(),i){var o=i.type;t.gestureEvent=o;var s=new Tc;s.target=i.target,this.dispatchToElement(s,o,i.event)}},e}(Rn);L(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(r){o2.prototype[r]=function(e){var t=e.zrX,n=e.zrY,a=l2(this,t,n),i,o;if((r!=="mouseup"||!a)&&(i=this.findHover(t,n),o=i.target),r==="mousedown")this._downEl=o,this._downPoint=[e.zrX,e.zrY],this._upEl=o;else if(r==="mouseup")this._upEl=o;else if(r==="click"){if(this._downEl!==this._upEl||!this._downPoint||ai(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,r,e)}});function kH(r,e,t){if(r[r.rectHover?"rectContain":"contain"](e,t)){for(var n=r,a=void 0,i=!1;n;){if(n.ignoreClip&&(i=!0),!i){var o=n.getClipPath();if(o&&!o.contain(e,t))return!1;n.silent&&(a=!0)}var s=n.__hostTarget;n=s||n.parent}return a?i2:!0}return!1}function s2(r,e,t,n,a){for(var i=r.length-1;i>=0;i--){var o=r[i],s=void 0;if(o!==a&&!o.ignore&&(s=kH(o,t,n))&&(!e.topTarget&&(e.topTarget=o),s!==i2)){e.target=o;break}}}function l2(r,e,t){var n=r.painter;return e<0||e>n.getWidth()||t<0||t>n.getHeight()}var zH=o2,u2=32,Dc=7;function BH(r){for(var e=0;r>=u2;)e|=r&1,r>>=1;return r+e}function c2(r,e,t,n){var a=e+1;if(a===t)return 1;if(n(r[a++],r[e])<0){for(;a<t&&n(r[a],r[a-1])<0;)a++;FH(r,e,a)}else for(;a<t&&n(r[a],r[a-1])>=0;)a++;return a-e}function FH(r,e,t){for(t--;e<t;){var n=r[e];r[e++]=r[t],r[t--]=n}}function f2(r,e,t,n,a){for(n===e&&n++;n<t;n++){for(var i=r[n],o=e,s=n,l;o<s;)l=o+s>>>1,a(i,r[l])<0?s=l:o=l+1;var u=n-o;switch(u){case 3:r[o+3]=r[o+2];case 2:r[o+2]=r[o+1];case 1:r[o+1]=r[o];break;default:for(;u>0;)r[o+u]=r[o+u-1],u--}r[o]=i}}function Zm(r,e,t,n,a,i){var o=0,s=0,l=1;if(i(r,e[t+a])>0){for(s=n-a;l<s&&i(r,e[t+a+l])>0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=a,l+=a}else{for(s=a+1;l<s&&i(r,e[t+a-l])<=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=a-l,l=a-u}for(o++;o<l;){var c=o+(l-o>>>1);i(r,e[t+c])>0?o=c+1:l=c}return l}function Xm(r,e,t,n,a,i){var o=0,s=0,l=1;if(i(r,e[t+a])<0){for(s=a+1;l<s&&i(r,e[t+a-l])<0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=a-l,l=a-u}else{for(s=n-a;l<s&&i(r,e[t+a+l])>=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=a,l+=a}for(o++;o<l;){var c=o+(l-o>>>1);i(r,e[t+c])<0?l=c:o=c+1}return l}function VH(r,e){var t=Dc,n,a,i=0;r.length;var o=[];n=[],a=[];function s(v,d){n[i]=v,a[i]=d,i+=1}function l(){for(;i>1;){var v=i-2;if(v>=1&&a[v-1]<=a[v]+a[v+1]||v>=2&&a[v-2]<=a[v]+a[v-1])a[v-1]<a[v+1]&&v--;else if(a[v]>a[v+1])break;c(v)}}function u(){for(;i>1;){var v=i-2;v>0&&a[v-1]<a[v+1]&&v--,c(v)}}function c(v){var d=n[v],p=a[v],g=n[v+1],y=a[v+1];a[v]=p+y,v===i-3&&(n[v+1]=n[v+2],a[v+1]=a[v+2]),i--;var m=Xm(r[g],r,d,p,0,e);d+=m,p-=m,p!==0&&(y=Zm(r[d+p-1],r,g,y,y-1,e),y!==0&&(p<=y?f(d,p,g,y):h(d,p,g,y)))}function f(v,d,p,g){var y=0;for(y=0;y<d;y++)o[y]=r[v+y];var m=0,_=p,b=v;if(r[b++]=r[_++],--g===0){for(y=0;y<d;y++)r[b+y]=o[m+y];return}if(d===1){for(y=0;y<g;y++)r[b+y]=r[_+y];r[b+g]=o[m];return}for(var w=t,x,S,T;;){x=0,S=0,T=!1;do if(e(r[_],o[m])<0){if(r[b++]=r[_++],S++,x=0,--g===0){T=!0;break}}else if(r[b++]=o[m++],x++,S=0,--d===1){T=!0;break}while((x|S)<w);if(T)break;do{if(x=Xm(r[_],o,m,d,0,e),x!==0){for(y=0;y<x;y++)r[b+y]=o[m+y];if(b+=x,m+=x,d-=x,d<=1){T=!0;break}}if(r[b++]=r[_++],--g===0){T=!0;break}if(S=Zm(o[m],r,_,g,0,e),S!==0){for(y=0;y<S;y++)r[b+y]=r[_+y];if(b+=S,_+=S,g-=S,g===0){T=!0;break}}if(r[b++]=o[m++],--d===1){T=!0;break}w--}while(x>=Dc||S>=Dc);if(T)break;w<0&&(w=0),w+=2}if(t=w,t<1&&(t=1),d===1){for(y=0;y<g;y++)r[b+y]=r[_+y];r[b+g]=o[m]}else{if(d===0)throw new Error;for(y=0;y<d;y++)r[b+y]=o[m+y]}}function h(v,d,p,g){var y=0;for(y=0;y<g;y++)o[y]=r[p+y];var m=v+d-1,_=g-1,b=p+g-1,w=0,x=0;if(r[b--]=r[m--],--d===0){for(w=b-(g-1),y=0;y<g;y++)r[w+y]=o[y];return}if(g===1){for(b-=d,m-=d,x=b+1,w=m+1,y=d-1;y>=0;y--)r[x+y]=r[w+y];r[b]=o[_];return}for(var S=t;;){var T=0,D=0,M=!1;do if(e(o[_],r[m])<0){if(r[b--]=r[m--],T++,D=0,--d===0){M=!0;break}}else if(r[b--]=o[_--],D++,T=0,--g===1){M=!0;break}while((T|D)<S);if(M)break;do{if(T=d-Xm(o[_],r,v,d,d-1,e),T!==0){for(b-=T,m-=T,d-=T,x=b+1,w=m+1,y=T-1;y>=0;y--)r[x+y]=r[w+y];if(d===0){M=!0;break}}if(r[b--]=o[_--],--g===1){M=!0;break}if(D=g-Zm(r[m],o,0,g,g-1,e),D!==0){for(b-=D,_-=D,g-=D,x=b+1,w=_+1,y=0;y<D;y++)r[x+y]=o[w+y];if(g<=1){M=!0;break}}if(r[b--]=r[m--],--d===0){M=!0;break}S--}while(T>=Dc||D>=Dc);if(M)break;S<0&&(S=0),S+=2}if(t=S,t<1&&(t=1),g===1){for(b-=d,m-=d,x=b+1,w=m+1,y=d-1;y>=0;y--)r[x+y]=r[w+y];r[b]=o[_]}else{if(g===0)throw new Error;for(w=b-(g-1),y=0;y<g;y++)r[w+y]=o[y]}}return{mergeRuns:l,forceMergeRuns:u,pushRun:s}}function zv(r,e,t,n){t||(t=0),n||(n=r.length);var a=n-t;if(!(a<2)){var i=0;if(a<u2){i=c2(r,t,n,e),f2(r,t,n,t+i,e);return}var o=VH(r,e),s=BH(a);do{if(i=c2(r,t,n,e),i<s){var l=a;l>s&&(l=s),f2(r,t,t+l,t+i,e),i=l}o.pushRun(t,i),o.mergeRuns(),a-=i,t+=i}while(a!==0);o.forceMergeRuns()}}var bn=1,Mc=2,Rl=4,h2=!1;function Qm(){h2||(h2=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function v2(r,e){return r.zlevel===e.zlevel?r.z===e.z?r.z2-e.z2:r.z-e.z:r.zlevel-e.zlevel}var $H=function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=v2}return r.prototype.traverse=function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},r.prototype.getDisplayList=function(e,t){t=t||!1;var n=this._displayList;return(e||!n.length)&&this.updateDisplayList(t),n},r.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,n=this._displayList,a=0,i=t.length;a<i;a++)this._updateAndAddDisplayable(t[a],null,e);n.length=this._displayListLen,zv(n,v2)},r.prototype._updateAndAddDisplayable=function(e,t,n){if(!(e.ignore&&!n)){e.beforeUpdate(),e.update(),e.afterUpdate();var a=e.getClipPath();if(e.ignoreClip)t=null;else if(a){t?t=t.slice():t=[];for(var i=a,o=e;i;)i.parent=o,i.updateTransform(),t.push(i),o=i,i=i.getClipPath()}if(e.childrenRef){for(var s=e.childrenRef(),l=0;l<s.length;l++){var u=s[l];e.__dirty&&(u.__dirty|=bn),this._updateAndAddDisplayable(u,t,n)}e.__dirty=0}else{var c=e;t&&t.length?c.__clipPaths=t:c.__clipPaths&&c.__clipPaths.length>0&&(c.__clipPaths=[]),isNaN(c.z)&&(Qm(),c.z=0),isNaN(c.z2)&&(Qm(),c.z2=0),isNaN(c.zlevel)&&(Qm(),c.zlevel=0),this._displayList[this._displayListLen++]=c}var f=e.getDecalElement&&e.getDecalElement();f&&this._updateAndAddDisplayable(f,t,n);var h=e.getTextGuideLine();h&&this._updateAndAddDisplayable(h,t,n);var v=e.getTextContent();v&&this._updateAndAddDisplayable(v,t,n)}},r.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},r.prototype.delRoot=function(e){if(e instanceof Array){for(var t=0,n=e.length;t<n;t++)this.delRoot(e[t]);return}var a=Ne(this._roots,e);a>=0&&this._roots.splice(a,1)},r.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},r.prototype.getRoots=function(){return this._roots},r.prototype.dispose=function(){this._displayList=null,this._roots=null},r}(),HH=$H,d2;d2=je.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};var Km=d2,Bv={linear:function(r){return r},quadraticIn:function(r){return r*r},quadraticOut:function(r){return r*(2-r)},quadraticInOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)},cubicIn:function(r){return r*r*r},cubicOut:function(r){return--r*r*r+1},cubicInOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)},quarticIn:function(r){return r*r*r*r},quarticOut:function(r){return 1- --r*r*r*r},quarticInOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)},quinticIn:function(r){return r*r*r*r*r},quinticOut:function(r){return--r*r*r*r*r+1},quinticInOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)},sinusoidalIn:function(r){return 1-Math.cos(r*Math.PI/2)},sinusoidalOut:function(r){return Math.sin(r*Math.PI/2)},sinusoidalInOut:function(r){return .5*(1-Math.cos(Math.PI*r))},exponentialIn:function(r){return r===0?0:Math.pow(1024,r-1)},exponentialOut:function(r){return r===1?1:1-Math.pow(2,-10*r)},exponentialInOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)},circularIn:function(r){return 1-Math.sqrt(1-r*r)},circularOut:function(r){return Math.sqrt(1- --r*r)},circularInOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)},elasticIn:function(r){var e,t=.1,n=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=n/4):e=n*Math.asin(1/t)/(2*Math.PI),-(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/n)))},elasticOut:function(r){var e,t=.1,n=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=n/4):e=n*Math.asin(1/t)/(2*Math.PI),t*Math.pow(2,-10*r)*Math.sin((r-e)*(2*Math.PI)/n)+1)},elasticInOut:function(r){var e,t=.1,n=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=n/4):e=n*Math.asin(1/t)/(2*Math.PI),(r*=2)<1?-.5*(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/n)):t*Math.pow(2,-10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/n)*.5+1)},backIn:function(r){var e=1.70158;return r*r*((e+1)*r-e)},backOut:function(r){var e=1.70158;return--r*r*((e+1)*r+e)+1},backInOut:function(r){var e=2.5949095;return(r*=2)<1?.5*(r*r*((e+1)*r-e)):.5*((r-=2)*r*((e+1)*r+e)+2)},bounceIn:function(r){return 1-Bv.bounceOut(1-r)},bounceOut:function(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},bounceInOut:function(r){return r<.5?Bv.bounceIn(r*2)*.5:Bv.bounceOut(r*2-1)*.5+.5}},p2=Bv,Fv=Math.pow,Ui=Math.sqrt,Vv=1e-8,g2=1e-4,y2=Ui(3),$v=1/3,Oa=$i(),kn=$i(),Nl=$i();function ji(r){return r>-Vv&&r<Vv}function m2(r){return r>Vv||r<-Vv}function er(r,e,t,n,a){var i=1-a;return i*i*(i*r+3*a*e)+a*a*(a*n+3*i*t)}function _2(r,e,t,n,a){var i=1-a;return 3*(((e-r)*i+2*(t-e)*a)*i+(n-t)*a*a)}function Hv(r,e,t,n,a,i){var o=n+3*(e-t)-r,s=3*(t-e*2+r),l=3*(e-r),u=r-a,c=s*s-3*o*l,f=s*l-9*o*u,h=l*l-3*s*u,v=0;if(ji(c)&&ji(f))if(ji(s))i[0]=0;else{var d=-l/s;d>=0&&d<=1&&(i[v++]=d)}else{var p=f*f-4*c*h;if(ji(p)){var g=f/c,d=-s/o+g,y=-g/2;d>=0&&d<=1&&(i[v++]=d),y>=0&&y<=1&&(i[v++]=y)}else if(p>0){var m=Ui(p),_=c*s+1.5*o*(-f+m),b=c*s+1.5*o*(-f-m);_<0?_=-Fv(-_,$v):_=Fv(_,$v),b<0?b=-Fv(-b,$v):b=Fv(b,$v);var d=(-s-(_+b))/(3*o);d>=0&&d<=1&&(i[v++]=d)}else{var w=(2*c*s-3*o*f)/(2*Ui(c*c*c)),x=Math.acos(w)/3,S=Ui(c),T=Math.cos(x),d=(-s-2*S*T)/(3*o),y=(-s+S*(T+y2*Math.sin(x)))/(3*o),D=(-s+S*(T-y2*Math.sin(x)))/(3*o);d>=0&&d<=1&&(i[v++]=d),y>=0&&y<=1&&(i[v++]=y),D>=0&&D<=1&&(i[v++]=D)}}return v}function b2(r,e,t,n,a){var i=6*t-12*e+6*r,o=9*e+3*n-3*r-9*t,s=3*e-3*r,l=0;if(ji(o)){if(m2(i)){var u=-s/i;u>=0&&u<=1&&(a[l++]=u)}}else{var c=i*i-4*o*s;if(ji(c))a[0]=-i/(2*o);else if(c>0){var f=Ui(c),u=(-i+f)/(2*o),h=(-i-f)/(2*o);u>=0&&u<=1&&(a[l++]=u),h>=0&&h<=1&&(a[l++]=h)}}return l}function Yi(r,e,t,n,a,i){var o=(e-r)*a+r,s=(t-e)*a+e,l=(n-t)*a+t,u=(s-o)*a+o,c=(l-s)*a+s,f=(c-u)*a+u;i[0]=r,i[1]=o,i[2]=u,i[3]=f,i[4]=f,i[5]=c,i[6]=l,i[7]=n}function x2(r,e,t,n,a,i,o,s,l,u,c){var f,h=.005,v=1/0,d,p,g,y;Oa[0]=l,Oa[1]=u;for(var m=0;m<1;m+=.05)kn[0]=er(r,t,a,o,m),kn[1]=er(e,n,i,s,m),g=Gi(Oa,kn),g<v&&(f=m,v=g);v=1/0;for(var _=0;_<32&&!(h<g2);_++)d=f-h,p=f+h,kn[0]=er(r,t,a,o,d),kn[1]=er(e,n,i,s,d),g=Gi(kn,Oa),d>=0&&g<v?(f=d,v=g):(Nl[0]=er(r,t,a,o,p),Nl[1]=er(e,n,i,s,p),y=Gi(Nl,Oa),p<=1&&y<v?(f=p,v=y):h*=.5);return c&&(c[0]=er(r,t,a,o,f),c[1]=er(e,n,i,s,f)),Ui(v)}function GH(r,e,t,n,a,i,o,s,l){for(var u=r,c=e,f=0,h=1/l,v=1;v<=l;v++){var d=v*h,p=er(r,t,a,o,d),g=er(e,n,i,s,d),y=p-u,m=g-c;f+=Math.sqrt(y*y+m*m),u=p,c=g}return f}function lr(r,e,t,n){var a=1-n;return a*(a*r+2*n*e)+n*n*t}function Jm(r,e,t,n){return 2*((1-n)*(e-r)+n*(t-e))}function WH(r,e,t,n,a){var i=r-2*e+t,o=2*(e-r),s=r-n,l=0;if(ji(i)){if(m2(o)){var u=-s/o;u>=0&&u<=1&&(a[l++]=u)}}else{var c=o*o-4*i*s;if(ji(c)){var u=-o/(2*i);u>=0&&u<=1&&(a[l++]=u)}else if(c>0){var f=Ui(c),u=(-o+f)/(2*i),h=(-o-f)/(2*i);u>=0&&u<=1&&(a[l++]=u),h>=0&&h<=1&&(a[l++]=h)}}return l}function w2(r,e,t){var n=r+t-2*e;return n===0?.5:(r-e)/n}function Ac(r,e,t,n,a){var i=(e-r)*n+r,o=(t-e)*n+e,s=(o-i)*n+i;a[0]=r,a[1]=i,a[2]=s,a[3]=s,a[4]=o,a[5]=t}function S2(r,e,t,n,a,i,o,s,l){var u,c=.005,f=1/0;Oa[0]=o,Oa[1]=s;for(var h=0;h<1;h+=.05){kn[0]=lr(r,t,a,h),kn[1]=lr(e,n,i,h);var v=Gi(Oa,kn);v<f&&(u=h,f=v)}f=1/0;for(var d=0;d<32&&!(c<g2);d++){var p=u-c,g=u+c;kn[0]=lr(r,t,a,p),kn[1]=lr(e,n,i,p);var v=Gi(kn,Oa);if(p>=0&&v<f)u=p,f=v;else{Nl[0]=lr(r,t,a,g),Nl[1]=lr(e,n,i,g);var y=Gi(Nl,Oa);g<=1&&y<f?(u=g,f=y):c*=.5}}return l&&(l[0]=lr(r,t,a,u),l[1]=lr(e,n,i,u)),Ui(f)}function UH(r,e,t,n,a,i,o){for(var s=r,l=e,u=0,c=1/o,f=1;f<=o;f++){var h=f*c,v=lr(r,t,a,h),d=lr(e,n,i,h),p=v-s,g=d-l;u+=Math.sqrt(p*p+g*g),s=v,l=d}return u}var jH=/cubic-bezier\(([0-9,\.e ]+)\)/;function e0(r){var e=r&&jH.exec(r);if(e){var t=e[1].split(","),n=+On(t[0]),a=+On(t[1]),i=+On(t[2]),o=+On(t[3]);if(isNaN(n+a+i+o))return;var s=[];return function(l){return l<=0?0:l>=1?1:Hv(0,n,i,1,l,s)&&er(0,a,o,1,s[0])}}}var YH=function(){function r(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Et,this.ondestroy=e.ondestroy||Et,this.onrestart=e.onrestart||Et,e.easing&&this.setEasing(e.easing)}return r.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=t;return}var n=this._life,a=e-this._startTime-this._pausedTime,i=a/n;i<0&&(i=0),i=Math.min(i,1);var o=this.easingFunc,s=o?o(i):i;if(this.onframe(s),i===1)if(this.loop){var l=a%n;this._startTime=e-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){this._paused=!1},r.prototype.setEasing=function(e){this.easing=e,this.easingFunc=ye(e)?e:p2[e]||e0(e)},r}(),qH=YH,C2=function(){function r(e){this.value=e}return r}(),ZH=function(){function r(){this._len=0}return r.prototype.insert=function(e){var t=new C2(e);return this.insertEntry(t),t},r.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},r.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r}(),XH=function(){function r(e){this._list=new ZH,this._maxSize=10,this._map={},this._maxSize=e}return r.prototype.put=function(e,t){var n=this._list,a=this._map,i=null;if(a[e]==null){var o=n.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=n.head;n.remove(l),delete a[l.key],i=l.value,this._lastRemovedEntry=l}s?s.value=t:s=new C2(t),s.key=e,n.insertEntry(s),a[e]=s}return i},r.prototype.get=function(e){var t=this._map[e],n=this._list;if(t!=null)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r}(),Lc=XH,T2={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function ua(r){return r=Math.round(r),r<0?0:r>255?255:r}function QH(r){return r=Math.round(r),r<0?0:r>360?360:r}function Ic(r){return r<0?0:r>1?1:r}function t0(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?ua(parseFloat(e)/100*255):ua(parseInt(e,10))}function Ko(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?Ic(parseFloat(e)/100):Ic(parseFloat(e))}function r0(r,e,t){return t<0?t+=1:t>1&&(t-=1),t*6<1?r+(e-r)*t*6:t*2<1?e:t*3<2?r+(e-r)*(2/3-t)*6:r}function qi(r,e,t){return r+(e-r)*t}function zn(r,e,t,n,a){return r[0]=e,r[1]=t,r[2]=n,r[3]=a,r}function n0(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r}var D2=new Lc(20),Gv=null;function kl(r,e){Gv&&n0(Gv,e),Gv=D2.put(r,Gv||e.slice())}function $r(r,e){if(!!r){e=e||[];var t=D2.get(r);if(t)return n0(e,t);r=r+"";var n=r.replace(/ /g,"").toLowerCase();if(n in T2)return n0(e,T2[n]),kl(r,e),e;var a=n.length;if(n.charAt(0)==="#"){if(a===4||a===5){var i=parseInt(n.slice(1,4),16);if(!(i>=0&&i<=4095)){zn(e,0,0,0,1);return}return zn(e,(i&3840)>>4|(i&3840)>>8,i&240|(i&240)>>4,i&15|(i&15)<<4,a===5?parseInt(n.slice(4),16)/15:1),kl(r,e),e}else if(a===7||a===9){var i=parseInt(n.slice(1,7),16);if(!(i>=0&&i<=16777215)){zn(e,0,0,0,1);return}return zn(e,(i&16711680)>>16,(i&65280)>>8,i&255,a===9?parseInt(n.slice(7),16)/255:1),kl(r,e),e}return}var o=n.indexOf("("),s=n.indexOf(")");if(o!==-1&&s+1===a){var l=n.substr(0,o),u=n.substr(o+1,s-(o+1)).split(","),c=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?zn(e,+u[0],+u[1],+u[2],1):zn(e,0,0,0,1);c=Ko(u.pop());case"rgb":if(u.length>=3)return zn(e,t0(u[0]),t0(u[1]),t0(u[2]),u.length===3?c:Ko(u[3])),kl(r,e),e;zn(e,0,0,0,1);return;case"hsla":if(u.length!==4){zn(e,0,0,0,1);return}return u[3]=Ko(u[3]),a0(u,e),kl(r,e),e;case"hsl":if(u.length!==3){zn(e,0,0,0,1);return}return a0(u,e),kl(r,e),e;default:return}}zn(e,0,0,0,1)}}function a0(r,e){var t=(parseFloat(r[0])%360+360)%360/360,n=Ko(r[1]),a=Ko(r[2]),i=a<=.5?a*(n+1):a+n-a*n,o=a*2-i;return e=e||[],zn(e,ua(r0(o,i,t+1/3)*255),ua(r0(o,i,t)*255),ua(r0(o,i,t-1/3)*255),1),r.length===4&&(e[3]=r[3]),e}function KH(r){if(!!r){var e=r[0]/255,t=r[1]/255,n=r[2]/255,a=Math.min(e,t,n),i=Math.max(e,t,n),o=i-a,s=(i+a)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(i+a):u=o/(2-i-a);var c=((i-e)/6+o/2)/o,f=((i-t)/6+o/2)/o,h=((i-n)/6+o/2)/o;e===i?l=h-f:t===i?l=1/3+c-h:n===i&&(l=2/3+f-c),l<0&&(l+=1),l>1&&(l-=1)}var v=[l*360,u,s];return r[3]!=null&&v.push(r[3]),v}}function Wv(r,e){var t=$r(r);if(t){for(var n=0;n<3;n++)e<0?t[n]=t[n]*(1-e)|0:t[n]=(255-t[n])*e+t[n]|0,t[n]>255?t[n]=255:t[n]<0&&(t[n]=0);return ca(t,t.length===4?"rgba":"rgb")}}function JH(r){var e=$r(r);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function Pc(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){t=t||[];var n=r*(e.length-1),a=Math.floor(n),i=Math.ceil(n),o=e[a],s=e[i],l=n-a;return t[0]=ua(qi(o[0],s[0],l)),t[1]=ua(qi(o[1],s[1],l)),t[2]=ua(qi(o[2],s[2],l)),t[3]=Ic(qi(o[3],s[3],l)),t}}var eG=Pc;function i0(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){var n=r*(e.length-1),a=Math.floor(n),i=Math.ceil(n),o=$r(e[a]),s=$r(e[i]),l=n-a,u=ca([ua(qi(o[0],s[0],l)),ua(qi(o[1],s[1],l)),ua(qi(o[2],s[2],l)),Ic(qi(o[3],s[3],l))],"rgba");return t?{color:u,leftIndex:a,rightIndex:i,value:n}:u}}var tG=i0;function zl(r,e,t,n){var a=$r(r);if(r)return a=KH(a),e!=null&&(a[0]=QH(e)),t!=null&&(a[1]=Ko(t)),n!=null&&(a[2]=Ko(n)),ca(a0(a),"rgba")}function Ec(r,e){var t=$r(r);if(t&&e!=null)return t[3]=Ic(e),ca(t,"rgba")}function ca(r,e){if(!(!r||!r.length)){var t=r[0]+","+r[1]+","+r[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(t+=","+r[3]),e+"("+t+")"}}function Oc(r,e){var t=$r(r);return t?(.299*t[0]+.587*t[1]+.114*t[2])*t[3]/255+(1-t[3])*e:0}function rG(){return ca([Math.round(Math.random()*255),Math.round(Math.random()*255),Math.round(Math.random()*255)],"rgb")}var nG=Object.freeze(Object.defineProperty({__proto__:null,parse:$r,lift:Wv,toHex:JH,fastLerp:Pc,fastMapToColor:eG,lerp:i0,mapToColor:tG,modifyHSL:zl,modifyAlpha:Ec,stringify:ca,lum:Oc,random:rG},Symbol.toStringTag,{value:"Module"})),Uv=Math.round;function Rc(r){var e;if(!r||r==="transparent")r="none";else if(typeof r=="string"&&r.indexOf("rgba")>-1){var t=$r(r);t&&(r="rgb("+t[0]+","+t[1]+","+t[2]+")",e=t[3])}return{color:r,opacity:e==null?1:e}}var M2=1e-4;function Zi(r){return r<M2&&r>-M2}function jv(r){return Uv(r*1e3)/1e3}function o0(r){return Uv(r*1e4)/1e4}function aG(r){return"matrix("+jv(r[0])+","+jv(r[1])+","+jv(r[2])+","+jv(r[3])+","+o0(r[4])+","+o0(r[5])+")"}var iG={left:"start",right:"end",center:"middle",middle:"middle"};function oG(r,e,t){return t==="top"?r+=e/2:t==="bottom"&&(r-=e/2),r}function sG(r){return r&&(r.shadowBlur||r.shadowOffsetX||r.shadowOffsetY)}function lG(r){var e=r.style,t=r.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),t[0],t[1]].join(",")}function A2(r){return r&&!!r.image}function uG(r){return r&&!!r.svgElement}function s0(r){return A2(r)||uG(r)}function L2(r){return r.type==="linear"}function I2(r){return r.type==="radial"}function P2(r){return r&&(r.type==="linear"||r.type==="radial")}function Yv(r){return"url(#"+r+")"}function E2(r){var e=r.getGlobalScale(),t=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(t)/Math.log(10)),1)}function O2(r){var e=r.x||0,t=r.y||0,n=(r.rotation||0)*mc,a=Pe(r.scaleX,1),i=Pe(r.scaleY,1),o=r.skewX||0,s=r.skewY||0,l=[];return(e||t)&&l.push("translate("+e+"px,"+t+"px)"),n&&l.push("rotate("+n+")"),(a!==1||i!==1)&&l.push("scale("+a+","+i+")"),(o||s)&&l.push("skew("+Uv(o*mc)+"deg, "+Uv(s*mc)+"deg)"),l.join(" ")}var cG=function(){return je.hasGlobalWindow&&ye(window.btoa)?function(r){return window.btoa(unescape(encodeURIComponent(r)))}:typeof Buffer!="undefined"?function(r){return Buffer.from(r).toString("base64")}:function(r){return null}}(),l0=Array.prototype.slice;function li(r,e,t){return(e-r)*t+r}function u0(r,e,t,n){for(var a=e.length,i=0;i<a;i++)r[i]=li(e[i],t[i],n);return r}function fG(r,e,t,n){for(var a=e.length,i=a&&e[0].length,o=0;o<a;o++){r[o]||(r[o]=[]);for(var s=0;s<i;s++)r[o][s]=li(e[o][s],t[o][s],n)}return r}function qv(r,e,t,n){for(var a=e.length,i=0;i<a;i++)r[i]=e[i]+t[i]*n;return r}function R2(r,e,t,n){for(var a=e.length,i=a&&e[0].length,o=0;o<a;o++){r[o]||(r[o]=[]);for(var s=0;s<i;s++)r[o][s]=e[o][s]+t[o][s]*n}return r}function hG(r,e){for(var t=r.length,n=e.length,a=t>n?e:r,i=Math.min(t,n),o=a[i-1]||{color:[0,0,0,0],offset:0},s=i;s<Math.max(t,n);s++)a.push({offset:o.offset,color:o.color.slice()})}function vG(r,e,t){var n=r,a=e;if(!(!n.push||!a.push)){var i=n.length,o=a.length;if(i!==o){var s=i>o;if(s)n.length=o;else for(var l=i;l<o;l++)n.push(t===1?a[l]:l0.call(a[l]))}for(var u=n[0]&&n[0].length,l=0;l<n.length;l++)if(t===1)isNaN(n[l])&&(n[l]=a[l]);else for(var c=0;c<u;c++)isNaN(n[l][c])&&(n[l][c]=a[l][c])}}function Nc(r){if(yr(r)){var e=r.length;if(yr(r[0])){for(var t=[],n=0;n<e;n++)t.push(l0.call(r[n]));return t}return l0.call(r)}return r}function Zv(r){return r[0]=Math.floor(r[0])||0,r[1]=Math.floor(r[1])||0,r[2]=Math.floor(r[2])||0,r[3]=r[3]==null?1:r[3],"rgba("+r.join(",")+")"}function dG(r){return yr(r&&r[0])?2:1}var Xv=0,Qv=1,N2=2,kc=3,c0=4,f0=5,k2=6;function z2(r){return r===c0||r===f0}function Kv(r){return r===Qv||r===N2}var zc=[0,0,0,0],pG=function(){function r(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return r.prototype.isFinished=function(){return this._finished},r.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},r.prototype.needsAnimate=function(){return this.keyframes.length>=1},r.prototype.getAdditiveTrack=function(){return this._additiveTrack},r.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var a=this.keyframes,i=a.length,o=!1,s=k2,l=t;if(yr(t)){var u=dG(t);s=u,(u===1&&!Ye(t[0])||u===2&&!Ye(t[0][0]))&&(o=!0)}else if(Ye(t)&&!Pl(t))s=Xv;else if(ce(t))if(!isNaN(+t))s=Xv;else{var c=$r(t);c&&(l=c,s=kc)}else if(dc(t)){var f=Q({},l);f.colorStops=ee(t.colorStops,function(v){return{offset:v.offset,color:$r(v.color)}}),L2(t)?s=c0:I2(t)&&(s=f0),l=f}i===0?this.valType=s:(s!==this.valType||s===k2)&&(o=!0),this.discrete=this.discrete||o;var h={time:e,value:l,rawValue:t,percent:0};return n&&(h.easing=n,h.easingFunc=ye(n)?n:p2[n]||e0(n)),a.push(h),h},r.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(p,g){return p.time-g.time});for(var a=this.valType,i=n.length,o=n[i-1],s=this.discrete,l=Kv(a),u=z2(a),c=0;c<i;c++){var f=n[c],h=f.value,v=o.value;f.percent=f.time/e,s||(l&&c!==i-1?vG(h,v,a):u&&hG(h.colorStops,v.colorStops))}if(!s&&a!==f0&&t&&this.needsAnimate()&&t.needsAnimate()&&a===t.valType&&!t._finished){this._additiveTrack=t;for(var d=n[0].value,c=0;c<i;c++)a===Xv?n[c].additiveValue=n[c].value-d:a===kc?n[c].additiveValue=qv([],n[c].value,d,-1):Kv(a)&&(n[c].additiveValue=a===Qv?qv([],n[c].value,d,-1):R2([],n[c].value,d,-1))}},r.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n=this._additiveTrack!=null,a=n?"additiveValue":"value",i=this.valType,o=this.keyframes,s=o.length,l=this.propName,u=i===kc,c,f=this._lastFr,h=Math.min,v,d;if(s===1)v=d=o[0];else{if(t<0)c=0;else if(t<this._lastFrP){var p=h(f+1,s-1);for(c=p;c>=0&&!(o[c].percent<=t);c--);c=h(c,s-2)}else{for(c=f;c<s&&!(o[c].percent>t);c++);c=h(c-1,s-2)}d=o[c+1],v=o[c]}if(!!(v&&d)){this._lastFr=c,this._lastFrP=t;var g=d.percent-v.percent,y=g===0?1:h((t-v.percent)/g,1);d.easingFunc&&(y=d.easingFunc(y));var m=n?this._additiveValue:u?zc:e[l];if((Kv(i)||u)&&!m&&(m=this._additiveValue=[]),this.discrete)e[l]=y<1?v.rawValue:d.rawValue;else if(Kv(i))i===Qv?u0(m,v[a],d[a],y):fG(m,v[a],d[a],y);else if(z2(i)){var _=v[a],b=d[a],w=i===c0;e[l]={type:w?"linear":"radial",x:li(_.x,b.x,y),y:li(_.y,b.y,y),colorStops:ee(_.colorStops,function(S,T){var D=b.colorStops[T];return{offset:li(S.offset,D.offset,y),color:Zv(u0([],S.color,D.color,y))}}),global:b.global},w?(e[l].x2=li(_.x2,b.x2,y),e[l].y2=li(_.y2,b.y2,y)):e[l].r=li(_.r,b.r,y)}else if(u)u0(m,v[a],d[a],y),n||(e[l]=Zv(m));else{var x=li(v[a],d[a],y);n?this._additiveValue=x:e[l]=x}n&&this._addToTarget(e)}}},r.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,a=this._additiveValue;t===Xv?e[n]=e[n]+a:t===kc?($r(e[n],zc),qv(zc,zc,a,1),e[n]=Zv(zc)):t===Qv?qv(e[n],e[n],a,1):t===N2&&R2(e[n],e[n],a,1)},r}(),gG=function(){function r(e,t,n,a){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&a){Dv("Can' use additive animation on looped animation.");return}this._additiveAnimators=a,this._allowDiscrete=n}return r.prototype.getMaxTime=function(){return this._maxTime},r.prototype.getDelay=function(){return this._delay},r.prototype.getLoop=function(){return this._loop},r.prototype.getTarget=function(){return this._target},r.prototype.changeTarget=function(e){this._target=e},r.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,Fe(t),n)},r.prototype.whenWithKeys=function(e,t,n,a){for(var i=this._tracks,o=0;o<n.length;o++){var s=n[o],l=i[s];if(!l){l=i[s]=new pG(s);var u=void 0,c=this._getAdditiveTrack(s);if(c){var f=c.keyframes,h=f[f.length-1];u=h&&h.value,c.valType===kc&&u&&(u=Zv(u))}else u=this._target[s];if(u==null)continue;e>0&&l.addKeyframe(0,Nc(u),a),this._trackKeys.push(s)}l.addKeyframe(e,Nc(t[s]),a)}return this._maxTime=Math.max(this._maxTime,e),this},r.prototype.pause=function(){this._clip.pause(),this._paused=!0},r.prototype.resume=function(){this._clip.resume(),this._paused=!1},r.prototype.isPaused=function(){return!!this._paused},r.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},r.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n<t;n++)e[n].call(this)},r.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,t=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,t)for(var n=0;n<t.length;n++)t[n].call(this)},r.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,n=0;n<t.length;n++)e[t[n]].setFinished()},r.prototype._getAdditiveTrack=function(e){var t,n=this._additiveAnimators;if(n)for(var a=0;a<n.length;a++){var i=n[a].getTrack(e);i&&(t=i)}return t},r.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,n=[],a=this._maxTime||0,i=0;i<this._trackKeys.length;i++){var o=this._trackKeys[i],s=this._tracks[o],l=this._getAdditiveTrack(o),u=s.keyframes,c=u.length;if(s.prepare(a,l),s.needsAnimate())if(!this._allowDiscrete&&s.discrete){var f=u[c-1];f&&(t._target[s.propName]=f.rawValue),s.setFinished()}else n.push(s)}if(n.length||this._force){var h=new qH({life:a,loop:this._loop,delay:this._delay||0,onframe:function(v){t._started=2;var d=t._additiveAnimators;if(d){for(var p=!1,g=0;g<d.length;g++)if(d[g]._clip){p=!0;break}p||(t._additiveAnimators=null)}for(var g=0;g<n.length;g++)n[g].step(t._target,v);var y=t._onframeCbs;if(y)for(var g=0;g<y.length;g++)y[g](t._target,v)},ondestroy:function(){t._doneCallback()}});this._clip=h,this.animation&&this.animation.addClip(h),e&&h.setEasing(e)}else this._doneCallback();return this}},r.prototype.stop=function(e){if(!!this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},r.prototype.delay=function(e){return this._delay=e,this},r.prototype.during=function(e){return e&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(e)),this},r.prototype.done=function(e){return e&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(e)),this},r.prototype.aborted=function(e){return e&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(e)),this},r.prototype.getClip=function(){return this._clip},r.prototype.getTrack=function(e){return this._tracks[e]},r.prototype.getTracks=function(){var e=this;return ee(this._trackKeys,function(t){return e._tracks[t]})},r.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var n=this._tracks,a=this._trackKeys,i=0;i<e.length;i++){var o=n[e[i]];o&&!o.isFinished()&&(t?o.step(this._target,1):this._started===1&&o.step(this._target,0),o.setFinished())}for(var s=!0,i=0;i<a.length;i++)if(!n[a[i]].isFinished()){s=!1;break}return s&&this._abortedCallback(),s},r.prototype.saveTo=function(e,t,n){if(!!e){t=t||this._trackKeys;for(var a=0;a<t.length;a++){var i=t[a],o=this._tracks[i];if(!(!o||o.isFinished())){var s=o.keyframes,l=s[n?0:s.length-1];l&&(e[i]=Nc(l.rawValue))}}}},r.prototype.__changeFinalValue=function(e,t){t=t||Fe(e);for(var n=0;n<t.length;n++){var a=t[n],i=this._tracks[a];if(!!i){var o=i.keyframes;if(o.length>1){var s=o.pop();i.addKeyframe(s.time,e[a]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},r}(),h0=gG;function Bl(){return new Date().getTime()}var yG=function(r){bt(e,r);function e(t){var n=r.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t=t||{},n.stage=t.stage||{},n}return e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var n=t.getClip();n&&this.addClip(n)},e.prototype.removeClip=function(t){if(!!t.animation){var n=t.prev,a=t.next;n?n.next=a:this._head=a,a?a.prev=n:this._tail=n,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var n=t.getClip();n&&this.removeClip(n),t.animation=null},e.prototype.update=function(t){for(var n=Bl()-this._pausedTime,a=n-this._time,i=this._head;i;){var o=i.next,s=i.step(n,a);s&&(i.ondestroy(),this.removeClip(i)),i=o}this._time=n,t||(this.trigger("frame",a),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0;function n(){t._running&&(Km(n),!t._paused&&t.update())}Km(n)},e.prototype.start=function(){this._running||(this._time=Bl(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=Bl(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=Bl()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var n=t.next;t.prev=t.next=t.animation=null,t=n}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(t,n){n=n||{},this.start();var a=new h0(t,n.loop);return this.addAnimator(a),a},e}(Rn),mG=yG,_G=300,v0=je.domSupported,d0=function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],t={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=ee(r,function(a){var i=a.replace("mouse","pointer");return t.hasOwnProperty(i)?i:a});return{mouse:r,touch:e,pointer:n}}(),B2={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},F2=!1;function p0(r){var e=r.pointerType;return e==="pen"||e==="touch"}function bG(r){r.touching=!0,r.touchTimer!=null&&(clearTimeout(r.touchTimer),r.touchTimer=null),r.touchTimer=setTimeout(function(){r.touching=!1,r.touchTimer=null},700)}function g0(r){r&&(r.zrByTouch=!0)}function xG(r,e){return Nn(r.dom,new wG(r,e),!0)}function V2(r,e){for(var t=e,n=!1;t&&t.nodeType!==9&&!(n=t.domBelongToZr||t!==e&&t===r.painterRoot);)t=t.parentNode;return n}var wG=function(){function r(e,t){this.stopPropagation=Et,this.stopImmediatePropagation=Et,this.preventDefault=Et,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return r}(),fa={mousedown:function(r){r=Nn(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=Nn(this.dom,r);var e=this.__mayPointerCapture;e&&(r.zrX!==e[0]||r.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",r)},mouseup:function(r){r=Nn(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=Nn(this.dom,r);var e=r.toElement||r.relatedTarget;V2(this,e)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){F2=!0,r=Nn(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){F2||(r=Nn(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=Nn(this.dom,r),g0(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),fa.mousemove.call(this,r),fa.mousedown.call(this,r)},touchmove:function(r){r=Nn(this.dom,r),g0(r),this.handler.processGesture(r,"change"),fa.mousemove.call(this,r)},touchend:function(r){r=Nn(this.dom,r),g0(r),this.handler.processGesture(r,"end"),fa.mouseup.call(this,r),+new Date-+this.__lastTouchMoment<_G&&fa.click.call(this,r)},pointerdown:function(r){fa.mousedown.call(this,r)},pointermove:function(r){p0(r)||fa.mousemove.call(this,r)},pointerup:function(r){fa.mouseup.call(this,r)},pointerout:function(r){p0(r)||fa.mouseout.call(this,r)}};L(["click","dblclick","contextmenu"],function(r){fa[r]=function(e){e=Nn(this.dom,e),this.trigger(r,e)}});var y0={pointermove:function(r){p0(r)||y0.mousemove.call(this,r)},pointerup:function(r){y0.mouseup.call(this,r)},mousemove:function(r){this.trigger("mousemove",r)},mouseup:function(r){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",r),e&&(r.zrEventControl="only_globalout",this.trigger("mouseout",r))}};function SG(r,e){var t=e.domHandlers;je.pointerEventsSupported?L(d0.pointer,function(n){Jv(e,n,function(a){t[n].call(r,a)})}):(je.touchEventsSupported&&L(d0.touch,function(n){Jv(e,n,function(a){t[n].call(r,a),bG(e)})}),L(d0.mouse,function(n){Jv(e,n,function(a){a=Um(a),e.touching||t[n].call(r,a)})}))}function CG(r,e){je.pointerEventsSupported?L(B2.pointer,t):je.touchEventsSupported||L(B2.mouse,t);function t(n){function a(i){i=Um(i),V2(r,i.target)||(i=xG(r,i),e.domHandlers[n].call(r,i))}Jv(e,n,a,{capture:!0})}}function Jv(r,e,t,n){r.mounted[e]=t,r.listenerOpts[e]=n,jm(r.domTarget,e,t,n)}function m0(r){var e=r.mounted;for(var t in e)e.hasOwnProperty(t)&&DH(r.domTarget,t,e[t],r.listenerOpts[t]);r.mounted={}}var $2=function(){function r(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}return r}(),TG=function(r){bt(e,r);function e(t,n){var a=r.call(this)||this;return a.__pointerCapturing=!1,a.dom=t,a.painterRoot=n,a._localHandlerScope=new $2(t,fa),v0&&(a._globalHandlerScope=new $2(document,y0)),SG(a,a._localHandlerScope),a}return e.prototype.dispose=function(){m0(this._localHandlerScope),v0&&m0(this._globalHandlerScope)},e.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},e.prototype.__togglePointerCapture=function(t){if(this.__mayPointerCapture=null,v0&&+this.__pointerCapturing^+t){this.__pointerCapturing=t;var n=this._globalHandlerScope;t?CG(this,n):m0(n)}},e}(Rn),DG=TG,H2=1;je.hasGlobalWindow&&(H2=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var ed=H2,_0=.4,b0="#333",x0="#ccc",MG="#eee",G2=wc,W2=5e-5;function Jo(r){return r>W2||r<-W2}var es=[],Fl=[],w0=_n(),S0=Math.abs,AG=function(){function r(){}return r.prototype.getLocalTransform=function(e){return r.getLocalTransform(this,e)},r.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},r.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},r.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},r.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},r.prototype.needLocalTransform=function(){return Jo(this.rotation)||Jo(this.x)||Jo(this.y)||Jo(this.scaleX-1)||Jo(this.scaleY-1)||Jo(this.skewX)||Jo(this.skewY)},r.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&G2(n);return}n=n||_n(),t?this.getLocalTransform(n):G2(n),e&&(t?Ea(n,e,n):Ov(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)},r.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(es);var n=es[0]<0?-1:1,a=es[1]<0?-1:1,i=((es[0]-n)*t+n)/es[0]||0,o=((es[1]-a)*t+a)/es[1]||0;e[0]*=i,e[1]*=i,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||_n(),Yo(this.invTransform,e)},r.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},r.prototype.setLocalTransform=function(e){if(!!e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],a=Math.atan2(e[1],e[0]),i=Math.PI/2+a-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-a,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(!!this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(Ea(Fl,e.invTransform,t),t=Fl);var n=this.originX,a=this.originY;(n||a)&&(w0[4]=n,w0[5]=a,Ea(Fl,t,w0),Fl[4]-=n,Fl[5]-=a,t=Fl),this.setLocalTransform(t)}},r.prototype.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},r.prototype.transformCoordToLocal=function(e,t){var n=[e,t],a=this.invTransform;return a&&sr(n,n,a),n},r.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],a=this.transform;return a&&sr(n,n,a),n},r.prototype.getLineScale=function(){var e=this.transform;return e&&S0(e[0]-1)>1e-10&&S0(e[3]-1)>1e-10?Math.sqrt(S0(e[0]*e[3]-e[2]*e[1])):1},r.prototype.copyTransform=function(e){U2(this,e)},r.getLocalTransform=function(e,t){t=t||[];var n=e.originX||0,a=e.originY||0,i=e.scaleX,o=e.scaleY,s=e.anchorX,l=e.anchorY,u=e.rotation||0,c=e.x,f=e.y,h=e.skewX?Math.tan(e.skewX):0,v=e.skewY?Math.tan(-e.skewY):0;if(n||a||s||l){var d=n+s,p=a+l;t[4]=-d*i-h*p*o,t[5]=-p*o-v*d*i}else t[4]=t[5]=0;return t[0]=i,t[3]=o,t[1]=v*i,t[2]=h*o,u&&Wi(t,t,u),t[4]+=n+c,t[5]+=a+f,t},r.initDefaultProps=function(){var e=r.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0}(),r}(),Ra=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function U2(r,e){for(var t=0;t<Ra.length;t++){var n=Ra[t];r[n]=e[n]}}var ui=AG,j2={};function xn(r,e){e=e||Vi;var t=j2[e];t||(t=j2[e]=new Lc(500));var n=t.get(r);return n==null&&(n=sa.measureText(r,e).width,t.put(r,n)),n}function Y2(r,e,t,n){var a=xn(r,e),i=td(e),o=Fc(0,a,t),s=Vl(0,i,n),l=new Oe(o,s,a,i);return l}function Bc(r,e,t,n){var a=((r||"")+"").split(`
198
- `),i=a.length;if(i===1)return Y2(a[0],e,t,n);for(var o=new Oe(0,0,0,0),s=0;s<a.length;s++){var l=Y2(a[s],e,t,n);s===0?o.copy(l):o.union(l)}return o}function Fc(r,e,t){return t==="right"?r-=e:t==="center"&&(r-=e/2),r}function Vl(r,e,t){return t==="middle"?r-=e/2:t==="bottom"&&(r-=e),r}function td(r){return xn("\u56FD",r)}function ha(r,e){return typeof r=="string"?r.lastIndexOf("%")>=0?parseFloat(r)/100*e:parseFloat(r):r}function rd(r,e,t){var n=e.position||"inside",a=e.distance!=null?e.distance:5,i=t.height,o=t.width,s=i/2,l=t.x,u=t.y,c="left",f="top";if(n instanceof Array)l+=ha(n[0],t.width),u+=ha(n[1],t.height),c=null,f=null;else switch(n){case"left":l-=a,u+=s,c="right",f="middle";break;case"right":l+=a+o,u+=s,f="middle";break;case"top":l+=o/2,u-=a,c="center",f="bottom";break;case"bottom":l+=o/2,u+=i+a,c="center";break;case"inside":l+=o/2,u+=s,c="center",f="middle";break;case"insideLeft":l+=a,u+=s,f="middle";break;case"insideRight":l+=o-a,u+=s,c="right",f="middle";break;case"insideTop":l+=o/2,u+=a,c="center";break;case"insideBottom":l+=o/2,u+=i-a,c="center",f="bottom";break;case"insideTopLeft":l+=a,u+=a;break;case"insideTopRight":l+=o-a,u+=a,c="right";break;case"insideBottomLeft":l+=a,u+=i-a,f="bottom";break;case"insideBottomRight":l+=o-a,u+=i-a,c="right",f="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=c,r.verticalAlign=f,r}var C0="__zr_normal__",T0=Ra.concat(["ignore"]),LG=En(Ra,function(r,e){return r[e]=!0,r},{ignore:!1}),$l={},IG=new Oe(0,0,0,0),D0=function(){function r(e){this.id=Om(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return r.prototype._init=function(e){this.attr(e)},r.prototype.drift=function(e,t,n){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0;break}var a=this.transform;a||(a=this.transform=[1,0,0,1,0,0]),a[4]+=e,a[5]+=t,this.decomposeTransform(),this.markRedraw()},r.prototype.beforeUpdate=function(){},r.prototype.afterUpdate=function(){},r.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},r.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var n=this.textConfig,a=n.local,i=t.innerTransformable,o=void 0,s=void 0,l=!1;i.parent=a?this:null;var u=!1;if(i.copyTransform(t),n.position!=null){var c=IG;n.layoutRect?c.copy(n.layoutRect):c.copy(this.getBoundingRect()),a||c.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition($l,n,c):rd($l,n,c),i.x=$l.x,i.y=$l.y,o=$l.align,s=$l.verticalAlign;var f=n.origin;if(f&&n.rotation!=null){var h=void 0,v=void 0;f==="center"?(h=c.width*.5,v=c.height*.5):(h=ha(f[0],c.width),v=ha(f[1],c.height)),u=!0,i.originX=-i.x+h+(a?0:c.x),i.originY=-i.y+v+(a?0:c.y)}}n.rotation!=null&&(i.rotation=n.rotation);var d=n.offset;d&&(i.x+=d[0],i.y+=d[1],u||(i.originX=-d[0],i.originY=-d[1]));var p=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),y=void 0,m=void 0,_=void 0;p&&this.canBeInsideText()?(y=n.insideFill,m=n.insideStroke,(y==null||y==="auto")&&(y=this.getInsideTextFill()),(m==null||m==="auto")&&(m=this.getInsideTextStroke(y),_=!0)):(y=n.outsideFill,m=n.outsideStroke,(y==null||y==="auto")&&(y=this.getOutsideFill()),(m==null||m==="auto")&&(m=this.getOutsideStroke(y),_=!0)),y=y||"#000",(y!==g.fill||m!==g.stroke||_!==g.autoStroke||o!==g.align||s!==g.verticalAlign)&&(l=!0,g.fill=y,g.stroke=m,g.autoStroke=_,g.align=o,g.verticalAlign=s,t.setDefaultTextStyle(g)),t.__dirty|=bn,l&&t.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(e){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?x0:b0},r.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t=="string"&&$r(t);n||(n=[255,255,255,1]);for(var a=n[3],i=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*a+(i?0:255)*(1-a);return n[3]=1,ca(n,"rgba")},r.prototype.traverse=function(e,t){},r.prototype.attrKV=function(e,t){e==="textConfig"?this.setTextConfig(t):e==="textContent"?this.setTextContent(t):e==="clipPath"?this.setClipPath(t):e==="extra"?(this.extra=this.extra||{},Q(this.extra,t)):this[e]=t},r.prototype.hide=function(){this.ignore=!0,this.markRedraw()},r.prototype.show=function(){this.ignore=!1,this.markRedraw()},r.prototype.attr=function(e,t){if(typeof e=="string")this.attrKV(e,t);else if(_e(e))for(var n=e,a=Fe(n),i=0;i<a.length;i++){var o=a[i];this.attrKV(o,e[o])}return this.markRedraw(),this},r.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var t=this._normalState,n=0;n<this.animators.length;n++){var a=this.animators[n],i=a.__fromStateTransition;if(!(a.getLoop()||i&&i!==C0)){var o=a.targetName,s=o?t[o]:t;a.saveTo(s)}}},r.prototype._innerSaveToNormal=function(e){var t=this._normalState;t||(t=this._normalState={}),e.textConfig&&!t.textConfig&&(t.textConfig=this.textConfig),this._savePrimaryToNormal(e,t,T0)},r.prototype._savePrimaryToNormal=function(e,t,n){for(var a=0;a<n.length;a++){var i=n[a];e[i]!=null&&!(i in t)&&(t[i]=this[i])}},r.prototype.hasState=function(){return this.currentStates.length>0},r.prototype.getState=function(e){return this.states[e]},r.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},r.prototype.clearStates=function(e){this.useState(C0,!1,e)},r.prototype.useState=function(e,t,n,a){var i=e===C0,o=this.hasState();if(!(!o&&i)){var s=this.currentStates,l=this.stateTransition;if(!(Ne(s,e)>=0&&(t||s.length===1))){var u;if(this.stateProxy&&!i&&(u=this.stateProxy(e)),u||(u=this.states&&this.states[e]),!u&&!i){Dv("State "+e+" not exists.");return}i||this.saveCurrentToNormalState(u);var c=!!(u&&u.hoverLayer||a);c&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,u,this._normalState,t,!n&&!this.__inHover&&l&&l.duration>0,l);var f=this._textContent,h=this._textGuide;return f&&f.useState(e,t,n,c),h&&h.useState(e,t,n,c),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~bn),u}}},r.prototype.useStates=function(e,t,n){if(!e.length)this.clearStates();else{var a=[],i=this.currentStates,o=e.length,s=o===i.length;if(s){for(var l=0;l<o;l++)if(e[l]!==i[l]){s=!1;break}}if(s)return;for(var l=0;l<o;l++){var u=e[l],c=void 0;this.stateProxy&&(c=this.stateProxy(u,e)),c||(c=this.states[u]),c&&a.push(c)}var f=a[o-1],h=!!(f&&f.hoverLayer||n);h&&this._toggleHoverLayerFlag(!0);var v=this._mergeStates(a),d=this.stateTransition;this.saveCurrentToNormalState(v),this._applyStateObj(e.join(","),v,this._normalState,!1,!t&&!this.__inHover&&d&&d.duration>0,d);var p=this._textContent,g=this._textGuide;p&&p.useStates(e,t,h),g&&g.useStates(e,t,h),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!h&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~bn)}},r.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var t=this.animators[e];t.targetName&&t.changeTarget(this[t.targetName])}},r.prototype.removeState=function(e){var t=Ne(this.currentStates,e);if(t>=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},r.prototype.replaceState=function(e,t,n){var a=this.currentStates.slice(),i=Ne(a,e),o=Ne(a,t)>=0;i>=0?o?a.splice(i,1):a[i]=t:n&&!o&&a.push(t),this.useStates(a)},r.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},r.prototype._mergeStates=function(e){for(var t={},n,a=0;a<e.length;a++){var i=e[a];Q(t,i),i.textConfig&&(n=n||{},Q(n,i.textConfig))}return n&&(t.textConfig=n),t},r.prototype._applyStateObj=function(e,t,n,a,i,o){var s=!(t&&a);t&&t.textConfig?(this.textConfig=Q({},a?this.textConfig:n.textConfig),Q(this.textConfig,t.textConfig)):s&&n.textConfig&&(this.textConfig=n.textConfig);for(var l={},u=!1,c=0;c<T0.length;c++){var f=T0[c],h=i&&LG[f];t&&t[f]!=null?h?(u=!0,l[f]=t[f]):this[f]=t[f]:s&&n[f]!=null&&(h?(u=!0,l[f]=n[f]):this[f]=n[f])}if(!i)for(var c=0;c<this.animators.length;c++){var v=this.animators[c],d=v.targetName;v.getLoop()||v.__changeFinalValue(d?(t||n)[d]:t||n)}u&&this._transitionState(e,l,o)},r.prototype._attachComponent=function(e){if(!(e.__zr&&!e.__hostTarget)&&e!==this){var t=this.__zr;t&&e.addSelfToZr(t),e.__zr=t,e.__hostTarget=this}},r.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},r.prototype.getClipPath=function(){return this._clipPath},r.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},r.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},r.prototype.getTextContent=function(){return this._textContent},r.prototype.setTextContent=function(e){var t=this._textContent;t!==e&&(t&&t!==e&&this.removeTextContent(),e.innerTransformable=new ui,this._attachComponent(e),this._textContent=e,this.markRedraw())},r.prototype.setTextConfig=function(e){this.textConfig||(this.textConfig={}),Q(this.textConfig,e),this.markRedraw()},r.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},r.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},r.prototype.getTextGuideLine=function(){return this._textGuide},r.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},r.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},r.prototype.markRedraw=function(){this.__dirty|=bn;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},r.prototype.dirty=function(){this.markRedraw()},r.prototype._toggleHoverLayerFlag=function(e){this.__inHover=e;var t=this._textContent,n=this._textGuide;t&&(t.__inHover=e),n&&(n.__inHover=e)},r.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.addAnimator(t[n]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}},r.prototype.removeSelfFromZr=function(e){if(!!this.__zr){this.__zr=null;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.removeAnimator(t[n]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},r.prototype.animate=function(e,t,n){var a=e?this[e]:this,i=new h0(a,t,n);return e&&(i.targetName=e),this.addAnimator(i,e),i},r.prototype.addAnimator=function(e,t){var n=this.__zr,a=this;e.during(function(){a.updateDuringAnimation(t)}).done(function(){var i=a.animators,o=Ne(i,e);o>=0&&i.splice(o,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},r.prototype.updateDuringAnimation=function(e){this.markRedraw()},r.prototype.stopAnimation=function(e,t){for(var n=this.animators,a=n.length,i=[],o=0;o<a;o++){var s=n[o];!e||e===s.scope?s.stop(t):i.push(s)}return this.animators=i,this},r.prototype.animateTo=function(e,t,n){M0(this,e,t,n)},r.prototype.animateFrom=function(e,t,n){M0(this,e,t,n,!0)},r.prototype._transitionState=function(e,t,n,a){for(var i=M0(this,t,n,a),o=0;o<i.length;o++)i[o].__fromStateTransition=e},r.prototype.getBoundingRect=function(){return null},r.prototype.getPaintRect=function(){return null},r.initDefaultProps=function(){var e=r.prototype;e.type="element",e.name="",e.ignore=e.silent=e.isGroup=e.draggable=e.dragging=e.ignoreClip=e.__inHover=!1,e.__dirty=bn;function t(n,a,i,o){Object.defineProperty(e,n,{get:function(){if(!this[a]){var l=this[a]=[];s(this,l)}return this[a]},set:function(l){this[i]=l[0],this[o]=l[1],this[a]=l,s(this,l)}});function s(l,u){Object.defineProperty(u,0,{get:function(){return l[i]},set:function(c){l[i]=c}}),Object.defineProperty(u,1,{get:function(){return l[o]},set:function(c){l[o]=c}})}}Object.defineProperty&&(t("position","_legacyPos","x","y"),t("scale","_legacyScale","scaleX","scaleY"),t("origin","_legacyOrigin","originX","originY"))}(),r}();Pt(D0,Rn),Pt(D0,ui);function M0(r,e,t,n,a){t=t||{};var i=[];q2(r,"",r,e,t,n,i,a);var o=i.length,s=!1,l=t.done,u=t.aborted,c=function(){s=!0,o--,o<=0&&(s?l&&l():u&&u())},f=function(){o--,o<=0&&(s?l&&l():u&&u())};o||l&&l(),i.length>0&&t.during&&i[0].during(function(d,p){t.during(p)});for(var h=0;h<i.length;h++){var v=i[h];c&&v.done(c),f&&v.aborted(f),t.force&&v.duration(t.duration),v.start(t.easing)}return i}function A0(r,e,t){for(var n=0;n<t;n++)r[n]=e[n]}function PG(r){return yr(r[0])}function EG(r,e,t){if(yr(e[t]))if(yr(r[t])||(r[t]=[]),an(e[t])){var n=e[t].length;r[t].length!==n&&(r[t]=new e[t].constructor(n),A0(r[t],e[t],n))}else{var a=e[t],i=r[t],o=a.length;if(PG(a))for(var s=a[0].length,l=0;l<o;l++)i[l]?A0(i[l],a[l],s):i[l]=Array.prototype.slice.call(a[l]);else A0(i,a,o);i.length=a.length}else r[t]=e[t]}function OG(r,e){return r===e||yr(r)&&yr(e)&&RG(r,e)}function RG(r,e){var t=r.length;if(t!==e.length)return!1;for(var n=0;n<t;n++)if(r[n]!==e[n])return!1;return!0}function q2(r,e,t,n,a,i,o,s){for(var l=Fe(n),u=a.duration,c=a.delay,f=a.additive,h=a.setToFinal,v=!_e(i),d=r.animators,p=[],g=0;g<l.length;g++){var y=l[g],m=n[y];if(m!=null&&t[y]!=null&&(v||i[y]))if(_e(m)&&!yr(m)&&!dc(m)){if(e){s||(t[y]=m,r.updateDuringAnimation(e));continue}q2(r,y,t[y],m,a,i&&i[y],o,s)}else p.push(y);else s||(t[y]=m,r.updateDuringAnimation(e),p.push(y))}var _=p.length;if(!f&&_)for(var b=0;b<d.length;b++){var w=d[b];if(w.targetName===e){var x=w.stopTracks(p);if(x){var S=Ne(d,w);d.splice(S,1)}}}if(a.force||(p=at(p,function(A){return!OG(n[A],t[A])}),_=p.length),_>0||a.force&&!o.length){var T=void 0,D=void 0,M=void 0;if(s){D={},h&&(T={});for(var b=0;b<_;b++){var y=p[b];D[y]=t[y],h?T[y]=n[y]:t[y]=n[y]}}else if(h){M={};for(var b=0;b<_;b++){var y=p[b];M[y]=Nc(t[y]),EG(t,n,y)}}var w=new h0(t,!1,!1,f?at(d,function(I){return I.targetName===e}):null);w.targetName=e,a.scope&&(w.scope=a.scope),h&&T&&w.whenWithKeys(0,T,p),M&&w.whenWithKeys(0,M,p),w.whenWithKeys(u==null?500:u,s?D:n,p).delay(c||0),r.addAnimator(w,e),o.push(w)}}var Z2=D0,X2=function(r){bt(e,r);function e(t){var n=r.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(t),n}return e.prototype.childrenRef=function(){return this._children},e.prototype.children=function(){return this._children.slice()},e.prototype.childAt=function(t){return this._children[t]},e.prototype.childOfName=function(t){for(var n=this._children,a=0;a<n.length;a++)if(n[a].name===t)return n[a]},e.prototype.childCount=function(){return this._children.length},e.prototype.add=function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},e.prototype.addBefore=function(t,n){if(t&&t!==this&&t.parent!==this&&n&&n.parent===this){var a=this._children,i=a.indexOf(n);i>=0&&(a.splice(i,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,n){var a=Ne(this._children,t);return a>=0&&this.replaceAt(n,a),this},e.prototype.replaceAt=function(t,n){var a=this._children,i=a[n];if(t&&t!==this&&t.parent!==this&&t!==i){a[n]=t,i.parent=null;var o=this.__zr;o&&i.removeSelfFromZr(o),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var n=this.__zr;n&&n!==t.__zr&&t.addSelfToZr(n),n&&n.refresh()},e.prototype.remove=function(t){var n=this.__zr,a=this._children,i=Ne(a,t);return i<0?this:(a.splice(i,1),t.parent=null,n&&t.removeSelfFromZr(n),n&&n.refresh(),this)},e.prototype.removeAll=function(){for(var t=this._children,n=this.__zr,a=0;a<t.length;a++){var i=t[a];n&&i.removeSelfFromZr(n),i.parent=null}return t.length=0,this},e.prototype.eachChild=function(t,n){for(var a=this._children,i=0;i<a.length;i++){var o=a[i];t.call(n,o,i)}return this},e.prototype.traverse=function(t,n){for(var a=0;a<this._children.length;a++){var i=this._children[a],o=t.call(n,i);i.isGroup&&!o&&i.traverse(t,n)}return this},e.prototype.addSelfToZr=function(t){r.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++){var a=this._children[n];a.addSelfToZr(t)}},e.prototype.removeSelfFromZr=function(t){r.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++){var a=this._children[n];a.removeSelfFromZr(t)}},e.prototype.getBoundingRect=function(t){for(var n=new Oe(0,0,0,0),a=t||this._children,i=[],o=null,s=0;s<a.length;s++){var l=a[s];if(!(l.ignore||l.invisible)){var u=l.getBoundingRect(),c=l.getLocalTransform(i);c?(Oe.applyTransform(n,u,c),o=o||n.clone(),o.union(n)):(o=o||u.clone(),o.union(u))}}return o||n},e}(Z2);X2.prototype.type="group";var Ce=X2;/*!
199
- * ZRender, a high performance 2d drawing library.
200
- *
201
- * Copyright (c) 2013, Baidu Inc.
202
- * All rights reserved.
203
- *
204
- * LICENSE
205
- * https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
206
- */var nd={},ts={};function NG(r){delete ts[r]}function kG(r){if(!r)return!1;if(typeof r=="string")return Oc(r,1)<_0;if(r.colorStops){for(var e=r.colorStops,t=0,n=e.length,a=0;a<n;a++)t+=Oc(e[a].color,1);return t/=n,t<_0}return!1}var zG=function(){function r(e,t,n){var a=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=t,this.id=e;var i=new HH,o=n.renderer||"canvas";nd[o]||(o=Fe(nd)[0]),n.useDirtyRect=n.useDirtyRect==null?!1:n.useDirtyRect;var s=new nd[o](t,i,n,e),l=n.ssr||s.ssrOnly;this.storage=i,this.painter=s;var u=!je.node&&!je.worker&&!l?new DG(s.getViewportRoot(),s.root):null,c=n.useCoarsePointer,f=c==null||c==="auto"?je.touchEventsSupported:!!c,h=44,v;f&&(v=Pe(n.pointerSize,h)),this.handler=new zH(i,s,u,s.root,v),this.animation=new mG({stage:{update:l?null:function(){return a._flush(!0)}}}),l||this.animation.start()}return r.prototype.add=function(e){!e||(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},r.prototype.remove=function(e){!e||(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},r.prototype.configLayer=function(e,t){this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh()},r.prototype.setBackgroundColor=function(e){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=kG(e)},r.prototype.getBackgroundColor=function(){return this._backgroundColor},r.prototype.setDarkMode=function(e){this._darkMode=e},r.prototype.isDarkMode=function(){return this._darkMode},r.prototype.refreshImmediately=function(e){e||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1},r.prototype.refresh=function(){this._needsRefresh=!0,this.animation.start()},r.prototype.flush=function(){this._flush(!1)},r.prototype._flush=function(e){var t,n=Bl();this._needsRefresh&&(t=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately());var a=Bl();t?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:a-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},r.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},r.prototype.refreshHover=function(){this._needsRefreshHover=!0},r.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover()},r.prototype.resize=function(e){e=e||{},this.painter.resize(e.width,e.height),this.handler.resize()},r.prototype.clearAnimation=function(){this.animation.clear()},r.prototype.getWidth=function(){return this.painter.getWidth()},r.prototype.getHeight=function(){return this.painter.getHeight()},r.prototype.setCursorStyle=function(e){this.handler.setCursorStyle(e)},r.prototype.findHover=function(e,t){return this.handler.findHover(e,t)},r.prototype.on=function(e,t,n){return this.handler.on(e,t,n),this},r.prototype.off=function(e,t){this.handler.off(e,t)},r.prototype.trigger=function(e,t){this.handler.trigger(e,t)},r.prototype.clear=function(){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof Ce&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()},r.prototype.dispose=function(){this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,NG(this.id)},r}();function L0(r,e){var t=new zG(Om(),r,e);return ts[t.id]=t,t}function BG(r){r.dispose()}function FG(){for(var r in ts)ts.hasOwnProperty(r)&&ts[r].dispose();ts={}}function VG(r){return ts[r]}function Q2(r,e){nd[r]=e}var $G="5.4.1",HG=Object.freeze(Object.defineProperty({__proto__:null,init:L0,dispose:BG,disposeAll:FG,getInstance:VG,registerPainter:Q2,version:$G},Symbol.toStringTag,{value:"Module"})),K2=1e-4,J2=20;function GG(r){return r.replace(/^\s+|\s+$/g,"")}function it(r,e,t,n){var a=e[0],i=e[1],o=t[0],s=t[1],l=i-a,u=s-o;if(l===0)return u===0?o:(o+s)/2;if(n)if(l>0){if(r<=a)return o;if(r>=i)return s}else{if(r>=a)return o;if(r<=i)return s}else{if(r===a)return o;if(r===i)return s}return(r-a)/l*u+o}function le(r,e){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return ce(r)?GG(r).match(/%$/)?parseFloat(r)/100*e:parseFloat(r):r==null?NaN:+r}function At(r,e,t){return e==null&&(e=10),e=Math.min(Math.max(0,e),J2),r=(+r).toFixed(e),t?r:+r}function wn(r){return r.sort(function(e,t){return e-t}),r}function va(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var e=1,t=0;t<15;t++,e*=10)if(Math.round(r*e)/e===r)return t}return eD(r)}function eD(r){var e=r.toString().toLowerCase(),t=e.indexOf("e"),n=t>0?+e.slice(t+1):0,a=t>0?t:e.length,i=e.indexOf("."),o=i<0?0:a-1-i;return Math.max(0,o-n)}function I0(r,e){var t=Math.log,n=Math.LN10,a=Math.floor(t(r[1]-r[0])/n),i=Math.round(t(Math.abs(e[1]-e[0]))/n),o=Math.min(Math.max(-a+i,0),20);return isFinite(o)?o:20}function WG(r,e,t){if(!r[e])return 0;var n=tD(r,t);return n[e]||0}function tD(r,e){var t=En(r,function(v,d){return v+(isNaN(d)?0:d)},0);if(t===0)return[];for(var n=Math.pow(10,e),a=ee(r,function(v){return(isNaN(v)?0:v)/t*n*100}),i=n*100,o=ee(a,function(v){return Math.floor(v)}),s=En(o,function(v,d){return v+d},0),l=ee(a,function(v,d){return v-o[d]});s<i;){for(var u=Number.NEGATIVE_INFINITY,c=null,f=0,h=l.length;f<h;++f)l[f]>u&&(u=l[f],c=f);++o[c],l[c]=0,++s}return ee(o,function(v){return v/n})}function UG(r,e){var t=Math.max(va(r),va(e)),n=r+e;return t>J2?n:At(n,t)}var P0=9007199254740991;function E0(r){var e=Math.PI*2;return(r%e+e)%e}function Vc(r){return r>-K2&&r<K2}var jG=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function Sn(r){if(r instanceof Date)return r;if(ce(r)){var e=jG.exec(r);if(!e)return new Date(NaN);if(e[8]){var t=+e[4]||0;return e[8].toUpperCase()!=="Z"&&(t-=+e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,t,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0))}else return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0)}else if(r==null)return new Date(NaN);return new Date(Math.round(r))}function rD(r){return Math.pow(10,ad(r))}function ad(r){if(r===0)return 0;var e=Math.floor(Math.log(r)/Math.LN10);return r/Math.pow(10,e)>=10&&e++,e}function O0(r,e){var t=ad(r),n=Math.pow(10,t),a=r/n,i;return e?a<1.5?i=1:a<2.5?i=2:a<4?i=3:a<7?i=5:i=10:a<1?i=1:a<2?i=2:a<3?i=3:a<5?i=5:i=10,r=i*n,t>=-20?+r.toFixed(t<0?-t:0):r}function id(r,e){var t=(r.length-1)*e+1,n=Math.floor(t),a=+r[n-1],i=t-n;return i?a+i*(r[n]-a):a}function R0(r){r.sort(function(l,u){return s(l,u,0)?-1:1});for(var e=-1/0,t=1,n=0;n<r.length;){for(var a=r[n].interval,i=r[n].close,o=0;o<2;o++)a[o]<=e&&(a[o]=e,i[o]=o?1:1-t),e=a[o],t=i[o];a[0]===a[1]&&i[0]*i[1]!==1?r.splice(n,1):n++}return r;function s(l,u,c){return l.interval[c]<u.interval[c]||l.interval[c]===u.interval[c]&&(l.close[c]-u.close[c]===(c?-1:1)||!c&&s(l,u,1))}}function Na(r){var e=parseFloat(r);return e==r&&(e!==0||!ce(r)||r.indexOf("x")<=0)?e:NaN}function N0(r){return!isNaN(Na(r))}function nD(){return Math.round(Math.random()*9)}function aD(r,e){return e===0?r:aD(e,r%e)}function iD(r,e){return r==null?e:e==null?r:r*e/aD(r,e)}var YG="[ECharts] ",oD={},qG=typeof console!="undefined"&&console.warn&&console.log;function ZG(r,e,t){if(qG){if(t){if(oD[e])return;oD[e]=!0}console[r](YG+e)}}function Cde(r,e){ZG("warn",r,e)}function nt(r){throw new Error(r)}function sD(r,e,t){return(e-r)*t+r}var lD="series\0",uD="\0_ec_\0";function ct(r){return r instanceof Array?r:r==null?[]:[r]}function rs(r,e,t){if(r){r[e]=r[e]||{},r.emphasis=r.emphasis||{},r.emphasis[e]=r.emphasis[e]||{};for(var n=0,a=t.length;n<a;n++){var i=t[n];!r.emphasis[e].hasOwnProperty(i)&&r[e].hasOwnProperty(i)&&(r.emphasis[e][i]=r[e][i])}}}var cD=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"];function Hl(r){return _e(r)&&!J(r)&&!(r instanceof Date)?r.value:r}function XG(r){return _e(r)&&!(r instanceof Array)}function fD(r,e,t){var n=t==="normalMerge",a=t==="replaceMerge",i=t==="replaceAll";r=r||[],e=(e||[]).slice();var o=ge();L(e,function(l,u){if(!_e(l)){e[u]=null;return}});var s=QG(r,o,t);return(n||a)&&KG(s,r,o,e),n&&JG(s,e),n||a?e8(s,e,a):i&&t8(s,e),r8(s),s}function QG(r,e,t){var n=[];if(t==="replaceAll")return n;for(var a=0;a<r.length;a++){var i=r[a];i&&i.id!=null&&e.set(i.id,a),n.push({existing:t==="replaceMerge"||Hc(i)?null:i,newOption:null,keyInfo:null,brandNew:null})}return n}function KG(r,e,t,n){L(n,function(a,i){if(!(!a||a.id==null)){var o=$c(a.id),s=t.get(o);if(s!=null){var l=r[s];Ar(!l.newOption,'Duplicated option on id "'+o+'".'),l.newOption=a,l.existing=e[s],n[i]=null}}})}function JG(r,e){L(e,function(t,n){if(!(!t||t.name==null))for(var a=0;a<r.length;a++){var i=r[a].existing;if(!r[a].newOption&&i&&(i.id==null||t.id==null)&&!Hc(t)&&!Hc(i)&&hD("name",i,t)){r[a].newOption=t,e[n]=null;return}}})}function e8(r,e,t){L(e,function(n){if(!!n){for(var a,i=0;(a=r[i])&&(a.newOption||Hc(a.existing)||a.existing&&n.id!=null&&!hD("id",n,a.existing));)i++;a?(a.newOption=n,a.brandNew=t):r.push({newOption:n,brandNew:t,existing:null,keyInfo:null}),i++}})}function t8(r,e){L(e,function(t){r.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})}function r8(r){var e=ge();L(r,function(t){var n=t.existing;n&&e.set(n.id,t)}),L(r,function(t){var n=t.newOption;Ar(!n||n.id==null||!e.get(n.id)||e.get(n.id)===t,"id duplicates: "+(n&&n.id)),n&&n.id!=null&&e.set(n.id,t),!t.keyInfo&&(t.keyInfo={})}),L(r,function(t,n){var a=t.existing,i=t.newOption,o=t.keyInfo;if(!!_e(i)){if(o.name=i.name!=null?$c(i.name):a?a.name:lD+n,a)o.id=$c(a.id);else if(i.id!=null)o.id=$c(i.id);else{var s=0;do o.id="\0"+o.name+"\0"+s++;while(e.get(o.id))}e.set(o.id,t)}})}function hD(r,e,t){var n=Xt(e[r],null),a=Xt(t[r],null);return n!=null&&a!=null&&n===a}function $c(r){return Xt(r,"")}function Xt(r,e){return r==null?e:ce(r)?r:Ye(r)||Av(r)?r+"":e}function k0(r){var e=r.name;return!!(e&&e.indexOf(lD))}function Hc(r){return r&&r.id!=null&&$c(r.id).indexOf(uD)===0}function n8(r){return uD+r}function a8(r,e,t){L(r,function(n){var a=n.newOption;_e(a)&&(n.keyInfo.mainType=e,n.keyInfo.subType=i8(e,a,n.existing,t))})}function i8(r,e,t,n){var a=e.type?e.type:t?t.subType:n.determineSubType(r,e);return a}function o8(r,e){var t={},n={};return a(r||[],t),a(e||[],n,t),[i(t),i(n)];function a(o,s,l){for(var u=0,c=o.length;u<c;u++){var f=Xt(o[u].seriesId,null);if(f==null)return;for(var h=ct(o[u].dataIndex),v=l&&l[f],d=0,p=h.length;d<p;d++){var g=h[d];v&&v[g]?v[g]=null:(s[f]||(s[f]={}))[g]=1}}}function i(o,s){var l=[];for(var u in o)if(o.hasOwnProperty(u)&&o[u]!=null)if(s)l.push(+u);else{var c=i(o[u],!0);c.length&&l.push({seriesId:u,dataIndex:c})}return l}}function ns(r,e){if(e.dataIndexInside!=null)return e.dataIndexInside;if(e.dataIndex!=null)return J(e.dataIndex)?ee(e.dataIndex,function(t){return r.indexOfRawIndex(t)}):r.indexOfRawIndex(e.dataIndex);if(e.name!=null)return J(e.name)?ee(e.name,function(t){return r.indexOfName(t)}):r.indexOfName(e.name)}function qe(){var r="__ec_inner_"+s8++;return function(e){return e[r]||(e[r]={})}}var s8=nD();function Gc(r,e,t){var n=z0(e,t),a=n.mainTypeSpecified,i=n.queryOptionMap,o=n.others,s=o,l=t?t.defaultMainType:null;return!a&&l&&i.set(l,{}),i.each(function(u,c){var f=Wc(r,c,u,{useDefault:l===c,enableAll:t&&t.enableAll!=null?t.enableAll:!0,enableNone:t&&t.enableNone!=null?t.enableNone:!0});s[c+"Models"]=f.models,s[c+"Model"]=f.models[0]}),s}function z0(r,e){var t;if(ce(r)){var n={};n[r+"Index"]=0,t=n}else t=r;var a=ge(),i={},o=!1;return L(t,function(s,l){if(l==="dataIndex"||l==="dataIndexInside"){i[l]=s;return}var u=l.match(/^(\w+)(Index|Id|Name)$/)||[],c=u[1],f=(u[2]||"").toLowerCase();if(!(!c||!f||e&&e.includeMainTypes&&Ne(e.includeMainTypes,c)<0)){o=o||!!c;var h=a.get(c)||a.set(c,{});h[f]=s}}),{mainTypeSpecified:o,queryOptionMap:a,others:i}}var Wt={useDefault:!0,enableAll:!1,enableNone:!1},l8={useDefault:!1,enableAll:!0,enableNone:!0};function Wc(r,e,t,n){n=n||Wt;var a=t.index,i=t.id,o=t.name,s={models:null,specified:a!=null||i!=null||o!=null};if(!s.specified){var l=void 0;return s.models=n.useDefault&&(l=r.getComponent(e))?[l]:[],s}return a==="none"||a===!1?(Ar(n.enableNone,'`"none"` or `false` is not a valid value on index option.'),s.models=[],s):(a==="all"&&(Ar(n.enableAll,'`"all"` is not a valid value on index option.'),a=i=o=null),s.models=r.queryComponents({mainType:e,index:a,id:i,name:o}),s)}function vD(r,e,t){r.setAttribute?r.setAttribute(e,t):r[e]=t}function u8(r,e){return r.getAttribute?r.getAttribute(e):r[e]}function c8(r){return r==="auto"?je.domSupported?"html":"richText":r||"html"}function B0(r,e){var t=ge(),n=[];return L(r,function(a){var i=e(a);(t.get(i)||(n.push(i),t.set(i,[]))).push(a)}),{keys:n,buckets:t}}function dD(r,e,t,n,a){var i=e==null||e==="auto";if(n==null)return n;if(Ye(n)){var o=sD(t||0,n,a);return At(o,i?Math.max(va(t||0),va(n)):e)}else{if(ce(n))return a<1?t:n;for(var s=[],l=t,u=n,c=Math.max(l?l.length:0,u.length),f=0;f<c;++f){var h=r.getDimensionInfo(f);if(h&&h.type==="ordinal")s[f]=(a<1&&l?l:u)[f];else{var v=l&&l[f]?l[f]:0,d=u[f],o=sD(v,d,a);s[f]=At(o,i?Math.max(va(v),va(d)):e)}}return s}}var f8=".",as="___EC__COMPONENT__CONTAINER___",pD="___EC__EXTENDED_CLASS___";function ka(r){var e={main:"",sub:""};if(r){var t=r.split(f8);e.main=t[0]||"",e.sub=t[1]||""}return e}function h8(r){Ar(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(r),'componentType "'+r+'" illegal')}function v8(r){return!!(r&&r[pD])}function F0(r,e){r.$constructor=r,r.extend=function(t){var n=this,a;return d8(n)?a=function(i){j(o,i);function o(){return i.apply(this,arguments)||this}return o}(n):(a=function(){(t.$constructor||n).apply(this,arguments)},Rm(a,this)),Q(a.prototype,t),a[pD]=!0,a.extend=this.extend,a.superCall=y8,a.superApply=m8,a.superClass=n,a}}function d8(r){return ye(r)&&/^class\s/.test(Function.prototype.toString.call(r))}function gD(r,e){r.extend=e.extend}var p8=Math.round(Math.random()*10);function g8(r){var e=["__\0is_clz",p8++].join("_");r.prototype[e]=!0,r.isInstance=function(t){return!!(t&&t[e])}}function y8(r,e){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];return this.superClass.prototype[e].apply(r,t)}function m8(r,e,t){return this.superClass.prototype[e].apply(r,t)}function od(r){var e={};r.registerClass=function(n){var a=n.type||n.prototype.type;if(a){h8(a),n.prototype.type=a;var i=ka(a);if(!i.sub)e[i.main]=n;else if(i.sub!==as){var o=t(i);o[i.sub]=n}}return n},r.getClass=function(n,a,i){var o=e[n];if(o&&o[as]&&(o=a?o[a]:null),i&&!o)throw new Error(a?"Component "+n+"."+(a||"")+" is used but not imported.":n+".type should be specified.");return o},r.getClassesByMainType=function(n){var a=ka(n),i=[],o=e[a.main];return o&&o[as]?L(o,function(s,l){l!==as&&i.push(s)}):i.push(o),i},r.hasClass=function(n){var a=ka(n);return!!e[a.main]},r.getAllClassMainTypes=function(){var n=[];return L(e,function(a,i){n.push(i)}),n},r.hasSubTypes=function(n){var a=ka(n),i=e[a.main];return i&&i[as]};function t(n){var a=e[n.main];return(!a||!a[as])&&(a=e[n.main]={},a[as]=!0),a}}function is(r,e){for(var t=0;t<r.length;t++)r[t][1]||(r[t][1]=r[t][0]);return e=e||!1,function(n,a,i){for(var o={},s=0;s<r.length;s++){var l=r[s][1];if(!(a&&Ne(a,l)>=0||i&&Ne(i,l)<0)){var u=n.getShallow(l,e);u!=null&&(o[r[s][0]]=u)}}return o}}var _8=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],b8=is(_8),x8=function(){function r(){}return r.prototype.getAreaStyle=function(e,t){return b8(this,e,t)},r}(),V0=new Lc(50);function w8(r){if(typeof r=="string"){var e=V0.get(r);return e&&e.image}else return r}function $0(r,e,t,n,a){if(r)if(typeof r=="string"){if(e&&e.__zrImageSrc===r||!t)return e;var i=V0.get(r),o={hostEl:t,cb:n,cbPayload:a};return i?(e=i.image,!sd(e)&&i.pending.push(o)):(e=sa.loadImage(r,yD,yD),e.__zrImageSrc=r,V0.put(r,e.__cachedImgObj={image:e,pending:[o]})),e}else return r;else return e}function yD(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<r.pending.length;e++){var t=r.pending[e],n=t.cb;n&&n(this,t.cbPayload),t.hostEl.dirty()}r.pending.length=0}function sd(r){return r&&r.width&&r.height}var H0=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function mD(r,e,t,n,a){if(!e)return"";var i=(r+"").split(`
207
- `);a=_D(e,t,n,a);for(var o=0,s=i.length;o<s;o++)i[o]=bD(i[o],a);return i.join(`
208
- `)}function _D(r,e,t,n){n=n||{};var a=Q({},n);a.font=e,t=Pe(t,"..."),a.maxIterations=Pe(n.maxIterations,2);var i=a.minChar=Pe(n.minChar,0);a.cnCharWidth=xn("\u56FD",e);var o=a.ascCharWidth=xn("a",e);a.placeholder=Pe(n.placeholder,"");for(var s=r=Math.max(0,r-1),l=0;l<i&&s>=o;l++)s-=o;var u=xn(t,e);return u>s&&(t="",u=0),s=r-u,a.ellipsis=t,a.ellipsisWidth=u,a.contentWidth=s,a.containerWidth=r,a}function bD(r,e){var t=e.containerWidth,n=e.font,a=e.contentWidth;if(!t)return"";var i=xn(r,n);if(i<=t)return r;for(var o=0;;o++){if(i<=a||o>=e.maxIterations){r+=e.ellipsis;break}var s=o===0?S8(r,a,e.ascCharWidth,e.cnCharWidth):i>0?Math.floor(r.length*a/i):0;r=r.substr(0,s),i=xn(r,n)}return r===""&&(r=e.placeholder),r}function S8(r,e,t,n){for(var a=0,i=0,o=r.length;i<o&&a<e;i++){var s=r.charCodeAt(i);a+=0<=s&&s<=127?t:n}return i}function C8(r,e){r!=null&&(r+="");var t=e.overflow,n=e.padding,a=e.font,i=t==="truncate",o=td(a),s=Pe(e.lineHeight,o),l=!!e.backgroundColor,u=e.lineOverflow==="truncate",c=e.width,f;c!=null&&(t==="break"||t==="breakAll")?f=r?wD(r,e.font,c,t==="breakAll",0).lines:[]:f=r?r.split(`
209
- `):[];var h=f.length*s,v=Pe(e.height,h);if(h>v&&u){var d=Math.floor(v/s);f=f.slice(0,d)}if(r&&i&&c!=null)for(var p=_D(c,a,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),g=0;g<f.length;g++)f[g]=bD(f[g],p);for(var y=v,m=0,g=0;g<f.length;g++)m=Math.max(xn(f[g],a),m);c==null&&(c=m);var _=m;return n&&(y+=n[0]+n[2],_+=n[1]+n[3],c+=n[1]+n[3]),l&&(_=c),{lines:f,height:v,outerWidth:_,outerHeight:y,lineHeight:s,calculatedLineHeight:o,contentWidth:m,contentHeight:h,width:c}}var T8=function(){function r(){}return r}(),xD=function(){function r(e){this.tokens=[],e&&(this.tokens=e)}return r}(),D8=function(){function r(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[]}return r}();function M8(r,e){var t=new D8;if(r!=null&&(r+=""),!r)return t;for(var n=e.width,a=e.height,i=e.overflow,o=(i==="break"||i==="breakAll")&&n!=null?{width:n,accumWidth:0,breakAll:i==="breakAll"}:null,s=H0.lastIndex=0,l;(l=H0.exec(r))!=null;){var u=l.index;u>s&&G0(t,r.substring(s,u),e,o),G0(t,l[2],e,o,l[1]),s=H0.lastIndex}s<r.length&&G0(t,r.substring(s,r.length),e,o);var c=[],f=0,h=0,v=e.padding,d=i==="truncate",p=e.lineOverflow==="truncate";function g($,U,q){$.width=U,$.lineHeight=q,f+=q,h=Math.max(h,U)}e:for(var y=0;y<t.lines.length;y++){for(var m=t.lines[y],_=0,b=0,w=0;w<m.tokens.length;w++){var x=m.tokens[w],S=x.styleName&&e.rich[x.styleName]||{},T=x.textPadding=S.padding,D=T?T[1]+T[3]:0,M=x.font=S.font||e.font;x.contentHeight=td(M);var A=Pe(S.height,x.contentHeight);if(x.innerHeight=A,T&&(A+=T[0]+T[2]),x.height=A,x.lineHeight=Ia(S.lineHeight,e.lineHeight,A),x.align=S&&S.align||e.align,x.verticalAlign=S&&S.verticalAlign||"middle",p&&a!=null&&f+x.lineHeight>a){w>0?(m.tokens=m.tokens.slice(0,w),g(m,b,_),t.lines=t.lines.slice(0,y+1)):t.lines=t.lines.slice(0,y);break e}var I=S.width,P=I==null||I==="auto";if(typeof I=="string"&&I.charAt(I.length-1)==="%")x.percentWidth=I,c.push(x),x.contentWidth=xn(x.text,M);else{if(P){var E=S.backgroundColor,O=E&&E.image;O&&(O=w8(O),sd(O)&&(x.width=Math.max(x.width,O.width*A/O.height)))}var N=d&&n!=null?n-b:null;N!=null&&N<x.width?!P||N<D?(x.text="",x.width=x.contentWidth=0):(x.text=mD(x.text,N-D,M,e.ellipsis,{minChar:e.truncateMinChar}),x.width=x.contentWidth=xn(x.text,M)):x.contentWidth=xn(x.text,M)}x.width+=D,b+=x.width,S&&(_=Math.max(_,x.lineHeight))}g(m,b,_)}t.outerWidth=t.width=Pe(n,h),t.outerHeight=t.height=Pe(a,f),t.contentHeight=f,t.contentWidth=h,v&&(t.outerWidth+=v[1]+v[3],t.outerHeight+=v[0]+v[2]);for(var y=0;y<c.length;y++){var x=c[y],V=x.percentWidth;x.width=parseInt(V,10)/100*t.width}return t}function G0(r,e,t,n,a){var i=e==="",o=a&&t.rich[a]||{},s=r.lines,l=o.font||t.font,u=!1,c,f;if(n){var h=o.padding,v=h?h[1]+h[3]:0;if(o.width!=null&&o.width!=="auto"){var d=ha(o.width,n.width)+v;s.length>0&&d+n.accumWidth>n.width&&(c=e.split(`
210
- `),u=!0),n.accumWidth=d}else{var p=wD(e,l,n.width,n.breakAll,n.accumWidth);n.accumWidth=p.accumWidth+v,f=p.linesWidths,c=p.lines}}else c=e.split(`
211
- `);for(var g=0;g<c.length;g++){var y=c[g],m=new T8;if(m.styleName=a,m.text=y,m.isLineHolder=!y&&!i,typeof o.width=="number"?m.width=o.width:m.width=f?f[g]:xn(y,l),!g&&!u){var _=(s[s.length-1]||(s[0]=new xD)).tokens,b=_.length;b===1&&_[0].isLineHolder?_[0]=m:(y||!b||i)&&_.push(m)}else s.push(new xD([m]))}}function A8(r){var e=r.charCodeAt(0);return e>=33&&e<=383}var L8=En(",&?/;] ".split(""),function(r,e){return r[e]=!0,r},{});function I8(r){return A8(r)?!!L8[r]:!0}function wD(r,e,t,n,a){for(var i=[],o=[],s="",l="",u=0,c=0,f=0;f<r.length;f++){var h=r.charAt(f);if(h===`
212
- `){l&&(s+=l,c+=u),i.push(s),o.push(c),s="",l="",u=0,c=0;continue}var v=xn(h,e),d=n?!1:!I8(h);if(i.length?c+v>t:a+c+v>t){c?(s||l)&&(d?(s||(s=l,l="",u=0,c=u),i.push(s),o.push(c-u),l+=h,u+=v,s="",c=u):(l&&(s+=l,l="",u=0),i.push(s),o.push(c),s=h,c=v)):d?(i.push(l),o.push(u),l=h,u=v):(i.push(h),o.push(v));continue}c+=v,d?(l+=h,u+=v):(l&&(s+=l,l="",u=0),s+=h)}return!i.length&&!s&&(s=r,l="",u=0),l&&(s+=l),s&&(i.push(s),o.push(c)),i.length===1&&(c+=a),{accumWidth:c,lines:i,linesWidths:o}}var W0="__zr_style_"+Math.round(Math.random()*10),os={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},ld={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};os[W0]=!0;var SD=["z","z2","invisible"],P8=["invisible"],E8=function(r){bt(e,r);function e(t){return r.call(this,t)||this}return e.prototype._init=function(t){for(var n=Fe(t),a=0;a<n.length;a++){var i=n[a];i==="style"?this.useStyle(t[i]):r.prototype.attrKV.call(this,i,t[i])}this.style||this.useStyle({})},e.prototype.beforeBrush=function(){},e.prototype.afterBrush=function(){},e.prototype.innerBeforeBrush=function(){},e.prototype.innerAfterBrush=function(){},e.prototype.shouldBePainted=function(t,n,a,i){var o=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&O8(this,t,n)||o&&!o[0]&&!o[3])return!1;if(a&&this.__clipPaths){for(var s=0;s<this.__clipPaths.length;++s)if(this.__clipPaths[s].isZeroArea())return!1}if(i&&this.parent)for(var l=this.parent;l;){if(l.ignore)return!1;l=l.parent}return!0},e.prototype.contain=function(t,n){return this.rectContain(t,n)},e.prototype.traverse=function(t,n){t.call(n,this)},e.prototype.rectContain=function(t,n){var a=this.transformCoordToLocal(t,n),i=this.getBoundingRect();return i.contain(a[0],a[1])},e.prototype.getPaintRect=function(){var t=this._paintRect;if(!this._paintRect||this.__dirty){var n=this.transform,a=this.getBoundingRect(),i=this.style,o=i.shadowBlur||0,s=i.shadowOffsetX||0,l=i.shadowOffsetY||0;t=this._paintRect||(this._paintRect=new Oe(0,0,0,0)),n?Oe.applyTransform(t,a,n):t.copy(a),(o||s||l)&&(t.width+=o*2+Math.abs(s),t.height+=o*2+Math.abs(l),t.x=Math.min(t.x,t.x+s-o),t.y=Math.min(t.y,t.y+l-o));var u=this.dirtyRectTolerance;t.isZero()||(t.x=Math.floor(t.x-u),t.y=Math.floor(t.y-u),t.width=Math.ceil(t.width+1+u*2),t.height=Math.ceil(t.height+1+u*2))}return t},e.prototype.setPrevPaintRect=function(t){t?(this._prevPaintRect=this._prevPaintRect||new Oe(0,0,0,0),this._prevPaintRect.copy(t)):this._prevPaintRect=null},e.prototype.getPrevPaintRect=function(){return this._prevPaintRect},e.prototype.animateStyle=function(t){return this.animate("style",t)},e.prototype.updateDuringAnimation=function(t){t==="style"?this.dirtyStyle():this.markRedraw()},e.prototype.attrKV=function(t,n){t!=="style"?r.prototype.attrKV.call(this,t,n):this.style?this.setStyle(n):this.useStyle(n)},e.prototype.setStyle=function(t,n){return typeof t=="string"?this.style[t]=n:Q(this.style,t),this.dirtyStyle(),this},e.prototype.dirtyStyle=function(t){t||this.markRedraw(),this.__dirty|=Mc,this._rect&&(this._rect=null)},e.prototype.dirty=function(){this.dirtyStyle()},e.prototype.styleChanged=function(){return!!(this.__dirty&Mc)},e.prototype.styleUpdated=function(){this.__dirty&=~Mc},e.prototype.createStyle=function(t){return yc(os,t)},e.prototype.useStyle=function(t){t[W0]||(t=this.createStyle(t)),this.__inHover?this.__hoverStyle=t:this.style=t,this.dirtyStyle()},e.prototype.isStyleObject=function(t){return t[W0]},e.prototype._innerSaveToNormal=function(t){r.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.style&&!n.style&&(n.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(t,n,SD)},e.prototype._applyStateObj=function(t,n,a,i,o,s){r.prototype._applyStateObj.call(this,t,n,a,i,o,s);var l=!(n&&i),u;if(n&&n.style?o?i?u=n.style:(u=this._mergeStyle(this.createStyle(),a.style),this._mergeStyle(u,n.style)):(u=this._mergeStyle(this.createStyle(),i?this.style:a.style),this._mergeStyle(u,n.style)):l&&(u=a.style),u)if(o){var c=this.style;if(this.style=this.createStyle(l?{}:c),l)for(var f=Fe(c),h=0;h<f.length;h++){var v=f[h];v in u&&(u[v]=u[v],this.style[v]=c[v])}for(var d=Fe(u),h=0;h<d.length;h++){var v=d[h];this.style[v]=this.style[v]}this._transitionState(t,{style:u},s,this.getAnimationStyleProps())}else this.useStyle(u);for(var p=this.__inHover?P8:SD,h=0;h<p.length;h++){var v=p[h];n&&n[v]!=null?this[v]=n[v]:l&&a[v]!=null&&(this[v]=a[v])}},e.prototype._mergeStates=function(t){for(var n=r.prototype._mergeStates.call(this,t),a,i=0;i<t.length;i++){var o=t[i];o.style&&(a=a||{},this._mergeStyle(a,o.style))}return a&&(n.style=a),n},e.prototype._mergeStyle=function(t,n){return Q(t,n),t},e.prototype.getAnimationStyleProps=function(){return ld},e.initDefaultProps=function(){var t=e.prototype;t.type="displayable",t.invisible=!1,t.z=0,t.z2=0,t.zlevel=0,t.culling=!1,t.cursor="pointer",t.rectHover=!1,t.incremental=!1,t._rect=null,t.dirtyRectTolerance=0,t.__dirty=bn|Mc}(),e}(Z2),U0=new Oe(0,0,0,0),j0=new Oe(0,0,0,0);function O8(r,e,t){return U0.copy(r.getBoundingRect()),r.transform&&U0.applyTransform(r.transform),j0.width=e,j0.height=t,!U0.intersect(j0)}var Bn=E8,on=Math.min,sn=Math.max,Y0=Math.sin,q0=Math.cos,ss=Math.PI*2,ud=$i(),cd=$i(),fd=$i();function hd(r,e,t){if(r.length!==0){for(var n=r[0],a=n[0],i=n[0],o=n[1],s=n[1],l=1;l<r.length;l++)n=r[l],a=on(a,n[0]),i=sn(i,n[0]),o=on(o,n[1]),s=sn(s,n[1]);e[0]=a,e[1]=o,t[0]=i,t[1]=s}}function CD(r,e,t,n,a,i){a[0]=on(r,t),a[1]=on(e,n),i[0]=sn(r,t),i[1]=sn(e,n)}var TD=[],DD=[];function R8(r,e,t,n,a,i,o,s,l,u){var c=b2,f=er,h=c(r,t,a,o,TD);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var v=0;v<h;v++){var d=f(r,t,a,o,TD[v]);l[0]=on(d,l[0]),u[0]=sn(d,u[0])}h=c(e,n,i,s,DD);for(var v=0;v<h;v++){var p=f(e,n,i,s,DD[v]);l[1]=on(p,l[1]),u[1]=sn(p,u[1])}l[0]=on(r,l[0]),u[0]=sn(r,u[0]),l[0]=on(o,l[0]),u[0]=sn(o,u[0]),l[1]=on(e,l[1]),u[1]=sn(e,u[1]),l[1]=on(s,l[1]),u[1]=sn(s,u[1])}function N8(r,e,t,n,a,i,o,s){var l=w2,u=lr,c=sn(on(l(r,t,a),1),0),f=sn(on(l(e,n,i),1),0),h=u(r,t,a,c),v=u(e,n,i,f);o[0]=on(r,a,h),o[1]=on(e,i,v),s[0]=sn(r,a,h),s[1]=sn(e,i,v)}function k8(r,e,t,n,a,i,o,s,l){var u=ii,c=oi,f=Math.abs(a-i);if(f%ss<1e-4&&f>1e-4){s[0]=r-t,s[1]=e-n,l[0]=r+t,l[1]=e+n;return}if(ud[0]=q0(a)*t+r,ud[1]=Y0(a)*n+e,cd[0]=q0(i)*t+r,cd[1]=Y0(i)*n+e,u(s,ud,cd),c(l,ud,cd),a=a%ss,a<0&&(a=a+ss),i=i%ss,i<0&&(i=i+ss),a>i&&!o?i+=ss:a<i&&o&&(a+=ss),o){var h=i;i=a,a=h}for(var v=0;v<i;v+=Math.PI/2)v>a&&(fd[0]=q0(v)*t+r,fd[1]=Y0(v)*n+e,u(s,fd,s),c(l,fd,l))}var dt={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},ls=[],us=[],za=[],Xi=[],Ba=[],Fa=[],Z0=Math.min,X0=Math.max,cs=Math.cos,fs=Math.sin,ci=Math.abs,Q0=Math.PI,Qi=Q0*2,K0=typeof Float32Array!="undefined",Uc=[];function J0(r){var e=Math.round(r/Q0*1e8)/1e8;return e%2*Q0}function MD(r,e){var t=J0(r[0]);t<0&&(t+=Qi);var n=t-r[0],a=r[1];a+=n,!e&&a-t>=Qi?a=t+Qi:e&&t-a>=Qi?a=t-Qi:!e&&t>a?a=t+(Qi-J0(t-a)):e&&t<a&&(a=t-(Qi-J0(a-t))),r[0]=t,r[1]=a}var z8=function(){function r(e){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,e&&(this._saveData=!1),this._saveData&&(this.data=[])}return r.prototype.increaseVersion=function(){this._version++},r.prototype.getVersion=function(){return this._version},r.prototype.setScale=function(e,t,n){n=n||0,n>0&&(this._ux=ci(n/ed/e)||0,this._uy=ci(n/ed/t)||0)},r.prototype.setDPR=function(e){this.dpr=e},r.prototype.setContext=function(e){this._ctx=e},r.prototype.getContext=function(){return this._ctx},r.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},r.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},r.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(dt.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},r.prototype.lineTo=function(e,t){var n=ci(e-this._xi),a=ci(t-this._yi),i=n>this._ux||a>this._uy;if(this.addData(dt.L,e,t),this._ctx&&i&&this._ctx.lineTo(e,t),i)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var o=n*n+a*a;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=o)}return this},r.prototype.bezierCurveTo=function(e,t,n,a,i,o){return this._drawPendingPt(),this.addData(dt.C,e,t,n,a,i,o),this._ctx&&this._ctx.bezierCurveTo(e,t,n,a,i,o),this._xi=i,this._yi=o,this},r.prototype.quadraticCurveTo=function(e,t,n,a){return this._drawPendingPt(),this.addData(dt.Q,e,t,n,a),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,a),this._xi=n,this._yi=a,this},r.prototype.arc=function(e,t,n,a,i,o){this._drawPendingPt(),Uc[0]=a,Uc[1]=i,MD(Uc,o),a=Uc[0],i=Uc[1];var s=i-a;return this.addData(dt.A,e,t,n,n,a,s,0,o?0:1),this._ctx&&this._ctx.arc(e,t,n,a,i,o),this._xi=cs(i)*n+e,this._yi=fs(i)*n+t,this},r.prototype.arcTo=function(e,t,n,a,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,a,i),this},r.prototype.rect=function(e,t,n,a){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,a),this.addData(dt.R,e,t,n,a),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(dt.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},r.prototype.fill=function(e){e&&e.fill(),this.toStatic()},r.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},r.prototype.len=function(){return this._len},r.prototype.setData=function(e){var t=e.length;!(this.data&&this.data.length===t)&&K0&&(this.data=new Float32Array(t));for(var n=0;n<t;n++)this.data[n]=e[n];this._len=t},r.prototype.appendPath=function(e){e instanceof Array||(e=[e]);for(var t=e.length,n=0,a=this._len,i=0;i<t;i++)n+=e[i].len();K0&&this.data instanceof Float32Array&&(this.data=new Float32Array(a+n));for(var i=0;i<t;i++)for(var o=e[i].data,s=0;s<o.length;s++)this.data[a++]=o[s];this._len=a},r.prototype.addData=function(e,t,n,a,i,o,s,l,u){if(!!this._saveData){var c=this.data;this._len+arguments.length>c.length&&(this._expandData(),c=this.data);for(var f=0;f<arguments.length;f++)c[this._len++]=arguments[f]}},r.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},r.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t<this._len;t++)e[t]=this.data[t];this.data=e}},r.prototype.toStatic=function(){if(!!this._saveData){this._drawPendingPt();var e=this.data;e instanceof Array&&(e.length=this._len,K0&&this._len>11&&(this.data=new Float32Array(e)))}},r.prototype.getBoundingRect=function(){za[0]=za[1]=Ba[0]=Ba[1]=Number.MAX_VALUE,Xi[0]=Xi[1]=Fa[0]=Fa[1]=-Number.MAX_VALUE;var e=this.data,t=0,n=0,a=0,i=0,o;for(o=0;o<this._len;){var s=e[o++],l=o===1;switch(l&&(t=e[o],n=e[o+1],a=t,i=n),s){case dt.M:t=a=e[o++],n=i=e[o++],Ba[0]=a,Ba[1]=i,Fa[0]=a,Fa[1]=i;break;case dt.L:CD(t,n,e[o],e[o+1],Ba,Fa),t=e[o++],n=e[o++];break;case dt.C:R8(t,n,e[o++],e[o++],e[o++],e[o++],e[o],e[o+1],Ba,Fa),t=e[o++],n=e[o++];break;case dt.Q:N8(t,n,e[o++],e[o++],e[o],e[o+1],Ba,Fa),t=e[o++],n=e[o++];break;case dt.A:var u=e[o++],c=e[o++],f=e[o++],h=e[o++],v=e[o++],d=e[o++]+v;o+=1;var p=!e[o++];l&&(a=cs(v)*f+u,i=fs(v)*h+c),k8(u,c,f,h,v,d,p,Ba,Fa),t=cs(d)*f+u,n=fs(d)*h+c;break;case dt.R:a=t=e[o++],i=n=e[o++];var g=e[o++],y=e[o++];CD(a,i,a+g,i+y,Ba,Fa);break;case dt.Z:t=a,n=i;break}ii(za,za,Ba),oi(Xi,Xi,Fa)}return o===0&&(za[0]=za[1]=Xi[0]=Xi[1]=0),new Oe(za[0],za[1],Xi[0]-za[0],Xi[1]-za[1])},r.prototype._calculateLength=function(){var e=this.data,t=this._len,n=this._ux,a=this._uy,i=0,o=0,s=0,l=0;this._pathSegLen||(this._pathSegLen=[]);for(var u=this._pathSegLen,c=0,f=0,h=0;h<t;){var v=e[h++],d=h===1;d&&(i=e[h],o=e[h+1],s=i,l=o);var p=-1;switch(v){case dt.M:i=s=e[h++],o=l=e[h++];break;case dt.L:{var g=e[h++],y=e[h++],m=g-i,_=y-o;(ci(m)>n||ci(_)>a||h===t-1)&&(p=Math.sqrt(m*m+_*_),i=g,o=y);break}case dt.C:{var b=e[h++],w=e[h++],g=e[h++],y=e[h++],x=e[h++],S=e[h++];p=GH(i,o,b,w,g,y,x,S,10),i=x,o=S;break}case dt.Q:{var b=e[h++],w=e[h++],g=e[h++],y=e[h++];p=UH(i,o,b,w,g,y,10),i=g,o=y;break}case dt.A:var T=e[h++],D=e[h++],M=e[h++],A=e[h++],I=e[h++],P=e[h++],E=P+I;h+=1,e[h++],d&&(s=cs(I)*M+T,l=fs(I)*A+D),p=X0(M,A)*Z0(Qi,Math.abs(P)),i=cs(E)*M+T,o=fs(E)*A+D;break;case dt.R:{s=i=e[h++],l=o=e[h++];var O=e[h++],N=e[h++];p=O*2+N*2;break}case dt.Z:{var m=s-i,_=l-o;p=Math.sqrt(m*m+_*_),i=s,o=l;break}}p>=0&&(u[f++]=p,c+=p)}return this._pathLen=c,c},r.prototype.rebuildPath=function(e,t){var n=this.data,a=this._ux,i=this._uy,o=this._len,s,l,u,c,f,h,v=t<1,d,p,g=0,y=0,m,_=0,b,w;if(v&&(this._pathSegLen||this._calculateLength(),d=this._pathSegLen,p=this._pathLen,m=t*p,!m))return;e:for(var x=0;x<o;){var S=n[x++],T=x===1;switch(T&&(u=n[x],c=n[x+1],s=u,l=c),S!==dt.L&&_>0&&(e.lineTo(b,w),_=0),S){case dt.M:s=u=n[x++],l=c=n[x++],e.moveTo(u,c);break;case dt.L:{f=n[x++],h=n[x++];var D=ci(f-u),M=ci(h-c);if(D>a||M>i){if(v){var A=d[y++];if(g+A>m){var I=(m-g)/A;e.lineTo(u*(1-I)+f*I,c*(1-I)+h*I);break e}g+=A}e.lineTo(f,h),u=f,c=h,_=0}else{var P=D*D+M*M;P>_&&(b=f,w=h,_=P)}break}case dt.C:{var E=n[x++],O=n[x++],N=n[x++],V=n[x++],$=n[x++],U=n[x++];if(v){var A=d[y++];if(g+A>m){var I=(m-g)/A;Yi(u,E,N,$,I,ls),Yi(c,O,V,U,I,us),e.bezierCurveTo(ls[1],us[1],ls[2],us[2],ls[3],us[3]);break e}g+=A}e.bezierCurveTo(E,O,N,V,$,U),u=$,c=U;break}case dt.Q:{var E=n[x++],O=n[x++],N=n[x++],V=n[x++];if(v){var A=d[y++];if(g+A>m){var I=(m-g)/A;Ac(u,E,N,I,ls),Ac(c,O,V,I,us),e.quadraticCurveTo(ls[1],us[1],ls[2],us[2]);break e}g+=A}e.quadraticCurveTo(E,O,N,V),u=N,c=V;break}case dt.A:var q=n[x++],te=n[x++],H=n[x++],Y=n[x++],X=n[x++],Z=n[x++],ie=n[x++],se=!n[x++],ne=H>Y?H:Y,ve=ci(H-Y)>.001,R=X+Z,F=!1;if(v){var A=d[y++];g+A>m&&(R=X+Z*(m-g)/A,F=!0),g+=A}if(ve&&e.ellipse?e.ellipse(q,te,H,Y,ie,X,R,se):e.arc(q,te,ne,X,R,se),F)break e;T&&(s=cs(X)*H+q,l=fs(X)*Y+te),u=cs(R)*H+q,c=fs(R)*Y+te;break;case dt.R:s=u=n[x],l=c=n[x+1],f=n[x++],h=n[x++];var G=n[x++],ae=n[x++];if(v){var A=d[y++];if(g+A>m){var re=m-g;e.moveTo(f,h),e.lineTo(f+Z0(re,G),h),re-=G,re>0&&e.lineTo(f+G,h+Z0(re,ae)),re-=ae,re>0&&e.lineTo(f+X0(G-re,0),h+ae),re-=G,re>0&&e.lineTo(f,h+X0(ae-re,0));break e}g+=A}e.rect(f,h,G,ae);break;case dt.Z:if(v){var A=d[y++];if(g+A>m){var I=(m-g)/A;e.lineTo(u*(1-I)+s*I,c*(1-I)+l*I);break e}g+=A}e.closePath(),u=s,c=l}}},r.prototype.clone=function(){var e=new r,t=this.data;return e.data=t.slice?t.slice():Array.prototype.slice.call(t),e._len=this._len,e},r.CMD=dt,r.initDefaultProps=function(){var e=r.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),r}(),Va=z8;function Ki(r,e,t,n,a,i,o){if(a===0)return!1;var s=a,l=0,u=r;if(o>e+s&&o>n+s||o<e-s&&o<n-s||i>r+s&&i>t+s||i<r-s&&i<t-s)return!1;if(r!==t)l=(e-n)/(r-t),u=(r*n-t*e)/(r-t);else return Math.abs(i-r)<=s/2;var c=l*i-o+u,f=c*c/(l*l+1);return f<=s/2*s/2}function B8(r,e,t,n,a,i,o,s,l,u,c){if(l===0)return!1;var f=l;if(c>e+f&&c>n+f&&c>i+f&&c>s+f||c<e-f&&c<n-f&&c<i-f&&c<s-f||u>r+f&&u>t+f&&u>a+f&&u>o+f||u<r-f&&u<t-f&&u<a-f&&u<o-f)return!1;var h=x2(r,e,t,n,a,i,o,s,u,c,null);return h<=f/2}function AD(r,e,t,n,a,i,o,s,l){if(o===0)return!1;var u=o;if(l>e+u&&l>n+u&&l>i+u||l<e-u&&l<n-u&&l<i-u||s>r+u&&s>t+u&&s>a+u||s<r-u&&s<t-u&&s<a-u)return!1;var c=S2(r,e,t,n,a,i,s,l,null);return c<=u/2}var LD=Math.PI*2;function Ji(r){return r%=LD,r<0&&(r+=LD),r}var jc=Math.PI*2;function F8(r,e,t,n,a,i,o,s,l){if(o===0)return!1;var u=o;s-=r,l-=e;var c=Math.sqrt(s*s+l*l);if(c-u>t||c+u<t)return!1;if(Math.abs(n-a)%jc<1e-4)return!0;if(i){var f=n;n=Ji(a),a=Ji(f)}else n=Ji(n),a=Ji(a);n>a&&(a+=jc);var h=Math.atan2(l,s);return h<0&&(h+=jc),h>=n&&h<=a||h+jc>=n&&h+jc<=a}function fi(r,e,t,n,a,i){if(i>e&&i>n||i<e&&i<n||n===e)return 0;var o=(i-e)/(n-e),s=n<e?1:-1;(o===1||o===0)&&(s=n<e?.5:-.5);var l=o*(t-r)+r;return l===a?1/0:l>a?s:0}var eo=Va.CMD,hs=Math.PI*2,V8=1e-4;function $8(r,e){return Math.abs(r-e)<V8}var Hr=[-1,-1,-1],Fn=[-1,-1];function H8(){var r=Fn[0];Fn[0]=Fn[1],Fn[1]=r}function G8(r,e,t,n,a,i,o,s,l,u){if(u>e&&u>n&&u>i&&u>s||u<e&&u<n&&u<i&&u<s)return 0;var c=Hv(e,n,i,s,u,Hr);if(c===0)return 0;for(var f=0,h=-1,v=void 0,d=void 0,p=0;p<c;p++){var g=Hr[p],y=g===0||g===1?.5:1,m=er(r,t,a,o,g);m<l||(h<0&&(h=b2(e,n,i,s,Fn),Fn[1]<Fn[0]&&h>1&&H8(),v=er(e,n,i,s,Fn[0]),h>1&&(d=er(e,n,i,s,Fn[1]))),h===2?g<Fn[0]?f+=v<e?y:-y:g<Fn[1]?f+=d<v?y:-y:f+=s<d?y:-y:g<Fn[0]?f+=v<e?y:-y:f+=s<v?y:-y)}return f}function W8(r,e,t,n,a,i,o,s){if(s>e&&s>n&&s>i||s<e&&s<n&&s<i)return 0;var l=WH(e,n,i,s,Hr);if(l===0)return 0;var u=w2(e,n,i);if(u>=0&&u<=1){for(var c=0,f=lr(e,n,i,u),h=0;h<l;h++){var v=Hr[h]===0||Hr[h]===1?.5:1,d=lr(r,t,a,Hr[h]);d<o||(Hr[h]<u?c+=f<e?v:-v:c+=i<f?v:-v)}return c}else{var v=Hr[0]===0||Hr[0]===1?.5:1,d=lr(r,t,a,Hr[0]);return d<o?0:i<e?v:-v}}function U8(r,e,t,n,a,i,o,s){if(s-=e,s>t||s<-t)return 0;var l=Math.sqrt(t*t-s*s);Hr[0]=-l,Hr[1]=l;var u=Math.abs(n-a);if(u<1e-4)return 0;if(u>=hs-1e-4){n=0,a=hs;var c=i?1:-1;return o>=Hr[0]+r&&o<=Hr[1]+r?c:0}if(n>a){var f=n;n=a,a=f}n<0&&(n+=hs,a+=hs);for(var h=0,v=0;v<2;v++){var d=Hr[v];if(d+r>o){var p=Math.atan2(s,d),c=i?1:-1;p<0&&(p=hs+p),(p>=n&&p<=a||p+hs>=n&&p+hs<=a)&&(p>Math.PI/2&&p<Math.PI*1.5&&(c=-c),h+=c)}}return h}function ID(r,e,t,n,a){for(var i=r.data,o=r.len(),s=0,l=0,u=0,c=0,f=0,h,v,d=0;d<o;){var p=i[d++],g=d===1;switch(p===eo.M&&d>1&&(t||(s+=fi(l,u,c,f,n,a))),g&&(l=i[d],u=i[d+1],c=l,f=u),p){case eo.M:c=i[d++],f=i[d++],l=c,u=f;break;case eo.L:if(t){if(Ki(l,u,i[d],i[d+1],e,n,a))return!0}else s+=fi(l,u,i[d],i[d+1],n,a)||0;l=i[d++],u=i[d++];break;case eo.C:if(t){if(B8(l,u,i[d++],i[d++],i[d++],i[d++],i[d],i[d+1],e,n,a))return!0}else s+=G8(l,u,i[d++],i[d++],i[d++],i[d++],i[d],i[d+1],n,a)||0;l=i[d++],u=i[d++];break;case eo.Q:if(t){if(AD(l,u,i[d++],i[d++],i[d],i[d+1],e,n,a))return!0}else s+=W8(l,u,i[d++],i[d++],i[d],i[d+1],n,a)||0;l=i[d++],u=i[d++];break;case eo.A:var y=i[d++],m=i[d++],_=i[d++],b=i[d++],w=i[d++],x=i[d++];d+=1;var S=!!(1-i[d++]);h=Math.cos(w)*_+y,v=Math.sin(w)*b+m,g?(c=h,f=v):s+=fi(l,u,h,v,n,a);var T=(n-y)*b/_+y;if(t){if(F8(y,m,b,w,w+x,S,e,T,a))return!0}else s+=U8(y,m,b,w,w+x,S,T,a);l=Math.cos(w+x)*_+y,u=Math.sin(w+x)*b+m;break;case eo.R:c=l=i[d++],f=u=i[d++];var D=i[d++],M=i[d++];if(h=c+D,v=f+M,t){if(Ki(c,f,h,f,e,n,a)||Ki(h,f,h,v,e,n,a)||Ki(h,v,c,v,e,n,a)||Ki(c,v,c,f,e,n,a))return!0}else s+=fi(h,f,h,v,n,a),s+=fi(c,v,c,f,n,a);break;case eo.Z:if(t){if(Ki(l,u,c,f,e,n,a))return!0}else s+=fi(l,u,c,f,n,a);l=c,u=f;break}}return!t&&!$8(u,f)&&(s+=fi(l,u,c,f,n,a)||0),s!==0}function j8(r,e,t){return ID(r,0,!1,e,t)}function Y8(r,e,t,n){return ID(r,e,!0,t,n)}var vd=me({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},os),q8={style:me({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},ld.style)},e_=Ra.concat(["invisible","culling","z","z2","zlevel","parent"]),Z8=function(r){bt(e,r);function e(t){return r.call(this,t)||this}return e.prototype.update=function(){var t=this;r.prototype.update.call(this);var n=this.style;if(n.decal){var a=this._decalEl=this._decalEl||new e;a.buildPath===e.prototype.buildPath&&(a.buildPath=function(l){t.buildPath(l,t.shape)}),a.silent=!0;var i=a.style;for(var o in n)i[o]!==n[o]&&(i[o]=n[o]);i.fill=n.fill?n.decal:null,i.decal=null,i.shadowColor=null,n.strokeFirst&&(i.stroke=null);for(var s=0;s<e_.length;++s)a[e_[s]]=this[e_[s]];a.__dirty|=bn}else this._decalEl&&(this._decalEl=null)},e.prototype.getDecalElement=function(){return this._decalEl},e.prototype._init=function(t){var n=Fe(t);this.shape=this.getDefaultShape();var a=this.getDefaultStyle();a&&this.useStyle(a);for(var i=0;i<n.length;i++){var o=n[i],s=t[o];o==="style"?this.style?Q(this.style,s):this.useStyle(s):o==="shape"?Q(this.shape,s):r.prototype.attrKV.call(this,o,s)}this.style||this.useStyle({})},e.prototype.getDefaultStyle=function(){return null},e.prototype.getDefaultShape=function(){return{}},e.prototype.canBeInsideText=function(){return this.hasFill()},e.prototype.getInsideTextFill=function(){var t=this.style.fill;if(t!=="none"){if(ce(t)){var n=Oc(t,0);return n>.5?b0:n>.2?MG:x0}else if(t)return x0}return b0},e.prototype.getInsideTextStroke=function(t){var n=this.style.fill;if(ce(n)){var a=this.__zr,i=!!(a&&a.isDarkMode()),o=Oc(t,0)<_0;if(i===o)return n}},e.prototype.buildPath=function(t,n,a){},e.prototype.pathUpdated=function(){this.__dirty&=~Rl},e.prototype.getUpdatedPathProxy=function(t){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,t),this.path},e.prototype.createPathProxy=function(){this.path=new Va(!1)},e.prototype.hasStroke=function(){var t=this.style,n=t.stroke;return!(n==null||n==="none"||!(t.lineWidth>0))},e.prototype.hasFill=function(){var t=this.style,n=t.fill;return n!=null&&n!=="none"},e.prototype.getBoundingRect=function(){var t=this._rect,n=this.style,a=!t;if(a){var i=!1;this.path||(i=!0,this.createPathProxy());var o=this.path;(i||this.__dirty&Rl)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),t=o.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||a){s.copy(t);var l=n.strokeNoScale?this.getLineScale():1,u=n.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;u=Math.max(u,c==null?4:c)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return t},e.prototype.contain=function(t,n){var a=this.transformCoordToLocal(t,n),i=this.getBoundingRect(),o=this.style;if(t=a[0],n=a[1],i.contain(t,n)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),Y8(s,l/u,t,n)))return!0}if(this.hasFill())return j8(s,t,n)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=Rl,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){t==="style"?this.dirtyStyle():t==="shape"?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(t,n){t==="shape"?this.setShape(n):r.prototype.attrKV.call(this,t,n)},e.prototype.setShape=function(t,n){var a=this.shape;return a||(a=this.shape={}),typeof t=="string"?a[t]=n:Q(a,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&Rl)},e.prototype.createStyle=function(t){return yc(vd,t)},e.prototype._innerSaveToNormal=function(t){r.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=Q({},this.shape))},e.prototype._applyStateObj=function(t,n,a,i,o,s){r.prototype._applyStateObj.call(this,t,n,a,i,o,s);var l=!(n&&i),u;if(n&&n.shape?o?i?u=n.shape:(u=Q({},a.shape),Q(u,n.shape)):(u=Q({},i?this.shape:a.shape),Q(u,n.shape)):l&&(u=a.shape),u)if(o){this.shape=Q({},this.shape);for(var c={},f=Fe(u),h=0;h<f.length;h++){var v=f[h];typeof u[v]=="object"?this.shape[v]=u[v]:c[v]=u[v]}this._transitionState(t,{shape:c},s)}else this.shape=u,this.dirtyShape()},e.prototype._mergeStates=function(t){for(var n=r.prototype._mergeStates.call(this,t),a,i=0;i<t.length;i++){var o=t[i];o.shape&&(a=a||{},this._mergeStyle(a,o.shape))}return a&&(n.shape=a),n},e.prototype.getAnimationStyleProps=function(){return q8},e.prototype.isZeroArea=function(){return!1},e.extend=function(t){var n=function(i){bt(o,i);function o(s){var l=i.call(this,s)||this;return t.init&&t.init.call(l,s),l}return o.prototype.getDefaultStyle=function(){return xe(t.style)},o.prototype.getDefaultShape=function(){return xe(t.shape)},o}(e);for(var a in t)typeof t[a]=="function"&&(n.prototype[a]=t[a]);return n},e.initDefaultProps=function(){var t=e.prototype;t.type="path",t.strokeContainThreshold=5,t.segmentIgnoreThreshold=0,t.subPixelOptimize=!1,t.autoBatch=!1,t.__dirty=bn|Mc|Rl}(),e}(Bn),ze=Z8,X8=me({strokeFirst:!0,font:Vi,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},vd),PD=function(r){bt(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.hasStroke=function(){var t=this.style,n=t.stroke;return n!=null&&n!=="none"&&t.lineWidth>0},e.prototype.hasFill=function(){var t=this.style,n=t.fill;return n!=null&&n!=="none"},e.prototype.createStyle=function(t){return yc(X8,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){var t=this.style;if(!this._rect){var n=t.text;n!=null?n+="":n="";var a=Bc(n,t.font,t.textAlign,t.textBaseline);if(a.x+=t.x||0,a.y+=t.y||0,this.hasStroke()){var i=t.lineWidth;a.x-=i/2,a.y-=i/2,a.width+=i,a.height+=i}this._rect=a}return this._rect},e.initDefaultProps=function(){var t=e.prototype;t.dirtyRectTolerance=10}(),e}(Bn);PD.prototype.type="tspan";var Yc=PD,Q8=me({x:0,y:0},os),K8={style:me({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},ld.style)};function J8(r){return!!(r&&typeof r!="string"&&r.width&&r.height)}var ED=function(r){bt(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.createStyle=function(t){return yc(Q8,t)},e.prototype._getSize=function(t){var n=this.style,a=n[t];if(a!=null)return a;var i=J8(n.image)?n.image:this.__image;if(!i)return 0;var o=t==="width"?"height":"width",s=n[o];return s==null?i[t]:i[t]/i[o]*s},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return K8},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new Oe(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e}(Bn);ED.prototype.type="image";var ur=ED;function eW(r,e){var t=e.x,n=e.y,a=e.width,i=e.height,o=e.r,s,l,u,c;a<0&&(t=t+a,a=-a),i<0&&(n=n+i,i=-i),typeof o=="number"?s=l=u=c=o:o instanceof Array?o.length===1?s=l=u=c=o[0]:o.length===2?(s=u=o[0],l=c=o[1]):o.length===3?(s=o[0],l=c=o[1],u=o[2]):(s=o[0],l=o[1],u=o[2],c=o[3]):s=l=u=c=0;var f;s+l>a&&(f=s+l,s*=a/f,l*=a/f),u+c>a&&(f=u+c,u*=a/f,c*=a/f),l+u>i&&(f=l+u,l*=i/f,u*=i/f),s+c>i&&(f=s+c,s*=i/f,c*=i/f),r.moveTo(t+s,n),r.lineTo(t+a-l,n),l!==0&&r.arc(t+a-l,n+l,l,-Math.PI/2,0),r.lineTo(t+a,n+i-u),u!==0&&r.arc(t+a-u,n+i-u,u,0,Math.PI/2),r.lineTo(t+c,n+i),c!==0&&r.arc(t+c,n+i-c,c,Math.PI/2,Math.PI),r.lineTo(t,n+s),s!==0&&r.arc(t+s,n+s,s,Math.PI,Math.PI*1.5)}var Gl=Math.round;function OD(r,e,t){if(!!e){var n=e.x1,a=e.x2,i=e.y1,o=e.y2;r.x1=n,r.x2=a,r.y1=i,r.y2=o;var s=t&&t.lineWidth;return s&&(Gl(n*2)===Gl(a*2)&&(r.x1=r.x2=vs(n,s,!0)),Gl(i*2)===Gl(o*2)&&(r.y1=r.y2=vs(i,s,!0))),r}}function RD(r,e,t){if(!!e){var n=e.x,a=e.y,i=e.width,o=e.height;r.x=n,r.y=a,r.width=i,r.height=o;var s=t&&t.lineWidth;return s&&(r.x=vs(n,s,!0),r.y=vs(a,s,!0),r.width=Math.max(vs(n+i,s,!1)-r.x,i===0?0:1),r.height=Math.max(vs(a+o,s,!1)-r.y,o===0?0:1)),r}}function vs(r,e,t){if(!e)return r;var n=Gl(r*2);return(n+Gl(e))%2===0?n/2:(n+(t?1:-1))/2}var tW=function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r}(),rW={},ND=function(r){bt(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new tW},e.prototype.buildPath=function(t,n){var a,i,o,s;if(this.subPixelOptimize){var l=RD(rW,n,this.style);a=l.x,i=l.y,o=l.width,s=l.height,l.r=n.r,n=l}else a=n.x,i=n.y,o=n.width,s=n.height;n.r?eW(t,n):t.rect(a,i,o,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(ze);ND.prototype.type="rect";var Ge=ND,kD={fill:"#000"},zD=2,nW={style:me({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},ld.style)},BD=function(r){bt(e,r);function e(t){var n=r.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=kD,n.attr(t),n}return e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){r.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t<this._children.length;t++){var n=this._children[t];n.zlevel=this.zlevel,n.z=this.z,n.z2=this.z2,n.culling=this.culling,n.cursor=this.cursor,n.invisible=this.invisible}},e.prototype.updateTransform=function(){var t=this.innerTransformable;t?(t.updateTransform(),t.transform&&(this.transform=t.transform)):r.prototype.updateTransform.call(this)},e.prototype.getLocalTransform=function(t){var n=this.innerTransformable;return n?n.getLocalTransform(t):r.prototype.getLocalTransform.call(this,t)},e.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),r.prototype.getComputedTransform.call(this)},e.prototype._updateSubTexts=function(){this._childCursor=0,oW(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},e.prototype.addSelfToZr=function(t){r.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=t},e.prototype.removeSelfFromZr=function(t){r.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=null},e.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var t=new Oe(0,0,0,0),n=this._children,a=[],i=null,o=0;o<n.length;o++){var s=n[o],l=s.getBoundingRect(),u=s.getLocalTransform(a);u?(t.copy(l),t.applyTransform(u),i=i||t.clone(),i.union(t)):(i=i||l.clone(),i.union(l))}this._rect=i||t}return this._rect},e.prototype.setDefaultTextStyle=function(t){this._defaultStyle=t||kD},e.prototype.setTextContent=function(t){},e.prototype._mergeStyle=function(t,n){if(!n)return t;var a=n.rich,i=t.rich||a&&{};return Q(t,n),a&&i?(this._mergeRich(i,a),t.rich=i):i&&(t.rich=i),t},e.prototype._mergeRich=function(t,n){for(var a=Fe(n),i=0;i<a.length;i++){var o=a[i];t[o]=t[o]||{},Q(t[o],n[o])}},e.prototype.getAnimationStyleProps=function(){return nW},e.prototype._getOrCreateChild=function(t){var n=this._children[this._childCursor];return(!n||!(n instanceof t))&&(n=new t),this._children[this._childCursor++]=n,n.__zr=this.__zr,n.parent=this,n},e.prototype._updatePlainTexts=function(){var t=this.style,n=t.font||Vi,a=t.padding,i=YD(t),o=C8(i,t),s=t_(t),l=!!t.backgroundColor,u=o.outerHeight,c=o.outerWidth,f=o.contentWidth,h=o.lines,v=o.lineHeight,d=this._defaultStyle,p=t.x||0,g=t.y||0,y=t.align||d.align||"left",m=t.verticalAlign||d.verticalAlign||"top",_=p,b=Vl(g,o.contentHeight,m);if(s||a){var w=Fc(p,c,y),x=Vl(g,u,m);s&&this._renderBackground(t,t,w,x,c,u)}b+=v/2,a&&(_=jD(p,y,a),m==="top"?b+=a[0]:m==="bottom"&&(b-=a[2]));for(var S=0,T=!1,D=UD("fill"in t?t.fill:(T=!0,d.fill)),M=WD("stroke"in t?t.stroke:!l&&(!d.autoStroke||T)?(S=zD,d.stroke):null),A=t.textShadowBlur>0,I=t.width!=null&&(t.overflow==="truncate"||t.overflow==="break"||t.overflow==="breakAll"),P=o.calculatedLineHeight,E=0;E<h.length;E++){var O=this._getOrCreateChild(Yc),N=O.createStyle();O.useStyle(N),N.text=h[E],N.x=_,N.y=b,y&&(N.textAlign=y),N.textBaseline="middle",N.opacity=t.opacity,N.strokeFirst=!0,A&&(N.shadowBlur=t.textShadowBlur||0,N.shadowColor=t.textShadowColor||"transparent",N.shadowOffsetX=t.textShadowOffsetX||0,N.shadowOffsetY=t.textShadowOffsetY||0),N.stroke=M,N.fill=D,M&&(N.lineWidth=t.lineWidth||S,N.lineDash=t.lineDash,N.lineDashOffset=t.lineDashOffset||0),N.font=n,$D(N,t),b+=v,I&&O.setBoundingRect(new Oe(Fc(N.x,t.width,N.textAlign),Vl(N.y,P,N.textBaseline),f,P))}},e.prototype._updateRichTexts=function(){var t=this.style,n=YD(t),a=M8(n,t),i=a.width,o=a.outerWidth,s=a.outerHeight,l=t.padding,u=t.x||0,c=t.y||0,f=this._defaultStyle,h=t.align||f.align,v=t.verticalAlign||f.verticalAlign,d=Fc(u,o,h),p=Vl(c,s,v),g=d,y=p;l&&(g+=l[3],y+=l[0]);var m=g+i;t_(t)&&this._renderBackground(t,t,d,p,o,s);for(var _=!!t.backgroundColor,b=0;b<a.lines.length;b++){for(var w=a.lines[b],x=w.tokens,S=x.length,T=w.lineHeight,D=w.width,M=0,A=g,I=m,P=S-1,E=void 0;M<S&&(E=x[M],!E.align||E.align==="left");)this._placeToken(E,t,T,y,A,"left",_),D-=E.width,A+=E.width,M++;for(;P>=0&&(E=x[P],E.align==="right");)this._placeToken(E,t,T,y,I,"right",_),D-=E.width,I-=E.width,P--;for(A+=(i-(A-g)-(m-I)-D)/2;M<=P;)E=x[M],this._placeToken(E,t,T,y,A+E.width/2,"center",_),A+=E.width,M++;y+=T}},e.prototype._placeToken=function(t,n,a,i,o,s,l){var u=n.rich[t.styleName]||{};u.text=t.text;var c=t.verticalAlign,f=i+a/2;c==="top"?f=i+t.height/2:c==="bottom"&&(f=i+a-t.height/2);var h=!t.isLineHolder&&t_(u);h&&this._renderBackground(u,n,s==="right"?o-t.width:s==="center"?o-t.width/2:o,f-t.height/2,t.width,t.height);var v=!!u.backgroundColor,d=t.textPadding;d&&(o=jD(o,s,d),f-=t.height/2-d[0]-t.innerHeight/2);var p=this._getOrCreateChild(Yc),g=p.createStyle();p.useStyle(g);var y=this._defaultStyle,m=!1,_=0,b=UD("fill"in u?u.fill:"fill"in n?n.fill:(m=!0,y.fill)),w=WD("stroke"in u?u.stroke:"stroke"in n?n.stroke:!v&&!l&&(!y.autoStroke||m)?(_=zD,y.stroke):null),x=u.textShadowBlur>0||n.textShadowBlur>0;g.text=t.text,g.x=o,g.y=f,x&&(g.shadowBlur=u.textShadowBlur||n.textShadowBlur||0,g.shadowColor=u.textShadowColor||n.textShadowColor||"transparent",g.shadowOffsetX=u.textShadowOffsetX||n.textShadowOffsetX||0,g.shadowOffsetY=u.textShadowOffsetY||n.textShadowOffsetY||0),g.textAlign=s,g.textBaseline="middle",g.font=t.font||Vi,g.opacity=Ia(u.opacity,n.opacity,1),$D(g,u),w&&(g.lineWidth=Ia(u.lineWidth,n.lineWidth,_),g.lineDash=Pe(u.lineDash,n.lineDash),g.lineDashOffset=n.lineDashOffset||0,g.stroke=w),b&&(g.fill=b);var S=t.contentWidth,T=t.contentHeight;p.setBoundingRect(new Oe(Fc(g.x,S,g.textAlign),Vl(g.y,T,g.textBaseline),S,T))},e.prototype._renderBackground=function(t,n,a,i,o,s){var l=t.backgroundColor,u=t.borderWidth,c=t.borderColor,f=l&&l.image,h=l&&!f,v=t.borderRadius,d=this,p,g;if(h||t.lineHeight||u&&c){p=this._getOrCreateChild(Ge),p.useStyle(p.createStyle()),p.style.fill=null;var y=p.shape;y.x=a,y.y=i,y.width=o,y.height=s,y.r=v,p.dirtyShape()}if(h){var m=p.style;m.fill=l||null,m.fillOpacity=Pe(t.fillOpacity,1)}else if(f){g=this._getOrCreateChild(ur),g.onload=function(){d.dirtyStyle()};var _=g.style;_.image=l.image,_.x=a,_.y=i,_.width=o,_.height=s}if(u&&c){var m=p.style;m.lineWidth=u,m.stroke=c,m.strokeOpacity=Pe(t.strokeOpacity,1),m.lineDash=t.borderDash,m.lineDashOffset=t.borderDashOffset||0,p.strokeContainThreshold=0,p.hasFill()&&p.hasStroke()&&(m.strokeFirst=!0,m.lineWidth*=2)}var b=(p||g).style;b.shadowBlur=t.shadowBlur||0,b.shadowColor=t.shadowColor||"transparent",b.shadowOffsetX=t.shadowOffsetX||0,b.shadowOffsetY=t.shadowOffsetY||0,b.opacity=Ia(t.opacity,n.opacity,1)},e.makeFont=function(t){var n="";return HD(t)&&(n=[t.fontStyle,t.fontWeight,VD(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),n&&On(n)||t.textFont||t.font},e}(Bn),aW={left:!0,right:1,center:1},iW={top:1,bottom:1,middle:1},FD=["fontStyle","fontWeight","fontSize","fontFamily"];function VD(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?Im+"px":r+"px"}function $D(r,e){for(var t=0;t<FD.length;t++){var n=FD[t],a=e[n];a!=null&&(r[n]=a)}}function HD(r){return r.fontSize!=null||r.fontFamily||r.fontWeight}function oW(r){return GD(r),L(r.rich,GD),r}function GD(r){if(r){r.font=BD.makeFont(r);var e=r.align;e==="middle"&&(e="center"),r.align=e==null||aW[e]?e:"left";var t=r.verticalAlign;t==="center"&&(t="middle"),r.verticalAlign=t==null||iW[t]?t:"top";var n=r.padding;n&&(r.padding=Iv(r.padding))}}function WD(r,e){return r==null||e<=0||r==="transparent"||r==="none"?null:r.image||r.colorStops?"#000":r}function UD(r){return r==null||r==="none"?null:r.image||r.colorStops?"#000":r}function jD(r,e,t){return e==="right"?r-t[1]:e==="center"?r+t[3]/2-t[1]/2:r+t[3]}function YD(r){var e=r.text;return e!=null&&(e+=""),e}function t_(r){return!!(r.backgroundColor||r.lineHeight||r.borderWidth&&r.borderColor)}var We=BD,Me=qe(),r_=function(r,e,t,n){if(n){var a=Me(n);a.dataIndex=t,a.dataType=e,a.seriesIndex=r,n.type==="group"&&n.traverse(function(i){var o=Me(i);o.seriesIndex=r,o.dataIndex=t,o.dataType=e})}},qD=1,ZD={},XD=qe(),n_=qe(),a_=0,qc=1,dd=2,Gr=["emphasis","blur","select"],Zc=["normal","emphasis","blur","select"],Wl=10,sW=9,ds="highlight",pd="downplay",Xc="select",gd="unselect",Qc="toggleSelect";function Ul(r){return r!=null&&r!=="none"}var QD=new Lc(100);function KD(r){if(ce(r)){var e=QD.get(r);return e||(e=Wv(r,-.1),QD.put(r,e)),e}else if(dc(r)){var t=Q({},r);return t.colorStops=ee(r.colorStops,function(n){return{offset:n.offset,color:Wv(n.color,-.1)}}),t}return r}function yd(r,e,t){r.onHoverStateChange&&(r.hoverState||0)!==t&&r.onHoverStateChange(e),r.hoverState=t}function JD(r){yd(r,"emphasis",dd)}function eM(r){r.hoverState===dd&&yd(r,"normal",a_)}function i_(r){yd(r,"blur",qc)}function tM(r){r.hoverState===qc&&yd(r,"normal",a_)}function lW(r){r.selected=!0}function uW(r){r.selected=!1}function rM(r,e,t){e(r,t)}function hi(r,e,t){rM(r,e,t),r.isGroup&&r.traverse(function(n){rM(n,e,t)})}function md(r,e){switch(e){case"emphasis":r.hoverState=dd;break;case"normal":r.hoverState=a_;break;case"blur":r.hoverState=qc;break;case"select":r.selected=!0}}function cW(r,e,t,n){for(var a=r.style,i={},o=0;o<e.length;o++){var s=e[o],l=a[s];i[s]=l==null?n&&n[s]:l}for(var o=0;o<r.animators.length;o++){var u=r.animators[o];u.__fromStateTransition&&u.__fromStateTransition.indexOf(t)<0&&u.targetName==="style"&&u.saveTo(i,e)}return i}function fW(r,e,t,n){var a=t&&Ne(t,"select")>=0,i=!1;if(r instanceof ze){var o=XD(r),s=a&&o.selectFill||o.normalFill,l=a&&o.selectStroke||o.normalStroke;if(Ul(s)||Ul(l)){n=n||{};var u=n.style||{};u.fill==="inherit"?(i=!0,n=Q({},n),u=Q({},u),u.fill=s):!Ul(u.fill)&&Ul(s)?(i=!0,n=Q({},n),u=Q({},u),u.fill=KD(s)):!Ul(u.stroke)&&Ul(l)&&(i||(n=Q({},n),u=Q({},u)),u.stroke=KD(l)),n.style=u}}if(n&&n.z2==null){i||(n=Q({},n));var c=r.z2EmphasisLift;n.z2=r.z2+(c!=null?c:Wl)}return n}function hW(r,e,t){if(t&&t.z2==null){t=Q({},t);var n=r.z2SelectLift;t.z2=r.z2+(n!=null?n:sW)}return t}function vW(r,e,t){var n=Ne(r.currentStates,e)>=0,a=r.style.opacity,i=n?null:cW(r,["opacity"],e,{opacity:1});t=t||{};var o=t.style||{};return o.opacity==null&&(t=Q({},t),o=Q({opacity:n?a:i.opacity*.1},o),t.style=o),t}function o_(r,e){var t=this.states[r];if(this.style){if(r==="emphasis")return fW(this,r,e,t);if(r==="blur")return vW(this,r,t);if(r==="select")return hW(this,r,t)}return t}function ps(r){r.stateProxy=o_;var e=r.getTextContent(),t=r.getTextGuideLine();e&&(e.stateProxy=o_),t&&(t.stateProxy=o_)}function nM(r,e){!lM(r,e)&&!r.__highByOuter&&hi(r,JD)}function aM(r,e){!lM(r,e)&&!r.__highByOuter&&hi(r,eM)}function vi(r,e){r.__highByOuter|=1<<(e||0),hi(r,JD)}function di(r,e){!(r.__highByOuter&=~(1<<(e||0)))&&hi(r,eM)}function iM(r){hi(r,i_)}function s_(r){hi(r,tM)}function oM(r){hi(r,lW)}function sM(r){hi(r,uW)}function lM(r,e){return r.__highDownSilentOnTouch&&e.zrByTouch}function uM(r){var e=r.getModel(),t=[],n=[];e.eachComponent(function(a,i){var o=n_(i),s=a==="series",l=s?r.getViewOfSeriesModel(i):r.getViewOfComponentModel(i);!s&&n.push(l),o.isBlured&&(l.group.traverse(function(u){tM(u)}),s&&t.push(i)),o.isBlured=!1}),L(n,function(a){a&&a.toggleBlurSeries&&a.toggleBlurSeries(t,!1,e)})}function l_(r,e,t,n){var a=n.getModel();t=t||"coordinateSystem";function i(u,c){for(var f=0;f<c.length;f++){var h=u.getItemGraphicEl(c[f]);h&&s_(h)}}if(r!=null&&!(!e||e==="none")){var o=a.getSeriesByIndex(r),s=o.coordinateSystem;s&&s.master&&(s=s.master);var l=[];a.eachSeries(function(u){var c=o===u,f=u.coordinateSystem;f&&f.master&&(f=f.master);var h=f&&s?f===s:c;if(!(t==="series"&&!c||t==="coordinateSystem"&&!h||e==="series"&&c)){var v=n.getViewOfSeriesModel(u);if(v.group.traverse(function(g){i_(g)}),yr(e))i(u.getData(),e);else if(_e(e))for(var d=Fe(e),p=0;p<d.length;p++)i(u.getData(d[p]),e[d[p]]);l.push(u),n_(u).isBlured=!0}}),a.eachComponent(function(u,c){if(u!=="series"){var f=n.getViewOfComponentModel(c);f&&f.toggleBlurSeries&&f.toggleBlurSeries(l,!0,a)}})}}function u_(r,e,t){if(!(r==null||e==null)){var n=t.getModel().getComponent(r,e);if(!!n){n_(n).isBlured=!0;var a=t.getViewOfComponentModel(n);!a||!a.focusBlurEnabled||a.group.traverse(function(i){i_(i)})}}}function dW(r,e,t){var n=r.seriesIndex,a=r.getData(e.dataType);if(!!a){var i=ns(a,e);i=(J(i)?i[0]:i)||0;var o=a.getItemGraphicEl(i);if(!o)for(var s=a.count(),l=0;!o&&l<s;)o=a.getItemGraphicEl(l++);if(o){var u=Me(o);l_(n,u.focus,u.blurScope,t)}else{var c=r.get(["emphasis","focus"]),f=r.get(["emphasis","blurScope"]);c!=null&&l_(n,c,f,t)}}}function c_(r,e,t,n){var a={focusSelf:!1,dispatchers:null};if(r==null||r==="series"||e==null||t==null)return a;var i=n.getModel().getComponent(r,e);if(!i)return a;var o=n.getViewOfComponentModel(i);if(!o||!o.findHighDownDispatchers)return a;for(var s=o.findHighDownDispatchers(t),l,u=0;u<s.length;u++)if(Me(s[u]).focus==="self"){l=!0;break}return{focusSelf:l,dispatchers:s}}function pW(r,e,t){var n=Me(r),a=c_(n.componentMainType,n.componentIndex,n.componentHighDownName,t),i=a.dispatchers,o=a.focusSelf;i?(o&&u_(n.componentMainType,n.componentIndex,t),L(i,function(s){return nM(s,e)})):(l_(n.seriesIndex,n.focus,n.blurScope,t),n.focus==="self"&&u_(n.componentMainType,n.componentIndex,t),nM(r,e))}function gW(r,e,t){uM(t);var n=Me(r),a=c_(n.componentMainType,n.componentIndex,n.componentHighDownName,t).dispatchers;a?L(a,function(i){return aM(i,e)}):aM(r,e)}function yW(r,e,t){if(!!h_(e)){var n=e.dataType,a=r.getData(n),i=ns(a,e);J(i)||(i=[i]),r[e.type===Qc?"toggleSelect":e.type===Xc?"select":"unselect"](i,n)}}function cM(r){var e=r.getAllData();L(e,function(t){var n=t.data,a=t.type;n.eachItemGraphicEl(function(i,o){r.isSelected(o,a)?oM(i):sM(i)})})}function mW(r){var e=[];return r.eachSeries(function(t){var n=t.getAllData();L(n,function(a){a.data;var i=a.type,o=t.getSelectedDataIndices();if(o.length>0){var s={dataIndex:o,seriesIndex:t.seriesIndex};i!=null&&(s.dataType=i),e.push(s)}})}),e}function to(r,e,t){gs(r,!0),hi(r,ps),f_(r,e,t)}function _W(r){gs(r,!1)}function Lt(r,e,t,n){n?_W(r):to(r,e,t)}function f_(r,e,t){var n=Me(r);e!=null?(n.focus=e,n.blurScope=t):n.focus&&(n.focus=null)}var fM=["emphasis","blur","select"],bW={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function mr(r,e,t,n){t=t||"itemStyle";for(var a=0;a<fM.length;a++){var i=fM[a],o=e.getModel([i,t]),s=r.ensureState(i);s.style=n?n(o):o[bW[t]]()}}function gs(r,e){var t=e===!1,n=r;r.highDownSilentOnTouch&&(n.__highDownSilentOnTouch=r.highDownSilentOnTouch),(!t||n.__highDownDispatcher)&&(n.__highByOuter=n.__highByOuter||0,n.__highDownDispatcher=!t)}function Kc(r){return!!(r&&r.__highDownDispatcher)}function xW(r,e,t){var n=Me(r);n.componentMainType=e.mainType,n.componentIndex=e.componentIndex,n.componentHighDownName=t}function wW(r){var e=ZD[r];return e==null&&qD<=32&&(e=ZD[r]=qD++),e}function h_(r){var e=r.type;return e===Xc||e===gd||e===Qc}function hM(r){var e=r.type;return e===ds||e===pd}function SW(r){var e=XD(r);e.normalFill=r.style.fill,e.normalStroke=r.style.stroke;var t=r.states.select||{};e.selectFill=t.style&&t.style.fill||null,e.selectStroke=t.style&&t.style.stroke||null}var jl=Va.CMD,CW=[[],[],[]],vM=Math.sqrt,TW=Math.atan2;function dM(r,e){if(!!e){var t=r.data,n=r.len(),a,i,o,s,l,u,c=jl.M,f=jl.C,h=jl.L,v=jl.R,d=jl.A,p=jl.Q;for(o=0,s=0;o<n;){switch(a=t[o++],s=o,i=0,a){case c:i=1;break;case h:i=1;break;case f:i=3;break;case p:i=2;break;case d:var g=e[4],y=e[5],m=vM(e[0]*e[0]+e[1]*e[1]),_=vM(e[2]*e[2]+e[3]*e[3]),b=TW(-e[1]/_,e[0]/m);t[o]*=m,t[o++]+=g,t[o]*=_,t[o++]+=y,t[o++]*=m,t[o++]*=_,t[o++]+=b,t[o++]+=b,o+=2,s=o;break;case v:u[0]=t[o++],u[1]=t[o++],sr(u,u,e),t[s++]=u[0],t[s++]=u[1],u[0]+=t[o++],u[1]+=t[o++],sr(u,u,e),t[s++]=u[0],t[s++]=u[1]}for(l=0;l<i;l++){var w=CW[l];w[0]=t[o++],w[1]=t[o++],sr(w,w,e),t[s++]=w[0],t[s++]=w[1]}}r.increaseVersion()}}var v_=Math.sqrt,_d=Math.sin,bd=Math.cos,Jc=Math.PI;function pM(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1])}function d_(r,e){return(r[0]*e[0]+r[1]*e[1])/(pM(r)*pM(e))}function gM(r,e){return(r[0]*e[1]<r[1]*e[0]?-1:1)*Math.acos(d_(r,e))}function yM(r,e,t,n,a,i,o,s,l,u,c){var f=l*(Jc/180),h=bd(f)*(r-t)/2+_d(f)*(e-n)/2,v=-1*_d(f)*(r-t)/2+bd(f)*(e-n)/2,d=h*h/(o*o)+v*v/(s*s);d>1&&(o*=v_(d),s*=v_(d));var p=(a===i?-1:1)*v_((o*o*(s*s)-o*o*(v*v)-s*s*(h*h))/(o*o*(v*v)+s*s*(h*h)))||0,g=p*o*v/s,y=p*-s*h/o,m=(r+t)/2+bd(f)*g-_d(f)*y,_=(e+n)/2+_d(f)*g+bd(f)*y,b=gM([1,0],[(h-g)/o,(v-y)/s]),w=[(h-g)/o,(v-y)/s],x=[(-1*h-g)/o,(-1*v-y)/s],S=gM(w,x);if(d_(w,x)<=-1&&(S=Jc),d_(w,x)>=1&&(S=0),S<0){var T=Math.round(S/Jc*1e6)/1e6;S=Jc*2+T%2*Jc}c.addData(u,m,_,o,s,b,S,f,i)}var DW=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,MW=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function AW(r){var e=new Va;if(!r)return e;var t=0,n=0,a=t,i=n,o,s=Va.CMD,l=r.match(DW);if(!l)return e;for(var u=0;u<l.length;u++){for(var c=l[u],f=c.charAt(0),h=void 0,v=c.match(MW)||[],d=v.length,p=0;p<d;p++)v[p]=parseFloat(v[p]);for(var g=0;g<d;){var y=void 0,m=void 0,_=void 0,b=void 0,w=void 0,x=void 0,S=void 0,T=t,D=n,M=void 0,A=void 0;switch(f){case"l":t+=v[g++],n+=v[g++],h=s.L,e.addData(h,t,n);break;case"L":t=v[g++],n=v[g++],h=s.L,e.addData(h,t,n);break;case"m":t+=v[g++],n+=v[g++],h=s.M,e.addData(h,t,n),a=t,i=n,f="l";break;case"M":t=v[g++],n=v[g++],h=s.M,e.addData(h,t,n),a=t,i=n,f="L";break;case"h":t+=v[g++],h=s.L,e.addData(h,t,n);break;case"H":t=v[g++],h=s.L,e.addData(h,t,n);break;case"v":n+=v[g++],h=s.L,e.addData(h,t,n);break;case"V":n=v[g++],h=s.L,e.addData(h,t,n);break;case"C":h=s.C,e.addData(h,v[g++],v[g++],v[g++],v[g++],v[g++],v[g++]),t=v[g-2],n=v[g-1];break;case"c":h=s.C,e.addData(h,v[g++]+t,v[g++]+n,v[g++]+t,v[g++]+n,v[g++]+t,v[g++]+n),t+=v[g-2],n+=v[g-1];break;case"S":y=t,m=n,M=e.len(),A=e.data,o===s.C&&(y+=t-A[M-4],m+=n-A[M-3]),h=s.C,T=v[g++],D=v[g++],t=v[g++],n=v[g++],e.addData(h,y,m,T,D,t,n);break;case"s":y=t,m=n,M=e.len(),A=e.data,o===s.C&&(y+=t-A[M-4],m+=n-A[M-3]),h=s.C,T=t+v[g++],D=n+v[g++],t+=v[g++],n+=v[g++],e.addData(h,y,m,T,D,t,n);break;case"Q":T=v[g++],D=v[g++],t=v[g++],n=v[g++],h=s.Q,e.addData(h,T,D,t,n);break;case"q":T=v[g++]+t,D=v[g++]+n,t+=v[g++],n+=v[g++],h=s.Q,e.addData(h,T,D,t,n);break;case"T":y=t,m=n,M=e.len(),A=e.data,o===s.Q&&(y+=t-A[M-4],m+=n-A[M-3]),t=v[g++],n=v[g++],h=s.Q,e.addData(h,y,m,t,n);break;case"t":y=t,m=n,M=e.len(),A=e.data,o===s.Q&&(y+=t-A[M-4],m+=n-A[M-3]),t+=v[g++],n+=v[g++],h=s.Q,e.addData(h,y,m,t,n);break;case"A":_=v[g++],b=v[g++],w=v[g++],x=v[g++],S=v[g++],T=t,D=n,t=v[g++],n=v[g++],h=s.A,yM(T,D,t,n,x,S,_,b,w,h,e);break;case"a":_=v[g++],b=v[g++],w=v[g++],x=v[g++],S=v[g++],T=t,D=n,t+=v[g++],n+=v[g++],h=s.A,yM(T,D,t,n,x,S,_,b,w,h,e);break}}(f==="z"||f==="Z")&&(h=s.Z,e.addData(h),t=a,n=i),o=h}return e.toStatic(),e}var mM=function(r){bt(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.applyTransform=function(t){},e}(ze);function _M(r){return r.setData!=null}function bM(r,e){var t=AW(r),n=Q({},e);return n.buildPath=function(a){if(_M(a)){a.setData(t.data);var i=a.getContext();i&&a.rebuildPath(i,1)}else{var i=a;t.rebuildPath(i,1)}},n.applyTransform=function(a){dM(t,a),this.dirtyShape()},n}function xM(r,e){return new mM(bM(r,e))}function LW(r,e){var t=bM(r,e),n=function(a){bt(i,a);function i(o){var s=a.call(this,o)||this;return s.applyTransform=t.applyTransform,s.buildPath=t.buildPath,s}return i}(mM);return n}function IW(r,e){for(var t=[],n=r.length,a=0;a<n;a++){var i=r[a];t.push(i.getUpdatedPathProxy(!0))}var o=new ze(e);return o.createPathProxy(),o.buildPath=function(s){if(_M(s)){s.appendPath(t);var l=s.getContext();l&&s.rebuildPath(l,1)}},o}function p_(r,e){e=e||{};var t=new ze;return r.shape&&t.setShape(r.shape),t.setStyle(r.style),e.bakeTransform?dM(t.path,r.getComputedTransform()):e.toLocal?t.setLocalTransform(r.getComputedTransform()):t.copyTransform(r),t.buildPath=r.buildPath,t.applyTransform=t.applyTransform,t.z=r.z,t.z2=r.z2,t.zlevel=r.zlevel,t}var PW=function(){function r(){this.cx=0,this.cy=0,this.r=0}return r}(),wM=function(r){bt(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new PW},e.prototype.buildPath=function(t,n){t.moveTo(n.cx+n.r,n.cy),t.arc(n.cx,n.cy,n.r,0,Math.PI*2)},e}(ze);wM.prototype.type="circle";var da=wM,EW=function(){function r(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return r}(),SM=function(r){bt(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new EW},e.prototype.buildPath=function(t,n){var a=.5522848,i=n.cx,o=n.cy,s=n.rx,l=n.ry,u=s*a,c=l*a;t.moveTo(i-s,o),t.bezierCurveTo(i-s,o-c,i-u,o-l,i,o-l),t.bezierCurveTo(i+u,o-l,i+s,o-c,i+s,o),t.bezierCurveTo(i+s,o+c,i+u,o+l,i,o+l),t.bezierCurveTo(i-u,o+l,i-s,o+c,i-s,o),t.closePath()},e}(ze);SM.prototype.type="ellipse";var xd=SM,CM=Math.PI,g_=CM*2,ys=Math.sin,Yl=Math.cos,OW=Math.acos,Ir=Math.atan2,TM=Math.abs,ef=Math.sqrt,tf=Math.max,$a=Math.min,pa=1e-4;function RW(r,e,t,n,a,i,o,s){var l=t-r,u=n-e,c=o-a,f=s-i,h=f*l-c*u;if(!(h*h<pa))return h=(c*(e-i)-f*(r-a))/h,[r+h*l,e+h*u]}function wd(r,e,t,n,a,i,o){var s=r-t,l=e-n,u=(o?i:-i)/ef(s*s+l*l),c=u*l,f=-u*s,h=r+c,v=e+f,d=t+c,p=n+f,g=(h+d)/2,y=(v+p)/2,m=d-h,_=p-v,b=m*m+_*_,w=a-i,x=h*p-d*v,S=(_<0?-1:1)*ef(tf(0,w*w*b-x*x)),T=(x*_-m*S)/b,D=(-x*m-_*S)/b,M=(x*_+m*S)/b,A=(-x*m+_*S)/b,I=T-g,P=D-y,E=M-g,O=A-y;return I*I+P*P>E*E+O*O&&(T=M,D=A),{cx:T,cy:D,x0:-c,y0:-f,x1:T*(a/w-1),y1:D*(a/w-1)}}function NW(r){var e;if(J(r)){var t=r.length;if(!t)return r;t===1?e=[r[0],r[0],0,0]:t===2?e=[r[0],r[0],r[1],r[1]]:t===3?e=r.concat(r[2]):e=r}else e=[r,r,r,r];return e}function kW(r,e){var t,n=tf(e.r,0),a=tf(e.r0||0,0),i=n>0,o=a>0;if(!(!i&&!o)){if(i||(n=a,a=0),a>n){var s=n;n=a,a=s}var l=e.startAngle,u=e.endAngle;if(!(isNaN(l)||isNaN(u))){var c=e.cx,f=e.cy,h=!!e.clockwise,v=TM(u-l),d=v>g_&&v%g_;if(d>pa&&(v=d),!(n>pa))r.moveTo(c,f);else if(v>g_-pa)r.moveTo(c+n*Yl(l),f+n*ys(l)),r.arc(c,f,n,l,u,!h),a>pa&&(r.moveTo(c+a*Yl(u),f+a*ys(u)),r.arc(c,f,a,u,l,h));else{var p=void 0,g=void 0,y=void 0,m=void 0,_=void 0,b=void 0,w=void 0,x=void 0,S=void 0,T=void 0,D=void 0,M=void 0,A=void 0,I=void 0,P=void 0,E=void 0,O=n*Yl(l),N=n*ys(l),V=a*Yl(u),$=a*ys(u),U=v>pa;if(U){var q=e.cornerRadius;q&&(t=NW(q),p=t[0],g=t[1],y=t[2],m=t[3]);var te=TM(n-a)/2;if(_=$a(te,y),b=$a(te,m),w=$a(te,p),x=$a(te,g),D=S=tf(_,b),M=T=tf(w,x),(S>pa||T>pa)&&(A=n*Yl(u),I=n*ys(u),P=a*Yl(l),E=a*ys(l),v<CM)){var H=RW(O,N,P,E,A,I,V,$);if(H){var Y=O-H[0],X=N-H[1],Z=A-H[0],ie=I-H[1],se=1/ys(OW((Y*Z+X*ie)/(ef(Y*Y+X*X)*ef(Z*Z+ie*ie)))/2),ne=ef(H[0]*H[0]+H[1]*H[1]);D=$a(S,(n-ne)/(se+1)),M=$a(T,(a-ne)/(se-1))}}}if(!U)r.moveTo(c+O,f+N);else if(D>pa){var ve=$a(y,D),R=$a(m,D),F=wd(P,E,O,N,n,ve,h),G=wd(A,I,V,$,n,R,h);r.moveTo(c+F.cx+F.x0,f+F.cy+F.y0),D<S&&ve===R?r.arc(c+F.cx,f+F.cy,D,Ir(F.y0,F.x0),Ir(G.y0,G.x0),!h):(ve>0&&r.arc(c+F.cx,f+F.cy,ve,Ir(F.y0,F.x0),Ir(F.y1,F.x1),!h),r.arc(c,f,n,Ir(F.cy+F.y1,F.cx+F.x1),Ir(G.cy+G.y1,G.cx+G.x1),!h),R>0&&r.arc(c+G.cx,f+G.cy,R,Ir(G.y1,G.x1),Ir(G.y0,G.x0),!h))}else r.moveTo(c+O,f+N),r.arc(c,f,n,l,u,!h);if(!(a>pa)||!U)r.lineTo(c+V,f+$);else if(M>pa){var ve=$a(p,M),R=$a(g,M),F=wd(V,$,A,I,a,-R,h),G=wd(O,N,P,E,a,-ve,h);r.lineTo(c+F.cx+F.x0,f+F.cy+F.y0),M<T&&ve===R?r.arc(c+F.cx,f+F.cy,M,Ir(F.y0,F.x0),Ir(G.y0,G.x0),!h):(R>0&&r.arc(c+F.cx,f+F.cy,R,Ir(F.y0,F.x0),Ir(F.y1,F.x1),!h),r.arc(c,f,a,Ir(F.cy+F.y1,F.cx+F.x1),Ir(G.cy+G.y1,G.cx+G.x1),h),ve>0&&r.arc(c+G.cx,f+G.cy,ve,Ir(G.y1,G.x1),Ir(G.y0,G.x0),!h))}else r.lineTo(c+V,f+$),r.arc(c,f,a,u,l,h)}r.closePath()}}}var zW=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,this.cornerRadius=0}return r}(),DM=function(r){bt(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new zW},e.prototype.buildPath=function(t,n){kW(t,n)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(ze);DM.prototype.type="sector";var Wr=DM,BW=function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r}(),MM=function(r){bt(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new BW},e.prototype.buildPath=function(t,n){var a=n.cx,i=n.cy,o=Math.PI*2;t.moveTo(a+n.r,i),t.arc(a,i,n.r,0,o,!1),t.moveTo(a+n.r0,i),t.arc(a,i,n.r0,0,o,!0)},e}(ze);MM.prototype.type="ring";var rf=MM;function FW(r,e,t,n){var a=[],i=[],o=[],s=[],l,u,c,f;if(n){c=[1/0,1/0],f=[-1/0,-1/0];for(var h=0,v=r.length;h<v;h++)ii(c,c,r[h]),oi(f,f,r[h]);ii(c,c,n[0]),oi(f,f,n[1])}for(var h=0,v=r.length;h<v;h++){var d=r[h];if(t)l=r[h?h-1:v-1],u=r[(h+1)%v];else if(h===0||h===v-1){a.push(Pa(r[h]));continue}else l=r[h-1],u=r[h+1];Hi(i,u,l),bc(i,i,e);var p=Ev(d,l),g=Ev(d,u),y=p+g;y!==0&&(p/=y,g/=y),bc(o,i,-p),bc(s,i,g);var m=Bm([],d,o),_=Bm([],d,s);n&&(oi(m,m,c),ii(m,m,f),oi(_,_,c),ii(_,_,f)),a.push(m),a.push(_)}return t&&a.push(a.shift()),a}function AM(r,e,t){var n=e.smooth,a=e.points;if(a&&a.length>=2){if(n){var i=FW(a,n,t,e.smoothConstraint);r.moveTo(a[0][0],a[0][1]);for(var o=a.length,s=0;s<(t?o:o-1);s++){var l=i[s*2],u=i[s*2+1],c=a[(s+1)%o];r.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{r.moveTo(a[0][0],a[0][1]);for(var s=1,f=a.length;s<f;s++)r.lineTo(a[s][0],a[s][1])}t&&r.closePath()}}var VW=function(){function r(){this.points=null,this.smooth=0,this.smoothConstraint=null}return r}(),LM=function(r){bt(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new VW},e.prototype.buildPath=function(t,n){AM(t,n,!0)},e}(ze);LM.prototype.type="polygon";var Ur=LM,$W=function(){function r(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return r}(),IM=function(r){bt(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 $W},e.prototype.buildPath=function(t,n){AM(t,n,!1)},e}(ze);IM.prototype.type="polyline";var jr=IM,HW={},GW=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r}(),PM=function(r){bt(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 GW},e.prototype.buildPath=function(t,n){var a,i,o,s;if(this.subPixelOptimize){var l=OD(HW,n,this.style);a=l.x1,i=l.y1,o=l.x2,s=l.y2}else a=n.x1,i=n.y1,o=n.x2,s=n.y2;var u=n.percent;u!==0&&(t.moveTo(a,i),u<1&&(o=a*(1-u)+o*u,s=i*(1-u)+s*u),t.lineTo(o,s))},e.prototype.pointAt=function(t){var n=this.shape;return[n.x1*(1-t)+n.x2*t,n.y1*(1-t)+n.y2*t]},e}(ze);PM.prototype.type="line";var tr=PM,ln=[],WW=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return r}();function EM(r,e,t){var n=r.cpx2,a=r.cpy2;return n!=null||a!=null?[(t?_2:er)(r.x1,r.cpx1,r.cpx2,r.x2,e),(t?_2:er)(r.y1,r.cpy1,r.cpy2,r.y2,e)]:[(t?Jm:lr)(r.x1,r.cpx1,r.x2,e),(t?Jm:lr)(r.y1,r.cpy1,r.y2,e)]}var OM=function(r){bt(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 WW},e.prototype.buildPath=function(t,n){var a=n.x1,i=n.y1,o=n.x2,s=n.y2,l=n.cpx1,u=n.cpy1,c=n.cpx2,f=n.cpy2,h=n.percent;h!==0&&(t.moveTo(a,i),c==null||f==null?(h<1&&(Ac(a,l,o,h,ln),l=ln[1],o=ln[2],Ac(i,u,s,h,ln),u=ln[1],s=ln[2]),t.quadraticCurveTo(l,u,o,s)):(h<1&&(Yi(a,l,c,o,h,ln),l=ln[1],c=ln[2],o=ln[3],Yi(i,u,f,s,h,ln),u=ln[1],f=ln[2],s=ln[3]),t.bezierCurveTo(l,u,c,f,o,s)))},e.prototype.pointAt=function(t){return EM(this.shape,t,!1)},e.prototype.tangentAt=function(t){var n=EM(this.shape,t,!0);return jo(n,n)},e}(ze);OM.prototype.type="bezier-curve";var nf=OM,UW=function(){function r(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r}(),RM=function(r){bt(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 UW},e.prototype.buildPath=function(t,n){var a=n.cx,i=n.cy,o=Math.max(n.r,0),s=n.startAngle,l=n.endAngle,u=n.clockwise,c=Math.cos(s),f=Math.sin(s);t.moveTo(c*o+a,f*o+i),t.arc(a,i,o,s,l,!u)},e}(ze);RM.prototype.type="arc";var Sd=RM,jW=function(r){bt(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="compound",t}return e.prototype._updatePathDirty=function(){for(var t=this.shape.paths,n=this.shapeChanged(),a=0;a<t.length;a++)n=n||t[a].shapeChanged();n&&this.dirtyShape()},e.prototype.beforeBrush=function(){this._updatePathDirty();for(var t=this.shape.paths||[],n=this.getGlobalScale(),a=0;a<t.length;a++)t[a].path||t[a].createPathProxy(),t[a].path.setScale(n[0],n[1],t[a].segmentIgnoreThreshold)},e.prototype.buildPath=function(t,n){for(var a=n.paths||[],i=0;i<a.length;i++)a[i].buildPath(t,a[i].shape,!0)},e.prototype.afterBrush=function(){for(var t=this.shape.paths||[],n=0;n<t.length;n++)t[n].pathUpdated()},e.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),ze.prototype.getBoundingRect.call(this)},e}(ze),Cd=jW,YW=function(){function r(e){this.colorStops=e||[]}return r.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},r}(),NM=YW,qW=function(r){bt(e,r);function e(t,n,a,i,o,s){var l=r.call(this,o)||this;return l.x=t==null?0:t,l.y=n==null?0:n,l.x2=a==null?1:a,l.y2=i==null?0:i,l.type="linear",l.global=s||!1,l}return e}(NM),ql=qW,ZW=function(r){bt(e,r);function e(t,n,a,i,o){var s=r.call(this,i)||this;return s.x=t==null?.5:t,s.y=n==null?.5:n,s.r=a==null?.5:a,s.type="radial",s.global=o||!1,s}return e}(NM),y_=ZW,ms=[0,0],_s=[0,0],Td=new Ee,Dd=new Ee,XW=function(){function r(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new Ee;for(var n=0;n<2;n++)this._axes[n]=new Ee;e&&this.fromBoundingRect(e,t)}return r.prototype.fromBoundingRect=function(e,t){var n=this._corners,a=this._axes,i=e.x,o=e.y,s=i+e.width,l=o+e.height;if(n[0].set(i,o),n[1].set(s,o),n[2].set(s,l),n[3].set(i,l),t)for(var u=0;u<4;u++)n[u].transform(t);Ee.sub(a[0],n[1],n[0]),Ee.sub(a[1],n[3],n[0]),a[0].normalize(),a[1].normalize();for(var u=0;u<2;u++)this._origin[u]=a[u].dot(n[0])},r.prototype.intersect=function(e,t){var n=!0,a=!t;return Td.set(1/0,1/0),Dd.set(0,0),!this._intersectCheckOneSide(this,e,Td,Dd,a,1)&&(n=!1,a)||!this._intersectCheckOneSide(e,this,Td,Dd,a,-1)&&(n=!1,a)||a||Ee.copy(t,n?Td:Dd),n},r.prototype._intersectCheckOneSide=function(e,t,n,a,i,o){for(var s=!0,l=0;l<2;l++){var u=this._axes[l];if(this._getProjMinMaxOnAxis(l,e._corners,ms),this._getProjMinMaxOnAxis(l,t._corners,_s),ms[1]<_s[0]||ms[0]>_s[1]){if(s=!1,i)return s;var c=Math.abs(_s[0]-ms[1]),f=Math.abs(ms[0]-_s[1]);Math.min(c,f)>a.len()&&(c<f?Ee.scale(a,u,-c*o):Ee.scale(a,u,f*o))}else if(n){var c=Math.abs(_s[0]-ms[1]),f=Math.abs(ms[0]-_s[1]);Math.min(c,f)<n.len()&&(c<f?Ee.scale(n,u,c*o):Ee.scale(n,u,-f*o))}}return s},r.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var a=this._axes[e],i=this._origin,o=t[0].dot(a)+i[e],s=o,l=o,u=1;u<t.length;u++){var c=t[u].dot(a)+i[e];s=Math.min(c,s),l=Math.max(c,l)}n[0]=s,n[1]=l},r}(),Md=XW,QW=[],KW=function(r){bt(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.notClear=!0,t.incremental=!0,t._displayables=[],t._temporaryDisplayables=[],t._cursor=0,t}return e.prototype.traverse=function(t,n){t.call(n,this)},e.prototype.useStyle=function(){this.style={}},e.prototype.getCursor=function(){return this._cursor},e.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},e.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},e.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},e.prototype.addDisplayable=function(t,n){n?this._temporaryDisplayables.push(t):this._displayables.push(t),this.markRedraw()},e.prototype.addDisplayables=function(t,n){n=n||!1;for(var a=0;a<t.length;a++)this.addDisplayable(t[a],n)},e.prototype.getDisplayables=function(){return this._displayables},e.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},e.prototype.eachPendingDisplayable=function(t){for(var n=this._cursor;n<this._displayables.length;n++)t&&t(this._displayables[n]);for(var n=0;n<this._temporaryDisplayables.length;n++)t&&t(this._temporaryDisplayables[n])},e.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++){var n=this._displayables[t];n.parent=this,n.update(),n.parent=null}for(var t=0;t<this._temporaryDisplayables.length;t++){var n=this._temporaryDisplayables[t];n.parent=this,n.update(),n.parent=null}},e.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new Oe(1/0,1/0,-1/0,-1/0),n=0;n<this._displayables.length;n++){var a=this._displayables[n],i=a.getBoundingRect().clone();a.needLocalTransform()&&i.applyTransform(a.getLocalTransform(QW)),t.union(i)}this._rect=t}return this._rect},e.prototype.contain=function(t,n){var a=this.transformCoordToLocal(t,n),i=this.getBoundingRect();if(i.contain(a[0],a[1]))for(var o=0;o<this._displayables.length;o++){var s=this._displayables[o];if(s.contain(t,n))return!0}return!1},e}(Bn),kM=KW,zM=qe();function Zl(r,e,t,n,a){var i;if(e&&e.ecModel){var o=e.ecModel.getUpdatePayload();i=o&&o.animation}var s=e&&e.isAnimationEnabled(),l=r==="update";if(s){var u=void 0,c=void 0,f=void 0;n?(u=Pe(n.duration,200),c=Pe(n.easing,"cubicOut"),f=0):(u=e.getShallow(l?"animationDurationUpdate":"animationDuration"),c=e.getShallow(l?"animationEasingUpdate":"animationEasing"),f=e.getShallow(l?"animationDelayUpdate":"animationDelay")),i&&(i.duration!=null&&(u=i.duration),i.easing!=null&&(c=i.easing),i.delay!=null&&(f=i.delay)),ye(f)&&(f=f(t,a)),ye(u)&&(u=u(t));var h={duration:u||0,delay:f,easing:c};return h}else return null}function m_(r,e,t,n,a,i,o){var s=!1,l;ye(a)?(o=i,i=a,a=null):_e(a)&&(i=a.cb,o=a.during,s=a.isFrom,l=a.removeOpt,a=a.dataIndex);var u=r==="leave";u||e.stopAnimation("leave");var c=Zl(r,n,a,u?l||{}:null,n&&n.getAnimationDelayParams?n.getAnimationDelayParams(e,a):null);if(c&&c.duration>0){var f=c.duration,h=c.delay,v=c.easing,d={duration:f,delay:h||0,easing:v,done:i,force:!!i||!!o,setToFinal:!u,scope:r,during:o};s?e.animateFrom(t,d):e.animateTo(t,d)}else e.stopAnimation(),!s&&e.attr(t),o&&o(1),i&&i()}function Ze(r,e,t,n,a,i){m_("update",r,e,t,n,a,i)}function xt(r,e,t,n,a,i){m_("enter",r,e,t,n,a,i)}function Xl(r){if(!r.__zr)return!0;for(var e=0;e<r.animators.length;e++){var t=r.animators[e];if(t.scope==="leave")return!0}return!1}function ro(r,e,t,n,a,i){Xl(r)||m_("leave",r,e,t,n,a,i)}function BM(r,e,t,n){r.removeTextContent(),r.removeTextGuideLine(),ro(r,{style:{opacity:0}},e,t,n)}function af(r,e,t){function n(){r.parent&&r.parent.remove(r)}r.isGroup?r.traverse(function(a){a.isGroup||BM(a,e,t,n)}):BM(r,e,t,n)}function ga(r){zM(r).oldStyle=r.style}function JW(r){return zM(r).oldStyle}var Ad=Math.max,Ld=Math.min,__={};function FM(r){return ze.extend(r)}var e7=LW;function VM(r,e){return e7(r,e)}function Vn(r,e){__[r]=e}function Id(r){if(__.hasOwnProperty(r))return __[r]}function of(r,e,t,n){var a=xM(r,e);return t&&(n==="center"&&(t=$M(t,a.getBoundingRect())),x_(a,t)),a}function b_(r,e,t){var n=new ur({style:{image:r,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(a){if(t==="center"){var i={width:a.width,height:a.height};n.setStyle($M(e,i))}}});return n}function $M(r,e){var t=e.width/e.height,n=r.height*t,a;n<=r.width?a=r.height:(n=r.width,a=n/t);var i=r.x+r.width/2,o=r.y+r.height/2;return{x:i-n/2,y:o-a/2,width:n,height:a}}var Cn=IW;function x_(r,e){if(!!r.applyTransform){var t=r.getBoundingRect(),n=t.calculateTransform(e);r.applyTransform(n)}}function Ql(r,e){return OD(r,r,{lineWidth:e}),r}function t7(r){return RD(r.shape,r.shape,r.style),r}var Pd=vs;function no(r,e){for(var t=wc([]);r&&r!==e;)Ea(t,r.getLocalTransform(),t),r=r.parent;return t}function ya(r,e,t){return e&&!yr(e)&&(e=ui.getLocalTransform(e)),t&&(e=Yo([],e)),sr([],r,e)}function Ed(r,e,t){var n=e[4]===0||e[5]===0||e[0]===0?1:Math.abs(2*e[4]/e[0]),a=e[4]===0||e[5]===0||e[2]===0?1:Math.abs(2*e[4]/e[2]),i=[r==="left"?-n:r==="right"?n:0,r==="top"?-a:r==="bottom"?a:0];return i=ya(i,e,t),Math.abs(i[0])>Math.abs(i[1])?i[0]>0?"right":"left":i[1]>0?"bottom":"top"}function HM(r){return!r.isGroup}function r7(r){return r.shape!=null}function sf(r,e,t){if(!r||!e)return;function n(o){var s={};return o.traverse(function(l){HM(l)&&l.anid&&(s[l.anid]=l)}),s}function a(o){var s={x:o.x,y:o.y,rotation:o.rotation};return r7(o)&&(s.shape=Q({},o.shape)),s}var i=n(r);e.traverse(function(o){if(HM(o)&&o.anid){var s=i[o.anid];if(s){var l=a(o);o.attr(a(s)),Ze(o,l,t,Me(o).dataIndex)}}})}function w_(r,e){return ee(r,function(t){var n=t[0];n=Ad(n,e.x),n=Ld(n,e.x+e.width);var a=t[1];return a=Ad(a,e.y),a=Ld(a,e.y+e.height),[n,a]})}function GM(r,e){var t=Ad(r.x,e.x),n=Ld(r.x+r.width,e.x+e.width),a=Ad(r.y,e.y),i=Ld(r.y+r.height,e.y+e.height);if(n>=t&&i>=a)return{x:t,y:a,width:n-t,height:i-a}}function Kl(r,e,t){var n=Q({rectHover:!0},e),a=n.style={strokeNoScale:!0};if(t=t||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(a.image=r.slice(8),me(a,t),new ur(n)):of(r.replace("path://",""),n,t,"center")}function lf(r,e,t,n,a){for(var i=0,o=a[a.length-1];i<a.length;i++){var s=a[i];if(WM(r,e,t,n,s[0],s[1],o[0],o[1]))return!0;o=s}}function WM(r,e,t,n,a,i,o,s){var l=t-r,u=n-e,c=o-a,f=s-i,h=S_(c,f,l,u);if(n7(h))return!1;var v=r-a,d=e-i,p=S_(v,d,l,u)/h;if(p<0||p>1)return!1;var g=S_(v,d,c,f)/h;return!(g<0||g>1)}function S_(r,e,t,n){return r*n-t*e}function n7(r){return r<=1e-6&&r>=-1e-6}function Jl(r){var e=r.itemTooltipOption,t=r.componentModel,n=r.itemName,a=ce(e)?{formatter:e}:e,i=t.mainType,o=t.componentIndex,s={componentType:i,name:n,$vars:["name"]};s[i+"Index"]=o;var l=r.formatterParamsExtra;l&&L(Fe(l),function(c){he(s,c)||(s[c]=l[c],s.$vars.push(c))});var u=Me(r.el);u.componentMainType=i,u.componentIndex=o,u.tooltipConfig={name:n,option:me({content:n,formatterParams:s},a)}}function UM(r,e){var t;r.isGroup&&(t=e(r)),t||r.traverse(e)}function ao(r,e){if(r)if(J(r))for(var t=0;t<r.length;t++)UM(r[t],e);else UM(r,e)}Vn("circle",da),Vn("ellipse",xd),Vn("sector",Wr),Vn("ring",rf),Vn("polygon",Ur),Vn("polyline",jr),Vn("rect",Ge),Vn("line",tr),Vn("bezierCurve",nf),Vn("arc",Sd);var uf=Object.freeze(Object.defineProperty({__proto__:null,updateProps:Ze,initProps:xt,removeElement:ro,removeElementWithFadeOut:af,isElementRemoved:Xl,extendShape:FM,extendPath:VM,registerShape:Vn,getShapeClass:Id,makePath:of,makeImage:b_,mergePath:Cn,resizePath:x_,subPixelOptimizeLine:Ql,subPixelOptimizeRect:t7,subPixelOptimize:Pd,getTransform:no,applyTransform:ya,transformDirection:Ed,groupTransition:sf,clipPointsByRect:w_,clipRectByRect:GM,createIcon:Kl,linePolygonIntersect:lf,lineLineIntersect:WM,setTooltipConfig:Jl,traverseElements:ao,Group:Ce,Image:ur,Text:We,Circle:da,Ellipse:xd,Sector:Wr,Ring:rf,Polygon:Ur,Polyline:jr,Rect:Ge,Line:tr,BezierCurve:nf,Arc:Sd,IncrementalDisplayable:kM,CompoundPath:Cd,LinearGradient:ql,RadialGradient:y_,BoundingRect:Oe,OrientedBoundingRect:Md,Point:Ee,Path:ze},Symbol.toStringTag,{value:"Module"})),Od={};function jM(r,e){for(var t=0;t<Gr.length;t++){var n=Gr[t],a=e[n],i=r.ensureState(n);i.style=i.style||{},i.style.text=a}var o=r.currentStates.slice();r.clearStates(!0),r.setStyle({text:e.normal}),r.useStates(o,!0)}function C_(r,e,t){var n=r.labelFetcher,a=r.labelDataIndex,i=r.labelDimIndex,o=e.normal,s;n&&(s=n.getFormattedLabel(a,"normal",null,i,o&&o.get("formatter"),t!=null?{interpolatedValue:t}:null)),s==null&&(s=ye(r.defaultText)?r.defaultText(a,r,t):r.defaultText);for(var l={normal:s},u=0;u<Gr.length;u++){var c=Gr[u],f=e[c];l[c]=Pe(n?n.getFormattedLabel(a,c,null,i,f&&f.get("formatter")):null,s)}return l}function _r(r,e,t,n){t=t||Od;for(var a=r instanceof We,i=!1,o=0;o<Zc.length;o++){var s=e[Zc[o]];if(s&&s.getShallow("show")){i=!0;break}}var l=a?r:r.getTextContent();if(i){a||(l||(l=new We,r.setTextContent(l)),r.stateProxy&&(l.stateProxy=r.stateProxy));var u=C_(t,e),c=e.normal,f=!!c.getShallow("show"),h=pt(c,n&&n.normal,t,!1,!a);h.text=u.normal,a||r.setTextConfig(Rd(c,t,!1));for(var o=0;o<Gr.length;o++){var v=Gr[o],s=e[v];if(s){var d=l.ensureState(v),p=!!Pe(s.getShallow("show"),f);if(p!==f&&(d.ignore=!p),d.style=pt(s,n&&n[v],t,!0,!a),d.style.text=u[v],!a){var g=r.ensureState(v);g.textConfig=Rd(s,t,!0)}}}l.silent=!!c.getShallow("silent"),l.style.x!=null&&(h.x=l.style.x),l.style.y!=null&&(h.y=l.style.y),l.ignore=!f,l.useStyle(h),l.dirty(),t.enableTextSetter&&(eu(l).setLabelText=function(y){var m=C_(t,e,y);jM(l,m)})}else l&&(l.ignore=!0);r.dirty()}function rr(r,e){e=e||"label";for(var t={normal:r.getModel(e)},n=0;n<Gr.length;n++){var a=Gr[n];t[a]=r.getModel([a,e])}return t}function pt(r,e,t,n,a){var i={};return a7(i,r,t,n,a),e&&Q(i,e),i}function Rd(r,e,t){e=e||{};var n={},a,i=r.getShallow("rotate"),o=Pe(r.getShallow("distance"),t?null:5),s=r.getShallow("offset");return a=r.getShallow("position")||(t?null:"inside"),a==="outside"&&(a=e.defaultOutsidePosition||"top"),a!=null&&(n.position=a),s!=null&&(n.offset=s),i!=null&&(i*=Math.PI/180,n.rotation=i),o!=null&&(n.distance=o),n.outsideFill=r.get("color")==="inherit"?e.inheritColor||null:"auto",n}function a7(r,e,t,n,a){t=t||Od;var i=e.ecModel,o=i&&i.option.textStyle,s=i7(e),l;if(s){l={};for(var u in s)if(s.hasOwnProperty(u)){var c=e.getModel(["rich",u]);XM(l[u]={},c,o,t,n,a,!1,!0)}}l&&(r.rich=l);var f=e.get("overflow");f&&(r.overflow=f);var h=e.get("minMargin");h!=null&&(r.margin=h),XM(r,e,o,t,n,a,!0,!1)}function i7(r){for(var e;r&&r!==r.ecModel;){var t=(r.option||Od).rich;if(t){e=e||{};for(var n=Fe(t),a=0;a<n.length;a++){var i=n[a];e[i]=1}}r=r.parentModel}return e}var YM=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],qM=["align","lineHeight","width","height","tag","verticalAlign"],ZM=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function XM(r,e,t,n,a,i,o,s){t=!a&&t||Od;var l=n&&n.inheritColor,u=e.getShallow("color"),c=e.getShallow("textBorderColor"),f=Pe(e.getShallow("opacity"),t.opacity);(u==="inherit"||u==="auto")&&(l?u=l:u=null),(c==="inherit"||c==="auto")&&(l?c=l:c=null),i||(u=u||t.color,c=c||t.textBorderColor),u!=null&&(r.fill=u),c!=null&&(r.stroke=c);var h=Pe(e.getShallow("textBorderWidth"),t.textBorderWidth);h!=null&&(r.lineWidth=h);var v=Pe(e.getShallow("textBorderType"),t.textBorderType);v!=null&&(r.lineDash=v);var d=Pe(e.getShallow("textBorderDashOffset"),t.textBorderDashOffset);d!=null&&(r.lineDashOffset=d),!a&&f==null&&!s&&(f=n&&n.defaultOpacity),f!=null&&(r.opacity=f),!a&&!i&&r.fill==null&&n.inheritColor&&(r.fill=n.inheritColor);for(var p=0;p<YM.length;p++){var g=YM[p],y=Pe(e.getShallow(g),t[g]);y!=null&&(r[g]=y)}for(var p=0;p<qM.length;p++){var g=qM[p],y=e.getShallow(g);y!=null&&(r[g]=y)}if(r.verticalAlign==null){var m=e.getShallow("baseline");m!=null&&(r.verticalAlign=m)}if(!o||!n.disableBox){for(var p=0;p<ZM.length;p++){var g=ZM[p],y=e.getShallow(g);y!=null&&(r[g]=y)}var _=e.getShallow("borderType");_!=null&&(r.borderDash=_),(r.backgroundColor==="auto"||r.backgroundColor==="inherit")&&l&&(r.backgroundColor=l),(r.borderColor==="auto"||r.borderColor==="inherit")&&l&&(r.borderColor=l)}}function QM(r,e){var t=e&&e.getModel("textStyle");return On([r.fontStyle||t&&t.getShallow("fontStyle")||"",r.fontWeight||t&&t.getShallow("fontWeight")||"",(r.fontSize||t&&t.getShallow("fontSize")||12)+"px",r.fontFamily||t&&t.getShallow("fontFamily")||"sans-serif"].join(" "))}var eu=qe();function KM(r,e,t,n){if(!!r){var a=eu(r);a.prevValue=a.value,a.value=t;var i=e.normal;a.valueAnimation=i.get("valueAnimation"),a.valueAnimation&&(a.precision=i.get("precision"),a.defaultInterpolatedText=n,a.statesModels=e)}}function JM(r,e,t,n,a){var i=eu(r);if(!i.valueAnimation||i.prevValue===i.value)return;var o=i.defaultInterpolatedText,s=Pe(i.interpolatedValue,i.prevValue),l=i.value;function u(c){var f=dD(t,i.precision,s,l,c);i.interpolatedValue=c===1?null:f;var h=C_({labelDataIndex:e,labelFetcher:a,defaultText:o?o(f):f+""},i.statesModels,f);jM(r,h)}r.percent=0,(i.prevValue==null?xt:Ze)(r,{percent:1},n,e,null,u)}var o7=["textStyle","color"],T_=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],D_=new We,s7=function(){function r(){}return r.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow("color")||(!e&&t?t.get(o7):null)},r.prototype.getFont=function(){return QM({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},r.prototype.getTextRect=function(e){for(var t={text:e,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},n=0;n<T_.length;n++)t[T_[n]]=this.getShallow(T_[n]);return D_.useStyle(t),D_.update(),D_.getBoundingRect()},r}(),l7=s7,eA=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],u7=is(eA),c7=function(){function r(){}return r.prototype.getLineStyle=function(e){return u7(this,e)},r}(),tA=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],f7=is(tA),h7=function(){function r(){}return r.prototype.getItemStyle=function(e,t){return f7(this,e,t)},r}(),bs=function(){function r(e,t,n){this.parentModel=t,this.ecModel=n,this.option=e}return r.prototype.init=function(e,t,n){},r.prototype.mergeOption=function(e,t){Ie(this.option,e,!0)},r.prototype.get=function(e,t){return e==null?this.option:this._doGet(this.parsePath(e),!t&&this.parentModel)},r.prototype.getShallow=function(e,t){var n=this.option,a=n==null?n:n[e];if(a==null&&!t){var i=this.parentModel;i&&(a=i.getShallow(e))}return a},r.prototype.getModel=function(e,t){var n=e!=null,a=n?this.parsePath(e):null,i=n?this._doGet(a):this.option;return t=t||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(a)),new r(i,t,this.ecModel)},r.prototype.isEmpty=function(){return this.option==null},r.prototype.restoreData=function(){},r.prototype.clone=function(){var e=this.constructor;return new e(xe(this.option))},r.prototype.parsePath=function(e){return typeof e=="string"?e.split("."):e},r.prototype.resolveParentPath=function(e){return e},r.prototype.isAnimationEnabled=function(){if(!je.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},r.prototype._doGet=function(e,t){var n=this.option;if(!e)return n;for(var a=0;a<e.length&&!(!!e[a]&&(n=n&&typeof n=="object"?n[e[a]]:null,n==null));a++);return n==null&&t&&(n=t._doGet(this.resolveParentPath(e),t.parentModel)),n},r}();F0(bs),g8(bs),Pt(bs,c7),Pt(bs,h7),Pt(bs,x8),Pt(bs,l7);var ft=bs,v7=Math.round(Math.random()*10);function tu(r){return[r||"",v7++].join("_")}function d7(r){var e={};r.registerSubTypeDefaulter=function(t,n){var a=ka(t);e[a.main]=n},r.determineSubType=function(t,n){var a=n.type;if(!a){var i=ka(t).main;r.hasSubTypes(t)&&e[i]&&(a=e[i](n))}return a}}function p7(r,e){r.topologicalTravel=function(i,o,s,l){if(!i.length)return;var u=t(o),c=u.graph,f=u.noEntryList,h={};for(L(i,function(m){h[m]=!0});f.length;){var v=f.pop(),d=c[v],p=!!h[v];p&&(s.call(l,v,d.originalDeps.slice()),delete h[v]),L(d.successor,p?y:g)}L(h,function(){var m="";throw new Error(m)});function g(m){c[m].entryCount--,c[m].entryCount===0&&f.push(m)}function y(m){h[m]=!0,g(m)}};function t(i){var o={},s=[];return L(i,function(l){var u=n(o,l),c=u.originalDeps=e(l),f=a(c,i);u.entryCount=f.length,u.entryCount===0&&s.push(l),L(f,function(h){Ne(u.predecessor,h)<0&&u.predecessor.push(h);var v=n(o,h);Ne(v.successor,h)<0&&v.successor.push(l)})}),{graph:o,noEntryList:s}}function n(i,o){return i[o]||(i[o]={predecessor:[],successor:[]}),i[o]}function a(i,o){var s=[];return L(i,function(l){Ne(o,l)>=0&&s.push(l)}),s}}function io(r,e){return Ie(Ie({},r,!0),e,!0)}var g7={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}},y7={time:{month:["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"],monthAbbr:["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],dayOfWeek:["\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"],dayOfWeekAbbr:["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"]},legend:{selector:{all:"\u5168\u9009",inverse:"\u53CD\u9009"}},toolbox:{brush:{title:{rect:"\u77E9\u5F62\u9009\u62E9",polygon:"\u5708\u9009",lineX:"\u6A2A\u5411\u9009\u62E9",lineY:"\u7EB5\u5411\u9009\u62E9",keep:"\u4FDD\u6301\u9009\u62E9",clear:"\u6E05\u9664\u9009\u62E9"}},dataView:{title:"\u6570\u636E\u89C6\u56FE",lang:["\u6570\u636E\u89C6\u56FE","\u5173\u95ED","\u5237\u65B0"]},dataZoom:{title:{zoom:"\u533A\u57DF\u7F29\u653E",back:"\u533A\u57DF\u7F29\u653E\u8FD8\u539F"}},magicType:{title:{line:"\u5207\u6362\u4E3A\u6298\u7EBF\u56FE",bar:"\u5207\u6362\u4E3A\u67F1\u72B6\u56FE",stack:"\u5207\u6362\u4E3A\u5806\u53E0",tiled:"\u5207\u6362\u4E3A\u5E73\u94FA"}},restore:{title:"\u8FD8\u539F"},saveAsImage:{title:"\u4FDD\u5B58\u4E3A\u56FE\u7247",lang:["\u53F3\u952E\u53E6\u5B58\u4E3A\u56FE\u7247"]}},series:{typeNames:{pie:"\u997C\u56FE",bar:"\u67F1\u72B6\u56FE",line:"\u6298\u7EBF\u56FE",scatter:"\u6563\u70B9\u56FE",effectScatter:"\u6D9F\u6F2A\u6563\u70B9\u56FE",radar:"\u96F7\u8FBE\u56FE",tree:"\u6811\u56FE",treemap:"\u77E9\u5F62\u6811\u56FE",boxplot:"\u7BB1\u578B\u56FE",candlestick:"K\u7EBF\u56FE",k:"K\u7EBF\u56FE",heatmap:"\u70ED\u529B\u56FE",map:"\u5730\u56FE",parallel:"\u5E73\u884C\u5750\u6807\u56FE",lines:"\u7EBF\u56FE",graph:"\u5173\u7CFB\u56FE",sankey:"\u6851\u57FA\u56FE",funnel:"\u6F0F\u6597\u56FE",gauge:"\u4EEA\u8868\u76D8\u56FE",pictorialBar:"\u8C61\u5F62\u67F1\u56FE",themeRiver:"\u4E3B\u9898\u6CB3\u6D41\u56FE",sunburst:"\u65ED\u65E5\u56FE"}},aria:{general:{withTitle:"\u8FD9\u662F\u4E00\u4E2A\u5173\u4E8E\u201C{title}\u201D\u7684\u56FE\u8868\u3002",withoutTitle:"\u8FD9\u662F\u4E00\u4E2A\u56FE\u8868\uFF0C"},series:{single:{prefix:"",withName:"\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\uFF0C\u8868\u793A{seriesName}\u3002",withoutName:"\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\u3002"},multiple:{prefix:"\u5B83\u7531{seriesCount}\u4E2A\u56FE\u8868\u7CFB\u5217\u7EC4\u6210\u3002",withName:"\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A\u8868\u793A{seriesName}\u7684{seriesType}\uFF0C",withoutName:"\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A{seriesType}\uFF0C",separator:{middle:"\uFF1B",end:"\u3002"}}},data:{allData:"\u5176\u6570\u636E\u662F\u2014\u2014",partialData:"\u5176\u4E2D\uFF0C\u524D{displayCnt}\u9879\u662F\u2014\u2014",withName:"{name}\u7684\u6570\u636E\u662F{value}",withoutName:"{value}",separator:{middle:"\uFF0C",end:""}}}},Nd="ZH",M_="EN",cf=M_,kd={},A_={},rA=je.domSupported?function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage).toUpperCase();return r.indexOf(Nd)>-1?Nd:cf}():cf;function L_(r,e){r=r.toUpperCase(),A_[r]=new ft(e),kd[r]=e}function m7(r){if(ce(r)){var e=kd[r.toUpperCase()]||{};return r===Nd||r===M_?xe(e):Ie(xe(e),xe(kd[cf]),!1)}else return Ie(xe(r),xe(kd[cf]),!1)}function I_(r){return A_[r]}function _7(){return A_[cf]}L_(M_,g7),L_(Nd,y7);var P_=1e3,E_=P_*60,ff=E_*60,$n=ff*24,nA=$n*365,hf={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},zd="{yyyy}-{MM}-{dd}",aA={year:"{yyyy}",month:"{yyyy}-{MM}",day:zd,hour:zd+" "+hf.hour,minute:zd+" "+hf.minute,second:zd+" "+hf.second,millisecond:hf.none},O_=["year","month","day","hour","minute","second","millisecond"],iA=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function un(r,e){return r+="","0000".substr(0,e-r.length)+r}function ru(r){switch(r){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return r}}function b7(r){return r===ru(r)}function x7(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function vf(r,e,t,n){var a=Sn(r),i=a[R_(t)](),o=a[nu(t)]()+1,s=Math.floor((o-1)/3)+1,l=a[Bd(t)](),u=a["get"+(t?"UTC":"")+"Day"](),c=a[df(t)](),f=(c-1)%12+1,h=a[Fd(t)](),v=a[Vd(t)](),d=a[$d(t)](),p=n instanceof ft?n:I_(n||rA)||_7(),g=p.getModel("time"),y=g.get("month"),m=g.get("monthAbbr"),_=g.get("dayOfWeek"),b=g.get("dayOfWeekAbbr");return(e||"").replace(/{yyyy}/g,i+"").replace(/{yy}/g,i%100+"").replace(/{Q}/g,s+"").replace(/{MMMM}/g,y[o-1]).replace(/{MMM}/g,m[o-1]).replace(/{MM}/g,un(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,un(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,_[u]).replace(/{ee}/g,b[u]).replace(/{e}/g,u+"").replace(/{HH}/g,un(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,un(f+"",2)).replace(/{h}/g,f+"").replace(/{mm}/g,un(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,un(v,2)).replace(/{s}/g,v+"").replace(/{SSS}/g,un(d,3)).replace(/{S}/g,d+"")}function w7(r,e,t,n,a){var i=null;if(ce(t))i=t;else if(ye(t))i=t(r.value,e,{level:r.level});else{var o=Q({},hf);if(r.level>0)for(var s=0;s<O_.length;++s)o[O_[s]]="{primary|"+o[O_[s]]+"}";var l=t?t.inherit===!1?t:me(t,o):o,u=oA(r.value,a);if(l[u])i=l[u];else if(l.inherit){for(var c=iA.indexOf(u),s=c-1;s>=0;--s)if(l[u]){i=l[u];break}i=i||o.none}if(J(i)){var f=r.level==null?0:r.level>=0?r.level:i.length+r.level;f=Math.min(f,i.length-1),i=i[f]}}return vf(new Date(r.value),i,a,n)}function oA(r,e){var t=Sn(r),n=t[nu(e)]()+1,a=t[Bd(e)](),i=t[df(e)](),o=t[Fd(e)](),s=t[Vd(e)](),l=t[$d(e)](),u=l===0,c=u&&s===0,f=c&&o===0,h=f&&i===0,v=h&&a===1,d=v&&n===1;return d?"year":v?"month":h?"day":f?"hour":c?"minute":u?"second":"millisecond"}function sA(r,e,t){var n=Ye(r)?Sn(r):r;switch(e=e||oA(r,t),e){case"year":return n[R_(t)]();case"half-year":return n[nu(t)]()>=6?1:0;case"quarter":return Math.floor((n[nu(t)]()+1)/4);case"month":return n[nu(t)]();case"day":return n[Bd(t)]();case"half-day":return n[df(t)]()/24;case"hour":return n[df(t)]();case"minute":return n[Fd(t)]();case"second":return n[Vd(t)]();case"millisecond":return n[$d(t)]()}}function R_(r){return r?"getUTCFullYear":"getFullYear"}function nu(r){return r?"getUTCMonth":"getMonth"}function Bd(r){return r?"getUTCDate":"getDate"}function df(r){return r?"getUTCHours":"getHours"}function Fd(r){return r?"getUTCMinutes":"getMinutes"}function Vd(r){return r?"getUTCSeconds":"getSeconds"}function $d(r){return r?"getUTCMilliseconds":"getMilliseconds"}function S7(r){return r?"setUTCFullYear":"setFullYear"}function lA(r){return r?"setUTCMonth":"setMonth"}function uA(r){return r?"setUTCDate":"setDate"}function cA(r){return r?"setUTCHours":"setHours"}function fA(r){return r?"setUTCMinutes":"setMinutes"}function hA(r){return r?"setUTCSeconds":"setSeconds"}function vA(r){return r?"setUTCMilliseconds":"setMilliseconds"}function C7(r,e,t,n,a,i,o,s){var l=new We({style:{text:r,font:e,align:t,verticalAlign:n,padding:a,rich:i,overflow:o?"truncate":null,lineHeight:s}});return l.getBoundingRect()}function N_(r){if(!N0(r))return ce(r)?r:"-";var e=(r+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function k_(r,e){return r=(r||"").toLowerCase().replace(/-(.)/g,function(t,n){return n.toUpperCase()}),e&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var xs=Iv;function z_(r,e,t){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function a(c){return c&&On(c)?c:"-"}function i(c){return!!(c!=null&&!isNaN(c)&&isFinite(c))}var o=e==="time",s=r instanceof Date;if(o||s){var l=o?Sn(r):r;if(isNaN(+l)){if(s)return"-"}else return vf(l,n,t)}if(e==="ordinal")return Av(r)?a(r):Ye(r)&&i(r)?r+"":"-";var u=Na(r);return i(u)?N_(u):Av(r)?a(r):typeof r=="boolean"?r+"":"-"}var dA=["a","b","c","d","e","f","g"],B_=function(r,e){return"{"+r+(e==null?"":e)+"}"};function F_(r,e,t){J(e)||(e=[e]);var n=e.length;if(!n)return"";for(var a=e[0].$vars||[],i=0;i<a.length;i++){var o=dA[i];r=r.replace(B_(o),B_(o,0))}for(var s=0;s<n;s++)for(var l=0;l<a.length;l++){var u=e[s][a[l]];r=r.replace(B_(dA[l],s),t?Vr(u):u)}return r}function T7(r,e,t){return L(e,function(n,a){r=r.replace("{"+a+"}",t?Vr(n):n)}),r}function pA(r,e){var t=ce(r)?{color:r,extraCssText:e}:r||{},n=t.color,a=t.type;e=t.extraCssText;var i=t.renderMode||"html";if(!n)return"";if(i==="html")return a==="subItem"?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+Vr(n)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+Vr(n)+";"+(e||"")+'"></span>';var o=t.markerId||"markerX";return{renderMode:i,content:"{"+o+"|} ",style:a==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}}function D7(r,e,t){(r==="week"||r==="month"||r==="quarter"||r==="half-year"||r==="year")&&(r=`MM-dd
213
- yyyy`);var n=Sn(e),a=t?"getUTC":"get",i=n[a+"FullYear"](),o=n[a+"Month"]()+1,s=n[a+"Date"](),l=n[a+"Hours"](),u=n[a+"Minutes"](),c=n[a+"Seconds"](),f=n[a+"Milliseconds"]();return r=r.replace("MM",un(o,2)).replace("M",o).replace("yyyy",i).replace("yy",un(i%100+"",2)).replace("dd",un(s,2)).replace("d",s).replace("hh",un(l,2)).replace("h",l).replace("mm",un(u,2)).replace("m",u).replace("ss",un(c,2)).replace("s",c).replace("SSS",un(f,3)),r}function M7(r){return r&&r.charAt(0).toUpperCase()+r.substr(1)}function ws(r,e){return e=e||"transparent",ce(r)?r:_e(r)&&r.colorStops&&(r.colorStops[0]||{}).color||e}function Hd(r,e){if(e==="_blank"||e==="blank"){var t=window.open();t.opener=null,t.location.href=r}else window.open(r,e)}var Gd=L,gA=["left","right","top","bottom","width","height"],Ss=[["width","left","right"],["height","top","bottom"]];function V_(r,e,t,n,a){var i=0,o=0;n==null&&(n=1/0),a==null&&(a=1/0);var s=0;e.eachChild(function(l,u){var c=l.getBoundingRect(),f=e.childAt(u+1),h=f&&f.getBoundingRect(),v,d;if(r==="horizontal"){var p=c.width+(h?-h.x+c.x:0);v=i+p,v>n||l.newline?(i=0,v=p,o+=s+t,s=c.height):s=Math.max(s,c.height)}else{var g=c.height+(h?-h.y+c.y:0);d=o+g,d>a||l.newline?(i+=s+t,o=0,d=g,s=c.width):s=Math.max(s,c.width)}l.newline||(l.x=i,l.y=o,l.markRedraw(),r==="horizontal"?i=v+t:o=d+t)})}var Cs=V_;Ae(V_,"vertical"),Ae(V_,"horizontal");function A7(r,e,t){var n=e.width,a=e.height,i=le(r.left,n),o=le(r.top,a),s=le(r.right,n),l=le(r.bottom,a);return(isNaN(i)||isNaN(parseFloat(r.left)))&&(i=0),(isNaN(s)||isNaN(parseFloat(r.right)))&&(s=n),(isNaN(o)||isNaN(parseFloat(r.top)))&&(o=0),(isNaN(l)||isNaN(parseFloat(r.bottom)))&&(l=a),t=xs(t||0),{width:Math.max(s-i-t[1]-t[3],0),height:Math.max(l-o-t[0]-t[2],0)}}function Ut(r,e,t){t=xs(t||0);var n=e.width,a=e.height,i=le(r.left,n),o=le(r.top,a),s=le(r.right,n),l=le(r.bottom,a),u=le(r.width,n),c=le(r.height,a),f=t[2]+t[0],h=t[1]+t[3],v=r.aspect;switch(isNaN(u)&&(u=n-s-h-i),isNaN(c)&&(c=a-l-f-o),v!=null&&(isNaN(u)&&isNaN(c)&&(v>n/a?u=n*.8:c=a*.8),isNaN(u)&&(u=v*c),isNaN(c)&&(c=u/v)),isNaN(i)&&(i=n-s-u-h),isNaN(o)&&(o=a-l-c-f),r.left||r.right){case"center":i=n/2-u/2-t[3];break;case"right":i=n-u-h;break}switch(r.top||r.bottom){case"middle":case"center":o=a/2-c/2-t[0];break;case"bottom":o=a-c-f;break}i=i||0,o=o||0,isNaN(u)&&(u=n-h-i-(s||0)),isNaN(c)&&(c=a-f-o-(l||0));var d=new Oe(i+t[3],o+t[0],u,c);return d.margin=t,d}function Wd(r,e,t,n,a,i){var o=!a||!a.hv||a.hv[0],s=!a||!a.hv||a.hv[1],l=a&&a.boundingMode||"all";if(i=i||r,i.x=r.x,i.y=r.y,!o&&!s)return!1;var u;if(l==="raw")u=r.type==="group"?new Oe(0,0,+e.width||0,+e.height||0):r.getBoundingRect();else if(u=r.getBoundingRect(),r.needLocalTransform()){var c=r.getLocalTransform();u=u.clone(),u.applyTransform(c)}var f=Ut(me({width:u.width,height:u.height},e),t,n),h=o?f.x-u.x:0,v=s?f.y-u.y:0;return l==="raw"?(i.x=h,i.y=v):(i.x+=h,i.y+=v),i===r&&r.markRedraw(),!0}function L7(r,e){return r[Ss[e][0]]!=null||r[Ss[e][1]]!=null&&r[Ss[e][2]]!=null}function pf(r){var e=r.layoutMode||r.constructor.layoutMode;return _e(e)?e:e?{type:e}:null}function oo(r,e,t){var n=t&&t.ignoreSize;!J(n)&&(n=[n,n]);var a=o(Ss[0],0),i=o(Ss[1],1);u(Ss[0],r,a),u(Ss[1],r,i);function o(c,f){var h={},v=0,d={},p=0,g=2;if(Gd(c,function(_){d[_]=r[_]}),Gd(c,function(_){s(e,_)&&(h[_]=d[_]=e[_]),l(h,_)&&v++,l(d,_)&&p++}),n[f])return l(e,c[1])?d[c[2]]=null:l(e,c[2])&&(d[c[1]]=null),d;if(p===g||!v)return d;if(v>=g)return h;for(var y=0;y<c.length;y++){var m=c[y];if(!s(h,m)&&s(r,m)){h[m]=r[m];break}}return h}function s(c,f){return c.hasOwnProperty(f)}function l(c,f){return c[f]!=null&&c[f]!=="auto"}function u(c,f,h){Gd(c,function(v){f[v]=h[v]})}}function au(r){return yA({},r)}function yA(r,e){return e&&r&&Gd(gA,function(t){e.hasOwnProperty(t)&&(r[t]=e[t])}),r}var I7=qe(),iu=function(r){j(e,r);function e(t,n,a){var i=r.call(this,t,n,a)||this;return i.uid=tu("ec_cpt_model"),i}return e.prototype.init=function(t,n,a){this.mergeDefaultAndTheme(t,a)},e.prototype.mergeDefaultAndTheme=function(t,n){var a=pf(this),i=a?au(t):{},o=n.getTheme();Ie(t,o.get(this.mainType)),Ie(t,this.getDefaultOption()),a&&oo(t,i,a)},e.prototype.mergeOption=function(t,n){Ie(this.option,t,!0);var a=pf(this);a&&oo(this.option,t,a)},e.prototype.optionUpdated=function(t,n){},e.prototype.getDefaultOption=function(){var t=this.constructor;if(!v8(t))return t.defaultOption;var n=I7(this);if(!n.defaultOption){for(var a=[],i=t;i;){var o=i.prototype.defaultOption;o&&a.push(o),i=i.superClass}for(var s={},l=a.length-1;l>=0;l--)s=Ie(s,a[l],!0);n.defaultOption=s}return n.defaultOption},e.prototype.getReferringComponents=function(t,n){var a=t+"Index",i=t+"Id";return Wc(this.ecModel,t,{index:this.get(a,!0),id:this.get(i,!0)},n)},e.prototype.getBoxLayoutParams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(t){this.option.zlevel=t},e.protoInitialize=function(){var t=e.prototype;t.type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0}(),e}(ft);gD(iu,ft),od(iu),d7(iu),p7(iu,P7);function P7(r){var e=[];return L(iu.getClassesByMainType(r),function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])}),e=ee(e,function(t){return ka(t).main}),r!=="dataset"&&Ne(e,"dataset")<=0&&e.unshift("dataset"),e}var $e=iu,mA="";typeof navigator!="undefined"&&(mA=navigator.platform||"");var ou="rgba(0, 0, 0, 0.2)",E7={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:ou,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:ou,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:ou,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:ou,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:ou,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:ou,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:mA.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},_A=ge(["tooltip","label","itemName","itemId","itemGroupId","seriesName"]),Hn="original",Pr="arrayRows",Gn="objectRows",Ha="keyedColumns",so="typedArray",bA="unknown",Ga="column",su="row",br={Must:1,Might:2,Not:3},xA=qe();function O7(r){xA(r).datasetMap=ge()}function wA(r,e,t){var n={},a=H_(e);if(!a||!r)return n;var i=[],o=[],s=e.ecModel,l=xA(s).datasetMap,u=a.uid+"_"+t.seriesLayoutBy,c,f;r=r.slice(),L(r,function(p,g){var y=_e(p)?p:r[g]={name:p};y.type==="ordinal"&&c==null&&(c=g,f=d(y)),n[y.name]=[]});var h=l.get(u)||l.set(u,{categoryWayDim:f,valueWayDim:0});L(r,function(p,g){var y=p.name,m=d(p);if(c==null){var _=h.valueWayDim;v(n[y],_,m),v(o,_,m),h.valueWayDim+=m}else if(c===g)v(n[y],0,m),v(i,0,m);else{var _=h.categoryWayDim;v(n[y],_,m),v(o,_,m),h.categoryWayDim+=m}});function v(p,g,y){for(var m=0;m<y;m++)p.push(g+m)}function d(p){var g=p.dimsDef;return g?g.length:1}return i.length&&(n.itemName=i),o.length&&(n.seriesName=o),n}function $_(r,e,t){var n={},a=H_(r);if(!a)return n;var i=e.sourceFormat,o=e.dimensionsDefine,s;(i===Gn||i===Ha)&&L(o,function(c,f){(_e(c)?c.name:c)==="name"&&(s=f)});var l=function(){for(var c={},f={},h=[],v=0,d=Math.min(5,t);v<d;v++){var p=CA(e.data,i,e.seriesLayoutBy,o,e.startIndex,v);h.push(p);var g=p===br.Not;if(g&&c.v==null&&v!==s&&(c.v=v),(c.n==null||c.n===c.v||!g&&h[c.n]===br.Not)&&(c.n=v),y(c)&&h[c.n]!==br.Not)return c;g||(p===br.Might&&f.v==null&&v!==s&&(f.v=v),(f.n==null||f.n===f.v)&&(f.n=v))}function y(m){return m.v!=null&&m.n!=null}return y(c)?c:y(f)?f:null}();if(l){n.value=[l.v];var u=s!=null?s:l.n;n.itemName=[u],n.seriesName=[u]}return n}function H_(r){var e=r.get("data",!0);if(!e)return Wc(r.ecModel,"dataset",{index:r.get("datasetIndex",!0),id:r.get("datasetId",!0)},Wt).models[0]}function R7(r){return!r.get("transform",!0)&&!r.get("fromTransformResult",!0)?[]:Wc(r.ecModel,"dataset",{index:r.get("fromDatasetIndex",!0),id:r.get("fromDatasetId",!0)},Wt).models}function SA(r,e){return CA(r.data,r.sourceFormat,r.seriesLayoutBy,r.dimensionsDefine,r.startIndex,e)}function CA(r,e,t,n,a,i){var o,s=5;if(an(r))return br.Not;var l,u;if(n){var c=n[i];_e(c)?(l=c.name,u=c.type):ce(c)&&(l=c)}if(u!=null)return u==="ordinal"?br.Must:br.Not;if(e===Pr){var f=r;if(t===su){for(var h=f[i],v=0;v<(h||[]).length&&v<s;v++)if((o=b(h[a+v]))!=null)return o}else for(var v=0;v<f.length&&v<s;v++){var d=f[a+v];if(d&&(o=b(d[i]))!=null)return o}}else if(e===Gn){var p=r;if(!l)return br.Not;for(var v=0;v<p.length&&v<s;v++){var g=p[v];if(g&&(o=b(g[l]))!=null)return o}}else if(e===Ha){var y=r;if(!l)return br.Not;var h=y[l];if(!h||an(h))return br.Not;for(var v=0;v<h.length&&v<s;v++)if((o=b(h[v]))!=null)return o}else if(e===Hn)for(var m=r,v=0;v<m.length&&v<s;v++){var g=m[v],_=Hl(g);if(!J(_))return br.Not;if((o=b(_[i]))!=null)return o}function b(w){var x=ce(w);if(w!=null&&isFinite(w)&&w!=="")return x?br.Might:br.Not;if(x&&w!=="-")return br.Must}return br.Not}var G_=ge();function N7(r,e){Ar(G_.get(r)==null&&e),G_.set(r,e)}function k7(r,e,t){var n=G_.get(e);if(!n)return t;var a=n(r);return a?t.concat(a):t}var TA=qe(),z7=qe(),W_=function(){function r(){}return r.prototype.getColorFromPalette=function(e,t,n){var a=ct(this.get("color",!0)),i=this.get("colorLayer",!0);return DA(this,TA,a,i,e,t,n)},r.prototype.clearColorPalette=function(){F7(this,TA)},r}();function U_(r,e,t,n){var a=ct(r.get(["aria","decal","decals"]));return DA(r,z7,a,null,e,t,n)}function B7(r,e){for(var t=r.length,n=0;n<t;n++)if(r[n].length>e)return r[n];return r[t-1]}function DA(r,e,t,n,a,i,o){i=i||r;var s=e(i),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(a))return u[a];var c=o==null||!n?t:B7(n,o);if(c=c||t,!(!c||!c.length)){var f=c[l];return a&&(u[a]=f),s.paletteIdx=(l+1)%c.length,f}}function F7(r,e){e(r).paletteIdx=0,e(r).paletteNameMap={}}var Ud,gf,MA,AA="\0_ec_inner",V7=1,LA=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t,n,a,i,o,s){i=i||{},this.option=null,this._theme=new ft(i),this._locale=new ft(o),this._optionManager=s},e.prototype.setOption=function(t,n,a){var i=EA(n);this._optionManager.setOption(t,a,i),this._resetOption(null,i)},e.prototype.resetOption=function(t,n){return this._resetOption(t,EA(n))},e.prototype._resetOption=function(t,n){var a=!1,i=this._optionManager;if(!t||t==="recreate"){var o=i.mountOption(t==="recreate");!this.option||t==="recreate"?MA(this,o):(this.restoreData(),this._mergeOption(o,n)),a=!0}if((t==="timeline"||t==="media")&&this.restoreData(),!t||t==="recreate"||t==="timeline"){var s=i.getTimelineOption(this);s&&(a=!0,this._mergeOption(s,n))}if(!t||t==="recreate"||t==="media"){var l=i.getMediaOption(this);l.length&&L(l,function(u){a=!0,this._mergeOption(u,n)},this)}return a},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,n){var a=this.option,i=this._componentsMap,o=this._componentsCount,s=[],l=ge(),u=n&&n.replaceMergeMainTypeMap;O7(this),L(t,function(f,h){f!=null&&($e.hasClass(h)?h&&(s.push(h),l.set(h,!0)):a[h]=a[h]==null?xe(f):Ie(a[h],f,!0))}),u&&u.each(function(f,h){$e.hasClass(h)&&!l.get(h)&&(s.push(h),l.set(h,!0))}),$e.topologicalTravel(s,$e.getAllClassMainTypes(),c,this);function c(f){var h=k7(this,f,ct(t[f])),v=i.get(f),d=v?u&&u.get(f)?"replaceMerge":"normalMerge":"replaceAll",p=fD(v,h,d);a8(p,f,$e),a[f]=null,i.set(f,null),o.set(f,0);var g=[],y=[],m=0,_;L(p,function(b,w){var x=b.existing,S=b.newOption;if(!S)x&&(x.mergeOption({},this),x.optionUpdated({},!1));else{var T=f==="series",D=$e.getClass(f,b.keyInfo.subType,!T);if(!D)return;if(f==="tooltip"){if(_)return;_=!0}if(x&&x.constructor===D)x.name=b.keyInfo.name,x.mergeOption(S,this),x.optionUpdated(S,!1);else{var M=Q({componentIndex:w},b.keyInfo);x=new D(S,this,this,M),Q(x,M),b.brandNew&&(x.__requireNewView=!0),x.init(S,this,this),x.optionUpdated(null,!0)}}x?(g.push(x.option),y.push(x),m++):(g.push(void 0),y.push(void 0))},this),a[f]=g,i.set(f,y),o.set(f,m),f==="series"&&Ud(this)}this._seriesIndices||Ud(this)},e.prototype.getOption=function(){var t=xe(this.option);return L(t,function(n,a){if($e.hasClass(a)){for(var i=ct(n),o=i.length,s=!1,l=o-1;l>=0;l--)i[l]&&!Hc(i[l])?s=!0:(i[l]=null,!s&&o--);i.length=o,t[a]=i}}),delete t[AA],t},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,n){var a=this._componentsMap.get(t);if(a){var i=a[n||0];if(i)return i;if(n==null){for(var o=0;o<a.length;o++)if(a[o])return a[o]}}},e.prototype.queryComponents=function(t){var n=t.mainType;if(!n)return[];var a=t.index,i=t.id,o=t.name,s=this._componentsMap.get(n);if(!s||!s.length)return[];var l;return a!=null?(l=[],L(ct(a),function(u){s[u]&&l.push(s[u])})):i!=null?l=IA("id",i,s):o!=null?l=IA("name",o,s):l=at(s,function(u){return!!u}),PA(l,t)},e.prototype.findComponents=function(t){var n=t.query,a=t.mainType,i=s(n),o=i?this.queryComponents(i):at(this._componentsMap.get(a),function(u){return!!u});return l(PA(o,t));function s(u){var c=a+"Index",f=a+"Id",h=a+"Name";return u&&(u[c]!=null||u[f]!=null||u[h]!=null)?{mainType:a,index:u[c],id:u[f],name:u[h]}:null}function l(u){return t.filter?at(u,t.filter):u}},e.prototype.eachComponent=function(t,n,a){var i=this._componentsMap;if(ye(t)){var o=n,s=t;i.each(function(f,h){for(var v=0;f&&v<f.length;v++){var d=f[v];d&&s.call(o,h,d,d.componentIndex)}})}else for(var l=ce(t)?i.get(t):_e(t)?this.findComponents(t):null,u=0;l&&u<l.length;u++){var c=l[u];c&&n.call(a,c,c.componentIndex)}},e.prototype.getSeriesByName=function(t){var n=Xt(t,null);return at(this._componentsMap.get("series"),function(a){return!!a&&n!=null&&a.name===n})},e.prototype.getSeriesByIndex=function(t){return this._componentsMap.get("series")[t]},e.prototype.getSeriesByType=function(t){return at(this._componentsMap.get("series"),function(n){return!!n&&n.subType===t})},e.prototype.getSeries=function(){return at(this._componentsMap.get("series"),function(t){return!!t})},e.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},e.prototype.eachSeries=function(t,n){gf(this),L(this._seriesIndices,function(a){var i=this._componentsMap.get("series")[a];t.call(n,i,a)},this)},e.prototype.eachRawSeries=function(t,n){L(this._componentsMap.get("series"),function(a){a&&t.call(n,a,a.componentIndex)})},e.prototype.eachSeriesByType=function(t,n,a){gf(this),L(this._seriesIndices,function(i){var o=this._componentsMap.get("series")[i];o.subType===t&&n.call(a,o,i)},this)},e.prototype.eachRawSeriesByType=function(t,n,a){return L(this.getSeriesByType(t),n,a)},e.prototype.isSeriesFiltered=function(t){return gf(this),this._seriesIndicesMap.get(t.componentIndex)==null},e.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},e.prototype.filterSeries=function(t,n){gf(this);var a=[];L(this._seriesIndices,function(i){var o=this._componentsMap.get("series")[i];t.call(n,o,i)&&a.push(i)},this),this._seriesIndices=a,this._seriesIndicesMap=ge(a)},e.prototype.restoreData=function(t){Ud(this);var n=this._componentsMap,a=[];n.each(function(i,o){$e.hasClass(o)&&a.push(o)}),$e.topologicalTravel(a,$e.getAllClassMainTypes(),function(i){L(n.get(i),function(o){o&&(i!=="series"||!$7(o,t))&&o.restoreData()})})},e.internalField=function(){Ud=function(t){var n=t._seriesIndices=[];L(t._componentsMap.get("series"),function(a){a&&n.push(a.componentIndex)}),t._seriesIndicesMap=ge(n)},gf=function(t){},MA=function(t,n){t.option={},t.option[AA]=V7,t._componentsMap=ge({series:[]}),t._componentsCount=ge();var a=n.aria;_e(a)&&a.enabled==null&&(a.enabled=!0),H7(n,t._theme.option),Ie(n,E7,!1),t._mergeOption(n,null)}}(),e}(ft);function $7(r,e){if(e){var t=e.seriesIndex,n=e.seriesId,a=e.seriesName;return t!=null&&r.componentIndex!==t||n!=null&&r.id!==n||a!=null&&r.name!==a}}function H7(r,e){var t=r.color&&!r.colorLayer;L(e,function(n,a){a==="colorLayer"&&t||$e.hasClass(a)||(typeof n=="object"?r[a]=r[a]?Ie(r[a],n,!1):xe(n):r[a]==null&&(r[a]=n))})}function IA(r,e,t){if(J(e)){var n=ge();return L(e,function(i){if(i!=null){var o=Xt(i,null);o!=null&&n.set(i,!0)}}),at(t,function(i){return i&&n.get(i[r])})}else{var a=Xt(e,null);return at(t,function(i){return i&&a!=null&&i[r]===a})}}function PA(r,e){return e.hasOwnProperty("subType")?at(r,function(t){return t&&t.subType===e.subType}):r}function EA(r){var e=ge();return r&&L(ct(r.replaceMerge),function(t){e.set(t,!0)}),{replaceMergeMainTypeMap:e}}Pt(LA,W_);var OA=LA,G7=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],W7=function(){function r(e){L(G7,function(t){this[t]=fe(e[t],e)},this)}return r}(),RA=W7,j_={},U7=function(){function r(){this._coordinateSystems=[]}return r.prototype.create=function(e,t){var n=[];L(j_,function(a,i){var o=a.create(e,t);n=n.concat(o||[])}),this._coordinateSystems=n},r.prototype.update=function(e,t){L(this._coordinateSystems,function(n){n.update&&n.update(e,t)})},r.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},r.register=function(e,t){j_[e]=t},r.get=function(e){return j_[e]},r}(),lu=U7,j7=/^(min|max)?(.+)$/,Y7=function(){function r(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return r.prototype.setOption=function(e,t,n){e&&(L(ct(e.series),function(o){o&&o.data&&an(o.data)&&pc(o.data)}),L(ct(e.dataset),function(o){o&&o.source&&an(o.source)&&pc(o.source)})),e=xe(e);var a=this._optionBackup,i=q7(e,t,!a);this._newBaseOption=i.baseOption,a?(i.timelineOptions.length&&(a.timelineOptions=i.timelineOptions),i.mediaList.length&&(a.mediaList=i.mediaList),i.mediaDefault&&(a.mediaDefault=i.mediaDefault)):this._optionBackup=i},r.prototype.mountOption=function(e){var t=this._optionBackup;return this._timelineOptions=t.timelineOptions,this._mediaList=t.mediaList,this._mediaDefault=t.mediaDefault,this._currentMediaIndices=[],xe(e?t.baseOption:this._newBaseOption)},r.prototype.getTimelineOption=function(e){var t,n=this._timelineOptions;if(n.length){var a=e.getComponent("timeline");a&&(t=xe(n[a.getCurrentIndex()]))}return t},r.prototype.getMediaOption=function(e){var t=this._api.getWidth(),n=this._api.getHeight(),a=this._mediaList,i=this._mediaDefault,o=[],s=[];if(!a.length&&!i)return s;for(var l=0,u=a.length;l<u;l++)Z7(a[l].query,t,n)&&o.push(l);return!o.length&&i&&(o=[-1]),o.length&&!Q7(o,this._currentMediaIndices)&&(s=ee(o,function(c){return xe(c===-1?i.option:a[c].option)})),this._currentMediaIndices=o,s},r}();function q7(r,e,t){var n=[],a,i,o=r.baseOption,s=r.timeline,l=r.options,u=r.media,c=!!r.media,f=!!(l||s||o&&o.timeline);o?(i=o,i.timeline||(i.timeline=s)):((f||c)&&(r.options=r.media=null),i=r),c&&J(u)&&L(u,function(v){v&&v.option&&(v.query?n.push(v):a||(a=v))}),h(i),L(l,function(v){return h(v)}),L(n,function(v){return h(v.option)});function h(v){L(e,function(d){d(v,t)})}return{baseOption:i,timelineOptions:l||[],mediaDefault:a,mediaList:n}}function Z7(r,e,t){var n={width:e,height:t,aspectratio:e/t},a=!0;return L(r,function(i,o){var s=o.match(j7);if(!(!s||!s[1]||!s[2])){var l=s[1],u=s[2].toLowerCase();X7(n[u],i,l)||(a=!1)}}),a}function X7(r,e,t){return t==="min"?r>=e:t==="max"?r<=e:r===e}function Q7(r,e){return r.join(",")===e.join(",")}var K7=Y7,ma=L,yf=_e,NA=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Y_(r){var e=r&&r.itemStyle;if(!!e)for(var t=0,n=NA.length;t<n;t++){var a=NA[t],i=e.normal,o=e.emphasis;i&&i[a]&&(r[a]=r[a]||{},r[a].normal?Ie(r[a].normal,i[a]):r[a].normal=i[a],i[a]=null),o&&o[a]&&(r[a]=r[a]||{},r[a].emphasis?Ie(r[a].emphasis,o[a]):r[a].emphasis=o[a],o[a]=null)}}function Er(r,e,t){if(r&&r[e]&&(r[e].normal||r[e].emphasis)){var n=r[e].normal,a=r[e].emphasis;n&&(t?(r[e].normal=r[e].emphasis=null,me(r[e],n)):r[e]=n),a&&(r.emphasis=r.emphasis||{},r.emphasis[e]=a,a.focus&&(r.emphasis.focus=a.focus),a.blurScope&&(r.emphasis.blurScope=a.blurScope))}}function mf(r){Er(r,"itemStyle"),Er(r,"lineStyle"),Er(r,"areaStyle"),Er(r,"label"),Er(r,"labelLine"),Er(r,"upperLabel"),Er(r,"edgeLabel")}function jt(r,e){var t=yf(r)&&r[e],n=yf(t)&&t.textStyle;if(n)for(var a=0,i=cD.length;a<i;a++){var o=cD[a];n.hasOwnProperty(o)&&(t[o]=n[o])}}function Wn(r){r&&(mf(r),jt(r,"label"),r.emphasis&&jt(r.emphasis,"label"))}function J7(r){if(!!yf(r)){Y_(r),mf(r),jt(r,"label"),jt(r,"upperLabel"),jt(r,"edgeLabel"),r.emphasis&&(jt(r.emphasis,"label"),jt(r.emphasis,"upperLabel"),jt(r.emphasis,"edgeLabel"));var e=r.markPoint;e&&(Y_(e),Wn(e));var t=r.markLine;t&&(Y_(t),Wn(t));var n=r.markArea;n&&Wn(n);var a=r.data;if(r.type==="graph"){a=a||r.nodes;var i=r.links||r.edges;if(i&&!an(i))for(var o=0;o<i.length;o++)Wn(i[o]);L(r.categories,function(u){mf(u)})}if(a&&!an(a))for(var o=0;o<a.length;o++)Wn(a[o]);if(e=r.markPoint,e&&e.data)for(var s=e.data,o=0;o<s.length;o++)Wn(s[o]);if(t=r.markLine,t&&t.data)for(var l=t.data,o=0;o<l.length;o++)J(l[o])?(Wn(l[o][0]),Wn(l[o][1])):Wn(l[o]);r.type==="gauge"?(jt(r,"axisLabel"),jt(r,"title"),jt(r,"detail")):r.type==="treemap"?(Er(r.breadcrumb,"itemStyle"),L(r.levels,function(u){mf(u)})):r.type==="tree"&&mf(r.leaves)}}function pi(r){return J(r)?r:r?[r]:[]}function kA(r){return(J(r)?r[0]:r)||{}}function e9(r,e){ma(pi(r.series),function(n){yf(n)&&J7(n)});var t=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&t.push("valueAxis","categoryAxis","logAxis","timeAxis"),ma(t,function(n){ma(pi(r[n]),function(a){a&&(jt(a,"axisLabel"),jt(a.axisPointer,"label"))})}),ma(pi(r.parallel),function(n){var a=n&&n.parallelAxisDefault;jt(a,"axisLabel"),jt(a&&a.axisPointer,"label")}),ma(pi(r.calendar),function(n){Er(n,"itemStyle"),jt(n,"dayLabel"),jt(n,"monthLabel"),jt(n,"yearLabel")}),ma(pi(r.radar),function(n){jt(n,"name"),n.name&&n.axisName==null&&(n.axisName=n.name,delete n.name),n.nameGap!=null&&n.axisNameGap==null&&(n.axisNameGap=n.nameGap,delete n.nameGap)}),ma(pi(r.geo),function(n){yf(n)&&(Wn(n),ma(pi(n.regions),function(a){Wn(a)}))}),ma(pi(r.timeline),function(n){Wn(n),Er(n,"label"),Er(n,"itemStyle"),Er(n,"controlStyle",!0);var a=n.data;J(a)&&L(a,function(i){_e(i)&&(Er(i,"label"),Er(i,"itemStyle"))})}),ma(pi(r.toolbox),function(n){Er(n,"iconStyle"),ma(n.feature,function(a){Er(a,"iconStyle")})}),jt(kA(r.axisPointer),"label"),jt(kA(r.tooltip).axisPointer,"label")}function t9(r,e){for(var t=e.split(","),n=r,a=0;a<t.length&&(n=n&&n[t[a]],n!=null);a++);return n}function r9(r,e,t,n){for(var a=e.split(","),i=r,o,s=0;s<a.length-1;s++)o=a[s],i[o]==null&&(i[o]={}),i=i[o];(n||i[a[s]]==null)&&(i[a[s]]=t)}function zA(r){r&&L(n9,function(e){e[0]in r&&!(e[1]in r)&&(r[e[1]]=r[e[0]])})}var n9=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],a9=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],q_=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function _f(r){var e=r&&r.itemStyle;if(e)for(var t=0;t<q_.length;t++){var n=q_[t][1],a=q_[t][0];e[n]!=null&&(e[a]=e[n])}}function BA(r){!r||r.alignTo==="edge"&&r.margin!=null&&r.edgeDistance==null&&(r.edgeDistance=r.margin)}function FA(r){!r||r.downplay&&!r.blur&&(r.blur=r.downplay)}function i9(r){!r||r.focusNodeAdjacency!=null&&(r.emphasis=r.emphasis||{},r.emphasis.focus==null&&(r.emphasis.focus="adjacency"))}function VA(r,e){if(r)for(var t=0;t<r.length;t++)e(r[t]),r[t]&&VA(r[t].children,e)}function $A(r,e){e9(r,e),r.series=ct(r.series),L(r.series,function(t){if(!!_e(t)){var n=t.type;if(n==="line")t.clipOverflow!=null&&(t.clip=t.clipOverflow);else if(n==="pie"||n==="gauge"){t.clockWise!=null&&(t.clockwise=t.clockWise),BA(t.label);var a=t.data;if(a&&!an(a))for(var i=0;i<a.length;i++)BA(a[i]);t.hoverOffset!=null&&(t.emphasis=t.emphasis||{},(t.emphasis.scaleSize=null)&&(t.emphasis.scaleSize=t.hoverOffset))}else if(n==="gauge"){var o=t9(t,"pointer.color");o!=null&&r9(t,"itemStyle.color",o)}else if(n==="bar"){_f(t),_f(t.backgroundStyle),_f(t.emphasis);var a=t.data;if(a&&!an(a))for(var i=0;i<a.length;i++)typeof a[i]=="object"&&(_f(a[i]),_f(a[i]&&a[i].emphasis))}else if(n==="sunburst"){var s=t.highlightPolicy;s&&(t.emphasis=t.emphasis||{},t.emphasis.focus||(t.emphasis.focus=s)),FA(t),VA(t.data,FA)}else n==="graph"||n==="sankey"?i9(t):n==="map"&&(t.mapType&&!t.map&&(t.map=t.mapType),t.mapLocation&&me(t,t.mapLocation));t.hoverAnimation!=null&&(t.emphasis=t.emphasis||{},t.emphasis&&t.emphasis.scale==null&&(t.emphasis.scale=t.hoverAnimation)),zA(t)}}),r.dataRange&&(r.visualMap=r.dataRange),L(a9,function(t){var n=r[t];n&&(J(n)||(n=[n]),L(n,function(a){zA(a)}))})}function o9(r){var e=ge();r.eachSeries(function(t){var n=t.get("stack");if(n){var a=e.get(n)||e.set(n,[]),i=t.getData(),o={stackResultDimension:i.getCalculationInfo("stackResultDimension"),stackedOverDimension:i.getCalculationInfo("stackedOverDimension"),stackedDimension:i.getCalculationInfo("stackedDimension"),stackedByDimension:i.getCalculationInfo("stackedByDimension"),isStackedByIndex:i.getCalculationInfo("isStackedByIndex"),data:i,seriesModel:t};if(!o.stackedDimension||!(o.isStackedByIndex||o.stackedByDimension))return;a.length&&i.setCalculationInfo("stackedOnSeries",a[a.length-1].seriesModel),a.push(o)}}),e.each(s9)}function s9(r){L(r,function(e,t){var n=[],a=[NaN,NaN],i=[e.stackResultDimension,e.stackedOverDimension],o=e.data,s=e.isStackedByIndex,l=e.seriesModel.get("stackStrategy")||"samesign";o.modify(i,function(u,c,f){var h=o.get(e.stackedDimension,f);if(isNaN(h))return a;var v,d;s?d=o.getRawIndex(f):v=o.get(e.stackedByDimension,f);for(var p=NaN,g=t-1;g>=0;g--){var y=r[g];if(s||(d=y.data.rawIndexOf(y.stackedByDimension,v)),d>=0){var m=y.data.getByRawIndex(y.stackResultDimension,d);if(l==="all"||l==="positive"&&m>0||l==="negative"&&m<0||l==="samesign"&&h>=0&&m>0||l==="samesign"&&h<=0&&m<0){h=UG(h,m),p=m;break}}}return n[0]=h,n[1]=p,n})})}var jd=function(){function r(e){this.data=e.data||(e.sourceFormat===Ha?{}:[]),this.sourceFormat=e.sourceFormat||bA,this.seriesLayoutBy=e.seriesLayoutBy||Ga,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var n=0;n<t.length;n++){var a=t[n];a.type==null&&SA(this,n)===br.Must&&(a.type="ordinal")}}return r}();function Z_(r){return r instanceof jd}function X_(r,e,t){t=t||HA(r);var n=e.seriesLayoutBy,a=u9(r,t,n,e.sourceHeader,e.dimensions),i=new jd({data:r,sourceFormat:t,seriesLayoutBy:n,dimensionsDefine:a.dimensionsDefine,startIndex:a.startIndex,dimensionsDetectedCount:a.dimensionsDetectedCount,metaRawOption:xe(e)});return i}function Q_(r){return new jd({data:r,sourceFormat:an(r)?so:Hn})}function l9(r){return new jd({data:r.data,sourceFormat:r.sourceFormat,seriesLayoutBy:r.seriesLayoutBy,dimensionsDefine:xe(r.dimensionsDefine),startIndex:r.startIndex,dimensionsDetectedCount:r.dimensionsDetectedCount})}function HA(r){var e=bA;if(an(r))e=so;else if(J(r)){r.length===0&&(e=Pr);for(var t=0,n=r.length;t<n;t++){var a=r[t];if(a!=null){if(J(a)){e=Pr;break}else if(_e(a)){e=Gn;break}}}}else if(_e(r)){for(var i in r)if(he(r,i)&&yr(r[i])){e=Ha;break}}return e}function u9(r,e,t,n,a){var i,o;if(!r)return{dimensionsDefine:GA(a),startIndex:o,dimensionsDetectedCount:i};if(e===Pr){var s=r;n==="auto"||n==null?WA(function(u){u!=null&&u!=="-"&&(ce(u)?o==null&&(o=1):o=0)},t,s,10):o=Ye(n)?n:n?1:0,!a&&o===1&&(a=[],WA(function(u,c){a[c]=u!=null?u+"":""},t,s,1/0)),i=a?a.length:t===su?s.length:s[0]?s[0].length:null}else if(e===Gn)a||(a=c9(r));else if(e===Ha)a||(a=[],L(r,function(u,c){a.push(c)}));else if(e===Hn){var l=Hl(r[0]);i=J(l)&&l.length||1}return{startIndex:o,dimensionsDefine:GA(a),dimensionsDetectedCount:i}}function c9(r){for(var e=0,t;e<r.length&&!(t=r[e++]););if(t){var n=[];return L(t,function(a,i){n.push(i)}),n}}function GA(r){if(!!r){var e=ge();return ee(r,function(t,n){t=_e(t)?t:{name:t};var a={name:t.name,displayName:t.displayName,type:t.type};if(a.name==null)return a;a.name+="",a.displayName==null&&(a.displayName=a.name);var i=e.get(a.name);return i?a.name+="-"+i.count++:e.set(a.name,{count:1}),a})}}function WA(r,e,t,n){if(e===su)for(var a=0;a<t.length&&a<n;a++)r(t[a]?t[a][0]:null,a);else for(var i=t[0]||[],a=0;a<i.length&&a<n;a++)r(i[a],a)}function UA(r){var e=r.sourceFormat;return e===Gn||e===Ha}var Ts,Ds,Ms,jA,YA,qA=function(){function r(e,t){var n=Z_(e)?e:Q_(e);this._source=n;var a=this._data=n.data;n.sourceFormat===so&&(this._offset=0,this._dimSize=t,this._data=a),YA(this,a,n)}return r.prototype.getSource=function(){return this._source},r.prototype.count=function(){return 0},r.prototype.getItem=function(e,t){},r.prototype.appendData=function(e){},r.prototype.clean=function(){},r.protoInitialize=function(){var e=r.prototype;e.pure=!1,e.persistent=!0}(),r.internalField=function(){var e;YA=function(o,s,l){var u=l.sourceFormat,c=l.seriesLayoutBy,f=l.startIndex,h=l.dimensionsDefine,v=jA[J_(u,c)];if(Q(o,v),u===so)o.getItem=t,o.count=a,o.fillStorage=n;else{var d=XA(u,c);o.getItem=fe(d,null,s,f,h);var p=KA(u,c);o.count=fe(p,null,s,f,h)}};var t=function(o,s){o=o-this._offset,s=s||[];for(var l=this._data,u=this._dimSize,c=u*o,f=0;f<u;f++)s[f]=l[c+f];return s},n=function(o,s,l,u){for(var c=this._data,f=this._dimSize,h=0;h<f;h++){for(var v=u[h],d=v[0]==null?1/0:v[0],p=v[1]==null?-1/0:v[1],g=s-o,y=l[h],m=0;m<g;m++){var _=c[m*f+h];y[o+m]=_,_<d&&(d=_),_>p&&(p=_)}v[0]=d,v[1]=p}},a=function(){return this._data?this._data.length/this._dimSize:0};jA=(e={},e[Pr+"_"+Ga]={pure:!0,appendData:i},e[Pr+"_"+su]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[Gn]={pure:!0,appendData:i},e[Ha]={pure:!0,appendData:function(o){var s=this._data;L(o,function(l,u){for(var c=s[u]||(s[u]=[]),f=0;f<(l||[]).length;f++)c.push(l[f])})}},e[Hn]={appendData:i},e[so]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},e);function i(o){for(var s=0;s<o.length;s++)this._data.push(o[s])}}(),r}(),ZA=function(r,e,t,n){return r[n]},f9=(Ts={},Ts[Pr+"_"+Ga]=function(r,e,t,n){return r[n+e]},Ts[Pr+"_"+su]=function(r,e,t,n,a){n+=e;for(var i=a||[],o=r,s=0;s<o.length;s++){var l=o[s];i[s]=l?l[n]:null}return i},Ts[Gn]=ZA,Ts[Ha]=function(r,e,t,n,a){for(var i=a||[],o=0;o<t.length;o++){var s=t[o].name,l=r[s];i[o]=l?l[n]:null}return i},Ts[Hn]=ZA,Ts);function XA(r,e){var t=f9[J_(r,e)];return t}var QA=function(r,e,t){return r.length},h9=(Ds={},Ds[Pr+"_"+Ga]=function(r,e,t){return Math.max(0,r.length-e)},Ds[Pr+"_"+su]=function(r,e,t){var n=r[0];return n?Math.max(0,n.length-e):0},Ds[Gn]=QA,Ds[Ha]=function(r,e,t){var n=t[0].name,a=r[n];return a?a.length:0},Ds[Hn]=QA,Ds);function KA(r,e){var t=h9[J_(r,e)];return t}var K_=function(r,e,t){return r[e]},v9=(Ms={},Ms[Pr]=K_,Ms[Gn]=function(r,e,t){return r[t]},Ms[Ha]=K_,Ms[Hn]=function(r,e,t){var n=Hl(r);return n instanceof Array?n[e]:n},Ms[so]=K_,Ms);function JA(r){var e=v9[r];return e}function J_(r,e){return r===Pr?r+"_"+e:r}function uu(r,e,t){if(!!r){var n=r.getRawDataItem(e);if(n!=null){var a=r.getStore(),i=a.getSource().sourceFormat;if(t!=null){var o=r.getDimensionIndex(t),s=a.getDimensionProperty(o);return JA(i)(n,o,s)}else{var l=n;return i===Hn&&(l=Hl(n)),l}}}}var d9=/\{@(.+?)\}/g,e1=function(){function r(){}return r.prototype.getDataParams=function(e,t){var n=this.getData(t),a=this.getRawValue(e,t),i=n.getRawIndex(e),o=n.getName(e),s=n.getRawDataItem(e),l=n.getItemVisual(e,"style"),u=l&&l[n.getItemVisual(e,"drawType")||"fill"],c=l&&l.stroke,f=this.mainType,h=f==="series",v=n.userOutput&&n.userOutput.get();return{componentType:f,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:h?this.subType:null,seriesIndex:this.seriesIndex,seriesId:h?this.id:null,seriesName:h?this.name:null,name:o,dataIndex:i,data:s,dataType:t,value:a,color:u,borderColor:c,dimensionNames:v?v.fullDimensions:null,encode:v?v.encode:null,$vars:["seriesName","name","value"]}},r.prototype.getFormattedLabel=function(e,t,n,a,i,o){t=t||"normal";var s=this.getData(n),l=this.getDataParams(e,n);if(o&&(l.value=o.interpolatedValue),a!=null&&J(l.value)&&(l.value=l.value[a]),!i){var u=s.getItemModel(e);i=u.get(t==="normal"?["label","formatter"]:[t,"label","formatter"])}if(ye(i))return l.status=t,l.dimensionIndex=a,i(l);if(ce(i)){var c=F_(i,l);return c.replace(d9,function(f,h){var v=h.length,d=h;d.charAt(0)==="["&&d.charAt(v-1)==="]"&&(d=+d.slice(1,v-1));var p=uu(s,e,d);if(o&&J(o.interpolatedValue)){var g=s.getDimensionIndex(d);g>=0&&(p=o.interpolatedValue[g])}return p!=null?p+"":""})}},r.prototype.getRawValue=function(e,t){return uu(this.getData(t),e)},r.prototype.formatTooltip=function(e,t,n){},r}();function eL(r){var e,t;return _e(r)?r.type&&(t=r):e=r,{text:e,frag:t}}function bf(r){return new p9(r)}var p9=function(){function r(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return r.prototype.perform=function(e){var t=this._upstream,n=e&&e.skip;if(this._dirty&&t){var a=this.context;a.data=a.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!n&&(i=this._plan(this.context));var o=c(this._modBy),s=this._modDataCount||0,l=c(e&&e.modBy),u=e&&e.modDataCount||0;(o!==l||s!==u)&&(i="reset");function c(m){return!(m>=1)&&(m=1),m}var f;(this._dirty||i==="reset")&&(this._dirty=!1,f=this._doReset(n)),this._modBy=l,this._modDataCount=u;var h=e&&e.step;if(t?this._dueEnd=t._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var v=this._dueIndex,d=Math.min(h!=null?this._dueIndex+h:1/0,this._dueEnd);if(!n&&(f||v<d)){var p=this._progress;if(J(p))for(var g=0;g<p.length;g++)this._doProgress(p[g],v,d,l,u);else this._doProgress(p,v,d,l,u)}this._dueIndex=d;var y=this._settedOutputEnd!=null?this._settedOutputEnd:d;this._outputDueEnd=y}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd!=null?this._settedOutputEnd:this._dueEnd;return this.unfinished()},r.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},r.prototype._doProgress=function(e,t,n,a,i){tL.reset(t,n,a,i),this._callingProgress=e,this._callingProgress({start:t,end:n,count:n-t,next:tL.next},this.context)},r.prototype._doReset=function(e){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var t,n;!e&&this._reset&&(t=this._reset(this.context),t&&t.progress&&(n=t.forceFirstProgress,t=t.progress),J(t)&&!t.length&&(t=null)),this._progress=t,this._modBy=this._modDataCount=null;var a=this._downstream;return a&&a.dirty(),n},r.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},r.prototype.pipe=function(e){(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},r.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},r.prototype.getUpstream=function(){return this._upstream},r.prototype.getDownstream=function(){return this._downstream},r.prototype.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},r}(),tL=function(){var r,e,t,n,a,i={reset:function(l,u,c,f){e=l,r=u,t=c,n=f,a=Math.ceil(n/t),i.next=t>1&&n>0?s:o}};return i;function o(){return e<r?e++:null}function s(){var l=e%a*t+Math.ceil(e/a),u=e>=r?null:l<n?l:e;return e++,u}}();function lo(r,e){var t=e&&e.type;return t==="ordinal"?r:(t==="time"&&!Ye(r)&&r!=null&&r!=="-"&&(r=+Sn(r)),r==null||r===""?NaN:+r)}var g9=ge({number:function(r){return parseFloat(r)},time:function(r){return+Sn(r)},trim:function(r){return ce(r)?On(r):r}});function rL(r){return g9.get(r)}var nL={lt:function(r,e){return r<e},lte:function(r,e){return r<=e},gt:function(r,e){return r>e},gte:function(r,e){return r>=e}},y9=function(){function r(e,t){if(!Ye(t)){var n="";nt(n)}this._opFn=nL[e],this._rvalFloat=Na(t)}return r.prototype.evaluate=function(e){return Ye(e)?this._opFn(e,this._rvalFloat):this._opFn(Na(e),this._rvalFloat)},r}(),aL=function(){function r(e,t){var n=e==="desc";this._resultLT=n?1:-1,t==null&&(t=n?"min":"max"),this._incomparable=t==="min"?-1/0:1/0}return r.prototype.evaluate=function(e,t){var n=Ye(e)?e:Na(e),a=Ye(t)?t:Na(t),i=isNaN(n),o=isNaN(a);if(i&&(n=this._incomparable),o&&(a=this._incomparable),i&&o){var s=ce(e),l=ce(t);s&&(n=l?e:0),l&&(a=s?t:0)}return n<a?this._resultLT:n>a?-this._resultLT:0},r}(),m9=function(){function r(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=Na(t)}return r.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n!==this._rvalTypeof&&(n==="number"||this._rvalTypeof==="number")&&(t=Na(e)===this._rvalFloat)}return this._isEQ?t:!t},r}();function _9(r,e){return r==="eq"||r==="ne"?new m9(r==="eq",e):he(nL,r)?new y9(r,e):null}var b9=function(){function r(){}return r.prototype.getRawData=function(){throw new Error("not supported")},r.prototype.getRawDataItem=function(e){throw new Error("not supported")},r.prototype.cloneRawData=function(){},r.prototype.getDimensionInfo=function(e){},r.prototype.cloneAllDimensionInfo=function(){},r.prototype.count=function(){},r.prototype.retrieveValue=function(e,t){},r.prototype.retrieveValueFromItem=function(e,t){},r.prototype.convertValue=function(e,t){return lo(e,t)},r}();function x9(r,e){var t=new b9,n=r.data,a=t.sourceFormat=r.sourceFormat,i=r.startIndex,o="";r.seriesLayoutBy!==Ga&&nt(o);var s=[],l={},u=r.dimensionsDefine;if(u)L(u,function(p,g){var y=p.name,m={index:g,name:y,displayName:p.displayName};if(s.push(m),y!=null){var _="";he(l,y)&&nt(_),l[y]=m}});else for(var c=0;c<r.dimensionsDetectedCount;c++)s.push({index:c});var f=XA(a,Ga);e.__isBuiltIn&&(t.getRawDataItem=function(p){return f(n,i,s,p)},t.getRawData=fe(w9,null,r)),t.cloneRawData=fe(S9,null,r);var h=KA(a,Ga);t.count=fe(h,null,n,i,s);var v=JA(a);t.retrieveValue=function(p,g){var y=f(n,i,s,p);return d(y,g)};var d=t.retrieveValueFromItem=function(p,g){if(p!=null){var y=s[g];if(y)return v(p,g,y.name)}};return t.getDimensionInfo=fe(C9,null,s,l),t.cloneAllDimensionInfo=fe(T9,null,s),t}function w9(r){var e=r.sourceFormat;if(!t1(e)){var t="";nt(t)}return r.data}function S9(r){var e=r.sourceFormat,t=r.data;if(!t1(e)){var n="";nt(n)}if(e===Pr){for(var a=[],i=0,o=t.length;i<o;i++)a.push(t[i].slice());return a}else if(e===Gn){for(var a=[],i=0,o=t.length;i<o;i++)a.push(Q({},t[i]));return a}}function C9(r,e,t){if(t!=null){if(Ye(t)||!isNaN(t)&&!he(e,t))return r[t];if(he(e,t))return e[t]}}function T9(r){return xe(r)}var iL=ge();function D9(r){r=xe(r);var e=r.type,t="";e||nt(t);var n=e.split(":");n.length!==2&&nt(t);var a=!1;n[0]==="echarts"&&(e=n[1],a=!0),r.__isBuiltIn=a,iL.set(e,r)}function M9(r,e,t){var n=ct(r),a=n.length,i="";a||nt(i);for(var o=0,s=a;o<s;o++){var l=n[o];e=A9(l,e),o!==s-1&&(e.length=Math.max(e.length,1))}return e}function A9(r,e,t,n){var a="";e.length||nt(a),_e(r)||nt(a);var i=r.type,o=iL.get(i);o||nt(a);var s=ee(e,function(u){return x9(u,o)}),l=ct(o.transform({upstream:s[0],upstreamList:s,config:xe(r.config)}));return ee(l,function(u,c){var f="";_e(u)||nt(f),u.data||nt(f);var h=HA(u.data);t1(h)||nt(f);var v,d=e[0];if(d&&c===0&&!u.dimensions){var p=d.startIndex;p&&(u.data=d.data.slice(0,p).concat(u.data)),v={seriesLayoutBy:Ga,sourceHeader:p,dimensions:d.metaRawOption.dimensions}}else v={seriesLayoutBy:Ga,sourceHeader:0,dimensions:u.dimensions};return X_(u.data,v,null)})}function t1(r){return r===Pr||r===Gn}var Yd="undefined",L9=typeof Uint32Array===Yd?Array:Uint32Array,I9=typeof Uint16Array===Yd?Array:Uint16Array,oL=typeof Int32Array===Yd?Array:Int32Array,sL=typeof Float64Array===Yd?Array:Float64Array,lL={float:sL,int:oL,ordinal:Array,number:Array,time:sL},r1;function xf(r){return r>65535?L9:I9}function cu(){return[1/0,-1/0]}function P9(r){var e=r.constructor;return e===Array?r.slice():new e(r)}function uL(r,e,t,n,a){var i=lL[t||"float"];if(a){var o=r[e],s=o&&o.length;if(s!==n){for(var l=new i(n),u=0;u<s;u++)l[u]=o[u];r[e]=l}}else r[e]=new i(n)}var E9=function(){function r(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=ge()}return r.prototype.initData=function(e,t,n){this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var a=e.getSource(),i=this.defaultDimValueGetter=r1[a.sourceFormat];this._dimValueGetter=n||i,this._rawExtent=[],UA(a),this._dimensions=ee(t,function(o){return{type:o.type,property:o.property}}),this._initDataFromProvider(0,e.count())},r.prototype.getProvider=function(){return this._provider},r.prototype.getSource=function(){return this._provider.getSource()},r.prototype.ensureCalculationDimension=function(e,t){var n=this._calcDimNameToIdx,a=this._dimensions,i=n.get(e);if(i!=null){if(a[i].type===t)return i}else i=a.length;return a[i]={type:t},n.set(e,i),this._chunks[i]=new lL[t||"float"](this._rawCount),this._rawExtent[i]=cu(),i},r.prototype.collectOrdinalMeta=function(e,t){var n=this._chunks[e],a=this._dimensions[e],i=this._rawExtent,o=a.ordinalOffset||0,s=n.length;o===0&&(i[e]=cu());for(var l=i[e],u=o;u<s;u++){var c=n[u]=t.parseAndCollect(n[u]);isNaN(c)||(l[0]=Math.min(c,l[0]),l[1]=Math.max(c,l[1]))}a.ordinalMeta=t,a.ordinalOffset=s,a.type="ordinal"},r.prototype.getOrdinalMeta=function(e){var t=this._dimensions[e],n=t.ordinalMeta;return n},r.prototype.getDimensionProperty=function(e){var t=this._dimensions[e];return t&&t.property},r.prototype.appendData=function(e){var t=this._provider,n=this.count();t.appendData(e);var a=t.count();return t.persistent||(a+=n),n<a&&this._initDataFromProvider(n,a,!0),[n,a]},r.prototype.appendValues=function(e,t){for(var n=this._chunks,a=this._dimensions,i=a.length,o=this._rawExtent,s=this.count(),l=s+Math.max(e.length,t||0),u=0;u<i;u++){var c=a[u];uL(n,u,c.type,l,!0)}for(var f=[],h=s;h<l;h++)for(var v=h-s,d=0;d<i;d++){var c=a[d],p=r1.arrayRows.call(this,e[v]||f,c.property,v,d);n[d][h]=p;var g=o[d];p<g[0]&&(g[0]=p),p>g[1]&&(g[1]=p)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(e,t,n){for(var a=this._provider,i=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=ee(o,function(m){return m.property}),c=0;c<s;c++){var f=o[c];l[c]||(l[c]=cu()),uL(i,c,f.type,t,n)}if(a.fillStorage)a.fillStorage(e,t,i,l);else for(var h=[],v=e;v<t;v++){h=a.getItem(v,h);for(var d=0;d<s;d++){var p=i[d],g=this._dimValueGetter(h,u[d],v,d);p[v]=g;var y=l[d];g<y[0]&&(y[0]=g),g>y[1]&&(y[1]=g)}}!a.persistent&&a.clean&&a.clean(),this._rawCount=this._count=t,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(e,t){if(!(t>=0&&t<this._count))return NaN;var n=this._chunks[e];return n?n[this.getRawIndex(t)]:NaN},r.prototype.getValues=function(e,t){var n=[],a=[];if(t==null){t=e,e=[];for(var i=0;i<this._dimensions.length;i++)a.push(i)}else a=e;for(var i=0,o=a.length;i<o;i++)n.push(this.get(a[i],t));return n},r.prototype.getByRawIndex=function(e,t){if(!(t>=0&&t<this._rawCount))return NaN;var n=this._chunks[e];return n?n[t]:NaN},r.prototype.getSum=function(e){var t=this._chunks[e],n=0;if(t)for(var a=0,i=this.count();a<i;a++){var o=this.get(e,a);isNaN(o)||(n+=o)}return n},r.prototype.getMedian=function(e){var t=[];this.each([e],function(i){isNaN(i)||t.push(i)});var n=t.sort(function(i,o){return i-o}),a=this.count();return a===0?0:a%2===1?n[(a-1)/2]:(n[a/2]+n[a/2-1])/2},r.prototype.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(n!=null&&n<this._count&&n===e)return e;for(var a=0,i=this._count-1;a<=i;){var o=(a+i)/2|0;if(t[o]<e)a=o+1;else if(t[o]>e)i=o-1;else return o}return-1},r.prototype.indicesOfNearest=function(e,t,n){var a=this._chunks,i=a[e],o=[];if(!i)return o;n==null&&(n=1/0);for(var s=1/0,l=-1,u=0,c=0,f=this.count();c<f;c++){var h=this.getRawIndex(c),v=t-i[h],d=Math.abs(v);d<=n&&((d<s||d===s&&v>=0&&l<0)&&(s=d,l=v,u=0),v===l&&(o[u++]=c))}return o.length=u,o},r.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,a=this._count;if(n===Array){e=new n(a);for(var i=0;i<a;i++)e[i]=t[i]}else e=new n(t.buffer,0,a)}else{var n=xf(this._rawCount);e=new n(this.count());for(var i=0;i<e.length;i++)e[i]=i}return e},r.prototype.filter=function(e,t){if(!this._count)return this;for(var n=this.clone(),a=n.count(),i=xf(n._rawCount),o=new i(a),s=[],l=e.length,u=0,c=e[0],f=n._chunks,h=0;h<a;h++){var v=void 0,d=n.getRawIndex(h);if(l===0)v=t(h);else if(l===1){var p=f[c][d];v=t(p,h)}else{for(var g=0;g<l;g++)s[g]=f[e[g]][d];s[g]=h,v=t.apply(null,s)}v&&(o[u++]=d)}return u<a&&(n._indices=o),n._count=u,n._extent=[],n._updateGetRawIdx(),n},r.prototype.selectRange=function(e){var t=this.clone(),n=t._count;if(!n)return this;var a=Fe(e),i=a.length;if(!i)return this;var o=t.count(),s=xf(t._rawCount),l=new s(o),u=0,c=a[0],f=e[c][0],h=e[c][1],v=t._chunks,d=!1;if(!t._indices){var p=0;if(i===1){for(var g=v[a[0]],y=0;y<n;y++){var m=g[y];(m>=f&&m<=h||isNaN(m))&&(l[u++]=p),p++}d=!0}else if(i===2){for(var g=v[a[0]],_=v[a[1]],b=e[a[1]][0],w=e[a[1]][1],y=0;y<n;y++){var m=g[y],x=_[y];(m>=f&&m<=h||isNaN(m))&&(x>=b&&x<=w||isNaN(x))&&(l[u++]=p),p++}d=!0}}if(!d)if(i===1)for(var y=0;y<o;y++){var S=t.getRawIndex(y),m=v[a[0]][S];(m>=f&&m<=h||isNaN(m))&&(l[u++]=S)}else for(var y=0;y<o;y++){for(var T=!0,S=t.getRawIndex(y),D=0;D<i;D++){var M=a[D],m=v[M][S];(m<e[M][0]||m>e[M][1])&&(T=!1)}T&&(l[u++]=t.getRawIndex(y))}return u<o&&(t._indices=l),t._count=u,t._extent=[],t._updateGetRawIdx(),t},r.prototype.map=function(e,t){var n=this.clone(e);return this._updateDims(n,e,t),n},r.prototype.modify=function(e,t){this._updateDims(this,e,t)},r.prototype._updateDims=function(e,t,n){for(var a=e._chunks,i=[],o=t.length,s=e.count(),l=[],u=e._rawExtent,c=0;c<t.length;c++)u[t[c]]=cu();for(var f=0;f<s;f++){for(var h=e.getRawIndex(f),v=0;v<o;v++)l[v]=a[t[v]][h];l[o]=f;var d=n&&n.apply(null,l);if(d!=null){typeof d!="object"&&(i[0]=d,d=i);for(var c=0;c<d.length;c++){var p=t[c],g=d[c],y=u[p],m=a[p];m&&(m[h]=g),g<y[0]&&(y[0]=g),g>y[1]&&(y[1]=g)}}}},r.prototype.lttbDownSample=function(e,t){var n=this.clone([e],!0),a=n._chunks,i=a[e],o=this.count(),s=0,l=Math.floor(1/t),u=this.getRawIndex(0),c,f,h,v=new(xf(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));v[s++]=u;for(var d=1;d<o-1;d+=l){for(var p=Math.min(d+l,o-1),g=Math.min(d+l*2,o),y=(g+p)/2,m=0,_=p;_<g;_++){var b=this.getRawIndex(_),w=i[b];isNaN(w)||(m+=w)}m/=g-p;var x=d,S=Math.min(d+l,o),T=d-1,D=i[u];c=-1,h=x;for(var M=-1,A=0,_=x;_<S;_++){var b=this.getRawIndex(_),w=i[b];if(isNaN(w)){A++,M<0&&(M=b);continue}f=Math.abs((T-y)*(w-D)-(T-_)*(m-D)),f>c&&(c=f,h=b)}A>0&&A<S-x&&(v[s++]=Math.min(M,h),h=Math.max(M,h)),v[s++]=h,u=h}return v[s++]=this.getRawIndex(o-1),n._count=s,n._indices=v,n.getRawIndex=this._getRawIdx,n},r.prototype.downSample=function(e,t,n,a){for(var i=this.clone([e],!0),o=i._chunks,s=[],l=Math.floor(1/t),u=o[e],c=this.count(),f=i._rawExtent[e]=cu(),h=new(xf(this._rawCount))(Math.ceil(c/l)),v=0,d=0;d<c;d+=l){l>c-d&&(l=c-d,s.length=l);for(var p=0;p<l;p++){var g=this.getRawIndex(d+p);s[p]=u[g]}var y=n(s),m=this.getRawIndex(Math.min(d+a(s,y)||0,c-1));u[m]=y,y<f[0]&&(f[0]=y),y>f[1]&&(f[1]=y),h[v++]=m}return i._count=v,i._indices=h,i._updateGetRawIdx(),i},r.prototype.each=function(e,t){if(!!this._count)for(var n=e.length,a=this._chunks,i=0,o=this.count();i<o;i++){var s=this.getRawIndex(i);switch(n){case 0:t(i);break;case 1:t(a[e[0]][s],i);break;case 2:t(a[e[0]][s],a[e[1]][s],i);break;default:for(var l=0,u=[];l<n;l++)u[l]=a[e[l]][s];u[l]=i,t.apply(null,u)}}},r.prototype.getDataExtent=function(e){var t=this._chunks[e],n=cu();if(!t)return n;var a=this.count(),i=!this._indices,o;if(i)return this._rawExtent[e].slice();if(o=this._extent[e],o)return o.slice();o=n;for(var s=o[0],l=o[1],u=0;u<a;u++){var c=this.getRawIndex(u),f=t[c];f<s&&(s=f),f>l&&(l=f)}return o=[s,l],this._extent[e]=o,o},r.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],a=this._chunks,i=0;i<a.length;i++)n.push(a[i][t]);return n},r.prototype.clone=function(e,t){var n=new r,a=this._chunks,i=e&&En(e,function(s,l){return s[l]=!0,s},{});if(i)for(var o=0;o<a.length;o++)n._chunks[o]=i[o]?P9(a[o]):a[o];else n._chunks=a;return this._copyCommonProps(n),t||(n._indices=this._cloneIndices()),n._updateGetRawIdx(),n},r.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=xe(this._extent),e._rawExtent=xe(this._rawExtent)},r.prototype._cloneIndices=function(){if(this._indices){var e=this._indices.constructor,t=void 0;if(e===Array){var n=this._indices.length;t=new e(n);for(var a=0;a<n;a++)t[a]=this._indices[a]}else t=new e(this._indices);return t}return null},r.prototype._getRawIdxIdentity=function(e){return e},r.prototype._getRawIdx=function(e){return e<this._count&&e>=0?this._indices[e]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=function(){function e(t,n,a,i){return lo(t[i],this._dimensions[i])}r1={arrayRows:e,objectRows:function(t,n,a,i){return lo(t[n],this._dimensions[i])},keyedColumns:e,original:function(t,n,a,i){var o=t&&(t.value==null?t:t.value);return lo(o instanceof Array?o[i]:o,this._dimensions[i])},typedArray:function(t,n,a,i){return t[i]}}}(),r}(),n1=E9,cL=function(){function r(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},r.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},r.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},r.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),n=!!t.length,a,i;if(qd(e)){var o=e,s=void 0,l=void 0,u=void 0;if(n){var c=t[0];c.prepareSource(),u=c.getSource(),s=u.data,l=u.sourceFormat,i=[c._getVersionSign()]}else s=o.get("data",!0),l=an(s)?so:Hn,i=[];var f=this._getSourceMetaRawOption()||{},h=u&&u.metaRawOption||{},v=Pe(f.seriesLayoutBy,h.seriesLayoutBy)||null,d=Pe(f.sourceHeader,h.sourceHeader),p=Pe(f.dimensions,h.dimensions),g=v!==h.seriesLayoutBy||!!d!=!!h.sourceHeader||p;a=g?[X_(s,{seriesLayoutBy:v,sourceHeader:d,dimensions:p},l)]:[]}else{var y=e;if(n){var m=this._applyTransform(t);a=m.sourceList,i=m.upstreamSignList}else{var _=y.get("source",!0);a=[X_(_,this._getSourceMetaRawOption(),null)],i=[]}}this._setLocalSource(a,i)},r.prototype._applyTransform=function(e){var t=this._sourceHost,n=t.get("transform",!0),a=t.get("fromTransformResult",!0);if(a!=null){var i="";e.length!==1&&hL(i)}var o,s=[],l=[];return L(e,function(u){u.prepareSource();var c=u.getSource(a||0),f="";a!=null&&!c&&hL(f),s.push(c),l.push(u._getVersionSign())}),n?o=M9(n,s,{datasetIndex:t.componentIndex}):a!=null&&(o=[l9(s[0])]),{sourceList:o,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t<e.length;t++){var n=e[t];if(n._isDirty()||this._upstreamSignList[t]!==n._getVersionSign())return!0}},r.prototype.getSource=function(e){e=e||0;var t=this._sourceList[e];if(!t){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(e)}return t},r.prototype.getSharedDataStore=function(e){var t=e.makeStoreSchema();return this._innerGetDataStore(t.dimensions,e.source,t.hash)},r.prototype._innerGetDataStore=function(e,t,n){var a=0,i=this._storeList,o=i[a];o||(o=i[a]={});var s=o[n];if(!s){var l=this._getUpstreamSourceManagers()[0];qd(this._sourceHost)&&l?s=l._innerGetDataStore(e,t,n):(s=new n1,s.initData(new qA(t,e.length),e)),o[n]=s}return s},r.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(qd(e)){var t=H_(e);return t?[t.getSourceManager()]:[]}else return ee(R7(e),function(n){return n.getSourceManager()})},r.prototype._getSourceMetaRawOption=function(){var e=this._sourceHost,t,n,a;if(qd(e))t=e.get("seriesLayoutBy",!0),n=e.get("sourceHeader",!0),a=e.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var i=e;t=i.get("seriesLayoutBy",!0),n=i.get("sourceHeader",!0),a=i.get("dimensions",!0)}return{seriesLayoutBy:t,sourceHeader:n,dimensions:a}},r}();function fL(r){var e=r.option.transform;e&&pc(r.option.transform)}function qd(r){return r.mainType==="series"}function hL(r){throw new Error(r)}var vL="line-height:1";function dL(r,e){var t=r.color||"#6e7079",n=r.fontSize||12,a=r.fontWeight||"400",i=r.color||"#464646",o=r.fontSize||14,s=r.fontWeight||"900";return e==="html"?{nameStyle:"font-size:"+Vr(n+"")+"px;color:"+Vr(t)+";font-weight:"+Vr(a+""),valueStyle:"font-size:"+Vr(o+"")+"px;color:"+Vr(i)+";font-weight:"+Vr(s+"")}:{nameStyle:{fontSize:n,fill:t,fontWeight:a},valueStyle:{fontSize:o,fill:i,fontWeight:s}}}var O9=[0,10,20,30],R9=["",`
214
- `,`
215
-
216
- `,`
217
-
218
-
219
- `];function nr(r,e){return e.type=r,e}function a1(r){return r.type==="section"}function pL(r){return a1(r)?N9:k9}function gL(r){if(a1(r)){var e=0,t=r.blocks.length,n=t>1||t>0&&!r.noHeader;return L(r.blocks,function(a){var i=gL(a);i>=e&&(e=i+ +(n&&(!i||a1(a)&&!a.noHeader)))}),e}return 0}function N9(r,e,t,n){var a=e.noHeader,i=z9(gL(e)),o=[],s=e.blocks||[];Ar(!s||J(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 aL(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=pL(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):i1(o.join(""),a?t:i.html);if(a)return f;var h=z_(e.header,"ordinal",r.useUTC),v=dL(n,r.renderMode).nameStyle;return r.renderMode==="richText"?mL(r,h,v)+i.richText+f:i1('<div style="'+v+";"+vL+';">'+Vr(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=J(b)?b:[b],ee(b,function(w,x){return z_(w,J(v)?v[x]:v,u)})};if(!(i&&o)){var f=s?"":r.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",a),h=i?"":z_(l,"ordinal",u),v=e.valueType,d=o?[]:c(e.value),p=!s||!i,g=!s&&i,y=dL(n,a),m=y.nameStyle,_=y.valueStyle;return a==="richText"?(s?"":f)+(i?"":mL(r,h,m))+(o?"":V9(r,d,p,g,_)):i1((s?"":f)+(i?"":B9(h,!s,m))+(o?"":F9(d,p,g,_)),t)}}function yL(r,e,t,n,a,i){if(!!r){var o=pL(r),s={useUTC:a,renderMode:t,orderMode:n,markupStyleCreator:e,valueFormatter:r.valueFormatter};return o(s,r,0,i)}}function z9(r){return{html:O9[r],richText:R9[r]}}function i1(r,e){var t='<div style="clear:both"></div>',n="margin: "+e+"px 0 0";return'<div style="'+n+";"+vL+';">'+r+t+"</div>"}function B9(r,e,t){var n=e?"margin-left:2px":"";return'<span style="'+t+";"+n+'">'+Vr(r)+"</span>"}function F9(r,e,t,n){var a=t?"10px":"20px",i=e?"float:right;margin-left:"+a:"";return r=J(r)?r:[r],'<span style="'+i+";"+n+'">'+ee(r,function(o){return Vr(o)}).join("&nbsp;&nbsp;")+"</span>"}function mL(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(J(e)?e.join(" "):e,i)}function _L(r,e){var t=r.getData().getItemVisual(e,"style"),n=t[r.visualDrawType];return ws(n)}function bL(r,e){var t=r.get("padding");return t!=null?t:e==="richText"?[8,10]:10}var o1=function(){function r(){this.richTextStyles={},this._nextStyleNameId=nD()}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=pA({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={};J(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 xL(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=J(s),u=_L(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=uu(a,t,i[0]),f=p.type}else v=c=l?s[0]:s;var g=k0(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:!On(_),value:c,valueType:f})].concat(h||[])})}function $9(r,e,t,n,a){var i=e.getData(),o=En(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(uu(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 uo=qe();function Zd(r,e){return r.getName(e)||r.getId(e)}var Xd="__universalTransitionEnabled",Qd=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=bf({count:G9,reset:W9}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,a);var i=uo(this).sourceManager=new cL(this);i.prepareSource();var o=this.getInitialData(t,a);SL(o,this),this.dataTask.context.data=o,uo(this).dataBeforeProcessed=o,wL(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(t,n){var a=pf(this),i=a?au(t):{},o=this.subType;$e.hasClass(o)&&(o+="Series"),Ie(t,n.getTheme().get(this.subType)),Ie(t,this.getDefaultOption()),rs(t,"label",["show"]),this.fillDataTextStyle(t.data),a&&oo(t,i,a)},e.prototype.mergeOption=function(t,n){t=Ie(this.option,t,!0),this.fillDataTextStyle(t.data);var a=pf(this);a&&oo(this.option,t,a);var i=uo(this).sourceManager;i.dirty(),i.prepareSource();var o=this.getInitialData(t,n);SL(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,uo(this).dataBeforeProcessed=o,wL(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(t){if(t&&!an(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=s1(this);if(n){var a=n.context.data;return t==null?a:a.getLinkedData(t)}else return uo(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=s1(this);if(n){var a=n.context;a.outputData=t,n!==this.dataTask&&(a.data=t)}uo(this).data=t},e.prototype.getEncode=function(){var t=this.get("encode",!0);if(t)return ge(t)},e.prototype.getSourceManager=function(){return uo(this).sourceManager},e.prototype.getSource=function(){return this.getSourceManager().getSource()},e.prototype.getRawData=function(){return uo(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 xL({series:this,dataIndex:t,multipleSeries:n})},e.prototype.isAnimationEnabled=function(){var t=this.ecModel;if(je.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=W_.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=Zd(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[Zd(i,t)])&&!i.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[Xd])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=Zd(t,f);u[h]=!0,this._selectedDataIndicesMap[h]=t.getRawIndex(f)}}else if(s==="single"||s===!0){var v=n[l-1],h=Zd(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);Pt(Qd,e1),Pt(Qd,W_),gD(Qd,$e);function wL(r){var e=r.name;k0(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 SL(r,e){L(gc(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(t){r.wrapMethod(t,Ae(j9,e))})}function j9(r,e){var t=s1(r);return t&&t.setOutputEnd((e||this).count()),e}function s1(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 gt=Qd,l1=function(){function r(){this.group=new Ce,this.uid=tu("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}();F0(l1),od(l1);var wt=l1;function fu(){var r=qe();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 CL=qe(),Y9=fu(),u1=function(){function r(){this.group=new Ce,this.uid=tu("viewChart"),this.renderTask=bf({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||DL(i,a,"emphasis")},r.prototype.downplay=function(e,t,n,a){var i=e.getData(a&&a.dataType);!i||DL(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){ao(this.group,e)},r.markUpdateMethod=function(e,t){CL(e).updateMethod=t},r.protoInitialize=function(){var e=r.prototype;e.type="chart"}(),r}();function TL(r,e,t){r&&Kc(r)&&(e==="emphasis"?vi:di)(r,t)}function DL(r,e,t){var n=ns(r,e),a=e&&e.highlightKey!=null?wW(e.highlightKey):null;n!=null?L(ct(n),function(i){TL(r.getItemGraphicEl(i),t,a)}):r.eachItemGraphicEl(function(i){TL(i,t,a)})}F0(u1),od(u1);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&&CL(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)}}},ht=u1,Kd="\0__throttleOriginMethod",ML="\0__throttleRate",AL="\0__throttleType";function Jd(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 hu(r,e,t,n){var a=r[e];if(!!a){var i=a[Kd]||a,o=a[AL],s=a[ML];if(s!==t||o!==n){if(t==null||!n)return r[e]=i;a=r[e]=Jd(i,t,n==="debounce"),a[Kd]=i,a[AL]=n,a[ML]=t}return a}}function wf(r,e){var t=r[e];t&&t[Kd]&&(t.clear&&t.clear(),r[e]=t[Kd])}var LL=qe(),IL={itemStyle:is(tA,!0),lineStyle:is(eA,!0)},Q9={lineStyle:"stroke",itemStyle:"fill"};function PL(r,e){var t=r.visualStyleMapper||IL[e];return t||(console.warn("Unknown style type '"+e+"'."),IL.itemStyle)}function EL(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=PL(r,n),o=i(a),s=a.getShallow("decal");s&&(t.setVisual("decal",s),s.dirty=!0);var l=EL(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)}}}},Sf=new ft,J9={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!(r.ignoreStyleOnData||e.isSeriesFiltered(r))){var t=r.getData(),n=r.visualStyleAccessPath||"itemStyle",a=PL(r,n),i=t.getVisual("drawType");return{dataEach:t.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){Sf.option=l[n];var u=a(Sf),c=o.ensureUniqueItemVisual(s,"style");Q(c,u),Sf.option.decal&&(o.setItemVisual(s,"decal",Sf.option.decal),Sf.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)),LL(t).scope=i}}),r.eachSeries(function(t){if(!(t.isColorBySeries()||r.isSeriesFiltered(t))){var n=t.getRawData(),a={},i=t.getData(),o=LL(t).scope,s=t.visualStyleAccessPath||"itemStyle",l=EL(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)}})}})}},ep=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 Ce,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 Sd({shape:{startAngle:-ep/2,endAngle:-ep/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:ep*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:ep*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="";Ar(!(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)||bf({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||bf({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="";Ar(!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,bf({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=tu("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=ct(r.reset(r.model,r.ecModel,r.api,r.payload));return e.length>1?ee(e,function(t,n){return OL(n)}):u6}var u6=OL(0);function OL(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){tp=null;try{r(Cf,RL)}catch{}return tp}var Cf={},RL={},tp;NL(Cf,OA),NL(RL,RA),Cf.eachSeriesByType=Cf.eachRawSeriesByType=function(r){tp=r},Cf.eachComponent=function(r){r.mainType==="series"&&r.subType&&(tp=r.subType)};function NL(r,e){for(var t in e.prototype)r[t]=Et}var kL=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]},Yr="#B9B8CE",BL="#100C2A",rp=function(){return{axisLine:{lineStyle:{color:Yr}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},FL=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],VL={darkMode:!0,color:FL,backgroundColor:BL,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:Yr}},textStyle:{color:Yr},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:Yr}},dataZoom:{borderColor:"#71708A",textStyle:{color:Yr},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:Yr}},timeline:{lineStyle:{color:Yr},label:{color:Yr},controlStyle:{color:Yr,borderColor:Yr}},calendar:{itemStyle:{color:BL},dayLabel:{color:Yr},monthLabel:{color:Yr},yearLabel:{color:Yr}},timeAxis:rp(),logAxis:rp(),valueAxis:rp(),categoryAxis:rp(),line:{symbol:"circle"},graph:{color:FL},gauge:{title:{color:Yr},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:Yr},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};VL.categoryAxis.splitLine.show=!1;var v6=VL,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}(),c1=["symbol","symbolSize","symbolRotate","symbolOffset"],$L=c1.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<c1.length;o++){var s=c1[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<$L.length;s++){var l=$L[s],u=o.getShallow(l,!0);u!=null&&a.setItemVisual(i,l,u)}}return{dataEach:t.hasItemOption?n:null}}};function f1(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 Tf(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 HL(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 GL(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 vu(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:J(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?(vu("map","selectchanged",e,a,n),vu("pie","selectchanged",e,a,n)):n.fromAction==="select"?(vu("map","selected",e,a,n),vu("pie","selected",e,a,n)):n.fromAction==="unselect"&&(vu("map","unselected",e,a,n),vu("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=ze.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=ze.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=ze.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=ze.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:da,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}},np={};L(D6,function(r,e){np[e]=new r});var A6=ze.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(r,e,t){var n=rd(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=np[n];a||(n="rect",a=np[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=b_(r.slice(8),new Oe(e,t,n,a),o?"center":"cover"):r.indexOf("path://")===0?l=of(r.slice(7),{},new Oe(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 Df(r){return J(r)||(r=[+r,+r]),[r[0]||0,r[1]||0]}function du(r,e){if(r!=null)return J(r)||(r=[r,r]),[le(r[0],e[0])||0,le(Pe(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 h1(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 ap(r){return parseInt(r,10)}function pu(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]||ap(s[n])||ap(r.style[n]))-(ap(s[i])||0)-(ap(s[o])||0)|0}function O6(r,e){return!r||r==="solid"||!(e>0)?null:r==="dashed"?[4*e,2*e]:r==="dotted"?[e]:Ye(r)?[r]:J(r)?r:null}function v1(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=ee(t,function(i){return i/a}),n/=a)}return[t,n]}var R6=new Va(!0);function ip(r){var e=r.stroke;return!(e==null||e==="none"||!(r.lineWidth>0))}function WL(r){return typeof r=="string"&&r!=="none"}function op(r){var e=r.fill;return e!=null&&e!=="none"}function UL(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 jL(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 d1(r,e,t){var n=$0(e.image,e.__image,t);if(sd(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)*mc),i.scaleSelf(e.scaleX||1,e.scaleY||1),a.setTransform(i)}return a}}function N6(r,e,t,n){var a,i=ip(t),o=op(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?h1(r,h,x):e.__canvasFillGradient,e.__canvasFillGradient=m),p&&(_=f?h1(r,v,x):e.__canvasStrokeGradient,e.__canvasStrokeGradient=_),g&&(b=f||!e.__canvasFillPattern?d1(r,h,e):e.__canvasFillPattern,e.__canvasFillPattern=b),y&&(w=f||!e.__canvasStrokePattern?d1(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=v1(e),T=a[0],D=a[1]);var M=!0;(u||f&Rl)&&(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&&jL(r,t),o&&UL(r,t)):(o&&UL(r,t),i&&jL(r,t))),T&&r.setLineDash([])}function k6(r,e,t){var n=e.__image=$0(t.image,e.__image,e,e.onload);if(!(!n||!sd(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 z6(r,e,t){var n,a=t.text;if(a!=null&&(a+=""),a){r.font=t.font||Vi,r.textAlign=t.textAlign,r.textBaseline=t.textBaseline;var i=void 0,o=void 0;r.setLineDash&&t.lineDash&&(n=v1(e),i=n[0],o=n[1]),i&&(r.setLineDash(i),r.lineDashOffset=o),t.strokeFirst?(ip(t)&&r.strokeText(a,t.x,t.y),op(t)&&r.fillText(a,t.x,t.y)):(op(t)&&r.fillText(a,t.x,t.y),ip(t)&&r.strokeText(a,t.x,t.y)),i&&r.setLineDash([])}}var YL=["shadowBlur","shadowOffsetX","shadowOffsetY"],qL=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function ZL(r,e,t,n,a){var i=!1;if(!n&&(t=t||{},e===t))return!1;if(n||e.opacity!==t.opacity){cn(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||(cn(r,a),i=!0),r.globalCompositeOperation=e.blend||os.blend);for(var s=0;s<YL.length;s++){var l=YL[s];(n||e[l]!==t[l])&&(i||(cn(r,a),i=!0),r[l]=r.dpr*(e[l]||0))}return(n||e.shadowColor!==t.shadowColor)&&(i||(cn(r,a),i=!0),r.shadowColor=e.shadowColor||os.shadowColor),i}function XL(r,e,t,n,a){var i=Mf(e,a.inHover),o=n?null:t&&Mf(t,a.inHover)||{};if(i===o)return!1;var s=ZL(r,i,o,n,a);if((n||i.fill!==o.fill)&&(s||(cn(r,a),s=!0),WL(i.fill)&&(r.fillStyle=i.fill)),(n||i.stroke!==o.stroke)&&(s||(cn(r,a),s=!0),WL(i.stroke)&&(r.strokeStyle=i.stroke)),(n||i.opacity!==o.opacity)&&(s||(cn(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||(cn(r,a),s=!0),r.lineWidth=u)}for(var c=0;c<qL.length;c++){var f=qL[c],h=f[0];(n||i[h]!==o[h])&&(s||(cn(r,a),s=!0),r[h]=i[h]||f[1])}return s}function B6(r,e,t,n,a){return ZL(r,Mf(e,a.inHover),t&&Mf(t,a.inHover),n,a)}function QL(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(),QL(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 KL=1,JL=2,eI=3,tI=4;function $6(r){var e=op(r),t=ip(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 cn(r,e){e.batchFill&&r.fill(),e.batchStroke&&r.stroke(),e.batchFill="",e.batchStroke=""}function Mf(r,e){return e&&r.__hoverStyle||r.style}function p1(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&=~bn,e.__isRendered=!1;return}var i=e.__clipPaths,o=t.prevElClipPaths,s=!1,l=!1;if((!o||E6(i,o))&&(o&&o.length&&(cn(r,t),r.restore(),l=s=!0,t.prevElClipPaths=null,t.allClipped=!1,t.prevEl=null),i&&i.length&&(cn(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 ze&&e.autoBatch&&$6(e.style);s||V6(a,u.transform)?(cn(r,t),QL(r,e)):c||cn(r,t);var f=Mf(e,t.inHover);e instanceof ze?(t.lastDrawType!==KL&&(l=!0,t.lastDrawType=KL),XL(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 Yc?(t.lastDrawType!==eI&&(l=!0,t.lastDrawType=eI),XL(r,e,u,l,t),z6(r,e,f)):e instanceof ur?(t.lastDrawType!==JL&&(l=!0,t.lastDrawType=JL),B6(r,e,u,l,t),k6(r,e,f)):e.getTemporalDisplayables&&(t.lastDrawType!==tI&&(l=!0,t.lastDrawType=tI),H6(r,e,t)),c&&n&&cn(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 g1=new x6,rI=new Lc(100),nI=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function gu(r,e){if(r==="none")return null;var t=e.getDevicePixelRatio(),n=e.getZr(),a=n.painter.type==="svg";r.dirty&&g1.delete(r);var i=g1.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,g1.set(r,s),r.dirty=!1,s;function l(u){for(var c=[t],f=!0,h=0;h<nI.length;++h){var v=o[nI[h]];if(v!=null&&!J(v)&&!ce(v)&&!Ye(v)&&typeof v!="boolean"){f=!1;break}c.push(v)}var d;if(f){d=c.join(",")+(a?"-svg":"");var p=rI.get(d);p&&(a?u.svgElement=p:u.image=p)}var g=iI(o.dashArrayX),y=G6(o.dashArrayY),m=aI(o.symbol),_=W6(g),b=oI(y),w=!a&&sa.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&&rI.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=iD(A,_[I]);for(var E=1,I=0,P=m.length;I<P;++I)E=iD(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,q=0;$<S.width*2;){for(var te=0,I=0;I<g[N].length;++I)te+=g[N][I];if(te<=0)break;if(U%2===0){var H=(1-o.symbolSize)*.5,Y=$+g[N][U]*H,X=P+y[E]*H,Z=g[N][U]*o.symbolSize,ie=y[E]*o.symbolSize,se=q/2%m[V].length;ne(Y,X,Z,ie,m[V][se])}$+=g[N][U],++q,++U,U===g[N].length&&(U=0)}++N,N===g.length&&(N=0)}P+=y[E],++O,++E,E===y.length&&(E=0)}function ne(ve,R,F,G,ae){var re=a?1:t,K=kt(ae,ve*re,R*re,F*re,G*re,o.color,o.symbolKeepAspect);if(a){var ue=n.painter.renderOneToVNode(K);ue&&x.children.push(ue)}else p1(T,K)}}}}function aI(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 aI([r]);for(var n=[],t=0;t<r.length;++t)ce(r[t])?n.push([r[t]]):n.push(r[t]);return n}function iI(r){if(!r||r.length===0)return[[0,0]];if(Ye(r)){var e=Math.ceil(r);return[[e,e]]}for(var t=!0,n=0;n<r.length;++n)if(!Ye(r[n])){t=!1;break}if(t)return iI([r]);for(var a=[],n=0;n<r.length;++n)if(Ye(r[n])){var e=Math.ceil(r[n]);a.push([e,e])}else{var e=ee(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(Ye(r)){var e=Math.ceil(r);return[e,e]}var t=ee(r,function(n){return Math.ceil(n)});return r.length%2?t.concat(t):t}function W6(r){return ee(r,function(e){return oI(e)})}function oI(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=gu(s,e)}});var a=n.getVisual("decal");if(a){var i=n.getVisual("style");i.decal=gu(a,e)}}})}var j6=new Rn,_a=j6,sI={};function Y6(r,e){sI[r]=e}function lI(r){return sI[r]}var q6="5.4.1",Z6={zrender:"5.4.1"},X6=1,Q6=800,K6=900,J6=1e3,eU=2e3,tU=5e3,uI=1e3,rU=1100,y1=2e3,cI=3e3,nU=4e3,sp=4500,aU=4600,iU=5e3,oU=6e3,fI=7e3,hI={PROCESSOR:{FILTER:J6,SERIES_FILTER:Q6,STATISTIC:tU},VISUAL:{LAYOUT:uI,PROGRESSIVE_LAYOUT:rU,GLOBAL:y1,CHART:cI,POST_CHART_LAYOUT:aU,COMPONENT:nU,BRUSH:iU,CHART_ITEM:sp,ARIA:oU,DECAL:fI}},Or="__flagInMainProcess",fn="__pendingUpdate",m1="__needsUpdateStatus",vI=/^[a-zA-Z0-9_]+$/,_1="__connectUpdateStatus",dI=0,sU=1,lU=2;function pI(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(this.isDisposed()){this.id;return}return yI(this,r,e)}}function gI(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return yI(this,r,e)}}function yI(r,e,t){return t[0]=t[0]&&t[0].toLowerCase(),Rn.prototype[e].apply(r,t)}var mI=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(Rn),_I=mI.prototype;_I.on=gI("on"),_I.off=gI("off");var yu,b1,lp,co,x1,w1,S1,Af,Lf,bI,xI,C1,wI,up,SI,CI,Un,TI,cp=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=DI[n]),i._dom=t;var o="canvas",s="auto",l=!1,u=i._zr=L0(t,{renderer:a.renderer||o,devicePixelRatio:a.devicePixelRatio,width:a.width,height:a.height,ssr:a.ssr,useDirtyRect:Pe(a.useDirtyRect,l),useCoarsePointer:Pe(a.useCoarsePointer,s),pointerSize:a.pointerSize});i._ssr=a.ssr,i._throttledZrFlush=Jd(fe(u.flush,u),17),n=xe(n),n&&$A(n,!0),i._theme=n,i._locale=m7(a.locale||rA),i._coordSysMgr=new lu;var c=i._api=SI(i);function f(h,v){return h.__prio-v.__prio}return zv(hp,f),zv(D1,f),i._scheduler=new kL(i,c,D1,hp),i._messageCenter=new mI,i._initEvents(),i.resize=fe(i.resize,i),u.animation.on("frame",i._onframe,i),bI(u,i),xI(u,i),pc(i),i}return e.prototype._onframe=function(){if(!this._disposed){TI(this);var t=this._scheduler;if(this[fn]){var n=this[fn].silent;this[Or]=!0;try{yu(this),co.update.call(this,null,this[fn].updateParams)}catch(l){throw this[Or]=!1,this[fn]=null,l}this._zr.flush(),this[Or]=!1,this[fn]=null,Af.call(this,n),Lf.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),w1(this,i),t.performVisualTasks(i),up(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[Or]){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[Or]=!0,!this._model||n){var l=new K7(this._api),u=this._theme,c=this._model=new OA;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(t,{replaceMerge:o},M1);var f={seriesTransition:s,optionChanged:!0};if(a)this[fn]={silent:i,updateParams:f},this[Or]=!1,this.getZr().wakeUp();else{try{yu(this),co.update.call(this,null,f)}catch(h){throw this[fn]=null,this[Or]=!1,h}this._ssr||this._zr.flush(),this[fn]=null,this[Or]=!1,Af.call(this,i),Lf.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||je.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(!!je.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(vp[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(xe(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=sa.createCanvas(),y=L0(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 x1(this,"convertToPixel",t,n)},e.prototype.convertFromPixel=function(t,n){return x1(this,"convertFromPixel",t,n)},e.prototype.containPixel=function(t,n){if(this._disposed){this.id;return}var a=this._model,i,o=Gc(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=Gc(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?f1(s,l,n):Tf(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(If,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&&vD(this.getDom(),L1,"");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[Or]){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[fn]&&(i==null&&(i=this[fn].silent),a=!0,this[fn]=null),this[Or]=!0;try{a&&yu(this),co.update.call(this,{type:"resize",animation:Q({duration:0},t&&t.animation)})}catch(o){throw this[Or]=!1,o}this[Or]=!1,Af.call(this,i),Lf.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(),!!A1[t]){var a=A1[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=If[t.type],n},e.prototype.dispatchAction=function(t,n){if(this._disposed){this.id;return}if(_e(n)||(n={silent:!!n}),!!fp[t.type]&&!!this._model){if(this[Or]){this._pendingActions.push(t);return}var a=n.silent;S1.call(this,t,a);var i=n.flush;i?this._zr.flush():i!==!1&&je.browser.weChat&&this._throttledZrFlush(),Af.call(this,a),Lf.call(this,a)}},e.prototype.updateLabelLayout=function(){_a.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(){yu=function(f){var h=f._scheduler;h.restorePipelines(f._model),h.prepareStageTasks(),b1(f,!0),b1(f,!1),h.plan()},b1=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):ht.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)}},lp=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(ct(_),function(x){var S=Xt(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(hM(v))if(x instanceof gt)v.type===ds&&!v.notBlur&&!x.get(["emphasis","disabled"])&&dW(x,v,f._api);else{var T=c_(x.mainType,x.componentIndex,v.name,f._api),D=T.focusSelf,M=T.dispatchers;v.type===ds&&D&&!v.notBlur&&u_(x.mainType,x.componentIndex,f._api),M&&L(M,function(A){v.type===ds?vi(A):di(A)})}else h_(v)&&x instanceof gt&&(yW(x,v,f._api),cM(x),Un(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)}},co={prepareAndUpdate:function(f){yu(this),co.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),w1(this,v),g.update(v,d),t(v),y.performVisualTasks(v,f),C1(this,v,d,f,h);var m=v.get("backgroundColor")||"transparent",_=v.get("darkMode");p.setBackgroundColor(m),_!=null&&_!=="auto"&&p.setDarkMode(_),_a.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}),up(this,v,d,f,{},g),_a.trigger("afterupdate",v,d)}},updateView:function(f){var h=this._model;!h||(h.setUpdatePayload(f),ht.markUpdateMethod(f,"updateView"),t(h),this._scheduler.performVisualTasks(h,f,{setDirty:!0}),C1(this,h,this._api,f,{}),_a.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()}),ht.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)}),_a.trigger("afterupdate",v,this._api))},updateLayout:function(f){co.update.call(this,f)}},x1=function(f,h,v,d){if(f._disposed){f.id;return}for(var p=f._model,g=f._coordSysMgr.getCoordinateSystems(),y,m=Gc(p,v),_=0;_<g.length;_++){var b=g[_];if(b[h]&&(y=b[h](p,m,d))!=null)return y}},w1=function(f,h){var v=f._chartsMap,d=f._scheduler;h.eachSeries(function(p){d.updateStreamModes(p,v[p.__viewId])})},S1=function(f,h){var v=this,d=this.getModel(),p=f.type,g=f.escapeConnect,y=fp[p],m=y.actionInfo,_=(m.update||"update").split(":"),b=_.pop(),w=_[0]!=null&&ka(_[0]);this[Or]=!0;var x=[f],S=!1;f.batch&&(S=!0,x=ee(f.batch,function(E){return E=me(Q({},E),f),E.batch=null,E}));var T=[],D,M=h_(f),A=hM(f);if(A&&uM(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=z0(f),N=O.queryOptionMap,V=O.mainTypeSpecified,$=V?N.keys()[0]:"series";lp(v,b,E,$),Un(v)}else M?(lp(v,b,E,"series"),Un(v)):w&&lp(v,b,E,w.main,w.sub)}),b!=="none"&&!A&&!M&&!w)try{this[fn]?(yu(this),co.update.call(this,f),this[fn]=null):co[b].call(this,f)}catch(E){throw this[Or]=!1,E}if(S?D={type:m.event||p,escapeConnect:g,batch:T}:D=T[0],this[Or]=!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)}}},Af=function(f){for(var h=this._pendingActions;h.length;){var v=h.shift();S1.call(this,v,f)}},Lf=function(f){!f&&this.trigger("updated")},bI=function(f,h){f.on("rendered",function(v){h.trigger("rendered",v),f.animation.isFinished()&&!h[fn]&&!h._scheduler.unfinished&&!h._pendingActions.length&&h.trigger("finished")})},xI=function(f,h){f.on("mouseover",function(v){var d=v.target,p=As(d,Kc);p&&(pW(p,v,h._api),Un(h))}).on("mouseout",function(v){var d=v.target,p=As(d,Kc);p&&(gW(p,v,h._api),Un(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;zv(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)})}}C1=function(f,h,v,d,p){n(h),wI(f,h,v,d,p),L(f._chartsViews,function(g){g.__alive=!1}),up(f,h,v,d,p),L(f._chartsViews,function(g){g.__alive||g.remove(h,v)})},wI=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)})},up=function(f,h,v,d,p,g){var y=f._scheduler;p=Q(p||{},{updatedSeries:h.getSeries()}),_a.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),cM(_)}),y.unfinished=m||y.unfinished,_a.trigger("series:layoutlabels",h,v,p),_a.trigger("series:transition",h,v,p),h.eachSeries(function(_){var b=f._chartsMap[_.__viewId];s(_,b),c(_,b)}),i(f,h),_a.trigger("series:afterupdate",h,v,p)},Un=function(f){f[m1]=!0,f.getZr().wakeUp()},TI=function(f){!f[m1]||(f.getZr().storage.traverse(function(h){Xl(h)||a(h)}),f[m1]=!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===dd&&f.states.emphasis?h.push("emphasis"):f.hoverState===qc&&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")&&!je.node&&!je.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(!Xl(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(Xl(y))return;if(y instanceof ze&&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)}})}SI=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){vi(d,p),Un(f)},v.prototype.leaveEmphasis=function(d,p){di(d,p),Un(f)},v.prototype.enterBlur=function(d){iM(d),Un(f)},v.prototype.leaveBlur=function(d){s_(d),Un(f)},v.prototype.enterSelect=function(d){oM(d),Un(f)},v.prototype.leaveSelect=function(d){sM(d),Un(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}(RA))(f)},CI=function(f){function h(v,d){for(var p=0;p<v.length;p++){var g=v[p];g[_1]=d}}L(If,function(v,d){f._messageCenter.on(d,function(p){if(vp[f.group]&&f[_1]!==dI){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,dI),L(y,function(m){m[_1]!==sU&&m.dispatchAction(g)}),h(y,lU)}})})}}(),e}(Rn),T1=cp.prototype;T1.on=pI("on"),T1.off=pI("off"),T1.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 Tde(r){}var fp={},If={},D1=[],M1=[],hp=[],DI={},A1={},Ps={},vp={},cU=+new Date-0,fU=+new Date-0,L1="_echarts_instance_";function hU(r,e,t){var n=!(t&&t.ssr);if(n){var a=I1(r);if(a)return a}var i=new cp(r,e,t);return i.id="ec_"+cU++,Ps[i.id]=i,n&&vD(r,L1,i.id),CI(i),_a.trigger("afterinit",i),i}function vU(r){if(J(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 vp[r]=!0,r}function MI(r){vp[r]=!1}var dU=MI;function pU(r){ce(r)?r=Ps[r]:r instanceof cp||(r=I1(r)),r instanceof cp&&!r.isDisposed()&&r.dispose()}function I1(r){return Ps[u8(r,L1)]}function gU(r){return Ps[r]}function P1(r,e){DI[r]=e}function E1(r){Ne(M1,r)<0&&M1.push(r)}function O1(r,e){R1(D1,r,e,eU)}function AI(r){dp("afterinit",r)}function LI(r){dp("afterupdate",r)}function dp(r,e){_a.on(r,e)}function ba(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,!If[e]&&(Ar(vI.test(n)&&vI.test(e)),fp[n]||(fp[n]={action:t,actionInfo:r}),If[e]=n)}function II(r,e){lu.register(r,e)}function yU(r){var e=lu.get(r);if(e)return e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice()}function PI(r,e){R1(hp,r,e,uI,"layout")}function fo(r,e){R1(hp,r,e,cI,"visual")}var EI=[];function R1(r,e,t,n,a){if((ye(e)||_e(e))&&(t=e,e=n),!(Ne(EI,t)>=0)){EI.push(t);var i=kL.wrapStageHandler(t,a);i.__prio=e,i.__raw=t,r.push(i)}}function N1(r,e){A1[r]=e}function mU(r){VT({createCanvas:r})}function OI(r,e,t){var n=lI("registerMap");n&&n(r,e,t)}function _U(r){var e=lI("getMap");return e&&e(r)}var RI=D9;fo(y1,K9),fo(sp,J9),fo(sp,e6),fo(y1,p6),fo(sp,g6),fo(fI,U6),E1($A),O1(K6,o9),N1("default",t6),ba({type:ds,event:ds,update:ds},Et),ba({type:pd,event:pd,update:pd},Et),ba({type:Xc,event:Xc,update:Xc},Et),ba({type:gd,event:gd,update:gd},Et),ba({type:Qc,event:Qc,update:Qc},Et),P1("light",h6),P1("dark",v6);var bU={},NI=[],xU={registerPreprocessor:E1,registerProcessor:O1,registerPostInit:AI,registerPostUpdate:LI,registerUpdateLifecycle:dp,registerAction:ba,registerCoordinateSystem:II,registerLayout:PI,registerVisual:fo,registerTransform:RI,registerLoading:N1,registerMap:OI,registerImpl:Y6,PRIORITY:hI,ComponentModel:$e,ComponentView:wt,SeriesModel:gt,ChartView:ht,registerComponentModel:function(r){$e.registerClass(r)},registerComponentView:function(r){wt.registerClass(r)},registerSeriesModel:function(r){gt.registerClass(r)},registerChartView:function(r){ht.registerClass(r)},registerSubTypeDefaulter:function(r,e){$e.registerSubTypeDefaulter(r,e)},registerPainter:function(r,e){Q2(r,e)}};function ke(r){if(J(r)){L(r,function(e){ke(e)});return}Ne(NI,r)>=0||(NI.push(r),ye(r)&&(r={install:r}),r.install(xU))}function Pf(r){return r==null?0:r.length||1}function kI(r){return r}var wU=function(){function r(e,t,n,a,i,o){this._old=e,this._new=t,this._oldKeyGetter=n||kI,this._newKeyGetter=a||kI,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=Pf(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=Pf(u),h=Pf(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=Pf(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=Pf(l);u===0?(t[s]=o,i&&n.push(s)):u===1?t[s]=[l,o]:l.push(o)}}},r}(),gi=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;k1(n,d)[p]=h,v.isExtraCoord||(a.set(d,1),TU(v.type)&&(i[0]=h),k1(s,d)[p]=r.getDimensionIndex(v.name)),v.defaultTooltip&&o.push(h)}_A.each(function(g,y){var m=k1(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=ee(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 k1(r,e){return r.hasOwnProperty(e)||(r[e]=[]),r[e]}function pp(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}(),gp=DU,MU=qe(),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=VI(this.source)))},r.prototype.getSourceDimensionIndex=function(e){return Pe(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=UA(this.source),n=!$I(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 BI(r){return r instanceof zI}function FI(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 VI(r){var e=MU(r);return e.dimNameMap||(e.dimNameMap=FI(r.dimensionsDefine))}function $I(r){return r>30}var Ef=_e,ho=ee,LU=typeof Int32Array=="undefined"?Array:Int32Array,IU="e\0\0",HI=-1,PU=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],EU=["_approximateExtent"],GI,yp,Of,Rf,z1,mp,B1,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;BI(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 gp({name:f}):f instanceof gp?f:new gp(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(Ye(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 n1&&(i=e),!i){var o=this.dimensions,s=Z_(e)||yr(e)?new qA(e,o.length):e;i=new n1;var l=ho(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&&B1(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!==so&&!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===Hn;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]=Xt(h,null));var v=f.id;o[c]==null&&v!=null&&(o[c]=Xt(v,null))}}if(this._shouldMakeIdFromName())for(var c=e;c<t;c++)B1(this,c);GI(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){Ef(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=Of(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 yp(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 J(e)?a.getValues(ho(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)?HI: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=ho(Rf(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=ho(Rf(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=ho(Rf(e),this._getStoreDimIndex,this),s=mp(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=ho(Rf(e),this._getStoreDimIndex,this);this._store.modify(o,i?fe(t,i):t)},r.prototype.downSample=function(e,t,n,a){var i=mp(this);return i._store=this._store.downSample(this._getStoreDimIndex(e),t,n,a),i},r.prototype.lttbDownSample=function(e,t){var n=mp(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 ft(n,t,t&&t.ecModel)},r.prototype.diff=function(e){var t=this;return new gi(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(n){return yp(e,n)},function(n){return yp(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||{},Ef(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),J(i)?i=i.slice():Ef(i)&&(i=Q({},i)),a[t]=i),i},r.prototype.setItemVisual=function(e,t,n){var a=this._itemVisuals[e]||{};this._itemVisuals[e]=a,Ef(t)?Q(a,t):a[t]=n},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(e,t){Ef(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;r_(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:ho(this.dimensions,this._getDimInfo,this),this.hostModel)),z1(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(Lv(arguments)))})},r.internalField=function(){GI=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]=HI;for(var l=0;l<s.count();l++)n[s.get(i.storeDimIndex,l)]=l}})},Of=function(e,t,n){return Xt(e._getCategory(t,n),null)},yp=function(e,t){var n=e._idList[t];return n==null&&e._idDimIdx!=null&&(n=Of(e,e._idDimIdx,t)),n==null&&(n=IU+t),n},Rf=function(e){return J(e)||(e=e!=null?[e]:[]),e},mp=function(e){var t=new r(e._schema?e._schema:ho(e.dimensions,e._getDimInfo,e),e.hostModel);return z1(t,e),t},z1=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]=xe(t[n])}),e._calculationInfo=Q({},t._calculationInfo)},B1=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=Of(e,i,t)),l==null&&o!=null&&(a[t]=l=Of(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}(),Rr=OU;function RU(r,e){return mu(r,e).dimensions}function mu(r,e){Z_(r)||(r=Q_(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&&$I(o),l=n===r.dimensionsDefine,u=l?VI(r):FI(n),c=e.encodeDefine;!c&&e.encodeDefaulter&&(c=e.encodeDefaulter(r,o));for(var f=ge(c),h=new oL(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 gp,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=ct(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=ct(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 q=A[$];!_e(q)&&(q={name:q}),U.name=U.displayName=q.name,U.defaultTooltip=q.defaultTooltip}I&&me(U.otherDims,I)})}});function g(D,M,A){_A.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=zU(b,a,_),S.coordDimIndex=0,(!y||m<=0)&&(S.isExtraCoord=!0),m--),w(S),S.type==null&&(SA(r,x)===br.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 zU(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 BU=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 BU(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",Wt).models[0],i=r.getReferringComponents("yAxis",Wt).models[0];e.coordSysDims=["x","y"],t.set("x",a),t.set("y",i),_u(a)&&(n.set("x",a),e.firstCategoryDimIndex=0),_u(i)&&(n.set("y",i),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(r,e,t,n){var a=r.getReferringComponents("singleAxis",Wt).models[0];e.coordSysDims=["single"],t.set("single",a),_u(a)&&(n.set("single",a),e.firstCategoryDimIndex=0)},polar:function(r,e,t,n){var a=r.getReferringComponents("polar",Wt).models[0],i=a.findAxisModel("radiusAxis"),o=a.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],t.set("radius",i),t.set("angle",o),_u(i)&&(n.set("radius",i),e.firstCategoryDimIndex=0),_u(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),_u(u)&&(n.set(c,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})}};function _u(r){return r.get("type")==="category"}function WI(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!BI(r.schema)}function yi(r,e){return!!e&&e===r.getCalculationInfo("stackedDimension")}function F1(r,e){return yi(r,e)?r.getCalculationInfo("stackResultDimension"):e}function HU(r,e){var t=r.get("coordinateSystem"),n=lu.get(t),a;return e&&e.coordSysDims&&(a=ee(e.coordSysDims,function(i){var o={name:i},s=e.axisMap.get(i);if(s){var l=s.get("type");o.type=pp(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=Q_(r)):(a=n.getSource(),i=a.sourceFormat===Hn);var o=FU(e),s=HU(e,o),l=t.useEncodeDefaulter,u=ye(l)?l:l?Ae(wA,s,e):null,c={coordDimensions:s,generateCoord:t.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!i},f=mu(a,c),h=GU(f.dimensions,t.createInvertedIndices,o),v=i?null:n.getSharedDataStore(f),d=WI(e,{schema:f,store:v}),p=new Rr(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===Hn){var e=UU(r.data||[]);return!J(Hl(e))}}function UU(r){for(var e=0;e<r.length&&r[e]==null;)e++;return r[e]}var UI=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}();od(UI);var mi=UI,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&&ee(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 V1=YU;function $1(r){return r.type==="interval"||r.type==="log"}function ZU(r,e,t,n){var a={},i=r[1]-r[0],o=a.interval=O0(i/e,!0);t!=null&&o<t&&(o=a.interval=t),n!=null&&o>n&&(o=a.interval=n);var s=a.intervalPrecision=jI(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 H1(r){var e=Math.pow(10,ad(r)),t=r/e;return t?t===2?t=3:t===3?t=5:t*=2:t=1,At(t*e)}function jI(r){return va(r)+2}function YI(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]),YI(r,0,e),YI(r,1,e),r[0]>r[1]&&(r[0]=r[1])}function _p(r,e){return r>=e[0]&&r<=e[1]}function bp(r,e){return e[1]===e[0]?.5:(r-e[0])/(e[1]-e[0])}function xp(r,e){return r*(e[1]-e[0])+e[0]}var qI=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 V1({})),J(a)&&(a=new V1({categories:ee(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),_p(t,this._extent)&&this._ordinalMeta.categories[t]!=null},e.prototype.normalize=function(t){return t=this._getTickNumber(this.parse(t)),bp(t,this._extent)},e.prototype.scale=function(t){return t=Math.round(xp(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}(mi);mi.registerClass(qI);var G1=qI,Es=At,ZI=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 _p(t,this._extent)},e.prototype.normalize=function(t){return bp(t,this._extent)},e.prototype.scale=function(t){return xp(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=jI(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=va(t.value)||0:a==="auto"&&(a=this._intervalPrecision);var i=Es(t.value,a,!0);return N_(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}(mi);mi.registerClass(ZI);var vo=ZI,XI=typeof Float32Array!="undefined",QU=XI?Float32Array:Array;function Ua(r){return J(r)?XI?new Float32Array(r):r:new QU(r)}var W1="__ec_stack_";function U1(r){return r.get("stack")||W1+r.seriesIndex}function j1(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:W1+i},r));for(var o=JI(e),s=[],i=0;i<r.count;i++){var l=o[n][W1+i];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}}function QI(r,e){var t=[];return e.eachSeriesByType(r,function(n){rP(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 KI(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")||(nP(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:j1(i),stackId:U1(n)})}),JI(t)}function JI(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[j1(e)];return n!=null&&t!=null?n[U1(t)]:n}}function eP(r,e){var t=QI(r,e),n=KI(t);L(t,function(a){var i=a.getData(),o=a.coordinateSystem,s=o.getBaseAxis(),l=U1(a),u=n[j1(s)][l],c=u.offset,f=u.width;i.setLayout({bandWidth:u.bandWidth,offset:c,size:f})})}function tP(r){return{seriesType:r,plan:fu(),reset:function(e){if(!!rP(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=yi(t,u)&&!!t.getCalculationInfo("stackedOnSeries"),h=i.isHorizontal(),v=tj(a,i),d=nP(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,q=void 0,te=void 0;if(h){var H=n.dataToPoint([E,O]);if(f){var Y=n.dataToPoint([V,O]);N=Y[0]}$=N,U=H[1]+m,q=H[0]-N,te=y,Math.abs(q)<p&&(q=(q<0?-1:1)*p)}else{var H=n.dataToPoint([O,E]);if(f){var Y=n.dataToPoint([O,V]);N=Y[1]}$=H[0]+m,U=N,q=y,te=H[1]-N,Math.abs(te)<p&&(te=(te<=0?-1:1)*p)}d?(x[P]=$,x[P+1]=U,x[P+2]=h?q:te,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:q,height:te}),P+=3}d&&b.setLayout({largePoints:x,largeDataIndices:T,largeBackgroundPoints:S,valueAxisHorizontal:h})}}}}}}function rP(r){return r.coordinateSystem&&r.coordinateSystem.type==="cartesian2d"}function nP(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},aP=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 vf(t.value,aA[x7(ru(this._minLevelUnit))]||aA.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]-=$n,n[1]+=$n),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]-$n}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=wp.length,l=Math.min(rj(wp,this._approxInterval,0,s),s-1);this._interval=wp[l][1],this._minLevelUnit=wp[Math.max(l-1,0)][0]},e.prototype.parse=function(t){return Ye(t)?t:+Sn(t)},e.prototype.contain=function(t){return _p(this.parse(t),this._extent)},e.prototype.normalize=function(t){return bp(this.parse(t),this._extent)},e.prototype.scale=function(t){return xp(t,this._extent)},e.type="time",e}(vo),wp=[["second",P_],["minute",E_],["hour",ff],["quarter-day",ff*6],["half-day",ff*12],["day",$n*1.2],["half-week",$n*3.5],["week",$n*7],["month",$n*31],["quarter",$n*95],["half-year",nA/2],["year",nA]];function nj(r,e,t,n){var a=Sn(e),i=Sn(t),o=function(d){return sA(a,d,n)===sA(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/=$n,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function ij(r){var e=30*$n;return r/=e,r>6?6:r>3?3:r>2?2:1}function oj(r){return r/=ff,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function iP(r,e){return r/=e?E_:P_,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function sj(r){return O0(r,!0)}function lj(r,e,t){var n=new Date(r);switch(ru(e)){case"year":case"month":n[lA(t)](0);case"day":n[uA(t)](1);case"hour":n[cA(t)](0);case"minute":n[fA(t)](0);case"second":n[hA(t)](0),n[vA(t)](0)}return n.getTime()}function uj(r,e,t,n){var a=1e4,i=iA,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(ru(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,q=void 0,te=!1;switch(M){case"year":$=Math.max(1,Math.round(e/$n/365)),U=R_(t),q=S7(t);break;case"half-year":case"quarter":case"month":$=ij(e),U=nu(t),q=lA(t);break;case"week":case"half-week":case"day":$=aj(e),U=Bd(t),q=uA(t),te=!0;break;case"half-day":case"quarter-day":case"hour":$=oj(e),U=df(t),q=cA(t);break;case"minute":$=iP(e,!0),U=Fd(t),q=fA(t);break;case"second":$=iP(e,!1),U=Vd(t),q=hA(t);break;case"millisecond":$=sj(e),U=$d(t),q=vA(t);break}s($,N,V,U,q,te,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=ru(i[v]);if(!!b7(i[v])){l(i[v],u[u.length-1]||[],c);var p=i[v+1]?ru(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=at(ee(u,function(M){return at(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}mi.registerClass(aP);var oP=aP,sP=mi.prototype,Nf=vo.prototype,cj=At,fj=Math.floor,hj=Math.ceil,Sp=Math.pow,xa=Math.log,Y1=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 vo,t._interval=0,t}return e.prototype.getTicks=function(t){var n=this._originalScale,a=this._extent,i=n.getExtent(),o=Nf.getTicks.call(this,t);return ee(o,function(s){var l=s.value,u=At(Sp(this.base,l));return u=l===a[0]&&this._fixMin?Cp(u,i[0]):u,u=l===a[1]&&this._fixMax?Cp(u,i[1]):u,{value:u}},this)},e.prototype.setExtent=function(t,n){var a=xa(this.base);t=xa(Math.max(0,t))/a,n=xa(Math.max(0,n))/a,Nf.setExtent.call(this,t,n)},e.prototype.getExtent=function(){var t=this.base,n=sP.getExtent.call(this);n[0]=Sp(t,n[0]),n[1]=Sp(t,n[1]);var a=this._originalScale,i=a.getExtent();return this._fixMin&&(n[0]=Cp(n[0],i[0])),this._fixMax&&(n[1]=Cp(n[1],i[1])),n},e.prototype.unionExtent=function(t){this._originalScale.unionExtent(t);var n=this.base;t[0]=xa(t[0])/xa(n),t[1]=xa(t[1])/xa(n),sP.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=rD(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){Nf.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=xa(t)/xa(this.base),_p(t,this._extent)},e.prototype.normalize=function(t){return t=xa(t)/xa(this.base),bp(t,this._extent)},e.prototype.scale=function(t){return t=xp(t,this._extent),Sp(this.base,t)},e.type="log",e}(mi),lP=Y1.prototype;lP.getMinorTicks=Nf.getMinorTicks,lP.getLabel=Nf.getLabel;function Cp(r,e){return cj(r,va(e))}mi.registerClass(Y1);var vj=Y1,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=Tp(e,i({min:n[0],max:n[1]})):i!=="dataMin"&&(this._modelMinNum=Tp(e,i));var o=this._modelMaxRaw=t.get("max",!0);if(ye(o)?this._modelMaxNum=Tp(e,o({min:n[0],max:n[1]})):o!=="dataMax"&&(this._modelMaxNum=Tp(e,o)),a)this._axisDataLen=t.getCategories().length;else{var s=t.get("boundaryGap"),l=J(s)?s:[s||0,s||0];typeof l[0]=="boolean"||typeof l[1]=="boolean"?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[ha(l[0],1),ha(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=Pl(s)||Pl(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 uP(r,e,t){var n=r.rawExtentInfo;return n||(n=new dj(r,e,t),r.rawExtentInfo=n,n)}function Tp(r,e){return e==null?null:Pl(e)?NaN:r.parse(e)}function cP(r,e){var t=r.type,n=uP(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=QI("bar",o),l=!1;if(L(s,function(f){l=l||f.getBaseAxis()===e.axis}),l){var u=KI(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=cP(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 kf(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new G1({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new oP({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(mi.getClass(e)||vo)}}function mj(r){var e=r.scale.getExtent(),t=e[0],n=e[1];return!(t>0&&n>0||t<0&&n<0)}function zf(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(q1(r,a),i,a.level!=null?{level:a.level}:null)}}(e):function(n){return r.scale.getLabel(n)}}function q1(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 G1?a=t.count():(n=t.getTicks(),a=n.length);var o=r.getLabelModel(),s=zf(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 Oe(r.x,r.y,i,o);return s}function Z1(r){var e=r.get("interval");return e==null?"auto":e}function fP(r){return r.type==="category"&&Z1(r.getLabelModel())===0}function Dp(r,e){var t={};return L(r.mapDimensionsAll(e),function(n){t[F1(r,n)]=!0}),Fe(t)}function xj(r,e,t){e&&L(Dp(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 bu=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:yi,enableDataStack:WI,getStackedDimension:F1};function Cj(r,e){var t=e;e instanceof ft||(t=new ft(e));var n=kf(t);return n.setExtent(r[0],r[1]),Os(n,t),n}function Tj(r){Pt(r,bu)}function Dj(r,e){return e=e||{},pt(r,null,null,e.state!=="normal")}var Mj=Object.freeze(Object.defineProperty({__proto__:null,createList:wj,getLayoutRect:Ut,dataStack:Sj,createScale:Cj,mixinAxisModelCommonMethods:Tj,getECData:Me,createTextStyle:Dj,createDimensions:RU,createSymbol:kt,enableHoverEmphasis:to},Symbol.toStringTag,{value:"Module"})),Aj=1e-8;function hP(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+=fi(a[0],a[1],o[0],o[1],e,t),a=o}var s=r[0];return(!hP(a[0],s[0])||!hP(a[1],s[1]))&&(n+=fi(a[0],a[1],s[0],s[1],e,t)),n!==0}var Lj=[];function X1(r,e){for(var t=0;t<r.length;t++)sr(r[t],r[t],e)}function vP(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])&&(ii(e,e,i),oi(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 dP=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}(),pP=function(){function r(e,t){this.type="polygon",this.exterior=e,this.interiors=t}return r}(),gP=function(){function r(e){this.type="linestring",this.points=e}return r}(),yP=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"?vP(s.exterior,a,i,t):L(s.points,function(l){vP(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 Oe(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 Oe(t,n,a,i),u=o.calculateTransform(l),c=this.geometries,f=0;f<c.length;f++){var h=c[f];h.type==="polygon"?(X1(h.exterior,u),L(h.interiors,function(v){X1(v,u)})):L(h.points,function(v){X1(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}(dP),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=wc(Lj),o=t;o&&!o.isGeoSVGGraphicRoot;)Ea(i,o.getLocalTransform(),i),o=o.parent;return Yo(i,i),sr(a,a,i),a},e}(dP);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=mP(s,o,t);break;case"Polygon":Q1(s,o,t);break;case"MultiLineString":Q1(s,o,t);break;case"MultiPolygon":L(s,function(l,u){return Q1(l,o[u],t)})}}),e.UTF8Encoding=!1,e}function Q1(r,e,t){for(var n=0;n<r.length;n++)r[n]=mP(r[n],e[n],t)}function mP(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 K1(r,e){return r=Ej(r),ee(at(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 pP(o[0],o.slice(1)));break;case"MultiPolygon":L(a.coordinates,function(l){l[0]&&i.push(new pP(l[0],l.slice(1)))});break;case"LineString":i.push(new gP([a.coordinates]));break;case"MultiLineString":i.push(new gP(a.coordinates))}var s=new yP(n[e||"name"],i,n.cp);return s.properties=n,s})}var Oj=Object.freeze(Object.defineProperty({__proto__:null,linearMap:it,round:At,asc:wn,getPrecision:va,getPrecisionSafe:eD,getPixelPrecision:I0,getPercentWithPrecision:WG,MAX_SAFE_INTEGER:P0,remRadian:E0,isRadianAroundZero:Vc,parseDate:Sn,quantity:rD,quantityExponent:ad,nice:O0,quantile:id,reformIntervals:R0,isNumeric:N0,numericToNumber:Na},Symbol.toStringTag,{value:"Module"})),Rj=Object.freeze(Object.defineProperty({__proto__:null,parse:Sn,format:vf},Symbol.toStringTag,{value:"Module"})),Nj=Object.freeze(Object.defineProperty({__proto__:null,extendShape:FM,extendPath:VM,makePath:of,makeImage:b_,mergePath:Cn,resizePath:x_,createIcon:Kl,updateProps:Ze,initProps:xt,getTransform:no,clipPointsByRect:w_,clipRectByRect:GM,registerShape:Vn,getShapeClass:Id,Group:Ce,Image:ur,Text:We,Circle:da,Ellipse:xd,Sector:Wr,Ring:rf,Polygon:Ur,Polyline:jr,Rect:Ge,Line:tr,BezierCurve:nf,Arc:Sd,IncrementalDisplayable:kM,CompoundPath:Cd,LinearGradient:ql,RadialGradient:y_,BoundingRect:Oe},Symbol.toStringTag,{value:"Module"})),kj=Object.freeze(Object.defineProperty({__proto__:null,addCommas:N_,toCamelCase:k_,normalizeCssArray:xs,encodeHTML:Vr,formatTpl:F_,getTooltipMarker:pA,formatTime:D7,capitalFirst:M7,truncateText:mD,getTextRect:C7},Symbol.toStringTag,{value:"Module"})),zj=Object.freeze(Object.defineProperty({__proto__:null,map:ee,each:L,indexOf:Ne,inherits:Rm,reduce:En,filter:at,bind:fe,curry:Ae,isArray:J,isString:ce,isObject:_e,isFunction:ye,extend:Q,defaults:me,clone:xe,merge:Ie},Symbol.toStringTag,{value:"Module"})),Bf=qe();function Bj(r){return r.type==="category"?Vj(r):Hj(r)}function Fj(r,e){return r.type==="category"?$j(r,e):{ticks:ee(r.scale.getTicks(),function(t){return t.value})}}function Vj(r){var e=r.getLabelModel(),t=_P(r,e);return!e.get("show")||r.scale.isBlank()?{labels:[],labelCategoryInterval:t.labelCategoryInterval}:t}function _P(r,e){var t=bP(r,"labels"),n=Z1(e),a=xP(t,n);if(a)return a;var i,o;return ye(n)?i=CP(r,n):(o=n==="auto"?Gj(r):n,i=SP(r,o)),wP(t,n,{labels:i,labelCategoryInterval:o})}function $j(r,e){var t=bP(r,"ticks"),n=Z1(e),a=xP(t,n);if(a)return a;var i,o;if((!e.get("show")||r.scale.isBlank())&&(i=[]),ye(n))i=CP(r,n,!0);else if(n==="auto"){var s=_P(r,r.getLabelModel());o=s.labelCategoryInterval,i=ee(s.labels,function(l){return l.tickValue})}else o=n,i=SP(r,o,!0);return wP(t,n,{ticks:i,tickCategoryInterval:o})}function Hj(r){var e=r.scale.getTicks(),t=zf(r);return{labels:ee(e,function(n,a){return{level:n.level,formattedLabel:t(n,a),rawLabel:r.scale.getLabel(n),tickValue:n.value}})}}function bP(r,e){return Bf(r)[e]||(Bf(r)[e]=[])}function xP(r,e){for(var t=0;t<r.length;t++)if(r[t].key===e)return r[t].value}function wP(r,e,t){return r.push({key:e,value:t}),t}function Gj(r){var e=Bf(r).autoInterval;return e!=null?e:Bf(r).autoInterval=r.calculateCategoryInterval()}function Wj(r){var e=Uj(r),t=zf(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=Bc(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=Bf(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 SP(r,e,t){var n=zf(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=fP(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 CP(r,e,t){var n=r.scale,a=zf(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 TP=[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 I0(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(),DP(n,a.count())),it(e,TP,n,t)},r.prototype.coordToData=function(e,t){var n=this._extent,a=this.scale;this.onBand&&a.type==="ordinal"&&(n=n.slice(),DP(n,a.count()));var i=it(e,n,TP,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=ee(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=ee(n,function(i){return ee(i,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return a},r.prototype.getViewLabels=function(){return Bj(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 DP(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 jn=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=gt.extend(r);return gt.registerClass(e),e}function Qj(r){var e=ht.extend(r);return ht.registerClass(e),e}var Ff=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)%Ff<1e-4)return l[0]=c,l[1]=f,u-t;if(i){var h=n;n=Ji(a),a=Ji(h)}else n=Ji(n),a=Ji(a);n>a&&(a+=Ff);var v=Math.atan2(s,o);if(v<0&&(v+=Ff),v>=n&&v<=a||v+Ff>=n&&v+Ff<=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 Mp(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 MP(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 wa=[];function tY(r,e,t){var n=MP(e.x,e.y,e.width,e.height,r.x,r.y,wa);return t.set(wa[0],wa[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=Mp(n,a,c[v],c[v+1],f,h,wa,!0),n=c[v++],a=c[v++];break;case Ns.C:p=x2(n,a,c[v++],c[v++],c[v++],c[v++],c[v],c[v+1],f,h,wa),n=c[v++],a=c[v++];break;case Ns.Q:p=S2(n,a,c[v++],c[v++],c[v],c[v+1],f,h,wa),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,wa),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=MP(i,o,T,D,f,h,wa);break;case Ns.Z:p=Mp(n,a,i,o,f,h,wa,!0),n=i,a=o;break}p<u&&(u=p,t.set(wa[0],wa[1]))}return u}var Sa=new Ee,yt=new Ee,zt=new Ee,ja=new Ee,Ya=new Ee;function AP(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&&zt.copy(u);for(var v=0;v<o.length;v++){var d=o[v];Jj(d,0,s,Sa,ja),Ee.scaleAndAdd(yt,Sa,ja,h),yt.transform(f);var p=r.getBoundingRect(),g=u?u.distance(yt):r instanceof ze?rY(yt,r.path,zt):tY(yt,p,zt);g<l&&(l=g,yt.transform(c),zt.transform(c),zt.toArray(i[0]),yt.toArray(i[1]),Sa.toArray(i[2]))}LP(i,e.get("minTurnAngle")),t.setShape({points:i})}}}var Ap=[],qr=new Ee;function LP(r,e){if(e<=180&&e>0){e=e/180*Math.PI,Sa.fromArray(r[0]),yt.fromArray(r[1]),zt.fromArray(r[2]),Ee.sub(ja,Sa,yt),Ee.sub(Ya,zt,yt);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=Mp(yt.x,yt.y,zt.x,zt.y,Sa.x,Sa.y,Ap,!1);qr.fromArray(Ap),qr.scaleAndAdd(Ya,o/Math.tan(Math.PI-e));var s=zt.x!==yt.x?(qr.x-yt.x)/(zt.x-yt.x):(qr.y-yt.y)/(zt.y-yt.y);if(isNaN(s))return;s<0?Ee.copy(qr,yt):s>1&&Ee.copy(qr,zt),qr.toArray(r[1])}}}}function nY(r,e,t){if(t<=180&&t>0){t=t/180*Math.PI,Sa.fromArray(r[0]),yt.fromArray(r[1]),zt.fromArray(r[2]),Ee.sub(ja,yt,Sa),Ee.sub(Ya,zt,yt);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=Mp(yt.x,yt.y,zt.x,zt.y,Sa.x,Sa.y,Ap,!1);qr.fromArray(Ap);var l=Math.PI/2,u=Math.acos(Ya.dot(e)),c=l+u-t;if(c>=l)Ee.copy(qr,zt);else{qr.scaleAndAdd(Ya,s/Math.tan(Math.PI/2-c));var f=zt.x!==yt.x?(qr.x-yt.x)/(zt.x-yt.x):(qr.y-yt.y)/(zt.y-yt.y);if(isNaN(f))return;f<0?Ee.copy(qr,yt):f>1&&Ee.copy(qr,zt)}qr.toArray(r[1])}}}}function IP(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=ai(n[0],n[1]),i=ai(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=xc([],n[1],n[0],o/a),l=xc([],n[1],n[2],o/i),u=xc([],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 J1(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<Zc.length;l++){var u=Zc[l],c=e[u],f=u==="normal";if(c){var h=c.get("show"),v=f?s:Pe(a.states[u]&&a.states[u].ignore,s);if(v||!Pe(h,o)){var d=f?n:n&&n.states[u];d&&(d.ignore=!0);continue}n||(n=new jr,r.setTextGuideLine(n),!f&&(s||!o)&&IP(n,!0,"normal",e.normal),r.stateProxy&&(n.stateProxy=r.stateProxy)),IP(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 eb(r,e){e=e||"labelLine";for(var t={normal:r.getModel(e)},n=0;n<Gr.length;n++){var a=Gr[n];t[a]=r.getModel([a,e])}return t}function PP(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 Md(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 EP(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 EP(r,"x","width",e,t,n)}function OP(r,e,t,n){return EP(r,"y","height",e,t,n)}function RP(r){var e=[];r.sort(function(p,g){return g.priority-p.priority});var t=new Oe(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 Md(d.localRect,d.transform)),f||(f=new Md(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 NP=["align","verticalAlign","width","height","fontSize"],Tn=new ui,tb=qe(),lY=qe();function Lp(r,e,t){for(var n=0;n<t.length;n++){var a=t[n];e[a]!=null&&(r[a]=e[a])}}var Ip=["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();Oe.applyTransform(c,c,u),u?Tn.setLocalTransform(u):(Tn.x=Tn.y=Tn.rotation=Tn.originX=Tn.originY=0,Tn.scaleX=Tn.scaleY=1);var f=a.__hostTarget,h;if(f){h=f.getBoundingRect().plain();var v=f.getComputedTransform();Oe.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:Tn.x,y:Tn.y,scaleX:Tn.scaleX,scaleY:Tn.scaleY,rotation:Tn.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(){AP(_,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=tb(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<NP.length;p++){var g=NP[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=PP(this._labelList),i=at(a,function(l){return l.layoutOption.moveOverlap==="shiftX"}),o=at(a,function(l){return l.layoutOption.moveOverlap==="shiftY"});iY(i,0,t),OP(o,0,n);var s=at(a,function(l){return l.layoutOption.hideOverlap});RP(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=tb(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");J1(e,eb(s),l),AP(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&&!Xl(e))){var i=tb(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)),Ze(n,u,t,l)}else if(n.attr(u),!eu(n).valueAnimation){var f=Pe(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={};Lp(v,u,Ip),Lp(v,n.states.select,Ip)}if(n.states.emphasis){var d=i.oldLayoutEmphasis={};Lp(d,u,Ip),Lp(d,n.states.emphasis,Ip)}JM(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}),Ze(a,{shape:p},t)):(a.setShape(p),a.style.strokePercent=0,xt(a,{style:{strokePercent:1}},t)),i.oldLayout=p}},r}(),cY=uY,rb=qe();function fY(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,n){var a=rb(t).labelManager;a||(a=rb(t).labelManager=new cY),a.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(e,t,n){var a=rb(t).labelManager;n.updatedSeries.forEach(function(i){a.addLabelsOfSeries(t.getViewOfSeriesModel(i))}),a.updateLayoutConfig(t),a.layout(t),a.processLabelsOverall()})}var nb=Math.sin,ab=Math.cos,kP=Math.PI,ks=Math.PI*2,hY=180/kP,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=Zi(f-ks)||(c?u>=ks:-u>=ks),v=u>0?u%ks:u%ks+ks,d=!1;h?d=!0:Zi(f)?d=!1:d=v>=kP==!!c;var p=e+n*ab(o),g=t+a*nb(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*ab(o+_),t+a*nb(o+_)),m>.01&&this._add("A",n,a,y,0,+c,p,g)}else{var b=e+n*ab(s),w=t+a*nb(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,Vf="none",dY=Math.round;function pY(r){var e=r.fill;return e!=null&&e!==Vf}function gY(r){var e=r.stroke;return e!=null&&e!==Vf}var ib=["lineCap","miterLimit","lineJoin"],yY=ee(ib,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=Rc(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",Vf);if(gY(e)){var s=Rc(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=v1(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",Vf);for(var p=0;p<ib.length;p++){var g=ib[p];if(n||e[g]!==vd[g]){var y=e[g]||vd[g];y&&r(yY[p],y)}}}else n&&r("stroke",Vf)}var BP="http://www.w3.org/2000/svg",FP="http://www.w3.org/1999/xlink",_Y="http://www.w3.org/2000/xmlns/",bY="http://www.w3.org/XML/1998/namespace";function VP(r){return document.createElementNS(BP,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 ob(r,e){e=e||{};var t=e.newline?`
220
- `:"";function n(a){var i=a.children,o=a.tag,s=a.attrs;return xY(o,s)+Vr(a.text)+(i?""+t+ee(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?`
221
- `:"",a=" {"+n,i=n+"}",o=ee(Fe(r),function(l){return l+a+ee(Fe(r[l]),function(u){return u+":"+r[l][u]+";"}).join(n)+i}).join(n),s=ee(Fe(e),function(l){return"@keyframes "+l+a+ee(Fe(e[l]),function(u){return u+a+ee(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 sb(r){return{zrId:r,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssClassIdx:0,cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function $P(r,e,t,n){return ar("svg","root",{width:r,height:e,xmlns:BP,"xmlns:xlink":FP,version:"1.1",baseProfile:"full",viewBox:n?"0 0 "+r+" "+e:!1},t)}var HP={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"},zs="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(E2(r)),t.rebuildPath(a,1),a.generateStr(),a.getStr()}function TY(r,e){var t=e.originX,n=e.originY;(t||n)&&(r[zs]=t+"px "+n+"px")}var DY={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function GP(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=sb(t.zrId);u.animation=!0,Pp(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=GP(a,t);return i.replace(o,s)}}function WP(r){return ce(r)?HP[r]?"cubic-bezier("+HP[r]+")":e0(r)?r:"":""}function Pp(r,e,t,n){var a=r.animators,i=a.length,o=[];if(r instanceof Cd){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=WP(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(ne,ve,R){for(var F=ne.getTracks(),G=ne.getMaxTime(),ae=0;ae<F.length;ae++){var re=F[ae];if(re.needsAnimate()){var K=re.keyframes,ue=re.propName;if(R&&(ue=R(ue)),ue)for(var Re=0;Re<K.length;Re++){var mt=K[Re],Xe=Math.round(mt.time/G*100)+"%",Zt=WP(mt.easing),St=mt.rawValue;(ce(St)||Ye(St))&&(ve[Xe]=ve[Xe]||{},ve[Xe][ue]=mt.rawValue,Zt&&(ve[Xe][T]=Zt))}}}}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={};U2(E,r),Q(E,w[P]);var O=O2(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 q=V.len();V.reset(),S[P].d=CY(r,x[P],V);var te=V.len();if(!U&&q!==te){$=!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),Y=!0,X,M=1;M<H.length;M++){var Z=H[M-1],ie=H[M];if(S[Z][zs]!==S[ie][zs]){Y=!1;break}X=S[Z][zs]}if(Y&&X){for(var P in S)S[P][zs]&&delete S[P][zs];e[zs]=X}if(at(H,function(ne){return Fe(S[ne]).length>0}).length){var se=GP(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 $f=Math.round;function UP(r){return r&&ce(r.src)}function jP(r){return r&&ye(r.toDataURL)}function lb(r,e,t,n){mY(function(a,i){var o=a==="fill"||a==="stroke";o&&P2(i)?KP(e,r,a,n):o&&s0(i)?JP(t,r,a,n):r[a]=i},e,t,!1),RY(t,r,n)}function YP(r){return Zi(r[0]-1)&&Zi(r[1])&&Zi(r[2])&&Zi(r[3]-1)}function AY(r){return Zi(r[4])&&Zi(r[5])}function ub(r,e,t){if(e&&!(AY(e)&&YP(e))){var n=t?10:1e4;r.transform=YP(e)?"translate("+$f(e[4]*n)/n+" "+$f(e[5]*n)/n+")":aG(e)}}function qP(r,e,t){for(var n=r.points,a=[],i=0;i<n.length;i++)a.push($f(n[i][0]*t)/t),a.push($f(n[i][1]*t)/t);e.points=a.join(" ")}function ZP(r){return!r.smooth}function LY(r){var e=ee(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]]=$f(s*a)/a)}}}var IY={circle:[LY(["cx","cy","r"])],polyline:[qP,ZP],polygon:[qP,ZP]};function PY(r){for(var e=r.animators,t=0;t<e.length;t++)if(e[t].targetName==="shape")return!0;return!1}function XP(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&&E2(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 ub(i,r.transform),lb(i,t,r,e),e.animation&&Pp(r,i,e),ar(s,r.id+"",i)}function EY(r,e){var t=r.style,n=t.image;if(n&&!ce(n)&&(UP(n)?n=n.src:jP(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),ub(l,r.transform),lb(l,t,r,e),e.animation&&Pp(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||Vi,i=t.x||0,o=oG(t.y||0,td(a),t.textBaseline),s=iG[t.textAlign]||t.textAlign,l={"dominant-baseline":"central","text-anchor":s};if(HD(t)){var u="",c=t.fontStyle,f=VD(t.fontSize);if(!parseFloat(f))return;var h=t.fontFamily||FT,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),ub(l,r.transform),lb(l,t,r,e),e.animation&&Pp(r,l,e),ar("text",r.id+"",l,void 0,n)}}function QP(r,e){if(r instanceof ze)return XP(r,e);if(r instanceof ur)return EY(r,e);if(r instanceof Yc)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=Rc(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=Yv(o)}}function KP(r,e,t,n){var a=r[t],i,o={gradientUnits:a.global?"userSpaceOnUse":"objectBoundingBox"};if(L2(a))i="linearGradient",o.x1=a.x,o.y1=a.y,o.x2=a.x2,o.y2=a.y2;else if(I2(a))i="radialGradient",o.cx=Pe(a.x,.5),o.cy=Pe(a.y,.5),o.r=Pe(a.r,.5);else return;for(var s=a.colorStops,l=[],u=0,c=s.length;u<c;++u){var f=o0(s[u].offset)*100+"%",h=s[u].color,v=Rc(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=ob(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]=Yv(b)}function JP(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(A2(a)){var h=a.imageWidth,v=a.imageHeight,d=void 0,p=a.image;if(ce(p)?d=p:UP(p)?d=p.src:jP(p)&&(d=p.toDataURL()),typeof Image=="undefined"){var g="Image width/height must been given explictly in svg-ssr renderer.";Ar(h,g),Ar(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=$0(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=xe(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=O2(a);w&&(o.patternTransform=w);var x=ar("pattern","",o,[f]),S=ob(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]=Yv(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,[XP(r,t)])}e["clip-path"]=Yv(i)}function eE(r){return document.createTextNode(r)}function Bs(r,e,t){r.insertBefore(e,t)}function tE(r,e){r.removeChild(e)}function rE(r,e){r.appendChild(e)}function nE(r){return r.parentNode}function aE(r){return r.nextSibling}function cb(r,e){r.textContent=e}var iE=58,kY=120,zY=ar("","");function fb(r){return r===void 0}function qa(r){return r!==void 0}function BY(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 Hf(r,e){var t=r.key===e.key,n=r.tag===e.tag;return n&&t}function Gf(r){var e,t=r.children,n=r.tag;if(qa(n)){var a=r.elm=VP(n);if(hb(zY,r),J(t))for(e=0;e<t.length;++e){var i=t[e];i!=null&&rE(a,Gf(i))}else qa(r.text)&&!_e(r.text)&&rE(a,eE(r.text))}else r.elm=eE(r.text);return r.elm}function oE(r,e,t,n,a){for(;n<=a;++n){var i=t[n];i!=null&&Bs(r,Gf(i),e)}}function Ep(r,e,t,n){for(;t<=n;++t){var a=e[t];if(a!=null)if(qa(a.tag)){var i=nE(a.elm);tE(i,a.elm)}else tE(r,a.elm)}}function hb(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)===iE?n.setAttributeNS(bY,t,o):t.charCodeAt(5)===iE?n.setAttributeNS(FP,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]:Hf(o,u)?(xu(o,u),o=e[++n],u=t[++a]):Hf(s,c)?(xu(s,c),s=e[--i],c=t[--l]):Hf(o,c)?(xu(o,c),Bs(r,o.elm,aE(s.elm)),o=e[++n],c=t[--l]):Hf(s,u)?(xu(s,u),Bs(r,s.elm,o.elm),s=e[--i],u=t[++a]):(fb(f)&&(f=BY(e,n,i)),h=f[u.key],fb(h)?Bs(r,Gf(u),o.elm):(v=e[h],v.tag!==u.tag?Bs(r,Gf(u),o.elm):(xu(v,u),e[h]=void 0,Bs(r,v.elm,o.elm))),u=t[++a]);(n<=i||a<=l)&&(n>i?(d=t[l+1]==null?null:t[l+1].elm,oE(r,d,t,a,l)):Ep(r,e,n,i))}function xu(r,e){var t=e.elm=r.elm,n=r.children,a=e.children;r!==e&&(hb(r,e),fb(e.text)?qa(n)&&qa(a)?n!==a&&FY(t,n,a):qa(a)?(qa(r.text)&&cb(t,""),oE(t,null,a,0,a.length-1)):qa(n)?Ep(t,n,0,n.length-1):qa(r.text)&&cb(t,""):r.text!==e.text&&(qa(n)&&Ep(t,n,0,n.length-1),cb(t,e.text)))}function VY(r,e){if(Hf(r,e))xu(r,e);else{var t=r.elm,n=nE(t);Gf(e),n!==null&&(Bs(n,e.elm,aE(t)),Ep(n,[r],0,0))}return e}var $Y=0,HY=function(){function r(e,t,n){if(this.type="svg",this.refreshHover=sE(),this.configLayer=sE(),this.storage=t,this._opts=n=Q({},n),this.root=e,this._id="zr"+$Y++,this._oldVNode=$P(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=VP("svg");hb(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 QP(e,sb(this._id))},r.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),n=this._width,a=this._height,i=sb(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=ee(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 $P(n,a,o,e.useViewBox)},r.prototype.renderToString=function(e){return e=e||{},ob(this.renderToVNode({animation:Pe(e.cssAnimation,!0),willUpdate:!1,compress:!0,useViewBox:Pe(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=QP(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=pu(a,0,n),t=pu(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(s0(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 sE(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"}),P2(t))KP({fill:t},a.attrs,"fill",n);else if(s0(t))JP({style:{fill:t},dirty:Et,getBoundingRect:function(){return{width:r,height:e}}},a.attrs,"fill",n);else{var i=Rc(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 lE(r,e,t){var n=sa.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){bt(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||ed,typeof t=="string"?o=lE(t,n,a):_e(t)&&(o=t,t=o.id),i.id=t,i.dom=o;var s=o.style;return s&&(km(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=lE("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 Oe(0,0,0,0);function c(m){if(!(!m.isFinite()||m.isZero()))if(o.length===0){var _=new Oe(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 Oe(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 Oe(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&bn||!v)?h.getPrevPaintRect():null;d&&c(d);var p=v&&(h.__dirty&bn||!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(dc(n)){var b=n.global||n.__width===y&&n.__height===m;_=b&&n.__canvasGradient||h1(o,n,{x:0,y:0,width:y,height:m}),n.__canvasGradient=_,n.__width=y,n.__height=m}else UT(n)&&(n.scaleX=n.scaleX||f,n.scaleY=n.scaleY||f,_=d1(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}(Rn),vb=jY,uE=1e5,Fs=314159,Op=.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||ed,this._singleCanvas=i,this.root=e;var o=e.style;o&&(km(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 vb(c,this,this.dpr);v.__builtin__=!0,v.initContext(),l[Fs]=v,v.zlevel=Fs,s.push(Fs),this._domRoot=e}else{this._width=pu(e,0,n),this._height=pu(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(uE)),i||(i=n.ctx,i.save()),Is(i,s,a,o===t-1))}i&&i.restore()}},r.prototype.getHoverLayer=function(){return this.getLayer(uE)},r.prototype.paintOne=function(e,t){p1(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;Km(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 je.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 vb("zr_"+e,this,this.dpr),n.zlevel=e,n.__builtin__=!0,this._layerConfig[e]?Ie(n,this._layerConfig[e],!0):this._layerConfig[e-Op]&&Ie(n,this._layerConfig[e-Op],!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?Op:0),this._needsManuallyCompositing),c.__builtin__||Dv("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&bn&&!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]?Ie(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+Op){var o=this._layers[i];Ie(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=pu(i,0,a),t=pu(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 vb("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 Ce,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}(gt),eq=JY;function wu(r,e){var t=r.mapDimensionsAll("defaultedLabel"),n=t.length;if(n===1){var a=uu(r,e,t[0]);return a!=null?a+"":null}else if(n){for(var i=[],o=0;o<t.length;o++)i.push(uu(r,e,t[o]));return i.join(" ")}}function cE(r,e){var t=r.mapDimensionsAll("defaultedLabel");if(!J(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(){vi(this.childAt(0))},e.prototype.downplay=function(){di(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):Ze(h,v,s,n),ga(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=du(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;_r(s,p,{labelFetcher:l,labelDataIndex:n,defaultText:I,inheritColor:S,defaultOpacity:x.opacity});function I(O){return A?t.getName(O):wu(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&&ro(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){i.removeTextContent()}})}else i.removeTextContent();ro(i,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:t,removeOpt:s})},e.getSymbolSize=function(t,n){return Df(t.getItemVisual(n,"symbolSize"))},e}(Ce);function rq(r,e){this.parent.drift(r,e)}var Wf=tq;function db(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 fE(r){return r!=null&&!_e(r)&&(r={isIgnore:r}),r||{}}function hE(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 Ce,this._SymbolCtor=e||Wf}return r.prototype.updateData=function(e,t){this._progressiveEls=null,t=fE(t);var n=this.group,a=e.hostModel,i=this._data,o=this._SymbolCtor,s=t.disableAnimation,l=hE(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(db(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(!db(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):Ze(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=hE(e),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t,n){this._progressiveEls=[],n=fE(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(db(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){ao(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}(),Uf=nq;function vE(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=ee(r.dimensions,function(d){return e.mapDimension(d)}),h=!1,v=e.getCalculationInfo("stackResultDimension");return yi(e,f[0])&&(h=!0,f[0]=v),yi(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]:Ye(e)&&!isNaN(e)?t=e:n[0]>0?t=n[0]:n[1]<0&&(t=n[1]),t}function dE(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=vE(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=dE(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),q=Ua(N),te=[],_=0;_<d.length;_++){var H=d[_],Y=_*2,X=H*2;V[Y]=u[X],V[Y+1]=u[X+1],$[Y]=c[X],$[Y+1]=c[X+1],U[Y]=f[X],U[Y+1]=f[X+1],q[Y]=h[X],q[Y+1]=h[X+1],te[_]=v[H]}return{current:V,next:$,stackedOnCurrent:U,stackedOnNext:q,status:te}}var po=Math.min,go=Math.max;function Vs(r,e){return isNaN(r)||isNaN(e)}function pb(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 q=M>0?1:-1;v=y-q*$*o,d=m,I=y+q*U*o,P=m}else if(s==="y"){$=Math.abs(N),U=Math.abs(V);var te=A>0?1:-1;v=y,d=m-te*$*o,I=y,P=m+te*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=po(I,go(x,y)),P=po(P,go(S,m)),I=go(I,po(x,y)),P=go(P,po(S,m)),M=I-y,A=P-m,v=y-M*$/U,d=m-A*$/U,v=po(v,go(u,y)),d=po(d,go(c,m)),v=go(v,po(u,y)),d=go(d,po(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 pE=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 pE},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+=pb(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?Hv(s,v,p,y,t,c):Hv(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}(ze),lq=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(pE),gE=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=pb(t,a,o,s,s,1,n.smooth,l,n.connectNulls);pb(t,i,o+u-1,u,s,-1,n.stackedOnSmooth,l,n.connectNulls),o+=u+1,t.closePath()}},e}(ze);function yE(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 mE(r,e,t){var n=r.getArea(),a=At(n.r0,1),i=At(n.r,1),o=new Wr({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 Rp(r,e,t,n,a){if(r){if(r.type==="polar")return mE(r,e,t);if(r.type==="cartesian2d")return yE(r,e,t,n,a)}else return null;return null}function $s(r,e){return r.type===e}function _E(r,e){if(r.length===e.length){for(var t=0;t<r.length;t++)if(r[t]!==e[t])return;return!0}}function bE(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 xE(r,e){var t=bE(r),n=t[0],a=t[1],i=bE(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 wE(r){return Ye(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=dE(t,r,e,i);a[i*2]=o[0],a[i*2+1]=o[1]}return a}function yo(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=i0(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=ee(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 ql(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(Wf.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 SE(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 CE(r){if(r.get(["endLabel","show"]))return!0;for(var e=0;e<Gr.length;e++)if(r.get([Gr[e],"endLabel","show"]))return!0;return!1}function gb(r,e,t,n){if($s(e,"cartesian2d")){var a=n.getModel("endLabel"),i=a.get("valueAnimation"),o=n.getData(),s={lastFrameIndex:0},l=CE(n)?function(v,d){r._endLabelOnDuring(v,d,o,s,i,a,e)}:null,u=e.getBaseAxis().isHorizontal(),c=yE(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 mE(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 Ce,n=new Uf;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=vE(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=yo(f,o,A,T),x&&(x=yo(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(gb(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=gb(this,o,!1,t);xt(E,{shape:O.shape},t)}else y.setClipPath(gb(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]]}}),(!_E(this._stackedOnPoints,x)||!_E(this._points,f))&&(m?this._doUpdateAnimation(l,x,o,a,A,b,T):(A&&(f=yo(f,o,A,T),x&&(x=yo(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"})),mr(p,t,"lineStyle"),p.style.lineWidth>0&&t.get(["emphasis","lineStyle","width"])==="bolder"){var q=p.getState("emphasis").style;q.lineWidth=+p.style.lineWidth+1}Me(p).seriesIndex=t.seriesIndex,Lt(p,V,$,U);var te=wE(t.get("smooth")),H=t.get("smoothMonotone");if(p.setShape({smooth:te,smoothMonotone:H,connectNulls:T}),g){var Y=l.getCalculationInfo("stackedOnSeries"),X=0;g.useStyle(me(c.getAreaStyle(),{fill:P,opacity:.7,lineJoin:"bevel",decal:l.getVisual("style").decal})),Y&&(X=wE(Y.get("smooth"))),g.setShape({smooth:te,stackedOnSmooth:X,smoothMonotone:H,connectNulls:T}),mr(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 Wf(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 ht.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 ht.prototype.downplay.call(this,t,n,a,i)},e.prototype._changePolyState=function(t){var n=this._polygon;md(this._polyline,t),n&&md(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 gE({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(CE(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&&(_r(s,rr(t,"endLabel"),{inheritColor:a,labelFetcher:t,labelDataIndex:c,defaultText:function(f,h,v){return v!=null?cE(o,v):wu(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=SE(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=dD(a,d,P,E,T.t))}i.lastFrameIndex=D[0]}else{var O=t===1||i.lastFrameIndex>0?D[0]:0,I=SE(f,O);o&&(A=h.getRawValue(O)),u.attr({x:I[0]+w,y:I[1]+x})}o&&eu(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=yo(h.current,a,o,l),d=yo(h.stackedOnCurrent,a,o,l),p=yo(h.next,a,o,l),g=yo(h.stackedOnNext,a,o,l)),xE(v,p)>3e3||c&&xE(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(),Ze(u,y,f),c&&(c.setShape({points:v,stackedOnPoints:d}),c.stopAnimation(),Ze(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}(ht),_q=mq;function jf(r,e){return{seriesType:r,plan:fu(),reset:function(t){var n=t.getData(),a=t.coordinateSystem,i=t.pipelineContext,o=e||i.large;if(!!a){var s=ee(a.dimensions,function(v){return n.mapDimension(v)}).slice(0,2),l=s.length,u=n.getCalculationInfo("stackResultDimension");yi(n,s[0])&&(s[0]=u),yi(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 TE(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(jf("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,TE("line"))}var DE=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}(gt);gt.registerClass(DE);var Np=DE,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=io(Np.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}(Np),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}(ze),kp=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 rd(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)+zp(p,l+m,!1),x=f+d*b(p)+Bp(p,l+m,!1),S="right",T="middle";break;case"insideStartAngle":w=c+d*_(p)+zp(p,-l+m,!1),x=f+d*b(p)+Bp(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)+zp(g,l+m,!0),x=f+d*b(g)+Bp(g,l+m,!0),S="left",T="middle";break;case"insideEndAngle":w=c+d*_(g)+zp(g,-l+m,!0),x=f+d*b(g)+Bp(g,-l+m,!0),S="right",T="middle";break;default:return rd(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(Ye(n)){r.setTextConfig({rotation:n});return}else if(J(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 zp(r,e,t){return e*Math.sin(r)*(t?-1:1)}function Bp(r,e,t){return e*Math.cos(r)*(t?1:-1)}var yb=Math.max,mb=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){ao(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=Fp[u.type](s,A),P=Bq(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=Fp[u.type](s,A,I);if(y&&T(A),!(!s.hasValue(A)||!PE[u.type](P))){var E=!1;d&&(E=ME[u.type](p,P));var O=AE[u.type](t,s,A,P,f,h,c.model,!1,g);v&&(O.forceLabelAnimation=!0),OE(O,s,A,I,P,t,f,u.type==="polar"),x?O.attr({shape:P}):v?LE(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=Fp[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=Fp[u.type](s,A),V=zE(f,N,u);Ze(O,{shape:V},h,A)}var $=l.getItemGraphicEl(I);if(!s.hasValue(A)||!PE[u.type](E)){o.remove($);return}var U=!1;if(d&&(U=ME[u.type](p,E),U&&o.remove($)),$?ga($):$=AE[u.type](t,s,A,E,f,h,c.model,!!$,g),v&&($.forceLabelAnimation=!0),S){var q=$.getTextContent();if(q){var te=eu(q);te.prevValue!=null&&(te.prevValue=te.value)}}else OE($,s,A,P,E,t,f,u.type==="polar");x?$.attr({shape:E}):v?LE(v,h,$,E,A,f,!0,S):Ze($,{shape:E},t,A,null),s.setItemGraphicEl(A,$),$.ignore=U,o.add($)}).remove(function(A){var I=l.getItemGraphicEl(A);I&&af(I,t,A)}).execute();var D=this._backgroundGroup||(this._backgroundGroup=new Ce);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(),NE(t,this.group),this._updateLargeClip(t)},e.prototype._incrementalRenderLarge=function(t,n){this._removeBackground(),NE(n,this.group,this._progressiveEls,!0)},e.prototype._updateLargeClip=function(t){var n=t.get("clip",!0)&&Rp(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:ee(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){af(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}(ht),ME={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=yb(e.x,r.x),s=mb(e.x+e.width,a),l=yb(e.y,r.y),u=mb(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=mb(e.r,r.r),i=yb(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}},AE={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?kp:Wr,c=new u({shape:n,z2:1});c.name="item";var f=EE(a);if(c.calculateTextPosition=Mq(f,{isRoundCap:u===kp}),i){var h=c.shape,v=a?"r":"endAngle",d={};h[v]=a?0:n.startAngle,d[v]=n[v],(s?Ze: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 LE(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?Ze:xt)(t,{shape:l},e,a,null);var c=e?r.baseAxis.model:null;(o?Ze:xt)(t,{shape:u},c,a)}function IE(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"],PE={cartesian2d:function(r){return!IE(r,Eq)},polar:function(r){return!IE(r,Oq)}},Fp={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 EE(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 OE(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);_r(r,f,{labelFetcher:i,labelDataIndex:t,defaultText:wu(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,EE(o),n.get(["label","rotate"]))}KM(h,f,i.getRawValue(t),function(p){return cE(e,p)});var d=n.getModel(["emphasis"]);Lt(r,d.get("focus"),d.get("blurScope"),d.get("disabled")),mr(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}(),RE=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}(ze);function NE(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 RE({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 RE({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",kE),f.on("mousemove",kE)),t&&t.push(f)}var kE=Jd(function(r){var e=this,t=zq(e,r.offsetX,r.offsetY);Me(e).dataIndex=t>=0?t:null},30,!1);function zq(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 Bq(r,e,t){var n=r.type==="polar"?Wr: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(eP,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,tP("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,TE("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 Vp=Math.PI*2,BE=Math.PI/180;function FE(r,e){return Ut(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function VE(r,e){var t=FE(r,e),n=r.get("center"),a=r.get("radius");J(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 J(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=FE(n,t),s=VE(n,t),l=s.cx,u=s.cy,c=s.r,f=s.r0,h=-n.get("startAngle")*BE,v=n.get("minAngle")*BE,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=Vp,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=Vp/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?it(M,b,[f,c]):c}),S=P}),w<Vp&&d)if(w<=.001){var D=Vp/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 Yf(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 $E(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;HE(_,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}OP(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;_b(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(!_b(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,HE(d,g)}}$E(u,e,t,n,1,a,i,o,s,f),$E(l,e,t,n,-1,a,i,o,s,c);for(var h=0;h<r.length;h++){var d=r[h];if(!_b(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 HE(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 _b(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 q=$.get("length2");if(q=le(q,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 te=(T.startAngle+T.endAngle)/2,H=Math.cos(te),Y=Math.sin(te),X,Z,ie,se;n=T.cx,a=T.cy;var ne=P==="inside"||P==="inner";if(P==="center")X=T.cx,Z=T.cy,se="center";else{var ve=(ne?(T.r+T.r0)/2*H:T.r*H)+n,R=(ne?(T.r+T.r0)/2*Y:T.r*Y)+a;if(X=ve+H*3,Z=R+Y*3,!ne){var F=ve+H*(U+l-T.r),G=R+Y*(U+l-T.r),ae=F+(H<0?-1:1)*q,re=G;O==="edge"?X=H<0?c+N:c+u-N:X=ae+(H<0?-E:E),Z=re,ie=[[ve,R],[F,G],[ae,re]]}se=ne?"center":O==="edge"?H>0?"right":"left":H>0?"left":"right"}var K=Math.PI,ue=0,Re=I.get("rotate");if(Ye(Re))ue=Re*(K/180);else if(P==="center")ue=0;else if(Re==="radial"||Re===!0){var mt=H<0?-te+K:-te;ue=mt}else if(Re==="tangential"&&P!=="outside"&&P!=="outer"){var Xe=Math.atan2(H,Y);Xe<0&&(Xe=K*2+Xe);var Zt=Y>0;Zt&&(Xe=K+Xe),ue=Xe-K}if(i=!!ue,D.x=X,D.y=Z,D.rotation=ue,D.setStyle({verticalAlign:"middle"}),ne){D.setStyle({align:se});var fr=D.states.select;fr&&(fr.x+=D.x,fr.y+=D.y)}else{var St=D.getBoundingRect().clone();St.applyTransform(D.getComputedTransform());var Jr=(D.style.margin||0)+2.1;St.y-=Jr/2,St.height+=Jr,t.push({label:D,labelLine:M,position:P,len:U,len2:q,minTurnAngle:$.get("minTurnAngle"),maxSurfaceAngle:$.get("maxSurfaceAngle"),surfaceNormal:new Ee(H,Y),linePoints:ie,textAlign:se,labelDistance:E,labelAlignTo:O,edgeDistance:N,bleedMargin:V,rect:St,unconstrainedWidth:St.width,labelStyleWidth:D.style.width})}S.setTextConfig({inside:ne})}}),!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):(LP(w,g.minTurnAngle),nY(w,g.surfaceNormal,g.maxSurfaceAngle),m.setShape({points:w}),y.__hostTarget.textGuideLineConfig={anchor:new Ee(w[0][0],w[0][1])})}}}function Su(r,e,t){var n=r.get("borderRadius");if(n==null)return t?{cornerRadius:0}:null;J(n)||(n=[n,n,n,n]);var a=Math.abs(e.r||0-e.r0||0);return{cornerRadius:ee(n,function(i){return ha(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(Su(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,Ze(o,{shape:{endAngle:c.endAngle}},s,n))}else ga(o),Ze(o,{shape:f},s,n);o.useStyle(t.getItemVisual(n,"style")),mr(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)},Su(u.getModel("itemStyle"),c)),Q(o.ensureState("select"),{x:p,y:g,shape:Su(l.getModel(["select","itemStyle"]),c)}),Q(o.ensureState("blur"),{shape:Su(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;_r(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 jr,this.setTextGuideLine(v)),J1(this,eb(o),{stroke:u,opacity:Ia(s.get(["lineStyle","opacity"]),c,1)})}},e}(Wr),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 Wr({shape:VE(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);af(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}(ht),Yq=jq;function Cu(r,e,t){e=J(e)&&{coordDimensions:e}||Q({encodeDefine:r.getEncode()},e);var n=r.getSource(),a=mu(n,e).dimensions,i=new Rr(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}(),qf=qq,Zq=qe(),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 qf(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 Cu(this,{coordDimensions:["value"],encodeDefaulter:Ae($_,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=tD(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}(gt),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!(Ye(o)&&!isNaN(o)&&o<0)})}}}function Jq(r){r.registerChartView(Yq),r.registerSeriesModel(Qq),GL("pie",r.registerAction),r.registerLayout(Ae($q,"pie")),r.registerProcessor(Yf("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}(gt),tZ=eZ,GE=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]<GE,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 Oe(l-o/2,u-s/2,c-l+o,f-u+s)}return t},e}(ze),aZ=function(){function r(){this.group=new Ce}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]<GE;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=jf("").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 Uf,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}(ht),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,bb=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Wt).models[0]},e.type="cartesian2dAxis",e}($e);Pt(bb,bu);var WE={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=Ie({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},WE),xb=Ie({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}}},WE),fZ=Ie({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},xb),hZ=me({logBase:10},xb),UE={category:cZ,value:xb,time:fZ,log:hZ},vZ={value:1,category:1,time:1,log:1};function Tu(r,e,t,n){L(vZ,function(a,i){var o=Ie(Ie({},UE[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=pf(this),v=h?au(c):{},d=f.getTheme();Ie(c,d.get(i+"Axis")),Ie(c,this.getDefaultOption()),c.type=jE(c),h&&oo(c,v,h)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=V1.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",jE)}function jE(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 ee(this._dimList,function(e){return this._axes[e]},this)},r.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),at(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,wb=["x","y"];function YE(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=wb,t}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!YE(t)||!YE(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 Oe(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 Oe(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}(jn),mZ=yZ;function Sb(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 qE(r){return r.get("coordinateSystem")==="cartesian2d"}function ZE(r){var e={xAxisModel:null,yAxisModel:null};return L(e,function(t,n){var a=n.replace(/Model$/,""),i=r.getReferringComponents(a,Wt).models[0];e[n]=i}),e}var Cb=Math.log;function XE(r,e,t){var n=vo.prototype,a=n.getTicks.call(t),i=n.getTicks.call(t,!0),o=a.length-1,s=n.getInterval.call(t),l=cP(r,e),u=l.extent,c=l.fixMin,f=l.fixMax;if(r.type==="log"){var h=Cb(r.base);u=[Cb(u[0])/h,Cb(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=H1(d),g=u[0]+d*o;else if(f)for(p=u[1]-d*o;p>u[0]&&isFinite(p)&&isFinite(u[0]);)d=H1(d),p=u[1]-d*o;else{var y=r.getTicks().length-1;y>o&&(d=H1(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=wb,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;$1(p)&&d.get("alignTicks")&&d.get("interval")==null?c.push(v):(Os(p,d),$1(p)&&(s=v))}c.length&&(s||(s=c.pop(),Os(s.scale,s.model)),L(c,function(g){XE(g.scale,g.model,s.scale)}))}}a(n.x),a(n.y);var i={};L(n.x,function(o){QE(n,"y",o,i)}),L(n.y,function(o){QE(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=Ut(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",Wt).models[0],a=e.yAxisModel||t&&t.getReferringComponents("yAxis",Wt).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(!!Tb(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,kf(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(qE(a)){var i=ZE(a),o=i.xAxisModel,s=i.yAxisModel;if(!Tb(o,t)||!Tb(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(Dp(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(!!qE(a)){var i=ZE(a),o=i.xAxisModel,s=i.yAxisModel,l=o.getCoordSysModel(),u=l.coordinateSystem;a.coordinateSystem=u.getCartesian(o.componentIndex,s.componentIndex)}}),n},r.dimensions=wb,r}();function Tb(r,e){return r.getCoordSysModel()===e}function QE(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)KE(a[l])&&(i=a[l]);else for(var u in a)if(a.hasOwnProperty(u)&&KE(a[u])&&!n[c(a[u])]){i=a[u];break}i&&(n[c(i)]=!0);function c(f){return f.dim+"_"+f.index}}function KE(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,mo=Math.PI,Hs=function(){function r(e,t){this.group=new Ce,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 Ce({x:t.position[0],y:t.position[1],rotation:t.rotation});n.updateTransform(),this._transformGroup=n}return r.prototype.hasBuilder=function(e){return!!JE[e]},r.prototype.add=function(e){JE[e](this.opt,this.axisModel,this.group,this._transformGroup)},r.prototype.getGroup=function(){return this.group},r.innerTextLayout=function(e,t,n){var a=E0(t-e),i,o;return Vc(a)?(o=n>0?"top":"bottom",i="center"):Vc(a-mo)?(o=n>0?"bottom":"top",i="center"):(o="middle",a>0&&a<mo?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}(),JE={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});Ql(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)||Ye(v))&&(v=[v,v]);var d=du(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=PP(ee(i,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));RP(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,tO(i)?r.labelOffset+o*l:0],h,v=e.get("nameRotate");v!=null&&(v=v*mo/180);var d;tO(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:pt(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(Jl({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=E0(t-r),i,o,s=n[0]>n[1],l=e==="start"&&!s||e!=="start"&&s;return Vc(a-mo/2)?(o=l?"bottom":"top",i="center"):Vc(a-mo*1.5)?(o=l?"top":"bottom",i="center"):(o="middle",a<mo*1.5&&a>mo/2?i=l?"left":"right":i=l?"right":"left"),{rotation:a,textAlign:i,textVerticalAlign:o}}function SZ(r,e,t){if(!fP(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?(Yn(i),Yn(u)):eO(i,o)&&(n?(Yn(o),Yn(c)):(Yn(i),Yn(u))),a===!1?(Yn(s),Yn(f)):eO(l,s)&&(a?(Yn(l),Yn(h)):(Yn(s),Yn(f)))}}function Yn(r){r&&(r.ignore=!0)}function eO(r,e){var t=r&&r.getBoundingRect().clone(),n=e&&e.getBoundingRect().clone();if(!(!t||!n)){var a=wc([]);return Wi(a,a,-r.rotation),t.applyTransform(Ea([],a,r.getLocalTransform())),n.applyTransform(Ea([],a,e.getLocalTransform())),t.intersect(n)}}function tO(r){return r==="middle"||r==="center"}function rO(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});Ql(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=rO(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=rO(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)*mo/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 ft(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:pt(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 _i=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=Zf(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&&!Ab(_))){y==null&&(y=_.get("triggerTooltip")),_=g?LZ(m,f,a,e,g,y):_;var w=_.get("snap"),x=Zf(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:Ab(_),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]=xe(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 ft(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[Zf(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(Db(i[n+"AxisId"],t.id)||Db(i[n+"AxisIndex"],t.componentIndex)||Db(i[n+"AxisName"],t.name))return a}}function Db(r,e){return r==="all"||J(r)&&Ne(r,e)>=0||r===e}function EZ(r){var e=Mb(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=Ab(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 Mb(r){var e=(r.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[Zf(r)]}function OZ(r){var e=Mb(r);return e&&e.axisPointerModel}function Ab(r){return!!r.get(["handle","show"])}function Zf(r){return r.type+"||"+r.id}var nO={},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){nO[t]=n},e.getAxisPointerClass=function(t){return t&&nO[t]},e.type="axis",e}(wt),Gs=RZ,Lb=qe();function aO(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=Lb(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=J(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}Lb(r).splitAreaColors=h}}}function iO(r){Lb(r).splitAreaColors=null}var NZ=["axisLine","axisTickLabel","axisName"],kZ=["splitArea","splitLine","minorSplitLine"],oO=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 Ce,this.group.add(this._axisGroup),!!t.get("show")){var s=t.getCoordSysModel(),l=Sb(s,t),u=new _i(t,Q({handleAutoShown:function(f){for(var h=s.coordinateSystem.getCartesians(),v=0;v<h.length;v++)if($1(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"])&&zZ[f](this,this._axisGroup,t,s)},this);var c=i&&i.type==="changeAxisOrder"&&i.isInitSort;c||sf(o,this._axisGroup,t),r.prototype.render.call(this,t,n,a,i)}},e.prototype.remove=function(){iO(this)},e.type="cartesianAxis",e}(Gs),zZ={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=J(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});Ql(_.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});Ql(g.shape,h.lineWidth),e.add(g)}},splitArea:function(r,e,t,n){aO(r,e,t,n)}},sO=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}(oO),BZ=function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=sO.type,t}return e.type="yAxis",e}(oO),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),lO={offset:0};function uO(r){r.registerComponentView(FZ),r.registerComponentModel(uZ),r.registerCoordinateSystem("cartesian2d",xZ),Tu(r,"x",bb,lO),Tu(r,"y",bb,lO),r.registerComponentView(sO),r.registerComponentView(BZ),r.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}function VZ(r){ke(uO),r.registerSeriesModel(tZ),r.registerChartView(sZ),r.registerLayout(jf("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]=cO(c)?c:fO(a)})}),t.each(function(o){var s=WT(n[o],function(l){return cO(l)})||fO(a);n[o].push(s.slice()),t.setItemLayout(o,n[o])})}})}function cO(r){return!isNaN(r[0])&&!isNaN(r[1])}function fO(r){return[r.cx,r.cy]}function HZ(r){var e=r.polar;if(e){J(e)||(e=[e]);var t=[];L(e,function(n,a){n.indicator?(n.type&&!n.shape&&(n.shape=n.type),r.radar=r.radar||[],J(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=Df(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]),uf[y?"initProps":"updateProps"](_,{x:v[m][0],y:v[m][1]},t,g)):_.setPosition(v[m]),d.add(_))}}function f(h){return ee(h,function(v){return[i.cx,i.cy]})}s.diff(l).add(function(h){var v=s.getItemLayout(h);if(!!v){var d=new Ur,p=new jr,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 Ce,m=new Ce;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),ga(g),ga(p),Ze(p,m,t),Ze(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:_})),mr(p,d,"lineStyle"),mr(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=xe(S);var A=s.getStore().get(s.getDimensionIndex(T.__dimIdx),v);(A==null||isNaN(A))&&(A=""),_r(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}(ht),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 qf(fe(this.getData,this),fe(this.getRawData,this))},e.prototype.getInitialData=function(t,n){return Cu(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=_L(this,t);return nr("section",{header:u,sortBlocks:!0,blocks:ee(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(ee(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}(gt),jZ=UZ,Xf=UE.value;function $p(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=ee(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=Ie(xe(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 ft(g,null,this.ecModel);return Pt(m,bu.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:Ie({lineStyle:{color:"#bbb"}},Xf.axisLine),axisLabel:$p(Xf.axisLabel,!1),axisTick:$p(Xf.axisTick,!1),splitLine:$p(Xf.splitLine,!0),splitArea:$p(Xf.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=ee(a,function(o){var s=o.model.get("showName")?o.name:"",l=new _i(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=J(h)?h:[h],p=J(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 da({shape:{cx:b,cy:w,r:_[x].coord}}))}if(f&&x<_.length-1){var S=m(y,p,x);y[S].push(new rf({shape:{cx:b,cy:w,r0:_[x].coord,r:_[x+1].coord}}))}}else for(var T,D=ee(a,function(O,N){var V=O.getTicksCoords();return T=T==null?V.length-1:Math.min(V.length-1,T),ee(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 jr({shape:{points:A}}))}if(f&&M){var S=m(y,p,x-1);y[S].push(new Ur({shape:{points:A.concat(M)}}))}M=A.slice().reverse()}var P=l.getLineStyle(),E=u.getAreaStyle();L(y,function(O,N){this.group.add(Cn(O,{style:me({stroke:"none",fill:p[N%p.length]},E),silent:!0}))},this),L(g,function(O,N){this.group.add(Cn(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}(jn),JZ=KZ,eX=function(){function r(e,t,n){this.dimensions=[],this._model=e,this._indicatorAxes=ee(e.getIndicatorModels(),function(a,i){var o="indicator_"+i,s=new JZ(o,new vo);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)||Ye(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 vo;o.setExtent(0,i),o.setInterval(1),L(n,function(s,l){XE(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(Yf("radar")),r.registerPreprocessor(HZ)}var hO="\0_ec_interaction_mutex";function aX(r,e,t){var n=Ib(r);n[e]=t}function iX(r,e,t){var n=Ib(r),a=n[e];a===t&&(n[e]=null)}function vO(r,e){return!!Ib(r)[e]}function Ib(r){return r[hO]||(r[hO]={})}ba({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},Et);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(xe(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(!r2(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||!Hp("moveOnMouseMove",t,this._opt)||t.gestureEvent==="pinch"||vO(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&&si(t.event),dO(this,"pan","moveOnMouseMove",t,{dx:s,dy:l,oldX:i,oldY:o,newX:n,newY:a,isAvailableBehavior:null})}},e.prototype._mouseupHandler=function(t){r2(t)||(this._dragging=!1)},e.prototype._mousewheelHandler=function(t){var n=Hp("zoomOnMouseWheel",t,this._opt),a=Hp("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;Pb(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);Pb(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:h,originX:s,originY:l,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){if(!vO(this._zr,"globalPan")){var n=t.pinchScale>1?1.1:1/1.1;Pb(this,"zoom",null,t,{scale:n,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})}},e}(Rn);function Pb(r,e,t,n,a){r.pointerChecker&&r.pointerChecker(n,a.originX,a.originY)&&(si(n.event),dO(r,e,t,n,a))}function dO(r,e,t,n,a){a.isAvailableBehavior=fe(Hp,null,t,n),r.trigger(e,a)}function Hp(r,e,t){var n=t[r];return!r||n&&(!ce(n)||e.event[n+"Key"])}var Qf=oX;function Eb(r,e,t){var n=r.target;n.x+=e,n.y+=t,n.dirty()}function Ob(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 Gp(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 pO(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 Rb,Wp={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"},gO=Fe(Wp),Up={"alignment-baseline":"textBaseline","stop-color":"stopColor"},yO=Fe(Up),lX=function(){function r(){this._defs={},this._root=null}return r.prototype.parse=function(e,t){t=t||{};var n=pO(e);this._defsUsePending=[];var a=new Ce;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),Dn(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=jp(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=TO(c,{x:0,y:0,width:s,height:l}),!t.ignoreViewBox)){var v=a;a=new Ce,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=Rb[s];if(c&&he(Rb,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=mO[s];if(v&&he(mO,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 Yc({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});qn(t,n),Dn(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(){Rb={g:function(e,t){var n=new Ce;return qn(t,n),Dn(e,n,this._defsUsePending,!1,!1),n},rect:function(e,t){var n=new Ge;return qn(t,n),Dn(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 da;return qn(t,n),Dn(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 qn(t,n),Dn(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 xd;return qn(t,n),Dn(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=xO(n));var i=new Ur({shape:{points:a||[]},silent:!0});return qn(t,i),Dn(e,i,this._defsUsePending,!1,!1),i},polyline:function(e,t){var n=e.getAttribute("points"),a;n&&(a=xO(n));var i=new jr({shape:{points:a||[]},silent:!0});return qn(t,i),Dn(e,i,this._defsUsePending,!1,!1),i},image:function(e,t){var n=new ur;return qn(t,n),Dn(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 Ce;return qn(t,s),Dn(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 Ce;return qn(t,s),Dn(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=xM(n);return qn(t,a),Dn(e,a,this._defsUsePending,!1,!1),a.silent=!0,a}}}(),r}(),mO={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 ql(e,t,n,a);return _O(r,i),bO(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 y_(e,t,n);return _O(r,a),bO(r,a),a}};function _O(r,e){var t=r.getAttribute("gradientUnits");t==="userSpaceOnUse"&&(e.global=!0)}function bO(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={};CO(t,i,i);var o=i.stopColor||t.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:a,color:o})}t=t.nextSibling}}function qn(r,e){r&&r.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),me(e.__inheritedStyle,r.__inheritedStyle))}function xO(r){for(var e=jp(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 Dn(r,e,t,n,a){var i=e,o=i.__inheritedStyle=i.__inheritedStyle||{},s={};r.nodeType===1&&(dX(r,e),CO(r,o,s),n||pX(r,o,s)),i.style=i.style||{},o.fill!=null&&(i.style.fill=wO(i,"fill",o.fill,t)),o.stroke!=null&&(i.style.stroke=wO(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=ee(jp(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 wO(r,e,t,n){var a=t&&t.match(cX);if(a){var i=On(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 jp(r){return r.match(hX)||[]}var vX=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,Nb=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=jp(o);switch(a=a||_n(),s){case"translate":la(a,a,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":Rv(a,a,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":Wi(a,a,-parseFloat(l[0])*Nb);break;case"skewX":var u=Math.tan(parseFloat(l[0])*Nb);Ea(a,[1,0,u,1,0,0],a);break;case"skewY":var c=Math.tan(parseFloat(l[0])*Nb);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 SO=/([^\s:;]+)\s*:\s*([^:;]+)/g;function CO(r,e,t){var n=r.getAttribute("style");if(!!n){SO.lastIndex=0;for(var a;(a=SO.exec(n))!=null;){var i=a[1],o=he(Wp,i)?Wp[i]:null;o&&(e[o]=a[2]);var s=he(Up,i)?Up[i]:null;s&&(t[s]=a[2])}}}function pX(r,e,t){for(var n=0;n<gO.length;n++){var a=gO[n],i=r.getAttribute(a);i!=null&&(e[Wp[a]]=i)}for(var n=0;n<yO.length;n++){var a=yO[n],i=r.getAttribute(a);i!=null&&(t[Up[a]]=i)}}function TO(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=pO(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,Ar(n!=null)}catch(g){throw new Error(`Invalid svg format
222
- `+g.message)}var a=new Ce;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 Oe(u,c,f,h)}if(s){var d=TO(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 kb=[126,25],DO="\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 Du=0;Du<Ws[Us].length;Du++)Ws[Us][Du][0]/=10.5,Ws[Us][Du][1]/=-10.5/.75,Ws[Us][Du][0]+=kb[0],Ws[Us][Du][1]+=kb[1];function xX(r,e){if(r==="china"){for(var t=0;t<e.length;t++)if(e[t].name===DO)return;e.push(new yP(DO,ee(Ws,function(n){return{type:"polygon",exterior:n}}),kb))}}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 Oe(0,0,0,0),regionsMap:i}},r.prototype._parseToRegions=function(e){var t=this._mapName,n=this._geoJSON,a;try{a=n?K1(n,e):[]}catch(i){throw new Error(`Invalid geoJson format
223
- `+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 Kf=ge(),bi={registerMap:function(r,e,t){if(e.svg){var n=new mX(r,e.svg);Kf.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);Kf.set(r,n)}},getGeoResource:function(r){return Kf.get(r)},getMapForUser:function(r){var e=Kf.get(r);return e&&e.type==="geoJSON"&&e.getMapForUser()},load:function(r,e,t){var n=Kf.get(r);if(!!n)return n.load(e,t)}},zb=["rect","circle","line","ellipse","polygon","polyline","path"],IX=ge(zb),PX=ge(zb.concat(["g"])),EX=ge(zb.concat(["g"])),MO=qe();function Yp(r){var e=r.getItemStyle(),t=r.get("areaColor");return t!=null&&(e.fill=t),e}function AO(r){var e=r.style;e&&(e.stroke=e.stroke||e.fill,e.fill=null)}var OX=function(){function r(e){var t=new Ce;this.uid=tu("ec_map_draw"),this._controller=new Qf(e.getZr()),this._controllerHost={target:t},this.group=t,t.add(this._regionsGroup=new Ce),t.add(this._svgGroup=new Ce)}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()):Ze(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 Ce),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=RO(T,u)),L(T,function(M){_.push(new Ur(h(M)))})}else{var D=S.points;u&&(D=RO(D,u,!0)),L(D,function(M){b.push(new jr(h(M)))})}});var w=c(v.getCenter(),l&&l.project);function x(S,T){if(!!S.length){var D=new Cd({culling:!0,segmentIgnoreThreshold:1,shape:{paths:S}});p.add(D),LO(e,D,y,m),IO(e,D,d,m,o,y,w),T&&(AO(D),L(D.states,AO))}}x(_),x(b,!0)}),t.each(function(v,d){var p=n.get(d),g=p.dataIdx,y=p.regionModel;PO(e,v,d,y,o,g),EO(e,v,d,y,o),OO(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&&LO(e,f,h,v),f instanceof Bn&&(f.culling=!0),f.z2EmphasisLift=0,!o.namedFrom&&(EX.get(c)!=null&&IO(e,f,s,v,l,h,null),PO(e,f,s,v,l,h),EO(e,f,s,v,l),PX.get(c)!=null)){var d=OO(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=bi.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=bi.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,Eb(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,Ob(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])&&!Gp(u,n,e)})},r.prototype.resetForLabelLayout=function(){this.group.traverse(function(e){var t=e.getTextContent();t&&(t.ignore=MO(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 LO(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=Yp(a),u=Yp(i),c=Yp(s),f=Yp(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=gu(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 IO(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;_r(e,rr(n),{labelFetcher:h,labelDataIndex:f,defaultText:t},v);var d=e.getTextContent();if(d&&(MO(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 PO(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 EO(r,e,t,n,a){r.data||Jl({el:e,componentModel:a,itemName:t,itemTooltipOption:n.get("tooltip")})}function OO(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 RO(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 NO=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 NO(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 da({style:{fill:t.getData().getVisual("style").fill},shape:{cx:c[0]+f*9,cy:c[1],r:3},silent:!0,z2:8+(f?0:Wl+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);_r(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(_){md(h,_)}}o.add(h)}}})},e.type="map",e}(ht),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=Cu(this,{coordDimensions:["value"],encodeDefaulter:Ae($_,this)}),a=ge(),i=[],o=0,s=n.count();o<s;o++){var l=n.getName(o);a.set(l,!0)}var u=bi.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}(gt),zX=kX;function BX(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=BX(ee(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 kO=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 ui,n._rawTransformable=new ui,n.name=t,n}return e.prototype.setBoundingRect=function(t,n,a,i){return this._rect=new Oe(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 Oe(t,n,a,i)},e.prototype._transformTo=function(t,n,a,i){var o=this.getBoundingRect(),s=this._rawTransformable;s.transform=o.calculateTransform(new Oe(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(),Ov(this.transform||(this.transform=[]),n.transform||_n()),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 ui;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?kO(a,t,i):Lr(a,t)},e.prototype.pointToData=function(t){var n=this.invTransform;return n?kO([],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}(ui);function zO(r){var e=r.seriesModel;return e?e.coordinateSystem:null}var Jf=$X,HX={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},BO=["lng","lat"],FO=function(r){j(e,r);function e(t,n,a){var i=r.call(this,t)||this;i.dimensions=BO,i.type="geo",i._nameCoordMap=ge(),i.map=n;var o=a.projection,s=bi.load(n,a.nameMap,a.nameProperty),l=bi.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:Pe(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 Oe(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=VO(n);return i===this?i.dataToPoint(a):null},e.prototype.convertFromPixel=function(t,n,a){var i=VO(n);return i===this?i.pointToData(a):null},e}(Jf);Pt(FO,Jf);function VO(r){var e=r.geoModel,t=r.seriesModel;return e?e.coordinateSystem:t?t.coordinateSystem||(t.getReferringComponents("geo",Wt).models[0]||{}).coordinateSystem:null}var $O=FO;function HO(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]);ii(n,n,E),oi(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=Ut(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=BO}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 $O(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=HO,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=ee(o,function(c){return c.get("nameMap")}),u=new $O(s,s,Q({nameMap:Mv(l)},a(o[0])));u.zoomLimit=Jt.apply(null,ee(o,function(c){return c.get("scaleLimit")})),n.push(u),u.resize=HO,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=bi.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,GO=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=bi.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=GO.getFilledRegions(n.regions,n.map,n.nameMap,n.nameProperty);var a={};this._optionModelMap=En(n.regions||[],function(i,o){var s=o.name;return s&&(i.set(s,new ft(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 ft(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 WO(r,e){return r.pointToProjected?r.pointToProjected(e):r.pointToData(e)}function Bb(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(WO(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(WO(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 NO(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){bi.registerMap(r,e,t)}function UO(r){r.registerCoordinateSystem("geo",GO),r.registerComponentModel(YX),r.registerComponentView(ZX),r.registerImpl("registerMap",XX),r.registerImpl("getMap",function(t){return bi.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=Bb(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(UO),r.registerChartView(NX),r.registerSeriesModel(zX),r.registerLayout(VX),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,FX),GL("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 jO(r){return arguments.length?r:oQ}function eh(r,e){return r-=Math.PI/2,{x:e*Math.cos(r),y:e*Math.sin(r)}}function tQ(r,e){return Ut(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=Fb(s),i=Vb(i),s&&i;){a=Fb(a),o=Vb(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&&!Fb(a)&&(a.hierNode.thread=s,a.hierNode.modifier+=f-l),i&&!Vb(o)&&(o.hierNode.thread=i,o.hierNode.modifier+=u-c,t=r)}return t}function Fb(r){var e=r.children;return e.length&&r.isExpand?e[e.length-1]:r.hierNode.thread}function Vb(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}(ze),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 Ce,t}return e.prototype.init=function(t,n){this._controller=new Qf(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){YO(i,c)&&qO(i,c,null,s,t)}).update(function(c,f){var h=u.getItemGraphicEl(f);if(!YO(i,c)){h&&QO(u,f,h,s,t);return}qO(i,c,h,s,t)}).remove(function(c){var f=u.getItemGraphicEl(c);f&&QO(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=[];hd(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 Jf;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)&&!Gp(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){Eb(s,u.dx,u.dy),a.dispatchAction({seriesId:t.id,type:"treeRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){Ob(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}(ht);function YO(r,e){var t=r.getItemLayout(e);return t&&!isNaN(t.x)&&!isNaN(t.y)}function qO(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 Wf(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,Ze(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"?gc(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===qc||md(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 nf({shape:$b(c,f,h,a,a)})),Ze(p,{shape:$b(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}})),Ze(p,{shape:{parentPoint:[o.x,o.y],childPoints:y}},r)}p&&!(u==="polyline"&&!e.isExpand)&&(p.useStyle(me({strokeNoScale:!0,fill:null},d)),mr(p,l,"lineStyle"),ps(p),s.add(p))}function ZO(r,e,t,n,a){var i=e.tree.root,o=XO(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"?ro(h,{shape:$b(d,p,g,l,l),style:{opacity:0}},n,{cb:function(){t.remove(h)},removeOpt:a}):v==="polyline"&&n.get("layout")==="orthogonal"&&ro(h,{shape:{parentPoint:[l.x,l.y],childPoints:[[l.x,l.y]]},style:{opacity:0}},n,{cb:function(){t.remove(h)},removeOpt:a}))}}function XO(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 QO(r,e,t,n,a){var i=r.tree.getNodeByDataIndex(e),o=r.tree.root,s=XO(o,i).sourceLayout,l={duration:a.get("animationDurationUpdate"),easing:a.get("animationEasingUpdate")};ro(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){ZO(u,r,n,a,l)}),ZO(i,r,n,a,l)}function $b(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=eh(u,f),d=eh(u,f+(h-f)*t),p=eh(c,h+(f-h)*t),g=eh(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,Zn=qe();function KO(r){var e=r.mainData,t=r.datas;t||(t={main:e},r.datasAttr={main:"data"}),r.datas=r.mainData=null,JO(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))}),Ar(t[e.dataType]===e)}function hQ(r,e){if(yQ(this)){var t=Q({},Zn(this).datas);t[this.dataType]=e,JO(e,t,r)}else Hb(e,this.dataType,Zn(this).mainData,r);return e}function vQ(r,e){return r.struct&&r.struct.update(),e}function dQ(r,e){return L(Zn(e).datas,function(t,n){t!==e&&Hb(t.cloneShallow(),n,e,r)}),e}function pQ(r){var e=Zn(this).mainData;return r==null||e==null?e:Zn(e).datas[r]}function gQ(){var r=Zn(this).mainData;return r==null?[{data:r}]:ee(Fe(Zn(r).datas),function(e){return{type:e,data:Zn(r).datas[e]}})}function yQ(r){return Zn(r).mainData===r}function JO(r,e,t){Zn(r).datas={},L(e,function(n,a){Hb(n,a,r,t)})}function Hb(r,e,t,n){Zn(t).datas[e]=r,Zn(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,J(h)?h.length:1),i.push(c);var v=new mQ(Xt(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=mu(i,{coordDimensions:["value"],dimensionsCount:o}).dimensions,u=new Rr(l,t);return u.initData(i),n&&n(u),KO({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 Gb=_Q;function th(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 eR(r){for(var e=[];r;)r=r.parentNode,r&&e.push(r);return e.reverse()}function Wb(r,e){var t=eR(r);return Ne(t,e)>=0}function qp(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 ft(a,this,this.ecModel),o=Gb.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=qp(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}(gt),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 rh(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=jO(function(_,b){return(_.parentNode===b.parentNode?1:2)/_.depth})):(a=t.width,i=t.height,o=jO());var s=r.getData().tree.root,l=s.children[0];if(l){KX(s),SQ(l,JX,o),s.hierNode.modifier=-l.hierNode.prelim,rh(l,eQ);var u=l,c=l,f=l;rh(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),rh(l,function(_){g=(_.getLayout().x+v)*d,y=(_.depth-1)*p;var b=eh(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),rh(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),rh(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=Bb(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 tR=["treemapZoomToNode","treemapRender","treemapMove"];function LQ(r){for(var e=0;e<tR.length;e++)r.registerAction({type:tR[e],update:"updateView"},Et);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=th(t,s,i);if(l){var u=i.getViewRoot();u&&(t.direction=Wb(u,l.node)?"rollUp":"drillDown"),i.resetViewRoot(l.node)}}})}function rR(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=U_(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};nR(a);var i=t.levels||[],o=this.designatedVisualItemStyle={},s=new ft({itemStyle:o},this,n);i=t.levels=PQ(i,n);var l=ee(i||[],function(f){return new ft(f,s,n)},this),u=Gb.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=qp(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(){rR(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}(gt);function nR(r){var e=0;L(r.children,function(n){nR(n);var a=n.value;J(a)&&(a=a[0]),e+=a});var t=r.value;J(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),J(r.value)?r.value[0]=t:r.value=t}function PQ(r,e){var t=ct(e.get("color")),n=ct(e.get(["aria","decal","decals"]));if(!!t){r=r||[];var a,i;L(r,function(s){var l=new ft(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,aR=8,Ub=5,RQ=function(){function r(e){this.group=new Ce,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),Wd(o,f.pos,f.box)}},r.prototype._prepare=function(e,t,n){for(var a=e;a;a=a.parentNode){var i=Xt(a.getModel().get("name"),""),o=n.getTextRect(i),s=Math.max(o.width+OQ*2,t.emptyItemWidth);t.totalWidth+=s+aR,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 Ur({shape:{points:NQ(l,0,m,c,p===v.length-1,p===0)},style:me(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new We({style:pt(i,{text:_})}),textConfig:{position:"inside"},z2:Wl*1e4,onclick:Ae(s,y)});b.disableLabelAnimation=!0,b.getTextContent().ensureState("emphasis").style=pt(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+aR}},r.prototype.remove=function(){this.group.removeAll()},r}();function NQ(r,e,t,n,a,i){var o=[[a?r:r-Ub,e],[r+t,e],[r+t,e+n],[a?r:r-Ub,e+n]];return!i&&o.splice(2,0,[r+t+Ub,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&&qp(t,e)}}var zQ=RQ,BQ=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 BQ}var jb=Ce,iR=Ge,oR=3,sR="label",lR="upperLabel",VQ=Wl*10,$Q=Wl*2,HQ=Wl*3,js=is([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),uR=function(r){var e=js(r);return e.stroke=e.fill=e.lineWidth=null,e},Zp=qe(),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=nh(),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=th(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 jb,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=nh(),l=nh(),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 gi(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=nh();return g&&L(g,function(m,_){var b=y[_];L(m,function(w){w&&(b.push(w),Zp(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=Zp(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 Ce?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 Qf(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 Oe(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)>oR||Math.abs(t.dy)>oR)){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 Oe(o.x,o.y,o.width,o.height),l=this.seriesModel.layoutInfo;n-=l.x,a-=l.y;var u=_n();la(u,u,[-n,-a]),Rv(u,u,[t.scale,t.scale]),la(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&&Hd(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 zQ(this.group))).render(t,n,a.node,function(o){i._state!=="animating"&&(Wb(t.getViewRoot(),o)?i._rootToNode({node:o}):i._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=nh(),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}(ht);function nh(){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",jb);if(!A)return;if(l.add(A),A.x=c.x||0,A.y=c.y||0,A.markRedraw(),Zp(A).nodeWidth=v,Zp(A).nodeHeight=d,c.isAboveViewRoot)return A;var I=X("background",iR,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)Kc(A)&&gs(A,!1),I&&(gs(I,!N),f.setItemGraphicEl(o.dataIndex,I),f_(I,V,O));else{var $=X("content",iR,u,HQ);$&&q(A,$),I.disableMorphing=!0,I&&Kc(I)&&gs(I,!1),gs(A,!N),f.setItemGraphicEl(o.dataIndex,A),f_(A,V,O)}return A;function U(se,ne,ve){var R=Me(ne);if(R.dataIndex=o.dataIndex,R.seriesIndex=r.seriesIndex,ne.setShape({x:0,y:0,width:v,height:d,r:M}),g)te(ne);else{ne.invisible=!1;var F=o.getVisual("style"),G=F.stroke,ae=uR(x);ae.fill=G;var re=js(S);re.fill=S.get("borderColor");var K=js(T);K.fill=T.get("borderColor");var ue=js(D);if(ue.fill=D.get("borderColor"),ve){var Re=v-2*p;H(ne,G,F.opacity,{x:p,y:0,width:Re,height:b})}else ne.removeTextContent();ne.setStyle(ae),ne.ensureState("emphasis").style=re,ne.ensureState("blur").style=K,ne.ensureState("select").style=ue,ps(ne)}se.add(ne)}function q(se,ne){var ve=Me(ne);ve.dataIndex=o.dataIndex,ve.seriesIndex=r.seriesIndex;var R=Math.max(v-2*p,0),F=Math.max(d-2*p,0);if(ne.culling=!0,ne.setShape({x:p,y:p,width:R,height:F,r:M}),g)te(ne);else{ne.invisible=!1;var G=o.getVisual("style"),ae=G.fill,re=uR(x);re.fill=ae,re.decal=G.decal;var K=js(S),ue=js(T),Re=js(D);H(ne,ae,G.opacity,null),ne.setStyle(re),ne.ensureState("emphasis").style=K,ne.ensureState("blur").style=ue,ne.ensureState("select").style=Re,ps(ne)}se.add(ne)}function te(se){!se.invisible&&i.push(se)}function H(se,ne,ve,R){var F=h.getModel(R?lR:sR),G=Xt(h.get("name"),null),ae=F.getShallow("show");_r(se,rr(h,R?lR:sR),{defaultText:ae?G:null,inheritColor:ne,defaultOpacity:ve,labelFetcher:r,labelDataIndex:o.dataIndex});var re=se.getTextContent();if(!!re){var K=re.style,ue=Iv(K.padding||0);R&&(se.setTextConfig({layoutRect:R}),re.disableLabelLayout=!0),re.beforeUpdate=function(){var mt=Math.max((R?R.width:se.shape.width)-ue[1]-ue[3],0),Xe=Math.max((R?R.height:se.shape.height)-ue[0]-ue[2],0);(K.width!==mt||K.height!==Xe)&&re.setStyle({width:mt,height:Xe})},K.truncateMinChar=2,K.lineOverflow="truncate",Y(K,R,c);var Re=re.getState("emphasis");Y(Re?Re.style:null,R,c)}}function Y(se,ne,ve){var R=se?se.text:null;if(!ne&&ve.isLeafRoot&&R!=null){var F=r.get("drillDownIcon",!0);se.text=F?F+" "+R:R}}function X(se,ne,ve,R){var F=m!=null&&t[se][m],G=a[se];return F?(t[se][m]=null,Z(G,F)):g||(F=new ne,F instanceof Bn&&(F.z2=UQ(ve,R)),ie(G,F)),e[se][y]=F}function Z(se,ne){var ve=se[y]={};ne instanceof jb?(ve.oldX=ne.x,ve.oldY=ne.y):ve.oldShape=Q({},ne.shape)}function ie(se,ne){var ve=se[y]={},R=o.parentNode,F=ne instanceof Ce;if(R&&(!n||n.direction==="drillDown")){var G=0,ae=0,re=a.background[R.getRawIndex()];!n&&re&&re.oldShape&&(G=re.oldShape.width,ae=re.oldShape.height),F?(ve.oldX=0,ve.oldY=ae):ve.oldShape={x:G,y:ae,width:0,height:0}}ve.fadein=!F}}function UQ(r,e){return r*VQ+e}var jQ=GQ,ah=L,YQ=_e,Xp=-1,Yb=function(){function r(e){var t=e.mappingMethod,n=e.type,a=this.option=xe(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"?(qb(a),qQ(a)):t==="category"?a.categories?ZQ(a):qb(a,!0):(Ar(t!=="linear"||a.dataExtent),qb(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=J(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&&ah(r.visualHandlers,function(a,i){e.hasOwnProperty(i)&&(t[i]=e[i],n=!0)}),n?t:null},r.prepareVisualTypes=function(e){if(J(e))e=e.slice();else if(YQ(e)){var t=[];ah(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(Kp(f[1],e,c[1]))return o}else if(c[1]===1/0){if(Kp(f[0],c[0],e))return o}else if(Kp(f[0],c[0],e)&&Kp(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:ih("color"),getColorMapper:function(){var e=this.option;return fe(e.mappingMethod==="category"?function(t,n){return!n&&(t=this._normalizeData(t)),oh.call(this,t)}:function(t,n,a){var i=!!a;return!n&&(t=this._normalizeData(t)),a=Pc(t,e.parsedVisual,a),i?a:ca(a,"rgba")},this)},_normalizedToVisual:{linear:function(e){return ca(Pc(e,this.option.parsedVisual),"rgba")},category:oh,piecewise:function(e,t){var n=Xb.call(this,t);return n==null&&(n=ca(Pc(e,this.option.parsedVisual),"rgba")),n},fixed:Ys}},colorHue:Qp(function(e,t){return zl(e,t)}),colorSaturation:Qp(function(e,t){return zl(e,null,t)}),colorLightness:Qp(function(e,t){return zl(e,null,null,t)}),colorAlpha:Qp(function(e,t){return Ec(e,t)}),decal:{applyVisual:ih("decal"),_normalizedToVisual:{linear:null,category:oh,piecewise:null,fixed:null}},opacity:{applyVisual:ih("opacity"),_normalizedToVisual:Zb([0,1])},liftZ:{applyVisual:ih("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:cR,category:oh,piecewise:function(e,t){var n=Xb.call(this,t);return n==null&&(n=cR.call(this,e)),n},fixed:Ys}},symbolSize:{applyVisual:ih("symbolSize"),_normalizedToVisual:Zb([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(ah(e,function(o,s){t[o]=s}),!J(n)){var a=[];_e(n)?ah(n,function(o,s){var l=t[s];a[l!=null?l:Xp]=o}):a[Xp]=n,n=fR(r,a)}for(var i=e.length-1;i>=0;i--)n[i]==null&&(delete t[e[i]],e.pop())}function qb(r,e){var t=r.visual,n=[];_e(t)?ah(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]),fR(r,n)}function Qp(r){return{applyVisual:function(e,t,n){var a=this.mapValueToVisual(e);n("color",r(t("color"),a))},_normalizedToVisual:Zb([0,1])}}function cR(r){var e=this.option.visual;return e[Math.round(it(r,[0,1],[0,e.length-1],!0))]||{}}function ih(r){return function(e,t,n){n(r,this.mapValueToVisual(e))}}function oh(r){var e=this.option.visual;return e[this.option.loop&&r!==Xp?r%e.length:r]}function Ys(){return this.option.visual[0]}function Zb(r){return{linear:function(e){return it(e,r,this.option.visual,!0)},category:oh,piecewise:function(e,t){var n=Xb.call(this,t);return n==null&&(n=it(e,r,this.option.visual,!0)),n},fixed:Ys}}function Xb(r){var e=this.option,t=e.pieceList;if(e.hasSpecialVisual){var n=Yb.findPieceIndex(r,t),a=t[n];if(a&&a.visual)return a.visual[this.type]}}function fR(r,e){return r.visual=e,r.type==="color"&&(r.parsedVisual=ee(e,function(t){var n=$r(t);return n||[0,0,0,1]})),e}var XQ={linear:function(r){return it(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var e=this.option.pieceList,t=Yb.findPieceIndex(r,e,!0);if(t!=null)return it(t,[0,e.length-1],[0,1],!0)},category:function(r){var e=this.option.categories?this.option.categoryMap[r]:r;return e==null?Xp:e},fixed:Et};function Kp(r,e,t){return r?e<=t:e<t}var xr=Yb,QQ="itemStyle",hR=qe(),KQ={seriesType:"treemap",reset:function(r){var e=r.getData().tree,t=e.root;t.isRemoved()||vR(t,{},r.getViewRoot().getAncestors(),r)}};function vR(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=dR(l),c=eK(f,h)),u.stroke=c;var v=r.viewChildren;if(!v||!v.length)h=dR(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);vR(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 dR(r){var e=Qb(r,"color");if(e){var t=Qb(r,"colorAlpha"),n=Qb(r,"colorSaturation");return n&&(e=zl(e,null,null,n)),t&&(e=Ec(e,t)),e}}function eK(r,e){return e!=null?zl(e,null,null,r):null}function Qb(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=Kb(e,"color")||a.color!=null&&a.color!=="none"&&(Kb(e,"colorAlpha")||Kb(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 xr(f);return hR(h).drColorMappingBy=c,h}}}function Kb(r,e){var t=r.get(e);return J(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"&&hR(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 sh=Math.max,Jp=Math.min,pR=Jt,Jb=L,gR=["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=Ut(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),l=o.size||[],u=le(pR(s.width,l[0]),a),c=le(pR(s.height,l[1]),i),f=n&&n.type,h=["treemapZoomToNode","treemapRootToNode"],v=th(n,h,r),d=f==="treemapRender"||f==="treemapMove"?n.rootRect:null,p=r.getViewRoot(),g=eR(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),yR(p,_,!1,0),b=p.getLayout(),Jb(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),_R(w,new Oe(-s.x,-s.y,a,i),g,p,0)}};function yR(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(gR),u=s.get(nK)/2,c=bR(s),f=Math.max(l,c),h=l-u,v=f-u;r.setLayout({borderWidth:l,upperHeight:f,upperLabelHeight:c},!0),a=sh(a-2*h,0),i=sh(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=Jp(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,mR(_,y,g,u,!1),y=Jp(g.width,g.height),_.length=_.area=0,m=1/0)}if(_.length&&mR(_,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++)yR(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=at(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],Jb(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?sh(u*n/l,l/(u*a)):1/0}function mR(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]]=sh(c-2*n,0),y=t[s[i]]+t[l[i]]-u,m=f===h-1||y<p?y:p,_=d[l[i]]=sh(m-2*n,0);d[s[o]]=t[s[o]]+Jp(n,g/2),d[s[i]]=u+Jp(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(gR),y=Math.max(g,bR(p));u+=4*g*g+(3*g+y)*Math.pow(u,.5),u>P0&&(u=P0),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 _R(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 Oe(e.x-i.x,e.y-i.y,e.width,e.height);Jb(r.viewChildren||[],function(u){_R(u,l,t,n,a+1)})}}function bR(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){Ye(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 eg(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=eg(e.get("edgeSymbol")),i=eg(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=eg(s.getShallow("symbol",!0)),c=eg(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 ex="-->",tg=function(r){return r.get("autoCurveness")||null},xR=function(r,e){var t=tg(r),n=20,a=[];if(Ye(t))n=t;else if(J(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},lh=function(r,e,t){var n=[r.id,r.dataIndex].join("."),a=[e.id,e.dataIndex].join(".");return[t.uid,n,a].join(ex)},wR=function(r){var e=r.split(ex);return[e[0],e[2],e[1]].join(ex)},mK=function(r,e){var t=lh(r.node1,r.node2,e);return e.__edgeMap[t]},_K=function(r,e){var t=tx(lh(r.node1,r.node2,e),e),n=tx(lh(r.node2,r.node1,e),e);return t+n},tx=function(r,e){var t=e.__edgeMap;return t[r]?t[r].length:0};function bK(r){!tg(r)||(r.__curvenessList=[],r.__edgeMap={},xR(r))}function xK(r,e,t,n){if(!!tg(t)){var a=lh(r,e,t),i=t.__edgeMap,o=i[wR(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 rx(r,e,t,n){var a=tg(e),i=J(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);xR(e,u),r.lineStyle=r.lineStyle||{};var c=lh(r.node1,r.node2,e),f=e.__curvenessList,h=i||u%2?0:1;if(o.isForward)return f[h+s];var v=wR(c),d=tx(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 SR(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")])}),nx(t,r)}}function nx(r,e){r.eachEdge(function(t,n){var a=Ia(t.getModel().get(["lineStyle","curveness"]),-rx(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])}nx(i.graph,t)}else(!n||n==="none")&&SR(t)})}function uh(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 ch(r){var e=r.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),+e}var CR=Math.PI,ax=[];function ix(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),bc(p,p,c),t.setLayout([l+p[0],u+p[1]],!0);var g=r.get(["circular","rotateLabel"]);TR(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"]),rx(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;ax.length=o;var l=uh(r);e.eachNode(function(f){var h=ch(f);isNaN(h)&&(h=2),h<0&&(h=0),h*=l;var v=Math.asin(h/2/n);isNaN(v)&&(v=CR/2),ax[f.dataIndex]=v,s+=v*2});var u=(2*CR-s)/o/2,c=0;e.eachNode(function(f){var h=u+ax[f.dataIndex];c+=h,(!f.getLayout()||!f.getLayout().fixed)&&f.setLayout([n*Math.cos(c)+a,n*Math.sin(c)+i]),c+=h})}};function TR(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"&&ix(e,"symbolSize")})}var Mu=Pv;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=$i(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;Hi(y,x.p,w.p);var S=_c(y)-b.d,T=x.w/(w.w+x.w);isNaN(T)&&(T=0),jo(y,y),!w.fixed&&Mu(w.p,w.p,y,T*S*v),!x.fixed&&Mu(x.p,x.p,y,-(1-T)*S*v)}}for(var _=0;_<m;_++){var D=n[_];D.fixed||(Hi(y,l,D.p),Mu(D.p,D.p,y,u*v))}for(var _=0;_<m;_++)for(var w=n[_],M=_+1;M<m;M++){var x=n[M];Hi(y,x.p,w.p);var S=_c(y);S===0&&(XT(y,Math.random()-.5,Math.random()-.5),S=1);var A=(w.rep+x.rep)/S/S;!w.fixed&&Mu(w.pp,w.pp,y,A),!x.fixed&&Mu(x.pp,x.pp,y,-A)}for(var I=[],_=0;_<m;_++){var D=n[_];D.fixed||(Hi(I,D.p,D.pp),Mu(D.p,D.p,I,v),Lr(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"?SR(e):l==="circular"&&ix(e,"value");var u=i.getDataExtent("value"),c=o.getDataExtent("value"),f=s.get("repulsion"),h=s.get("edgeLength"),v=J(f)?f:[f,f],d=J(h)?h:[h,h];d=[d[1],d[0]];var p=i.mapArray("value",function(_,b){var w=i.getItemLayout(b),x=it(_,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=it(_,c,d);isNaN(x)&&(x=(d[0]+d[1])/2);var S=w.getModel(),T=Ia(w.getModel().get(["lineStyle","curveness"]),-rx(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&&Lr(_[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]||[],Lr(I[0],M),Lr(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 Ut(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=[];hd(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 Jf;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 DR=tr.prototype,ox=nf.prototype,MR=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})(MR);function sx(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 MR},e.prototype.buildPath=function(t,n){sx(n)?DR.buildPath.call(this,t,n):ox.buildPath.call(this,t,n)},e.prototype.pointAt=function(t){return sx(this.shape)?DR.pointAt.call(this,t):ox.pointAt.call(this,t)},e.prototype.tangentAt=function(t){var n=this.shape,a=sx(n)?[n.x2-n.x1,n.y2-n.y1]:ox.tangentAt.call(this,t);return jo(a,a)},e}(ze),IK=LK,lx=["fromSymbol","toSymbol"];function AR(r){return"_"+r+"Type"}function LR(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=Df(a),u=du(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 ux(e.shape,r),e}function ux(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(lx,function(l){var u=LR(l,t,n);this.add(u),this[AR(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:{}};ux(l.shape,s),Ze(o,l,i,n),L(lx,function(u){var c=t.getItemVisual(n,u),f=AR(u);if(this[f]!==c){this.remove(this.childOfName(u));var h=LR(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(lx,function(x){var S=this.childOfName(x);if(S){S.setColor(y),S.style.opacity=g.opacity;for(var T=0;T<Gr.length;T++){var D=Gr[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);_r(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");J(w)||(w=[w,w]),_.__labelDistance=w}this.setTextConfig({position:null,local:!0,inside:!1}),Lt(this,h,v,f)},e.prototype.highlight=function(){vi(this)},e.prototype.downplay=function(){di(this)},e.prototype.updateLayout=function(t,n){this.setLinePoints(t.getItemLayout(n))},e.prototype.setLinePoints=function(t){var n=this.childOfName("line");ux(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=Hi([],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}(Ce),cx=EK,OK=function(){function r(e){this.group=new Ce,this._LineCtor=e||cx}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=IR(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=IR(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(fx(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){ao(this._progressiveEls||this.group,e)},r.prototype._doAdd=function(e,t,n){var a=e.getItemLayout(t);if(!!fx(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(!fx(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 IR(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 PR(r){return isNaN(r[0])||isNaN(r[1])}function fx(r){return r&&!PR(r[0])&&!PR(r[1])}var hx=OK,vx=[],dx=[],px=[],Au=lr,gx=Gi,ER=Math.abs;function OR(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){vx[0]=Au(n[0],a[0],i[0],c),vx[1]=Au(n[1],a[1],i[1],c);var f=ER(gx(vx,e)-l);f<o&&(o=f,s=c)}for(var h=0;h<32;h++){var v=s+u;dx[0]=Au(n[0],a[0],i[0],s),dx[1]=Au(n[1],a[1],i[1],s),px[0]=Au(n[0],a[0],i[0],v),px[1]=Au(n[1],a[1],i[1],v);var f=gx(dx,e)-l;if(ER(f)<.01)break;var d=gx(px,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 yx(r,e){var t=[],n=Ac,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(Lr(a[0],h[0]),Lr(a[1],h[2]),Lr(a[2],h[1]),c&&c!=="none"){var v=ch(s.node1),d=OR(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=ch(s.node2),d=OR(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]}Lr(u[0],a[0]),Lr(u[1],a[2]),Lr(u[2],a[1])}else{if(Lr(i[0],h[0]),Lr(i[1],h[1]),Hi(o,i[1],i[0]),jo(o,o),c&&c!=="none"){var v=ch(s.node1);Pv(i[0],i[0],o,v*e)}if(f&&f!=="none"){var v=ch(s.node2);Pv(i[1],i[1],o,-v*e)}Lr(u[0],i[0]),Lr(u[1],i[1])}})}function RR(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 Uf,i=new hx,o=this.group;this._controller=new Qf(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(RR(o)){var c={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?u.attr(c):Ze(u,c,t)}yx(t.getGraph(),uh(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),ix(t,"symbolSize",_,[D.offsetX,D.offsetY]),i.updateLayout(t);break;case"none":default:f.setItemLayout(b,[w.x,w.y]),nx(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(_){TR(_,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)&&!Gp(u,a,t)}),!RR(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){Eb(s,u.dx,u.dy),a.dispatchAction({seriesId:t.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){Ob(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(),yx(t.getGraph(),uh(t)),i._lineDraw.updateLayout(),a.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,n=t.getData(),a=uh(t);n.eachItemGraphicEl(function(i,o){i&&i.setSymbolScale(a)})},e.prototype.updateLayout=function(t){yx(t.getGraph(),uh(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}(ht),kK=NK;function Lu(r){return"_EC_"+r}var zK=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[Lu(e)]){var a=new qs(e,t);return a.hostGraph=this,this.nodes.push(a),n[Lu(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[Lu(e)]},r.prototype.addEdge=function(e,t,n){var a=this._nodesMap,i=this._edgesMap;if(Ye(e)&&(e=this.nodes[e]),Ye(t)&&(t=this.nodes[t]),e instanceof qs||(e=a[Lu(e)]),t instanceof qs||(t=a[Lu(t)]),!(!e||!t)){var o=e.id+"-"+t.id,s=new NR(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[Lu(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}(),NR=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 kR(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)}}}Pt(qs,kR("hostGraph","data")),Pt(NR,kR("hostGraph","edgeData"));var BK=zK;function zR(r,e,t,n,a){for(var i=new BK(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(Xt(c.id,null),f+" > "+h)),u++)}var v=t.get("coordinateSystem"),d;if(v==="cartesian2d"||v==="polar")d=Wa(r,t);else{var p=lu.get(v),g=p?p.dimensions||[]:[];Ne(g,"value")<0&&g.concat(["value"]);var y=mu(r,{coordDimensions:g,encodeDefine:t.getEncode()}).dimensions;d=new Rr(y,t),d.initData(r)}var m=new Rr(["value"],t);return m.initData(l,s),a&&a(d,m),KO({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 qf(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=ft.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=xL({series:this,dataIndex:t,multipleSeries:n});return f},e.prototype._updateCategoriesData=function(){var t=ee(this.option.categories||[],function(a){return a.value!=null?a:Q({value:0},a)}),n=new Rr(["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}(gt),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:Jf.dimensions,create:AK}),r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},Et),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},Et),r.registerAction($K,function(e,t,n){t.eachComponent({mainType:"series",query:e},function(a){var i=a.coordinateSystem,o=Bb(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}(ze),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 rg(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?kp:Wr,d=f.get("show"),p=f.getModel("lineStyle"),g=p.get("width"),y=[u,c];MD(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=rg(At(N/b*(g-p)+p),_.get("formatter")),q=i(N/b),te=E*(d-x-V)+h,H=O*(d-x-V)+v,Y=_.get("rotate"),X=0;Y==="radial"?(X=-T+2*Math.PI,X>Math.PI/2&&(X+=Math.PI)):Y==="tangential"?X=-T-Math.PI/2:Ye(Y)&&(X=Y*Math.PI/180),X===0?f.add(new We({style:pt(_,{text:U,x:te,y:H,verticalAlign:O<-.8?"top":O>.8?"bottom":"middle",align:E<-.4?"left":E>.4?"right":"center"},{inheritColor:q}),silent:!0})):f.add(new We({style:pt(_,{text:U,x:te,y:H,verticalAlign:"middle",align:"center"},{inheritColor:q}),silent:!0,originX:te,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),q=P.get("keepAspect"),te;return N?te=kt(N,$-E/2,U-O,E,O,null,q):te=new UK({shape:{angle:-Math.PI/2,width:E,r:O,x:$,y:U}}),te.rotation=-(A+Math.PI/2),te.x=o.cx,te.y=o.cy,te}function D(M,A){var I=g.get("roundCap"),P=I?kp:Wr,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]:it(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:it(A,x,S,E)}},t),f.add(P),r_(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,Ze(O,{rotation:-((isNaN(+I)?S[0]:it(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");Ze($,{shape:{endAngle:it(I,x,S,U)}},t),f.add($),r_(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(it(m.get(_,M),x,[0,1],!0))),N.z2EmphasisLift=0,mr(N,A),Lt(N,P,E,O)}if(y){var q=d[M];q.useStyle(m.getItemVisual(M,"style")),q.setStyle(A.getModel(["progress","itemStyle"]).getItemStyle()),q.z2EmphasisLift=0,mr(q,A),Lt(q,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 Ce,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 Ce,w=i(it(_,[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:pt(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:pt(A,{x:P,y:E,text:rg(_,$),width:isNaN(O)?null:O,height:isNaN(N)?null:N,align:"center",verticalAlign:"middle"},{inheritColor:V})}),KM(M,{normal:A},_,function(q){return rg(q,$)}),p&&JM(M,y,l,t,{getFormattedLabel:function(q,te,H,Y,X,Z){return rg(Z?Z.interpolatedValue:_,$)}}),b.add(M)}h.add(b)}),this.group.add(h),this._titleEls=v,this._detailEls=d},e.type="gauge",e}(ht),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 Cu(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}(gt),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 jr,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||ga(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)):Ze(i,{style:{opacity:c},shape:{points:l.points}},o,n),mr(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;_r(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 Ee(v[0][0],v[0][1]):null},Ze(o,{style:{x:c.x,y:c.y}},s,n),o.attr({rotation:c.rotation,originX:c.x,originY:c.y,z2:10}),J1(a,eb(l),{stroke:h})},e}(Ur),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);af(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}(ht),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 qf(fe(this.getData,this),fe(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.getInitialData=function(t,n){return Cu(this,{coordDimensions:["value"],encodeDefaulter:Ae($_,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}(gt),nJ=rJ;function aJ(r,e){return Ut(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=it(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,q=it(U,[p,g],v,!0),te;switch(y){case"left":te=f;break;case"center":te=f+(l-q)/2;break;case"right":te=f+l-q;break}return[[te,O],[te+q,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(Yf("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 Ce,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=VR(t);s.diff(l).add(h).update(v).remove(d).execute();function h(g){var y=FR(s,o,g,c,u);mx(y,s,g,f)}function v(g,y){var m=l.getItemGraphicEl(y),_=BR(s,g,c,u);s.setItemGraphicEl(g,m),Ze(m,{shape:{points:_}},t,g),ga(m),mx(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=VR(n),u=this._progressiveEls=[],c=t.start;c<t.end;c++){var f=FR(i,this._dataGroup,c,s,o);f.incremental=!0,mx(f,i,c,l),u.push(f)}},e.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},e.type="parallel",e}(ht);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 BR(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 FR(r,e,t,n,a){var i=BR(r,t,n,a),o=new jr({shape:{points:i},z2:10});return e.add(o),r.setItemGraphicEl(t,o),o}function VR(r){var e=r.get("smooth",!0);return e===!0&&(e=uJ),e=Na(e),Pl(e)&&(e=0),{smooth:e}}function mx(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");mr(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}(gt);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=ct(r.parallelAxis);L(e,function(t){if(!!_e(t)){var n=t.parallelIndex||0,a=ct(r.parallel)[n];a&&a.parallelAxisDefault&&Ie(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)),hu(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},e.prototype.dispose=function(t,n){wf(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){_x(this,"click")&&(this._mouseDownPoint=[r.offsetX,r.offsetY])},mouseup:function(r){var e=this._mouseDownPoint;if(_x(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||!_x(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 _x(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&&Ie(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=at(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}(jn),PJ=IJ;function Zs(r,e,t,n,a,i){r=r||0;var o=t[1]-t[0];if(a!=null&&(a=Iu(a,[0,o])),i!=null&&(i=Math.max(i,a!=null?a:0)),n==="all"){var s=Math.abs(e[1]-e[0]);s=Iu(s,[0,o]),a=i=Iu(s,[a,i]),n=0}e[0]=Iu(e[0],t),e[1]=Iu(e[1],t);var l=bx(e,n);e[n]+=r;var u=a||0,c=t.slice();l.sign<0?c[0]+=u:c[1]-=u,e[n]=Iu(e[n],c);var f;return f=bx(e,n),a!=null&&(f.sign!==l.sign||f.span<a)&&(e[1-n]=e[n]+l.sign*a),f=bx(e,n),i!=null&&f.span>i&&(e[1-n]=e[n]+f.sign*i),e}function bx(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 Iu(r,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,r))}var xx=L,$R=Math.min,HR=Math.max,GR=Math.floor,EJ=Math.ceil,WR=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;xx(a,function(o,s){var l=i[s],u=t.getComponent("parallelAxis",l),c=this._axesMap.set(o,new PJ(o,kf(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();xx(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=Ut(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=ng(e.get("axisExpandWidth"),l),f=ng(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=ng(v[1]-v[0],l),v[1]=v[0]+d;else{d=ng(c*(f-1),l);var p=e.get("axisExpandCenter")||GR(u/2);v=[c*p-d/2],v[1]=v[0]+d}var g=(s-d)/(u-f);g<3&&(g=0);var y=[GR(WR(v[0]/c,1))+1,EJ(WR(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])}),xx(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=_n();Wi(v,v,h),la(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 ya([e,0],n.transform)},r.prototype.getAxisLayout=function(e){return xe(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=[HR(0,d-v/2)],a[1]=$R(o[1],a[0]+v),a[0]=a[1]-v}return{axisExpandWindow:a,behavior:u}},r}();function ng(r,e){return $R(HR(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 zJ=RJ;function BJ(r,e){var t=[];return r.eachComponent("parallel",function(n,a){var i=new zJ(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",Wt).models[0];n.coordinateSystem=a.coordinateSystem}}),t}var FJ={create:BJ},VJ=FJ,UR=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=xe(t);if(n)for(var a=n.length-1;a>=0;a--)wn(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);Pt(UR,bu);var jR=UR,Xs=!0,fh=Math.min,Pu=Math.max,$J=Math.pow,HJ=1e4,GJ=6,WJ=6,YR="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"},qR={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 Ce,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,YR,this._uid),L(this._handlers,function(a,i){n.on(i,a)}),this._brushType=t.brushType,this._brushOption=Ie(xe(qR),t,!0)},e.prototype._doDisableBrush=function(){var t=this._zr;iX(t,YR,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]=xe(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=ee(t,function(h){return Ie(xe(qR),h,!0)});var n="\0-brush-index-",a=this._covers,i=this._covers=[],o=this,s=this._creatingCover;return new gi(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]):XR(o,ZR(o,d));Sx(o,p)}}function f(h){a[h]!==s&&o.group.remove(a[h])}},e.prototype.unmount=function(){return this.enableBrush(!1),Dx(this),this._zr.remove(this.group),this},e.prototype.dispose=function(){this.unmount(),this.off()},e}(Rn);function ZR(r,e){var t=ag[e.brushType].createCover(r,e);return t.__brushOption=e,KR(t,e),r.group.add(t),t}function XR(r,e){var t=Cx(e);return t.endCreating&&(t.endCreating(r,e),KR(e,e.__brushOption)),e}function QR(r,e){var t=e.__brushOption;Cx(e).updateCoverShape(r,e,t.range,t)}function KR(r,e){var t=e.z;t==null&&(t=HJ),r.traverse(function(n){n.z=t,n.z2=t})}function Sx(r,e){Cx(e).updateCommon(r,e),QR(r,e)}function Cx(r){return ag[r.__brushOption.brushType]}function Tx(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 JR(r,e){var t=r._panels;if(!t)return Xs;var n=e.__brushOption.panelId;return n!=null?t[n]:Xs}function Dx(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=ee(r._covers,function(n){var a=n.__brushOption,i=xe(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 eN(r){var e=r.length-1;return e<0&&(e=0),[r[0],r[e]]}function tN(r,e,t,n){var a=new Ce;return a.add(new Ge({name:"main",style:Ax(t),silent:!0,draggable:!0,cursor:"move",drift:Ae(aN,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(aN,r,e,a,i),ondragend:Ae(Qs,e,{isEnd:!0})}))}),a}function rN(r,e,t,n){var a=n.brushStyle.lineWidth||0,i=Pu(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;xi(r,e,"main",o,s,d,p),n.transformable&&(xi(r,e,"w",l,u,i,y),xi(r,e,"e",h,u,i,y),xi(r,e,"n",l,u,g,i),xi(r,e,"s",l,v,g,i),xi(r,e,"nw",l,u,i,i),xi(r,e,"ne",h,u,i,i),xi(r,e,"sw",l,v,i,i),xi(r,e,"se",h,v,i,i))}function Mx(r,e){var t=e.__brushOption,n=t.transformable,a=e.childAt(0);a.useStyle(Ax(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?Lx(r,i[0]):QJ(r,i);o&&o.attr({silent:!n,invisible:!n,cursor:n?jJ[s]+"-resize":null})})}function xi(r,e,t,n,a,i,o){var s=e.childOfName(t);s&&s.setShape(JJ(Ix(r,e,[[n,a],[n+i,a+o]])))}function Ax(r){return me({strokeNoScale:!0},r.brushStyle)}function nN(r,e,t,n){var a=[fh(r,t),fh(e,n)],i=[Pu(r,t),Pu(e,n)];return[[a[0],i[0]],[a[1],i[1]]]}function XJ(r){return no(r.group)}function Lx(r,e){var t={w:"left",e:"right",n:"top",s:"bottom"},n={left:"w",right:"e",top:"n",bottom:"s"},a=Ed(t[e],XJ(r));return n[a]}function QJ(r,e){var t=[Lx(r,e[0]),Lx(r,e[1])];return(t[0]==="e"||t[0]==="w")&&t.reverse(),t.join("")}function aN(r,e,t,n,a,i){var o=t.__brushOption,s=r.toRectRange(o.range),l=iN(e,a,i);L(n,function(u){var c=UJ[u];s[c[0]][c[1]]+=l[c[0]]}),o.range=r.fromRectRange(nN(s[0][0],s[1][0],s[0][1],s[1][1])),Sx(e,t),Qs(e,{isEnd:!1})}function KJ(r,e,t,n){var a=e.__brushOption.range,i=iN(r,t,n);L(a,function(o){o[0]+=i[0],o[1]+=i[1]}),Sx(r,e),Qs(r,{isEnd:!1})}function iN(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 Ix(r,e,t){var n=JR(r,e);return n&&n!==Xs?n.clipPath(t,r._transform):xe(t)}function JJ(r){var e=fh(r[0][0],r[1][0]),t=fh(r[0][1],r[1][1]),n=Pu(r[0][0],r[1][0]),a=Pu(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=Tx(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)&&ag[s.brushType].contain(a[o],t[0],t[1]))return}i&&n.setCursorStyle("crosshair")}}function Px(r){var e=r.event;e.preventDefault&&e.preventDefault()}function Ex(r,e,t){return r.childOfName("main").contain(e,t)}function oN(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"&&Dx(r);var l=xe(o);l.brushType=sN(l.brushType,i),l.panelId=i===Xs?null:i.panelId,a=r._creatingCover=ZR(r,l),r._covers.push(a)}if(a){var u=ag[sN(r._brushType,i)],c=a.__brushOption;c.range=u.getCreatingRange(Ix(r,a,r._track)),n&&(XR(r,a),u.updateCommon(r,a)),QR(r,a),s={isEnd:n}}}else n&&o.brushMode==="single"&&o.removeOnClick&&Tx(r,e,t)&&Dx(r)&&(s={isEnd:n,removeOnClick:!0});return s}function sN(r,e){return r==="auto"?e.defaultBrushType:r}var tee={mousedown:function(r){if(this._dragging)lN(this,r);else if(!r.target||!r.target.draggable){Px(r);var e=this.group.transformCoordToLocal(r.offsetX,r.offsetY);this._creatingCover=null;var t=this._creatingPanel=Tx(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){Px(r);var a=oN(this,r,n,!1);a&&Qs(this,a)}},mouseup:function(r){lN(this,r)}};function lN(r,e){if(r._dragging){Px(e);var t=e.offsetX,n=e.offsetY,a=r.group.transformCoordToLocal(t,n),i=oN(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 ag={lineX:uN(0),lineY:uN(1),rect:{createCover:function(r,e){function t(n){return n}return tN({toRectRange:t,fromRectRange:t},r,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var e=eN(r);return nN(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(r,e,t,n){rN(r,e,t,n)},updateCommon:Mx,contain:Ex},polygon:{createCover:function(r,e){var t=new Ce;return t.add(new jr({name:"main",style:Ax(e),silent:!0})),t},getCreatingRange:function(r){return r},endCreating:function(r,e){e.remove(e.childAt(0)),e.add(new Ur({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:Ix(r,e,t)})},updateCommon:Mx,contain:Ex}};function uN(r){return{createCover:function(e,t){return tN({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=eN(e),n=fh(t[0][r],t[1][r]),a=Pu(t[0][r],t[1][r]);return[n,a]},updateCoverShape:function(e,t,n,a){var i,o=JR(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(),rN(e,t,l,a)},updateCommon:Mx,contain:Ex}}var Ox=qJ;function cN(r){return r=Rx(r),function(e){return w_(e,r)}}function fN(r,e){return r=Rx(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 hN(r,e,t){var n=Rx(r);return function(a,i){return n.contain(i[0],i[1])&&!Gp(a,e,t)}}function Rx(r){return Oe.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 Ox(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 Ce,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 _i(t,v);L(nee,d.add,d),this._axisGroup.add(d.getGroup()),this._refreshBrushController(v,u,t,s,c,a),sf(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=Oe.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:cN(f),isTargetByCursor:hN(f,s,i),getLinearBrushOtherExtent:fN(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=ee(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 ee(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 vN(r){r.registerComponentView(MJ),r.registerComponentModel(LJ),r.registerCoordinateSystem("parallel",VJ),r.registerPreprocessor(xJ),r.registerComponentModel(jR),r.registerComponentView(lee),Tu(r,"parallel",jR,fee),cee(r)}function hee(r){ke(vN),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(){vi(this)},e.prototype.downplay=function(){di(this)},e}(ze),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,q;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,q=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-_),q=N),p.setShape({x1:P,y1:E,x2:O,y2:N,cpx1:V,cpy1:$,cpx2:U,cpy2:q}),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 te=d.node1.getVisual("color"),H=d.node2.getVisual("color");ce(te)&&ce(H)&&(p.style.fill=new ql(0,0,+(v==="horizontal"),+(v==="vertical"),[{color:te,offset:0},{color:H,offset:1}]))}_r(p,rr(y,"edgeLabel"),{labelFetcher:t,labelDataIndex:d.dataIndex,defaultText:""+y.get("value")}),p.setTextConfig({position:"inside"});var Y=y.getModel("emphasis");mr(p,y,"lineStyle",function(Z){return Z.getItemStyle()}),s.add(p),h.setItemGraphicEl(d.dataIndex,p);var X=Y.get("focus");Lt(p,X==="adjacency"?d.getAdjacentDataIndices():X,Y.get("blurScope"),Y.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});_r(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),mr(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}(ht);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 ft(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}(gt),_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=at(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 Ut(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),zee(r,s)}function See(r){L(r,function(e){var t=bo(e.outEdges,ig),n=bo(e.inEdges,ig),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 dN(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){dN(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){!dN(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),Nx(s,a,t,n,o);for(var l=1;i>0;i--)l*=.99,Pee(s,l,o),Nx(s,a,t,n,o),kee(s,l,o),Nx(s,a,t,n,o)}function Lee(r,e){var t=[],n=e==="vertical"?"y":"x",a=B0(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 Nx(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=bo(a.outEdges,Eee,t)/bo(a.outEdges,ig);if(isNaN(i)){var o=a.outEdges.length;i=o?bo(a.outEdges,Oee,t)/o:0}if(t==="vertical"){var s=a.getLayout().x+(i-_o(a,t))*e;a.setLayout({x:s},!0)}else{var l=a.getLayout().y+(i-_o(a,t))*e;a.setLayout({y:l},!0)}}})})}function Eee(r,e){return _o(r.node2,e)*r.getValue()}function Oee(r,e){return _o(r.node2,e)}function Ree(r,e){return _o(r.node1,e)*r.getValue()}function Nee(r,e){return _o(r.node1,e)}function _o(r,e){return e==="vertical"?r.getLayout().x+r.getLayout().dx/2:r.getLayout().y+r.getLayout().dy/2}function ig(r){return r.getValue()}function bo(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=bo(a.inEdges,Ree,t)/bo(a.inEdges,ig);if(isNaN(i)){var o=a.inEdges.length;i=o?bo(a.inEdges,Nee,t)/o:0}if(t==="vertical"){var s=a.getLayout().x+(i-_o(a,t))*e;a.setLayout({x:s},!0)}else{var l=a.getLayout().y+(i-_o(a,t))*e;a.setLayout({y:l},!0)}}})})}function zee(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 Bee(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 xr({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(Bee),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 pN=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;J(b)?(x=b.slice(),b.unshift(w)):J(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:pp(d),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:h,type:pp(p),dimsDef:m.slice()}];return Cu(this,{coordDimensions:_,dimensionsCount:m.length+1,encodeDefaulter:Ae(wA,_,this)})},r.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},r}(),gN=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}(gt);Pt(gN,pN,!0);var Vee=gN,$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=yN(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?(ga(f),mN(h,f,i,u)):f=yN(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}(ht),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}(ze);function yN(r,e,t,n,a){var i=r.ends,o=new Gee({shape:{points:a?Wee(i,n,r):i}});return mN(r,o,e,t,a),o}function mN(r,e,t,n,a){var i=t.hostModel,o=uf[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");mr(e,s),Lt(e,l.get("focus"),l.get("blurScope"),l.get("disabled"))}function Wee(r,e,t){return ee(r,function(n){return n=n.slice(),n[e]=t.initBaseline,n})}var Uee=$ee,hh=L;function jee(r){var e=Yee(r);hh(e,function(t){var n=t.seriesModels;!n.length||(qee(t),hh(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;hh(t,function(d){l=Math.max(l,d.getData().count())});var u=e.getExtent();s=Math.abs(u[1]-u[0])/l}hh(t,function(d){var p=d.get("boxWidth");J(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;hh(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=wn(r[o].slice()),l=id(s,.25),u=id(s,.5),c=id(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!==Pr){var n="";nt(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){ao(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&&_N(u,f))return;var h=kx(f,c,!0);xt(h,{shape:{points:f.ends}},t,c),zx(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&&_N(u,v)){i.remove(h);return}h?(Ze(h,{shape:{points:v.ends}},t,c),ga(h)):h=kx(v),zx(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(),bN(t,this.group);var n=t.get("clip",!0)?Rp(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=kx(s);zx(l,a,o,i),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(t,n){bN(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}(ht),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}(ze);function kx(r,e,t){var n=r.ends;return new rte({shape:{points:t?nte(n,r):n},z2:100})}function _N(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 zx(r,e,t,n){var a=e.getItemModel(t);r.useStyle(e.getItemVisual(t,"style")),r.style.strokeNoScale=!0,r.__simpleBox=n,mr(r,a)}function nte(r,e){return ee(r,function(t){return t=t.slice(),t[1]=e.initBaseline,t})}var ate=function(){function r(){}return r}(),Bx=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}(ze);function bN(r,e,t,n){var a=r.getData(),i=a.getLayout("largePoints"),o=new Bx({shape:{points:i},__sign:1,ignoreCoarsePointer:!0});e.add(o);var s=new Bx({shape:{points:i},__sign:-1,ignoreCoarsePointer:!0});e.add(s);var l=new Bx({shape:{points:i},__sign:0,ignoreCoarsePointer:!0});e.add(l),Fx(1,o,r),Fx(-1,s,r),Fx(0,l,r),n&&(o.incremental=!0,s.incremental=!0),t&&t.push(o,s)}function Fx(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,xN=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}(gt);Pt(xN,pN,!0);var ote=xN;function ste(r){!r||!J(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:fu(),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:fu(),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=ee(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(q(P),q(A),q(I),q(M));var O=g.getItemModel(y),N=!!O.get(["itemStyle","borderColorDoji"]);g.setItemLayout(y,{sign:wN(m,y,b,w,c,N),initBaseline:b>w?A[i]:M[i],ends:E,brushRect:U(x,S,_)})}function V(te,H){var Y=[];return Y[a]=H,Y[i]=te,isNaN(H)||isNaN(te)?[NaN,NaN]:e.dataToPoint(Y)}function $(te,H,Y){var X=H.slice(),Z=H.slice();X[a]=Pd(X[a]+n/2,1,!1),Z[a]=Pd(Z[a]-n/2,1,!0),Y?te.push(X,Z):te.push(Z,X)}function U(te,H,Y){var X=V(te,Y),Z=V(H,Y);return X[a]-=n/2,Z[a]-=n/2,{x:X[0],y:X[1],width:n,height:Z[1]-X[1]}}function q(te){return te[a]=Pd(te[a],1),te}}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++]=wN(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 wN(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(Pe(r.get("barMaxWidth"),a),a),o=le(Pe(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 SN(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 Wf(t,n),o=new Ce;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)}SN(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}}SN(a,t)},e.prototype.highlight=function(){vi(this)},e.prototype.downplay=function(){di(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=Df(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=du(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}(Ce),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 Uf(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=jf("").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=a2(n.getRoamTransform()),this.group.decomposeTransform())},e.prototype.remove=function(t,n){this._symbolDraw&&this._symbolDraw.remove(!0)},e.type="effectScatter",e}(ht),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}(gt),Cte=Ste;function Tte(r){r.registerChartView(wte),r.registerSeriesModel(Cte),r.registerLayout(jf("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 cx(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");J(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 ai(t.__p1,t.__cp1)+ai(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=Jm;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=ai(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*ai(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}(Ce),CN=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 jr({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)}};Ze(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}(Ce),TN=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 TN(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+=ai(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}(CN),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(Ki(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(AD(f,h,g,y,d,p,s,t,n))return l}else if(Ki(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 Oe(i,o,s,l)}return t},e}(ze),Ete=function(){function r(){this.group=new Ce}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:fu(),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)}}}}}},DN=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)&&Rp(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=DN.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 hx(o?i?Lte:TN:i?CN:cx),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}(ht),kte=Nte,zte=typeof Uint32Array=="undefined"?Array:Uint32Array,Bte=typeof Float64Array=="undefined"?Array:Float64Array;function MN(r){var e=r.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(r.data=ee(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),Mv([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||[],MN(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(MN(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=gc(this._flatCoords,n.flatCoords),this._flatCoordsOffset=gc(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),Ye(t[0])){for(var a=t.length,i=new zte(a),o=new Bte(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 Rr(["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}(gt),Vte=Fte;function og(r){return r instanceof Array||(r=[r,r]),r}var $te={seriesType:"lines",reset:function(r){var e=og(r.get("symbol")),t=og(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=og(s.getShallow("symbol",!0)),u=og(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(DN),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=sa.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=sa.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=ee(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 AN(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()):AN(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&&(AN(o)?this.render(n,a,i):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(n,i,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){ao(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),q="-";U&&U[2]!=null&&(q=U[2]+""),_r(I,w,{labelFetcher:t,labelDataIndex:A,defaultOpacity:P.opacity,defaultText:q}),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}(ht),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=lu.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}(gt),Kte=Qte;function Jte(r){r.registerChartView(Xte),r.registerSeriesModel(Kte)}var ere=["itemStyle","borderWidth"],LN=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],Vx=new da,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:LN[+c],categoryDim:LN[1-+c]};return o.diff(s).add(function(v){if(!!o.hasValue(v)){var d=kN(o,v),p=IN(o,v,d,h),g=zN(o,h,p);o.setItemGraphicEl(v,g),i.add(g),VN(g,h,p)}}).update(function(v,d){var p=s.getItemGraphicEl(d);if(!o.hasValue(v)){i.remove(p);return}var g=kN(o,v),y=IN(o,v,g,h),m=FN(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),VN(p,h,y)}).remove(function(v){var d=s.getItemGraphicEl(v);d&&BN(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){BN(i,Me(o).dataIndex,t,o)}):a.removeAll()},e.type="pictorialBar",e}(ht);function IN(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=du(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(J(o)){var f=[$x(s,o[0])-l,$x(s,o[1])-l];f[1]<f[0]&&f.reverse(),c=f[u]}else o!=null?c=$x(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 $x(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;J(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&&(Vx.attr({scaleX:e[0],scaleY:e[1],rotation:t}),Vx.updateTransform(),i/=Vx.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=N0(n),T=S?n:$N((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?$N((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 PN(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 EN(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(Hx(r,function(p){p.__pictorialAnimationIndex=c,p.__pictorialRepeatTimes=u,c<u?Eu(p,null,d(c),t,n):Eu(p,null,{scaleX:0,scaleY:0},t,n,function(){a.remove(p)}),c++});c<u;c++){var h=PN(t);h.__pictorialAnimationIndex=c,h.__pictorialRepeatTimes=u,a.add(h);var v=d(c);Eu(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 ON(r,e,t,n){var a=r.__pictorialBundle,i=r.__pictorialMainPath;i?Eu(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=PN(t),a.add(i),Eu(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 RN(r,e,t){var n=Q({},e.barRectShape),a=r.__pictorialBarRect;a?Eu(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 NN(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)Ze(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],uf[n?"updateProps":"initProps"](a,{shape:u},s,l)}}}function kN(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 Ce,i=new Ce;return a.add(i),a.__pictorialBundle=i,i.x=t.bundlePosition[0],i.y=t.bundlePosition[1],t.symbolRepeat?EN(a,e,t):ON(a,e,t),RN(a,t,n),NN(a,e,t,n),a.__pictorialShapeStr=FN(r,t),a.__pictorialSymbolMeta=t,a}function lre(r,e,t){var n=t.animationModel,a=t.dataIndex,i=r.__pictorialBundle;Ze(i,{x:t.bundlePosition[0],y:t.bundlePosition[1]},n,a),t.symbolRepeat?EN(r,e,t,!0):ON(r,e,t,!0),RN(r,t,!0),NN(r,e,t,!0)}function BN(r,e,t,n){var a=n.__pictorialBarRect;a&&a.removeTextContent();var i=[];Hx(n,function(o){i.push(o)}),n.__pictorialMainPath&&i.push(n.__pictorialMainPath),n.__pictorialClipPath&&(t=null),L(i,function(o){ro(o,{scaleX:0,scaleY:0},t,e,function(){n.parent&&n.parent.remove(n)})}),r.setItemGraphicEl(e,null)}function FN(r,e){return[r.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function Hx(r,e,t){L(r.__pictorialBundle.children(),function(n){n!==r.__pictorialBarRect&&e.call(t,n)})}function Eu(r,e,t,n,a,i){e&&r.attr(e),n.symbolClip&&!a?t&&r.attr(t):t&&uf[a?"updateProps":"initProps"](r,t,n.animationModel,n.dataIndex,i)}function VN(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");Hx(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;_r(d,rr(a),{labelFetcher:e.seriesModel,labelDataIndex:n,defaultText:wu(e.seriesModel.getData(),n),inheritColor:t.style.fill,defaultOpacity:t.style.opacity,defaultOutsidePosition:v}),Lt(r,c,f,i.get("disabled"))}function $N(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=io(Np.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}(Np),fre=cre;function hre(r){r.registerChartView(ure),r.registerSeriesModel(fre),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,Ae(eP,"pictorialBar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,tP("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 gi(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 Ce;P=new gE({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]=$,Ze(P,{shape:{points:b,stackedOnPoints:w}},t),ga(P)}_r(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),mr(P,t),Lt(P,V.get("focus"),V.get("blurScope"),V.get("disabled"))}this._layersSeries=l,this._layers=d},e.type="themeRiver",e}(ht);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,Gx=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 qf(fe(this.getData,this),fe(this.getRawData,this))},e.prototype.fixData=function(t){var n=t.length,a={},i=B0(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",Wt).models[0],i=a.get("type"),o=at(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][Gx]),u.get(s[f][Gx])||(u.set(s[f][Gx],c),c++);var h=mu(s,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:pp(i)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,v=new Rr(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=B0(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){J(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}(gt),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];HN(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];HN(n,t,c)}n.setLayout("layoutInfo",i)})}function HN(r,e,t){if(!!r.count())for(var n=e.coordinateSystem,a=e.getLayerSeries(),i=r.mapDimension("single"),o=r.mapDimension("value"),s=ee(a,function(g){return ee(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(Yf("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=gu(v,o));var d=Su(l.getModel("itemStyle"),f,!0);Q(f,d),L(Gr,function(m){var _=s.ensureState(m),b=l.getModel([m,"itemStyle"]);_.style=b.getItemStyle();var w=Su(b,f);w&&(_.shape=w)}),t?(s.setShape(f),s.shape.r=c.r0,Ze(s,{shape:{r:c.r}},a,n.dataIndex)):(Ze(s,{shape:f},a),ga(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(Zc,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=pt(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)):Ye(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}(Wr),GN=Sre,Wx="sunburstRootToNode",WN="sunburstHighlight",Cre="sunburstUnhighlight";function Tre(r){r.registerAction({type:Wx,update:"updateView"},function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},n);function n(a,i){var o=th(e,[Wx],a);if(o){var s=a.getViewRoot();s&&(e.direction=Wb(s,o.node)?"rollUp":"drillDown"),a.resetViewRoot(o.node)}}}),r.registerAction({type:WN,update:"none"},function(e,t,n){e=Q({},e),t.eachComponent({mainType:"series",subType:"sunburst",query:e},a);function a(i){var o=th(e,[WN],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 gi(_,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 GN(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 GN(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";Hd(u,c)}}a=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:Wx,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}(ht),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};UN(a);var i=this._levelModels=ee(t.levels||[],function(l){return new ft(l,this,n)},this),o=Gb.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=qp(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(){rR(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}(gt);function UN(r){var e=0;L(r.children,function(n){UN(n);var a=n.value;J(a)&&(a=a[0]),e+=a});var t=r.value;J(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),J(r.value)?r.value[0]=t:r.value=t}var Lre=Are,jN=Math.PI/180;function Ire(r,e,t){e.eachSeriesByType(r,function(n){var a=n.get("center"),i=n.get("radius");J(i)||(i=[0,i]),J(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")*jN,d=n.get("minAngle")*jN,p=n.getData().tree.root,g=n.getViewRoot(),y=g.depth,m=n.get("sort");m!=null&&YN(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(),q=b===0&&M?w:U*w;q<d&&(q=d),$=V+A*q;var te=N.depth-y-(x?-1:1),H=f+T*te,Y=f+T*(te+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&&(Y=le(ie,l/2))}N.setLayout({angle:q,startAngle:V,endAngle:$,clockwise:D,cx:u,cy:c,r0:H,r:Y})}if(N.children&&N.children.length){var ne=0;L(N.children,function(ve){ne+=I(ve,V+ne)})}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 YN(r,e){var t=r.children||[];r.children=Pre(t,e),t.length&&L(r.children,function(n){YN(n,e)})}function Pre(r,e){if(ye(e)){var t=ee(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)}),ee(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=Wv(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(Yf,"sunburst")),r.registerVisual(Ere),Tre(r)}var qN={color:"fill",borderColor:"stroke"},Rre={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},wi=qe(),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=wi(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}(gt),kre=Nre;function zre(r,e){return e=e||[0,0],ee(["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 Bre(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(zre,r)}}}function Fre(r,e){return e=e||[0,0],ee([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],ee(["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 ZN(r,e,t,n){return r&&(r.legacy||r.legacy!==!1&&!t&&!n&&e!=="tspan"&&(e==="text"||he(r,"text")))}function XN(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 QN(o,r),L(o.rich,function(l){QN(l,l)}),{textConfig:a,textContent:i}}function QN(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 KN(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";JN(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){JN(s,s)}),n}function JN(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 ek={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},tk=Fe(ek);En(Ra,function(r,e){return r[e]=1,r},{}),Ra.join(", ");var sg=["","style","shape","extra"],Ou=qe();function Ux(r,e,t,n,a){var i=r+"Animation",o=Zl(r,n,a)||{},s=Ou(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 lg(r,e,t,n){n=n||{};var a=n.dataIndex,i=n.isInit,o=n.clearStyle,s=t.isAnimationEnabled(),l=Ou(r),u=e.style;l.userDuring=e.during;var c={},f={};if(Kre(r,e,f),ak("shape",e,f),ak("extra",e,f),!i&&s&&(Qre(r,e,c),nk("shape",r,e,c),nk("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(sg,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=Ux("enter",r,e,t,a);v.duration>0&&r.animateFrom(h,v)}else Yre(r,e,a||0,t,c);rk(r,e),u?r.dirty():r.markRedraw()}function rk(r,e){for(var t=Ou(r).leaveToProps,n=0;n<sg.length;n++){var a=sg[n],i=a?e[a]:e;i&&i.leaveTo&&(t||(t=Ou(r).leaveToProps={}),a&&(t[a]=t[a]||{}),Q(a?t[a]:t,i.leaveTo))}}function ug(r,e,t,n){if(r){var a=r.parent,i=Ou(r).leaveToProps;if(i){var o=Ux("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=Ux("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 ze&&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=Ou(e).userDuring,n=r.userDuring;if(t!==n){r.el=r.userDuring=null;return}Za.el=e,n(Zre)}}function nk(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=ct(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 ak(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]=Nc(n[s])}}function Qre(r,e,t){for(var n=e.transition,a=Ks(n)?Ra:ct(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<tk.length;n++){var a=tk[n],i=ek[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=ct(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 yr(r)?r!==e:r!=null&&isFinite(r)}var ik=qe(),tne=["percent","easing","shape","style","extra"];function ok(r){r.stopAnimation("keyframe"),r.attr(ik(r))}function cg(r,e,t){if(!(!t.isAnimationEnabled()||!e)){if(J(e)){L(e,function(s){cg(r,s,t)});return}var n=e.keyframes,a=e.duration;if(t&&a==null){var i=Zl("enter",t,0);a=i&&i.duration}if(!(!n||!a)){var o=ik(r);L(sg,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=at(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 Si="emphasis",xo="normal",jx="blur",Yx="select",wo=[xo,Si,jx,Yx],qx={normal:["itemStyle"],emphasis:[Si,"itemStyle"],blur:[jx,"itemStyle"],select:[Yx,"itemStyle"]},Zx={normal:["label"],emphasis:[Si,"label"],blur:[jx,"label"],select:[Yx,"label"]},rne=["x","y"],nne="e\0\0",Xn={normal:{},emphasis:{},blur:{},select:{}},ane={cartesian2d:Bre,geo:Vre,single:Hre,polar:Wre,calendar:Ure};function Xx(r){return r instanceof ze}function Qx(r){return r instanceof Bn}function ine(r,e){e.copyTransform(r),Qx(e)&&Qx(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,Xx(e)&&Xx(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=lk(t,s,n,a);o||l.removeAll(),s.diff(o).add(function(f){ew(a,null,f,u(f,i),t,l,s)}).remove(function(f){var h=o.getItemGraphicEl(f);h&&ug(h,wi(h).option,t)}).update(function(f,h){var v=o.getItemGraphicEl(h);ew(a,v,f,u(f,i),t,l,s)}).execute();var c=t.get("clip",!0)?Rp(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=lk(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=ew(null,null,f,l(f,o),n,this.group,s);h&&(h.traverse(c),u.push(h))}},e.prototype.eachRendered=function(t){ao(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}(ht),sne=one;function Kx(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=vk(n);t=of(i,null,a,n.layout||"center"),wi(t).customPathData=i}else if(e==="image")t=new ur({}),wi(t).customImagePath=r.style.image;else if(e==="text")t=new We({});else if(e==="group")t=new Ce;else{if(e==="compoundPath")throw new Error('"compoundPath" is not supported yet.');var o=Id(e);if(!o){var s="";nt(s)}t=new o}return wi(t).customGraphicType=e,t.name=r.name,t.z2EmphasisLift=1,t.z2SelectLift=1,t}function Jx(r,e,t,n,a,i,o){ok(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=Xx(e)?l.decal:null;r&&f&&(f.dirty=!0,c=gu(f,r)),l.__decalPattern=c}if(Qx(e)&&l){var c=l.__decalPattern;c&&(l.decal=c)}lg(e,n,i,{dataIndex:t,isInit:o,clearStyle:!0}),cg(e,n.keyframeAnimation,i)}function sk(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<wo.length;s++)une(n,e,wo[s])}}function une(r,e,t){var n=t===xo,a=n?e:fg(e,t),i=a?a.z2:null,o;i!=null&&(o=n?r:r.ensureState(t),o.z2=i||0)}function lk(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<wo.length;p++){var g=wo[p];v[g]=r.getModel(qx[g]),d[g]=r.getModel(Zx[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(qx[O])):y(E).getModel(qx[O]):v[O]}function _(E,O){return e.hasItemOption?E===u?h[O]||(h[O]=y(E).getModel(Zx[O])):y(E).getModel(Zx[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,xo).getItemStyle();V!=null&&(U.fill=V),$!=null&&(U.opacity=$);var q={inheritColor:ce(V)?V:"#000"},te=_(O,xo),H=pt(te,null,q,!1,!0);H.text=te.getShallow("show")?Pe(r.getFormattedLabel(O,xo),wu(e,O)):null;var Y=Rd(te,q,!1);return D(E,U),U=KN(U,H,Y),E&&T(U,E),U.legacy=!0,U}function S(E,O){O==null&&(O=u);var N=m(O,Si).getItemStyle(),V=_(O,Si),$=pt(V,null,null,!0,!0);$.text=V.getShallow("show")?Ia(r.getFormattedLabel(O,Si),r.getFormattedLabel(O,xo),wu(e,O)):null;var U=Rd(V,null,!0);return D(E,N),N=KN(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(qN,E)){var N=e.getItemVisual(O,"style");return N?N[qN[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 QM(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 ew(r,e,t,n,a,i,o){if(!n){i.remove(e);return}var s=tw(r,e,t,n,a,i);return s&&o.setItemGraphicEl(t,s),s&&Lt(s,n.focus,n.blurScope,n.emphasisDisabled),s}function tw(r,e,t,n,a,i){var o=-1,s=e;e&&uk(e,n,a)&&(o=Ne(i.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=Kx(n),s&&ine(s,u)),n.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),Xn.normal.cfg=Xn.normal.conOpt=Xn.emphasis.cfg=Xn.emphasis.conOpt=Xn.blur.cfg=Xn.blur.conOpt=Xn.select.cfg=Xn.select.conOpt=null,Xn.isLegacy=!1,hne(u,t,n,a,l,Xn),fne(u,t,n,a,l),Jx(r,u,t,n,Xn,a,l),he(n,"info")&&(wi(u).info=n.info);for(var c=0;c<wo.length;c++){var f=wo[c];if(f!==xo){var h=fg(n,f),v=rw(n,h,f);sk(f,u,h,v,Xn)}}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 uk(r,e,t){var n=wi(r),a=e.type,i=e.shape,o=e.style;return t.isUniversalTransitionEnabled()||a!=null&&a!==n.customGraphicType||a==="path"&&yne(i)&&vk(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&&uk(o,i,n)&&(o=null),o||(o=Kx(i),r.setClipPath(o)),Jx(null,o,e,i,null,n,a)}}function hne(r,e,t,n,a,i){if(!r.isGroup){ck(t,null,i),ck(t,Si,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=Kx(o),r.setTextContent(c)),Jx(null,c,e,o,null,n,a);for(var f=o&&o.style,h=0;h<wo.length;h++){var v=wo[h];if(v!==xo){var d=i[v].conOpt;sk(v,c,d,rw(o,d,v),null)}}f?c.dirty():c.markRedraw()}}}}function ck(r,e,t){var n=e?fg(r,e):r,a=e?rw(r,n,Si):r.style,i=r.type,o=n?n.textConfig:null,s=r.textContent,l=s?e?fg(s,e):s:null;if(a&&(t.isLegacy||ZN(a,i,!!o,!!l))){t.isLegacy=!0;var u=XN(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 fg(r,e){return e?r?r[e]:null:r}function rw(r,e,t){var n=e&&e.style;return n==null&&t===Si&&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),tw(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&&ug(e,wi(r).option,t)}function pne(r){new gi(r.oldChildren,r.newChildren,fk,fk,r).add(hk).update(hk).remove(gne).execute()}function fk(r,e){var t=r&&r.name;return t!=null?t:nne+e}function hk(r,e){var t=this.context,n=r!=null?t.newChildren[r]:null,a=e!=null?t.oldChildren[e]:null;tw(t.api,a,t.dataIndex,n,t.seriesModel,t.group)}function gne(r){var e=this.context,t=e.oldChildren[r];t&&ug(t,wi(t).option,e.seriesModel)}function vk(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=qe(),dk=xe,nw=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 Ce,this.createPointerEl(s,u,e,t),this.createLabelEl(s,u,e,t),n.getZr().add(s);else{var h=Ae(pk,t,f);this.updatePointerEl(s,u,h),this.updateLabelEl(s,u,h,t)}mk(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=Mb(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 uf[i.type](dk(t.pointer));e.add(o)}},r.prototype.createLabelEl=function(e,t,n,a){if(t.label){var i=Js(e).labelEl=new We(dk(t.label));e.add(i),yk(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}),yk(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=Kl(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){si(u.event)},onmousedown:nw(this._onHandleDragMove,this,0,0),drift:nw(this._onHandleDragMove,this),ondragend:nw(this._onHandleDragEnd,this)}),n.add(a)),mk(a,t,!1),a.setStyle(i.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=i.get("size");J(l)||(l=[l,l]),a.scaleX=l[0]/2,a.scaleY=l[1]/2,hu(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},r.prototype._moveHandleToValue=function(e,t){pk(this._axisPointerModel,!t&&this._moveAnimation,this._handle,aw(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(aw(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=a,n.stopAnimation(),n.attr(aw(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),wf(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 pk(r,e,t,n){gk(Js(t).lastProp,n)||(Js(t).lastProp=n,e?Ze(t,n,r):(t.stopAnimation(),t.attr(n)))}function gk(r,e){if(_e(r)&&_e(e)){var t=!0;return L(e,function(n,a){t=t&&gk(r[a],n)}),!!t}else return r===e}function yk(r,e){r[e.get(["label","show"])?"show":"hide"]()}function aw(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function mk(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 iw=_ne;function ow(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 _k(r,e,t,n,a){var i=t.get("value"),o=bk(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=Bc(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:pt(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 bk(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:q1(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 sw(r,e,t){var n=_n();return Wi(n,n,t.rotation),la(n,n,t.position),ya([r.dataToCoord(e),(t.labelOffset||0)+(t.labelDirection||1)*(t.labelMargin||0)],n)}function xk(r,e,t,n,a,i){var o=_i.innerTextLayout(t.rotation,0,t.labelDirection);t.labelMargin=a.get(["label","margin"]),_k(e,n,a,i,{position:sw(n.axis,r,t),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function lw(r,e,t){return t=t||0,{x1:r[t],y1:r[1-t],x2:e[t],y2:e[1-t]}}function wk(r,e,t){return t=t||0,{x:r[t],y:r[1-t],width:e[t],height:e[1-t]}}function Sk(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=Ck(l,s).getOtherAxis(s).getGlobalExtent(),f=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var h=ow(i),v=wne[u](s,f,c);v.style=h,t.graphicKey=v.type,t.pointer=v}var d=Sb(l.model,a);xk(n,t,d,a,i,o)},e.prototype.getHandleTransform=function(t,n,a){var i=Sb(n.axis.grid.model,n,{labelInside:!1});i.labelMargin=a.get(["handle","margin"]);var o=sw(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=Ck(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}(iw);function Ck(r,e){var t={};return t[e.dim+"AxisIndex"]=e.index,r.getCartesian(t)}var wne={line:function(r,e,t){var n=lw([e,t[0]],[e,t[1]],Tk(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:wk([e-n/2,t[0]],[n,a],Tk(r))}}};function Tk(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,Ci=qe(),Dne=L;function Dk(r,e,t){if(!je.node){var n=e.getZr();Ci(n).records||(Ci(n).records={}),Mne(n,e);var a=Ci(n).records[r]||(Ci(n).records[r]={});a.handler=t}}function Mne(r,e){if(Ci(r).initialized)return;Ci(r).initialized=!0,t("click",Ae(Mk,"click")),t("mousemove",Ae(Mk,"mousemove")),t("globalout",Lne);function t(n,a){r.on(n,function(i){var o=Ine(e);Dne(Ci(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 Mk(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 uw(r,e){if(!je.node){var t=e.getZr(),n=(Ci(t).records||{})[r];n&&(Ci(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";Dk("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){uw("axisPointer",n)},e.prototype.dispose=function(t,n){uw("axisPointer",n)},e.type="axisPointer",e}(wt),Ene=Pne;function Ak(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||J(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(ee(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 Lk=qe();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){hg(a)&&(a=Ak({seriesIndex:i.seriesIndex,dataIndex:i.dataIndex},e).point);var l=hg(a),u=i.axesInfo,c=s.axesInfo,f=n==="leave"||hg(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&&Ik(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,Pk(b),Pk(y)))),g[y.key]=S}})}),L(g,function(y,m){Ik(c[m],y,p,!0,h)}),zne(v,c,h),Bne(d,a,r,o),Fne(c,o,t),h}}function Ik(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=Zf(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 zne(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 Bne(r,e,t,n){if(hg(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=Lk(n)[a]||{},o=Lk(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 Pk(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 hg(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function vh(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&&!J(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(uO),ke(vh)}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=ow(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);_k(t,a,i,o,g)},e}(iw);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=_n();Wi(h,h,s),la(h,h,[n.cx,n.cy]),u=ya([o,-a],h);var v=e.getModel("axisLabel").get("rotate")||0,d=_i.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:lw(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:Sk(e.cx,e.cy,n[0],n[1],(-t-a/2)*i,(-t+a/2)*i)}:{type:"Sector",shape:Sk(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,cw=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Wt).models[0]},e.type="polarAxis",e}($e);Pt(cw,bu);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}(cw),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}(cw),fw=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}(jn);fw.prototype.dataToRadius=jn.prototype.dataToCoord,fw.prototype.radiusToData=jn.prototype.coordToData;var Xne=fw,Qne=qe(),hw=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=Bc(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}(jn);hw.prototype.dataToAngle=jn.prototype.dataToCoord,hw.prototype.angleToData=jn.prototype.coordToData;var Kne=hw,Ek=["radius","angle"],Jne=function(){function r(e){this.dimensions=Ek,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=Ok(t);return a===this?this.dataToPoint(n):null},r.prototype.convertFromPixel=function(e,t,n){var a=Ok(t);return a===this?this.pointToData(n):null},r}();function Ok(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%"]:J(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(Dp(l,"radius"),function(u){a.scale.unionExtentFromData(l,u)}),L(Dp(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 Rk(r,e){if(r.type=e.get("type"),r.scale=kf(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:Ek,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");Rk(o,l),Rk(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",Wt).models[0];n.coordinateSystem=a.coordinateSystem}}),t}},iae=aae,oae=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function vg(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 dg(r){var e=r.getRadiusAxis();return e.inverse?0:1}function Nk(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=ee(a.getViewLabels(),function(c){c=xe(c);var f=a.scale,h=f.type==="ordinal"?f.getRawOrdinalNumber(c.tickValue):c.tickValue;return c.coord=a.dataToCoord(h),c});Nk(u),Nk(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=dg(t),l=s?0:1,u;i[l]===0?u=new da({shape:{cx:t.cx,cy:t.cy,r:i[s]},style:o.getLineStyle(),z2:1,silent:!0}):u=new rf({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[dg(t)],u=ee(n,function(c){return new tr({shape:vg(t,[l,l+s],c.coord)})});r.add(Cn(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[dg(t)],c=[],f=0;f<a.length;f++)for(var h=0;h<a[f].length;h++)c.push(new tr({shape:vg(t,[u,u+l],a[f][h].coord)}));r.add(Cn(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[dg(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 ft(w.textStyle,l,l.ecModel))}var x=new We({silent:_i.isLabelSilent(e),style:pt(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=_i.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:vg(t,i,n[f].coord)}))}for(var f=0;f<c.length;f++)r.add(Cn(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:vg(t,i,a[u][c].coord)}));r.add(Cn(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 Wr({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(Cn(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 Ce;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 _i(t,v);L(cae,d.add,d),i.add(d.getGroup()),sf(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 da({shape:{cx:t.cx,cy:t.cy,r:Math.max(i[f].coord,0)}}))}for(var f=0;f<c.length;f++)r.add(Cn(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 da({shape:{cx:t.cx,cy:t.cy,r:o[c][f].coord}}));r.add(Cn(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 Wr({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(Cn(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 kk(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(at(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=kk(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=yi(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 q=d.dataToCoord(M,x)-S,te=l.dataToCoord(A);Math.abs(q)<m&&(q=(q<0?-1:1)*m),E=te+h,O=E+v,N=P,V=P+q,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=kk(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(vh),Gs.registerAxisPointerClass("PolarAxisPointer",Une),r.registerCoordinateSystem("polar",iae),r.registerComponentModel(Yne),r.registerComponentView(bae),Tu(r,"angle",qne,mae),Tu(r,"radius",Zne,_ae),r.registerComponentView(uae),r.registerComponentView(pae),r.registerLayout(Ae(gae,"bar"))}function vw(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 Ce;var l=vw(t),u=new _i(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),sf(s,this._axisGroup,t),r.prototype.render.call(this,t,n,a,i)},e.prototype.remove=function(){iO(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});Ql(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(Cn(f[g],{style:me({stroke:s[g%s.length]},b),silent:!0}))}},splitArea:function(r,e,t,n){aO(r,t,n,n)}},Dae=Cae,Bk=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);Pt(Bk,bu.prototype);var dw=Bk,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}(jn),Aae=Mae,Fk=["single"],Lae=function(){function r(e,t,n){this.type="single",this.dimension="single",this.dimensions=Fk,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,kf(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=Ut({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=Vk(t);return a===this?this.dataToPoint(n):null},r.prototype.convertFromPixel=function(e,t,n){var a=Vk(t);return a===this?this.pointToData(n):null},r}();function Vk(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",Wt).models[0];n.coordinateSystem=a&&a.coordinateSystem}}),t}var Pae={create:Iae,dimensions:Fk},Eae=Pae,$k=["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=pw(l,1-pg(s)),c=l.dataToPoint(n)[0],f=i.get("type");if(f&&f!=="none"){var h=ow(i),v=Nae[f](s,c,u);v.style=h,t.graphicKey=v.type,t.pointer=v}var d=vw(a);xk(n,t,d,a,i,o)},e.prototype.getHandleTransform=function(t,n,a){var i=vw(n,{labelInside:!1});i.labelMargin=a.get(["handle","margin"]);var o=sw(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=pg(o),u=pw(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=pw(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}(iw),Nae={line:function(r,e,t){var n=lw([e,t[0]],[e,t[1]],pg(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:wk([e-n/2,t[0]],[n,a],pg(r))}}};function pg(r){return r.isHorizontal()?0:1}function pw(r,e){var t=r.getRect();return[t[$k[e]],t[$k[e]]+t[Oae[e]]]}var kae=Rae,zae=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 Bae(r){ke(vh),Gs.registerAxisPointerClass("SingleAxisPointer",kae),r.registerComponentView(zae),r.registerComponentView(Dae),r.registerComponentModel(dw),Tu(r,"single",dw,dw.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=au(t);r.prototype.init.apply(this,arguments),Hk(t,i)},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),Hk(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 Hk(r,e){var t=r.cellSize,n;J(t)?n=t:n=r.cellSize=[t,t],n.length===1&&(n[1]=n[0]);var a=ee([0,1],function(i){return L7(e,i)&&(n[i]="auto"),n[i]!=null&&n[i]!=="auto"});oo(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 jr({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:pt(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=I_(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(pt(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=I_(c)||n);var v=n.get(["time","dayOfWeekShort"]);c=v||ee(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(pt(s,{text:c[_]}),this._weekTextPositionControl(m,i,u,f,p))});o.add(b)}}},e.type="calendar",e}(wt),Hae=$ae,gw=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=Sn(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=Ut(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){J(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+gw))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=Gk(t);return a===this?a.dataToPoint(n):null},r.prototype.convertFromPixel=function(e,t,n){var a=Gk(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(J(e)&&e.length===1&&(e=e[0]),J(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/gw)-Math.floor(t[0].time/gw)+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 Gk(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 Wk(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?(Ie(a,n,!0),oo(a,n,{ignoreSize:!0}),yA(t,a),gg(t,a),gg(t,a,"shape"),gg(t,a,"style"),gg(t,a,"extra"),t.clipPath=a.clipPath):r[e]=n:i==="replace"?r[e]=n:i==="remove"&&a&&(r[e]=null)}var Uk=["transition","enterFrom","leaveTo"],qae=Uk.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function gg(r,e,t){if(t&&(!r[t]&&e[t]&&(r[t]={}),r=r[t],e=e[t]),!(!r||!e))for(var n=t?Uk: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=[Wk(e,["left","right"]),Wk(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=fD(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=at(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),jk={path:null,compoundPath:null,group:Ce,image:ur,text:We},Qn=qe(),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=Xt(l.id,null),c=u!=null?a.get(u):null,f=Xt(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&&ZN(d,v,!!g,!!p)){var y=XN(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=Yk(u,h,l.type,a):(S&&(Qn(S).isNew=!1),ok(S)),S&&(lg(S,m,t,{isInit:x}),qk(S,l,o,s))}else if(w){yg(c,l,a,t);var T=Yk(u,h,l.type,a);T&&(lg(T,m,t,{isInit:!0}),qk(T,l,o,s))}else _==="remove"&&(rk(c,l),yg(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||Qn(E).type!==I,P=x?yw(I):E}else w&&(x=!0,P=yw(I));D.setClipPath(P),lg(P,A,t,{isInit:x}),cg(P,A.keyframeAnimation,t)}var O=Qn(D);D.setTextConfig(g),O.option=l,Jae(D,t,l),Jl({el:D,componentModel:t,itemName:D.name,itemTooltipOption:l.tooltip}),cg(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=Xt(f.id,null),v=h!=null?o.get(h):null;if(!(!v||!v.isGroup)){var d=v.parent,p=d===i,g=Qn(v),y=Qn(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=Xt(f.id,null),v=h!=null?o.get(h):null;if(!!v){var d=v.parent,y=Qn(d),m=d===i?{width:s,height:l}:{width:y.width,height:y.height},_={},b=Wd(v,f,m,null,{hv:f.hv,boundingMode:f.bounding},_);if(!Qn(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}Ze(v,x,t,0)}else v.attr(_)}}},e.prototype._clear=function(){var t=this,n=this._elMap;n.each(function(a){yg(a,Qn(a).option,n,t._lastGraphicModel)}),this._elMap=ge()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(wt);function yw(r){var e=he(jk,r)?jk[r]:Id(r),t=new e({});return Qn(t).type=r,t}function Yk(r,e,t,n){var a=yw(t);return e.add(a),n.set(r,a),Qn(a).id=r,Qn(a).isNew=!0,a}function yg(r,e,t,n){var a=r&&r.parent;a&&(r.type==="group"&&r.traverse(function(i){yg(i,e,t,n)}),ug(r,e,n),t.removeKey(Qn(r).id))}function qk(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]=Pe(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(gA),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;J(t)?!t[0]||!t[0].elements?e.graphic=[{elements:t}]:e.graphic=[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var Zk=["x","y","radius","angle","single"],tie=["cartesian2d","polar","singleAxis"];function rie(r){var e=r.get("coordinateSystem");return Ne(tie,e)>=0}function So(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 Xk(r){var e=r.ecModel,t={infoList:[],infoMap:ge()};return r.eachTargetAxis(function(n,a){var i=e.getComponent(So(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 mw=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=Qk(t);this.settledOption=i,this.mergeDefaultAndTheme(t,a),this._doInit(i)},e.prototype.mergeOption=function(t){var n=Qk(t);Ie(this.option,t,!0),Ie(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(Zk,function(a){var i=this.getReferringComponents(So(a),l8);if(!!i.specified){n=!0;var o=new mw;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 mw;if(h.add(f.componentIndex),t.set(c,h),i=!1,c==="x"||c==="y"){var v=f.getReferringComponents("grid",Wt).models[0];v&&L(u,function(d){f.componentIndex!==d.componentIndex&&v===d.getReferringComponents("grid",Wt).models[0]&&h.add(d.componentIndex)})}}}i&&L(Zk,function(u){if(!!i){var c=a.findComponents({mainType:So(u),filter:function(h){return h.get("type",!0)==="category"}});if(c[0]){var f=new mw;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(So(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(So(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 Qk(r){var e={};return L(["start","end","startValue","endValue","throttle"],function(t){r.hasOwnProperty(t)&&(e[t]=r[t])}),e}var dh=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}(dh),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),_w=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}(_w),uie=lie,Ru=L,Kk=wn,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=So(this._dimName),a=t.getReferringComponents(n,Wt).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 xe(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;Ru(["start","end"],function(h,v){var d=e[h],p=e[h+"Value"];i[v]==="percent"?(d==null&&(d=o[v]),p=a.parse(it(d,o,t))):(u=!0,p=p==null?t[v]:a.parse(p),d=it(p,t,o)),l[v]=p==null||isNaN(p)?t[v]:p,s[v]=d==null||isNaN(d)?o[v]:d}),Kk(l),Kk(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]=it(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;Ru(a,function(l){var u=l.getData(),c=u.mapDimensionsAll(n);if(!!c.length){if(i==="weakFilter"){var f=u.getStore(),h=ee(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 Ru(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)}});Ru(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;Ru(["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=it(n[0]+o,n,[0,100],!0):i!=null&&(o=it(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=I0(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];Ru(t,function(o){xj(n,o.getData(),e)});var a=r.getAxisModel(),i=uP(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(So(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 Jk=!1;function bw(r){Jk||(Jk=!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),bw(r)}var Kn=function(){function r(){}return r}(),e5={};function Nu(r,e){e5[r]=e}function t5(r){return e5[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=t5(a);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(t)),Ie(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=Ut(n,i,a);Cs(e.get("orient"),r,e.get("itemGap"),o.width,o.height),Wd(r,n,i,a)}function r5(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 gi(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 ft(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=t5(g);if(!w)return;b=new w}c[g]=b}else if(b=c[y],!b)return;b.uid=tu("toolbox-feature"),b.model=_,b.ecModel=n,b.api=a;var x=b instanceof Kn;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"?vi:di)(M[S])},b instanceof Kn&&b.render&&b.render(_,n,a,i)}function v(d,p,g){var y=d.getModel("iconStyle"),m=d.getModel(["emphasis","iconStyle"]),_=p instanceof Kn&&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=Kl(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),Jl({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"?vi:di)(M),o.add(M),M.on("click",fe(p.onclick,p,n,a,D)),S[D]=M})}_ie(o,t,a),o.add(r5(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=Bc(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 Kn&&o.updateView&&o.updateView(o.model,n,a,i)})},e.prototype.remove=function(t,n){L(this._features,function(a){a instanceof Kn&&a.remove&&a.remove(t,n)}),this.group.removeAll()},e.prototype.dispose=function(t,n){L(this._features,function(a){a instanceof Kn&&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=je.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}(Kn),Cie=Sie,n5="__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(!!a5[a]){var s={series:[]},l=function(f){var h=f.subType,v=f.id,d=a5[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,Wt).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=Ie({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}(Kn),a5={line:function(r,e,t,n){if(r==="bar")return Ie({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 Ie({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")===n5;if(r==="line"||r==="bar")return n.setIconStatus("stack",a?"normal":"emphasis"),Ie({id:e,stack:a?"":n5},n.get(["option","stack"])||{},!0)}};ba({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,e){e.mergeOption(r.newOption)});var Mie=Die,mg=new Array(60).join("-"),ku=" ";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(ee(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(ku)],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(ku))}e.push(u.join(`
224
- `))}),e.join(`
225
-
226
- `+mg+`
227
-
228
- `)}function Iie(r){return ee(r,function(e){var t=e.getRawData(),n=[e.name],a=[];return t.each(t.dimensions,function(){for(var i=arguments.length,o=arguments[i-1],s=t.getName(o),l=0;l<i-1;l++)a[l]=arguments[l];n.push((s?s+ku:"")+a.join(ku))}),n.join(`
229
- `)}).join(`
230
-
231
- `+mg+`
232
-
233
- `)}function Pie(r){var e=Aie(r);return{value:at([Lie(e.seriesGroupByCategoryAxis),Iie(e.other)],function(t){return!!t.replace(/[\n\t\s]/g,"")}).join(`
234
-
235
- `+mg+`
236
-
237
- `),meta:e.meta}}function _g(r){return r.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Eie(r){var e=r.slice(0,r.indexOf(`
238
- `));if(e.indexOf(ku)>=0)return!0}var xw=new RegExp("["+ku+"]+","g");function Oie(r){for(var e=r.split(/\n+/g),t=_g(e.shift()).split(xw),n=[],a=ee(t,function(l){return{name:l,data:[]}}),i=0;i<e.length;i++){var o=_g(e[i]).split(xw);n.push(o.shift());for(var s=0;s<o.length;s++)a[s]&&(a[s].data[i]=o[s])}return{series:a,categories:n}}function Rie(r){for(var e=r.split(/\n+/g),t=_g(e.shift()),n=[],a=0;a<e.length;a++){var i=_g(e[a]);if(!!i){var o=i.split(xw),s="",l=void 0,u=!1;isNaN(o[0])?(u=!0,s=o[0],o=o.slice(1),n[a]={name:s,value:[]},l=n[a].value):l=n[a]=[];for(var c=0;c<o.length;c++)l.push(+o[c]);l.length===1&&(u?n[a].value=l[0]:n[a]=l[0])}}return{name:t,data:n}}function Nie(r,e){var t=r.split(new RegExp(`
239
- *`+mg+`
240
- *`,"g")),n={series:[]};return L(t,function(a,i){if(Eie(a)){var o=Oie(a),s=e[i],l=s.axisDim+"Axis";s&&(n[l]=n[l]||[],n[l][s.axisIndex]={data:o.categories},n.series=n.series.concat(o.series))}else{var o=Rie(a);n.series.push(o)}}),n}var kie=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,n){setTimeout(function(){n.dispatchAction({type:"hideTip"})});var a=n.getDom(),i=this.model;this._dom&&a.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;top:0;bottom:0;left:0;right:0;padding:5px",o.style.backgroundColor=i.get("backgroundColor")||"#fff";var s=document.createElement("h4"),l=i.get("lang")||[];s.innerHTML=l[0]||i.get("title"),s.style.cssText="margin:10px 20px",s.style.color=i.get("textColor");var u=document.createElement("div"),c=document.createElement("textarea");u.style.cssText="overflow:auto";var f=i.get("optionToContent"),h=i.get("contentToOption"),v=Pie(t);if(ye(f)){var d=f(n.getOption());ce(d)?u.innerHTML=d:Il(d)&&u.appendChild(d)}else{c.readOnly=i.get("readOnly");var p=c.style;p.cssText="display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none",p.color=i.get("textColor"),p.borderColor=i.get("textareaBorderColor"),p.backgroundColor=i.get("textareaColor"),c.value=v.value,u.appendChild(c)}var g=v.meta,y=document.createElement("div");y.style.cssText="position:absolute;bottom:5px;left:0;right:0";var m="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",_=document.createElement("div"),b=document.createElement("div");m+=";background-color:"+i.get("buttonColor"),m+=";color:"+i.get("buttonTextColor");var w=this;function x(){a.removeChild(o),w._dom=null}jm(_,"click",x),jm(b,"click",function(){if(h==null&&f!=null||h!=null&&f==null){x();return}var S;try{ye(h)?S=h(u,n.getOption()):S=Nie(c.value,g)}catch(T){throw x(),new Error("Data view format error "+T)}S&&n.dispatchAction({type:"changeDataView",newOption:S}),x()}),_.innerHTML=l[1],b.innerHTML=l[2],b.style.cssText=_.style.cssText=m,!i.get("readOnly")&&y.appendChild(b),y.appendChild(_),o.appendChild(s),o.appendChild(u),o.appendChild(y),u.style.height=a.clientHeight-80+"px",a.appendChild(o),this._dom=o},e.prototype.remove=function(t,n){this._dom&&n.getDom().removeChild(this._dom)},e.prototype.dispose=function(t,n){this.remove(t,n)},e.getDefaultOption=function(t){var n={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:t.getLocaleModel().get(["toolbox","dataView","title"]),lang:t.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"};return n},e}(Kn);function zie(r,e){return ee(r,function(t,n){var a=e&&e[n];if(_e(a)&&!J(a)){var i=_e(t)&&!J(t);i||(t={value:t});var o=a.name!=null&&t.name==null;return t=me(t,a),o&&delete t.name,t}else return t})}ba({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(r,e){var t=[];L(r.newOption.series,function(n){var a=e.getSeriesByName(n.name)[0];if(!a)t.push(Q({type:"scatter"},n));else{var i=a.get("data");t.push({name:n.name,data:zie(n.data,i)})}}),e.mergeOption(me({series:t},r.newOption))});var Bie=kie,i5=L,o5=qe();function Fie(r,e){var t=ww(r);i5(e,function(n,a){for(var i=t.length-1;i>=0;i--){var o=t[i];if(o[a])break}if(i<0){var s=r.queryComponents({mainType:"dataZoom",subType:"select",id:a})[0];if(s){var l=s.getPercentRange();t[0][a]={dataZoomId:a,start:l[0],end:l[1]}}}}),t.push(e)}function Vie(r){var e=ww(r),t=e[e.length-1];e.length>1&&e.pop();var n={};return i5(t,function(a,i){for(var o=e.length-1;o>=0;o--)if(a=e[o][i],a){n[i]=a;break}}),n}function $ie(r){o5(r).snapshots=null}function Hie(r){return ww(r).length}function ww(r){var e=o5(r);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var Gie=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,n){$ie(t),n.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(t){var n={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:t.getLocaleModel().get(["toolbox","restore","title"])};return n},e}(Kn);ba({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,e){e.resetOption("recreate")});var Wie=Gie,Uie=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],jie=function(){function r(e,t,n){var a=this;this._targetInfoList=[];var i=s5(t,e);L(Yie,function(o,s){(!n||!n.include||Ne(n.include,s)>=0)&&o(i,a._targetInfoList)})}return r.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,function(n,a,i){if((n.coordRanges||(n.coordRanges=[])).push(a),!n.coordRange){n.coordRange=a;var o=Cw[n.brushType](0,i,a);n.__rangeOffset={offset:f5[n.brushType](o.values,n.range,[1,1]),xyMinMax:o.xyMinMax}}}),e},r.prototype.matchOutputRanges=function(e,t,n){L(e,function(a){var i=this.findTargetInfo(a,t);i&&i!==!0&&L(i.coordSyses,function(o){var s=Cw[a.brushType](1,o,a.range,!0);n(a,s.values,o,t)})},this)},r.prototype.setInputRanges=function(e,t){L(e,function(n){var a=this.findTargetInfo(n,t);if(n.range=n.range||[],a&&a!==!0){n.panelId=a.panelId;var i=Cw[n.brushType](0,a.coordSys,n.coordRange),o=n.__rangeOffset;n.range=o?f5[n.brushType](i.values,o.offset,qie(i.xyMinMax,o.xyMinMax)):i.values}},this)},r.prototype.makePanelOpts=function(e,t){return ee(this._targetInfoList,function(n){var a=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:t?t(n):null,clipPath:cN(a),isTargetByCursor:hN(a,e,n.coordSysModel),getLinearBrushOtherExtent:fN(a)}})},r.prototype.controlSeries=function(e,t,n){var a=this.findTargetInfo(e,n);return a===!0||a&&Ne(a.coordSyses,t.coordinateSystem)>=0},r.prototype.findTargetInfo=function(e,t){for(var n=this._targetInfoList,a=s5(t,e),i=0;i<n.length;i++){var o=n[i],s=e.panelId;if(s){if(o.panelId===s)return o}else for(var l=0;l<l5.length;l++)if(l5[l](a,o))return o}return!0},r}();function Sw(r){return r[0]>r[1]&&r.reverse(),r}function s5(r,e){return Gc(r,e,{includeMainTypes:Uie})}var Yie={grid:function(r,e){var t=r.xAxisModels,n=r.yAxisModels,a=r.gridModels,i=ge(),o={},s={};!t&&!n&&!a||(L(t,function(l){var u=l.axis.grid.model;i.set(u.id,u),o[u.id]=!0}),L(n,function(l){var u=l.axis.grid.model;i.set(u.id,u),s[u.id]=!0}),L(a,function(l){i.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),i.each(function(l){var u=l.coordinateSystem,c=[];L(u.getCartesians(),function(f,h){(Ne(t,f.getAxis("x").model)>=0||Ne(n,f.getAxis("y").model)>=0)&&c.push(f)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:c[0],coordSyses:c,getPanelRect:u5.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(r,e){L(r.geoModels,function(t){var n=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:n,coordSyses:[n],getPanelRect:u5.geo})})}},l5=[function(r,e){var t=r.xAxisModel,n=r.yAxisModel,a=r.gridModel;return!a&&t&&(a=t.axis.grid.model),!a&&n&&(a=n.axis.grid.model),a&&a===e.gridModel},function(r,e){var t=r.geoModel;return t&&t===e.geoModel}],u5={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,e=r.getBoundingRect().clone();return e.applyTransform(no(r)),e}},Cw={lineX:Ae(c5,0),lineY:Ae(c5,1),rect:function(r,e,t,n){var a=r?e.pointToData([t[0][0],t[1][0]],n):e.dataToPoint([t[0][0],t[1][0]],n),i=r?e.pointToData([t[0][1],t[1][1]],n):e.dataToPoint([t[0][1],t[1][1]],n),o=[Sw([a[0],i[0]]),Sw([a[1],i[1]])];return{values:o,xyMinMax:o}},polygon:function(r,e,t,n){var a=[[1/0,-1/0],[1/0,-1/0]],i=ee(t,function(o){var s=r?e.pointToData(o,n):e.dataToPoint(o,n);return a[0][0]=Math.min(a[0][0],s[0]),a[1][0]=Math.min(a[1][0],s[1]),a[0][1]=Math.max(a[0][1],s[0]),a[1][1]=Math.max(a[1][1],s[1]),s});return{values:i,xyMinMax:a}}};function c5(r,e,t,n){var a=t.getAxis(["x","y"][r]),i=Sw(ee([0,1],function(s){return e?a.coordToData(a.toLocalCoord(n[s]),!0):a.toGlobalCoord(a.dataToCoord(n[s]))})),o=[];return o[r]=i,o[1-r]=[NaN,NaN],{values:i,xyMinMax:o}}var f5={lineX:Ae(h5,0),lineY:Ae(h5,1),rect:function(r,e,t){return[[r[0][0]-t[0]*e[0][0],r[0][1]-t[0]*e[0][1]],[r[1][0]-t[1]*e[1][0],r[1][1]-t[1]*e[1][1]]]},polygon:function(r,e,t){return ee(r,function(n,a){return[n[0]-t[0]*e[a][0],n[1]-t[1]*e[a][1]]})}};function h5(r,e,t,n){return[e[0]-n[r]*t[0],e[1]-n[r]*t[1]]}function qie(r,e){var t=v5(r),n=v5(e),a=[t[0]/n[0],t[1]/n[1]];return isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a}function v5(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}var Tw=jie,Dw=L,Zie=n8("toolbox-dataZoom_"),Xie=function(r){j(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,n,a,i){this._brushController||(this._brushController=new Ox(a.getZr()),this._brushController.on("brush",fe(this._onBrush,this)).mount()),Jie(t,n,this,i,a),Kie(t,n)},e.prototype.onclick=function(t,n,a){Qie[a].call(this)},e.prototype.remove=function(t,n){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,n){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var n=t.areas;if(!t.isEnd||!n.length)return;var a={},i=this.ecModel;this._brushController.updateCovers([]);var o=new Tw(Mw(this.model),i,{include:["grid"]});o.matchOutputRanges(n,i,function(u,c,f){if(f.type==="cartesian2d"){var h=u.brushType;h==="rect"?(s("x",f,c[0]),s("y",f,c[1])):s({lineX:"x",lineY:"y"}[h],f,c)}}),Fie(i,a),this._dispatchZoomAction(a);function s(u,c,f){var h=c.getAxis(u),v=h.model,d=l(u,v,i),p=d.findRepresentativeAxisProxy(v).getMinMaxSpan();(p.minValueSpan!=null||p.maxValueSpan!=null)&&(f=Zs(0,f.slice(),h.scale.getExtent(),0,p.minValueSpan,p.maxValueSpan)),d&&(a[d.id]={dataZoomId:d.id,startValue:f[0],endValue:f[1]})}function l(u,c,f){var h;return f.eachComponent({mainType:"dataZoom",subType:"select"},function(v){var d=v.getAxisModel(u,c.componentIndex);d&&(h=v)}),h}},e.prototype._dispatchZoomAction=function(t){var n=[];Dw(t,function(a,i){n.push(xe(a))}),n.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:n})},e.getDefaultOption=function(t){var n={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}};return n},e}(Kn),Qie={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(Vie(this.ecModel))}};function Mw(r){var e={xAxisIndex:r.get("xAxisIndex",!0),yAxisIndex:r.get("yAxisIndex",!0),xAxisId:r.get("xAxisId",!0),yAxisId:r.get("yAxisId",!0)};return e.xAxisIndex==null&&e.xAxisId==null&&(e.xAxisIndex="all"),e.yAxisIndex==null&&e.yAxisId==null&&(e.yAxisIndex="all"),e}function Kie(r,e){r.setIconStatus("back",Hie(e)>1?"emphasis":"normal")}function Jie(r,e,t,n,a){var i=t._isZoomActive;n&&n.type==="takeGlobalCursor"&&(i=n.key==="dataZoomSelect"?n.dataZoomSelectActive:!1),t._isZoomActive=i,r.setIconStatus("zoom",i?"emphasis":"normal");var o=new Tw(Mw(r),e,{include:["grid"]}),s=o.makePanelOpts(a,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});t._brushController.setPanels(s).enableBrush(i&&s.length?{brushType:"auto",brushStyle:r.getModel("brushStyle").getItemStyle()}:!1)}N7("dataZoom",function(r){var e=r.getComponent("toolbox",0),t=["feature","dataZoom"];if(!e||e.get(t)==null)return;var n=e.getModel(t),a=[],i=Mw(n),o=Gc(r,i);Dw(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),Dw(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,c){var f=l.componentIndex,h={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:Zie+u+f};h[c]=f,a.push(h)}return a});var eoe=Xie;function toe(r){r.registerComponentModel(mie),r.registerComponentView(wie),Nu("saveAsImage",Cie),Nu("magicType",Mie),Nu("dataView",Bie),Nu("dataZoom",eoe),Nu("restore",Wie),ke(gie)}var roe=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="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}($e),noe=roe;function d5(r){var e=r.get("confine");return e!=null?!!e:r.get("renderMode")==="richText"}function p5(r){if(!!je.domSupported){for(var e=document.documentElement.style,t=0,n=r.length;t<n;t++)if(r[t]in e)return r[t]}}var g5=p5(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),aoe=p5(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function y5(r,e){if(!r)return e;e=k_(e,!0);var t=r.indexOf(e);return r=t===-1?e:"-"+r.slice(0,t)+"-"+e,r.toLowerCase()}function ioe(r,e){var t=r.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(r);return t?e?t[e]:t:null}var ooe=y5(aoe,"transition"),Aw=y5(g5,"transform"),soe="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(je.transform3dSupported?"will-change:transform;":"");function loe(r){return r=r==="left"?"right":r==="right"?"left":r==="top"?"bottom":"top",r}function uoe(r,e,t){if(!ce(t)||t==="inside")return"";var n=r.get("backgroundColor"),a=r.get("borderWidth");e=ws(e);var i=loe(t),o=Math.max(Math.round(a)*1.5,6),s="",l=Aw+":",u;Ne(["left","right"],i)>-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=i==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=i==="top"?225:45)+"deg)");var c=u*Math.PI/180,f=o+a,h=f*Math.abs(Math.cos(c))+f*Math.abs(Math.sin(c)),v=Math.round(((h-Math.SQRT2*a)/2+Math.SQRT2*a-(h-f)/2)*100)/100;s+=";"+i+":-"+v+"px";var d=e+" solid "+a+"px;",p=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+d,"border-right:"+d,"background-color:"+n+";"];return'<div style="'+p.join("")+'"></div>'}function coe(r,e){var t="cubic-bezier(0.23,1,0.32,1)",n=" "+r/2+"s "+t,a="opacity"+n+",visibility"+n;return e||(n=" "+r+"s "+t,a+=je.transformSupported?","+Aw+n:",left"+n+",top"+n),ooe+":"+a}function m5(r,e,t){var n=r.toFixed(0)+"px",a=e.toFixed(0)+"px";if(!je.transformSupported)return t?"top:"+a+";left:"+n+";":[["top",a],["left",n]];var i=je.transform3dSupported,o="translate"+(i?"3d":"")+"("+n+","+a+(i?",0":"")+")";return t?"top:0;left:0;"+Aw+":"+o+";":[["top",0],["left",0],[g5,o]]}function foe(r){var e=[],t=r.get("fontSize"),n=r.getTextColor();n&&e.push("color:"+n),e.push("font:"+r.getFont()),t&&e.push("line-height:"+Math.round(t*3/2)+"px");var a=r.get("textShadowColor"),i=r.get("textShadowBlur")||0,o=r.get("textShadowOffsetX")||0,s=r.get("textShadowOffsetY")||0;return a&&i&&e.push("text-shadow:"+o+"px "+s+"px "+i+"px "+a),L(["decoration","align"],function(l){var u=r.get(l);u&&e.push("text-"+l+":"+u)}),e.join(";")}function hoe(r,e,t){var n=[],a=r.get("transitionDuration"),i=r.get("backgroundColor"),o=r.get("shadowBlur"),s=r.get("shadowColor"),l=r.get("shadowOffsetX"),u=r.get("shadowOffsetY"),c=r.getModel("textStyle"),f=bL(r,"html"),h=l+"px "+u+"px "+o+"px "+s;return n.push("box-shadow:"+h),e&&a&&n.push(coe(a,t)),i&&n.push("background-color:"+i),L(["width","color","radius"],function(v){var d="border-"+v,p=k_(d),g=r.get(p);g!=null&&n.push(d+":"+g+(v==="color"?"":"px"))}),n.push(foe(c)),f!=null&&n.push("padding:"+xs(f).join("px ")+"px"),n.join(";")+";"}function _5(r,e,t,n,a){var i=e&&e.painter;if(t){var o=i&&i.getViewportRoot();o&&mH(r,o,document.body,n,a)}else{r[0]=n,r[1]=a;var s=i&&i.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/e.getWidth(),r[3]=r[1]/e.getHeight()}var voe=function(){function r(e,t,n){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._firstShow=!0,this._longHide=!0,je.wxa)return null;var a=document.createElement("div");a.domBelongToZr=!0,this.el=a;var i=this._zr=t.getZr(),o=this._appendToBody=n&&n.appendToBody;_5(this._styleCoord,i,o,t.getWidth()/2,t.getHeight()/2),o?document.body.appendChild(a):e.appendChild(a),this._container=e;var s=this;a.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},a.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=i.handler,c=i.painter.getViewportRoot();Nn(c,l,!0),u.dispatch("mousemove",l)}},a.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return r.prototype.update=function(e){var t=this._container,n=ioe(t,"position"),a=t.style;a.position!=="absolute"&&n!=="absolute"&&(a.position="relative");var i=e.get("alwaysShowContent");i&&this._moveIfResized(),this.el.className=e.get("className")||""},r.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,a=n.style,i=this._styleCoord;n.innerHTML?a.cssText=soe+hoe(e,!this._firstShow,this._longHide)+m5(i[0],i[1],!0)+("border-color:"+ws(t)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):a.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(e,t,n,a,i){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if(ce(i)&&n.get("trigger")==="item"&&!d5(n)&&(s=uoe(n,a,i)),ce(e))o.innerHTML=e+s;else if(e){o.innerHTML="",J(e)||(e=[e]);for(var l=0;l<e.length;l++)Il(e[l])&&e[l].parentNode!==o&&o.appendChild(e[l]);if(s&&o.childNodes.length){var u=document.createElement("div");u.innerHTML=s,o.appendChild(u)}}},r.prototype.setEnterable=function(e){this._enterable=e},r.prototype.getSize=function(){var e=this.el;return[e.offsetWidth,e.offsetHeight]},r.prototype.moveTo=function(e,t){var n=this._styleCoord;if(_5(n,this._zr,this._appendToBody,e,t),n[0]!=null&&n[1]!=null){var a=this.el.style,i=m5(n[0],n[1]);L(i,function(o){a[o[0]]=o[1]})}},r.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},r.prototype.hide=function(){var e=this,t=this.el.style;t.visibility="hidden",t.opacity="0",je.transform3dSupported&&(t.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return e._longHide=!0},500)},r.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(fe(this.hide,this),e)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){this.el.parentNode.removeChild(this.el)},r}(),doe=voe,poe=function(){function r(e){this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._zr=e.getZr(),x5(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return r.prototype.update=function(e){var t=e.get("alwaysShowContent");t&&this._moveIfResized()},r.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},r.prototype.setContent=function(e,t,n,a,i){var o=this;_e(e)&&nt(""),this.el&&this._zr.remove(this.el);var s=n.getModel("textStyle");this.el=new We({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:a,textShadowColor:s.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:bL(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),L(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(u){o.el.style[u]=n.get(u)}),L(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(u){o.el.style[u]=s.get(u)||0}),this._zr.add(this.el);var l=this;this.el.on("mouseover",function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0}),this.el.on("mouseout",function(){l._enterable&&l._show&&l.hideLater(l._hideDelay),l._inContent=!1})},r.prototype.setEnterable=function(e){this._enterable=e},r.prototype.getSize=function(){var e=this.el,t=this.el.getBoundingRect(),n=b5(e.style);return[t.width+n.left+n.right,t.height+n.top+n.bottom]},r.prototype.moveTo=function(e,t){var n=this.el;if(n){var a=this._styleCoord;x5(a,this._zr,e,t),e=a[0],t=a[1];var i=n.style,o=Co(i.borderWidth||0),s=b5(i);n.x=e+o+s.left,n.y=t+o+s.top,n.markRedraw()}},r.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},r.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},r.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(fe(this.hide,this),e)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){this._zr.remove(this.el)},r}();function Co(r){return Math.max(0,r)}function b5(r){var e=Co(r.shadowBlur||0),t=Co(r.shadowOffsetX||0),n=Co(r.shadowOffsetY||0);return{left:Co(e-t),right:Co(e+t),top:Co(e-n),bottom:Co(e+n)}}function x5(r,e,t,n){r[0]=t,r[1]=n,r[2]=r[0]/e.getWidth(),r[3]=r[1]/e.getHeight()}var goe=poe,yoe=new Ge({shape:{x:-1,y:-1,width:2,height:2}}),moe=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){if(!(je.node||!n.getDom())){var a=t.getComponent("tooltip"),i=this._renderMode=c8(a.get("renderMode"));this._tooltipContent=i==="richText"?new goe(n):new doe(n.getDom(),n,{appendToBody:a.get("appendToBody",!0)})}},e.prototype.render=function(t,n,a){if(!(je.node||!a.getDom())){this.group.removeAll(),this._tooltipModel=t,this._ecModel=n,this._api=a,this._alwaysShowContent=t.get("alwaysShowContent");var i=this._tooltipContent;i.update(t),i.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&t.get("transitionDuration")?hu(this,"_updatePosition",50,"fixRate"):wf(this,"_updatePosition")}},e.prototype._initGlobalListener=function(){var t=this._tooltipModel,n=t.get("triggerOn");Dk("itemTooltip",this._api,fe(function(a,i,o){n!=="none"&&(n.indexOf(a)>=0?this._tryShow(i,o):a==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var t=this._tooltipModel,n=this._ecModel,a=this._api,i=t.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&i!=="none"&&i!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!a.isDisposed()&&o.manuallyShowTip(t,n,a,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(t,n,a,i){if(!(i.from===this.uid||je.node||!a.getDom())){var o=w5(i,a);this._ticket="";var s=i.dataByCoordSys,l=woe(i,n,a);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:i.position,positionDefault:"bottom"},o)}else if(i.tooltip&&i.x!=null&&i.y!=null){var c=yoe;c.x=i.x,c.y=i.y,c.update(),Me(c).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:c},o)}else if(s)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:s,tooltipOption:i.tooltipOption},o);else if(i.seriesIndex!=null){if(this._manuallyAxisShowTip(t,n,a,i))return;var f=Ak(i,n),h=f.point[0],v=f.point[1];h!=null&&v!=null&&this._tryShow({offsetX:h,offsetY:v,target:f.el,position:i.position,positionDefault:"bottom"},o)}else i.x!=null&&i.y!=null&&(a.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:a.getZr().findHover(i.x,i.y).target},o))}},e.prototype.manuallyHideTip=function(t,n,a,i){var o=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(w5(i,a))},e.prototype._manuallyAxisShowTip=function(t,n,a,i){var o=i.seriesIndex,s=i.dataIndex,l=n.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=n.getSeriesByIndex(o);if(!!u){var c=u.getData(),f=ph([c.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(f.get("trigger")==="axis")return a.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:i.position}),!0}}},e.prototype._tryShow=function(t,n){var a=t.target,i=this._tooltipModel;if(!!i){this._lastX=t.offsetX,this._lastY=t.offsetY;var o=t.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,t);else if(a){this._lastDataByCoordSys=null;var s,l;As(a,function(u){if(Me(u).dataIndex!=null)return s=u,!0;if(Me(u).tooltipConfig!=null)return l=u,!0},!0),s?this._showSeriesItemTooltip(t,s,n):l?this._showComponentItemTooltip(t,l,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},e.prototype._showOrMove=function(t,n){var a=t.get("showDelay");n=fe(n,this),clearTimeout(this._showTimout),a>0?this._showTimout=setTimeout(n,a):n()},e.prototype._showAxisTooltip=function(t,n){var a=this._ecModel,i=this._tooltipModel,o=[n.offsetX,n.offsetY],s=ph([n.tooltipOption],i),l=this._renderMode,u=[],c=nr("section",{blocks:[],noHeader:!0}),f=[],h=new o1;L(t,function(m){L(m.dataByAxis,function(_){var b=a.getComponent(_.axisDim+"Axis",_.axisIndex),w=_.value;if(!(!b||w==null)){var x=bk(w,b.axis,a,_.seriesDataIndices,_.valueLabelOpt),S=nr("section",{header:x,noHeader:!On(x),sortBlocks:!0,blocks:[]});c.blocks.push(S),L(_.seriesDataIndices,function(T){var D=a.getSeriesByIndex(T.seriesIndex),M=T.dataIndexInside,A=D.getDataParams(M);if(!(A.dataIndex<0)){A.axisDim=_.axisDim,A.axisIndex=_.axisIndex,A.axisType=_.axisType,A.axisId=_.axisId,A.axisValue=q1(b.axis,{value:w}),A.axisValueLabel=x,A.marker=h.makeTooltipMarker("item",ws(A.color),l);var I=eL(D.formatTooltip(M,!0,null)),P=I.frag;if(P){var E=ph([D],i).get("valueFormatter");S.blocks.push(E?Q({valueFormatter:E},P):P)}I.text&&f.push(I.text),u.push(A)}})}})}),c.blocks.reverse(),f.reverse();var v=n.position,d=s.get("order"),p=yL(c,h,l,d,a.get("useUTC"),s.get("textStyle"));p&&f.unshift(p);var g=l==="richText"?`
241
-
242
- `:"<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=ph([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 o1;y.marker=m.makeTooltipMarker("item",ws(y.color),v);var _=eL(u.formatTooltip(c,!1,f)),b=p.get("order"),w=p.get("valueFormatter"),x=_.frag,S=x?yL(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=ph(u,this._tooltipModel,f?{position:f}:null),v=h.get("content"),d=Math.random()+"",p=new o1;this._showOrMove(h,function(){var g=xe(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=J(a)?a[0]:a,m=y&&y.axisType&&y.axisType.indexOf("time")>=0;v=h,m&&(v=vf(y.axisValue,v,g)),v=F_(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"||J(n))return{color:i||(this._renderMode==="html"?"#fff":"none")};if(!J(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()})),J(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=Ut(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-=S5(h)?f[0]/2:h==="right"?f[0]:0),v&&(i-=S5(v)?f[1]/2:v==="bottom"?f[1]:0),d5(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){je.node||!n.getDom()||(wf(this,"_updatePosition"),this._tooltipContent.dispose(),uw("itemTooltip",n))},e.type="tooltip",e}(wt);function ph(r,e,t){var n=e.ecModel,a;t?(a=new ft(t,n,n),a=new ft(e.option,a,n)):a=e;for(var i=r.length-1;i>=0;i--){var o=r[i];o&&(o instanceof ft&&(o=o.get("tooltip",!0)),ce(o)&&(o={formatter:o}),o&&(a=new ft(o,a,n)))}return a}function w5(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 S5(r){return r==="center"||r==="middle"}function woe(r,e,t){var n=z0(r).queryOptionMap,a=n.keys()[0];if(!(!a||a==="series")){var i=Wc(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(vh),r.registerComponentModel(noe),r.registerComponentView(Soe),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Et),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Et)}var Toe=["rect","polygon","keep","clear"];function Doe(r,e){var t=ct(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;J(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 C5=L;function T5(r){if(r){for(var e in r)if(r.hasOwnProperty(e))return!0}}function Lw(r,e,t){var n={};return C5(e,function(i){var o=n[i]=a();C5(r[i],function(s,l){if(!!xr.isValidType(l)){var u={type:l,visual:s};t&&t(u,i),o[l]=new xr(u),l==="opacity"&&(u=xe(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new xr(u))}})}),n;function a(){var i=function(){};i.prototype.__hidden=i.prototype;var o=new i;return o}}function D5(r,e,t){var n;L(t,function(a){e.hasOwnProperty(a)&&T5(e[a])&&(n=!0)}),n&&L(t,function(a){e.hasOwnProperty(a)&&T5(e[a])?r[a]=xe(e[a]):delete r[a]})}function Aoe(r,e,t,n,a,i){var o={};L(r,function(f){var h=xr.prepareVisualTypes(e[f]);o[f]=h});var s;function l(f){return f1(t,s,f)}function u(f,h){HL(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=xr.prepareVisualTypes(e[i]);a[i]=o}),{progress:function(o,s){var l;n!=null&&(l=s.getDimensionIndex(n));function u(w){return f1(s,f,w)}function c(w,x){HL(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 M5[e].point(n,t,r)},rect:function(n){return M5[e].rect(n,t,r)}};return t}var M5={lineX:A5(0),lineY:A5(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)||Oe.create(r).contain(l[0],l[1])||lf(a,i,a+o,i,n)||lf(a,i,a,i+s,n)||lf(a+o,i,a+o,i+s,n)||lf(a,i+s,a+o,i+s,n))return!0}}};function A5(r){var e=["x","y"],t=["width","height"];return{point:function(n,a,i){if(n){var o=i.range,s=n[r];return gh(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(),gh(s[0],o)||gh(s[1],o)||gh(o[0],s)||gh(o[1],s)}}}}function gh(r,e){return e[0]<=r&&r<=e[1]}var L5=["inBrush","outOfBrush"],Iw="__ecBrushSelect",Pw="__ecInBrushSelectEvent";function I5(r){r.eachComponent({mainType:"brush"},function(e){var t=e.brushTargetManager=new Tw(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})}),I5(r),r.eachComponent({mainType:"brush"},function(o,s){var l={brushId:o.id,brushIndex:s,brushName:o.name,areas:xe(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=ee(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=Lw(o.option,L5,function(w){w.mappingMethod="fixed"});J(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){P5(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 P5(w,T,D,A)?(S.dataIndex.push(D.getRawIndex(A)),"inBrush"):"outOfBrush"};(y(x)?d:m(T))&&Aoe(L5,g,D,M)})}),Eoe(e,a,i,n,t)}function Eoe(r,e,t,n,a){if(!!a){var i=r.getZr();if(!i[Pw]){i[Iw]||(i[Iw]=Ooe);var o=hu(i,Iw,t,e);o(r,n)}}}function Ooe(r,e){if(!r.isDisposed()){var t=r.getZr();t[Pw]=!0,r.dispatchAction({type:"brushSelect",batch:e}),t[Pw]=!1}}function P5(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"&&(J(t)?Ne(t,e)<0:e!==t)}var Noe={rect:function(r){return E5(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&&E5(e)}};function E5(r){return new Oe(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 Ox(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){I5(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:xe(a),$from:n}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:n,areas:xe(a),$from:n})},e.type="brush",e}(wt),zoe=koe,Boe="#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&&D5(a,t,["inBrush","outOfBrush"]);var i=a.inBrush=a.inBrush||{};a.outOfBrush=a.outOfBrush||{color:Boe},i.hasOwnProperty("liftZ")||(i.liftZ=5)},e.prototype.setAreas=function(t){!t||(this.areas=ee(t,function(n){return O5(this.option,n)},this))},e.prototype.setBrushOption=function(t){this.brushOption=O5(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 O5(r,e){return Ie({brushType:r.brushType,brushMode:r.brushMode,transformable:r.transformable,brushStyle:new ft(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}(Kn),Goe=Hoe;function Woe(r){r.registerComponentView(zoe),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"},Et),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Et),Nu("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=Pe(t.get("textBaseline"),t.get("textVerticalAlign")),c=new We({style:pt(o,{text:t.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),f=c.getBoundingRect(),h=t.get("subtext"),v=new We({style:pt(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(){Hd(d,"_"+t.get("target"))}),p&&v.on("click",function(){Hd(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 _=Ut(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=Xt(Hl(u),""),h;_e(u)?(h=xe(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 Rr([{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),R5=qoe,N5=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=io(R5.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}(R5);Pt(N5,e1.prototype);var Zoe=N5,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}(jn),Joe=Koe,Ew=Math.PI,k5=qe(),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:Ew/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*Ew/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=_n(),l=o.x,u=o.y+o.height;la(s,s,[-l,-u]),Wi(s,s,-Ew/2),la(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 Ce;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(),to(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:pt(v,{text:c.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});y.ensureState("emphasis").style=pt(d),y.ensureState("progress").style=pt(p),n.add(y),to(y),k5(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=ha(Pe(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(_),to(_)}}},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),B5(f,u._progressLine,s,a,i,!0)},onUpdate:function(f){B5(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=wn(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 ya(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",k5(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 G1({ordinalMeta:r.getCategories(),extent:[1/0,-1/0]});case"time":return new oP({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new vo}}function rse(r,e){return Ut(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},r.get("padding"))}function nse(r,e,t,n){var a=n.style,i=Kl(r.get(["controlStyle",e]),n||{},new Oe(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=Ie({rectHover:!0,z2:100},n,!0);var u=Df(r.get("symbolSize"));n.scaleX=u[0]/2,n.scaleY=u[1]/2;var c=du(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 B5(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;J(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),F5(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)&&!J(a)&&(!el(a,"value")&&el(a,"name")&&(a.value=a.name),F5(a))})}function F5(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 Ow(r,e){if(!r)return!1;for(var t=J(r)?r:[r],n=0;n<t.length;n++)if(t[n]&&t[n][e])return!0;return!1}function bg(r){rs(r,"label",["show"])}var xg=qe(),V5=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(je.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=xg(s)[o];if(!l||!l.data){xg(s)[o]=null;return}u?u._mergeOption(l,n,!0):(i&&bg(l),L(l.data,function(c){c instanceof Array?(bg(c[0]),bg(c[1])):bg(c)}),u=this.createMarkerModelFromSeries(l,this,n),Q(u,{mainType:this.mainType,seriesIndex:s.seriesIndex,name:s.name,createdBySelf:!0}),u.__hostSeries=s),xg(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 xg(t)[n]},e.type="marker",e.dependencies=["series","grid","polar","geo"],e}($e);Pt(V5,e1.prototype);var To=V5,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}(To),cse=use;function Rw(r){return!(isNaN(parseFloat(r.x))&&isNaN(parseFloat(r.y)))}function fse(r){return!isNaN(parseFloat(r.x))&&!isNaN(parseFloat(r.y))}function wg(r,e,t,n,a,i){var o=[],s=yi(e,n),l=s?e.getCalculationInfo("stackResultDimension"):n,u=kw(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=va(e.get(n,c));return h=Math.min(h,20),h>=0&&(o[i]=+o[i].toFixed(h)),[o,f]}var Nw={min:Ae(wg,"min"),max:Ae(wg,"max"),average:Ae(wg,"average"),median:Ae(wg,"median")};function yh(r,e){if(!!e){var t=r.getData(),n=r.coordinateSystem,a=n.dimensions;if(!fse(e)&&!J(e.coord)&&n){var i=$5(e,t,n,r);if(e=xe(e),e.type&&Nw[e.type]&&i.baseAxis&&i.valueAxis){var o=Ne(a,i.baseAxis.dim),s=Ne(a,i.valueAxis.dim),l=Nw[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++)Nw[u[c]]&&(u[c]=kw(t,t.mapDimension(a[c]),u[c]));return e}}function $5(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 mh(r,e){return r&&r.containData&&e.coord&&!Rw(e)?r.containData(e.coord):!0}function vse(r,e,t){return r&&r.containZone&&e.coord&&t.coord&&!Rw(e)&&!Rw(t)?r.containZone(e.coord,t.coord):!0}function H5(r,e){return r?function(t,n,a,i){var o=i<2?t.coord&&t.coord[i]:t.value;return lo(o,e[i])}:function(t,n,a,i){return lo(t.value,e[i])}}function kw(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 zw=qe(),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){zw(s).keep=!1}),n.eachSeries(function(s){var l=To.getMarkerModelFromSeries(s,i.type);l&&i.renderSeries(s,l,n,a)}),o.each(function(s){!zw(s).keep&&i.group.remove(s.group)})},e.prototype.markKeep=function(t){zw(t).keep=!0},e.prototype.toggleBlurSeries=function(t,n){var a=this;L(t,function(i){var o=To.getMarkerModelFromSeries(i,a.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(n?iM(l):s_(l))})}})},e.type="marker",e}(wt),Bw=dse;function G5(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=To.getMarkerModelFromSeries(i,"markPoint");o&&(G5(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 Uf),f=gse(o,t,n);n.setData(f),G5(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=Tf(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}(Bw);function gse(r,e,t){var n;r?n=ee(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 Rr(n,t),i=ee(t.get("data"),Ae(yh,e));r&&(i=at(i,Ae(mh,r)));var o=H5(!!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){Ow(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}(To),bse=_se,Sg=qe(),xse=function(r,e,t,n){var a=r.getData(),i;if(J(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=$5(n,a,e,r);s=u.valueAxis;var c=F1(a,u.valueDataDim);l=kw(a,c,o)}var f=s.dim==="x"?0:1,h=1-f,v=xe(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&&Ye(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=[yh(r,i[0]),yh(r,i[1]),Q({},i[2])];return g[2].type=g[2].type||null,Ie(g[2],g[0]),Ie(g[2],g[1]),g};function Cg(r){return!isNaN(r)&&!isFinite(r)}function W5(r,e,t,n){var a=1-r,i=n.dimensions[r];return Cg(e[a])&&Cg(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&&(W5(1,t,n,r)||W5(0,t,n,r)))return!0}return mh(r,e[0])&&mh(r,e[1])}function Fw(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;Cg(r.get(c[0],e))?s[0]=v.toGlobalCoord(v.getExtent()[t?0:1]):Cg(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=To.getMarkerModelFromSeries(i,"markLine");if(o){var s=o.getData(),l=Sg(o).from,u=Sg(o).to;l.each(function(c){Fw(l,c,!0,i,a),Fw(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 hx);this.group.add(c.group);var f=Cse(o,t,n),h=f.from,v=f.to,d=f.line;Sg(n).from=h,Sg(n).to=v,n.setData(d);var p=n.get("symbol"),g=n.get("symbolSize"),y=n.get("symbolRotate"),m=n.get("symbolOffset");J(p)||(p=[p,p]),J(g)||(g=[g,g]),J(y)||(y=[y,y]),J(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);Fw(b,w,x,t,i);var T=S.getModel("itemStyle").getItemStyle();T.fill==null&&(T.fill=Tf(l,"color")),b.setItemVisual(w,{symbolKeepAspect:S.get("symbolKeepAspect"),symbolOffset:Pe(S.get("symbolOffset",!0),m[x?0:1]),symbolRotate:Pe(S.get("symbolRotate",!0),y[x?0:1]),symbolSize:Pe(S.get("symbolSize"),g[x?0:1]),symbol:Pe(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}(Bw);function Cse(r,e,t){var n;r?n=ee(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 Rr(n,t),i=new Rr(n,t),o=new Rr([],t),s=ee(t.get("data"),Ae(xse,e,r,t));r&&(s=at(s,Ae(wse,r)));var l=H5(!!r,n);return a.initData(ee(s,function(u){return u[0]}),null,l),i.initData(ee(s,function(u){return u[1]}),null,l),o.initData(ee(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){Ow(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}(To),Ase=Mse,Tg=qe(),Lse=function(r,e,t,n){var a=n[0],i=n[1];if(!(!a||!i)){var o=yh(r,a),s=yh(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=Mv([{},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 Dg(r){return!isNaN(r)&&!isFinite(r)}function U5(r,e,t,n){var a=1-r;return Dg(e[a])&&Dg(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&&(U5(1,t,n)||U5(0,t,n))?!0:vse(r,a,i):mh(r,a)||mh(r,i)}function j5(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);Dg(p)?s[0]=m.toGlobalCoord(m.getExtent()[t[0]==="x0"?0:1]):Dg(g)&&(s[1]=_.toGlobalCoord(_.getExtent()[t[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var Y5=[["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=To.getMarkerModelFromSeries(i,"markArea");if(o){var s=o.getData();s.each(function(l){var u=ee(Y5,function(f){return j5(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 Ce});this.group.add(c.group),this.markKeep(c);var f=Ese(o,t,n);n.setData(f),f.each(function(h){var v=ee(Y5,function(T){return j5(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))];wn(m),wn(_);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=Tf(l,"color");x.fill||(x.fill=S,ce(x.fill)&&(x.fill=Ec(x.fill,.4))),x.stroke||(x.stroke=S),f.setItemVisual(h,"style",x)}),f.diff(Tg(c).data).add(function(h){var v=f.getItemLayout(h);if(!v.allClipped){var d=new Ur({shape:{points:v.points}});f.setItemGraphicEl(h,d),c.group.add(d)}}).update(function(h,v){var d=Tg(c).data.getItemGraphicEl(v),p=f.getItemLayout(h);p.allClipped?d&&c.group.remove(d):(d?Ze(d,{shape:{points:p.points}},n,h):d=new Ur({shape:{points:p.points}}),f.setItemGraphicEl(h,d),c.group.add(d))}).remove(function(h){var v=Tg(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")),_r(h,rr(d),{labelFetcher:n,labelDataIndex:v,defaultText:f.getName(v)||"",inheritColor:ce(p.fill)?Ec(p.fill,1):"#000"}),mr(h,d),Lt(h,null,null,d.get(["emphasis","disabled"])),Me(h).dataModel=n}),Tg(c).data=f,c.group.silent=n.get("silent")||t.get("silent")},e.type="markArea",e}(Bw);function Ese(r,e,t){var n,a,i=["x0","y0","x1","y1"];if(r){var o=ee(r&&r.dimensions,function(u){var c=e.getData(),f=c.getDimensionInfo(c.mapDimension(u))||{};return Q(Q({},f),{name:u,ordinalMeta:null})});a=ee(i,function(u,c){return{name:u,type:o[c%2].type}}),n=new Rr(a,t)}else a=[{name:"value",type:"float"}],n=new Rr(a,t);var s=ee(t.get("data"),Ae(Lse,e,r,t));r&&(s=at(s,Ae(Ise,r)));var l=r?function(u,c,f,h){var v=u.coord[Math.floor(h/2)][h%2];return lo(v,a[h])}:function(u,c,f,h){return lo(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){Ow(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"]),J(n)&&L(n,function(i,o){ce(i)&&(i={type:i}),n[o]=Ie(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&&k0(l)&&n.push(l.name)}),this._availableNames=a;var i=this.get("data")||n,o=ge(),s=ee(i,function(l){return(ce(l)||Ye(l))&&(l={name:l}),o.get(l.name)?null:(o.set(l.name,!0),new ft(l,this,this.ecModel))},this);this._data=at(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),Vw=kse,zu=Ae,$w=L,Mg=Ce,zse=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 Mg),this.group.add(this._selectorGroup=new Mg),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=Ut(c,f,h),d=this.layoutInner(t,o,v,i,l,u),p=Ut(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=r5(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)}),$w(n.getData(),function(v,d){var p=v.get("name");if(!this.newlineDisabled&&(p===""||p===`
243
- `)){var g=new Mg;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",zu(q5,p,null,i,h)).on("mouseover",zu(Hw,y.name,null,i,h)).on("mouseout",zu(Gw,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=$r(M.fill);I&&I[3]===0&&(I[3]=.2,M=Q(Q({},M),{fill:ca(I,"rgba")}));var P=this._createItem(S,p,d,v,n,t,{},M,A,f,i);P.on("click",zu(q5,null,p,i,h)).on("mouseover",zu(Hw,null,p,i,h)).on("mouseout",zu(Gw,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();$w(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"]);_r(f,{normal:h,emphasis:v},{defaultText:u.title}),to(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=Bse(c,i,l,u,v,g,h),w=new Mg,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:pt(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")&&Jl({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),to(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 Bse(r,e,t,n,a,i,o){function s(g,y){g.lineWidth==="auto"&&(g.lineWidth=y.lineWidth>0?2:0),$w(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:gu(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 q5(r,e,t,n){Gw(r,e,t,n),t.dispatchAction({type:"legendToggleSelect",name:r!=null?r:e}),Hw(r,e,t,n)}function Z5(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 Hw(r,e,t,n){Z5(t)||t.dispatchAction({type:"highlight",seriesName:r,name:e,excludeSeriesId:n})}function Gw(r,e,t,n){Z5(t)||t.dispatchAction({type:"downplay",seriesName:r,name:e,excludeSeriesId:n})}var X5=zse;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 _h(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===`
244
- `||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(_h,"toggleSelected")),r.registerAction("legendAllSelect","legendselectall",Ae(_h,"allSelect")),r.registerAction("legendInverseSelect","legendinverseselect",Ae(_h,"inverseSelect")),r.registerAction("legendSelect","legendselected",Ae(_h,"select")),r.registerAction("legendUnSelect","legendunselected",Ae(_h,"unSelect"))}function Q5(r){r.registerComponentModel(Vw),r.registerComponentView(X5),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=au(t);r.prototype.init.call(this,t,n,a),K5(this,t,i)},e.prototype.mergeOption=function(t,n){r.prototype.mergeOption.call(this,t,n),K5(this,this.option,t)},e.type="legend.scroll",e.defaultOption=io(Vw.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}(Vw);function K5(r,e,t){var n=r.getOrient(),a=[1,1];a[n.index]=0,oo(e,t,{type:"box",ignoreSize:!!a})}var Gse=Hse,J5=Ce,Ww=["width","height"],Uw=["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 J5),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new J5)},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=J(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=Kl(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=Ww[u],f=Uw[u],h=Ww[1-u],v=Uw[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=xe(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],_=Pe(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&&Ze(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=Ww[o],l=Uw[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}(X5),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(Q5),r.registerComponentModel(Gse),r.registerComponentView(Use),jse(r)}function qse(r){ke(Q5),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=io(dh.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(dh),Xse=Zse,jw=qe();function Qse(r,e,t){jw(r).coordSysRecordMap.each(function(n){var a=n.dataZoomInfoMap.get(e.uid);a&&(a.getRange=t)})}function Kse(r,e){for(var t=jw(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||ez(t,o))}}}function ez(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 Qf(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=jw(t),a=n.coordSysRecordMap||(n.coordSysRecordMap=ge());a.each(function(i){i.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(i){var o=Xk(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){ez(a,i);return}var c=rle(l);o.enable(c.controlType,c.opt),o.setPointerChecker(i.containsPoint),hu(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(Yw.pan,this),zoom:fe(Yw.zoom,this),scrollMove:fe(Yw.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}(_w),Yw={zoom:function(r,e,t,n){var a=this.range,i=a.slice(),o=r.axisModels[0];if(!!o){var s=qw[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:tz(function(r,e,t,n,a,i){var o=qw[n]([i.oldX,i.oldY],[i.newX,i.newY],e,a,t);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:tz(function(r,e,t,n,a,i){var o=qw[n]([0,0],[i.scrollDelta,i.scrollDelta],e,a,t);return o.signal*(r[1]-r[0])*i.scrollDelta})};function tz(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 qw={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 rz(r){bw(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=io(dh.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}(dh),sle=ole,bh=Ge,nz=7,lle=1,Zw=30,ule=7,xh="horizontal",az="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),hu(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(){wf(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 Ce;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===xh?{right:s.width-o.x-o.width,top:s.height-Zw-nz-i,width:o.width,height:Zw}:{right:nz,top:o.y,width:Zw,height:o.height},u=au(t.option);L(["right","top","width","height"],function(f){u[f]==="ph"&&(u[f]=l[f])});var c=Ut(u,s);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===az&&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===xh&&!o?{scaleY:l?1:-1,scaleX:1}:a===xh&&o?{scaleY:l?1:-1,scaleX:-1}:a===az&&!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 bh({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new bh({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:it(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 Ce,I=new Ur({shape:{points:u},segmentIgnoreThreshold:1,style:M.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),P=new jr({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(So(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 bh({silent:f,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(h),o.add(new bh({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");!np[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:iz(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(),to(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:pt(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:iz(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=[it(t[0],[0,100],n,!0),it(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?it(s.minSpan,l,o,!0):null,s.maxSpan!=null?it(s.maxSpan,l,o,!0):null);var u=this._range,c=this._range=wn([it(i[0],o,l,!0),it(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=wn(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=wn(this._handleEnds.slice());v.call(this,0),v.call(this,1);function v(d){var p=no(a.handles[d].parent,this.group),g=Ed(d===0?"right":"left",p),y=this._handleWidth/2+cle,m=ya([h[d]+(d===0?-y:y),this._size[1]/2],p);i[d].setStyle({x:m[0],y:m[1],verticalAlign:o===xh?"middle":g,align:o===xh?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,si(i.event);var o=this._displayables.sliderGroup.getLocalTransform(),s=ya([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 Ee(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=wn([it(a.x,o,s,!0),it(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&&(si(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 bh({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=Xk(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}(_w);function dle(r){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[r]}function iz(r){return r==="vertical"?"ns-resize":"ew-resize"}var ple=vle;function oz(r){r.registerComponentModel(sle),r.registerComponentView(ple),bw(r)}function gle(r){ke(rz),ke(oz)}var yle={get:function(r,e,t){var n=xe((mle[r]||{})[e]);return t&&J(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]}},sz=yle,lz=xr.mapVisual,_le=xr.eachVisual,ble=J,uz=L,xle=wn,wle=it,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&&D5(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=Lw(this.option.controller,n,t),this.targetVisuals=Lw(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=ct(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||["<",">"],J(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={});Ie(i,a),Ie(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]={},uz(d,function(g,y){if(!!xr.isValidType(y)){var m=sz.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";uz(this.stateList,function(y){var m=this.itemSize,_=f[y];_||(_=f[y]={color:s?d:[d]}),_.symbol==null&&(_.symbol=h&&xe(h)||(s?g:[g])),_.symbolSize==null&&(_.symbolSize=v&&xe(v)||(s?m[0]:[m[0],m[0]])),_.symbol=lz(_.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=lz(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),Ag=Sle,cz=[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]=cz[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=cz[1])},e.prototype._resetRange=function(){var t=this.getExtent(),n=this.option.range;!n||n.auto?(t.auto=1,this.option.range=t):J(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=wn((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=fz(this,"outOfRange",this.getExtent()),a=fz(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=io(Ag.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}(Ag);function fz(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=xr.prepareVisualTypes(f);return L(h,function(v){var d=f[v];a.convertOpacityToAlpha&&v==="opacity"&&(v="colorAlpha",d=f.__alphaForOpacity),xr.dependsOn(v,n)&&d&&d.applyVisual(t,u,c)}),s[n]},e.prototype.positionGroup=function(t){var n=this.visualMapModel,a=this.api;Wd(t,n.getBoxLayoutParams(),{width:a.getWidth(),height:a.getHeight()})},e.prototype.doRender=function(t,n,a,i){},e.type="visualMap",e}(wt),hz=Dle,vz=[["left","right","width"],["top","bottom","height"]];function dz(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=vz[o],l=[0,null,10],u={},c=0;c<3;c++)u[vz[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=Ut(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 Lg(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=it,Mle=L,pz=Math.min,Xw=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:pt(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=dz(n,this.api,i),u=a.mainGroup=this._createBarGroup(l),c=new Ce;u.add(c),c.add(a.outOfRange=gz()),c.add(a.inRange=gz(null,s?mz(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=Xw(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=ha(t.get("handleSize"),i[0]),f=kt(t.get("handleIcon"),-c/2,-c/2,c,c,null,!0),h=mz(this._orient);f.attr({cursor:h,draggable:!0,drift:l,ondragend:u,onmousemove:function(y){si(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){si(y.event)},ondragend:u,style:pt(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=ha(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:pt(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():yz(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 ql(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 Ce(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=ya(a.handleLabelPoints[c],no(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=ya(c.indicatorLabelPoint,no(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]=pz(Xw(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=pz(Xw(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||yz(a))&&(v=this._hoverLinkDataIndices=a.findTargetDataIndices(f));var d=o8(h,v);this._dispatchHighDown("downplay",Lg(d[0],a)),this._dispatchHighDown("highlight",Lg(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",Lg(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=no(n,i?null:this.group);return J(t)?ya(t,o,a):Ed(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}(hz);function gz(r,e,t,n){return new Ur({shape:{points:r},draggable:!!t,cursor:e,drift:t,onmousemove:function(a){si(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 yz(r){var e=r.get("hoverLinkOnHandle");return!!(e==null?r.get("realtime"):e)}function mz(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=xr.prepareVisualTypes(a),o={color:Tf(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 _z=L;function zle(r){var e=r&&r.visualMap;J(e)||(e=e?[e]:[]),_z(e,function(t){if(!!t){Bu(t,"splitList")&&!Bu(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var n=t.pieces;n&&J(n)&&_z(n,function(a){_e(a)&&(Bu(a,"start")&&!Bu(a,"min")&&(a.min=a.start),Bu(a,"end")&&!Bu(a,"max")&&(a.max=a.end))})}})}function Bu(r,e){return r&&r.hasOwnProperty&&r.hasOwnProperty(e)}var bz=!1;function xz(r){bz||(bz=!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(zle))}function wz(r){r.registerComponentModel(Tle),r.registerComponentView(Ele),xz(r)}var Ble=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=xe(i)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=ee(this._pieceList,function(l){return l=xe(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var t=this.option,n={},a=xr.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]=sz.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=xe(t)},e.prototype.getValueState=function(t){var n=xr.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=xr.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=io(Ag.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}(Ag),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]}),R0(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),Sz(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=xr.retrieveVisuals(t),r.push(a)},this),Sz(e,r),R0(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 Sz(r,e){var t=r.inverse;(r.orient==="vertical"?!t:t)&&e.reverse()}var Vle=Ble,$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 Ce;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:Lg(s.findTargetDataIndices(n),s)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,n=t.option;if(n.orient==="vertical")return dz(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 Ce,l=this.visualMapModel.textStyleModel;s.add(new We({style:pt(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=ee(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=xe(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}(hz),Hle=$le;function Cz(r){r.registerComponentModel(Vle),r.registerComponentView(Hle),xz(r)}function Gle(r){ke(wz),ke(Cz)}var Wle={label:{enabled:!0},decal:{show:!1}},Tz=qe(),Ule={};function jle(r,e){var t=r.getModel("aria");if(!t.get("enabled"))return;var n=xe(Wle);Ie(n.label,r.getLocaleModel().get("aria"),!1),Ie(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)),Tz(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=U_(h.ecModel,h.name,Ule,r.getSeriesCount()),_=v.getVisual("decal");v.setVisual("decal",b(_,m))}else{var d=h.getRawData(),p={},g=Tz(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=U_(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($),q=P.getValues($),te=c.get(["data",U?"withName":"withoutName"]);V.push(o(te,{name:U,value:q.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 Dz={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},Zle=function(){function r(e){var t=this._condVal=ce(e)?new RegExp(e):jT(e)?e:null;if(t==null){var n="";nt(n)}}return r.prototype.evaluate=function(e){var t=typeof e;return ce(t)?this._condVal.test(e):Ye(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 Qw(r,e){if(r===!0||r===!1){var t=new Xle;return t.value=r,t}var n="";return Az(r)||nt(n),r.and?Mz("and",r,e):r.or?Mz("or",r,e):r.not?tue(r,e):rue(r,e)}function Mz(r,e,t){var n=e[r],a="";J(n)||nt(a),n.length||nt(a);var i=r==="and"?new Qle:new Kle;return i.children=ee(n,function(o){return Qw(o,t)}),i.children.length||nt(a),i}function tue(r,e){var t=r.not,n="";Az(t)||nt(n);var a=new Jle;return a.child=Qw(t,e),a.child||nt(n),a}function rue(r,e){for(var t="",n=e.prepareGetValue(r),a=[],i=Fe(r),o=r.parser,s=o?rL(o):null,l=0;l<i.length;l++){var u=i[l];if(!(u==="parser"||e.valueGetterAttrMap.get(u))){var c=he(Dz,u)?Dz[u]:u,f=r[u],h=s?s(f):f,v=_9(c,h)||c==="reg"&&new Zle(h);v||nt(t),a.push(v)}}a.length||nt(t);var d=new eue;return d.valueGetterParam=n,d.valueParser=s,d.getValue=e.getValue,d.subCondList=a,d}function Az(r){return _e(r)&&!yr(r)}var nue=function(){function r(e,t){this._cond=Qw(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")||nt(l);var c=e.getDimensionInfo(u);return c||nt(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=ct(t);a.length||nt(n);var i=[];L(a,function(c){var f=c.dimension,h=c.order,v=c.parser,d=c.incomparable;if(f==null&&nt(n),h!=="asc"&&h!=="desc"&&nt(n),d&&d!=="min"&&d!=="max"){var p="";nt(p)}if(h!=="asc"&&h!=="desc"){var g="";nt(g)}var y=e.getDimensionInfo(f);y||nt(n);var m=v?rL(v):null;v&&!m&&nt(n),i.push({dimIdx:y.index,parser:m,comparator:new aL(h,d)})});var o=e.sourceFormat;o!==Pr&&o!==Gn&&nt(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 cL(this),fL(this)},e.prototype.mergeOption=function(t,n){r.prototype.mergeOption.call(this,t,n),fL(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 Fu(r,e){return Math.abs(r-e)<1e-5}function Kw(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){Fu(P,O)&&Fu(E,N)||a.push(P,E,O,N,O,N)}function f(P,E,O,N,V,$){var U=Math.abs(E-P),q=Math.tan(U/4)*4/3,te=E<P?-1:1,H=Math.cos(P),Y=Math.sin(P),X=Math.cos(E),Z=Math.sin(E),ie=H*V+O,se=Y*$+N,ne=X*V+O,ve=Z*$+N,R=V*q*te,F=$*q*te;a.push(ie-R*Y,se+F*H,ne+R*Z,ve-F*X,ne,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 Jw(r,e,t,n,a,i,o,s,l,u){if(Fu(r,t)&&Fu(e,n)&&Fu(a,o)&&Fu(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=[];Yi(r,t,a,o,.5,D),Yi(e,n,i,s,.5,M),Jw(D[0],M[0],D[1],M[1],D[2],M[2],D[3],M[3],l,u),Jw(D[4],M[4],D[5],M[5],D[6],M[6],D[7],M[7],l,u)}function fue(r,e){var t=Kw(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++];Jw(s,l,c,f,h,v,d,p,o,e),s=d,l=p}n.push(o)}return n}function Lz(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 Iz(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=Lz([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=Lz([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 Pz(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=Pz(c,f,l,u);if(Math.abs(h)<1e-6)return null;var v=r-a,d=e-i,p=Pz(v,d,c,f)/h;return p<0||p>1?null:new Ee(p*l+r,p*u+e)}function due(r,e,t){var n=new Ee;Ee.sub(n,t,e),n.normalize();var a=new Ee;Ee.sub(a,r,e);var i=a.dot(n);return i}function Vu(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++)Vu(d,r[i].slice());Vu(d,v),Vu(d,h);for(var i=c.idx+1;i<=u.idx+n;i++)Vu(p,r[i%n].slice());return Vu(p,h),Vu(p,v),[{points:d},{points:p}]}function Ez(r){var e=r.points,t=[],n=[];hd(e,t,n);var a=new Oe(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 Ee,c=new Ee;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 Ig(r,e,t,n){if(t===1)n.push(e);else{var a=Math.floor(t/2),i=r(e);Ig(r,i[0],a,n),Ig(r,i[1],t-a,n)}return n}function gue(r,e){for(var t=[],n=0;n<e;n++)t.push(p_(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":Iz(n,e,t),a=Wr;break;case"circle":Iz({r0:0,r:n.r,startAngle:0,endAngle:Math.PI*2,cx:n.cx,cy:n.cy},e,t),a=Wr;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=ee(fue(r.getUpdatedPathProxy(),o),function(y){return mue(y)}),l=s.length;if(l===0)Ig(Ez,{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=ee(s,function(y){var m=[],_=[];hd(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||(Ig(Ez,{points:v.poly},d,t),h-=d)}}a=Ur;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;Yi(d,g,m,b,T,a),Yi(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 Oz(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=Oz(a||l,l),c=l):(c=Oz(n||u,u),f=u),i.push(c),o.push(f)}return[i,o]}function Rz(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=Rz(s),c=Rz(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 Pg(r){return r.__isCombineMorphing}var Nz="__mOriginal_";function Eg(r,e,t){var n=Nz+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 wh(r,e){var t=Nz+e;r[t]&&(r[e]=r[t],r[t]=null)}function kz(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 zz(r,e){var t=r.getUpdatedPathProxy(),n=e.getUpdatedPathProxy(),a=xue(Kw(t),Kw(n)),i=a[0],o=a[1],s=r.getComputedTransform(),l=e.getComputedTransform();function u(){this.transform=null}s&&kz(i,s),l&&kz(o,l),Eg(e,"updateTransform",{replace:u}),e.transform=null;var c=Cue(i,o,10,Math.PI),f=[];Eg(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);xc(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++],q=f[D++],te=f[D++];N===I&&V===P&&$===q&&U===te?h.lineTo(q,te):h.bezierCurveTo(I,P,$,U,q,te),N=q,V=te}}}})}function eS(r,e,t){if(!r||!e)return e;var n=t.done,a=t.during;zz(r,e),e.__morphT=0;function i(){wh(e,"buildPath"),wh(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 Og(r){var e=1/0,t=1/0,n=-1/0,a=-1/0,i=ee(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=ee(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 Bz(r){return _ue(r.path,r.count)}function tS(){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];Pg(S)?a(S.childrenRef()):S instanceof ze&&n.push(S)}}a(r);var i=n.length;if(!i)return tS();var o=t.dividePath||Bz,s=o({path:e,count:i});if(s.length!==i)return console.error("Invalid morphing: unmatched splitted path"),tS();n=Og(n),s=Og(s);for(var l=t.done,u=t.during,c=t.individualDelay,f=new ui,h=0;h<i;h++){var v=n[h],d=s[h];d.parent=e,d.copyTransform(f),c||zz(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)}Eg(e,"addSelfToZr",{after:function(w){p(w)}}),Eg(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,wh(e,"addSelfToZr"),wh(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;eS(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++)wh(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||Bz;function o(v){for(var d=0;d<v.length;d++){var p=v[d];Pg(p)?o(p.childrenRef()):p instanceof ze&&a.push(p)}}if(Pg(r)){o(r.childrenRef());var s=a.length;if(s<n)for(var l=0,u=s;u<n;u++)a.push(p_(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"),tS()}a=Og(a),e=Og(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;eS(a[u],e[u],h)}return{fromIndividuals:a,toIndividuals:e,count:e.length}}function Fz(r){return J(r[0])}function Vz(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=p_(r.path);a.setStyle("opacity",t),e.push(a)}return e},split:null};function rS(r,e,t,n,a,i){if(!r.length||!e.length)return;var o=Zl("update",n,a);if(!(o&&o.duration>0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,c;Fz(r)&&(u=r,c=e),Fz(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(Pg(T))f({many:[T],one:D},!0,_,b,!0);else{var M=s?me({delay:s(_,b)},l):l;eS(T,D,M),i(T,D,T,D,M)}}else for(var A=me({dividePath:Aue[t],individualDelay:s&&function(V,$,U,q){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?Vz(c,u):Vz(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(J(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 ze&&!a.disableMorphing&&!a.invisible&&!a.ignore&&n.push(a)}),n}var $z=1e4,Lue=qe();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 Hz(r){var e=[];return L(r,function(t){var n=t.data;if(!(n.count()>$z))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 nS(r,e,t){r.traverse(function(n){n instanceof ze&&xt(n,{style:{opacity:0}},e,{dataIndex:t,isFrom:!0})})}function aS(r){if(r.parent){var e=r.getComputedTransform();r.setLocalTransform(e),r.parent.remove(r)}}function $u(r){r.stopAnimation(),r.isGroup&&r.traverse(function(e){e.stopAnimation()})}function Pue(r,e,t){var n=Zl("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 Gz(r,e,t){var n=Hz(r),a=Hz(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&&($u(S),x?($u(x),aS(x),u=!0,rS(tl(x),tl(S),b.divide,w,y,i)):nS(S,w,y))}new gi(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=at(ee(m,function(T){return n[T].data.getItemGraphicEl(n[T].dataIndex)}),function(T){return T&&T!==x&&!h[T.id]});x&&($u(x),S.length?(L(S,function(T){$u(T),aS(T)}),u=!0,rS(tl(S),tl(x),_.divide,w,y,i)):nS(x,w,_.dataIndex))}).updateOneToMany(function(y,m){var _=n[m],b=_.data.getItemGraphicEl(_.dataIndex);if(!(b&&h[b.id])){var w=at(ee(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 $u(S)}),b?($u(b),aS(b),u=!0,rS(tl(b),tl(w),_.divide,x,y[0],i)):L(w,function(S){return nS(S,x,y[0])}))}}).updateManyToMany(function(y,m){new gi(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=Zl("update",_,0);b&&_.isAnimationEnabled()&&w&&w.duration>0&&b.group.traverse(function(x){x instanceof ze&&!x.animators.length&&x.animateFrom({style:{opacity:0}},w)})})}function Wz(r){var e=r.getModel("universalTransition").get("seriesKey");return e||r.id}function Uz(r){return J(r)?r.sort().join(","):r}function Do(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=Wz(i),c=Uz(u);n.set(c,{dataGroupId:s,data:l}),J(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=Wz(i),u=Uz(l),c=n.get(u);if(c)t.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:Do(c.data),data:c.data}],newSeries:[{dataGroupId:o,divide:Do(s),data:s}]});else if(J(l)){var f=[];L(l,function(d){var p=n.get(d);p.data&&f.push({dataGroupId:p.dataGroupId,divide:Do(p.data),data:p.data})}),f.length&&t.set(u,{oldSeries:f,newSeries:[{dataGroupId:o,data:s,divide:Do(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:Do(h.data)}],newSeries:[]},t.set(h.key,v)),v.newSeries.push({dataGroupId:o,data:s,divide:Do(s)})}}}}),t}function jz(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(ct(r.from),function(o){var s=jz(e.oldSeries,o);s>=0&&a.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:Do(e.oldData[s]),dim:o.dimension})}),L(ct(r.to),function(o){var s=jz(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();i.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:Do(l),dim:o.dimension})}}),a.length>0&&i.length>0&&Gz(a,i,n)}function Nue(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,n){L(ct(n.seriesTransition),function(a){L(ct(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][Xd]=!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(ct(i),function(v){Rue(v,a,n,t)});else{var o=Oue(a,n);L(o.keys(),function(v){var d=o.get(v);Gz(d.oldSeries,d.newSeries,t)})}L(n.updatedSeries,function(v){v[Xd]&&(v[Xd]=!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()<$z&&(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(UO),ke(Bae),ke(vN),ke(Uae),ke(eie),ke(toe),ke(Coe),ke(vh),ke(Woe),ke(Yoe),ke(lse),ke(mse),ke(Dse),ke(Rse),ke(qse),ke(gle),ke(rz),ke(oz),ke(Gle),ke(wz),ke(Cz),ke(qle),ke(sue),ke(cue),ke(Nue),ke(fY);var kue=Object.freeze(Object.defineProperty({__proto__:null,registerLocale:L_,version:q6,dependencies:Z6,PRIORITY:hI,init:hU,connect:vU,disConnect:MI,disconnect:dU,dispose:pU,getInstanceByDom:I1,getInstanceById:gU,registerTheme:P1,registerPreprocessor:E1,registerProcessor:O1,registerPostInit:AI,registerPostUpdate:LI,registerUpdateLifecycle:dp,registerAction:ba,registerCoordinateSystem:II,getCoordinateSystemDimensions:yU,registerLayout:PI,registerVisual:fo,registerLoading:N1,setCanvasCreator:mU,registerMap:OI,getMap:_U,registerTransform:RI,dataTool:bU,throttle:Jd,use:ke,setPlatformAPI:VT,parseGeoJSON:K1,parseGeoJson:K1,env:je,Model:ft,Axis:jn,innerDrawElementOnCanvas:p1,zrender:HG,matrix:LH,vector:vH,zrUtil:oH,color:nG,helper:Mj,number:Oj,time:Rj,graphic:Nj,format:kj,util:zj,List:Rr,ComponentModel:$e,ComponentView:wt,SeriesModel:gt,ChartView:ht,extendComponentModel:qj,extendComponentView:Zj,extendSeriesModel:Xj,extendChartView:Qj},Symbol.toStringTag,{value:"Module"})),rl={},Hu={},Yz={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var e=1,t=function(){return"".concat(e++)};r.default=t})(Yz);var Rg={},Ng={},iS={};(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})(iS);var Ti={};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.SensorTabIndex=Ti.SensorClassName=Ti.SizeSensorId=void 0;var zue="size-sensor-id";Ti.SizeSensorId=zue;var Bue="size-sensor-object";Ti.SensorClassName=Bue;var Fue="-1";Ti.SensorTabIndex=Fue,Object.defineProperty(Ng,"__esModule",{value:!0}),Ng.createSensor=void 0;var Vue=$ue(iS),qz=Ti;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",qz.SensorClassName),c.setAttribute("tabindex",qz.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}};Ng.createSensor=Hue;var kg={};Object.defineProperty(kg,"__esModule",{value:!0}),kg.createSensor=void 0;var Gue=Wue(iS);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}};kg.createSensor=Uue,Object.defineProperty(Rg,"__esModule",{value:!0}),Rg.createSensor=void 0;var jue=Ng,Yue=kg,que=typeof ResizeObserver!="undefined"?Yue.createSensor:jue.createSensor;Rg.createSensor=que,Object.defineProperty(Hu,"__esModule",{value:!0}),Hu.removeSensor=Hu.getSensor=void 0;var Zue=Que(Yz),Xue=Rg,zg=Ti;function Que(r){return r&&r.__esModule?r:{default:r}}var Sh={},Kue=function(e){var t=e.getAttribute(zg.SizeSensorId);if(t&&Sh[t])return Sh[t];var n=(0,Zue.default)();e.setAttribute(zg.SizeSensorId,n);var a=(0,Xue.createSensor)(e);return Sh[n]=a,a};Hu.getSensor=Kue;var Jue=function(e){var t=e.element.getAttribute(zg.SizeSensorId);e.element.removeAttribute(zg.SizeSensorId),e.destroy(),t&&Sh[t]&&delete Sh[t]};Hu.removeSensor=Jue,Object.defineProperty(rl,"__esModule",{value:!0}),rl.ver=Xz=rl.clear=Zz=rl.bind=void 0;var oS=Hu,ece=function(e,t){var n=(0,oS.getSensor)(e);return n.bind(t),function(){n.unbind(t)}},Zz=rl.bind=ece,tce=function(e){var t=(0,oS.getSensor)(e);(0,oS.removeSensor)(t)},Xz=rl.clear=tce,rce="1.0.1";rl.ver=rce;function Qz(r,e){var t={};return e.forEach(function(n){t[n]=r[n]}),t}function sS(r){return typeof r=="function"}function nce(r){return typeof r=="string"}var Gu=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){BT(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(!(sS(n)&&!n(t,this.props))){if(!Gu(t.theme,this.props.theme)||!Gu(t.opts,this.props.opts)||!Gu(t.onEvents,this.props.onEvents)){this.dispose(),this.renderNewEcharts();return}var a=["option","notMerge","lazyUpdate","showLoading","loadingOption"];Gu(Qz(this.props,a),Qz(t,a))||this.updateEChartsOption(),(!Gu(t.style,this.props.style)||!Gu(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{Xz(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||{}),sS(i)&&i(o),this.ele&&Zz(this.ele,function(){t.resize()})},e.prototype.bindEvents=function(t,n){function a(o,s){nce(o)&&sS(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=Am({height:300},a);return C("div",{ref:function(l){t.ele=l},style:s,className:"echarts-for-react "+o})},e}(z.PureComponent),ut=function(r){BT(e,r);function e(t){var n=r.call(this,t)||this;return n.echarts=kue,n}return e}(ace);const Bg=(r,e)=>{r==="external"?window.open(e,"_blank"):window.location.replace(e)},Kz=(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);Bg(n.routeType,a);break}case n.dynamic==="uuid":{const a=n.route.replace("{{metric.uuid}}",t);Bg(n.routeType,a);break}case n.dynamic==="none":{Bg(n.routeType,n.route);break}default:console.warn("Unhandled click behaviour configuration");break}},Yt=(r,e)=>{if(r.isEnable){const t=r.route.replace("{{value}}",`${e}`.replace(/"/g,""));Bg(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 B(Se,{children:[!l&&C(ut,{style:{width:"100%",height:"90%"},option:h,onEvents:{click:d=>{var p;Yt(f,((p=d==null?void 0:d.name)==null?void 0:p.split(" ").join("_"))||"undefined")}}}),l&&s&&C(ut,{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 B(Se,{children:[!n&&C(ut,{style:{width:"100%",height:"90%"},option:f,onEvents:{click:d=>{var p;Yt(c,((p=d==null?void 0:d.name)==null?void 0:p.split(" ").join("_"))||"undefined")}}}),n&&t&&C(ut,{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 B(Se,{children:[!s&&C(ut,{style:{width:"100%",height:"90%"},option:v,onEvents:{click:p=>{var g;Yt(c,((g=p==null?void 0:p.name)==null?void 0:g.split(" ").join("_"))||"undefined")}}}),s&&o&&C(ut,{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 B(Se,{children:[!l&&C(ut,{style:{width:"100%",height:"90%"},option:f}),l&&s&&C(ut,{style:{width:"100%",height:"90%"},option:f,onEvents:{click:d=>{Yt(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 B(Se,{children:[s&&C(Se,{children:C(ut,{style:{width:"100%",height:"100%"},option:g,onEvents:{click:y=>{o(y.name)}}})}),!s&&C(Se,{children:C(ut,{style:{width:"100%",height:"100%"},option:g,onEvents:{click:y=>{var m;Yt(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(Se,{children:B(Se,{children:[s&&C(Se,{children:C(ut,{style:{width:"100%",height:"100%"},option:c,onEvents:{click:d=>{o(d.name)}}})}),!s&&C(Se,{children:C(ut,{style:{width:"100%",height:"100%"},option:c,onEvents:{click:d=>{var p;Yt(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 B(Se,{children:[!s&&C(ut,{style:{width:"100%",height:"90%"},option:f,onEvents:{click:v=>{var d;Yt(c,((d=v==null?void 0:v.name)==null?void 0:d.split(" ").join("_"))||"undefined")}}}),s&&o&&C(ut,{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 B(Se,{children:[!l&&C(ut,{style:{width:"100%",height:"90%"},option:h,onEvents:{click:d=>{var p;Yt(f,((p=d==null?void 0:d.name)==null?void 0:p.split(" ").join("_"))||"undefined")}}}),l&&s&&C(ut,{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 B(Se,{children:[!s&&C(ut,{style:{width:"100%",height:"90%"},option:f,onEvents:{click:d=>{var p;Yt(c,((p=d==null?void 0:d.name)==null?void 0:p.split(" ").join("_"))||"undefined")}}}),s&&o&&C(ut,{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(Se,{children:C(ut,{style:{width:"100%",height:"90%"},option:o,onEvents:{click:s=>{var l;Yt(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 B(Se,{children:[!l&&C(ut,{style:{width:"100%",height:"90%"},option:v,onEvents:{click:p=>{var g;Yt(c,((g=p==null?void 0:p.name)==null?void 0:g.split(" ").join("_"))||"undefined")}}}),l&&s&&C(ut,{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 B(Se,{children:[!s&&C(ut,{style:{width:"100%",height:"90%"},option:g}),s&&o&&C(ut,{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 B(Se,{children:[!s&&C(ut,{style:{width:"100%",height:"90%"},option:c,onEvents:{click:v=>{var d;Yt(l,((d=v==null?void 0:v.name)==null?void 0:d.split(" ").join("_"))||"undefined")}}}),s&&o&&C(ut,{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 B(Se,{children:[!l&&C(ut,{style:{width:"100%",height:"90%"},option:d,onEvents:{click:g=>{var y;Yt(f,((y=g==null?void 0:g.name)==null?void 0:y.split(" ").join("_"))||"undefined")}}}),l&&s&&C(ut,{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 B(Se,{children:[!l&&C(ut,{style:{width:"100%",height:"90%"},option:h,onEvents:{click:p=>{var g;Yt(f,((g=p==null?void 0:p.name)==null?void 0:g.split(" ").join("_"))||"undefined")}}}),l&&s&&C(ut,{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(ut,{style:{width:"100%",height:"113%"},option:u,onEvents:{click:c=>{var f;Yt(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(Se,{children:C(ut,{style:{width:"100%",height:"100%"},option:l,onEvents:{click:h=>{var v;Yt(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 B(Se,{children:[!l&&C(ut,{style:{width:"100%",height:"90%"},option:h,onEvents:{click:p=>{var g;Yt(f,((g=p==null?void 0:p.name)==null?void 0:g.split(" ").join("_"))||"undefined")}}}),l&&s&&C(ut,{style:{width:"100%",height:"90%"},option:h,onEvents:{click:p=>{s(p.name)}}})]})};var Jz={container:"_container_qiww4_1",borderLessContainer:"_borderLessContainer_qiww4_7",label:"_label_qiww4_13",sync:"_sync_qiww4_19"};const eB=({data:r,customSettings:e,chartClickConfig:t,hideBorder:n})=>{var h,v,d,p;const a={fontSize:`${e.subHeaderFontSize}px`||"14px"},i={fontSize:`${e.fontSize}px`||"30px"},o=t.isEnable?"hover:cursor-pointer":"hover:cursor-text",s=new Intl.NumberFormat,l=(g,y)=>{let m="";if(y)switch(parseInt(g,10).toString().length){case 1:case 2:case 3:m=g;break;case 4:m=`${g.toString().slice(0,1)}.${g.toString().slice(1,3)}k`;break;case 5:m=`${g.toString().slice(0,2)}.${g.toString().slice(2,4)}k`;break;case 6:m=`${g.toString().slice(0,3)}.${g.toString().slice(3,5)}k`;break;case 7:m=`${g.toString().slice(0,1)}.${g.toString().slice(1,3)}M`;break;case 8:m=`${g.toString().slice(0,2)}.${g.toString().slice(2,4)}M`;break;case 9:m=`${g.toString().slice(0,3)}.${g.toString().slice(3,5)}M`;break;case 10:m=`${g.toString().slice(0,1)}.${g.toString().slice(1,3)}B`;break}else switch(parseInt(g,10).toString().length){case 1:case 2:case 3:m=g;break;case 4:m=`${g.toString().slice(0,1)}k`;break;case 5:m=`${g.toString().slice(0,2)}k`;break;case 6:m=`${g.toString().slice(0,3)}k`;break;case 7:m=`${g.toString().slice(0,1)}M`;break;case 8:m=`${g.toString().slice(0,2)}M`;break;case 9:m=`${g.toString().slice(0,3)}M`;break;case 10:m=`${g.toString().slice(0,1)}B`;break}return m},u=(g,y)=>{switch(y){case"original":return g;case"3s":case"adaptive":return l(g,!0);case"d":return parseInt(g,10).toLocaleString();case"1s":{let m=g.toString().slice(0,1);const _=Math.floor(parseFloat(g));for(let w=1;w<_.toString().length;w+=1)m+=0;return l(m,!1)}case"1f":{const m=parseFloat(g).toFixed(1),_=s.format(m);return g.toString().includes(".")?_:`${_}.${Array(2).join("0")}`}case"2f":{const m=parseFloat(g).toFixed(2),_=s.format(m);return g.toString().includes(".")?g.toString().split(".")[1].length>1?_:`${_}${Array(2).join("0")}`:`${_}.${Array(3).join("0")}`}case"3f":{const m=parseFloat(g).toFixed(3),_=s.format(m);if(g.toString().includes(".")){const b=g.toString().split(".");return b[1].length>2?_:b[1].length===2?`${_}${Array(2).join("0")}`:`${_}${Array(3).join("0")}`}return`${_}.${Array(4).join("0")}`}case"+":return`+${s.format(g)}`;case"$":{const m=parseFloat(g).toFixed(2),_=s.format(m);return g.toString().includes(".")?g.toString().split(".")[1].length>1?`$${_}`:`$${_}${Array(2).join("0")}`:`$${_}.${Array(3).join("0")}`}case"1%":{const m=parseFloat(g)*100,_=parseFloat(m).toFixed(1),b=s.format(_);return m.toString().includes(".")?`${b}%`:`${b}.${Array(2).join("0")}%`}case"2%":{const m=parseFloat(g)*100,_=parseFloat(m).toFixed(2),b=s.format(_);return m.toString().includes(".")?g.toString().split(".")[1].length>1?`${b}%`:`${b}.${Array(2).join("0")}`:`${b}.${Array(3).join("0")}%`}case"3%":{const m=g*100,_=parseFloat(m).toFixed(3),b=s.format(_);return m.toString().includes(".")?g.toString().split(".")[1].length>1?`${b}%`:`${b}.${Array(3).join("0")}`:`${b}.${Array(4).join("0")}%`}case"ms1":{const m=Math.floor(parseFloat(g)/1e3),_=parseFloat(g)%1e3;return`${m}.${_.toString().slice(0,1)}s`}case"ms2":{const m=Math.floor(parseFloat(g)/1e3),_=Math.floor(parseFloat(g)%1e3),b=parseFloat(g)-Math.floor(parseFloat(g)),w=Math.floor(b*1e3),x=b*1e3-w,S=Math.floor(x*1e3);let T="";return m&&(T+=`${m}s `),_&&(T+=`${_}ms `),w&&(T+=`${w}\xB5s`),S&&(T+=`${S}ns`),T}case"4r":return Math.floor(Math.round(parseFloat(g)));default:return g}},c=(g,y)=>{const m=g.toString().slice(0,4),_=g.toString().slice(5,7),b=g.toString().slice(8,10),w=g.toString().slice(11,19);switch(y){case"dd-mm-yyyy":return`${b}-${_}-${m}`;case"mm-dd-yyyy":return`${_}-${b}-${m}`;case"yyyy-mm-dd":return`${m}-${_}-${b}`;case"dd/mm/yyyy":return`${b}/${_}/${m}`;case"mm/dd/yyyy":return`${_}/${b}/${m}`;case"yyyy/mm/dd":return`${m}/${_}/${b}`;case"hh:mm:ss":return w;default:return g}},f=((h=r[0])==null?void 0:h.value)&&((v=r[0])==null?void 0:v.value.toString().length)>16?c((d=r[0])==null?void 0:d.value,e.dateFormatter):u((p=r[0])==null?void 0:p.value,e.numberFormatter);return B("div",{className:n?Jz.borderLessContainer:Jz.container,children:[C("div",{style:i,onClick:()=>{Yt(t,f||"")},className:o,children:(r==null?void 0:r.length)&&C(Se,{children:f})}),C("div",{style:a,onClick:()=>{Yt(t,e.displayText||"")},children:e.subHeaderShow&&e.displayText})]})},xce=({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(Se,{children:C(ut,{style:{width:"100%",height:"90%"},option:c,onEvents:{click:h=>{var v;Yt(s,((v=h==null?void 0:h.name)==null?void 0:v.split(" ").join("_"))||"undefined")}}})})};var Mn={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"},tB={exports:{}};/*!
245
- Copyright (c) 2018 Jed Watson.
246
- Licensed under the MIT License (MIT), see
247
- http://jedwatson.github.io/classnames
248
- */(function(r){(function(){var e={}.hasOwnProperty;function t(){for(var n=[],a=0;a<arguments.length;a++){var i=arguments[a];if(!!i){var o=typeof i;if(o==="string"||o==="number")n.push(i);else if(Array.isArray(i)){if(i.length){var s=t.apply(null,i);s&&n.push(s)}}else if(o==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){n.push(i.toString());continue}for(var l in i)e.call(i,l)&&i[l]&&n.push(l)}}}return n.join(" ")}r.exports?(t.default=t,r.exports=t):window.classNames=t})()})(tB);var Ka=tB.exports,wce={primary:"_primary_18yak_1",secondary:"_secondary_18yak_5",tertiary:"_tertiary_18yak_10","font-18":"_font-18_18yak_14","font-20":"_font-20_18yak_18","font-14":"_font-14_18yak_22","font-14a":"_font-14a_18yak_26","font-14b":"_font-14b_18yak_30","font-14c":"_font-14c_18yak_34","font-14d":"_font-14d_18yak_38","font-15":"_font-15_18yak_42","font-34":"_font-34_18yak_45"};const Sce={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",p:"p",span:"span"},de=({className:r,variant:e,styleClass:t="primary",children:n,onClick:a})=>{const i=Sce[e];return C(i,{className:Ka(t==="custom"?null:`${wce[t]}`,r),onClick:a,children:n})};var rB={"btn-primary":"_btn-primary_1h5ze_1","btn-secondary":"_btn-secondary_1h5ze_5","btn-reject":"_btn-reject_1h5ze_9","btn-outlined":"_btn-outlined_1h5ze_14","btn-tertiary":"_btn-tertiary_1h5ze_18","btn-default":"_btn-default_1h5ze_22","btn-large":"_btn-large_1h5ze_25","btn-small":"_btn-small_1h5ze_28","btn-xs":"_btn-xs_1h5ze_31","btn-medium":"_btn-medium_1h5ze_34","btn-11rem":"_btn-11rem_1h5ze_38"};const Le=({isDisabled:r=!1,type:e="button",className:t,children:n="",variant:a="primary",size:i="none",onClick:o,title:s})=>{const l=Ka(t,rB[`btn-${a}`],i==="none"?null:rB[`btn-${i}`]);return C("button",{type:e,className:a==="custom"?t:l,onClick:o,disabled:r,title:s,children:n})},Cce=({data:r,chartClickConfig:e})=>{var a,i,o;let t=0;const n=[];if(r)for(let s=0;s<((i=(a=r==null?void 0:r.datasets[0])==null?void 0:a.data)==null?void 0:i.length);s+=1){const l=[];for(let u=0;u<(r==null?void 0:r.datasets.length);u+=1){const c=(o=r==null?void 0:r.datasets[u])==null?void 0:o.data[t];l.push(c)}n.push(l),t+=1}return C("div",{className:Mn.tableSection,children:C("div",{className:Mn.tableContainer,children:C("div",{className:Mn.tableDiv,children:B("table",{className:Mn.table,children:[C("thead",{children:B("tr",{className:`${Mn.tableHead}`,children:[C("th",{className:Mn.tableHeadColHash,scope:"col",children:C(de,{styleClass:"font-14c",variant:"h1",children:"#"})},"num"),r==null?void 0:r.datasets.map((s,l)=>C("th",{className:Mn.tableCol,scope:"col",children:C(de,{styleClass:"font-14c",variant:"h1",className:Mn.tableColLabel,children:s.label})},s+l))]})}),C("tbody",{children:n.map((s,l)=>B("tr",{className:Mn.data,children:[C("td",{className:Mn.tableBodyColHash,children:C(de,{styleClass:"font-14",variant:"p",className:Mn.tableBodyColHashLabel,children:l+1})},l),s.map((u,c)=>C(Se,{children:C("td",{className:Mn.tableCol,children:C(Le,{variant:"custom",type:"button",className:Mn.tableColLabel,isDisabled:!e.isEnable,onClick:()=>Yt(e,JSON.stringify(u)),children:JSON.stringify(u)})},u+c)}))]},l))})]})})})})},Fg=({labels:r,data:e,chartType:t,funnelData:n,sankeyData:a,singleValueData:i,margins:o,legendSettings:s,labelSettings:l,axisSettings:u,customSettings:c,enableSaveAs:f,colors:h,updateGroup:v,isEnableGroupBy:d,backGroundColor:p,chartClickConfig:g})=>{var y,m,_,b;if(t===Mt.line)return C(lce,{data:e,margins:o,legendSettings:s,labelSettings:l,axisSettings:u,customSettings:c,enableSaveAs:f,updateGroup:v,isEnableGroupBy:d,chartClickConfig:g});if(t===Mt.stepped)return C(gce,{labels:r,data:e,margins:o,legendSettings:s,labelSettings:l,axisSettings:u,customSettings:c,enableSaveAs:f,colors:h,updateGroup:v,isEnableGroupBy:d,backGroundColor:p,chartClickConfig:g});if(t===Mt.bar)return C(oce,{data:e,updateGroup:v,isEnableGroupBy:d,colors:h,backGroundColor:p,legendSettings:s,labelSettings:l,axisSettings:u,customSettings:c,margins:o,chartClickConfig:g});if(t===Mt.stack)return C(bce,{data:e,margins:o,legendSettings:s,labelSettings:l,axisSettings:u,enableSaveAs:f,colors:h,updateGroup:v,isEnableGroupBy:d,backGroundColor:p,customSettings:c,chartClickConfig:g});if(t===Mt.histogram)return C(yce,{data:e,margins:o,legendSettings:s,labelSettings:l,axisSettings:u,enableSaveAs:f,colors:h,updateGroup:v,isEnableGroupBy:d,backGroundColor:p,customSettings:c,chartClickConfig:g});if(t===Mt.bubble)return C(dce,{data:e,margins:o,legendSettings:s,labelSettings:l,axisSettings:u,enableSaveAs:f,colors:h,updateGroup:v,isEnableGroupBy:d,backGroundColor:p,customSettings:c,chartClickConfig:g});if(t===Mt.scatter)return C(fce,{data:e,margins:o,legendSettings:s,labelSettings:l,axisSettings:u,enableSaveAs:f,colors:h,updateGroup:v,isEnableGroupBy:d,backGroundColor:p,customSettings:c,chartClickConfig:g});if(t===Mt.row)return C(cce,{data:e,margins:o,legendSettings:s,labelSettings:l,enableSaveAs:f,colors:h,updateGroup:v,isEnableGroupBy:d,backGroundColor:p,customSettings:c,chartClickConfig:g});if(t===Mt.area)return(y=e.datasets)==null||y.map(w=>Object.assign(w,{fill:!0})),C(ice,{data:e,margins:o,legendSettings:s,labelSettings:l,axisSettings:u,enableSaveAs:f,colors:h,updateGroup:v,isEnableGroupBy:d,backGroundColor:p,customSettings:c,chartClickConfig:g});if(t===Mt.combo){if((m=e.datasets)!=null&&m.length){const w=e.datasets[0];Object.assign(w,{type:"line"})}return C(sce,{data:e,margins:o,legendSettings:s,labelSettings:l,enableSaveAs:f,colors:h,updateGroup:v,isEnableGroupBy:d,backGroundColor:p,customSettings:c,chartClickConfig:g})}if(t===Mt.pie)return C(uce,{data:e,margins:o,legendSettings:s,labelSettings:l,enableSaveAs:f,colors:h,updateGroup:v,isEnableGroupBy:d,chartClickConfig:g});if(t===Mt.doughnut)return C(pce,{data:e,margins:o,legendSettings:s,labelSettings:l,enableSaveAs:f,colors:h,updateGroup:v,isEnableGroupBy:d,chartClickConfig:g});if(t===Mt.waterfall){let w;if((_=e.datasets)!=null&&_.length){const x=(b=e.datasets[0])==null?void 0:b.data,S=[x==null?void 0:x[0]];if(x!=null&&x.length)for(let T=1;T<x.length-1;T++)S.push(S[T-1]-x[T]);S.push(x==null?void 0:x[x.length-1]),w={labels:e.labels,datasets:[x,S]}}return C(hce,{data:w||e,margins:o,legendSettings:s,labelSettings:l,axisSettings:u,enableSaveAs:f,colors:h,updateGroup:v,isEnableGroupBy:d,backGroundColor:p,customSettings:c,chartClickConfig:g})}return t===Mt.funnel?C(vce,{funnelData:n,margins:o,legendSettings:s,labelSettings:l,colors:h,chartClickConfig:g}):t===Mt.gauge?C(mce,{gaugeData:n,margins:o,legendSettings:s,labelSettings:l,enableSaveAs:f,colors:h,chartClickConfig:g}):t===Mt.sankey?C(_ce,{data:a,margins:o,legendSettings:s,labelSettings:l,enableSaveAs:f,colors:h,backGroundColor:p,chartClickConfig:g}):t===Mt.singleValue?C(eB,{data:i,margins:o,labelSettings:l,customSettings:c,chartClickConfig:g}):t===Mt.boxplot?C(xce,{data:e,margins:o,legendSettings:s,labelSettings:l,axisSettings:u,enableSaveAs:f,colors:h,customSettings:c,chartClickConfig:g}):t===Mt.table?C(Cce,{data:e,margins:o,legendSettings:s,labelSettings:l,chartClickConfig:g}):C("div",{className:MT.noChart,children:"No chart selected"})},Tce=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M12 16a2 2 0 0 1 2 2a2 2 0 0 1-2 2a2 2 0 0 1-2-2a2 2 0 0 1 2-2m0-6a2 2 0 0 1 2 2a2 2 0 0 1-2 2a2 2 0 0 1-2-2a2 2 0 0 1 2-2m0-6a2 2 0 0 1 2 2a2 2 0 0 1-2 2a2 2 0 0 1-2-2a2 2 0 0 1 2-2Z"})}),Dce=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M9 9H3V7h4V3h2v6Zm0 6H3v2h4v4h2v-6Zm12 0h-6v6h2v-4h4v-2Zm-6-6h6V7h-4V3h-2v6Z"})}),nB=(r,e,t)=>{const n=r==null?void 0:r.map(a=>({...a,[t]:parseInt(a[t],10)}));return n==null?void 0:n.reduce((a,i)=>{const o=e.reduce((s,l)=>s+=i[l],"");return a[o]||(a[o]={[t]:0},e.forEach(s=>a[o][s]=i[s])),a[o][t]+=i[t],a},{})},Ca=(r,e,t,n)=>{var o;const a=Object.keys((o=r==null?void 0:r[0])!=null?o:[]).filter(s=>!t.includes(s)),i=nB(r,e,a[0]);n(Object.values(i))},lS=r=>{const e=Object.entries(r).filter(([,n])=>Number(n)||Number(n)===0),t=Object.entries(r).filter(([,n])=>typeof n=="string"&&!Number(n)||n===null);return{numberKeys:e.map(([n])=>n),stringKeys:t.map(([n])=>n)}},Wu=r=>B("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:[C("path",{fill:"currentColor",d:"M12 2A10 10 0 1 0 22 12A10 10 0 0 0 12 2Zm0 18a8 8 0 1 1 8-8A8 8 0 0 1 12 20Z",opacity:.5}),C("path",{fill:"currentColor",d:"M20 12h2A10 10 0 0 0 12 2V4A8 8 0 0 1 20 12Z",children:C("animateTransform",{attributeName:"transform",dur:"1s",from:"0 12 12",repeatCount:"indefinite",to:"360 12 12",type:"rotate"})})]}),aB=typeof window=="undefined"||typeof document=="undefined";let Nr=aB?z.useEffect:z.useLayoutEffect;function Mo(r){let e=z.useRef(r);return Nr(()=>{e.current=r},[r]),e}function iB(r,e){let[t,n]=z.useState(r),a=Mo(r);return Nr(()=>n(a.current),[a,n,...e]),t}function Mce(r){typeof queueMicrotask=="function"?queueMicrotask(r):Promise.resolve().then(r).catch(e=>setTimeout(()=>{throw e}))}function nl(){let r=[],e=[],t={enqueue(n){e.push(n)},addEventListener(n,a,i,o){return n.addEventListener(a,i,o),t.add(()=>n.removeEventListener(a,i,o))},requestAnimationFrame(...n){let a=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(a))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let a=setTimeout(...n);return t.add(()=>clearTimeout(a))},microTask(...n){let a={current:!0};return Mce(()=>{a.current&&n[0]()}),t.add(()=>{a.current=!1})},add(n){return r.push(n),()=>{let a=r.indexOf(n);if(a>=0){let[i]=r.splice(a,1);i()}}},dispose(){for(let n of r.splice(0))n()},async workQueue(){for(let n of e.splice(0))await n()}};return t}function Ch(){let[r]=z.useState(nl);return z.useEffect(()=>()=>r.dispose(),[r]),r}let ir=function(r){let e=Mo(r);return pe.default.useCallback((...t)=>e.current(...t),[e])},uS={serverHandoffComplete:!1};function cS(){let[r,e]=z.useState(uS.serverHandoffComplete);return z.useEffect(()=>{r!==!0&&e(!0)},[r]),z.useEffect(()=>{uS.serverHandoffComplete===!1&&(uS.serverHandoffComplete=!0)},[]),r}var oB;let Ace=0;function sB(){return++Ace}let Vg=(oB=pe.default.useId)!=null?oB:function(){let r=cS(),[e,t]=pe.default.useState(r?sB:null);return Nr(()=>{e===null&&t(sB())},[e]),e!=null?""+e:void 0};function qt(r,e,...t){if(r in e){let a=e[r];return typeof a=="function"?a(...t):a}let n=new Error(`Tried to handle "${r}" but there is no handler defined. Only defined handlers are: ${Object.keys(e).map(a=>`"${a}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,qt),n}function lB(r){return aB?null:r instanceof Node?r.ownerDocument:r!=null&&r.hasOwnProperty("current")&&r.current instanceof Node?r.current.ownerDocument:document}let uB=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(r=>`${r}:not([tabindex='-1'])`).join(",");var Lce=(r=>(r[r.First=1]="First",r[r.Previous=2]="Previous",r[r.Next=4]="Next",r[r.Last=8]="Last",r[r.WrapAround=16]="WrapAround",r[r.NoScroll=32]="NoScroll",r))(Lce||{}),Ice=(r=>(r[r.Error=0]="Error",r[r.Overflow=1]="Overflow",r[r.Success=2]="Success",r[r.Underflow=3]="Underflow",r))(Ice||{}),Pce=(r=>(r[r.Previous=-1]="Previous",r[r.Next=1]="Next",r))(Pce||{}),fS=(r=>(r[r.Strict=0]="Strict",r[r.Loose=1]="Loose",r))(fS||{});function cB(r,e=0){var t;return r===((t=lB(r))==null?void 0:t.body)?!1:qt(e,{[0](){return r.matches(uB)},[1](){let n=r;for(;n!==null;){if(n.matches(uB))return!0;n=n.parentElement}return!1}})}function Ece(r,e=t=>t){return r.slice().sort((t,n)=>{let a=e(t),i=e(n);if(a===null||i===null)return 0;let o=a.compareDocumentPosition(i);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function hS(r,e,t){let n=Mo(e);z.useEffect(()=>{function a(i){n.current(i)}return document.addEventListener(r,a,t),()=>document.removeEventListener(r,a,t)},[r,t])}function Oce(r,e,t=!0){let n=z.useRef(!1);z.useEffect(()=>{requestAnimationFrame(()=>{n.current=t})},[t]);function a(o,s){if(!n.current||o.defaultPrevented)return;let l=function c(f){return typeof f=="function"?c(f()):Array.isArray(f)||f instanceof Set?f:[f]}(r),u=s(o);if(u!==null&&!!u.ownerDocument.documentElement.contains(u)){for(let c of l){if(c===null)continue;let f=c instanceof HTMLElement?c:c.current;if(f!=null&&f.contains(u))return}return!cB(u,fS.Loose)&&u.tabIndex!==-1&&o.preventDefault(),e(o,u)}}let i=z.useRef(null);hS("mousedown",o=>{n.current&&(i.current=o.target)},!0),hS("click",o=>{!i.current||(a(o,()=>i.current),i.current=null)},!0),hS("blur",o=>a(o,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function fB(r){var e;if(r.type)return r.type;let t=(e=r.as)!=null?e:"button";if(typeof t=="string"&&t.toLowerCase()==="button")return"button"}function Rce(r,e){let[t,n]=z.useState(()=>fB(r));return Nr(()=>{n(fB(r))},[r.type,r.as]),Nr(()=>{t||!e.current||e.current instanceof HTMLButtonElement&&!e.current.hasAttribute("type")&&n("button")},[t,e]),t}let Nce=Symbol();function al(...r){let e=z.useRef(r);z.useEffect(()=>{e.current=r},[r]);let t=ir(n=>{for(let a of e.current)a!=null&&(typeof a=="function"?a(n):a.current=n)});return r.every(n=>n==null||(n==null?void 0:n[Nce]))?void 0:t}function kce(r){throw new Error("Unexpected object: "+r)}var Ta=(r=>(r[r.First=0]="First",r[r.Previous=1]="Previous",r[r.Next=2]="Next",r[r.Last=3]="Last",r[r.Specific=4]="Specific",r[r.Nothing=5]="Nothing",r))(Ta||{});function zce(r,e){let t=e.resolveItems();if(t.length<=0)return null;let n=e.resolveActiveIndex(),a=n!=null?n:-1,i=(()=>{switch(r.focus){case 0:return t.findIndex(o=>!e.resolveDisabled(o));case 1:{let o=t.slice().reverse().findIndex((s,l,u)=>a!==-1&&u.length-l-1>=a?!1:!e.resolveDisabled(s));return o===-1?o:t.length-1-o}case 2:return t.findIndex((o,s)=>s<=a?!1:!e.resolveDisabled(o));case 3:{let o=t.slice().reverse().findIndex(s=>!e.resolveDisabled(s));return o===-1?o:t.length-1-o}case 4:return t.findIndex(o=>e.resolveId(o)===r.id);case 5:return null;default:kce(r)}})();return i===-1?n:i}var $g=(r=>(r[r.None=0]="None",r[r.RenderStrategy=1]="RenderStrategy",r[r.Static=2]="Static",r))($g||{}),Di=(r=>(r[r.Unmount=0]="Unmount",r[r.Hidden=1]="Hidden",r))(Di||{});function Ao({ourProps:r,theirProps:e,slot:t,defaultTag:n,features:a,visible:i=!0,name:o}){let s=hB(e,r);if(i)return Hg(s,t,n,o);let l=a!=null?a:0;if(l&2){let{static:u=!1,...c}=s;if(u)return Hg(c,t,n,o)}if(l&1){let{unmount:u=!0,...c}=s;return qt(u?0:1,{[0](){return null},[1](){return Hg({...c,hidden:!0,style:{display:"none"}},t,n,o)}})}return Hg(s,t,n,o)}function Hg(r,e={},t,n){let{as:a=t,children:i,refName:o="ref",...s}=dS(r,["unmount","static"]),l=r.ref!==void 0?{[o]:r.ref}:{},u=typeof i=="function"?i(e):i;s.className&&typeof s.className=="function"&&(s.className=s.className(e));let c={};if(e){let f=!1,h=[];for(let[v,d]of Object.entries(e))typeof d=="boolean"&&(f=!0),d===!0&&h.push(v);f&&(c["data-headlessui-state"]=h.join(" "))}if(a===z.Fragment&&Object.keys(vS(s)).length>0){if(!z.isValidElement(u)||Array.isArray(u)&&u.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(s).map(f=>` - ${f}`).join(`
249
- `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(f=>` - ${f}`).join(`
250
- `)].join(`
251
- `));return z.cloneElement(u,Object.assign({},hB(u.props,vS(dS(s,["ref"]))),c,l,Bce(u.ref,l.ref)))}return z.createElement(a,Object.assign({},dS(s,["ref"]),a!==z.Fragment&&l,a!==z.Fragment&&c),u)}function Bce(...r){return{ref:r.every(e=>e==null)?void 0:e=>{for(let t of r)t!=null&&(typeof t=="function"?t(e):t.current=e)}}}function hB(...r){if(r.length===0)return{};if(r.length===1)return r[0];let e={},t={};for(let n of r)for(let a in n)a.startsWith("on")&&typeof n[a]=="function"?(t[a]!=null||(t[a]=[]),t[a].push(n[a])):e[a]=n[a];if(e.disabled||e["aria-disabled"])return Object.assign(e,Object.fromEntries(Object.keys(t).map(n=>[n,void 0])));for(let n in t)Object.assign(e,{[n](a,...i){let o=t[n];for(let s of o){if((a instanceof Event||(a==null?void 0:a.nativeEvent)instanceof Event)&&a.defaultPrevented)return;s(a,...i)}}});return e}function Mi(r){var e;return Object.assign(z.forwardRef(r),{displayName:(e=r.displayName)!=null?e:r.name})}function vS(r){let e=Object.assign({},r);for(let t in e)e[t]===void 0&&delete e[t];return e}function dS(r,e=[]){let t=Object.assign({},r);for(let n of e)n in t&&delete t[n];return t}function Fce(r){let e=r.parentElement,t=null;for(;e&&!(e instanceof HTMLFieldSetElement);)e instanceof HTMLLegendElement&&(t=e),e=e.parentElement;let n=(e==null?void 0:e.getAttribute("disabled"))==="";return n&&Vce(t)?!1:n}function Vce(r){if(!r)return!1;let e=r.previousElementSibling;for(;e!==null;){if(e instanceof HTMLLegendElement)return!1;e=e.previousElementSibling}return!0}function vB(r={},e=null,t=[]){for(let[n,a]of Object.entries(r))pB(t,dB(e,n),a);return t}function dB(r,e){return r?r+"["+e+"]":e}function pB(r,e,t){if(Array.isArray(t))for(let[n,a]of t.entries())pB(r,dB(e,n.toString()),a);else t instanceof Date?r.push([e,t.toISOString()]):typeof t=="boolean"?r.push([e,t?"1":"0"]):typeof t=="string"?r.push([e,t]):typeof t=="number"?r.push([e,`${t}`]):t==null?r.push([e,""]):vB(t,e,r)}let $ce="div";var gB=(r=>(r[r.None=1]="None",r[r.Focusable=2]="Focusable",r[r.Hidden=4]="Hidden",r))(gB||{});let Hce=Mi(function(r,e){let{features:t=1,...n}=r,a={ref:e,"aria-hidden":(t&2)===2?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(t&4)===4&&(t&2)!==2&&{display:"none"}}};return Ao({ourProps:a,theirProps:n,slot:{},defaultTag:$ce,name:"Hidden"})}),pS=z.createContext(null);pS.displayName="OpenClosedContext";var Lo=(r=>(r[r.Open=0]="Open",r[r.Closed=1]="Closed",r))(Lo||{});function gS(){return z.useContext(pS)}function yB({value:r,children:e}){return pe.default.createElement(pS.Provider,{value:r},e)}var cr=(r=>(r.Space=" ",r.Enter="Enter",r.Escape="Escape",r.Backspace="Backspace",r.Delete="Delete",r.ArrowLeft="ArrowLeft",r.ArrowUp="ArrowUp",r.ArrowRight="ArrowRight",r.ArrowDown="ArrowDown",r.Home="Home",r.End="End",r.PageUp="PageUp",r.PageDown="PageDown",r.Tab="Tab",r))(cr||{});function Gce(r,e,t){let[n,a]=z.useState(t),i=r!==void 0;return[i?r:n,ir(o=>(i||a(o),e==null?void 0:e(o)))]}function mB(){let r=z.useRef(!1);return Nr(()=>(r.current=!0,()=>{r.current=!1}),[]),r}var Wce=(r=>(r[r.Open=0]="Open",r[r.Closed=1]="Closed",r))(Wce||{}),Uce=(r=>(r[r.Single=0]="Single",r[r.Multi=1]="Multi",r))(Uce||{}),jce=(r=>(r[r.Pointer=0]="Pointer",r[r.Other=1]="Other",r))(jce||{}),Yce=(r=>(r[r.OpenListbox=0]="OpenListbox",r[r.CloseListbox=1]="CloseListbox",r[r.SetDisabled=2]="SetDisabled",r[r.SetOrientation=3]="SetOrientation",r[r.GoToOption=4]="GoToOption",r[r.Search=5]="Search",r[r.ClearSearch=6]="ClearSearch",r[r.RegisterOption=7]="RegisterOption",r[r.UnregisterOption=8]="UnregisterOption",r))(Yce||{});function yS(r,e=t=>t){let t=r.activeOptionIndex!==null?r.options[r.activeOptionIndex]:null,n=Ece(e(r.options.slice()),i=>i.dataRef.current.domRef.current),a=t?n.indexOf(t):null;return a===-1&&(a=null),{options:n,activeOptionIndex:a}}let qce={[1](r){return r.disabled||r.listboxState===1?r:{...r,activeOptionIndex:null,listboxState:1}},[0](r){if(r.disabled||r.listboxState===0)return r;let e=r.activeOptionIndex,{value:t,mode:n,compare:a}=r.propsRef.current,i=r.options.findIndex(o=>{let s=o.dataRef.current.value;return qt(n,{[1]:()=>t.some(l=>a(l,s)),[0]:()=>a(t,s)})});return i!==-1&&(e=i),{...r,listboxState:0,activeOptionIndex:e}},[2](r,e){return r.disabled===e.disabled?r:{...r,disabled:e.disabled}},[3](r,e){return r.orientation===e.orientation?r:{...r,orientation:e.orientation}},[4](r,e){var t;if(r.disabled||r.listboxState===1)return r;let n=yS(r),a=zce(e,{resolveItems:()=>n.options,resolveActiveIndex:()=>n.activeOptionIndex,resolveId:i=>i.id,resolveDisabled:i=>i.dataRef.current.disabled});return{...r,...n,searchQuery:"",activeOptionIndex:a,activationTrigger:(t=e.trigger)!=null?t:1}},[5]:(r,e)=>{if(r.disabled||r.listboxState===1)return r;let t=r.searchQuery!==""?0:1,n=r.searchQuery+e.value.toLowerCase(),a=(r.activeOptionIndex!==null?r.options.slice(r.activeOptionIndex+t).concat(r.options.slice(0,r.activeOptionIndex+t)):r.options).find(o=>{var s;return!o.dataRef.current.disabled&&((s=o.dataRef.current.textValue)==null?void 0:s.startsWith(n))}),i=a?r.options.indexOf(a):-1;return i===-1||i===r.activeOptionIndex?{...r,searchQuery:n}:{...r,searchQuery:n,activeOptionIndex:i,activationTrigger:1}},[6](r){return r.disabled||r.listboxState===1||r.searchQuery===""?r:{...r,searchQuery:""}},[7]:(r,e)=>{let t={id:e.id,dataRef:e.dataRef},n=yS(r,a=>[...a,t]);if(r.activeOptionIndex===null){let{value:a,mode:i,compare:o}=r.propsRef.current,s=e.dataRef.current.value;qt(i,{[1]:()=>a.some(l=>o(l,s)),[0]:()=>o(a,s)})&&(n.activeOptionIndex=n.options.indexOf(t))}return{...r,...n}},[8]:(r,e)=>{let t=yS(r,n=>{let a=n.findIndex(i=>i.id===e.id);return a!==-1&&n.splice(a,1),n});return{...r,...t,activationTrigger:1}}},mS=z.createContext(null);mS.displayName="ListboxContext";function Th(r){let e=z.useContext(mS);if(e===null){let t=new Error(`<${r} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Th),t}return e}function Zce(r,e){return qt(e.type,qce,r,e)}let Xce=z.Fragment,Qce=Mi(function(r,e){let{value:t,defaultValue:n,name:a,onChange:i,by:o=(S,T)=>S===T,disabled:s=!1,horizontal:l=!1,multiple:u=!1,...c}=r;const f=l?"horizontal":"vertical";let h=al(e),[v,d]=Gce(t,i,n),p=z.useReducer(Zce,{listboxState:1,propsRef:{current:{value:v,onChange:d,mode:u?1:0,compare:ir(typeof o=="string"?(S,T)=>{let D=o;return(S==null?void 0:S[D])===(T==null?void 0:T[D])}:o)}},labelRef:z.createRef(),buttonRef:z.createRef(),optionsRef:z.createRef(),disabled:s,orientation:f,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1}),[{listboxState:g,propsRef:y,optionsRef:m,buttonRef:_},b]=p;y.current.value=v,y.current.mode=u?1:0,Nr(()=>{y.current.onChange=S=>qt(y.current.mode,{[0](){return d(S)},[1](){let T=y.current.value.slice(),{compare:D}=y.current,M=T.findIndex(A=>D(A,S));return M===-1?T.push(S):T.splice(M,1),d(T)}})},[d,y]),Nr(()=>b({type:2,disabled:s}),[s]),Nr(()=>b({type:3,orientation:f}),[f]),Oce([_,m],(S,T)=>{var D;b({type:1}),cB(T,fS.Loose)||(S.preventDefault(),(D=_.current)==null||D.focus())},g===0);let w=z.useMemo(()=>({open:g===0,disabled:s,value:v}),[g,s,v]),x={ref:h};return pe.default.createElement(mS.Provider,{value:p},pe.default.createElement(yB,{value:qt(g,{[0]:Lo.Open,[1]:Lo.Closed})},a!=null&&v!=null&&vB({[a]:v}).map(([S,T])=>pe.default.createElement(Hce,{features:gB.Hidden,...vS({key:S,as:"input",type:"hidden",hidden:!0,readOnly:!0,name:S,value:T})})),Ao({ourProps:x,theirProps:c,slot:w,defaultTag:Xce,name:"Listbox"})))}),Kce="button",Jce=Mi(function(r,e){var t;let[n,a]=Th("Listbox.Button"),i=al(n.buttonRef,e),o=`headlessui-listbox-button-${Vg()}`,s=Ch(),l=ir(p=>{switch(p.key){case cr.Space:case cr.Enter:case cr.ArrowDown:p.preventDefault(),a({type:0}),s.nextFrame(()=>{n.propsRef.current.value||a({type:4,focus:Ta.First})});break;case cr.ArrowUp:p.preventDefault(),a({type:0}),s.nextFrame(()=>{n.propsRef.current.value||a({type:4,focus:Ta.Last})});break}}),u=ir(p=>{switch(p.key){case cr.Space:p.preventDefault();break}}),c=ir(p=>{if(Fce(p.currentTarget))return p.preventDefault();n.listboxState===0?(a({type:1}),s.nextFrame(()=>{var g;return(g=n.buttonRef.current)==null?void 0:g.focus({preventScroll:!0})})):(p.preventDefault(),a({type:0}))}),f=iB(()=>{if(n.labelRef.current)return[n.labelRef.current.id,o].join(" ")},[n.labelRef.current,o]),h=z.useMemo(()=>({open:n.listboxState===0,disabled:n.disabled,value:n.propsRef.current.value}),[n]),v=r,d={ref:i,id:o,type:Rce(r,n.buttonRef),"aria-haspopup":!0,"aria-controls":(t=n.optionsRef.current)==null?void 0:t.id,"aria-expanded":n.disabled?void 0:n.listboxState===0,"aria-labelledby":f,disabled:n.disabled,onKeyDown:l,onKeyUp:u,onClick:c};return Ao({ourProps:d,theirProps:v,slot:h,defaultTag:Kce,name:"Listbox.Button"})}),efe="label",tfe=Mi(function(r,e){let[t]=Th("Listbox.Label"),n=`headlessui-listbox-label-${Vg()}`,a=al(t.labelRef,e),i=ir(()=>{var s;return(s=t.buttonRef.current)==null?void 0:s.focus({preventScroll:!0})}),o=z.useMemo(()=>({open:t.listboxState===0,disabled:t.disabled}),[t]);return Ao({ourProps:{ref:a,id:n,onClick:i},theirProps:r,slot:o,defaultTag:efe,name:"Listbox.Label"})}),rfe="ul",nfe=$g.RenderStrategy|$g.Static,afe=Mi(function(r,e){var t;let[n,a]=Th("Listbox.Options"),i=al(n.optionsRef,e),o=`headlessui-listbox-options-${Vg()}`,s=Ch(),l=Ch(),u=gS(),c=(()=>u!==null?u===Lo.Open:n.listboxState===0)();z.useEffect(()=>{var g;let y=n.optionsRef.current;!y||n.listboxState===0&&y!==((g=lB(y))==null?void 0:g.activeElement)&&y.focus({preventScroll:!0})},[n.listboxState,n.optionsRef]);let f=ir(g=>{switch(l.dispose(),g.key){case cr.Space:if(n.searchQuery!=="")return g.preventDefault(),g.stopPropagation(),a({type:5,value:g.key});case cr.Enter:if(g.preventDefault(),g.stopPropagation(),n.activeOptionIndex!==null){let{dataRef:y}=n.options[n.activeOptionIndex];n.propsRef.current.onChange(y.current.value)}n.propsRef.current.mode===0&&(a({type:1}),nl().nextFrame(()=>{var y;return(y=n.buttonRef.current)==null?void 0:y.focus({preventScroll:!0})}));break;case qt(n.orientation,{vertical:cr.ArrowDown,horizontal:cr.ArrowRight}):return g.preventDefault(),g.stopPropagation(),a({type:4,focus:Ta.Next});case qt(n.orientation,{vertical:cr.ArrowUp,horizontal:cr.ArrowLeft}):return g.preventDefault(),g.stopPropagation(),a({type:4,focus:Ta.Previous});case cr.Home:case cr.PageUp:return g.preventDefault(),g.stopPropagation(),a({type:4,focus:Ta.First});case cr.End:case cr.PageDown:return g.preventDefault(),g.stopPropagation(),a({type:4,focus:Ta.Last});case cr.Escape:return g.preventDefault(),g.stopPropagation(),a({type:1}),s.nextFrame(()=>{var y;return(y=n.buttonRef.current)==null?void 0:y.focus({preventScroll:!0})});case cr.Tab:g.preventDefault(),g.stopPropagation();break;default:g.key.length===1&&(a({type:5,value:g.key}),l.setTimeout(()=>a({type:6}),350));break}}),h=iB(()=>{var g,y,m;return(m=(g=n.labelRef.current)==null?void 0:g.id)!=null?m:(y=n.buttonRef.current)==null?void 0:y.id},[n.labelRef.current,n.buttonRef.current]),v=z.useMemo(()=>({open:n.listboxState===0}),[n]),d=r,p={"aria-activedescendant":n.activeOptionIndex===null||(t=n.options[n.activeOptionIndex])==null?void 0:t.id,"aria-multiselectable":n.propsRef.current.mode===1?!0:void 0,"aria-labelledby":h,"aria-orientation":n.orientation,id:o,onKeyDown:f,role:"listbox",tabIndex:0,ref:i};return Ao({ourProps:p,theirProps:d,slot:v,defaultTag:rfe,features:nfe,visible:c,name:"Listbox.Options"})}),ife="li",ofe=Mi(function(r,e){let{disabled:t=!1,value:n,...a}=r,[i,o]=Th("Listbox.Option"),s=`headlessui-listbox-option-${Vg()}`,l=i.activeOptionIndex!==null?i.options[i.activeOptionIndex].id===s:!1,{value:u,compare:c}=i.propsRef.current,f=qt(i.propsRef.current.mode,{[1]:()=>u.some(w=>c(w,n)),[0]:()=>c(u,n)}),h=z.useRef(null),v=al(e,h);Nr(()=>{if(i.listboxState!==0||!l||i.activationTrigger===0)return;let w=nl();return w.requestAnimationFrame(()=>{var x,S;(S=(x=h.current)==null?void 0:x.scrollIntoView)==null||S.call(x,{block:"nearest"})}),w.dispose},[h,l,i.listboxState,i.activationTrigger,i.activeOptionIndex]);let d=z.useRef({disabled:t,value:n,domRef:h});Nr(()=>{d.current.disabled=t},[d,t]),Nr(()=>{d.current.value=n},[d,n]),Nr(()=>{var w,x;d.current.textValue=(x=(w=h.current)==null?void 0:w.textContent)==null?void 0:x.toLowerCase()},[d,h]);let p=ir(()=>i.propsRef.current.onChange(n));Nr(()=>(o({type:7,id:s,dataRef:d}),()=>o({type:8,id:s})),[d,s]);let g=ir(w=>{if(t)return w.preventDefault();p(),i.propsRef.current.mode===0&&(o({type:1}),nl().nextFrame(()=>{var x;return(x=i.buttonRef.current)==null?void 0:x.focus({preventScroll:!0})}))}),y=ir(()=>{if(t)return o({type:4,focus:Ta.Nothing});o({type:4,focus:Ta.Specific,id:s})}),m=ir(()=>{t||l||o({type:4,focus:Ta.Specific,id:s,trigger:0})}),_=ir(()=>{t||!l||o({type:4,focus:Ta.Nothing})}),b=z.useMemo(()=>({active:l,selected:f,disabled:t}),[l,f,t]);return Ao({ourProps:{id:s,ref:v,role:"option",tabIndex:t===!0?void 0:-1,"aria-disabled":t===!0?!0:void 0,"aria-selected":f,disabled:void 0,onClick:g,onFocus:y,onPointerMove:m,onMouseMove:m,onPointerLeave:_,onMouseLeave:_},theirProps:a,slot:b,defaultTag:ife,name:"Listbox.Option"})}),Zr=Object.assign(Qce,{Button:Jce,Label:tfe,Options:afe,Option:ofe});function sfe(r){let e={called:!1};return(...t)=>{if(!e.called)return e.called=!0,r(...t)}}function _S(r,...e){r&&e.length>0&&r.classList.add(...e)}function bS(r,...e){r&&e.length>0&&r.classList.remove(...e)}var xS=(r=>(r.Ended="ended",r.Cancelled="cancelled",r))(xS||{});function lfe(r,e){let t=nl();if(!r)return t.dispose;let{transitionDuration:n,transitionDelay:a}=getComputedStyle(r),[i,o]=[n,a].map(s=>{let[l=0]=s.split(",").filter(Boolean).map(u=>u.includes("ms")?parseFloat(u):parseFloat(u)*1e3).sort((u,c)=>c-u);return l});if(i+o!==0){let s=[];s.push(t.addEventListener(r,"transitionrun",l=>{l.target===l.currentTarget&&(s.splice(0).forEach(u=>u()),s.push(t.addEventListener(r,"transitionend",u=>{u.target===u.currentTarget&&(e("ended"),s.splice(0).forEach(c=>c()))}),t.addEventListener(r,"transitioncancel",u=>{u.target===u.currentTarget&&(e("cancelled"),s.splice(0).forEach(c=>c()))})))}))}else e("ended");return t.add(()=>e("cancelled")),t.dispose}function ufe(r,e,t,n){let a=t?"enter":"leave",i=nl(),o=n!==void 0?sfe(n):()=>{};a==="enter"&&(r.removeAttribute("hidden"),r.style.display="");let s=qt(a,{enter:()=>e.enter,leave:()=>e.leave}),l=qt(a,{enter:()=>e.enterTo,leave:()=>e.leaveTo}),u=qt(a,{enter:()=>e.enterFrom,leave:()=>e.leaveFrom});return bS(r,...e.enter,...e.enterTo,...e.enterFrom,...e.leave,...e.leaveFrom,...e.leaveTo,...e.entered),_S(r,...s,...u),i.nextFrame(()=>{bS(r,...u),_S(r,...l),lfe(r,c=>(c==="ended"&&(bS(r,...s),_S(r,...e.entered)),o(c)))}),i.dispose}function cfe({container:r,direction:e,classes:t,onStart:n,onStop:a}){let i=mB(),o=Ch(),s=Mo(e);Nr(()=>{let l=nl();o.add(l.dispose);let u=r.current;if(!!u&&s.current!=="idle"&&!!i.current)return l.dispose(),n.current(s.current),l.add(ufe(u,t.current,s.current==="enter",c=>{l.dispose(),qt(c,{[xS.Ended](){a.current(s.current)},[xS.Cancelled]:()=>{}})})),l.dispose},[e])}function il(r=""){return r.split(" ").filter(e=>e.trim().length>1)}let Gg=z.createContext(null);Gg.displayName="TransitionContext";var ffe=(r=>(r.Visible="visible",r.Hidden="hidden",r))(ffe||{});function hfe(){let r=z.useContext(Gg);if(r===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return r}function vfe(){let r=z.useContext(Wg);if(r===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return r}let Wg=z.createContext(null);Wg.displayName="NestingContext";function Ug(r){return"children"in r?Ug(r.children):r.current.filter(({el:e})=>e.current!==null).filter(({state:e})=>e==="visible").length>0}function _B(r,e){let t=Mo(r),n=z.useRef([]),a=mB(),i=Ch(),o=ir((v,d=Di.Hidden)=>{let p=n.current.findIndex(({el:g})=>g===v);p!==-1&&(qt(d,{[Di.Unmount](){n.current.splice(p,1)},[Di.Hidden](){n.current[p].state="hidden"}}),i.microTask(()=>{var g;!Ug(n)&&a.current&&((g=t.current)==null||g.call(t))}))}),s=ir(v=>{let d=n.current.find(({el:p})=>p===v);return d?d.state!=="visible"&&(d.state="visible"):n.current.push({el:v,state:"visible"}),()=>o(v,Di.Unmount)}),l=z.useRef([]),u=z.useRef(Promise.resolve()),c=z.useRef({enter:[],leave:[],idle:[]}),f=ir((v,d,p)=>{l.current.splice(0),e&&(e.chains.current[d]=e.chains.current[d].filter(([g])=>g!==v)),e==null||e.chains.current[d].push([v,new Promise(g=>{l.current.push(g)})]),e==null||e.chains.current[d].push([v,new Promise(g=>{Promise.all(c.current[d].map(([y,m])=>m)).then(()=>g())})]),d==="enter"?u.current=u.current.then(()=>e==null?void 0:e.wait.current).then(()=>p(d)):p(d)}),h=ir((v,d,p)=>{Promise.all(c.current[d].splice(0).map(([g,y])=>y)).then(()=>{var g;(g=l.current.shift())==null||g()}).then(()=>p(d))});return z.useMemo(()=>({children:n,register:s,unregister:o,onStart:f,onStop:h,wait:u,chains:c}),[s,o,n,f,h,c,u])}function dfe(){}let pfe=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function bB(r){var e;let t={};for(let n of pfe)t[n]=(e=r[n])!=null?e:dfe;return t}function gfe(r){let e=z.useRef(bB(r));return z.useEffect(()=>{e.current=bB(r)},[r]),e}let yfe="div",xB=$g.RenderStrategy,wB=Mi(function(r,e){let{beforeEnter:t,afterEnter:n,beforeLeave:a,afterLeave:i,enter:o,enterFrom:s,enterTo:l,entered:u,leave:c,leaveFrom:f,leaveTo:h,...v}=r,d=z.useRef(null),p=al(d,e),g=v.unmount?Di.Unmount:Di.Hidden,{show:y,appear:m,initial:_}=hfe(),[b,w]=z.useState(y?"visible":"hidden"),x=vfe(),{register:S,unregister:T}=x,D=z.useRef(null);z.useEffect(()=>S(d),[S,d]),z.useEffect(()=>{if(g===Di.Hidden&&!!d.current){if(y&&b!=="visible"){w("visible");return}return qt(b,{hidden:()=>T(d),visible:()=>S(d)})}},[b,d,S,T,y,g]);let M=Mo({enter:il(o),enterFrom:il(s),enterTo:il(l),entered:il(u),leave:il(c),leaveFrom:il(f),leaveTo:il(h)}),A=gfe({beforeEnter:t,afterEnter:n,beforeLeave:a,afterLeave:i}),I=cS();z.useEffect(()=>{if(I&&b==="visible"&&d.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[d,b,I]);let P=_&&!m,E=(()=>!I||P||D.current===y?"idle":y?"enter":"leave")(),O=ir(q=>qt(q,{enter:()=>A.current.beforeEnter(),leave:()=>A.current.beforeLeave(),idle:()=>{}})),N=ir(q=>qt(q,{enter:()=>A.current.afterEnter(),leave:()=>A.current.afterLeave(),idle:()=>{}})),V=_B(()=>{w("hidden"),T(d)},x);cfe({container:d,classes:M,direction:E,onStart:Mo(q=>{V.onStart(d,q,O)}),onStop:Mo(q=>{V.onStop(d,q,N),q==="leave"&&!Ug(V)&&(w("hidden"),T(d))})}),z.useEffect(()=>{!P||(g===Di.Hidden?D.current=null:D.current=y)},[y,P,b]);let $=v,U={ref:p};return pe.default.createElement(Wg.Provider,{value:V},pe.default.createElement(yB,{value:qt(b,{visible:Lo.Open,hidden:Lo.Closed})},Ao({ourProps:U,theirProps:$,defaultTag:yfe,features:xB,visible:b==="visible",name:"Transition.Child"})))}),wS=Mi(function(r,e){let{show:t,appear:n=!1,unmount:a,...i}=r,o=z.useRef(null),s=al(o,e);cS();let l=gS();if(t===void 0&&l!==null&&(t=qt(l,{[Lo.Open]:!0,[Lo.Closed]:!1})),![!0,!1].includes(t))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[u,c]=z.useState(t?"visible":"hidden"),f=_B(()=>{c("hidden")}),[h,v]=z.useState(!0),d=z.useRef([t]);Nr(()=>{h!==!1&&d.current[d.current.length-1]!==t&&(d.current.push(t),v(!1))},[d,t]);let p=z.useMemo(()=>({show:t,appear:n,initial:h}),[t,n,h]);z.useEffect(()=>{if(t)c("visible");else if(!Ug(f))c("hidden");else{let y=o.current;if(!y)return;let m=y.getBoundingClientRect();m.x===0&&m.y===0&&m.width===0&&m.height===0&&c("hidden")}},[t,f]);let g={unmount:a};return pe.default.createElement(Wg.Provider,{value:f},pe.default.createElement(Gg.Provider,{value:p},Ao({ourProps:{...g,as:z.Fragment,children:pe.default.createElement(wB,{ref:s,...g,...i})},theirProps:{},defaultTag:z.Fragment,features:xB,visible:u==="visible",name:"Transition"})))}),mfe=Mi(function(r,e){let t=z.useContext(Gg)!==null,n=gS()!==null;return pe.default.createElement(pe.default.Fragment,null,!t&&n?pe.default.createElement(wS,{ref:e,...r}):pe.default.createElement(wB,{ref:e,...r}))}),jg=Object.assign(wS,{Child:mfe,Root:wS});var Jn={container:"_container_1qflp_1",popover:"_popover_1qflp_9",button:"_button_1qflp_17",buttonOpen:"_buttonOpen_1qflp_25",menu:"_menu_1qflp_33",enter:"_enter_1qflp_41",enterFrom:"_enterFrom_1qflp_49",enterTo:"_enterTo_1qflp_57",leave:"_leave_1qflp_65",leaveFrom:"_leaveFrom_1qflp_73",leaveTo:"_leaveTo_1qflp_81",center:"_center_1qflp_89",top:"_top_1qflp_97",bottom:"_bottom_1qflp_105",left:"_left_1qflp_113",right:"_right_1qflp_121","left-top-end":"_left-top-end_1qflp_129","right-top-end":"_right-top-end_1qflp_137","left-bottom-end":"_left-bottom-end_1qflp_145","right-bottom-end":"_right-bottom-end_1qflp_153","top-left":"_top-left_1qflp_161","top-right":"_top-right_1qflp_169","bottom-left":"_bottom-left_1qflp_177","bottom-right":"_bottom-right_1qflp_185","left-top":"_left-top_1qflp_129","left-bottom":"_left-bottom_1qflp_145","right-top":"_right-top_1qflp_137","right-bottom":"_right-bottom_1qflp_153"};const SB=r=>{var b,w;const{data:e,isLoading:t}=C$({id:r},{enabled:!!r}),n=e==null?void 0:e.guestTokens_by_pk,a=n!=null&&n.params?JSON.parse(n.params):{},i=(b=a.dashboard)==null?void 0:b.id,o=n==null?void 0:n.companyId,s=n==null?void 0:n.clientId,l=(w=a==null?void 0:a.dashboard)==null?void 0:w.isLive,u=a==null?void 0:a.rlsSettings,c=a==null?void 0:a.companyTenancyType,f=a==null?void 0:a.isTestKey,{data:h,isLoading:v}=m$({where:{externalDashboard:{externalDashboardId:{_eq:i}}}},{enabled:!!i}),{data:d,isLoading:p}=b$({externalDashboardId:i}),g=h==null?void 0:h.externalDashboardMetrics,{data:y,isLoading:m}=D$({companyId:o}),_=y!=null&&y.companySubsetTables.length?y.companySubsetTables[0].isAllowMetricCreation&&!f:!1;return{isLoading:t||v||p||m,data:{clientId:s,companyId:o,mode:l,externalDashboardMetrics:g,externalDashboard:d==null?void 0:d.externalDashboards[0],rlsSettings:u,companyTenancyType:c||"TABLE",isAllowedToCreateMetrics:_}}},_fe=({xAxis:r,yAxisList:e,chartType:t,step:n,measure:a,sankeyValues:i,singleValue:o,margins:s,legendSettings:l,labelSettings:u,axisSettings:c,customSettings:f,backGroundColor:h})=>t===Mt.funnel?{xAxis:"",yAxisList:[],chartType:t,step:n,measure:a,sankeyValues:[],singleValue:"",margins:s,legendSettings:l,labelSettings:u,axisSettings:c,customSettings:f}:t===Mt.gauge?{xAxis:"",yAxisList:[],chartType:t,step:"",measure:a,sankeyValues:[],singleValue:"",margins:s,legendSettings:l,labelSettings:u,axisSettings:c,customSettings:f}:t===Mt.singleValue?{xAxis:"",yAxisList:[],chartType:t,step:"",measure:"",sankeyValues:[],singleValue:o,margins:s,legendSettings:l,labelSettings:u,axisSettings:c,customSettings:f}:t===Mt.sankey?{xAxis:"",yAxisList:[],chartType:t,step:"",measure:"",sankeyValues:i,singleValue:"",margins:s,legendSettings:l,labelSettings:u,axisSettings:c,backGroundColor:h,customSettings:f}:{xAxis:r,yAxisList:e,chartType:t,step:"",measure:"",sankeyValues:[],singleValue:"",margins:s,legendSettings:l,labelSettings:u,axisSettings:c,backGroundColor:h,customSettings:f},CB=({companyIntegrationId:r,selectedColumns:e,query:t,metricQuery:n,integrationName:a,outputColumns:i,xAxis:o,yAxisList:s,chartType:l,step:u,measure:c,sankeyValues:f,singleValue:h,margins:v,legendSettings:d,labelSettings:p,axisSettings:g,customSettings:y,backGroundColor:m,clientId:_,companyId:b,mode:w,timeGrain:x,dashboardIds:S,isEnableGroupBy:T,groupBy:D,selectedGroupBy:M})=>{const[A,I]=z.useState(""),P=l$();return{createExternalMetric:O=>{I(""),P.mutate({companyId:b,companyIntegrationId:r,description:O.description,inputFields:e,metricId:O.metricId,name:O.name,query:t,metricQuery:n,integrationName:a,outputColumns:i,createdBy:"external user",isLive:w||O.isLive,chartOptions:_fe({xAxis:o,yAxisList:s,chartType:l,step:u,measure:c,sankeyValues:f,singleValue:h,margins:v,legendSettings:d,labelSettings:p,axisSettings:g,customSettings:y,backGroundColor:m}),clientId:_||null,isCreatedByClient:!!_,timeGrain:x||null,externalDashboardIds:S.map(N=>({externalDashboardId:N})),isEnableGroupBy:T,groupBy:D!=null?D:{},selectedGroupBy:M},{onSuccess:N=>{var V;(V=N.insert_externalMetrics_one)!=null&&V.id&&window.location.reload()},onError:()=>{I&&I("Metric Id already exists")}})},error:A}},Yg=()=>{const{mutate:r,isLoading:e,error:t}=h$(),{mutate:n}=c$();return{generateDatasetMetric:r,isGeneratingDataset:e,generateError:t,fetchColumnValues:n}},bfe=({clientId:r,companyId:e,setData:t,setError:n,setLoading:a,setQuery:i,setMetricQuery:o})=>{const s=d$();return{generateEmbeddedMetric:u=>{a(!0),i(""),n(""),t(void 0),s.mutate({clientId:r,companyId:e,queryPrompt:u.queryPrompt,timeGrain:u.timeGrain},{onSuccess:c=>{var f,h,v;(f=c.generateEmbeddedMetic)!=null&&f.error?(a(!1),i(""),t(void 0),n(c.generateEmbeddedMetic.error.message)):(o(u.queryPrompt),n(""),a(!1),i(((h=c.generateEmbeddedMetic)==null?void 0:h.query)||""),t((v=c.generateEmbeddedMetic)==null?void 0:v.result))},onError:()=>{a(!1),i(""),t(void 0),n(Sm)}})}}},qg=({onOutsideClick:r,wrapRef:e})=>{z.useEffect(()=>{const t=n=>{e.current&&!e.current.contains(n.target)&&r()};return document.addEventListener("mousedown",t),()=>{document.removeEventListener("mousedown",t)}},[e,r])};var xfe=Object.freeze(Object.defineProperty({__proto__:null,useEmbeddedDashboard:SB,useExternalMetric:CB,useGenerateDatasetMetrics:Yg,useGenerateEmbeddedMetric:bfe,useOutsideAlerter:qg},Symbol.toStringTag,{value:"Module"}));const Zg=({className:r="",menuClass:e="",menuContainerClass:t="",buttonClass:n="",children:a,button:i,position:o="bottom",isDisabled:s})=>{const[l,u]=z.useState(!1),c=z.useRef(null);return qg({wrapRef:c,onOutsideClick:()=>u(!1)}),C(Se,{children:B("div",{className:`${Jn.container} ${r}`,ref:c,children:[C(Le,{className:`${n} ${l?Jn.buttonOpen:""} ${Jn.button}`,type:"button",variant:"custom",onClick:()=>!s&&u(f=>!f),children:i}),s?null:C("div",{className:`${Jn.popover} ${Jn[o]} ${t}`,children:C(jg,{as:"div",className:`${Jn.menu} ${e}`,show:l,enter:Jn.enter,enterFrom:Jn.enterFrom,enterTo:Jn.enterTo,leave:Jn.leave,leaveFrom:Jn.leaveFrom,leaveTo:Jn.leaveTo,children:a})})]})})};var TB="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMDAgMzAwIj48ZGVmcz48c3R5bGU+LmNscy0xe3N0cm9rZTojMTgyYzYwO30uY2xzLTEsLmNscy0ye2ZpbGw6bm9uZTtzdHJva2UtbGluZWNhcDpyb3VuZDtzdHJva2UtbGluZWpvaW46cm91bmQ7fS5jbHMtM3tmaWxsOiM1ODY1ZjY7b3BhY2l0eTouMTt9LmNscy00e2ZpbGw6I2YyZjNmNDt9LmNscy01e2ZpbGw6I2MxYzdjOTt9LmNscy02e2ZpbGw6I2RhZGVkZjt9LmNscy03e2ZpbGw6IzE4MmM2MDt9LmNscy0ye3N0cm9rZTojNTg2NWY2O3N0cm9rZS13aWR0aDo0cHg7fTwvc3R5bGU+PC9kZWZzPjxwYXRoIGNsYXNzPSJjbHMtMSIgZD0ibTIxMC41LDIwMC44M2MuNC0uNjYuNjgtMS40LjgyLTIuMiwxLjU4LTguODcsMy4xNS0xNy43NSw0LjczLTI2LjYyLDIuMDMtMTEuNDQsNC4wNi0yMi44OCw2LjA5LTM0LjMyLjcyLTQuMDgsMS43Ny04LjI1LDIuMTYtMTIuMzguNDMtNC41Ni0yLjA5LTkuNjgtNi44Ni0xMC42Ni0uMDEsMC0uMDMsMC0uMDQsMC0yLjQtLjQ5LTUuMDItLjIyLTcuNDUtLjIyaC00NC4yMmMtLjUyLDAtMi4zMy0uMzEtMi43NywwbC0yNC4yOCwxNy4yMmgtNjEuNjFjLTMuOTcsMC02Ljk5LDMuNTYtNi4zNCw3LjQ3bDkuNzUsNTkuNDJjLjUxLDMuMTEsMy4yLDUuMzksNi4zNCw1LjM5aDExNy44NiIvPjxwYXRoIGNsYXNzPSJjbHMtMSIgZD0ibTIwNywxMTQuNDN2LTguNTRjMC0zLjU1LTIuODgtNi40My02LjQzLTYuNDNoLTE3LjE5Ii8+PHBhdGggY2xhc3M9ImNscy0xIiBkPSJtMTAzLjQ3LDk5LjQ2aC0xNS4xMmMtMy41NSwwLTYuNDMsMi44OC02LjQzLDYuNDN2MjUuNDgiLz48Zz48bGluZSBjbGFzcz0iY2xzLTIiIHgxPSIxMTQuMTIiIHkxPSI5NC4wOCIgeDI9IjE0NC44NCIgeTI9Ijk0LjA4Ii8+PGc+PHJlY3QgY2xhc3M9ImNscy02IiB4PSIxMTIuNjEiIHk9IjEwMi40MyIgd2lkdGg9IjE4Ljk3IiBoZWlnaHQ9IjMuMiIvPjxyZWN0IGNsYXNzPSJjbHMtNCIgeD0iMTM3LjYxIiB5PSIxMDIuNDMiIHdpZHRoPSI4LjkiIGhlaWdodD0iMy4yIi8+PC9nPjwvZz48cGF0aCBjbGFzcz0iY2xzLTMiIGQ9Im0xNjQuOTgsODEuNDZsLS4wOCwxNi4yOHMuMTUsMy4yNC4zLDMuNjIuNiwxLjUxLDEuMTMsMS44OCwxLjAyLjc5LDEuNzcsMS4wNi45NC40OSwyLjExLjQ5LDE4LjE3LjA0LDE4LjE3LjA0bC0yMy40MS0yMy4zN1oiLz48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Im0xODguNTEsMTA0LjkxdjkuNTIiLz48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Im0xMDMuNTMsMTMxLjM3di00NC45NWMwLTIuODQsMi4zLTUuMTUsNS4xNS01LjE1LDE4Ljc3LDAsMzcuNTQsMCw1Ni4zMSwwIi8+PHBhdGggY2xhc3M9ImNscy0xIiBkPSJtMTY1LjAxLDgxLjI3djE4LjM1YzAsMi44NCwyLjMxLDUuMTUsNS4xNSw1LjE1aDE4LjM1cy0yMy41LTIzLjYyLTIzLjUtMjMuNVoiLz48Y2lyY2xlIGNsYXNzPSJjbHMtMSIgY3g9IjE2OC4yMSIgY3k9IjE2My4yNyIgcj0iMjQuOTYiLz48Y2lyY2xlIGNsYXNzPSJjbHMtMSIgY3g9IjE2OC4yMSIgY3k9IjE2My4yNyIgcj0iMzEuMjUiLz48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Im0xOTIuNTcsMTgzLjMzYzkuNjIsOS42MiwzMC4yOCwzMC4yOCwzMC4yOCwzMC4yOCwxLjE3LDEuMTcsMS4xNywzLjA3LDAsNC4yNHMtMy4wNywxLjE3LTQuMjQsMGMwLDAtMjAuNTgtMjAuNTgtMzAuMjItMzAuMjIiLz48Zz48cGF0aCBjbGFzcz0iY2xzLTUiIGQ9Im0xNjguNjYsMTcwLjkzYy0uNzQsMC0xLjM0LjI0LTEuODEuNzItLjQ3LjQ4LS43MSwxLjA5LS43MSwxLjgzcy4yNCwxLjMyLjcxLDEuODFjLjQ3LjQ5LDEuMDcuNzQsMS44MS43NHMxLjM0LS4yNSwxLjgxLS43NGMuNDctLjQ5LjcxLTEuMS43MS0xLjgxcy0uMjQtMS4zNC0uNzEtMS44M2MtLjQ3LS40OC0xLjA4LS43Mi0xLjgxLS43MloiLz48cGF0aCBjbGFzcz0iY2xzLTUiIGQ9Im0xNzQuNjksMTUzLjc3Yy0uNjItMS4wMi0xLjQ5LTEuODItMi42LTIuNC0xLjEyLS41Ny0yLjQtLjg2LTMuODUtLjg2LTEuNjgsMC0zLjE3LjQtNC40NywxLjE5cy0yLjI5LDEuOTQtMi45OCwzLjQzbDIuNzYsMi4yOGMuNDYtMS4wNiwxLjA3LTEuODYsMS44NS0yLjQuNzctLjU0LDEuNjUtLjgxLDIuNjQtLjgxLjc2LDAsMS40MS4xNCwxLjk3LjQxLjU1LjI4Ljk4LjY3LDEuMjgsMS4xNy4zLjUxLjQ1LDEuMS40NSwxLjc5cy0uMTYsMS4yOS0uNDcsMS44MWMtLjMxLjUyLS43NS45Mi0xLjMxLDEuMjEtLjU2LjI5LTEuMjIuNDMtMS45OC40M2gtLjkzdjYuNjZoMy4yOGwuMjYtMy43M2MuNzEtLjI0LDEuMzctLjU1LDEuOTUtLjkzLjk5LS42NCwxLjc1LTEuNDUsMi4yOS0yLjQxLjU0LS45Ny44MS0yLjA3LjgxLTMuMzEsMC0xLjMzLS4zMS0yLjUxLS45My0zLjU0WiIvPjwvZz48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Im04NS41NSwyMDMuOTdjLjY4LDIuODksMy4yNiw0Ljk2LDYuMjYsNC45NmgxMTcuNzMiLz48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Im0yMTUuMzcsMjA2LjA0Yy40Ny0uNzEuOC0xLjUyLjk1LTIuNCwxLjU4LTguODcsMy4xNS0xNy43NSw0LjczLTI2LjYyLDIuMDMtMTEuNDQsNC4wNi0yMi44OCw2LjA5LTM0LjMyLjcyLTQuMDgsMS43Ny04LjI1LDIuMTYtMTIuMzguMzktNC4xNi0xLjY4LTguNzktNS42Ny0xMC4zMSIvPjxwYXRoIGNsYXNzPSJjbHMtNyIgZD0ibTIyMy41MSwxMjAuMDhzLjQ5LDEuNjIuNTMsMS43My4zMiwyLjQ0LjMyLDIuNDRsLS4wNCwxLjkxLTEuMzgsNy4xMy0zLjM5LDE5LjMxLTIuODksMTUuOTItMi45NiwxNi43Ni0yLjQ0LDEzLjE2LS45MiwyLjY1LDQuOTgsNS4xNS44NS0yLjE1LjgxLTQuMDYsMS40OC04LjMzLDIuODItMTUuNzEsMi4xNS0xMi4xMSwxLjk0LTExLjM2LDIuNzUtMTQuNzUuODgtNC42OS4yOC0yLjU4LjA3LTIuMTItLjYtMi43NS0xLjI0LTIuMzYtMS4wOS0xLjU5LTIuMDEtMS4zMS0uOTItLjI4WiIvPjxwb2x5Z29uIGNsYXNzPSJjbHMtNyIgcG9pbnRzPSI4NS42OCAyMDMuOTMgMjA0LjU1IDIwMy44NCAyMDkuMzUgMjA4LjczIDE0OC40OCAyMDguODggOTAuOTUgMjA5LjAyIDg5LjUgMjA4LjY2IDg3Ljk4IDIwNy45MiA4Ni44MiAyMDYuNTggODYuMDEgMjA1LjAzIDg1LjY4IDIwMy45MyIvPjwvc3ZnPg==",Bt={container:"_container_1w020_1",wrapper:"_wrapper_1w020_5",label:"_label_1w020_9",floatingLabel:"_floatingLabel_1w020_13",clientText:"_clientText_1w020_17",normalText:"_normalText_1w020_21",dropdown:"_dropdown_1w020_25",options:"_options_1w020_29",checkedOption:"_checkedOption_1w020_33",option:"_option_1w020_29",icon:"_icon_1w020_41",text:"_text_1w020_45",floatingText:"_floatingText_1w020_49",search:"_search_1w020_53",loadMore:"_loadMore_1w020_57"},Dh=r=>r.type==="checkbox",Uu=r=>r instanceof Date,kr=r=>r==null;const DB=r=>typeof r=="object";var wr=r=>!kr(r)&&!Array.isArray(r)&&DB(r)&&!Uu(r),MB=r=>wr(r)&&r.target?Dh(r.target)?r.target.checked:r.target.value:r,wfe=r=>r.substring(0,r.search(/\.\d+(\.|$)/))||r,AB=(r,e)=>r.has(wfe(e)),Xg=r=>Array.isArray(r)?r.filter(Boolean):[],Ft=r=>r===void 0,be=(r,e,t)=>{if(!e||!wr(r))return t;const n=Xg(e.split(/[,[\].]+?/)).reduce((a,i)=>kr(a)?a:a[i],r);return Ft(n)||n===r?Ft(r[e])?t:r[e]:n};const Qg={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Da={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Ai={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Sfe=pe.default.createContext(null),SS=()=>pe.default.useContext(Sfe);var LB=(r,e,t,n=!0)=>{const a={};for(const i in r)Object.defineProperty(a,i,{get:()=>{const o=i;return e[o]!==Da.all&&(e[o]=!n||Da.all),t&&(t[o]=!0),r[o]}});return a},ea=r=>wr(r)&&!Object.keys(r).length,IB=(r,e,t)=>{const{name:n,...a}=r;return ea(a)||Object.keys(a).length>=Object.keys(e).length||Object.keys(a).find(i=>e[i]===(!t||Da.all))},Kg=r=>Array.isArray(r)?r:[r],PB=(r,e,t)=>t&&e?r===e:!r||!e||r===e||Kg(r).some(n=>n&&(n.startsWith(e)||e.startsWith(n)));function CS(r){const e=pe.default.useRef(r);e.current=r,pe.default.useEffect(()=>{const t=a=>{a&&a.unsubscribe()},n=!r.disabled&&e.current.subject.subscribe({next:e.current.callback});return()=>t(n)},[r.disabled])}function Cfe(r){const e=SS(),{control:t=e.control,disabled:n,name:a,exact:i}=r||{},[o,s]=pe.default.useState(t._formState),l=pe.default.useRef({isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),u=pe.default.useRef(a),c=pe.default.useRef(!0);u.current=a;const f=pe.default.useCallback(h=>c.current&&PB(u.current,h.name,i)&&IB(h,l.current)&&s({...t._formState,...h}),[t,i]);return CS({disabled:n,callback:f,subject:t._subjects.state}),pe.default.useEffect(()=>(c.current=!0,()=>{c.current=!1}),[]),LB(o,t._proxyFormState,l.current,!1)}var Ja=r=>typeof r=="string",EB=(r,e,t,n)=>{const a=Array.isArray(r);return Ja(r)?(n&&e.watch.add(r),be(t,r)):a?r.map(i=>(n&&e.watch.add(i),be(t,i))):(n&&(e.watchAll=!0),t)},Jg=r=>typeof r=="function",TS=r=>{for(const e in r)if(Jg(r[e]))return!0;return!1};function Tfe(r){const e=SS(),{control:t=e.control,name:n,defaultValue:a,disabled:i,exact:o}=r||{},s=pe.default.useRef(n);s.current=n;const l=pe.default.useCallback(f=>{if(PB(s.current,f.name,o)){const h=EB(s.current,t._names,f.values||t._formValues);c(Ft(s.current)||wr(h)&&!TS(h)?{...h}:Array.isArray(h)?[...h]:Ft(h)?a:h)}},[t,o,a]);CS({disabled:i,subject:t._subjects.watch,callback:l});const[u,c]=pe.default.useState(Ft(a)?t._getWatch(n):a);return pe.default.useEffect(()=>{t._removeUnmounted()}),u}function Dfe(r){const e=SS(),{name:t,control:n=e.control,shouldUnregister:a}=r,i=AB(n._names.array,t),o=Tfe({control:n,name:t,defaultValue:be(n._formValues,t,be(n._defaultValues,t,r.defaultValue)),exact:!0}),s=Cfe({control:n,name:t}),l=pe.default.useRef(n.register(t,{...r.rules,value:o}));return pe.default.useEffect(()=>{const u=(c,f)=>{const h=be(n._fields,c);h&&(h._f.mount=f)};return u(t,!0),()=>{const c=n._options.shouldUnregister||a;(i?c&&!n._stateFlags.action:c)?n.unregister(t):u(t,!1)}},[t,n,i,a]),{field:{name:t,value:o,onChange:pe.default.useCallback(u=>{l.current.onChange({target:{value:MB(u),name:t},type:Qg.CHANGE})},[t]),onBlur:pe.default.useCallback(()=>{l.current.onBlur({target:{value:be(n._formValues,t),name:t},type:Qg.BLUR})},[t,n]),ref:pe.default.useCallback(u=>{const c=be(n._fields,t);u&&c&&u.focus&&(c._f.ref={focus:()=>u.focus(),select:()=>u.select(),setCustomValidity:f=>u.setCustomValidity(f),reportValidity:()=>u.reportValidity()})},[t,n._fields])},formState:s,fieldState:Object.defineProperties({},{invalid:{get:()=>!!be(s.errors,t)},isDirty:{get:()=>!!be(s.dirtyFields,t)},isTouched:{get:()=>!!be(s.touchedFields,t)},error:{get:()=>be(s.errors,t)}})}}const DS=r=>r.render(Dfe(r));var Mfe=(r,e,t,n,a)=>e?{...t[r],types:{...t[r]&&t[r].types?t[r].types:{},[n]:a||!0}}:{},MS=r=>/^\w*$/.test(r),OB=r=>Xg(r.replace(/["|']|\]/g,"").split(/\.|\[/));function Vt(r,e,t){let n=-1;const a=MS(e)?[e]:OB(e),i=a.length,o=i-1;for(;++n<i;){const s=a[n];let l=t;if(n!==o){const u=r[s];l=wr(u)||Array.isArray(u)?u:isNaN(+a[n+1])?{}:[]}r[s]=l,r=r[s]}return r}const AS=(r,e,t)=>{for(const n of t||Object.keys(r)){const a=be(r,n);if(a){const{_f:i,...o}=a;if(i&&e(i.name)){if(i.ref.focus&&Ft(i.ref.focus()))break;if(i.refs){i.refs[0].focus();break}}else wr(o)&&AS(o,e)}}};var RB=(r,e,t)=>!t&&(e.watchAll||e.watch.has(r)||[...e.watch].some(n=>r.startsWith(n)&&/^\.\w+/.test(r.slice(n.length)))),LS=typeof window!="undefined"&&typeof window.HTMLElement!="undefined"&&typeof document!="undefined";function ol(r){let e;const t=Array.isArray(r);if(r instanceof Date)e=new Date(r);else if(r instanceof Set)e=new Set(r);else if(!(LS&&(r instanceof Blob||r instanceof FileList))&&(t||wr(r))){e=t?[]:{};for(const n in r){if(Jg(r[n])){e=r;break}e[n]=ol(r[n])}}else return r;return e}function Afe(r,e){const t=e.slice(0,-1).length;let n=0;for(;n<t;)r=Ft(r)?n++:r[e[n++]];return r}function Xr(r,e){const t=MS(e)?[e]:OB(e),n=t.length==1?r:Afe(r,t),a=t[t.length-1];let i;n&&delete n[a];for(let o=0;o<t.slice(0,-1).length;o++){let s=-1,l;const u=t.slice(0,-(o+1)),c=u.length-1;for(o>0&&(i=r);++s<u.length;){const f=u[s];l=l?l[f]:r[f],c===s&&(wr(l)&&ea(l)||Array.isArray(l)&&!l.filter(h=>!Ft(h)).length)&&(i?delete i[f]:delete r[f]),i=l}}return r}function IS(){let r=[];return{get observers(){return r},next:a=>{for(const i of r)i.next(a)},subscribe:a=>(r.push(a),{unsubscribe:()=>{r=r.filter(i=>i!==a)}}),unsubscribe:()=>{r=[]}}}var ey=r=>kr(r)||!DB(r);function ju(r,e){if(ey(r)||ey(e))return r===e;if(Uu(r)&&Uu(e))return r.getTime()===e.getTime();const t=Object.keys(r),n=Object.keys(e);if(t.length!==n.length)return!1;for(const a of t){const i=r[a];if(!n.includes(a))return!1;if(a!=="ref"){const o=e[a];if(Uu(i)&&Uu(o)||wr(i)&&wr(o)||Array.isArray(i)&&Array.isArray(o)?!ju(i,o):i!==o)return!1}}return!0}var NB=r=>({isOnSubmit:!r||r===Da.onSubmit,isOnBlur:r===Da.onBlur,isOnChange:r===Da.onChange,isOnAll:r===Da.all,isOnTouch:r===Da.onTouched}),ty=r=>typeof r=="boolean",PS=r=>r.type==="file",ES=r=>{const e=r?r.ownerDocument:0,t=e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement;return r instanceof t},kB=r=>r.type==="select-multiple",OS=r=>r.type==="radio",Lfe=r=>OS(r)||Dh(r),RS=r=>ES(r)&&r.isConnected;function ry(r,e={}){const t=Array.isArray(r);if(wr(r)||t)for(const n in r)Array.isArray(r[n])||wr(r[n])&&!TS(r[n])?(e[n]=Array.isArray(r[n])?[]:{},ry(r[n],e[n])):kr(r[n])||(e[n]=!0);return e}function zB(r,e,t){const n=Array.isArray(r);if(wr(r)||n)for(const a in r)Array.isArray(r[a])||wr(r[a])&&!TS(r[a])?Ft(e)||ey(t[a])?t[a]=Array.isArray(r[a])?ry(r[a],[]):{...ry(r[a])}:zB(r[a],kr(e)?{}:e[a],t[a]):t[a]=!ju(r[a],e[a]);return t}var NS=(r,e)=>zB(r,e,ry(e));const BB={value:!1,isValid:!1},FB={value:!0,isValid:!0};var VB=r=>{if(Array.isArray(r)){if(r.length>1){const e=r.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:e,isValid:!!e.length}}return r[0].checked&&!r[0].disabled?r[0].attributes&&!Ft(r[0].attributes.value)?Ft(r[0].value)||r[0].value===""?FB:{value:r[0].value,isValid:!0}:FB:BB}return BB},$B=(r,{valueAsNumber:e,valueAsDate:t,setValueAs:n})=>Ft(r)?r:e?r===""||kr(r)?NaN:+r:t&&Ja(r)?new Date(r):n?n(r):r;const HB={isValid:!1,value:null};var GB=r=>Array.isArray(r)?r.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,HB):HB;function kS(r){const e=r.ref;if(!(r.refs?r.refs.every(t=>t.disabled):e.disabled))return PS(e)?e.files:OS(e)?GB(r.refs).value:kB(e)?[...e.selectedOptions].map(({value:t})=>t):Dh(e)?VB(r.refs).value:$B(Ft(e.value)?r.ref.value:e.value,r)}var Ife=(r,e,t,n)=>{const a={};for(const i of r){const o=be(e,i);o&&Vt(a,i,o._f)}return{criteriaMode:t,names:[...r],fields:a,shouldUseNativeValidation:n}},ny=r=>r instanceof RegExp,Mh=r=>Ft(r)?void 0:ny(r)?r.source:wr(r)?ny(r.value)?r.value.source:r.value:r,Pfe=r=>r.mount&&(r.required||r.min||r.max||r.maxLength||r.minLength||r.pattern||r.validate);function WB(r,e,t){const n=be(r,t);if(n||MS(t))return{error:n,name:t};const a=t.split(".");for(;a.length;){const i=a.join("."),o=be(e,i),s=be(r,i);if(o&&!Array.isArray(o)&&t!==i)return{name:t};if(s&&s.type)return{name:i,error:s};a.pop()}return{name:t}}var Efe=(r,e,t,n,a)=>a.isOnAll?!1:!t&&a.isOnTouch?!(e||r):(t?n.isOnBlur:a.isOnBlur)?!r:(t?n.isOnChange:a.isOnChange)?r:!0,Ofe=(r,e)=>!Xg(be(r,e)).length&&Xr(r,e),ay=r=>Ja(r)||pe.default.isValidElement(r);function UB(r,e,t="validate"){if(ay(r)||Array.isArray(r)&&r.every(ay)||ty(r)&&!r)return{type:t,message:ay(r)?r:"",ref:e}}var Yu=r=>wr(r)&&!ny(r)?r:{value:r,message:""},jB=async(r,e,t,n)=>{const{ref:a,refs:i,required:o,maxLength:s,minLength:l,min:u,max:c,pattern:f,validate:h,name:v,valueAsNumber:d,mount:p,disabled:g}=r._f;if(!p||g)return{};const y=i?i[0]:a,m=M=>{n&&y.reportValidity&&(y.setCustomValidity(ty(M)?"":M||" "),y.reportValidity())},_={},b=OS(a),w=Dh(a),x=b||w,S=(d||PS(a))&&!a.value||e===""||Array.isArray(e)&&!e.length,T=Mfe.bind(null,v,t,_),D=(M,A,I,P=Ai.maxLength,E=Ai.minLength)=>{const O=M?A:I;_[v]={type:M?P:E,message:O,ref:a,...T(M?P:E,O)}};if(o&&(!x&&(S||kr(e))||ty(e)&&!e||w&&!VB(i).isValid||b&&!GB(i).isValid)){const{value:M,message:A}=ay(o)?{value:!!o,message:o}:Yu(o);if(M&&(_[v]={type:Ai.required,message:A,ref:y,...T(Ai.required,A)},!t))return m(A),_}if(!S&&(!kr(u)||!kr(c))){let M,A;const I=Yu(c),P=Yu(u);if(!kr(e)&&!isNaN(e)){const E=a.valueAsNumber||+e;kr(I.value)||(M=E>I.value),kr(P.value)||(A=E<P.value)}else{const E=a.valueAsDate||new Date(e);Ja(I.value)&&(M=E>new Date(I.value)),Ja(P.value)&&(A=E<new Date(P.value))}if((M||A)&&(D(!!M,I.message,P.message,Ai.max,Ai.min),!t))return m(_[v].message),_}if((s||l)&&!S&&Ja(e)){const M=Yu(s),A=Yu(l),I=!kr(M.value)&&e.length>M.value,P=!kr(A.value)&&e.length<A.value;if((I||P)&&(D(I,M.message,A.message),!t))return m(_[v].message),_}if(f&&!S&&Ja(e)){const{value:M,message:A}=Yu(f);if(ny(M)&&!e.match(M)&&(_[v]={type:Ai.pattern,message:A,ref:a,...T(Ai.pattern,A)},!t))return m(A),_}if(h){if(Jg(h)){const M=await h(e),A=UB(M,y);if(A&&(_[v]={...A,...T(Ai.validate,A.message)},!t))return m(A.message),_}else if(wr(h)){let M={};for(const A in h){if(!ea(M)&&!t)break;const I=UB(await h[A](e),y,A);I&&(M={...I,...T(A,I.message)},m(I.message),t&&(_[v]=M))}if(!ea(M)&&(_[v]={ref:y,...M},!t))return _}}return m(!0),_};const Rfe={mode:Da.onSubmit,reValidateMode:Da.onChange,shouldFocusError:!0};function Nfe(r={}){let e={...Rfe,...r},t={isDirty:!1,isValidating:!1,dirtyFields:{},isSubmitted:!1,submitCount:0,touchedFields:{},isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,errors:{}},n={},a=ol(e.defaultValues)||{},i=e.shouldUnregister?{}:ol(a),o={action:!1,mount:!1,watch:!1},s={mount:new Set,unMount:new Set,array:new Set,watch:new Set},l,u=0,c={};const f={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},h={watch:IS(),array:IS(),state:IS()},v=NB(e.mode),d=NB(e.reValidateMode),p=e.criteriaMode===Da.all,g=R=>F=>{clearTimeout(u),u=window.setTimeout(R,F)},y=async R=>{let F=!1;return f.isValid&&(F=e.resolver?ea((await S()).errors):await D(n,!0),!R&&F!==t.isValid&&(t.isValid=F,h.state.next({isValid:F}))),F},m=(R,F=[],G,ae,re=!0,K=!0)=>{if(ae&&G){if(o.action=!0,K&&Array.isArray(be(n,R))){const ue=G(be(n,R),ae.argA,ae.argB);re&&Vt(n,R,ue)}if(f.errors&&K&&Array.isArray(be(t.errors,R))){const ue=G(be(t.errors,R),ae.argA,ae.argB);re&&Vt(t.errors,R,ue),Ofe(t.errors,R)}if(f.touchedFields&&K&&Array.isArray(be(t.touchedFields,R))){const ue=G(be(t.touchedFields,R),ae.argA,ae.argB);re&&Vt(t.touchedFields,R,ue)}f.dirtyFields&&(t.dirtyFields=NS(a,i)),h.state.next({isDirty:A(R,F),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else Vt(i,R,F)},_=(R,F)=>{Vt(t.errors,R,F),h.state.next({errors:t.errors})},b=(R,F,G,ae)=>{const re=be(n,R);if(re){const K=be(i,R,Ft(G)?be(a,R):G);Ft(K)||ae&&ae.defaultChecked||F?Vt(i,R,F?K:kS(re._f)):E(R,K),o.mount&&y()}},w=(R,F,G,ae,re)=>{let K=!1;const ue={name:R},Re=be(t.touchedFields,R);if(f.isDirty){const mt=t.isDirty;t.isDirty=ue.isDirty=A(),K=mt!==ue.isDirty}if(f.dirtyFields&&(!G||ae)){const mt=be(t.dirtyFields,R);ju(be(a,R),F)?Xr(t.dirtyFields,R):Vt(t.dirtyFields,R,!0),ue.dirtyFields=t.dirtyFields,K=K||mt!==be(t.dirtyFields,R)}return G&&!Re&&(Vt(t.touchedFields,R,G),ue.touchedFields=t.touchedFields,K=K||f.touchedFields&&Re!==G),K&&re&&h.state.next(ue),K?ue:{}},x=async(R,F,G,ae)=>{const re=be(t.errors,R),K=f.isValid&&t.isValid!==F;if(r.delayError&&G?(l=g(()=>_(R,G)),l(r.delayError)):(clearTimeout(u),l=null,G?Vt(t.errors,R,G):Xr(t.errors,R)),(G?!ju(re,G):re)||!ea(ae)||K){const ue={...ae,...K?{isValid:F}:{},errors:t.errors,name:R};t={...t,...ue},h.state.next(ue)}c[R]--,f.isValidating&&!Object.values(c).some(ue=>ue)&&(h.state.next({isValidating:!1}),c={})},S=async R=>e.resolver?await e.resolver({...i},e.context,Ife(R||s.mount,n,e.criteriaMode,e.shouldUseNativeValidation)):{},T=async R=>{const{errors:F}=await S();if(R)for(const G of R){const ae=be(F,G);ae?Vt(t.errors,G,ae):Xr(t.errors,G)}else t.errors=F;return F},D=async(R,F,G={valid:!0})=>{for(const ae in R){const re=R[ae];if(re){const{_f:K,...ue}=re;if(K){const Re=await jB(re,be(i,K.name),p,e.shouldUseNativeValidation);if(Re[K.name]&&(G.valid=!1,F))break;F||(Re[K.name]?Vt(t.errors,K.name,Re[K.name]):Xr(t.errors,K.name))}ue&&await D(ue,F,G)}}return G.valid},M=()=>{for(const R of s.unMount){const F=be(n,R);F&&(F._f.refs?F._f.refs.every(G=>!RS(G)):!RS(F._f.ref))&&X(R)}s.unMount=new Set},A=(R,F)=>(R&&F&&Vt(i,R,F),!ju(U(),a)),I=(R,F,G)=>{const ae={...o.mount?i:Ft(F)?a:Ja(R)?{[R]:F}:F};return EB(R,s,ae,G)},P=R=>Xg(be(o.mount?i:a,R,r.shouldUnregister?be(a,R,[]):[])),E=(R,F,G={})=>{const ae=be(n,R);let re=F;if(ae){const K=ae._f;K&&(!K.disabled&&Vt(i,R,$B(F,K)),re=LS&&ES(K.ref)&&kr(F)?"":F,kB(K.ref)?[...K.ref.options].forEach(ue=>ue.selected=re.includes(ue.value)):K.refs?Dh(K.ref)?K.refs.length>1?K.refs.forEach(ue=>!ue.disabled&&(ue.checked=Array.isArray(re)?!!re.find(Re=>Re===ue.value):re===ue.value)):K.refs[0]&&(K.refs[0].checked=!!re):K.refs.forEach(ue=>ue.checked=ue.value===re):PS(K.ref)?K.ref.value="":(K.ref.value=re,K.ref.type||h.watch.next({name:R})))}(G.shouldDirty||G.shouldTouch)&&w(R,re,G.shouldTouch,G.shouldDirty,!0),G.shouldValidate&&$(R)},O=(R,F,G)=>{for(const ae in F){const re=F[ae],K=`${R}.${ae}`,ue=be(n,K);(s.array.has(R)||!ey(re)||ue&&!ue._f)&&!Uu(re)?O(K,re,G):E(K,re,G)}},N=(R,F,G={})=>{const ae=be(n,R),re=s.array.has(R),K=ol(F);Vt(i,R,K),re?(h.array.next({name:R,values:i}),(f.isDirty||f.dirtyFields)&&G.shouldDirty&&(t.dirtyFields=NS(a,i),h.state.next({name:R,dirtyFields:t.dirtyFields,isDirty:A(R,K)}))):ae&&!ae._f&&!kr(K)?O(R,K,G):E(R,K,G),RB(R,s)&&h.state.next({}),h.watch.next({name:R})},V=async R=>{const F=R.target;let G=F.name;const ae=be(n,G);if(ae){let re,K;const ue=F.type?kS(ae._f):MB(R),Re=R.type===Qg.BLUR||R.type===Qg.FOCUS_OUT,mt=!Pfe(ae._f)&&!e.resolver&&!be(t.errors,G)&&!ae._f.deps||Efe(Re,be(t.touchedFields,G),t.isSubmitted,d,v),Xe=RB(G,s,Re);Vt(i,G,ue),Re?(ae._f.onBlur&&ae._f.onBlur(R),l&&l(0)):ae._f.onChange&&ae._f.onChange(R);const Zt=w(G,ue,Re,!1),St=!ea(Zt)||Xe;if(!Re&&h.watch.next({name:G,type:R.type}),mt)return St&&h.state.next({name:G,...Xe?{}:Zt});if(!Re&&Xe&&h.state.next({}),c[G]=(c[G],1),h.state.next({isValidating:!0}),e.resolver){const{errors:Jr}=await S([G]),fr=WB(t.errors,n,G),st=WB(Jr,n,fr.name||G);re=st.error,G=st.name,K=ea(Jr)}else re=(await jB(ae,be(i,G),p,e.shouldUseNativeValidation))[G],K=await y(!0);ae._f.deps&&$(ae._f.deps),x(G,K,re,Zt)}},$=async(R,F={})=>{let G,ae;const re=Kg(R);if(h.state.next({isValidating:!0}),e.resolver){const K=await T(Ft(R)?R:re);G=ea(K),ae=R?!re.some(ue=>be(K,ue)):G}else R?(ae=(await Promise.all(re.map(async K=>{const ue=be(n,K);return await D(ue&&ue._f?{[K]:ue}:ue)}))).every(Boolean),!(!ae&&!t.isValid)&&y()):ae=G=await D(n);return h.state.next({...!Ja(R)||f.isValid&&G!==t.isValid?{}:{name:R},...e.resolver?{isValid:G}:{},errors:t.errors,isValidating:!1}),F.shouldFocus&&!ae&&AS(n,K=>be(t.errors,K),R?re:s.mount),ae},U=R=>{const F={...a,...o.mount?i:{}};return Ft(R)?F:Ja(R)?be(F,R):R.map(G=>be(F,G))},q=(R,F)=>({invalid:!!be((F||t).errors,R),isDirty:!!be((F||t).dirtyFields,R),isTouched:!!be((F||t).touchedFields,R),error:be((F||t).errors,R)}),te=R=>{R?Kg(R).forEach(F=>Xr(t.errors,F)):t.errors={},h.state.next({errors:t.errors})},H=(R,F,G)=>{const ae=(be(n,R,{_f:{}})._f||{}).ref;Vt(t.errors,R,{...F,ref:ae}),h.state.next({name:R,errors:t.errors,isValid:!1}),G&&G.shouldFocus&&ae&&ae.focus&&ae.focus()},Y=(R,F)=>Jg(R)?h.watch.subscribe({next:G=>R(I(void 0,F),G)}):I(R,F,!0),X=(R,F={})=>{for(const G of R?Kg(R):s.mount)s.mount.delete(G),s.array.delete(G),be(n,G)&&(F.keepValue||(Xr(n,G),Xr(i,G)),!F.keepError&&Xr(t.errors,G),!F.keepDirty&&Xr(t.dirtyFields,G),!F.keepTouched&&Xr(t.touchedFields,G),!e.shouldUnregister&&!F.keepDefaultValue&&Xr(a,G));h.watch.next({}),h.state.next({...t,...F.keepDirty?{isDirty:A()}:{}}),!F.keepIsValid&&y()},Z=(R,F={})=>{let G=be(n,R);const ae=ty(F.disabled);return Vt(n,R,{_f:{...G&&G._f?G._f:{ref:{name:R}},name:R,mount:!0,...F}}),s.mount.add(R),G?ae&&Vt(i,R,F.disabled?void 0:be(i,R,kS(G._f))):b(R,!0,F.value),{...ae?{disabled:F.disabled}:{},...e.shouldUseNativeValidation?{required:!!F.required,min:Mh(F.min),max:Mh(F.max),minLength:Mh(F.minLength),maxLength:Mh(F.maxLength),pattern:Mh(F.pattern)}:{},name:R,onChange:V,onBlur:V,ref:re=>{if(re){Z(R,F),G=be(n,R);const K=Ft(re.value)&&re.querySelectorAll&&re.querySelectorAll("input,select,textarea")[0]||re,ue=Lfe(K),Re=G._f.refs||[];if(ue?Re.find(mt=>mt===K):K===G._f.ref)return;Vt(n,R,{_f:{...G._f,...ue?{refs:[...Re.filter(RS),K,...Array.isArray(be(a,R))?[{}]:[]],ref:{type:K.type,name:R}}:{ref:K}}}),b(R,!1,void 0,K)}else G=be(n,R,{}),G._f&&(G._f.mount=!1),(e.shouldUnregister||F.shouldUnregister)&&!(AB(s.array,R)&&o.action)&&s.unMount.add(R)}}};return{control:{register:Z,unregister:X,getFieldState:q,_executeSchema:S,_getWatch:I,_getDirty:A,_updateValid:y,_removeUnmounted:M,_updateFieldArray:m,_getFieldArray:P,_subjects:h,_proxyFormState:f,get _fields(){return n},get _formValues(){return i},get _stateFlags(){return o},set _stateFlags(R){o=R},get _defaultValues(){return a},get _names(){return s},set _names(R){s=R},get _formState(){return t},set _formState(R){t=R},get _options(){return e},set _options(R){e={...e,...R}}},trigger:$,register:Z,handleSubmit:(R,F)=>async G=>{G&&(G.preventDefault&&G.preventDefault(),G.persist&&G.persist());let ae=!0,re=ol(i);h.state.next({isSubmitting:!0});try{if(e.resolver){const{errors:K,values:ue}=await S();t.errors=K,re=ue}else await D(n);ea(t.errors)?(h.state.next({errors:{},isSubmitting:!0}),await R(re,G)):(F&&await F({...t.errors},G),e.shouldFocusError&&AS(n,K=>be(t.errors,K),s.mount))}catch(K){throw ae=!1,K}finally{t.isSubmitted=!0,h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:ea(t.errors)&&ae,submitCount:t.submitCount+1,errors:t.errors})}},watch:Y,setValue:N,getValues:U,reset:(R,F={})=>{const G=R||a,ae=ol(G),re=R&&!ea(R)?ae:a;if(F.keepDefaultValues||(a=G),!F.keepValues){if(F.keepDirtyValues)for(const K of s.mount)be(t.dirtyFields,K)?Vt(re,K,be(i,K)):N(K,be(re,K));else{if(LS&&Ft(R))for(const K of s.mount){const ue=be(n,K);if(ue&&ue._f){const Re=Array.isArray(ue._f.refs)?ue._f.refs[0]:ue._f.ref;try{ES(Re)&&Re.closest("form").reset();break}catch{}}}n={}}i=r.shouldUnregister?F.keepDefaultValues?ol(a):{}:ae,h.array.next({values:re}),h.watch.next({values:re})}s={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!f.isValid||!!F.keepIsValid,o.watch=!!r.shouldUnregister,h.state.next({submitCount:F.keepSubmitCount?t.submitCount:0,isDirty:F.keepDirty||F.keepDirtyValues?t.isDirty:!!(F.keepDefaultValues&&!ju(R,a)),isSubmitted:F.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:F.keepDirty||F.keepDirtyValues?t.dirtyFields:F.keepDefaultValues&&R?NS(a,R):{},touchedFields:F.keepTouched?t.touchedFields:{},errors:F.keepErrors?t.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})},resetField:(R,F={})=>{be(n,R)&&(Ft(F.defaultValue)?N(R,be(a,R)):(N(R,F.defaultValue),Vt(a,R,F.defaultValue)),F.keepTouched||Xr(t.touchedFields,R),F.keepDirty||(Xr(t.dirtyFields,R),t.isDirty=F.defaultValue?A(R,be(a,R)):A()),F.keepError||(Xr(t.errors,R),f.isValid&&y()),h.state.next({...t}))},clearErrors:te,unregister:X,setError:H,setFocus:(R,F={})=>{const G=be(n,R)._f,ae=G.refs?G.refs[0]:G.ref;ae.focus(),F.shouldSelect&&ae.select()},getFieldState:q}}function zS(r={}){const e=pe.default.useRef(),[t,n]=pe.default.useState({isDirty:!1,isValidating:!1,dirtyFields:{},isSubmitted:!1,submitCount:0,touchedFields:{},isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,errors:{}});e.current?e.current.control._options=r:e.current={...Nfe(r),formState:t};const a=e.current.control,i=pe.default.useCallback(o=>{IB(o,a._proxyFormState,!0)&&(a._formState={...a._formState,...o},n({...a._formState}))},[a]);return CS({subject:a._subjects.state,callback:i}),pe.default.useEffect(()=>{a._stateFlags.mount||(a._proxyFormState.isValid&&a._updateValid(),a._stateFlags.mount=!0),a._stateFlags.watch&&(a._stateFlags.watch=!1,a._subjects.state.next({})),a._removeUnmounted()}),e.current.formState=LB(t,a._proxyFormState),e.current}var BS={"searchTab-container":"_searchTab-container_1klck_1","searchTab-input":"_searchTab-input_1klck_5",search:"_search_1klck_1"};const kfe=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:1.5,d:"M15.5 15.5L19 19M5 11a6 6 0 1 0 12 0a6 6 0 0 0-12 0Z"})}),Ah=({setSearchKeyword:r,className:e=""})=>{const{register:t,watch:n}=zS(),a=n("searchKeyword");return z.useEffect(()=>{r(a==null?void 0:a.toLowerCase())},[r,n,a]),B("div",{className:`${BS["searchTab-container"]} ${e}`,children:[C("input",{placeholder:"Search",...t("searchKeyword"),className:BS["searchTab-input"]}),C("div",{className:BS.search,children:C(kfe,{color:"#C7C7C7",width:"30px",height:"30px"})})]})},iy=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"m12 15.4l-6-6L7.4 8l4.6 4.6L16.6 8L18 9.4Z"})}),zfe=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"})}),FS=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"})}),Sr=({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]=z.useState(!1),v=z.useRef(null),[d,p]=z.useState(""),[g,y]=z.useState(20);return qg({wrapRef:v,onOutsideClick:()=>h(!1)}),z.useEffect(()=>{!(c!=null&&c.close)||h(!1)},[c==null?void 0:c.close]),B("div",{className:Ka(Bt.container,a),ref:v,children:[r?C(de,{variant:"span",styleClass:e==="floating"?"custom":"font-14",className:`${Bt.label} ${e==="floating"?Bt.floatingLabel:""} ${r==="client"?Bt.clientText:Bt.normalText} `,children:r}):null,B(Le,{type:"button",variant:"custom",isDisabled:o,className:Bt.wrapper,onClick:()=>h(!f),children:[B(de,{variant:"p",styleClass:"font-14",className:`${Bt.text} ${e==="floating"?Bt.floatingText:""}`,children:[l&&C(l,{className:Bt.icon}),t.label||"Select An Option"]}),C(iy,{})]}),f&&!o&&B("div",{className:Bt.dropdown,children:[u&&C(Ah,{className:Bt.search,setSearchKeyword:p}),B("div",{className:Bt.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:_?Bt.checkedOption:Bt.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:Bt.loadMore,children:"Load More"})]}),s]})]})},YB=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]=z.useState(!1),f=z.useRef(null),[h,v]=z.useState(""),[d,p]=z.useState(20);return qg({wrapRef:f,onOutsideClick:()=>c(!1)}),B("div",{className:Ka(Bt.container,a),ref:f,children:[r?C(de,{variant:"span",styleClass:e==="floating"?"custom":"font-14",className:`${Bt.label} ${e==="floating"?"absolute left-2 top-1 text-xs":""}`,children:r}):null,B(Le,{type:"button",variant:"custom",isDisabled:o,className:Bt.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(iy,{})]}),u&&!o&&B("div",{className:Bt.dropdown,children:[l&&C(Ah,{className:"p-2 mb-3",setSearchKeyword:v}),B("div",{className:Bt.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 B(Le,{type:"button",variant:"custom",className:y?Bt.checkedOption:Bt.option,onClick:()=>{const m=y?t.filter(_=>_.value!==g.value):[...t,g];n(m)},children:[y?C(zfe,{}):C(FS,{}),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]})]})}),qB=({globalFilters:r={tableName:"",filters:[]},metricItem:e,onMaximize:t,client:n,colors:a,param:i,companyTenancyType:o,renderHeaderName:s})=>{var fr;const l={};if(i!=null&&i.values)for(const st in i.values){const Ot=`${st}_variable`;l[Ot]=i.values[st]}const[u,c]=z.useState(""),[f,h]=z.useState(""),[v,d]=z.useState([]),[p,g]=z.useState(""),[y,m]=z.useState(""),[_,b]=z.useState([]),[w,x]=z.useState(""),[S,T]=z.useState([]),[D,M]=z.useState([]),[A,I]=z.useState({card:{isEnable:!1,baseUrl:"",dynamic:"none",route:"",routeType:"internal"},chart:{isEnable:!1,baseUrl:"",dynamic:"{{value}}",route:"/{{value}}",routeType:"internal"}}),{data:P,isLoading:E}=DT({id:e==null?void 0:e.id,clientId:n,tenancyLevel:o,rlsConditions:o==="DATABASE"?D.map(st=>({...st,tableName:`${n}.${st.tableName.split(".").slice(1).join(".")}`,dimensionColumn:f||"",measureColumn:v[0]||""})):D.map(st=>({...st,dimensionColumn:f||"",measureColumn:v[0]||""})),globalFilters:o==="DATABASE"?{...r,tableName:`${n}.${r.tableName.split(".").slice(1).join(".")}`}:r,filterValues:l}),O=(fr=P==null?void 0:P.externalMetricQuery)==null?void 0:fr.data,[N,V]=z.useState({marginTop:20,marginBottom:20,marginLeft:5,marginRight:5}),[$,U]=z.useState({show:!0,top:0,left:0,right:0,bottom:0,position:"horizontal"}),[q,te]=z.useState({axis:"left",show:!1,position:"hidden"}),[H,Y]=z.useState({axis:"left"}),[X,Z]=z.useState({hideSplitLines:"none",hideAxisLines:"none",barWidth:40,barRadius:0,axisLabels:"none",fontSize:14,subHeaderShow:!1,displayText:"",subHeaderFontSize:0,dateFormatter:"none",numberFormatter:"original"}),[ie,se]=z.useState({show:!1}),[ne,ve]=z.useState(!1),[R,F]=z.useState([]),[G,ae]=z.useState(),[re,K]=z.useState([]);z.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),te(e==null?void 0:e.chartOptions.labelSettings),Y(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),ae(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]),z.useEffect(()=>{T(O!=null?O:[])},[O]);const{labels:ue,datasets:Re,funnelData:mt,sankeyData:Xe,singleValueData:Zt}=ym({data:ne?re:S,measure:y,sankeyValues:_,singleValue:w,step:p,xAxis:f,yAxisList:v});z.useEffect(()=>{if(re.length&&ne){const st=lS(re[0]);h(st.stringKeys[0]),d(st.numberKeys)}},[re,ne]),z.useEffect(()=>{re.length===0&&ne&&R.length&&(S==null?void 0:S.length)&&(ae({column:R[0]}),Ca(S,[R[0]],R,K))},[re,ne,R]),z.useEffect(()=>{(S==null?void 0:S.length)&&R.length&&ne&&Ca(S,[R[0]],R,K)},[S,R,ne]);const St=st=>{if((G==null?void 0:G.column)&&st&&st!=="undefined"){if(R.lastIndexOf(G.column)!==R.length-1){const Ot=R.indexOf(G.column),ta=G.column;ae({column:R[Ot+1],parentColumn:{column:G.column,value:st}}),Ca(S==null?void 0:S.filter(or=>or[ta]===st),[R[Ot+1]],R,K)}R.lastIndexOf(G.column)===R.length-1&&(ae({column:R[0]}),Ca(S,[R[0]],R,K))}else ae({column:R[0]}),Ca(S,[R[0]],R,K)},Jr=(st,Ot)=>M(ta=>ta.map(or=>or.name===st?{...or,value:Ot}:or));return C(Se,{children:B("div",{className:_t.cardContainer,children:[B("div",{className:_t.listHeader,children:[B(de,{variant:"h3",styleClass:"primary",className:_t.metricName,children:[s?s(e.name):C(Le,{type:"button",variant:"custom",isDisabled:!A.card.isEnable,className:"disabled:cursor-text",onClick:()=>Kz(A,e.metricId,e.id),children:e.name}),e.description&&C("span",{className:_t.metricDescription,children:e.description})]}),B("div",{className:_t.features,children:[!!D.length&&C("div",{className:_t.metricFilter,children:C(Sr,{label:D[0].name,selectedOption:{value:D[0].value||D[0].options[0],label:D[0].value||D[0].options[0]},options:D[0].options.map(st=>({value:st,label:st})),onChange:st=>Jr(D[0].name,st.value)})}),B(Zg,{buttonClass:_t.popup,button:C(Tce,{className:_t.popupIcon}),menuClass:_t.popupMenu,position:"bottom-right",children:[B(Le,{type:"button",variant:"custom",className:_t.popupItem,onClick:()=>t({labels:ue,data:{labels:ue,datasets:Re},chartType:u,funnelData:mt,sankeyData:Xe,singleValueData:Zt,margins:N,legendSettings:$,labelSettings:q,axisSettings:H,customSettings:X,backGroundColor:ie,enableSaveAs:!0,chartClickConfig:A.chart}),children:[C(Dce,{})," Enter Fullscreen"]}),C(NT,{data:S,fileName:e.name,className:`${_t.popupItem} ${_t.csvBtn}`,text:"Save As CSV"})]})]})]}),u&&B("div",{className:_t.metricData,children:[!E&&!S.length?C("div",{className:_t.noData,children:B("div",{className:_t.noDataContent,children:[C("img",{src:TB,alt:"",width:"300px",height:"300px"}),C("div",{className:_t.noDataText,children:"No Data Available"})]})}):null,E&&C("div",{className:_t.loading,children:C(Wu,{style:{width:"50px",height:"50px",color:"blue"}})}),S!=null&&S.length?C(Fg,{labels:ue,data:{labels:ue,datasets:Re},chartType:u,funnelData:mt,sankeyData:Xe,singleValueData:Zt,margins:N,legendSettings:$,labelSettings:q,axisSettings:H,enableSaveAs:!0,colors:a,updateGroup:St,isEnableGroupBy:ne,customSettings:X,backGroundColor:ie,chartClickConfig:A.chart}):null]})]})})},ZB=({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]=z.useState(""),[u,c]=z.useState(""),[f,h]=z.useState([]),[v,d]=z.useState([]),[p,g]=z.useState({card:{isEnable:!1,baseUrl:"",dynamic:"none",route:"",routeType:"internal"},chart:{isEnable:!1,baseUrl:"",dynamic:"{{value}}",route:"/{{value}}",routeType:"internal"}}),[y,m]=z.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}=DT({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;z.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]),z.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(Se,{children:B("div",{className:_t.cardContainer,children:[B("div",{className:_t.listHeader,children:[B(de,{variant:"h3",styleClass:"primary",className:_t.metricName,children:[i?i(e.name):C(Le,{type:"button",variant:"custom",isDisabled:!p.card.isEnable,className:"disabled:cursor-text",onClick:()=>Kz(p,e.metricId,e.id),children:e.name}),e.description&&C("span",{className:_t.metricDescription,children:e.description})]}),C("div",{className:_t.features,children:!!(v!=null&&v.length)&&C("div",{className:_t.metricFilter,children:C(Sr,{label:v[0].name,selectedOption:{value:v[0].value||v[0].options[0],label:v[0].value||v[0].options[0]},options:v[0].options.map(A=>({value:A,label:A})),onChange:A=>D(v[0].name,A.value)})})})]}),s&&C("div",{className:`${_t.metricData} ${_t.singleValueData}`,children:b?C(Wu,{style:{width:"50px",height:"50px",color:"blue"}}):C(Se,{children:S.length?C(eB,{data:T,customSettings:y,chartClickConfig:p.chart,hideBorder:!0}):C("div",{className:_t.noData,children:B("div",{className:_t.noDataContent,children:[C("img",{src:TB,alt:"",width:"300px",height:"300px"}),C("div",{className:_t.noDataText,children:"No Data Available"})]})})})})]})})};var Bfe={fullscreen:"_fullscreen_1wo1t_1"},qu={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 Ffe=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"})}),Li=({children:r,isOpen:e,onClose:t,headerTitle:n,customHeader:a,icon:i})=>{const[o,s]=z.useState();return z.useEffect(()=>{const l=document.getElementById("databrain-root-portal")||document.createElement("div");l.setAttribute("id","databrain-root-portal"),document.body.appendChild(l),s(l)},[]),e?zh.default.createPortal(C("div",{className:qu.modal,onClick:t,children:B("div",{className:qu.popup,onClick:l=>{l.stopPropagation()},children:[C("section",{className:qu.header,children:a||B(Se,{children:[B("span",{className:qu.headerTitle,children:[i,n]}),C(Le,{variant:"custom",type:"button",onClick:t,children:C(Ffe,{})})]})}),C("section",{className:qu.content,children:r})]})}),o):null},Zu=({children:r,className:e})=>C("section",{className:`${qu.footer} ${e}`,children:r}),VS=({isShow:r,onCancel:e,chart:t})=>C(Li,{isOpen:r,onClose:e,headerTitle:"Chart Preview",children:C("div",{className:Bfe.fullscreen,children:t&&C(Fg,{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"}})})}),XB=Dy.exports.WidthProvider(Dy.exports.Responsive),QB=({chartColors:r,globalFilters:e,client:t,isLiveMode:n,externalDashboardMetrics:a,isMetricListLoading:i,breakpoint:o,layoutCols:s,params:l,companyTenancyType:u="TABLE"})=>{const[c,f]=z.useState(!1),[h,v]=z.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(Se,{children:y.length?B(Se,{children:[C("div",{className:fc["MetricList-container"],children:C(XB,{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:fc["MetricList-wrapper"],children:m.chartOptions.chartType==="single value"?C(ZB,{metricItem:m,client:t,globalFilters:e,param:l==null?void 0:l.find(_=>_.metricId===m.metricId),companyTenancyType:u}):C(qB,{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(VS,{onCancel:()=>f(!1),isShow:c,chart:h})]}):C(Se,{children:i?C("div",{className:fc["alt-container"],children:C(Wu,{style:{width:"50px",height:"50px",color:"blue"}})}):C("div",{className:fc["noMetric-container"],children:C("div",{className:fc["noMetric-wrapper"],children:C(de,{variant:"h2",styleClass:"primary",children:"No metrics created yet"})})})})})};var Xu={"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 Vfe=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"})}),$fe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:B("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"})]})}),Hfe=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"})}),KB=({setShowMetricCreateModal:r,isDisableSaveBtn:e,Heading:t,isDisableSqlBtn:n,setShowSaveMetricModal:a,setShowSqlModal:i})=>B("div",{className:Xu["header-container"],children:[B("div",{className:Xu["btn-container"],children:[C(Le,{type:"button",variant:"custom",size:"default",onClick:()=>r(!1),className:Xu["back-btn"],children:C(Vfe,{})}),C(de,{variant:"h1",styleClass:"primary",children:t})]}),B("div",{className:Xu["btn-container"],children:[B(Le,{type:"button",variant:"custom",className:Xu["sql-btn"],onClick:()=>i(!0),isDisabled:n,children:[C(Hfe,{}),"SQL"]}),B(Le,{type:"submit",variant:"primary",className:Xu["save-btn"],isDisabled:e,onClick:()=>a(!0),children:[C($fe,{}),"Save to Dashboard"]})]})]});var oy={"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"},Lh={container:"_container_32zer_1",header:"_header_32zer_5",wrapper:"_wrapper_32zer_9","col-container":"_col-container_32zer_13",column:"_column_32zer_17"};const Gfe=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"})}),Wfe=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"})}),Ufe=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"})}),jfe=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"})}),Yfe=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"})}),qfe=r=>B("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"})]}),$S=({datatype:r})=>_m.includes(r.toLowerCase())?C(Gfe,{}):bm.includes(r.toLowerCase())||r.toLowerCase().includes("char")?C(Ufe,{}):PT.includes(r.toLowerCase())?C(jfe,{}):xm.includes(r.toLowerCase())?C(Yfe,{}):wm.includes(r.toLowerCase())?C(qfe,{}):C(Wfe,{}),Zfe=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"})}),JB=({setselectTable:r,selectTable:e,tableList:t,columnList:n})=>B("div",{className:Lh.container,children:[C("div",{className:Lh.header,children:C(Sr,{onChange:r,selectedOption:e,options:t,Icon:Zfe,labelVariant:"static"})}),B("div",{className:Lh.wrapper,children:[C(de,{variant:"h1",styleClass:"primary",children:"Columns"}),C("div",{className:Lh["col-container"],children:n.map(({as:a,datatype:i})=>B("div",{className:Lh.column,children:[C($S,{datatype:i}),C(de,{variant:"p",styleClass:"font-14",children:a})]},a))})]})]});var Be={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"},HS={tab:"_tab_1imil_1",button:"_button_1imil_7",activeTab:"_activeTab_1imil_15"};const GS=({options:r,activeTab:e,setActiveTab:t,className:n="",tabText:a=""})=>C("div",{className:`${HS.tab} ${n}`,children:r.map(i=>C(Le,{variant:"custom",type:"button",className:`${HS.button} ${e===i&&HS.activeTab} ${a}`,onClick:()=>t(i),children:i},i))});var Io={label:"_label_1agtv_1",floatingLabel:"_floatingLabel_1agtv_7","inputField-container":"_inputField-container_1agtv_13",checkboxLabel:"_checkboxLabel_1agtv_19",input:"_input_1agtv_13",floatingInput:"_floatingInput_1agtv_31",checkboxField:"_checkboxField_1agtv_37",inputWrapper:"_inputWrapper_1agtv_43"},Xfe={error:"_error_1csa7_1"};const WS=({message:r=""})=>C(de,{variant:"p",styleClass:"custom",className:Xfe.error,children:r}),It=({type:r,register:e,error:t,icon:n,label:a,isDisabled:i,labelClass:o,inputClass:s,className:l,labelVariant:u="static",...c})=>r==="checkbox"?B("div",{className:`${Io.checkboxField} ${l!=null?l:""}`,children:[C("input",{...c,type:"checkbox",className:s,...e,disabled:i}),a?B("label",{htmlFor:a,className:`${Io.checkboxLabel} ${o}`,children:[n," ",a]}):null]}):B("div",{className:`${Io["inputField-container"]} ${l!=null?l:""}`,children:[a?C("label",{htmlFor:a,className:`${Io.label} ${u==="floating"?Io.floatingLabel:""} ${o}`,children:a}):null,B("div",{className:Io.inputWrapper,children:[C("input",{...c,type:r,className:`${Io.input} ${u==="floating"?Io.floatingInput:""} ${s}`,...e,disabled:i}),n]}),t&&C(WS,{message:t.message})]});var Te={"listBox-label":"_listBox-label_1mdwz_1","listBoxButton-container":"_listBoxButton-container_1mdwz_5",listBoxButton:"_listBoxButton_1mdwz_5","listBox-option":"_listBox-option_1mdwz_13",selectedOptionText:"_selectedOptionText_1mdwz_17",transitionDiv:"_transitionDiv_1mdwz_21",listboxButtonWrapper:"_listboxButtonWrapper_1mdwz_25",arrowicon:"_arrowicon_1mdwz_28",leave:"_leave_1mdwz_31",leaveFrom:"_leaveFrom_1mdwz_34",leaveTo:"_leaveTo_1mdwz_37",notAvailable:"_notAvailable_1mdwz_40",option:"_option_1mdwz_43",activeOption:"_activeOption_1mdwz_46",optionSelected:"_optionSelected_1mdwz_49",inactiveOption:"_inactiveOption_1mdwz_52",optionLabel:"_optionLabel_1mdwz_55",optionSubLabel:"_optionSubLabel_1mdwz_58",selectedLabel:"_selectedLabel_1mdwz_61",nonselectedLabel:"_nonselectedLabel_1mdwz_64",check:"_check_1mdwz_67",checkActive:"_checkActive_1mdwz_70",checkInactive:"_checkInactive_1mdwz_73",checkIcon:"_checkIcon_1mdwz_76",checkIconSelected:"_checkIconSelected_1mdwz_79",checkIconUnselected:"_checkIconUnselected_1mdwz_82",loadMore:"_loadMore_1mdwz_85",selectedList:"_selectedList_1mdwz_88",selectedListItem:"_selectedListItem_1mdwz_91"};const e4=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M21 7L9 19l-5.5-5.5l1.41-1.41L9 16.17L19.59 5.59L21 7Z"})}),US=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"M7.41 8.58L12 13.17l4.59-4.59L18 10l-6 6l-6-6l1.41-1.42Z"})}),Qfe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:C("path",{fill:"currentColor",d:"m10 13.6l5.9-5.9q.275-.275.7-.275q.425 0 .7.275q.275.275.275.7q0 .425-.275.7l-6.6 6.6q-.3.3-.7.3q-.4 0-.7-.3l-2.6-2.6q-.275-.275-.275-.7q0-.425.275-.7q.275-.275.7-.275q.425 0 .7.275Z"})}),Qt=({label:r,options:e,onChange:t,value:n,defaultValue:a,children:i,placeHolder:o,className:s="",containerClass:l="",isSearchEnabled:u,textSize:c})=>{const[f,h]=z.useState(""),[v,d]=z.useState(20),p=n||a?e==null?void 0:e.find(y=>y.value===n||y.value===a):{label:o||"Select an option"},g={fontSize:c};return C(Zr,{value:n,onChange:t,as:"div",className:l,children:({open:y})=>B(Se,{children:[r?C(Zr.Label,{className:Te["listBox-label"],children:r}):null,B("div",{className:`${Te.listboxButtonWrapper} ${s}`,children:[B(Zr.Button,{className:Te["listBoxButton-container"],children:[C("span",{className:Te.selectedOptionText,children:p==null?void 0:p.label}),C("span",{className:Te.listBoxButton,children:C(US,{className:Te.arrowicon,"aria-hidden":"true"})})]}),C(jg,{show:y,as:z.Fragment,leave:Te.leave,leaveFrom:Te.leaveFrom,leaveTo:Te.leaveTo,children:C(Zr.Options,{className:Te["listBox-option"],children:B(Se,{children:[u&&C(Ah,{setSearchKeyword:h}),e!=null&&e.length?(f?e.filter(m=>m.value.toLowerCase().includes(f.toLowerCase())):e.slice(0,v)).map(m=>C(Zr.Option,{className:({selected:_,active:b})=>Ka(_||b?Te.activeOption:Te.inactiveOption,Te.option),value:m.value,children:({selected:_})=>B(Se,{children:[C("span",{className:Te.optionLabel,style:g,children:m.label}),_?C("span",{className:Te.check,children:C(e4,{className:Te.checkIcon,"aria-hidden":"true"})}):null]})},m.value)):C("div",{className:Te.notAvailable,children:"Not Available."}),e&&v<=e.length&&C(Le,{variant:"secondary",type:"button",onClick:()=>d(v+30),className:Te.loadMore,children:"Load More"}),i]})})})]})]})})},t4=({control:r,name:e,options:t,label:n,defaultValue:a})=>C(DS,{control:r,name:e,render:({field:{onChange:i,value:o}})=>C(Qt,{onChange:i,value:o,label:n,options:t,defaultValue:a})}),r4=({label:r,options:e,onChange:t,value:n,defaultValue:a})=>{const i=n?e==null?void 0:e.find(o=>o.value.value===n):{label:a};return C(Zr,{value:n,onChange:t,children:({open:o})=>B(Se,{children:[C(Zr.Label,{className:Te["listBox-label"],children:r}),B("div",{className:Te.listboxButtonWrapper,children:[B(Zr.Button,{className:Te["listBoxButton-container"],children:[C("span",{className:Te.selectedOptionText,children:i==null?void 0:i.label}),C("span",{className:Te.listBoxButton,children:C(US,{className:Te.arrowicon,"aria-hidden":"true"})})]}),C(jg,{show:o,as:z.Fragment,leave:Te.leave,leaveFrom:Te.leaveFrom,leaveTo:Te.leaveTo,children:C(Zr.Options,{className:Te["listBox-option"],children:e==null?void 0:e.map(s=>C(Zr.Option,{className:({active:l})=>Ka(l?Te.activeOption:Te.inactiveOption,Te.option),value:s.value.value,children:({selected:l,active:u})=>B(Se,{children:[C("span",{className:Ka(l?Te.selectedLabel:Te.nonselectedLabel,Te.optionLabel),children:s.label}),C("span",{className:Ka(l?Te.selectedLabel:Te.nonselectedLabel,Te.optionLabel,Te.optionSubLabel),children:s.value.subValue}),l?C("span",{className:Ka(u?Te.checkActive:Te.checkInactive,Te.check),children:C(e4,{className:Te.checkIcon,"aria-hidden":"true"})}):null]})},`${s.value.value}_${s.value.subValue}`))})})]})]})})},Kfe=({control:r,name:e,options:t,label:n,defaultValue:a})=>C(DS,{control:r,name:e,render:({field:{onChange:i,value:o}})=>C(r4,{onChange:i,options:t,value:o,label:n,defaultValue:a})}),Ih=({options:r,defaultValue:e,value:t,onChange:n,label:a,name:i,className:o="",children:s,placeHolder:l,onClick:u,isSearchEnabled:c,containerClass:f=""})=>{const[h,v]=z.useState(""),[d,p]=z.useState(20);return B(Se,{children:[B(Zr,{value:t,onChange:n,defaultValue:e,multiple:!0,name:i,as:"div",className:f,children:[a?C(Zr.Label,{className:Te["listBox-label"],children:a}):null,B("div",{className:Te.listboxButtonWrapper,children:[B(Zr.Button,{className:`${Te["listBoxButton-container"]} ${o}`,onClick:u,children:[C("span",{className:Te.selectedOptionText,children:l||"Choose charts from list"}),C("span",{className:Te.listBoxButton,children:C(US,{className:Te.arrowicon,"aria-hidden":"true"})})]}),C(jg,{as:"div",leave:Te.leave,leaveFrom:Te.leaveFrom,leaveTo:Te.leaveTo,className:Te.transitionDiv,children:B(Zr.Options,{className:Te["listBox-option"],children:[c&&C(Ah,{setSearchKeyword:v}),r.length===0?C("div",{className:Te.notAvailable,children:"Not Available."}):(h?r.filter(g=>g.value.toLowerCase().includes(h.toLowerCase())):r.slice(0,d)).map(g=>C(Zr.Option,{className:({selected:y,active:m})=>`${Te.option} ${y||m?Te.optionSelected:""}`,value:g.value,children:({selected:y})=>B(Se,{children:[C("span",{className:`${Te.optionLabel}`,children:g.label}),C("span",{className:Te.check,children:y?C("div",{className:Te.checkIconSelected,children:C(Qfe,{color:"white"})}):C("div",{className:Te.checkIconUnselected})})]})},g.value)),d<=r.length&&C(Le,{variant:"secondary",type:"button",onClick:()=>p(d+30),className:Te.loadMore,children:"Load More"}),s]})})]})]}),t!=null&&t.length?C("div",{className:Te.selectedList,children:t.map(g=>{var y;return C(de,{styleClass:"font-14c",variant:"p",className:Te.selectedListItem,children:(y=r.find(m=>m.value===g))==null?void 0:y.label})})}):null]})},Jfe=({control:r,name:e,...t})=>C(Se,{children:C(DS,{control:r,name:e,render:({field:{onChange:n,value:a}})=>C(Ih,{...t,name:e,value:a,onChange:n})})});var n4={container:"_container_1m5jj_1",tooltip:"_tooltip_1m5jj_7"};const ehe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:B("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"})]})}),a4=({children:r,content:e,className:t=""})=>B("span",{className:`${n4.container} ${t}`,children:[e,C("span",{className:n4.tooltip,children:r})]}),Ii=({children:r,className:e})=>C(a4,{className:e,content:C(ehe,{color:"#182C60"}),children:r}),the=({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=["Custom"],[g,y]=z.useState("Custom");return B("div",{className:Be.container,children:[C("div",{className:"h-[10%]",children:C(GS,{options:l!=="single value"?d:p,activeTab:g,setActiveTab:y,className:Be.tab,tabText:Be.tabText})}),B("form",{className:Be.form,children:[g==="Margins"&&B("div",{className:Be.inputWrapper,children:[C("div",{className:Be.input,children:C(It,{type:"number",label:"Top",onChange:m=>r(_=>({..._,marginTop:parseInt(m.target.value,10)})),defaultValue:e.marginTop})}),C("div",{className:Be.input,children:C(It,{type:"number",label:"Bottom",onChange:m=>r(_=>({..._,marginBottom:parseInt(m.target.value,10)})),defaultValue:e.marginBottom})}),C("div",{className:Be.input,children:C(It,{type:"number",label:"Left",defaultValue:e.marginLeft,onChange:m=>r(_=>({..._,marginLeft:parseInt(m.target.value,10)}))})}),C("div",{className:Be.input,children:C(It,{type:"number",label:"Right",defaultValue:e.marginRight,onChange:m=>r(_=>({..._,marginRight:parseInt(m.target.value,10)}))})})]}),g==="Legend"&&B("div",{className:Be.legendWrapper,children:[C(It,{type:"checkbox",label:"Show Legend",checked:t.show,onChange:m=>n(_=>({..._,show:m.target.checked}))}),B("div",{children:[C(de,{variant:"h1",styleClass:"primary",children:"Position"}),B("div",{className:Be.inputWrapper,children:[C("div",{className:Be.input,children:C(It,{type:"number",label:"Top",defaultValue:t.top,onChange:m=>n(_=>({..._,top:parseInt(m.target.value,10)}))})}),C("div",{className:Be.input,children:C(It,{type:"number",label:"Bottom",defaultValue:t.bottom,onChange:m=>n(_=>({..._,bottom:parseInt(m.target.value,10)}))})}),C("div",{className:Be.input,children:C(It,{type:"number",label:"Left",defaultValue:t.left,onChange:m=>n(_=>({..._,left:parseInt(m.target.value,10)}))})}),C("div",{className:Be.input,children:C(It,{type:"number",label:"Right",defaultValue:t.right,onChange:m=>n(_=>({..._,right:parseInt(m.target.value,10)}))})})]})]}),B("div",{className:Be.selectWrapper,children:[C(de,{variant:"h1",styleClass:"primary",children:"Appearance"}),C("div",{className:Be.select,children:C(Qt,{value:t.position,options:[{label:"Horizontal",value:"horizontal"},{label:"Vertical",value:"vertical"}],onChange:m=>n(_=>({..._,position:m}))})})]})]}),g==="Custom"&&B("div",{className:Be.series,children:[C(de,{styleClass:"font-14c",variant:"p",className:Be.tabHeading,children:"Chart preferences"}),l!=="single value"&&B(Se,{children:[B("div",{className:Be.seriesWrapper,children:[C(de,{variant:"h1",styleClass:"font-14",children:"Value labels"}),C("div",{className:Be.valueLabelWrapper,children:C(Qt,{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"&&B(Se,{children:[B("div",{className:Be.seriesWrapper,children:[C(de,{variant:"h1",styleClass:"font-14",className:"font-medium",children:"Axis"}),C("div",{className:Be.select,children:C(Qt,{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,B("div",{className:Be.seriesWrapper,children:[B(de,{variant:"h1",styleClass:"font-14",className:Be.label,children:["Hide Axis labels",C(Ii,{children:"Axis labels represents the x and y axis values"})]}),C("div",{className:Be.select,children:C(Qt,{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}))})})]}),B("div",{className:Be.seriesWrapper,children:[B(de,{variant:"h1",styleClass:"font-14",className:Be.label,children:["Hide Splitlines",C(Ii,{children:"Splitline is the reference lines that run along the directional x and y axis which act as reference markers"})]}),C("div",{className:Be.select,children:C(Qt,{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}))})})]}),B("div",{className:Be.seriesWrapper,children:[B(de,{variant:"h1",styleClass:"font-14",className:Be.label,children:["Hide Axis Line",C(Ii,{children:"The x-axis and y-axis lines act as a graph base from which the chart starts"})]}),C("div",{className:Be.select,children:C(Qt,{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"?B(Se,{children:[B("div",{className:Be.seriesWrapper,children:[B(de,{variant:"h1",styleClass:"font-14",className:Be.label,children:["Modify Bar width",C(Ii,{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})]}),B("div",{className:Be.seriesWrapper,children:[B(de,{variant:"h1",styleClass:"font-14",className:Be.label,children:["Modify Bar radius",C(Ii,{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"&&B(Se,{children:[B("div",{className:Be.seriesWrapper,children:[C(de,{variant:"h1",styleClass:"font-14",className:Be.label,children:"Single Value Chart Font Size"}),C(It,{type:"number",label:"",onChange:m=>f(_=>({..._,fontSize:parseInt(m.target.value,10)})),defaultValue:c.fontSize})]}),B("div",{className:Be.singleCheckBox,children:[C(It,{type:"checkbox",label:"",checked:c.subHeaderShow,onChange:m=>f(_=>({..._,subHeaderShow:m.target.checked}))}),B(de,{variant:"h1",styleClass:"font-14",className:Be.label,children:["Single Value Sub-Header",C(Ii,{children:"Single Value Sub-Header"})]})]}),c.subHeaderShow&&B(Se,{children:[B("div",{className:Be.seriesWrapper,children:[C(de,{variant:"h1",styleClass:"font-14",className:Be.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})]}),B("div",{className:Be.seriesWrapper,children:[C(de,{variant:"h1",styleClass:"font-14",className:Be.label,children:"Sub-Header Font Size"}),C(It,{type:"number",label:"",onChange:m=>f(_=>({..._,subHeaderFontSize:parseInt(m.target.value,10)})),defaultValue:c.subHeaderFontSize})]})]}),B("div",{className:Be.seriesWrapper,children:[C(de,{variant:"h1",styleClass:"primary",children:"Date formatting"}),C("div",{className:Be.valueLabelWrapper,children:C(Qt,{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}))})})]}),B("div",{className:Be.seriesWrapper,children:[C(de,{variant:"h1",styleClass:"primary",children:"Number formatting"}),C("div",{className:Be.valueLabelWrapper,children:C(Qt,{value:c.numberFormatter,textSize:"12px",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 Qr={chartButtonContainer:"_chartButtonContainer_1fmoa_1","chartButton-header":"_chartButton-header_1fmoa_7","settingsTab-header-control":"_settingsTab-header-control_1fmoa_15",tabContainer:"_tabContainer_1fmoa_23",tab:"_tab_1fmoa_23",tabText:"_tabText_1fmoa_39",chartButtons:"_chartButtons_1fmoa_47",chartButton:"_chartButton_1fmoa_1",chartButtonSelected:"_chartButtonSelected_1fmoa_63",chartTypesButton:"_chartTypesButton_1fmoa_71",button:"_button_1fmoa_79",propertyButton:"_propertyButton_1fmoa_87",settings:"_settings_1fmoa_15",crossIcon:"_crossIcon_1fmoa_103"};const sy=({value:r,options:e,control:t})=>{const[n,a]=z.useState("");return C(t4,{control:t,label:"",options:e,onChange:a,name:n||r})};var ot={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 jS=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:B("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})]})}),i4=({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]=z.useState([v==null?void 0:v[0]]),[g,y]=z.useState(""),[m,_]=z.useState(""),[b,w]=z.useState(""),[x,S]=z.useState(1),[T,D]=z.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}=zS(),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===kT?B("div",{className:ot.container,children:[B("div",{className:ot.field,children:[C(de,{styleClass:"font-14",className:ot.fieldText,variant:"h4",children:"Source"}),C(Qt,{label:"",options:v,onChange:y,value:g})]}),B("div",{className:ot.field,children:[C(de,{styleClass:"font-14",className:ot.fieldText,variant:"h4",children:"Target"}),C(Qt,{label:"",options:v,onChange:_,value:m})]}),B("div",{children:[C(de,{styleClass:"font-14",className:ot.fieldText,variant:"h4",children:"Value"}),C(Qt,{label:"",options:v,onChange:w,value:b})]}),C(Le,{type:"submit",variant:"primary",size:"default",className:ot.doneBtn,onClick:()=>{E(),c(!1)},children:"Done"})]}):a===Cm?C(Se,{children:!!(a===Cm||Tm)&&B("div",{className:ot.container,children:[C(de,{styleClass:"font-14",className:ot.field,variant:"h4",children:"Dimension"}),C(Qt,{label:"",options:v,onChange:e,value:t}),C(de,{styleClass:"font-14",className:ot.measureText,variant:"h4",children:"Measure"}),C("div",{className:ot.plus,children:C(jS,{className:`${ot.plusIcon} ${T}`,onClick:()=>M()})}),B("form",{onSubmit:A(P),className:ot.form,children:[d.map(O=>C(sy,{value:O.value,options:v,control:I},O.value)),C(Le,{type:"submit",variant:"primary",size:"default",className:ot.doneBtn,children:"Done"})]})]})}):a===Tm?B(Se,{children:["(",B("div",{className:ot.container,children:[C(de,{styleClass:"font-14",className:ot.field,variant:"h4",children:"Dimension"}),C(Qt,{label:"",options:v,onChange:e,value:t}),C(de,{styleClass:"font-14",className:ot.measureText,variant:"h4",children:"Measure"}),C("div",{className:ot.plus,children:C(jS,{className:`${ot.plusIcon} ${T}`,onClick:()=>M()})}),B("form",{onSubmit:A(P),className:ot.form,children:[d.map(O=>C(sy,{value:O.value,options:v,control:I},O.value)),C(Le,{type:"submit",variant:"primary",size:"default",className:ot.doneBtn,children:"Done"})]})]}),")"]}):a==="single value"?B(Se,{children:[C(de,{styleClass:"font-14",className:`${ot.singleValueMeasure}`,variant:"h4",children:"Measure"}),C(Qt,{label:"",options:v,onChange:h,value:f}),C(Le,{type:"button",variant:"primary",size:"default",className:ot.doneBtn,onClick:()=>c(!1),children:"Done"})]}):C(Se,{children:B("div",{className:ot.container,children:[a!=="gauge"&&a!==zT&&a!=="table"&&B(Se,{children:[B(de,{styleClass:"font-14",className:ot.field,variant:"h4",children:[a!=="funnel"&&a!=="row"&&"X-axis",a==="funnel"&&"Step",a==="row"&&"Y-axis"]}),a==="funnel"?C(Qt,{label:"",options:v,onChange:i,value:s}):C(Qt,{label:"",options:v,onChange:e,value:t})]}),B("div",{className:`${ot.chartType}
252
- ${a!=="gauge"?ot.measureText:""}`,children:[B(de,{styleClass:"font-14",variant:"h1",className:ot.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(jS,{className:`${ot.plusIcon} ${T}`,onClick:()=>M()})]}),B("form",{onSubmit:A(P),className:ot.form,children:[a==="funnel"||a==="gauge"?C(Qt,{label:"",options:v,onChange:o,value:l}):d.map(O=>C(sy,{value:O.value,options:v,control:I},O.value)),C(Le,{type:"submit",variant:"primary",size:"default",className:ot.doneBtn,children:"Done"})]})]})})},rhe=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"})}),nhe=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"})}),ahe=r=>B("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"})]}),ihe=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"})}),ohe=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"})}),she=r=>B("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"})]}),lhe=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"})}),uhe=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"})}),che=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"})}),fhe=r=>B("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"})]}),hhe=r=>B("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"})]}),vhe=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"})}),dhe=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"})}),phe=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"})}),ghe=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"})}),yhe=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"})}),mhe=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"})}),_he=r=>B("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"})]}),bhe=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"})}),o4=({setChartType:r})=>{const e=[{name:"Line",icon:rhe},{name:"Bar",icon:nhe},{name:"Combo",icon:she},{name:"Scatter",icon:ahe},{name:"Row",icon:ihe},{name:"Area",icon:ohe},{name:"Pie",icon:lhe},{name:"Waterfall",icon:fhe},{name:"Funnel",icon:che},{name:"Bubble",icon:hhe},{name:"Doughnut",icon:uhe},{name:"Stepped",icon:vhe},{name:"Histogram",icon:dhe},{name:"Gauge",icon:phe},{name:"Sankey",icon:ghe},{name:"Stack",icon:yhe},{name:"Single value",icon:mhe},{name:"BoxPlot",icon:_he},{name:"Table",icon:bhe}];return C("div",{className:ot.chartOptions,children:e.map(t=>B("div",{className:ot.chartOption,children:[C(Le,{type:"button",variant:"custom",className:ot.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:ot.chartOptionText,children:t.name})]},t.name))})},xhe=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"})}),whe=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"})}),She=({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]=z.useState(Wo),I="Chart types",P="Chart properties",[E,O]=z.useState(I),N={background:"#e5e7eb",width:"100%",height:"100%",paddingTop:"8px",paddingBottom:"8px",display:"flex",alignItems:"center",justifyContent:"center"};return B("div",{className:Qr.chartButtonContainer,children:[B("div",{className:Qr["chartButton-header"],children:[B(de,{styleClass:"font-14c",variant:"h1",className:Qr.settings,children:[C(xhe,{}),"Chart Settings"]}),C("div",{className:Qr.crossIcon,children:C(whe,{onClick:()=>v(!1)})})]}),B("div",{className:Qr.chartButtons,children:[B("div",{className:Qr["settingsTab-header-control"],children:[B(Le,{type:"button",variant:"custom",className:`${Qr.chartButton} ${M===Wo&&Qr.chartButtonSelected}`,onClick:()=>A(Wo),children:[M===Wo&&C("div",{style:N,children:"General"}),M!==Wo&&"General"]}),B(Le,{type:"button",variant:"custom",className:`${Qr.chartButton} ${M===Al&&Qr.chartButtonSelected}`,onClick:()=>A(Al),children:[M===Al&&C("div",{style:N,children:"Configuration"}),M!==Al&&"Configuration"]})]}),M===Wo&&B(Se,{children:[C("div",{className:Qr.tabContainer,children:C(GS,{activeTab:E,options:[I,P],setActiveTab:O,className:Qr.tab,tabText:Qr.tabText})}),E===I&&C("div",{className:Qr.button,children:C(o4,{setChartType:e})}),E===P&&C(Se,{children:r&&C("div",{className:Qr.button,children:C(i4,{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===Al&&C(the,{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 $t={"outputTab-header":"_outputTab-header_11y07_1",searchCommand:"_searchCommand_11y07_9","chartTab-container":"_chartTab-container_11y07_17",chartText:"_chartText_11y07_25",charts:"_charts_11y07_33",metricChart:"_metricChart_11y07_41",metricChartHeader:"_metricChartHeader_11y07_49",metricChartEmpty:"_metricChartEmpty_11y07_57","chartTab-wrapper":"_chartTab-wrapper_11y07_65","chartTab-wrapper-head":"_chartTab-wrapper-head_11y07_73",fullQuery:"_fullQuery_11y07_81",noQuery:"_noQuery_11y07_89","tableTab-header":"_tableTab-header_11y07_97","chartButton-header":"_chartButton-header_11y07_105",chartButtonContainer:"_chartButtonContainer_11y07_113",searchWrapper:"_searchWrapper_11y07_121",searchIcon:"_searchIcon_11y07_129",chartConfigure:"_chartConfigure_11y07_137",chartSettings:"_chartSettings_11y07_145",labels:"_labels_11y07_153",chartButtons:"_chartButtons_11y07_161",chartButton:"_chartButton_11y07_105"};const s4=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"})}),Che=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"})}),l4=({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,headerChild:V})=>{const[$,U]=z.useState(!1),[q,te]=z.useState(!1);return B("div",{className:$t["chartTab-container"],children:[B("div",{className:$t.metricChartHeader,children:[C(de,{styleClass:"primary",variant:"p",className:"",children:"Preview"}),V]}),!(i!=null&&i.length)&&P&&C("div",{className:$t["loader-container"],children:C(Wu,{style:{width:"50px",height:"50px",color:"blue"}})}),!(i!=null&&i.length)&&!P&&B("div",{className:$t.metricChartEmpty,children:[C("div",{className:$t.searchWrapper,children:C(s4,{className:$t.searchIcon})}),C("div",{className:$t.message,children:C(de,{styleClass:"font-14b",variant:"p",children:"Uh-oh, Nothing to display"})}),C("div",{className:$t.chartButton,children:C(de,{styleClass:"font-14a",variant:"p",children:"No data found! Run a query to display charts"})})]}),!!(i!=null&&i.length)&&!P&&C("div",{className:$t.metricChart,children:B("div",{className:$t["chartTab-wrapper"],children:[B("div",{className:$t["chartTab-wrapper-head"],children:[C(de,{styleClass:"primary",variant:"p",className:"",children:"Charts"}),B("div",{className:$t.chartButtons,children:[C(Le,{type:"button",variant:"custom",className:$t.chartButton,onClick:()=>{U(!$)},children:"Chart Settings"}),C(Le,{type:"button",variant:"custom",className:r!=null&&r.length?$t.fullQuery:$t.noQuery,onClick:r!=null&&r.length?()=>te(!0):void 0,children:C(Che,{})})]})]}),$&&C("div",{className:$t.chartSettings,children:C(She,{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:U,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:$t.labels,children:C(Fg,{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})}):B("div",{className:$t.metricChartEmpty,children:[C("div",{className:$t.searchWrapper,children:C(s4,{className:$t.searchIcon})}),C("div",{className:$t.message,children:C(de,{styleClass:"font-14b",variant:"p",children:"Uh-oh, Nothing to display"})}),C("div",{className:$t.chartButton,children:C(de,{styleClass:"font-14a",variant:"p",children:"Choose an appropriate chart type and start visulaizing your data"})})]})]})}),C(VS,{isShow:q,onCancel:()=>te(!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 ly={container:"_container_yjeiv_1",wrapper:"_wrapper_yjeiv_5",text:"_text_yjeiv_9",table:"_table_yjeiv_12"},ei={container:"_container_1jkce_1",table:"_table_1jkce_9",tableHead:"_tableHead_1jkce_17",tableRow:"_tableRow_1jkce_25",tableHeadCol:"_tableHeadCol_1jkce_33",tableHeadColText:"_tableHeadColText_1jkce_41",tableRowCol:"_tableRowCol_1jkce_49",tableColText:"_tableColText_1jkce_57",empty:"_empty_1jkce_65",error:"_error_1jkce_73"};const u4=({data:r,isError:e})=>B("div",{className:ei.container,children:[!!(r!=null&&r.length)&&!e&&B("table",{className:ei.table,children:[C("thead",{className:ei.tableHead,children:C("tr",{className:ei.tableRow,children:Object.keys(r[0]).map(t=>C("th",{className:ei.tableHeadCol,scope:"col",children:C(de,{styleClass:"font-14c",variant:"h1",className:ei.tableHeadColText,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:ei.tableRowCol,children:C(de,{styleClass:"font-14",variant:"p",className:ei.tableColText,children:JSON.stringify(t[a])})},i))},n))})]}),!(r!=null&&r.length)&&!e&&C("div",{className:ei.empty,children:"Table is empty"}),e&&C("div",{className:ei.error,children:r.message})]}),The=({previewTableDataList:r})=>C("div",{className:ly.container,children:C("div",{className:ly.wrapper,children:r==null?void 0:r.map(e=>B("div",{className:ly.text,children:[C(de,{variant:"h1",styleClass:"primary",className:"",children:e.name}),C("div",{className:ly.table,children:C(u4,{data:e.data,isError:e.isError})})]},e.name))})});var sl={container:"_container_38zl3_1",header:"_header_38zl3_5","text-container":"_text-container_38zl3_9","btn-container":"_btn-container_38zl3_13",tabButton:"_tabButton_38zl3_16",selectedTab:"_selectedTab_38zl3_19",table:"_table_38zl3_22"},Kr={"table-loader-container":"_table-loader-container_o6rhd_1",tableData:"_tableData_o6rhd_7",tableHeadCol:"_tableHeadCol_o6rhd_13",tableRow:"_tableRow_o6rhd_19",tableRowCol:"_tableRowCol_o6rhd_25",row:"_row_o6rhd_31",container:"_container_o6rhd_37",table:"_table_o6rhd_1",previewTable:"_previewTable_o6rhd_49",preview:"_preview_o6rhd_49",previewText:"_previewText_o6rhd_61",noData:"_noData_o6rhd_67",error:"_error_o6rhd_73",errorMsg:"_errorMsg_o6rhd_79",tableIcon:"_tableIcon_o6rhd_85"};const Dhe=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"})}),c4=({data:r,isLoading:e,error:t})=>C("div",{className:Kr.container,children:B("div",{className:Kr.previewTable,children:[C("div",{className:Kr.preview,children:C(de,{styleClass:"font-14c",variant:"h1",className:Kr.previewText,children:"Preview"})}),B("div",{className:Kr.tableData,children:[e&&!(r!=null&&r.length)&&C("div",{className:Kr["table-loader-container"],children:C(Wu,{style:{width:"50px",height:"50px",color:"blue"}})}),!!(r!=null&&r.length)&&!e&&B("table",{className:Kr.table,children:[C("thead",{children:C("tr",{className:Kr.row,children:Object.keys(r[0]).map(n=>C("th",{className:Kr.tableHeadCol,scope:"col",children:C(de,{styleClass:"font-14c",variant:"h1",children:n})},n))})}),C("tbody",{children:r.map((n,a)=>C("tr",{className:Kr.tableRow,children:Object.keys(r[0]).map((i,o)=>C("td",{className:Kr.tableRowCol,children:C(de,{styleClass:"font-14",variant:"p",children:JSON.stringify(n[i])})},o))},a))})]}),!(r!=null&&r.length)&&!e&&!t.length&&B("div",{className:Kr.noData,children:[C(Dhe,{className:Kr.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:Kr.error,children:C(de,{styleClass:"primary",className:Kr.errorMsg,variant:"p",children:t})})]})]})}),f4=({outpuTableData:r,outputError:e,isOutputLoading:t,previewTableDataList:n})=>{const[a,i]=z.useState(Ml),o={background:"#e5e7eb",width:"100%",height:"100%",paddingTop:"4px",paddingBottom:"4px",display:"flex",alignItems:"center",justifyContent:"center"};return B("div",{className:sl.container,children:[B("div",{className:sl.header,children:[B("div",{className:sl["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"})]}),B("div",{className:sl["btn-container"],children:[B(Le,{type:"button",variant:"custom",className:sl.tabButton,onClick:()=>i(vc),children:[a===vc&&C("div",{style:o,children:"Input Table"}),a!==vc&&"Input Table"]}),B(Le,{type:"button",variant:"custom",className:sl.tabButton,onClick:()=>i(Ml),children:[a===Ml&&C("div",{style:o,children:"Output Table"}),a!==Ml&&"Output Table"]})]})]}),a===vc&&C(The,{previewTableDataList:n}),a===Ml&&C("div",{className:sl.table,children:C(c4,{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 Mhe=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"})}),Ahe=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"})}),h4=({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[q,te]=z.useState(hc);return B("div",{className:Pi["main-container"],children:[B("div",{className:Pi["outputTab-header"],children:[B(Le,{type:"button",variant:"custom",className:`${Pi.tabButton} ${q===hc&&Pi.tabActive}`,onClick:()=>te(hc),children:[C(Mhe,{})," Tables"]}),B(Le,{type:"button",variant:"custom",className:`${Pi.tabButton} ${q===Sv&&Pi.tabActive}`,onClick:()=>te(Sv),children:[C(Ahe,{}),"Visualizations"]}),U==null?void 0:U.map(Y=>C(Le,{type:"button",variant:"custom",className:`${Pi.tabButton} ${q===Y.name&&Pi.tabActive}`,onClick:()=>te(Y.name),children:Y.tab},Y.name))]}),B("div",{className:Pi.wrapper,children:[q===hc&&C(f4,{outpuTableData:r,isOutputLoading:t,outputError:e,previewTableDataList:y}),q===Sv&&C(l4,{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(Y=>Y.name===q))==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"},ll={button:"_button_18a2n_1",menu:"_menu_18a2n_7",inputLabel:"_inputLabel_18a2n_13",input:"_input_18a2n_13",label:"_label_18a2n_25",menuContainer:"_menuContainer_18a2n_31",icon:"_icon_18a2n_37",container:"_container_18a2n_43"};const Lhe=[{label:"Last Week",value:"Last Week"},{label:"This Week",value:"This Week"},{label:"Last Month",value:"Last Month"},{label:"This Month",value:"This Month"},{label:"Last Year",value:"Last Year"},{label:"This Year",value:"This Year"},{label:"Yesterday",value:"Yesterday"},{label:"Today",value:"Today"},{label:"Custom",value:"Custom"}],uy={value:"",from:"",to:""},Ihe=r=>{if(!r)return uy;if(r.includes(" - ")){const[e,t]=r.split(" - ");return{...uy,value:r,from:e,to:t}}return{...uy,value:r}},v4=({isShowlabel:r,timeGrainValue:e="",setTimeGrainValue:t,register:n,className:a="",isDisabled:i,containerClass:o=""})=>{const[s,l]=z.useState(Ihe(e));return z.useEffect(()=>{s.value&&s.value!=="Custom"?t(s.value):s.from&&s.to&&t(`${s.from} - ${s.to}`)},[t,s]),z.useEffect(()=>{!s.value||t(s.value)},[s.value]),z.useEffect(()=>{e||l(uy)},[e]),C(Se,{children:B("div",{className:o,children:[r?C(de,{styleClass:"font-14c",variant:"p",className:ll.label,children:"Time Grain"}):null,C(Zg,{className:a,buttonClass:ll.button,isDisabled:i,menuClass:ll.menu,menuContainerClass:ll.menuContainer,button:C(It,{inputClass:ll.input,type:"text",placeholder:"time range",register:n==null?void 0:n("timeGrain"),value:e,onChange:({target:{value:u}})=>l(c=>({...c,value:u})),isDisabled:!0,icon:C("span",{className:ll.icon,children:C(iy,{})})}),children:B("div",{className:ll.container,children:[C(Qt,{options:Lhe,label:"Select Time Range",value:s.value,onChange:u=>l(c=>({...c,value:u}))}),s.value==="Custom"?B(Se,{children:[C(It,{label:"From Date",type:"date",value:s.from,onChange:({target:{value:u}})=>l(c=>({...c,from:u}))}),C(It,{label:"To Date",type:"date",value:s.to,onChange:({target:{value:u}})=>l(c=>({...c,to:u}))})]}):null]})})]})})},Ph=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"})}),cy=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:B("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"})]})}),Phe=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"})}),d4=(r,e)=>r.reduce((t,n)=>{const a=n[e];return a&&(t[a]||(t[a]=[]),t[a].push(n)),t},{}),Ehe=(r,e,t)=>{const n=t.toLowerCase(),a=e==="number",i=e==="string",o=e==="date";let s="";a?s=n==="mongodb"||n==="mysql"?"AS SIGNED":"AS BIGINT":i?n==="postgres"||n==="redshift"||n==="snowflake"?s="AS VARCHAR":n==="mongodb"||n==="mysql"?s="AS CHAR":s="AS STRING":o&&(s="AS DATE");let l="";return n==="mongodb"?l=`\`${r}\``:n==="bigquery"||n==="mysql"?l=`${r}`:l=`"${r}"`,s?`CAST(${l} ${s})`:l},Ohe=(r,e,t)=>{const n=Object.keys(e).map(s=>`${e[s][0].tableName.split(".").join("_")}_filter`),a=Object.keys(e).map((s,l)=>`${n[l]} AS (
253
- SELECT * FROM ${e[s][0].tableName} WHERE ${e[s].map(u=>u.datatype==="date"?`${u.value}`:`${Ehe(u.columnName,u.datatype,t)} = ${typeof u.value=="string"?`'${u.value}'`:u.value}`).join(" AND ")}
254
- )`);let i=r;for(let s=0;s<n.length;s++)i=i.replace(new RegExp(e[Object.keys(e)[s]][0].tableName,"g"),n[s]);return`WITH ${a.join(`,
255
- `)} ${i}`},Rhe=({rlsConditions:r,dbName:e,query:t})=>{const n=d4(r.filter(i=>i.isAddOnMetrics),"tableName");return Ohe(t,n,e)},p4=({timeGrainValue:r,isTimeStamp:e,col:t,database:n})=>{if(n===Dm.Redshift||n.toUpperCase()==="POSTGRES"||n===Dm.Snowflake||n==="Bigquery"){if(r==="Today")return e?`date_trunc('day', ${t}) = date_trunc('day', CURRENT_TIMESTAMP)`:`${t} = CURRENT_DATE`;if(r==="Last Week")return e?`extract(week from ${t}) = case when extract(week from current_date) = 1 then 4 else extract(week from current_date) - 1 end
256
- AND extract(year from ${t}) = case when extract(week from current_date) = 1 and extract(month from current_date) = 1 then extract(year from current_date) -1 else extract(year from current_date) end
257
- AND extract(month from ${t}) = case when extract(week from current_date) = 1 then case when extract(week from current_date) - 1 = 0 then 12 else extract(week from current_date) - 1 end else extract(month from current_date) end
258
- `:`extract(week from ${t}) = case when extract(week from current_date) = 1 then 4 else extract(week from current_date) - 1 end
259
- AND extract(year from ${t}) = case when extract(week from current_date) = 1 and extract(month from current_date) = 1 then extract(year from current_date) -1 else extract(year from current_date) end
260
- AND extract(month from ${t}) = case when extract(week from current_date) = 1 then case when extract(week from current_date) - 1 = 0 then 12 else extract(week from current_date) - 1 end else extract(month from current_date) end
261
- `;if(r==="This Week")return e?`extract(week from ${t}) = extract(week from current_date)
262
- AND extract(year from ${t}) = extract(year from current_date) AND extract(month from ${t}) = extract(month from current_date)`:`extract(week from ${t}) = extract(week from current_date)
263
- AND extract(year from ${t}) = extract(year from current_date) AND extract(month from ${t}) = extract(month from current_date)`;if(r==="Yesterday")return e?`date_trunc('day', ${t}) = date_trunc('day', CURRENT_TIMESTAMP - INTERVAL '1 day')`:`${t} = CURRENT_DATE - INTERVAL '1 day'`;if(r==="This Year")return e?`extract(year from ${t}) = extract(year from current_date)`:`extract(year from ${t}) = extract(year from current_date)`;if(r==="Last Year")return e?`extract(year from ${t}) = extract(year from current_date) - 1`:`extract(year from ${t}) = extract(year from current_date) - 1`;if(r==="Last Month")return e?`extract(month from ${t}) = case when extract(month from current_date) = 1 then 12 else extract(month from current_date) - 1 end AND extract(year from ${t}) = case when extract(month from current_date) = 1 then extract(year from current_date) - 1 else extract(year from current_date) end`:`extract(month from ${t}) = case when extract(month from current_date) = 1 then 12 else extract(month from current_date) - 1 end AND extract(year from ${t}) = case when extract(month from current_date) = 1 then extract(year from current_date) - 1 else extract(year from current_date) end`;if(r==="This Month")return e?`extract(month from ${t}) = extract(month from current_date) AND extract(year from ${t}) = extract(year from current_date)`:`extract(month from ${t}) = extract(month from current_date) AND extract(year from ${t}) = extract(year from current_date)`;const s=r.split(" - ")[0],l=r.split(" - ")[1];return e?`${t} BETWEEN '${s} 00:00:00' AND '${l} 23:59:59'`:`${t} BETWEEN '${s}' AND '${l}'`}if(r==="Today")return e?`DATE(${t}) = CURDATE()`:`${t} = CURDATE()`;if(r==="Last Week")return e?`WEEK(${t}) =
264
- CASE
265
- WHEN WEEK(${t}) = 1 THEN 4
266
- ELSE WEEK(CURRENT_DATE) - 1
267
- END
268
- AND
269
- MONTH(${t}) =
270
- CASE
271
- WHEN WEEK(CURRENT_DATE) = 1
272
- THEN
273
- CASE
274
- WHEN MONTH(CURRENT_DATE) -1 = 0 THEN 12
275
- ELSE MONTH(CURRENT_DATE) -1
276
- END
277
- ELSE MONTH(CURRENT_DATE)
278
- END
279
- AND YEAR(${t}) = CASE WHEN MONTH(CURRENT_DATE) = 1 AND WEEK(CURRENT_DATE) = 1 THEN YEAR(CURRENT_DATE) - 1
280
- ELSE YEAR(CURRENT_DATE) END`:`WEEK(${t}) =
281
- CASE
282
- WHEN WEEK(${t}) = 1 THEN 4
283
- ELSE WEEK(CURRENT_DATE) - 1
284
- END
285
- AND
286
- MONTH(${t}) =
287
- CASE
288
- WHEN WEEK(CURRENT_DATE) = 1
289
- THEN
290
- CASE
291
- WHEN MONTH(CURRENT_DATE) -1 = 0 THEN 12
292
- ELSE MONTH(CURRENT_DATE) -1
293
- END
294
- ELSE MONTH(CURRENT_DATE)
295
- END
296
- AND YEAR(${t}) = CASE WHEN MONTH(CURRENT_DATE) = 1 AND WEEK(CURRENT_DATE) = 1 THEN YEAR(CURRENT_DATE) - 1
297
- ELSE YEAR(CURRENT_DATE) END`;if(r==="This Week")return e?`WEEK(${t}) = WEEK(CURRENT_DATE)
298
- AND
299
- MONTH(${t}) = MONTH(CURRENT_DATE)
300
- AND
301
- YEAR(${t}) = YEAR(CURRENT_DATE)`:`WEEK(${t}) = WEEK(CURRENT_DATE)
302
- AND
303
- MONTH(${t}) = MONTH(CURRENT_DATE)
304
- AND
305
- YEAR(${t}) = YEAR(CURRENT_DATE)`;if(r==="Yesterday")return e?`DATE(${t}) = CURDATE() - INTERVAL 1 DAY`:`${t} = DATE(NOW() - INTERVAL 1 DAY)`;if(r==="This Year")return e?`YEAR(${t}) = YEAR(NOW())`:`YEAR(${t}) = YEAR(NOW())`;if(r==="Last Year")return e?`YEAR(${t}) = YEAR(NOW()) - 1`:`YEAR(${t}) = YEAR(NOW()) - 1`;if(r==="Last Month")return e?`MONTH(${t}) =
306
- CASE
307
- WHEN MONTH(NOW()) = 1 THEN 12
308
- ELSE MONTH(NOW()) -1
309
- END
310
- AND
311
- YEAR(${t}) =
312
- CASE
313
- WHEN MONTH(NOW()) = 1 THEN YEAR(NOW())-1
314
- ELSE YEAR(NOW())
315
- END`:`MONTH(${t}) =
316
- CASE
317
- WHEN MONTH(NOW()) = 1 THEN 12
318
- ELSE MONTH(NOW()) -1
319
- END
320
- AND
321
- YEAR(${t}) =
322
- CASE
323
- WHEN MONTH(NOW()) = 1 THEN YEAR(NOW())-1
324
- ELSE YEAR(NOW())
325
- 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 Nhe=Object.freeze(Object.defineProperty({__proto__:null,getModifiedQuery:Rhe,getTimeFilterValue:p4,groupArray:d4,groupByMultipleKeys:nB,updateGroupData:Ca,findKeys:lS},Symbol.toStringTag,{value:"Module"}));const g4=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"})}),y4=({dateTimeColumnList:r,columnList:e,database:t,companyId:n,tableName:a,setData:i,setError:o,setLoading:s,setQuery:l,isEnableGroupBy:u,setSelectedGroupBy:c,clientId:f,clientColumn:h})=>{const[v,d]=z.useState([]),[p,g]=z.useState(""),[y,m]=z.useState({value:"",label:""}),[_,b]=z.useState([]),[w,x]=z.useState([]),[S,T]=z.useState(""),[D,M]=z.useState(""),[A,I]=z.useState([]),[P,E]=z.useState([]),[O,N]=z.useState(!1),[V,$]=z.useState(!1),[U,q]=z.useState(!1),[te,H]=z.useState(!1),[Y,X]=z.useState(!1),[Z,ie]=z.useState(!1),[se,ne]=z.useState([]),[ve,R]=z.useState(""),[F,G]=z.useState({value:"",label:""}),[ae,re]=z.useState({value:"",label:""}),[K,ue]=z.useState({value:"",label:""}),[Re,mt]=z.useState({value:"10",label:"10"}),[Xe,Zt]=z.useState({value:"",label:""}),[St,Jr]=z.useState({value:"",label:""}),[fr,st]=z.useState({value:"",label:""}),[Ot,ta]=z.useState({value:"",label:""}),[or,vn]=z.useState({value:"",label:""});z.useEffect(()=>{e.length&&(I(De=>De.filter(rt=>e.map(Ct=>Ct.value).includes(rt))),d(De=>De.filter(rt=>{var Ct;return e.map(Ue=>Ue.value).includes(((Ct=rt.as.match(/\((.*?)\)/))==null?void 0:Ct[1])||"")})),G(e[0]),b(De=>De.filter(rt=>e.map(Ct=>Ct.value).includes(rt.value))),re(e[0]),Zt(e[0]),T(De=>e.find(rt=>De.includes(rt.value))?De:""),ue(e[0]),x(De=>De.filter(rt=>e.find(Ct=>rt.includes(Ct.value)))),X(!1),M(De=>e.find(rt=>De.includes(rt.value))?De:""),D||g(""))},[e]),z.useEffect(()=>{r.length?m({value:r[0].name,label:r[0].as}):m({value:"",label:""})},[r]);const{generateDatasetMetric:ul,isGeneratingDataset:en,generateError:cl,fetchColumnValues:Qu}=Yg();z.useEffect(()=>{Xe.value&&(E([]),vn({value:"",label:""}),Qu({companyId:n,tableName:a,columnName:Xe.value},{onSuccess(De){var Ct;const rt=(Ct=De.fetchColumnData)==null?void 0:Ct.data;if(rt!=null&&rt.length){const Ue=rt.map(Kt=>({value:(Kt==null?void 0:Kt.value)||"",label:(Kt==null?void 0:Kt.label)||""}));ne(Ue)}}}))},[Xe]);const Oh=!v.length&&!_.length,fl=!r.length,Po=!y.value,hl=!!v.length,vl=!!_.length,dn=t==="Bigquery",hr=t==="MySql",ra=t==="MongoDB",Eo=Ot.value==="IS NULL"||Ot.value==="IS NOT NULL",lt=Ot.value==="IN"||Ot.value==="NOT IN",zr=Eo?!0:lt?!!P.length:!!or.value,Ht=_.length?!1:!fr.value;return z.useEffect(()=>{var De;if(p&&y.value&&r.length){const rt=(De=r.find(Ue=>Ue.name===y.value))==null?void 0:De.datatype,Ct=p4({timeGrainValue:p,isTimeStamp:(rt==null?void 0:rt.toLowerCase())!=="date",col:y.value,database:t});M(Ct)}},[p,y]),z.useEffect(()=>{_.length&&(X(!1),I([]),T(""))},[_]),z.useEffect(()=>{Eo&&vn({value:"",label:""})},[Ot]),z.useEffect(()=>{u&&c(A)},[A,u]),B("div",{className:He["form-container"],children:[!fl&&B("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:B("div",{className:He["field-inner-container"],children:[C(Sr,{onChange:m,selectedOption:y,options:r.map(({name:De,as:rt})=>({value:De,label:rt})),isDisabled:fl,labelVariant:"static",label:"Time Column"}),C(v4,{setTimeGrainValue:g,timeGrainValue:p,isShowlabel:!0,isDisabled:Po}),p&&B(Le,{type:"button",variant:"custom",className:He["field-value"],onClick:()=>g(""),children:[p," ",C(Ph,{})]})]})})]}),!vl&&B("div",{className:He["field-container"],children:[B(de,{variant:"h1",styleClass:"custom",className:He["field-label"],children:["Metric Creation",C(Ii,{children:"configure metric columns"})]}),C("div",{className:He["field-wrapper"],children:B("div",{className:He["field-inner-container"],children:[C(de,{variant:"p",styleClass:"font-14",children:"Metric Fields"}),B(Le,{type:"button",variant:"secondary",className:He["field-add-btn"],onClick:()=>{N(!0),R("")},isDisabled:vl,children:[C(cy,{})," Add Aggregate Column"]}),C("div",{className:He["field-value-container"],children:v.map(De=>B(Le,{type:"button",variant:"custom",className:He["field-value"],onClick:()=>d(rt=>rt.filter(Ct=>Ct.as!==De.as)),children:[De.as," ",C(Ph,{})]},De.as))}),B(Li,{headerTitle:F.value&&St.value?`${St.value}(${F.value})`:"Create metric",isOpen:O,onClose:()=>N(!1),children:[B("div",{className:He.dropdown,children:[C(Sr,{onChange:G,selectedOption:F,options:e,labelVariant:"static",label:"Columns"}),C(Sr,{onChange:Jr,selectedOption:St,options:mm,labelVariant:"static",label:"Aggregate"}),C(It,{label:"As",type:"text",placeholder:"Save as",name:"alias",onChange:De=>R(De.target.value)})]}),C(Zu,{children:C(Le,{type:"button",variant:"primary",size:"small",className:He.disabled,isDisabled:!St.value||!F.value,onClick:()=>{d(De=>[...De,{value:`${St.value}(${dn||hr?`${F.value}`:ra?`\`${F.value}\``:`"${F.value}"`})`,as:dn?ve||"_result":ve||`${St.value}(${F.label})`}]),N(!1)},children:"Save"})})]}),C(de,{variant:"p",styleClass:"font-14",children:"Group By"}),C(Ih,{options:e,onChange:I,value:A,name:"Dimensions",placeHolder:"Select Columns"})]})})]}),!hl&&B("div",{className:He["field-container"],children:[B(de,{variant:"h1",styleClass:"custom",className:He["field-label"],children:["Columns",C(Ii,{children:"select columns for raw records query"})]}),C("div",{className:He["field-wrapper"],children:B("div",{className:He["field-inner-container"],children:[C(de,{variant:"p",styleClass:"font-14",children:"Select Columns"}),B(Le,{type:"button",variant:"secondary",className:He["field-add-btn"],onClick:()=>{$(!0),R("")},isDisabled:hl,children:[C(cy,{})," Add Column"]}),C("div",{className:He["field-value-container"],children:_.map(De=>B(Le,{type:"button",variant:"custom",className:He["field-value"],onClick:()=>b(rt=>rt.filter(Ct=>Ct.as!==De.as)),children:[De.as," ",C(Ph,{})]},De.as))}),B(Li,{headerTitle:ae.value?`${ae.value}`:"Select Column",isOpen:V,onClose:()=>$(!1),children:[B("div",{className:He.dropdown,children:[C(Sr,{onChange:re,selectedOption:ae,options:e,labelVariant:"static",label:"Columns"}),C(It,{label:"As",type:"text",placeholder:"Save as",name:"alias",onChange:De=>R(De.target.value)})]}),C(Zu,{children:C(Le,{type:"button",variant:"primary",size:"small",className:He.disabled,isDisabled:!ae.value,onClick:()=>{_.find(De=>De.as===ve)||b(De=>[...De,{value:`${ae.value}`,as:ve||`${ae.label}`}]),$(!1)},children:"Save"})})]})]})})]}),B("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:B("div",{className:He["field-inner-container"],children:[C(de,{variant:"p",styleClass:"font-14",children:"Filter by"}),B(Le,{type:"button",variant:"secondary",className:He["field-add-btn"],onClick:()=>H(!0),children:[C(cy,{})," Add Filter Category"]}),C("div",{className:He["field-value-container"],children:w.map(De=>B(Le,{type:"button",variant:"custom",className:He["field-value"],onClick:()=>x(rt=>rt.filter(Ct=>Ct!==De)),children:[De," ",C(Ph,{})]},De))}),B(Li,{headerTitle:Xe.value&&Ot.value?`${Xe.value} ${Ot.value} ${lt?`(${P.map(De=>`'${De}'`).join(", ")})`:`${or.value?`'${or.value}'`:""}`}`:"Add Filter",isOpen:te,onClose:()=>H(!1),children:[B("div",{className:He.filterDropdown,children:[C(Sr,{onChange:Zt,selectedOption:Xe,options:e,labelVariant:"static",label:"Column"}),C(Sr,{onChange:ta,selectedOption:Ot,options:bv,labelVariant:"static",label:"Operator"}),lt?B("div",{className:He.filterValue,children:[C(de,{variant:"p",styleClass:"font-14",children:"Filter Value"}),C(Ih,{options:se,onChange:E,value:P,name:"Filters",placeHolder:"Select Multiple Filters"})]}):C(Sr,{onChange:vn,selectedOption:or,options:se,isDisabled:Eo,labelVariant:"static",label:"Filter Value"})]}),C(Zu,{children:C(Le,{type:"button",variant:"primary",size:"small",isDisabled:!Xe.value||!Ot.value||!zr,className:He.disabled,onClick:()=>{x(De=>[...De,`${dn||hr?`${Xe.value}`:ra?`\`${Xe.value}\``:`"${Xe.value}"`} ${Ot.value} ${lt?`(${P.map(rt=>`'${rt}'`).join(", ")})`:`${or.value?`'${or.value}'`:""}`}`]),H(!1)},children:"Save"})})]}),C(de,{variant:"p",styleClass:"font-14",children:"Sort By"}),B(Le,{type:"button",variant:"secondary",className:He["field-add-btn"],onClick:()=>q(!0),children:[S?C(Phe,{}):C(cy,{})," ",S?"Edit":"Add"," Sort Category"]}),S&&B(Le,{type:"button",variant:"custom",className:He["field-value"],onClick:()=>T(""),children:[S," ",C(Ph,{})]}),B(Li,{headerTitle:_.length?K.value?`${K.value}`:"Create sort":K.value&&fr.value?`${fr.value}(${K.value})`:"Create sort",isOpen:U,onClose:()=>q(!1),children:[B("div",{className:He.dropdown,children:[C(Sr,{onChange:ue,selectedOption:K,options:e,labelVariant:"static",label:"Column"}),!_.length&&C(Sr,{onChange:st,selectedOption:fr,options:mm,labelVariant:"static",label:"Aggregate"})]}),C(Zu,{children:C(Le,{type:"button",variant:"primary",size:"small",isDisabled:!K.value||Ht,className:He.disabled,onClick:()=>{_.length?T(`${dn||hr?`${K.value}`:`${K.value}`}`):T(`${fr.value}(${dn||hr?`${K.value}`:ra?`\`${K.value}\``:`"${K.value}"`})`),q(!1)},children:"Save"})})]})]})})]}),C(Sr,{onChange:mt,options:IT,selectedOption:Re,labelVariant:"static",label:"Row Limit"}),!_.length&&!!r.length&&B(de,{styleClass:"font-14",variant:"p",className:He.columnText,children:[C(Le,{type:"button",variant:"custom",onClick:()=>X(De=>!De),isDisabled:!y.value||!!_.length,children:Y?C(g4,{className:He.checkIcon}):C(FS,{})}),"Include Time"]}),B(de,{styleClass:"font-14",variant:"p",className:He.columnText,children:[C(Le,{type:"button",variant:"custom",onClick:()=>ie(De=>!De),children:Z?C(g4,{className:He.checkIcon}):C(FS,{})}),"Sort Descending"]}),C(Le,{type:"button",variant:"primary",className:He.generateButton,isDisabled:en||Oh,onClick:()=>{var De,rt,Ct;o(""),s(!0),i([]),l(""),en&&s(!0),ul({companyId:n,userInputs:{columns:_.map(Ue=>dn||hr?`${Ue.value} AS ${Ue.as} `:ra?`\`${Ue.value}\` AS "${Ue.as}"`:`"${Ue.value}" AS "${Ue.as}"`),dimensions:dn||hr?A.map(Ue=>{var Kt,pn;return{name:(Kt=e.find(Br=>Br.value===Ue))==null?void 0:Kt.value,as:(pn=e.find(Br=>Br.value===Ue))==null?void 0:pn.label}}):ra?A.map(Ue=>{var Kt,pn;return{name:`\`${(Kt=e.find(Br=>Br.value===Ue))==null?void 0:Kt.value}\``,as:(pn=e.find(Br=>Br.value===Ue))==null?void 0:pn.label}}):A.map(Ue=>{var Kt,pn;return{name:`"${(Kt=e.find(Br=>Br.value===Ue))==null?void 0:Kt.value}"`,as:(pn=e.find(Br=>Br.value===Ue))==null?void 0:pn.label}}),metrics:v.map(Ue=>dn?`${Ue.value} AS ${Ue.as}`:`${Ue.value} AS "${Ue.as}"`),sort:S,isSortDescending:Z,filters:w,tableName:a,rowLimit:Re.value,timeFilter:{filter:D,column:dn||hr?{name:y.value,as:(De=e.find(Ue=>Ue.value===y.value))==null?void 0:De.label}:ra?{name:`\`${y.value}\``,as:(rt=e.find(Ue=>Ue.value===y.value))==null?void 0:rt.label}:{name:`"${y.value}"`,as:(Ct=e.find(Ue=>Ue.value===y.value))==null?void 0:Ct.label},isInclude:Y},clientColumnFilter:h?{value:Number(f)||f,column:dn||hr?`${h}`:ra?`\`${h}\``:`"${h}"`}:void 0}},{onSuccess(Ue){var fy,hy,Rh;const Kt=(fy=Ue.generateDatasetMetrics)==null?void 0:fy.error,pn=(hy=Ue.generateDatasetMetrics)==null?void 0:hy.result,Br=(Rh=Ue.generateDatasetMetrics)==null?void 0:Rh.query;(Kt||cl)&&(o(Kt.message||Sm),s(!1),i([]),l("")),pn&&Br&&(o(""),s(!1),i(Array.isArray(pn)?pn:[]),l(Br))}})},children:"Generate"})]})};var m4={container:"_container_rofqe_1",header:"_header_rofqe_5",enableGroupBy:"_enableGroupBy_rofqe_8",enableGroupButton:"_enableGroupButton_rofqe_11"},Ei={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 YS=({enabled:r,onChange:e,label:t,className:n="",placeholder:a,labelClassName:i,defaultEnabled:o})=>B("div",{className:`${Ei.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:Ei.checkbox}),B("label",{htmlFor:"toggle",className:Ei.button,children:[C("span",{className:`${Ei.switch} ${r?Ei.enabled:Ei.notenabled}`}),a?C("span",{className:`
326
- ${Ei.label}
327
- ${r?Ei.labelActive:Ei.labelInactive}
328
- `,children:a}):null]})]}),_4=({dateTimeColumnList:r,columnList:e,database:t,companyId:n,tableName:a,setData:i,setError:o,setLoading:s,setQuery:l,isEnableGroupBy:u,setEnableGroupBy:c,setSelectedGroupBy:f,clientId:h,clientColumn:v})=>B("div",{className:m4.container,children:[B("div",{className:m4.header,children:["Data",c&&C(YS,{enabled:u,onChange:d=>c(d),placeholder:"Group By"})]}),C(y4,{dateTimeColumnList:r,columnList:e,database:t,companyId:n,tableName:a,setData:i,setError:o,setQuery:l,setLoading:s,isEnableGroupBy:u,setSelectedGroupBy:f,clientId:h,clientColumn:v})]});var Oi={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"},qS={label:"_label_1vo1x_1",textarea:"_textarea_1vo1x_9",resizable:"_resizable_1vo1x_17"};const b4=({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})=>B("div",{className:h,children:[C("label",{htmlFor:r,className:qS.label,children:e}),C("textarea",{id:r,name:r,rows:n,cols:a,placeholder:t,className:Ka(qS.textarea,`${i?null:qS.resizable}`),defaultValue:l,...o,value:u,onFocus:c,onBlur:f}),s&&C(WS,{message:s.message})]}),x4=({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}=zS(),[c,f]=z.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 B("form",{className:Oi.form,onSubmit:h,children:[B("div",{className:Oi.container,children:[C("div",{className:Oi.field,children:C(Ih,{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(b4,{className:Oi.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(YS,{className:Oi.field,labelClassName:Oi.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:Oi.error,children:s}),B(Zu,{children:[C(Le,{type:"reset",variant:"secondary",className:Oi.cancel,onClick:t,size:"default",children:"Cancel"}),C(Le,{type:"submit",variant:"primary",size:"small",className:Oi.save,isDisabled:!p.length||!a.length,children:"Save"})]})]})},khe=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"})}),w4=({clientId:r,companyId:e,mode:t,externalDashboardId:n,variant:a="static"})=>{var Eo;const[i,o]=z.useState(!1),[s,l]=z.useState(""),[u,c]=z.useState(),[f,h]=z.useState([]),[v,d]=z.useState(""),[p,g]=z.useState(!1),[y,m]=z.useState([]),[_,b]=z.useState(),[w,x]=z.useState(!1),[S,T]=z.useState(!1),[D,M]=z.useState(!1),[A,I]=z.useState({value:"",label:""}),[P,E]=z.useState([]);z.useEffect(()=>{y.length&&b({column:y[0]})},[y]);const{mutate:O}=g$(),N=z.useMemo(()=>P.map(lt=>({value:lt.tableName,label:lt.tableName})),[P]),V=z.useMemo(()=>P.find(lt=>lt.tableName===A.value),[A.value,P]),$=z.useMemo(()=>V==null?void 0:V.clientColumn,[V]),U=z.useMemo(()=>(V==null?void 0:V.columns.map(({name:lt,as:zr})=>({value:lt,label:zr})))||[],[V]);z.useEffect(()=>{N.length&&I(N[0])},[N]);const q=z.useMemo(()=>(V==null?void 0:V.columns.filter(({datatype:lt})=>xm.includes(lt.toLowerCase())))||[],[V]),[te,H]=z.useState();z.useEffect(()=>{r&&e&&O({clientId:r,companyId:e},{onSuccess(lt){var De;const zr=(De=lt.companySubsetTableData)==null?void 0:De.error,Ht=lt.companySubsetTableData;zr?l(zr.message):(H({id:Ht==null?void 0:Ht.companyIntegrationId,name:Ht==null?void 0:Ht.dbName}),E(Ht==null?void 0:Ht.tableList))}})},[r,e,O]);const[Y,X]=z.useState("bar"),[Z,ie]=z.useState(),[se,ne]=z.useState(),[ve,R]=z.useState(),[F,G]=z.useState({marginTop:20,marginBottom:20,marginLeft:5,marginRight:5}),[ae,re]=z.useState({show:!0,top:0,left:0,right:0,bottom:0,position:"horizontal"}),[K,ue]=z.useState({hideSplitLines:"none",hideAxisLines:"none",barWidth:40,barRadius:0,axisLabels:"none",fontSize:14,subHeaderShow:!1,displayText:"",subHeaderFontSize:0,dateFormatter:"none",numberFormatter:"original"}),[Re,mt]=z.useState({axis:"left",show:!1,position:"hidden"}),[Xe,Zt]=z.useState({axis:"left"}),[St,Jr]=z.useState({show:!1}),[fr]=z.useState(),[st,Ot]=z.useState(),[ta,or]=z.useState(),[vn,ul]=z.useState(),[en,cl]=z.useState(),{datasets:Qu,funnelData:Oh,labels:fl,sankeyData:Po,singleValueData:hl}=ym({data:p?f:u,measure:vn,sankeyValues:ve,singleValue:ta,step:se,xAxis:Z,yAxisList:st});z.useEffect(()=>{if(f.length&&p){const lt=lS(f[0]);ie(lt.stringKeys[0]),Ot(lt.numberKeys),ne(lt.stringKeys[0]),ul(lt.numberKeys[0])}},[f]),z.useEffect(()=>{if((u==null?void 0:u.length)&&!p){const lt=Object.keys(u[0]);ie(lt[0]),Ot(lt.slice(1))}},[u,p]);const{createExternalMetric:vl,error:dn}=CB({query:v,xAxis:Z,backGroundColor:St,customSettings:K,chartType:Y,yAxisList:st,step:se,measure:vn,sankeyValues:ve,singleValue:ta,companyIntegrationId:te==null?void 0:te.id,integrationName:te==null?void 0:te.name,margins:F,legendSettings:ae,labelSettings:Re,axisSettings:Xe,metricQuery:fr,outputColumns:void 0,selectedColumns:void 0,clientId:r,isEmbedded:!0,companyId:e,mode:t,dashboardIds:[n],isEnableGroupBy:p,groupBy:_,selectedGroupBy:y}),{mutate:hr}=A$();z.useEffect(()=>{A.value&&hr({companyId:e,tableName:A.value,limit:10},{onSuccess(lt){var Ht;const zr=(Ht=lt.previewTable)==null?void 0:Ht.data;cl(zr?[zr]:void 0)}})},[A]),z.useEffect(()=>{(u==null?void 0:u.length)&&y.length&&Ca(u,[y[0]],y,h)},[u]);const ra=lt=>{if((_==null?void 0:_.column)&&lt&&lt!=="undefined"){if(y.lastIndexOf(_.column)!==y.length-1){const zr=y.indexOf(_.column),Ht=_.column;b({column:y[zr+1],parentColumn:{column:_.column,value:lt}}),Ca(u==null?void 0:u.filter(De=>De[Ht]===lt),[y[zr+1]],y,h)}y.lastIndexOf(_.column)===y.length-1&&(b({column:y[0]}),Ca(u,[y[0]],y,h))}else b({column:y[0]}),Ca(u,[y[0]],y,h)};return z.useEffect(()=>{f.length===0&&p&&y.length&&(u==null?void 0:u.length)&&(b({column:y[0]}),Ca(u,[y[0]],y,h))},[f,p,y]),B(Se,{children:[C(Le,{type:"button",variant:a==="floating"?"custom":"primary",size:"large",className:a==="floating"?oy.floatingCreateButton:"",onClick:()=>x(!0),children:a==="floating"?C(khe,{className:oy.floatingCreateButtonIcon}):"Create Metric"}),C(Li,{headerTitle:"Create Metric",isOpen:w,onClose:()=>x(!1),customHeader:C(KB,{Heading:"Create Metric",setShowMetricCreateModal:x,isDisableSqlBtn:!v,isDisableSaveBtn:!(vn!=null&&vn.length)&&!((Eo=st==null?void 0:st.filter(lt=>lt))!=null&&Eo.length)&&!ta,setShowSqlModal:T,setShowSaveMetricModal:M}),children:B("div",{className:oy["modal-container"],children:[C(JB,{setselectTable:I,selectTable:A,tableList:N,columnList:(V==null?void 0:V.columns)||[]}),C(_4,{dateTimeColumnList:q,columnList:U,database:(te==null?void 0:te.name)||"",companyId:e,tableName:A.value,setData:c,setError:l,setQuery:d,setLoading:o,isEnableGroupBy:p,setEnableGroupBy:g,setSelectedGroupBy:m,clientId:r,clientColumn:$}),C(h4,{data:p?f:u,error:s,isLoading:i,labels:fl,funnelData:Oh,chartType:Y,datasets:Qu,setChartType:X,setXAxis:ie,setYAxisList:Ot,xAxis:Z,setMeasure:ul,setStep:ne,step:se,measure:vn,setSankeyValues:R,sankeyData:Po,previewTableDataList:en,singleValue:ta,setSingleValue:or,singleValueData:hl,setMargins:G,margins:F,legendSettings:ae,setLegendSettings:re,labelSettings:Re,setLabelSettings:mt,axisSettings:Xe,setAxisSettings:Zt,updateGroup:ra,isEnableGroupBy:p,backGroundColor:St,setBackGroundColor:Jr,customSettings:K,setCustomSettings:ue})]})}),C(Li,{headerTitle:"Generated Query",isOpen:S,onClose:()=>T(!1),children:C("div",{className:oy["query-modal"],children:v})}),C(Li,{isOpen:D,onClose:()=>M(!1),headerTitle:"Save To Dashboard",children:C(x4,{onCancel:()=>M(!1),onSubmit:vl,dashboardIds:[n],onDashboardChange:()=>{},companyId:e,error:dn,isEmbedded:!0})})]})};var hn={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 S4=({companyId:r,filter:e,onChange:t,selectedOption:n,autoSelected:a=!0,...i})=>{const[o,s]=z.useState([]),{fetchColumnValues:l}=Yg();return z.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]),z.useEffect(()=>{o.length&&o[0]&&a&&t(o[0])},[o.length,o[0],a,e.columnName]),C(Sr,{onChange:t,selectedOption:e.defaultValue?{label:e.defaultValue,value:e.defaultValue}:n,isDisabled:!!e.defaultValue,options:o,label:e.columnName,...i})},C4=pe.default.memo(({filter:r,companyId:e,autoSelected:t,onChange:n,selectedOptions:a,...i})=>{const[o,s]=z.useState([]),{fetchColumnValues:l}=Yg();return z.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]),z.useEffect(()=>{o.length&&o[0]&&t&&n([o[0]])},[o.length,o[0],t,r.columnName]),C(YB,{onChange:n,selectedOptions:r.defaultValue?[{label:r.defaultValue,value:r.defaultValue}]:a,isDisabled:!!r.defaultValue,options:o,label:r.columnName,...i})}),ZS=r=>["IN","NOT IN"].includes(r),Eh=r=>["IS NULL","IS NOT NULL"].includes(r),T4=({filter:r,onChange:e,isResetted:t,companyId:n,tableName:a})=>{const[i,o]=z.useState({value:"",label:""}),[s,l]=z.useState({value:"",label:""}),[u,c]=z.useState([]),f=z.useMemo(()=>ET(r.dataType),[r.dataType]);return z.useEffect(()=>{!i.value||s.value!==""&&u.length||e({column:r.name,operator:i.value,value:Eh(i.value)?null:s.value||u.map(h=>h.value)})},[i,s.value,u]),z.useEffect(()=>{!t||(o({label:"",value:""}),l({label:"",value:""}),c([]))},[t]),C(Se,{children:B(Zg,{buttonClass:Ri.button,menuClass:Ri.menu,position:"bottom-left",menuContainerClass:Ri.menuContainer,button:B(Se,{children:[B("span",{className:Ri.buttonText,children:[C($S,{datatype:r.as||"unknown"}),r.name]}),C("span",{className:Ri.buttonIcon,children:C(iy,{})})]}),children:[C(de,{variant:"p",styleClass:"font-14",className:Ri.filterName,children:r.name}),C(Sr,{label:"Operator",labelVariant:"static",selectedOption:i,onChange:h=>o(h),options:bv}),i.value&&!Eh(i.value)?C(Se,{children:f==="boolean"?C(Sr,{options:[{value:"true",label:"TRUE"},{value:"false",label:"FALSE"}],selectedOption:s,onChange:l,label:"Filter Value",labelVariant:"static",className:Ri.filterDropdown}):C(Se,{children:ZS(i.value)?C(C4,{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(S4,{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]})})},zhe=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"})}),D4=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"})}),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"})}),Fhe=r=>ZS(r.operator)?r.value.map(e=>["true","false"].includes(e)?e==="true":!Number.isNaN(e)&&Number(e)?Number(e):`'${e}'`):Eh(r.operator)?null:["true","false"].includes(r.value)?r.value==="true":!Number.isNaN(r.value)&&Number(r.value)?Number(r.value):`'${r.value}'`,M4=({filters:r,onApply:e,companyId:t,renderAdditionalHeaderContent:n})=>{const[a,i]=z.useState([]),o=()=>{i([]),e({tableName:"",filters:[]})},s=l=>{l.preventDefault();const u=a.map(c=>{const f={column:c.column,operator:c.operator},h=Fhe({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(Se,{children:B("div",{className:hn.container,children:[B("form",{className:hn.form,onSubmit:s,onReset:o,children:[B("div",{className:hn.filterHeader,children:[B("div",{className:hn.titleContent,children:[C(de,{variant:"p",styleClass:"primary",className:hn.title,children:"Filters:"}),n?n():null]}),B("div",{className:hn.buttons,children:[B(Le,{type:"submit",variant:"outlined",className:hn.apply,children:[C(D4,{className:hn.applyIcon})," Apply"]}),B(Le,{type:"reset",variant:"secondary",className:hn.reset,children:[C(zhe,{})," Reset Filters"]})]})]}),C("div",{className:hn.filterFields,children:r[0].columns.map(l=>C(T4,{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:hn.filters,children:a.map(l=>{var u;return B("li",{className:hn.filterItem,children:[l.column,C("span",{className:hn.filterItemOperator,children:((u=bv.find(c=>c.value===l.operator))==null?void 0:u.label)||""}),Eh(l.operator)?null:C(Se,{children:Array.isArray(l.value)?`[${l.value.map(c=>c).join(",")}]`:l.value}),C(Le,{type:"button",variant:"custom",className:hn.remove,onClick:()=>i(c=>c.filter(f=>f.column!==l.column)),children:C(Bhe,{})})]},l.column)})}):null]})})},Vhe=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"})}),$he=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:B("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})]})}),A4=pe.default.memo(({token:r,options:e,theme:t})=>{var u,c;const{data:n,isLoading:a}=SB(r),[i,o]=z.useState(!1),[s,l]=z.useState({tableName:"",filters:[]});return C(Se,{children:B("div",{className:tn["embedDashboard-container"],children:[((u=n.externalDashboard)==null?void 0:u.id)&&!a&&B(Se,{children:[B("div",{className:(e==null?void 0:e.headerVariant)==="floating"?tn["embedDashboard-header-floating"]:tn["embedDashboard-header-static"],children:[(e==null?void 0:e.headerVariant)==="floating"&&C("span",{className:tn.floatingButton,children:C($he,{className:tn.floatingButtonIcon})}),B("div",{className:(e==null?void 0:e.headerVariant)==="floating"?tn.floatingContainer:tn.staticContainer,children:[n.externalDashboard.filters.length?C(Le,{type:"button",variant:"custom",size:"large",className:(e==null?void 0:e.headerVariant)==="floating"?tn.floatingFilterButton:tn.filter,onClick:()=>o(f=>!f),children:i?C(Vhe,{className:tn.floatingFilterButtonIcon}):C(D4,{className:tn.floatingFilterButtonIcon})}):null,!(e!=null&&e.disableMetricCreation)&&n.isAllowedToCreateMetrics&&C(w4,{clientId:n.clientId,companyId:n.companyId,mode:n.mode,externalDashboardId:n.externalDashboard.id,variant:e==null?void 0:e.headerVariant})]})]}),B("div",{className:tn["embedDashboard-wrapper"],children:[n.externalDashboard.filters.length&&i?C(M4,{companyId:n.companyId,filters:n.externalDashboard.filters,onApply:f=>l(f)}):null,C(QB,{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:tn["alt-container"],children:C(Wu,{style:{width:"50px",height:"50px",color:"blue"}})}),!a&&!((c=n.externalDashboard)!=null&&c.id)&&C("div",{className:tn["alt-container"],children:"Invalid token or Dashboard id"})]})})});var L4={container:"_container_7vfcn_1",windowIcon:"_windowIcon_7vfcn_7"};const Hhe=r=>C("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...r,children:B("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"})]})}),I4=()=>B("div",{role:"alert",className:L4.container,children:[C(Hhe,{className:L4.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"})]}),Ghe=new c3,P4=({children:r})=>C(U4,{FallbackComponent:I4,children:C(g3,{client:Ghe,children:r})}),Whe=pe.default.memo(({token:r,options:e,theme:t})=>(z.useEffect(()=>{!t||!Object.keys(t).length||AT(t)},[t]),C(P4,{children:C(A4,{token:r,options:e})})));var Uhe=Object.freeze(Object.defineProperty({__proto__:null,SOMETHING_WENT_WRONG:Sm,CHART_TYPES:Mt,STATUS_TAB:B$,STREAM_TAB:F$,CLIENT_NAME_VAR:V$,RLS_CONDITIONS:$$,CHART_TAB:Sv,TABLE_TAB:hc,QUERY_TAB:H$,INPUT_TABLE:vc,OUTPUT_TABLE:Ml,DOUGHNUT:Cm,PIE:Tm,SANKEY:kT,BOXPLOT:zT,TABLE:G$,GENERAL:Wo,CONFIG:Al,DESTINATIONS:Dm,operatorList:bv,RowLimitList:IT,AggregateList:mm,NUMBER_TYPES:_m,STRING_TYPES:bm,DATE_TYPES:xm,ARRAY_TYPES:PT,BOOLEAN_TYPES:wm},Symbol.toStringTag,{value:"Module"})),jhe=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Yhe=Object.freeze(Object.defineProperty({__proto__:null,Button:Le,ChartConfig:i4,ChartModalOptions:o4,SelectField:sy,DataType:$S,Error:WS,ErrorFallback:I4,ExternalMetricForm:x4,FilterDropDown:S4,MultiFilterDropdown:C4,FloatingDropDown:Sr,MultiFloatingDropDown:YB,FullScreenChart:VS,isInFilterOperator:ZS,isNullFilterOperator:Eh,FilterField:T4,GlobalFilters:M4,Tooltip:a4,InfoTooltip:Ii,InputField:It,CsvDownloadButton:NT,MetricChart:Fg,EmbeddedMetricCreation:w4,MetricForm:y4,ConstructMetric:_4,Dataset:JB,Header:KB,MetricOutput:h4,ChartTab:l4,TableTab:f4,GridLayout:XB,ExternalMetricList:QB,MetricCard:qB,SingleValueCard:ZB,MetricTable:u4,Modal:Li,ModalFooter:Zu,PopoverMenu:Zg,SearchTab:Ah,Select:Qt,HookSelect:t4,SelectWithSubValue:r4,DropDown:Kfe,MultiSelect:Ih,HookMultiSelect:Jfe,Tab:GS,Table:c4,Text:de,TextAreaField:b4,TimeGrainField:v4,ToggleButton:YS},Symbol.toStringTag,{value:"Module"}));Tr.Dashboard=Whe,Tr.EmbeddedDashboard=A4,Tr.PluginProvider=P4,Tr.Ui=Yhe,Tr.consts=Uhe,Tr.helpers=Nhe,Tr.hooks=xfe,Tr.types=jhe,Tr.utils=I$,Object.defineProperties(Tr,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});