@agions/taroviz 1.11.5 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +245 -0
- package/README.md +31 -46
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/vendors.js +1 -1
- package/dist/cjs/vendors~echarts.js +1 -1
- package/dist/esm/index.js +1 -14270
- package/dist/esm/vendors.js +1 -16770
- package/dist/esm/vendors~echarts.js +1 -59417
- package/package.json +10 -15
- package/src/adapters/h5/index.ts +38 -38
- package/src/adapters/index.ts +32 -34
- package/src/adapters/types.ts +23 -55
- package/src/charts/boxplot/types.ts +2 -2
- package/src/charts/common/BaseChartWrapper.tsx +9 -7
- package/src/charts/createChartComponent.tsx +9 -21
- package/src/charts/createOptionChartComponent.tsx +32 -0
- package/src/charts/funnel/__tests__/index.test.tsx +99 -0
- package/src/charts/funnel/index.tsx +64 -0
- package/src/charts/funnel/types.ts +6 -0
- package/src/charts/graph/__tests__/index.test.tsx +116 -0
- package/src/charts/graph/index.tsx +70 -0
- package/src/charts/graph/types.ts +6 -0
- package/src/charts/heatmap/__tests__/index.test.tsx +139 -0
- package/src/charts/heatmap/index.tsx +107 -0
- package/src/charts/heatmap/types.ts +6 -0
- package/src/charts/index.ts +47 -57
- package/src/charts/liquid/__tests__/index.test.tsx +52 -0
- package/src/charts/liquid/index.tsx +7 -133
- package/src/charts/liquid/types.ts +6 -6
- package/src/charts/parallel/types.ts +3 -3
- package/src/charts/radar/__tests__/index.test.tsx +210 -0
- package/src/charts/radar/index.tsx +147 -0
- package/src/charts/radar/types.ts +13 -0
- package/src/charts/sankey/__tests__/index.test.tsx +124 -0
- package/src/charts/sankey/index.tsx +70 -0
- package/src/charts/sankey/types.ts +6 -0
- package/src/charts/tree/__tests__/index.test.tsx +71 -0
- package/src/charts/tree/index.tsx +1 -1
- package/src/charts/tree/types.ts +8 -8
- package/src/charts/types.ts +208 -106
- package/src/charts/wordcloud/__tests__/index.test.tsx +106 -0
- package/src/charts/wordcloud/index.tsx +79 -0
- package/src/charts/wordcloud/types.ts +6 -0
- package/src/components/DataFilter/index.tsx +7 -6
- package/src/core/animation/types.ts +6 -6
- package/src/core/components/Annotation.tsx +6 -6
- package/src/core/components/BaseChart.tsx +97 -133
- package/src/core/components/LazyChart.tsx +3 -8
- package/src/core/components/hooks/index.ts +6 -2
- package/src/core/components/hooks/usePerformance.ts +8 -2
- package/src/core/components/hooks/useVirtualScroll.ts +2 -1
- package/src/core/types/common.ts +2 -1
- package/src/core/types/platform.ts +1 -0
- package/src/core/utils/__tests__/deepClone.test.ts +317 -0
- package/src/core/utils/__tests__/index.test.ts +2 -1
- package/src/core/utils/chartInstances.ts +13 -0
- package/src/core/utils/common.ts +20 -36
- package/src/core/utils/deepClone.ts +114 -0
- package/src/core/utils/download.ts +22 -28
- package/src/core/utils/drillDown.ts +1 -0
- package/src/core/utils/events.ts +12 -0
- package/src/core/utils/export/ExportUtils.ts +2 -1
- package/src/core/utils/format.ts +44 -0
- package/src/core/utils/index.ts +18 -159
- package/src/core/utils/merge.ts +25 -0
- package/src/core/utils/performance/PerformanceAnalyzer.ts +3 -1
- package/src/core/utils/performance/hooks.ts +7 -0
- package/src/core/utils/performance/index.ts +2 -0
- package/src/{hooks → core/utils/performance}/useAnimation.ts +6 -5
- package/src/{hooks → core/utils/performance}/useDataZoom.ts +7 -2
- package/src/{hooks → core/utils/performance}/usePerformance.ts +39 -39
- package/src/{hooks → core/utils/performance}/usePerformanceHooks.ts +39 -39
- package/src/core/utils/runtime.ts +190 -0
- package/src/editor/components/ThemeSelector.tsx +3 -3
- package/src/hooks/chartConnectHelpers.ts +6 -0
- package/src/hooks/index.ts +54 -626
- package/src/hooks/types.ts +27 -0
- package/src/hooks/useChartAutoResize.ts +73 -0
- package/src/hooks/useChartConnect.ts +5 -1
- package/src/hooks/useChartDownload.ts +1 -1
- package/src/hooks/useChartHistory.ts +1 -3
- package/src/hooks/useChartInit.ts +59 -0
- package/src/hooks/useChartOptions.ts +259 -0
- package/src/hooks/useChartPerformance.ts +109 -0
- package/src/hooks/useChartSelection.ts +23 -12
- package/src/hooks/useChartTheme.ts +51 -0
- package/src/hooks/useDataTransform.ts +19 -4
- package/src/index.ts +5 -10
- package/src/react-dom.d.ts +3 -3
- package/src/themes/index.ts +30 -855
- package/src/themes/palettes/blue-green.ts +13 -0
- package/src/themes/palettes/chalk.ts +13 -0
- package/src/themes/palettes/cyber.ts +44 -0
- package/src/themes/palettes/dark.ts +52 -0
- package/src/themes/palettes/default.ts +52 -0
- package/src/themes/palettes/elegant.ts +34 -0
- package/src/themes/palettes/forest.ts +13 -0
- package/src/themes/palettes/glass.ts +49 -0
- package/src/themes/palettes/golden.ts +13 -0
- package/src/themes/palettes/neon.ts +43 -0
- package/src/themes/palettes/ocean.ts +39 -0
- package/src/themes/palettes/pastel.ts +37 -0
- package/src/themes/palettes/purple-passion.ts +13 -0
- package/src/themes/palettes/retro.ts +33 -0
- package/src/themes/palettes/sunset.ts +40 -0
- package/src/themes/palettes/walden.ts +13 -0
- package/src/themes/registry.ts +184 -0
- package/src/themes/types.ts +213 -0
- package/src/core/utils/codeGenerator/CodeGenerator.ts +0 -669
- package/src/core/utils/codeGenerator/index.ts +0 -13
- package/src/core/utils/codeGenerator/types.ts +0 -198
- package/src/core/utils/configGenerator/ConfigGenerator.ts +0 -583
- package/src/core/utils/configGenerator/index.ts +0 -13
- package/src/core/utils/configGenerator/types.ts +0 -449
- package/src/core/utils/debug/DebugPanel.tsx +0 -640
- package/src/core/utils/debug/debugger.ts +0 -322
- package/src/core/utils/debug/index.ts +0 -21
- package/src/core/utils/debug/types.ts +0 -142
package/dist/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e,t={7739(e,t,r){r.d(t,{mY:()=>i,iK:()=>l});var n,o=function(){function e(e){void 0===e&&(e={}),this.chartInstance=null,this.config=e}return e.prototype.getInstance=function(){return this.chartInstance},e.prototype.setOption=function(e,t){this.chartInstance?this.chartInstance.setOption(e,t):this.config.option=e},e.prototype.setTheme=function(e){this.config.theme=e;var t=this.chartInstance;(null==t?void 0:t.setTheme)&&t.setTheme(e)},e.prototype.getWidth=function(){var e=this.config.width;if("number"==typeof e)return e;if("string"==typeof e){var t=parseInt(e,10);if(!isNaN(t))return t}return 300},e.prototype.getHeight=function(){var e=this.config.height;if("number"==typeof e)return e;if("string"==typeof e){var t=parseInt(e,10);if(!isNaN(t))return t}return 300},e.prototype.getDom=function(){return null},e.prototype.convertToDataURL=function(e){var t,r;return null===(r=null===(t=this.chartInstance)||void 0===t?void 0:t.getDataURL)||void 0===r?void 0:r.call(t,e)},e.prototype.clear=function(){var e,t;null===(t=null===(e=this.chartInstance)||void 0===e?void 0:e.clear)||void 0===t||t.call(e)},e.prototype.on=function(e,t){var r,n;null===(n=null===(r=this.chartInstance)||void 0===r?void 0:r.on)||void 0===n||n.call(r,e,t)},e.prototype.off=function(e,t){var r,n;null===(n=null===(r=this.chartInstance)||void 0===r?void 0:r.off)||void 0===n||n.call(r,e,t)},e.prototype.showLoading=function(e){var t,r;null===(r=null===(t=this.chartInstance)||void 0===t?void 0:t.showLoading)||void 0===r||r.call(t,e)},e.prototype.hideLoading=function(){var e,t;null===(t=null===(e=this.chartInstance)||void 0===e?void 0:e.hideLoading)||void 0===t||t.call(e)},e.prototype.dispose=function(){var e,t;this.chartInstance&&(null===(t=null===(e=this.chartInstance)||void 0===e?void 0:e.dispose)||void 0===t||t.call(e),this.chartInstance=null)},e.prototype.resize=function(e){var t,r;null===(r=null===(t=this.chartInstance)||void 0===t?void 0:t.resize)||void 0===r||r.call(t,e)},e.prototype.setComponent=function(e){this.config.component=e},e.prototype.parseSize=function(e,t){if("number"==typeof e)return e;if("string"==typeof e){var r=parseInt(e,10);if(!isNaN(r))return r}return t},e}(),a=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(t){var r=e.call(this,t)||this;return r.component=null,r.component=t.component,r}return a(t,e),t.prototype.createChartInstance=function(e,t){return e.createChart({id:t.id,width:t.width,height:t.height,theme:t.theme})},t.prototype.init=function(){var e=this.config,t=e.canvasId,r=e.width,n=e.height,o=e.theme,a=e.option;if(!this.component)return null;if(!t)return null;var i=this.createChartInstance(this.component,{id:t,width:r,height:n,theme:o});a&&i.setOption(a),this.chartInstance=i;var l=e.onInit;return l&&l(i),i},t.prototype.setComponent=function(e){this.component=e},t.prototype.dispatchAction=function(e){var t,r;null===(r=null===(t=this.chartInstance)||void 0===t?void 0:t.dispatchAction)||void 0===r||r.call(t,e)},t.prototype.getDataURL=function(e){var t,r;return null===(r=null===(t=this.chartInstance)||void 0===t?void 0:t.getDataURL)||void 0===r?void 0:r.call(t,e)},t}(o);function l(e){return function(t){return new e(t)}}},2123(e,t,r){r.r(t),r.d(t,{default:()=>p});var n=r(3651),o=r(137),a=r(8662),i=r(3215),l=r(7264),c=r(8570),s=r(2915),u=r(1171),d=r(2015),f=function(){return f=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},f.apply(this,arguments)};c.Y([n.a,o.a,a.a,i.a,u.a,s.a]);const p=function(){function e(e){this.instance=null,this.containerRef=void 0,this.options=e||{},this.containerRef=e.containerRef,this.canvasId=this.options.canvasId||"taroviz-echarts-canvas"}return e.create=function(t){return new e(t)},e.prototype.init=function(e){var t;if(this.instance)return this.instance;var r=this.containerRef&&"current"in this.containerRef?this.containerRef.current:this.containerRef||document.getElementById(this.canvasId);if(!r)throw new Error("[TaroViz] H5Adapter: container not found (canvasId: ".concat(this.canvasId,")"));return this.instance=l.Ts(r,this.options.theme,{useDirtyRect:!0,renderer:this.options.renderer||"canvas"}),this.instance&&this.instance.setOption({animation:!1!==(null===(t=this.options.option)||void 0===t?void 0:t.animation),animationDurationUpdate:300,animationEasingUpdate:"cubicOut",progressive:500,progressiveThreshold:1e3},!0),this.options.option&&this.instance&&this.instance.setOption(this.options.option,!1,!0),this.options.onInit&&this.instance&&this.options.onInit(this.instance),this.instance},e.prototype.getInstance=function(){return this.instance},e.prototype.setOption=function(e,t,r){this.instance?this.instance.setOption(e,t,r):this.options.option=e},e.prototype.setTheme=function(e){var t,r;this.options.theme=e,this.instance&&(null===(r=(t=this.instance).setTheme)||void 0===r||r.call(t,e))},e.prototype.getWidth=function(){var e;return(null===(e=this.instance)||void 0===e?void 0:e.getWidth())||0},e.prototype.getHeight=function(){var e;return(null===(e=this.instance)||void 0===e?void 0:e.getHeight())||0},e.prototype.getDom=function(){var e=this.containerRef;return e&&"current"in e?e.current:e},e.prototype.convertToDataURL=function(e){var t;return null===(t=this.instance)||void 0===t?void 0:t.getDataURL(e)},e.prototype.clear=function(){this.instance&&this.instance.clear()},e.prototype.on=function(e,t){this.instance&&this.instance.on(e,t)},e.prototype.off=function(e,t){this.instance&&this.instance.off(e,t)},e.prototype.showLoading=function(e){this.instance&&this.instance.showLoading(e)},e.prototype.hideLoading=function(){this.instance&&this.instance.hideLoading()},e.prototype.setComponent=function(e){this.containerRef=e},e.prototype.render=function(){var e=this.options,t=e.width,r=void 0===t?"100%":t,n=e.height,o=void 0===n?"300px":n,a=e.style,i=void 0===a?{}:a,l=e.direction,c=void 0===l?"ltr":l;return d.createElement("div",{id:this.canvasId,ref:this.containerRef,style:f({width:r,height:o,direction:c},i)})},e.prototype.dispose=function(){this.instance&&(this.instance.dispose(),this.instance=null)},e.prototype.dispatchAction=function(e){this.instance&&this.instance.dispatchAction(e)},e.prototype.getDataURL=function(e){var t;return null===(t=this.instance)||void 0===t?void 0:t.getDataURL(e)},e.prototype.resize=function(e){this.instance&&this.instance.resize(e)},e.prototype.getName=function(){return"H5Adapter"},e.prototype.getVersion=function(){return"1.1.1"},e.prototype.getPlatformInfo=function(){return{platform:"h5",renderer:this.options.renderer||"canvas",userAgent:navigator.userAgent,devicePixelRatio:String(window.devicePixelRatio)}},e}()},3382(e,t,r){r.r(t),r.d(t,{createHarmonyAdapter:()=>s,default:()=>u});var n,o=r(2015),a=r(7739),i=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),l=function(){return l=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},l.apply(this,arguments)},c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),Object.defineProperty(t.prototype,"platformName",{get:function(){return"Harmony"},enumerable:!1,configurable:!0}),t.prototype.init=function(){return e.prototype.init.call(this)},t.prototype.render=function(){var e=this.config,t=e.canvasId||"ec-canvas",r=e.width||"100%",n=e.height||"300px",a=e.style||{};return o.createElement("view",{id:t,style:l({width:r,height:n},a)})},t}(a.mY),s=(0,a.iK)(c);const u=c},8319(e,t,r){var n;r.d(t,{li:()=>S,cK:()=>I,_$:()=>T}),r(6869),function(e){e.H5="h5",e.WEAPP="weapp",e.ALIPAY="alipay",e.SWAN="swan",e.TT="tt",e.QQ="qq",e.JD="jd",e.HARMONY="harmony",e.DD="dd",e.QYWX="qywx",e.LARK="lark",e.KWAI="kwai"}(n||(n={})),r(7251),r(9627);var o=r(8570),a=r(6057),i=r(5877),l=r(5395),c=r(6277),s=r(5562),u=r(1417),d=r(5337),f=r(206),p=r(8662),v=r(137),h=r(3215),m=r(3651),g=r(3782),y=r(5276),b=r(1171),x=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))};o.Y(b.a);var C=[a.a,i.a,l.a,c.a,s.a,u.a,d.a,f.a],E=[p.a,v.a,h.a,m.a,g.a,y.a];o.Y(x(x([],C,!0),E,!0)),r(6964),r(2123),r(9999),r(6085),r(3280),r(3382);var w,k=((w={})[n.H5]={name:"H5"},w[n.WEAPP]={name:"Wechat",requireComponent:!0},w[n.ALIPAY]={name:"Alipay",requireComponent:!0},w[n.SWAN]={name:"Baidu",requireComponent:!0},w[n.TT]={name:"ByteDance",requireComponent:!0},w[n.QQ]={name:"QQ",requireComponent:!0},w[n.JD]={name:"JD",requireComponent:!0},w[n.DD]={name:"DingTalk",requireComponent:!0},w[n.QYWX]={name:"QiyeWechat"},w[n.LARK]={name:"Lark"},w[n.KWAI]={name:"Kwai",requireComponent:!0},w[n.HARMONY]={name:"HarmonyOS",requireComponent:!0},w);function S(){if("undefined"==typeof window)return n.H5;for(var e=window,t=[{test:function(){var t,r;return!!(null===(t=e.wx)||void 0===t?void 0:t.getSystemInfoSync)&&!(null===(r=e.wx)||void 0===r?void 0:r.qy)},platform:n.WEAPP},{test:function(){var t;return!!(null===(t=e.my)||void 0===t?void 0:t.getSystemInfoSync)},platform:n.ALIPAY},{test:function(){var t;return!!(null===(t=e.swan)||void 0===t?void 0:t.getSystemInfoSync)},platform:n.SWAN},{test:function(){var t;return!!(null===(t=e.tt)||void 0===t?void 0:t.getSystemInfoSync)},platform:n.TT},{test:function(){var t;return!!(null===(t=e.qq)||void 0===t?void 0:t.getSystemInfoSync)},platform:n.QQ},{test:function(){var t;return!!(null===(t=e.jd)||void 0===t?void 0:t.getSystemInfoSync)},platform:n.JD},{test:function(){var t;return!!(null===(t=e.dd)||void 0===t?void 0:t.getSystemInfoSync)},platform:n.DD},{test:function(){var t;return!!(null===(t=e.wx)||void 0===t?void 0:t.qy)},platform:n.QYWX},{test:function(){var t,r;return"lark"===(null===(r=null===(t=e.tt)||void 0===t?void 0:t.env)||void 0===r?void 0:r.appName)},platform:n.LARK},{test:function(){return navigator.userAgent.includes("HarmonyOS")},platform:n.HARMONY}],r=0,o=t;r<o.length;r++){var a=o[r];if(a.test())return a.platform}return n.H5}function T(){var e;return"undefined"!=typeof window&&"undefined"!=typeof document?"h5":void 0!==r.g&&(null===(e=null===r.g||void 0===r.g?void 0:r.g.wx)||void 0===e?void 0:e.getSystemInfoSync)?"weapp":"unknown"}function I(e){return t=this,o=void 0,i=function(){var t,o;return function(e,t){var r,n,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=l(0),i.throw=l(1),i.return=l(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(c){return function(l){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&l[0]?n.return:l[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,l[1])).done)return o;switch(n=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,n=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){a.label=l[1];break}if(6===l[0]&&a.label<o[1]){a.label=o[1],o=l;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(l);break}o[2]&&a.ops.pop(),a.trys.pop();continue}l=t.call(e,a)}catch(e){l=[6,e],n=0}finally{r=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}}(this,function(a){switch(a.label){case 0:t=S(),null==(o=k[t])||o.requireComponent,a.label=1;case 1:switch(a.trys.push([1,15,,17]),t){case n.H5:case n.ALIPAY:case n.QQ:case n.JD:case n.DD:case n.QYWX:case n.LARK:case n.KWAI:return[3,2];case n.WEAPP:return[3,4];case n.SWAN:return[3,6];case n.TT:return[3,8];case n.HARMONY:return[3,10]}return[3,12];case 2:return[4,Promise.resolve().then(r.bind(r,2123))];case 3:return[2,a.sent().default.create(e)];case 4:return[4,Promise.resolve().then(r.bind(r,9999))];case 5:return[2,(0,a.sent().createWeappAdapter)(e)];case 6:return[4,Promise.resolve().then(r.bind(r,6085))];case 7:return[2,(0,a.sent().createSwanAdapter)(e)];case 8:return[4,Promise.resolve().then(r.bind(r,3280))];case 9:return[2,(0,a.sent().createTTAdapter)(e)];case 10:return[4,Promise.resolve().then(r.bind(r,3382))];case 11:return[2,a.sent().HarmonyAdapter.create(e)];case 12:return[4,Promise.resolve().then(r.bind(r,2123))];case 13:return[2,a.sent().default.create(e)];case 14:return[3,17];case 15:return a.sent(),[4,Promise.resolve().then(r.bind(r,2123))];case 16:return[2,a.sent().default.create(e)];case 17:return[2]}})},new((a=Promise)||(a=Promise))(function(e,r){function n(e){try{c(i.next(e))}catch(e){r(e)}}function l(e){try{c(i.throw(e))}catch(e){r(e)}}function c(t){var r;t.done?e(t.value):(r=t.value,r instanceof a?r:new a(function(e){e(r)})).then(n,l)}c((i=i.apply(t,o||[])).next())});var t,o,a,i}},6085(e,t,r){r.r(t),r.d(t,{SwanAdapter:()=>i,createSwanAdapter:()=>l,default:()=>c});var n,o=r(7739),a=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),Object.defineProperty(t.prototype,"platformName",{get:function(){return"Swan"},enumerable:!1,configurable:!0}),t}(o.mY),l=(0,o.iK)(i);const c=i},3280(e,t,r){r.r(t),r.d(t,{TTAdapter:()=>i,createTTAdapter:()=>l,default:()=>c});var n,o=r(7739),a=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),Object.defineProperty(t.prototype,"platformName",{get:function(){return"TT"},enumerable:!1,configurable:!0}),t}(o.mY),l=(0,o.iK)(i);const c=i},9999(e,t,r){r.r(t),r.d(t,{WeappAdapter:()=>i,createWeappAdapter:()=>l,default:()=>c});var n,o=r(7739),a=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),Object.defineProperty(t.prototype,"platformName",{get:function(){return"Weapp"},enumerable:!1,configurable:!0}),t}(o.mY),l=(0,o.iK)(i);const c=i},7698(e,t,r){r.d(t,{A:()=>u});var n=r(2015),o=r.n(n),a=r(8319),i=r(9627),l=r(2855),c=function(){return c=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},c.apply(this,arguments)};function s(e){var t=e;return(null==t?void 0:t.series)&&Array.isArray(t.series)?t.series.filter(function(e){return(null==e?void 0:e.data)&&Array.isArray(e.data)}).map(function(e){return{name:e.name||"系列",data:e.data}}):[]}const u=function(e){var t,r,u=e.option,d=e.width,f=void 0===d?"100%":d,p=e.height,v=void 0===p?"300px":p,h=e.theme,m=e.style,g=void 0===m?{}:m,y=e.className,b=void 0===y?"":y,x=e.autoResize,C=void 0===x||x,E=e.loading,w=void 0!==E&&E,k=e.loadingOption,S=e.onChartInit,T=e.onChartReady,I=e.renderer,O=void 0===I?"canvas":I,A=e.onEvents,D=void 0===A?{}:A,R=e.chartType,P=void 0===R?"chart":R,M=(0,n.useRef)("".concat(P,"-").concat((0,i.uR)())),L=(0,n.useRef)(null),N=(0,n.useRef)(null),j=(0,n.useRef)(!0),z=(0,n.useRef)(null),F=(0,n.useId)(),H=(0,n.useMemo)(function(){return s(u)},[u]),B=(0,n.useMemo)(function(){return function(e,t){var r=s(t);if(!r.length)return"chart"===e?"空图表":"".concat(e," 空图表");var n=r.reduce(function(e,t){return e+t.data.length},0),o=r.map(function(e){return e.name}).join("、");return"".concat(e,"图表,包含").concat(r.length,"个系列(").concat(o,"),共").concat(n,"个数据点")}(P,u)},[P,u]),U=(0,n.useCallback)(function(e){var t,r,n,o,a,i,l=L.current;if(l){var c=function(e,t){l.dispatchAction({type:"dataZoom",startDelta:e,endDelta:t})};if("Home"===e.key)return e.preventDefault(),void l.dispatchAction({type:"dataZoom",start:0,end:100});switch(e.key){case"+":case"=":if(e.preventDefault(),f=null===(t=null==(d=l.getOption())?void 0:d.dataZoom)||void 0===t?void 0:t[0]){var s=Math.max(0,(null!==(r=f.end)&&void 0!==r?r:100)-5),u=Math.max(0,(null!==(n=f.start)&&void 0!==n?n:0)-5);l.dispatchAction({type:"dataZoom",start:u,end:s})}break;case"-":case"_":var d,f;e.preventDefault(),(f=null===(o=null==(d=l.getOption())?void 0:d.dataZoom)||void 0===o?void 0:o[0])&&(s=Math.min(100,(null!==(a=f.end)&&void 0!==a?a:100)+5),u=Math.min((null!==(i=f.start)&&void 0!==i?i:0)+5,s),l.dispatchAction({type:"dataZoom",start:u,end:s}));break;case"ArrowLeft":e.preventDefault(),c(-10,0);break;case"ArrowRight":e.preventDefault(),c(10,0);break;case"ArrowUp":e.preventDefault(),c(0,-10);break;case"ArrowDown":e.preventDefault(),c(0,10)}}},[]),_=(0,n.useMemo)(function(){return(0,l.X)({canvasId:M.current,containerRef:N,width:f,height:v,theme:h,autoResize:C,renderer:O,option:u})},[f,v,h,C,O,u]);(0,n.useEffect)(function(){return j.current=!0,e=void 0,t=void 0,n=function(){var e,t;return function(e,t){var r,n,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=l(0),i.throw=l(1),i.return=l(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(c){return function(l){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&l[0]?n.return:l[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,l[1])).done)return o;switch(n=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,n=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){a.label=l[1];break}if(6===l[0]&&a.label<o[1]){a.label=o[1],o=l;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(l);break}o[2]&&a.ops.pop(),a.trys.pop();continue}l=t.call(e,a)}catch(e){l=[6,e],n=0}finally{r=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}}(this,function(r){switch(r.label){case 0:return e=(0,l.X)(c(c({},_),{onInit:function(e){j.current?(L.current=e,D&&Object.entries(D).forEach(function(t){var r=t[0],n=t[1];e.on(r,n)}),S&&S(e),T&&T(e)):e.dispose()}})),[4,(0,a.cK)(e)];case 1:return t=r.sent(),j.current?(t.init(),z.current=function(){var e=L.current;e&&(D&&Object.entries(D).forEach(function(t){var r=t[0];e.off(r)}),e.dispose(),L.current=null)},[2]):[2]}})},new((r=void 0)||(r=Promise))(function(o,a){function i(e){try{c(n.next(e))}catch(e){a(e)}}function l(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(i,l)}c((n=n.apply(e,t||[])).next())}),function(){j.current=!1,z.current&&(z.current(),z.current=null)};var e,t,r,n},[_,S,T,D]),(0,n.useEffect)(function(){L.current&&u&&L.current.setOption(u,!0)},[u]),(0,n.useEffect)(function(){L.current&&(w?L.current.showLoading(k):L.current.hideLoading())},[w,k]);var G=c({width:"number"==typeof f?"".concat(f,"px"):f,height:"number"==typeof v?"".concat(v,"px"):v},g);return o().createElement(o().Fragment,null,o().createElement("table",{id:F,"aria-label":"".concat(P," 图表数据"),style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0,0,0,0)",clipPath:"inset(50%)",whiteSpace:"nowrap"},"aria-live":"polite","aria-atomic":"false"},o().createElement("caption",null,B),o().createElement("thead",null,o().createElement("tr",null,H.map(function(e,t){return o().createElement("th",{key:t,scope:"col"},e.name)}))),o().createElement("tbody",null,Array.from({length:Math.min(20,null!==(r=null===(t=H[0])||void 0===t?void 0:t.data.length)&&void 0!==r?r:0)}).map(function(e,t){return o().createElement("tr",{key:t},H.map(function(e,r){var n;return o().createElement("td",{key:r},String(null!==(n=e.data[t])&&void 0!==n?n:""))}))}))),o().createElement("div",{className:"taroviz-".concat(P," ").concat(b),style:G,ref:N,role:"application","aria-label":B,"aria-describedby":F,tabIndex:0,onKeyDown:U}))}},7377(e,t,r){r.r(t),r.d(t,{BarChart:()=>C,BoxplotChart:()=>L,CandlestickChart:()=>M,FunnelChart:()=>I,GaugeChart:()=>T,GraphChart:()=>R,HeatmapChart:()=>S,LineChart:()=>x,LiquidChart:()=>h,ParallelChart:()=>N,PieChart:()=>E,RadarChart:()=>k,SankeyChart:()=>D,ScatterChart:()=>w,SunburstChart:()=>A,TreeChart:()=>y,TreeMapChart:()=>O,WordCloudChart:()=>P,version:()=>b.x});var n=r(2015),o=r.n(n),a=r(7698),i=function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function l(e,t){var r=(0,n.memo)(function(e){return o().createElement(a.A,i({},e,{chartType:t}))});return r.displayName=e,r}function c(e,t){var r=(0,n.memo)(function(e){return o().createElement(a.A,i({},e,{option:e.option,chartType:t}))});return r.displayName=e,r}var s=r(8319),u=r(9627),d=r(2855),f=function(){return f=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},f.apply(this,arguments)},p=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))};var v=(0,n.memo)(function(e){var t=e.option,r=e.width,a=void 0===r?"100%":r,i=e.height,l=void 0===i?"300px":i,c=e.theme,v=e.style,h=void 0===v?{}:v,m=e.className,g=void 0===m?"":m,y=e.autoResize,b=void 0===y||y,x=e.loading,C=void 0!==x&&x,E=e.loadingOption,w=e.onChartInit,k=e.onChartReady,S=e.renderer,T=void 0===S?"canvas":S,I=e.onEvents,O=void 0===I?{}:I,A=e.waveData,D=void 0===A?[.6]:A,R=e.shape,P=e.amplitude,M=e.waveLength,L=e.phase,N=e.period,j=e.backgroundColor,z=void 0===j?"transparent":j,F=e.color,H=e.showLabel,B=void 0===H||H,U=e.labelFormatter,_=(0,n.useRef)("liquid-".concat((0,u.uR)())),G=(0,n.useRef)(null),W=(0,n.useRef)(null),Z=(0,n.useMemo)(function(){var e=t||{};if(e.series&&Array.isArray(e.series)&&e.series.length>0)return e;var r=function(e){var t=e.waveData,r=(e.shape,e.amplitude),n=e.waveLength,o=e.phase,a=(e.period,e.backgroundColor),i=e.colors,l=e.showLabel,c=e.labelFormatter,s=null!=o?o:0,u=null!=r?r:8;return{series:[{type:"custom",renderItem:function(e,r){var o,d,f,v,h,m=r.getWidth(),g=r.getHeight(),y=Math.min(m,g),b=m/2,x=g/2,C=y/2*.8,E=C*(u/100);void 0===n?f=.8*C:"string"==typeof n?(h=y,f=null==(v=n)?h:"number"==typeof v?h*(v/100):"string"==typeof v&&v.endsWith("%")?parseFloat(v)/100*h:parseFloat(v)||h):f=n;var w=m,k=g,S={type:"circle",shape:{cx:b,cy:x,r:C},style:{fill:"transparent"!==a?a:"#e3f7ff",stroke:"#294d99",lineWidth:8,shadowBlur:20,shadowColor:"rgba(0,0,0,0.25)"},z2:0},T=t.map(function(e,t){if(e<0||e>1)return{type:"polygon",shape:{points:[[b-C,x],[b+C,x],[b+C,x+C],[b-C,x+C]]},style:{fill:i[t%i.length],opacity:0},z2:2+t};for(var r=x+C-e*C*2,n=i[t%i.length],o=Math.max(2*Math.ceil(2*C/f*4),8),a=t*Math.PI/4+s,l=[],c=4*o,u=0;u<=c;u++){var d=u/c*Math.PI*2+a,v=u/c*(2*C+f)-f/2,h=Math.sin(d)*E;Math.abs(v)<=C&&l.push([b+v,r+h])}l.length<2&&(l.length=0,l.push([b-C,r]),l.push([b+C,r]));var m=l[l.length-1];return{type:"polygon",shape:{points:p(p([],l,!0),[[m[0],x+C],[l[0][0],x+C]],!1)},style:{fill:n,opacity:.95,shadowBlur:50,shadowColor:"rgba(0,0,0,0.4)"},z2:2+t}}),I=l?[{type:"text",style:{text:c?c(null!==(o=t[0])&&void 0!==o?o:0):"".concat(Math.round(100*(null!==(d=t[0])&&void 0!==d?d:0)),"%"),x:b,y:x,textAlign:"center",textVerticalAlign:"middle",fontSize:Math.max(.3*C,16),fontWeight:"bold",fill:"#294d99"},z2:10}]:[];return{type:"group",width:w,height:k,children:p(p([S],T,!0),I,!0)}},data:t.map(function(e){return{value:e}}),animation:!1}]}}({waveData:D,shape:null!=R?R:"circle",amplitude:P,waveLength:M,phase:L,period:N,backgroundColor:z,colors:F||["#4cabce","#4cabce"],showLabel:B,labelFormatter:U});return f(f({},e),{series:r.series})},[t,D,R,P,M,L,N,z,F,B,U]);(0,n.useEffect)(function(){var e,t,r,n,o,i=!0;return(t=void 0,r=void 0,n=Promise,o=function(){var e;return function(e,t){var r,n,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=l(0),i.throw=l(1),i.return=l(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(c){return function(l){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&l[0]?n.return:l[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,l[1])).done)return o;switch(n=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,n=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){a.label=l[1];break}if(6===l[0]&&a.label<o[1]){a.label=o[1],o=l;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(l);break}o[2]&&a.ops.pop(),a.trys.pop();continue}l=t.call(e,a)}catch(e){l=[6,e],n=0}finally{r=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}}(this,function(t){switch(t.label){case 0:return i&&W.current?(e=(0,d.X)({canvasId:_.current,containerRef:W,width:a,height:l,theme:c,autoResize:b,renderer:T,option:Z,onInit:function(e){G.current=e,O&&Object.entries(O).forEach(function(t){var r=t[0],n=t[1];e.on(r,n)}),w&&w(e),k&&k(e)}}),[4,(0,s.cK)(e)]):[2,void 0];case 1:return t.sent().init(),[2,function(){var e=G.current;e&&(O&&Object.keys(O).forEach(function(t){e.off(t)}),e.dispose(),G.current=null)}]}})},new(n||(n=Promise))(function(e,a){function i(e){try{c(o.next(e))}catch(e){a(e)}}function l(e){try{c(o.throw(e))}catch(e){a(e)}}function c(t){var r;t.done?e(t.value):(r=t.value,r instanceof n?r:new n(function(e){e(r)})).then(i,l)}c((o=o.apply(t,r||[])).next())})).then(function(t){e=t}),function(){i=!1,null==e||e()}},[Z,a,l,c,b,T,w,k,O]),(0,n.useEffect)(function(){G.current&&Z&&G.current.setOption(Z,!0)},[Z]),(0,n.useEffect)(function(){G.current&&(C?G.current.showLoading(E):G.current.hideLoading())},[C,E]);var V=f({width:"number"==typeof a?"".concat(a,"px"):a,height:"number"==typeof l?"".concat(l,"px"):l},h);return o().createElement("div",{className:"taroviz-liquid ".concat(g),style:V,ref:W})});v.displayName="LiquidChart";const h=v;var m=function(){return m=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},m.apply(this,arguments)},g=(0,n.memo)(function(e){var t=e.option,r=e.treeData,i=e.layout,l=void 0===i?"orthogonal":i,c=e.orient,s=void 0===c?"horizontal":c,u=e.nodeGap,d=e.nodeWidth,f=e.initialTreeDepth,p=e.symbol,v=e.symbolSize,h=e.showLine,g=void 0===h||h,y=e.lineCurveness,b=e.label,x=e.labelPosition,C=e.labelAlign,E=e.lineStyle,w=e.itemStyle,k=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(e,["option","treeData","layout","orient","nodeGap","nodeWidth","initialTreeDepth","symbol","symbolSize","showLine","lineCurveness","label","labelPosition","labelAlign","lineStyle","itemStyle"]),S=(0,n.useMemo)(function(){var e=t||{};if(e.series&&e.series.length>0)return e;var n={type:"tree",layout:l,orient:s,data:r,showLine:g};return void 0!==u&&(n.nodeGap=u),void 0!==d&&(n.nodeWidth=d),void 0!==f&&(n.initialTreeDepth=f),void 0!==p&&(n.symbol=p),void 0!==v&&(n.symbolSize=v),void 0!==y&&(n.lineCurveness=y),void 0!==b&&(n.label=b),void 0!==x&&(n.labelPosition=x),void 0!==C&&(n.labelAlign=C),void 0!==E&&(n.lineStyle=E),void 0!==w&&(n.itemStyle=w),m(m({},e),{series:[n]})},[t,r,l,s,u,d,f,p,v,g,y,b,x,C,E,w]);return o().createElement(a.A,m({},k,{option:S,chartType:"tree"}))});g.displayName="TreeChart";const y=g;var b=r(6964),x=l("LineChart","line-chart"),C=l("BarChart","bar-chart"),E=l("PieChart","pie-chart"),w=l("ScatterChart","scatter-chart"),k=l("RadarChart","radar-chart"),S=l("HeatmapChart","heatmap-chart"),T=l("GaugeChart","gauge-chart"),I=l("FunnelChart","funnel-chart"),O=l("TreeMapChart","treemap-chart"),A=l("SunburstChart","sunburst-chart"),D=l("SankeyChart","sankey-chart"),R=l("GraphChart","graph-chart"),P=l("WordCloudChart","wordcloud-chart"),M=l("CandlestickChart","candlestick-chart"),L=c("BoxplotChart","boxplot"),N=c("ParallelChart","parallel")},2855(e,t,r){r.d(t,{X:()=>o});var n=function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)};function o(e){var t={width:"number"==typeof e.width?e.width:void 0,height:"number"==typeof e.height?e.height:void 0,theme:"string"==typeof e.theme?e.theme:void 0,autoResize:e.autoResize,canvasId:e.canvasId,containerRef:e.containerRef,option:e.option,renderer:e.renderer},r=n({},t);return Object.keys(e).forEach(function(n){n in t||(r[n]=e[n])}),r}},7251(e,t,r){var n;r.d(t,{ek:()=>l}),function(e){e.ANIMATION_START="animationStart",e.ANIMATION_UPDATE="animationUpdate",e.ANIMATION_END="animationEnd",e.ANIMATION_CANCEL="animationCancel",e.ANIMATION_REPEAT="animationRepeat"}(n||(n={}));var o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o.apply(this,arguments)},a=[{name:"default",description:"默认动画配置 — 专业级 (300-500ms, cubicOut)",config:{enabled:!0,duration:400,easing:"cubicOut",appearDuration:450,appearEasing:"cubicOut",updateDuration:300,updateEasing:"cubicOut",disappearDuration:250,disappearEasing:"cubicIn",threshold:1e3,progressive:!0,progressiveStep:500}},{name:"fast",description:"快速动画配置 — 微交互 (150-200ms)",config:{enabled:!0,duration:150,easing:"cubicOut",appearDuration:200,appearEasing:"cubicOut",updateDuration:150,updateEasing:"cubicOut",disappearDuration:100,disappearEasing:"cubicIn",threshold:2e3,progressive:!0,progressiveStep:1e3}},{name:"slow",description:"慢速动画配置 — 页面过渡 (500-600ms, capped)",config:{enabled:!0,duration:500,easing:"cubicInOut",appearDuration:600,appearEasing:"cubicInOut",updateDuration:400,updateEasing:"cubicInOut",disappearDuration:300,disappearEasing:"cubicInOut",threshold:500,progressive:!0,progressiveStep:250}},{name:"bounce",description:"[已废弃] 弹跳动画 — 请使用 default 或 fast",config:{enabled:!1,duration:0,easing:"cubicOut",appearDuration:0,appearEasing:"cubicOut",updateDuration:0,updateEasing:"cubicOut",disappearDuration:0,disappearEasing:"cubicIn",threshold:500,progressive:!1,progressiveStep:250}},{name:"elastic",description:"[已废弃] 弹性动画 — 请使用 default 或 fast",config:{enabled:!1,duration:0,easing:"cubicOut",appearDuration:0,appearEasing:"cubicOut",updateDuration:0,updateEasing:"cubicOut",disappearDuration:0,disappearEasing:"cubicIn",threshold:500,progressive:!1,progressiveStep:250}}],i=function(){function e(e){this.presets=new Map,this.templates=new Map,this.eventHandlers=new Map,this.defaultConfig=(null==e?void 0:e.defaultConfig)||a[0].config,this.performanceConfig=(null==e?void 0:e.performance)||{monitor:!1,frameRate:60,hardwareAcceleration:!0},this.registerPresets(a)}return e.getInstance=function(t){return e.instance?t&&e.instance.updateConfig(t):e.instance=new e(t),e.instance},e.prototype.registerPreset=function(e){this.presets.set(e.name,e)},e.prototype.registerPresets=function(e){var t=this;e.forEach(function(e){return t.registerPreset(e)})},e.prototype.getPreset=function(e){return this.presets.get(e)},e.prototype.getAllPresets=function(){return Array.from(this.presets.values())},e.prototype.registerTemplate=function(e){this.templates.set(e.name,e)},e.prototype.getTemplate=function(e){return this.templates.get(e)},e.prototype.getAllTemplates=function(){return Array.from(this.templates.values())},e.prototype.setDefaultConfig=function(e){this.defaultConfig=e},e.prototype.getDefaultConfig=function(){return this.defaultConfig},e.prototype.getOptimizedConfig=function(e,t){void 0===e&&(e={}),void 0===t&&(t=0);var r=o(o({},this.defaultConfig),e);return"undefined"!=typeof window&&window.matchMedia("(prefers-reduced-motion: reduce)").matches?o(o({},r),{enabled:!1,duration:0,appearDuration:0,updateDuration:0,disappearDuration:0}):(r.threshold&&t>r.threshold&&(r.enabled=!1),r)},e.prototype.getAnimationConfigByType=function(e,t){switch(t){case"appear":return{duration:e.appearDuration||e.duration||1e3,easing:e.appearEasing||e.easing||"cubicOut"};case"update":return{duration:e.updateDuration||e.duration||800,easing:e.updateEasing||e.easing||"cubicOut"};case"disappear":return{duration:e.disappearDuration||e.duration||600,easing:e.disappearEasing||e.easing||"cubicIn"};case"emphasis":return{duration:e.duration||300,easing:e.easing||"cubicOut"};default:return{duration:e.duration||1e3,easing:e.easing||"cubicOut"}}},e.prototype.generateEChartsAnimationConfig=function(e,t){void 0===e&&(e={}),void 0===t&&(t=0);var r=this.getOptimizedConfig(e,t);return r.enabled?{animation:!0,animationDuration:r.duration,animationEasing:r.easing,animationDelay:r.delay,animationDurationUpdate:r.updateDuration,animationEasingUpdate:r.updateEasing,animationDelayUpdate:r.delay,animationThreshold:r.threshold,progressive:r.progressive,progressiveThreshold:r.progressiveStep,progressiveChunkMode:"sequential"}:{animation:!1}},e.prototype.on=function(e,t){var r;this.eventHandlers.has(e)||this.eventHandlers.set(e,new Set),null===(r=this.eventHandlers.get(e))||void 0===r||r.add(t)},e.prototype.off=function(e,t){var r;t?null===(r=this.eventHandlers.get(e))||void 0===r||r.delete(t):this.eventHandlers.delete(e)},e.prototype.emit=function(e,t){var r=this.eventHandlers.get(e);r&&r.forEach(function(e){try{e(t)}catch(e){}})},e.prototype.updatePerformanceConfig=function(e){this.performanceConfig=o(o({},this.performanceConfig),e)},e.prototype.updateConfig=function(e){e.defaultConfig&&(this.defaultConfig=e.defaultConfig),e.performance&&this.updatePerformanceConfig(e.performance)},e.prototype.getPerformanceConfig=function(){return this.performanceConfig},e.prototype.reset=function(){this.presets.clear(),this.templates.clear(),this.eventHandlers.clear(),this.registerPresets(a)},e}();function l(e,t){return void 0===e&&(e={}),void 0===t&&(t=0),i.getInstance().generateEChartsAnimationConfig(e,t)}i.getInstance()},6869(e,t,r){var n;!function(e){e.CLICK="click",e.MOUSEMOVE="mousemove",e.MOUSEUP="mouseup",e.MOUSEDOWN="mousedown",e.MOUSEOVER="mouseover",e.MOUSEOUT="mouseout",e.GLOBALOUT="globalout",e.LEGENDSELECTED="legendselected",e.LEGENDUNSELECTED="legendunselected",e.LEGENDSELECTCHANGED="legendselectchanged",e.LEGENDSCROLL="legendscroll",e.DATAZOOM="datazoom",e.DATARANGESELECTED="datarangeselected",e.TIMELINECHANGED="timelinechanged",e.TIMELINEPLAYCHANGED="timelineplaychanged",e.RESTORE="restore",e.DATAVIEWCHANGED="dataviewchanged",e.MAGICTYPECHANGED="magictypechanged",e.GEOSELECTCHANGED="geoselectchanged",e.GEOSELECTED="geoselected",e.GEOUNSELECTED="geounselected",e.PIESELECTCHANGED="pieselectchanged",e.PIESELECTED="pieselected",e.PIEUNSELECTED="pieunselected",e.MAPSELECTCHANGED="mapselectchanged",e.MAPSELECTED="mapselected",e.MAPUNSELECTED="mapunselected",e.AXISAREASELECTED="axisareaselected",e.FOCUSNODEADJACENCY="focusnodeadjacency",e.UNFOCUSNODEADJACENCY="unfocusnodeadjacency",e.BRUSH="brush",e.BRUSHSELECTED="brushselected",e.RENDERED="rendered",e.FINISHED="finished",e.CHART_READY="chartReady",e.CHART_RESIZE="chartResize",e.CHART_ERROR="chartError",e.CHART_DISPOSE="chartDispose"}(n||(n={}))},9627(e,t,r){r.d(t,{sg:()=>p,$N:()=>f,AZ:()=>d,ZV:()=>m,w5:()=>g,uc:()=>h,t2:()=>c,m_:()=>l,nF:()=>v,uR:()=>i});var n=function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r};function a(e,t){void 0===t&&(t={});var r=t.locale,a=void 0===r?"zh-CN":r,i=t.timeZone,l=void 0===i?"Asia/Shanghai":i,c=o(t,["locale","timeZone"]),s="string"==typeof e||"number"==typeof e?new Date(e):e;return new Intl.DateTimeFormat(a,n({timeZone:l},c)).format(s)}function i(){var e;if("function"==typeof(null===(e=globalThis.crypto)||void 0===e?void 0:e.randomUUID))return globalThis.crypto.randomUUID();var t=Date.now().toString(36),r=Math.random().toString(36).substring(2,15);return"".concat(t,"-").concat(r,"-").concat(Math.random().toString(36).substring(2,10))}function l(){return Math.random().toString(36).substring(2,10)}function c(e){return"".concat(e,"-").concat(l())}new(function(){function e(e){void 0===e&&(e={}),this.locale=e.locale||"undefined"!=typeof window&&window.navigator.language||"zh-CN",this.timeZone=e.timeZone||Intl.DateTimeFormat().resolvedOptions().timeZone}return e.prototype.setLocale=function(e){this.locale=e},e.prototype.getLocale=function(){return this.locale},e.prototype.setTimeZone=function(e){this.timeZone=e},e.prototype.getTimeZone=function(){return this.timeZone},e.prototype.formatDateTime=function(e,t){return void 0===t&&(t={}),a(e,n(n({},t),{locale:this.locale,timeZone:this.timeZone}))},e.prototype.formatDate=function(e,t){return void 0===t&&(t={}),function(e,t){return void 0===t&&(t={}),a(e,n(n({},t),{timeStyle:void 0,hour:void 0,minute:void 0,second:void 0,fractionalSecondDigits:void 0}))}(e,n(n({},t),{locale:this.locale,timeZone:this.timeZone}))},e.prototype.formatTime=function(e,t){return void 0===t&&(t={}),function(e,t){return void 0===t&&(t={}),a(e,n(n({},t),{dateStyle:void 0,year:void 0,month:void 0,day:void 0,weekday:void 0,hour:t.hour||"2-digit",minute:t.minute||"2-digit"}))}(e,n(n({},t),{locale:this.locale,timeZone:this.timeZone}))},e.prototype.formatCurrency=function(e,t){return function(e,t){var r=t.locale,n=void 0===r?"zh-CN":r,o=t.currency,a=t.currencyDisplay,i=void 0===a?"symbol":a,l=t.digits,c=void 0===l?2:l,s=t.useGrouping,u=void 0===s||s;return new Intl.NumberFormat(n,{style:"currency",currency:o,currencyDisplay:i,minimumFractionDigits:c,maximumFractionDigits:c,useGrouping:u}).format(e)}(e,n(n({},t),{locale:this.locale}))},e.prototype.formatPercent=function(e,t){return void 0===t&&(t={}),function(e,t){void 0===t&&(t={});var r=t.locale,n=void 0===r?"zh-CN":r,o=t.digits,a=void 0===o?2:o,i=t.useGrouping,l=void 0===i||i;return new Intl.NumberFormat(n,{style:"percent",minimumFractionDigits:a,maximumFractionDigits:a,useGrouping:l}).format(e)}(e,n(n({},t),{locale:this.locale}))},e.prototype.formatNumber=function(e,t){return void 0===t&&(t={}),function(e,t){void 0===t&&(t={});var r=t.locale,a=void 0===r?"zh-CN":r,i=t.digits,l=void 0===i?2:i,c=t.useGrouping,s=void 0===c||c,u=o(t,["locale","digits","useGrouping"]);return new Intl.NumberFormat(a,n({minimumFractionDigits:l,maximumFractionDigits:l,useGrouping:s},u)).format(e)}(e,n(n({},t),{locale:this.locale}))},e}()),function(){function e(){this.debounces=new Map}e.prototype.register=function(e,t,r){var n=function(e,t){var r=null,n=function(){for(var n=this,o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];null!==r&&clearTimeout(r),r=setTimeout(function(){e.apply(n,o),r=null},t)};return n.cancel=function(){null!==r&&(clearTimeout(r),r=null)},n.flush=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];null!==r&&(clearTimeout(r),r=null),e.apply(this,t)},n}(t,r);return this.debounces.set(e,{cancel:n.cancel,flush:n.flush}),n},e.prototype.cancel=function(e){var t=this.debounces.get(e);t&&t.cancel()},e.prototype.cancelAll=function(){for(var e=0,t=this.debounces.values();e<t.length;e++)t[e].cancel()},e.prototype.flush=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=this.debounces.get(e);n&&n.flush()},e.prototype.destroy=function(){this.cancelAll(),this.debounces.clear()}}();var s=function(){return s=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},s.apply(this,arguments)},u=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},d={click:"click",mousemove:"mousemove",mouseup:"mouseup",mousedown:"mousedown",mouseover:"mouseover",mouseout:"mouseout",globalout:"globalout"};function f(e,t){var r=s({},e);return Object.keys(t).forEach(function(n){t[n]instanceof Object&&n in e&&e[n]instanceof Object?r[n]=f(e[n],t[n]):r[n]=t[n]}),r}function p(e,t){var r=null;return function(){for(var n=this,o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];r&&clearTimeout(r),r=setTimeout(function(){e.call.apply(e,u([n],o,!1)),r=null},t)}}function v(e,t){var r=0;return function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var a=Date.now();a-r>=t&&(e.call.apply(e,u([this],n,!1)),r=a)}}function h(){var e,t,r="undefined"==typeof window,n=!r,o=window,a=void 0!==o.wx&&"function"==typeof(null===(e=o.wx)||void 0===e?void 0:e.getSystemInfoSync),i=void 0!==o.my&&"function"==typeof(null===(t=o.my)||void 0===t?void 0:t.getSystemInfoSync);return{isServer:r,isClient:n,isWeapp:a,isAlipay:i,isWeb:n&&!a&&!i}}function m(e,t,r){void 0===t&&(t=2),void 0===r&&(r={});var n=r.useGrouping,o=void 0===n||n,a=r.locale,i=void 0===a?"zh-CN":a;return new Intl.NumberFormat(i,{minimumFractionDigits:t,maximumFractionDigits:t,useGrouping:o}).format(e)}function g(e){var t=e.replace("#","");return(299*parseInt(t.substring(0,2),16)+587*parseInt(t.substring(2,4),16)+114*parseInt(t.substring(4,6),16))/1e3>128?"#000000":"#FFFFFF"}},6964(e,t,r){r.d(t,{x:()=>n});var n="1.11.4"},5904(e,t,r){r.r(t),r.d(t,{AnnotationPresets:()=>He,BarChart:()=>S.BarChart,BaseChart:()=>w,BoxplotChart:()=>S.BoxplotChart,CandlestickChart:()=>S.CandlestickChart,DataFilter:()=>j,EnhancedThemeEditor:()=>ye,ErrorBoundary:()=>Ee,FunnelChart:()=>S.FunnelChart,GaugeChart:()=>S.GaugeChart,GraphChart:()=>S.GraphChart,H5Adapter:()=>W.default,HeatmapChart:()=>S.HeatmapChart,LazyChartRegistry:()=>Le,LineChart:()=>S.LineChart,LiquidChart:()=>S.LiquidChart,PRESET_THEMES:()=>ie,ParallelChart:()=>S.ParallelChart,PieChart:()=>S.PieChart,RadarChart:()=>S.RadarChart,SankeyChart:()=>S.SankeyChart,ScatterChart:()=>S.ScatterChart,SunburstChart:()=>S.SunburstChart,ThemeEditor:()=>me,TreeChart:()=>S.TreeChart,TreeMapChart:()=>S.TreeMapChart,WeappAdapter:()=>Z.default,WordCloudChart:()=>S.WordCloudChart,convertAnnotationToMarkArea:()=>je,convertAnnotationToMarkLine:()=>Ne,convertAnnotationToScatter:()=>ze,createCompositeAnnotation:()=>Be,createDrillDown:()=>_,createLazyChart:()=>Me,darkTheme:()=>q,debounce:()=>k.sg,deepMerge:()=>k.$N,defaultTheme:()=>Y,detectPlatform:()=>G.li,events:()=>k.AZ,exportChart:()=>Ke,formatNumber:()=>k.ZV,getAdapter:()=>G.cK,getContrastColor:()=>k.w5,getDarkThemes:()=>ne,getEnv:()=>G._$,getEnvironment:()=>k.uc,getLightThemes:()=>re,getRegisteredThemes:()=>X,getTheme:()=>K,getThemeByName:()=>$,getThemesByTag:()=>te,name:()=>It,prefixedId:()=>k.t2,preloadAllCharts:()=>Pe,preloadChart:()=>Re,registerTheme:()=>Q,shortId:()=>k.m_,switchTheme:()=>ee,themeManager:()=>le,throttle:()=>k.nF,useAnnotation:()=>Fe,useChart:()=>vt,useChartConnect:()=>$e,useChartData:()=>xt,useChartDownload:()=>ot,useChartTheme:()=>bt,useChartTools:()=>Tt,useDataPolling:()=>wt,useDataTransform:()=>st,useDataZoom:()=>Qe,useEvents:()=>gt,useExport:()=>St,useFullscreen:()=>kt,useLoading:()=>yt,useOption:()=>ht,useResize:()=>mt,useResponsive:()=>Ct,useTableTransform:()=>ut,useThemeSwitcher:()=>Et,useTimeSeriesTransform:()=>dt,uuid:()=>k.uR,version:()=>S.version,withErrorBoundary:()=>we,withLazyLoad:()=>De});var n,o=r(2015),a=r.n(o),i=r(7251),l={};function c(e){return l[e]}!function(e){e.PANEL_SHOW="debugPanelShow",e.PANEL_HIDE="debugPanelHide",e.TAB_CHANGE="debugPanelTabChange",e.INFO_UPDATE="debugPanelInfoUpdate"}(n||(n={}));var s,u=function(){return u=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},u.apply(this,arguments)},d=function(e){var t=e.debugInfo,r=e.options,i=void 0===r?{}:r,l=e.onEvent,c=(0,o.useState)(i.autoExpand||!1),s=c[0],d=c[1],p=(0,o.useState)(i.defaultTab||"instance"),v=p[0],h=p[1],m=(0,o.useRef)(null),g=i.position,y=void 0===g?"bottom-right":g,b=i.width,x=void 0===b?400:b,C=i.height,E=void 0===C?300:C,w=function(e){h(e),null==l||l({type:n.TAB_CHANGE,data:{tab:e}})},k=u(u(u(u(u(u({position:"fixed",zIndex:9999,backgroundColor:"rgba(255, 255, 255, 0.95)",border:"1px solid #e0e0e0",borderRadius:"4px",boxShadow:"0 2px 12px 0 rgba(0, 0, 0, 0.1)",fontFamily:"monospace",fontSize:"12px",overflow:"hidden"},"top-left"===y&&{top:"10px",left:"10px"}),"top-right"===y&&{top:"10px",right:"10px"}),"bottom-left"===y&&{bottom:"10px",left:"10px"}),"bottom-right"===y&&{bottom:"10px",right:"10px"}),s&&{width:x,height:E}),f.tarovizDebugPanel);return a().createElement("div",{ref:m,style:k},a().createElement("div",{style:f.debugPanelHeader},a().createElement("div",{style:f.debugPanelTitle},a().createElement("span",{style:f.debugPanelLogo},"🐛"),a().createElement("span",null,"TaroViz Debug Panel")),a().createElement("button",{style:f.debugPanelToggle,onClick:function(){var e=!s;d(e),null==l||l({type:e?n.PANEL_SHOW:n.PANEL_HIDE})},title:s?"收起":"展开"},s?"▼":"▶")),s&&a().createElement(a().Fragment,null,a().createElement("div",{style:f.debugPanelTabs},a().createElement("button",{style:u(u({},f.debugTab),"instance"===v&&f.debugTabActive),onClick:function(){return w("instance")},title:"实例信息"},"实例"),a().createElement("button",{style:u(u({},f.debugTab),"config"===v&&f.debugTabActive),onClick:function(){return w("config")},title:"配置信息"},"配置"),a().createElement("button",{style:u(u({},f.debugTab),"data"===v&&f.debugTabActive),onClick:function(){return w("data")},title:"数据信息"},"数据"),a().createElement("button",{style:u(u({},f.debugTab),"performance"===v&&f.debugTabActive),onClick:function(){return w("performance")},title:"性能信息"},"性能"),a().createElement("button",{style:u(u({},f.debugTab),"events"===v&&f.debugTabActive),onClick:function(){return w("events")},title:"事件信息"},"事件"),a().createElement("button",{style:u(u({},f.debugTab),"errors"===v&&f.debugTabActive),onClick:function(){return w("errors")},title:"错误信息"},"错误"),a().createElement("button",{style:u(u({},f.debugTab),"tools"===v&&f.debugTabActive),onClick:function(){return w("tools")},title:"调试工具"},"工具")),a().createElement("div",{style:f.debugPanelBody},function(){switch(v){case"instance":return o=t.instance,a().createElement("div",{style:f.debugPanelContent},a().createElement("h3",{style:f.h3},"图表实例信息"),a().createElement("div",{style:f.debugInfoGrid},a().createElement("div",{style:f.debugInfoItem},a().createElement("span",{style:f.debugInfoLabel},"ID:"),a().createElement("span",{style:f.debugInfoValue},(null==o?void 0:o.id)||"N/A")),a().createElement("div",{style:f.debugInfoItem},a().createElement("span",{style:f.debugInfoLabel},"类型:"),a().createElement("span",{style:f.debugInfoValue},(null==o?void 0:o.type)||"N/A")),a().createElement("div",{style:f.debugInfoItem},a().createElement("span",{style:f.debugInfoLabel},"版本:"),a().createElement("span",{style:f.debugInfoValue},(null==o?void 0:o.version)||"N/A")),a().createElement("div",{style:f.debugInfoItem},a().createElement("span",{style:f.debugInfoLabel},"渲染器:"),a().createElement("span",{style:f.debugInfoValue},(null==o?void 0:o.renderer)||"N/A")),a().createElement("div",{style:f.debugInfoItem},a().createElement("span",{style:f.debugInfoLabel},"宽度:"),a().createElement("span",{style:f.debugInfoValue},(null==o?void 0:o.width)||"N/A","px")),a().createElement("div",{style:f.debugInfoItem},a().createElement("span",{style:f.debugInfoLabel},"高度:"),a().createElement("span",{style:f.debugInfoValue},(null==o?void 0:o.height)||"N/A","px")),a().createElement("div",{style:f.debugInfoItem},a().createElement("span",{style:f.debugInfoLabel},"平台:"),a().createElement("span",{style:f.debugInfoValue},(null==o?void 0:o.platform)||"N/A"))));case"config":return n=t.config,a().createElement("div",{style:f.debugPanelContent},a().createElement("h3",{style:f.h3},"配置信息"),a().createElement("div",{style:f.debugConfig},a().createElement("pre",{style:f.pre},JSON.stringify(n,null,2))));case"data":return function(){var e,r,n=t.data;return a().createElement("div",{style:f.debugPanelContent},a().createElement("h3",{style:f.h3},"数据信息"),a().createElement("div",{style:f.debugInfoGrid},a().createElement("div",{style:f.debugInfoItem},a().createElement("span",{style:f.debugInfoLabel},"系列数量:"),a().createElement("span",{style:f.debugInfoValue},(null===(e=null==n?void 0:n.series)||void 0===e?void 0:e.length)||0)),a().createElement("div",{style:f.debugInfoItem},a().createElement("span",{style:f.debugInfoLabel},"总数据量:"),a().createElement("span",{style:f.debugInfoValue},(null==n?void 0:n.totalDataCount)||0)),a().createElement("div",{style:f.debugInfoItem},a().createElement("span",{style:f.debugInfoLabel},"当前数据量:"),a().createElement("span",{style:f.debugInfoValue},(null==n?void 0:n.currentDataCount)||0))),a().createElement("div",{style:f.debugDataSeries},a().createElement("h4",{style:f.h4},"系列数据"),null===(r=null==n?void 0:n.series)||void 0===r?void 0:r.map(function(e,t){var r,n,o=e;return a().createElement("div",{key:t,style:f.debugDataSeriesItem},a().createElement("h5",{style:f.h5},"系列 ",t+1,": ",o.name||"未命名"),a().createElement("pre",{style:f.pre},JSON.stringify(null===(r=o.data)||void 0===r?void 0:r.slice(0,5),null,2),"..."),a().createElement("div",{style:f.debugSeriesInfo},a().createElement("span",null,"数据量: ",(null===(n=o.data)||void 0===n?void 0:n.length)||0)))})))}();case"performance":return function(){var e=t.performance;return a().createElement("div",{style:f.debugPanelContent},a().createElement("h3",{style:f.h3},"性能信息"),a().createElement("div",{style:f.debugInfoGrid},a().createElement("div",{style:f.debugInfoItem},a().createElement("span",{style:f.debugInfoLabel},"初始化时间:"),a().createElement("span",{style:f.debugInfoValue},(null==e?void 0:e.initTime)||0,"ms")),a().createElement("div",{style:f.debugInfoItem},a().createElement("span",{style:f.debugInfoLabel},"渲染时间:"),a().createElement("span",{style:f.debugInfoValue},(null==e?void 0:e.renderTime)||0,"ms")),a().createElement("div",{style:f.debugInfoItem},a().createElement("span",{style:f.debugInfoLabel},"更新时间:"),a().createElement("span",{style:f.debugInfoValue},(null==e?void 0:e.updateTime)||0,"ms")),a().createElement("div",{style:f.debugInfoItem},a().createElement("span",{style:f.debugInfoLabel},"数据大小:"),a().createElement("span",{style:f.debugInfoValue},(null==e?void 0:e.dataSize)||0," bytes")),a().createElement("div",{style:f.debugInfoItem},a().createElement("span",{style:f.debugInfoLabel},"帧率:"),a().createElement("span",{style:f.debugInfoValue},(null==e?void 0:e.frameRate)||0," FPS"))),a().createElement("div",{style:f.debugPerformanceChart}))}();case"events":return r=t.events,a().createElement("div",{style:f.debugPanelContent},a().createElement("h3",{style:f.h3},"事件信息"),a().createElement("div",{style:f.debugEventsList},null==r?void 0:r.slice().reverse().map(function(e,t){return a().createElement("div",{key:t,style:f.debugEventItem},a().createElement("div",{style:f.debugEventHeader},a().createElement("span",{style:f.debugEventType},e.type),a().createElement("span",{style:f.debugEventTime},new Date(e.timestamp).toLocaleTimeString())),a().createElement("div",{style:f.debugEventParams},a().createElement("pre",{style:f.pre},JSON.stringify(e.params,null,2))))}),(!r||0===r.length)&&a().createElement("div",{style:f.debugEmptyState},"暂无事件记录")));case"errors":return e=t.errors,a().createElement("div",{style:f.debugPanelContent},a().createElement("h3",{style:f.h3},"错误信息"),a().createElement("div",{style:f.debugErrorsList},null==e?void 0:e.slice().reverse().map(function(e,t){return a().createElement("div",{key:t,style:f.debugErrorItem},a().createElement("div",{style:f.debugErrorHeader},a().createElement("span",{style:f.debugErrorType},e.type),a().createElement("span",{style:f.debugErrorTime},new Date(e.timestamp).toLocaleTimeString())),a().createElement("div",{style:f.debugErrorMessage},e.message),e.stack&&a().createElement("div",{style:f.debugErrorStack},a().createElement("pre",{style:f.pre},e.stack)))}),(!e||0===e.length)&&a().createElement("div",{style:f.debugEmptyState},"暂无错误记录")));case"tools":return a().createElement("div",{style:f.debugPanelContent},a().createElement("h3",{style:f.h3},"调试工具"),a().createElement("div",{style:f.debugToolsGrid},a().createElement("button",{style:f.debugToolButton},"导出配置"),a().createElement("button",{style:f.debugToolButton},"导出数据"),a().createElement("button",{style:f.debugToolButton},"刷新图表"),a().createElement("button",{style:f.debugToolButton},"清空数据"),a().createElement("button",{style:f.debugToolButton},"性能分析"),a().createElement("button",{style:f.debugToolButton},"重置图表")));default:return a().createElement("div",null,"未知标签页")}var e,r,n,o}())))},f={tarovizDebugPanel:{transition:"all 0.3s ease"},debugPanelHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"8px 12px",backgroundColor:"#f5f5f5",borderBottom:"1px solid #e0e0e0",cursor:"pointer"},debugPanelTitle:{display:"flex",alignItems:"center",gap:"8px",fontWeight:"bold",color:"#333"},debugPanelLogo:{fontSize:"14px"},debugPanelToggle:{background:"none",border:"none",fontSize:"12px",cursor:"pointer",color:"#666",padding:"4px"},debugPanelTabs:{display:"flex",borderBottom:"1px solid #e0e0e0",overflowX:"auto",whiteSpace:"nowrap"},debugTab:{padding:"8px 12px",background:"none",border:"none",borderBottom:"2px solid transparent",cursor:"pointer",fontSize:"12px",color:"#666",transition:"all 0.2s ease"},debugTabActive:{color:"#1890ff",borderBottomColor:"#1890ff",fontWeight:"bold"},debugPanelBody:{height:"calc(100% - 70px)",overflow:"auto"},debugPanelContent:{padding:"12px"},h3:{margin:"0 0 12px 0",fontSize:"14px",color:"#333"},h4:{margin:"12px 0 8px 0",fontSize:"13px",color:"#666"},h5:{margin:"8px 0 4px 0",fontSize:"12px",color:"#666"},debugInfoGrid:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"8px",marginBottom:"12px"},debugInfoItem:{display:"flex",justifyContent:"space-between",padding:"4px 8px",backgroundColor:"#f9f9f9",borderRadius:"4px"},debugInfoLabel:{fontWeight:"bold",color:"#666"},debugInfoValue:{color:"#333"},debugConfig:{backgroundColor:"#f5f5f5",padding:"8px",borderRadius:"4px",overflow:"auto",maxHeight:"200px"},pre:{margin:"0",fontSize:"11px",overflow:"auto"},debugDataSeries:{marginTop:"12px"},debugDataSeriesItem:{marginBottom:"12px",padding:"8px",backgroundColor:"#f9f9f9",borderRadius:"4px"},debugSeriesInfo:{marginTop:"4px",fontSize:"11px",color:"#666"},debugPerformanceChart:{marginTop:"12px",height:"120px",backgroundColor:"#f9f9f9",borderRadius:"4px",display:"flex",alignItems:"center",justifyContent:"center",color:"#999"},debugEventsList:{maxHeight:"200px",overflow:"auto"},debugEventItem:{marginBottom:"8px",padding:"8px",backgroundColor:"#f9f9f9",borderRadius:"4px"},debugEventHeader:{display:"flex",justifyContent:"space-between",marginBottom:"4px"},debugEventType:{fontWeight:"bold",color:"#333"},debugEventTime:{fontSize:"10px",color:"#999"},debugEventParams:{fontSize:"11px",overflow:"auto",maxHeight:"80px"},debugErrorsList:{maxHeight:"200px",overflow:"auto"},debugErrorItem:{marginBottom:"8px",padding:"8px",backgroundColor:"#fff1f0",border:"1px solid #ffccc7",borderRadius:"4px"},debugErrorHeader:{display:"flex",justifyContent:"space-between",marginBottom:"4px"},debugErrorType:{fontWeight:"bold",color:"#f5222d"},debugErrorTime:{fontSize:"10px",color:"#999"},debugErrorMessage:{color:"#f5222d",marginBottom:"4px"},debugErrorStack:{fontSize:"10px",maxHeight:"100px",overflow:"auto"},debugToolsGrid:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"8px"},debugToolButton:{padding:"8px 12px",backgroundColor:"#f0f0f0",border:"1px solid #e0e0e0",borderRadius:"4px",cursor:"pointer",fontSize:"12px",transition:"all 0.2s ease"},debugEmptyState:{textAlign:"center",color:"#999",padding:"16px"}},p=function(){return p=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},p.apply(this,arguments)},v=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},h=function(){function e(){this.debugInfo={},this.isEnabled=!1,this.eventHandlers=new Map,this.maxEvents=100,this.maxErrors=50,this.debugInfo={instance:{},config:{},data:{series:[],totalDataCount:0,currentDataCount:0},performance:{},events:[],errors:[]}}return e.getInstance=function(){return e.instance||(e.instance=new e),e.instance},e.prototype.init=function(){this.isEnabled=!0},e.prototype.enable=function(){this.isEnabled=!0},e.prototype.disable=function(){this.isEnabled=!1},e.prototype.getStatus=function(){return this.isEnabled},e.prototype.getDebugInfo=function(){return this.debugInfo},e.prototype.updateDebugInfo=function(e){this.isEnabled&&(this.debugInfo=p(p({},this.debugInfo),e),this.emitEvent(n.INFO_UPDATE,{info:e}))},e.prototype.updateInstanceInfo=function(e){this.updateDebugInfo({instance:e})},e.prototype.updateConfig=function(e){this.updateDebugInfo({config:e})},e.prototype.updateData=function(e){this.updateDebugInfo({data:e})},e.prototype.updatePerformance=function(e){this.updateDebugInfo({performance:e})},e.prototype.addEvent=function(e,t){if(this.isEnabled){var r={type:e,timestamp:Date.now(),params:t};this.debugInfo.events&&this.debugInfo.events.length>=this.maxEvents&&this.debugInfo.events.shift(),this.debugInfo.events=v(v([],this.debugInfo.events||[],!0),[r],!1),this.emitEvent(n.INFO_UPDATE,{info:this.debugInfo})}},e.prototype.addError=function(e,t,r){if(this.isEnabled){var o={type:e,message:t,stack:r,timestamp:Date.now()};this.debugInfo.errors&&this.debugInfo.errors.length>=this.maxErrors&&this.debugInfo.errors.shift(),this.debugInfo.errors=v(v([],this.debugInfo.errors||[],!0),[o],!1),this.emitEvent(n.INFO_UPDATE,{info:this.debugInfo})}},e.prototype.clear=function(){this.debugInfo={instance:{},config:{},data:{series:[],totalDataCount:0,currentDataCount:0},performance:{},events:[],errors:[]},this.emitEvent(n.INFO_UPDATE,{info:this.debugInfo})},e.prototype.on=function(e,t){var r;this.eventHandlers.has(e)||this.eventHandlers.set(e,new Set),null===(r=this.eventHandlers.get(e))||void 0===r||r.add(t)},e.prototype.off=function(e,t){var r;t?null===(r=this.eventHandlers.get(e))||void 0===r||r.delete(t):this.eventHandlers.delete(e)},e.prototype.emitEvent=function(e,t){var r=this.eventHandlers.get(e);r&&r.forEach(function(e){try{e(t)}catch(e){}})},e.prototype.setMaxEvents=function(e){this.maxEvents=e},e.prototype.setMaxErrors=function(e){this.maxErrors=e},e}().getInstance();!function(e){e.MONITORING_START="performanceMonitoringStart",e.MONITORING_END="performanceMonitoringEnd",e.METRIC_UPDATE="performanceMetricUpdate",e.ANALYSIS_COMPLETE="performanceAnalysisComplete"}(s||(s={}));var m=function(){return m=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},m.apply(this,arguments)},g=function(){function e(e){void 0===e&&(e={});var t,r=this;this.metrics=new Map,this.eventHandlers=new Map,this.isMonitoring=!1,this.startTime=0,this.sampleIntervalId=null,this.frameRateHistory=[],this.lastFrameTime=0,this.rafId=null,this.config=m({enabled:!0,metrics:["initTime","renderTime","updateTime","dataSize","frameRate"],sampleInterval:1e3,maxSamples:100,realTime:!0,autoStart:!1},e),null===(t=this.config.metrics)||void 0===t||t.forEach(function(e){r.metrics.set(e,[])}),this.config.autoStart&&this.start()}return e.getInstance=function(t){return(null==t?void 0:t.chartId)?(e.instances.has(t.chartId)||e.instances.set(t.chartId,new e(t)),e.instances.get(t.chartId)):(e.instance||(e.instance=new e(t)),e.instance)},e.resetInstance=function(){e.instance&&(e.instance.stop(),e.instance=null)},e.resetAllInstances=function(){e.resetInstance(),e.instances.forEach(function(e){return e.stop()}),e.instances.clear()},e.prototype.on=function(e,t){var r;this.eventHandlers.has(e)||this.eventHandlers.set(e,[]),null===(r=this.eventHandlers.get(e))||void 0===r||r.push(t)},e.prototype.off=function(e,t){var r=this.eventHandlers.get(e);if(r){var n=r.indexOf(t);n>-1&&r.splice(n,1)}},e.prototype.emit=function(e,t){var r=this.eventHandlers.get(e),n=void 0===t?{type:e}:(s.METRIC_UPDATE,{type:e,data:t});null==r||r.forEach(function(e){try{e(n)}catch(e){}})},e.prototype.start=function(){var e=this;!this.isMonitoring&&this.config.enabled&&(this.isMonitoring=!0,this.startTime=Date.now(),this.lastFrameTime=performance.now(),this.config.sampleInterval&&this.config.realTime&&(this.sampleIntervalId=setInterval(function(){e.sampleMetrics()},this.config.sampleInterval)),this.startFrameRateMonitoring(),this.emit(s.MONITORING_START))},e.prototype.stop=function(){this.isMonitoring&&(this.isMonitoring=!1,this.sampleIntervalId&&(clearInterval(this.sampleIntervalId),this.sampleIntervalId=null),this.stopFrameRateMonitoring(),this.emit(s.MONITORING_END))},e.prototype.dispose=function(){this.stop(),this.metrics.clear(),this.eventHandlers.clear(),this.frameRateHistory=[],e.instance===this&&(e.instance=null)},e.prototype.startFrameRateMonitoring=function(){var e=this,t=function(){var r;if(e.isMonitoring){var n=performance.now(),o=n-e.lastFrameTime,a=o>0?Math.round(1e3/o):0,i=null!==(r=e.config.maxSamples)&&void 0!==r?r:100;e.frameRateHistory.length>=i&&e.frameRateHistory.shift(),e.frameRateHistory.push(a),e.lastFrameTime=n,e.rafId=requestAnimationFrame(t)}};this.rafId=requestAnimationFrame(t)},e.prototype.stopFrameRateMonitoring=function(){null!==this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=null),this.frameRateHistory=[]},e.prototype.sampleMetrics=function(){var e,t,r;if(this.isMonitoring){if((null===(e=this.config.metrics)||void 0===e?void 0:e.includes("frameRate"))&&this.frameRateHistory.length>0){var n=this.frameRateHistory.reduce(function(e,t){return e+t},0)/this.frameRateHistory.length;this.recordMetric("frameRate",n,"FPS")}if((null===(t=this.config.metrics)||void 0===t?void 0:t.includes("memoryUsage"))&&void 0!==performance.memory){var o=performance.memory,a=((null!==(r=null==o?void 0:o.usedJSHeapSize)&&void 0!==r?r:0)/1048576).toFixed(2);this.recordMetric("memoryUsage",parseFloat(a),"MB")}}},e.prototype.recordMetric=function(e,t,r,n){var o;if(this.config.enabled&&(null===(o=this.config.metrics)||void 0===o?void 0:o.includes(e))){var a={type:e,value:t,unit:r,timestamp:Date.now(),description:n},i=this.metrics.get(e)||[];i.push(a),this.config.maxSamples&&i.length>this.config.maxSamples&&i.shift(),this.metrics.set(e,i),this.emit(s.METRIC_UPDATE,a)}},e.prototype.recordInitTime=function(e){this.recordMetric("initTime",e,"ms","图表初始化耗时")},e.prototype.recordRenderTime=function(e){this.recordMetric("renderTime",e,"ms","图表渲染耗时")},e.prototype.recordUpdateTime=function(e){this.recordMetric("updateTime",e,"ms","图表更新耗时")},e.prototype.recordDataSize=function(e){try{var t=new Blob([JSON.stringify(e)]).size/1024;this.recordMetric("dataSize",t,"KB","图表数据大小")}catch(e){}},e.prototype.analyze=function(){var e={},t={},r={},n={},o=0,a=100,i=[];this.metrics.forEach(function(a,i){if(0!==a.length){o+=a.length,n[i]=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}([],a,!0);var l=a.reduce(function(e,t){return e+t.value},0);e[i]=parseFloat((l/a.length).toFixed(2)),t[i]=Math.max.apply(Math,a.map(function(e){return e.value})),r[i]=Math.min.apply(Math,a.map(function(e){return e.value}))}}),void 0!==e.renderTime&&e.renderTime>100&&(a-=20,i.push("渲染时间过长,建议优化数据处理或减少图表复杂度")),void 0!==e.updateTime&&e.updateTime>50&&(a-=15,i.push("更新时间过长,建议优化数据更新逻辑")),void 0!==e.frameRate&&e.frameRate<30&&(a-=25,i.push("帧率过低,建议减少动画效果或优化渲染逻辑")),void 0!==e.dataSize&&e.dataSize>100&&(a-=10,i.push("数据量过大,建议进行数据压缩或分页处理")),a=Math.max(0,Math.min(100,a));var l={averages:e,maxValues:t,minValues:r,trends:n,score:a,suggestions:i,totalSamples:o,duration:Date.now()-this.startTime};return this.emit(s.ANALYSIS_COMPLETE,l),l},e.prototype.generateReport=function(e){void 0===e&&(e={});var t=this.analyze(),r=m({format:"json",includeCharts:!1,includeSuggestions:!0,includeDetailedData:!1},e);switch(r.format){case"json":default:return this.generateJsonReport(t,r);case"csv":return this.generateCsvReport(t,r);case"html":return this.generateHtmlReport(t,r)}},e.prototype.generateJsonReport=function(e,t){var r={timestamp:(new Date).toISOString(),duration:e.duration,score:e.score,totalSamples:e.totalSamples};return t.includeSuggestions&&(r.suggestions=e.suggestions),t.includeDetailedData&&(r.averages=e.averages,r.maxValues=e.maxValues,r.minValues=e.minValues,r.trends=e.trends),r},e.prototype.generateCsvReport=function(e,t){var r="Metric,Type,Value,Unit\n";return Object.entries(e.averages).forEach(function(e){var t=e[0],n=e[1];r+="".concat(t,",Average,").concat(n,",ms\n")}),Object.entries(e.maxValues).forEach(function(e){var t=e[0],n=e[1];r+="".concat(t,",Max,").concat(n,",ms\n")}),Object.entries(e.minValues).forEach(function(e){var t=e[0],n=e[1];r+="".concat(t,",Min,").concat(n,",ms\n")}),r},e.prototype.generateHtmlReport=function(e,t){var r='\n <!DOCTYPE html>\n <html>\n <head>\n <title>TaroViz 性能报告</title>\n <style>\n body { font-family: Arial, sans-serif; margin: 20px; }\n .report-header { background: #f0f0f0; padding: 20px; border-radius: 8px; }\n .score { font-size: 48px; font-weight: bold; color: #4CAF50; }\n .metric-section { margin: 20px 0; }\n .metric-table { border-collapse: collapse; width: 100%; }\n .metric-table th, .metric-table td { border: 1px solid #ddd; padding: 8px; text-align: left; }\n .metric-table th { background-color: #f2f2f2; }\n .suggestions { background: #fff3cd; padding: 15px; border-radius: 8px; margin: 20px 0; }\n </style>\n </head>\n <body>\n <div class="report-header">\n <h1>TaroViz 性能报告</h1>\n <p>生成时间: '.concat((new Date).toISOString(),"</p>\n <p>监控时长: ").concat(Math.round(e.duration/1e3),' 秒</p>\n <div class="score">').concat(e.score," / 100</div>\n </div>\n ");return r+='\n <div class="metric-section">\n <h2>性能指标</h2>\n <table class="metric-table">\n <tr>\n <th>指标</th>\n <th>平均值</th>\n <th>最大值</th>\n <th>最小值</th>\n </tr>',Object.entries(e.averages).forEach(function(t){var n=t[0],o=t[1],a=e.maxValues[n],i=e.minValues[n];r+="\n <tr>\n <td>".concat(n,"</td>\n <td>").concat(o," ms</td>\n <td>").concat(a," ms</td>\n <td>").concat(i," ms</td>\n </tr>")}),r+="\n </table>\n </div>",t.includeSuggestions&&e.suggestions.length>0&&(r+='\n <div class="suggestions">\n <h2>性能建议</h2>\n <ul>',e.suggestions.forEach(function(e){r+="\n <li>".concat(e,"</li>")}),r+="\n </ul>\n </div>"),r+="\n </body>\n </html>"},e.prototype.getIsMonitoring=function(){return this.isMonitoring},e.prototype.getConfig=function(){return m({},this.config)},e.prototype.updateConfig=function(e){this.config=m(m({},this.config),e)},e.prototype.getMetricsByType=function(e){return this.metrics.get(e)||[]},e.prototype.clearMetrics=function(){this.metrics.clear(),this.frameRateHistory=[],this.startTime=Date.now()},e.prototype.getScore=function(){return this.analyze().score},e.instance=null,e.instances=new Map,e}();function y(e,t){return void 0===e?t:"number"==typeof e?"".concat(e,"px"):e}function b(e){if(!e)return 0;var t=0;if(e.series)for(var r=0,n=Array.isArray(e.series)?e.series:[e.series];r<n.length;r++){var o=n[r];o.data&&(Array.isArray(o.data)?t+=o.data.length:"object"==typeof o.data&&(t+=Object.keys(o.data).length))}return t}g.getInstance();var x=r(7698),C=(r(6869),function(){return C=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},C.apply(this,arguments)}),E=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))};const w=function(e){var t=e.chartId,r=e.option,n=e.animation,s=e.debug,u=e.width,f=void 0===u?"100%":u,p=e.height,v=void 0===p?"300px":p,m=e.theme,w=e.autoResize,k=void 0===w||w,S=e.direction,T=void 0===S?"ltr":S,I=e.onInit,O=(e.onClick,e.onDataZoom,e.style),A=e.className,D=(e.children,e.virtualScroll),R=void 0!==D&&D,P=e.virtualScrollPageSize,M=void 0===P?100:P,L=e.virtualScrollPreloadSize,N=void 0===L?50:L,j=e.enablePerformanceMonitoring,z=void 0!==j&&j,F=e.onPerformance,H=e.enableZoom,B=void 0!==H&&H,U=e.onZoom,_=e.enableDataFiltering,G=void 0!==_&&_,W=e.filters,Z=void 0===W?{}:W,V=e.onDataFiltered,J=e.enableLegendInteraction,Y=void 0!==J&&J,q=e.legendInteractionMode,K=void 0===q?"single":q,Q=e.onLegendSelect,X=e.onLegendUnselect,$=(e.onLegendSelectAll,e.onLegendInverseSelect,e.enableCustomTooltip),ee=void 0!==$&&$,te=e.customTooltipContent,re=e.customTooltipStyle,ne=e.onTooltipShow,oe=e.onTooltipHide,ae=(e.onExport,e.linkageConfig),ie=void 0===ae?{}:ae,le=e.onDataUpdate,ce=e.dataUpdateOptions,se=void 0===ce?{}:ce,ue=(0,o.useRef)(null),de=(0,o.useRef)({initStartTime:0,initEndTime:0,renderStartTime:0,renderEndTime:0,updateStartTime:0,updateEndTime:0}),fe=(0,o.useRef)({currentPage:0,totalPages:1,totalDataCount:0,isScrolling:!1}),pe=(0,o.useRef)(r),ve=(0,o.useRef)(null),he=(0,o.useRef)(null),me=(0,o.useMemo)(function(){return s?"boolean"==typeof s?{enabled:s,autoExpand:!1}:C({enabled:!0},s):null},[s]),ge=(0,o.useMemo)(function(){if(r){var e=C({},r);if(G&&Z&&Object.keys(Z).length>0&&(e=JSON.parse(JSON.stringify(e))).series&&Array.isArray(e.series)&&(e.series=e.series.map(function(e){var t=e;if(t.data&&Array.isArray(t.data)){var r=function(e,t){return t&&0!==Object.keys(t).length?e.filter(function(e){for(var r=0,n=Object.entries(t);r<n.length;r++){var o=n[r],a=o[0],i=o[1],l=e[a];if(!(l===i||Array.isArray(l)&&l.includes(i)))return!1}return!0}):e}(t.data,Z);if(V&&V(r,Z),R){fe.current.totalDataCount=r.length,fe.current.totalPages=Math.ceil(r.length/M);var n=fe.current.currentPage*M,o=Math.min(n+M+N,r.length);return C(C({},t),{data:r.slice(n,o)})}return C(C({},t),{data:r})}return t})),B){e=JSON.parse(JSON.stringify(e));var t=Array.isArray(e.dataZoom)?e.dataZoom:e.dataZoom?[e.dataZoom]:[];t.some(function(e){return"inside"===(null==e?void 0:e.type)})||(e.dataZoom=E(E([],t||[],!0),[{type:"inside",start:0,end:100,zoomOnMouseWheel:!0,moveOnMouseMove:!1}],!1))}var o=b(e),a=(0,i.ek)(n,o);return C(C({},e),a)}},[r,n,B,G,Z,R,M,N,V]),ye=(0,o.useCallback)(function(e){var r;ue.current=e,ve.current=e,z&&(he.current=g.getInstance({chartId:t,enabled:!0,metrics:["initTime","renderTime","updateTime","dataSize","frameRate"],sampleInterval:1e3,maxSamples:100,realTime:!0,autoStart:!0})),de.current.initStartTime=Date.now(),t&&function(e,t){if(l[e])try{l[e].dispose()}catch(e){}l[e]=t}(t,e),e&&(ie.enableClickLinkage&&t&&ie.linkedChartIds&&e.on("click",function(e){ie.linkedChartIds.forEach(function(t){var r=c(t);r&&r.dispatchAction({type:"highlight",name:e.name})})}),e.on("datazoom",function(e){var r=e;if(U&&U({start:r.start||0,end:r.end||100,dataZoomIndex:r.dataZoomIndex||0}),R&&!fe.current.isScrolling){fe.current.isScrolling=!0;var n=Math.floor((r.start||0)/100*fe.current.totalPages);n!==fe.current.currentPage&&(fe.current.currentPage=n),setTimeout(function(){fe.current.isScrolling=!1},100)}ie.enableZoomLinkage&&t&&ie.linkedChartIds&&ie.linkedChartIds.forEach(function(e){var t=c(e);t&&t.dispatchAction({type:"dataZoom",start:r.start,end:r.end,dataZoomIndex:r.dataZoomIndex})})}),Y&&e.on("legendselectchanged",function(r){var n=r,o=n.name,a=n.selected;if(ie.enableLegendLinkage&&t&&ie.linkedChartIds&&ie.linkedChartIds.forEach(function(e){var t=c(e);t&&t.setOption({legend:{selected:a}})}),"single"===K){var i={};Object.keys(a).forEach(function(e){i[e]=e===o}),e.setOption({legend:{selected:i}}),void 0!==o&&(null==Q||Q({name:o,selected:i}))}else void 0!==o&&a[o]?null==Q||Q({name:o,selected:a}):void 0!==o&&(null==X||X({name:o,selected:a}))}),ee&&te&&(e.on("tooltipshow",function(e){return null==ne?void 0:ne(e)}),e.on("tooltiphide",function(e){return null==oe?void 0:oe(e)}),e.setOption({tooltip:C({formatter:function(e){return String(te(e))}},re&&{backgroundColor:"transparent",borderColor:"transparent",textStyle:{}})}))),(null==me?void 0:me.enabled)&&(r={instance:{id:t,type:"ECharts",renderer:"canvas",width:"number"==typeof f?f:void 0,height:"number"==typeof v?v:void 0,platform:"web"},config:ge,data:{series:Array.isArray(null==ge?void 0:ge.series)?ge.series:[],totalDataCount:b(ge),currentDataCount:b(ge)},performance:{initTime:0,renderTime:0,dataSize:JSON.stringify(ge).length}},h.updateDebugInfo(r)),null==I||I(e),de.current.initEndTime=Date.now()},[t,z,I,ie,R,U,Y,K,Q,X,ee,te,re,ne,oe,ge,f,v]);(0,o.useEffect)(function(){if(ue.current&&F){var e=de.current;F({renderTime:e.renderEndTime-e.renderStartTime,initTime:e.initEndTime-e.initStartTime,updateTime:e.updateEndTime-e.updateStartTime,dataSize:JSON.stringify(r).length})}},[r,F]);var be=(0,o.useRef)(null);(0,o.useEffect)(function(){var e;if(le&&!1!==(null==se?void 0:se.enabled)){var t=null!==(e=null==se?void 0:se.debounceDelay)&&void 0!==e?e:0;if(be.current&&clearTimeout(be.current),t>0)be.current=setTimeout(function(){var e=pe.current;e!==r&&(le(e,r),pe.current=r)},t);else{var n=pe.current;n!==r&&(le(n,r),pe.current=r)}return function(){be.current&&(clearTimeout(be.current),be.current=null)}}},[r,le,se]),(0,o.useEffect)(function(){return function(){t&&function(e){if(l[e]){try{l[e].dispose()}catch(e){}delete l[e]}}(t),he.current&&(he.current.dispose(),he.current=null),ve.current&&ve.current.dispose()}},[t]);var xe=C({},function(e,t,r,n){return C({width:y(e,"100%"),height:y(t,"300px"),direction:r},n)}(f,v,T,O)),Ce={option:ge,width:f,height:v,theme:m,autoResize:k,loading:!1,onChartInit:ye,renderer:"canvas",onEvents:{},chartType:"base",style:xe,className:A};return a().createElement(a().Fragment,null,a().createElement(x.A,C({},Ce)),(null==me?void 0:me.enabled)&&a().createElement(d,{options:me,debugInfo:{instance:{id:t,type:"ECharts",renderer:"canvas",width:"number"==typeof f?f:void 0,height:"number"==typeof v?v:void 0,platform:"web"},config:r,data:{series:Array.isArray(null==r?void 0:r.series)?r.series:[],totalDataCount:b(r),currentDataCount:b(r)},performance:{initTime:de.current.initEndTime-de.current.initStartTime,renderTime:de.current.renderEndTime-de.current.renderStartTime,updateTime:0,dataSize:JSON.stringify(r).length}}}))};var k=r(9627),S=r(7377),T=function(){return T=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},T.apply(this,arguments)},I={fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',fontSize:"14px",color:"#333"},O={display:"flex",flexDirection:"column",gap:"4px"},A={fontSize:"12px",fontWeight:500,color:"#666"},D={padding:"6px 10px",border:"1px solid #d9d9d9",borderRadius:"4px",fontSize:"13px",outline:"none",transition:"border-color 0.2s, box-shadow 0.2s",backgroundColor:"#fff"},R={padding:"6px 16px",borderRadius:"4px",fontSize:"13px",cursor:"pointer",border:"none",transition:"all 0.2s"},P=function(e){var t,r,n=e.field,i=e.value,l=e.onChange,c=e.disabled,s=e.compact,u=(0,o.useCallback)(function(e){var t=e.target.value;l(n.key,""===t?void 0:t)},[n.key,l]);return a().createElement("div",{style:O},a().createElement("label",{style:A},n.label),a().createElement("select",{value:null!==(t=i)&&void 0!==t?t:"",onChange:u,disabled:c,style:T(T({},D),{minWidth:s?"100px":"140px",width:"100%",cursor:c?"not-allowed":"pointer",opacity:c?.6:1})},a().createElement("option",{value:""},n.placeholder||"请选择"),null===(r=n.options)||void 0===r?void 0:r.map(function(e){return a().createElement("option",{key:String(e.value),value:String(e.value)},e.label)})))},M=function(e){var t,r,n,i,l,c=e.field,s=e.value,u=e.onChange,d=e.disabled,f=e.compact,p=null!==(t=s)&&void 0!==t?t:[null!==(r=c.min)&&void 0!==r?r:0,null!==(n=c.max)&&void 0!==n?n:100],v=(0,o.useCallback)(function(e){var t=Number(e.target.value);u(c.key,[t,p[1]])},[c.key,p,u]),h=(0,o.useCallback)(function(e){var t=Number(e.target.value);u(c.key,[p[0],t])},[c.key,p,u]);return a().createElement("div",{style:O},a().createElement("label",{style:A},c.label),a().createElement("div",{style:{display:"flex",alignItems:"center",gap:"6px"}},a().createElement("input",{type:"number",value:p[0],min:c.min,max:p[1],onChange:v,disabled:d,placeholder:String(null!==(i=c.min)&&void 0!==i?i:"最小"),style:T(T({},D),{width:f?"60px":"80px",cursor:d?"not-allowed":"text",opacity:d?.6:1})}),a().createElement("span",{style:{color:"#999",fontSize:"12px"}},"~"),a().createElement("input",{type:"number",value:p[1],min:p[0],max:c.max,onChange:h,disabled:d,placeholder:String(null!==(l=c.max)&&void 0!==l?l:"最大"),style:T(T({},D),{width:f?"60px":"80px",cursor:d?"not-allowed":"text",opacity:d?.6:1})})))},L=function(e){var t,r=e.field,n=e.value,i=e.onChange,l=e.disabled,c=e.compact,s=(0,o.useMemo)(function(){return Array.isArray(n)?new Set(n.map(String)):new Set},[n]),u=(0,o.useCallback)(function(e){var t=String(e),n=new Set(s);n.has(t)?n.delete(t):n.add(t),i(r.key,Array.from(n))},[r.key,s,i]);return a().createElement("div",{style:O},a().createElement("label",{style:A},r.label),a().createElement("div",{style:{display:"flex",flexWrap:"wrap",gap:c?"4px":"8px",maxWidth:c?"200px":"300px"}},null===(t=r.options)||void 0===t?void 0:t.map(function(e){var t=s.has(String(e.value));return a().createElement("label",{key:String(e.value),style:{display:"flex",alignItems:"center",gap:"4px",cursor:l?"not-allowed":"pointer",fontSize:"13px",opacity:l?.6:1,userSelect:"none"}},a().createElement("input",{type:"checkbox",checked:t,onChange:function(){return u(e.value)},disabled:l,style:{cursor:l?"not-allowed":"pointer"}}),a().createElement("span",null,e.label))})))},N=function(e){var t,r=e.field,n=e.value,i=e.onChange,l=e.disabled,c=e.compact,s=null!==(t=n)&&void 0!==t?t:["",""],u=(r.dateFormat,(0,o.useCallback)(function(e){i(r.key,[e.target.value,s[1]])},[r.key,s,i])),d=(0,o.useCallback)(function(e){i(r.key,[s[0],e.target.value])},[r.key,s,i]);return a().createElement("div",{style:O},a().createElement("label",{style:A},r.label),a().createElement("div",{style:{display:"flex",alignItems:"center",gap:"6px"}},a().createElement("input",{type:"date",value:s[0],onChange:u,disabled:l,style:T(T({},D),{width:c?"120px":"150px",cursor:l?"not-allowed":"text",opacity:l?.6:1})}),a().createElement("span",{style:{color:"#999",fontSize:"12px"}},"~"),a().createElement("input",{type:"date",value:s[1],onChange:d,disabled:l,style:T(T({},D),{width:c?"120px":"150px",cursor:l?"not-allowed":"text",opacity:l?.6:1})})))},j=function(e){var t=e.fields,r=e.value,n=void 0===r?{}:r,i=e.onChange,l=e.layout,c=void 0===l?"vertical":l,s=e.showReset,u=void 0!==s&&s,d=e.className,f=void 0===d?"":d,p=e.style,v=e.compact,h=void 0!==v&&v,m=e.disabled,g=void 0!==m&&m,y=e.resetText,b=void 0===y?"重置":y,x=e.submitText,C=void 0===x?"筛选":x,E=e.showSubmit,w=void 0!==E&&E,k=e.liveUpdate,S=void 0===k||k,O=(0,o.useState)(n),A=O[0],D=O[1];a().useEffect(function(){D(n)},[n]);var j=(0,o.useMemo)(function(){return Object.values(A).some(function(e){return null!=e&&""!==e&&(!Array.isArray(e)||0!==e.length)})},[A]),z=(0,o.useCallback)(function(e,t){var r,n=T(T({},A),((r={})[e]=t,r));D(n),S&&(null==i||i(n))},[A,S,i]),F=(0,o.useCallback)(function(){null==i||i(A)},[A,i]),H=(0,o.useCallback)(function(){var e={};t.forEach(function(t){var r,n;"range"===t.type?e[t.key]=[null!==(r=t.min)&&void 0!==r?r:0,null!==(n=t.max)&&void 0!==n?n:100]:"checkbox"===t.type?e[t.key]=[]:"date"===t.type?e[t.key]=["",""]:e[t.key]=void 0}),D(e),null==i||i(e)},[t,i]),B=(0,o.useCallback)(function(e){var t=A[e.key];switch(e.type){case"select":return a().createElement(P,{key:e.key,field:e,value:t,onChange:z,disabled:g,compact:h});case"range":return a().createElement(M,{key:e.key,field:e,value:t,onChange:z,disabled:g,compact:h});case"checkbox":return a().createElement(L,{key:e.key,field:e,value:t,onChange:z,disabled:g,compact:h});case"date":return a().createElement(N,{key:e.key,field:e,value:t,onChange:z,disabled:g,compact:h});default:return null}},[A,z,g,h]),U="horizontal"===c,_=T(T(T({},I),{display:"flex",flexDirection:U?"row":"column",flexWrap:"wrap",gap:U?"16px":"12px",alignItems:U?"flex-end":"flex-start",padding:"12px",backgroundColor:"#fafafa",borderRadius:"6px",border:"1px solid #f0f0f0"}),p);return a().createElement("div",{className:"taroviz-datafilter ".concat(f),style:_},t.map(B),a().createElement("div",{style:{display:"flex",gap:"8px",alignItems:"flex-end",marginLeft:U?"8px":"0",paddingTop:U?"0":"4px"}},w&&!S&&a().createElement("button",{type:"button",onClick:F,disabled:g,style:T(T({},R),{backgroundColor:"#1890ff",color:"#fff",cursor:g?"not-allowed":"pointer",opacity:g?.6:1})},C),u&&j&&a().createElement("button",{type:"button",onClick:H,disabled:g,style:T(T({},R),{backgroundColor:"#fff",color:"#666",border:"1px solid #d9d9d9",cursor:g?"not-allowed":"pointer",opacity:g?.6:1})},b)))};function z(e){return e&&0!==e.length?{xAxis:{type:"category",data:e.map(function(e){return e.name})},yAxis:{type:"value"},series:[{type:"bar",data:e.map(function(e){return e.value})}]}:{}}function F(e,t,r,n,o,a,i){var l={};return"reset"===r||0===e?l=o?z(o):{}:"up"===r?l=n.length>0&&n[0].chartOption?n[0].chartOption:z(n):"down"===r&&t&&(t.chartOption?l=t.chartOption:t.children&&t.children.length>0&&(l=z(t.children))),l}function H(e,t,r){if(0===e)return null!=t?t:[];var n=r[r.length-1];return n&&n.dataItem.children?n.dataItem.children:[]}var B=function(){return B=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},B.apply(this,arguments)},U={autoBind:!0,currentLevel:0};function _(e){var t={chartInstance:null,config:B(B({},U),e),currentLevel:0,history:[],currentOption:{},initialOption:{},initialized:!1,clickHandler:null},r=function(e){var r=e||t.chartInstance;r&&(t.clickHandler&&n(r),t.clickHandler=function(e){!function(e,t){var r,n,o,a,i,l=t.chartInstance,c=t.config;if(!l)return!1;var s,u=e.name,d=e.value,f=function(e,t,r,n,o){var a=r.find(function(r){return String(r.name)===String(e)||r.value===t});return!a&&0===o&&n&&(a=n.find(function(r){return String(r.name)===String(e)||r.value===t})),a}(u,d,H(t.currentLevel,c.initialSources,t.history),c.initialSources,t.currentLevel);if(!(s=f)||!(s.children&&s.children.length>0||s.chartOption))return!1;f&&t.history.push({level:t.currentLevel,dataItem:f}),t.currentLevel+=1;var p=F(t.currentLevel,f,"down",null!==(r=f.children)&&void 0!==r?r:[],c.initialSources,t.currentOption);p&&Object.keys(p).length>0&&(l.setOption(p,!0),t.currentOption=p),null===(n=c.onDrillDown)||void 0===n||n.call(c,{level:t.currentLevel,name:null!==(o=null==f?void 0:f.name)&&void 0!==o?o:u,value:null!==(a=null==f?void 0:f.value)&&void 0!==a?a:d,sources:null!==(i=null==f?void 0:f.children)&&void 0!==i?i:[],chartOption:p,rawParams:e})}(e,t)},r.on("click",t.clickHandler))},n=function(e){var r=e||t.chartInstance;r&&t.clickHandler&&(r.off("click",t.clickHandler),t.clickHandler=null)};return{init:function(e,n){var o;if(e){t.chartInstance=e,t.config=B(B({},U),n),t.currentLevel=null!==(o=n.currentLevel)&&void 0!==o?o:0,t.initialized=!0;try{t.initialOption=e.getOption()||{}}catch(e){t.initialOption={}}t.config.autoBind&&r(e)}},drillUp:function(){!function(e,t){var r,n=e.chartInstance;if(!n||e.currentLevel<=0)return!1;var o=e.currentLevel;e.history.pop(),e.currentLevel-=1;var a=H(e.currentLevel,t.initialSources,e.history),i=F(e.currentLevel,void 0,"up",a,t.initialSources,e.currentOption,e.initialOption);i&&Object.keys(i).length>0?(n.setOption(i,!0),e.currentOption=i):0===e.currentLevel&&e.initialOption&&(n.setOption(e.initialOption,!0),e.currentOption=e.initialOption),null===(r=t.onDrillUp)||void 0===r||r.call(t,{previousLevel:o,currentLevel:e.currentLevel,chartOption:i})}(t,t.config)},reset:function(){!function(e,t){var r,n=e.chartInstance;if(n){e.history=[],e.currentLevel=0;var o=F(0,void 0,"reset",H(e.currentLevel,t.initialSources,e.history),t.initialSources,e.currentOption,e.initialOption);o&&Object.keys(o).length>0?(n.setOption(o,!0),e.currentOption=o):e.initialOption&&Object.keys(e.initialOption).length>0&&(n.setOption(e.initialOption,!0),e.currentOption=e.initialOption),null===(r=t.onReset)||void 0===r||r.call(t,{level:0})}}(t,t.config)},getCurrentLevel:function(){return t.currentLevel},bindClick:r,unbindClick:n,drillTo:function(e,r){!function(e,t,r,n){var o,a,i,l,c,s,u=r.chartInstance;if(u&&!(e<0||e>r.history.length)){var d=r.currentLevel;r.currentLevel=e,e===r.history.length?t&&r.history.push({level:e-1,dataItem:t}):e<r.history.length?r.history=r.history.slice(0,e):r.history=[];var f=F(e,t,0===e?"reset":"down",H(r.currentLevel,n.initialSources,r.history),n.initialSources,r.currentOption);f&&Object.keys(f).length>0&&(u.setOption(f,!0),r.currentOption=f),e>d?null===(o=n.onDrillDown)||void 0===o||o.call(n,{level:e,name:null!==(a=null==t?void 0:t.name)&&void 0!==a?a:"",value:null!==(i=null==t?void 0:t.value)&&void 0!==i?i:0,sources:null!==(l=null==t?void 0:t.children)&&void 0!==l?l:[],chartOption:f,rawParams:{}}):e<d?null===(c=n.onDrillUp)||void 0===c||c.call(n,{previousLevel:d,currentLevel:e,chartOption:f}):null===(s=n.onReset)||void 0===s||s.call(n,{level:0})}}(e,r,t,t.config)},getHistory:function(){return function(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}([],t.history,!0)},canDrillUp:function(){return t.currentLevel>0},dispose:function(){t.chartInstance&&t.clickHandler&&t.chartInstance.off("click",t.clickHandler),t.chartInstance=null,t.clickHandler=null,t.history=[],t.currentLevel=0,t.initialized=!1}}}var G=r(8319),W=r(2123),Z=r(9999),V=function(){return V=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},V.apply(this,arguments)},J=new Map,Y={theme:"default",name:"Default",description:"简洁现代的默认主题",type:"light",mode:"light",darkMode:!1,tags:["modern","clean","default"],colors:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],backgroundColor:"#ffffff",textColor:"#333333",textColorSecondary:"#666666",borderColor:"#e8e8e8",dividerColor:"#f0f0f0",fontFamily:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',chart:{legend:{textColor:"#333333",backgroundColor:"transparent",borderColor:"#e8e8e8"},axis:{textColor:"#666666",lineColor:"#e8e8e8",tickColor:"#e8e8e8",splitLineColor:"#f0f0f0"},tooltip:{textColor:"#333333",backgroundColor:"rgba(255, 255, 255, 0.95)",borderColor:"#e8e8e8",borderRadius:4},title:{textColor:"#333333",subTextColor:"#666666"}}},q={theme:"dark",name:"Dark",description:"优雅的深色主题,适合夜间使用",type:"dark",mode:"dark",darkMode:!0,tags:["dark","night","modern"],colors:["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff9f7f","#8d48e3","#dd79ff"],backgroundColor:"#1a1a2e",textColor:"#e8e8e8",textColorSecondary:"#a0a0a0",borderColor:"#2d2d44",dividerColor:"#252538",fontFamily:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',chart:{legend:{textColor:"#e8e8e8",backgroundColor:"transparent",borderColor:"#2d2d44"},axis:{textColor:"#a0a0a0",lineColor:"#2d2d44",tickColor:"#2d2d44",splitLineColor:"#252538"},tooltip:{textColor:"#e8e8e8",backgroundColor:"rgba(26, 26, 46, 0.95)",borderColor:"#2d2d44",borderRadius:4},title:{textColor:"#e8e8e8",subTextColor:"#a0a0a0"}}};function K(e){if(!e)return Y;var t;e.theme&&"string"==typeof e.theme?t=J.get(e.theme)||(e.darkMode?q:Y):t=e.darkMode?q:Y;return V(V({},t),e)}function Q(e,t){J.set(e,V(V({},t),{name:e}))}function X(){return Array.from(J.values())}function $(e){return J.get(e)}function ee(e,t){var r;return"string"==typeof e?r=J.get(e)||Y:(r=e,e.name&&Q(e.name,e)),"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("themeChange",{detail:r})),null==t||t(),r}function te(e){return X().filter(function(t){var r;return null===(r=t.tags)||void 0===r?void 0:r.includes(e)})}function re(){return X().filter(function(e){return!e.darkMode})}function ne(){return X().filter(function(e){return e.darkMode})}var oe={default:Y,dark:q,walden:V(V({},Y),{theme:"walden",name:"Walden",description:"清新自然风格",colors:["#0a437a","#3a84c4","#22a783","#48b591","#7fcdbb","#c9e4ca"],backgroundColor:"#f0f8f5",textColor:"#2c5042"}),chalk:V(V({},Y),{theme:"chalk",name:"Chalk",description:"粉笔风格",colors:["#2e8de5","#f0805a","#5ab1ef","#91d5ff","#faad14"],backgroundColor:"#ffffff",textColor:"#000000"}),"purple-passion":V(V({},Y),{theme:"purple-passion",name:"Purple Passion",description:"紫色浪漫",colors:["#9c27b0","#e91e63","#ff5722","#ff9800","#ffc107"],backgroundColor:"#f5f5f5",textColor:"#333333"}),"blue-green":V(V({},Y),{theme:"blue-green",name:"Blue Green",description:"蓝绿清新",colors:["#00838f","#00acc1","#03a9f4","#29b6f6","#4fc3f7"],backgroundColor:"#e0f7fa",textColor:"#006064"}),golden:V(V({},Y),{theme:"golden",name:"Golden",description:"金色奢华",colors:["#ffd700","#ffed4e","#f9a825","#ffc107","#ffb300"],backgroundColor:"#fff8e1",textColor:"#ff6f00"}),forest:V(V({},Y),{theme:"forest",name:"Forest",description:"森林绿色",colors:["#2e7d32","#388e3c","#43a047","#4caf50","#66bb6a"],backgroundColor:"#f1f8e9",textColor:"#1b5e20"}),neon:{theme:"neon",name:"Neon",description:"赛博朋克霓虹风格,炫酷吸睛",type:"dark",mode:"dark",darkMode:!0,tags:["neon","cyberpunk","colorful","dark"],colors:["#00fff5","#ff00ff","#ffff00","#00ff00","#ff6b6b","#4ecdc4","#ffe66d","#95e1d3","#f38181"],backgroundColor:"#0d0d1a",textColor:"#ffffff",textColorSecondary:"#b0b0b0",borderColor:"#1a1a2e",dividerColor:"#1a1a2e",fontFamily:'"JetBrains Mono", "Fira Code", monospace',effects:{shadows:!0,shadowColor:"rgba(0, 255, 245, 0.3)",gradients:!0},chart:{tooltip:{textColor:"#ffffff",backgroundColor:"rgba(13, 13, 26, 0.95)",borderColor:"#00fff5",borderRadius:4,shadowColor:"rgba(0, 255, 245, 0.3)"}}},glass:{theme:"glass",name:"Glass",description:"现代玻璃态设计,半透明质感",type:"light",mode:"light",darkMode:!1,tags:["glass","modern","minimal","light"],colors:["#667eea","#764ba2","#f093fb","#f5576c","#4facfe","#00f2fe","#43e97b","#38f9d7","#fa709a"],backgroundColor:"rgba(255, 255, 255, 0.8)",backgroundGradient:{start:"#f5f7fa",end:"#c3cfe2",angle:135},textColor:"#2d3748",textColorSecondary:"#718096",borderColor:"rgba(255, 255, 255, 0.5)",dividerColor:"rgba(255, 255, 255, 0.3)",fontFamily:"Inter, -apple-system, BlinkMacSystemFont, sans-serif",effects:{glassmorphism:!0,blur:10,shadows:!0,shadowColor:"rgba(0, 0, 0, 0.1)",borderRadius:"large"},chart:{tooltip:{textColor:"#2d3748",backgroundColor:"rgba(255, 255, 255, 0.9)",borderColor:"rgba(255, 255, 255, 0.5)",borderRadius:12}}},pastel:{theme:"pastel",name:"Pastel",description:"柔和粉彩配色,温馨舒适",type:"light",mode:"light",darkMode:!1,tags:["pastel","soft","gentle","light"],colors:["#ffb3ba","#ffdfba","#ffffba","#baffc9","#bae1ff","#f0b3ff","#b3fff0","#ffb3d9","#d9ffb3"],backgroundColor:"#fff9f5",textColor:"#5d5d5d",textColorSecondary:"#8a8a8a",borderColor:"#f0e6e0",dividerColor:"#f5f0eb",fontFamily:"Nunito, -apple-system, BlinkMacSystemFont, sans-serif",chart:{tooltip:{textColor:"#5d5d5d",backgroundColor:"rgba(255, 255, 255, 0.95)",borderColor:"#f0e6e0",borderRadius:8}}},sunset:{theme:"sunset",name:"Sunset",description:"温暖日落渐变,夕阳余晖",type:"light",mode:"light",darkMode:!1,tags:["sunset","warm","gradient","light"],colors:["#ff6b6b","#feca57","#ff9ff3","#54a0ff","#5f27cd","#ff9f43","#ee5a24","#009432","#f368e0"],backgroundColor:"#fff5f0",backgroundGradient:{start:"#ffecd2",end:"#fcb69f",angle:135},textColor:"#4a4a4a",textColorSecondary:"#7a7a7a",borderColor:"#ffd5c8",dividerColor:"#ffebe6",fontFamily:"Quicksand, -apple-system, BlinkMacSystemFont, sans-serif",effects:{gradients:!0,shadows:!0,shadowColor:"rgba(255, 107, 107, 0.2)",borderRadius:"medium"}},ocean:{theme:"ocean",name:"Ocean",description:"深邃海洋蓝,宁静清新",type:"light",mode:"light",darkMode:!1,tags:["ocean","blue","calm","light"],colors:["#0077b6","#00b4d8","#90e0ef","#caf0f8","#03045e","#023e8a","#0096c7","#48cae4","#ade8f4"],backgroundColor:"#f0f8ff",backgroundGradient:{start:"#e0f2fe",end:"#bae6fd",angle:180},textColor:"#1e3a5f",textColorSecondary:"#4a6fa5",borderColor:"#cce7f5",dividerColor:"#e1f0f9",fontFamily:"Nunito, -apple-system, BlinkMacSystemFont, sans-serif",effects:{gradients:!0,shadows:!0,shadowColor:"rgba(0, 119, 182, 0.15)"}},cyber:{theme:"cyber",name:"Cyber",description:"未来科技感,赛博朋克",type:"dark",mode:"dark",darkMode:!0,tags:["cyber","tech","futuristic","dark"],colors:["#00f5ff","#ff00ff","#00ff00","#ffff00","#ff0080","#8000ff","#00ff80","#ff8000","#0080ff"],backgroundColor:"#0a0a12",textColor:"#e0e0e0",textColorSecondary:"#808090",borderColor:"#1a1a2e",dividerColor:"#12121e",fontFamily:'"Orbitron", "Rajdhani", "JetBrains Mono", monospace',effects:{shadows:!0,shadowColor:"rgba(0, 245, 255, 0.4)",gradients:!0,borderRadius:"none"},chart:{tooltip:{textColor:"#ffffff",backgroundColor:"rgba(10, 10, 18, 0.95)",borderColor:"#00f5ff",borderRadius:0,shadowColor:"rgba(0, 245, 255, 0.4)"}}},retro:{theme:"retro",name:"Retro",description:"怀旧复古风格,温馨怀旧",type:"light",mode:"light",darkMode:!1,tags:["retro","vintage","nostalgic","light"],colors:["#d63031","#e17055","#fdcb6e","#00b894","#0984e3","#6c5ce7","#e84393","#00cec9","#fab1a0"],backgroundColor:"#fdf6e3",textColor:"#5c4b37",textColorSecondary:"#8b7355",borderColor:"#e8dcc8",dividerColor:"#f0e8d8",fontFamily:'"Courier Prime", "Courier New", monospace',effects:{shadows:!1,borderRadius:"small"}},elegant:{theme:"elegant",name:"Elegant",description:"低调雅致风格,精致品味",type:"light",mode:"light",darkMode:!1,tags:["elegant","minimal","sophisticated","light"],colors:["#2c3e50","#34495e","#7f8c8d","#95a5a6","#bdc3c7","#ecf0f1","#1abc9c","#16a085","#3498db"],backgroundColor:"#fafafa",textColor:"#2c3e50",textColorSecondary:"#7f8c8d",borderColor:"#e8e8e8",dividerColor:"#f0f0f0",fontFamily:'"Playfair Display", Georgia, serif',effects:{shadows:!0,shadowColor:"rgba(0, 0, 0, 0.08)",borderRadius:"medium"}}};Object.entries(oe).forEach(function(e){var t=e[0],r=e[1];J.set(t,r)});var ae=function(){return ae=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ae.apply(this,arguments)},ie={default:{name:"default",type:"light",isDark:!1,variables:{"--tv-bg-color":"#ffffff","--tv-bg-color-secondary":"#fafafa","--tv-text-color":"#333333","--tv-text-color-secondary":"#666666","--tv-primary-color":"#1890ff","--tv-primary-color-hover":"#40a9ff","--tv-primary-color-active":"#096dd9","--tv-success-color":"#52c41a","--tv-warning-color":"#faad14","--tv-error-color":"#ff4d4f","--tv-border-color":"#d9d9d9","--tv-divider-color":"#f0f0f0","--tv-shadow-color":"rgba(0, 0, 0, 0.1)","--tv-chart-color-1":"#5470c6","--tv-chart-color-2":"#91cc75","--tv-chart-color-3":"#fac858","--tv-chart-color-4":"#ee6666","--tv-chart-color-5":"#73c0de","--tv-chart-color-6":"#3ba272","--tv-chart-color-7":"#fc8452","--tv-chart-color-8":"#9a60b4","--tv-font-family":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',"--tv-font-size":"14px","--tv-font-size-small":"12px","--tv-font-size-large":"16px","--tv-border-radius":"4px","--tv-border-radius-small":"2px","--tv-transition-duration":"0.3s"}},dark:{name:"dark",type:"dark",isDark:!0,variables:{"--tv-bg-color":"#1a1a2e","--tv-bg-color-secondary":"#16213e","--tv-text-color":"#e0e0e0","--tv-text-color-secondary":"#a0a0a0","--tv-primary-color":"#1890ff","--tv-primary-color-hover":"#40a9ff","--tv-primary-color-active":"#096dd9","--tv-success-color":"#52c41a","--tv-warning-color":"#faad14","--tv-error-color":"#ff4d4f","--tv-border-color":"#404040","--tv-divider-color":"#303030","--tv-shadow-color":"rgba(0, 0, 0, 0.3)","--tv-chart-color-1":"#5470c6","--tv-chart-color-2":"#91cc75","--tv-chart-color-3":"#fac858","--tv-chart-color-4":"#ee6666","--tv-chart-color-5":"#73c0de","--tv-chart-color-6":"#3ba272","--tv-chart-color-7":"#fc8452","--tv-chart-color-8":"#9a60b4","--tv-font-family":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',"--tv-font-size":"14px","--tv-font-size-small":"12px","--tv-font-size-large":"16px","--tv-border-radius":"4px","--tv-border-radius-small":"2px","--tv-transition-duration":"0.3s"}},vintage:{name:"vintage",type:"custom",isDark:!1,variables:{"--tv-bg-color":"#fef9ef","--tv-bg-color-secondary":"#fcf5e9","--tv-text-color":"#5c4d3d","--tv-text-color-secondary":"#8b7355","--tv-primary-color":"#d4a574","--tv-primary-color-hover":"#c49566","--tv-primary-color-active":"#b8895a","--tv-success-color":"#8db78e","--tv-warning-color":"#e6c87a","--tv-error-color":"#c97c6d","--tv-border-color":"#e0d5c7","--tv-divider-color":"#f0e8de","--tv-shadow-color":"rgba(92, 77, 61, 0.1)","--tv-chart-color-1":"#d4a574","--tv-chart-color-2":"#8db78e","--tv-chart-color-3":"#e6c87a","--tv-chart-color-4":"#c97c6d","--tv-chart-color-5":"#9ab5a8","--tv-chart-color-6":"#c9b8d4","--tv-chart-color-7":"#a8c4d4","--tv-chart-color-8":"#d4c49a","--tv-font-family":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',"--tv-font-size":"14px","--tv-font-size-small":"12px","--tv-font-size-large":"16px","--tv-border-radius":"4px","--tv-border-radius-small":"2px","--tv-transition-duration":"0.3s"}},macarons:{name:"macarons",type:"custom",isDark:!1,variables:{"--tv-bg-color":"#fefcf9","--tv-bg-color-secondary":"#f9f6f2","--tv-text-color":"#505050","--tv-text-color-secondary":"#757575","--tv-primary-color":"#60acf2","--tv-primary-color-hover":"#4d9de0","--tv-primary-color-active":"#3d8bd0","--tv-success-color":"#62d17a","--tv-warning-color":"#f7c752","--tv-error-color":"#f4645a","--tv-border-color":"#e8e4e0","--tv-divider-color":"#f0ece8","--tv-shadow-color":"rgba(80, 80, 80, 0.08)","--tv-chart-color-1":"#60acf2","--tv-chart-color-2":"#62d17a","--tv-chart-color-3":"#f7c752","--tv-chart-color-4":"#f4645a","--tv-chart-color-5":"#95d9f2","--tv-chart-color-6":"#a8e6cf","--tv-chart-color-7":"#ffd3b6","--tv-chart-color-8":"#ffaaa5","--tv-font-family":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',"--tv-font-size":"14px","--tv-font-size-small":"12px","--tv-font-size-large":"16px","--tv-border-radius":"12px","--tv-border-radius-small":"8px","--tv-transition-duration":"0.3s"}},infographic:{name:"infographic",type:"custom",isDark:!1,variables:{"--tv-bg-color":"#ffffff","--tv-bg-color-secondary":"#f5f7fa","--tv-text-color":"#1a1a1a","--tv-text-color-secondary":"#666666","--tv-primary-color":"#277ace","--tv-primary-color-hover":"#3a8ee6","--tv-primary-color-active":"#146bb3","--tv-success-color":"#2fc25b","--tv-warning-color":"#fbd438","--tv-error-color":"#e8352e","--tv-border-color":"#e0e6ed","--tv-divider-color":"#f0f2f5","--tv-shadow-color":"rgba(26, 26, 26, 0.06)","--tv-chart-color-1":"#277ace","--tv-chart-color-2":"#31cce8","--tv-chart-color-3":"#23d3a2","--tv-chart-color-4":"#fbd438","--tv-chart-color-5":"#f87f50","--tv-chart-color-6":"#e8352e","--tv-chart-color-7":"#b02ad3","--tv-chart-color-8":"#6475d4","--tv-font-family":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',"--tv-font-size":"14px","--tv-font-size-small":"12px","--tv-font-size-large":"16px","--tv-border-radius":"2px","--tv-border-radius-small":"1px","--tv-transition-duration":"0.2s"}},helianthus:{name:"helianthus",type:"custom",isDark:!1,variables:{"--tv-bg-color":"#fffbf5","--tv-bg-color-secondary":"#fef7f0","--tv-text-color":"#5c4d3d","--tv-text-color-secondary":"#8b7355","--tv-primary-color":"#f5c242","--tv-primary-color-hover":"#e6b53e","--tv-primary-color-active":"#d4a435","--tv-success-color":"#7ec890","--tv-warning-color":"#f5a623","--tv-error-color":"#e74c3c","--tv-border-color":"#e8dccf","--tv-divider-color":"#f0e8de","--tv-shadow-color":"rgba(92, 77, 61, 0.08)","--tv-chart-color-1":"#f5c242","--tv-chart-color-2":"#7ec890","--tv-chart-color-3":"#5eb8d9","--tv-chart-color-4":"#e74c3c","--tv-chart-color-5":"#9b7ed4","--tv-chart-color-6":"#f5a623","--tv-chart-color-7":"#6dd3ce","--tv-chart-color-8":"#d4778b","--tv-font-family":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',"--tv-font-size":"14px","--tv-font-size-small":"12px","--tv-font-size-large":"16px","--tv-border-radius":"6px","--tv-border-radius-small":"4px","--tv-transition-duration":"0.3s"}},blue:{name:"blue",type:"custom",isDark:!1,variables:{"--tv-bg-color":"#f0f7ff","--tv-bg-color-secondary":"#e6f0ff","--tv-text-color":"#1a3a5c","--tv-text-color-secondary":"#4a6a8c","--tv-primary-color":"#1890ff","--tv-primary-color-hover":"#40a9ff","--tv-primary-color-active":"#096dd9","--tv-success-color":"#52c41a","--tv-warning-color":"#faad14","--tv-error-color":"#ff4d4f","--tv-border-color":"#bfd9f2","--tv-divider-color":"#d9e8fc","--tv-shadow-color":"rgba(24, 144, 255, 0.15)","--tv-chart-color-1":"#1890ff","--tv-chart-color-2":"#91cc75","--tv-chart-color-3":"#fac858","--tv-chart-color-4":"#ee6666","--tv-chart-color-5":"#73c0de","--tv-chart-color-6":"#3ba272","--tv-chart-color-7":"#fc8452","--tv-chart-color-8":"#9a60b4","--tv-font-family":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',"--tv-font-size":"14px","--tv-font-size-small":"12px","--tv-font-size-large":"16px","--tv-border-radius":"4px","--tv-border-radius-small":"2px","--tv-transition-duration":"0.3s"}},red:{name:"red",type:"custom",isDark:!1,variables:{"--tv-bg-color":"#fff5f5","--tv-bg-color-secondary":"#ffe6e6","--tv-text-color":"#5c1a1a","--tv-text-color-secondary":"#8c4a4a","--tv-primary-color":"#ff4d4f","--tv-primary-color-hover":"#ff7875","--tv-primary-color-active":"#d9363e","--tv-success-color":"#52c41a","--tv-warning-color":"#faad14","--tv-error-color":"#ff4d4f","--tv-border-color":"#f2bfbf","--tv-divider-color":"#fcd9d9","--tv-shadow-color":"rgba(255, 77, 79, 0.15)","--tv-chart-color-1":"#ff4d4f","--tv-chart-color-2":"#ffd700","--tv-chart-color-3":"#ff7c4d","--tv-chart-color-4":"#9c4dff","--tv-chart-color-5":"#00d0ff","--tv-chart-color-6":"#52c41a","--tv-chart-color-7":"#faad14","--tv-chart-color-8":"#8b5cf6","--tv-font-family":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',"--tv-font-size":"14px","--tv-font-size-small":"12px","--tv-font-size-large":"16px","--tv-border-radius":"4px","--tv-border-radius-small":"2px","--tv-transition-duration":"0.3s"}},green:{name:"green",type:"custom",isDark:!1,variables:{"--tv-bg-color":"#f5fff5","--tv-bg-color-secondary":"#e6ffe6","--tv-text-color":"#1a3d1a","--tv-text-color-secondary":"#4a6c4a","--tv-primary-color":"#52c41a","--tv-primary-color-hover":"#73d13d","--tv-primary-color-active":"#389e0d","--tv-success-color":"#52c41a","--tv-warning-color":"#faad14","--tv-error-color":"#ff4d4f","--tv-border-color":"#bff2bf","--tv-divider-color":"#d9fcd9","--tv-shadow-color":"rgba(82, 196, 26, 0.15)","--tv-chart-color-1":"#52c41a","--tv-chart-color-2":"#1890ff","--tv-chart-color-3":"#faad14","--tv-chart-color-4":"#ff4d4f","--tv-chart-color-5":"#722ed1","--tv-chart-color-6":"#13c2c2","--tv-chart-color-7":"#fa8c16","--tv-chart-color-8":"#eb2f96","--tv-font-family":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',"--tv-font-size":"14px","--tv-font-size-small":"12px","--tv-font-size-large":"16px","--tv-border-radius":"4px","--tv-border-radius-small":"2px","--tv-transition-duration":"0.3s"}},purple:{name:"purple",type:"custom",isDark:!1,variables:{"--tv-bg-color":"#faf5ff","--tv-bg-color-secondary":"#f0e6ff","--tv-text-color":"#3d1a5c","--tv-text-color-secondary":"#6a4a8c","--tv-primary-color":"#722ed1","--tv-primary-color-hover":"#9254de","--tv-primary-color-active":"#531dab","--tv-success-color":"#52c41a","--tv-warning-color":"#faad14","--tv-error-color":"#ff4d4f","--tv-border-color":"#d9bff2","--tv-divider-color":"#ecd9fc","--tv-shadow-color":"rgba(114, 46, 209, 0.15)","--tv-chart-color-1":"#722ed1","--tv-chart-color-2":"#eb2f96","--tv-chart-color-3":"#1890ff","--tv-chart-color-4":"#52c41a","--tv-chart-color-5":"#faad14","--tv-chart-color-6":"#ff4d4f","--tv-chart-color-7":"#13c2c2","--tv-chart-color-8":"#fa8c16","--tv-font-family":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',"--tv-font-size":"14px","--tv-font-size-small":"12px","--tv-font-size-large":"16px","--tv-border-radius":"4px","--tv-border-radius-small":"2px","--tv-transition-duration":"0.3s"}}},le=function(){function e(){this.currentTheme=ie.default,this.listeners=new Set,this.cssVarPrefix="--tv-"}return e.getInstance=function(){return e.instance||(e.instance=new e),e.instance},e.prototype.getCurrentTheme=function(){return this.currentTheme},e.prototype.getPresetTheme=function(e){return ie[e]},e.prototype.getPresetThemeNames=function(){return Object.keys(ie)},e.prototype.setTheme=function(e){var t="string"==typeof e?ie[e]:e;t&&(this.currentTheme=t,this.applyThemeVariables(t),this.notifyListeners())},e.prototype.applyThemeVariables=function(e){if("undefined"!=typeof document){var t=document.documentElement,r=e.variables;Object.entries(r).forEach(function(e){var r=e[0],n=e[1];t.style.setProperty(r,n)}),t.setAttribute("data-theme",e.name),t.setAttribute("data-theme-type",e.type),e.isDark?t.setAttribute("data-theme-dark","true"):t.removeAttribute("data-theme-dark")}},e.prototype.getEChartsTheme=function(){var e=this.currentTheme;return{color:[e.variables["--tv-chart-color-1"],e.variables["--tv-chart-color-2"],e.variables["--tv-chart-color-3"],e.variables["--tv-chart-color-4"],e.variables["--tv-chart-color-5"],e.variables["--tv-chart-color-6"],e.variables["--tv-chart-color-7"],e.variables["--tv-chart-color-8"]],backgroundColor:e.variables["--tv-bg-color"],textStyle:{color:e.variables["--tv-text-color"],fontFamily:e.variables["--tv-font-family"]}}},e.prototype.toggleDarkMode=function(){"dark"===this.currentTheme.type?this.setTheme("default"):this.setTheme("dark")},e.prototype.isDarkMode=function(){return this.currentTheme.isDark||"dark"===this.currentTheme.type},e.prototype.getSystemPrefersDark=function(){return"undefined"!=typeof window&&window.matchMedia("(prefers-color-scheme: dark)").matches},e.prototype.watchSystemTheme=function(){var e=this;if("undefined"==typeof window)return function(){};var t=window.matchMedia("(prefers-color-scheme: dark)"),r=function(t){e.setTheme(t.matches?"dark":"default")};return t.addEventListener("change",r),function(){return t.removeEventListener("change",r)}},e.prototype.applyInitialTheme=function(){var e=this.getSystemPrefersDark();this.setTheme(e?"dark":"default")},e.prototype.onThemeChange=function(e){var t=this;return this.listeners.add(e),function(){return t.listeners.delete(e)}},e.prototype.notifyListeners=function(){var e=this;this.listeners.forEach(function(t){try{t(e.currentTheme)}catch(e){}})},e.prototype.createCustomTheme=function(e,t){return void 0===t&&(t="custom"),{name:t,type:"custom",isDark:!1,variables:ae(ae({},ie.default.variables),e)}},e.prototype.exportThemeAsCSS=function(e){var t=e||this.currentTheme,r=t.variables;return':root[data-theme="'.concat(t.name,'"] {\n').concat(Object.entries(r).map(function(e){var t=e[0],r=e[1];return" ".concat(t,": ").concat(r,";")}).join("\n"),"\n}")},e.prototype.exportThemeAsJSON=function(e){var t=e||this.currentTheme;return JSON.stringify(t,null,2)},e.instance=null,e}().getInstance(),ce=function(){return ce=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ce.apply(this,arguments)},se=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},ue={colors:["#1890ff"],backgroundColor:"#ffffff",textColor:"#333333",darkMode:!1};function de(e){var t;void 0===e&&(e={});var r=e.selectedTheme,n=e.enableLivePreview,a=void 0===n||n,i=e.onThemeChange,l=X(),c=(0,o.useCallback)(function(){if(r){var e=l.find(function(e){return e.name===r});if(e)return e}return l[0]||ue},[r,l]),s=(0,o.useState)(c),u=s[0],d=s[1],f=(0,o.useState)(""),p=f[0],v=f[1],h=(0,o.useState)(!1),m=h[0],g=h[1],y=u.colors||ue.colors,b=u.backgroundColor||ue.backgroundColor,x=u.textColor||ue.textColor,C=null!==(t=u.darkMode)&&void 0!==t?t:ue.darkMode;(0,o.useEffect)(function(){if(r){var e=l.find(function(e){return e.name===r});e&&d(e)}},[r,l]);var E=(0,o.useCallback)(function(e){d(e),a&&ee(e),null==i||i(e)},[a,i]),w=(0,o.useCallback)(function(e){var t=ce(ce({},u),e);d(t),a&&ee(t),null==i||i(t)},[u,a,i]),k=(0,o.useCallback)(function(e,t){var r=se([],y,!0);r[e]=t,w({colors:r})},[y,w]),S=(0,o.useCallback)(function(){w({colors:se(se([],y,!0),["#000000"],!1)})},[y,w]),T=(0,o.useCallback)(function(e){if(!(y.length<=1)){var t=y.filter(function(t,r){return r!==e});w({colors:t})}},[y,w]),I=(0,o.useCallback)(function(){g(!0),v("")},[]),O=(0,o.useCallback)(function(){g(!1),v("")},[]),A=(0,o.useCallback)(function(){var e=m&&p?p:u.name||"custom",t=ce(ce({},u),{name:e,colors:y,backgroundColor:b,textColor:x,darkMode:C});return Q(e,t),g(!1),v(""),t},[m,p,u,y,b,x,C]);return{currentTheme:u,registeredThemes:l,colors:y,backgroundColor:b,textColor:x,darkMode:C,isEditing:m,newThemeName:p,setCurrentTheme:E,updateTheme:w,handleColorChange:k,handleAddColor:S,handleRemoveColor:T,handleStartEdit:I,setNewThemeName:v,saveTheme:A,cancelEdit:O}}const fe=function(e){var t=e.themes,r=e.currentTheme,n=e.disabled,o=void 0!==n&&n,i=e.onSelect,l=e.onCreateNew;return a().createElement("div",{style:{marginBottom:"20px"}},a().createElement("h4",null,"选择主题"),a().createElement("div",{style:{display:"flex",flexWrap:"wrap",gap:"10px",marginTop:"10px"}},t.map(function(e){return a().createElement("button",{key:e.name,onClick:function(){return i(e)},disabled:o,style:{padding:"8px 16px",border:"2px solid ".concat(r.name===e.name?"#1890ff":"#e0e0e0"),borderRadius:"4px",backgroundColor:r.name===e.name?"#1890ff":"#ffffff",color:r.name===e.name?"#ffffff":"#333333",cursor:o?"not-allowed":"pointer",opacity:o?.6:1}},e.name)}),a().createElement("button",{onClick:l,disabled:o,style:{padding:"8px 16px",border:"2px dashed #e0e0e0",borderRadius:"4px",backgroundColor:"#f5f5f5",color:"#333333",cursor:o?"not-allowed":"pointer",opacity:o?.6:1}},"+ 新主题")))},pe=function(e){var t=e.colors,r=e.disabled,n=void 0!==r&&r,o=e.onColorChange,i=e.onAddColor,l=e.onRemoveColor;return a().createElement("div",{style:{marginBottom:"20px"}},a().createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"10px"}},a().createElement("h4",null,"主题颜色"),a().createElement("button",{onClick:i,disabled:n,style:{padding:"4px 8px",border:"1px solid #e0e0e0",borderRadius:"4px",backgroundColor:"#ffffff",color:"#333333",cursor:n?"not-allowed":"pointer",opacity:n?.6:1}},"+ 添加颜色")),a().createElement("div",{style:{display:"flex",flexWrap:"wrap",gap:"10px"}},t.map(function(e,r){return a().createElement("div",{key:r,style:{display:"flex",alignItems:"center",gap:"5px"}},a().createElement("input",{type:"color",value:e,onChange:function(e){return o(r,e.target.value)},disabled:n,style:{width:"50px",height:"30px",border:"none",cursor:n?"not-allowed":"pointer",opacity:n?.6:1}}),a().createElement("input",{type:"text",value:e,onChange:function(e){return o(r,e.target.value)},disabled:n,style:{width:"80px",padding:"4px",border:"1px solid #e0e0e0",borderRadius:"4px",opacity:n?.6:1}}),a().createElement("button",{onClick:function(){return l(r)},disabled:n||t.length<=1,style:{padding:"4px 8px",border:"1px solid #ff4d4f",borderRadius:"4px",backgroundColor:"#ffffff",color:"#ff4d4f",cursor:n||t.length<=1?"not-allowed":"pointer",opacity:n||t.length<=1?.6:1}},"删除"))})))},ve=function(e){var t=e.backgroundColor,r=e.textColor,n=e.darkMode,o=e.disabled,i=void 0!==o&&o,l=e.onBackgroundColorChange,c=e.onTextColorChange,s=e.onDarkModeChange,u={width:"50px",height:"30px",border:"none",cursor:i?"not-allowed":"pointer",opacity:i?.6:1},d={width:"120px",padding:"4px",border:"1px solid #e0e0e0",borderRadius:"4px",opacity:i?.6:1};return a().createElement("div",{style:{marginBottom:"20px"}},a().createElement("h4",null,"基础配置"),a().createElement("div",{style:{marginBottom:"10px"}},a().createElement("label",{style:{display:"block",marginBottom:"5px"}},"背景色:"),a().createElement("div",{style:{display:"flex",alignItems:"center",gap:"10px"}},a().createElement("input",{type:"color",value:t,onChange:function(e){return l(e.target.value)},disabled:i,style:u}),a().createElement("input",{type:"text",value:t,onChange:function(e){return l(e.target.value)},disabled:i,style:d}))),a().createElement("div",{style:{marginBottom:"10px"}},a().createElement("label",{style:{display:"block",marginBottom:"5px"}},"文本颜色:"),a().createElement("div",{style:{display:"flex",alignItems:"center",gap:"10px"}},a().createElement("input",{type:"color",value:r,onChange:function(e){return c(e.target.value)},disabled:i,style:u}),a().createElement("input",{type:"text",value:r,onChange:function(e){return c(e.target.value)},disabled:i,style:d}))),a().createElement("div",{style:{display:"flex",alignItems:"center",gap:"10px"}},a().createElement("label",null,"深色模式:"),a().createElement("input",{type:"checkbox",checked:n,onChange:function(e){return s(e.target.checked)},disabled:i,style:{cursor:i?"not-allowed":"pointer",opacity:i?.6:1}})))};var he=function(){return he=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},he.apply(this,arguments)};const me=function(e){var t=e.selectedTheme,r=e.onThemeChange,n=e.onThemeSave,o=e.disabled,i=void 0!==o&&o,l=e.style,c=void 0===l?{}:l,s=e.className,u=void 0===s?"":s,d=de({selectedTheme:t,onThemeChange:r}),f=d.currentTheme,p=d.registeredThemes,v=d.colors,h=d.backgroundColor,m=d.textColor,g=d.darkMode,y=d.isEditing,b=d.newThemeName,x=d.setCurrentTheme,C=d.updateTheme,E=d.handleColorChange,w=d.handleAddColor,k=d.handleRemoveColor,S=d.handleStartEdit,T=d.setNewThemeName,I=d.saveTheme;return a().createElement("div",{className:"taroviz-theme-editor ".concat(u),style:he({padding:"20px",border:"1px solid #e0e0e0",borderRadius:"8px",backgroundColor:"#ffffff",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)"},c)},a().createElement("h3",null,"主题编辑器"),a().createElement(fe,{themes:p,currentTheme:f,disabled:i,onSelect:x,onCreateNew:S}),y&&a().createElement("div",{style:{marginBottom:"20px",padding:"15px",backgroundColor:"#f9f9f9",borderRadius:"4px"}},a().createElement("h4",null,"新建主题"),a().createElement("div",{style:{marginBottom:"10px"}},a().createElement("label",{style:{display:"block",marginBottom:"5px"}},"主题名称:"),a().createElement("input",{type:"text",value:b,onChange:function(e){return T(e.target.value)},disabled:i,style:{padding:"8px",border:"1px solid #e0e0e0",borderRadius:"4px",width:"100%",opacity:i?.6:1},placeholder:"输入主题名称"}))),a().createElement(pe,{colors:v,disabled:i,onColorChange:E,onAddColor:w,onRemoveColor:k}),a().createElement(ve,{backgroundColor:h,textColor:m,darkMode:g,disabled:i,onBackgroundColorChange:function(e){return C({backgroundColor:e})},onTextColorChange:function(e){return C({textColor:e})},onDarkModeChange:function(e){return C({darkMode:e})}}),a().createElement("button",{onClick:function(){var e=I();null==n||n(e)},disabled:i,style:{padding:"10px 20px",border:"none",borderRadius:"4px",backgroundColor:"#1890ff",color:"#ffffff",cursor:i?"not-allowed":"pointer",opacity:i?.6:1}},"保存主题"))};var ge=function(){return ge=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ge.apply(this,arguments)};const ye=function(e){var t=e.selectedTheme,r=e.onThemeChange,n=e.onThemeSave,i=e.onThemeImport,l=e.onThemeExport,c=e.disabled,s=void 0!==c&&c,u=e.style,d=void 0===u?{}:u,f=e.className,p=void 0===f?"":f,v=e.showPreview,h=void 0===v||v,m=(e.autoSave,e.autoSaveDelay,de({selectedTheme:t,onThemeChange:r})),g=m.currentTheme,y=m.registeredThemes,b=m.colors,x=m.backgroundColor,C=m.textColor,E=m.darkMode,w=m.isEditing,k=m.newThemeName,S=m.setCurrentTheme,T=m.updateTheme,I=m.handleColorChange,O=m.handleAddColor,A=m.handleRemoveColor,D=m.handleStartEdit,R=m.setNewThemeName,P=m.saveTheme,M=m.cancelEdit,L=(0,o.useState)("colors"),N=L[0],j=L[1],z=(0,o.useState)(""),F=z[0],H=z[1],B=(0,o.useState)(""),U=B[0],_=B[1],G=(0,o.useState)(""),W=G[0],Z=G[1],V=(0,o.useCallback)(function(){var e=P();null==n||n(e)},[P,n]),J=(0,o.useCallback)(function(){try{if(l){var e=l(g);H(e)}else H(JSON.stringify(g,null,2))}catch(e){H("")}},[g,l]),Y=(0,o.useCallback)(function(){return e=void 0,t=void 0,n=function(){return function(e,t){var r,n,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=l(0),i.throw=l(1),i.return=l(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(c){return function(l){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&l[0]?n.return:l[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,l[1])).done)return o;switch(n=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,n=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){a.label=l[1];break}if(6===l[0]&&a.label<o[1]){a.label=o[1],o=l;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(l);break}o[2]&&a.ops.pop(),a.trys.pop();continue}l=t.call(e,a)}catch(e){l=[6,e],n=0}finally{r=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}}(this,function(e){switch(e.label){case 0:if(!F)return[2];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,navigator.clipboard.writeText(F)];case 2:case 3:return e.sent(),[3,4];case 4:return[2]}})},new((r=void 0)||(r=Promise))(function(o,a){function i(e){try{c(n.next(e))}catch(e){a(e)}}function l(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(i,l)}c((n=n.apply(e,t||[])).next())});var e,t,r,n},[F]),q=(0,o.useCallback)(function(){if(Z(""),U.trim())try{var e=JSON.parse(U);if(!e.name||!Array.isArray(e.colors))return void Z("无效的主题格式");T(e),null==i||i(e),_("")}catch(e){Z("JSON 解析失败")}else Z("请输入主题数据")},[U,T,i]);return a().createElement("div",{className:"taroviz-theme-editor-enhanced ".concat(p),style:ge({padding:"20px",border:"1px solid #e0e0e0",borderRadius:"8px",backgroundColor:"#ffffff",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)"},d)},a().createElement("h3",null,"增强型主题编辑器"),a().createElement(fe,{themes:y,currentTheme:g,disabled:s,onSelect:S,onCreateNew:D}),w&&a().createElement("div",{style:{marginBottom:"20px",padding:"15px",backgroundColor:"#f9f9f9",borderRadius:"4px"}},a().createElement("h4",null,"新建主题"),a().createElement("div",{style:{marginBottom:"10px"}},a().createElement("label",{style:{display:"block",marginBottom:"5px"}},"主题名称:"),a().createElement("input",{type:"text",value:k,onChange:function(e){return R(e.target.value)},disabled:s,style:{padding:"8px",border:"1px solid #e0e0e0",borderRadius:"4px",width:"100%",opacity:s?.6:1},placeholder:"输入主题名称"})),a().createElement("button",{onClick:M,disabled:s,style:{padding:"6px 12px",border:"1px solid #e0e0e0",borderRadius:"4px",backgroundColor:"#ffffff",color:"#333333",cursor:s?"not-allowed":"pointer",opacity:s?.6:1}},"取消")),a().createElement("div",{style:{marginBottom:"20px",display:"flex",gap:"10px"}},a().createElement("button",{onClick:J,disabled:s,style:{padding:"8px 16px",border:"1px solid #e0e0e0",borderRadius:"4px",backgroundColor:"#ffffff",color:"#333333",cursor:s?"not-allowed":"pointer",opacity:s?.6:1}},"导出主题"),a().createElement("button",{onClick:Y,disabled:s||!F,style:{padding:"8px 16px",border:"1px solid #e0e0e0",borderRadius:"4px",backgroundColor:"#ffffff",color:"#333333",cursor:s||!F?"not-allowed":"pointer",opacity:s||!F?.6:1}},"复制到剪贴板")),F&&a().createElement("div",{style:{marginBottom:"20px"}},a().createElement("textarea",{value:F,readOnly:!0,style:{width:"100%",height:"100px",padding:"10px",border:"1px solid #e0e0e0",borderRadius:"4px",resize:"vertical"}})),a().createElement("div",{style:{marginBottom:"20px"}},a().createElement("h4",null,"导入主题"),a().createElement("textarea",{value:U,onChange:function(e){return _(e.target.value)},disabled:s,placeholder:"粘贴主题 JSON 数据...",style:{width:"100%",height:"80px",padding:"10px",border:"1px solid ".concat(W?"#ff4d4f":"#e0e0e0"),borderRadius:"4px",resize:"vertical",opacity:s?.6:1}}),W&&a().createElement("p",{style:{color:"#ff4d4f",marginTop:"5px",fontSize:"12px"}},W),a().createElement("button",{onClick:q,disabled:s,style:{marginTop:"10px",padding:"8px 16px",border:"1px solid #e0e0e0",borderRadius:"4px",backgroundColor:"#ffffff",color:"#333333",cursor:s?"not-allowed":"pointer",opacity:s?.6:1}},"导入")),a().createElement("div",{style:{display:"flex",borderBottom:"1px solid #e0e0e0",marginBottom:"20px"}},function(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}([{key:"colors",label:"颜色"},{key:"layout",label:"布局"},{key:"typography",label:"字体"}],h?[{key:"preview",label:"预览"}]:[],!0).map(function(e){return a().createElement("button",{key:e.key,onClick:function(){return j(e.key)},style:{padding:"10px 20px",border:"none",borderBottom:"2px solid ".concat(N===e.key?"#1890ff":"transparent"),backgroundColor:"transparent",color:N===e.key?"#1890ff":"#333333",cursor:"pointer"}},e.label)})),a().createElement("div",{style:{marginBottom:"20px"}},function(){switch(N){case"colors":return a().createElement(a().Fragment,null,a().createElement(pe,{colors:b,disabled:s,onColorChange:I,onAddColor:O,onRemoveColor:A}),a().createElement(ve,{backgroundColor:x,textColor:C,darkMode:E,disabled:s,onBackgroundColorChange:function(e){return T({backgroundColor:e})},onTextColorChange:function(e){return T({textColor:e})},onDarkModeChange:function(e){return T({darkMode:e})}}));case"layout":return a().createElement("div",{style:{padding:"20px",textAlign:"center",color:"#999"}},"布局配置功能即将上线");case"typography":return a().createElement("div",{style:{padding:"20px",textAlign:"center",color:"#999"}},"字体配置功能即将上线");case"preview":return a().createElement("div",{style:{padding:"20px",backgroundColor:x,color:C,borderRadius:"4px",minHeight:"200px"}},a().createElement("h4",{style:{color:C}},"主题预览"),a().createElement("div",{style:{display:"flex",gap:"10px",marginTop:"10px"}},b.map(function(e,t){return a().createElement("div",{key:t,style:{width:"40px",height:"40px",backgroundColor:e,borderRadius:"4px"}})})),a().createElement("p",{style:{marginTop:"10px",color:C}},"背景色: ",x," | 文本色: ",C," | 深色模式:"," ",E?"开启":"关闭"));default:return null}}()),a().createElement("button",{onClick:V,disabled:s,style:{padding:"10px 20px",border:"none",borderRadius:"4px",backgroundColor:"#1890ff",color:"#ffffff",cursor:s?"not-allowed":"pointer",opacity:s?.6:1}},"保存主题"))};var be,xe=(be=function(e,t){return be=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},be(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}be(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Ce=function(){return Ce=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ce.apply(this,arguments)},Ee=function(e){function t(t){var r=e.call(this,t)||this;return r.handleReset=function(){r.setState({hasError:!1,error:null})},r.state={hasError:!1,error:null},r}return xe(t,e),t.getDerivedStateFromError=function(e){return{hasError:!0,error:e}},t.prototype.componentDidCatch=function(e,t){var r,n;null===(n=(r=this.props).onError)||void 0===n||n.call(r,e,t)},t.prototype.render=function(){var e=this.state,t=e.hasError,r=e.error,n=this.props,o=n.children,i=n.fallback,l=n.showDetails,c=void 0!==l&&l;return t&&r?i?i(r,this.handleReset):a().createElement("div",{role:"alert","aria-live":"assertive",style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"var(--tv-border-radius, 16px)",backgroundColor:"var(--tv-bg-color, #fff)",border:"1px solid var(--tv-error-color, #ff4d4f)",borderRadius:"var(--tv-border-radius, 8px)",color:"var(--tv-text-color, #333)",minHeight:"200px",fontFamily:"var(--tv-font-family, sans-serif)"}},a().createElement("div",{style:{fontSize:"48px",marginBottom:"16px"},"aria-hidden":"true"},"⚠️"),a().createElement("h3",{style:{margin:"0 0 12px",color:"var(--tv-error-color, #ff4d4f)",fontWeight:700}},"图表渲染失败"),a().createElement("p",{style:{margin:"0 0 16px",color:"var(--tv-text-color-secondary, #666)",textAlign:"center",maxWidth:"320px"}},"图表在渲染过程中遇到错误,请检查数据配置是否正确"),c&&a().createElement("details",{style:{width:"100%",padding:"12px",backgroundColor:"var(--tv-bg-color-secondary, #f5f5f5)",borderRadius:"var(--tv-border-radius-small, 4px)",fontSize:"var(--tv-font-size-small, 12px)",fontFamily:"var(--tv-font-family, monospace)",overflow:"auto",maxHeight:"150px"}},a().createElement("summary",{style:{cursor:"pointer",marginBottom:"8px",fontWeight:600}},"错误详情"),a().createElement("pre",{style:{margin:0,whiteSpace:"pre-wrap",wordBreak:"break-all"}},r.message,"\n\n",r.stack)),a().createElement("button",{onClick:this.handleReset,style:{marginTop:"16px",padding:"8px 24px",backgroundColor:"var(--tv-primary-color, #1890ff)",color:"#fff",border:"none",borderRadius:"var(--tv-border-radius-small, 4px)",cursor:"pointer",fontSize:"var(--tv-font-size, 14px)",fontWeight:600,transition:"background-color var(--tv-transition-duration, 0.3s)"},onMouseEnter:function(e){e.currentTarget.style.backgroundColor="var(--tv-primary-color-hover, #40a9ff)"},onMouseLeave:function(e){e.currentTarget.style.backgroundColor="var(--tv-primary-color, #1890ff)"}},"重试")):o},t}(o.Component);function we(e,t){var r=function(r){return a().createElement(Ee,Ce({},t),a().createElement(e,Ce({},r)))},n=e.displayName||e.name;return r.displayName=n?"withErrorBoundary(".concat(n,")"):"withErrorBoundary(WrappedChart)",r}var ke=function(){return ke=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ke.apply(this,arguments)},Se={};function Te(e){return Se[e]||(Se[e]=(0,o.lazy)(function(){return Promise.resolve().then(r.bind(r,7377)).then(function(t){return{default:t[e]}})})),Se[e]}Te("LineChart"),Te("BarChart"),Te("PieChart"),Te("ScatterChart"),Te("RadarChart"),Te("HeatmapChart"),Te("GaugeChart"),Te("FunnelChart"),Te("TreeMapChart"),Te("SunburstChart"),Te("SankeyChart");var Ie={line:function(){return Promise.resolve().then(r.bind(r,7377)).then(function(e){return{default:e.LineChart}})},bar:function(){return Promise.resolve().then(r.bind(r,7377)).then(function(e){return{default:e.BarChart}})},pie:function(){return Promise.resolve().then(r.bind(r,7377)).then(function(e){return{default:e.PieChart}})},scatter:function(){return Promise.resolve().then(r.bind(r,7377)).then(function(e){return{default:e.ScatterChart}})},radar:function(){return Promise.resolve().then(r.bind(r,7377)).then(function(e){return{default:e.RadarChart}})},heatmap:function(){return Promise.resolve().then(r.bind(r,7377)).then(function(e){return{default:e.HeatmapChart}})},gauge:function(){return Promise.resolve().then(r.bind(r,7377)).then(function(e){return{default:e.GaugeChart}})},funnel:function(){return Promise.resolve().then(r.bind(r,7377)).then(function(e){return{default:e.FunnelChart}})},treemap:function(){return Promise.resolve().then(r.bind(r,7377)).then(function(e){return{default:e.TreeMapChart}})},sunburst:function(){return Promise.resolve().then(r.bind(r,7377)).then(function(e){return{default:e.SunburstChart}})},sankey:function(){return Promise.resolve().then(r.bind(r,7377)).then(function(e){return{default:e.SankeyChart}})}},Oe=Object.keys(Ie),Ae=function(e){var t=e.text,r=void 0===t?"加载中...":t;return a().createElement("div",{role:"status","aria-label":r,"aria-busy":"true",style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",minHeight:"200px",backgroundColor:"var(--tv-bg-color-secondary, #f5f5f5)",borderRadius:"var(--tv-border-radius, 8px)"}},a().createElement("div",{style:{textAlign:"center"}},a().createElement("div",{style:{width:"40px",height:"40px",border:"3px solid var(--tv-primary-color, #1890ff)",borderTopColor:"transparent",borderRadius:"50%",animation:"taroviz-spin 1s linear infinite",margin:"0 auto 12px"},"aria-hidden":"true"}),a().createElement("style",null,"\n @keyframes taroviz-spin {\n to { transform: rotate(360deg); }\n }\n "),a().createElement("span",{style:{position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0}},r),a().createElement("span",{style:{color:"var(--tv-text-color-secondary, #666)",fontSize:"var(--tv-font-size, 14px)"}},r)))};function De(e,t){var r=function(r){var n=r.loadingText,i=r.fallback,l=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(r,["loadingText","fallback"]),c=t||Ae;return a().createElement(o.Suspense,{fallback:a().createElement(c,{text:n})},i?a().createElement(a().Fragment,null,i,a().createElement(e,ke({},l))):a().createElement(e,ke({},l)))};return r.displayName="withLazyLoad(".concat(e.displayName||e.name||"Chart",")"),r}function Re(e,t){void 0===t&&(t=!0);var r=Ie[e];return r?r().then(function(){}).catch(function(e){}):t?Promise.resolve():Promise.reject(new Error("Unknown chart type: ".concat(e)))}function Pe(){return Promise.all(Oe.map(function(e){return Re(e)}))}function Me(e){var t="".concat(e.charAt(0).toUpperCase()+e.slice(1),"Chart");return Se[t]||null}var Le={get:function(e){return Me(e)},preload:function(e,t){return void 0===t&&(t=!0),Re(e,t)},preloadAll:function(){return Pe()}};function Ne(e){var t=e.data,r=e.lineStyle,n=e.label,o=e.animation,a=e.animationDuration,i=e.precision;return[{type:"line",markLine:{symbol:["circle","arrow"],silent:!0,animation:!1!==o,animationDuration:a||300,precision:void 0===i?2:i,lineStyle:{color:(null==r?void 0:r.color)||"#333",width:(null==r?void 0:r.width)||2,type:(null==r?void 0:r.type)||"dashed",opacity:null==r?void 0:r.opacity},label:{show:!1!==(null==n?void 0:n.show),position:(null==n?void 0:n.position)||"end",formatter:null==n?void 0:n.formatter,color:(null==n?void 0:n.color)||"#333",fontSize:(null==n?void 0:n.fontSize)||12},data:t.map(function(e){return{xAxis:e.xAxis,yAxis:e.yAxis,name:e.name}})}}]}function je(e){var t=e.data,r=e.style,n=e.label;return[{type:"bar",markArea:{silent:!0,animation:!1!==e.animation,animationDuration:e.animationDuration||300,itemStyle:{color:(null==r?void 0:r.color)||"rgba(24, 144, 255, 0.1)",opacity:(null==r?void 0:r.opacity)||.3,borderColor:(null==r?void 0:r.borderColor)||"transparent",borderWidth:(null==r?void 0:r.borderWidth)||0,borderType:null==r?void 0:r.borderType},label:{show:!1!==(null==n?void 0:n.show),position:(null==n?void 0:n.position)||"inside",formatter:null==n?void 0:n.formatter,color:(null==n?void 0:n.color)||"#333",fontSize:(null==n?void 0:n.fontSize)||12},data:t.map(function(e){var t=e[0],r=e[1];return[{xAxis:t.xAxis,yAxis:t.yAxis},{xAxis:r.xAxis,yAxis:r.yAxis}]})}}]}function ze(e){var t=e.data,r=e.symbol,n=e.symbolSize,o=e.itemStyle,a=e.label;return[{type:"scatter",markPoint:{symbol:r,symbolSize:n,itemStyle:o,label:{show:!1!==(null==a?void 0:a.show),position:(null==a?void 0:a.position)||"top",formatter:null==a?void 0:a.formatter,color:(null==a?void 0:a.color)||"#333"},data:t}}]}function Fe(e){var t=e.type,r=e.markLine,n=e.markArea,a=e.scatter;return(0,o.useMemo)(function(){var e=[];if("line"===t&&r){var o=Ne(r);e.push.apply(e,Array.isArray(o)?o:[o])}if("area"===t&&n){var i=je(n);e.push.apply(e,Array.isArray(i)?i:[i])}if("scatter"===t&&a){var l=ze(a);e.push.apply(e,Array.isArray(l)?l:[l])}return{series:e}},[t,r,n,a])}var He={averageLine:function(e){return void 0===e&&(e="#1890ff"),{data:[{type:"average",name:"平均值"}],lineStyle:{color:e,type:"dashed",width:2},label:{show:!0,position:"end",color:e}}},maxLine:function(e){return void 0===e&&(e="#f5222d"),{data:[{type:"max",name:"最大值"}],lineStyle:{color:e,type:"dashed",width:2},label:{show:!0,position:"end",color:e}}},minLine:function(e){return void 0===e&&(e="#52c41a"),{data:[{type:"min",name:"最小值"}],lineStyle:{color:e,type:"dashed",width:2},label:{show:!0,position:"end",color:e}}},thresholdLine:function(e,t){return void 0===t&&(t="#faad14"),{data:[{yAxis:e,name:"警戒线"}],lineStyle:{color:t,type:"solid",width:2},label:{show:!0,position:"start",color:t}}},targetArea:function(e,t,r){return void 0===r&&(r="rgba(82, 196, 26, 0.1)"),{data:[[{yAxis:e},{yAxis:t}]],style:{color:r,opacity:.3},label:{show:!0,position:"inside",color:"#52c41a"}}},warningArea:function(e,t,r){return void 0===r&&(r="rgba(250, 173, 20, 0.1)"),{data:[[{yAxis:e},{yAxis:t}]],style:{color:r,opacity:.3},label:{show:!0,position:"inside",color:"#faad14"}}}};function Be(e){var t=[];return e.forEach(function(e){if("line"===e.type&&e.markLine){var r=Ne(e.markLine);t.push.apply(t,Array.isArray(r)?r:[r])}"area"===e.type&&e.markArea&&(r=je(e.markArea),t.push.apply(t,Array.isArray(r)?r:[r])),"scatter"===e.type&&e.scatter&&(r=ze(e.scatter),t.push.apply(t,Array.isArray(r)?r:[r]))}),{series:t}}var Ue=[];function _e(e){void 0===e&&(e="chart");var t=(new Date).toISOString().slice(0,19).replace(/[:-]/g,"");return"".concat(e,"_").concat(t)}function Ge(e,t){var r=(new Date).toISOString().slice(0,10),n=e.replace(/[^a-zA-Z0-9\u4e00-\u9fa5]/g,"_");return"".concat(n,"_").concat(r,".").concat(t)}function We(e,t){var r=URL.createObjectURL(e),n=document.createElement("a");n.href=r,n.download=t,n.style.display="none",document.body.appendChild(n),n.click();var o=setTimeout(function(){n.parentNode&&document.body.removeChild(n),URL.revokeObjectURL(r)},100);Ue.push(o)}function Ze(e,t){var r=document.createElement("a");r.href=e,r.download=t,r.style.display="none",document.body.appendChild(r),r.click();var n=setTimeout(function(){r.parentNode&&document.body.removeChild(r)},100);Ue.push(n)}var Ve=function(){return Ve=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ve.apply(this,arguments)},Je=function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{c(n.next(e))}catch(e){a(e)}}function l(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(i,l)}c((n=n.apply(e,t||[])).next())})},Ye=function(e,t){var r,n,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=l(0),i.throw=l(1),i.return=l(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(c){return function(l){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&l[0]?n.return:l[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,l[1])).done)return o;switch(n=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,n=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){a.label=l[1];break}if(6===l[0]&&a.label<o[1]){a.label=o[1],o=l;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(l);break}o[2]&&a.ops.pop(),a.trys.pop();continue}l=t.call(e,a)}catch(e){l=[6,e],n=0}finally{r=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}},qe=function(){function e(){}return e.exportImage=function(e,t){void 0===t&&(t={});var r=t.type,n=void 0===r?"png":r,o=t.pixelRatio,a=void 0===o?2:o,i=t.backgroundColor,l=void 0===i?"#ffffff":i,c=t.quality,s=void 0===c?.8:c,u="image/".concat(n);return{data:e.getDataURL({type:n,pixelRatio:a,backgroundColor:l,quality:s}),filename:Ge("chart",n),mimeType:u}},e.exportSVG=function(e,t){void 0===t&&(t={});var r=t.compress,n=void 0!==r&&r,o=e.getDataURL({type:"svg"});if(!o||"data:image/svg+xml;charset=utf8,"===o)throw new Error("SVG export is not supported. Please use canvas renderer.");var a=o,i="image/svg+xml";return n&&(a=a.replace(/>\s+</g,"><").replace(/\s+/g," "),i+=";charset=utf-8"),{data:a,filename:Ge("chart","svg"),mimeType:i}},e.exportPDF=function(e){return Je(this,arguments,Promise,function(e,t){var r,n,o,a,i,l,c,s,u,d,f,p,v,h,m,g,y,b,x,C,E,w,k,S,T,I,O,A,D,R;return void 0===t&&(t={}),Ye(this,function(P){switch(P.label){case 0:r=t.orientation,n=void 0===r?"portrait":r,o=t.pageSize,a=void 0===o?"a4":o,i=t.title,l=void 0===i?"Chart Export":i,c=t.author,s=void 0===c?"TaroViz":c,u=t.margin,d=void 0===u?{top:40,right:40,bottom:40,left:40}:u,f=t.includeTitle,p=void 0===f||f,v=e.getDataURL({type:"png",pixelRatio:2,backgroundColor:"#ffffff"}),P.label=1;case 1:return P.trys.push([1,3,,4]),[4,import("jspdf")];case 2:return m=P.sent(),h=m.default,[3,4];case 3:return P.sent(),[2,{data:v,filename:Ge("chart","png"),mimeType:"image/png"}];case 4:return g={a4:{width:210,height:297},letter:{width:216,height:279},legal:{width:216,height:356},tabloid:{width:279,height:432}}[a],y="landscape"===n,(b=new h({orientation:n,unit:"mm",format:a})).setProperties({title:l,author:s,subject:"Chart Export",keywords:"chart, taroviz, echarts"}),x=y?g.height:g.width,C=.6*x,E=y?g.height:g.width,w=y?g.width:g.height,k=d.top||40,S=d.left||40,p&&b.setFontSize(16).setTextColor(51,51,51).text(l,S,k),T=p?k+15:k,I=(E-x)/2,b.addImage(v,"PNG",I,T,x,C),O=w-(null!==(R=d.bottom)&&void 0!==R?R:40)/2,b.setFontSize(10).setTextColor(153,153,153),b.text("Generated by TaroViz on ".concat((new Date).toLocaleDateString()),S,O),D=b.output("blob"),[2,{data:A=D instanceof Blob?D:"string"==typeof D?new Blob([D],{type:"application/pdf"}):new Blob([new Uint8Array(D)],{type:"application/pdf"}),filename:Ge(l.replace(/\s+/g,"_"),"pdf"),mimeType:"application/pdf",size:A.size}]}})})},e.exportBatch=function(e,t){return Je(this,void 0,Promise,function(){var r,n,o,a,i,l,c,s,u;return Ye(this,function(d){switch(d.label){case 0:r=t.format,t.filenamePrefix,n=t.compress,o=[],a=0,i=e,d.label=1;case 1:if(!(a<i.length))return[3,8];l=i[a],c=l.name,s=l.chart,d.label=2;case 2:return d.trys.push([2,6,,7]),u=void 0,"pdf"!==r?[3,4]:[4,this.exportPDF(s,{title:c})];case 3:return u=d.sent(),[3,5];case 4:u=this.exportImage(s,{type:r}),d.label=5;case 5:return n&&u.filename&&(u.filename=u.filename.replace(/\.(\w+)$/,".$1")),o.push(u),[3,7];case 6:return d.sent(),[3,7];case 7:return a++,[3,1];case 8:return[2,o]}})})},e.download=function(e){var t,r,n;t=e.data,r=e.filename,n=e.mimeType,We("string"==typeof t?new Blob([t],{type:n||"text/plain"}):t,r)},e.copyToClipboard=function(e){return Je(this,arguments,Promise,function(e,t){var r,n,o;return void 0===t&&(t={}),Ye(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),r=this.exportImage(e,Ve(Ve({},t),{type:"png"})),n=function(e){for(var t=e.split(","),r=t[0].match(/:(.*?);/),n=r?r[1]:"image/png",o=atob(t[1]),a=o.length,i=new Uint8Array(a),l=0;l<a;l++)i[l]=o.charCodeAt(l);return new Blob([i],{type:n})}(r.data),[4,navigator.clipboard.write([new ClipboardItem((o={},o[n.type]=n,o))])];case 1:return a.sent(),[2,!0];case 2:return a.sent(),[2,!1];case 3:return[2]}})})},e.calculateExportSize=function(e,t){void 0===t&&(t=300);var r=e.getWidth(),n=e.getHeight(),o=t/96;return{width:Math.round(r*o),height:Math.round(n*o)}},e}(),Ke=qe;function Qe(e){void 0===e&&(e={});var t=e.type,r=void 0===t?"inside":t,n=e.start,a=void 0===n?0:n,i=e.end,l=void 0===i?100:i,c=e.minSpan,s=e.maxSpan,u=e.zoomLock,d=void 0!==u&&u,f=e.throttle,p=void 0===f?16:f,v=e.disabled,h=void 0!==v&&v,m=e.brushSelect,g=void 0!==m&&m,y=e.zoomMode,b=void 0===y?"scale":y,x=e.resetOnUnmount,C=void 0!==x&&x,E=e.onZoomChange,w=(0,o.useRef)(null),k=(0,o.useRef)(void 0),S=(0,o.useRef)(void 0),T=(0,o.useRef)(!1),I=(0,o.useRef)({type:r,start:a,end:l,minSpan:c,maxSpan:s,zoomLock:d,disabled:h,brushSelect:g,zoomMode:b,throttle:p});I.current={type:r,start:a,end:l,minSpan:c,maxSpan:s,zoomLock:d,disabled:h,brushSelect:g,zoomMode:b,throttle:p};var O=(0,o.useRef)(E);O.current=E;var A=(0,o.useRef)(null),D=(0,o.useRef)(0),R=(0,o.useCallback)(function(){var e=I.current,t=e.type,r=e.start,n=e.end,o=e.minSpan,a=e.maxSpan,i=e.zoomLock,l=e.disabled,c=e.brushSelect,s=e.zoomMode,u=[];return"inside"!==t&&"mix"!==s||u.push({type:"inside",start:r,end:n,zoomLock:i,disabled:l,zoomOnMouseWheel:!0,moveOnMouseMove:!1,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),"slider"!==t&&"mix"!==s||u.push({type:"slider",start:r,end:n,minSpan:o,maxSpan:a,zoomLock:i,disabled:l,show:!0,brushSelect:c,throttle:I.current.throttle}),u},[]),P=(0,o.useCallback)(function(e){if(e&&!T.current){T.current=!0,w.current=e;try{var t=R();e.setOption({dataZoom:t},!1,!0)}catch(e){}T.current=!1}},[R]),M=(0,o.useCallback)(function(e){var t;if(e)try{null===(t=e.dispatchAction)||void 0===t||t.call(e,{type:"dataZoom",start:0,end:100})}catch(e){}},[]),L=(0,o.useCallback)(function(e,t){var r,n=w.current;if(n){var o=Math.max(0,Math.min(100,e)),a=Math.max(0,Math.min(100,t));try{null===(r=n.dispatchAction)||void 0===r||r.call(n,{type:"dataZoom",start:o,end:a})}catch(e){}}},[]),N=(0,o.useCallback)(function(){var e=I.current,t=e.start,r=e.end;L(t,r)},[L]),j=(0,o.useCallback)(function(){var e,t,r,n=w.current;if(!n){var o=I.current;return{start:o.start,end:o.end}}try{var a=null===(e=n.getOption)||void 0===e?void 0:e.call(n),i=null==a?void 0:a.dataZoom;if(Array.isArray(i)&&i.length>0){var l=i.find(function(e){return"inside"===e.type}),c=i.find(function(e){return"slider"===e.type}),s=l||c||i[0];return{start:null!==(t=s.start)&&void 0!==t?t:I.current.start,end:null!==(r=s.end)&&void 0!==r?r:I.current.end}}}catch(e){}return{start:I.current.start,end:I.current.end}},[]),z=(0,o.useCallback)(function(e){if(e){var t=I.current.throttle,r=function(e){var r=Date.now();r-D.current>=t&&(D.current=r,function(e){var t;if(!I.current.disabled){var r=e||{},n=r.start,o=r.end;void 0!==n&&(k.current=n),void 0!==o&&(S.current=o),null===(t=O.current)||void 0===t||t.call(O,{start:null!=n?n:I.current.start,end:null!=o?o:I.current.end})}}(e))};A.current=r;try{e.on("datazoom",r)}catch(e){}}},[]),F=(0,o.useCallback)(function(e){if(e&&A.current)try{e.off("datazoom",A.current)}catch(e){}},[]);return(0,o.useEffect)(function(){return function(){var e=w.current;e&&(C&&M(e),F(e))}},[C,M,F]),{bindDataZoom:P,setZoomRange:L,resetZoom:N,getZoomRange:j,startValue:k,endValue:S,bindEvents:z}}function Xe(e,t,r,n){n.current.forEach(function(n,o){var a,i,l,c,s,u;if(o!==e)try{switch(t){case"click":case"hover":var d=r;null===(i=(a=n.instance).dispatchAction)||void 0===i||i.call(a,{type:"showTip",seriesIndex:d.seriesIndex,dataIndex:d.dataIndex});break;case"select":d=r,null===(c=(l=n.instance).dispatchAction)||void 0===c||c.call(l,{type:"toggleSelect",seriesIndex:d.seriesIndex,dataIndex:d.dataIndex});break;case"dataZoom":d=r,null===(u=(s=n.instance).dispatchAction)||void 0===u||u.call(s,{type:"dataZoom",start:d.start,end:d.end,dataZoomIndex:d.dataZoomIndex,dataZoomIndexs:d.dataZoomIndexs})}}catch(e){}})}function $e(e){var t=e.chartIds,r=void 0===t?[]:t,n=e.events,a=void 0===n?(0,o.useMemo)(function(){return["click","hover","select","dataZoom"]},[]):n,i=e.autoBind,l=void 0!==i&&i,c=e.groupName,s=e.disabled,u=void 0!==s&&s,d=(e.onConnect,e.eventFilter),f=(0,o.useRef)(new Map),p=(0,o.useRef)(!1),v=(0,o.useRef)(e);v.current=e;var h=(0,o.useRef)(new Map),m=(0,o.useCallback)(function(e,t){return function(e,t,r,n,o,a){return function(i){if(!r&&(!n||n(t,i))){Xe(e,t,i,o);var l=a.current;l.onConnect&&o.current.forEach(function(r,n){var o;n!==e&&(null===(o=l.onConnect)||void 0===o||o.call(l,e,n,{eventType:t,params:i}))})}}}(e,t,u,d,f,v)},[u,d,f,v]),g=(0,o.useCallback)(function(e,t,r){Xe(e,t,r,f)},[f]),y=(0,o.useCallback)(function(e,t){!function(e,t,r,n,o){if(e){var a=new Map;r.forEach(function(r){var o=n(t,r);a.set(r,o);try{e.on(r,o)}catch(e){}}),o.current.set(t,a)}}(e,t,a,m,h)},[a,m,h]),b=(0,o.useCallback)(function(e){!function(e,t,r){var n=t.current.get(e);if(n){var o=r.current.get(e);o&&(n.forEach(function(e,t){try{o.instance.off(t,e)}catch(e){}}),t.current.delete(e))}}(e,h,f)},[h,f]),x=(0,o.useCallback)(function(e,t){!function(e,t,r,n,o,a,i){var l=t||"chart_".concat(Date.now(),"_").concat(Math.random().toString(36).substr(2,9));if(n.current.has(l))return l;if(n.current.set(l,{instance:e,id:l}),i(e,l),o.current=!0,r&&"group"in e)try{e.group=r}catch(e){}}(e,t,c,f,p,0,y)},[c,f,p,h,y]),C=(0,o.useCallback)(function(e,t){!function(e,t,r,n,o){var a=t;a||r.current.forEach(function(t,r){t.instance===e&&(a=r)}),a&&r.current.has(a)&&(o(a),r.current.delete(a),n.current=r.current.size>0)}(e,t,f,p,b)},[f,p,b]),E=(0,o.useCallback)(function(e,t){!function(e,t,r,n,o){if(!r&&n.current.get(e)){var a=t||{},i=a.eventType,l=a.params;i&&o(e,i,l)}}(e,t,u,f,g)},[u,f,g]),w=(0,o.useCallback)(function(e){!function(e,t){e.forEach(function(e){var r=e.instance,n=e.id;t(r,n)})}(e,x)},[x]),k=(0,o.useCallback)(function(){!function(e,t,r){e.current.forEach(function(e,t){r(t)}),e.current.clear(),t.current=!1}(f,p,b)},[f,p,b]);return(0,o.useEffect)(function(){l&&r.length},[l,r]),(0,o.useEffect)(function(){return function(){k()}},[k]),{connect:x,disconnect:C,dispatchConnect:E,connectAll:w,disconnectAll:k,isConnected:p.current}}var et=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))};function tt(e,t){return r=this,n=void 0,a=function(){return function(e,t){var r,n,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=l(0),i.throw=l(1),i.return=l(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(c){return function(l){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&l[0]?n.return:l[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,l[1])).done)return o;switch(n=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,n=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){a.label=l[1];break}if(6===l[0]&&a.label<o[1]){a.label=o[1],o=l;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(l);break}o[2]&&a.ops.pop(),a.trys.pop();continue}l=t.call(e,a)}catch(e){l=[6,e],n=0}finally{r=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}}(this,function(r){return[2,new Promise(function(r){try{var n=document.createElement("canvas"),o=n.getContext("2d");if(!o)return void r(null);var a=new Image;a.onload=function(){var e=595.28,i=841.89;n.width=e,n.height=i,o.fillStyle="#ffffff",o.fillRect(0,0,e,i);var l,c,s=a.width/a.height;s>.7070757462376319?c=(l=476.224)/s:l=(c=.6*i)*s;var u=(e-l)/2,d=(i-c)/2;o.drawImage(a,u,d,l,c),o.fillStyle="#333333",o.font="16px Arial",o.textAlign="center",o.fillText(t||"Chart Export",297.64,d-20),r(n.toDataURL("image/png"))},a.onerror=function(){r(null)},a.src=e}catch(e){r(null)}})]})},new((o=Promise)||(o=Promise))(function(e,t){function i(e){try{c(a.next(e))}catch(e){t(e)}}function l(e){try{c(a.throw(e))}catch(e){t(e)}}function c(t){var r;t.done?e(t.value):(r=t.value,r instanceof o?r:new o(function(e){e(r)})).then(i,l)}c((a=a.apply(r,n||[])).next())});var r,n,o,a}var rt=function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{c(n.next(e))}catch(e){a(e)}}function l(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(i,l)}c((n=n.apply(e,t||[])).next())})},nt=function(e,t){var r,n,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=l(0),i.throw=l(1),i.return=l(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(c){return function(l){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&l[0]?n.return:l[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,l[1])).done)return o;switch(n=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,n=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){a.label=l[1];break}if(6===l[0]&&a.label<o[1]){a.label=o[1],o=l;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(l);break}o[2]&&a.ops.pop(),a.trys.pop();continue}l=t.call(e,a)}catch(e){l=[6,e],n=0}finally{r=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}};function ot(e,t){var r=this;void 0===t&&(t={});var n=t.filename,a=t.pixelRatio,i=void 0===a?2:a,l=t.backgroundColor,c=void 0===l?"#ffffff":l,s=t.format,u=void 0===s?"png":s,d=t.includeLabels,f=void 0===d||d,p=t.beforeExport,v=t.afterExport,h=(0,o.useRef)(null);h.current=e;var m=(0,o.useCallback)(function(){var e=h.current;if(e&&p)try{p(e)}catch(e){}},[p]),g=(0,o.useCallback)(function(e){if(v)try{v(e)}catch(e){}},[v]),y=(0,o.useCallback)(function(e){var t,r=h.current;if(r){var n=e||u;try{if("svg"===n){var o=null===(t=r.getSvgData)||void 0===t?void 0:t.call(r);return o?"data:image/svg+xml;base64,".concat(btoa(o)):void 0}return r.getDataURL?r.getDataURL({type:n,pixelRatio:i,backgroundColor:c}):void 0}catch(e){return}}},[u,i,c]),b=(0,o.useCallback)(function(e){return rt(r,void 0,Promise,function(){var t,r,o,a,l,s,d,f,p,v,y,b,x,C;return nt(this,function(E){if(m(),!(t=h.current))return[2];o=(r=e||{}).filename,a=r.pixelRatio,l=r.backgroundColor,s=r.format,d=s||u,f=null!=a?a:i,p=null!=l?l:c,v=o||n||_e("chart");try{y=void 0,"svg"===d?(b=null===(x=t.getSvgData)||void 0===x?void 0:x.call(t))&&(y="data:image/svg+xml;base64,".concat(btoa(b))):y=null===(C=t.getDataURL)||void 0===C?void 0:C.call(t,{type:d,pixelRatio:f,backgroundColor:p}),y&&(Ze(y,"".concat(v,".").concat(d)),g(y))}catch(e){}return[2]})})},[u,i,c,n,m,g]),x=(0,o.useCallback)(function(e){return rt(r,void 0,Promise,function(){var t,r,o,a,l,s,u,d,f,p,v;return nt(this,function(y){switch(y.label){case 0:if(m(),!(t=h.current))return[2];o=(r=e||{}).filename,a=r.pixelRatio,l=r.backgroundColor,s=null!=a?a:i,u=null!=l?l:c,d=o||n||_e("chart"),y.label=1;case 1:return y.trys.push([1,3,,4]),(f=null===(v=t.getDataURL)||void 0===v?void 0:v.call(t,{type:"png",pixelRatio:s,backgroundColor:u}))?[4,tt(f,d)]:[2];case 2:return(p=y.sent())&&(Ze(p,"".concat(d,".pdf")),g(p)),[3,4];case 3:return y.sent(),[3,4];case 4:return[2]}})})},[n,i,c,m,g]),C=(0,o.useCallback)(function(){var e,t=h.current;if(!t)return null;try{return(null===(e=t.getOption)||void 0===e?void 0:e.call(t))||null}catch(e){return null}},[]),E=(0,o.useCallback)(function(){var e,t=h.current;if(t)try{return null===(e=t.getSvgData)||void 0===e?void 0:e.call(t)}catch(e){return}},[]),w=(0,o.useCallback)(function(e){return rt(r,void 0,Promise,function(){var t,r,o,a,i,l,c,s,u,d;return nt(this,function(p){if(m(),!(t=h.current))return[2];o=(r=e||{}).filename,a=r.dataKey,i=o||n||_e("data");try{if(!(l=null===(d=t.getOption)||void 0===d?void 0:d.call(t)))return[2];c=l,a&&"object"==typeof c&&(c=c[a]||c),(s=function(e,t){return e?"object"==typeof e&&e.series?function(e,t){var r,n,o=e.series,a=void 0===o?[]:o,i=e.xAxis,l=e.dataset,c=null===(r=null==t?void 0:t.includeLabels)||void 0===r||r;if(!Array.isArray(a)||0===a.length)return"";var s=[];if((null==i?void 0:i.data)&&Array.isArray(i.data))s=i.data;else if((null==l?void 0:l.dimensions)&&(null==l?void 0:l.source))s=l.source.map(function(e){return e[0]});else if(null===(n=a[0])||void 0===n?void 0:n.data){var u=a[0];s=u.data.map(function(e,t){return"object"==typeof e&&null!==e&&e[0]||t})}var d=c?et(["Category"],a.map(function(e){return e.name||e.seriesIndex}),!0):[],f=[];return a.forEach(function(e,t){(e.data||[]).forEach(function(e,r){var n="object"==typeof e&&null!==e?e[1]:e,o=s[r]||r;c?0===t?f[r]=[o,n]:(f[r]=f[r]||[o],f[r].push(n)):0===t?f[r]=[n]:(f[r]=f[r]||[],f[r].push(n))})}),(c?et([d.join(",")],f.map(function(e){return e.join(",")}),!0):f.map(function(e){return e.join(",")})).join("\n")}(e,t):Array.isArray(e)?function(e){if(0===e.length)return"";if("object"==typeof e[0]&&null!==e[0]){var t=Object.keys(e[0]),r=t.join(","),n=e.map(function(e){return t.map(function(t){var r;return JSON.stringify(null!==(r=e[t])&&void 0!==r?r:"")}).join(",")});return et([r],n,!0).join("\n")}return e.join("\n")}(e):"object"==typeof e?function(e){return Object.entries(e).map(function(e){var t=e[0],r=e[1];return"".concat(t,",").concat(JSON.stringify(r))}).join("\n")}(e):String(e):""}(c,{includeLabels:f}))&&(u=function(e){return new Blob([e],{type:"text/csv;charset=utf-8;"})}(s),We(u,"".concat(i,".csv")),g(u))}catch(e){}return[2]})})},[n,m,g]),k=(0,o.useCallback)(function(e){return rt(r,void 0,Promise,function(){var t,r,o,a,i,l,c,s,u,d;return nt(this,function(f){if(m(),!(t=h.current))return[2];o=(r=e||{}).filename,a=r.dataKey,i=o||n||_e("data");try{if(!(l=null===(d=t.getOption)||void 0===d?void 0:d.call(t)))return[2];c=l,a&&"object"==typeof c&&(c=c[a]||c),s=function(e){var t,r,n;if(!e)return"{}";var o=e;if(o.series){var a={title:null===(t=o.title)||void 0===t?void 0:t.text,legend:null===(r=o.legend)||void 0===r?void 0:r.data,xAxis:null===(n=o.xAxis)||void 0===n?void 0:n.data,series:o.series.map(function(e){var t,r=e;return{name:r.name,type:r.type,data:null===(t=r.data)||void 0===t?void 0:t.map(function(e){return"object"==typeof e&&null!==e?e[1]:e})}})};return JSON.stringify(a,null,2)}return JSON.stringify(e,null,2)}(c),s&&(u=function(e){return new Blob([e],{type:"application/json;charset=utf-8;"})}(s),We(u,"".concat(i,".json")),g(u))}catch(e){}return[2]})})},[n,m,g]),S=(0,o.useCallback)(function(e){return rt(r,void 0,Promise,function(){var t,r,n,o,a,i;return nt(this,function(l){switch(l.label){case 0:switch(r=(t=e||{}).format,n=t.filename,o=t.pixelRatio,a=t.backgroundColor,i=r||u){case"png":case"jpeg":return[3,1];case"svg":return[3,3];case"pdf":return[3,5]}return[3,7];case 1:return[4,b({format:i,filename:n,pixelRatio:o,backgroundColor:a})];case 2:case 4:case 6:return l.sent(),[3,7];case 3:return[4,b({format:"svg",filename:n})];case 5:return[4,x({filename:n,pixelRatio:o,backgroundColor:a})];case 7:return[2]}})})},[u,b,x]);return{downloadImage:b,downloadCSV:w,downloadJSON:k,downloadPDF:x,getImageDataUrl:y,getChartData:C,getSvgData:E,exportChart:S}}var at=function(){return at=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},at.apply(this,arguments)},it=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))};function lt(e,t,r,n){if(0===e.length)return"zero"===n?0:NaN;var o=e.map(function(e){return Number(e[t])||0});switch(r){case"sum":for(var a=0,i=0;i<o.length;i++)a+=o[i];return a;case"average":if(0===o.length)return 0;for(a=0,i=0;i<o.length;i++)a+=o[i];return a/o.length;case"max":var l=o[0];for(i=1;i<o.length;i++)o[i]>l&&(l=o[i]);return l;case"min":var c=o[0];for(i=1;i<o.length;i++)o[i]<c&&(c=o[i]);return c;case"count":return o.length;case"first":default:return o[0];case"last":return o[o.length-1]}}r(6964);var ct=function(){return ct=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ct.apply(this,arguments)};function st(e){var t=e.data,r=e.chartType,n=e.mapping,a=void 0===n?{}:n,i=e.extraConfig,l=void 0===i?{}:i;return(0,o.useMemo)(function(){switch(r){case"line":case"bar":return function(e,t,r,n){var o,a=r||{},i=a.xField,l=void 0===i?"name":i,c=a.yField,s=void 0===c?"value":c,u=a.seriesField,d=e.categories||(null===(o=e.rows)||void 0===o?void 0:o.map(function(e){return String(e[l])}))||[],f=e.series||e.rows||[];if(u){var p=new Map;f.forEach(function(e){var t=String(e[u]||"default");p.has(t)||p.set(t,[]),p.get(t).push(e)});var v=Array.from(p.entries()).map(function(e){var r=e[0],n=e[1];return{name:r,type:t,data:n.map(function(e){var t;return null!==(t=e[s])&&void 0!==t?t:0})}});return at({xAxis:{type:"category",data:d},yAxis:{type:"value"},series:v},n)}var h=[{type:t,data:f.map(function(e){var t;return null!==(t=e[s])&&void 0!==t?t:0})}];return at({xAxis:{type:"category",data:d},yAxis:{type:"value"},series:h},n)}(t,r,a,l);case"pie":return function(e,t,r){var n=t||{},o=n.nameField,a=void 0===o?"name":o,i=n.valueField,l=void 0===i?"value":i,c=(e.series||e.rows||[]).map(function(e){return{name:String(e[a]||""),value:Number(e[l])||0}});return at({series:[{type:"pie",radius:"60%",data:c}]},r)}(t,a,l);case"scatter":return function(e,t,r){var n=t||{},o=n.xField,a=void 0===o?"x":o,i=n.yField,l=void 0===i?"y":i,c=n.sizeField,s=(e.series||e.rows||[]).map(function(e){var t=e,r=[Number(t[a])||0,Number(t[l])||0];return c&&r.push(Number(t[c])||1),r});return at({xAxis:{type:"value",scale:!0},yAxis:{type:"value",scale:!0},series:[{type:"scatter",data:s}]},r)}(t,a,l);case"radar":return function(e,t,r){var n=t||{},o=n.nameField,a=void 0===o?"name":o,i=n.valueField,l=void 0===i?"value":i,c=(e.series||e.rows||[]).map(function(e){var t=e;return{name:String(t[a]||""),max:Math.max(Number(t[l])||100,100)}}),s=(e.series||e.rows||[]).map(function(e){return Number(e[l])||0});return at({radar:{indicator:c},series:[{type:"radar",data:[{value:s}]}]},r)}(t,a,l);case"heatmap":return function(e,t,r){var n=t||{},o=n.xField,a=void 0===o?"x":o,i=n.yField,l=void 0===i?"y":i,c=n.valueField,s=void 0===c?"value":c,u=it([],new Set((e.series||e.rows||[]).map(function(e){return String(e[a])})),!0),d=it([],new Set((e.series||e.rows||[]).map(function(e){return String(e[l])})),!0),f=(e.series||e.rows||[]).map(function(e){var t=e;return[u.indexOf(String(t[a])),d.indexOf(String(t[l])),Number(t[s])||0]});return at({xAxis:{type:"category",data:u},yAxis:{type:"category",data:d},visualMap:{min:0,calculable:!0},series:[{type:"heatmap",data:f}]},r)}(t,a,l);default:return{}}},[t,r,a,l])}function ut(e){var t=e.data,r=e.columns,n=void 0===r?[]:r,a=e.transpose,i=void 0!==a&&a,l=e.extraConfig,c=void 0===l?{}:l;return(0,o.useMemo)(function(){if(!t||0===t.length)return{};var e=t[0],r=n.length>0?n.map(function(e){return e.field}):Object.keys(e),o=new Map(n.map(function(e){return[e.field,e]})),a=i?r:t.map(function(e){return String(e[r[0]]||"")}),l=(i?r:r.slice(1)).map(function(e){var r="string"==typeof e?e:"",n=o.get(r),a=t.map(function(e){return Number(e[r])||0});return{name:(null==n?void 0:n.label)||r,type:"bar",data:a,itemStyle:(null==n?void 0:n.color)?{color:n.color}:void 0}});return ct({xAxis:{type:"category",data:a},yAxis:{type:"value"},series:l},c)},[t,n,i,c])}function dt(e){var t=e.data,r=e.dateField,n=e.valueField,a=e.groupField,i=e.period,l=void 0===i?"day":i,c=e.aggregation,s=void 0===c?"sum":c,u=e.fillMissing,d=void 0===u?"forward":u,f=e.extraConfig,p=void 0===f?{}:f;return(0,o.useMemo)(function(){if(!t||0===t.length)return{};var e=function(e,t,r){return e.reduce(function(e,n){var o,a=new Date(String(n[t]));switch(r){case"day":default:o=a.toISOString().split("T")[0];break;case"week":var i=function(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate())),r=t.getUTCDay()||7;t.setUTCDate(t.getUTCDate()+4-r);var n=new Date(Date.UTC(t.getUTCFullYear(),0,1));return Math.ceil(((t.getTime()-n.getTime())/864e5+1)/7)}(a);o="".concat(a.getFullYear(),"-W").concat(i);break;case"month":o="".concat(a.getFullYear(),"-").concat(String(a.getMonth()+1).padStart(2,"0"));break;case"quarter":o="".concat(a.getFullYear(),"-Q").concat(Math.ceil((a.getMonth()+1)/3));break;case"year":o=String(a.getFullYear())}return e[o]||(e[o]=[]),e[o].push(n),e},{})}(t,r,l),o=Object.keys(e).sort();if(a){var i=new Set(t.map(function(e){return String(e[a])})),c=Array.from(i).map(function(t){var r=o.map(function(r){var o;return lt((null===(o=e[r])||void 0===o?void 0:o.filter(function(e){return String(e[a])===t}))||[],n,s,d)});return{name:t,type:"line",data:r,smooth:!0}});return ct({xAxis:{type:"category",data:o},yAxis:{type:"value"},series:c},p)}var u=o.map(function(t){return lt(e[t]||[],n,s,d)});return ct({xAxis:{type:"category",data:o},yAxis:{type:"value"},series:[{type:"line",data:u,smooth:!0}]},p)},[t,r,n,a,l,s,d,p])}var ft=function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{c(n.next(e))}catch(e){a(e)}}function l(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(i,l)}c((n=n.apply(e,t||[])).next())})},pt=function(e,t){var r,n,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=l(0),i.throw=l(1),i.return=l(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(c){return function(l){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&l[0]?n.return:l[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,l[1])).done)return o;switch(n=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,n=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){a.label=l[1];break}if(6===l[0]&&a.label<o[1]){a.label=o[1],o=l;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(l);break}o[2]&&a.ops.pop(),a.trys.pop();continue}l=t.call(e,a)}catch(e){l=[6,e],n=0}finally{r=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}};function vt(e,t){var r=this,n=(0,o.useState)(null),a=n[0],i=n[1],l=(0,o.useState)(!1),c=l[0],s=l[1],u=(0,o.useRef)(t);return u.current=t,(0,o.useEffect)(function(){if(e.current&&!a)return ft(r,void 0,void 0,function(){var e;return pt(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,(0,G.cK)(u.current||{})];case 1:return e=t.sent(),i(e),s(!0),[3,3];case 2:return t.sent(),[3,3];case 3:return[2]}})}),function(){var e;if(a){try{var t=a;(null===(e=t.isDisposed)||void 0===e?void 0:e.call(t))||t.dispose()}catch(e){}i(null),s(!1)}}},[e]),[a,i,c]}function ht(e,t,r){var n=r||{},a=n.notMerge,i=void 0!==a&&a,l=n.lazyUpdate,c=void 0!==l&&l,s=n.replaceMerge,u=n.deps,d=void 0===u?[]:u;(0,o.useEffect)(function(){if(e&&t)try{e.setOption(t,i,c)}catch(e){}},function(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}([e,t,i,c,s],d,!0))}function mt(e,t){var r=t||{},n=r.delay,a=void 0===n?300:n,i=r.minWidth,l=r.minHeight,c=r.enabled,s=void 0===c||c,u=(0,o.useRef)();(0,o.useEffect)(function(){var t;if(e&&s){var r=function(){u.current&&clearTimeout(u.current),u.current=setTimeout(function(){var t,r;try{var n=null===(t=e.getDom)||void 0===t?void 0:t.call(e);if(n){var o=n.clientWidth,a=n.clientHeight;if(i&&o<i)return;if(l&&a<l)return}null===(r=e.resize)||void 0===r||r.call(e)}catch(e){}},a)};window.addEventListener("resize",r);var n=null===(t=e.getDom)||void 0===t?void 0:t.call(e);if(n&&"undefined"!=typeof ResizeObserver){var o=new ResizeObserver(r);return o.observe(n),function(){o.disconnect(),window.removeEventListener("resize",r),u.current&&clearTimeout(u.current)}}return function(){window.removeEventListener("resize",r),u.current&&clearTimeout(u.current)}}},[e,a,i,l,s])}function gt(e,t){(0,o.useEffect)(function(){if(e&&t){var r=Object.entries(t);return r.forEach(function(t){var r=t[0],n=t[1];try{e.on(r,n)}catch(e){}}),function(){r.forEach(function(t){var r=t[0],n=t[1];try{e.off(r,n)}catch(e){}})}}},[e,t])}function yt(e,t,r){(0,o.useEffect)(function(){if(e)try{t?e.showLoading(r):e.hideLoading()}catch(e){}},[e,t,r])}function bt(e,t){return void 0===t&&(t=!1),(0,o.useMemo)(function(){if("string"==typeof e)try{return $(e)||(t?"dark":e)}catch(r){return t?"dark":e}return e},[e,t])}function xt(e,t){return(0,o.useMemo)(function(){return!e||Array.isArray(e)&&0===e.length?{}:t(e)},[e,t])}function Ct(e){var t=e||{},r=t.breakpoints,n=void 0===r?{xs:0,sm:576,md:768,lg:992,xl:1200}:r,a=t.defaultBreakpoint,i=void 0===a?"md":a,l=(0,o.useState)(i),c=l[0],s=l[1],u=(0,o.useState)({width:0,height:0}),d=u[0],f=u[1];return(0,o.useEffect)(function(){var e=function(){var e=window.innerWidth;f({width:e,height:window.innerHeight});var t="xs";e>=n.xl?t="xl":e>=n.lg?t="lg":e>=n.md?t="md":e>=n.sm&&(t="sm"),s(t)};return e(),window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}},[n]),{breakpoint:c,windowSize:d}}function Et(e){void 0===e&&(e="default");var t=(0,o.useState)(e),r=t[0],n=t[1],a=(0,o.useState)(!1),i=a[0],l=a[1];return{theme:r,isDark:i,switchTheme:(0,o.useCallback)(function(e){n(e),"string"==typeof e&&l("dark"===e||e.includes("dark"))},[]),toggleDark:(0,o.useCallback)(function(){l(function(e){return!e}),n(function(e){return"dark"===e?"default":"dark"})},[]),setTheme:n}}function wt(e,t){var r=this,n=t||{},a=n.interval,i=void 0===a?5e3:a,l=n.autoStart,c=void 0!==l&&l,s=n.retryCount,u=void 0===s?3:s,d=n.retryDelay,f=void 0===d?1e3:d,p=(0,o.useState)(null),v=p[0],h=p[1],m=(0,o.useState)(c),g=m[0],y=m[1],b=(0,o.useState)(null),x=b[0],C=b[1],E=(0,o.useRef)({cancelled:!1}),w=(0,o.useCallback)(function(){return ft(r,void 0,void 0,function(){var t,r,n,o,a;return pt(this,function(i){switch(i.label){case 0:if(E.current.cancelled=!0,E.current={cancelled:!1},t=E.current,r=u,y(!0),C(null),!(u<0))return[3,5];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,e()];case 2:return o=i.sent(),t.cancelled||(h(o),y(!1)),[3,4];case 3:return n=i.sent(),t.cancelled||(C(n),y(!1)),[3,4];case 4:return[2];case 5:if(!(r>0)||t.cancelled)return[3,11];i.label=6;case 6:return i.trys.push([6,8,,10]),[4,e()];case 7:return o=i.sent(),t.cancelled||(h(o),y(!1)),[2];case 8:return a=i.sent(),--r<=0||t.cancelled?(t.cancelled||C(a),y(!1),[2]):[4,new Promise(function(e){return setTimeout(e,f)})];case 9:return i.sent(),[3,10];case 10:return[3,5];case 11:return[2]}})})},[e,u,f]);return(0,o.useEffect)(function(){if(c&&w(),i>0){var e=setInterval(w,i);return function(){clearInterval(e),E.current.cancelled=!0}}return function(){E.current.cancelled=!0}},[i,c,w]),{data:v,loading:g,error:x,refresh:(0,o.useCallback)(function(){w()},[w])}}function kt(e){var t=(0,o.useState)(!1),r=t[0],n=t[1],a=(0,o.useCallback)(function(){e.current&&(r?document.exitFullscreen&&document.exitFullscreen():e.current.requestFullscreen&&e.current.requestFullscreen())},[e,r]);return(0,o.useEffect)(function(){var e=function(){n(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",e),function(){return document.removeEventListener("fullscreenchange",e)}},[]),{isFullscreen:r,toggle:a}}function St(e){var t=e;return{exportImage:(0,o.useCallback)(function(e){var r;if(!t)return null;var n=e||{},o=n.type,a=void 0===o?"png":o,i=n.pixelRatio,l=void 0===i?2:i,c=n.backgroundColor;return null===(r=t.getDataURL)||void 0===r?void 0:r.call(t,{type:a,pixelRatio:l,backgroundColor:c})},[t]),exportSVG:(0,o.useCallback)(function(){var e;return t?null===(e=t.getSvgData)||void 0===e?void 0:e.call(t):null},[t]),exportCSV:(0,o.useCallback)(function(e){var r;return t?null===(r=t.getCompressedDataURL)||void 0===r?void 0:r.call(t,e):null},[t])}}function Tt(e){var t=e;return{getInstance:(0,o.useCallback)(function(){return e},[e]),clear:(0,o.useCallback)(function(){var e;null===(e=null==t?void 0:t.clear)||void 0===e||e.call(t)},[t]),repaint:(0,o.useCallback)(function(){var e;null===(e=null==t?void 0:t.resize)||void 0===e||e.call(t)},[t]),dispatchAction:(0,o.useCallback)(function(e){var r;null===(r=null==t?void 0:t.dispatchAction)||void 0===r||r.call(t,e)},[t]),showTip:(0,o.useCallback)(function(e,r){var n;null===(n=null==t?void 0:t.dispatchAction)||void 0===n||n.call(t,{type:"showTip",seriesIndex:e,dataIndex:r})},[t]),hideTip:(0,o.useCallback)(function(){var e;null===(e=null==t?void 0:t.dispatchAction)||void 0===e||e.call(t,{type:"hideTip"})},[t]),zoom:(0,o.useCallback)(function(e,r){var n;null===(n=null==t?void 0:t.dispatchAction)||void 0===n||n.call(t,{type:"dataZoom",start:null!=e?e:0,end:null!=r?r:100})},[t])}}var It="taroviz"},2015(e){e.exports=require("react")}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var a=r[e]={exports:{}};return t[e](a,a.exports,n),a.exports}n.m=t,e=[],n.O=(t,r,o,a)=>{if(!r){var i=1/0;for(u=0;u<e.length;u++){for(var[r,o,a]=e[u],l=!0,c=0;c<r.length;c++)(!1&a||i>=a)&&Object.keys(n.O).every(e=>n.O[e](r[c]))?r.splice(c--,1):(l=!1,a<i&&(i=a));if(l){e.splice(u--,1);var s=o();void 0!==s&&(t=s)}}return t}a=a||0;for(var u=e.length;u>0&&e[u-1][2]>a;u--)e[u]=e[u-1];e[u]=[r,o,a]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={57:0};n.O.j=t=>0===e[t];var t=(t,r)=>{var o,a,[i,l,c]=r,s=0;if(i.some(t=>0!==e[t])){for(o in l)n.o(l,o)&&(n.m[o]=l[o]);if(c)var u=c(n)}for(t&&t(r);s<i.length;s++)a=i[s],n.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return n.O(u)},r=self.webpackChunk_agions_taroviz=self.webpackChunk_agions_taroviz||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var o=n.O(void 0,[440,96],()=>n(5904));o=n.O(o),module.exports=o})();
|
|
1
|
+
(()=>{"use strict";var e,t={8063(e,t,r){r.d(t,{mY:()=>i,iK:()=>l});var n,o=function(){function e(e){void 0===e&&(e={}),this.chartInstance=null,this.config=e}return e.prototype.getInstance=function(){return this.chartInstance},e.prototype.setOption=function(e,t){this.chartInstance?this.chartInstance.setOption(e,t):this.config.option=e},e.prototype.setTheme=function(e){this.config.theme=e;var t=this.chartInstance;(null==t?void 0:t.setTheme)&&t.setTheme(e)},e.prototype.getWidth=function(){var e=this.config.width;if("number"==typeof e)return e;if("string"==typeof e){var t=parseInt(e,10);if(!isNaN(t))return t}return 300},e.prototype.getHeight=function(){var e=this.config.height;if("number"==typeof e)return e;if("string"==typeof e){var t=parseInt(e,10);if(!isNaN(t))return t}return 300},e.prototype.getDom=function(){return null},e.prototype.convertToDataURL=function(e){var t,r;return null===(r=null===(t=this.chartInstance)||void 0===t?void 0:t.getDataURL)||void 0===r?void 0:r.call(t,e)},e.prototype.clear=function(){var e,t;null===(t=null===(e=this.chartInstance)||void 0===e?void 0:e.clear)||void 0===t||t.call(e)},e.prototype.on=function(e,t){var r,n;null===(n=null===(r=this.chartInstance)||void 0===r?void 0:r.on)||void 0===n||n.call(r,e,t)},e.prototype.off=function(e,t){var r,n;null===(n=null===(r=this.chartInstance)||void 0===r?void 0:r.off)||void 0===n||n.call(r,e,t)},e.prototype.showLoading=function(e){var t,r;null===(r=null===(t=this.chartInstance)||void 0===t?void 0:t.showLoading)||void 0===r||r.call(t,e)},e.prototype.hideLoading=function(){var e,t;null===(t=null===(e=this.chartInstance)||void 0===e?void 0:e.hideLoading)||void 0===t||t.call(e)},e.prototype.dispose=function(){var e,t;this.chartInstance&&(null===(t=null===(e=this.chartInstance)||void 0===e?void 0:e.dispose)||void 0===t||t.call(e),this.chartInstance=null)},e.prototype.resize=function(e){var t,r;null===(r=null===(t=this.chartInstance)||void 0===t?void 0:t.resize)||void 0===r||r.call(t,e)},e.prototype.setComponent=function(e){this.config.component=e},e.prototype.parseSize=function(e,t){if("number"==typeof e)return e;if("string"==typeof e){var r=parseInt(e,10);if(!isNaN(r))return r}return t},e}(),a=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(t){var r=e.call(this,t)||this;return r.component=null,r.component=t.component,r}return a(t,e),t.prototype.createChartInstance=function(e,t){return e.createChart({id:t.id,width:t.width,height:t.height,theme:t.theme})},t.prototype.init=function(){var e=this.config,t=e.canvasId,r=e.width,n=e.height,o=e.theme,a=e.option;if(!this.component)return null;if(!t)return null;var i=this.createChartInstance(this.component,{id:t,width:r,height:n,theme:o});a&&i.setOption(a),this.chartInstance=i;var l=e.onInit;return l&&l(i),i},t.prototype.setComponent=function(e){this.component=e},t.prototype.dispatchAction=function(e){var t,r;null===(r=null===(t=this.chartInstance)||void 0===t?void 0:t.dispatchAction)||void 0===r||r.call(t,e)},t.prototype.getDataURL=function(e){var t,r;return null===(r=null===(t=this.chartInstance)||void 0===t?void 0:t.getDataURL)||void 0===r?void 0:r.call(t,e)},t}(o);function l(e){return function(t){return new e(t)}}},509(e,t,r){r.r(t),r.d(t,{default:()=>p});var n=r(5620),o=r(6641),a=r(4064),i=r(655),l=r(8052),c=r(3087),s=r(3806),u=r(9952),d=r(2015),f=function(){return f=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},f.apply(this,arguments)};c.Y([n.a,o.a,a.a,i.a,u.a,s.a]);const p=function(){function e(e){this._instance=null,this.containerRef=void 0,this.options=e||{},this.containerRef=e.containerRef,this.canvasId=this.options.canvasId||"taroviz-echarts-canvas"}return e.create=function(t){return new e(t)},e.prototype.init=function(e){var t;if(this._instance)return this._instance;var r=this.containerRef&&"current"in this.containerRef?this.containerRef.current:this.containerRef||document.getElementById(this.canvasId);if(!r)throw new Error("[TaroViz] H5Adapter: container not found (canvasId: ".concat(this.canvasId,")"));return this._instance=l.Ts(r,this.options.theme,{useDirtyRect:!0,renderer:this.options.renderer||"canvas"}),this._instance&&this._instance.setOption({animation:!1!==(null===(t=this.options.option)||void 0===t?void 0:t.animation),animationDurationUpdate:300,animationEasingUpdate:"cubicOut",progressive:500,progressiveThreshold:1e3},!0),this.options.option&&this._instance&&this._instance.setOption(this.options.option,!1,!0),this.options.onInit&&this._instance&&this.options.onInit(this._instance),this._instance},e.prototype.getInstance=function(){return this._instance},e.prototype.setOption=function(e,t,r){this._instance?this._instance.setOption(e,t,r):this.options.option=e},e.prototype.setTheme=function(e){var t,r;this.options.theme=e,this._instance&&(null===(r=(t=this._instance).setTheme)||void 0===r||r.call(t,e))},e.prototype.getWidth=function(){var e;return(null===(e=this._instance)||void 0===e?void 0:e.getWidth())||0},e.prototype.getHeight=function(){var e;return(null===(e=this._instance)||void 0===e?void 0:e.getHeight())||0},e.prototype.getDom=function(){var e=this.containerRef;return e&&"current"in e?e.current:e},e.prototype.convertToDataURL=function(e){var t;return null===(t=this._instance)||void 0===t?void 0:t.getDataURL(e)},e.prototype.clear=function(){this._instance&&this._instance.clear()},e.prototype.on=function(e,t){this._instance&&this._instance.on(e,t)},e.prototype.off=function(e,t){this._instance&&this._instance.off(e,t)},e.prototype.showLoading=function(e){this._instance&&this._instance.showLoading(e)},e.prototype.hideLoading=function(){this._instance&&this._instance.hideLoading()},e.prototype.setComponent=function(e){this.containerRef=e},e.prototype.render=function(){var e=this.options,t=e.width,r=void 0===t?"100%":t,n=e.height,o=void 0===n?"300px":n,a=e.style,i=void 0===a?{}:a,l=e.direction,c=void 0===l?"ltr":l;return d.createElement("div",{id:this.canvasId,ref:this.containerRef,style:f({width:r,height:o,direction:c},i)})},e.prototype.dispose=function(){this._instance&&(this._instance.dispose(),this._instance=null)},e.prototype.dispatchAction=function(e){this._instance&&this._instance.dispatchAction(e)},e.prototype.getDataURL=function(e){var t;return null===(t=this._instance)||void 0===t?void 0:t.getDataURL(e)},e.prototype.resize=function(e){this._instance&&this._instance.resize(e)},e.prototype.getName=function(){return"H5Adapter"},e.prototype.getVersion=function(){return"1.1.1"},e.prototype.getPlatformInfo=function(){return{platform:"h5",renderer:this.options.renderer||"canvas",userAgent:navigator.userAgent,devicePixelRatio:String(window.devicePixelRatio)}},e}()},384(e,t,r){r.r(t),r.d(t,{createHarmonyAdapter:()=>s,default:()=>u});var n,o=r(2015),a=r(8063),i=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),l=function(){return l=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},l.apply(this,arguments)},c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),Object.defineProperty(t.prototype,"platformName",{get:function(){return"Harmony"},enumerable:!1,configurable:!0}),t.prototype.init=function(){return e.prototype.init.call(this)},t.prototype.render=function(){var e=this.config,t=e.canvasId||"ec-canvas",r=e.width||"100%",n=e.height||"300px",a=e.style||{};return o.createElement("view",{id:t,style:l({width:r,height:n},a)})},t}(a.mY),s=(0,a.iK)(c);const u=c},4871(e,t,r){var n;r.d(t,{li:()=>A,cK:()=>D,_$:()=>I}),r(5587),function(e){e.H5="h5",e.WEAPP="weapp",e.ALIPAY="alipay",e.SWAN="swan",e.TT="tt",e.QQ="qq",e.JD="jd",e.HARMONY="harmony",e.DD="dd",e.QYWX="qywx",e.LARK="lark",e.KWAI="kwai"}(n||(n={})),r(9775),r(5158);var o=r(3087),a=r(491),i=r(5671),l=r(6995),c=r(1030),s=r(2003),u=r(5652),d=r(9714),f=r(4508),p=r(4064),v=r(6641),h=r(655),m=r(5620),y=r(9747),g=r(1830),b=r(9952),x=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))};o.Y(b.a);var C=[a.a,i.a,l.a,c.a,s.a,u.a,d.a,f.a],w=[p.a,v.a,h.a,m.a,y.a,g.a];o.Y(x(x([],C,!0),w,!0));var k,E=r(3424),S=(r(509),r(8689),r(7723),r(266),r(384),function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{c(n.next(e))}catch(e){a(e)}}function l(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(i,l)}c((n=n.apply(e,t||[])).next())})}),O=((k={})[n.H5]={name:"H5"},k[n.WEAPP]={name:"Wechat",requireComponent:!0},k[n.ALIPAY]={name:"Alipay",requireComponent:!0},k[n.SWAN]={name:"Baidu",requireComponent:!0},k[n.TT]={name:"ByteDance",requireComponent:!0},k[n.QQ]={name:"QQ",requireComponent:!0},k[n.JD]={name:"JD",requireComponent:!0},k[n.DD]={name:"DingTalk",requireComponent:!0},k[n.QYWX]={name:"QiyeWechat"},k[n.LARK]={name:"Lark"},k[n.KWAI]={name:"Kwai",requireComponent:!0},k[n.HARMONY]={name:"HarmonyOS",requireComponent:!0},k),T={weapp:n.WEAPP,alipay:n.ALIPAY,swan:n.SWAN,tt:n.TT,qq:n.QQ,jd:n.JD,dd:n.DD,qywx:n.QYWX,lark:n.LARK,kwai:n.KWAI};function A(){var e,t=(0,E.mZ)();return"miniapp"===t.platform&&t.miniAppType?null!==(e=T[t.miniAppType])&&void 0!==e?e:n.H5:"browser"===t.platform&&"undefined"!=typeof navigator&&navigator.userAgent.includes("HarmonyOS")?n.HARMONY:n.H5}function I(){var e=(0,E.mZ)();return e.isBrowser?"h5":e.isMiniApp&&"weapp"===e.miniAppType?"weapp":"unknown"}function D(e){return S(this,void 0,Promise,function(){var t,o;return function(e,t){var r,n,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=l(0),i.throw=l(1),i.return=l(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(c){return function(l){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&l[0]?n.return:l[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,l[1])).done)return o;switch(n=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,n=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){a.label=l[1];break}if(6===l[0]&&a.label<o[1]){a.label=o[1],o=l;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(l);break}o[2]&&a.ops.pop(),a.trys.pop();continue}l=t.call(e,a)}catch(e){l=[6,e],n=0}finally{r=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}}(this,function(a){switch(a.label){case 0:t=A(),null==(o=O[t])||o.requireComponent,a.label=1;case 1:switch(a.trys.push([1,15,,17]),t){case n.H5:case n.ALIPAY:case n.QQ:case n.JD:case n.DD:case n.QYWX:case n.LARK:case n.KWAI:return[3,2];case n.WEAPP:return[3,4];case n.SWAN:return[3,6];case n.TT:return[3,8];case n.HARMONY:return[3,10]}return[3,12];case 2:return[4,Promise.resolve().then(r.bind(r,509))];case 3:return[2,a.sent().default.create(e)];case 4:return[4,Promise.resolve().then(r.bind(r,8689))];case 5:return[2,(0,a.sent().createWeappAdapter)(e)];case 6:return[4,Promise.resolve().then(r.bind(r,7723))];case 7:return[2,(0,a.sent().createSwanAdapter)(e)];case 8:return[4,Promise.resolve().then(r.bind(r,266))];case 9:return[2,(0,a.sent().createTTAdapter)(e)];case 10:return[4,Promise.resolve().then(r.bind(r,384))];case 11:return[2,a.sent().HarmonyAdapter.create(e)];case 12:return[4,Promise.resolve().then(r.bind(r,509))];case 13:return[2,a.sent().default.create(e)];case 14:return[3,17];case 15:return a.sent(),[4,Promise.resolve().then(r.bind(r,509))];case 16:return[2,a.sent().default.create(e)];case 17:return[2]}})})}},7723(e,t,r){r.r(t),r.d(t,{SwanAdapter:()=>i,createSwanAdapter:()=>l,default:()=>c});var n,o=r(8063),a=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),Object.defineProperty(t.prototype,"platformName",{get:function(){return"Swan"},enumerable:!1,configurable:!0}),t}(o.mY),l=(0,o.iK)(i);const c=i},266(e,t,r){r.r(t),r.d(t,{TTAdapter:()=>i,createTTAdapter:()=>l,default:()=>c});var n,o=r(8063),a=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),Object.defineProperty(t.prototype,"platformName",{get:function(){return"TT"},enumerable:!1,configurable:!0}),t}(o.mY),l=(0,o.iK)(i);const c=i},8689(e,t,r){r.r(t),r.d(t,{WeappAdapter:()=>i,createWeappAdapter:()=>l,default:()=>c});var n,o=r(8063),a=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),Object.defineProperty(t.prototype,"platformName",{get:function(){return"Weapp"},enumerable:!1,configurable:!0}),t}(o.mY),l=(0,o.iK)(i);const c=i},1638(e,t,r){r.d(t,{A:()=>d});var n=r(2015),o=r.n(n),a=r(4871),i=r(5158),l=function(){return l=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},l.apply(this,arguments)};function c(e){var t={width:"number"==typeof e.width?e.width:void 0,height:"number"==typeof e.height?e.height:void 0,theme:"string"==typeof e.theme?e.theme:void 0,autoResize:e.autoResize,canvasId:e.canvasId,containerRef:e.containerRef,option:e.option,renderer:e.renderer},r=l({},t);return Object.keys(e).forEach(function(n){n in t||(r[n]=e[n])}),r}var s=function(){return s=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},s.apply(this,arguments)};function u(e){var t=e;return(null==t?void 0:t.series)&&Array.isArray(t.series)?t.series.filter(function(e){return(null==e?void 0:e.data)&&Array.isArray(e.data)}).map(function(e){return{name:e.name||"系列",data:e.data}}):[]}const d=function(e){var t,r,l=e.option,d=e.width,f=void 0===d?"100%":d,p=e.height,v=void 0===p?"300px":p,h=e.theme,m=e.style,y=void 0===m?{}:m,g=e.className,b=void 0===g?"":g,x=e.autoResize,C=void 0===x||x,w=e.loading,k=void 0!==w&&w,E=e.loadingOption,S=e.onChartInit,O=e.onChartReady,T=e.renderer,A=void 0===T?"canvas":T,I=e.onEvents,D=void 0===I?{}:I,R=e.chartType,j=void 0===R?"chart":R,M=(0,n.useRef)("".concat(j,"-").concat((0,i.uR)())),P=(0,n.useRef)(null),N=(0,n.useRef)(null),L=(0,n.useRef)(!0),z=(0,n.useRef)(null),_=(0,n.useId)(),F=(0,n.useMemo)(function(){return u(l)},[l]),H=(0,n.useMemo)(function(){return function(e,t){var r=u(t);if(!r.length)return"chart"===e?"空图表":"".concat(e," 空图表");var n=r.reduce(function(e,t){return e+t.data.length},0),o=r.map(function(e){return e.name}).join("、");return"".concat(e,"图表,包含").concat(r.length,"个系列(").concat(o,"),共").concat(n,"个数据点")}(j,l)},[j,l]),B=(0,n.useCallback)(function(e){var t,r,n,o,a,i,l=P.current;if(l){var c=function(e,t){l.dispatchAction({type:"dataZoom",startDelta:e,endDelta:t})};if("Home"===e.key)return e.preventDefault(),void l.dispatchAction({type:"dataZoom",start:0,end:100});switch(e.key){case"+":case"=":if(e.preventDefault(),f=null===(t=null==(d=l.getOption())?void 0:d.dataZoom)||void 0===t?void 0:t[0]){var s=Math.max(0,(null!==(r=f.end)&&void 0!==r?r:100)-5),u=Math.max(0,(null!==(n=f.start)&&void 0!==n?n:0)-5);l.dispatchAction({type:"dataZoom",start:u,end:s})}break;case"-":case"_":var d,f;e.preventDefault(),(f=null===(o=null==(d=l.getOption())?void 0:d.dataZoom)||void 0===o?void 0:o[0])&&(s=Math.min(100,(null!==(a=f.end)&&void 0!==a?a:100)+5),u=Math.min((null!==(i=f.start)&&void 0!==i?i:0)+5,s),l.dispatchAction({type:"dataZoom",start:u,end:s}));break;case"ArrowLeft":e.preventDefault(),c(-10,0);break;case"ArrowRight":e.preventDefault(),c(10,0);break;case"ArrowUp":e.preventDefault(),c(0,-10);break;case"ArrowDown":e.preventDefault(),c(0,10)}}},[]),U=(0,n.useMemo)(function(){return c({canvasId:M.current,containerRef:N,width:f,height:v,theme:h,autoResize:C,renderer:A,option:l})},[f,v,h,C,A,l]);(0,n.useEffect)(function(){return L.current=!0,e=void 0,t=void 0,n=function(){var e,t,r;return function(e,t){var r,n,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=l(0),i.throw=l(1),i.return=l(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(c){return function(l){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&l[0]?n.return:l[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,l[1])).done)return o;switch(n=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,n=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){a.label=l[1];break}if(6===l[0]&&a.label<o[1]){a.label=o[1],o=l;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(l);break}o[2]&&a.ops.pop(),a.trys.pop();continue}l=t.call(e,a)}catch(e){l=[6,e],n=0}finally{r=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}}(this,function(n){switch(n.label){case 0:return e=c(s(s({},U),{onInit:function(e){L.current?(P.current=e,D&&Object.entries(D).forEach(function(t){var r=t[0],n=t[1];e.on(r,n)}),S&&S(e),O&&O(e)):e.dispose()}})),[4,(0,a.cK)(e)];case 1:return t=n.sent(),r=t,L.current?(t.init(),z.current=function(){var e;null===(e=r.dispose)||void 0===e||e.call(r);var t=P.current;t&&(D&&Object.entries(D).forEach(function(e){var r=e[0];t.off(r)}),t.dispose(),P.current=null)},[2]):[2]}})},new((r=void 0)||(r=Promise))(function(o,a){function i(e){try{c(n.next(e))}catch(e){a(e)}}function l(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(i,l)}c((n=n.apply(e,t||[])).next())}),function(){L.current=!1,z.current&&(z.current(),z.current=null)};var e,t,r,n},[U,S,O,D]),(0,n.useEffect)(function(){P.current&&l&&P.current.setOption(l,!0)},[l]),(0,n.useEffect)(function(){P.current&&(k?P.current.showLoading(E):P.current.hideLoading())},[k,E]);var W=s({width:"number"==typeof f?"".concat(f,"px"):f,height:"number"==typeof v?"".concat(v,"px"):v},y);return o().createElement(o().Fragment,null,o().createElement("table",{id:_,"aria-label":"".concat(j," 图表数据"),style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0,0,0,0)",clipPath:"inset(50%)",whiteSpace:"nowrap"},"aria-live":"polite","aria-atomic":"false"},o().createElement("caption",null,H),o().createElement("thead",null,o().createElement("tr",null,F.map(function(e,t){return o().createElement("th",{key:t,scope:"col"},e.name)}))),o().createElement("tbody",null,Array.from({length:Math.min(20,null!==(r=null===(t=F[0])||void 0===t?void 0:t.data.length)&&void 0!==r?r:0)}).map(function(e,t){return o().createElement("tr",{key:t},F.map(function(e,r){var n;return o().createElement("td",{key:r},String(null!==(n=e.data[t])&&void 0!==n?n:""))}))}))),o().createElement("div",{className:"taroviz-".concat(j," ").concat(b),style:W,ref:N,role:"application","aria-label":H,"aria-describedby":_,tabIndex:0,onKeyDown:B}))}},9150(e,t,r){r.r(t),r.d(t,{BarChart:()=>A,BoxplotChart:()=>g,FunnelChart:()=>f,GraphChart:()=>k,HeatmapChart:()=>d,LineChart:()=>T,ParallelChart:()=>h,PieChart:()=>I,RadarChartCustom:()=>w,SankeyChart:()=>E,ScatterChart:()=>D,SunburstChart:()=>j,TreeChart:()=>C,TreeMapChart:()=>R,WordCloudChart:()=>O});var n=r(2015),o=r.n(n),a=r(1638),i=function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function l(e,t,r){void 0===r&&(r=!1);var l=(0,n.memo)(function(e){return o().createElement(a.A,i({},e,{option:e.option,chartType:t}))});return l.displayName=e,l}var c=r(1017),s=function(){return s=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},s.apply(this,arguments)};function u(e,t){var r=function(e){e.optionMerge;var r=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(e,["optionMerge"]),n=t(e);return n?o().createElement(c.Ay,s({option:n},r)):null};return r.displayName=e,r}const d=u("HeatmapChart",function(e){var t=e.xData,r=e.yData,n=e.data,o=e.visualMap,a=e.optionMerge;if(!t||0===t.length)return null;if(!r||0===r.length)return null;if(!n||0===n.length)return null;var i={type:"heatmap",data:n.map(function(e){return[e.x,e.y,e.value]}),label:{show:!0,formatter:function(e){var t;return e&&3===(null===(t=e.value)||void 0===t?void 0:t.length)?e.value[2]:""}},emphasis:{itemStyle:{shadowBlur:10,shadowColor:"rgba(0, 0, 0, 0.5)"}}},l={tooltip:{position:"top",formatter:function(e){if(!e||!e.data)return"";var t=e.data,r=t[0],n=t[1],o=t[2];return"<b>".concat(r," × ").concat(n,"</b><br/>值: ").concat(o)}},xAxis:{type:"category",data:t,axisLabel:{rotate:t.length>10?45:0}},yAxis:{type:"category",data:r,axisLabel:{rotate:r.length>10?45:0}},series:i,visualMap:o||{min:0,max:Math.max.apply(Math,n.map(function(e){return e.value})),calculable:!0,orient:"horizontal",left:"center",top:"bottom",text:["高","低"]}};return a&&Object.assign(l,a),l}),f=u("FunnelChart",function(e){var t=e.data,r=e.sort,n=e.align,o=e.gap,a=e.min,i=e.max,l=e.optionMerge;if(!t||0===t.length)return null;var c={tooltip:{trigger:"item",formatter:function(e){return e&&e.data?"<b>".concat(e.data.name,"</b><br/>值: ").concat(e.data.value):""}},series:{type:"funnel",data:t,sort:r||"descending",align:n||"left",gap:o||2,min:a||0,max:i||100,label:{show:!0,position:"inside"},emphasis:{itemStyle:{shadowBlur:10,shadowColor:"rgba(0, 0, 0, 0.5)"}}}};return l&&Object.assign(c,l),c});var p=function(){return p=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},p.apply(this,arguments)},v=(0,n.memo)(function(e){return o().createElement(a.A,p({},e,{option:e.option,chartType:"parallel"}))});v.displayName="ParallelChart";const h=v;var m=function(){return m=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},m.apply(this,arguments)},y=(0,n.memo)(function(e){return o().createElement(a.A,m({},e,{option:e.option,chartType:"boxplot"}))});y.displayName="BoxplotChart";const g=y;var b=function(){return b=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},b.apply(this,arguments)},x=(0,n.memo)(function(e){var t=e.option,r=e.treeData,i=e.layout,l=void 0===i?"orthogonal":i,c=e.orient,s=void 0===c?"horizontal":c,u=e.nodeGap,d=e.nodeWidth,f=e.initialTreeDepth,p=e.symbol,v=e.symbolSize,h=e.showLine,m=void 0===h||h,y=e.lineCurveness,g=e.label,x=e.labelPosition,C=e.labelAlign,w=e.lineStyle,k=e.itemStyle,E=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(e,["option","treeData","layout","orient","nodeGap","nodeWidth","initialTreeDepth","symbol","symbolSize","showLine","lineCurveness","label","labelPosition","labelAlign","lineStyle","itemStyle"]),S=(0,n.useMemo)(function(){var e=t||{};if(e.series&&e.series.length>0)return e;var n={type:"tree",layout:l,orient:s,_data:r,showLine:m};return void 0!==u&&(n.nodeGap=u),void 0!==d&&(n.nodeWidth=d),void 0!==f&&(n.initialTreeDepth=f),void 0!==p&&(n.symbol=p),void 0!==v&&(n.symbolSize=v),void 0!==y&&(n.lineCurveness=y),void 0!==g&&(n.label=g),void 0!==x&&(n.labelPosition=x),void 0!==C&&(n.labelAlign=C),void 0!==w&&(n.lineStyle=w),void 0!==k&&(n.itemStyle=k),b(b({},e),{series:[n]})},[t,r,l,s,u,d,f,p,v,m,y,g,x,C,w,k]);return o().createElement(a.A,b({},E,{option:S,chartType:"tree"}))});x.displayName="TreeChart";const C=x,w=u("RadarChart",function(e){var t=e.indicators,r=e.data,n=e.startAngle,o=void 0===n?90:n,a=e.centerCircle,i=void 0!==a&&a,l=e.centerCircleSize,c=void 0===l?0:l,s=e.areaStyle,u=e.lineStyle,d=e.label,f=e.smooth,p=void 0!==f&&f,v=e.optionMerge;if(!t||0===t.length)return null;if(!r||0===r.length)return null;r[0].value.length,t.length;var h=r.map(function(e,t){var r,n,o,a,i;return{type:"radar",data:[e],symbol:"circle",symbolSize:6,lineStyle:{width:null!==(r=null==u?void 0:u.width)&&void 0!==r?r:2,type:null!==(n=null==u?void 0:u.type)&&void 0!==n?n:"solid",color:null==u?void 0:u.color},areaStyle:s?{color:s.color,opacity:null!==(o=s.opacity)&&void 0!==o?o:.3}:void 0,label:d?{show:null!==(a=d.show)&&void 0!==a&&a,position:null!==(i=d.position)&&void 0!==i?i:"outside"}:void 0,itemStyle:{color:"rgba(54, 157, 255, ".concat(.1+.1*t,")"),borderColor:"#369dff",borderWidth:2},emphasis:{focus:"series"},smooth:p}}),m={radar:{indicator:t.map(function(e){var t;return{name:e.name,max:e.max,min:null!==(t=e.min)&&void 0!==t?t:0}}),startAngle:o,center:["50%","50%"],radius:i?"".concat(70-30*c,"%"):"70%",centerCircle:i,centerCircleSize:c,splitNumber:5,axisName:{color:"#666",fontSize:12},splitLine:{lineStyle:{color:["#eee","#ddd"]}},splitArea:{areaStyle:{color:["#fafafa","#f5f5f5"],opacity:.5}},axisLine:{lineStyle:{color:"#ccc"}}},series:h,legend:{data:r.map(function(e,t){return e.name||"系列 ".concat(t+1)}),top:30},tooltip:{trigger:"item",formatter:function(e){if(!e||!e.data)return"";var r=e.seriesName||"未知系列",n=e.data.value.map(function(e,r){var n;return"".concat((null===(n=t[r])||void 0===n?void 0:n.name)||"N/A",": ").concat(e)});return"<b>".concat(r,"</b><br/>").concat(n.join("<br/>"))}}};return v&&Object.assign(m,v),m}),k=u("GraphChart",function(e){var t=e.nodes,r=e.links,n=e.layout,o=e.force,a=e.draggable,i=e.optionMerge;if(!t||0===t.length)return null;var l={type:"graph",layout:n||"force",data:t,links:r||[],draggable:!1!==a,label:{show:!0,position:"right"},emphasis:{focus:"adjacency",lineStyle:{width:4}}};"force"===n&&o&&(l.force=o);var c={tooltip:{trigger:"item",formatter:function(e){return e&&e.data?"<b>".concat(e.data.name,"</b>"):""}},legend:{data:t.map(function(e){return e.name})},series:l};return i&&Object.assign(c,i),c}),E=u("SankeyChart",function(e){var t=e.nodes,r=e.links,n=e.nodeAlign,o=e.nodeGap,a=e.nodeWidth,i=e.orient,l=e.optionMerge;if(!t||0===t.length)return null;if(!r||0===r.length)return null;var c={tooltip:{trigger:"item",formatter:function(e){return e&&e.data?"<b>".concat(e.data.name,"</b>"):""}},series:{type:"sankey",layout:"none",data:t,links:r,orient:i||"horizontal",nodeAlign:n||"left",nodeGap:o||8,nodeWidth:a||20,label:{show:!0,position:"right"},emphasis:{focus:"adjacency",lineStyle:{width:4}}}};return l&&Object.assign(c,l),c});var S=function(){return S=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},S.apply(this,arguments)};const O=u("WordCloudChart",function(e){var t=e.wordCloudData,r=e.shape,n=e.sizeRange,o=e.rotationRange,a=e.rotationStep,i=e.gridSize,l=e.drawOutOfBound,c=e.textStyle,s=e.optionMerge;if(!t||0===t.length)return null;var u={tooltip:{trigger:"item",formatter:function(e){return e&&e.data?"<b>".concat(e.data.name,"</b><br/>词频: ").concat(e.data.value):""}},series:{type:"wordCloud",shape:r||"circle",data:t,sizeRange:n||[12,60],rotationRange:o||[-90,90],rotationStep:a||45,gridSize:i||8,drawOutOfBound:!1!==l,textStyle:S({fontFamily:"sans-serif",fontWeight:"bold"},c),emphasis:{itemStyle:{shadowBlur:10,shadowColor:"rgba(0, 0, 0, 0.5)"}}}};return s&&Object.assign(u,s),u});var T=l("LineChart","line-chart"),A=l("BarChart","bar-chart"),I=l("PieChart","pie-chart"),D=l("ScatterChart","scatter-chart"),R=l("TreeMapChart","treemap-chart"),j=l("SunburstChart","sunburst-chart")},9775(e,t,r){var n;r.d(t,{ek:()=>l}),function(e){e._ANIMATION_START="animationStart",e._ANIMATION_UPDATE="animationUpdate",e._ANIMATION_END="animationEnd",e._ANIMATION_CANCEL="animationCancel",e._ANIMATION_REPEAT="animationRepeat"}(n||(n={}));var o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o.apply(this,arguments)},a=[{name:"default",description:"默认动画配置 — 专业级 (300-500ms, cubicOut)",config:{enabled:!0,duration:400,easing:"cubicOut",appearDuration:450,appearEasing:"cubicOut",updateDuration:300,updateEasing:"cubicOut",disappearDuration:250,disappearEasing:"cubicIn",threshold:1e3,progressive:!0,progressiveStep:500}},{name:"fast",description:"快速动画配置 — 微交互 (150-200ms)",config:{enabled:!0,duration:150,easing:"cubicOut",appearDuration:200,appearEasing:"cubicOut",updateDuration:150,updateEasing:"cubicOut",disappearDuration:100,disappearEasing:"cubicIn",threshold:2e3,progressive:!0,progressiveStep:1e3}},{name:"slow",description:"慢速动画配置 — 页面过渡 (500-600ms, capped)",config:{enabled:!0,duration:500,easing:"cubicInOut",appearDuration:600,appearEasing:"cubicInOut",updateDuration:400,updateEasing:"cubicInOut",disappearDuration:300,disappearEasing:"cubicInOut",threshold:500,progressive:!0,progressiveStep:250}},{name:"bounce",description:"[已废弃] 弹跳动画 — 请使用 default 或 fast",config:{enabled:!1,duration:0,easing:"cubicOut",appearDuration:0,appearEasing:"cubicOut",updateDuration:0,updateEasing:"cubicOut",disappearDuration:0,disappearEasing:"cubicIn",threshold:500,progressive:!1,progressiveStep:250}},{name:"elastic",description:"[已废弃] 弹性动画 — 请使用 default 或 fast",config:{enabled:!1,duration:0,easing:"cubicOut",appearDuration:0,appearEasing:"cubicOut",updateDuration:0,updateEasing:"cubicOut",disappearDuration:0,disappearEasing:"cubicIn",threshold:500,progressive:!1,progressiveStep:250}}],i=function(){function e(e){this.presets=new Map,this.templates=new Map,this.eventHandlers=new Map,this.defaultConfig=(null==e?void 0:e.defaultConfig)||a[0].config,this.performanceConfig=(null==e?void 0:e.performance)||{monitor:!1,frameRate:60,hardwareAcceleration:!0},this.registerPresets(a)}return e.getInstance=function(t){return e.instance?t&&e.instance.updateConfig(t):e.instance=new e(t),e.instance},e.prototype.registerPreset=function(e){this.presets.set(e.name,e)},e.prototype.registerPresets=function(e){var t=this;e.forEach(function(e){return t.registerPreset(e)})},e.prototype.getPreset=function(e){return this.presets.get(e)},e.prototype.getAllPresets=function(){return Array.from(this.presets.values())},e.prototype.registerTemplate=function(e){this.templates.set(e.name,e)},e.prototype.getTemplate=function(e){return this.templates.get(e)},e.prototype.getAllTemplates=function(){return Array.from(this.templates.values())},e.prototype.setDefaultConfig=function(e){this.defaultConfig=e},e.prototype.getDefaultConfig=function(){return this.defaultConfig},e.prototype.getOptimizedConfig=function(e,t){void 0===e&&(e={}),void 0===t&&(t=0);var r=o(o({},this.defaultConfig),e);return"undefined"!=typeof window&&window.matchMedia("(prefers-reduced-motion: reduce)").matches?o(o({},r),{enabled:!1,duration:0,appearDuration:0,updateDuration:0,disappearDuration:0}):(r.threshold&&t>r.threshold&&(r.enabled=!1),r)},e.prototype.getAnimationConfigByType=function(e,t){switch(t){case"appear":return{duration:e.appearDuration||e.duration||1e3,easing:e.appearEasing||e.easing||"cubicOut"};case"update":return{duration:e.updateDuration||e.duration||800,easing:e.updateEasing||e.easing||"cubicOut"};case"disappear":return{duration:e.disappearDuration||e.duration||600,easing:e.disappearEasing||e.easing||"cubicIn"};case"emphasis":return{duration:e.duration||300,easing:e.easing||"cubicOut"};default:return{duration:e.duration||1e3,easing:e.easing||"cubicOut"}}},e.prototype.generateEChartsAnimationConfig=function(e,t){void 0===e&&(e={}),void 0===t&&(t=0);var r=this.getOptimizedConfig(e,t);return r.enabled?{animation:!0,animationDuration:r.duration,animationEasing:r.easing,animationDelay:r.delay,animationDurationUpdate:r.updateDuration,animationEasingUpdate:r.updateEasing,animationDelayUpdate:r.delay,animationThreshold:r.threshold,progressive:r.progressive,progressiveThreshold:r.progressiveStep,progressiveChunkMode:"sequential"}:{animation:!1}},e.prototype.on=function(e,t){var r;this.eventHandlers.has(e)||this.eventHandlers.set(e,new Set),null===(r=this.eventHandlers.get(e))||void 0===r||r.add(t)},e.prototype.off=function(e,t){var r;t?null===(r=this.eventHandlers.get(e))||void 0===r||r.delete(t):this.eventHandlers.delete(e)},e.prototype.emit=function(e,t){var r=this.eventHandlers.get(e);r&&r.forEach(function(e){try{e(t)}catch(e){}})},e.prototype.updatePerformanceConfig=function(e){this.performanceConfig=o(o({},this.performanceConfig),e)},e.prototype.updateConfig=function(e){e.defaultConfig&&(this.defaultConfig=e.defaultConfig),e.performance&&this.updatePerformanceConfig(e.performance)},e.prototype.getPerformanceConfig=function(){return this.performanceConfig},e.prototype.reset=function(){this.presets.clear(),this.templates.clear(),this.eventHandlers.clear(),this.registerPresets(a)},e}();function l(e,t){return void 0===e&&(e={}),void 0===t&&(t=0),i.getInstance().generateEChartsAnimationConfig(e,t)}i.getInstance()},1017(e,t,r){r.d(t,{Ay:()=>y});var n=r(2015),o=r.n(n);function a(e,t){if(null==e)return e;if("object"!=typeof e&&"function"!=typeof e)return e;if("function"==typeof e)return e;if(t||(t=new WeakMap),t.has(e))return t.get(e);if(e instanceof Date){var r=new Date(e.getTime());return t.set(e,r),r}if(e instanceof RegExp){var n=new RegExp(e.source,e.flags);return t.set(e,n),n}if(e instanceof Map){var o=new Map;return t.set(e,o),e.forEach(function(e,r){o.set(a(r,t),a(e,t))}),o}if(e instanceof Set){var i=new Set;return t.set(e,i),e.forEach(function(e){i.add(a(e,t))}),i}if(Array.isArray(e)){var l=[];t.set(e,l);for(var c=0;c<e.length;c++)l[c]=a(e[c],t);return l}var s={};t.set(e,s);for(var u=0,d=Object.keys(e);u<d.length;u++){var f=d[u];s[f]=a(e[f],t)}return s}var i,l=r(9775),c={};function s(e){return c[e]}!function(e){e.MONITORING_START="performanceMonitoringStart",e.MONITORING_END="performanceMonitoringEnd",e.METRIC_UPDATE="performanceMetricUpdate",e.ANALYSIS_COMPLETE="performanceAnalysisComplete"}(i||(i={}));var u=function(){return u=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},u.apply(this,arguments)},d=function(){function e(e){void 0===e&&(e={});var t,r=this;this.metrics=new Map,this.eventHandlers=new Map,this.isMonitoring=!1,this.startTime=0,this.sampleIntervalId=null,this.frameRateHistory=[],this.lastFrameTime=0,this.rafId=null,this.config=u({enabled:!0,metrics:["initTime","renderTime","updateTime","dataSize","frameRate"],sampleInterval:1e3,maxSamples:100,realTime:!0,autoStart:!1},e),null===(t=this.config.metrics)||void 0===t||t.forEach(function(e){r.metrics.set(e,[])}),this.config.autoStart&&this.start()}return e.getInstance=function(t){return(null==t?void 0:t.chartId)?(e.instances.has(t.chartId)||e.instances.set(t.chartId,new e(t)),e.instances.get(t.chartId)):(e.instance||(e.instance=new e(t)),e.instance)},e.resetInstance=function(){e.instance&&(e.instance.stop(),e.instance=null)},e.resetAllInstances=function(){e.resetInstance(),e.instances.forEach(function(e){return e.stop()}),e.instances.clear()},e.prototype.on=function(e,t){var r;this.eventHandlers.has(e)||this.eventHandlers.set(e,[]),null===(r=this.eventHandlers.get(e))||void 0===r||r.push(t)},e.prototype.off=function(e,t){var r=this.eventHandlers.get(e);if(r){var n=r.indexOf(t);n>-1&&r.splice(n,1)}},e.prototype.emit=function(e,t){var r=this.eventHandlers.get(e),n=void 0===t?{type:e}:(i.METRIC_UPDATE,{type:e,data:t});null==r||r.forEach(function(e){try{e(n)}catch(e){}})},e.prototype.start=function(){var e=this;!this.isMonitoring&&this.config.enabled&&(this.isMonitoring=!0,this.startTime=Date.now(),this.lastFrameTime="undefined"!=typeof performance?performance.now():Date.now(),this.config.sampleInterval&&this.config.realTime&&(this.sampleIntervalId=setInterval(function(){e.sampleMetrics()},this.config.sampleInterval)),this.startFrameRateMonitoring(),this.emit(i.MONITORING_START))},e.prototype.stop=function(){this.isMonitoring&&(this.isMonitoring=!1,this.sampleIntervalId&&(clearInterval(this.sampleIntervalId),this.sampleIntervalId=null),this.stopFrameRateMonitoring(),this.emit(i.MONITORING_END))},e.prototype.dispose=function(){this.stop(),this.metrics.clear(),this.eventHandlers.clear(),this.frameRateHistory=[],e.instance===this&&(e.instance=null)},e.prototype.startFrameRateMonitoring=function(){var e=this;if("undefined"!=typeof requestAnimationFrame&&"undefined"!=typeof performance){var t=function(){var r;if(e.isMonitoring){var n=performance.now(),o=n-e.lastFrameTime,a=o>0?Math.round(1e3/o):0,i=null!==(r=e.config.maxSamples)&&void 0!==r?r:100;e.frameRateHistory.length>=i&&e.frameRateHistory.shift(),e.frameRateHistory.push(a),e.lastFrameTime=n,e.rafId=requestAnimationFrame(t)}};this.rafId=requestAnimationFrame(t)}},e.prototype.stopFrameRateMonitoring=function(){null!==this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=null),this.frameRateHistory=[]},e.prototype.sampleMetrics=function(){var e,t,r;if(this.isMonitoring){if((null===(e=this.config.metrics)||void 0===e?void 0:e.includes("frameRate"))&&this.frameRateHistory.length>0){var n=this.frameRateHistory.reduce(function(e,t){return e+t},0)/this.frameRateHistory.length;this.recordMetric("frameRate",n,"FPS")}if((null===(t=this.config.metrics)||void 0===t?void 0:t.includes("memoryUsage"))&&void 0!==performance.memory){var o=performance.memory,a=((null!==(r=null==o?void 0:o.usedJSHeapSize)&&void 0!==r?r:0)/1048576).toFixed(2);this.recordMetric("memoryUsage",parseFloat(a),"MB")}}},e.prototype.recordMetric=function(e,t,r,n){var o;if(this.config.enabled&&(null===(o=this.config.metrics)||void 0===o?void 0:o.includes(e))){var a={type:e,value:t,unit:r,timestamp:Date.now(),description:n},l=this.metrics.get(e)||[];l.push(a),this.config.maxSamples&&l.length>this.config.maxSamples&&l.shift(),this.metrics.set(e,l),this.emit(i.METRIC_UPDATE,a)}},e.prototype.recordInitTime=function(e){this.recordMetric("initTime",e,"ms","图表初始化耗时")},e.prototype.recordRenderTime=function(e){this.recordMetric("renderTime",e,"ms","图表渲染耗时")},e.prototype.recordUpdateTime=function(e){this.recordMetric("updateTime",e,"ms","图表更新耗时")},e.prototype.recordDataSize=function(e){try{var t=new Blob([JSON.stringify(e)]).size/1024;this.recordMetric("dataSize",t,"KB","图表数据大小")}catch(e){}},e.prototype.analyze=function(){var e={},t={},r={},n={},o=0,a=100,l=[];this.metrics.forEach(function(a,i){if(0!==a.length){o+=a.length,n[i]=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}([],a,!0);var l=a.reduce(function(e,t){return e+t.value},0);e[i]=parseFloat((l/a.length).toFixed(2)),t[i]=Math.max.apply(Math,a.map(function(e){return e.value})),r[i]=Math.min.apply(Math,a.map(function(e){return e.value}))}}),void 0!==e.renderTime&&e.renderTime>100&&(a-=20,l.push("渲染时间过长,建议优化数据处理或减少图表复杂度")),void 0!==e.updateTime&&e.updateTime>50&&(a-=15,l.push("更新时间过长,建议优化数据更新逻辑")),void 0!==e.frameRate&&e.frameRate<30&&(a-=25,l.push("帧率过低,建议减少动画效果或优化渲染逻辑")),void 0!==e.dataSize&&e.dataSize>100&&(a-=10,l.push("数据量过大,建议进行数据压缩或分页处理")),a=Math.max(0,Math.min(100,a));var c={averages:e,maxValues:t,minValues:r,trends:n,score:a,suggestions:l,totalSamples:o,duration:Date.now()-this.startTime};return this.emit(i.ANALYSIS_COMPLETE,c),c},e.prototype.generateReport=function(e){void 0===e&&(e={});var t=this.analyze(),r=u({format:"json",includeCharts:!1,includeSuggestions:!0,includeDetailedData:!1},e);switch(r.format){case"json":default:return this.generateJsonReport(t,r);case"csv":return this.generateCsvReport(t,r);case"html":return this.generateHtmlReport(t,r)}},e.prototype.generateJsonReport=function(e,t){var r={timestamp:(new Date).toISOString(),duration:e.duration,score:e.score,totalSamples:e.totalSamples};return t.includeSuggestions&&(r.suggestions=e.suggestions),t.includeDetailedData&&(r.averages=e.averages,r.maxValues=e.maxValues,r.minValues=e.minValues,r.trends=e.trends),r},e.prototype.generateCsvReport=function(e,t){var r="Metric,Type,Value,Unit\n";return Object.entries(e.averages).forEach(function(e){var t=e[0],n=e[1];r+="".concat(t,",Average,").concat(n,",ms\n")}),Object.entries(e.maxValues).forEach(function(e){var t=e[0],n=e[1];r+="".concat(t,",Max,").concat(n,",ms\n")}),Object.entries(e.minValues).forEach(function(e){var t=e[0],n=e[1];r+="".concat(t,",Min,").concat(n,",ms\n")}),r},e.prototype.generateHtmlReport=function(e,t){var r='\n <!DOCTYPE html>\n <html>\n <head>\n <title>TaroViz 性能报告</title>\n <style>\n body { font-family: Arial, sans-serif; margin: 20px; }\n .report-header { background: #f0f0f0; padding: 20px; border-radius: 8px; }\n .score { font-size: 48px; font-weight: bold; color: #4CAF50; }\n .metric-section { margin: 20px 0; }\n .metric-table { border-collapse: collapse; width: 100%; }\n .metric-table th, .metric-table td { border: 1px solid #ddd; padding: 8px; text-align: left; }\n .metric-table th { background-color: #f2f2f2; }\n .suggestions { background: #fff3cd; padding: 15px; border-radius: 8px; margin: 20px 0; }\n </style>\n </head>\n <body>\n <div class="report-header">\n <h1>TaroViz 性能报告</h1>\n <p>生成时间: '.concat((new Date).toISOString(),"</p>\n <p>监控时长: ").concat(Math.round(e.duration/1e3),' 秒</p>\n <div class="score">').concat(e.score," / 100</div>\n </div>\n ");return r+='\n <div class="metric-section">\n <h2>性能指标</h2>\n <table class="metric-table">\n <tr>\n <th>指标</th>\n <th>平均值</th>\n <th>最大值</th>\n <th>最小值</th>\n </tr>',Object.entries(e.averages).forEach(function(t){var n=t[0],o=t[1],a=e.maxValues[n],i=e.minValues[n];r+="\n <tr>\n <td>".concat(n,"</td>\n <td>").concat(o," ms</td>\n <td>").concat(a," ms</td>\n <td>").concat(i," ms</td>\n </tr>")}),r+="\n </table>\n </div>",t.includeSuggestions&&e.suggestions.length>0&&(r+='\n <div class="suggestions">\n <h2>性能建议</h2>\n <ul>',e.suggestions.forEach(function(e){r+="\n <li>".concat(e,"</li>")}),r+="\n </ul>\n </div>"),r+="\n </body>\n </html>"},e.prototype.getIsMonitoring=function(){return this.isMonitoring},e.prototype.getConfig=function(){return u({},this.config)},e.prototype.updateConfig=function(e){this.config=u(u({},this.config),e)},e.prototype.getMetricsByType=function(e){return this.metrics.get(e)||[]},e.prototype.clearMetrics=function(){this.metrics.clear(),this.frameRateHistory=[],this.startTime=Date.now()},e.prototype.getScore=function(){return this.analyze().score},e.instance=null,e.instances=new Map,e}();function f(e,t){return void 0===e?t:"number"==typeof e?"".concat(e,"px"):e}d.getInstance();var p=r(1638),v=(r(5587),function(){return v=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},v.apply(this,arguments)}),h=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))};function m(e){if(null==e)return 0;if("string"==typeof e)return e.length;if("object"!=typeof e)return 8;var t=0,r=e;for(var n in r)if(Object.prototype.hasOwnProperty.call(r,n)){t+=n.length+1;var o=r[n];"string"==typeof o?t+=o.length+2:Array.isArray(o)?t+=4*o.length:t+="object"==typeof o&&null!==o?m(o):8}return t}const y=function(e){var t=e.chartId,r=e.option,i=e.animation,u=e.width,y=void 0===u?"100%":u,g=e.height,b=void 0===g?"300px":g,x=e.theme,C=e.autoResize,w=void 0===C||C,k=e.direction,E=void 0===k?"ltr":k,S=e.onInit,O=(e.onClick,e.onDataZoom,e.style),T=e.className,A=(e.children,e.virtualScroll),I=void 0!==A&&A,D=e.virtualScrollPageSize,R=void 0===D?100:D,j=e.virtualScrollPreloadSize,M=void 0===j?50:j,P=e.enablePerformanceMonitoring,N=void 0!==P&&P,L=e.onPerformance,z=e.enableZoom,_=void 0!==z&&z,F=e.onZoom,H=e.enableDataFiltering,B=void 0!==H&&H,U=e._filters,W=void 0===U?{}:U,G=e.onDataFiltered,Z=e.enableLegendInteraction,Y=void 0!==Z&&Z,q=e.legendInteractionMode,V=void 0===q?"single":q,J=e.onLegendSelect,K=e.onLegendUnselect,Q=(e.onLegendSelectAll,e.onLegendInverseSelect,e.enableCustomTooltip),$=void 0!==Q&&Q,X=e.customTooltipContent,ee=e.customTooltipStyle,te=e.onTooltipShow,re=e.onTooltipHide,ne=(e.onExport,e.linkageConfig),oe=void 0===ne?{}:ne,ae=e.onDataUpdate,ie=e._dataUpdateOptions,le=void 0===ie?{}:ie,ce=(0,n.useRef)(null),se=(0,n.useRef)({initStartTime:0,initEndTime:0,renderStartTime:0,renderEndTime:0,updateStartTime:0,updateEndTime:0}),ue=(0,n.useRef)({currentPage:0,totalPages:1,totalDataCount:0,isScrolling:!1}),de=(0,n.useRef)(r),fe=(0,n.useRef)(null),pe=(0,n.useRef)(null),ve=(0,n.useMemo)(function(){if(r){var e=v({},r);if(B&&W&&Object.keys(W).length>0&&(e=a(e)).series&&Array.isArray(e.series)&&(e.series=e.series.map(function(e){var t,r,n=e;if(n._data&&Array.isArray(n._data)){var o=(t=n._data,(r=W)&&0!==Object.keys(r).length?t.filter(function(e){for(var t=0,n=Object.entries(r);t<n.length;t++){var o=n[t],a=o[0],i=o[1],l=e[a];if(!(l===i||Array.isArray(l)&&l.includes(i)))return!1}return!0}):t);if(G&&G(o,W),I){ue.current.totalDataCount=o.length,ue.current.totalPages=Math.ceil(o.length/R);var a=ue.current.currentPage*R,i=Math.min(a+R+M,o.length);return v(v({},n),{_data:o.slice(a,i)})}return v(v({},n),{_data:o})}return n})),_){e=a(e);var t=Array.isArray(e._dataZoom)?e._dataZoom:e._dataZoom?[e._dataZoom]:[];t.some(function(e){return"inside"===(null==e?void 0:e.type)})||(e._dataZoom=h(h([],t||[],!0),[{type:"inside",start:0,end:100,zoomOnMouseWheel:!0,moveOnMouseMove:!1}],!1))}var n=function(e){if(!e)return 0;var t=0;if(e.series)for(var r=0,n=Array.isArray(e.series)?e.series:[e.series];r<n.length;r++){var o=n[r];o.data&&(Array.isArray(o.data)?t+=o.data.length:"object"==typeof o.data&&(t+=Object.keys(o.data).length))}return t}(e),o=(0,l.ek)(i,n);return v(v({},e),o)}},[r,i,_,B,W,I,R,M,G]),he=(0,n.useCallback)(function(e){ce.current=e,fe.current=e,N&&(pe.current=d.getInstance({chartId:t,enabled:!0,metrics:["initTime","renderTime","updateTime","dataSize","frameRate"],sampleInterval:1e3,maxSamples:100,realTime:!0,autoStart:!0})),se.current.initStartTime=Date.now(),t&&function(e,t){if(c[e])try{c[e].dispose()}catch(e){}c[e]=t}(t,e),e&&(oe.enableClickLinkage&&t&&oe.linkedChartIds&&e.on("click",function(e){oe.linkedChartIds.forEach(function(t){var r=s(t);r&&r.dispatchAction({type:"highlight",name:e.name})})}),e.on("_datazoom",function(e){var r=e;if(F&&F({start:r.start||0,end:r.end||100,_dataZoomIndex:r._dataZoomIndex||0}),I&&!ue.current.isScrolling){ue.current.isScrolling=!0;var n=Math.floor((r.start||0)/100*ue.current.totalPages);n!==ue.current.currentPage&&(ue.current.currentPage=n),setTimeout(function(){ue.current.isScrolling=!1},100)}oe.enableZoomLinkage&&t&&oe.linkedChartIds&&oe.linkedChartIds.forEach(function(e){var t=s(e);t&&t.dispatchAction({type:"_dataZoom",start:r.start,end:r.end,_dataZoomIndex:r._dataZoomIndex})})}),Y&&e.on("legendselectchanged",function(r){var n=r,o=n.name,a=n.selected;if(oe.enableLegendLinkage&&t&&oe.linkedChartIds&&oe.linkedChartIds.forEach(function(e){var t=s(e);t&&t.setOption({legend:{selected:a}})}),"single"===V){var i={};Object.keys(a).forEach(function(e){i[e]=e===o}),e.setOption({legend:{selected:i}}),void 0!==o&&(null==J||J({name:o,selected:i}))}else void 0!==o&&a[o]?null==J||J({name:o,selected:a}):void 0!==o&&(null==K||K({name:o,selected:a}))}),$&&X&&(e.on("tooltipshow",function(e){return null==te?void 0:te(e)}),e.on("tooltiphide",function(e){return null==re?void 0:re(e)}),e.setOption({tooltip:v({formatter:function(e){return String(X(e))}},ee&&{backgroundColor:"transparent",borderColor:"transparent",textStyle:{}})}))),null==S||S(e),se.current.initEndTime=Date.now()},[t,N,S,oe,I,F,Y,V,J,K,$,X,ee,te,re,ve,y,b]);(0,n.useEffect)(function(){if(ce.current&&L){var e=se.current;L({renderTime:e.renderEndTime-e.renderStartTime,initTime:e.initEndTime-e.initStartTime,updateTime:e.updateEndTime-e.updateStartTime,dataSize:m(r)})}},[r,L]);var me=(0,n.useRef)(null);(0,n.useEffect)(function(){var e;if(ae&&!1!==(null==le?void 0:le.enabled)){var t=null!==(e=null==le?void 0:le.debounceDelay)&&void 0!==e?e:0;if(me.current&&clearTimeout(me.current),t>0)me.current=setTimeout(function(){var e=de.current;e!==r&&(ae(e,r),de.current=r)},t);else{var n=de.current;n!==r&&(ae(n,r),de.current=r)}return function(){me.current&&(clearTimeout(me.current),me.current=null)}}},[r,ae,le]),(0,n.useEffect)(function(){return function(){t&&function(e){if(c[e]){try{c[e].dispose()}catch(e){}delete c[e]}}(t),pe.current&&(pe.current.dispose(),pe.current=null),fe.current&&fe.current.dispose()}},[t]);var ye=v({},function(e,t,r,n){return v({width:f(e,"100%"),height:f(t,"300px"),direction:r},n)}(y,b,E,O)),ge={option:ve,width:y,height:b,theme:x,autoResize:w,loading:!1,onChartInit:he,renderer:"canvas",onEvents:{},chartType:"base",style:ye,className:T};return o().createElement(o().Fragment,null,o().createElement(p.A,v({},ge)))}},5587(){var e;!function(e){e.CLICK="click",e.MOUSEMOVE="mousemove",e.MOUSEUP="mouseup",e.MOUSEDOWN="mousedown",e.MOUSEOVER="mouseover",e.MOUSEOUT="mouseout",e.GLOBALOUT="globalout",e.LEGENDSELECTED="legendselected",e.LEGENDUNSELECTED="legendunselected",e.LEGENDSELECTCHANGED="legendselectchanged",e.LEGENDSCROLL="legendscroll",e.DATAZOOM="datazoom",e.DATARANGESELECTED="datarangeselected",e.TIMELINECHANGED="timelinechanged",e.TIMELINEPLAYCHANGED="timelineplaychanged",e.RESTORE="restore",e.DATAVIEWCHANGED="dataviewchanged",e.MAGICTYPECHANGED="magictypechanged",e.GEOSELECTCHANGED="geoselectchanged",e.GEOSELECTED="geoselected",e.GEOUNSELECTED="geounselected",e.PIESELECTCHANGED="pieselectchanged",e.PIESELECTED="pieselected",e.PIEUNSELECTED="pieunselected",e.MAPSELECTCHANGED="mapselectchanged",e.MAPSELECTED="mapselected",e.MAPUNSELECTED="mapunselected",e.AXISAREASELECTED="axisareaselected",e.FOCUSNODEADJACENCY="focusnodeadjacency",e.UNFOCUSNODEADJACENCY="unfocusnodeadjacency",e.BRUSH="brush",e.BRUSHSELECTED="brushselected",e.RENDERED="rendered",e.FINISHED="finished",e.CHART_READY="chartReady",e.CHART_RESIZE="chartResize",e.CHART_ERROR="chartError",e.CHART_DISPOSE="chartDispose"}(e||(e={}))},5158(e,t,r){r.d(t,{sg:()=>h,$N:()=>a,AZ:()=>n,ZV:()=>i,w5:()=>l,uc:()=>c.uc,t2:()=>d,m_:()=>u,nF:()=>m,uR:()=>s});var n={click:"click",mousemove:"mousemove",mouseup:"mouseup",mousedown:"mousedown",mouseover:"mouseover",mouseout:"mouseout",globalout:"globalout"},o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o.apply(this,arguments)};function a(e,t){var r=o({},e);return Object.keys(t).forEach(function(n){t[n]instanceof Object&&n in e&&e[n]instanceof Object?r[n]=a(e[n],t[n]):r[n]=t[n]}),r}function i(e,t,r){void 0===t&&(t=2),void 0===r&&(r={});var n=r.useGrouping,o=void 0===n||n,a=r.locale,i=void 0===a?"zh-CN":a;return new Intl.NumberFormat(i,{minimumFractionDigits:t,maximumFractionDigits:t,useGrouping:o}).format(e)}function l(e){var t=e.replace("#","");return(299*parseInt(t.substring(0,2),16)+587*parseInt(t.substring(2,4),16)+114*parseInt(t.substring(4,6),16))/1e3>128?"#000000":"#FFFFFF"}var c=r(3424);function s(){var e;if("function"==typeof(null===(e=globalThis.crypto)||void 0===e?void 0:e.randomUUID))return globalThis.crypto.randomUUID();var t=Date.now().toString(36),r=Math.random().toString(36).substring(2,15);return"".concat(t,"-").concat(r,"-").concat(Math.random().toString(36).substring(2,10))}function u(){return Math.random().toString(36).substring(2,10)}function d(e){return"".concat(e,"-").concat(u())}var f=function(){return f=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},f.apply(this,arguments)},p=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r};function v(e,t){void 0===t&&(t={});var r=t.locale,n=void 0===r?"zh-CN":r,o=t.timeZone,a=void 0===o?"Asia/Shanghai":o,i=p(t,["locale","timeZone"]),l="string"==typeof e||"number"==typeof e?new Date(e):e;return new Intl.DateTimeFormat(n,f({timeZone:a},i)).format(l)}function h(e,t){var r=null,n=function(){for(var n=this,o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];null!==r&&clearTimeout(r),r=setTimeout(function(){e.apply(n,o),r=null},t)};return n.cancel=function(){null!==r&&(clearTimeout(r),r=null)},n.flush=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];null!==r&&(clearTimeout(r),r=null),e.apply(this,t)},n}function m(e,t,r){var n=null!=r?r:{},o=(n.leading,n.trailing),a=null,i=0,l=null,c=null,s=void 0===o||o,u=t-(Date.now()-i);return function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var o=Date.now();if(l=r,c=this,o-i>=t)return null!==a&&(clearTimeout(a),a=null),i=o,e.apply(this,r);!a&&s&&(a=setTimeout(function(){if(a=null,l){var t=e.apply(c,l);return l=c=null,t}},u))}}new(function(){function e(e){void 0===e&&(e={}),this.locale=e.locale||"undefined"!=typeof window&&window.navigator.language||"zh-CN",this.timeZone=e.timeZone||Intl.DateTimeFormat().resolvedOptions().timeZone}return e.prototype.setLocale=function(e){this.locale=e},e.prototype.getLocale=function(){return this.locale},e.prototype.setTimeZone=function(e){this.timeZone=e},e.prototype.getTimeZone=function(){return this.timeZone},e.prototype.formatDateTime=function(e,t){return void 0===t&&(t={}),v(e,f(f({},t),{locale:this.locale,timeZone:this.timeZone}))},e.prototype.formatDate=function(e,t){return void 0===t&&(t={}),function(e,t){return void 0===t&&(t={}),v(e,f(f({},t),{timeStyle:void 0,hour:void 0,minute:void 0,second:void 0,fractionalSecondDigits:void 0}))}(e,f(f({},t),{locale:this.locale,timeZone:this.timeZone}))},e.prototype.formatTime=function(e,t){return void 0===t&&(t={}),function(e,t){return void 0===t&&(t={}),v(e,f(f({},t),{dateStyle:void 0,year:void 0,month:void 0,day:void 0,weekday:void 0,hour:t.hour||"2-digit",minute:t.minute||"2-digit"}))}(e,f(f({},t),{locale:this.locale,timeZone:this.timeZone}))},e.prototype.formatCurrency=function(e,t){return function(e,t){var r=t.locale,n=void 0===r?"zh-CN":r,o=t.currency,a=t.currencyDisplay,i=void 0===a?"symbol":a,l=t.digits,c=void 0===l?2:l,s=t.useGrouping,u=void 0===s||s;return new Intl.NumberFormat(n,{style:"currency",currency:o,currencyDisplay:i,minimumFractionDigits:c,maximumFractionDigits:c,useGrouping:u}).format(e)}(e,f(f({},t),{locale:this.locale}))},e.prototype.formatPercent=function(e,t){return void 0===t&&(t={}),function(e,t){void 0===t&&(t={});var r=t.locale,n=void 0===r?"zh-CN":r,o=t.digits,a=void 0===o?2:o,i=t.useGrouping,l=void 0===i||i;return new Intl.NumberFormat(n,{style:"percent",minimumFractionDigits:a,maximumFractionDigits:a,useGrouping:l}).format(e)}(e,f(f({},t),{locale:this.locale}))},e.prototype.formatNumber=function(e,t){return void 0===t&&(t={}),function(e,t){void 0===t&&(t={});var r=t.locale,n=void 0===r?"zh-CN":r,o=t.digits,a=void 0===o?2:o,i=t.useGrouping,l=void 0===i||i,c=p(t,["locale","digits","useGrouping"]);return new Intl.NumberFormat(n,f({minimumFractionDigits:a,maximumFractionDigits:a,useGrouping:l},c)).format(e)}(e,f(f({},t),{locale:this.locale}))},e}()),function(){function e(){this.debounces=new Map}e.prototype.register=function(e,t,r){var n=h(t,r);return this.debounces.set(e,{cancel:n.cancel,flush:n.flush}),n},e.prototype.cancel=function(e){var t=this.debounces.get(e);t&&t.cancel()},e.prototype.cancelAll=function(){for(var e=0,t=this.debounces.values();e<t.length;e++)t[e].cancel()},e.prototype.flush=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=this.debounces.get(e);n&&n.flush()},e.prototype.destroy=function(){this.cancelAll(),this.debounces.clear()}}()},3424(e,t,r){r.d(t,{mZ:()=>c,uc:()=>s,uj:()=>o});var n=null;function o(){n=null}function a(e,t){void 0===t&&(t={});var r={platform:e,isBrowser:"browser"===e,isNode:"node"===e,isMiniApp:"miniapp"===e,isReactNative:"react-native"===e};return t.miniAppType&&(r.miniAppType=t.miniAppType),n=r,r}function i(){return"undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:{}}function l(e){var t=i()[e];return void 0!==t&&"function"==typeof(null==t?void 0:t.getSystemInfoSync)}function c(){if(n)return n;var e=i(),t=e.wx;if(void 0!==t&&(null==t?void 0:t.qy))return a("miniapp",{miniAppType:"qywx"});if(l("wx"))return a("miniapp",{miniAppType:"weapp"});if(l("my"))return a("miniapp",{miniAppType:"alipay"});if(l("swan"))return a("miniapp",{miniAppType:"swan"});if(l("tt")){var r=e.tt,o=null==r?void 0:r.env;return a("miniapp",{miniAppType:"lark"===(null==o?void 0:o.appName)?"lark":"tt"})}if(l("qq"))return a("miniapp",{miniAppType:"qq"});if(l("jd"))return a("miniapp",{miniAppType:"jd"});if(l("dd"))return a("miniapp",{miniAppType:"dd"});if(void 0!==e.ks)return a("miniapp",{miniAppType:"kwai"});if("undefined"!=typeof window&&"undefined"!=typeof document)return a("browser");try{var c=globalThis.process;if(void 0!==c&&c.versions&&c.versions.node&&"[object process]"===Object.prototype.toString.call(c))return a("node")}catch(e){}return"undefined"!=typeof navigator&&"ReactNative"===navigator.product?a("react-native"):a("unknown")}function s(){var e,t,r="undefined"==typeof window,n=!r,o=window,a=void 0!==o.wx&&"function"==typeof(null===(e=o.wx)||void 0===e?void 0:e.getSystemInfoSync),i=void 0!==o.my&&"function"==typeof(null===(t=o.my)||void 0===t?void 0:t.getSystemInfoSync);return{isServer:r,isClient:n,isWeapp:a,isAlipay:i,isWeb:n&&!a&&!i}}},5795(e,t,r){r.r(t),r.d(t,{AnnotationPresets:()=>Pe,BarChart:()=>a.BarChart,BaseChart:()=>n.Ay,BoxplotChart:()=>a.BoxplotChart,DataFilter:()=>g,EnhancedThemeEditor:()=>pe,ErrorBoundary:()=>ye,FunnelChart:()=>a.FunnelChart,GraphChart:()=>a.GraphChart,H5Adapter:()=>O.default,HeatmapChart:()=>a.HeatmapChart,LazyChartRegistry:()=>Ie,LineChart:()=>a.LineChart,PRESET_THEMES:()=>te,ParallelChart:()=>a.ParallelChart,PieChart:()=>a.PieChart,RadarChart:()=>a.RadarChartCustom,SankeyChart:()=>a.SankeyChart,ScatterChart:()=>a.ScatterChart,SunburstChart:()=>a.SunburstChart,ThemeEditor:()=>de,TreeChart:()=>a.TreeChart,TreeMapChart:()=>a.TreeMapChart,WeappAdapter:()=>T.default,WordCloudChart:()=>a.WordCloudChart,convertAnnotationToMarkArea:()=>Re,convertAnnotationToMarkLine:()=>De,convertAnnotationToScatter:()=>je,createCompositeAnnotation:()=>Ne,createDrillDown:()=>E,createLazyChart:()=>Ae,darkTheme:()=>D,debounce:()=>o.sg,deepMerge:()=>o.$N,defaultTheme:()=>I,detectPlatform:()=>S.li,detectRuntime:()=>A.mZ,events:()=>o.AZ,exportChart:()=>Ye,formatNumber:()=>o.ZV,getAdapter:()=>S.cK,getContrastColor:()=>o.w5,getDarkThemes:()=>X,getEnv:()=>S._$,getEnvironment:()=>o.uc,getLightThemes:()=>$,getRegisteredThemes:()=>V,getTheme:()=>Y,getThemeByName:()=>J,getThemesByTag:()=>Q,name:()=>xt,prefixedId:()=>o.t2,preloadAllCharts:()=>Te,preloadChart:()=>Oe,registerTheme:()=>q,resetRuntimeCache:()=>A.uj,shortId:()=>o.m_,switchTheme:()=>K,themeManager:()=>re,throttle:()=>o.nF,useAnnotation:()=>Me,useChart:()=>qe,useChartConnect:()=>vt,useChartData:()=>st,useChartDownload:()=>bt,useChartTheme:()=>rt,useChartTools:()=>et,useDataPolling:()=>ot,useDataTransform:()=>ut,useEvents:()=>Je,useExport:()=>Xe,useFullscreen:()=>$e,useLoading:()=>Ke,useOption:()=>Ve,useResize:()=>tt,useResponsive:()=>Qe,useTableTransform:()=>dt,useThemeSwitcher:()=>nt,useTimeSeriesTransform:()=>ft,uuid:()=>o.uR,withErrorBoundary:()=>ge,withLazyLoad:()=>Se});var n=r(1017),o=r(5158),a=r(9150),i=r(2015),l=r.n(i),c=function(){return c=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},c.apply(this,arguments)},s={fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',fontSize:"14px",color:"#333"},u={display:"flex",flexDirection:"column",gap:"4px"},d={fontSize:"12px",fontWeight:500,color:"#666"},f={padding:"6px 10px",border:"1px solid #d9d9d9",borderRadius:"4px",fontSize:"13px",outline:"none",transition:"border-color 0.2s, box-shadow 0.2s",backgroundColor:"#fff"},p={padding:"6px 16px",borderRadius:"4px",fontSize:"13px",cursor:"pointer",border:"none",transition:"all 0.2s"},v=function(e){var t,r,n=e.field,o=e.value,a=e.onChange,s=e.disabled,p=e.compact,v=(0,i.useCallback)(function(e){var t=e.target.value;a(n.key,""===t?void 0:t)},[n.key,a]);return l().createElement("div",{style:u},l().createElement("label",{style:d},n.label),l().createElement("select",{value:null!==(t=o)&&void 0!==t?t:"",onChange:v,disabled:s,style:c(c({},f),{minWidth:p?"100px":"140px",width:"100%",cursor:s?"not-allowed":"pointer",opacity:s?.6:1})},l().createElement("option",{value:""},n.placeholder||"请选择"),null===(r=n.options)||void 0===r?void 0:r.map(function(e){return l().createElement("option",{key:String(e.value),value:String(e.value)},e.label)})))},h=function(e){var t,r,n,o,a,s=e.field,p=e.value,v=e.onChange,h=e.disabled,m=e.compact,y=null!==(t=p)&&void 0!==t?t:[null!==(r=s.min)&&void 0!==r?r:0,null!==(n=s.max)&&void 0!==n?n:100],g=(0,i.useCallback)(function(e){var t=Number(e.target.value);v(s.key,[t,y[1]])},[s.key,y,v]),b=(0,i.useCallback)(function(e){var t=Number(e.target.value);v(s.key,[y[0],t])},[s.key,y,v]);return l().createElement("div",{style:u},l().createElement("label",{style:d},s.label),l().createElement("div",{style:{display:"flex",alignItems:"center",gap:"6px"}},l().createElement("input",{type:"number",value:y[0],min:s.min,max:y[1],onChange:g,disabled:h,placeholder:String(null!==(o=s.min)&&void 0!==o?o:"最小"),style:c(c({},f),{width:m?"60px":"80px",cursor:h?"not-allowed":"text",opacity:h?.6:1})}),l().createElement("span",{style:{color:"#999",fontSize:"12px"}},"~"),l().createElement("input",{type:"number",value:y[1],min:y[0],max:s.max,onChange:b,disabled:h,placeholder:String(null!==(a=s.max)&&void 0!==a?a:"最大"),style:c(c({},f),{width:m?"60px":"80px",cursor:h?"not-allowed":"text",opacity:h?.6:1})})))},m=function(e){var t,r=e.field,n=e.value,o=e.onChange,a=e.disabled,c=e.compact,s=(0,i.useMemo)(function(){return Array.isArray(n)?new Set(n.map(String)):new Set},[n]),f=(0,i.useCallback)(function(e){var t=String(e),n=new Set(s);n.has(t)?n.delete(t):n.add(t),o(r.key,Array.from(n))},[r.key,s,o]);return l().createElement("div",{style:u},l().createElement("label",{style:d},r.label),l().createElement("div",{style:{display:"flex",flexWrap:"wrap",gap:c?"4px":"8px",maxWidth:c?"200px":"300px"}},null===(t=r.options)||void 0===t?void 0:t.map(function(e){var t=s.has(String(e.value));return l().createElement("label",{key:String(e.value),style:{display:"flex",alignItems:"center",gap:"4px",cursor:a?"not-allowed":"pointer",fontSize:"13px",opacity:a?.6:1,userSelect:"none"}},l().createElement("input",{type:"checkbox",checked:t,onChange:function(){return f(e.value)},disabled:a,style:{cursor:a?"not-allowed":"pointer"}}),l().createElement("span",null,e.label))})))},y=function(e){var t,r=e.field,n=e.value,o=e.onChange,a=e.disabled,s=e.compact,p=null!==(t=n)&&void 0!==t?t:["",""],v=(r.dateFormat,(0,i.useCallback)(function(e){o(r.key,[e.target.value,p[1]])},[r.key,p,o])),h=(0,i.useCallback)(function(e){o(r.key,[p[0],e.target.value])},[r.key,p,o]);return l().createElement("div",{style:u},l().createElement("label",{style:d},r.label),l().createElement("div",{style:{display:"flex",alignItems:"center",gap:"6px"}},l().createElement("input",{type:"date",value:p[0],onChange:v,disabled:a,style:c(c({},f),{width:s?"120px":"150px",cursor:a?"not-allowed":"text",opacity:a?.6:1})}),l().createElement("span",{style:{color:"#999",fontSize:"12px"}},"~"),l().createElement("input",{type:"date",value:p[1],onChange:h,disabled:a,style:c(c({},f),{width:s?"120px":"150px",cursor:a?"not-allowed":"text",opacity:a?.6:1})})))},g=function(e){var t=e.fields,r=e.value,n=void 0===r?{}:r,o=e.onChange,a=e.layout,u=void 0===a?"vertical":a,d=e.showReset,f=void 0!==d&&d,g=e.className,b=void 0===g?"":g,x=e.style,C=e.compact,w=void 0!==C&&C,k=e.disabled,E=void 0!==k&&k,S=e.resetText,O=void 0===S?"重置":S,T=e.submitText,A=void 0===T?"筛选":T,I=e.showSubmit,D=void 0!==I&&I,R=e.liveUpdate,j=void 0===R||R,M=(0,i.useState)(n),P=M[0],N=M[1];l().useEffect(function(){N(n)},[n]);var L=(0,i.useMemo)(function(){return Object.values(P).some(function(e){return null!=e&&""!==e&&(!Array.isArray(e)||0!==e.length)})},[P]),z=(0,i.useCallback)(function(e,t){var r,n=c(c({},P),((r={})[e]=t,r));N(n),j&&(null==o||o(n))},[P,j,o]),_=(0,i.useCallback)(function(){null==o||o(P)},[P,o]),F=(0,i.useCallback)(function(){var e={};t.forEach(function(t){var r,n;"range"===t.type?e[t.key]=[null!==(r=t.min)&&void 0!==r?r:0,null!==(n=t.max)&&void 0!==n?n:100]:"checkbox"===t.type?e[t.key]=[]:"date"===t.type?e[t.key]=["",""]:e[t.key]=void 0}),N(e),null==o||o(e)},[t,o]),H=(0,i.useCallback)(function(e){var t=P[e.key];switch(e.type){case"select":return l().createElement(v,{key:e.key,field:e,value:t,onChange:z,disabled:E,compact:w});case"range":return l().createElement(h,{key:e.key,field:e,value:t,onChange:z,disabled:E,compact:w});case"checkbox":return l().createElement(m,{key:e.key,field:e,value:t,onChange:z,disabled:E,compact:w});case"date":return l().createElement(y,{key:e.key,field:e,value:t,onChange:z,disabled:E,compact:w});default:return null}},[P,z,E,w]),B="horizontal"===u,U=c(c(c({},s),{display:"flex",flexDirection:B?"row":"column",flexWrap:"wrap",gap:B?"16px":"12px",alignItems:B?"flex-end":"flex-start",padding:"12px",backgroundColor:"#fafafa",borderRadius:"6px",border:"1px solid #f0f0f0"}),x);return l().createElement("div",{className:"taroviz-datafilter ".concat(b),style:U},t.map(H),l().createElement("div",{style:{display:"flex",gap:"8px",alignItems:"flex-end",marginLeft:B?"8px":"0",paddingTop:B?"0":"4px"}},D&&!j&&l().createElement("button",{type:"button",onClick:_,disabled:E,style:c(c({},p),{backgroundColor:"#1890ff",color:"#fff",cursor:E?"not-allowed":"pointer",opacity:E?.6:1})},A),f&&L&&l().createElement("button",{type:"button",onClick:F,disabled:E,style:c(c({},p),{backgroundColor:"#fff",color:"#666",border:"1px solid #d9d9d9",cursor:E?"not-allowed":"pointer",opacity:E?.6:1})},O)))};function b(e){return e&&0!==e.length?{xAxis:{type:"category",data:e.map(function(e){return e.name})},yAxis:{type:"value"},series:[{type:"bar",data:e.map(function(e){return e.value})}]}:{}}function x(e,t,r,n,o,a,i){var l={};return"reset"===r||0===e?l=o?b(o):{}:"up"===r?l=n.length>0&&n[0].chartOption?n[0].chartOption:b(n):"down"===r&&t&&(t.chartOption?l=t.chartOption:t.children&&t.children.length>0&&(l=b(t.children))),l}function C(e,t,r){if(0===e)return null!=t?t:[];var n=r[r.length-1];return n&&n.dataItem.children?n.dataItem.children:[]}var w=function(){return w=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},w.apply(this,arguments)},k={autoBind:!0,currentLevel:0};function E(e){var t={chartInstance:null,config:w(w({},k),e),currentLevel:0,history:[],currentOption:{},initialOption:{},initialized:!1,clickHandler:null},r=function(e){var r=e||t.chartInstance;r&&(t.clickHandler&&n(r),t.clickHandler=function(e){!function(e,t){var r,n,o,a,i,l=t.chartInstance,c=t.config;if(!l)return!1;var s,u=e.name,d=e.value,f=function(e,t,r,n,o){var a=r.find(function(r){return String(r.name)===String(e)||r.value===t});return!a&&0===o&&n&&(a=n.find(function(r){return String(r.name)===String(e)||r.value===t})),a}(u,d,C(t.currentLevel,c.initialSources,t.history),c.initialSources,t.currentLevel);if(!(s=f)||!(s.children&&s.children.length>0||s.chartOption))return!1;f&&t.history.push({level:t.currentLevel,dataItem:f}),t.currentLevel+=1;var p=x(t.currentLevel,f,"down",null!==(r=f.children)&&void 0!==r?r:[],c.initialSources,t.currentOption);p&&Object.keys(p).length>0&&(l.setOption(p,!0),t.currentOption=p),null===(n=c.onDrillDown)||void 0===n||n.call(c,{level:t.currentLevel,name:null!==(o=null==f?void 0:f.name)&&void 0!==o?o:u,value:null!==(a=null==f?void 0:f.value)&&void 0!==a?a:d,sources:null!==(i=null==f?void 0:f.children)&&void 0!==i?i:[],chartOption:p,rawParams:e})}(e,t)},r.on("click",t.clickHandler))},n=function(e){var r=e||t.chartInstance;r&&t.clickHandler&&(r.off("click",t.clickHandler),t.clickHandler=null)};return{init:function(e,n){var o;if(e){t.chartInstance=e,t.config=w(w({},k),n),t.currentLevel=null!==(o=n.currentLevel)&&void 0!==o?o:0,t.initialized=!0;try{t.initialOption=e.getOption()||{}}catch(e){t.initialOption={}}t.config.autoBind&&r(e)}},drillUp:function(){!function(e,t){var r,n=e.chartInstance;if(!n||e.currentLevel<=0)return!1;var o=e.currentLevel;e.history.pop(),e.currentLevel-=1;var a=C(e.currentLevel,t.initialSources,e.history),i=x(e.currentLevel,void 0,"up",a,t.initialSources,e.currentOption,e.initialOption);i&&Object.keys(i).length>0?(n.setOption(i,!0),e.currentOption=i):0===e.currentLevel&&e.initialOption&&(n.setOption(e.initialOption,!0),e.currentOption=e.initialOption),null===(r=t.onDrillUp)||void 0===r||r.call(t,{previousLevel:o,currentLevel:e.currentLevel,chartOption:i})}(t,t.config)},reset:function(){!function(e,t){var r,n=e.chartInstance;if(n){e.history=[],e.currentLevel=0;var o=x(0,void 0,"reset",C(e.currentLevel,t.initialSources,e.history),t.initialSources,e.currentOption,e.initialOption);o&&Object.keys(o).length>0?(n.setOption(o,!0),e.currentOption=o):e.initialOption&&Object.keys(e.initialOption).length>0&&(n.setOption(e.initialOption,!0),e.currentOption=e.initialOption),null===(r=t.onReset)||void 0===r||r.call(t,{level:0})}}(t,t.config)},getCurrentLevel:function(){return t.currentLevel},bindClick:r,unbindClick:n,drillTo:function(e,r){!function(e,t,r,n){var o,a,i,l,c,s,u=r.chartInstance;if(u&&!(e<0||e>r.history.length)){var d=r.currentLevel;r.currentLevel=e,e===r.history.length?t&&r.history.push({level:e-1,dataItem:t}):e<r.history.length?r.history=r.history.slice(0,e):r.history=[];var f=x(e,t,0===e?"reset":"down",C(r.currentLevel,n.initialSources,r.history),n.initialSources,r.currentOption);f&&Object.keys(f).length>0&&(u.setOption(f,!0),r.currentOption=f),e>d?null===(o=n.onDrillDown)||void 0===o||o.call(n,{level:e,name:null!==(a=null==t?void 0:t.name)&&void 0!==a?a:"",value:null!==(i=null==t?void 0:t.value)&&void 0!==i?i:0,sources:null!==(l=null==t?void 0:t.children)&&void 0!==l?l:[],chartOption:f,rawParams:{}}):e<d?null===(c=n.onDrillUp)||void 0===c||c.call(n,{previousLevel:d,currentLevel:e,chartOption:f}):null===(s=n.onReset)||void 0===s||s.call(n,{level:0})}}(e,r,t,t.config)},getHistory:function(){return function(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}([],t.history,!0)},canDrillUp:function(){return t.currentLevel>0},dispose:function(){t.chartInstance&&t.clickHandler&&t.chartInstance.off("click",t.clickHandler),t.chartInstance=null,t.clickHandler=null,t.history=[],t.currentLevel=0,t.initialized=!1}}}var S=r(4871),O=r(509),T=r(8689),A=r(3424),I={theme:"default",name:"Default",description:"简洁现代的默认主题",type:"light",mode:"light",darkMode:!1,tags:["modern","clean","default"],colors:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],backgroundColor:"#ffffff",textColor:"#333333",textColorSecondary:"#666666",borderColor:"#e8e8e8",dividerColor:"#f0f0f0",fontFamily:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',chart:{legend:{textColor:"#333333",backgroundColor:"transparent",borderColor:"#e8e8e8"},axis:{textColor:"#666666",lineColor:"#e8e8e8",tickColor:"#e8e8e8",splitLineColor:"#f0f0f0"},tooltip:{textColor:"#333333",backgroundColor:"rgba(255, 255, 255, 0.95)",borderColor:"#e8e8e8",borderRadius:4},title:{textColor:"#333333",subTextColor:"#666666"}}},D={theme:"dark",name:"Dark",description:"优雅的深色主题,适合夜间使用",type:"dark",mode:"dark",darkMode:!0,tags:["dark","night","modern"],colors:["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff9f7f","#8d48e3","#dd79ff"],backgroundColor:"#1a1a2e",textColor:"#e8e8e8",textColorSecondary:"#a0a0a0",borderColor:"#2d2d44",dividerColor:"#252538",fontFamily:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',chart:{legend:{textColor:"#e8e8e8",backgroundColor:"transparent",borderColor:"#2d2d44"},axis:{textColor:"#a0a0a0",lineColor:"#2d2d44",tickColor:"#2d2d44",splitLineColor:"#252538"},tooltip:{textColor:"#e8e8e8",backgroundColor:"rgba(26, 26, 46, 0.95)",borderColor:"#2d2d44",borderRadius:4},title:{textColor:"#e8e8e8",subTextColor:"#a0a0a0"}}},R=function(){return R=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},R.apply(this,arguments)},j=R(R({},I),{theme:"walden",name:"Walden",description:"清新自然风格",colors:["#0a437a","#3a84c4","#22a783","#48b591","#7fcdbb","#c9e4ca"],backgroundColor:"#f0f8f5",textColor:"#2c5042"}),M=function(){return M=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},M.apply(this,arguments)},P=M(M({},I),{theme:"chalk",name:"Chalk",description:"粉笔风格",colors:["#2e8de5","#f0805a","#5ab1ef","#91d5ff","#faad14"],backgroundColor:"#ffffff",textColor:"#000000"}),N=function(){return N=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},N.apply(this,arguments)},L=N(N({},I),{theme:"purple-passion",name:"Purple Passion",description:"紫色浪漫",colors:["#9c27b0","#e91e63","#ff5722","#ff9800","#ffc107"],backgroundColor:"#f5f5f5",textColor:"#333333"}),z=function(){return z=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},z.apply(this,arguments)},_=z(z({},I),{theme:"blue-green",name:"Blue Green",description:"蓝绿清新",colors:["#00838f","#00acc1","#03a9f4","#29b6f6","#4fc3f7"],backgroundColor:"#e0f7fa",textColor:"#006064"}),F=function(){return F=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},F.apply(this,arguments)},H=F(F({},I),{theme:"golden",name:"Golden",description:"金色奢华",colors:["#ffd700","#ffed4e","#f9a825","#ffc107","#ffb300"],backgroundColor:"#fff8e1",textColor:"#ff6f00"}),B=function(){return B=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},B.apply(this,arguments)},U=B(B({},I),{theme:"forest",name:"Forest",description:"森林绿色",colors:["#2e7d32","#388e3c","#43a047","#4caf50","#66bb6a"],backgroundColor:"#f1f8e9",textColor:"#1b5e20"}),W=function(){return W=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},W.apply(this,arguments)},G=new Map,Z={default:I,dark:D,walden:j,chalk:P,"purple-passion":L,"blue-green":_,golden:H,forest:U,neon:{theme:"neon",name:"Neon",description:"赛博朋克霓虹风格,炫酷吸睛",type:"dark",mode:"dark",darkMode:!0,tags:["neon","cyberpunk","colorful","dark"],colors:["#00fff5","#ff00ff","#ffff00","#00ff00","#ff6b6b","#4ecdc4","#ffe66d","#95e1d3","#f38181"],backgroundColor:"#0d0d1a",textColor:"#ffffff",textColorSecondary:"#b0b0b0",borderColor:"#1a1a2e",dividerColor:"#1a1a2e",fontFamily:'"JetBrains Mono", "Fira Code", monospace',effects:{shadows:!0,shadowColor:"rgba(0, 255, 245, 0.3)",gradients:!0},chart:{tooltip:{textColor:"#ffffff",backgroundColor:"rgba(13, 13, 26, 0.95)",borderColor:"#00fff5",borderRadius:4,shadowColor:"rgba(0, 255, 245, 0.3)"}}},glass:{theme:"glass",name:"Glass",description:"现代玻璃态设计,半透明质感",type:"light",mode:"light",darkMode:!1,tags:["glass","modern","minimal","light"],colors:["#667eea","#764ba2","#f093fb","#f5576c","#4facfe","#00f2fe","#43e97b","#38f9d7","#fa709a"],backgroundColor:"rgba(255, 255, 255, 0.8)",backgroundGradient:{start:"#f5f7fa",end:"#c3cfe2",angle:135},textColor:"#2d3748",textColorSecondary:"#718096",borderColor:"rgba(255, 255, 255, 0.5)",dividerColor:"rgba(255, 255, 255, 0.3)",fontFamily:"Inter, -apple-system, BlinkMacSystemFont, sans-serif",effects:{glassmorphism:!0,blur:10,shadows:!0,shadowColor:"rgba(0, 0, 0, 0.1)",borderRadius:"large"},chart:{tooltip:{textColor:"#2d3748",backgroundColor:"rgba(255, 255, 255, 0.9)",borderColor:"rgba(255, 255, 255, 0.5)",borderRadius:12}}},pastel:{theme:"pastel",name:"Pastel",description:"柔和粉彩配色,温馨舒适",type:"light",mode:"light",darkMode:!1,tags:["pastel","soft","gentle","light"],colors:["#ffb3ba","#ffdfba","#ffffba","#baffc9","#bae1ff","#f0b3ff","#b3fff0","#ffb3d9","#d9ffb3"],backgroundColor:"#fff9f5",textColor:"#5d5d5d",textColorSecondary:"#8a8a8a",borderColor:"#f0e6e0",dividerColor:"#f5f0eb",fontFamily:"Nunito, -apple-system, BlinkMacSystemFont, sans-serif",chart:{tooltip:{textColor:"#5d5d5d",backgroundColor:"rgba(255, 255, 255, 0.95)",borderColor:"#f0e6e0",borderRadius:8}}},sunset:{theme:"sunset",name:"Sunset",description:"温暖日落渐变,夕阳余晖",type:"light",mode:"light",darkMode:!1,tags:["sunset","warm","gradient","light"],colors:["#ff6b6b","#feca57","#ff9ff3","#54a0ff","#5f27cd","#ff9f43","#ee5a24","#009432","#f368e0"],backgroundColor:"#fff5f0",backgroundGradient:{start:"#ffecd2",end:"#fcb69f",angle:135},textColor:"#4a4a4a",textColorSecondary:"#7a7a7a",borderColor:"#ffd5c8",dividerColor:"#ffebe6",fontFamily:"Quicksand, -apple-system, BlinkMacSystemFont, sans-serif",effects:{gradients:!0,shadows:!0,shadowColor:"rgba(255, 107, 107, 0.2)",borderRadius:"medium"}},ocean:{theme:"ocean",name:"Ocean",description:"深邃海洋蓝,宁静清新",type:"light",mode:"light",darkMode:!1,tags:["ocean","blue","calm","light"],colors:["#0077b6","#00b4d8","#90e0ef","#caf0f8","#03045e","#023e8a","#0096c7","#48cae4","#ade8f4"],backgroundColor:"#f0f8ff",backgroundGradient:{start:"#e0f2fe",end:"#bae6fd",angle:180},textColor:"#1e3a5f",textColorSecondary:"#4a6fa5",borderColor:"#cce7f5",dividerColor:"#e1f0f9",fontFamily:"Nunito, -apple-system, BlinkMacSystemFont, sans-serif",effects:{gradients:!0,shadows:!0,shadowColor:"rgba(0, 119, 182, 0.15)"}},cyber:{theme:"cyber",name:"Cyber",description:"未来科技感,赛博朋克",type:"dark",mode:"dark",darkMode:!0,tags:["cyber","tech","futuristic","dark"],colors:["#00f5ff","#ff00ff","#00ff00","#ffff00","#ff0080","#8000ff","#00ff80","#ff8000","#0080ff"],backgroundColor:"#0a0a12",textColor:"#e0e0e0",textColorSecondary:"#808090",borderColor:"#1a1a2e",dividerColor:"#12121e",fontFamily:'"Orbitron", "Rajdhani", "JetBrains Mono", monospace',effects:{shadows:!0,shadowColor:"rgba(0, 245, 255, 0.4)",gradients:!0,borderRadius:"none"},chart:{tooltip:{textColor:"#ffffff",backgroundColor:"rgba(10, 10, 18, 0.95)",borderColor:"#00f5ff",borderRadius:0,shadowColor:"rgba(0, 245, 255, 0.4)"}}},retro:{theme:"retro",name:"Retro",description:"怀旧复古风格,温馨怀旧",type:"light",mode:"light",darkMode:!1,tags:["retro","vintage","nostalgic","light"],colors:["#d63031","#e17055","#fdcb6e","#00b894","#0984e3","#6c5ce7","#e84393","#00cec9","#fab1a0"],backgroundColor:"#fdf6e3",textColor:"#5c4b37",textColorSecondary:"#8b7355",borderColor:"#e8dcc8",dividerColor:"#f0e8d8",fontFamily:'"Courier Prime", "Courier New", monospace',effects:{shadows:!1,borderRadius:"small"}},elegant:{theme:"elegant",name:"Elegant",description:"低调雅致风格,精致品味",type:"light",mode:"light",darkMode:!1,tags:["elegant","minimal","sophisticated","light"],colors:["#2c3e50","#34495e","#7f8c8d","#95a5a6","#bdc3c7","#ecf0f1","#1abc9c","#16a085","#3498db"],backgroundColor:"#fafafa",textColor:"#2c3e50",textColorSecondary:"#7f8c8d",borderColor:"#e8e8e8",dividerColor:"#f0f0f0",fontFamily:'"Playfair Display", Georgia, serif',effects:{shadows:!0,shadowColor:"rgba(0, 0, 0, 0.08)",borderRadius:"medium"}}};function Y(e){if(!e)return I;var t;e.theme&&"string"==typeof e.theme?t=G.get(e.theme)||(e.darkMode?D:I):t=e.darkMode?D:I;return W(W({},t),e)}function q(e,t){G.set(e,W(W({},t),{name:e}))}function V(){return Array.from(G.values())}function J(e){return G.get(e)}function K(e,t){var r;return"string"==typeof e?r=G.get(e)||I:(r=e,e.name&&q(e.name,e)),"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("themeChange",{detail:r})),null==t||t(),r}function Q(e){return V().filter(function(t){var r;return null===(r=t.tags)||void 0===r?void 0:r.includes(e)})}function $(){return V().filter(function(e){return!e.darkMode})}function X(){return V().filter(function(e){return e.darkMode})}Object.entries(Z).forEach(function(e){var t=e[0],r=e[1];G.set(t,r)});var ee=function(){return ee=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ee.apply(this,arguments)},te={default:{name:"default",type:"light",isDark:!1,variables:{"--tv-bg-color":"#ffffff","--tv-bg-color-secondary":"#fafafa","--tv-text-color":"#333333","--tv-text-color-secondary":"#666666","--tv-primary-color":"#1890ff","--tv-primary-color-hover":"#40a9ff","--tv-primary-color-active":"#096dd9","--tv-success-color":"#52c41a","--tv-warning-color":"#faad14","--tv-error-color":"#ff4d4f","--tv-border-color":"#d9d9d9","--tv-divider-color":"#f0f0f0","--tv-shadow-color":"rgba(0, 0, 0, 0.1)","--tv-chart-color-1":"#5470c6","--tv-chart-color-2":"#91cc75","--tv-chart-color-3":"#fac858","--tv-chart-color-4":"#ee6666","--tv-chart-color-5":"#73c0de","--tv-chart-color-6":"#3ba272","--tv-chart-color-7":"#fc8452","--tv-chart-color-8":"#9a60b4","--tv-font-family":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',"--tv-font-size":"14px","--tv-font-size-small":"12px","--tv-font-size-large":"16px","--tv-border-radius":"4px","--tv-border-radius-small":"2px","--tv-transition-duration":"0.3s"}},dark:{name:"dark",type:"dark",isDark:!0,variables:{"--tv-bg-color":"#1a1a2e","--tv-bg-color-secondary":"#16213e","--tv-text-color":"#e0e0e0","--tv-text-color-secondary":"#a0a0a0","--tv-primary-color":"#1890ff","--tv-primary-color-hover":"#40a9ff","--tv-primary-color-active":"#096dd9","--tv-success-color":"#52c41a","--tv-warning-color":"#faad14","--tv-error-color":"#ff4d4f","--tv-border-color":"#404040","--tv-divider-color":"#303030","--tv-shadow-color":"rgba(0, 0, 0, 0.3)","--tv-chart-color-1":"#5470c6","--tv-chart-color-2":"#91cc75","--tv-chart-color-3":"#fac858","--tv-chart-color-4":"#ee6666","--tv-chart-color-5":"#73c0de","--tv-chart-color-6":"#3ba272","--tv-chart-color-7":"#fc8452","--tv-chart-color-8":"#9a60b4","--tv-font-family":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',"--tv-font-size":"14px","--tv-font-size-small":"12px","--tv-font-size-large":"16px","--tv-border-radius":"4px","--tv-border-radius-small":"2px","--tv-transition-duration":"0.3s"}},vintage:{name:"vintage",type:"custom",isDark:!1,variables:{"--tv-bg-color":"#fef9ef","--tv-bg-color-secondary":"#fcf5e9","--tv-text-color":"#5c4d3d","--tv-text-color-secondary":"#8b7355","--tv-primary-color":"#d4a574","--tv-primary-color-hover":"#c49566","--tv-primary-color-active":"#b8895a","--tv-success-color":"#8db78e","--tv-warning-color":"#e6c87a","--tv-error-color":"#c97c6d","--tv-border-color":"#e0d5c7","--tv-divider-color":"#f0e8de","--tv-shadow-color":"rgba(92, 77, 61, 0.1)","--tv-chart-color-1":"#d4a574","--tv-chart-color-2":"#8db78e","--tv-chart-color-3":"#e6c87a","--tv-chart-color-4":"#c97c6d","--tv-chart-color-5":"#9ab5a8","--tv-chart-color-6":"#c9b8d4","--tv-chart-color-7":"#a8c4d4","--tv-chart-color-8":"#d4c49a","--tv-font-family":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',"--tv-font-size":"14px","--tv-font-size-small":"12px","--tv-font-size-large":"16px","--tv-border-radius":"4px","--tv-border-radius-small":"2px","--tv-transition-duration":"0.3s"}},macarons:{name:"macarons",type:"custom",isDark:!1,variables:{"--tv-bg-color":"#fefcf9","--tv-bg-color-secondary":"#f9f6f2","--tv-text-color":"#505050","--tv-text-color-secondary":"#757575","--tv-primary-color":"#60acf2","--tv-primary-color-hover":"#4d9de0","--tv-primary-color-active":"#3d8bd0","--tv-success-color":"#62d17a","--tv-warning-color":"#f7c752","--tv-error-color":"#f4645a","--tv-border-color":"#e8e4e0","--tv-divider-color":"#f0ece8","--tv-shadow-color":"rgba(80, 80, 80, 0.08)","--tv-chart-color-1":"#60acf2","--tv-chart-color-2":"#62d17a","--tv-chart-color-3":"#f7c752","--tv-chart-color-4":"#f4645a","--tv-chart-color-5":"#95d9f2","--tv-chart-color-6":"#a8e6cf","--tv-chart-color-7":"#ffd3b6","--tv-chart-color-8":"#ffaaa5","--tv-font-family":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',"--tv-font-size":"14px","--tv-font-size-small":"12px","--tv-font-size-large":"16px","--tv-border-radius":"12px","--tv-border-radius-small":"8px","--tv-transition-duration":"0.3s"}},infographic:{name:"infographic",type:"custom",isDark:!1,variables:{"--tv-bg-color":"#ffffff","--tv-bg-color-secondary":"#f5f7fa","--tv-text-color":"#1a1a1a","--tv-text-color-secondary":"#666666","--tv-primary-color":"#277ace","--tv-primary-color-hover":"#3a8ee6","--tv-primary-color-active":"#146bb3","--tv-success-color":"#2fc25b","--tv-warning-color":"#fbd438","--tv-error-color":"#e8352e","--tv-border-color":"#e0e6ed","--tv-divider-color":"#f0f2f5","--tv-shadow-color":"rgba(26, 26, 26, 0.06)","--tv-chart-color-1":"#277ace","--tv-chart-color-2":"#31cce8","--tv-chart-color-3":"#23d3a2","--tv-chart-color-4":"#fbd438","--tv-chart-color-5":"#f87f50","--tv-chart-color-6":"#e8352e","--tv-chart-color-7":"#b02ad3","--tv-chart-color-8":"#6475d4","--tv-font-family":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',"--tv-font-size":"14px","--tv-font-size-small":"12px","--tv-font-size-large":"16px","--tv-border-radius":"2px","--tv-border-radius-small":"1px","--tv-transition-duration":"0.2s"}},helianthus:{name:"helianthus",type:"custom",isDark:!1,variables:{"--tv-bg-color":"#fffbf5","--tv-bg-color-secondary":"#fef7f0","--tv-text-color":"#5c4d3d","--tv-text-color-secondary":"#8b7355","--tv-primary-color":"#f5c242","--tv-primary-color-hover":"#e6b53e","--tv-primary-color-active":"#d4a435","--tv-success-color":"#7ec890","--tv-warning-color":"#f5a623","--tv-error-color":"#e74c3c","--tv-border-color":"#e8dccf","--tv-divider-color":"#f0e8de","--tv-shadow-color":"rgba(92, 77, 61, 0.08)","--tv-chart-color-1":"#f5c242","--tv-chart-color-2":"#7ec890","--tv-chart-color-3":"#5eb8d9","--tv-chart-color-4":"#e74c3c","--tv-chart-color-5":"#9b7ed4","--tv-chart-color-6":"#f5a623","--tv-chart-color-7":"#6dd3ce","--tv-chart-color-8":"#d4778b","--tv-font-family":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',"--tv-font-size":"14px","--tv-font-size-small":"12px","--tv-font-size-large":"16px","--tv-border-radius":"6px","--tv-border-radius-small":"4px","--tv-transition-duration":"0.3s"}},blue:{name:"blue",type:"custom",isDark:!1,variables:{"--tv-bg-color":"#f0f7ff","--tv-bg-color-secondary":"#e6f0ff","--tv-text-color":"#1a3a5c","--tv-text-color-secondary":"#4a6a8c","--tv-primary-color":"#1890ff","--tv-primary-color-hover":"#40a9ff","--tv-primary-color-active":"#096dd9","--tv-success-color":"#52c41a","--tv-warning-color":"#faad14","--tv-error-color":"#ff4d4f","--tv-border-color":"#bfd9f2","--tv-divider-color":"#d9e8fc","--tv-shadow-color":"rgba(24, 144, 255, 0.15)","--tv-chart-color-1":"#1890ff","--tv-chart-color-2":"#91cc75","--tv-chart-color-3":"#fac858","--tv-chart-color-4":"#ee6666","--tv-chart-color-5":"#73c0de","--tv-chart-color-6":"#3ba272","--tv-chart-color-7":"#fc8452","--tv-chart-color-8":"#9a60b4","--tv-font-family":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',"--tv-font-size":"14px","--tv-font-size-small":"12px","--tv-font-size-large":"16px","--tv-border-radius":"4px","--tv-border-radius-small":"2px","--tv-transition-duration":"0.3s"}},red:{name:"red",type:"custom",isDark:!1,variables:{"--tv-bg-color":"#fff5f5","--tv-bg-color-secondary":"#ffe6e6","--tv-text-color":"#5c1a1a","--tv-text-color-secondary":"#8c4a4a","--tv-primary-color":"#ff4d4f","--tv-primary-color-hover":"#ff7875","--tv-primary-color-active":"#d9363e","--tv-success-color":"#52c41a","--tv-warning-color":"#faad14","--tv-error-color":"#ff4d4f","--tv-border-color":"#f2bfbf","--tv-divider-color":"#fcd9d9","--tv-shadow-color":"rgba(255, 77, 79, 0.15)","--tv-chart-color-1":"#ff4d4f","--tv-chart-color-2":"#ffd700","--tv-chart-color-3":"#ff7c4d","--tv-chart-color-4":"#9c4dff","--tv-chart-color-5":"#00d0ff","--tv-chart-color-6":"#52c41a","--tv-chart-color-7":"#faad14","--tv-chart-color-8":"#8b5cf6","--tv-font-family":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',"--tv-font-size":"14px","--tv-font-size-small":"12px","--tv-font-size-large":"16px","--tv-border-radius":"4px","--tv-border-radius-small":"2px","--tv-transition-duration":"0.3s"}},green:{name:"green",type:"custom",isDark:!1,variables:{"--tv-bg-color":"#f5fff5","--tv-bg-color-secondary":"#e6ffe6","--tv-text-color":"#1a3d1a","--tv-text-color-secondary":"#4a6c4a","--tv-primary-color":"#52c41a","--tv-primary-color-hover":"#73d13d","--tv-primary-color-active":"#389e0d","--tv-success-color":"#52c41a","--tv-warning-color":"#faad14","--tv-error-color":"#ff4d4f","--tv-border-color":"#bff2bf","--tv-divider-color":"#d9fcd9","--tv-shadow-color":"rgba(82, 196, 26, 0.15)","--tv-chart-color-1":"#52c41a","--tv-chart-color-2":"#1890ff","--tv-chart-color-3":"#faad14","--tv-chart-color-4":"#ff4d4f","--tv-chart-color-5":"#722ed1","--tv-chart-color-6":"#13c2c2","--tv-chart-color-7":"#fa8c16","--tv-chart-color-8":"#eb2f96","--tv-font-family":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',"--tv-font-size":"14px","--tv-font-size-small":"12px","--tv-font-size-large":"16px","--tv-border-radius":"4px","--tv-border-radius-small":"2px","--tv-transition-duration":"0.3s"}},purple:{name:"purple",type:"custom",isDark:!1,variables:{"--tv-bg-color":"#faf5ff","--tv-bg-color-secondary":"#f0e6ff","--tv-text-color":"#3d1a5c","--tv-text-color-secondary":"#6a4a8c","--tv-primary-color":"#722ed1","--tv-primary-color-hover":"#9254de","--tv-primary-color-active":"#531dab","--tv-success-color":"#52c41a","--tv-warning-color":"#faad14","--tv-error-color":"#ff4d4f","--tv-border-color":"#d9bff2","--tv-divider-color":"#ecd9fc","--tv-shadow-color":"rgba(114, 46, 209, 0.15)","--tv-chart-color-1":"#722ed1","--tv-chart-color-2":"#eb2f96","--tv-chart-color-3":"#1890ff","--tv-chart-color-4":"#52c41a","--tv-chart-color-5":"#faad14","--tv-chart-color-6":"#ff4d4f","--tv-chart-color-7":"#13c2c2","--tv-chart-color-8":"#fa8c16","--tv-font-family":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',"--tv-font-size":"14px","--tv-font-size-small":"12px","--tv-font-size-large":"16px","--tv-border-radius":"4px","--tv-border-radius-small":"2px","--tv-transition-duration":"0.3s"}}},re=function(){function e(){this.currentTheme=te.default,this.listeners=new Set,this.cssVarPrefix="--tv-"}return e.getInstance=function(){return e.instance||(e.instance=new e),e.instance},e.prototype.getCurrentTheme=function(){return this.currentTheme},e.prototype.getPresetTheme=function(e){return te[e]},e.prototype.getPresetThemeNames=function(){return Object.keys(te)},e.prototype.setTheme=function(e){var t="string"==typeof e?te[e]:e;t&&(this.currentTheme=t,this.applyThemeVariables(t),this.notifyListeners())},e.prototype.applyThemeVariables=function(e){if("undefined"!=typeof document){var t=document.documentElement,r=e.variables;Object.entries(r).forEach(function(e){var r=e[0],n=e[1];t.style.setProperty(r,n)}),t.setAttribute("data-theme",e.name),t.setAttribute("data-theme-type",e.type),e.isDark?t.setAttribute("data-theme-dark","true"):t.removeAttribute("data-theme-dark")}},e.prototype.getEChartsTheme=function(){var e=this.currentTheme;return{color:[e.variables["--tv-chart-color-1"],e.variables["--tv-chart-color-2"],e.variables["--tv-chart-color-3"],e.variables["--tv-chart-color-4"],e.variables["--tv-chart-color-5"],e.variables["--tv-chart-color-6"],e.variables["--tv-chart-color-7"],e.variables["--tv-chart-color-8"]],backgroundColor:e.variables["--tv-bg-color"],textStyle:{color:e.variables["--tv-text-color"],fontFamily:e.variables["--tv-font-family"]}}},e.prototype.toggleDarkMode=function(){"dark"===this.currentTheme.type?this.setTheme("default"):this.setTheme("dark")},e.prototype.isDarkMode=function(){return this.currentTheme.isDark||"dark"===this.currentTheme.type},e.prototype.getSystemPrefersDark=function(){return"undefined"!=typeof window&&window.matchMedia("(prefers-color-scheme: dark)").matches},e.prototype.watchSystemTheme=function(){var e=this;if("undefined"==typeof window)return function(){};var t=window.matchMedia("(prefers-color-scheme: dark)"),r=function(t){e.setTheme(t.matches?"dark":"default")};return t.addEventListener("change",r),function(){return t.removeEventListener("change",r)}},e.prototype.applyInitialTheme=function(){var e=this.getSystemPrefersDark();this.setTheme(e?"dark":"default")},e.prototype.onThemeChange=function(e){var t=this;return this.listeners.add(e),function(){return t.listeners.delete(e)}},e.prototype.notifyListeners=function(){var e=this;this.listeners.forEach(function(t){try{t(e.currentTheme)}catch(e){}})},e.prototype.createCustomTheme=function(e,t){return void 0===t&&(t="custom"),{name:t,type:"custom",isDark:!1,variables:ee(ee({},te.default.variables),e)}},e.prototype.exportThemeAsCSS=function(e){var t=e||this.currentTheme,r=t.variables;return':root[data-theme="'.concat(t.name,'"] {\n').concat(Object.entries(r).map(function(e){var t=e[0],r=e[1];return" ".concat(t,": ").concat(r,";")}).join("\n"),"\n}")},e.prototype.exportThemeAsJSON=function(e){var t=e||this.currentTheme;return JSON.stringify(t,null,2)},e.instance=null,e}().getInstance(),ne=function(){return ne=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ne.apply(this,arguments)},oe=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},ae={colors:["#1890ff"],backgroundColor:"#ffffff",textColor:"#333333",darkMode:!1};function ie(e){var t;void 0===e&&(e={});var r=e.selectedTheme,n=e.enableLivePreview,o=void 0===n||n,a=e.onThemeChange,l=V(),c=(0,i.useCallback)(function(){if(r){var e=l.find(function(e){return e.name===r});if(e)return e}return l[0]||ae},[r,l]),s=(0,i.useState)(c),u=s[0],d=s[1],f=(0,i.useState)(""),p=f[0],v=f[1],h=(0,i.useState)(!1),m=h[0],y=h[1],g=u.colors||ae.colors,b=u.backgroundColor||ae.backgroundColor,x=u.textColor||ae.textColor,C=null!==(t=u.darkMode)&&void 0!==t?t:ae.darkMode;(0,i.useEffect)(function(){if(r){var e=l.find(function(e){return e.name===r});e&&d(e)}},[r,l]);var w=(0,i.useCallback)(function(e){d(e),o&&K(e),null==a||a(e)},[o,a]),k=(0,i.useCallback)(function(e){var t=ne(ne({},u),e);d(t),o&&K(t),null==a||a(t)},[u,o,a]),E=(0,i.useCallback)(function(e,t){var r=oe([],g,!0);r[e]=t,k({colors:r})},[g,k]),S=(0,i.useCallback)(function(){k({colors:oe(oe([],g,!0),["#000000"],!1)})},[g,k]),O=(0,i.useCallback)(function(e){if(!(g.length<=1)){var t=g.filter(function(t,r){return r!==e});k({colors:t})}},[g,k]),T=(0,i.useCallback)(function(){y(!0),v("")},[]),A=(0,i.useCallback)(function(){y(!1),v("")},[]),I=(0,i.useCallback)(function(){var e=m&&p?p:u.name||"custom",t=ne(ne({},u),{name:e,colors:g,backgroundColor:b,textColor:x,darkMode:C});return q(e,t),y(!1),v(""),t},[m,p,u,g,b,x,C]);return{currentTheme:u,registeredThemes:l,colors:g,backgroundColor:b,textColor:x,darkMode:C,isEditing:m,newThemeName:p,setCurrentTheme:w,updateTheme:k,handleColorChange:E,handleAddColor:S,handleRemoveColor:O,handleStartEdit:T,setNewThemeName:v,saveTheme:I,cancelEdit:A}}const le=function(e){var t=e.themes,r=e.currentTheme,n=e.disabled,o=void 0!==n&&n,a=e.onSelect,i=e.onCreateNew;return l().createElement("div",{style:{marginBottom:"20px"}},l().createElement("h4",null,"选择主题"),l().createElement("div",{style:{display:"flex",flexWrap:"wrap",gap:"10px",marginTop:"10px"}},t.map(function(e){return l().createElement("button",{key:e.name,onClick:function(){return a(e)},disabled:o,style:{padding:"8px 16px",border:"2px solid ".concat(r.name===e.name?"#1890ff":"#e0e0e0"),borderRadius:"4px",backgroundColor:r.name===e.name?"#1890ff":"#ffffff",color:r.name===e.name?"#ffffff":"#333333",cursor:o?"not-allowed":"pointer",opacity:o?.6:1}},e.name)}),l().createElement("button",{onClick:i,disabled:o,style:{padding:"8px 16px",border:"2px dashed #e0e0e0",borderRadius:"4px",backgroundColor:"#fafafa",color:"#999999",cursor:o?"not-allowed":"pointer",opacity:o?.6:1}},"+ 新建主题")))},ce=function(e){var t=e.colors,r=e.disabled,n=void 0!==r&&r,o=e.onColorChange,a=e.onAddColor,i=e.onRemoveColor;return l().createElement("div",{style:{marginBottom:"20px"}},l().createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"10px"}},l().createElement("h4",null,"主题颜色"),l().createElement("button",{onClick:a,disabled:n,style:{padding:"4px 8px",border:"1px solid #e0e0e0",borderRadius:"4px",backgroundColor:"#ffffff",color:"#333333",cursor:n?"not-allowed":"pointer",opacity:n?.6:1}},"+ 添加颜色")),l().createElement("div",{style:{display:"flex",flexWrap:"wrap",gap:"10px"}},t.map(function(e,r){return l().createElement("div",{key:r,style:{display:"flex",alignItems:"center",gap:"5px"}},l().createElement("input",{type:"color",value:e,onChange:function(e){return o(r,e.target.value)},disabled:n,style:{width:"50px",height:"30px",border:"none",cursor:n?"not-allowed":"pointer",opacity:n?.6:1}}),l().createElement("input",{type:"text",value:e,onChange:function(e){return o(r,e.target.value)},disabled:n,style:{width:"80px",padding:"4px",border:"1px solid #e0e0e0",borderRadius:"4px",opacity:n?.6:1}}),l().createElement("button",{onClick:function(){return i(r)},disabled:n||t.length<=1,style:{padding:"4px 8px",border:"1px solid #ff4d4f",borderRadius:"4px",backgroundColor:"#ffffff",color:"#ff4d4f",cursor:n||t.length<=1?"not-allowed":"pointer",opacity:n||t.length<=1?.6:1}},"删除"))})))},se=function(e){var t=e.backgroundColor,r=e.textColor,n=e.darkMode,o=e.disabled,a=void 0!==o&&o,i=e.onBackgroundColorChange,c=e.onTextColorChange,s=e.onDarkModeChange,u={width:"50px",height:"30px",border:"none",cursor:a?"not-allowed":"pointer",opacity:a?.6:1},d={width:"120px",padding:"4px",border:"1px solid #e0e0e0",borderRadius:"4px",opacity:a?.6:1};return l().createElement("div",{style:{marginBottom:"20px"}},l().createElement("h4",null,"基础配置"),l().createElement("div",{style:{marginBottom:"10px"}},l().createElement("label",{style:{display:"block",marginBottom:"5px"}},"背景色:"),l().createElement("div",{style:{display:"flex",alignItems:"center",gap:"10px"}},l().createElement("input",{type:"color",value:t,onChange:function(e){return i(e.target.value)},disabled:a,style:u}),l().createElement("input",{type:"text",value:t,onChange:function(e){return i(e.target.value)},disabled:a,style:d}))),l().createElement("div",{style:{marginBottom:"10px"}},l().createElement("label",{style:{display:"block",marginBottom:"5px"}},"文本颜色:"),l().createElement("div",{style:{display:"flex",alignItems:"center",gap:"10px"}},l().createElement("input",{type:"color",value:r,onChange:function(e){return c(e.target.value)},disabled:a,style:u}),l().createElement("input",{type:"text",value:r,onChange:function(e){return c(e.target.value)},disabled:a,style:d}))),l().createElement("div",{style:{display:"flex",alignItems:"center",gap:"10px"}},l().createElement("label",null,"深色模式:"),l().createElement("input",{type:"checkbox",checked:n,onChange:function(e){return s(e.target.checked)},disabled:a,style:{cursor:a?"not-allowed":"pointer",opacity:a?.6:1}})))};var ue=function(){return ue=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ue.apply(this,arguments)};const de=function(e){var t=e.selectedTheme,r=e.onThemeChange,n=e.onThemeSave,o=e.disabled,a=void 0!==o&&o,i=e.style,c=void 0===i?{}:i,s=e.className,u=void 0===s?"":s,d=ie({selectedTheme:t,onThemeChange:r}),f=d.currentTheme,p=d.registeredThemes,v=d.colors,h=d.backgroundColor,m=d.textColor,y=d.darkMode,g=d.isEditing,b=d.newThemeName,x=d.setCurrentTheme,C=d.updateTheme,w=d.handleColorChange,k=d.handleAddColor,E=d.handleRemoveColor,S=d.handleStartEdit,O=d.setNewThemeName,T=d.saveTheme;return l().createElement("div",{className:"taroviz-theme-editor ".concat(u),style:ue({padding:"20px",border:"1px solid #e0e0e0",borderRadius:"8px",backgroundColor:"#ffffff",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)"},c)},l().createElement("h3",null,"主题编辑器"),l().createElement(le,{themes:p,currentTheme:f,disabled:a,onSelect:x,onCreateNew:S}),g&&l().createElement("div",{style:{marginBottom:"20px",padding:"15px",backgroundColor:"#f9f9f9",borderRadius:"4px"}},l().createElement("h4",null,"新建主题"),l().createElement("div",{style:{marginBottom:"10px"}},l().createElement("label",{style:{display:"block",marginBottom:"5px"}},"主题名称:"),l().createElement("input",{type:"text",value:b,onChange:function(e){return O(e.target.value)},disabled:a,style:{padding:"8px",border:"1px solid #e0e0e0",borderRadius:"4px",width:"100%",opacity:a?.6:1},placeholder:"输入主题名称"}))),l().createElement(ce,{colors:v,disabled:a,onColorChange:w,onAddColor:k,onRemoveColor:E}),l().createElement(se,{backgroundColor:h,textColor:m,darkMode:y,disabled:a,onBackgroundColorChange:function(e){return C({backgroundColor:e})},onTextColorChange:function(e){return C({textColor:e})},onDarkModeChange:function(e){return C({darkMode:e})}}),l().createElement("button",{onClick:function(){var e=T();null==n||n(e)},disabled:a,style:{padding:"10px 20px",border:"none",borderRadius:"4px",backgroundColor:"#1890ff",color:"#ffffff",cursor:a?"not-allowed":"pointer",opacity:a?.6:1}},"保存主题"))};var fe=function(){return fe=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},fe.apply(this,arguments)};const pe=function(e){var t=e.selectedTheme,r=e.onThemeChange,n=e.onThemeSave,o=e.onThemeImport,a=e.onThemeExport,c=e.disabled,s=void 0!==c&&c,u=e.style,d=void 0===u?{}:u,f=e.className,p=void 0===f?"":f,v=e.showPreview,h=void 0===v||v,m=(e.autoSave,e.autoSaveDelay,ie({selectedTheme:t,onThemeChange:r})),y=m.currentTheme,g=m.registeredThemes,b=m.colors,x=m.backgroundColor,C=m.textColor,w=m.darkMode,k=m.isEditing,E=m.newThemeName,S=m.setCurrentTheme,O=m.updateTheme,T=m.handleColorChange,A=m.handleAddColor,I=m.handleRemoveColor,D=m.handleStartEdit,R=m.setNewThemeName,j=m.saveTheme,M=m.cancelEdit,P=(0,i.useState)("colors"),N=P[0],L=P[1],z=(0,i.useState)(""),_=z[0],F=z[1],H=(0,i.useState)(""),B=H[0],U=H[1],W=(0,i.useState)(""),G=W[0],Z=W[1],Y=(0,i.useCallback)(function(){var e=j();null==n||n(e)},[j,n]),q=(0,i.useCallback)(function(){try{if(a){var e=a(y);F(e)}else F(JSON.stringify(y,null,2))}catch(e){F("")}},[y,a]),V=(0,i.useCallback)(function(){return e=void 0,t=void 0,n=function(){return function(e,t){var r,n,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=l(0),i.throw=l(1),i.return=l(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(c){return function(l){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&l[0]?n.return:l[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,l[1])).done)return o;switch(n=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,n=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){a.label=l[1];break}if(6===l[0]&&a.label<o[1]){a.label=o[1],o=l;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(l);break}o[2]&&a.ops.pop(),a.trys.pop();continue}l=t.call(e,a)}catch(e){l=[6,e],n=0}finally{r=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}}(this,function(e){switch(e.label){case 0:if(!_)return[2];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,navigator.clipboard.writeText(_)];case 2:case 3:return e.sent(),[3,4];case 4:return[2]}})},new((r=void 0)||(r=Promise))(function(o,a){function i(e){try{c(n.next(e))}catch(e){a(e)}}function l(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(i,l)}c((n=n.apply(e,t||[])).next())});var e,t,r,n},[_]),J=(0,i.useCallback)(function(){if(Z(""),B.trim())try{var e=JSON.parse(B);if(!e.name||!Array.isArray(e.colors))return void Z("无效的主题格式");O(e),null==o||o(e),U("")}catch(e){Z("JSON 解析失败")}else Z("请输入主题数据")},[B,O,o]);return l().createElement("div",{className:"taroviz-theme-editor-enhanced ".concat(p),style:fe({padding:"20px",border:"1px solid #e0e0e0",borderRadius:"8px",backgroundColor:"#ffffff",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)"},d)},l().createElement("h3",null,"增强型主题编辑器"),l().createElement(le,{themes:g,currentTheme:y,disabled:s,onSelect:S,onCreateNew:D}),k&&l().createElement("div",{style:{marginBottom:"20px",padding:"15px",backgroundColor:"#f9f9f9",borderRadius:"4px"}},l().createElement("h4",null,"新建主题"),l().createElement("div",{style:{marginBottom:"10px"}},l().createElement("label",{style:{display:"block",marginBottom:"5px"}},"主题名称:"),l().createElement("input",{type:"text",value:E,onChange:function(e){return R(e.target.value)},disabled:s,style:{padding:"8px",border:"1px solid #e0e0e0",borderRadius:"4px",width:"100%",opacity:s?.6:1},placeholder:"输入主题名称"})),l().createElement("button",{onClick:M,disabled:s,style:{padding:"6px 12px",border:"1px solid #e0e0e0",borderRadius:"4px",backgroundColor:"#ffffff",color:"#333333",cursor:s?"not-allowed":"pointer",opacity:s?.6:1}},"取消")),l().createElement("div",{style:{marginBottom:"20px",display:"flex",gap:"10px"}},l().createElement("button",{onClick:q,disabled:s,style:{padding:"8px 16px",border:"1px solid #e0e0e0",borderRadius:"4px",backgroundColor:"#ffffff",color:"#333333",cursor:s?"not-allowed":"pointer",opacity:s?.6:1}},"导出主题"),l().createElement("button",{onClick:V,disabled:s||!_,style:{padding:"8px 16px",border:"1px solid #e0e0e0",borderRadius:"4px",backgroundColor:"#ffffff",color:"#333333",cursor:s||!_?"not-allowed":"pointer",opacity:s||!_?.6:1}},"复制到剪贴板")),_&&l().createElement("div",{style:{marginBottom:"20px"}},l().createElement("textarea",{value:_,readOnly:!0,style:{width:"100%",height:"100px",padding:"10px",border:"1px solid #e0e0e0",borderRadius:"4px",resize:"vertical"}})),l().createElement("div",{style:{marginBottom:"20px"}},l().createElement("h4",null,"导入主题"),l().createElement("textarea",{value:B,onChange:function(e){return U(e.target.value)},disabled:s,placeholder:"粘贴主题 JSON 数据...",style:{width:"100%",height:"80px",padding:"10px",border:"1px solid ".concat(G?"#ff4d4f":"#e0e0e0"),borderRadius:"4px",resize:"vertical",opacity:s?.6:1}}),G&&l().createElement("p",{style:{color:"#ff4d4f",marginTop:"5px",fontSize:"12px"}},G),l().createElement("button",{onClick:J,disabled:s,style:{marginTop:"10px",padding:"8px 16px",border:"1px solid #e0e0e0",borderRadius:"4px",backgroundColor:"#ffffff",color:"#333333",cursor:s?"not-allowed":"pointer",opacity:s?.6:1}},"导入")),l().createElement("div",{style:{display:"flex",borderBottom:"1px solid #e0e0e0",marginBottom:"20px"}},function(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}([{key:"colors",label:"颜色"},{key:"layout",label:"布局"},{key:"typography",label:"字体"}],h?[{key:"preview",label:"预览"}]:[],!0).map(function(e){return l().createElement("button",{key:e.key,onClick:function(){return L(e.key)},style:{padding:"10px 20px",border:"none",borderBottom:"2px solid ".concat(N===e.key?"#1890ff":"transparent"),backgroundColor:"transparent",color:N===e.key?"#1890ff":"#333333",cursor:"pointer"}},e.label)})),l().createElement("div",{style:{marginBottom:"20px"}},function(){switch(N){case"colors":return l().createElement(l().Fragment,null,l().createElement(ce,{colors:b,disabled:s,onColorChange:T,onAddColor:A,onRemoveColor:I}),l().createElement(se,{backgroundColor:x,textColor:C,darkMode:w,disabled:s,onBackgroundColorChange:function(e){return O({backgroundColor:e})},onTextColorChange:function(e){return O({textColor:e})},onDarkModeChange:function(e){return O({darkMode:e})}}));case"layout":return l().createElement("div",{style:{padding:"20px",textAlign:"center",color:"#999"}},"布局配置功能即将上线");case"typography":return l().createElement("div",{style:{padding:"20px",textAlign:"center",color:"#999"}},"字体配置功能即将上线");case"preview":return l().createElement("div",{style:{padding:"20px",backgroundColor:x,color:C,borderRadius:"4px",minHeight:"200px"}},l().createElement("h4",{style:{color:C}},"主题预览"),l().createElement("div",{style:{display:"flex",gap:"10px",marginTop:"10px"}},b.map(function(e,t){return l().createElement("div",{key:t,style:{width:"40px",height:"40px",backgroundColor:e,borderRadius:"4px"}})})),l().createElement("p",{style:{marginTop:"10px",color:C}},"背景色: ",x," | 文本色: ",C," | 深色模式:"," ",w?"开启":"关闭"));default:return null}}()),l().createElement("button",{onClick:Y,disabled:s,style:{padding:"10px 20px",border:"none",borderRadius:"4px",backgroundColor:"#1890ff",color:"#ffffff",cursor:s?"not-allowed":"pointer",opacity:s?.6:1}},"保存主题"))};var ve,he=(ve=function(e,t){return ve=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},ve(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}ve(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),me=function(){return me=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},me.apply(this,arguments)},ye=function(e){function t(t){var r=e.call(this,t)||this;return r.handleReset=function(){r.setState({hasError:!1,error:null})},r.state={hasError:!1,error:null},r}return he(t,e),t.getDerivedStateFromError=function(e){return{hasError:!0,error:e}},t.prototype.componentDidCatch=function(e,t){var r,n;null===(n=(r=this.props).onError)||void 0===n||n.call(r,e,t)},t.prototype.render=function(){var e=this.state,t=e.hasError,r=e.error,n=this.props,o=n.children,a=n.fallback,i=n.showDetails,c=void 0!==i&&i;return t&&r?a?a(r,this.handleReset):l().createElement("div",{role:"alert","aria-live":"assertive",style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"var(--tv-border-radius, 16px)",backgroundColor:"var(--tv-bg-color, #fff)",border:"1px solid var(--tv-error-color, #ff4d4f)",borderRadius:"var(--tv-border-radius, 8px)",color:"var(--tv-text-color, #333)",minHeight:"200px",fontFamily:"var(--tv-font-family, sans-serif)"}},l().createElement("div",{style:{fontSize:"48px",marginBottom:"16px"},"aria-hidden":"true"},"⚠️"),l().createElement("h3",{style:{margin:"0 0 12px",color:"var(--tv-error-color, #ff4d4f)",fontWeight:700}},"图表渲染失败"),l().createElement("p",{style:{margin:"0 0 16px",color:"var(--tv-text-color-secondary, #666)",textAlign:"center",maxWidth:"320px"}},"图表在渲染过程中遇到错误,请检查数据配置是否正确"),c&&l().createElement("details",{style:{width:"100%",padding:"12px",backgroundColor:"var(--tv-bg-color-secondary, #f5f5f5)",borderRadius:"var(--tv-border-radius-small, 4px)",fontSize:"var(--tv-font-size-small, 12px)",fontFamily:"var(--tv-font-family, monospace)",overflow:"auto",maxHeight:"150px"}},l().createElement("summary",{style:{cursor:"pointer",marginBottom:"8px",fontWeight:600}},"错误详情"),l().createElement("pre",{style:{margin:0,whiteSpace:"pre-wrap",wordBreak:"break-all"}},r.message,"\n\n",r.stack)),l().createElement("button",{onClick:this.handleReset,style:{marginTop:"16px",padding:"8px 24px",backgroundColor:"var(--tv-primary-color, #1890ff)",color:"#fff",border:"none",borderRadius:"var(--tv-border-radius-small, 4px)",cursor:"pointer",fontSize:"var(--tv-font-size, 14px)",fontWeight:600,transition:"background-color var(--tv-transition-duration, 0.3s)"},onMouseEnter:function(e){e.currentTarget.style.backgroundColor="var(--tv-primary-color-hover, #40a9ff)"},onMouseLeave:function(e){e.currentTarget.style.backgroundColor="var(--tv-primary-color, #1890ff)"}},"重试")):o},t}(i.Component);function ge(e,t){var r=function(r){return l().createElement(ye,me({},t),l().createElement(e,me({},r)))},n=e.displayName||e.name;return r.displayName=n?"withErrorBoundary(".concat(n,")"):"withErrorBoundary(WrappedChart)",r}var be=function(){return be=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},be.apply(this,arguments)},xe={};function Ce(e){return xe[e]||(xe[e]=(0,i.lazy)(function(){return Promise.resolve().then(r.bind(r,9150)).then(function(t){return{default:t[e]}})})),xe[e]}Ce("LineChart"),Ce("BarChart"),Ce("PieChart"),Ce("ScatterChart"),Ce("RadarChartCustom"),Ce("HeatmapChart"),Ce("FunnelChart"),Ce("TreeMapChart"),Ce("SunburstChart"),Ce("SankeyChart");var we={line:function(){return Promise.resolve().then(r.bind(r,9150)).then(function(e){return{default:e.LineChart}})},bar:function(){return Promise.resolve().then(r.bind(r,9150)).then(function(e){return{default:e.BarChart}})},pie:function(){return Promise.resolve().then(r.bind(r,9150)).then(function(e){return{default:e.PieChart}})},scatter:function(){return Promise.resolve().then(r.bind(r,9150)).then(function(e){return{default:e.ScatterChart}})},radar:function(){return Promise.resolve().then(r.bind(r,9150)).then(function(e){return{default:e.RadarChartCustom}})},heatmap:function(){return Promise.resolve().then(r.bind(r,9150)).then(function(e){return{default:e.HeatmapChart}})},funnel:function(){return Promise.resolve().then(r.bind(r,9150)).then(function(e){return{default:e.FunnelChart}})},treemap:function(){return Promise.resolve().then(r.bind(r,9150)).then(function(e){return{default:e.TreeMapChart}})},sunburst:function(){return Promise.resolve().then(r.bind(r,9150)).then(function(e){return{default:e.SunburstChart}})},sankey:function(){return Promise.resolve().then(r.bind(r,9150)).then(function(e){return{default:e.SankeyChart}})}},ke=Object.keys(we),Ee=function(e){var t=e.text,r=void 0===t?"加载中...":t;return l().createElement("div",{role:"status","aria-label":r,"aria-busy":"true",style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",minHeight:"200px",backgroundColor:"var(--tv-bg-color-secondary, #f5f5f5)",borderRadius:"var(--tv-border-radius, 8px)"}},l().createElement("div",{style:{textAlign:"center"}},l().createElement("div",{style:{width:"40px",height:"40px",border:"3px solid var(--tv-primary-color, #1890ff)",borderTopColor:"transparent",borderRadius:"50%",animation:"taroviz-spin 1s linear infinite",margin:"0 auto 12px"},"aria-hidden":"true"}),l().createElement("style",null,"\n @keyframes taroviz-spin {\n to { transform: rotate(360deg); }\n }\n "),l().createElement("span",{style:{position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0}},r),l().createElement("span",{style:{color:"var(--tv-text-color-secondary, #666)",fontSize:"var(--tv-font-size, 14px)"}},r)))};function Se(e,t){var r=function(r){var n=r.loadingText,o=r.fallback,a=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(r,["loadingText","fallback"]),c=t||Ee;return l().createElement(i.Suspense,{fallback:l().createElement(c,{text:n})},o?l().createElement(l().Fragment,null,o,l().createElement(e,be({},a))):l().createElement(e,be({},a)))};return r.displayName="withLazyLoad(".concat(e.displayName||e.name||"Chart",")"),r}function Oe(e,t){void 0===t&&(t=!0);var r=we[e];return r?r().then(function(){}).catch(function(e){}):t?Promise.resolve():Promise.reject(new Error("Unknown chart type: ".concat(e)))}function Te(){return Promise.all(ke.map(function(e){return Oe(e)}))}function Ae(e){var t="".concat(e.charAt(0).toUpperCase()+e.slice(1),"Chart");return xe[t]||null}var Ie={get:function(e){return Ae(e)},preload:function(e,t){return void 0===t&&(t=!0),Oe(e,t)},preloadAll:function(){return Te()}};function De(e){var t=e.data,r=e.lineStyle,n=e.label,o=e.animation,a=e.animationDuration,i=e.precision;return[{type:"line",markLine:{symbol:["circle","arrow"],silent:!0,animation:!1!==o,animationDuration:a||300,precision:void 0===i?2:i,lineStyle:{color:(null==r?void 0:r.color)||"#333",width:(null==r?void 0:r.width)||2,type:(null==r?void 0:r.type)||"dashed",opacity:null==r?void 0:r.opacity},label:{show:!1!==(null==n?void 0:n.show),position:(null==n?void 0:n.position)||"end",formatter:null==n?void 0:n.formatter,color:(null==n?void 0:n.color)||"#333",fontSize:(null==n?void 0:n.fontSize)||12},data:t.map(function(e){return{xAxis:e.xAxis,yAxis:e.yAxis,name:e.name}})}}]}function Re(e){var t=e.data,r=e.style,n=e.label;return[{type:"bar",markArea:{silent:!0,animation:!1!==e.animation,animationDuration:e.animationDuration||300,itemStyle:{color:(null==r?void 0:r.color)||"rgba(24, 144, 255, 0.1)",opacity:(null==r?void 0:r.opacity)||.3,borderColor:(null==r?void 0:r.borderColor)||"transparent",borderWidth:(null==r?void 0:r.borderWidth)||0,borderType:null==r?void 0:r.borderType},label:{show:!1!==(null==n?void 0:n.show),position:(null==n?void 0:n.position)||"inside",formatter:null==n?void 0:n.formatter,color:(null==n?void 0:n.color)||"#333",fontSize:(null==n?void 0:n.fontSize)||12},data:t.map(function(e){var t=e[0],r=e[1];return[{xAxis:t.xAxis,yAxis:t.yAxis},{xAxis:r.xAxis,yAxis:r.yAxis}]})}}]}function je(e){var t=e.data,r=e.symbol,n=e.symbolSize,o=e.itemStyle,a=e.label;return[{type:"scatter",markPoint:{symbol:r,symbolSize:n,itemStyle:o,label:{show:!1!==(null==a?void 0:a.show),position:(null==a?void 0:a.position)||"top",formatter:null==a?void 0:a.formatter,color:(null==a?void 0:a.color)||"#333"},data:t}}]}function Me(e){var t=e.type,r=e.markLine,n=e.markArea,o=e.scatter;return(0,i.useMemo)(function(){var e=[];if("line"===t&&r){var a=De(r);e.push.apply(e,Array.isArray(a)?a:[a])}if("area"===t&&n){var i=Re(n);e.push.apply(e,Array.isArray(i)?i:[i])}if("scatter"===t&&o){var l=je(o);e.push.apply(e,Array.isArray(l)?l:[l])}return{series:e}},[t,r,n,o])}var Pe={averageLine:function(e){return void 0===e&&(e="#1890ff"),{data:[{type:"average",name:"平均值"}],lineStyle:{color:e,type:"dashed",width:2},label:{show:!0,position:"end",color:e}}},maxLine:function(e){return void 0===e&&(e="#f5222d"),{data:[{type:"max",name:"最大值"}],lineStyle:{color:e,type:"dashed",width:2},label:{show:!0,position:"end",color:e}}},minLine:function(e){return void 0===e&&(e="#52c41a"),{data:[{type:"min",name:"最小值"}],lineStyle:{color:e,type:"dashed",width:2},label:{show:!0,position:"end",color:e}}},thresholdLine:function(e,t){return void 0===t&&(t="#faad14"),{data:[{yAxis:e,name:"警戒线"}],lineStyle:{color:t,type:"solid",width:2},label:{show:!0,position:"start",color:t}}},targetArea:function(e,t,r){return void 0===r&&(r="rgba(82, 196, 26, 0.1)"),{data:[[{yAxis:e},{yAxis:t}]],style:{color:r,opacity:.3},label:{show:!0,position:"inside",color:"#52c41a"}}},warningArea:function(e,t,r){return void 0===r&&(r="rgba(250, 173, 20, 0.1)"),{data:[[{yAxis:e},{yAxis:t}]],style:{color:r,opacity:.3},label:{show:!0,position:"inside",color:"#faad14"}}}};function Ne(e){var t=[];return e.forEach(function(e){if("line"===e.type&&e.markLine){var r=De(e.markLine);t.push.apply(t,Array.isArray(r)?r:[r])}"area"===e.type&&e.markArea&&(r=Re(e.markArea),t.push.apply(t,Array.isArray(r)?r:[r])),"scatter"===e.type&&e.scatter&&(r=je(e.scatter),t.push.apply(t,Array.isArray(r)?r:[r]))}),{series:t}}var Le=[];function ze(e){void 0===e&&(e="chart");var t=(new Date).toISOString().slice(0,19).replace(/[:-]/g,"");return"".concat(e,"_").concat(t)}function _e(e,t){var r=(new Date).toISOString().slice(0,10),n=e.replace(/[^a-zA-Z0-9\u4e00-\u9fa5]/g,"_");return"".concat(n,"_").concat(r,".").concat(t)}function Fe(e,t,r){if("undefined"!=typeof document){var n=document.createElement("a");n.href=e,n.download=t,n.style.display="none",document.body.appendChild(n),n.click();var o=setTimeout(function(){n.parentNode&&document.body.removeChild(n),null==r||r();var e=Le.indexOf(o);-1!==e&&Le.splice(e,1)},100);Le.push(o)}}function He(e,t){var r=URL.createObjectURL(e);Fe(r,t,function(){return URL.revokeObjectURL(r)})}function Be(e,t){Fe(e,t)}var Ue=function(){return Ue=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ue.apply(this,arguments)},We=function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{c(n.next(e))}catch(e){a(e)}}function l(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(i,l)}c((n=n.apply(e,t||[])).next())})},Ge=function(e,t){var r,n,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=l(0),i.throw=l(1),i.return=l(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(c){return function(l){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&l[0]?n.return:l[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,l[1])).done)return o;switch(n=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,n=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){a.label=l[1];break}if(6===l[0]&&a.label<o[1]){a.label=o[1],o=l;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(l);break}o[2]&&a.ops.pop(),a.trys.pop();continue}l=t.call(e,a)}catch(e){l=[6,e],n=0}finally{r=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}},Ze=function(){function e(){}return e.exportImage=function(e,t){void 0===t&&(t={});var r=t.type,n=void 0===r?"png":r,o=t.pixelRatio,a=void 0===o?2:o,i=t.backgroundColor,l=void 0===i?"#ffffff":i,c=t.quality,s=void 0===c?.8:c,u="image/".concat(n);return{data:e.getDataURL({type:n,pixelRatio:a,backgroundColor:l,quality:s}),filename:_e("chart",n),mimeType:u}},e.exportSVG=function(e,t){void 0===t&&(t={});var r=t.compress,n=void 0!==r&&r,o=e.getDataURL({type:"svg"});if(!o||"data:image/svg+xml;charset=utf8,"===o)throw new Error("SVG export is not supported. Please use canvas renderer.");var a=o,i="image/svg+xml";return n&&(a=a.replace(/>\s+</g,"><").replace(/\s+/g," "),i+=";charset=utf-8"),{data:a,filename:_e("chart","svg"),mimeType:i}},e.exportPDF=function(e){return We(this,arguments,Promise,function(e,t){var r,n,o,a,i,l,c,s,u,d,f,p,v,h,m,y,g,b,x,C,w,k,E,S,O,T,A,I,D,R;return void 0===t&&(t={}),Ge(this,function(j){switch(j.label){case 0:r=t.orientation,n=void 0===r?"portrait":r,o=t.pageSize,a=void 0===o?"a4":o,i=t.title,l=void 0===i?"Chart Export":i,c=t.author,s=void 0===c?"TaroViz":c,u=t.margin,d=void 0===u?{top:40,right:40,bottom:40,left:40}:u,f=t.includeTitle,p=void 0===f||f,v=e.getDataURL({type:"png",pixelRatio:2,backgroundColor:"#ffffff"}),j.label=1;case 1:return j.trys.push([1,3,,4]),[4,import("jspdf")];case 2:return m=j.sent(),h=m.default,[3,4];case 3:return j.sent(),[2,{data:v,filename:_e("chart","png"),mimeType:"image/png"}];case 4:return y={a4:{width:210,height:297},letter:{width:216,height:279},legal:{width:216,height:356},tabloid:{width:279,height:432}}[a],g="landscape"===n,(b=new h({orientation:n,unit:"mm",format:a})).setProperties({title:l,author:s,subject:"Chart Export",keywords:"chart, taroviz, echarts"}),x=g?y.height:y.width,C=.6*x,w=g?y.height:y.width,k=g?y.width:y.height,E=d.top||40,S=d.left||40,p&&b.setFontSize(16).setTextColor(51,51,51).text(l,S,E),O=p?E+15:E,T=(w-x)/2,b.addImage(v,"PNG",T,O,x,C),A=k-(null!==(R=d.bottom)&&void 0!==R?R:40)/2,b.setFontSize(10).setTextColor(153,153,153),b.text("Generated by TaroViz on ".concat((new Date).toLocaleDateString()),S,A),D=b.output("blob"),[2,{data:I=D instanceof Blob?D:"string"==typeof D?new Blob([D],{type:"application/pdf"}):new Blob([new Uint8Array(D)],{type:"application/pdf"}),filename:_e(l.replace(/\s+/g,"_"),"pdf"),mimeType:"application/pdf",size:I.size}]}})})},e.exportBatch=function(e,t){return We(this,void 0,Promise,function(){var r,n,o,a,i,l,c,s,u;return Ge(this,function(d){switch(d.label){case 0:r=t.format,t.filenamePrefix,n=t.compress,o=[],a=0,i=e,d.label=1;case 1:if(!(a<i.length))return[3,8];l=i[a],c=l.name,s=l.chart,d.label=2;case 2:return d.trys.push([2,6,,7]),u=void 0,"pdf"!==r?[3,4]:[4,this.exportPDF(s,{title:c})];case 3:return u=d.sent(),[3,5];case 4:u=this.exportImage(s,{type:r}),d.label=5;case 5:return n&&u.filename&&(u.filename=u.filename.replace(/\.(\w+)$/,".$1")),o.push(u),[3,7];case 6:return d.sent(),[3,7];case 7:return a++,[3,1];case 8:return[2,o]}})})},e.download=function(e){var t,r,n;t=e.data,r=e.filename,n=e.mimeType,He("string"==typeof t?new Blob([t],{type:n||"text/plain"}):t,r)},e.copyToClipboard=function(e){return We(this,arguments,Promise,function(e,t){var r,n,o;return void 0===t&&(t={}),Ge(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),r=this.exportImage(e,Ue(Ue({},t),{type:"png"})),n=function(e){for(var t=e.split(","),r=t[0].match(/:(.*?);/),n=r?r[1]:"image/png",o=atob(t[1]),a=o.length,i=new Uint8Array(a),l=0;l<a;l++)i[l]=o.charCodeAt(l);return new Blob([i],{type:n})}(r.data),[4,navigator.clipboard.write([new ClipboardItem((o={},o[n.type]=n,o))])];case 1:return a.sent(),[2,!0];case 2:return a.sent(),[2,!1];case 3:return[2]}})})},e.calculateExportSize=function(e,t){void 0===t&&(t=300);var r=e.getWidth(),n=e.getHeight(),o=t/96;return{width:Math.round(r*o),height:Math.round(n*o)}},e}(),Ye=Ze;function qe(e,t){var r=this,n=(0,i.useState)(null),o=n[0],a=n[1],l=(0,i.useState)(!1),c=l[0],s=l[1],u=(0,i.useRef)(t);return u.current=t,(0,i.useEffect)(function(){if(e.current&&!o)return t=r,n=void 0,l=function(){var e;return function(e,t){var r,n,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=l(0),i.throw=l(1),i.return=l(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(c){return function(l){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&l[0]?n.return:l[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,l[1])).done)return o;switch(n=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,n=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){a.label=l[1];break}if(6===l[0]&&a.label<o[1]){a.label=o[1],o=l;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(l);break}o[2]&&a.ops.pop(),a.trys.pop();continue}l=t.call(e,a)}catch(e){l=[6,e],n=0}finally{r=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}}(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,(0,S.cK)(u.current||{})];case 1:return e=t.sent(),a(e),s(!0),[3,3];case 2:return t.sent(),[3,3];case 3:return[2]}})},new((i=void 0)||(i=Promise))(function(e,r){function o(e){try{c(l.next(e))}catch(e){r(e)}}function a(e){try{c(l.throw(e))}catch(e){r(e)}}function c(t){var r;t.done?e(t.value):(r=t.value,r instanceof i?r:new i(function(e){e(r)})).then(o,a)}c((l=l.apply(t,n||[])).next())}),function(){var e;if(o){try{var t=o;(null===(e=t.isDisposed)||void 0===e?void 0:e.call(t))||t.dispose()}catch(e){}a(null),s(!1)}};var t,n,i,l},[e]),[o,a,c]}function Ve(e,t,r){var n=r||{},o=n.notMerge,a=void 0!==o&&o,l=n.lazyUpdate,c=void 0!==l&&l,s=n.replaceMerge,u=n.deps,d=void 0===u?[]:u;(0,i.useEffect)(function(){if(e&&t)try{e.setOption(t,a,c)}catch(e){}},function(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}([e,t,a,c,s],d,!0))}function Je(e,t){(0,i.useEffect)(function(){if(e&&t){var r=Object.entries(t);return r.forEach(function(t){var r=t[0],n=t[1];try{e.on(r,n)}catch(e){}}),function(){r.forEach(function(t){var r=t[0],n=t[1];try{e.off(r,n)}catch(e){}})}}},[e,t])}function Ke(e,t,r){(0,i.useEffect)(function(){if(e)try{t?e.showLoading(r):e.hideLoading()}catch(e){}},[e,t,r])}function Qe(e){var t=e||{},r=t.breakpoints,n=void 0===r?{xs:0,sm:576,md:768,lg:992,xl:1200}:r,o=t.defaultBreakpoint,a=void 0===o?"md":o,l=(0,i.useState)(a),c=l[0],s=l[1],u=(0,i.useState)({width:0,height:0}),d=u[0],f=u[1];return(0,i.useEffect)(function(){var e=function(){var e=window.innerWidth;f({width:e,height:window.innerHeight});var t="xs";e>=n.xl?t="xl":e>=n.lg?t="lg":e>=n.md?t="md":e>=n.sm&&(t="sm"),s(t)};return e(),window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}},[n]),{breakpoint:c,windowSize:d}}function $e(e){var t=(0,i.useState)(!1),r=t[0],n=t[1],o=(0,i.useCallback)(function(){e.current&&(r?document.exitFullscreen&&document.exitFullscreen():e.current.requestFullscreen&&e.current.requestFullscreen())},[e,r]);return(0,i.useEffect)(function(){var e=function(){n(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",e),function(){return document.removeEventListener("fullscreenchange",e)}},[]),{isFullscreen:r,toggle:o}}function Xe(e){var t=e;return{exportImage:(0,i.useCallback)(function(e){var r;if(!t)return null;var n=e||{},o=n.type,a=void 0===o?"png":o,i=n.pixelRatio,l=void 0===i?2:i,c=n.backgroundColor;return null===(r=t.getDataURL)||void 0===r?void 0:r.call(t,{type:a,pixelRatio:l,backgroundColor:c})},[t]),exportSVG:(0,i.useCallback)(function(){var e;return t?null===(e=t.getSvgData)||void 0===e?void 0:e.call(t):null},[t]),exportCSV:(0,i.useCallback)(function(e){var r;return t?null===(r=t.getCompressedDataURL)||void 0===r?void 0:r.call(t,e):null},[t])}}function et(e){var t=e;return{getInstance:(0,i.useCallback)(function(){return e},[e]),clear:(0,i.useCallback)(function(){var e;null===(e=null==t?void 0:t.clear)||void 0===e||e.call(t)},[t]),repaint:(0,i.useCallback)(function(){var e;null===(e=null==t?void 0:t.resize)||void 0===e||e.call(t)},[t]),dispatchAction:(0,i.useCallback)(function(e){var r;null===(r=null==t?void 0:t.dispatchAction)||void 0===r||r.call(t,e)},[t]),showTip:(0,i.useCallback)(function(e,r){var n;null===(n=null==t?void 0:t.dispatchAction)||void 0===n||n.call(t,{type:"showTip",seriesIndex:e,dataIndex:r})},[t]),hideTip:(0,i.useCallback)(function(){var e;null===(e=null==t?void 0:t.dispatchAction)||void 0===e||e.call(t,{type:"hideTip"})},[t]),zoom:(0,i.useCallback)(function(e,r){var n;null===(n=null==t?void 0:t.dispatchAction)||void 0===n||n.call(t,{type:"dataZoom",start:null!=e?e:0,end:null!=r?r:100})},[t])}}function tt(e,t){var r=t||{},n=r.delay,o=void 0===n?300:n,a=r.minWidth,l=r.minHeight,c=r.enabled,s=void 0===c||c,u=(0,i.useRef)();(0,i.useEffect)(function(){var t;if(e&&s){var r=function(){u.current&&clearTimeout(u.current),u.current=setTimeout(function(){var t,r;try{var n=null===(t=e.getDom)||void 0===t?void 0:t.call(e);if(n){var o=n.clientWidth,i=n.clientHeight;if(a&&o<a)return;if(l&&i<l)return}null===(r=e.resize)||void 0===r||r.call(e)}catch(e){}},o)};window.addEventListener("resize",r);var n=null===(t=e.getDom)||void 0===t?void 0:t.call(e);if(n&&"undefined"!=typeof ResizeObserver){var i=new ResizeObserver(r);return i.observe(n),function(){i.disconnect(),window.removeEventListener("resize",r),u.current&&clearTimeout(u.current)}}return function(){window.removeEventListener("resize",r),u.current&&clearTimeout(u.current)}}},[e,o,a,l,s])}function rt(e,t){return void 0===t&&(t=!1),(0,i.useMemo)(function(){if("string"==typeof e)try{return J(e)||(t?"dark":e)}catch(r){return t?"dark":e}return e},[e,t])}function nt(e){void 0===e&&(e="default");var t=(0,i.useState)(e),r=t[0],n=t[1],o=(0,i.useState)(!1),a=o[0],l=o[1];return{theme:r,isDark:a,switchTheme:(0,i.useCallback)(function(e){n(e),"string"==typeof e&&l("dark"===e||e.includes("dark"))},[]),toggleDark:(0,i.useCallback)(function(){l(function(e){return!e}),n(function(e){return"dark"===e?"default":"dark"})},[]),setTheme:n}}function ot(e,t){var r=this,n=t||{},o=n.interval,a=void 0===o?5e3:o,l=n.autoStart,c=void 0!==l&&l,s=n.retryCount,u=void 0===s?3:s,d=n.retryDelay,f=void 0===d?1e3:d,p=(0,i.useState)(null),v=p[0],h=p[1],m=(0,i.useState)(c),y=m[0],g=m[1],b=(0,i.useState)(null),x=b[0],C=b[1],w=(0,i.useRef)({cancelled:!1}),k=(0,i.useCallback)(function(){return t=r,n=void 0,a=function(){var t,r,n,o,a;return function(e,t){var r,n,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=l(0),i.throw=l(1),i.return=l(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(c){return function(l){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&l[0]?n.return:l[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,l[1])).done)return o;switch(n=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,n=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){a.label=l[1];break}if(6===l[0]&&a.label<o[1]){a.label=o[1],o=l;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(l);break}o[2]&&a.ops.pop(),a.trys.pop();continue}l=t.call(e,a)}catch(e){l=[6,e],n=0}finally{r=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}}(this,function(i){switch(i.label){case 0:if(w.current.cancelled=!0,w.current={cancelled:!1},t=w.current,r=u,g(!0),C(null),!(u<0))return[3,5];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,e()];case 2:return o=i.sent(),t.cancelled||(h(o),g(!1)),[3,4];case 3:return n=i.sent(),t.cancelled||(C(n),g(!1)),[3,4];case 4:return[2];case 5:if(!(r>0)||t.cancelled)return[3,11];i.label=6;case 6:return i.trys.push([6,8,,10]),[4,e()];case 7:return o=i.sent(),t.cancelled||(h(o),g(!1)),[2];case 8:return a=i.sent(),--r<=0||t.cancelled?(t.cancelled||C(a),g(!1),[2]):[4,new Promise(function(e){return setTimeout(e,f)})];case 9:return i.sent(),[3,10];case 10:return[3,5];case 11:return[2]}})},new((o=void 0)||(o=Promise))(function(e,r){function i(e){try{c(a.next(e))}catch(e){r(e)}}function l(e){try{c(a.throw(e))}catch(e){r(e)}}function c(t){var r;t.done?e(t.value):(r=t.value,r instanceof o?r:new o(function(e){e(r)})).then(i,l)}c((a=a.apply(t,n||[])).next())});var t,n,o,a},[e,u,f]);return(0,i.useEffect)(function(){if(c&&k(),a>0){var e=setInterval(k,a);return function(){clearInterval(e),w.current.cancelled=!0}}return function(){w.current.cancelled=!0}},[a,c,k]),{data:v,loading:y,error:x,refresh:(0,i.useCallback)(function(){k()},[k])}}var at=function(){return at=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},at.apply(this,arguments)},it=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))};function lt(e,t,r,n){if(0===e.length)return"zero"===n?0:NaN;var o=e.map(function(e){return Number(e[t])||0});switch(r){case"sum":for(var a=0,i=0;i<o.length;i++)a+=o[i];return a;case"average":if(0===o.length)return 0;for(a=0,i=0;i<o.length;i++)a+=o[i];return a/o.length;case"max":var l=o[0];for(i=1;i<o.length;i++)o[i]>l&&(l=o[i]);return l;case"min":var c=o[0];for(i=1;i<o.length;i++)o[i]<c&&(c=o[i]);return c;case"count":return o.length;case"first":default:return o[0];case"last":return o[o.length-1]}}var ct=function(){return ct=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ct.apply(this,arguments)};function st(e,t){return(0,i.useMemo)(function(){return!e||Array.isArray(e)&&0===e.length?{}:t(e)},[e,t])}function ut(e){var t=e.data,r=e.chartType,n=e.mapping,o=void 0===n?{}:n,a=e.extraConfig,l=void 0===a?{}:a;return(0,i.useMemo)(function(){switch(r){case"line":case"bar":return function(e,t,r,n){var o,a=r||{},i=a.xField,l=void 0===i?"name":i,c=a.yField,s=void 0===c?"value":c,u=a.seriesField,d=e.categories||(null===(o=e.rows)||void 0===o?void 0:o.map(function(e){return String(e[l])}))||[],f=e.series||e.rows||[];if(u){var p=new Map;f.forEach(function(e){var t=String(e[u]||"default");p.has(t)||p.set(t,[]),p.get(t).push(e)});var v=Array.from(p.entries()).map(function(e){var r=e[0],n=e[1];return{name:r,type:t,data:n.map(function(e){var t;return null!==(t=e[s])&&void 0!==t?t:0})}});return at({xAxis:{type:"category",data:d},yAxis:{type:"value"},series:v},n)}var h=[{type:t,data:f.map(function(e){var t;return null!==(t=e[s])&&void 0!==t?t:0})}];return at({xAxis:{type:"category",data:d},yAxis:{type:"value"},series:h},n)}(t,r,o,l);case"pie":return function(e,t,r){var n=t||{},o=n.nameField,a=void 0===o?"name":o,i=n.valueField,l=void 0===i?"value":i,c=(e.series||e.rows||[]).map(function(e){return{name:String(e[a]||""),value:Number(e[l])||0}});return at({series:[{type:"pie",radius:"60%",data:c}]},r)}(t,o,l);case"scatter":return function(e,t,r){var n=t||{},o=n.xField,a=void 0===o?"x":o,i=n.yField,l=void 0===i?"y":i,c=n.sizeField,s=(e.series||e.rows||[]).map(function(e){var t=e,r=[Number(t[a])||0,Number(t[l])||0];return c&&r.push(Number(t[c])||1),r});return at({xAxis:{type:"value",scale:!0},yAxis:{type:"value",scale:!0},series:[{type:"scatter",data:s}]},r)}(t,o,l);case"radar":return function(e,t,r){var n=t||{},o=n.nameField,a=void 0===o?"name":o,i=n.valueField,l=void 0===i?"value":i,c=(e.series||e.rows||[]).map(function(e){var t=e;return{name:String(t[a]||""),max:Math.max(Number(t[l])||100,100)}}),s=(e.series||e.rows||[]).map(function(e){return Number(e[l])||0});return at({radar:{indicator:c},series:[{type:"radar",data:[{value:s}]}]},r)}(t,o,l);case"heatmap":return function(e,t,r){var n=t||{},o=n.xField,a=void 0===o?"x":o,i=n.yField,l=void 0===i?"y":i,c=n.valueField,s=void 0===c?"value":c,u=it([],new Set((e.series||e.rows||[]).map(function(e){return String(e[a])})),!0),d=it([],new Set((e.series||e.rows||[]).map(function(e){return String(e[l])})),!0),f=(e.series||e.rows||[]).map(function(e){var t=e;return[u.indexOf(String(t[a])),d.indexOf(String(t[l])),Number(t[s])||0]});return at({xAxis:{type:"category",data:u},yAxis:{type:"category",data:d},visualMap:{min:0,calculable:!0},series:[{type:"heatmap",data:f}]},r)}(t,o,l);default:return{}}},[t,r,o,l])}function dt(e){var t=e.data,r=e.columns,n=void 0===r?[]:r,o=e.transpose,a=void 0!==o&&o,l=e.extraConfig,c=void 0===l?{}:l;return(0,i.useMemo)(function(){if(!t||0===t.length)return{};var e=t[0],r=n.length>0?n.map(function(e){return e.field}):Object.keys(e),o=new Map(n.map(function(e){return[e.field,e]})),i=a?r:t.map(function(e){return String(e[r[0]]||"")}),l=(a?r:r.slice(1)).map(function(e){var r="string"==typeof e?e:"",n=o.get(r),a=t.map(function(e){return Number(e[r])||0});return{name:(null==n?void 0:n.label)||r,type:"bar",data:a,_itemStyle:(null==n?void 0:n.color)?{color:n.color}:void 0}});return ct({xAxis:{type:"category",data:i},yAxis:{type:"value"},series:l},c)},[t,n,a,c])}function ft(e){var t=e.data,r=e.dateField,n=e.valueField,o=e.groupField,a=e.period,l=void 0===a?"day":a,c=e.aggregation,s=void 0===c?"sum":c,u=e.fillMissing,d=void 0===u?"forward":u,f=e.extraConfig,p=void 0===f?{}:f;return(0,i.useMemo)(function(){if(!t||0===t.length)return{};var e=function(e,t,r){return e.reduce(function(e,n){var o,a=new Date(String(n[t]));switch(r){case"day":default:o=a.toISOString().split("T")[0];break;case"week":var i=function(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate())),r=t.getUTCDay()||7;t.setUTCDate(t.getUTCDate()+4-r);var n=new Date(Date.UTC(t.getUTCFullYear(),0,1));return Math.ceil(((t.getTime()-n.getTime())/864e5+1)/7)}(a);o="".concat(a.getFullYear(),"-W").concat(i);break;case"month":o="".concat(a.getFullYear(),"-").concat(String(a.getMonth()+1).padStart(2,"0"));break;case"quarter":o="".concat(a.getFullYear(),"-Q").concat(Math.ceil((a.getMonth()+1)/3));break;case"year":o=String(a.getFullYear())}return e[o]||(e[o]=[]),e[o].push(n),e},{})}(t,r,l),a=Object.keys(e).sort();if(o){var i=new Set(t.map(function(e){return String(e[o])})),c=Array.from(i).map(function(t){var r=a.map(function(r){var a;return lt((null===(a=e[r])||void 0===a?void 0:a.filter(function(e){return String(e[o])===t}))||[],n,s,d)});return{name:t,type:"line",data:r,smooth:!0}});return ct({xAxis:{type:"category",data:a},yAxis:{type:"value"},series:c},p)}var u=a.map(function(t){return lt(e[t]||[],n,s,d)});return ct({xAxis:{type:"category",data:a},yAxis:{type:"value"},series:[{type:"line",data:u,smooth:!0}]},p)},[t,r,n,o,l,s,d,p])}function pt(e,t,r,n){n.current.forEach(function(n,o){var a,i,l,c,s,u;if(o!==e)try{switch(t){case"click":case"hover":var d=r;null===(i=(a=n.instance).dispatchAction)||void 0===i||i.call(a,{type:"showTip",seriesIndex:d.seriesIndex,dataIndex:d.dataIndex});break;case"select":d=r,null===(c=(l=n.instance).dispatchAction)||void 0===c||c.call(l,{type:"toggleSelect",seriesIndex:d.seriesIndex,dataIndex:d.dataIndex});break;case"dataZoom":d=r,null===(u=(s=n.instance).dispatchAction)||void 0===u||u.call(s,{type:"dataZoom",start:d.start,end:d.end,dataZoomIndex:d.dataZoomIndex,dataZoomIndexs:d.dataZoomIndexs})}}catch(e){}})}function vt(e){var t=(0,i.useMemo)(function(){return["click","hover","select","dataZoom"]},[]),r=e.chartIds,n=void 0===r?[]:r,o=e.events,a=void 0===o?t:o,l=e.autoBind,c=void 0!==l&&l,s=e.groupName,u=e.disabled,d=void 0!==u&&u,f=(e.onConnect,e.eventFilter),p=(0,i.useRef)(new Map),v=(0,i.useRef)(!1),h=(0,i.useRef)(e);h.current=e;var m=(0,i.useRef)(new Map),y=(0,i.useCallback)(function(e,t){return function(e,t,r,n,o,a){return function(i){if(!r&&(!n||n(t,i))){pt(e,t,i,o);var l=a.current;l.onConnect&&o.current.forEach(function(r,n){var o;n!==e&&(null===(o=l.onConnect)||void 0===o||o.call(l,e,n,{eventType:t,params:i}))})}}}(e,t,d,f,p,h)},[d,f,p,h]),g=(0,i.useCallback)(function(e,t,r){pt(e,t,r,p)},[p]),b=(0,i.useCallback)(function(e,t){!function(e,t,r,n,o){if(e){var a=new Map;r.forEach(function(r){var o=n(t,r);a.set(r,o);try{e.on(r,o)}catch(e){}}),o.current.set(t,a)}}(e,t,a,y,m)},[a,y,m]),x=(0,i.useCallback)(function(e){!function(e,t,r){var n=t.current.get(e);if(n){var o=r.current.get(e);o&&(n.forEach(function(e,t){try{o.instance.off(t,e)}catch(e){}}),t.current.delete(e))}}(e,m,p)},[m,p]),C=(0,i.useCallback)(function(e,t){!function(e,t,r,n,o,a,i){var l=t||"chart_".concat(Date.now(),"_").concat(Math.random().toString(36).substr(2,9));if(n.current.has(l))return l;if(n.current.set(l,{instance:e,id:l}),i(e,l),o.current=!0,r&&"group"in e)try{e.group=r}catch(e){}}(e,t,s,p,v,0,b)},[s,p,v,m,b]),w=(0,i.useCallback)(function(e,t){!function(e,t,r,n,o){var a=t;a||r.current.forEach(function(t,r){t.instance===e&&(a=r)}),a&&r.current.has(a)&&(o(a),r.current.delete(a),n.current=r.current.size>0)}(e,t,p,v,x)},[p,v,x]),k=(0,i.useCallback)(function(e,t){!function(e,t,r,n,o){if(!r&&n.current.get(e)){var a=t||{},i=a.eventType,l=a.params;i&&o(e,i,l)}}(e,t,d,p,g)},[d,p,g]),E=(0,i.useCallback)(function(e){!function(e,t){e.forEach(function(e){var r=e.instance,n=e.id;t(r,n)})}(e,C)},[C]),S=(0,i.useCallback)(function(){!function(e,t,r){e.current.forEach(function(e,t){r(t)}),e.current.clear(),t.current=!1}(p,v,x)},[p,v,x]);return(0,i.useEffect)(function(){c&&n.length},[c,n]),(0,i.useEffect)(function(){return function(){S()}},[S]),{connect:C,disconnect:w,dispatchConnect:k,connectAll:E,disconnectAll:S,isConnected:v.current}}var ht=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))};function mt(e,t){return r=this,n=void 0,a=function(){return function(e,t){var r,n,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=l(0),i.throw=l(1),i.return=l(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(c){return function(l){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&l[0]?n.return:l[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,l[1])).done)return o;switch(n=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,n=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){a.label=l[1];break}if(6===l[0]&&a.label<o[1]){a.label=o[1],o=l;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(l);break}o[2]&&a.ops.pop(),a.trys.pop();continue}l=t.call(e,a)}catch(e){l=[6,e],n=0}finally{r=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}}(this,function(r){return[2,new Promise(function(r){try{var n=document.createElement("canvas"),o=n.getContext("2d");if(!o)return void r(null);var a=new Image;a.onload=function(){var e=595.28,i=841.89;n.width=e,n.height=i,o.fillStyle="#ffffff",o.fillRect(0,0,e,i);var l,c,s=a.width/a.height;s>.7070757462376319?c=(l=476.224)/s:l=(c=.6*i)*s;var u=(e-l)/2,d=(i-c)/2;o.drawImage(a,u,d,l,c),o.fillStyle="#333333",o.font="16px Arial",o.textAlign="center",o.fillText(t||"Chart Export",297.64,d-20),r(n.toDataURL("image/png"))},a.onerror=function(){r(null)},a.src=e}catch(e){r(null)}})]})},new((o=Promise)||(o=Promise))(function(e,t){function i(e){try{c(a.next(e))}catch(e){t(e)}}function l(e){try{c(a.throw(e))}catch(e){t(e)}}function c(t){var r;t.done?e(t.value):(r=t.value,r instanceof o?r:new o(function(e){e(r)})).then(i,l)}c((a=a.apply(r,n||[])).next())});var r,n,o,a}var yt=function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{c(n.next(e))}catch(e){a(e)}}function l(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(i,l)}c((n=n.apply(e,t||[])).next())})},gt=function(e,t){var r,n,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=l(0),i.throw=l(1),i.return=l(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(c){return function(l){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&l[0]?n.return:l[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,l[1])).done)return o;switch(n=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,n=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){a.label=l[1];break}if(6===l[0]&&a.label<o[1]){a.label=o[1],o=l;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(l);break}o[2]&&a.ops.pop(),a.trys.pop();continue}l=t.call(e,a)}catch(e){l=[6,e],n=0}finally{r=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}};function bt(e,t){var r=this;void 0===t&&(t={});var n=t.filename,o=t.pixelRatio,a=void 0===o?2:o,l=t.backgroundColor,c=void 0===l?"#ffffff":l,s=t.format,u=void 0===s?"png":s,d=t.includeLabels,f=void 0===d||d,p=t.beforeExport,v=t.afterExport,h=(0,i.useRef)(null);h.current=e;var m=(0,i.useCallback)(function(){var e=h.current;if(e&&p)try{p(e)}catch(e){}},[p]),y=(0,i.useCallback)(function(e){if(v)try{v(e)}catch(e){}},[v]),g=(0,i.useCallback)(function(e){var t,r=h.current;if(r){var n=e||u;try{if("svg"===n){var o=null===(t=r.getSvgData)||void 0===t?void 0:t.call(r);return o?"data:image/svg+xml;base64,".concat(btoa(o)):void 0}return r.getDataURL?r.getDataURL({type:n,pixelRatio:a,backgroundColor:c}):void 0}catch(e){return}}},[u,a,c]),b=(0,i.useCallback)(function(e){return yt(r,void 0,Promise,function(){var t,r,o,i,l,s,d,f,p,v,g,b,x,C;return gt(this,function(w){if(m(),!(t=h.current))return[2];o=(r=e||{}).filename,i=r.pixelRatio,l=r.backgroundColor,s=r.format,d=s||u,f=null!=i?i:a,p=null!=l?l:c,v=o||n||ze("chart");try{g=void 0,"svg"===d?(b=null===(x=t.getSvgData)||void 0===x?void 0:x.call(t))&&(g="data:image/svg+xml;base64,".concat(btoa(b))):g=null===(C=t.getDataURL)||void 0===C?void 0:C.call(t,{type:d,pixelRatio:f,backgroundColor:p}),g&&(Be(g,"".concat(v,".").concat(d)),y(g))}catch(e){}return[2]})})},[u,a,c,n,m,y]),x=(0,i.useCallback)(function(e){return yt(r,void 0,Promise,function(){var t,r,o,i,l,s,u,d,f,p,v;return gt(this,function(g){switch(g.label){case 0:if(m(),!(t=h.current))return[2];o=(r=e||{}).filename,i=r.pixelRatio,l=r.backgroundColor,s=null!=i?i:a,u=null!=l?l:c,d=o||n||ze("chart"),g.label=1;case 1:return g.trys.push([1,3,,4]),(f=null===(v=t.getDataURL)||void 0===v?void 0:v.call(t,{type:"png",pixelRatio:s,backgroundColor:u}))?[4,mt(f,d)]:[2];case 2:return(p=g.sent())&&(Be(p,"".concat(d,".pdf")),y(p)),[3,4];case 3:return g.sent(),[3,4];case 4:return[2]}})})},[n,a,c,m,y]),C=(0,i.useCallback)(function(){var e,t=h.current;if(!t)return null;try{return(null===(e=t.getOption)||void 0===e?void 0:e.call(t))||null}catch(e){return null}},[]),w=(0,i.useCallback)(function(){var e,t=h.current;if(t)try{return null===(e=t.getSvgData)||void 0===e?void 0:e.call(t)}catch(e){return}},[]),k=(0,i.useCallback)(function(e){return yt(r,void 0,Promise,function(){var t,r,o,a,i,l,c,s,u,d;return gt(this,function(p){if(m(),!(t=h.current))return[2];o=(r=e||{}).filename,a=r.dataKey,i=o||n||ze("data");try{if(!(l=null===(d=t.getOption)||void 0===d?void 0:d.call(t)))return[2];c=l,a&&"object"==typeof c&&(c=c[a]||c),(s=function(e,t){return e?"object"==typeof e&&e.series?function(e,t){var r,n,o=e.series,a=void 0===o?[]:o,i=e.xAxis,l=e.dataset,c=null===(r=null==t?void 0:t.includeLabels)||void 0===r||r;if(!Array.isArray(a)||0===a.length)return"";var s=[];if((null==i?void 0:i.data)&&Array.isArray(i.data))s=i.data;else if((null==l?void 0:l.dimensions)&&(null==l?void 0:l.source))s=l.source.map(function(e){return e[0]});else if(null===(n=a[0])||void 0===n?void 0:n.data){var u=a[0];s=u.data.map(function(e,t){return"object"==typeof e&&null!==e&&e[0]||t})}var d=c?ht(["Category"],a.map(function(e){return e.name||e.seriesIndex}),!0):[],f=[];return a.forEach(function(e,t){(e.data||[]).forEach(function(e,r){var n="object"==typeof e&&null!==e?e[1]:e,o=s[r]||r;c?0===t?f[r]=[o,n]:(f[r]=f[r]||[o],f[r].push(n)):0===t?f[r]=[n]:(f[r]=f[r]||[],f[r].push(n))})}),(c?ht([d.join(",")],f.map(function(e){return e.join(",")}),!0):f.map(function(e){return e.join(",")})).join("\n")}(e,t):Array.isArray(e)?function(e){if(0===e.length)return"";if("object"==typeof e[0]&&null!==e[0]){var t=Object.keys(e[0]),r=t.join(","),n=e.map(function(e){return t.map(function(t){var r;return JSON.stringify(null!==(r=e[t])&&void 0!==r?r:"")}).join(",")});return ht([r],n,!0).join("\n")}return e.join("\n")}(e):"object"==typeof e?function(e){return Object.entries(e).map(function(e){var t=e[0],r=e[1];return"".concat(t,",").concat(JSON.stringify(r))}).join("\n")}(e):String(e):""}(c,{includeLabels:f}))&&(u=function(e){return new Blob([e],{type:"text/csv;charset=utf-8;"})}(s),He(u,"".concat(i,".csv")),y(u))}catch(e){}return[2]})})},[n,m,y]),E=(0,i.useCallback)(function(e){return yt(r,void 0,Promise,function(){var t,r,o,a,i,l,c,s,u,d;return gt(this,function(f){if(m(),!(t=h.current))return[2];o=(r=e||{}).filename,a=r.dataKey,i=o||n||ze("data");try{if(!(l=null===(d=t.getOption)||void 0===d?void 0:d.call(t)))return[2];c=l,a&&"object"==typeof c&&(c=c[a]||c),s=function(e){var t,r,n;if(!e)return"{}";var o=e;if(o.series){var a={title:null===(t=o.title)||void 0===t?void 0:t.text,legend:null===(r=o.legend)||void 0===r?void 0:r.data,xAxis:null===(n=o.xAxis)||void 0===n?void 0:n.data,series:o.series.map(function(e){var t,r=e;return{name:r.name,type:r.type,data:null===(t=r.data)||void 0===t?void 0:t.map(function(e){return"object"==typeof e&&null!==e?e[1]:e})}})};return JSON.stringify(a,null,2)}return JSON.stringify(e,null,2)}(c),s&&(u=function(e){return new Blob([e],{type:"application/json;charset=utf-8;"})}(s),He(u,"".concat(i,".json")),y(u))}catch(e){}return[2]})})},[n,m,y]),S=(0,i.useCallback)(function(e){return yt(r,void 0,Promise,function(){var t,r,n,o,a,i;return gt(this,function(l){switch(l.label){case 0:switch(r=(t=e||{}).format,n=t.filename,o=t.pixelRatio,a=t.backgroundColor,i=r||u){case"png":case"jpeg":return[3,1];case"svg":return[3,3];case"pdf":return[3,5]}return[3,7];case 1:return[4,b({format:i,filename:n,pixelRatio:o,backgroundColor:a})];case 2:case 4:case 6:return l.sent(),[3,7];case 3:return[4,b({format:"svg",filename:n})];case 5:return[4,x({filename:n,pixelRatio:o,backgroundColor:a})];case 7:return[2]}})})},[u,b,x]);return{downloadImage:b,downloadCSV:k,downloadJSON:E,downloadPDF:x,getImageDataUrl:g,getChartData:C,getSvgData:w,exportChart:S}}var xt="taroviz"},2015(e){e.exports=require("react")}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var a=r[e]={exports:{}};return t[e](a,a.exports,n),a.exports}n.m=t,e=[],n.O=(t,r,o,a)=>{if(!r){var i=1/0;for(u=0;u<e.length;u++){for(var[r,o,a]=e[u],l=!0,c=0;c<r.length;c++)(!1&a||i>=a)&&Object.keys(n.O).every(e=>n.O[e](r[c]))?r.splice(c--,1):(l=!1,a<i&&(i=a));if(l){e.splice(u--,1);var s=o();void 0!==s&&(t=s)}}return t}a=a||0;for(var u=e.length;u>0&&e[u-1][2]>a;u--)e[u]=e[u-1];e[u]=[r,o,a]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={57:0};n.O.j=t=>0===e[t];var t=(t,r)=>{var o,a,[i,l,c]=r,s=0;if(i.some(t=>0!==e[t])){for(o in l)n.o(l,o)&&(n.m[o]=l[o]);if(c)var u=c(n)}for(t&&t(r);s<i.length;s++)a=i[s],n.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return n.O(u)},r=self.webpackChunk_agions_taroviz=self.webpackChunk_agions_taroviz||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var o=n.O(void 0,[440,96],()=>n(5795));o=n.O(o),module.exports=o})();
|