@agions/taroviz 1.3.1 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +1 -1
- package/dist/esm/index.js +2035 -1745
- package/package.json +1 -1
- package/src/__tests__/integration.test.tsx +12 -10
- package/src/adapters/BaseAdapter.ts +116 -0
- package/src/adapters/__tests__/index.test.ts +10 -10
- package/src/adapters/index.ts +63 -74
- package/src/adapters/swan/index.ts +26 -223
- package/src/adapters/tt/index.ts +28 -225
- package/src/adapters/types.ts +36 -0
- package/src/adapters/weapp/index.ts +29 -189
- package/src/charts/bar/index.tsx +5 -9
- package/src/charts/candlestick/__tests__/index.test.tsx +37 -0
- package/src/charts/candlestick/index.tsx +13 -0
- package/src/charts/common/BaseChartWrapper.tsx +47 -38
- package/src/charts/funnel/index.tsx +5 -9
- package/src/charts/gauge/index.tsx +5 -9
- package/src/charts/graph/__tests__/index.test.tsx +41 -0
- package/src/charts/graph/index.tsx +13 -0
- package/src/charts/heatmap/index.tsx +5 -9
- package/src/charts/index.ts +6 -1
- package/src/charts/line/index.tsx +4 -7
- package/src/charts/pie/index.tsx +5 -10
- package/src/charts/radar/index.tsx +5 -9
- package/src/charts/scatter/index.tsx +5 -9
- package/src/charts/types.ts +48 -4
- package/src/charts/wordcloud/__tests__/index.test.tsx +36 -0
- package/src/charts/wordcloud/index.tsx +13 -0
- package/src/core/animation/AnimationManager.ts +15 -0
- package/src/core/components/Annotation.tsx +26 -21
- package/src/core/components/BaseChart.tsx +280 -1105
- package/src/core/components/ErrorBoundary.tsx +4 -1
- package/src/core/components/LazyChart.tsx +42 -55
- package/src/core/components/hooks/index.ts +20 -0
- package/src/core/components/hooks/useChartEvents.ts +143 -0
- package/src/core/components/hooks/useChartInit.ts +80 -0
- package/src/core/components/hooks/usePerformance.ts +186 -0
- package/src/core/components/hooks/useVirtualScroll.ts +156 -0
- package/src/core/echarts.ts +1 -1
- package/src/core/themes/ThemeManager.ts +31 -15
- package/src/core/types/index.ts +2 -2
- package/src/core/utils/chartInstances.ts +10 -3
- package/src/core/utils/chartUtils.ts +46 -0
- package/src/core/utils/common.ts +14 -1
- package/src/core/utils/export/ExportUtils.ts +13 -22
- package/src/core/utils/performance/PerformanceAnalyzer.ts +32 -5
- package/src/core/utils/uuid.ts +1 -1
- package/src/editor/ThemeEditor.tsx +1 -6
- package/src/hooks/__tests__/index.test.tsx +14 -11
- package/src/hooks/__tests__/useDataTransform.test.ts +159 -0
- package/src/hooks/index.ts +54 -19
- package/src/hooks/useDataTransform.ts +503 -0
- package/src/index.ts +15 -2
- package/src/main.tsx +4 -4
- package/src/themes/__tests__/index.test.ts +2 -2
- package/src/themes/index.ts +13 -0
package/dist/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={123(e,t,n){n.d(t,{A:()=>s});var r=n(163),o=n(348),a=n(613),i=n(15),c=function(){return c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},c.apply(this,arguments)};o.use([r.GridComponent,r.TooltipComponent,r.TitleComponent,r.LegendComponent,a.CanvasRenderer,a.SVGRenderer]);const s=function(){function e(e){this.instance=null,this.containerRef=null,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,n;if(this.instance)return this.instance;var r=(null===(t=this.containerRef)||void 0===t?void 0:t.current)||document.getElementById(this.canvasId);if(!r)throw new Error("[TaroViz] H5Adapter: container not found (canvasId: ".concat(this.canvasId,")"));return this.instance=o.init(r,this.options.theme,{useDirtyRect:!0,renderer:this.options.renderer||"canvas"}),this.instance&&this.instance.setOption({animation:!1!==(null===(n=this.options.option)||void 0===n?void 0:n.animation),animationDurationUpdate:300,animationEasingUpdate:"cubicOut",progressive:500,progressiveThreshold:1e3},!0),this.options.option&&this.instance&&this.instance.setOption(this.options.option,{notMerge:!1,lazyUpdate:!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){this.instance?this.instance.setOption(e,c({lazyUpdate:!0},t)):this.options.option=e},e.prototype.setTheme=function(e){var t,n;this.options.theme=e,this.instance&&(null===(n=(t=this.instance).setTheme)||void 0===n||n.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;return(null===(e=this.containerRef)||void 0===e?void 0:e.current)||null},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,n=void 0===t?"100%":t,r=e.height,o=void 0===r?"300px":r,a=e.style,s=void 0===a?{}:a,l=e.direction,u=void 0===l?"ltr":l;return i.createElement("div",{id:this.canvasId,ref:this.containerRef,style:c({width:n,height:o,direction:u},s)})},e.prototype.dispose=function(){this.instance&&(this.instance.dispose(),this.instance=null)},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:window.devicePixelRatio}},e}()},234(e,t,n){var r,o;n.d(t,{li:()=>b,cK:()=>x,_$:()=>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"}(r||(r={})),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"}(o||(o={}));n(251),n(524),n(930);var a=n(123),i=n(999),c=n(15),s=function(){return s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},s.apply(this,arguments)},l=function(){function e(e){this.chartInstance=null,this.component=null,this.config=e,this.component=e.component}return e.create=function(t){return new e(t)},e.prototype.getInstance=function(){return this.chartInstance},e.prototype.init=function(){var e=this.config,t=e.canvasId,n=e.width,r=e.height,o=e.theme,a=e.option;if(!this.component)return null;if(!t)return null;var i=this.component.createChart({id:t,width:n,height:r,theme:o});return a&&i.setOption(a),this.chartInstance=i,this.config.onInit&&this.config.onInit(i),i},e.prototype.setOption=function(e,t){this.chartInstance?this.chartInstance.setOption(e,t):this.config.option=e},e.prototype.setTheme=function(e){var t,n;this.config.theme=e,this.chartInstance&&(null===(n=(t=this.chartInstance).setTheme)||void 0===n||n.call(t,e))},e.prototype.getWidth=function(){return 0},e.prototype.getHeight=function(){return 0},e.prototype.getDom=function(){return null},e.prototype.convertToDataURL=function(e){var t;return null===(t=this.chartInstance)||void 0===t?void 0:t.getDataURL(e)},e.prototype.clear=function(){this.chartInstance&&this.chartInstance.clear()},e.prototype.on=function(e,t){this.chartInstance&&this.chartInstance.on(e,t)},e.prototype.off=function(e,t){this.chartInstance&&this.chartInstance.off(e,t)},e.prototype.showLoading=function(e){this.chartInstance&&this.chartInstance.showLoading(e)},e.prototype.hideLoading=function(){this.chartInstance&&this.chartInstance.hideLoading()},e.prototype.dispose=function(){this.chartInstance&&(this.chartInstance.dispose(),this.chartInstance=null)},e.prototype.resize=function(e){this.chartInstance&&this.chartInstance.resize(e)},e.prototype.setComponent=function(e){this.component=e},e.prototype.render=function(){var e=this.config,t=e.canvasId,n=void 0===t?"ec-canvas":t,r=e.width,o=void 0===r?"100%":r,a=e.height,i=void 0===a?"300px":a,l=e.style,u=void 0===l?{}:l;return c.createElement("view",{id:n,style:s({width:o,height:i},u)})},e.prototype.dispatchAction=function(e){this.chartInstance&&this.chartInstance.dispatchAction(e)},e.prototype.getDataURL=function(e){var t;return null===(t=this.chartInstance)||void 0===t?void 0:t.getDataURL(e)},e}();const u=l;var d=function(){return d=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},d.apply(this,arguments)},f=function(){function e(e){this.chartInstance=null,this.component=null,this.config=e,this.component=e.component}return e.create=function(t){return new e(t)},e.prototype.getInstance=function(){return this.chartInstance},e.prototype.init=function(){var e=this.config,t=e.canvasId,n=e.width,r=e.height,o=e.theme,a=e.option;if(!this.component)return null;if(!t)return null;var i=this.component.createChart({id:t,width:n,height:r,theme:o});return a&&i.setOption(a),this.chartInstance=i,this.config.onInit&&this.config.onInit(i),i},e.prototype.setOption=function(e,t){this.chartInstance?this.chartInstance.setOption(e,t):this.config.option=e},e.prototype.setTheme=function(e){var t,n;this.config.theme=e,this.chartInstance&&(null===(n=(t=this.chartInstance).setTheme)||void 0===n||n.call(t,e))},e.prototype.getWidth=function(){return 0},e.prototype.getHeight=function(){return 0},e.prototype.getDom=function(){return null},e.prototype.convertToDataURL=function(e){var t;return null===(t=this.chartInstance)||void 0===t?void 0:t.getDataURL(e)},e.prototype.clear=function(){this.chartInstance&&this.chartInstance.clear()},e.prototype.on=function(e,t){this.chartInstance&&this.chartInstance.on(e,t)},e.prototype.off=function(e,t){this.chartInstance&&this.chartInstance.off(e,t)},e.prototype.showLoading=function(e){this.chartInstance&&this.chartInstance.showLoading(e)},e.prototype.hideLoading=function(){this.chartInstance&&this.chartInstance.hideLoading()},e.prototype.dispose=function(){this.chartInstance&&(this.chartInstance.dispose(),this.chartInstance=null)},e.prototype.resize=function(e){this.chartInstance&&this.chartInstance.resize(e)},e.prototype.setComponent=function(e){this.component=e},e.prototype.render=function(){var e=this.config,t=e.canvasId,n=void 0===t?"ec-canvas":t,r=e.width,o=void 0===r?"100%":r,a=e.height,i=void 0===a?"300px":a,s=e.style,l=void 0===s?{}:s;return c.createElement("view",{id:n,style:d({width:o,height:i},l)})},e.prototype.dispatchAction=function(e){this.chartInstance&&this.chartInstance.dispatchAction(e)},e.prototype.getDataURL=function(e){var t;return null===(t=this.chartInstance)||void 0===t?void 0:t.getDataURL(e)},e}();const p=f;var h=function(){return h=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},h.apply(this,arguments)},v=function(){function e(e){this.chartInstance=null,this.component=null,this.config=e,this.component=e.component}return e.create=function(t){return new e(t)},e.prototype.getInstance=function(){return this.chartInstance},e.prototype.init=function(){var e=this.config,t=e.canvasId,n=e.width,r=e.height,o=e.theme,a=e.option;if(!this.component)return null;if(!t)return null;var i=this.component.createChart({id:t,width:n,height:r,theme:o});return a&&i.setOption(a),this.chartInstance=i,this.config.onInit&&this.config.onInit(i),i},e.prototype.setOption=function(e,t){this.chartInstance?this.chartInstance.setOption(e,t):this.config.option=e},e.prototype.setTheme=function(e){var t,n;this.config.theme=e,this.chartInstance&&(null===(n=(t=this.chartInstance).setTheme)||void 0===n||n.call(t,e))},e.prototype.getWidth=function(){return 0},e.prototype.getHeight=function(){return 0},e.prototype.getDom=function(){return null},e.prototype.convertToDataURL=function(e){var t;return null===(t=this.chartInstance)||void 0===t?void 0:t.getDataURL(e)},e.prototype.clear=function(){this.chartInstance&&this.chartInstance.clear()},e.prototype.on=function(e,t){this.chartInstance&&this.chartInstance.on(e,t)},e.prototype.off=function(e,t){this.chartInstance&&this.chartInstance.off(e,t)},e.prototype.showLoading=function(e){this.chartInstance&&this.chartInstance.showLoading(e)},e.prototype.hideLoading=function(){this.chartInstance&&this.chartInstance.hideLoading()},e.prototype.dispose=function(){this.chartInstance&&(this.chartInstance.dispose(),this.chartInstance=null)},e.prototype.resize=function(e){this.chartInstance&&this.chartInstance.resize(e)},e.prototype.setComponent=function(e){this.component=e},e.prototype.render=function(){var e=this.config,t=e.canvasId,n=void 0===t?"ec-canvas":t,r=e.width,o=void 0===r?"100%":r,a=e.height,i=void 0===a?"300px":a,s=e.style,l=void 0===s?{}:s;return c.createElement("view",{id:n,style:h({width:o,height:i},l)})},e.prototype.dispatchAction=function(e){this.chartInstance&&this.chartInstance.dispatchAction(e)},e.prototype.getDataURL=function(e){var t;return null===(t=this.chartInstance)||void 0===t?void 0:t.getDataURL(e)},e}();const m=v;var g,y=((g={})[o.H5]={name:"H5"},g[o.WEAPP]={name:"Wechat",requireComponent:!0},g[o.ALIPAY]={name:"Alipay",requireComponent:!0},g[o.SWAN]={name:"Baidu",requireComponent:!0},g[o.TT]={name:"ByteDance",requireComponent:!0},g[o.QQ]={name:"QQ",requireComponent:!0},g[o.JD]={name:"JD",requireComponent:!0},g[o.DD]={name:"DingTalk",requireComponent:!0},g[o.QYWX]={name:"QiyeWechat"},g[o.LARK]={name:"Lark"},g[o.KWAI]={name:"Kwai",requireComponent:!0},g[o.HARMONY]={name:"HarmonyOS",requireComponent:!0},g);function b(){if("undefined"==typeof window)return o.H5;for(var e=[{test:function(){var e,t;return"wx"in window&&(null===(e=window.wx)||void 0===e?void 0:e.getSystemInfoSync)&&!(null===(t=window.wx)||void 0===t?void 0:t.qy)},platform:o.WEAPP},{test:function(){var e;return"my"in window&&(null===(e=window.my)||void 0===e?void 0:e.getSystemInfoSync)},platform:o.ALIPAY},{test:function(){var e;return"swan"in window&&(null===(e=window.swan)||void 0===e?void 0:e.getSystemInfoSync)},platform:o.SWAN},{test:function(){var e;return"tt"in window&&(null===(e=window.tt)||void 0===e?void 0:e.getSystemInfoSync)},platform:o.TT},{test:function(){var e;return"qq"in window&&(null===(e=window.qq)||void 0===e?void 0:e.getSystemInfoSync)},platform:o.QQ},{test:function(){var e;return"jd"in window&&(null===(e=window.jd)||void 0===e?void 0:e.getSystemInfoSync)},platform:o.JD},{test:function(){var e;return"dd"in window&&(null===(e=window.dd)||void 0===e?void 0:e.getSystemInfoSync)},platform:o.DD},{test:function(){var e;return"wx"in window&&(null===(e=window.wx)||void 0===e?void 0:e.qy)},platform:o.QYWX},{test:function(){var e,t;return"tt"in window&&"lark"===(null===(t=null===(e=window.tt)||void 0===e?void 0:e.env)||void 0===t?void 0:t.appName)},platform:o.LARK},{test:function(){return navigator.userAgent.includes("HarmonyOS")},platform:o.HARMONY}],t=0,n=e;t<n.length;t++){var r=n[t];if(r.test())return r.platform}return o.H5}function E(){var e;return"undefined"!=typeof window&&"undefined"!=typeof document?"h5":void 0!==n.g&&(null===(e=null===n.g||void 0===n.g?void 0:n.g.wx)||void 0===e?void 0:e.getSystemInfoSync)?"weapp":"unknown"}function x(e){var t=b(),n=y[t];null==n||n.requireComponent;try{return function(e,t){switch(e){case o.H5:case o.ALIPAY:case o.QQ:case o.JD:case o.DD:case o.QYWX:case o.LARK:case o.KWAI:return a.A.create(t);case o.WEAPP:return i.A.create(t);case o.SWAN:return u.create(t);case o.TT:return p.create(t);case o.HARMONY:return m.create(t);default:return a.A.create(t)}}(t,e)}catch(t){return a.A.create(e)}}},999(e,t,n){n.d(t,{A:()=>a});var r=n(15),o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o.apply(this,arguments)};const a=function(){function e(e){this.chartInstance=null,this.component=null,this.config=e,this.component=e.component}return e.create=function(t){return new e(t)},e.prototype.getInstance=function(){return this.chartInstance},e.prototype.init=function(){var e=this.config,t=e.canvasId,n=e.width,r=e.height,o=e.theme,a=e.option;if(!this.component)return null;if(!t)return null;var i=this.component.createChart({id:t,width:n,height:r,theme:o});return a&&i.setOption(a),this.chartInstance=i,this.config.onInit&&this.config.onInit(i),i},e.prototype.setOption=function(e,t){this.chartInstance?this.chartInstance.setOption(e,t):this.config.option=e},e.prototype.setTheme=function(e){var t,n;this.config.theme=e,this.chartInstance&&(null===(n=(t=this.chartInstance).setTheme)||void 0===n||n.call(t,e))},e.prototype.getWidth=function(){return 0},e.prototype.getHeight=function(){return 0},e.prototype.getDom=function(){return null},e.prototype.convertToDataURL=function(e){var t;return null===(t=this.chartInstance)||void 0===t?void 0:t.getDataURL(e)},e.prototype.clear=function(){this.chartInstance&&this.chartInstance.clear()},e.prototype.on=function(e,t){this.chartInstance&&this.chartInstance.on(e,t)},e.prototype.off=function(e,t){this.chartInstance&&this.chartInstance.off(e,t)},e.prototype.showLoading=function(e){this.chartInstance&&this.chartInstance.showLoading(e)},e.prototype.hideLoading=function(){this.chartInstance&&this.chartInstance.hideLoading()},e.prototype.dispose=function(){this.chartInstance&&(this.chartInstance.dispose(),this.chartInstance=null)},e.prototype.resize=function(e){this.chartInstance&&this.chartInstance.resize(e)},e.prototype.setComponent=function(e){this.component=e},e.prototype.render=function(){var e=this.config,t=e.canvasId,n=void 0===t?"ec-canvas":t,a=e.width,i=void 0===a?"100%":a,c=e.height,s=void 0===c?"300px":c,l=e.style,u=void 0===l?{}:l;return r.createElement("view",{id:n,style:o({width:i,height:s},u)})},e}()},188(e,t,n){n.r(t),n.d(t,{default:()=>c});var r=n(15),o=n.n(r),a=n(412),i=(n(930),function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)});const c=function(e){return o().createElement(a.A,i({},e,{chartType:"bar-chart"}))}},412(e,t,n){n.d(t,{A:()=>u});var r=n(15),o=n.n(r),a=n(234),i=n(524),c=function(){return c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},c.apply(this,arguments)};function s(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},n=c({},t);return Object.keys(e).forEach(function(r){r in t||(n[r]=e[r])}),n}var l=function(){return l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},l.apply(this,arguments)};const u=function(e){var t=e.option,n=e.width,c=void 0===n?"100%":n,u=e.height,d=void 0===u?"300px":u,f=e.theme,p=e.style,h=void 0===p?{}:p,v=e.className,m=void 0===v?"":v,g=e.autoResize,y=void 0===g||g,b=e.loading,E=void 0!==b&&b,x=e.loadingOption,w=e.onChartInit,I=e.onChartReady,C=e.renderer,T=void 0===C?"canvas":C,S=e.onEvents,k=void 0===S?{}:S,O=e.chartType,A=void 0===O?"chart":O,D=(0,r.useRef)("".concat(A,"-").concat((0,i.uR)())),R=(0,r.useRef)(null),P=(0,r.useRef)(null),L=(0,r.useMemo)(function(){return s({canvasId:D.current,containerRef:P,width:c,height:d,theme:f,autoResize:y,renderer:T,option:t})},[c,d,f,y,T,t,A]);(0,r.useEffect)(function(){var e=s(l(l({},L),{onInit:function(e){R.current=e,k&&Object.keys(k).forEach(function(t){e.on(t,k[t])}),w&&w(e),I&&I(e)}}));return(0,a.cK)(e).init(),function(){R.current&&(k&&Object.keys(k).forEach(function(e){var t;null===(t=R.current)||void 0===t||t.off(e)}),R.current.dispose(),R.current=null)}},[L,w,I,k]),(0,r.useEffect)(function(){R.current&&R.current.setOption(t,!0)},[t]),(0,r.useEffect)(function(){R.current&&(E?R.current.showLoading(x):R.current.hideLoading())},[E,x]);var z=l({width:"number"==typeof c?"".concat(c,"px"):c,height:"number"==typeof d?"".concat(d,"px"):d},h);return o().createElement("div",{className:"taroviz-".concat(A," ").concat(m),style:z,ref:P})}},133(e,t,n){n.r(t),n.d(t,{default:()=>c});var r=n(15),o=n.n(r),a=n(412),i=(n(930),function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)});const c=function(e){return o().createElement(a.A,i({},e,{chartType:"funnel-chart"}))}},334(e,t,n){n.r(t),n.d(t,{default:()=>c});var r=n(15),o=n.n(r),a=n(412),i=(n(930),function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)});const c=function(e){return o().createElement(a.A,i({},e,{chartType:"gauge-chart"}))}},835(e,t,n){n.r(t),n.d(t,{default:()=>c});var r=n(15),o=n.n(r),a=n(412),i=(n(930),function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)});const c=function(e){return o().createElement(a.A,i({},e,{chartType:"heatmap-chart"}))}},127(e,t,n){n.r(t),n.d(t,{default:()=>c});var r=n(15),o=n.n(r),a=n(412),i=(n(930),function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)});const c=function(e){return o().createElement(a.A,i({},e,{chartType:"line-chart"}))}},481(e,t,n){n.r(t),n.d(t,{default:()=>c});var r=n(15),o=n.n(r),a=n(412),i=(n(930),function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)});const c=function(e){return o().createElement(a.A,i({},e,{chartType:"pie-chart"}))}},443(e,t,n){n.r(t),n.d(t,{default:()=>c});var r=n(15),o=n.n(r),a=n(412),i=(n(930),function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)});const c=function(e){return o().createElement(a.A,i({},e,{chartType:"radar-chart"}))}},490(e,t,n){n.r(t),n.d(t,{default:()=>s});var r=n(15),o=n.n(r),a=n(412),i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},c=(0,r.memo)(function(e){return o().createElement(a.A,i({},e,{chartType:"sankey-chart"}))});c.displayName="SankeyChart";const s=c},589(e,t,n){n.r(t),n.d(t,{default:()=>c});var r=n(15),o=n.n(r),a=n(412),i=(n(930),function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)});const c=function(e){return o().createElement(a.A,i({},e,{chartType:"scatter-chart"}))}},673(e,t,n){n.r(t),n.d(t,{default:()=>s});var r=n(15),o=n.n(r),a=n(412),i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},c=(0,r.memo)(function(e){return o().createElement(a.A,i({},e,{chartType:"sunburst-chart"}))});c.displayName="SunburstChart";const s=c},37(e,t,n){n.r(t),n.d(t,{default:()=>s});var r=n(15),o=n.n(r),a=n(412),i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},c=(0,r.memo)(function(e){return o().createElement(a.A,i({},e,{chartType:"treemap-chart"}))});c.displayName="TreeMapChart";const s=c},251(e,t,n){var r;n.d(t,{ek:()=>c}),function(e){e.ANIMATION_START="animationStart",e.ANIMATION_UPDATE="animationUpdate",e.ANIMATION_END="animationEnd",e.ANIMATION_CANCEL="animationCancel",e.ANIMATION_REPEAT="animationRepeat"}(r||(r={}));var o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o.apply(this,arguments)},a=[{name:"default",description:"默认动画配置",config:{enabled:!0,duration:1e3,easing:"cubicOut",appearDuration:1200,appearEasing:"cubicOut",updateDuration:800,updateEasing:"cubicOut",disappearDuration:600,disappearEasing:"cubicIn",threshold:1e3,progressive:!0,progressiveStep:500}},{name:"fast",description:"快速动画配置",config:{enabled:!0,duration:500,easing:"linear",appearDuration:600,appearEasing:"linear",updateDuration:400,updateEasing:"linear",disappearDuration:300,disappearEasing:"linear",threshold:2e3,progressive:!0,progressiveStep:1e3}},{name:"slow",description:"慢速动画配置",config:{enabled:!0,duration:2e3,easing:"cubicInOut",appearDuration:2400,appearEasing:"cubicInOut",updateDuration:1600,updateEasing:"cubicInOut",disappearDuration:1200,disappearEasing:"cubicInOut",threshold:500,progressive:!0,progressiveStep:250}},{name:"bounce",description:"弹跳动画配置",config:{enabled:!0,duration:1500,easing:"bounceOut",appearDuration:1800,appearEasing:"bounceOut",updateDuration:1200,updateEasing:"bounceOut",disappearDuration:900,disappearEasing:"bounceIn",threshold:500,progressive:!0,progressiveStep:250}},{name:"elastic",description:"弹性动画配置",config:{enabled:!0,duration:1500,easing:"elasticOut",appearDuration:1800,appearEasing:"elasticOut",updateDuration:1200,updateEasing:"elasticOut",disappearDuration:900,disappearEasing:"elasticIn",threshold:500,progressive:!0,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||(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 n=o(o({},this.defaultConfig),e);return n.threshold&&t>n.threshold&&(n.enabled=!1),n},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 n=this.getOptimizedConfig(e,t);return n.enabled?{animation:!0,animationDuration:n.duration,animationEasing:n.easing,animationDelay:n.delay,animationDurationUpdate:n.updateDuration,animationEasingUpdate:n.updateEasing,animationDelayUpdate:n.delay,animationThreshold:n.threshold,progressive:n.progressive,progressiveThreshold:n.progressiveStep,progressiveChunkMode:"sequential"}:{animation:!1}},e.prototype.on=function(e,t){var n;this.eventHandlers.has(e)||this.eventHandlers.set(e,new Set),null===(n=this.eventHandlers.get(e))||void 0===n||n.add(t)},e.prototype.off=function(e,t){var n;t?null===(n=this.eventHandlers.get(e))||void 0===n||n.delete(t):this.eventHandlers.delete(e)},e.prototype.emit=function(e,t){var n=this.eventHandlers.get(e);n&&n.forEach(function(e){try{e(t)}catch(e){}})},e.prototype.updatePerformanceConfig=function(e){this.performanceConfig=o(o({},this.performanceConfig),e)},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 c(e,t){return void 0===e&&(e={}),void 0===t&&(t=0),i.getInstance().generateEChartsAnimationConfig(e,t)}i.getInstance()},930(e,t,n){var r=n(348);const o=require("echarts/charts");var a=n(163),i=n(613),c=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};r.use(i.CanvasRenderer);var s=[o.PieChart,o.LineChart,o.BarChart,o.GaugeChart,o.ScatterChart,o.RadarChart,o.HeatmapChart,o.FunnelChart],l=[a.TitleComponent,a.TooltipComponent,a.LegendComponent,a.GridComponent,a.DataZoomComponent,a.VisualMapComponent];r.use(c(c([],s,!0),l,!0))},524(e,t,n){n.d(t,{sg:()=>E,$N:()=>b,AZ:()=>y,ZV:()=>I,w5:()=>C,uc:()=>w,t2:()=>m,m_:()=>v,nF:()=>x,uR:()=>h});var r=function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function a(e,t){void 0===t&&(t={});var n=t.locale,a=void 0===n?"zh-CN":n,i=t.timeZone,c=void 0===i?"Asia/Shanghai":i,s=o(t,["locale","timeZone"]),l="string"==typeof e||"number"==typeof e?new Date(e):e;return new Intl.DateTimeFormat(a,r({timeZone:c},s)).format(l)}function i(e,t){return void 0===t&&(t={}),a(e,r(r({},t),{timeStyle:void 0,hour:void 0,minute:void 0,second:void 0,fractionalSecondDigits:void 0}))}function c(e,t){return void 0===t&&(t={}),a(e,r(r({},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"}))}function s(e,t){var n=t.locale,r=void 0===n?"zh-CN":n,o=t.currency,a=t.currencyDisplay,i=void 0===a?"symbol":a,c=t.digits,s=void 0===c?2:c,l=t.useGrouping,u=void 0===l||l;return new Intl.NumberFormat(r,{style:"currency",currency:o,currencyDisplay:i,minimumFractionDigits:s,maximumFractionDigits:s,useGrouping:u}).format(e)}function l(e,t){void 0===t&&(t={});var n=t.locale,r=void 0===n?"zh-CN":n,o=t.digits,a=void 0===o?2:o,i=t.useGrouping,c=void 0===i||i;return new Intl.NumberFormat(r,{style:"percent",minimumFractionDigits:a,maximumFractionDigits:a,useGrouping:c}).format(e)}function u(e,t){void 0===t&&(t={});var n=t.locale,a=void 0===n?"zh-CN":n,i=t.digits,c=void 0===i?2:i,s=t.useGrouping,l=void 0===s||s,u=o(t,["locale","digits","useGrouping"]);return new Intl.NumberFormat(a,r({minimumFractionDigits:c,maximumFractionDigits:c,useGrouping:l},u)).format(e)}function d(){return"undefined"!=typeof window&&window.navigator.language||"zh-CN"}function f(){return Intl.DateTimeFormat().resolvedOptions().timeZone}var p=function(){function e(e){void 0===e&&(e={}),this.locale=e.locale||d(),this.timeZone=e.timeZone||f()}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,r(r({},t),{locale:this.locale,timeZone:this.timeZone}))},e.prototype.formatDate=function(e,t){return void 0===t&&(t={}),i(e,r(r({},t),{locale:this.locale,timeZone:this.timeZone}))},e.prototype.formatTime=function(e,t){return void 0===t&&(t={}),c(e,r(r({},t),{locale:this.locale,timeZone:this.timeZone}))},e.prototype.formatCurrency=function(e,t){return s(e,r(r({},t),{locale:this.locale}))},e.prototype.formatPercent=function(e,t){return void 0===t&&(t={}),l(e,r(r({},t),{locale:this.locale}))},e.prototype.formatNumber=function(e,t){return void 0===t&&(t={}),u(e,r(r({},t),{locale:this.locale}))},e}();new p;function h(){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),n=Math.random().toString(36).substring(2,15);return"".concat(t,"-").concat(n,"-").concat(Math.random().toString(36).substring(2,10))}function v(){return Math.random().toString(36).substring(2,10)}function m(e){return"".concat(e,"-").concat(v())}var g=function(){return g=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},g.apply(this,arguments)},y={click:"click",mousemove:"mousemove",mouseup:"mouseup",mousedown:"mousedown",mouseover:"mouseover",mouseout:"mouseout",globalout:"globalout"};function b(e,t){var n=g({},e);return Object.keys(t).forEach(function(r){t[r]instanceof Object&&r in e&&e[r]instanceof Object?n[r]=b(e[r],t[r]):n[r]=t[r]}),n}function E(e,t){var n=null;return function(){for(var r=this,o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];n&&clearTimeout(n),n=setTimeout(function(){e.apply(r,o),n=null},t)}}function x(e,t){var n=0;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var a=Date.now();a-n>=t&&(e.apply(this,r),n=a)}}function w(){var e="undefined"==typeof window,t=!e,n=void 0!==window.wx&&"function"==typeof window.wx.getSystemInfoSync,r=void 0!==window.my&&"function"==typeof window.my.getSystemInfoSync;return{isServer:e,isClient:t,isWeapp:n,isAlipay:r,isWeb:t&&!n&&!r}}function I(e,t,n){void 0===t&&(t=2),void 0===n&&(n={});var r=n.useGrouping,o=void 0===r||r,a=n.locale,i=void 0===a?"zh-CN":a;return new Intl.NumberFormat(i,{minimumFractionDigits:t,maximumFractionDigits:t,useGrouping:o}).format(e)}function C(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"}},163(e){e.exports=require("echarts/components")},348(e){e.exports=require("echarts/core")},613(e){e.exports=require("echarts/renderers")},15(e){e.exports=require("react")}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}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 r={};n.r(r),n.d(r,{AnnotationPresets:()=>He,BarChart:()=>T.default,BaseChart:()=>w,ErrorBoundary:()=>pe,FunnelChart:()=>R.default,GaugeChart:()=>D.default,H5Adapter:()=>M.A,HeatmapChart:()=>A.default,LazyChartRegistry:()=>Le,LineChart:()=>C.default,PRESET_THEMES:()=>ae,PieChart:()=>S.default,RadarChart:()=>O.default,SankeyChart:()=>z.default,ScatterChart:()=>k.default,SunburstChart:()=>L.default,ThemeEditor:()=>le,TreeMapChart:()=>P.default,WeappAdapter:()=>N.A,convertAnnotationToMarkArea:()=>Me,convertAnnotationToMarkLine:()=>ze,convertAnnotationToScatter:()=>Ne,createCompositeAnnotation:()=>Fe,createLazyChart:()=>Pe,darkTheme:()=>U,debounce:()=>I.sg,deepMerge:()=>I.$N,defaultTheme:()=>F,detectPlatform:()=>c.li,events:()=>I.AZ,exportChart:()=>Ze,formatNumber:()=>I.ZV,getAdapter:()=>c.cK,getContrastColor:()=>I.w5,getDarkThemes:()=>ne,getEnv:()=>c._$,getEnvironment:()=>I.uc,getLightThemes:()=>te,getRegisteredThemes:()=>K,getTheme:()=>Y,getThemeByName:()=>X,getThemesByTag:()=>ee,name:()=>lt,prefixedId:()=>I.t2,preloadAllCharts:()=>Re,preloadChart:()=>De,registerTheme:()=>Q,shortId:()=>I.m_,switchTheme:()=>$,themeManager:()=>ie,throttle:()=>I.nF,useAnnotation:()=>je,useChart:()=>Qe,useChartData:()=>nt,useChartTheme:()=>tt,useChartTools:()=>st,useDataPolling:()=>at,useEvents:()=>$e,useExport:()=>ct,useFullscreen:()=>it,useLoading:()=>et,useOption:()=>Ke,useResize:()=>Xe,useResponsive:()=>rt,useThemeSwitcher:()=>ot,uuid:()=>I.uR,version:()=>ut,withErrorBoundary:()=>he,withLazyLoad:()=>Ae});var o,a=n(15),i=n.n(a),c=n(234),s=n(251),l={};function u(e){return l[e]}!function(e){e.PANEL_SHOW="debugPanelShow",e.PANEL_HIDE="debugPanelHide",e.TAB_CHANGE="debugPanelTabChange",e.INFO_UPDATE="debugPanelInfoUpdate"}(o||(o={}));var d=function(){return d=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},d.apply(this,arguments)},f=function(e){var t=e.debugInfo,n=e.options,r=void 0===n?{}:n,c=e.onEvent,s=(0,a.useState)(r.autoExpand||!1),l=s[0],u=s[1],f=(0,a.useState)(r.defaultTab||"instance"),h=f[0],v=f[1],m=(0,a.useRef)(null),g=r.position,y=void 0===g?"bottom-right":g,b=r.width,E=void 0===b?400:b,x=r.height,w=void 0===x?300:x,I=function(e){v(e),null==c||c({type:o.TAB_CHANGE,data:{tab:e}})},C=function(){var e=t.instance;return i().createElement("div",{style:p.debugPanelContent},i().createElement("h3",{style:p.h3},"图表实例信息"),i().createElement("div",{style:p.debugInfoGrid},i().createElement("div",{style:p.debugInfoItem},i().createElement("span",{style:p.debugInfoLabel},"ID:"),i().createElement("span",{style:p.debugInfoValue},(null==e?void 0:e.id)||"N/A")),i().createElement("div",{style:p.debugInfoItem},i().createElement("span",{style:p.debugInfoLabel},"类型:"),i().createElement("span",{style:p.debugInfoValue},(null==e?void 0:e.type)||"N/A")),i().createElement("div",{style:p.debugInfoItem},i().createElement("span",{style:p.debugInfoLabel},"版本:"),i().createElement("span",{style:p.debugInfoValue},(null==e?void 0:e.version)||"N/A")),i().createElement("div",{style:p.debugInfoItem},i().createElement("span",{style:p.debugInfoLabel},"渲染器:"),i().createElement("span",{style:p.debugInfoValue},(null==e?void 0:e.renderer)||"N/A")),i().createElement("div",{style:p.debugInfoItem},i().createElement("span",{style:p.debugInfoLabel},"宽度:"),i().createElement("span",{style:p.debugInfoValue},(null==e?void 0:e.width)||"N/A","px")),i().createElement("div",{style:p.debugInfoItem},i().createElement("span",{style:p.debugInfoLabel},"高度:"),i().createElement("span",{style:p.debugInfoValue},(null==e?void 0:e.height)||"N/A","px")),i().createElement("div",{style:p.debugInfoItem},i().createElement("span",{style:p.debugInfoLabel},"平台:"),i().createElement("span",{style:p.debugInfoValue},(null==e?void 0:e.platform)||"N/A"))))},T=function(){var e=t.config;return i().createElement("div",{style:p.debugPanelContent},i().createElement("h3",{style:p.h3},"配置信息"),i().createElement("div",{style:p.debugConfig},i().createElement("pre",{style:p.pre},JSON.stringify(e,null,2))))},S=function(){var e,n,r=t.data;return i().createElement("div",{style:p.debugPanelContent},i().createElement("h3",{style:p.h3},"数据信息"),i().createElement("div",{style:p.debugInfoGrid},i().createElement("div",{style:p.debugInfoItem},i().createElement("span",{style:p.debugInfoLabel},"系列数量:"),i().createElement("span",{style:p.debugInfoValue},(null===(e=null==r?void 0:r.series)||void 0===e?void 0:e.length)||0)),i().createElement("div",{style:p.debugInfoItem},i().createElement("span",{style:p.debugInfoLabel},"总数据量:"),i().createElement("span",{style:p.debugInfoValue},(null==r?void 0:r.totalDataCount)||0)),i().createElement("div",{style:p.debugInfoItem},i().createElement("span",{style:p.debugInfoLabel},"当前数据量:"),i().createElement("span",{style:p.debugInfoValue},(null==r?void 0:r.currentDataCount)||0))),i().createElement("div",{style:p.debugDataSeries},i().createElement("h4",{style:p.h4},"系列数据"),null===(n=null==r?void 0:r.series)||void 0===n?void 0:n.map(function(e,t){var n,r;return i().createElement("div",{key:t,style:p.debugDataSeriesItem},i().createElement("h5",{style:p.h5},"系列 ",t+1,": ",e.name||"未命名"),i().createElement("pre",{style:p.pre},JSON.stringify(null===(n=e.data)||void 0===n?void 0:n.slice(0,5),null,2),"..."),i().createElement("div",{style:p.debugSeriesInfo},i().createElement("span",null,"数据量: ",(null===(r=e.data)||void 0===r?void 0:r.length)||0)))})))},k=function(){var e=t.performance;return i().createElement("div",{style:p.debugPanelContent},i().createElement("h3",{style:p.h3},"性能信息"),i().createElement("div",{style:p.debugInfoGrid},i().createElement("div",{style:p.debugInfoItem},i().createElement("span",{style:p.debugInfoLabel},"初始化时间:"),i().createElement("span",{style:p.debugInfoValue},(null==e?void 0:e.initTime)||0,"ms")),i().createElement("div",{style:p.debugInfoItem},i().createElement("span",{style:p.debugInfoLabel},"渲染时间:"),i().createElement("span",{style:p.debugInfoValue},(null==e?void 0:e.renderTime)||0,"ms")),i().createElement("div",{style:p.debugInfoItem},i().createElement("span",{style:p.debugInfoLabel},"更新时间:"),i().createElement("span",{style:p.debugInfoValue},(null==e?void 0:e.updateTime)||0,"ms")),i().createElement("div",{style:p.debugInfoItem},i().createElement("span",{style:p.debugInfoLabel},"数据大小:"),i().createElement("span",{style:p.debugInfoValue},(null==e?void 0:e.dataSize)||0," bytes")),i().createElement("div",{style:p.debugInfoItem},i().createElement("span",{style:p.debugInfoLabel},"帧率:"),i().createElement("span",{style:p.debugInfoValue},(null==e?void 0:e.frameRate)||0," FPS"))),i().createElement("div",{style:p.debugPerformanceChart}))},O=function(){var e=t.events;return i().createElement("div",{style:p.debugPanelContent},i().createElement("h3",{style:p.h3},"事件信息"),i().createElement("div",{style:p.debugEventsList},null==e?void 0:e.slice().reverse().map(function(e,t){return i().createElement("div",{key:t,style:p.debugEventItem},i().createElement("div",{style:p.debugEventHeader},i().createElement("span",{style:p.debugEventType},e.type),i().createElement("span",{style:p.debugEventTime},new Date(e.timestamp).toLocaleTimeString())),i().createElement("div",{style:p.debugEventParams},i().createElement("pre",{style:p.pre},JSON.stringify(e.params,null,2))))}),(!e||0===e.length)&&i().createElement("div",{style:p.debugEmptyState},"暂无事件记录")))},A=function(){var e=t.errors;return i().createElement("div",{style:p.debugPanelContent},i().createElement("h3",{style:p.h3},"错误信息"),i().createElement("div",{style:p.debugErrorsList},null==e?void 0:e.slice().reverse().map(function(e,t){return i().createElement("div",{key:t,style:p.debugErrorItem},i().createElement("div",{style:p.debugErrorHeader},i().createElement("span",{style:p.debugErrorType},e.type),i().createElement("span",{style:p.debugErrorTime},new Date(e.timestamp).toLocaleTimeString())),i().createElement("div",{style:p.debugErrorMessage},e.message),e.stack&&i().createElement("div",{style:p.debugErrorStack},i().createElement("pre",{style:p.pre},e.stack)))}),(!e||0===e.length)&&i().createElement("div",{style:p.debugEmptyState},"暂无错误记录")))},D=function(){return i().createElement("div",{style:p.debugPanelContent},i().createElement("h3",{style:p.h3},"调试工具"),i().createElement("div",{style:p.debugToolsGrid},i().createElement("button",{style:p.debugToolButton},"导出配置"),i().createElement("button",{style:p.debugToolButton},"导出数据"),i().createElement("button",{style:p.debugToolButton},"刷新图表"),i().createElement("button",{style:p.debugToolButton},"清空数据"),i().createElement("button",{style:p.debugToolButton},"性能分析"),i().createElement("button",{style:p.debugToolButton},"重置图表")))},R=d(d(d(d(d(d({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"}),l&&{width:E,height:w}),p.tarovizDebugPanel);return i().createElement("div",{ref:m,style:R},i().createElement("div",{style:p.debugPanelHeader},i().createElement("div",{style:p.debugPanelTitle},i().createElement("span",{style:p.debugPanelLogo},"🐛"),i().createElement("span",null,"TaroViz Debug Panel")),i().createElement("button",{style:p.debugPanelToggle,onClick:function(){var e=!l;u(e),null==c||c({type:e?o.PANEL_SHOW:o.PANEL_HIDE})},title:l?"收起":"展开"},l?"▼":"▶")),l&&i().createElement(i().Fragment,null,i().createElement("div",{style:p.debugPanelTabs},i().createElement("button",{style:d(d({},p.debugTab),"instance"===h&&p.debugTabActive),onClick:function(){return I("instance")},title:"实例信息"},"实例"),i().createElement("button",{style:d(d({},p.debugTab),"config"===h&&p.debugTabActive),onClick:function(){return I("config")},title:"配置信息"},"配置"),i().createElement("button",{style:d(d({},p.debugTab),"data"===h&&p.debugTabActive),onClick:function(){return I("data")},title:"数据信息"},"数据"),i().createElement("button",{style:d(d({},p.debugTab),"performance"===h&&p.debugTabActive),onClick:function(){return I("performance")},title:"性能信息"},"性能"),i().createElement("button",{style:d(d({},p.debugTab),"events"===h&&p.debugTabActive),onClick:function(){return I("events")},title:"事件信息"},"事件"),i().createElement("button",{style:d(d({},p.debugTab),"errors"===h&&p.debugTabActive),onClick:function(){return I("errors")},title:"错误信息"},"错误"),i().createElement("button",{style:d(d({},p.debugTab),"tools"===h&&p.debugTabActive),onClick:function(){return I("tools")},title:"调试工具"},"工具")),i().createElement("div",{style:p.debugPanelBody},function(){switch(h){case"instance":return C();case"config":return T();case"data":return S();case"performance":return k();case"events":return O();case"errors":return A();case"tools":return D();default:return i().createElement("div",null,"未知标签页")}}())))},p={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"}};var h,v=function(){return v=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},v.apply(this,arguments)},m=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},g=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=v(v({},this.debugInfo),e),this.emitEvent(o.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 n={type:e,timestamp:Date.now(),params:t};this.debugInfo.events&&this.debugInfo.events.length>=this.maxEvents&&this.debugInfo.events.shift(),this.debugInfo.events=m(m([],this.debugInfo.events||[],!0),[n],!1),this.emitEvent(o.INFO_UPDATE,{info:this.debugInfo})}},e.prototype.addError=function(e,t,n){if(this.isEnabled){var r={type:e,message:t,stack:n,timestamp:Date.now()};this.debugInfo.errors&&this.debugInfo.errors.length>=this.maxErrors&&this.debugInfo.errors.shift(),this.debugInfo.errors=m(m([],this.debugInfo.errors||[],!0),[r],!1),this.emitEvent(o.INFO_UPDATE,{info:this.debugInfo})}},e.prototype.clear=function(){this.debugInfo={instance:{},config:{},data:{series:[],totalDataCount:0,currentDataCount:0},performance:{},events:[],errors:[]},this.emitEvent(o.INFO_UPDATE,{info:this.debugInfo})},e.prototype.on=function(e,t){var n;this.eventHandlers.has(e)||this.eventHandlers.set(e,new Set),null===(n=this.eventHandlers.get(e))||void 0===n||n.add(t)},e.prototype.off=function(e,t){var n;t?null===(n=this.eventHandlers.get(e))||void 0===n||n.delete(t):this.eventHandlers.delete(e)},e.prototype.emitEvent=function(e,t){var n=this.eventHandlers.get(e);n&&n.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"}(h||(h={}));var y=function(){return y=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},y.apply(this,arguments)},b=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},E=function(){function e(e){void 0===e&&(e={});var t,n=this;this.metrics=new Map,this.eventHandlers=new Map,this.isMonitoring=!1,this.startTime=0,this.sampleIntervalId=null,this.frameRateHistory=[],this.lastFrameTime=0,this.config=y({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){n.metrics.set(e,[])}),this.config.autoStart&&this.start()}return e.getInstance=function(t){return e.instance||(e.instance=new e(t)),e.instance},e.resetInstance=function(){e.instance&&(e.instance.stop(),e.instance=null)},e.prototype.on=function(e,t){var n;this.eventHandlers.has(e)||this.eventHandlers.set(e,[]),null===(n=this.eventHandlers.get(e))||void 0===n||n.push(t)},e.prototype.off=function(e,t){var n=this.eventHandlers.get(e);if(n){var r=n.indexOf(t);r>-1&&n.splice(r,1)}},e.prototype.emit=function(e,t){var n=this.eventHandlers.get(e);null==n||n.forEach(function(n){try{n({type:e,data:t})}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(h.MONITORING_START))},e.prototype.stop=function(){this.isMonitoring&&(this.isMonitoring=!1,this.sampleIntervalId&&(clearInterval(this.sampleIntervalId),this.sampleIntervalId=null),this.stopFrameRateMonitoring(),this.emit(h.MONITORING_END))},e.prototype.startFrameRateMonitoring=function(){var e=this,t=function(){if(e.isMonitoring){var n=performance.now(),r=n-e.lastFrameTime,o=r>0?Math.round(1e3/r):0;e.frameRateHistory.push(o),e.frameRateHistory.length>60&&e.frameRateHistory.shift(),e.lastFrameTime=n,requestAnimationFrame(t)}};requestAnimationFrame(t)},e.prototype.stopFrameRateMonitoring=function(){this.frameRateHistory=[]},e.prototype.sampleMetrics=function(){var e,t;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 r=(performance.memory.usedJSHeapSize/1048576).toFixed(2);this.recordMetric("memoryUsage",parseFloat(r),"MB")}}},e.prototype.recordMetric=function(e,t,n,r){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:n,timestamp:Date.now(),description:r},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(h.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={},n={},r={},o=0,a=100,i=[];this.metrics.forEach(function(a,i){if(0!==a.length){o+=a.length,r[i]=b([],a,!0);var c=a.reduce(function(e,t){return e+t.value},0);e[i]=parseFloat((c/a.length).toFixed(2)),t[i]=Math.max.apply(Math,a.map(function(e){return e.value})),n[i]=Math.min.apply(Math,a.map(function(e){return e.value}))}}),e.renderTime>100&&(a-=20,i.push("渲染时间过长,建议优化数据处理或减少图表复杂度")),e.updateTime>50&&(a-=15,i.push("更新时间过长,建议优化数据更新逻辑")),e.frameRate<30&&(a-=25,i.push("帧率过低,建议减少动画效果或优化渲染逻辑")),e.dataSize>100&&(a-=10,i.push("数据量过大,建议进行数据压缩或分页处理")),a=Math.max(0,Math.min(100,a));var c={averages:e,maxValues:t,minValues:n,trends:r,score:a,suggestions:i,totalSamples:o,duration:Date.now()-this.startTime};return this.emit(h.ANALYSIS_COMPLETE,c),c},e.prototype.generateReport=function(e){void 0===e&&(e={});var t=this.analyze(),n=y({format:"json",includeCharts:!1,includeSuggestions:!0,includeDetailedData:!1},e);switch(n.format){case"json":default:return this.generateJsonReport(t,n);case"csv":return this.generateCsvReport(t,n);case"html":return this.generateHtmlReport(t,n)}},e.prototype.generateJsonReport=function(e,t){var n={timestamp:(new Date).toISOString(),duration:e.duration,score:e.score,totalSamples:e.totalSamples};return t.includeSuggestions&&(n.suggestions=e.suggestions),t.includeDetailedData&&(n.averages=e.averages,n.maxValues=e.maxValues,n.minValues=e.minValues,n.trends=e.trends),n},e.prototype.generateCsvReport=function(e,t){var n="Metric,Type,Value,Unit\n";return Object.entries(e.averages).forEach(function(e){var t=e[0],r=e[1];n+="".concat(t,",Average,").concat(r,",ms\n")}),Object.entries(e.maxValues).forEach(function(e){var t=e[0],r=e[1];n+="".concat(t,",Max,").concat(r,",ms\n")}),Object.entries(e.minValues).forEach(function(e){var t=e[0],r=e[1];n+="".concat(t,",Min,").concat(r,",ms\n")}),n},e.prototype.generateHtmlReport=function(e,t){var n='\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 n+='\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 r=t[0],o=t[1],a=e.maxValues[r],i=e.minValues[r];n+="\n <tr>\n <td>".concat(r,"</td>\n <td>").concat(o," ms</td>\n <td>").concat(a," ms</td>\n <td>").concat(i," ms</td>\n </tr>")}),n+="\n </table>\n </div>",t.includeSuggestions&&e.suggestions.length>0&&(n+='\n <div class="suggestions">\n <h2>性能建议</h2>\n <ul>',e.suggestions.forEach(function(e){n+="\n <li>".concat(e,"</li>")}),n+="\n </ul>\n </div>"),n+="\n </body>\n </html>"},e.prototype.getIsMonitoring=function(){return this.isMonitoring},e.prototype.getConfig=function(){return y({},this.config)},e.prototype.updateConfig=function(e){this.config=y(y({},this.config),e)},e.prototype.getAllMetrics=function(){return new Map(this.metrics)},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}(),x=(E.getInstance(),function(){return x=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},x.apply(this,arguments)});const w=function(e){var t=e.chartId,n=e.option,r=e.width,o=void 0===r?"100%":r,d=e.height,p=void 0===d?"300px":d,h=e.theme,v=e.autoResize,m=void 0===v||v,y=e.direction,b=void 0===y?"ltr":y,w=e.onInit,I=e.onClick,C=e.onDataZoom,T=e.style,S=e.className,k=e.children,O=e.virtualScroll,A=void 0!==O&&O,D=e.virtualScrollPageSize,R=void 0===D?100:D,P=e.virtualScrollPreloadSize,L=void 0===P?50:P,z=e.enablePerformanceMonitoring,M=void 0!==z&&z,N=e.onPerformance,j=(e.enableZoom,e.onZoom),H=e.enableDataFiltering,F=void 0!==H&&H,U=e.filters,B=void 0===U?{}:U,G=e.onDataFiltered,V=e.enableLegendInteraction,_=void 0!==V&&V,W=e.legendInteractionMode,Z=void 0===W?"single":W,q=e.onLegendSelect,J=e.onLegendUnselect,Y=(e.onLegendSelectAll,e.onLegendInverseSelect,e.enableCustomTooltip),Q=void 0!==Y&&Y,K=e.customTooltipContent,X=e.customTooltipStyle,$=e.onTooltipShow,ee=e.onTooltipHide,te=e.onExport,ne=e.linkageConfig,re=void 0===ne?{}:ne,oe=e.onDataUpdate,ae=e.dataUpdateOptions,ie=void 0===ae?{}:ae,ce=(0,a.useRef)(null),se=(0,a.useRef)(null),le=(0,a.useRef)({currentPage:0,totalPages:1,totalDataCount:0,startIndex:0,endIndex:0,isScrolling:!1}),ue=(0,a.useRef)(null),de=(0,a.useRef)({initStartTime:0,initEndTime:0,renderStartTime:0,renderEndTime:0,updateStartTime:0,updateEndTime:0,dataSize:0}),fe=(0,a.useRef)(n),pe=(0,a.useRef)(null),he=function(){return e.debug?"boolean"==typeof e.debug?{enabled:e.debug,autoExpand:!1}:x({enabled:!0},e.debug):null},ve=function(e){if(void 0===e&&(e={}),se.current){var t=e.type,n=void 0===t?"png":t,r=e.pixelRatio,o=void 0===r?2:r,a=e.backgroundColor,i=void 0===a?"transparent":a,c=se.current.convertToDataURL({type:n,pixelRatio:o,backgroundColor:i});return te&&c&&te(c,e),c}},me=(0,a.useRef)({exportChartToDataURL:ve,exportChart:function(e){void 0===e&&(e={});var t=ve(e);if(t){var n=e.type,r=void 0===n?"png":n,o=e.filename,a=void 0===o?"chart-".concat(Date.now()):o,i="".concat(a,".").concat(r),c=document.createElement("a");c.download=i,c.href=t,c.click()}}});i().useImperativeHandle(e,function(){return me.current});var ge=function(e,t){var r=Date.now();switch(e){case"init":if(de.current.initStartTime){de.current.initEndTime=r;var o=de.current.initEndTime-de.current.initStartTime,a=JSON.stringify(n).length;ue.current&&(ue.current.recordInitTime(o),ue.current.recordDataSize(n)),N&&N({renderTime:0,initTime:o,updateTime:0,dataSize:a})}else de.current.initStartTime=r;break;case"render":if(de.current.renderStartTime){de.current.renderEndTime=r;var i=de.current.renderEndTime-de.current.renderStartTime;a=JSON.stringify(n).length;ue.current&&ue.current.recordRenderTime(i),N&&N({renderTime:i,initTime:de.current.initEndTime-de.current.initStartTime,updateTime:0,dataSize:a})}else de.current.renderStartTime=r;break;case"update":if(de.current.updateStartTime){de.current.updateEndTime=r;var c=de.current.updateEndTime-de.current.updateStartTime;a=JSON.stringify(n).length;ue.current&&(ue.current.recordUpdateTime(c),ue.current.recordDataSize(n)),N&&N({renderTime:0,initTime:0,updateTime:c,dataSize:a})}else de.current.updateStartTime=r}},ye=function(e){var t=0;e.series&&(Array.isArray(e.series)?e.series:[e.series]).forEach(function(e){e.data&&(Array.isArray(e.data)?t+=e.data.length:"object"==typeof e.data&&(t+=Object.keys(e.data).length))});return t},be=function(t){if(!t)return t;var n=JSON.parse(JSON.stringify(t));n.series&&Array.isArray(n.series)&&(n.series=n.series.map(function(e){if(e.data&&Array.isArray(e.data)){var t=function(e,t){return F&&t&&0!==Object.keys(t).length?e.filter(function(e){for(var n,r,o=0,a=Object.entries(t);o<a.length;o++){var i=a[o],c=i[0],s=i[1];if(e[c]!==s&&!(null===(r=null===(n=e[c])||void 0===n?void 0:n.includes)||void 0===r?void 0:r.call(n,s)))return!1}return!0}):e}(e.data,B);if(G&&G(t,B),A){le.current.totalDataCount=t.length,le.current.totalPages=Math.ceil(t.length/R);var n=le.current.currentPage*R,r=Math.min(n+R+L,t.length);return le.current.startIndex=n,le.current.endIndex=r,x(x({},e),{data:t.slice(n,r)})}return x(x({},e),{data:t})}return e}));var r=ye(n),o=(0,s.ek)(e.animation,r);return x(x({},n),o)};(0,a.useEffect)(function(){if(ce.current){var e=he();pe.current=e,M&&(ue.current=E.getInstance({enabled:!0,metrics:["initTime","renderTime","updateTime","dataSize","frameRate"],sampleInterval:1e3,maxSamples:100,realTime:!0,autoStart:!0})),ge("init");var r=be(n),a=(0,c.cK)({width:o,height:p,theme:h,option:r,onInit:w,containerRef:ce,direction:b});"function"==typeof a.setComponent&&a.setComponent({createChart:function(e){return{}}}),ge("render");var i=a.init();return ge("render"),t&&i&&function(e,t){if(l[e])try{l[e].dispose()}catch(e){}l[e]=t}(t,i),(null==e?void 0:e.enabled)&&(s={instance:{id:t,type:"ECharts",renderer:"canvas",width:"number"==typeof o?o:void 0,height:"number"==typeof p?p:void 0,platform:"web"},config:r,data:{series:Array.isArray(r.series)?r.series:[],totalDataCount:ye(r),currentDataCount:ye(r)},performance:{initTime:de.current.initEndTime-de.current.initStartTime,renderTime:de.current.renderEndTime-de.current.renderStartTime,dataSize:JSON.stringify(r).length}},g.updateDebugInfo(s)),i&&I&&i.on("click",function(e){I(e),re.enableClickLinkage&&t&&re.linkedChartIds&&re.linkedChartIds.forEach(function(t){var n=u(t);n&&n.dispatchAction({type:"highlight",name:e.name})})}),i&&i.on("datazoom",function(e){if(C&&C(e),j&&j({start:e.start||0,end:e.end||100,dataZoomIndex:e.dataZoomIndex||0}),re.enableZoomLinkage&&t&&re.linkedChartIds&&re.linkedChartIds.forEach(function(t){var n=u(t);n&&n.dispatchAction({type:"dataZoom",start:e.start,end:e.end,dataZoomIndex:e.dataZoomIndex})}),A){if(le.current.isScrolling)return;le.current.isScrolling=!0;var r=e.start||0,o=Math.floor(r/100*le.current.totalPages);if(o!==le.current.currentPage){le.current.currentPage=o;var i=be(n);a.setOption(i)}setTimeout(function(){le.current.isScrolling=!1},100)}}),i&&_&&i.on("legendselectchanged",function(e){var n=e.name,r=e.selected;if(re.enableLegendLinkage&&t&&re.linkedChartIds&&re.linkedChartIds.forEach(function(e){var t=u(e);t&&t.setOption({legend:{selected:r}})}),"single"===Z){var o={};Object.keys(r).forEach(function(e){o[e]=e===n}),i.setOption({legend:{selected:o}}),q&&q({name:n,selected:o})}else r[n]?q&&q({name:n,selected:r}):J&&J({name:n,selected:r})}),i&&Q&&(i.on("tooltipshow",function(e){$&&$(e)}),i.on("tooltiphide",function(e){ee&&ee(e)}),K&&i.setOption({tooltip:x({formatter:function(e){return'<div style="background: white; padding: 10px; border: 1px solid #ccc;">'+JSON.stringify(e)+"</div>"}},X&&{backgroundColor:"transparent",borderColor:"transparent",textStyle:{}})})),se.current=a,ge("init"),function(){var e;t&&l[e=t]&&delete l[e],ue.current&&(ue.current.stop(),ue.current=null),a&&a.dispose()}}var s},[ce,o,p,h,n,w,I,C,t,re]),(0,a.useEffect)(function(){se.current&&se.current.resize()},[o,p]);(0,a.useEffect)(function(){if(se.current&&n){ge("update");var e=be(n);se.current.setOption(e),ge("update")}if(oe&&!1!==ie.enabled){var t=fe.current;(function(e,t){return e===t||!(!e||!t)&&(ie.deepCompare?JSON.stringify(e)===JSON.stringify(t):e===t)})(t,n)||(oe(t,n),fe.current=n)}},[n,oe,ie]),(0,a.useEffect)(function(){se.current&&h&&se.current.setTheme(h)},[h]),(0,a.useEffect)(function(){if(m&&se.current){var e=function(){se.current.resize()};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}},[m]);var Ee=x({width:"number"==typeof o?"".concat(o,"px"):o,height:"number"==typeof p?"".concat(p,"px"):p,direction:b},T),xe=he(),we=i().createElement("div",{ref:ce,style:Ee,className:S},k);return(null==xe?void 0:xe.enabled)?i().createElement(i().Fragment,null,we,i().createElement(f,{options:xe,debugInfo:{instance:{id:t,type:"ECharts",renderer:"canvas",width:"number"==typeof o?o:void 0,height:"number"==typeof p?p:void 0,platform:"web"},config:n,data:{series:Array.isArray(null==n?void 0:n.series)?n.series:[],totalDataCount:ye(n),currentDataCount:ye(n)},performance:{initTime:de.current.initEndTime-de.current.initStartTime,renderTime:de.current.renderEndTime-de.current.renderStartTime,updateTime:de.current.updateEndTime-de.current.updateStartTime,dataSize:JSON.stringify(n).length}}})):we};var I=n(524),C=n(127),T=n(188),S=n(481),k=n(589),O=n(443),A=n(835),D=n(334),R=n(133),P=n(37),L=n(673),z=n(490),M=n(123),N=n(999),j=function(){return j=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},j.apply(this,arguments)},H=new Map,F={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"}}},U={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"}}},B={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)"}}},G={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}}},V={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}}},_={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"}},W={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)"}},Z={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)"}}},q={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"}},J={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 F;var t;if(e.theme&&"string"==typeof e.theme){var n=H.get(e.theme);t=n||(e.darkMode?U:F)}else t=e.darkMode?U:F;return j(j({},t),e)}function Q(e,t){H.set(e,j(j({},t),{name:e}))}function K(){return Array.from(H.values())}function X(e){return H.get(e)}function $(e,t){var n;"string"==typeof e?n=H.get(e)||F:(n=e,e.name&&Q(e.name,e));return"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("themeChange",{detail:n})),null==t||t(),n}function ee(e){return K().filter(function(t){var n;return null===(n=t.tags)||void 0===n?void 0:n.includes(e)})}function te(){return K().filter(function(e){return!e.darkMode})}function ne(){return K().filter(function(e){return e.darkMode})}var re={default:F,dark:U,walden:j(j({},F),{theme:"walden",name:"Walden",description:"清新自然风格",colors:["#0a437a","#3a84c4","#22a783","#48b591","#7fcdbb","#c9e4ca"],backgroundColor:"#f0f8f5",textColor:"#2c5042"}),chalk:j(j({},F),{theme:"chalk",name:"Chalk",description:"粉笔风格",colors:["#2e8de5","#f0805a","#5ab1ef","#91d5ff","#faad14"],backgroundColor:"#ffffff",textColor:"#000000"}),"purple-passion":j(j({},F),{theme:"purple-passion",name:"Purple Passion",description:"紫色浪漫",colors:["#9c27b0","#e91e63","#ff5722","#ff9800","#ffc107"],backgroundColor:"#f5f5f5",textColor:"#333333"}),"blue-green":j(j({},F),{theme:"blue-green",name:"Blue Green",description:"蓝绿清新",colors:["#00838f","#00acc1","#03a9f4","#29b6f6","#4fc3f7"],backgroundColor:"#e0f7fa",textColor:"#006064"}),golden:j(j({},F),{theme:"golden",name:"Golden",description:"金色奢华",colors:["#ffd700","#ffed4e","#f9a825","#ffc107","#ffb300"],backgroundColor:"#fff8e1",textColor:"#ff6f00"}),forest:j(j({},F),{theme:"forest",name:"Forest",description:"森林绿色",colors:["#2e7d32","#388e3c","#43a047","#4caf50","#66bb6a"],backgroundColor:"#f1f8e9",textColor:"#1b5e20"}),neon:B,glass:G,pastel:V,sunset:_,ocean:W,cyber:Z,retro:q,elegant:J};Object.entries(re).forEach(function(e){var t=e[0],n=e[1];H.set(t,n)});var oe=function(){return oe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},oe.apply(this,arguments)},ae={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":"#277 ace","--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"}}},ie=function(){function e(){this.currentTheme=ae.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 ae[e]},e.prototype.getPresetThemeNames=function(){return Object.keys(ae)},e.prototype.setTheme=function(e){var t="string"==typeof e?ae[e]:e;t&&(this.currentTheme=t,this.applyThemeVariables(t),this.notifyListeners())},e.prototype.applyThemeVariables=function(e){if("undefined"!=typeof document){var t=document.documentElement,n=e.variables;Object.entries(n).forEach(function(e){var n=e[0],r=e[1];t.style.setProperty(n,r)}),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.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:oe(oe({},ae.default.variables),e)}},e.prototype.exportThemeAsCSS=function(e){var t=e||this.currentTheme,n=t.variables;return':root[data-theme="'.concat(t.name,'"] {\n').concat(Object.entries(n).map(function(e){var t=e[0],n=e[1];return" ".concat(t,": ").concat(n,";")}).join("\n"),"\n}")},e.prototype.exportThemeAsJSON=function(e){var t=e||this.currentTheme;return JSON.stringify(t,null,2)},e.instance=null,e}().getInstance();var ce=function(){return ce=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ce.apply(this,arguments)},se=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};const le=function(e){var t=e.selectedTheme,n=e.onThemeChange,r=e.onThemeSave,o=e.disabled,c=void 0!==o&&o,s=e.style,l=void 0===s?{}:s,u=e.className,d=void 0===u?"":u,f=K(),p=(0,a.useState)(f[0]||{}),h=p[0],v=p[1],m=(0,a.useState)(""),g=m[0],y=m[1],b=(0,a.useState)(!1),E=b[0],x=b[1],w=(0,a.useState)(h.colors||[]),I=w[0],C=w[1],T=(0,a.useState)(h.backgroundColor||"#ffffff"),S=T[0],k=T[1],O=(0,a.useState)(h.textColor||"#333333"),A=O[0],D=O[1],R=(0,a.useState)(h.darkMode||!1),P=R[0],L=R[1];(0,a.useEffect)(function(){if(t){var e=f.find(function(e){return e.name===t});e&&(v(e),C(e.colors||[]),k(e.backgroundColor||"#ffffff"),D(e.textColor||"#333333"),L(e.darkMode||!1))}},[t,f]),(0,a.useEffect)(function(){C(h.colors||[]),k(h.backgroundColor||"#ffffff"),D(h.textColor||"#333333"),L(h.darkMode||!1)},[h]);var z=function(e,t){var n=se([],I,!0);n[e]=t,C(n),j({colors:n})},M=function(e){k(e),j({backgroundColor:e})},N=function(e){D(e),j({textColor:e})},j=function(e){var t=ce(ce({},h),e);v(t),n&&n(t),$(t)};return i().createElement("div",{className:"taroviz-theme-editor ".concat(d),style:ce({padding:"20px",border:"1px solid #e0e0e0",borderRadius:"8px",backgroundColor:"#ffffff",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)"},l)},i().createElement("h3",null,"主题编辑器"),i().createElement("div",{style:{marginBottom:"20px"}},i().createElement("h4",null,"选择主题"),i().createElement("div",{style:{display:"flex",flexWrap:"wrap",gap:"10px",marginTop:"10px"}},f.map(function(e){return i().createElement("button",{key:e.name,onClick:function(){return function(e){v(e),n&&n(e),$(e)}(e)},disabled:c,style:{padding:"8px 16px",border:"2px solid ".concat(h.name===e.name?"#1890ff":"#e0e0e0"),borderRadius:"4px",backgroundColor:h.name===e.name?"#1890ff":"#ffffff",color:h.name===e.name?"#ffffff":"#333333",cursor:c?"not-allowed":"pointer",opacity:c?.6:1}},e.name)}),i().createElement("button",{onClick:function(){x(!0),y("")},disabled:c,style:{padding:"8px 16px",border:"2px dashed #e0e0e0",borderRadius:"4px",backgroundColor:"#f5f5f5",color:"#333333",cursor:c?"not-allowed":"pointer",opacity:c?.6:1}},"+ 新主题"))),E&&i().createElement("div",{style:{marginBottom:"20px",padding:"15px",backgroundColor:"#f9f9f9",borderRadius:"4px"}},i().createElement("h4",null,"新建主题"),i().createElement("div",{style:{marginBottom:"10px"}},i().createElement("label",{style:{display:"block",marginBottom:"5px"}},"主题名称:"),i().createElement("input",{type:"text",value:g,onChange:function(e){return y(e.target.value)},disabled:c,style:{padding:"8px",border:"1px solid #e0e0e0",borderRadius:"4px",width:"100%",opacity:c?.6:1},placeholder:"输入主题名称"}))),i().createElement("div",{style:{marginBottom:"20px"}},i().createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"10px"}},i().createElement("h4",null,"主题颜色"),i().createElement("button",{onClick:function(){C(se(se([],I,!0),["#000000"],!1))},disabled:c,style:{padding:"4px 8px",border:"1px solid #e0e0e0",borderRadius:"4px",backgroundColor:"#ffffff",color:"#333333",cursor:c?"not-allowed":"pointer",opacity:c?.6:1}},"+ 添加颜色")),i().createElement("div",{style:{display:"flex",flexWrap:"wrap",gap:"10px"}},I.map(function(e,t){return i().createElement("div",{key:t,style:{display:"flex",alignItems:"center",gap:"5px"}},i().createElement("input",{type:"color",value:e,onChange:function(e){return z(t,e.target.value)},disabled:c,style:{width:"50px",height:"30px",border:"none",cursor:c?"not-allowed":"pointer",opacity:c?.6:1}}),i().createElement("input",{type:"text",value:e,onChange:function(e){return z(t,e.target.value)},disabled:c,style:{width:"80px",padding:"4px",border:"1px solid #e0e0e0",borderRadius:"4px",opacity:c?.6:1}}),i().createElement("button",{onClick:function(){return function(e){var t=I.filter(function(t,n){return n!==e});C(t),j({colors:t})}(t)},disabled:c||I.length<=1,style:{padding:"4px 8px",border:"1px solid #ff4d4f",borderRadius:"4px",backgroundColor:"#ffffff",color:"#ff4d4f",cursor:c||I.length<=1?"not-allowed":"pointer",opacity:c||I.length<=1?.6:1}},"删除"))}))),i().createElement("div",{style:{marginBottom:"20px"}},i().createElement("h4",null,"基础配置"),i().createElement("div",{style:{marginBottom:"10px"}},i().createElement("label",{style:{display:"block",marginBottom:"5px"}},"背景色:"),i().createElement("div",{style:{display:"flex",alignItems:"center",gap:"10px"}},i().createElement("input",{type:"color",value:S,onChange:function(e){return M(e.target.value)},disabled:c,style:{width:"50px",height:"30px",border:"none",cursor:c?"not-allowed":"pointer",opacity:c?.6:1}}),i().createElement("input",{type:"text",value:S,onChange:function(e){return M(e.target.value)},disabled:c,style:{width:"120px",padding:"4px",border:"1px solid #e0e0e0",borderRadius:"4px",opacity:c?.6:1}}))),i().createElement("div",{style:{marginBottom:"10px"}},i().createElement("label",{style:{display:"block",marginBottom:"5px"}},"文本颜色:"),i().createElement("div",{style:{display:"flex",alignItems:"center",gap:"10px"}},i().createElement("input",{type:"color",value:A,onChange:function(e){return N(e.target.value)},disabled:c,style:{width:"50px",height:"30px",border:"none",cursor:c?"not-allowed":"pointer",opacity:c?.6:1}}),i().createElement("input",{type:"text",value:A,onChange:function(e){return N(e.target.value)},disabled:c,style:{width:"120px",padding:"4px",border:"1px solid #e0e0e0",borderRadius:"4px",opacity:c?.6:1}}))),i().createElement("div",{style:{display:"flex",alignItems:"center",gap:"10px"}},i().createElement("label",null,"深色模式:"),i().createElement("input",{type:"checkbox",checked:P,onChange:function(){var e=!P;L(e),j({darkMode:e})},disabled:c,style:{cursor:c?"not-allowed":"pointer",opacity:c?.6:1}}))),i().createElement("button",{onClick:function(){var e=ce(ce({},h),{colors:I,backgroundColor:S,textColor:A,darkMode:P});E&&g?(Q(g,e),x(!1),y("")):Q(h.name||"custom",e),r&&r(e)},disabled:c,style:{padding:"10px 20px",border:"none",borderRadius:"4px",backgroundColor:"#1890ff",color:"#ffffff",cursor:c?"not-allowed":"pointer",opacity:c?.6:1}},"保存主题"))};var ue,de=(ue=function(e,t){return ue=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},ue(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 n(){this.constructor=e}ue(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),fe=function(){return fe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},fe.apply(this,arguments)},pe=function(e){function t(t){var n=e.call(this,t)||this;return n.handleReset=function(){n.setState({hasError:!1,error:null})},n.state={hasError:!1,error:null},n}return de(t,e),t.getDerivedStateFromError=function(e){return{hasError:!0,error:e}},t.prototype.componentDidCatch=function(e,t){var n,r;null===(r=(n=this.props).onError)||void 0===r||r.call(n,e,t)},t.prototype.render=function(){var e=this.state,t=e.hasError,n=e.error,r=this.props,o=r.children,a=r.fallback,c=r.showDetails,s=void 0!==c&&c;return t&&n?a?a(n,this.handleReset):i().createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"20px",backgroundColor:"#fff",border:"1px solid #ff4d4f",borderRadius:"8px",color:"#333",minHeight:"200px"}},i().createElement("div",{style:{fontSize:"48px",marginBottom:"16px"}},"⚠️"),i().createElement("h3",{style:{margin:"0 0 12px",color:"#ff4d4f"}},"图表渲染失败"),i().createElement("p",{style:{margin:"0 0 16px",color:"#666",textAlign:"center"}},"图表在渲染过程中遇到错误,请检查数据配置是否正确"),s&&i().createElement("details",{style:{width:"100%",padding:"12px",backgroundColor:"#f5f5f5",borderRadius:"4px",fontSize:"12px",fontFamily:"monospace",overflow:"auto",maxHeight:"150px"}},i().createElement("summary",{style:{cursor:"pointer",marginBottom:"8px"}},"错误详情"),i().createElement("pre",{style:{margin:0,whiteSpace:"pre-wrap",wordBreak:"break-all"}},n.message,"\n\n",n.stack)),i().createElement("button",{onClick:this.handleReset,style:{marginTop:"16px",padding:"8px 24px",backgroundColor:"#1890ff",color:"#fff",border:"none",borderRadius:"4px",cursor:"pointer",fontSize:"14px"}},"重试")):o},t}(a.Component);function he(e,t){var n=function(n){return i().createElement(pe,fe({},t),i().createElement(e,fe({},n)))};return n.displayName="withErrorBoundary(".concat(e.displayName||e.name||"Chart",")"),n}var ve=function(){return ve=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ve.apply(this,arguments)},me=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},ge=(0,a.lazy)(function(){return Promise.resolve().then(n.bind(n,127))}),ye=(0,a.lazy)(function(){return Promise.resolve().then(n.bind(n,188))}),be=(0,a.lazy)(function(){return Promise.resolve().then(n.bind(n,481))}),Ee=(0,a.lazy)(function(){return Promise.resolve().then(n.bind(n,589))}),xe=(0,a.lazy)(function(){return Promise.resolve().then(n.bind(n,443))}),we=(0,a.lazy)(function(){return Promise.resolve().then(n.bind(n,835))}),Ie=(0,a.lazy)(function(){return Promise.resolve().then(n.bind(n,334))}),Ce=(0,a.lazy)(function(){return Promise.resolve().then(n.bind(n,133))}),Te=(0,a.lazy)(function(){return Promise.resolve().then(n.bind(n,37))}),Se=(0,a.lazy)(function(){return Promise.resolve().then(n.bind(n,673))}),ke=(0,a.lazy)(function(){return Promise.resolve().then(n.bind(n,490))}),Oe=function(e){var t=e.text,n=void 0===t?"加载中...":t;return i().createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",minHeight:"200px",backgroundColor:"#f5f5f5",borderRadius:"8px"}},i().createElement("div",{style:{textAlign:"center"}},i().createElement("div",{style:{width:"40px",height:"40px",border:"3px solid #1890ff",borderTopColor:"transparent",borderRadius:"50%",animation:"taroviz-spin 1s linear infinite",margin:"0 auto 12px"}}),i().createElement("style",null,"\n @keyframes taroviz-spin {\n to { transform: rotate(360deg); }\n }\n "),i().createElement("span",{style:{color:"#666",fontSize:"14px"}},n)))};function Ae(e,t){var n=function(n){var r=n.loadingText,o=n.fallback,c=me(n,["loadingText","fallback"]),s=t||Oe;return i().createElement(a.Suspense,{fallback:i().createElement(s,{text:r})},o?i().createElement(i().Fragment,null,o,i().createElement(e,ve({},c))):i().createElement(e,ve({},c)))};return n.displayName="withLazyLoad(".concat(e.displayName||e.name||"Chart",")"),n}function De(e){var t={line:function(){return Promise.resolve().then(n.bind(n,127))},bar:function(){return Promise.resolve().then(n.bind(n,188))},pie:function(){return Promise.resolve().then(n.bind(n,481))},scatter:function(){return Promise.resolve().then(n.bind(n,589))},radar:function(){return Promise.resolve().then(n.bind(n,443))},heatmap:function(){return Promise.resolve().then(n.bind(n,835))},gauge:function(){return Promise.resolve().then(n.bind(n,334))},funnel:function(){return Promise.resolve().then(n.bind(n,133))},treemap:function(){return Promise.resolve().then(n.bind(n,37))},sunburst:function(){return Promise.resolve().then(n.bind(n,673))},sankey:function(){return Promise.resolve().then(n.bind(n,490))}}[e];t&&t().catch(console.error)}function Re(){["line","bar","pie","scatter","radar","heatmap","gauge","funnel","treemap","sunburst","sankey"].forEach(function(e){return De(e)})}function Pe(e){return{line:ge,bar:ye,pie:be,scatter:Ee,radar:xe,heatmap:we,gauge:Ie,funnel:Ce,treemap:Te,sunburst:Se,sankey:ke}[e]||null}var Le={get:function(e){return Pe(e)},preload:function(e){De(e)},preloadAll:function(){Re()}};function ze(e){var t=e.data,n=e.lineStyle,r=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==n?void 0:n.color)||"#333",width:(null==n?void 0:n.width)||2,type:(null==n?void 0:n.type)||"dashed",opacity:null==n?void 0:n.opacity},label:{show:!1!==(null==r?void 0:r.show),position:(null==r?void 0:r.position)||"end",formatter:null==r?void 0:r.formatter,color:(null==r?void 0:r.color)||"#333",fontSize:(null==r?void 0:r.fontSize)||12},data:t.map(function(e){return{xAxis:e.xAxis,yAxis:e.yAxis,name:e.name}})}}]}function Me(e){var t=e.data,n=e.style,r=e.label;return[{type:"bar",markArea:{silent:!0,animation:!1!==e.animation,animationDuration:e.animationDuration||300,itemStyle:{color:(null==n?void 0:n.color)||"rgba(24, 144, 255, 0.1)",opacity:(null==n?void 0:n.opacity)||.3,borderColor:(null==n?void 0:n.borderColor)||"transparent",borderWidth:(null==n?void 0:n.borderWidth)||0,borderType:null==n?void 0:n.borderType},label:{show:!1!==(null==r?void 0:r.show),position:(null==r?void 0:r.position)||"inside",formatter:null==r?void 0:r.formatter,color:(null==r?void 0:r.color)||"#333",fontSize:(null==r?void 0:r.fontSize)||12},data:t.map(function(e){var t=e[0],n=e[1];return[{xAxis:t.xAxis,yAxis:t.yAxis},{xAxis:n.xAxis,yAxis:n.yAxis}]})}}]}function Ne(e){var t=e.data,n=e.symbol,r=e.symbolSize,o=e.itemStyle,a=e.label;return[{type:"scatter",markPoint:{symbol:n,symbolSize:r,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 je(e){var t=e.type,n=e.markLine,r=e.markArea,o=e.scatter;return(0,a.useMemo)(function(){var e=[];return"line"===t&&n&&e.push.apply(e,ze(n)),"area"===t&&r&&e.push.apply(e,Me(r)),"scatter"===t&&o&&e.push.apply(e,Ne(o)),{series:e}},[t,n,r,o])}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,n){return void 0===n&&(n="rgba(82, 196, 26, 0.1)"),{data:[[{yAxis:e},{yAxis:t}]],style:{color:n,opacity:.3},label:{show:!0,position:"inside",color:"#52c41a"}}},warningArea:function(e,t,n){return void 0===n&&(n="rgba(250, 173, 20, 0.1)"),{data:[[{yAxis:e},{yAxis:t}]],style:{color:n,opacity:.3},label:{show:!0,position:"inside",color:"#faad14"}}}};function Fe(e){var t=[];return e.forEach(function(e){"line"===e.type&&e.markLine&&t.push.apply(t,ze(e.markLine)),"area"===e.type&&e.markArea&&t.push.apply(t,Me(e.markArea)),"scatter"===e.type&&e.scatter&&t.push.apply(t,Ne(e.scatter))}),{series:t}}var Ue=function(){return Ue=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ue.apply(this,arguments)},Be=function(e,t,n,r){return new(n||(n=Promise))(function(o,a){function i(e){try{s(r.next(e))}catch(e){a(e)}}function c(e){try{s(r.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(i,c)}s((r=r.apply(e,t||[])).next())})},Ge=function(e,t){var n,r,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=c(0),i.throw=c(1),i.return=c(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(s){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,s])}}};function Ve(e){for(var t,n=e.split(","),r=(null===(t=n[0].match(/:(.*?);/))||void 0===t?void 0:t[1])||"image/png",o=atob(n[1]),a=o.length,i=new Uint8Array(a);a--;)i[a]=o.charCodeAt(a);return new Blob([i],{type:r})}function _e(e,t){var n=(new Date).toISOString().slice(0,10),r=e.replace(/[^a-zA-Z0-9\u4e00-\u9fa5]/g,"_");return"".concat(r,"_").concat(n,".").concat(t)}var We=function(){function e(){}return e.exportImage=function(e,t){void 0===t&&(t={});var n=t.type,r=void 0===n?"png":n,o=t.pixelRatio,a=void 0===o?2:o,i=t.backgroundColor,c=void 0===i?"#ffffff":i,s=t.quality,l=void 0===s?.8:s,u="image/".concat(r);return{data:e.getDataURL({type:r,pixelRatio:a,backgroundColor:c,quality:l}),filename:_e("chart",r),mimeType:u}},e.exportSVG=function(e,t){void 0===t&&(t={});var n=t.compress,r=void 0!==n&&n,o=e.getSvgData();if(!o)throw new Error("SVG export is not supported. Please use canvas renderer.");var a=o,i="image/svg+xml";return r&&(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 Be(this,arguments,Promise,function(e,t){var n,r,o,a,i,c,s,l,u,d,f,p,h,v,m,g,y,b,E,x,w,I,C,T,S,k,O;return void 0===t&&(t={}),Ge(this,function(A){switch(A.label){case 0:n=t.orientation,r=void 0===n?"portrait":n,o=t.pageSize,a=void 0===o?"a4":o,i=t.title,c=void 0===i?"Chart Export":i,s=t.author,l=void 0===s?"TaroViz":s,u=t.margin,d=void 0===u?{top:40,right:40,bottom:40,left:40}:u,f=t.includeTitle,p=void 0===f||f,h=e.getDataURL({type:"png",pixelRatio:2,backgroundColor:"#ffffff"}),A.label=1;case 1:return A.trys.push([1,3,,4]),[4,import("jspdf")];case 2:return v=A.sent().default,[3,4];case 3:return A.sent(),[2,{data:h,filename:_e("chart","png"),mimeType:"image/png"}];case 4:return m={a4:{width:210,height:297},letter:{width:216,height:279},legal:{width:216,height:356},tabloid:{width:279,height:432}}[a],g="landscape"===r,(y=new v({orientation:r,unit:"mm",format:a})).setProperties({title:c,author:l,subject:"Chart Export",keywords:"chart, taroviz, echarts"}),b=g?m.height:m.width,E=.6*b,x=g?m.height:m.width,w=g?m.width:m.height,I=d.top||40,C=d.left||40,p&&(y.setFontSize(16),y.setTextColor(51,51,51),y.text(c,C,I)),T=p?I+15:I,S=(x-b)/2,y.addImage(h,"PNG",S,T,b,E),k=w-d.bottom/2,y.setFontSize(10),y.setTextColor(153,153,153),y.text("Generated by TaroViz on ".concat((new Date).toLocaleDateString()),C,k),[2,{data:O=y.output("blob"),filename:_e(c.replace(/\s+/g,"_"),"pdf"),mimeType:"application/pdf",size:O.size}]}})})},e.exportBatch=function(e,t){return Be(this,void 0,Promise,function(){var n,r,o,a,i,c,s,l,u,d;return Ge(this,function(f){switch(f.label){case 0:n=t.format,r=t.filenamePrefix,o=t.compress,a=[],i=0,c=e,f.label=1;case 1:if(!(i<c.length))return[3,8];s=c[i],l=s.name,u=s.chart,f.label=2;case 2:return f.trys.push([2,6,,7]),d=void 0,"pdf"!==n?[3,4]:[4,this.exportPDF(u,{title:l})];case 3:return d=f.sent(),[3,5];case 4:d=this.exportImage(u,{type:n}),f.label=5;case 5:return o&&d.filename&&(d.filename=d.filename.replace(/\.(\w+)$/,".$1")),a.push(d),[3,7];case 6:return f.sent(),[3,7];case 7:return i++,[3,1];case 8:return[2,a]}})})},e.download=function(e){var t,n,r,o,a;t=e.data,n=e.filename,e.mimeType,r="string"==typeof t?Ve(t):t,o=URL.createObjectURL(r),(a=document.createElement("a")).href=o,a.download=n,a.style.display="none",document.body.appendChild(a),a.click(),setTimeout(function(){document.body.removeChild(a),URL.revokeObjectURL(o)},100)},e.copyToClipboard=function(e){return Be(this,arguments,Promise,function(e,t){var n,r,o;return void 0===t&&(t={}),Ge(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=this.exportImage(e,Ue(Ue({},t),{type:"png"})),r=Ve(n.data),[4,navigator.clipboard.write([new ClipboardItem((o={},o[r.type]=r,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 n=e.getWidth(),r=e.getHeight(),o=t/96;return{width:Math.round(n*o),height:Math.round(r*o)}},e}(),Ze=We;var qe=function(e,t,n,r){return new(n||(n=Promise))(function(o,a){function i(e){try{s(r.next(e))}catch(e){a(e)}}function c(e){try{s(r.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(i,c)}s((r=r.apply(e,t||[])).next())})},Je=function(e,t){var n,r,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=c(0),i.throw=c(1),i.return=c(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(s){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,s])}}},Ye=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};function Qe(e,t){var n=(0,a.useState)(null),r=n[0],o=n[1],i=(0,a.useState)(!1),s=i[0],l=i[1],u=(0,a.useRef)(t);return u.current=t,(0,a.useEffect)(function(){if(e.current&&!r){try{var t=(0,c.cK)(u.current||{});o(t),l(!0)}catch(e){}return function(){var e;if(r){try{var t=r;(null===(e=t.isDisposed)||void 0===e?void 0:e.call(t))||t.dispose()}catch(e){}o(null),l(!1)}}}},[e]),[r,o,s]}function Ke(e,t,n){var r=n||{},o=r.notMerge,i=void 0!==o&&o,c=r.lazyUpdate,s=void 0!==c&&c,l=r.replaceMerge,u=r.deps,d=void 0===u?[]:u;(0,a.useEffect)(function(){if(e&&t)try{e.setOption(t,i,s)}catch(e){}},Ye([e,t,i,s,l],d,!0))}function Xe(e,t){var n=t||{},r=n.delay,o=void 0===r?300:r,i=n.minWidth,c=n.minHeight,s=n.enabled,l=void 0===s||s,u=(0,a.useRef)();(0,a.useEffect)(function(){var t;if(e&&l){var n=function(){u.current&&clearTimeout(u.current),u.current=setTimeout(function(){var t,n;try{var r=null===(t=e.getDom)||void 0===t?void 0:t.call(e);if(r){var o=r.clientWidth,a=r.clientHeight;if(i&&o<i)return;if(c&&a<c)return}null===(n=e.resize)||void 0===n||n.call(e)}catch(e){}},o)};window.addEventListener("resize",n);var r=null===(t=e.getDom)||void 0===t?void 0:t.call(e);if(r&&"undefined"!=typeof ResizeObserver){var a=new ResizeObserver(n);return a.observe(r),function(){a.disconnect(),window.removeEventListener("resize",n),u.current&&clearTimeout(u.current)}}return function(){window.removeEventListener("resize",n),u.current&&clearTimeout(u.current)}}},[e,o,i,c,l])}function $e(e,t){(0,a.useEffect)(function(){if(e&&t){var n=Object.entries(t);return n.forEach(function(t){var n=t[0],r=t[1];try{e.on(n,r)}catch(e){}}),function(){n.forEach(function(t){var n=t[0],r=t[1];try{e.off(n,r)}catch(e){}})}}},[e,t])}function et(e,t,n){(0,a.useEffect)(function(){if(e)try{t?e.showLoading(n):e.hideLoading()}catch(e){}},[e,t,n])}function tt(e,t){return void 0===t&&(t=!1),(0,a.useMemo)(function(){if("string"==typeof e)try{return getTheme(e)||(t?"dark":e)}catch(n){return t?"dark":e}return e},[e,t])}function nt(e,t){return(0,a.useMemo)(function(){return e?t(e):{}},[e,t])}function rt(e){var t=e||{},n=t.breakpoints,r=void 0===n?{xs:0,sm:576,md:768,lg:992,xl:1200}:n,o=t.defaultBreakpoint,i=void 0===o?"md":o,c=(0,a.useState)(i),s=c[0],l=c[1],u=(0,a.useState)({width:0,height:0}),d=u[0],f=u[1];return(0,a.useEffect)(function(){var e=function(){var e=window.innerWidth;f({width:e,height:window.innerHeight});var t="xs";e>=r.xl?t="xl":e>=r.lg?t="lg":e>=r.md?t="md":e>=r.sm&&(t="sm"),l(t)};return e(),window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}},[r]),{breakpoint:s,windowSize:d}}function ot(e){void 0===e&&(e="default");var t=(0,a.useState)(e),n=t[0],r=t[1],o=(0,a.useState)(!1),i=o[0],c=o[1];return{theme:n,isDark:i,switchTheme:(0,a.useCallback)(function(e){r(e),"string"==typeof e&&c("dark"===e||e.includes("dark"))},[]),toggleDark:(0,a.useCallback)(function(){c(function(e){return!e}),r(function(e){return"dark"===e?"default":"dark"})},[]),setTheme:r}}function at(e,t){var n=this,r=t||{},o=r.interval,i=void 0===o?5e3:o,c=r.autoStart,s=void 0!==c&&c,l=r.retryCount,u=void 0===l?3:l,d=r.retryDelay,f=void 0===d?1e3:d,p=(0,a.useState)(null),h=p[0],v=p[1],m=(0,a.useState)(s),g=m[0],y=m[1],b=(0,a.useState)(null),E=b[0],x=b[1],w=(0,a.useRef)({cancelled:!1}),I=(0,a.useCallback)(function(){return qe(n,void 0,void 0,function(){var t,n,r,o;return Je(this,function(a){switch(a.label){case 0:w.current.cancelled=!0,w.current={cancelled:!1},t=w.current,n=u,y(!0),x(null),a.label=1;case 1:if(!(n>=0)||t.cancelled)return[3,9];a.label=2;case 2:return a.trys.push([2,4,,8]),[4,e()];case 3:return r=a.sent(),t.cancelled||(v(r),y(!1)),[2];case 4:return o=a.sent(),--n<0||t.cancelled?(t.cancelled||x(o),y(!1),[3,7]):[3,5];case 5:return[4,new Promise(function(e){return setTimeout(e,f)})];case 6:a.sent(),a.label=7;case 7:return[3,8];case 8:return[3,1];case 9:return[2]}})})},[e,u,f]);return(0,a.useEffect)(function(){if(s&&I(),i>0){var e=setInterval(I,i);return function(){clearInterval(e),w.current.cancelled=!0}}return function(){w.current.cancelled=!0}},[i,s,I]),{data:h,loading:g,error:E,refresh:(0,a.useCallback)(function(){I()},[I])}}function it(e){var t=(0,a.useState)(!1),n=t[0],r=t[1],o=(0,a.useCallback)(function(){e.current&&(n?document.exitFullscreen&&document.exitFullscreen():e.current.requestFullscreen&&e.current.requestFullscreen())},[e,n]);return(0,a.useEffect)(function(){var e=function(){r(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",e),function(){return document.removeEventListener("fullscreenchange",e)}},[]),{isFullscreen:n,toggle:o}}function ct(e){var t=e;return{exportImage:(0,a.useCallback)(function(e){var n;if(!t)return null;var r=e||{},o=r.type,a=void 0===o?"png":o,i=r.pixelRatio,c=void 0===i?2:i,s=r.backgroundColor;return null===(n=t.getDataURL)||void 0===n?void 0:n.call(t,{type:a,pixelRatio:c,backgroundColor:s})},[t]),exportSVG:(0,a.useCallback)(function(){var e;return t?null===(e=t.getSvgData)||void 0===e?void 0:e.call(t):null},[t]),exportCSV:(0,a.useCallback)(function(e){var n;return t?null===(n=t.getCompressedDataURL)||void 0===n?void 0:n.call(t,e):null},[t])}}function st(e){var t=e;return{getInstance:(0,a.useCallback)(function(){return e},[e]),clear:(0,a.useCallback)(function(){var e;null===(e=null==t?void 0:t.clear)||void 0===e||e.call(t)},[t]),repaint:(0,a.useCallback)(function(){var e;null===(e=null==t?void 0:t.resize)||void 0===e||e.call(t)},[t]),dispatchAction:(0,a.useCallback)(function(e){var n;null===(n=null==t?void 0:t.dispatchAction)||void 0===n||n.call(t,e)},[t]),showTip:(0,a.useCallback)(function(e,n){var r;null===(r=null==t?void 0:t.dispatchAction)||void 0===r||r.call(t,{type:"showTip",seriesIndex:e,dataIndex:n})},[t]),hideTip:(0,a.useCallback)(function(){var e;null===(e=null==t?void 0:t.dispatchAction)||void 0===e||e.call(t,{type:"hideTip"})},[t]),zoom:(0,a.useCallback)(function(e,n){var r;null===(r=null==t?void 0:t.dispatchAction)||void 0===r||r.call(t,{type:"dataZoom",start:null!=e?e:0,end:null!=n?n:100})},[t])}}var lt="taroviz",ut="1.2.1";module.exports=r})();
|
|
1
|
+
(()=>{"use strict";var e={219(e,t,r){r.d(t,{D:()=>n});var n=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}()},123(e,t,r){r.r(t),r.d(t,{default:()=>l});var n=r(163),o=r(348),a=r(613),i=r(15),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)};o.use([n.GridComponent,n.TooltipComponent,n.TitleComponent,n.LegendComponent,a.CanvasRenderer,a.SVGRenderer]);const l=function(){function e(e){this.instance=null,this.containerRef=null,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,r;if(this.instance)return this.instance;var n=(null===(t=this.containerRef)||void 0===t?void 0:t.current)||document.getElementById(this.canvasId);if(!n)throw new Error("[TaroViz] H5Adapter: container not found (canvasId: ".concat(this.canvasId,")"));return this.instance=o.init(n,this.options.theme,{useDirtyRect:!0,renderer:this.options.renderer||"canvas"}),this.instance&&this.instance.setOption({animation:!1!==(null===(r=this.options.option)||void 0===r?void 0:r.animation),animationDurationUpdate:300,animationEasingUpdate:"cubicOut",progressive:500,progressiveThreshold:1e3},!0),this.options.option&&this.instance&&this.instance.setOption(this.options.option,{notMerge:!1,lazyUpdate:!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){this.instance?this.instance.setOption(e,c({lazyUpdate:!0},t)):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;return(null===(e=this.containerRef)||void 0===e?void 0:e.current)||null},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,l=void 0===a?{}:a,s=e.direction,u=void 0===s?"ltr":s;return i.createElement("div",{id:this.canvasId,ref:this.containerRef,style:c({width:r,height:o,direction:u},l)})},e.prototype.dispose=function(){this.instance&&(this.instance.dispose(),this.instance=null)},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:window.devicePixelRatio}},e}()},382(e,t,r){r.r(t),r.d(t,{default:()=>a});var n=r(15),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)};const a=function(){function e(e){this.chartInstance=null,this.component=null,this.config=e,this.component=e.component}return e.create=function(t){return new e(t)},e.prototype.getInstance=function(){return this.chartInstance},e.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.component.createChart({id:t,width:r,height:n,theme:o});return a&&i.setOption(a),this.chartInstance=i,this.config.onInit&&this.config.onInit(i),i},e.prototype.setOption=function(e,t){this.chartInstance?this.chartInstance.setOption(e,t):this.config.option=e},e.prototype.setTheme=function(e){var t,r;this.config.theme=e,this.chartInstance&&(null===(r=(t=this.chartInstance).setTheme)||void 0===r||r.call(t,e))},e.prototype.getWidth=function(){return 0},e.prototype.getHeight=function(){return 0},e.prototype.getDom=function(){return null},e.prototype.convertToDataURL=function(e){var t;return null===(t=this.chartInstance)||void 0===t?void 0:t.getDataURL(e)},e.prototype.clear=function(){this.chartInstance&&this.chartInstance.clear()},e.prototype.on=function(e,t){this.chartInstance&&this.chartInstance.on(e,t)},e.prototype.off=function(e,t){this.chartInstance&&this.chartInstance.off(e,t)},e.prototype.showLoading=function(e){this.chartInstance&&this.chartInstance.showLoading(e)},e.prototype.hideLoading=function(){this.chartInstance&&this.chartInstance.hideLoading()},e.prototype.dispose=function(){this.chartInstance&&(this.chartInstance.dispose(),this.chartInstance=null)},e.prototype.resize=function(e){this.chartInstance&&this.chartInstance.resize(e)},e.prototype.setComponent=function(e){this.component=e},e.prototype.render=function(){var e=this.config,t=e.canvasId,r=void 0===t?"ec-canvas":t,a=e.width,i=void 0===a?"100%":a,c=e.height,l=void 0===c?"300px":c,s=e.style,u=void 0===s?{}:s;return n.createElement("view",{id:r,style:o({width:i,height:l},u)})},e.prototype.dispatchAction=function(e){this.chartInstance&&this.chartInstance.dispatchAction(e)},e.prototype.getDataURL=function(e){var t;return null===(t=this.chartInstance)||void 0===t?void 0:t.getDataURL(e)},e}()},574(e,t,r){var n,o;r.d(t,{li:()=>s,cK:()=>d,_$:()=>u}),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={})),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"}(o||(o={}));r(251),r(524),r(930),r(123),r(999),r(85),r(280),r(382);var a,i=function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function c(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(i,c)}l((n=n.apply(e,t||[])).next())})},c=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=c(0),i.throw=c(1),i.return=c(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(l){return function(c){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,n=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,l])}}},l=((a={})[o.H5]={name:"H5"},a[o.WEAPP]={name:"Wechat",requireComponent:!0},a[o.ALIPAY]={name:"Alipay",requireComponent:!0},a[o.SWAN]={name:"Baidu",requireComponent:!0},a[o.TT]={name:"ByteDance",requireComponent:!0},a[o.QQ]={name:"QQ",requireComponent:!0},a[o.JD]={name:"JD",requireComponent:!0},a[o.DD]={name:"DingTalk",requireComponent:!0},a[o.QYWX]={name:"QiyeWechat"},a[o.LARK]={name:"Lark"},a[o.KWAI]={name:"Kwai",requireComponent:!0},a[o.HARMONY]={name:"HarmonyOS",requireComponent:!0},a);function s(){if("undefined"==typeof window)return o.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:o.WEAPP},{test:function(){var t;return!!(null===(t=e.my)||void 0===t?void 0:t.getSystemInfoSync)},platform:o.ALIPAY},{test:function(){var t;return!!(null===(t=e.swan)||void 0===t?void 0:t.getSystemInfoSync)},platform:o.SWAN},{test:function(){var t;return!!(null===(t=e.tt)||void 0===t?void 0:t.getSystemInfoSync)},platform:o.TT},{test:function(){var t;return!!(null===(t=e.qq)||void 0===t?void 0:t.getSystemInfoSync)},platform:o.QQ},{test:function(){var t;return!!(null===(t=e.jd)||void 0===t?void 0:t.getSystemInfoSync)},platform:o.JD},{test:function(){var t;return!!(null===(t=e.dd)||void 0===t?void 0:t.getSystemInfoSync)},platform:o.DD},{test:function(){var t;return!!(null===(t=e.wx)||void 0===t?void 0:t.qy)},platform:o.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:o.LARK},{test:function(){return navigator.userAgent.includes("HarmonyOS")},platform:o.HARMONY}],r=0,n=t;r<n.length;r++){var a=n[r];if(a.test())return a.platform}return o.H5}function u(){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 d(e){return i(this,void 0,Promise,function(){var t,n;return c(this,function(a){switch(a.label){case 0:t=s(),null==(n=l[t])||n.requireComponent,a.label=1;case 1:switch(a.trys.push([1,15,,17]),t){case o.H5:case o.ALIPAY:case o.QQ:case o.JD:case o.DD:case o.QYWX:case o.LARK:case o.KWAI:return[3,2];case o.WEAPP:return[3,4];case o.SWAN:return[3,6];case o.TT:return[3,8];case o.HARMONY:return[3,10]}return[3,12];case 2:return[4,Promise.resolve().then(r.bind(r,123))];case 3:return[2,a.sent().default.create(e)];case 4:return[4,Promise.resolve().then(r.bind(r,999))];case 5:return[2,a.sent().default.create(e)];case 6:return[4,Promise.resolve().then(r.bind(r,85))];case 7:return[2,a.sent().default.create(e)];case 8:return[4,Promise.resolve().then(r.bind(r,280))];case 9:return[2,a.sent().default.create(e)];case 10:return[4,Promise.resolve().then(r.bind(r,382))];case 11:return[2,a.sent().default.create(e)];case 12:return[4,Promise.resolve().then(r.bind(r,123))];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,123))];case 16:return[2,a.sent().default.create(e)];case 17:return[2]}})})}},85(e,t,r){r.r(t),r.d(t,{SwanAdapter:()=>i,default:()=>c});var n,o=r(219),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.create=function(e){return new t(e)},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.component.createChart({id:t,width:r,height:n,theme:o});a&&i.setOption(a),this.chartInstance=i;var c=this.config.onInit;return c&&c(i),i},t.prototype.getWidth=function(){return this.parseSize(this.config.width,300)},t.prototype.getHeight=function(){return this.parseSize(this.config.height,300)},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.D);const c=i},280(e,t,r){r.r(t),r.d(t,{TTAdapter:()=>i,default:()=>c});var n,o=r(219),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.create=function(e){return new t(e)},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.component.createChart({id:t,width:r,height:n,theme:o});a&&i.setOption(a),this.chartInstance=i;var c=this.config.onInit;return c&&c(i),i},t.prototype.getWidth=function(){return this.parseSize(this.config.width,300)},t.prototype.getHeight=function(){return this.parseSize(this.config.height,300)},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.D);const c=i},999(e,t,r){r.r(t),r.d(t,{WeappAdapter:()=>i,default:()=>c});var n,o=r(219),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.create=function(e){return new t(e)},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.component.createChart({id:t,width:r,height:n,theme:o});a&&i.setOption(a),this.chartInstance=i;var c=this.config.onInit;return c&&c(i),i},t.prototype.getWidth=function(){return this.parseSize(this.config.width,300)},t.prototype.getHeight=function(){return this.parseSize(this.config.height,300)},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.D);const c=i},188(e,t,r){r.r(t),r.d(t,{default:()=>l});var n=r(15),o=r.n(n),a=r(412),i=(r(930),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)}),c=(0,n.memo)(function(e){return o().createElement(a.A,i({},e,{chartType:"bar-chart"}))});c.displayName="BarChart";const l=c},412(e,t,r){r.d(t,{A:()=>f});var n=r(15),o=r.n(n),a=r(574),i=r(524),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 l(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=c({},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)},u=function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function c(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(i,c)}l((n=n.apply(e,t||[])).next())})},d=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=c(0),i.throw=c(1),i.return=c(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(l){return function(c){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,n=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,l])}}};const f=function(e){var t=e.option,r=e.width,c=void 0===r?"100%":r,f=e.height,p=void 0===f?"300px":f,h=e.theme,v=e.style,m=void 0===v?{}:v,g=e.className,y=void 0===g?"":g,b=e.autoResize,x=void 0===b||b,E=e.loading,C=void 0!==E&&E,w=e.loadingOption,I=e.onChartInit,S=e.onChartReady,T=e.renderer,k=void 0===T?"canvas":T,O=e.onEvents,A=void 0===O?{}:O,D=e.chartType,P=void 0===D?"chart":D,R=(0,n.useRef)("".concat(P,"-").concat((0,i.uR)())),M=(0,n.useRef)(null),N=(0,n.useRef)(null),z=(0,n.useMemo)(function(){return l({canvasId:R.current,containerRef:N,width:c,height:p,theme:h,autoResize:x,renderer:k,option:t})},[c,p,h,x,k,t]);(0,n.useEffect)(function(){var e=u(void 0,void 0,void 0,function(){var e;return d(this,function(t){switch(t.label){case 0:return e=l(s(s({},z),{onInit:function(e){M.current=e,A&&Object.keys(A).forEach(function(t){e.on(t,A[t])}),I&&I(e),S&&S(e)}})),[4,(0,a.cK)(e)];case 1:return t.sent().init(),[2,function(){M.current&&(A&&Object.keys(A).forEach(function(e){var t;null===(t=M.current)||void 0===t||t.off(e)}),M.current.dispose(),M.current=null)}]}})});return function(){e.then(function(e){return null==e?void 0:e()})}},[z,I,S,A]),(0,n.useEffect)(function(){M.current&&t&&M.current.setOption(t,!0)},[t]),(0,n.useEffect)(function(){M.current&&(C?M.current.showLoading(w):M.current.hideLoading())},[C,w]);var L=s({width:"number"==typeof c?"".concat(c,"px"):c,height:"number"==typeof p?"".concat(p,"px"):p},m);return o().createElement("div",{className:"taroviz-".concat(P," ").concat(y),style:L,ref:N})}},133(e,t,r){r.r(t),r.d(t,{default:()=>l});var n=r(15),o=r.n(n),a=r(412),i=(r(930),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)}),c=(0,n.memo)(function(e){return o().createElement(a.A,i({},e,{chartType:"funnel-chart"}))});c.displayName="FunnelChart";const l=c},334(e,t,r){r.r(t),r.d(t,{default:()=>l});var n=r(15),o=r.n(n),a=r(412),i=(r(930),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)}),c=(0,n.memo)(function(e){return o().createElement(a.A,i({},e,{chartType:"gauge-chart"}))});c.displayName="GaugeChart";const l=c},835(e,t,r){r.r(t),r.d(t,{default:()=>l});var n=r(15),o=r.n(n),a=r(412),i=(r(930),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)}),c=(0,n.memo)(function(e){return o().createElement(a.A,i({},e,{chartType:"heatmap-chart"}))});c.displayName="HeatmapChart";const l=c},127(e,t,r){r.r(t),r.d(t,{default:()=>l});var n=r(15),o=r.n(n),a=r(412),i=(r(930),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)}),c=(0,n.memo)(function(e){return o().createElement(a.A,i({},e,{chartType:"line-chart"}))});c.displayName="LineChart";const l=c},481(e,t,r){r.r(t),r.d(t,{default:()=>l});var n=r(15),o=r.n(n),a=r(412),i=(r(930),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)}),c=(0,n.memo)(function(e){return o().createElement(a.A,i({},e,{chartType:"pie-chart"}))});c.displayName="PieChart";const l=c},443(e,t,r){r.r(t),r.d(t,{default:()=>l});var n=r(15),o=r.n(n),a=r(412),i=(r(930),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)}),c=(0,n.memo)(function(e){return o().createElement(a.A,i({},e,{chartType:"radar-chart"}))});c.displayName="RadarChart";const l=c},490(e,t,r){r.r(t),r.d(t,{default:()=>l});var n=r(15),o=r.n(n),a=r(412),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)},c=(0,n.memo)(function(e){return o().createElement(a.A,i({},e,{chartType:"sankey-chart"}))});c.displayName="SankeyChart";const l=c},589(e,t,r){r.r(t),r.d(t,{default:()=>l});var n=r(15),o=r.n(n),a=r(412),i=(r(930),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)}),c=(0,n.memo)(function(e){return o().createElement(a.A,i({},e,{chartType:"scatter-chart"}))});c.displayName="ScatterChart";const l=c},673(e,t,r){r.r(t),r.d(t,{default:()=>l});var n=r(15),o=r.n(n),a=r(412),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)},c=(0,n.memo)(function(e){return o().createElement(a.A,i({},e,{chartType:"sunburst-chart"}))});c.displayName="SunburstChart";const l=c},37(e,t,r){r.r(t),r.d(t,{default:()=>l});var n=r(15),o=r.n(n),a=r(412),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)},c=(0,n.memo)(function(e){return o().createElement(a.A,i({},e,{chartType:"treemap-chart"}))});c.displayName="TreeMapChart";const l=c},251(e,t,r){var n;r.d(t,{ek:()=>c}),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:"默认动画配置",config:{enabled:!0,duration:1e3,easing:"cubicOut",appearDuration:1200,appearEasing:"cubicOut",updateDuration:800,updateEasing:"cubicOut",disappearDuration:600,disappearEasing:"cubicIn",threshold:1e3,progressive:!0,progressiveStep:500}},{name:"fast",description:"快速动画配置",config:{enabled:!0,duration:500,easing:"linear",appearDuration:600,appearEasing:"linear",updateDuration:400,updateEasing:"linear",disappearDuration:300,disappearEasing:"linear",threshold:2e3,progressive:!0,progressiveStep:1e3}},{name:"slow",description:"慢速动画配置",config:{enabled:!0,duration:2e3,easing:"cubicInOut",appearDuration:2400,appearEasing:"cubicInOut",updateDuration:1600,updateEasing:"cubicInOut",disappearDuration:1200,disappearEasing:"cubicInOut",threshold:500,progressive:!0,progressiveStep:250}},{name:"bounce",description:"弹跳动画配置",config:{enabled:!0,duration:1500,easing:"bounceOut",appearDuration:1800,appearEasing:"bounceOut",updateDuration:1200,updateEasing:"bounceOut",disappearDuration:900,disappearEasing:"bounceIn",threshold:500,progressive:!0,progressiveStep:250}},{name:"elastic",description:"弹性动画配置",config:{enabled:!0,duration:1500,easing:"elasticOut",appearDuration:1800,appearEasing:"elasticOut",updateDuration:1200,updateEasing:"elasticOut",disappearDuration:900,disappearEasing:"elasticIn",threshold:500,progressive:!0,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 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 c(e,t){return void 0===e&&(e={}),void 0===t&&(t=0),i.getInstance().generateEChartsAnimationConfig(e,t)}i.getInstance()},930(e,t,r){var n=r(348);const o=require("echarts/charts");var a=r(163),i=r(613),c=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))};n.use(i.CanvasRenderer);var l=[o.PieChart,o.LineChart,o.BarChart,o.GaugeChart,o.ScatterChart,o.RadarChart,o.HeatmapChart,o.FunnelChart],s=[a.TitleComponent,a.TooltipComponent,a.LegendComponent,a.GridComponent,a.DataZoomComponent,a.VisualMapComponent];n.use(c(c([],l,!0),s,!0))},524(e,t,r){r.d(t,{sg:()=>x,$N:()=>b,AZ:()=>y,ZV:()=>w,w5:()=>I,uc:()=>C,t2:()=>m,m_:()=>v,nF:()=>E,uR:()=>h});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,c=void 0===i?"Asia/Shanghai":i,l=o(t,["locale","timeZone"]),s="string"==typeof e||"number"==typeof e?new Date(e):e;return new Intl.DateTimeFormat(a,n({timeZone:c},l)).format(s)}function i(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}))}function c(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"}))}function l(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,c=t.digits,l=void 0===c?2:c,s=t.useGrouping,u=void 0===s||s;return new Intl.NumberFormat(n,{style:"currency",currency:o,currencyDisplay:i,minimumFractionDigits:l,maximumFractionDigits:l,useGrouping:u}).format(e)}function s(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,c=void 0===i||i;return new Intl.NumberFormat(n,{style:"percent",minimumFractionDigits:a,maximumFractionDigits:a,useGrouping:c}).format(e)}function u(e,t){void 0===t&&(t={});var r=t.locale,a=void 0===r?"zh-CN":r,i=t.digits,c=void 0===i?2:i,l=t.useGrouping,s=void 0===l||l,u=o(t,["locale","digits","useGrouping"]);return new Intl.NumberFormat(a,n({minimumFractionDigits:c,maximumFractionDigits:c,useGrouping:s},u)).format(e)}function d(){return"undefined"!=typeof window&&window.navigator.language||"zh-CN"}function f(){return Intl.DateTimeFormat().resolvedOptions().timeZone}var p=function(){function e(e){void 0===e&&(e={}),this.locale=e.locale||d(),this.timeZone=e.timeZone||f()}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={}),i(e,n(n({},t),{locale:this.locale,timeZone:this.timeZone}))},e.prototype.formatTime=function(e,t){return void 0===t&&(t={}),c(e,n(n({},t),{locale:this.locale,timeZone:this.timeZone}))},e.prototype.formatCurrency=function(e,t){return l(e,n(n({},t),{locale:this.locale}))},e.prototype.formatPercent=function(e,t){return void 0===t&&(t={}),s(e,n(n({},t),{locale:this.locale}))},e.prototype.formatNumber=function(e,t){return void 0===t&&(t={}),u(e,n(n({},t),{locale:this.locale}))},e}();new p;function h(){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 v(){return Math.random().toString(36).substring(2,10)}function m(e){return"".concat(e,"-").concat(v())}var g=function(){return g=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},g.apply(this,arguments)},y={click:"click",mousemove:"mousemove",mouseup:"mouseup",mousedown:"mousedown",mouseover:"mouseover",mouseout:"mouseout",globalout:"globalout"};function b(e,t){var r=g({},e);return Object.keys(t).forEach(function(n){t[n]instanceof Object&&n in e&&e[n]instanceof Object?r[n]=b(e[n],t[n]):r[n]=t[n]}),r}function x(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.apply(n,o),r=null},t)}}function E(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.apply(this,n),r=a)}}function C(){var e="undefined"==typeof window,t=!e,r=void 0!==window.wx&&"function"==typeof window.wx.getSystemInfoSync,n=void 0!==window.my&&"function"==typeof window.my.getSystemInfoSync;return{isServer:e,isClient:t,isWeapp:r,isAlipay:n,isWeb:t&&!r&&!n}}function w(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 I(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"}},163(e){e.exports=require("echarts/components")},348(e){e.exports=require("echarts/core")},613(e){e.exports=require("echarts/renderers")},15(e){e.exports=require("react")}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};r.r(n),r.d(n,{AnnotationPresets:()=>Xe,BarChart:()=>k.default,BaseChart:()=>I,CandlestickChart:()=>_,ErrorBoundary:()=>Se,FunnelChart:()=>M.default,GaugeChart:()=>R.default,GraphChart:()=>H,H5Adapter:()=>q.default,HeatmapChart:()=>P.default,LazyChartRegistry:()=>qe,LineChart:()=>T.default,PRESET_THEMES:()=>ge,PieChart:()=>O.default,RadarChart:()=>D.default,SankeyChart:()=>L.default,ScatterChart:()=>A.default,SunburstChart:()=>z.default,ThemeEditor:()=>Ee,TreeMapChart:()=>N.default,WeappAdapter:()=>Y.default,WordCloudChart:()=>V,convertAnnotationToMarkArea:()=>Je,convertAnnotationToMarkLine:()=>Ye,convertAnnotationToScatter:()=>Qe,createCompositeAnnotation:()=>$e,createLazyChart:()=>Ze,darkTheme:()=>X,debounce:()=>S.sg,deepMerge:()=>S.$N,defaultTheme:()=>K,detectPlatform:()=>Z.li,events:()=>S.AZ,exportChart:()=>it,formatNumber:()=>S.ZV,getAdapter:()=>Z.cK,getContrastColor:()=>S.w5,getDarkThemes:()=>he,getEnv:()=>Z._$,getEnvironment:()=>S.uc,getLightThemes:()=>pe,getRegisteredThemes:()=>se,getTheme:()=>ce,getThemeByName:()=>ue,getThemesByTag:()=>fe,name:()=>At,prefixedId:()=>S.t2,preloadAllCharts:()=>Ve,preloadChart:()=>We,registerTheme:()=>le,shortId:()=>S.m_,switchTheme:()=>de,themeManager:()=>ye,throttle:()=>S.nF,useAnnotation:()=>Ke,useChart:()=>mt,useChartData:()=>Ct,useChartTheme:()=>Et,useChartTools:()=>Ot,useDataPolling:()=>St,useDataTransform:()=>st,useEvents:()=>bt,useExport:()=>kt,useFullscreen:()=>Tt,useLoading:()=>xt,useOption:()=>gt,useResize:()=>yt,useResponsive:()=>wt,useTableTransform:()=>ut,useThemeSwitcher:()=>It,useTimeSeriesTransform:()=>dt,uuid:()=>S.uR,version:()=>Dt,withErrorBoundary:()=>Te,withLazyLoad:()=>Ge});var o,a=r(15),i=r.n(a),c=r(251),l={};function s(e){return l[e]}!function(e){e.PANEL_SHOW="debugPanelShow",e.PANEL_HIDE="debugPanelHide",e.TAB_CHANGE="debugPanelTabChange",e.INFO_UPDATE="debugPanelInfoUpdate"}(o||(o={}));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(e){var t=e.debugInfo,r=e.options,n=void 0===r?{}:r,c=e.onEvent,l=(0,a.useState)(n.autoExpand||!1),s=l[0],d=l[1],p=(0,a.useState)(n.defaultTab||"instance"),h=p[0],v=p[1],m=(0,a.useRef)(null),g=n.position,y=void 0===g?"bottom-right":g,b=n.width,x=void 0===b?400:b,E=n.height,C=void 0===E?300:E,w=function(e){v(e),null==c||c({type:o.TAB_CHANGE,data:{tab:e}})},I=function(){var e=t.instance;return i().createElement("div",{style:f.debugPanelContent},i().createElement("h3",{style:f.h3},"图表实例信息"),i().createElement("div",{style:f.debugInfoGrid},i().createElement("div",{style:f.debugInfoItem},i().createElement("span",{style:f.debugInfoLabel},"ID:"),i().createElement("span",{style:f.debugInfoValue},(null==e?void 0:e.id)||"N/A")),i().createElement("div",{style:f.debugInfoItem},i().createElement("span",{style:f.debugInfoLabel},"类型:"),i().createElement("span",{style:f.debugInfoValue},(null==e?void 0:e.type)||"N/A")),i().createElement("div",{style:f.debugInfoItem},i().createElement("span",{style:f.debugInfoLabel},"版本:"),i().createElement("span",{style:f.debugInfoValue},(null==e?void 0:e.version)||"N/A")),i().createElement("div",{style:f.debugInfoItem},i().createElement("span",{style:f.debugInfoLabel},"渲染器:"),i().createElement("span",{style:f.debugInfoValue},(null==e?void 0:e.renderer)||"N/A")),i().createElement("div",{style:f.debugInfoItem},i().createElement("span",{style:f.debugInfoLabel},"宽度:"),i().createElement("span",{style:f.debugInfoValue},(null==e?void 0:e.width)||"N/A","px")),i().createElement("div",{style:f.debugInfoItem},i().createElement("span",{style:f.debugInfoLabel},"高度:"),i().createElement("span",{style:f.debugInfoValue},(null==e?void 0:e.height)||"N/A","px")),i().createElement("div",{style:f.debugInfoItem},i().createElement("span",{style:f.debugInfoLabel},"平台:"),i().createElement("span",{style:f.debugInfoValue},(null==e?void 0:e.platform)||"N/A"))))},S=function(){var e=t.config;return i().createElement("div",{style:f.debugPanelContent},i().createElement("h3",{style:f.h3},"配置信息"),i().createElement("div",{style:f.debugConfig},i().createElement("pre",{style:f.pre},JSON.stringify(e,null,2))))},T=function(){var e,r,n=t.data;return i().createElement("div",{style:f.debugPanelContent},i().createElement("h3",{style:f.h3},"数据信息"),i().createElement("div",{style:f.debugInfoGrid},i().createElement("div",{style:f.debugInfoItem},i().createElement("span",{style:f.debugInfoLabel},"系列数量:"),i().createElement("span",{style:f.debugInfoValue},(null===(e=null==n?void 0:n.series)||void 0===e?void 0:e.length)||0)),i().createElement("div",{style:f.debugInfoItem},i().createElement("span",{style:f.debugInfoLabel},"总数据量:"),i().createElement("span",{style:f.debugInfoValue},(null==n?void 0:n.totalDataCount)||0)),i().createElement("div",{style:f.debugInfoItem},i().createElement("span",{style:f.debugInfoLabel},"当前数据量:"),i().createElement("span",{style:f.debugInfoValue},(null==n?void 0:n.currentDataCount)||0))),i().createElement("div",{style:f.debugDataSeries},i().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;return i().createElement("div",{key:t,style:f.debugDataSeriesItem},i().createElement("h5",{style:f.h5},"系列 ",t+1,": ",e.name||"未命名"),i().createElement("pre",{style:f.pre},JSON.stringify(null===(r=e.data)||void 0===r?void 0:r.slice(0,5),null,2),"..."),i().createElement("div",{style:f.debugSeriesInfo},i().createElement("span",null,"数据量: ",(null===(n=e.data)||void 0===n?void 0:n.length)||0)))})))},k=function(){var e=t.performance;return i().createElement("div",{style:f.debugPanelContent},i().createElement("h3",{style:f.h3},"性能信息"),i().createElement("div",{style:f.debugInfoGrid},i().createElement("div",{style:f.debugInfoItem},i().createElement("span",{style:f.debugInfoLabel},"初始化时间:"),i().createElement("span",{style:f.debugInfoValue},(null==e?void 0:e.initTime)||0,"ms")),i().createElement("div",{style:f.debugInfoItem},i().createElement("span",{style:f.debugInfoLabel},"渲染时间:"),i().createElement("span",{style:f.debugInfoValue},(null==e?void 0:e.renderTime)||0,"ms")),i().createElement("div",{style:f.debugInfoItem},i().createElement("span",{style:f.debugInfoLabel},"更新时间:"),i().createElement("span",{style:f.debugInfoValue},(null==e?void 0:e.updateTime)||0,"ms")),i().createElement("div",{style:f.debugInfoItem},i().createElement("span",{style:f.debugInfoLabel},"数据大小:"),i().createElement("span",{style:f.debugInfoValue},(null==e?void 0:e.dataSize)||0," bytes")),i().createElement("div",{style:f.debugInfoItem},i().createElement("span",{style:f.debugInfoLabel},"帧率:"),i().createElement("span",{style:f.debugInfoValue},(null==e?void 0:e.frameRate)||0," FPS"))),i().createElement("div",{style:f.debugPerformanceChart}))},O=function(){var e=t.events;return i().createElement("div",{style:f.debugPanelContent},i().createElement("h3",{style:f.h3},"事件信息"),i().createElement("div",{style:f.debugEventsList},null==e?void 0:e.slice().reverse().map(function(e,t){return i().createElement("div",{key:t,style:f.debugEventItem},i().createElement("div",{style:f.debugEventHeader},i().createElement("span",{style:f.debugEventType},e.type),i().createElement("span",{style:f.debugEventTime},new Date(e.timestamp).toLocaleTimeString())),i().createElement("div",{style:f.debugEventParams},i().createElement("pre",{style:f.pre},JSON.stringify(e.params,null,2))))}),(!e||0===e.length)&&i().createElement("div",{style:f.debugEmptyState},"暂无事件记录")))},A=function(){var e=t.errors;return i().createElement("div",{style:f.debugPanelContent},i().createElement("h3",{style:f.h3},"错误信息"),i().createElement("div",{style:f.debugErrorsList},null==e?void 0:e.slice().reverse().map(function(e,t){return i().createElement("div",{key:t,style:f.debugErrorItem},i().createElement("div",{style:f.debugErrorHeader},i().createElement("span",{style:f.debugErrorType},e.type),i().createElement("span",{style:f.debugErrorTime},new Date(e.timestamp).toLocaleTimeString())),i().createElement("div",{style:f.debugErrorMessage},e.message),e.stack&&i().createElement("div",{style:f.debugErrorStack},i().createElement("pre",{style:f.pre},e.stack)))}),(!e||0===e.length)&&i().createElement("div",{style:f.debugEmptyState},"暂无错误记录")))},D=function(){return i().createElement("div",{style:f.debugPanelContent},i().createElement("h3",{style:f.h3},"调试工具"),i().createElement("div",{style:f.debugToolsGrid},i().createElement("button",{style:f.debugToolButton},"导出配置"),i().createElement("button",{style:f.debugToolButton},"导出数据"),i().createElement("button",{style:f.debugToolButton},"刷新图表"),i().createElement("button",{style:f.debugToolButton},"清空数据"),i().createElement("button",{style:f.debugToolButton},"性能分析"),i().createElement("button",{style:f.debugToolButton},"重置图表")))},P=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:C}),f.tarovizDebugPanel);return i().createElement("div",{ref:m,style:P},i().createElement("div",{style:f.debugPanelHeader},i().createElement("div",{style:f.debugPanelTitle},i().createElement("span",{style:f.debugPanelLogo},"🐛"),i().createElement("span",null,"TaroViz Debug Panel")),i().createElement("button",{style:f.debugPanelToggle,onClick:function(){var e=!s;d(e),null==c||c({type:e?o.PANEL_SHOW:o.PANEL_HIDE})},title:s?"收起":"展开"},s?"▼":"▶")),s&&i().createElement(i().Fragment,null,i().createElement("div",{style:f.debugPanelTabs},i().createElement("button",{style:u(u({},f.debugTab),"instance"===h&&f.debugTabActive),onClick:function(){return w("instance")},title:"实例信息"},"实例"),i().createElement("button",{style:u(u({},f.debugTab),"config"===h&&f.debugTabActive),onClick:function(){return w("config")},title:"配置信息"},"配置"),i().createElement("button",{style:u(u({},f.debugTab),"data"===h&&f.debugTabActive),onClick:function(){return w("data")},title:"数据信息"},"数据"),i().createElement("button",{style:u(u({},f.debugTab),"performance"===h&&f.debugTabActive),onClick:function(){return w("performance")},title:"性能信息"},"性能"),i().createElement("button",{style:u(u({},f.debugTab),"events"===h&&f.debugTabActive),onClick:function(){return w("events")},title:"事件信息"},"事件"),i().createElement("button",{style:u(u({},f.debugTab),"errors"===h&&f.debugTabActive),onClick:function(){return w("errors")},title:"错误信息"},"错误"),i().createElement("button",{style:u(u({},f.debugTab),"tools"===h&&f.debugTabActive),onClick:function(){return w("tools")},title:"调试工具"},"工具")),i().createElement("div",{style:f.debugPanelBody},function(){switch(h){case"instance":return I();case"config":return S();case"data":return T();case"performance":return k();case"events":return O();case"errors":return A();case"tools":return D();default:return i().createElement("div",null,"未知标签页")}}())))},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"}};var p,h=function(){return h=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},h.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))},m=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=h(h({},this.debugInfo),e),this.emitEvent(o.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(o.INFO_UPDATE,{info:this.debugInfo})}},e.prototype.addError=function(e,t,r){if(this.isEnabled){var n={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),[n],!1),this.emitEvent(o.INFO_UPDATE,{info:this.debugInfo})}},e.prototype.clear=function(){this.debugInfo={instance:{},config:{},data:{series:[],totalDataCount:0,currentDataCount:0},performance:{},events:[],errors:[]},this.emitEvent(o.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"}(p||(p={}));var g=function(){return g=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},g.apply(this,arguments)},y=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))},b=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=g({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 e.instance||(e.instance=new e(t)),e.instance},e.resetInstance=function(){e.instance&&(e.instance.stop(),e.instance=null)},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);null==r||r.forEach(function(r){try{r({type:e,data:t})}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(p.MONITORING_START))},e.prototype.stop=function(){this.isMonitoring&&(this.isMonitoring=!1,this.sampleIntervalId&&(clearInterval(this.sampleIntervalId),this.sampleIntervalId=null),this.stopFrameRateMonitoring(),this.emit(p.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;if(this.isMonitoring){if((null===(e=this.config.metrics)||void 0===e?void 0:e.includes("frameRate"))&&this.frameRateHistory.length>0){var r=this.frameRateHistory.reduce(function(e,t){return e+t},0)/this.frameRateHistory.length;this.recordMetric("frameRate",r,"FPS")}if((null===(t=this.config.metrics)||void 0===t?void 0:t.includes("memoryUsage"))&&void 0!==performance.memory){var n=(performance.memory.usedJSHeapSize/1048576).toFixed(2);this.recordMetric("memoryUsage",parseFloat(n),"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(p.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]=y([],a,!0);var c=a.reduce(function(e,t){return e+t.value},0);e[i]=parseFloat((c/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}))}}),e.renderTime>100&&(a-=20,i.push("渲染时间过长,建议优化数据处理或减少图表复杂度")),e.updateTime>50&&(a-=15,i.push("更新时间过长,建议优化数据更新逻辑")),e.frameRate<30&&(a-=25,i.push("帧率过低,建议减少动画效果或优化渲染逻辑")),e.dataSize>100&&(a-=10,i.push("数据量过大,建议进行数据压缩或分页处理")),a=Math.max(0,Math.min(100,a));var c={averages:e,maxValues:t,minValues:r,trends:n,score:a,suggestions:i,totalSamples:o,duration:Date.now()-this.startTime};return this.emit(p.ANALYSIS_COMPLETE,c),c},e.prototype.generateReport=function(e){void 0===e&&(e={});var t=this.analyze(),r=g({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 g({},this.config)},e.prototype.updateConfig=function(e){this.config=g(g({},this.config),e)},e.prototype.getAllMetrics=function(){return new Map(this.metrics)},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}();b.getInstance();function x(e,t){return void 0===e?t:"number"==typeof e?"".concat(e,"px"):e}function E(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}var C=r(412),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)};const I=function(e){var t=e.chartId,r=e.option,n=e.animation,o=e.debug,u=e.width,f=void 0===u?"100%":u,p=e.height,h=void 0===p?"300px":p,v=e.theme,g=e.autoResize,y=void 0===g||g,I=e.direction,S=void 0===I?"ltr":I,T=e.onInit,k=(e.onClick,e.onDataZoom,e.style),O=e.className,A=(e.children,e.virtualScroll),D=void 0!==A&&A,P=e.virtualScrollPageSize,R=void 0===P?100:P,M=e.virtualScrollPreloadSize,N=void 0===M?50:M,z=e.enablePerformanceMonitoring,L=void 0!==z&&z,j=e.onPerformance,F=(e.enableZoom,e.onZoom),H=e.enableDataFiltering,U=void 0!==H&&H,B=e.filters,_=void 0===B?{}:B,G=e.onDataFiltered,W=e.enableLegendInteraction,V=void 0!==W&&W,Z=e.legendInteractionMode,q=void 0===Z?"single":Z,Y=e.onLegendSelect,J=e.onLegendUnselect,Q=(e.onLegendSelectAll,e.onLegendInverseSelect,e.enableCustomTooltip),K=void 0!==Q&&Q,X=e.customTooltipContent,$=e.customTooltipStyle,ee=e.onTooltipShow,te=e.onTooltipHide,re=(e.onExport,e.linkageConfig),ne=void 0===re?{}:re,oe=e.onDataUpdate,ae=e.dataUpdateOptions,ie=void 0===ae?{}:ae,ce=(0,a.useRef)(null),le=(0,a.useRef)({initStartTime:0,initEndTime:0,renderStartTime:0,renderEndTime:0,updateStartTime:0,updateEndTime:0}),se=(0,a.useRef)({currentPage:0,totalPages:1,totalDataCount:0,isScrolling:!1}),ue=(0,a.useRef)(r),de=(0,a.useRef)(null),fe=(0,a.useRef)(null),pe=(0,a.useRef)(null),he=(0,a.useMemo)(function(){return o?"boolean"==typeof o?{enabled:o,autoExpand:!1}:w({enabled:!0},o):null},[o]),ve=(0,a.useMemo)(function(){if(r){var e=w({},r);U&&_&&Object.keys(_).length>0&&(e=JSON.parse(JSON.stringify(e))).series&&Array.isArray(e.series)&&(e.series=e.series.map(function(e){if(e.data&&Array.isArray(e.data)){var t=function(e,t){return t&&0!==Object.keys(t).length?e.filter(function(e){for(var r,n,o=0,a=Object.entries(t);o<a.length;o++){var i=a[o],c=i[0],l=i[1];if(e[c]!==l&&!(null===(n=null===(r=e[c])||void 0===r?void 0:r.includes)||void 0===n?void 0:n.call(r,l)))return!1}return!0}):e}(e.data,_);if(G&&G(t,_),D){se.current.totalDataCount=t.length,se.current.totalPages=Math.ceil(t.length/R);var r=se.current.currentPage*R,n=Math.min(r+R+N,t.length);return w(w({},e),{data:t.slice(r,n)})}return w(w({},e),{data:t})}return e}));var t=E(e),o=(0,c.ek)(n,t);return w(w({},e),o)}},[r,n,U,_,D,R,N,G]),me=(0,a.useCallback)(function(e){var r,n;ce.current=e,de.current=e,L&&(pe.current=b.getInstance({enabled:!0,metrics:["initTime","renderTime","updateTime","dataSize","frameRate"],sampleInterval:1e3,maxSamples:100,realTime:!0,autoStart:!0})),le.current.initStartTime=Date.now(),t&&function(e,t){if(l[e])try{l[e].dispose()}catch(e){}l[e]=t}(t,e),e&&(ne.enableClickLinkage&&t&&ne.linkedChartIds&&e.on("click",function(e){ne.linkedChartIds.forEach(function(t){var r=s(t);r&&r.dispatchAction({type:"highlight",name:e.name})})}),e.on("datazoom",function(e){if(F&&F({start:e.start||0,end:e.end||100,dataZoomIndex:e.dataZoomIndex||0}),D&&!se.current.isScrolling){se.current.isScrolling=!0;var r=Math.floor((e.start||0)/100*se.current.totalPages);r!==se.current.currentPage&&(se.current.currentPage=r),setTimeout(function(){se.current.isScrolling=!1},100)}ne.enableZoomLinkage&&t&&ne.linkedChartIds&&ne.linkedChartIds.forEach(function(t){var r=s(t);r&&r.dispatchAction({type:"dataZoom",start:e.start,end:e.end,dataZoomIndex:e.dataZoomIndex})})}),V&&e.on("legendselectchanged",function(r){var n=r.name,o=r.selected;if(ne.enableLegendLinkage&&t&&ne.linkedChartIds&&ne.linkedChartIds.forEach(function(e){var t=s(e);t&&t.setOption({legend:{selected:o}})}),"single"===q){var a={};Object.keys(o).forEach(function(e){a[e]=e===n}),e.setOption({legend:{selected:a}}),null==Y||Y({name:n,selected:a})}else o[n]?null==Y||Y({name:n,selected:o}):null==J||J({name:n,selected:o})}),K&&X&&(e.on("tooltipshow",function(e){return null==ee?void 0:ee(e)}),e.on("tooltiphide",function(e){return null==te?void 0:te(e)}),e.setOption({tooltip:w({formatter:function(e){return String(X(e))}},$&&{backgroundColor:"transparent",borderColor:"transparent",textStyle:{}})}))),(null===(r=fe.current)||void 0===r?void 0:r.enabled)&&(n={instance:{id:t,type:"ECharts",renderer:"canvas",width:"number"==typeof f?f:void 0,height:"number"==typeof h?h:void 0,platform:"web"},config:ve,data:{series:Array.isArray(null==ve?void 0:ve.series)?ve.series:[],totalDataCount:E(ve),currentDataCount:E(ve)},performance:{initTime:0,renderTime:0,dataSize:JSON.stringify(ve).length}},m.updateDebugInfo(n)),null==T||T(e),le.current.initEndTime=Date.now()},[t,L,T,ne,D,F,V,q,Y,J,K,X,$,ee,te,ve,f,h]);(0,a.useEffect)(function(){if(ce.current&&j){var e=le.current;j({renderTime:e.renderEndTime-e.renderStartTime,initTime:e.initEndTime-e.initStartTime,updateTime:e.updateEndTime-e.updateStartTime,dataSize:JSON.stringify(r).length})}},[r,j]),(0,a.useEffect)(function(){if(oe&&!1!==(null==ie?void 0:ie.enabled)){var e=ue.current;e!==r&&(oe(e,r),ue.current=r)}},[r,oe,ie]),(0,a.useEffect)(function(){return function(){t&&function(e){if(l[e]){try{l[e].dispose()}catch(e){}delete l[e]}}(t),pe.current&&(pe.current.dispose(),pe.current=null),de.current&&de.current.dispose()}},[t]);var ge=w({},function(e,t,r,n){return w({width:x(e,"100%"),height:x(t,"300px"),direction:r},n)}(f,h,S,k)),ye={option:ve,width:f,height:h,theme:v,autoResize:y,loading:!1,onChartInit:me,renderer:"canvas",onEvents:{},chartType:"base",style:ge,className:O};return i().createElement(i().Fragment,null,i().createElement(C.A,w({},ye)),(null==he?void 0:he.enabled)&&i().createElement(d,{options:he,debugInfo:{instance:{id:t,type:"ECharts",renderer:"canvas",width:"number"==typeof f?f:void 0,height:"number"==typeof h?h:void 0,platform:"web"},config:r,data:{series:Array.isArray(null==r?void 0:r.series)?r.series:[],totalDataCount:E(r),currentDataCount:E(r)},performance:{initTime:le.current.initEndTime-le.current.initStartTime,renderTime:le.current.renderEndTime-le.current.renderStartTime,updateTime:0,dataSize:JSON.stringify(r).length}}}))};var S=r(524),T=r(127),k=r(188),O=r(481),A=r(589),D=r(443),P=r(835),R=r(334),M=r(133),N=r(37),z=r(673),L=r(490),j=function(){return j=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},j.apply(this,arguments)},F=(0,a.memo)(function(e){return i().createElement(C.A,j({},e,{chartType:"graph-chart"}))});F.displayName="GraphChart";const H=F;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)},B=(0,a.memo)(function(e){return i().createElement(C.A,U({},e,{chartType:"candlestick-chart"}))});B.displayName="CandlestickChart";const _=B;var G=function(){return G=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},G.apply(this,arguments)},W=(0,a.memo)(function(e){return i().createElement(C.A,G({},e,{chartType:"wordcloud-chart"}))});W.displayName="WordCloudChart";const V=W;var Z=r(574),q=r(123),Y=r(999),J=function(){return J=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},J.apply(this,arguments)},Q=new Map,K={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"}}},X={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"}}},$={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)"}}},ee={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}}},te={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}}},re={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"}},ne={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)"}},oe={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)"}}},ae={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"}},ie={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 ce(e){if(!e)return K;var t;if(e.theme&&"string"==typeof e.theme){var r=Q.get(e.theme);t=r||(e.darkMode?X:K)}else t=e.darkMode?X:K;return J(J({},t),e)}function le(e,t){Q.set(e,J(J({},t),{name:e}))}function se(){return Array.from(Q.values())}function ue(e){return Q.get(e)}function de(e,t){var r;"string"==typeof e?r=Q.get(e)||K:(r=e,e.name&&le(e.name,e));return"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("themeChange",{detail:r})),null==t||t(),r}function fe(e){return se().filter(function(t){var r;return null===(r=t.tags)||void 0===r?void 0:r.includes(e)})}function pe(){return se().filter(function(e){return!e.darkMode})}function he(){return se().filter(function(e){return e.darkMode})}var ve={default:K,dark:X,walden:J(J({},K),{theme:"walden",name:"Walden",description:"清新自然风格",colors:["#0a437a","#3a84c4","#22a783","#48b591","#7fcdbb","#c9e4ca"],backgroundColor:"#f0f8f5",textColor:"#2c5042"}),chalk:J(J({},K),{theme:"chalk",name:"Chalk",description:"粉笔风格",colors:["#2e8de5","#f0805a","#5ab1ef","#91d5ff","#faad14"],backgroundColor:"#ffffff",textColor:"#000000"}),"purple-passion":J(J({},K),{theme:"purple-passion",name:"Purple Passion",description:"紫色浪漫",colors:["#9c27b0","#e91e63","#ff5722","#ff9800","#ffc107"],backgroundColor:"#f5f5f5",textColor:"#333333"}),"blue-green":J(J({},K),{theme:"blue-green",name:"Blue Green",description:"蓝绿清新",colors:["#00838f","#00acc1","#03a9f4","#29b6f6","#4fc3f7"],backgroundColor:"#e0f7fa",textColor:"#006064"}),golden:J(J({},K),{theme:"golden",name:"Golden",description:"金色奢华",colors:["#ffd700","#ffed4e","#f9a825","#ffc107","#ffb300"],backgroundColor:"#fff8e1",textColor:"#ff6f00"}),forest:J(J({},K),{theme:"forest",name:"Forest",description:"森林绿色",colors:["#2e7d32","#388e3c","#43a047","#4caf50","#66bb6a"],backgroundColor:"#f1f8e9",textColor:"#1b5e20"}),neon:$,glass:ee,pastel:te,sunset:re,ocean:ne,cyber:oe,retro:ae,elegant:ie};Object.entries(ve).forEach(function(e){var t=e[0],r=e[1];Q.set(t,r)});var 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)},ge={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":"#277 ace","--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"}}},ye=function(){function e(){this.currentTheme=ge.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 ge[e]},e.prototype.getPresetThemeNames=function(){return Object.keys(ge)},e.prototype.setTheme=function(e){var t="string"==typeof e?ge[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.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:me(me({},ge.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();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(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 Ee=function(e){var t=e.selectedTheme,r=e.onThemeChange,n=e.onThemeSave,o=e.disabled,c=void 0!==o&&o,l=e.style,s=void 0===l?{}:l,u=e.className,d=void 0===u?"":u,f=se(),p=(0,a.useState)(f[0]||{}),h=p[0],v=p[1],m=(0,a.useState)(""),g=m[0],y=m[1],b=(0,a.useState)(!1),x=b[0],E=b[1],C=(0,a.useState)(h.colors||[]),w=C[0],I=C[1],S=(0,a.useState)(h.backgroundColor||"#ffffff"),T=S[0],k=S[1],O=(0,a.useState)(h.textColor||"#333333"),A=O[0],D=O[1],P=(0,a.useState)(h.darkMode||!1),R=P[0],M=P[1];(0,a.useEffect)(function(){if(t){var e=f.find(function(e){return e.name===t});e&&(v(e),I(e.colors||[]),k(e.backgroundColor||"#ffffff"),D(e.textColor||"#333333"),M(e.darkMode||!1))}},[t,f]),(0,a.useEffect)(function(){I(h.colors||[]),k(h.backgroundColor||"#ffffff"),D(h.textColor||"#333333"),M(h.darkMode||!1)},[h]);var N=function(e,t){var r=xe([],w,!0);r[e]=t,j({colors:r})},z=function(e){j({backgroundColor:e})},L=function(e){j({textColor:e})},j=function(e){var t=be(be({},h),e);v(t),r&&r(t),de(t)};return i().createElement("div",{className:"taroviz-theme-editor ".concat(d),style:be({padding:"20px",border:"1px solid #e0e0e0",borderRadius:"8px",backgroundColor:"#ffffff",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)"},s)},i().createElement("h3",null,"主题编辑器"),i().createElement("div",{style:{marginBottom:"20px"}},i().createElement("h4",null,"选择主题"),i().createElement("div",{style:{display:"flex",flexWrap:"wrap",gap:"10px",marginTop:"10px"}},f.map(function(e){return i().createElement("button",{key:e.name,onClick:function(){return function(e){v(e),r&&r(e),de(e)}(e)},disabled:c,style:{padding:"8px 16px",border:"2px solid ".concat(h.name===e.name?"#1890ff":"#e0e0e0"),borderRadius:"4px",backgroundColor:h.name===e.name?"#1890ff":"#ffffff",color:h.name===e.name?"#ffffff":"#333333",cursor:c?"not-allowed":"pointer",opacity:c?.6:1}},e.name)}),i().createElement("button",{onClick:function(){E(!0),y("")},disabled:c,style:{padding:"8px 16px",border:"2px dashed #e0e0e0",borderRadius:"4px",backgroundColor:"#f5f5f5",color:"#333333",cursor:c?"not-allowed":"pointer",opacity:c?.6:1}},"+ 新主题"))),x&&i().createElement("div",{style:{marginBottom:"20px",padding:"15px",backgroundColor:"#f9f9f9",borderRadius:"4px"}},i().createElement("h4",null,"新建主题"),i().createElement("div",{style:{marginBottom:"10px"}},i().createElement("label",{style:{display:"block",marginBottom:"5px"}},"主题名称:"),i().createElement("input",{type:"text",value:g,onChange:function(e){return y(e.target.value)},disabled:c,style:{padding:"8px",border:"1px solid #e0e0e0",borderRadius:"4px",width:"100%",opacity:c?.6:1},placeholder:"输入主题名称"}))),i().createElement("div",{style:{marginBottom:"20px"}},i().createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"10px"}},i().createElement("h4",null,"主题颜色"),i().createElement("button",{onClick:function(){I(xe(xe([],w,!0),["#000000"],!1))},disabled:c,style:{padding:"4px 8px",border:"1px solid #e0e0e0",borderRadius:"4px",backgroundColor:"#ffffff",color:"#333333",cursor:c?"not-allowed":"pointer",opacity:c?.6:1}},"+ 添加颜色")),i().createElement("div",{style:{display:"flex",flexWrap:"wrap",gap:"10px"}},w.map(function(e,t){return i().createElement("div",{key:t,style:{display:"flex",alignItems:"center",gap:"5px"}},i().createElement("input",{type:"color",value:e,onChange:function(e){return N(t,e.target.value)},disabled:c,style:{width:"50px",height:"30px",border:"none",cursor:c?"not-allowed":"pointer",opacity:c?.6:1}}),i().createElement("input",{type:"text",value:e,onChange:function(e){return N(t,e.target.value)},disabled:c,style:{width:"80px",padding:"4px",border:"1px solid #e0e0e0",borderRadius:"4px",opacity:c?.6:1}}),i().createElement("button",{onClick:function(){return function(e){var t=w.filter(function(t,r){return r!==e});I(t),j({colors:t})}(t)},disabled:c||w.length<=1,style:{padding:"4px 8px",border:"1px solid #ff4d4f",borderRadius:"4px",backgroundColor:"#ffffff",color:"#ff4d4f",cursor:c||w.length<=1?"not-allowed":"pointer",opacity:c||w.length<=1?.6:1}},"删除"))}))),i().createElement("div",{style:{marginBottom:"20px"}},i().createElement("h4",null,"基础配置"),i().createElement("div",{style:{marginBottom:"10px"}},i().createElement("label",{style:{display:"block",marginBottom:"5px"}},"背景色:"),i().createElement("div",{style:{display:"flex",alignItems:"center",gap:"10px"}},i().createElement("input",{type:"color",value:T,onChange:function(e){return z(e.target.value)},disabled:c,style:{width:"50px",height:"30px",border:"none",cursor:c?"not-allowed":"pointer",opacity:c?.6:1}}),i().createElement("input",{type:"text",value:T,onChange:function(e){return z(e.target.value)},disabled:c,style:{width:"120px",padding:"4px",border:"1px solid #e0e0e0",borderRadius:"4px",opacity:c?.6:1}}))),i().createElement("div",{style:{marginBottom:"10px"}},i().createElement("label",{style:{display:"block",marginBottom:"5px"}},"文本颜色:"),i().createElement("div",{style:{display:"flex",alignItems:"center",gap:"10px"}},i().createElement("input",{type:"color",value:A,onChange:function(e){return L(e.target.value)},disabled:c,style:{width:"50px",height:"30px",border:"none",cursor:c?"not-allowed":"pointer",opacity:c?.6:1}}),i().createElement("input",{type:"text",value:A,onChange:function(e){return L(e.target.value)},disabled:c,style:{width:"120px",padding:"4px",border:"1px solid #e0e0e0",borderRadius:"4px",opacity:c?.6:1}}))),i().createElement("div",{style:{display:"flex",alignItems:"center",gap:"10px"}},i().createElement("label",null,"深色模式:"),i().createElement("input",{type:"checkbox",checked:R,onChange:function(){j({darkMode:!R})},disabled:c,style:{cursor:c?"not-allowed":"pointer",opacity:c?.6:1}}))),i().createElement("button",{onClick:function(){var e=be(be({},h),{colors:w,backgroundColor:T,textColor:A,darkMode:R});x&&g?(le(g,e),E(!1),y("")):le(h.name||"custom",e),n&&n(e)},disabled:c,style:{padding:"10px 20px",border:"none",borderRadius:"4px",backgroundColor:"#1890ff",color:"#ffffff",cursor:c?"not-allowed":"pointer",opacity:c?.6:1}},"保存主题"))};var Ce,we=(Ce=function(e,t){return Ce=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])},Ce(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}Ce(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Ie=function(){return Ie=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},Ie.apply(this,arguments)},Se=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 we(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,c=n.showDetails,l=void 0!==c&&c;return t&&r?a?a(r,this.handleReset):i().createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"20px",backgroundColor:"#fff",border:"1px solid #ff4d4f",borderRadius:"8px",color:"#333",minHeight:"200px"}},i().createElement("div",{style:{fontSize:"48px",marginBottom:"16px"}},"⚠️"),i().createElement("h3",{style:{margin:"0 0 12px",color:"#ff4d4f"}},"图表渲染失败"),i().createElement("p",{style:{margin:"0 0 16px",color:"#666",textAlign:"center"}},"图表在渲染过程中遇到错误,请检查数据配置是否正确"),l&&i().createElement("details",{style:{width:"100%",padding:"12px",backgroundColor:"#f5f5f5",borderRadius:"4px",fontSize:"12px",fontFamily:"monospace",overflow:"auto",maxHeight:"150px"}},i().createElement("summary",{style:{cursor:"pointer",marginBottom:"8px"}},"错误详情"),i().createElement("pre",{style:{margin:0,whiteSpace:"pre-wrap",wordBreak:"break-all"}},r.message,"\n\n",r.stack)),i().createElement("button",{onClick:this.handleReset,style:{marginTop:"16px",padding:"8px 24px",backgroundColor:"#1890ff",color:"#fff",border:"none",borderRadius:"4px",cursor:"pointer",fontSize:"14px"}},"重试")):o},t}(a.Component);function Te(e,t){var r=function(r){return i().createElement(Se,Ie({},t),i().createElement(e,Ie({},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)},Oe=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},Ae=(0,a.lazy)(function(){return Promise.resolve().then(r.bind(r,127))}),De=(0,a.lazy)(function(){return Promise.resolve().then(r.bind(r,188))}),Pe=(0,a.lazy)(function(){return Promise.resolve().then(r.bind(r,481))}),Re=(0,a.lazy)(function(){return Promise.resolve().then(r.bind(r,589))}),Me=(0,a.lazy)(function(){return Promise.resolve().then(r.bind(r,443))}),Ne=(0,a.lazy)(function(){return Promise.resolve().then(r.bind(r,835))}),ze=(0,a.lazy)(function(){return Promise.resolve().then(r.bind(r,334))}),Le=(0,a.lazy)(function(){return Promise.resolve().then(r.bind(r,133))}),je=(0,a.lazy)(function(){return Promise.resolve().then(r.bind(r,37))}),Fe=(0,a.lazy)(function(){return Promise.resolve().then(r.bind(r,673))}),He=(0,a.lazy)(function(){return Promise.resolve().then(r.bind(r,490))}),Ue={line:function(){return Promise.resolve().then(r.bind(r,127))},bar:function(){return Promise.resolve().then(r.bind(r,188))},pie:function(){return Promise.resolve().then(r.bind(r,481))},scatter:function(){return Promise.resolve().then(r.bind(r,589))},radar:function(){return Promise.resolve().then(r.bind(r,443))},heatmap:function(){return Promise.resolve().then(r.bind(r,835))},gauge:function(){return Promise.resolve().then(r.bind(r,334))},funnel:function(){return Promise.resolve().then(r.bind(r,133))},treemap:function(){return Promise.resolve().then(r.bind(r,37))},sunburst:function(){return Promise.resolve().then(r.bind(r,673))},sankey:function(){return Promise.resolve().then(r.bind(r,490))}},Be=Object.keys(Ue),_e=function(e){var t=e.text,r=void 0===t?"加载中...":t;return i().createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",minHeight:"200px",backgroundColor:"#f5f5f5",borderRadius:"8px"}},i().createElement("div",{style:{textAlign:"center"}},i().createElement("div",{style:{width:"40px",height:"40px",border:"3px solid #1890ff",borderTopColor:"transparent",borderRadius:"50%",animation:"taroviz-spin 1s linear infinite",margin:"0 auto 12px"}}),i().createElement("style",null,"\n @keyframes taroviz-spin {\n to { transform: rotate(360deg); }\n }\n "),i().createElement("span",{style:{color:"#666",fontSize:"14px"}},r)))};function Ge(e,t){var r=function(r){var n=r.loadingText,o=r.fallback,c=Oe(r,["loadingText","fallback"]),l=t||_e;return i().createElement(a.Suspense,{fallback:i().createElement(l,{text:n})},o?i().createElement(i().Fragment,null,o,i().createElement(e,ke({},c))):i().createElement(e,ke({},c)))};return r.displayName="withLazyLoad(".concat(e.displayName||e.name||"Chart",")"),r}function We(e,t){void 0===t&&(t=!0);var r=Ue[e];return r?r().then(function(){}).catch(function(e){}):t?Promise.resolve():Promise.reject(new Error("Unknown chart type: ".concat(e)))}function Ve(){return Promise.all(Be.map(function(e){return We(e)}))}function Ze(e){return{line:Ae,bar:De,pie:Pe,scatter:Re,radar:Me,heatmap:Ne,gauge:ze,funnel:Le,treemap:je,sunburst:Fe,sankey:He}[e]||null}var qe={get:function(e){return Ze(e)},preload:function(e,t){return void 0===t&&(t=!0),We(e,t)},preloadAll:function(){return Ve()}};function Ye(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 Qe(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 Ke(e){var t=e.type,r=e.markLine,n=e.markArea,o=e.scatter;return(0,a.useMemo)(function(){var e=[];if("line"===t&&r){var a=Ye(r);e.push.apply(e,Array.isArray(a)?a:[a])}if("area"===t&&n){var i=Je(n);e.push.apply(e,Array.isArray(i)?i:[i])}if("scatter"===t&&o){var c=Qe(o);e.push.apply(e,Array.isArray(c)?c:[c])}return{series:e}},[t,r,n,o])}var Xe={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 $e(e){var t=[];return e.forEach(function(e){if("line"===e.type&&e.markLine){var r=Ye(e.markLine);t.push.apply(t,Array.isArray(r)?r:[r])}if("area"===e.type&&e.markArea){r=Je(e.markArea);t.push.apply(t,Array.isArray(r)?r:[r])}if("scatter"===e.type&&e.scatter){r=Qe(e.scatter);t.push.apply(t,Array.isArray(r)?r:[r])}}),{series:t}}var et=function(){return et=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},et.apply(this,arguments)},tt=function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function c(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(i,c)}l((n=n.apply(e,t||[])).next())})},rt=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=c(0),i.throw=c(1),i.return=c(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(l){return function(c){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,n=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,l])}}};function nt(e){for(var t,r=e.split(","),n=(null===(t=r[0].match(/:(.*?);/))||void 0===t?void 0:t[1])||"image/png",o=atob(r[1]),a=o.length,i=new Uint8Array(a);a--;)i[a]=o.charCodeAt(a);return new Blob([i],{type:n})}function ot(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)}var at=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,c=void 0===i?"#ffffff":i,l=t.quality,s=void 0===l?.8:l,u="image/".concat(n);return{data:e.getDataURL({type:n,pixelRatio:a,backgroundColor:c,quality:s}),filename:ot("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:ot("chart","svg"),mimeType:i}},e.exportPDF=function(e){return tt(this,arguments,Promise,function(e,t){var r,n,o,a,i,c,l,s,u,d,f,p,h,v,m,g,y,b,x,E,C,w,I,S,T,k,O,A;return void 0===t&&(t={}),rt(this,function(D){switch(D.label){case 0:r=t.orientation,n=void 0===r?"portrait":r,o=t.pageSize,a=void 0===o?"a4":o,i=t.title,c=void 0===i?"Chart Export":i,l=t.author,s=void 0===l?"TaroViz":l,u=t.margin,d=void 0===u?{top:40,right:40,bottom:40,left:40}:u,f=t.includeTitle,p=void 0===f||f,h=e.getDataURL({type:"png",pixelRatio:2,backgroundColor:"#ffffff"}),D.label=1;case 1:return D.trys.push([1,3,,4]),[4,import("jspdf")];case 2:return v=D.sent().default,[3,4];case 3:return D.sent(),[2,{data:h,filename:ot("chart","png"),mimeType:"image/png"}];case 4:return m={a4:{width:210,height:297},letter:{width:216,height:279},legal:{width:216,height:356},tabloid:{width:279,height:432}}[a],g="landscape"===n,(y=new v({orientation:n,unit:"mm",format:a})).setProperties({title:c,author:s,subject:"Chart Export",keywords:"chart, taroviz, echarts"}),b=g?m.height:m.width,x=.6*b,E=g?m.height:m.width,C=g?m.width:m.height,w=d.top||40,I=d.left||40,p&&(y.setFontSize(16),y.setTextColor(51,51,51),y.text(c,I,w)),S=p?w+15:w,T=(E-b)/2,y.addImage(h,"PNG",T,S,b,x),k=C-(null!==(A=d.bottom)&&void 0!==A?A:40)/2,y.setFontSize(10),y.setTextColor(153,153,153),y.text("Generated by TaroViz on ".concat((new Date).toLocaleDateString()),I,k),[2,{data:O=y.output("blob"),filename:ot(c.replace(/\s+/g,"_"),"pdf"),mimeType:"application/pdf",size:O.size}]}})})},e.exportBatch=function(e,t){return tt(this,void 0,Promise,function(){var r,n,o,a,i,c,l,s,u,d;return rt(this,function(f){switch(f.label){case 0:r=t.format,n=t.filenamePrefix,o=t.compress,a=[],i=0,c=e,f.label=1;case 1:if(!(i<c.length))return[3,8];l=c[i],s=l.name,u=l.chart,f.label=2;case 2:return f.trys.push([2,6,,7]),d=void 0,"pdf"!==r?[3,4]:[4,this.exportPDF(u,{title:s})];case 3:return d=f.sent(),[3,5];case 4:d=this.exportImage(u,{type:r}),f.label=5;case 5:return o&&d.filename&&(d.filename=d.filename.replace(/\.(\w+)$/,".$1")),a.push(d),[3,7];case 6:return f.sent(),[3,7];case 7:return i++,[3,1];case 8:return[2,a]}})})},e.download=function(e){var t,r,n,o,a;t=e.data,r=e.filename,e.mimeType,n="string"==typeof t?nt(t):t,o=URL.createObjectURL(n),(a=document.createElement("a")).href=o,a.download=r,a.style.display="none",document.body.appendChild(a),a.click(),setTimeout(function(){document.body.removeChild(a),URL.revokeObjectURL(o)},100)},e.copyToClipboard=function(e){return tt(this,arguments,Promise,function(e,t){var r,n,o;return void 0===t&&(t={}),rt(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),r=this.exportImage(e,et(et({},t),{type:"png"})),n=nt(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}(),it=at;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)},lt=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 st(e){var t=e.data,r=e.chartType,n=e.mapping,o=void 0===n?{}:n,i=e.extraConfig,c=void 0===i?{}:i;return(0,a.useMemo)(function(){switch(r){case"line":case"bar":return function(e,t,r,n){var o,a=r||{},i=a.xField,c=void 0===i?"name":i,l=a.yField,s=void 0===l?"value":l,u=a.seriesField,d=e.categories||(null===(o=e.rows)||void 0===o?void 0:o.map(function(e){return String(e[c])}))||[],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 h=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 ct({xAxis:{type:"category",data:d},yAxis:{type:"value"},series:h},n)}var v=[{type:t,data:f.map(function(e){var t;return null!==(t=e[s])&&void 0!==t?t:0})}];return ct({xAxis:{type:"category",data:d},yAxis:{type:"value"},series:v},n)}(t,r,o,c);case"pie":return function(e,t,r){var n=t||{},o=n.nameField,a=void 0===o?"name":o,i=n.valueField,c=void 0===i?"value":i,l=(e.series||e.rows||[]).map(function(e){return{name:String(e[a]||""),value:Number(e[c])||0}});return ct({series:[{type:"pie",radius:"60%",data:l}]},r)}(t,o,c);case"scatter":return function(e,t,r){var n=t||{},o=n.xField,a=void 0===o?"x":o,i=n.yField,c=void 0===i?"y":i,l=n.sizeField,s=(e.series||e.rows||[]).map(function(e){var t=e,r=[Number(t[a])||0,Number(t[c])||0];return l&&r.push(Number(t[l])||1),r});return ct({xAxis:{type:"value",scale:!0},yAxis:{type:"value",scale:!0},series:[{type:"scatter",data:s}]},r)}(t,o,c);case"radar":return function(e,t,r){var n=t||{},o=n.nameField,a=void 0===o?"name":o,i=n.valueField,c=void 0===i?"value":i,l=(e.series||e.rows||[]).map(function(e){var t=e;return{name:String(t[a]||""),max:Math.max(Number(t[c])||100,100)}}),s=(e.series||e.rows||[]).map(function(e){return Number(e[c])||0});return ct({radar:{indicator:l},series:[{type:"radar",data:[{value:s}]}]},r)}(t,o,c);case"heatmap":return function(e,t,r){var n=t||{},o=n.xField,a=void 0===o?"x":o,i=n.yField,c=void 0===i?"y":i,l=n.valueField,s=void 0===l?"value":l,u=lt([],new Set((e.series||e.rows||[]).map(function(e){return String(e[a])})),!0),d=lt([],new Set((e.series||e.rows||[]).map(function(e){return String(e[c])})),!0),f=(e.series||e.rows||[]).map(function(e){var t=e;return[u.indexOf(String(t[a])),d.indexOf(String(t[c])),Number(t[s])||0]});return ct({xAxis:{type:"category",data:u},yAxis:{type:"category",data:d},visualMap:{min:0,calculable:!0},series:[{type:"heatmap",data:f}]},r)}(t,o,c);default:return{}}},[t,r,o,c])}function ut(e){var t=e.data,r=e.columns,n=void 0===r?[]:r,o=e.transpose,i=void 0!==o&&o,c=e.extraConfig,l=void 0===c?{}:c;return(0,a.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]]||"")}),c=(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:c},l)},[t,n,i,l])}function dt(e){var t=e.data,r=e.dateField,n=e.valueField,o=e.groupField,i=e.period,c=void 0===i?"day":i,l=e.aggregation,s=void 0===l?"sum":l,u=e.fillMissing,d=void 0===u?"forward":u,f=e.extraConfig,p=void 0===f?{}:f;return(0,a.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,c),a=Object.keys(e).sort();if(o){var i=new Set(t.map(function(e){return String(e[o])})),l=Array.from(i).map(function(t){var r=a.map(function(r){var a;return ft((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:l},p)}var u=a.map(function(t){return ft(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,c,s,d,p])}function ft(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 c=o[0];for(i=1;i<o.length;i++)o[i]>c&&(c=o[i]);return c;case"min":var l=o[0];for(i=1;i<o.length;i++)o[i]<l&&(l=o[i]);return l;case"count":return o.length;case"first":default:return o[0];case"last":return o[o.length-1]}}var pt=function(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function c(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(i,c)}l((n=n.apply(e,t||[])).next())})},ht=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=c(0),i.throw=c(1),i.return=c(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(l){return function(c){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,n=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,l])}}},vt=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){var r=this,n=(0,a.useState)(null),o=n[0],i=n[1],c=(0,a.useState)(!1),l=c[0],s=c[1],u=(0,a.useRef)(t);return u.current=t,(0,a.useEffect)(function(){if(e.current&&!o){return pt(r,void 0,void 0,function(){var e;return ht(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,(0,Z.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(o){try{var t=o;(null===(e=t.isDisposed)||void 0===e?void 0:e.call(t))||t.dispose()}catch(e){}i(null),s(!1)}}}},[e]),[o,i,l]}function gt(e,t,r){var n=r||{},o=n.notMerge,i=void 0!==o&&o,c=n.lazyUpdate,l=void 0!==c&&c,s=n.replaceMerge,u=n.deps,d=void 0===u?[]:u;(0,a.useEffect)(function(){if(e&&t)try{e.setOption(t,i,l)}catch(e){}},vt([e,t,i,l,s],d,!0))}function yt(e,t){var r=t||{},n=r.delay,o=void 0===n?300:n,i=r.minWidth,c=r.minHeight,l=r.enabled,s=void 0===l||l,u=(0,a.useRef)();(0,a.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(c&&a<c)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 a=new ResizeObserver(r);return a.observe(n),function(){a.disconnect(),window.removeEventListener("resize",r),u.current&&clearTimeout(u.current)}}return function(){window.removeEventListener("resize",r),u.current&&clearTimeout(u.current)}}},[e,o,i,c,s])}function bt(e,t){(0,a.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 xt(e,t,r){(0,a.useEffect)(function(){if(e)try{t?e.showLoading(r):e.hideLoading()}catch(e){}},[e,t,r])}function Et(e,t){return void 0===t&&(t=!1),(0,a.useMemo)(function(){if("string"==typeof e)try{return ue(e)||(t?"dark":e)}catch(r){return t?"dark":e}return e},[e,t])}function Ct(e,t){return(0,a.useMemo)(function(){return e?t(e):{}},[e,t])}function wt(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,i=void 0===o?"md":o,c=(0,a.useState)(i),l=c[0],s=c[1],u=(0,a.useState)({width:0,height:0}),d=u[0],f=u[1];return(0,a.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:l,windowSize:d}}function It(e){void 0===e&&(e="default");var t=(0,a.useState)(e),r=t[0],n=t[1],o=(0,a.useState)(!1),i=o[0],c=o[1];return{theme:r,isDark:i,switchTheme:(0,a.useCallback)(function(e){n(e),"string"==typeof e&&c("dark"===e||e.includes("dark"))},[]),toggleDark:(0,a.useCallback)(function(){c(function(e){return!e}),n(function(e){return"dark"===e?"default":"dark"})},[]),setTheme:n}}function St(e,t){var r=this,n=t||{},o=n.interval,i=void 0===o?5e3:o,c=n.autoStart,l=void 0!==c&&c,s=n.retryCount,u=void 0===s?3:s,d=n.retryDelay,f=void 0===d?1e3:d,p=(0,a.useState)(null),h=p[0],v=p[1],m=(0,a.useState)(l),g=m[0],y=m[1],b=(0,a.useState)(null),x=b[0],E=b[1],C=(0,a.useRef)({cancelled:!1}),w=(0,a.useCallback)(function(){return pt(r,void 0,void 0,function(){var t,r,n,o,a;return ht(this,function(i){switch(i.label){case 0:C.current.cancelled=!0,C.current={cancelled:!1},t=C.current,r=u,y(!0),E(null),i.label=1;case 1:if(!(r>0)||t.cancelled)return[3,9];i.label=2;case 2:return i.trys.push([2,4,,8]),[4,e()];case 3:return o=i.sent(),t.cancelled||(v(o),y(!1)),[2];case 4:return n=i.sent(),--r<=0||t.cancelled?(t.cancelled||E(n),y(!1),[2]):[3,5];case 5:return[4,new Promise(function(e){return setTimeout(e,f)})];case 6:i.sent(),i.label=7;case 7:return[3,8];case 8:return[3,1];case 9:if(!(u<=0)||t.cancelled)return[3,14];i.label=10;case 10:return i.trys.push([10,12,,13]),[4,e()];case 11:return o=i.sent(),t.cancelled||(v(o),y(!1)),[3,13];case 12:return a=i.sent(),t.cancelled||(E(a),y(!1)),[3,13];case 13:return[2];case 14:return t.cancelled||(E(new Error("All retries failed")),y(!1)),[2]}})})},[e,u,f]);return(0,a.useEffect)(function(){if(l&&w(),i>0){var e=setInterval(w,i);return function(){clearInterval(e),C.current.cancelled=!0}}return function(){C.current.cancelled=!0}},[i,l,w]),{data:h,loading:g,error:x,refresh:(0,a.useCallback)(function(){w()},[w])}}function Tt(e){var t=(0,a.useState)(!1),r=t[0],n=t[1],o=(0,a.useCallback)(function(){e.current&&(r?document.exitFullscreen&&document.exitFullscreen():e.current.requestFullscreen&&e.current.requestFullscreen())},[e,r]);return(0,a.useEffect)(function(){var e=function(){n(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",e),function(){return document.removeEventListener("fullscreenchange",e)}},[]),{isFullscreen:r,toggle:o}}function kt(e){var t=e;return{exportImage:(0,a.useCallback)(function(e){var r;if(!t)return null;var n=e||{},o=n.type,a=void 0===o?"png":o,i=n.pixelRatio,c=void 0===i?2:i,l=n.backgroundColor;return null===(r=t.getDataURL)||void 0===r?void 0:r.call(t,{type:a,pixelRatio:c,backgroundColor:l})},[t]),exportSVG:(0,a.useCallback)(function(){var e;return t?null===(e=t.getSvgData)||void 0===e?void 0:e.call(t):null},[t]),exportCSV:(0,a.useCallback)(function(e){var r;return t?null===(r=t.getCompressedDataURL)||void 0===r?void 0:r.call(t,e):null},[t])}}function Ot(e){var t=e;return{getInstance:(0,a.useCallback)(function(){return e},[e]),clear:(0,a.useCallback)(function(){var e;null===(e=null==t?void 0:t.clear)||void 0===e||e.call(t)},[t]),repaint:(0,a.useCallback)(function(){var e;null===(e=null==t?void 0:t.resize)||void 0===e||e.call(t)},[t]),dispatchAction:(0,a.useCallback)(function(e){var r;null===(r=null==t?void 0:t.dispatchAction)||void 0===r||r.call(t,e)},[t]),showTip:(0,a.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,a.useCallback)(function(){var e;null===(e=null==t?void 0:t.dispatchAction)||void 0===e||e.call(t,{type:"hideTip"})},[t]),zoom:(0,a.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 At="taroviz",Dt="1.4.0";module.exports=n})();
|