@idux/charts-core 1.0.0 → 1.2.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/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @idux/charts-core
2
2
 
3
+ ## 1.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 879376a: Add CHART_THEME_TOKEN for reactive application-wide chart themes, with explicit per-chart themes taking precedence.
8
+
9
+ Use a dark loading mask for dark chart themes while retaining explicit loading overrides.
10
+
11
+ Let chart tooltips inherit theme surfaces, retaining the light Seer background.
12
+
13
+ ## 1.1.0
14
+
15
+ ### Minor Changes
16
+
17
+ - 887b91a: Add Radar, Gauge and LiquidFill components with pure option builders, public prop types and reactive plot theme/typography configuration. Extend core option types for the new series and coordinate systems.
18
+
19
+ Schedule automatic chart resizing on the next animation frame to avoid ResizeObserver delivery loops, and cancel pending resize work when auto-resize is disabled or the chart is disposed.
20
+
3
21
  ## 1.0.0
4
22
 
5
23
  ### Major Changes
package/README.md ADDED
@@ -0,0 +1,84 @@
1
+ # @idux/charts-core
2
+
3
+ English | [简体中文](README.zh.md)
4
+
5
+ The foundation of iDux Charts: the generic `IxChart` component, chart lifecycle composables, themes, types, and utilities. Use it for direct ECharts options or custom chart components.
6
+
7
+ For the unified entry point and shared tooltip styles, use [`@idux/charts`](https://github.com/IDuxFE/idux-charts/blob/main/packages/charts/README.md).
8
+
9
+ ## Installation
10
+
11
+ ```bash
12
+ npm install @idux/charts-core echarts
13
+ ```
14
+
15
+ Supports Vue 2 (including Vue 2.6) and Vue 3. Use in an existing Vue project with peer dependencies Vue `^2.6.0 || ^3.2.5` and ECharts `^5.4.3 || ^6.0.0`. Vue 2.6 also requires `@vue/composition-api >=1.6.2` and plugin registration before creating the application.
16
+
17
+ ```bash
18
+ npm install @vue/composition-api
19
+ ```
20
+
21
+ ```ts
22
+ // Vue 2.6
23
+ import Vue from 'vue'
24
+ import VueCompositionAPI from '@vue/composition-api'
25
+
26
+ Vue.use(VueCompositionAPI)
27
+ ```
28
+
29
+ ## Quick start
30
+
31
+ This example uses Vue 3 `<script setup>` with a locally imported component. The container must have a nonzero width and height.
32
+
33
+ ```vue
34
+ <script setup lang="ts">
35
+ import { use } from 'echarts/core'
36
+ import { LineChart } from 'echarts/charts'
37
+ import { IxChart, type ChartProps } from '@idux/charts-core'
38
+
39
+ use([LineChart])
40
+
41
+ const option: ChartProps = {
42
+ xAxis: { type: 'category', data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'] },
43
+ yAxis: { type: 'value' },
44
+ series: [{ type: 'line', data: [123, 324, 156, 244, 188] }],
45
+ }
46
+ </script>
47
+
48
+ <template>
49
+ <div style="height: 320px">
50
+ <IxChart v-bind="option" />
51
+ </div>
52
+ </template>
53
+ ```
54
+
55
+ `IxChart` takes ECharts options directly through `v-bind`, rather than a separate `option` prop. It registers the SVG renderer, Grid, Legend, Tooltip, Title, DataZoom, LabelLayout, and UniversalTransition. Register custom series or additional components with `use` from `echarts/core`. For Canvas, also register `CanvasRenderer` and pass `initOption: { renderer: 'canvas' }`.
56
+
57
+ ## Core API
58
+
59
+ - `IxChart`: supports `autoResize` (enabled by default), `loading`, `theme`, `group`, `initOption`, `setOptionOpts`, and `onReady`.
60
+ - `useChart(options, listeners?)`: manages initialization, reactive updates, events, resizing, and disposal. Call it in component `setup`; it returns `containerRef` and `chartRef`.
61
+ - `seerTheme`: the built-in theme, registered as the default theme `seer`.
62
+ - `useTooltipsFormatter`, `useReactiveAttrs`, `createInstall`, and `withChartProps`: helpers for custom charts.
63
+ - `ChartProps`, `ChartPublicProps`, and `ChartOption`: public configuration types.
64
+
65
+ This package does not ship a separate CSS file. Shared HTML tooltip styles are provided by `@idux/charts/dist/style.css`.
66
+
67
+ ## Application themes
68
+
69
+ Use `CHART_THEME_TOKEN` to provide an application-wide theme name/object or a reactive ref. Explicit `theme` props override it; otherwise charts fall back to `seer`. Changing the inherited theme recreates the chart, following the existing theme lifecycle. For generated plot labels and graphics, also configure `PLOT_THEME_TOKEN` from `@idux/charts-plots` (or `@idux/charts`).
70
+
71
+ ## TypeScript
72
+
73
+ `*ChartProps` types describe chart configuration and allow extension fields. `*ChartPublicProps` expose named public properties while preserving their types and optionality for component type adapters. See the [repository README](https://github.com/IDuxFE/idux-charts/blob/main/README.md#typescript-prop-types) for adapter details.
74
+
75
+ ## Documentation
76
+
77
+ - [iDux Charts](https://charts.idux.site)
78
+ - [Configuration guide](https://github.com/IDuxFE/idux-charts/blob/main/packages/site/src/0-guide/GettingStarted.page.md)
79
+ - [Vue 2 / Vue 3 playgrounds](https://github.com/IDuxFE/idux-charts/blob/main/playgrounds/README.md)
80
+ - [Repository and development](https://github.com/IDuxFE/idux-charts/blob/main/README.md)
81
+
82
+ ## License
83
+
84
+ MIT © 2023-present IDuxFE
package/README.zh.md ADDED
@@ -0,0 +1,84 @@
1
+ # @idux/charts-core
2
+
3
+ [English](README.md) | 简体中文
4
+
5
+ iDux Charts 的基础层,提供通用 `IxChart`、图表生命周期组合式函数、主题、类型及工具,适合直接使用 ECharts 配置或开发自定义图表组件。
6
+
7
+ 如需统一入口及共享提示框样式,可使用 [`@idux/charts`](https://github.com/IDuxFE/idux-charts/blob/main/packages/charts/README.zh.md)。
8
+
9
+ ## 安装
10
+
11
+ ```bash
12
+ npm install @idux/charts-core echarts
13
+ ```
14
+
15
+ 支持 Vue 2(含 Vue 2.6)和 Vue 3。在已有 Vue 项目中使用,依赖版本为 Vue `^2.6.0 || ^3.2.5` 和 ECharts `^5.4.3 || ^6.0.0`。Vue 2.6 还需安装 `@vue/composition-api >=1.6.2`,并在创建应用前注册插件。
16
+
17
+ ```bash
18
+ npm install @vue/composition-api
19
+ ```
20
+
21
+ ```ts
22
+ // Vue 2.6
23
+ import Vue from 'vue'
24
+ import VueCompositionAPI from '@vue/composition-api'
25
+
26
+ Vue.use(VueCompositionAPI)
27
+ ```
28
+
29
+ ## 快速上手
30
+
31
+ 以下示例使用 Vue 3 的 `<script setup>`,局部导入组件即可使用。容器必须具有有效的宽度和高度。
32
+
33
+ ```vue
34
+ <script setup lang="ts">
35
+ import { use } from 'echarts/core'
36
+ import { LineChart } from 'echarts/charts'
37
+ import { IxChart, type ChartProps } from '@idux/charts-core'
38
+
39
+ use([LineChart])
40
+
41
+ const option: ChartProps = {
42
+ xAxis: { type: 'category', data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'] },
43
+ yAxis: { type: 'value' },
44
+ series: [{ type: 'line', data: [123, 324, 156, 244, 188] }],
45
+ }
46
+ </script>
47
+
48
+ <template>
49
+ <div style="height: 320px">
50
+ <IxChart v-bind="option" />
51
+ </div>
52
+ </template>
53
+ ```
54
+
55
+ `IxChart` 的 ECharts 配置通过 `v-bind` 直接传入,不使用单独的 `option` 属性。默认注册 SVG 渲染器、Grid、Legend、Tooltip、Title、DataZoom,以及 LabelLayout、UniversalTransition。自定义系列或额外组件需要通过 `echarts/core` 的 `use` 注册;使用 Canvas 时也需注册 `CanvasRenderer`,并传入 `initOption: { renderer: 'canvas' }`。
56
+
57
+ ## 核心 API
58
+
59
+ - `IxChart`:支持 `autoResize`(默认开启)、`loading`、`theme`、`group`、`initOption`、`setOptionOpts` 和 `onReady`。
60
+ - `useChart(options, listeners?)`:管理初始化、响应式更新、事件、尺寸变化和销毁,返回 `containerRef` 与 `chartRef`;在组件 `setup` 中调用。
61
+ - `seerTheme`:内置主题,默认主题名称为 `seer`。
62
+ - `useTooltipsFormatter`、`useReactiveAttrs`、`createInstall`、`withChartProps`:自定义图表开发工具。
63
+ - `ChartProps`、`ChartPublicProps`、`ChartOption`:公开配置类型。
64
+
65
+ 此包不提供独立 CSS 文件;共享 HTML 提示框样式由 `@idux/charts/dist/style.css` 提供。
66
+
67
+ ## 应用级主题
68
+
69
+ 可用 `CHART_THEME_TOKEN` 提供应用级主题名称、对象或响应式 ref。显式 `theme` 属性优先,未配置时回退到 `seer`。注入主题变化沿用已有主题生命周期,重新创建图表实例。对于配置生成器绘制的文字和辅助图形,还需配置 `@idux/charts-plots`(或 `@idux/charts`)导出的 `PLOT_THEME_TOKEN`。
70
+
71
+ ## TypeScript
72
+
73
+ `*ChartProps` 用于图表配置,允许扩展字段;`*ChartPublicProps` 提供具名公开属性类型,保留属性的类型及可选性,便于编写组件类型适配。具体适配说明见[仓库 README](https://github.com/IDuxFE/idux-charts/blob/main/README.zh.md#typescript-属性类型)。
74
+
75
+ ## 文档
76
+
77
+ - [iDux Charts](https://charts.idux.site)
78
+ - [配置指南](https://github.com/IDuxFE/idux-charts/blob/main/packages/site/src/0-guide/GettingStarted.page.md)
79
+ - [Vue 2 / Vue 3 示例项目](https://github.com/IDuxFE/idux-charts/blob/main/playgrounds/README.zh.md)
80
+ - [仓库与开发指南](https://github.com/IDuxFE/idux-charts/blob/main/README.zh.md)
81
+
82
+ ## 许可证
83
+
84
+ MIT © 2023-present IDuxFE
package/dist/index.js CHANGED
@@ -1,105 +1,116 @@
1
1
  import { DataZoomComponent as e, GridComponent as t, LegendComponent as n, TitleComponent as r, TooltipComponent as i } from "echarts/components";
2
2
  import { LabelLayout as a, UniversalTransition as o } from "echarts/features";
3
3
  import { SVGRenderer as s } from "echarts/renderers";
4
- import { computed as c, defineComponent as l, getCurrentInstance as u, h as d, isVue2 as f, onBeforeUnmount as p, onBeforeUpdate as m, onMounted as ee, onUpdated as te, shallowRef as h, unref as g, watch as _, watchEffect as ne } from "vue-demi";
5
- import { PictorialBarChart as v } from "echarts/charts";
6
- import { init as re, registerTheme as y, throttle as b, use as x } from "echarts/core";
7
- import { cloneDeep as S, isBoolean as ie, isEqual as C, isNil as ae } from "lodash-es";
4
+ import { computed as c, defineComponent as l, getCurrentInstance as u, h as d, inject as f, isVue2 as p, onBeforeUnmount as ee, onBeforeUpdate as m, onMounted as te, onUpdated as ne, shallowRef as h, unref as g, watch as _, watchEffect as v } from "vue-demi";
5
+ import { PictorialBarChart as y } from "echarts/charts";
6
+ import { init as re, registerTheme as b, use as x } from "echarts/core";
7
+ import { cloneDeep as S, isBoolean as ie, isEqual as C, isNil as w } from "lodash-es";
8
8
  // composables/useResizeObserver.ts
9
- function oe(e, t, n) {
9
+ function ae(e, t, n) {
10
10
  _([
11
11
  e,
12
12
  t,
13
13
  n
14
14
  ], ([e, n, r], i, a) => {
15
15
  if (!e || !n || !r) return;
16
- let o = b(() => {
17
- t.value === n && n.resize();
18
- }, 16);
19
- se(e, o), a(() => {
20
- ce(e, o), o.clear();
16
+ let o, s = () => {
17
+ o === void 0 && (o = requestAnimationFrame(() => {
18
+ o = void 0, t.value === n && n.resize();
19
+ }));
20
+ };
21
+ oe(e, s), a(() => {
22
+ se(e, s), o !== void 0 && cancelAnimationFrame(o);
21
23
  });
22
24
  });
23
25
  }
24
- var w = /* @__PURE__ */ new Map();
25
- function se(e, t, n) {
26
+ var T = /* @__PURE__ */ new Map();
27
+ function oe(e, t, n) {
26
28
  if (e && t) {
27
- if (w.has(e)) w.get(e).listeners.push(t);
29
+ if (T.has(e)) T.get(e).listeners.push(t);
28
30
  else {
29
31
  let r = [t], i = new ResizeObserver((e) => {
30
32
  e.forEach((e) => r.forEach((t) => t(e)));
31
33
  });
32
- i.observe(e, n), w.set(e, {
34
+ i.observe(e, n), T.set(e, {
33
35
  listeners: r,
34
36
  ro: i
35
37
  });
36
38
  }
37
39
  }
38
40
  }
39
- function ce(e, t) {
40
- if (!e || !t || !w.has(e)) return;
41
- let { listeners: n, ro: r } = w.get(e), i = n.indexOf(t);
42
- i > -1 && (n.splice(i, 1), n.length === 0 && (r.disconnect(), w.delete(e)));
41
+ function se(e, t) {
42
+ if (!e || !t || !T.has(e)) return;
43
+ let { listeners: n, ro: r } = T.get(e), i = n.indexOf(t);
44
+ i > -1 && (n.splice(i, 1), n.length === 0 && (r.disconnect(), T.delete(e)));
43
45
  }
46
+ // themes/token.ts
47
+ var E = Symbol("CHART_THEME_TOKEN");
44
48
  // composables/useChart.ts
45
- x([v]);
46
- var T = { text: "加载中..." };
47
- function E(e, t) {
48
- let n = () => typeof t == "function" ? t() : t, r = h(), i = h(), a = h(), o = c(() => g(e).autoResize ?? !0), s = c(() => g(e).group), l = c(() => g(e).initOption), u = c(() => g(e).loading), d = c(() => g(e).setOptionOpts), f = c(() => g(e).theme ?? "seer"), m = [], v = (e, t) => {
49
- m = m.filter((n) => {
49
+ x([y]);
50
+ var D = { text: "加载中..." };
51
+ function O(e, t) {
52
+ let n = () => typeof t == "function" ? t() : t, r = h(), i = h(), a = h(), o = c(() => g(e).autoResize ?? !0), s = c(() => g(e).group), l = c(() => g(e).initOption), u = c(() => g(e).loading), d = c(() => g(e).setOptionOpts), p = f(E, void 0), m = c(() => g(e).theme ?? g(p) ?? "seer"), y = [], b = (e, t) => {
53
+ y = y.filter((n) => {
50
54
  let r = t.some(([e, t, r]) => e === n.name && t === n.handler && r === n.once);
51
55
  return r || e.off(n.name, n.wrapped), r;
52
56
  }), t.forEach(([t, n, r]) => {
53
- if (m.some((e) => e.name === t && e.handler === n && e.once === r)) return;
57
+ if (y.some((e) => e.name === t && e.handler === n && e.once === r)) return;
54
58
  let i = (...a) => {
55
59
  r && e.off(t, i), n(...a);
56
60
  };
57
- m.push({
61
+ y.push({
58
62
  name: t,
59
63
  handler: n,
60
64
  once: r,
61
65
  wrapped: i
62
66
  }), e.on(t, i);
63
67
  });
64
- }, y = () => {
68
+ }, x = () => {
65
69
  let t = r.value;
66
70
  if (!t) return;
67
- let o = re(t, f.value, l.value), s = g(e), { restOptions: c, events: u } = D(s, n(), !1);
68
- o.setOption(c, d.value), a.value = S(c), v(o, u);
69
- let p = s.onReady || n()?.ready;
70
- p && p(o), i.value = o;
71
- }, b = () => {
72
- i.value && (i.value.dispose(), i.value = void 0, m = []);
71
+ let o = re(t, m.value, l.value), s = g(e), { restOptions: c, events: u } = k(s, n(), !1);
72
+ o.setOption(c, d.value), a.value = S(c), b(o, u);
73
+ let f = s.onReady || n()?.ready;
74
+ f && f(o), i.value = o;
75
+ }, w = () => {
76
+ i.value && (i.value.dispose(), i.value = void 0, y = []);
73
77
  };
74
- return ee(() => y()), p(() => b()), te(() => {
75
- i.value && v(i.value, D(g(e), n(), !1).events);
78
+ return te(() => x()), ee(() => w()), ne(() => {
79
+ i.value && b(i.value, k(g(e), n(), !1).events);
76
80
  }), _(() => g(e), (e) => {
77
81
  let t = i.value;
78
82
  if (!t) return;
79
- let { restOptions: r, events: o } = D(e, n(), !1);
80
- v(t, o), C(r, a.value) || (t.setOption(r, d.value), a.value = S(r));
81
- }, { deep: !0 }), _([() => S(f.value), () => S(l.value)], ([e, t], [n, r]) => {
82
- C(e, n) && C(t, r) || (b(), y());
83
- }), ne(() => {
83
+ let { restOptions: r, events: o } = k(e, n(), !1);
84
+ b(t, o), C(r, a.value) || (t.setOption(r, d.value), a.value = S(r));
85
+ }, { deep: !0 }), _([() => S(m.value), () => S(l.value)], ([e, t], [n, r]) => {
86
+ C(e, n) && C(t, r) || (w(), x());
87
+ }), v(() => {
84
88
  let e = s.value;
85
89
  i.value && (i.value.group = e ?? "");
86
- }), ne(() => {
90
+ }), v(() => {
87
91
  let e = i.value;
88
92
  if (!e) return;
89
93
  let t = u.value;
90
- t ? e.showLoading(ie(t) ? T : {
91
- ...T,
92
- ...t
93
- }) : e.hideLoading();
94
- }), oe(r, i, o), {
94
+ if (t) {
95
+ let n = e.getOption().darkMode === !0 ? {
96
+ ...D,
97
+ textColor: "#F4F8FF",
98
+ maskColor: "rgba(10, 12, 15, 0.8)"
99
+ } : D;
100
+ e.showLoading(ie(t) ? n : {
101
+ ...n,
102
+ ...t
103
+ });
104
+ } else e.hideLoading();
105
+ }), ae(r, i, o), {
95
106
  containerRef: r,
96
107
  chartRef: i
97
108
  };
98
109
  }
99
- function le(e) {
110
+ function ce(e) {
100
111
  return /^on[^a-z]/.test(e);
101
112
  }
102
- var ue = [
113
+ var le = [
103
114
  "class",
104
115
  "style",
105
116
  "autoResize",
@@ -110,11 +121,11 @@ var ue = [
110
121
  "theme",
111
122
  "onReady"
112
123
  ];
113
- function D(e, t = {}, n = !0) {
124
+ function k(e, t = {}, n = !0) {
114
125
  let r = {}, i = [];
115
126
  return Object.keys(e).forEach((t) => {
116
- if (!ue.includes(t)) {
117
- if (le(t)) {
127
+ if (!le.includes(t)) {
128
+ if (ce(t)) {
118
129
  if (n) return;
119
130
  let r = e[t];
120
131
  if (r) {
@@ -127,7 +138,7 @@ function D(e, t = {}, n = !0) {
127
138
  }
128
139
  } else r[t] = e[t];
129
140
  }
130
- }), f && !n && Object.keys(t).forEach((e) => {
141
+ }), p && !n && Object.keys(t).forEach((e) => {
131
142
  if (e === "ready" || e === "~ready") return;
132
143
  let n = t[e];
133
144
  if (n) {
@@ -144,7 +155,7 @@ function D(e, t = {}, n = !0) {
144
155
  };
145
156
  }
146
157
  // composables/useTooltips.ts
147
- function O(e, t) {
158
+ function A(e, t) {
148
159
  return `
149
160
  <div class="charts-tooltips">
150
161
  <div class="charts-tooltips-title">${e}</div>
@@ -157,7 +168,7 @@ function O(e, t) {
157
168
  </div>`;
158
169
  }
159
170
  // composables/useStripe.ts
160
- function k({ data: e = [], color: t = "", offset: n = [0, 0], rotate: r = -20, size: i = [2, 8] }) {
171
+ function j({ data: e = [], color: t = "", offset: n = [0, 0], rotate: r = -20, size: i = [2, 8] }) {
161
172
  return {
162
173
  name: "",
163
174
  data: e,
@@ -180,13 +191,13 @@ function k({ data: e = [], color: t = "", offset: n = [0, 0], rotate: r = -20, s
180
191
  animationEasing: "elasticOut"
181
192
  };
182
193
  }
183
- function de(e) {
194
+ function ue(e) {
184
195
  return {
185
196
  axisPointer: { lineStyle: { opacity: .6 } },
186
197
  formatter: function(t) {
187
198
  if (!t?.length) return "";
188
199
  let n = t[0].name;
189
- return O(n, t.filter((e) => !!e.seriesName).map((t) => ({
200
+ return A(n, t.filter((e) => !!e.seriesName).map((t) => ({
190
201
  name: t.seriesName,
191
202
  value: `${t.value} ${e}`,
192
203
  color: t.color
@@ -194,12 +205,12 @@ function de(e) {
194
205
  }
195
206
  };
196
207
  }
197
- function fe({ series: e, color: t, offset: n = [0, 0], rotate: r, size: i }) {
208
+ function de({ series: e, color: t, offset: n = [0, 0], rotate: r, size: i }) {
198
209
  return [{
199
210
  type: "bar",
200
211
  z: 0,
201
212
  ...e
202
- }, k({
213
+ }, j({
203
214
  data: e.data,
204
215
  offset: n,
205
216
  color: t,
@@ -207,7 +218,7 @@ function fe({ series: e, color: t, offset: n = [0, 0], rotate: r, size: i }) {
207
218
  size: i
208
219
  })];
209
220
  }
210
- function pe() {
221
+ function fe() {
211
222
  return { aria: {
212
223
  enabled: !0,
213
224
  decal: {
@@ -223,14 +234,14 @@ function pe() {
223
234
  } };
224
235
  }
225
236
  // composables/useReactiveAttrs.ts
226
- var me = {
237
+ var pe = {
227
238
  "auto-resize": "autoResize",
228
239
  "init-option": "initOption",
229
240
  "set-option-opts": "setOptionOpts"
230
241
  };
231
- function A(e) {
232
- let t = u()?.proxy, n = () => Object.fromEntries(Object.entries(f && t ? t.$attrs : e).map(([e, t]) => [me[e] ?? e, t]));
233
- if (f && t) return c(n);
242
+ function M(e) {
243
+ let t = u()?.proxy, n = () => Object.fromEntries(Object.entries(p && t ? t.$attrs : e).map(([e, t]) => [pe[e] ?? e, t]));
244
+ if (p && t) return c(n);
234
245
  let r = h(n());
235
246
  return m(() => {
236
247
  let e = n(), t = r.value;
@@ -238,15 +249,15 @@ function A(e) {
238
249
  }), r;
239
250
  }
240
251
  // utils/withChartProps.ts
241
- function j() {
252
+ function N() {
242
253
  return (e) => e;
243
254
  }
244
255
  // components/Chart.ts
245
- var he = j()(l({
256
+ var me = N()(l({
246
257
  name: "IxChart",
247
258
  inheritAttrs: !1,
248
259
  setup(e, t) {
249
- let { containerRef: n } = E(A(t.attrs), () => t.listeners ?? {});
260
+ let { containerRef: n } = O(M(t.attrs), () => t.listeners ?? {});
250
261
  return { containerRef: n };
251
262
  },
252
263
  render() {
@@ -263,44 +274,44 @@ var he = j()(l({
263
274
  }
264
275
  }));
265
276
  // ../../node_modules/.pnpm/@ctrl+tinycolor@4.2.2/node_modules/@ctrl/tinycolor/dist/module/util.js
266
- function M(e, t) {
267
- ge(e) && (e = "100%");
268
- let n = P(e);
277
+ function P(e, t) {
278
+ he(e) && (e = "100%");
279
+ let n = I(e);
269
280
  return e = t === 360 ? parseFloat(e) : Math.min(t, Math.max(0, parseFloat(e))), n && (e = parseInt(String(e * t), 10) / 100), Math.abs(e - t) < 1e-6 ? 1 : (e = t === 360 ? (e < 0 ? e % t + t : e % t) / t : e % t / t, e);
270
281
  }
271
- function N(e) {
282
+ function F(e) {
272
283
  return Math.min(1, Math.max(0, e));
273
284
  }
274
- function ge(e) {
275
- return typeof e == "string" && e.indexOf(".") !== -1 && !P(e) && parseFloat(e) === 1;
285
+ function he(e) {
286
+ return typeof e == "string" && e.indexOf(".") !== -1 && !I(e) && parseFloat(e) === 1;
276
287
  }
277
- function P(e) {
288
+ function I(e) {
278
289
  return typeof e == "string" && e.indexOf("%") !== -1;
279
290
  }
280
- function F(e) {
291
+ function L(e) {
281
292
  return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e;
282
293
  }
283
- function _e(e) {
294
+ function ge(e) {
284
295
  return Number(e) <= 1 ? `${Number(e) * 100}%` : e;
285
296
  }
286
- function I(e) {
287
- if (typeof e != "number" || !(e <= 1)) return _e(e);
297
+ function R(e) {
298
+ if (typeof e != "number" || !(e <= 1)) return ge(e);
288
299
  let t = Math.min(100, Math.max(0, e * 100)) * 100;
289
300
  return (t >= 1e-6 ? Math.trunc(t) : parseInt(String(t), 10)) / 100;
290
301
  }
291
- function ve(e) {
302
+ function _e(e) {
292
303
  return e.length === 1 ? "0" + e : String(e);
293
304
  }
294
305
  // ../../node_modules/.pnpm/@ctrl+tinycolor@4.2.2/node_modules/@ctrl/tinycolor/dist/module/conversion.js
295
- function ye(e, t, n) {
306
+ function ve(e, t, n) {
296
307
  return {
297
- r: M(e, 255) * 255,
298
- g: M(t, 255) * 255,
299
- b: M(n, 255) * 255
308
+ r: P(e, 255) * 255,
309
+ g: P(t, 255) * 255,
310
+ b: P(n, 255) * 255
300
311
  };
301
312
  }
302
- function L(e, t, n) {
303
- e = M(e, 255), t = M(t, 255), n = M(n, 255);
313
+ function z(e, t, n) {
314
+ e = P(e, 255), t = P(t, 255), n = P(n, 255);
304
315
  let r = Math.max(e, t, n), i = Math.min(e, t, n), a = 0, o, s = (r + i) / 2;
305
316
  if (r === i) o = 0, a = 0;
306
317
  else {
@@ -322,15 +333,15 @@ function L(e, t, n) {
322
333
  l: s
323
334
  };
324
335
  }
325
- function R(e, t, n) {
336
+ function B(e, t, n) {
326
337
  return n < 0 && (n += 1), n > 1 && --n, n < 1 / 6 ? e + (t - e) * (6 * n) : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e;
327
338
  }
328
- function be(e, t, n) {
339
+ function ye(e, t, n) {
329
340
  let r, i, a;
330
- if (e = M(e, 360), t = M(t, 100), n = M(n, 100), t === 0) i = n, a = n, r = n;
341
+ if (e = P(e, 360), t = P(t, 100), n = P(n, 100), t === 0) i = n, a = n, r = n;
331
342
  else {
332
343
  let o = n < .5 ? n * (1 + t) : n + t - n * t, s = 2 * n - o;
333
- r = R(s, o, e + 1 / 3), i = R(s, o, e), a = R(s, o, e - 1 / 3);
344
+ r = B(s, o, e + 1 / 3), i = B(s, o, e), a = B(s, o, e - 1 / 3);
334
345
  }
335
346
  return {
336
347
  r: r * 255,
@@ -338,8 +349,8 @@ function be(e, t, n) {
338
349
  b: a * 255
339
350
  };
340
351
  }
341
- function z(e, t, n) {
342
- e = M(e, 255), t = M(t, 255), n = M(n, 255);
352
+ function V(e, t, n) {
353
+ e = P(e, 255), t = P(t, 255), n = P(n, 255);
343
354
  let r = Math.max(e, t, n), i = Math.min(e, t, n), a = 0, o = r, s = r - i, c = r === 0 ? 0 : s / r;
344
355
  if (r === i) a = 0;
345
356
  else {
@@ -360,8 +371,8 @@ function z(e, t, n) {
360
371
  v: o
361
372
  };
362
373
  }
363
- function xe(e, t, n) {
364
- e = M(e, 360) * 6, t = M(t, 100), n = M(n, 100);
374
+ function be(e, t, n) {
375
+ e = P(e, 360) * 6, t = P(t, 100), n = P(n, 100);
365
376
  let r = Math.floor(e), i = e - r, a = n * (1 - t), o = n * (1 - i * t), s = n * (1 - (1 - i) * t), c = r % 6, l = [
366
377
  n,
367
378
  o,
@@ -390,25 +401,25 @@ function xe(e, t, n) {
390
401
  b: d * 255
391
402
  };
392
403
  }
393
- function B(e) {
404
+ function H(e) {
394
405
  return e < 10 ? 48 + e : 87 + e;
395
406
  }
396
- function V(e) {
407
+ function U(e) {
397
408
  let t = Math.round(e);
398
- return t >= 0 && t <= 255 ? String.fromCharCode(B(t >> 4), B(t & 15)) : ve(t.toString(16));
409
+ return t >= 0 && t <= 255 ? String.fromCharCode(H(t >> 4), H(t & 15)) : _e(t.toString(16));
399
410
  }
400
- function Se(e) {
401
- return V(parseFloat(e) * 255);
411
+ function xe(e) {
412
+ return U(parseFloat(e) * 255);
402
413
  }
403
- function H(e, t, n, r) {
404
- let i = V(e), a = V(t), o = V(n);
414
+ function W(e, t, n, r) {
415
+ let i = U(e), a = U(t), o = U(n);
405
416
  return r && i.startsWith(i.charAt(1)) && a.startsWith(a.charAt(1)) && o.startsWith(o.charAt(1)) ? i.charAt(0) + a.charAt(0) + o.charAt(0) : i + a + o;
406
417
  }
407
- function Ce(e, t, n, r, i) {
408
- let a = V(e), o = V(t), s = V(n), c = Se(r);
418
+ function Se(e, t, n, r, i) {
419
+ let a = U(e), o = U(t), s = U(n), c = xe(r);
409
420
  return i && a.startsWith(a.charAt(1)) && o.startsWith(o.charAt(1)) && s.startsWith(s.charAt(1)) && c.startsWith(c.charAt(1)) ? a.charAt(0) + o.charAt(0) + s.charAt(0) + c.charAt(0) : a + o + s + c;
410
421
  }
411
- function we(e, t, n, r) {
422
+ function Ce(e, t, n, r) {
412
423
  let i = e / 100, a = t / 100, o = n / 100, s = r / 100;
413
424
  return {
414
425
  r: 255 * (1 - i) * (1 - s),
@@ -416,7 +427,7 @@ function we(e, t, n, r) {
416
427
  b: 255 * (1 - o) * (1 - s)
417
428
  };
418
429
  }
419
- function U(e, t, n) {
430
+ function G(e, t, n) {
420
431
  let r = 1 - e / 255, i = 1 - t / 255, a = 1 - n / 255, o = Math.min(r, i, a);
421
432
  return o === 1 ? (r = 0, i = 0, a = 0) : (r = (r - o) / (1 - o) * 100, i = (i - o) / (1 - o) * 100, a = (a - o) / (1 - o) * 100), o *= 100, {
422
433
  c: Math.round(r),
@@ -425,7 +436,7 @@ function U(e, t, n) {
425
436
  k: Math.round(o)
426
437
  };
427
438
  }
428
- function Te(e) {
439
+ function we(e) {
429
440
  return {
430
441
  r: e >> 16,
431
442
  g: (e & 65280) >> 8,
@@ -433,7 +444,7 @@ function Te(e) {
433
444
  };
434
445
  }
435
446
  // ../../node_modules/.pnpm/@ctrl+tinycolor@4.2.2/node_modules/@ctrl/tinycolor/dist/module/css-color-names.js
436
- var W = {
447
+ var K = {
437
448
  aliceblue: "#f0f8ff",
438
449
  antiquewhite: "#faebd7",
439
450
  aqua: "#00ffff",
@@ -584,27 +595,27 @@ var W = {
584
595
  yellowgreen: "#9acd32"
585
596
  };
586
597
  // ../../node_modules/.pnpm/@ctrl+tinycolor@4.2.2/node_modules/@ctrl/tinycolor/dist/module/format-input.js
587
- function Ee(e) {
598
+ function Te(e) {
588
599
  let t = {
589
600
  r: 0,
590
601
  g: 0,
591
602
  b: 0
592
603
  }, n = 1, r = !1, i = !1;
593
- if (typeof e == "string" && (e = De(e)), typeof e == "object") {
594
- if (X(e.r) && X(e.g) && X(e.b)) {
595
- t = ye(e.r, e.g, e.b), r = !0;
604
+ if (typeof e == "string" && (e = Ee(e)), typeof e == "object") {
605
+ if (Q(e.r) && Q(e.g) && Q(e.b)) {
606
+ t = ve(e.r, e.g, e.b), r = !0;
596
607
  let { r: n } = e;
597
608
  i = typeof n != "number" && String(n).endsWith("%") ? "prgb" : "rgb";
598
- } else if (X(e.h) && X(e.s) && X(e.v)) {
599
- let n = I(e.s), a = I(e.v);
600
- t = xe(e.h, n, a), r = !0, i = "hsv";
601
- } else if (X(e.h) && X(e.s) && X(e.l)) {
602
- let n = I(e.s), a = I(e.l);
603
- t = be(e.h, n, a), r = !0, i = "hsl";
604
- } else X(e.c) && X(e.m) && X(e.y) && X(e.k) && (t = we(e.c, e.m, e.y, e.k), r = !0, i = "cmyk");
609
+ } else if (Q(e.h) && Q(e.s) && Q(e.v)) {
610
+ let n = R(e.s), a = R(e.v);
611
+ t = be(e.h, n, a), r = !0, i = "hsv";
612
+ } else if (Q(e.h) && Q(e.s) && Q(e.l)) {
613
+ let n = R(e.s), a = R(e.l);
614
+ t = ye(e.h, n, a), r = !0, i = "hsl";
615
+ } else Q(e.c) && Q(e.m) && Q(e.y) && Q(e.k) && (t = Ce(e.c, e.m, e.y, e.k), r = !0, i = "cmyk");
605
616
  Object.prototype.hasOwnProperty.call(e, "a") && (n = e.a);
606
617
  }
607
- return n = F(n), {
618
+ return n = L(n), {
608
619
  ok: r,
609
620
  format: e.format || i,
610
621
  r: Math.min(255, Math.max(t.r, 0)),
@@ -613,20 +624,20 @@ function Ee(e) {
613
624
  a: n
614
625
  };
615
626
  }
616
- var G = "(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)", K = "[\\s|\\(]+(" + G + ")[,|\\s]+(" + G + ")[,|\\s]+(" + G + ")\\s*\\)?", q = "[\\s|\\(]+(" + G + ")[,|\\s]+(" + G + ")[,|\\s]+(" + G + ")[,|\\s]+(" + G + ")\\s*\\)?", J = {
617
- CSS_UNIT: new RegExp(G),
618
- rgb: RegExp("rgb" + K),
619
- rgba: RegExp("rgba" + q),
620
- hsl: RegExp("hsl" + K),
621
- hsla: RegExp("hsla" + q),
622
- hsv: RegExp("hsv" + K),
623
- hsva: RegExp("hsva" + q),
624
- cmyk: RegExp("cmyk" + q)
627
+ var q = "(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)", J = "[\\s|\\(]+(" + q + ")[,|\\s]+(" + q + ")[,|\\s]+(" + q + ")\\s*\\)?", Y = "[\\s|\\(]+(" + q + ")[,|\\s]+(" + q + ")[,|\\s]+(" + q + ")[,|\\s]+(" + q + ")\\s*\\)?", X = {
628
+ CSS_UNIT: new RegExp(q),
629
+ rgb: RegExp("rgb" + J),
630
+ rgba: RegExp("rgba" + Y),
631
+ hsl: RegExp("hsl" + J),
632
+ hsla: RegExp("hsla" + Y),
633
+ hsv: RegExp("hsv" + J),
634
+ hsva: RegExp("hsva" + Y),
635
+ cmyk: RegExp("cmyk" + Y)
625
636
  };
626
- function De(e) {
637
+ function Ee(e) {
627
638
  if (e = e.trim().toLowerCase(), e.length === 0) return !1;
628
639
  let t = !1;
629
- if (W[e]) e = W[e], t = !0;
640
+ if (K[e]) e = K[e], t = !0;
630
641
  else if (e === "transparent") return {
631
642
  r: 0,
632
643
  g: 0,
@@ -635,55 +646,55 @@ function De(e) {
635
646
  format: "name"
636
647
  };
637
648
  if (typeof e == "string" && e.length <= 9) {
638
- let n = Oe(e, t);
649
+ let n = De(e, t);
639
650
  if (n) return n;
640
651
  }
641
- let n = J.rgb.exec(e);
652
+ let n = X.rgb.exec(e);
642
653
  return n ? {
643
654
  r: n[1],
644
655
  g: n[2],
645
656
  b: n[3]
646
- } : (n = J.rgba.exec(e), n ? {
657
+ } : (n = X.rgba.exec(e), n ? {
647
658
  r: n[1],
648
659
  g: n[2],
649
660
  b: n[3],
650
661
  a: n[4]
651
- } : (n = J.hsl.exec(e), n ? {
662
+ } : (n = X.hsl.exec(e), n ? {
652
663
  h: n[1],
653
664
  s: n[2],
654
665
  l: n[3]
655
- } : (n = J.hsla.exec(e), n ? {
666
+ } : (n = X.hsla.exec(e), n ? {
656
667
  h: n[1],
657
668
  s: n[2],
658
669
  l: n[3],
659
670
  a: n[4]
660
- } : (n = J.hsv.exec(e), n ? {
671
+ } : (n = X.hsv.exec(e), n ? {
661
672
  h: n[1],
662
673
  s: n[2],
663
674
  v: n[3]
664
- } : (n = J.hsva.exec(e), n ? {
675
+ } : (n = X.hsva.exec(e), n ? {
665
676
  h: n[1],
666
677
  s: n[2],
667
678
  v: n[3],
668
679
  a: n[4]
669
- } : (n = J.cmyk.exec(e), n ? {
680
+ } : (n = X.cmyk.exec(e), n ? {
670
681
  c: n[1],
671
682
  m: n[2],
672
683
  y: n[3],
673
684
  k: n[4]
674
685
  } : !1))))));
675
686
  }
676
- function Oe(e, t) {
687
+ function De(e, t) {
677
688
  let n = +!!e.startsWith("#"), r = e.length - n;
678
689
  if (r === 6 || r === 8) {
679
- let i = Y(e, n) * 16 + Y(e, n + 1), a = Y(e, n + 2) * 16 + Y(e, n + 3), o = Y(e, n + 4) * 16 + Y(e, n + 5);
690
+ let i = Z(e, n) * 16 + Z(e, n + 1), a = Z(e, n + 2) * 16 + Z(e, n + 3), o = Z(e, n + 4) * 16 + Z(e, n + 5);
680
691
  if (r === 6) return Number.isNaN(i + a + o) ? void 0 : {
681
692
  r: i,
682
693
  g: a,
683
694
  b: o,
684
695
  format: t ? "name" : "hex"
685
696
  };
686
- let s = Y(e, n + 6) * 16 + Y(e, n + 7);
697
+ let s = Z(e, n + 6) * 16 + Z(e, n + 7);
687
698
  return Number.isNaN(i + a + o + s) ? void 0 : {
688
699
  r: i,
689
700
  g: a,
@@ -693,14 +704,14 @@ function Oe(e, t) {
693
704
  };
694
705
  }
695
706
  if (r === 3 || r === 4) {
696
- let i = Y(e, n) * 17, a = Y(e, n + 1) * 17, o = Y(e, n + 2) * 17;
707
+ let i = Z(e, n) * 17, a = Z(e, n + 1) * 17, o = Z(e, n + 2) * 17;
697
708
  if (r === 3) return Number.isNaN(i + a + o) ? void 0 : {
698
709
  r: i,
699
710
  g: a,
700
711
  b: o,
701
712
  format: t ? "name" : "hex"
702
713
  };
703
- let s = Y(e, n + 3) * 17;
714
+ let s = Z(e, n + 3) * 17;
704
715
  return Number.isNaN(i + a + o + s) ? void 0 : {
705
716
  r: i,
706
717
  g: a,
@@ -710,19 +721,19 @@ function Oe(e, t) {
710
721
  };
711
722
  }
712
723
  }
713
- function Y(e, t) {
724
+ function Z(e, t) {
714
725
  let n = e.charCodeAt(t);
715
726
  return n >= 48 && n <= 57 ? n - 48 : n >= 97 && n <= 102 ? n - 87 : n >= 65 && n <= 70 ? n - 55 : NaN;
716
727
  }
717
- function X(e) {
718
- return typeof e == "number" ? !Number.isNaN(e) : e !== void 0 && J.CSS_UNIT.test(e);
728
+ function Q(e) {
729
+ return typeof e == "number" ? !Number.isNaN(e) : e !== void 0 && X.CSS_UNIT.test(e);
719
730
  }
720
731
  // ../../node_modules/.pnpm/@ctrl+tinycolor@4.2.2/node_modules/@ctrl/tinycolor/dist/module/index.js
721
- var ke = class e {
732
+ var Oe = class e {
722
733
  constructor(t = "", n = {}) {
723
734
  if (t instanceof e) return t;
724
- typeof t == "number" && (t = Te(t)), this.originalInput = t;
725
- let r = Ee(t);
735
+ typeof t == "number" && (t = we(t)), this.originalInput = t;
736
+ let r = Te(t);
726
737
  this.originalInput = t, this.r = r.r, this.g = r.g, this.b = r.b, this.a = r.a, this.roundA = Math.round(100 * this.a) / 100, this.format = n.format ?? r.format, this.gradientType = n.gradientType, this.r < 1 && (this.r = Math.round(this.r)), this.g < 1 && (this.g = Math.round(this.g)), this.b < 1 && (this.b = Math.round(this.b)), this.isValid = r.ok;
727
738
  }
728
739
  isDark() {
@@ -743,14 +754,14 @@ var ke = class e {
743
754
  return this.a;
744
755
  }
745
756
  setAlpha(e) {
746
- return this.a = F(e), this.roundA = Math.round(100 * this.a) / 100, this;
757
+ return this.a = L(e), this.roundA = Math.round(100 * this.a) / 100, this;
747
758
  }
748
759
  isMonochrome() {
749
760
  let { s: e } = this.toHsl();
750
761
  return e === 0;
751
762
  }
752
763
  toHsv() {
753
- let e = z(this.r, this.g, this.b);
764
+ let e = V(this.r, this.g, this.b);
754
765
  return {
755
766
  h: e.h * 360,
756
767
  s: e.s,
@@ -759,11 +770,11 @@ var ke = class e {
759
770
  };
760
771
  }
761
772
  toHsvString() {
762
- let e = z(this.r, this.g, this.b), t = Math.round(e.h * 360), n = Math.round(e.s * 100), r = Math.round(e.v * 100);
773
+ let e = V(this.r, this.g, this.b), t = Math.round(e.h * 360), n = Math.round(e.s * 100), r = Math.round(e.v * 100);
763
774
  return this.a === 1 ? `hsv(${t}, ${n}%, ${r}%)` : `hsva(${t}, ${n}%, ${r}%, ${this.roundA})`;
764
775
  }
765
776
  toHsl() {
766
- let e = L(this.r, this.g, this.b);
777
+ let e = z(this.r, this.g, this.b);
767
778
  return {
768
779
  h: e.h * 360,
769
780
  s: e.s,
@@ -772,17 +783,17 @@ var ke = class e {
772
783
  };
773
784
  }
774
785
  toHslString() {
775
- let e = L(this.r, this.g, this.b), t = Math.round(e.h * 360), n = Math.round(e.s * 100), r = Math.round(e.l * 100);
786
+ let e = z(this.r, this.g, this.b), t = Math.round(e.h * 360), n = Math.round(e.s * 100), r = Math.round(e.l * 100);
776
787
  return this.a === 1 ? `hsl(${t}, ${n}%, ${r}%)` : `hsla(${t}, ${n}%, ${r}%, ${this.roundA})`;
777
788
  }
778
789
  toHex(e = !1) {
779
- return H(this.r, this.g, this.b, e);
790
+ return W(this.r, this.g, this.b, e);
780
791
  }
781
792
  toHexString(e = !1) {
782
793
  return "#" + this.toHex(e);
783
794
  }
784
795
  toHex8(e = !1) {
785
- return Ce(this.r, this.g, this.b, this.a, e);
796
+ return Se(this.r, this.g, this.b, this.a, e);
786
797
  }
787
798
  toHex8String(e = !1) {
788
799
  return "#" + this.toHex8(e);
@@ -803,7 +814,7 @@ var ke = class e {
803
814
  return this.a === 1 ? `rgb(${e}, ${t}, ${n})` : `rgba(${e}, ${t}, ${n}, ${this.roundA})`;
804
815
  }
805
816
  toPercentageRgb() {
806
- let e = (e) => `${Math.round(M(e, 255) * 100)}%`;
817
+ let e = (e) => `${Math.round(P(e, 255) * 100)}%`;
807
818
  return {
808
819
  r: e(this.r),
809
820
  g: e(this.g),
@@ -812,20 +823,20 @@ var ke = class e {
812
823
  };
813
824
  }
814
825
  toPercentageRgbString() {
815
- let e = (e) => Math.round(M(e, 255) * 100);
826
+ let e = (e) => Math.round(P(e, 255) * 100);
816
827
  return this.a === 1 ? `rgb(${e(this.r)}%, ${e(this.g)}%, ${e(this.b)}%)` : `rgba(${e(this.r)}%, ${e(this.g)}%, ${e(this.b)}%, ${this.roundA})`;
817
828
  }
818
829
  toCmyk() {
819
- return { ...U(this.r, this.g, this.b) };
830
+ return { ...G(this.r, this.g, this.b) };
820
831
  }
821
832
  toCmykString() {
822
- let { c: e, m: t, y: n, k: r } = U(this.r, this.g, this.b);
833
+ let { c: e, m: t, y: n, k: r } = G(this.r, this.g, this.b);
823
834
  return `cmyk(${e}, ${t}, ${n}, ${r})`;
824
835
  }
825
836
  toName() {
826
837
  if (this.a === 0) return "transparent";
827
838
  if (this.a < 1) return !1;
828
- let e = "#" + H(this.r, this.g, this.b, !1), t = W;
839
+ let e = "#" + W(this.r, this.g, this.b, !1), t = K;
829
840
  for (let n in t) if (Object.prototype.hasOwnProperty.call(t, n) && t[n] === e) return n;
830
841
  return !1;
831
842
  }
@@ -843,7 +854,7 @@ var ke = class e {
843
854
  }
844
855
  lighten(t = 10) {
845
856
  let n = this.toHsl();
846
- return n.l += t / 100, n.l = N(n.l), new e(n);
857
+ return n.l += t / 100, n.l = F(n.l), new e(n);
847
858
  }
848
859
  brighten(t = 10) {
849
860
  let n = this.toRgb();
@@ -851,7 +862,7 @@ var ke = class e {
851
862
  }
852
863
  darken(t = 10) {
853
864
  let n = this.toHsl();
854
- return n.l -= t / 100, n.l = N(n.l), new e(n);
865
+ return n.l -= t / 100, n.l = F(n.l), new e(n);
855
866
  }
856
867
  tint(e = 10) {
857
868
  return this.mix("white", e);
@@ -861,11 +872,11 @@ var ke = class e {
861
872
  }
862
873
  desaturate(t = 10) {
863
874
  let n = this.toHsl();
864
- return n.s -= t / 100, n.s = N(n.s), new e(n);
875
+ return n.s -= t / 100, n.s = F(n.s), new e(n);
865
876
  }
866
877
  saturate(t = 10) {
867
878
  let n = this.toHsl();
868
- return n.s += t / 100, n.s = N(n.s), new e(n);
879
+ return n.s += t / 100, n.s = F(n.s), new e(n);
869
880
  }
870
881
  greyscale() {
871
882
  return this.desaturate(100);
@@ -945,7 +956,7 @@ var ke = class e {
945
956
  let n = new e(t);
946
957
  return this.format === "cmyk" || n.format === "cmyk" ? this.toCmykString() === n.toCmykString() : this.toRgbString() === n.toRgbString();
947
958
  }
948
- }, Z = [
959
+ }, $ = [
949
960
  "#458FFF",
950
961
  "#45D9A3",
951
962
  "#FFC145",
@@ -957,7 +968,7 @@ var ke = class e {
957
968
  "#F587B3",
958
969
  "#8352CC",
959
970
  "#65779B"
960
- ], Ae = [
971
+ ], ke = [
961
972
  "#458FFF",
962
973
  "#C8DEFF",
963
974
  "#45D9A3",
@@ -980,7 +991,7 @@ var ke = class e {
980
991
  "#FCDBE8",
981
992
  "#65779B",
982
993
  "#65779B"
983
- ], je = [
994
+ ], Ae = [
984
995
  "#8C1604",
985
996
  "#DB4C35",
986
997
  "#FF9245",
@@ -988,8 +999,8 @@ var ke = class e {
988
999
  "#689FFF",
989
1000
  "#45D9A3",
990
1001
  "#99ACD1"
991
- ], Q = {
992
- color: Z,
1002
+ ], je = {
1003
+ color: $,
993
1004
  textStyle: {
994
1005
  color: "#6F7785",
995
1006
  fontSize: "12px"
@@ -1042,6 +1053,7 @@ var ke = class e {
1042
1053
  }
1043
1054
  },
1044
1055
  tooltip: {
1056
+ backgroundColor: "rgba(251, 253, 255, 0.88)",
1045
1057
  borderWidth: 0,
1046
1058
  padding: 12,
1047
1059
  textStyle: { color: "#2F3540" },
@@ -1090,7 +1102,7 @@ function Me(e) {
1090
1102
  return !!(e && e.xAxis && e.xAxis.data);
1091
1103
  }
1092
1104
  function Ne(e, t) {
1093
- return f ? {
1105
+ return p ? {
1094
1106
  attrs: { ...e },
1095
1107
  on: { ...t }
1096
1108
  } : { ...e };
@@ -1099,16 +1111,16 @@ function Pe(e) {
1099
1111
  return Object.entries(e).reduce((e, [t, n]) => (n !== void 0 && (e[t] = n), e), {});
1100
1112
  }
1101
1113
  function Fe(e) {
1102
- return ae(e) ? [] : Array.isArray(e) ? e : [e];
1114
+ return w(e) ? [] : Array.isArray(e) ? e : [e];
1103
1115
  }
1104
- var Ie = (e, t) => new ke(e).setAlpha(t).toRgbString();
1105
- function $(e, t) {
1106
- return x(t), y("seer", Q), e.install = (t) => {
1116
+ var Ie = (e, t) => new Oe(e).setAlpha(t).toRgbString();
1117
+ function Le(e, t) {
1118
+ return x(t), b("seer", je), e.install = (t) => {
1107
1119
  t.component(e.name, e);
1108
1120
  }, e;
1109
1121
  }
1110
1122
  // components/index.ts
1111
- var Le = $(he, [
1123
+ var Re = Le(me, [
1112
1124
  e,
1113
1125
  n,
1114
1126
  t,
@@ -1118,4 +1130,4 @@ var Le = $(he, [
1118
1130
  o,
1119
1131
  s
1120
1132
  ]);
1121
- export { Le as IxChart, Fe as convertArray, $ as createInstall, Pe as filterEmptyProps, Ie as getAlphaColor, Me as isVertical, Ne as mergeAttrs, Z as seerColors, Ae as seerColorsForMore, je as seerColorsForRisk, Q as seerTheme, E as useChart, A as useReactiveAttrs, k as useStripe, pe as useStripeArea, fe as useStripeBarSeries, de as useStripeBarTooltip, O as useTooltipsFormatter, j as withChartProps };
1133
+ export { E as CHART_THEME_TOKEN, Re as IxChart, Fe as convertArray, Le as createInstall, Pe as filterEmptyProps, Ie as getAlphaColor, Me as isVertical, Ne as mergeAttrs, $ as seerColors, ke as seerColorsForMore, Ae as seerColorsForRisk, je as seerTheme, O as useChart, M as useReactiveAttrs, j as useStripe, fe as useStripeArea, de as useStripeBarSeries, ue as useStripeBarTooltip, A as useTooltipsFormatter, N as withChartProps };
@@ -1,4 +1,4 @@
1
- (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("echarts/components"),require("echarts/features"),require("echarts/renderers"),require("vue-demi"),require("echarts/charts"),require("echarts/core"),require("lodash-es")):typeof define==`function`&&define.amd?define([`exports`,`echarts/components`,`echarts/features`,`echarts/renderers`,`vue-demi`,`echarts/charts`,`echarts/core`,`lodash-es`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.IduxChartsCore={},e.echarts,e.echarts,e.echarts,e.VueDemi,e.echarts,e.echarts,e._))})(this,function(e,t,n,r,i,a,o,s){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function c(e,t,n){(0,i.watch)([e,t,n],([e,n,r],i,a)=>{if(!e||!n||!r)return;let s=(0,o.throttle)(()=>{t.value===n&&n.resize()},16);u(e,s),a(()=>{d(e,s),s.clear()})})}var l=new Map;function u(e,t,n){if(e&&t){if(l.has(e))l.get(e).listeners.push(t);else{let r=[t],i=new ResizeObserver(e=>{e.forEach(e=>r.forEach(t=>t(e)))});i.observe(e,n),l.set(e,{listeners:r,ro:i})}}}function d(e,t){if(!e||!t||!l.has(e))return;let{listeners:n,ro:r}=l.get(e),i=n.indexOf(t);i>-1&&(n.splice(i,1),n.length===0&&(r.disconnect(),l.delete(e)))}(0,o.use)([a.PictorialBarChart]);var f={text:`加载中...`};function p(e,t){let n=()=>typeof t==`function`?t():t,r=(0,i.shallowRef)(),a=(0,i.shallowRef)(),l=(0,i.shallowRef)(),u=(0,i.computed)(()=>(0,i.unref)(e).autoResize??!0),d=(0,i.computed)(()=>(0,i.unref)(e).group),p=(0,i.computed)(()=>(0,i.unref)(e).initOption),m=(0,i.computed)(()=>(0,i.unref)(e).loading),h=(0,i.computed)(()=>(0,i.unref)(e).setOptionOpts),_=(0,i.computed)(()=>(0,i.unref)(e).theme??`seer`),v=[],y=(e,t)=>{v=v.filter(n=>{let r=t.some(([e,t,r])=>e===n.name&&t===n.handler&&r===n.once);return r||e.off(n.name,n.wrapped),r}),t.forEach(([t,n,r])=>{if(v.some(e=>e.name===t&&e.handler===n&&e.once===r))return;let i=(...a)=>{r&&e.off(t,i),n(...a)};v.push({name:t,handler:n,once:r,wrapped:i}),e.on(t,i)})},b=()=>{let t=r.value;if(!t)return;let c=(0,o.init)(t,_.value,p.value),u=(0,i.unref)(e),{restOptions:d,events:f}=g(u,n(),!1);c.setOption(d,h.value),l.value=(0,s.cloneDeep)(d),y(c,f);let m=u.onReady||n()?.ready;m&&m(c),a.value=c},x=()=>{a.value&&(a.value.dispose(),a.value=void 0,v=[])};return(0,i.onMounted)(()=>b()),(0,i.onBeforeUnmount)(()=>x()),(0,i.onUpdated)(()=>{a.value&&y(a.value,g((0,i.unref)(e),n(),!1).events)}),(0,i.watch)(()=>(0,i.unref)(e),e=>{let t=a.value;if(!t)return;let{restOptions:r,events:i}=g(e,n(),!1);y(t,i),(0,s.isEqual)(r,l.value)||(t.setOption(r,h.value),l.value=(0,s.cloneDeep)(r))},{deep:!0}),(0,i.watch)([()=>(0,s.cloneDeep)(_.value),()=>(0,s.cloneDeep)(p.value)],([e,t],[n,r])=>{(0,s.isEqual)(e,n)&&(0,s.isEqual)(t,r)||(x(),b())}),(0,i.watchEffect)(()=>{let e=d.value;a.value&&(a.value.group=e??``)}),(0,i.watchEffect)(()=>{let e=a.value;if(!e)return;let t=m.value;t?e.showLoading((0,s.isBoolean)(t)?f:{...f,...t}):e.hideLoading()}),c(r,a,u),{containerRef:r,chartRef:a}}function m(e){return/^on[^a-z]/.test(e)}var h=[`class`,`style`,`autoResize`,`initOption`,`group`,`loading`,`setOptionOpts`,`theme`,`onReady`];function g(e,t={},n=!0){let r={},a=[];return Object.keys(e).forEach(t=>{if(!h.includes(t)){if(m(t)){if(n)return;let r=e[t];if(r){let e=t.endsWith(`Once`),n=e?t.length-4:void 0,i=t.charAt(2).toLowerCase()+t.substring(3,n);a.push([i,r,e])}}else r[t]=e[t]}}),i.isVue2&&!n&&Object.keys(t).forEach(e=>{if(e===`ready`||e===`~ready`)return;let n=t[e];if(n){let t=e.startsWith(`~`),r=+!!t,i=e.substring(r);a.push([i,n,t])}}),{restOptions:r,events:a}}function _(e,t){return`
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("echarts/components"),require("echarts/features"),require("echarts/renderers"),require("vue-demi"),require("echarts/charts"),require("echarts/core"),require("lodash-es")):typeof define==`function`&&define.amd?define([`exports`,`echarts/components`,`echarts/features`,`echarts/renderers`,`vue-demi`,`echarts/charts`,`echarts/core`,`lodash-es`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.IduxChartsCore={},e.echarts,e.echarts,e.echarts,e.VueDemi,e.echarts,e.echarts,e._))})(this,function(e,t,n,r,i,a,o,s){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function c(e,t,n){(0,i.watch)([e,t,n],([e,n,r],i,a)=>{if(!e||!n||!r)return;let o,s=()=>{o===void 0&&(o=requestAnimationFrame(()=>{o=void 0,t.value===n&&n.resize()}))};u(e,s),a(()=>{d(e,s),o!==void 0&&cancelAnimationFrame(o)})})}var l=new Map;function u(e,t,n){if(e&&t){if(l.has(e))l.get(e).listeners.push(t);else{let r=[t],i=new ResizeObserver(e=>{e.forEach(e=>r.forEach(t=>t(e)))});i.observe(e,n),l.set(e,{listeners:r,ro:i})}}}function d(e,t){if(!e||!t||!l.has(e))return;let{listeners:n,ro:r}=l.get(e),i=n.indexOf(t);i>-1&&(n.splice(i,1),n.length===0&&(r.disconnect(),l.delete(e)))}var f=Symbol(`CHART_THEME_TOKEN`);(0,o.use)([a.PictorialBarChart]);var p={text:`加载中...`};function m(e,t){let n=()=>typeof t==`function`?t():t,r=(0,i.shallowRef)(),a=(0,i.shallowRef)(),l=(0,i.shallowRef)(),u=(0,i.computed)(()=>(0,i.unref)(e).autoResize??!0),d=(0,i.computed)(()=>(0,i.unref)(e).group),m=(0,i.computed)(()=>(0,i.unref)(e).initOption),h=(0,i.computed)(()=>(0,i.unref)(e).loading),g=(0,i.computed)(()=>(0,i.unref)(e).setOptionOpts),v=(0,i.inject)(f,void 0),y=(0,i.computed)(()=>(0,i.unref)(e).theme??(0,i.unref)(v)??`seer`),b=[],x=(e,t)=>{b=b.filter(n=>{let r=t.some(([e,t,r])=>e===n.name&&t===n.handler&&r===n.once);return r||e.off(n.name,n.wrapped),r}),t.forEach(([t,n,r])=>{if(b.some(e=>e.name===t&&e.handler===n&&e.once===r))return;let i=(...a)=>{r&&e.off(t,i),n(...a)};b.push({name:t,handler:n,once:r,wrapped:i}),e.on(t,i)})},S=()=>{let t=r.value;if(!t)return;let c=(0,o.init)(t,y.value,m.value),u=(0,i.unref)(e),{restOptions:d,events:f}=_(u,n(),!1);c.setOption(d,g.value),l.value=(0,s.cloneDeep)(d),x(c,f);let p=u.onReady||n()?.ready;p&&p(c),a.value=c},C=()=>{a.value&&(a.value.dispose(),a.value=void 0,b=[])};return(0,i.onMounted)(()=>S()),(0,i.onBeforeUnmount)(()=>C()),(0,i.onUpdated)(()=>{a.value&&x(a.value,_((0,i.unref)(e),n(),!1).events)}),(0,i.watch)(()=>(0,i.unref)(e),e=>{let t=a.value;if(!t)return;let{restOptions:r,events:i}=_(e,n(),!1);x(t,i),(0,s.isEqual)(r,l.value)||(t.setOption(r,g.value),l.value=(0,s.cloneDeep)(r))},{deep:!0}),(0,i.watch)([()=>(0,s.cloneDeep)(y.value),()=>(0,s.cloneDeep)(m.value)],([e,t],[n,r])=>{(0,s.isEqual)(e,n)&&(0,s.isEqual)(t,r)||(C(),S())}),(0,i.watchEffect)(()=>{let e=d.value;a.value&&(a.value.group=e??``)}),(0,i.watchEffect)(()=>{let e=a.value;if(!e)return;let t=h.value;if(t){let n=e.getOption().darkMode===!0?{...p,textColor:`#F4F8FF`,maskColor:`rgba(10, 12, 15, 0.8)`}:p;e.showLoading((0,s.isBoolean)(t)?n:{...n,...t})}else e.hideLoading()}),c(r,a,u),{containerRef:r,chartRef:a}}function h(e){return/^on[^a-z]/.test(e)}var g=[`class`,`style`,`autoResize`,`initOption`,`group`,`loading`,`setOptionOpts`,`theme`,`onReady`];function _(e,t={},n=!0){let r={},a=[];return Object.keys(e).forEach(t=>{if(!g.includes(t)){if(h(t)){if(n)return;let r=e[t];if(r){let e=t.endsWith(`Once`),n=e?t.length-4:void 0,i=t.charAt(2).toLowerCase()+t.substring(3,n);a.push([i,r,e])}}else r[t]=e[t]}}),i.isVue2&&!n&&Object.keys(t).forEach(e=>{if(e===`ready`||e===`~ready`)return;let n=t[e];if(n){let t=e.startsWith(`~`),r=+!!t,i=e.substring(r);a.push([i,n,t])}}),{restOptions:r,events:a}}function v(e,t){return`
2
2
  <div class="charts-tooltips">
3
3
  <div class="charts-tooltips-title">${e}</div>
4
4
  ${t.map(e=>`
@@ -7,4 +7,4 @@
7
7
  <span class="charts-tooltips-item-name">${e.name}</span>
8
8
  <span class="charts-tooltips-item-value">${e.value}</span>
9
9
  </div>`).join(``)}
10
- </div>`}function v({data:e=[],color:t=``,offset:n=[0,0],rotate:r=-20,size:i=[2,8]}){return{name:``,data:e,type:`pictorialBar`,symbolRotate:r,silent:!0,itemStyle:{color:t,opacity:0},emphasis:{itemStyle:{opacity:1}},symbolRepeat:`fixed`,symbolMargin:2,symbol:`rect`,symbolClip:!0,symbolSize:i,symbolPosition:`start`,symbolOffset:n,z:1,animationEasing:`elasticOut`}}function y(e){return{axisPointer:{lineStyle:{opacity:.6}},formatter:function(t){if(!t?.length)return``;let n=t[0].name;return _(n,t.filter(e=>!!e.seriesName).map(t=>({name:t.seriesName,value:`${t.value} ${e}`,color:t.color})))}}}function b({series:e,color:t,offset:n=[0,0],rotate:r,size:i}){return[{type:`bar`,z:0,...e},v({data:e.data,offset:n,color:t,rotate:r,size:i})]}function x(){return{aria:{enabled:!0,decal:{show:!0,decals:[{color:`white`,dashArrayX:[1,0],dashArrayY:[6,0],symbolSize:.5,rotation:Math.PI/2}]}}}}var S={"auto-resize":`autoResize`,"init-option":`initOption`,"set-option-opts":`setOptionOpts`};function C(e){let t=(0,i.getCurrentInstance)()?.proxy,n=()=>Object.fromEntries(Object.entries(i.isVue2&&t?t.$attrs:e).map(([e,t])=>[S[e]??e,t]));if(i.isVue2&&t)return(0,i.computed)(n);let r=(0,i.shallowRef)(n());return(0,i.onBeforeUpdate)(()=>{let e=n(),t=r.value;(Object.keys(t).length!==Object.keys(e).length||Object.keys(e).some(n=>!Object.is(t[n],e[n])))&&(r.value=e)}),r}function w(){return e=>e}var ee=w()((0,i.defineComponent)({name:`IxChart`,inheritAttrs:!1,setup(e,t){let{containerRef:n}=p(C(t.attrs),()=>t.listeners??{});return{containerRef:n}},render(){let{class:e,style:t}=this.$attrs;return(0,i.h)(`div`,{ref:`containerRef`,class:e,style:{width:`100%`,height:`100%`,...t}})}}));function T(e,t){D(e)&&(e=`100%`);let n=O(e);return e=t===360?parseFloat(e):Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(e=t===360?(e<0?e%t+t:e%t)/t:e%t/t,e)}function E(e){return Math.min(1,Math.max(0,e))}function D(e){return typeof e==`string`&&e.indexOf(`.`)!==-1&&!O(e)&&parseFloat(e)===1}function O(e){return typeof e==`string`&&e.indexOf(`%`)!==-1}function k(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function A(e){return Number(e)<=1?`${Number(e)*100}%`:e}function j(e){if(typeof e!=`number`||!(e<=1))return A(e);let t=Math.min(100,Math.max(0,e*100))*100;return(t>=1e-6?Math.trunc(t):parseInt(String(t),10))/100}function M(e){return e.length===1?`0`+e:String(e)}function te(e,t,n){return{r:T(e,255)*255,g:T(t,255)*255,b:T(n,255)*255}}function N(e,t,n){e=T(e,255),t=T(t,255),n=T(n,255);let r=Math.max(e,t,n),i=Math.min(e,t,n),a=0,o,s=(r+i)/2;if(r===i)o=0,a=0;else{let c=r-i;switch(o=s>.5?c/(2-r-i):c/(r+i),r){case e:a=(t-n)/c+(t<n?6:0);break;case t:a=(n-e)/c+2;break;case n:a=(e-t)/c+4}a/=6}return{h:a,s:o,l:s}}function P(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function ne(e,t,n){let r,i,a;if(e=T(e,360),t=T(t,100),n=T(n,100),t===0)i=n,a=n,r=n;else{let o=n<.5?n*(1+t):n+t-n*t,s=2*n-o;r=P(s,o,e+1/3),i=P(s,o,e),a=P(s,o,e-1/3)}return{r:r*255,g:i*255,b:a*255}}function F(e,t,n){e=T(e,255),t=T(t,255),n=T(n,255);let r=Math.max(e,t,n),i=Math.min(e,t,n),a=0,o=r,s=r-i,c=r===0?0:s/r;if(r===i)a=0;else{switch(r){case e:a=(t-n)/s+(t<n?6:0);break;case t:a=(n-e)/s+2;break;case n:a=(e-t)/s+4}a/=6}return{h:a,s:c,v:o}}function I(e,t,n){e=T(e,360)*6,t=T(t,100),n=T(n,100);let r=Math.floor(e),i=e-r,a=n*(1-t),o=n*(1-i*t),s=n*(1-(1-i)*t),c=r%6,l=[n,o,a,a,s,n][c],u=[s,n,n,o,a,a][c],d=[a,a,s,n,n,o][c];return{r:l*255,g:u*255,b:d*255}}function L(e){return e<10?48+e:87+e}function R(e){let t=Math.round(e);return t>=0&&t<=255?String.fromCharCode(L(t>>4),L(t&15)):M(t.toString(16))}function z(e){return R(parseFloat(e)*255)}function B(e,t,n,r){let i=R(e),a=R(t),o=R(n);return r&&i.startsWith(i.charAt(1))&&a.startsWith(a.charAt(1))&&o.startsWith(o.charAt(1))?i.charAt(0)+a.charAt(0)+o.charAt(0):i+a+o}function re(e,t,n,r,i){let a=R(e),o=R(t),s=R(n),c=z(r);return i&&a.startsWith(a.charAt(1))&&o.startsWith(o.charAt(1))&&s.startsWith(s.charAt(1))&&c.startsWith(c.charAt(1))?a.charAt(0)+o.charAt(0)+s.charAt(0)+c.charAt(0):a+o+s+c}function ie(e,t,n,r){let i=e/100,a=t/100,o=n/100,s=r/100;return{r:255*(1-i)*(1-s),g:255*(1-a)*(1-s),b:255*(1-o)*(1-s)}}function V(e,t,n){let r=1-e/255,i=1-t/255,a=1-n/255,o=Math.min(r,i,a);return o===1?(r=0,i=0,a=0):(r=(r-o)/(1-o)*100,i=(i-o)/(1-o)*100,a=(a-o)/(1-o)*100),o*=100,{c:Math.round(r),m:Math.round(i),y:Math.round(a),k:Math.round(o)}}function H(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var U={aliceblue:`#f0f8ff`,antiquewhite:`#faebd7`,aqua:`#00ffff`,aquamarine:`#7fffd4`,azure:`#f0ffff`,beige:`#f5f5dc`,bisque:`#ffe4c4`,black:`#000000`,blanchedalmond:`#ffebcd`,blue:`#0000ff`,blueviolet:`#8a2be2`,brown:`#a52a2a`,burlywood:`#deb887`,cadetblue:`#5f9ea0`,chartreuse:`#7fff00`,chocolate:`#d2691e`,coral:`#ff7f50`,cornflowerblue:`#6495ed`,cornsilk:`#fff8dc`,crimson:`#dc143c`,cyan:`#00ffff`,darkblue:`#00008b`,darkcyan:`#008b8b`,darkgoldenrod:`#b8860b`,darkgray:`#a9a9a9`,darkgreen:`#006400`,darkgrey:`#a9a9a9`,darkkhaki:`#bdb76b`,darkmagenta:`#8b008b`,darkolivegreen:`#556b2f`,darkorange:`#ff8c00`,darkorchid:`#9932cc`,darkred:`#8b0000`,darksalmon:`#e9967a`,darkseagreen:`#8fbc8f`,darkslateblue:`#483d8b`,darkslategray:`#2f4f4f`,darkslategrey:`#2f4f4f`,darkturquoise:`#00ced1`,darkviolet:`#9400d3`,deeppink:`#ff1493`,deepskyblue:`#00bfff`,dimgray:`#696969`,dimgrey:`#696969`,dodgerblue:`#1e90ff`,firebrick:`#b22222`,floralwhite:`#fffaf0`,forestgreen:`#228b22`,fuchsia:`#ff00ff`,gainsboro:`#dcdcdc`,ghostwhite:`#f8f8ff`,goldenrod:`#daa520`,gold:`#ffd700`,gray:`#808080`,green:`#008000`,greenyellow:`#adff2f`,grey:`#808080`,honeydew:`#f0fff0`,hotpink:`#ff69b4`,indianred:`#cd5c5c`,indigo:`#4b0082`,ivory:`#fffff0`,khaki:`#f0e68c`,lavenderblush:`#fff0f5`,lavender:`#e6e6fa`,lawngreen:`#7cfc00`,lemonchiffon:`#fffacd`,lightblue:`#add8e6`,lightcoral:`#f08080`,lightcyan:`#e0ffff`,lightgoldenrodyellow:`#fafad2`,lightgray:`#d3d3d3`,lightgreen:`#90ee90`,lightgrey:`#d3d3d3`,lightpink:`#ffb6c1`,lightsalmon:`#ffa07a`,lightseagreen:`#20b2aa`,lightskyblue:`#87cefa`,lightslategray:`#778899`,lightslategrey:`#778899`,lightsteelblue:`#b0c4de`,lightyellow:`#ffffe0`,lime:`#00ff00`,limegreen:`#32cd32`,linen:`#faf0e6`,magenta:`#ff00ff`,maroon:`#800000`,mediumaquamarine:`#66cdaa`,mediumblue:`#0000cd`,mediumorchid:`#ba55d3`,mediumpurple:`#9370db`,mediumseagreen:`#3cb371`,mediumslateblue:`#7b68ee`,mediumspringgreen:`#00fa9a`,mediumturquoise:`#48d1cc`,mediumvioletred:`#c71585`,midnightblue:`#191970`,mintcream:`#f5fffa`,mistyrose:`#ffe4e1`,moccasin:`#ffe4b5`,navajowhite:`#ffdead`,navy:`#000080`,oldlace:`#fdf5e6`,olive:`#808000`,olivedrab:`#6b8e23`,orange:`#ffa500`,orangered:`#ff4500`,orchid:`#da70d6`,palegoldenrod:`#eee8aa`,palegreen:`#98fb98`,paleturquoise:`#afeeee`,palevioletred:`#db7093`,papayawhip:`#ffefd5`,peachpuff:`#ffdab9`,peru:`#cd853f`,pink:`#ffc0cb`,plum:`#dda0dd`,powderblue:`#b0e0e6`,purple:`#800080`,rebeccapurple:`#663399`,red:`#ff0000`,rosybrown:`#bc8f8f`,royalblue:`#4169e1`,saddlebrown:`#8b4513`,salmon:`#fa8072`,sandybrown:`#f4a460`,seagreen:`#2e8b57`,seashell:`#fff5ee`,sienna:`#a0522d`,silver:`#c0c0c0`,skyblue:`#87ceeb`,slateblue:`#6a5acd`,slategray:`#708090`,slategrey:`#708090`,snow:`#fffafa`,springgreen:`#00ff7f`,steelblue:`#4682b4`,tan:`#d2b48c`,teal:`#008080`,thistle:`#d8bfd8`,tomato:`#ff6347`,turquoise:`#40e0d0`,violet:`#ee82ee`,wheat:`#f5deb3`,white:`#ffffff`,whitesmoke:`#f5f5f5`,yellow:`#ffff00`,yellowgreen:`#9acd32`};function W(e){let t={r:0,g:0,b:0},n=1,r=!1,i=!1;if(typeof e==`string`&&(e=ae(e)),typeof e==`object`){if(X(e.r)&&X(e.g)&&X(e.b)){t=te(e.r,e.g,e.b),r=!0;let{r:n}=e;i=typeof n!=`number`&&String(n).endsWith(`%`)?`prgb`:`rgb`}else if(X(e.h)&&X(e.s)&&X(e.v)){let n=j(e.s),a=j(e.v);t=I(e.h,n,a),r=!0,i=`hsv`}else if(X(e.h)&&X(e.s)&&X(e.l)){let n=j(e.s),a=j(e.l);t=ne(e.h,n,a),r=!0,i=`hsl`}else X(e.c)&&X(e.m)&&X(e.y)&&X(e.k)&&(t=ie(e.c,e.m,e.y,e.k),r=!0,i=`cmyk`);Object.prototype.hasOwnProperty.call(e,`a`)&&(n=e.a)}return n=k(n),{ok:r,format:e.format||i,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var G=`(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)`,K=`[\\s|\\(]+(`+G+`)[,|\\s]+(`+G+`)[,|\\s]+(`+G+`)\\s*\\)?`,q=`[\\s|\\(]+(`+G+`)[,|\\s]+(`+G+`)[,|\\s]+(`+G+`)[,|\\s]+(`+G+`)\\s*\\)?`,J={CSS_UNIT:new RegExp(G),rgb:RegExp(`rgb`+K),rgba:RegExp(`rgba`+q),hsl:RegExp(`hsl`+K),hsla:RegExp(`hsla`+q),hsv:RegExp(`hsv`+K),hsva:RegExp(`hsva`+q),cmyk:RegExp(`cmyk`+q)};function ae(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;let t=!1;if(U[e])e=U[e],t=!0;else if(e===`transparent`)return{r:0,g:0,b:0,a:0,format:`name`};if(typeof e==`string`&&e.length<=9){let n=oe(e,t);if(n)return n}let n=J.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=J.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=J.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=J.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=J.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=J.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=J.cmyk.exec(e),n?{c:n[1],m:n[2],y:n[3],k:n[4]}:!1))))))}function oe(e,t){let n=+!!e.startsWith(`#`),r=e.length-n;if(r===6||r===8){let i=Y(e,n)*16+Y(e,n+1),a=Y(e,n+2)*16+Y(e,n+3),o=Y(e,n+4)*16+Y(e,n+5);if(r===6)return Number.isNaN(i+a+o)?void 0:{r:i,g:a,b:o,format:t?`name`:`hex`};let s=Y(e,n+6)*16+Y(e,n+7);return Number.isNaN(i+a+o+s)?void 0:{r:i,g:a,b:o,a:s/255,format:t?`name`:`hex8`}}if(r===3||r===4){let i=Y(e,n)*17,a=Y(e,n+1)*17,o=Y(e,n+2)*17;if(r===3)return Number.isNaN(i+a+o)?void 0:{r:i,g:a,b:o,format:t?`name`:`hex`};let s=Y(e,n+3)*17;return Number.isNaN(i+a+o+s)?void 0:{r:i,g:a,b:o,a:s/255,format:t?`name`:`hex8`}}}function Y(e,t){let n=e.charCodeAt(t);return n>=48&&n<=57?n-48:n>=97&&n<=102?n-87:n>=65&&n<=70?n-55:NaN}function X(e){return typeof e==`number`?!Number.isNaN(e):e!==void 0&&J.CSS_UNIT.test(e)}var se=class e{constructor(t=``,n={}){if(t instanceof e)return t;typeof t==`number`&&(t=H(t)),this.originalInput=t;let r=W(t);this.originalInput=t,this.r=r.r,this.g=r.g,this.b=r.b,this.a=r.a,this.roundA=Math.round(100*this.a)/100,this.format=n.format??r.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=r.ok}isDark(){return this.getBrightness()<128}isLight(){return!this.isDark()}getBrightness(){let e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3}getLuminance(){let e=this.toRgb(),t,n,r,i=e.r/255,a=e.g/255,o=e.b/255;return t=i<=.03928?i/12.92:((i+.055)/1.055)**2.4,n=a<=.03928?a/12.92:((a+.055)/1.055)**2.4,r=o<=.03928?o/12.92:((o+.055)/1.055)**2.4,.2126*t+.7152*n+.0722*r}getAlpha(){return this.a}setAlpha(e){return this.a=k(e),this.roundA=Math.round(100*this.a)/100,this}isMonochrome(){let{s:e}=this.toHsl();return e===0}toHsv(){let e=F(this.r,this.g,this.b);return{h:e.h*360,s:e.s,v:e.v,a:this.a}}toHsvString(){let e=F(this.r,this.g,this.b),t=Math.round(e.h*360),n=Math.round(e.s*100),r=Math.round(e.v*100);return this.a===1?`hsv(${t}, ${n}%, ${r}%)`:`hsva(${t}, ${n}%, ${r}%, ${this.roundA})`}toHsl(){let e=N(this.r,this.g,this.b);return{h:e.h*360,s:e.s,l:e.l,a:this.a}}toHslString(){let e=N(this.r,this.g,this.b),t=Math.round(e.h*360),n=Math.round(e.s*100),r=Math.round(e.l*100);return this.a===1?`hsl(${t}, ${n}%, ${r}%)`:`hsla(${t}, ${n}%, ${r}%, ${this.roundA})`}toHex(e=!1){return B(this.r,this.g,this.b,e)}toHexString(e=!1){return`#`+this.toHex(e)}toHex8(e=!1){return re(this.r,this.g,this.b,this.a,e)}toHex8String(e=!1){return`#`+this.toHex8(e)}toHexShortString(e=!1){return this.a===1?this.toHexString(e):this.toHex8String(e)}toRgb(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}}toRgbString(){let e=Math.round(this.r),t=Math.round(this.g),n=Math.round(this.b);return this.a===1?`rgb(${e}, ${t}, ${n})`:`rgba(${e}, ${t}, ${n}, ${this.roundA})`}toPercentageRgb(){let e=e=>`${Math.round(T(e,255)*100)}%`;return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}}toPercentageRgbString(){let e=e=>Math.round(T(e,255)*100);return this.a===1?`rgb(${e(this.r)}%, ${e(this.g)}%, ${e(this.b)}%)`:`rgba(${e(this.r)}%, ${e(this.g)}%, ${e(this.b)}%, ${this.roundA})`}toCmyk(){return{...V(this.r,this.g,this.b)}}toCmykString(){let{c:e,m:t,y:n,k:r}=V(this.r,this.g,this.b);return`cmyk(${e}, ${t}, ${n}, ${r})`}toName(){if(this.a===0)return`transparent`;if(this.a<1)return!1;let e=`#`+B(this.r,this.g,this.b,!1),t=U;for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&t[n]===e)return n;return!1}toString(e){let t=!!e;e??=this.format;let n=!1,r=this.a<1&&this.a>=0;return!t&&r&&(e.startsWith(`hex`)||e===`name`)?e===`name`&&this.a===0?this.toName():this.toRgbString():(e===`rgb`&&(n=this.toRgbString()),e===`prgb`&&(n=this.toPercentageRgbString()),(e===`hex`||e===`hex6`)&&(n=this.toHexString()),e===`hex3`&&(n=this.toHexString(!0)),e===`hex4`&&(n=this.toHex8String(!0)),e===`hex8`&&(n=this.toHex8String()),e===`name`&&(n=this.toName()),e===`hsl`&&(n=this.toHslString()),e===`hsv`&&(n=this.toHsvString()),e===`cmyk`&&(n=this.toCmykString()),n||this.toHexString())}toNumber(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)}clone(){return new e(this.toString())}lighten(t=10){let n=this.toHsl();return n.l+=t/100,n.l=E(n.l),new e(n)}brighten(t=10){let n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)}darken(t=10){let n=this.toHsl();return n.l-=t/100,n.l=E(n.l),new e(n)}tint(e=10){return this.mix(`white`,e)}shade(e=10){return this.mix(`black`,e)}desaturate(t=10){let n=this.toHsl();return n.s-=t/100,n.s=E(n.s),new e(n)}saturate(t=10){let n=this.toHsl();return n.s+=t/100,n.s=E(n.s),new e(n)}greyscale(){return this.desaturate(100)}spin(t){let n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)}mix(t,n=50){let r=this.toRgb(),i=new e(t).toRgb(),a=n/100,o={r:(i.r-r.r)*a+r.r,g:(i.g-r.g)*a+r.g,b:(i.b-r.b)*a+r.b,a:(i.a-r.a)*a+r.a};return new e(o)}analogous(t=6,n=30){let r=this.toHsl(),i=360/n,a=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,a.push(new e(r));return a}complement(){let t=this.toHsl();return t.h=(t.h+180)%360,new e(t)}monochromatic(t=6){let n=this.toHsv(),{h:r}=n,{s:i}=n,{v:a}=n,o=[],s=1/t;for(;t--;)o.push(new e({h:r,s:i,v:a})),a=(a+s)%1;return o}splitcomplement(){let t=this.toHsl(),{h:n}=t;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]}onBackground(t){let n=this.toRgb(),r=new e(t).toRgb(),i=n.a+r.a*(1-n.a);return new e({r:(n.r*n.a+r.r*r.a*(1-n.a))/i,g:(n.g*n.a+r.g*r.a*(1-n.a))/i,b:(n.b*n.a+r.b*r.a*(1-n.a))/i,a:i})}triad(){return this.polyad(3)}tetrad(){return this.polyad(4)}polyad(t){let n=this.toHsl(),{h:r}=n,i=[this],a=360/t;for(let o=1;o<t;o++)i.push(new e({h:(r+o*a)%360,s:n.s,l:n.l}));return i}equals(t){let n=new e(t);return this.format===`cmyk`||n.format===`cmyk`?this.toCmykString()===n.toCmykString():this.toRgbString()===n.toRgbString()}},Z=[`#458FFF`,`#45D9A3`,`#FFC145`,`#F5654F`,`#6A6AFD`,`#6ED1FF`,`#008787`,`#FF9245`,`#F587B3`,`#8352CC`,`#65779B`],ce=[`#458FFF`,`#C8DEFF`,`#45D9A3`,`#C8F4E4`,`#FFC145`,`#FFEDC8`,`#F5654F`,`#FCD1CB`,`#6A6AFD`,`#D3D3FE`,`#6ED1FF`,`#D3D3FE`,`#008787`,`#B3DBDB`,`#FF9245`,`#FFDFC8`,`#F587B3`,`#FCDBE8`,`#8352CC`,`#FCDBE8`,`#65779B`,`#65779B`],le=[`#8C1604`,`#DB4C35`,`#FF9245`,`#FFC145`,`#689FFF`,`#45D9A3`,`#99ACD1`],Q={color:Z,textStyle:{color:`#6F7785`,fontSize:`12px`},bar:{barGap:.2,barWidth:10,label:{color:`#6F7785`,position:`top`}},line:{label:{color:`#6F7785`,position:`top`}},pie:{avoidLabelOverlap:!1,radius:[`70%`,`80%`],itemStyle:{borderWidth:1,borderColor:`#fff`},label:{show:!1,color:`#2F3540`,formatter:`{c}`,position:`inside`}},legend:{itemWidth:12,itemHeight:12,inactiveColor:`#BEC3CC`,textStyle:{color:`#6F7785`,fontSize:`12px`}},title:{itemGap:4,textStyle:{color:`#2F3540`,fontSize:`12px`,fontWeight:500},subtextStyle:{color:`#6F7785`,fontSize:`12px`}},tooltip:{borderWidth:0,padding:12,textStyle:{color:`#2F3540`},axisPointer:{z:1,lineStyle:{type:`solid`,color:`#E1E5EB`}}},categoryAxis:{axisLine:{show:!0,lineStyle:{color:`#EDF1F7`}},axisTick:{show:!0,alignWithLabel:!0,lineStyle:{color:`#EDF1F7`}},axisLabel:{color:`#6F7785`},splitLine:{show:!1},splitArea:{show:!1}},valueAxis:{axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:`#6F7785`},splitLine:{lineStyle:{color:`#EDF1F7`}},splitArea:{show:!1},nameTextStyle:{color:`#6F7785`,padding:[0,30,-4,0]}},dataZoom:{height:16}};function ue(e){return!!(e&&e.xAxis&&e.xAxis.data)}function de(e,t){return i.isVue2?{attrs:{...e},on:{...t}}:{...e}}function fe(e){return Object.entries(e).reduce((e,[t,n])=>(n!==void 0&&(e[t]=n),e),{})}function pe(e){return(0,s.isNil)(e)?[]:Array.isArray(e)?e:[e]}var me=(e,t)=>new se(e).setAlpha(t).toRgbString();function $(e,t){return(0,o.use)(t),(0,o.registerTheme)(`seer`,Q),e.install=t=>{t.component(e.name,e)},e}e.IxChart=$(ee,[t.DataZoomComponent,t.LegendComponent,t.GridComponent,t.TitleComponent,t.TooltipComponent,n.LabelLayout,n.UniversalTransition,r.SVGRenderer]),e.convertArray=pe,e.createInstall=$,e.filterEmptyProps=fe,e.getAlphaColor=me,e.isVertical=ue,e.mergeAttrs=de,e.seerColors=Z,e.seerColorsForMore=ce,e.seerColorsForRisk=le,e.seerTheme=Q,e.useChart=p,e.useReactiveAttrs=C,e.useStripe=v,e.useStripeArea=x,e.useStripeBarSeries=b,e.useStripeBarTooltip=y,e.useTooltipsFormatter=_,e.withChartProps=w});
10
+ </div>`}function y({data:e=[],color:t=``,offset:n=[0,0],rotate:r=-20,size:i=[2,8]}){return{name:``,data:e,type:`pictorialBar`,symbolRotate:r,silent:!0,itemStyle:{color:t,opacity:0},emphasis:{itemStyle:{opacity:1}},symbolRepeat:`fixed`,symbolMargin:2,symbol:`rect`,symbolClip:!0,symbolSize:i,symbolPosition:`start`,symbolOffset:n,z:1,animationEasing:`elasticOut`}}function b(e){return{axisPointer:{lineStyle:{opacity:.6}},formatter:function(t){if(!t?.length)return``;let n=t[0].name;return v(n,t.filter(e=>!!e.seriesName).map(t=>({name:t.seriesName,value:`${t.value} ${e}`,color:t.color})))}}}function x({series:e,color:t,offset:n=[0,0],rotate:r,size:i}){return[{type:`bar`,z:0,...e},y({data:e.data,offset:n,color:t,rotate:r,size:i})]}function S(){return{aria:{enabled:!0,decal:{show:!0,decals:[{color:`white`,dashArrayX:[1,0],dashArrayY:[6,0],symbolSize:.5,rotation:Math.PI/2}]}}}}var C={"auto-resize":`autoResize`,"init-option":`initOption`,"set-option-opts":`setOptionOpts`};function w(e){let t=(0,i.getCurrentInstance)()?.proxy,n=()=>Object.fromEntries(Object.entries(i.isVue2&&t?t.$attrs:e).map(([e,t])=>[C[e]??e,t]));if(i.isVue2&&t)return(0,i.computed)(n);let r=(0,i.shallowRef)(n());return(0,i.onBeforeUpdate)(()=>{let e=n(),t=r.value;(Object.keys(t).length!==Object.keys(e).length||Object.keys(e).some(n=>!Object.is(t[n],e[n])))&&(r.value=e)}),r}function T(){return e=>e}var E=T()((0,i.defineComponent)({name:`IxChart`,inheritAttrs:!1,setup(e,t){let{containerRef:n}=m(w(t.attrs),()=>t.listeners??{});return{containerRef:n}},render(){let{class:e,style:t}=this.$attrs;return(0,i.h)(`div`,{ref:`containerRef`,class:e,style:{width:`100%`,height:`100%`,...t}})}}));function D(e,t){k(e)&&(e=`100%`);let n=A(e);return e=t===360?parseFloat(e):Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(e=t===360?(e<0?e%t+t:e%t)/t:e%t/t,e)}function O(e){return Math.min(1,Math.max(0,e))}function k(e){return typeof e==`string`&&e.indexOf(`.`)!==-1&&!A(e)&&parseFloat(e)===1}function A(e){return typeof e==`string`&&e.indexOf(`%`)!==-1}function j(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function ee(e){return Number(e)<=1?`${Number(e)*100}%`:e}function M(e){if(typeof e!=`number`||!(e<=1))return ee(e);let t=Math.min(100,Math.max(0,e*100))*100;return(t>=1e-6?Math.trunc(t):parseInt(String(t),10))/100}function te(e){return e.length===1?`0`+e:String(e)}function ne(e,t,n){return{r:D(e,255)*255,g:D(t,255)*255,b:D(n,255)*255}}function N(e,t,n){e=D(e,255),t=D(t,255),n=D(n,255);let r=Math.max(e,t,n),i=Math.min(e,t,n),a=0,o,s=(r+i)/2;if(r===i)o=0,a=0;else{let c=r-i;switch(o=s>.5?c/(2-r-i):c/(r+i),r){case e:a=(t-n)/c+(t<n?6:0);break;case t:a=(n-e)/c+2;break;case n:a=(e-t)/c+4}a/=6}return{h:a,s:o,l:s}}function P(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function F(e,t,n){let r,i,a;if(e=D(e,360),t=D(t,100),n=D(n,100),t===0)i=n,a=n,r=n;else{let o=n<.5?n*(1+t):n+t-n*t,s=2*n-o;r=P(s,o,e+1/3),i=P(s,o,e),a=P(s,o,e-1/3)}return{r:r*255,g:i*255,b:a*255}}function I(e,t,n){e=D(e,255),t=D(t,255),n=D(n,255);let r=Math.max(e,t,n),i=Math.min(e,t,n),a=0,o=r,s=r-i,c=r===0?0:s/r;if(r===i)a=0;else{switch(r){case e:a=(t-n)/s+(t<n?6:0);break;case t:a=(n-e)/s+2;break;case n:a=(e-t)/s+4}a/=6}return{h:a,s:c,v:o}}function re(e,t,n){e=D(e,360)*6,t=D(t,100),n=D(n,100);let r=Math.floor(e),i=e-r,a=n*(1-t),o=n*(1-i*t),s=n*(1-(1-i)*t),c=r%6,l=[n,o,a,a,s,n][c],u=[s,n,n,o,a,a][c],d=[a,a,s,n,n,o][c];return{r:l*255,g:u*255,b:d*255}}function L(e){return e<10?48+e:87+e}function R(e){let t=Math.round(e);return t>=0&&t<=255?String.fromCharCode(L(t>>4),L(t&15)):te(t.toString(16))}function z(e){return R(parseFloat(e)*255)}function B(e,t,n,r){let i=R(e),a=R(t),o=R(n);return r&&i.startsWith(i.charAt(1))&&a.startsWith(a.charAt(1))&&o.startsWith(o.charAt(1))?i.charAt(0)+a.charAt(0)+o.charAt(0):i+a+o}function V(e,t,n,r,i){let a=R(e),o=R(t),s=R(n),c=z(r);return i&&a.startsWith(a.charAt(1))&&o.startsWith(o.charAt(1))&&s.startsWith(s.charAt(1))&&c.startsWith(c.charAt(1))?a.charAt(0)+o.charAt(0)+s.charAt(0)+c.charAt(0):a+o+s+c}function ie(e,t,n,r){let i=e/100,a=t/100,o=n/100,s=r/100;return{r:255*(1-i)*(1-s),g:255*(1-a)*(1-s),b:255*(1-o)*(1-s)}}function H(e,t,n){let r=1-e/255,i=1-t/255,a=1-n/255,o=Math.min(r,i,a);return o===1?(r=0,i=0,a=0):(r=(r-o)/(1-o)*100,i=(i-o)/(1-o)*100,a=(a-o)/(1-o)*100),o*=100,{c:Math.round(r),m:Math.round(i),y:Math.round(a),k:Math.round(o)}}function ae(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var U={aliceblue:`#f0f8ff`,antiquewhite:`#faebd7`,aqua:`#00ffff`,aquamarine:`#7fffd4`,azure:`#f0ffff`,beige:`#f5f5dc`,bisque:`#ffe4c4`,black:`#000000`,blanchedalmond:`#ffebcd`,blue:`#0000ff`,blueviolet:`#8a2be2`,brown:`#a52a2a`,burlywood:`#deb887`,cadetblue:`#5f9ea0`,chartreuse:`#7fff00`,chocolate:`#d2691e`,coral:`#ff7f50`,cornflowerblue:`#6495ed`,cornsilk:`#fff8dc`,crimson:`#dc143c`,cyan:`#00ffff`,darkblue:`#00008b`,darkcyan:`#008b8b`,darkgoldenrod:`#b8860b`,darkgray:`#a9a9a9`,darkgreen:`#006400`,darkgrey:`#a9a9a9`,darkkhaki:`#bdb76b`,darkmagenta:`#8b008b`,darkolivegreen:`#556b2f`,darkorange:`#ff8c00`,darkorchid:`#9932cc`,darkred:`#8b0000`,darksalmon:`#e9967a`,darkseagreen:`#8fbc8f`,darkslateblue:`#483d8b`,darkslategray:`#2f4f4f`,darkslategrey:`#2f4f4f`,darkturquoise:`#00ced1`,darkviolet:`#9400d3`,deeppink:`#ff1493`,deepskyblue:`#00bfff`,dimgray:`#696969`,dimgrey:`#696969`,dodgerblue:`#1e90ff`,firebrick:`#b22222`,floralwhite:`#fffaf0`,forestgreen:`#228b22`,fuchsia:`#ff00ff`,gainsboro:`#dcdcdc`,ghostwhite:`#f8f8ff`,goldenrod:`#daa520`,gold:`#ffd700`,gray:`#808080`,green:`#008000`,greenyellow:`#adff2f`,grey:`#808080`,honeydew:`#f0fff0`,hotpink:`#ff69b4`,indianred:`#cd5c5c`,indigo:`#4b0082`,ivory:`#fffff0`,khaki:`#f0e68c`,lavenderblush:`#fff0f5`,lavender:`#e6e6fa`,lawngreen:`#7cfc00`,lemonchiffon:`#fffacd`,lightblue:`#add8e6`,lightcoral:`#f08080`,lightcyan:`#e0ffff`,lightgoldenrodyellow:`#fafad2`,lightgray:`#d3d3d3`,lightgreen:`#90ee90`,lightgrey:`#d3d3d3`,lightpink:`#ffb6c1`,lightsalmon:`#ffa07a`,lightseagreen:`#20b2aa`,lightskyblue:`#87cefa`,lightslategray:`#778899`,lightslategrey:`#778899`,lightsteelblue:`#b0c4de`,lightyellow:`#ffffe0`,lime:`#00ff00`,limegreen:`#32cd32`,linen:`#faf0e6`,magenta:`#ff00ff`,maroon:`#800000`,mediumaquamarine:`#66cdaa`,mediumblue:`#0000cd`,mediumorchid:`#ba55d3`,mediumpurple:`#9370db`,mediumseagreen:`#3cb371`,mediumslateblue:`#7b68ee`,mediumspringgreen:`#00fa9a`,mediumturquoise:`#48d1cc`,mediumvioletred:`#c71585`,midnightblue:`#191970`,mintcream:`#f5fffa`,mistyrose:`#ffe4e1`,moccasin:`#ffe4b5`,navajowhite:`#ffdead`,navy:`#000080`,oldlace:`#fdf5e6`,olive:`#808000`,olivedrab:`#6b8e23`,orange:`#ffa500`,orangered:`#ff4500`,orchid:`#da70d6`,palegoldenrod:`#eee8aa`,palegreen:`#98fb98`,paleturquoise:`#afeeee`,palevioletred:`#db7093`,papayawhip:`#ffefd5`,peachpuff:`#ffdab9`,peru:`#cd853f`,pink:`#ffc0cb`,plum:`#dda0dd`,powderblue:`#b0e0e6`,purple:`#800080`,rebeccapurple:`#663399`,red:`#ff0000`,rosybrown:`#bc8f8f`,royalblue:`#4169e1`,saddlebrown:`#8b4513`,salmon:`#fa8072`,sandybrown:`#f4a460`,seagreen:`#2e8b57`,seashell:`#fff5ee`,sienna:`#a0522d`,silver:`#c0c0c0`,skyblue:`#87ceeb`,slateblue:`#6a5acd`,slategray:`#708090`,slategrey:`#708090`,snow:`#fffafa`,springgreen:`#00ff7f`,steelblue:`#4682b4`,tan:`#d2b48c`,teal:`#008080`,thistle:`#d8bfd8`,tomato:`#ff6347`,turquoise:`#40e0d0`,violet:`#ee82ee`,wheat:`#f5deb3`,white:`#ffffff`,whitesmoke:`#f5f5f5`,yellow:`#ffff00`,yellowgreen:`#9acd32`};function W(e){let t={r:0,g:0,b:0},n=1,r=!1,i=!1;if(typeof e==`string`&&(e=oe(e)),typeof e==`object`){if(X(e.r)&&X(e.g)&&X(e.b)){t=ne(e.r,e.g,e.b),r=!0;let{r:n}=e;i=typeof n!=`number`&&String(n).endsWith(`%`)?`prgb`:`rgb`}else if(X(e.h)&&X(e.s)&&X(e.v)){let n=M(e.s),a=M(e.v);t=re(e.h,n,a),r=!0,i=`hsv`}else if(X(e.h)&&X(e.s)&&X(e.l)){let n=M(e.s),a=M(e.l);t=F(e.h,n,a),r=!0,i=`hsl`}else X(e.c)&&X(e.m)&&X(e.y)&&X(e.k)&&(t=ie(e.c,e.m,e.y,e.k),r=!0,i=`cmyk`);Object.prototype.hasOwnProperty.call(e,`a`)&&(n=e.a)}return n=j(n),{ok:r,format:e.format||i,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var G=`(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)`,K=`[\\s|\\(]+(`+G+`)[,|\\s]+(`+G+`)[,|\\s]+(`+G+`)\\s*\\)?`,q=`[\\s|\\(]+(`+G+`)[,|\\s]+(`+G+`)[,|\\s]+(`+G+`)[,|\\s]+(`+G+`)\\s*\\)?`,J={CSS_UNIT:new RegExp(G),rgb:RegExp(`rgb`+K),rgba:RegExp(`rgba`+q),hsl:RegExp(`hsl`+K),hsla:RegExp(`hsla`+q),hsv:RegExp(`hsv`+K),hsva:RegExp(`hsva`+q),cmyk:RegExp(`cmyk`+q)};function oe(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;let t=!1;if(U[e])e=U[e],t=!0;else if(e===`transparent`)return{r:0,g:0,b:0,a:0,format:`name`};if(typeof e==`string`&&e.length<=9){let n=se(e,t);if(n)return n}let n=J.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=J.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=J.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=J.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=J.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=J.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=J.cmyk.exec(e),n?{c:n[1],m:n[2],y:n[3],k:n[4]}:!1))))))}function se(e,t){let n=+!!e.startsWith(`#`),r=e.length-n;if(r===6||r===8){let i=Y(e,n)*16+Y(e,n+1),a=Y(e,n+2)*16+Y(e,n+3),o=Y(e,n+4)*16+Y(e,n+5);if(r===6)return Number.isNaN(i+a+o)?void 0:{r:i,g:a,b:o,format:t?`name`:`hex`};let s=Y(e,n+6)*16+Y(e,n+7);return Number.isNaN(i+a+o+s)?void 0:{r:i,g:a,b:o,a:s/255,format:t?`name`:`hex8`}}if(r===3||r===4){let i=Y(e,n)*17,a=Y(e,n+1)*17,o=Y(e,n+2)*17;if(r===3)return Number.isNaN(i+a+o)?void 0:{r:i,g:a,b:o,format:t?`name`:`hex`};let s=Y(e,n+3)*17;return Number.isNaN(i+a+o+s)?void 0:{r:i,g:a,b:o,a:s/255,format:t?`name`:`hex8`}}}function Y(e,t){let n=e.charCodeAt(t);return n>=48&&n<=57?n-48:n>=97&&n<=102?n-87:n>=65&&n<=70?n-55:NaN}function X(e){return typeof e==`number`?!Number.isNaN(e):e!==void 0&&J.CSS_UNIT.test(e)}var ce=class e{constructor(t=``,n={}){if(t instanceof e)return t;typeof t==`number`&&(t=ae(t)),this.originalInput=t;let r=W(t);this.originalInput=t,this.r=r.r,this.g=r.g,this.b=r.b,this.a=r.a,this.roundA=Math.round(100*this.a)/100,this.format=n.format??r.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=r.ok}isDark(){return this.getBrightness()<128}isLight(){return!this.isDark()}getBrightness(){let e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3}getLuminance(){let e=this.toRgb(),t,n,r,i=e.r/255,a=e.g/255,o=e.b/255;return t=i<=.03928?i/12.92:((i+.055)/1.055)**2.4,n=a<=.03928?a/12.92:((a+.055)/1.055)**2.4,r=o<=.03928?o/12.92:((o+.055)/1.055)**2.4,.2126*t+.7152*n+.0722*r}getAlpha(){return this.a}setAlpha(e){return this.a=j(e),this.roundA=Math.round(100*this.a)/100,this}isMonochrome(){let{s:e}=this.toHsl();return e===0}toHsv(){let e=I(this.r,this.g,this.b);return{h:e.h*360,s:e.s,v:e.v,a:this.a}}toHsvString(){let e=I(this.r,this.g,this.b),t=Math.round(e.h*360),n=Math.round(e.s*100),r=Math.round(e.v*100);return this.a===1?`hsv(${t}, ${n}%, ${r}%)`:`hsva(${t}, ${n}%, ${r}%, ${this.roundA})`}toHsl(){let e=N(this.r,this.g,this.b);return{h:e.h*360,s:e.s,l:e.l,a:this.a}}toHslString(){let e=N(this.r,this.g,this.b),t=Math.round(e.h*360),n=Math.round(e.s*100),r=Math.round(e.l*100);return this.a===1?`hsl(${t}, ${n}%, ${r}%)`:`hsla(${t}, ${n}%, ${r}%, ${this.roundA})`}toHex(e=!1){return B(this.r,this.g,this.b,e)}toHexString(e=!1){return`#`+this.toHex(e)}toHex8(e=!1){return V(this.r,this.g,this.b,this.a,e)}toHex8String(e=!1){return`#`+this.toHex8(e)}toHexShortString(e=!1){return this.a===1?this.toHexString(e):this.toHex8String(e)}toRgb(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}}toRgbString(){let e=Math.round(this.r),t=Math.round(this.g),n=Math.round(this.b);return this.a===1?`rgb(${e}, ${t}, ${n})`:`rgba(${e}, ${t}, ${n}, ${this.roundA})`}toPercentageRgb(){let e=e=>`${Math.round(D(e,255)*100)}%`;return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}}toPercentageRgbString(){let e=e=>Math.round(D(e,255)*100);return this.a===1?`rgb(${e(this.r)}%, ${e(this.g)}%, ${e(this.b)}%)`:`rgba(${e(this.r)}%, ${e(this.g)}%, ${e(this.b)}%, ${this.roundA})`}toCmyk(){return{...H(this.r,this.g,this.b)}}toCmykString(){let{c:e,m:t,y:n,k:r}=H(this.r,this.g,this.b);return`cmyk(${e}, ${t}, ${n}, ${r})`}toName(){if(this.a===0)return`transparent`;if(this.a<1)return!1;let e=`#`+B(this.r,this.g,this.b,!1),t=U;for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&t[n]===e)return n;return!1}toString(e){let t=!!e;e??=this.format;let n=!1,r=this.a<1&&this.a>=0;return!t&&r&&(e.startsWith(`hex`)||e===`name`)?e===`name`&&this.a===0?this.toName():this.toRgbString():(e===`rgb`&&(n=this.toRgbString()),e===`prgb`&&(n=this.toPercentageRgbString()),(e===`hex`||e===`hex6`)&&(n=this.toHexString()),e===`hex3`&&(n=this.toHexString(!0)),e===`hex4`&&(n=this.toHex8String(!0)),e===`hex8`&&(n=this.toHex8String()),e===`name`&&(n=this.toName()),e===`hsl`&&(n=this.toHslString()),e===`hsv`&&(n=this.toHsvString()),e===`cmyk`&&(n=this.toCmykString()),n||this.toHexString())}toNumber(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)}clone(){return new e(this.toString())}lighten(t=10){let n=this.toHsl();return n.l+=t/100,n.l=O(n.l),new e(n)}brighten(t=10){let n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)}darken(t=10){let n=this.toHsl();return n.l-=t/100,n.l=O(n.l),new e(n)}tint(e=10){return this.mix(`white`,e)}shade(e=10){return this.mix(`black`,e)}desaturate(t=10){let n=this.toHsl();return n.s-=t/100,n.s=O(n.s),new e(n)}saturate(t=10){let n=this.toHsl();return n.s+=t/100,n.s=O(n.s),new e(n)}greyscale(){return this.desaturate(100)}spin(t){let n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)}mix(t,n=50){let r=this.toRgb(),i=new e(t).toRgb(),a=n/100,o={r:(i.r-r.r)*a+r.r,g:(i.g-r.g)*a+r.g,b:(i.b-r.b)*a+r.b,a:(i.a-r.a)*a+r.a};return new e(o)}analogous(t=6,n=30){let r=this.toHsl(),i=360/n,a=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,a.push(new e(r));return a}complement(){let t=this.toHsl();return t.h=(t.h+180)%360,new e(t)}monochromatic(t=6){let n=this.toHsv(),{h:r}=n,{s:i}=n,{v:a}=n,o=[],s=1/t;for(;t--;)o.push(new e({h:r,s:i,v:a})),a=(a+s)%1;return o}splitcomplement(){let t=this.toHsl(),{h:n}=t;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]}onBackground(t){let n=this.toRgb(),r=new e(t).toRgb(),i=n.a+r.a*(1-n.a);return new e({r:(n.r*n.a+r.r*r.a*(1-n.a))/i,g:(n.g*n.a+r.g*r.a*(1-n.a))/i,b:(n.b*n.a+r.b*r.a*(1-n.a))/i,a:i})}triad(){return this.polyad(3)}tetrad(){return this.polyad(4)}polyad(t){let n=this.toHsl(),{h:r}=n,i=[this],a=360/t;for(let o=1;o<t;o++)i.push(new e({h:(r+o*a)%360,s:n.s,l:n.l}));return i}equals(t){let n=new e(t);return this.format===`cmyk`||n.format===`cmyk`?this.toCmykString()===n.toCmykString():this.toRgbString()===n.toRgbString()}},Z=[`#458FFF`,`#45D9A3`,`#FFC145`,`#F5654F`,`#6A6AFD`,`#6ED1FF`,`#008787`,`#FF9245`,`#F587B3`,`#8352CC`,`#65779B`],le=[`#458FFF`,`#C8DEFF`,`#45D9A3`,`#C8F4E4`,`#FFC145`,`#FFEDC8`,`#F5654F`,`#FCD1CB`,`#6A6AFD`,`#D3D3FE`,`#6ED1FF`,`#D3D3FE`,`#008787`,`#B3DBDB`,`#FF9245`,`#FFDFC8`,`#F587B3`,`#FCDBE8`,`#8352CC`,`#FCDBE8`,`#65779B`,`#65779B`],ue=[`#8C1604`,`#DB4C35`,`#FF9245`,`#FFC145`,`#689FFF`,`#45D9A3`,`#99ACD1`],Q={color:Z,textStyle:{color:`#6F7785`,fontSize:`12px`},bar:{barGap:.2,barWidth:10,label:{color:`#6F7785`,position:`top`}},line:{label:{color:`#6F7785`,position:`top`}},pie:{avoidLabelOverlap:!1,radius:[`70%`,`80%`],itemStyle:{borderWidth:1,borderColor:`#fff`},label:{show:!1,color:`#2F3540`,formatter:`{c}`,position:`inside`}},legend:{itemWidth:12,itemHeight:12,inactiveColor:`#BEC3CC`,textStyle:{color:`#6F7785`,fontSize:`12px`}},title:{itemGap:4,textStyle:{color:`#2F3540`,fontSize:`12px`,fontWeight:500},subtextStyle:{color:`#6F7785`,fontSize:`12px`}},tooltip:{backgroundColor:`rgba(251, 253, 255, 0.88)`,borderWidth:0,padding:12,textStyle:{color:`#2F3540`},axisPointer:{z:1,lineStyle:{type:`solid`,color:`#E1E5EB`}}},categoryAxis:{axisLine:{show:!0,lineStyle:{color:`#EDF1F7`}},axisTick:{show:!0,alignWithLabel:!0,lineStyle:{color:`#EDF1F7`}},axisLabel:{color:`#6F7785`},splitLine:{show:!1},splitArea:{show:!1}},valueAxis:{axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:`#6F7785`},splitLine:{lineStyle:{color:`#EDF1F7`}},splitArea:{show:!1},nameTextStyle:{color:`#6F7785`,padding:[0,30,-4,0]}},dataZoom:{height:16}};function de(e){return!!(e&&e.xAxis&&e.xAxis.data)}function fe(e,t){return i.isVue2?{attrs:{...e},on:{...t}}:{...e}}function pe(e){return Object.entries(e).reduce((e,[t,n])=>(n!==void 0&&(e[t]=n),e),{})}function me(e){return(0,s.isNil)(e)?[]:Array.isArray(e)?e:[e]}var he=(e,t)=>new ce(e).setAlpha(t).toRgbString();function $(e,t){return(0,o.use)(t),(0,o.registerTheme)(`seer`,Q),e.install=t=>{t.component(e.name,e)},e}var ge=$(E,[t.DataZoomComponent,t.LegendComponent,t.GridComponent,t.TitleComponent,t.TooltipComponent,n.LabelLayout,n.UniversalTransition,r.SVGRenderer]);e.CHART_THEME_TOKEN=f,e.IxChart=ge,e.convertArray=me,e.createInstall=$,e.filterEmptyProps=pe,e.getAlphaColor=he,e.isVertical=de,e.mergeAttrs=fe,e.seerColors=Z,e.seerColorsForMore=le,e.seerColorsForRisk=ue,e.seerTheme=Q,e.useChart=m,e.useReactiveAttrs=w,e.useStripe=y,e.useStripeArea=S,e.useStripeBarSeries=x,e.useStripeBarTooltip=b,e.useTooltipsFormatter=v,e.withChartProps=T});
@@ -1 +1,2 @@
1
1
  export * from './seer';
2
+ export * from './token';
@@ -57,6 +57,7 @@ export declare const seerTheme: {
57
57
  };
58
58
  };
59
59
  tooltip: {
60
+ backgroundColor: string;
60
61
  borderWidth: number;
61
62
  padding: number;
62
63
  textStyle: {
@@ -0,0 +1,4 @@
1
+ import { InjectionKey, Ref } from 'vue-demi';
2
+ import { ChartTheme } from '../types';
3
+ /** Reactive application default; an explicit chart theme takes precedence. */
4
+ export declare const CHART_THEME_TOKEN: InjectionKey<ChartTheme | Ref<ChartTheme>>;
@@ -1,5 +1,5 @@
1
- import { BarSeriesOption, LineSeriesOption, PieSeriesOption } from 'echarts/charts';
2
- import { DatasetComponentOption, DataZoomComponentOption, GridComponentOption, LegendComponentOption, TitleComponentOption, TooltipComponentOption } from 'echarts/components';
1
+ import { BarSeriesOption, LineSeriesOption, PieSeriesOption, RadarSeriesOption, GaugeSeriesOption, CustomSeriesOption } from 'echarts/charts';
2
+ import { RadarComponentOption, GraphicComponentOption, DatasetComponentOption, DataZoomComponentOption, GridComponentOption, LegendComponentOption, TitleComponentOption, TooltipComponentOption } from 'echarts/components';
3
3
  import { ComposeOption, EChartsType, init, SetOptionOpts } from 'echarts/core';
4
4
  export type ChartInitParameters = Parameters<typeof init>;
5
5
  export type ChartTheme = NonNullable<ChartInitParameters[1]>;
@@ -47,8 +47,9 @@ interface ComponentOption {
47
47
  z?: number;
48
48
  zlevel?: number;
49
49
  }
50
- export type BaseChartOption<T extends ComponentOption> = ComposeOption<DatasetComponentOption | DataZoomComponentOption | GridComponentOption | LegendComponentOption | TitleComponentOption | TooltipComponentOption | T>;
51
- export type ChartOption = ComposeOption<DatasetComponentOption | DataZoomComponentOption | GridComponentOption | LegendComponentOption | TitleComponentOption | TooltipComponentOption | BarSeriesOption | PieSeriesOption | LineSeriesOption>;
50
+ type CommonComponentOption = GraphicComponentOption | DatasetComponentOption | DataZoomComponentOption | GridComponentOption | LegendComponentOption | TitleComponentOption | TooltipComponentOption;
51
+ export type BaseChartOption<T extends ComponentOption> = ComposeOption<CommonComponentOption | T>;
52
+ export type ChartOption = BaseChartOption<RadarComponentOption | RadarSeriesOption | GaugeSeriesOption | CustomSeriesOption | BarSeriesOption | PieSeriesOption | LineSeriesOption>;
52
53
  export interface ChartProps extends ChartOption, AdditionalChartOption {
53
54
  }
54
55
  /** Named caller-facing props for component declarations; defaults are not resolved. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@idux/charts-core",
3
- "version": "1.0.0",
3
+ "version": "1.2.0",
4
4
  "description": "A chart component library for Vue 2 & 3",
5
5
  "keywords": [
6
6
  "vue",