x-next 0.0.0-alpha.29 → 0.0.0-alpha.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,46 +1,46 @@
1
- var Ue = Object.defineProperty;
2
- var Ge = (e, t, l) => t in e ? Ue(e, t, { enumerable: !0, configurable: !0, writable: !0, value: l }) : e[t] = l;
3
- var D = (e, t, l) => Ge(e, typeof t != "symbol" ? t + "" : t, l);
4
- import { defineComponent as z, computed as v, createVNode as r, h as k, reactive as le, getCurrentInstance as Ke, ref as E, watch as q, onMounted as R, onBeforeUnmount as Ae, readonly as Je, Teleport as Qe, Transition as U, createTextVNode as A, onUnmounted as ne, Comment as et, Fragment as H, render as V, isVNode as L, nextTick as Ne, mergeProps as me, resolveComponent as Y, openBlock as P, createBlock as W, withCtx as tt, withDirectives as lt, createElementVNode as nt, normalizeClass as he, normalizeStyle as at, createElementBlock as ee, renderSlot as Oe, createCommentVNode as ye, toDisplayString as rt, vShow as ot } from "vue";
5
- const it = "X", st = "x", Fe = (e) => e ? st + "-" + e : e || "", S = (e) => it + e, F = (e) => {
6
- const t = Fe(e);
1
+ var lt = Object.defineProperty;
2
+ var nt = (e, t, l) => t in e ? lt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: l }) : e[t] = l;
3
+ var D = (e, t, l) => nt(e, typeof t != "symbol" ? t + "" : t, l);
4
+ import { defineComponent as E, computed as g, createVNode as r, h as w, reactive as ce, getCurrentInstance as at, ref as M, watch as ee, onMounted as W, onBeforeUnmount as De, readonly as rt, Teleport as ot, Transition as te, createTextVNode as p, onUnmounted as ue, Comment as it, Fragment as Y, render as I, isVNode as O, nextTick as Ee, mergeProps as ze, resolveComponent as _, openBlock as P, createBlock as H, withCtx as st, withDirectives as ct, createElementVNode as ut, normalizeClass as Ce, normalizeStyle as dt, createElementBlock as oe, renderSlot as Pe, createCommentVNode as xe, toDisplayString as ft, vShow as mt } from "vue";
5
+ const ht = "X", yt = "x", He = (e) => e ? yt + "-" + e : e || "", B = (e) => ht + e, $ = (e) => {
6
+ const t = He(e);
7
7
  return {
8
8
  block: t,
9
- element: (o) => `${t}--${o}`,
10
- modifier: (o) => `${t}-${o}`,
11
- is: (o) => `${t}-is-${o}`
9
+ element: (a) => `${t}--${a}`,
10
+ modifier: (a) => `${t}-${a}`,
11
+ is: (a) => `${t}-is-${a}`
12
12
  };
13
- }, K = Object.prototype.toString;
14
- function je(e) {
15
- return K.call(e) === "[object Array]";
13
+ }, ne = Object.prototype.toString;
14
+ function Re(e) {
15
+ return ne.call(e) === "[object Array]";
16
16
  }
17
- function Ve(e) {
18
- return K.call(e) === "[object Object]";
17
+ function Ye(e) {
18
+ return ne.call(e) === "[object Object]";
19
19
  }
20
- const Ie = (e) => K.call(e) === "[object Promise]", ct = (e) => O(e) && e.constructor.name === "AsyncFunction", ut = (e) => Ie(e) || ct(e);
21
- function Xe(e) {
22
- return K.call(e) === "[object String]";
20
+ const We = (e) => ne.call(e) === "[object Promise]", gt = (e) => S(e) && e.constructor.name === "AsyncFunction", vt = (e) => We(e) || gt(e);
21
+ function _e(e) {
22
+ return ne.call(e) === "[object String]";
23
23
  }
24
- function dt(e) {
25
- return K.call(e) === "[object Number]" && e === e;
24
+ function bt(e) {
25
+ return ne.call(e) === "[object Number]" && e === e;
26
26
  }
27
- function O(e) {
27
+ function S(e) {
28
28
  return typeof e == "function";
29
29
  }
30
- function ae() {
30
+ function de() {
31
31
  return typeof window < "u";
32
32
  }
33
- const N = (e) => e, ft = (e) => !!(e && e.shapeFlag & 1), mt = (e, t) => !!(e && e.shapeFlag & 6), ht = (e, t) => !!(e && e.shapeFlag & 8), yt = (e, t) => !!(e && e.shapeFlag & 16), vt = (e, t) => !!(e && e.shapeFlag & 32), te = (e, t = !1) => {
34
- var n, a;
33
+ const L = (e) => e, Ct = (e) => !!(e && e.shapeFlag & 1), xt = (e, t) => !!(e && e.shapeFlag & 6), wt = (e, t) => !!(e && e.shapeFlag & 8), kt = (e, t) => !!(e && e.shapeFlag & 16), Lt = (e, t) => !!(e && e.shapeFlag & 32), se = (e, t = !1) => {
34
+ var n, o;
35
35
  const l = [];
36
- for (const o of e ?? [])
37
- ft(o) || mt(o) || t && ht(o, o.children) ? l.push(o) : yt(o, o.children) ? l.push(...te(o.children, t)) : vt(o, o.children) ? l.push(...te((a = (n = o.children).default) == null ? void 0 : a.call(n), t)) : je(o) && l.push(...te(o, t));
36
+ for (const a of e ?? [])
37
+ Ct(a) || xt(a) || t && wt(a, a.children) ? l.push(a) : kt(a, a.children) ? l.push(...se(a.children, t)) : Lt(a, a.children) ? l.push(...se((o = (n = a.children).default) == null ? void 0 : o.call(n), t)) : Re(a) && l.push(...se(a, t));
38
38
  return l;
39
- }, I = (e, t) => Object.assign(t, {
39
+ }, V = (e, t) => Object.assign(t, {
40
40
  install(l) {
41
41
  l.component(e) || l.component(e, t);
42
42
  }
43
- }), gt = {
43
+ }), Nt = {
44
44
  disabled: Boolean,
45
45
  block: Boolean,
46
46
  loading: Boolean,
@@ -53,7 +53,7 @@ const N = (e) => e, ft = (e) => !!(e && e.shapeFlag & 1), mt = (e, t) => !!(e &&
53
53
  default: 0
54
54
  },
55
55
  shape: {
56
- type: N(String),
56
+ type: L(String),
57
57
  default: void 0
58
58
  },
59
59
  link: {
@@ -61,11 +61,11 @@ const N = (e) => e, ft = (e) => !!(e && e.shapeFlag & 1), mt = (e, t) => !!(e &&
61
61
  default: !1
62
62
  },
63
63
  type: {
64
- type: N(String),
64
+ type: L(String),
65
65
  default: void 0
66
66
  },
67
67
  status: {
68
- type: N(String),
68
+ type: L(String),
69
69
  default: void 0
70
70
  },
71
71
  plain: {
@@ -73,21 +73,21 @@ const N = (e) => e, ft = (e) => !!(e && e.shapeFlag & 1), mt = (e, t) => !!(e &&
73
73
  default: !1
74
74
  },
75
75
  size: {
76
- type: N(String),
76
+ type: L(String),
77
77
  default: "medium"
78
78
  },
79
79
  border: {
80
80
  type: Boolean,
81
81
  default: !0
82
82
  }
83
- }, bt = (e) => Xe(e) ? e.split("-").map((t) => t.charAt(0).toUpperCase() + t.slice(1)).join("") : "", Ct = (e, t = "px") => {
83
+ }, Ot = (e) => _e(e) ? e.split("-").map((t) => t.charAt(0).toUpperCase() + t.slice(1)).join("") : "", St = (e, t = "px") => {
84
84
  if (e === void 0) return "";
85
85
  const l = typeof e == "number" ? `${e}` : e;
86
- return ["px", "%", "vh", "vw", "calc"].some((a) => l.includes(a)) ? l : l + t;
86
+ return ["px", "%", "vh", "vw", "calc"].some((o) => l.includes(o)) ? l : l + t;
87
87
  };
88
88
  function X(e, t) {
89
- return /* @__PURE__ */ z({
90
- name: Fe(`Icon${bt(e)}`),
89
+ return /* @__PURE__ */ E({
90
+ name: He(`Icon${Ot(e)}`),
91
91
  props: {
92
92
  size: {
93
93
  type: [Number, String],
@@ -111,20 +111,20 @@ function X(e, t) {
111
111
  }
112
112
  },
113
113
  setup(l) {
114
- const n = "x-icon", a = v(() => {
115
- const c = {};
116
- return l.size && (c.fontSize = Ct(l.size)), l.rotate && (c.transform = `rotate(${l.rotate}deg)`), l.color && (c.color = l.color), c;
117
- }), o = v(() => [n, {
114
+ const n = "x-icon", o = g(() => {
115
+ const s = {};
116
+ return l.size && (s.fontSize = St(l.size)), l.rotate && (s.transform = `rotate(${l.rotate}deg)`), l.color && (s.color = l.color), s;
117
+ }), a = g(() => [n, {
118
118
  [`${n}-loading`]: l.spin
119
119
  }]);
120
120
  return () => r("div", {
121
- class: o.value,
122
- style: a.value
121
+ class: a.value,
122
+ style: o.value
123
123
  }, [t]);
124
124
  }
125
125
  });
126
126
  }
127
- const xt = X("InfoCircleFill", k(r("svg", {
127
+ const Bt = X("InfoCircleFill", w(r("svg", {
128
128
  viewBox: "0 0 50 50",
129
129
  class: "x-icon-loading-svg"
130
130
  }, [r("circle", {
@@ -134,9 +134,9 @@ const xt = X("InfoCircleFill", k(r("svg", {
134
134
  class: "path",
135
135
  fill: "none",
136
136
  stroke: "currentColor"
137
- }, null)]))), kt = /* @__PURE__ */ z({
137
+ }, null)]))), Tt = /* @__PURE__ */ E({
138
138
  name: "Button",
139
- props: gt,
139
+ props: Nt,
140
140
  emits: ["click"],
141
141
  // 显式导入插槽
142
142
  $slots: ["prefix", "suffix"],
@@ -144,65 +144,65 @@ const xt = X("InfoCircleFill", k(r("svg", {
144
144
  slots: t,
145
145
  emit: l
146
146
  }) {
147
- const n = le({
147
+ const n = ce({
148
148
  clicked: !1,
149
149
  isDebounce: !1
150
- }), a = F("button"), o = v(() => [a.block, e.type && a.modifier(e.type), e.status && a.modifier(e.status), e.disabled && a.is("disabled"), e.block && a.modifier("block"), e.plain && a.is("plain"), e.shape && a.modifier(e.shape), e.link && a.modifier("is-link"), e.size && a.modifier(e.size), !e.border && a.modifier("is-hide-border"), i.value && a.modifier("is-loading")]), c = () => {
150
+ }), o = $("button"), a = g(() => [o.block, e.type && o.modifier(e.type), e.status && o.modifier(e.status), e.disabled && o.is("disabled"), e.block && o.modifier("block"), e.plain && o.is("plain"), e.shape && o.modifier(e.shape), e.link && o.modifier("is-link"), e.size && o.modifier(e.size), !e.border && o.modifier("is-hide-border"), i.value && o.modifier("is-loading")]), s = () => {
151
151
  e.debounce > 0 && !n.isDebounce && (n.isDebounce = !0, setTimeout(() => {
152
152
  n.isDebounce = !1;
153
153
  }, e.debounce));
154
- }, i = v(() => e.loading || n.clicked || n.isDebounce), d = Ke(), s = (u, f) => {
155
- const m = u(f);
156
- ut(m) && (n.clicked = !0, m.finally(() => {
154
+ }, i = g(() => e.loading || n.clicked || n.isDebounce), f = at(), c = (u, d) => {
155
+ const m = u(d);
156
+ vt(m) && (n.clicked = !0, m.finally(() => {
157
157
  n.clicked = !1;
158
158
  }));
159
- }, h = (u) => {
160
- var m, C, g, B;
159
+ }, y = (u) => {
160
+ var m, C, v, N;
161
161
  if (u.stopPropagation(), (C = (m = u.target).blur) == null || C.call(m), i.value) return;
162
- c();
163
- const f = (B = (g = d == null ? void 0 : d.vnode) == null ? void 0 : g.props) == null ? void 0 : B.onClick;
164
- if (je(f))
165
- f.forEach((y) => s(y, u));
166
- else if (O(f)) {
167
- s(f, u);
162
+ s();
163
+ const d = (N = (v = f == null ? void 0 : f.vnode) == null ? void 0 : v.props) == null ? void 0 : N.onClick;
164
+ if (Re(d))
165
+ d.forEach((A) => c(A, u));
166
+ else if (S(d)) {
167
+ c(d, u);
168
168
  return;
169
169
  }
170
170
  };
171
171
  return () => {
172
172
  var u;
173
173
  return r("button", {
174
- class: o.value,
174
+ class: a.value,
175
175
  type: "button",
176
176
  disabled: e.disabled,
177
- onClick: h
177
+ onClick: y
178
178
  }, [r("span", {
179
179
  style: {
180
180
  display: i.value ? "flex" : "none",
181
181
  marginRight: i.value ? "4px" : "0px"
182
182
  },
183
- class: a.element("loading")
184
- }, [r(xt, null, null)]), t.prefix && r("span", {
185
- class: a.element("prefix")
183
+ class: o.element("loading")
184
+ }, [r(Bt, null, null)]), t.prefix && r("span", {
185
+ class: o.element("prefix")
186
186
  }, [t.prefix()]), r("span", {
187
- class: a.element("content")
187
+ class: o.element("content")
188
188
  }, [(u = t.default) == null ? void 0 : u.call(t)]), t.suffix && r("span", {
189
- class: a.element("suffix")
189
+ class: o.element("suffix")
190
190
  }, [t.suffix()])]);
191
191
  };
192
192
  }
193
- }), G = I(S("Button"), kt), wt = ["px", "%", "vh", "vw", "calc"], Se = (e, t = "px") => {
193
+ }), le = V(B("Button"), Tt), Mt = ["px", "%", "vh", "vw", "calc"], Ae = (e, t = "px") => {
194
194
  if (e === void 0) return "";
195
195
  const l = String(e);
196
- return wt.some((n) => l.includes(n)) ? l : l + t;
197
- }, Bt = 1e3, Lt = 3e3, Nt = 1;
198
- class Ot {
196
+ return Mt.some((n) => l.includes(n)) ? l : l + t;
197
+ }, Et = 1e3, zt = 3e3, Pt = 1;
198
+ class At {
199
199
  constructor() {
200
200
  D(this, "popupStack", {
201
201
  popup: /* @__PURE__ */ new Set(),
202
202
  dialog: /* @__PURE__ */ new Set(),
203
203
  message: /* @__PURE__ */ new Set()
204
204
  });
205
- D(this, "getNextZIndex", (t) => (t === "message" ? Array.from(this.popupStack.message).pop() || Lt : Array.from(this.popupStack.popup).pop() || Bt) + Nt);
205
+ D(this, "getNextZIndex", (t) => (t === "message" ? Array.from(this.popupStack.message).pop() || zt : Array.from(this.popupStack.popup).pop() || Et) + Pt);
206
206
  D(this, "add", (t) => {
207
207
  const l = this.getNextZIndex(t);
208
208
  return this.popupStack[t].add(l), t === "dialog" && this.popupStack.popup.add(l), l;
@@ -213,114 +213,114 @@ class Ot {
213
213
  D(this, "isLastDialog", (t) => this.popupStack.dialog.size > 1 ? t === Array.from(this.popupStack.dialog).pop() : !0);
214
214
  }
215
215
  }
216
- const ve = new Ot();
217
- function re(e, {
216
+ const we = new At();
217
+ function fe(e, {
218
218
  visible: t,
219
219
  runOnMounted: l
220
220
  } = {}) {
221
- const n = E(0), a = () => {
222
- n.value = ve.add(e);
223
- }, o = () => {
224
- ve.delete(n.value, e);
225
- }, c = () => e === "dialog" ? ve.isLastDialog(n.value) : !1;
226
- return q(
221
+ const n = M(0), o = () => {
222
+ n.value = we.add(e);
223
+ }, a = () => {
224
+ we.delete(n.value, e);
225
+ }, s = () => e === "dialog" ? we.isLastDialog(n.value) : !1;
226
+ return ee(
227
227
  () => t == null ? void 0 : t.value,
228
228
  (i) => {
229
- i ? a() : o();
229
+ i ? o() : a();
230
230
  },
231
231
  {
232
232
  immediate: !0
233
233
  }
234
- ), l && (R(a), Ae(o)), {
235
- zIndex: Je(n),
236
- open: a,
237
- close: o,
238
- isLastDialog: c
234
+ ), l && (W(o), De(a)), {
235
+ zIndex: rt(n),
236
+ open: o,
237
+ close: a,
238
+ isLastDialog: s
239
239
  };
240
240
  }
241
- const De = (e) => e.replace(/^./, (t) => t.toLowerCase()).replace(/-(\w)/g, (t, l) => (l == null ? void 0 : l.toUpperCase()) ?? ""), We = () => {
242
- }, St = (e, t) => {
243
- if (ae)
241
+ const Ze = (e) => e.replace(/^./, (t) => t.toLowerCase()).replace(/-(\w)/g, (t, l) => (l == null ? void 0 : l.toUpperCase()) ?? ""), qe = () => {
242
+ }, pt = (e, t) => {
243
+ if (de)
244
244
  return (t ?? document).querySelector(e) ?? void 0;
245
- }, Tt = (e) => {
245
+ }, $t = (e) => {
246
246
  if (e.tagName === "BODY")
247
247
  return window.innerWidth - (document.documentElement.offsetWidth || document.body.offsetWidth);
248
248
  const { borderLeftWidth: t, borderRightWidth: l } = window.getComputedStyle(e), n = Number(t.replace("px", "")) + Number(l.replace("px", ""));
249
249
  return e.offsetWidth - (e.clientWidth + n);
250
- }, Mt = (e) => e.tagName === "BODY" ? document.documentElement.scrollHeight > window.innerHeight : e.scrollHeight > e.offsetHeight, pt = (e, t) => {
250
+ }, Ft = (e) => e.tagName === "BODY" ? document.documentElement.scrollHeight > window.innerHeight : e.scrollHeight > e.offsetHeight, jt = (e, t) => {
251
251
  var n;
252
- if (!ae || !e || !t) return "";
253
- let l = De(t);
252
+ if (!de || !e || !t) return "";
253
+ let l = Ze(t);
254
254
  l === "float" && (l = "cssFloat");
255
255
  try {
256
- const a = e.style[l];
257
- if (a) return a;
258
- const o = (n = document.defaultView) == null ? void 0 : n.getComputedStyle(e, "");
259
- return o ? o[l] : "";
256
+ const o = e.style[l];
257
+ if (o) return o;
258
+ const a = (n = document.defaultView) == null ? void 0 : n.getComputedStyle(e, "");
259
+ return a ? a[l] : "";
260
260
  } catch {
261
261
  return e.style[l];
262
262
  }
263
- }, Z = (e, t, l) => {
263
+ }, Q = (e, t, l) => {
264
264
  if (!(!e || !t))
265
- if (Ve(t))
265
+ if (Ye(t))
266
266
  Object.entries(t).forEach(
267
- ([n, a]) => Z(e, n, a)
267
+ ([n, o]) => Q(e, n, o)
268
268
  );
269
269
  else {
270
- const n = De(t);
270
+ const n = Ze(t);
271
271
  e.style[n] = l;
272
272
  }
273
- }, ke = (e, t) => {
274
- if (Xe(e)) {
273
+ }, Se = (e, t) => {
274
+ if (_e(e)) {
275
275
  const l = e[0] === "#" ? `[id='${e.slice(1)}']` : e;
276
- return St(l, t);
276
+ return pt(l, t);
277
277
  }
278
278
  return e;
279
- }, Et = ae ? (e, t, l, n = !1) => {
279
+ }, It = de ? (e, t, l, n = !1) => {
280
280
  e.addEventListener(t, l, n);
281
- } : We, zt = ae ? (e, t, l, n = !1) => {
281
+ } : qe, Vt = de ? (e, t, l, n = !1) => {
282
282
  e.removeEventListener(t, l, n);
283
- } : We, Pt = (e, t) => {
283
+ } : qe, Xt = (e, t) => {
284
284
  let l = !1;
285
285
  const n = {
286
286
  overflow: "",
287
287
  width: ""
288
- }, a = (i) => i.tagName === "BODY", o = () => {
288
+ }, o = (i) => i.tagName === "BODY", a = () => {
289
289
  if (e.value) {
290
290
  const i = e.value;
291
291
  if (!l && i.style.overflow !== "hidden") {
292
- const d = Tt(i);
293
- if (d > 0 || Mt(i)) {
292
+ const f = $t(i);
293
+ if (f > 0 || Ft(i)) {
294
294
  n.overflow = i.style.overflow, n.width = i.style.width;
295
- let s = 0;
296
- a(i) && (s = i.getBoundingClientRect().left || 0), Z(i, {
297
- width: `calc(100% - ${Math.ceil(d - s)}px)`,
295
+ let c = 0;
296
+ o(i) && (c = i.getBoundingClientRect().left || 0), Q(i, {
297
+ width: `calc(100% - ${Math.ceil(f - c)}px)`,
298
298
  overflow: "hidden"
299
299
  }), l = !0;
300
300
  }
301
301
  }
302
302
  }
303
- }, c = () => {
303
+ }, s = () => {
304
304
  if (e.value && l) {
305
305
  const i = e.value;
306
- Z(i, {
306
+ Q(i, {
307
307
  overflow: n.overflow,
308
308
  width: n.width
309
309
  }), l = !1;
310
310
  }
311
311
  };
312
- return q(
312
+ return ee(
313
313
  () => t == null ? void 0 : t.value,
314
314
  (i) => {
315
- e.value && !a(e.value) && (i && Z(i, {
315
+ e.value && !o(e.value) && (i && Q(i, {
316
316
  position: "absolute"
317
- }), pt(e.value, "position") === "static" && Z(e.value, { position: "relative" }));
317
+ }), jt(e.value, "position") === "static" && Q(e.value, { position: "relative" }));
318
318
  }
319
319
  ), {
320
- setOverflowHidden: o,
321
- resetOverflow: c
320
+ setOverflowHidden: a,
321
+ resetOverflow: s
322
322
  };
323
- }, $t = {
323
+ }, Dt = {
324
324
  ENTER: "Enter",
325
325
  ESC: "Escape",
326
326
  BACKSPACE: "Backspace",
@@ -330,9 +330,9 @@ const De = (e) => e.replace(/^./, (t) => t.toLowerCase()).replace(/-(\w)/g, (t,
330
330
  ARROW_DOWN: "ArrowDown",
331
331
  ARROW_LEFT: "ArrowLeft",
332
332
  ARROW_RIGHT: "ArrowRight"
333
- }, At = {
333
+ }, Ht = {
334
334
  renderTo: {
335
- type: N([String, Object]),
335
+ type: L([String, Object]),
336
336
  default: "body"
337
337
  },
338
338
  disabled: {
@@ -416,80 +416,80 @@ const De = (e) => e.replace(/^./, (t) => t.toLowerCase()).replace(/-(\w)/g, (t,
416
416
  type: Boolean,
417
417
  default: !1
418
418
  }
419
- }, Ft = ["width", "minWidth", "height", "minHeight"], He = /* @__PURE__ */ z({
420
- name: S("Dialog"),
419
+ }, Rt = ["width", "minWidth", "height", "minHeight"], Ue = /* @__PURE__ */ E({
420
+ name: B("Dialog"),
421
421
  inheritAttrs: !1,
422
- props: At,
422
+ props: Ht,
423
423
  emits: ["closed", "close", "open", "opened", "update:modelValue"],
424
424
  setup(e, {
425
425
  emit: t,
426
426
  slots: l
427
427
  }) {
428
- const n = F("dialog"), a = n.block, o = F("message-box");
429
- o.block;
430
- const c = v(() => [a, e.messageBox && "is-message-box", e.popupClass && e.popupClass]), i = v(() => ke(e.renderTo)), d = E(), s = v(() => e.disabled || !i.value), h = v(() => ({
431
- zIndex: g.value
432
- })), u = v(() => {
428
+ const n = $("dialog"), o = n.block, a = $("message-box");
429
+ a.block;
430
+ const s = g(() => [o, e.messageBox && "is-message-box", e.popupClass && e.popupClass]), i = g(() => Se(e.renderTo)), f = M(), c = g(() => e.disabled || !i.value), y = g(() => ({
431
+ zIndex: v.value
432
+ })), u = g(() => {
433
433
  const x = {};
434
- return e.fullscreen || (!e.center && e.top && (x.top = Se(e.top)), Ft.forEach((j) => {
435
- e[j] && (x[j] = Se(e[j]));
434
+ return e.fullscreen || (!e.center && e.top && (x.top = Ae(e.top)), Rt.forEach((j) => {
435
+ e[j] && (x[j] = Ae(e[j]));
436
436
  })), x;
437
- }), f = E(!1), m = v(() => e.modelValue), C = v(() => m.value || f.value), {
438
- zIndex: g,
439
- isLastDialog: B
440
- } = re("dialog", {
437
+ }), d = M(!1), m = g(() => e.modelValue), C = g(() => m.value || d.value), {
438
+ zIndex: v,
439
+ isLastDialog: N
440
+ } = fe("dialog", {
441
441
  visible: m
442
442
  }), {
443
- setOverflowHidden: y,
444
- resetOverflow: b
445
- } = Pt(i, d), w = (x, j) => {
443
+ setOverflowHidden: A,
444
+ resetOverflow: h
445
+ } = Xt(i, f), b = (x, j) => {
446
446
  t("update:modelValue", !1), t("close", e.messageBox ? x : void 0, e.messageBox ? j : void 0);
447
- }, M = () => {
448
- f.value = !1, b(), t("closed");
449
- }, $ = () => {
447
+ }, k = () => {
448
+ d.value = !1, h(), t("closed");
449
+ }, z = () => {
450
450
  t("opened");
451
- }, T = le({
451
+ }, T = ce({
452
452
  ok: !1,
453
453
  cancel: !1
454
- }), p = (x, j) => {
455
- let Q = !0;
456
- if (T[x] = !0, O(e.onBeforeCancel) && (Q = e.onBeforeCancel(x) ?? !1), Ie(Q)) {
457
- Q.then((qe) => {
458
- T[x] = !1, qe && w(x, j);
454
+ }), F = (x, j) => {
455
+ let re = !0;
456
+ if (T[x] = !0, S(e.onBeforeCancel) && (re = e.onBeforeCancel(x) ?? !1), We(re)) {
457
+ re.then((tt) => {
458
+ T[x] = !1, tt && b(x, j);
459
459
  });
460
460
  return;
461
461
  }
462
- T[x] = !1, Q && w(x, j);
463
- }, J = () => {
464
- e.maskToClose && e.mask && p("cancel");
465
- }, de = (x) => {
466
- p("cancel", x);
467
- }, _e = (x) => {
468
- p("ok", x);
462
+ T[x] = !1, re && b(x, j);
463
+ }, ae = () => {
464
+ e.maskToClose && e.mask && F("cancel");
465
+ }, Je = (x) => {
466
+ F("cancel", x);
467
+ }, Qe = (x) => {
468
+ F("ok", x);
469
469
  };
470
- let fe = !1;
471
- const Be = (x) => {
472
- e.escToClose && x.key === $t.ESC && B() && p("cancel");
473
- }, Ze = () => {
474
- e.escToClose && !fe && (fe = !0, Et(document.documentElement, "keydown", Be));
475
- }, Le = () => {
476
- fe = !1, zt(document.documentElement, "keydown", Be);
470
+ let be = !1;
471
+ const Te = (x) => {
472
+ e.escToClose && x.key === Dt.ESC && N() && F("cancel");
473
+ }, et = () => {
474
+ e.escToClose && !be && (be = !0, It(document.documentElement, "keydown", Te));
475
+ }, Me = () => {
476
+ be = !1, Vt(document.documentElement, "keydown", Te);
477
477
  };
478
- return Ae(() => {
479
- b(), Le();
480
- }), q(() => m.value, (x) => {
481
- x ? (t("open"), y(), f.value = !0, Ze()) : Le();
478
+ return De(() => {
479
+ h(), Me();
480
+ }), ee(() => m.value, (x) => {
481
+ x ? (t("open"), A(), d.value = !0, et()) : Me();
482
482
  }, {
483
483
  immediate: !0
484
- }), () => r(Qe, {
484
+ }), () => r(ot, {
485
485
  to: i.value,
486
- disabled: s.value
486
+ disabled: c.value
487
487
  }, {
488
488
  default: () => [C.value && r("div", {
489
- ref: d,
490
- class: c.value,
491
- style: h.value
492
- }, [r(U, {
489
+ ref: f,
490
+ class: s.value,
491
+ style: y.value
492
+ }, [r(te, {
493
493
  name: "x-fade-in-standard",
494
494
  appear: !0
495
495
  }, {
@@ -500,12 +500,12 @@ const De = (e) => e.replace(/^./, (t) => t.toLowerCase()).replace(/-(\w)/g, (t,
500
500
  class: [n.element("wrapper"), {
501
501
  "is-center": e.center
502
502
  }],
503
- onClick: (x) => x.target === x.currentTarget && J()
504
- }, [r(U, {
503
+ onClick: (x) => x.target === x.currentTarget && ae()
504
+ }, [r(te, {
505
505
  name: "x-zoom-in",
506
506
  appear: !0,
507
- onAfterEnter: $,
508
- onAfterLeave: M
507
+ onAfterEnter: z,
508
+ onAfterLeave: k
509
509
  }, {
510
510
  default: () => [m.value && r("div", {
511
511
  class: [n.element("container"), {
@@ -513,25 +513,25 @@ const De = (e) => e.replace(/^./, (t) => t.toLowerCase()).replace(/-(\w)/g, (t,
513
513
  }],
514
514
  style: u.value
515
515
  }, [r("div", {
516
- class: [e.messageBox ? o.element("header") : n.element("header"), e.showHeaderBottomLine && "is-bottom-line"]
516
+ class: [e.messageBox ? a.element("header") : n.element("header"), e.showHeaderBottomLine && "is-bottom-line"]
517
517
  }, [l.title ? l.title() : r("div", {
518
518
  class: [n.element("header-title")]
519
519
  }, [e.title])]), r("div", {
520
- class: [e.messageBox ? o.element("body") : n.element("body")]
520
+ class: [e.messageBox ? a.element("body") : n.element("body")]
521
521
  }, [l.default && l.default()]), r("div", {
522
- class: [e.messageBox ? o.element("footer") : n.element("footer")]
522
+ class: [e.messageBox ? a.element("footer") : n.element("footer")]
523
523
  }, [l.footer && l.footer({
524
- cancel: de,
525
- ok: _e,
524
+ cancel: Je,
525
+ ok: Qe,
526
526
  "loading-obj": T
527
527
  })]), e.showClose && r("span", {
528
- class: [n.element("close-icon"), e.messageBox && o.element("close-icon")],
529
- onClick: () => p("cancel")
528
+ class: [n.element("close-icon"), e.messageBox && a.element("close-icon")],
529
+ onClick: () => F("cancel")
530
530
  }, null)])]
531
531
  })])])]
532
532
  });
533
533
  }
534
- }), Re = I(S("Dialog"), He), oe = X("CloseCircleFill", k(r("svg", {
534
+ }), Ge = V(B("Dialog"), Ue), me = X("CloseCircleFill", w(r("svg", {
535
535
  viewBox: "0 0 48 48",
536
536
  fill: "none",
537
537
  xmlns: "http://www.w3.org/2000/svg",
@@ -546,7 +546,7 @@ const De = (e) => e.replace(/^./, (t) => t.toLowerCase()).replace(/-(\w)/g, (t,
546
546
  d: "M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4 4 12.954 4 24s8.954 20 20 20Zm4.955-27.771-4.95 4.95-4.95-4.95a1 1 0 0 0-1.414 0l-1.414 1.414a1 1 0 0 0 0 1.414l4.95 4.95-4.95 4.95a1 1 0 0 0 0 1.414l1.414 1.414a1 1 0 0 0 1.414 0l4.95-4.95 4.95 4.95a1 1 0 0 0 1.414 0l1.414-1.414a1 1 0 0 0 0-1.414l-4.95-4.95 4.95-4.95a1 1 0 0 0 0-1.414l-1.414-1.414a1 1 0 0 0-1.414 0Z",
547
547
  fill: "currentColor",
548
548
  stroke: "none"
549
- }, null)]))), ie = X("CheckCircleFill", k(r("svg", {
549
+ }, null)]))), he = X("CheckCircleFill", w(r("svg", {
550
550
  viewBox: "0 0 48 48",
551
551
  fill: "none",
552
552
  xmlns: "http://www.w3.org/2000/svg",
@@ -561,7 +561,7 @@ const De = (e) => e.replace(/^./, (t) => t.toLowerCase()).replace(/-(\w)/g, (t,
561
561
  d: "M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4 4 12.954 4 24s8.954 20 20 20Zm10.207-24.379a1 1 0 0 0 0-1.414l-1.414-1.414a1 1 0 0 0-1.414 0L22 26.172l-4.878-4.88a1 1 0 0 0-1.415 0l-1.414 1.415a1 1 0 0 0 0 1.414l7 7a1 1 0 0 0 1.414 0l11.5-11.5Z",
562
562
  fill: "currentColor",
563
563
  stroke: "none"
564
- }, null)]))), se = X("ExclamationCircleFill", k(r("svg", {
564
+ }, null)]))), ye = X("ExclamationCircleFill", w(r("svg", {
565
565
  viewBox: "0 0 48 48",
566
566
  fill: "none",
567
567
  xmlns: "http://www.w3.org/2000/svg",
@@ -576,7 +576,7 @@ const De = (e) => e.replace(/^./, (t) => t.toLowerCase()).replace(/-(\w)/g, (t,
576
576
  d: "M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4 4 12.954 4 24s8.954 20 20 20Zm2-30a1 1 0 0 0-1-1h-2a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2Zm0 17h1a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-6a1 1 0 0 1-1-1v-2a1 1 0 0 1 1-1h1v-8a1 1 0 0 1-1-1v-2a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v11Z",
577
577
  fill: "currentColor",
578
578
  stroke: "none"
579
- }, null)]))), ce = X("InfoCircleFill", k(r("svg", {
579
+ }, null)]))), ge = X("InfoCircleFill", w(r("svg", {
580
580
  viewBox: "0 0 48 48",
581
581
  fill: "none",
582
582
  xmlns: "http://www.w3.org/2000/svg",
@@ -591,7 +591,7 @@ const De = (e) => e.replace(/^./, (t) => t.toLowerCase()).replace(/-(\w)/g, (t,
591
591
  d: "M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4 4 12.954 4 24s8.954 20 20 20Zm2-30a1 1 0 0 0-1-1h-2a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2Zm0 17h1a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-6a1 1 0 0 1-1-1v-2a1 1 0 0 1 1-1h1v-8a1 1 0 0 1-1-1v-2a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v11Z",
592
592
  fill: "currentColor",
593
593
  stroke: "none"
594
- }, null)]))), ue = X("MinusCircleFill", k(r("svg", {
594
+ }, null)]))), ve = X("MinusCircleFill", w(r("svg", {
595
595
  viewBox: "0 0 48 48",
596
596
  fill: "none",
597
597
  xmlns: "http://www.w3.org/2000/svg",
@@ -607,14 +607,14 @@ const De = (e) => e.replace(/^./, (t) => t.toLowerCase()).replace(/-(\w)/g, (t,
607
607
  fill: "currentColor",
608
608
  stroke: "none"
609
609
  }, null)])));
610
- X("LogoSimple", k(r("svg", {
610
+ X("LogoSimple", w(r("svg", {
611
611
  width: "61.000000",
612
612
  height: "41.000000",
613
613
  viewBox: "0 0 61 41",
614
614
  fill: "none",
615
615
  xmlns: "http://www.w3.org/2000/svg",
616
616
  "xmlns:xlink": "http://www.w3.org/1999/xlink"
617
- }, [r("desc", null, [A("Created with Pixso.")]), r("defs", null, null), r("path", {
617
+ }, [r("desc", null, [p("Created with Pixso.")]), r("defs", null, null), r("path", {
618
618
  id: "path",
619
619
  d: "M32 29.5L32 41L49.4 41C55.8 41 61 35.85 61 29.5C61 23.14 55.8 18 49.4 18C42.99 18 37.79 23.14 37.79 29.5L32 29.5Z",
620
620
  fill: "#00C1FF",
@@ -633,8 +633,8 @@ X("LogoSimple", k(r("svg", {
633
633
  "fill-opacity": "1.000000",
634
634
  "fill-rule": "nonzero"
635
635
  }, null)])));
636
- const jt = /* @__PURE__ */ z({
637
- name: S("Message"),
636
+ const Yt = /* @__PURE__ */ E({
637
+ name: B("Message"),
638
638
  props: {
639
639
  id: {
640
640
  type: String,
@@ -687,64 +687,64 @@ const jt = /* @__PURE__ */ z({
687
687
  emit: t,
688
688
  slots: l
689
689
  }) {
690
- const n = F("message"), a = E(!1), o = E(null), c = v(() => [n.block, n.modifier(e.type), e.center && n.modifier("center"), e.showClose && !e.center && n.element("show-close"), e.popupClass]), {
690
+ const n = $("message"), o = M(!1), a = M(null), s = g(() => [n.block, n.modifier(e.type), e.center && n.modifier("center"), e.showClose && !e.center && n.element("show-close"), e.popupClass]), {
691
691
  zIndex: i
692
- } = re("message", {
692
+ } = fe("message", {
693
693
  runOnMounted: !0
694
- }), d = v(() => ({
694
+ }), f = g(() => ({
695
695
  top: `${e.offset}px`,
696
696
  zIndex: i.value
697
- })), s = () => {
697
+ })), c = () => {
698
698
  if (l.icon) return l.icon();
699
699
  switch (e.type) {
700
700
  case "success":
701
- return r(ie, null, null);
701
+ return r(he, null, null);
702
702
  case "warning":
703
- return r(se, null, null);
703
+ return r(ye, null, null);
704
704
  case "strong":
705
- return r(ue, null, null);
705
+ return r(ve, null, null);
706
706
  case "error":
707
- return r(oe, null, null);
707
+ return r(me, null, null);
708
708
  case "info":
709
- return r(ce, null, null);
709
+ return r(ge, null, null);
710
710
  default:
711
711
  return null;
712
712
  }
713
- }, h = () => {
714
- e.duration > 0 && (o.value = setTimeout(() => {
715
- a.value = !1;
713
+ }, y = () => {
714
+ e.duration > 0 && (a.value = setTimeout(() => {
715
+ o.value = !1;
716
716
  }, e.duration));
717
717
  }, u = () => {
718
- o.value && (clearTimeout(o.value), o.value = null);
718
+ a.value && (clearTimeout(a.value), a.value = null);
719
719
  };
720
- R(() => {
721
- a.value = !0, h();
722
- }), ne(() => {
720
+ W(() => {
721
+ o.value = !0, y();
722
+ }), ue(() => {
723
723
  u();
724
724
  });
725
- const f = () => {
725
+ const d = () => {
726
726
  var m;
727
- a.value = !1, u(), (m = e.onClose) == null || m.call(e);
727
+ o.value = !1, u(), (m = e.onClose) == null || m.call(e);
728
728
  };
729
- return () => r(U, {
729
+ return () => r(te, {
730
730
  name: "x-message-slide-top",
731
731
  onBeforeLeave: e.onClose,
732
732
  onAfterLeave: () => t("destroy")
733
733
  }, {
734
- default: () => [a.value && r("div", {
735
- class: c.value,
736
- style: d.value
734
+ default: () => [o.value && r("div", {
735
+ class: s.value,
736
+ style: f.value
737
737
  }, [r("span", {
738
738
  class: [n.element("icon"), n.modifier(`icon-${e.type}`)]
739
- }, [s()]), r("div", null, [l.default ? l.default() : e.useHTML ? r("span", {
739
+ }, [c()]), r("div", null, [l.default ? l.default() : e.useHTML ? r("span", {
740
740
  innerHTML: e.message
741
741
  }, null) : r("span", null, [e.message]), e.showClose && r("span", {
742
742
  class: n.element("close-icon"),
743
- onClick: f
743
+ onClick: d
744
744
  }, null)])])]
745
745
  });
746
746
  }
747
- }), Vt = I(S("Message"), jt), It = /* @__PURE__ */ z({
747
+ }), Wt = V(B("Message"), Yt), _t = /* @__PURE__ */ E({
748
748
  name: "Space",
749
749
  props: {
750
750
  direction: {
@@ -767,11 +767,11 @@ const jt = /* @__PURE__ */ z({
767
767
  setup(e, {
768
768
  slots: t
769
769
  }) {
770
- const l = F("space"), n = v(() => [l.block, l.element(e.direction), e.fill && "is-fill", l.element(`${e.direction}-${e.align}`)]);
771
- function a(c) {
772
- if (dt(c))
773
- return c;
774
- switch (c) {
770
+ const l = $("space"), n = g(() => [l.block, l.element(e.direction), e.fill && "is-fill", l.element(`${e.direction}-${e.align}`)]);
771
+ function o(s) {
772
+ if (bt(s))
773
+ return s;
774
+ switch (s) {
775
775
  case "mini":
776
776
  return 4;
777
777
  case "small":
@@ -784,127 +784,127 @@ const jt = /* @__PURE__ */ z({
784
784
  return 8;
785
785
  }
786
786
  }
787
- const o = (c) => {
787
+ const a = (s) => {
788
788
  const i = {};
789
- if (c) return i;
790
- const d = `${a(e.size)}px`, s = `${a(e.size)}px`;
791
- return e.direction === "horizontal" && (i.marginRight = d), e.direction === "vertical" && (i.marginBottom = s), i;
789
+ if (s) return i;
790
+ const f = `${o(e.size)}px`, c = `${o(e.size)}px`;
791
+ return e.direction === "horizontal" && (i.marginRight = f), e.direction === "vertical" && (i.marginBottom = c), i;
792
792
  };
793
793
  return () => {
794
794
  var i;
795
- const c = te((i = t.default) == null ? void 0 : i.call(t), !0).filter((d) => d.type !== et);
795
+ const s = se((i = t.default) == null ? void 0 : i.call(t), !0).filter((f) => f.type !== it);
796
796
  return r("div", {
797
797
  class: [n.value]
798
- }, [c.map((d, s) => {
798
+ }, [s.map((f, c) => {
799
799
  var u;
800
- const h = t.split && s > 0;
801
- return r(H, {
802
- key: `space-item-${s}`
803
- }, [h && r("div", {
800
+ const y = t.split && c > 0;
801
+ return r(Y, {
802
+ key: `space-item-${c}`
803
+ }, [y && r("div", {
804
804
  className: l.element("split"),
805
- style: o(!1)
805
+ style: a(!1)
806
806
  }, [(u = t.split) == null ? void 0 : u.call(t)]), r("div", {
807
807
  className: l.element("item"),
808
- style: o(s === c.length - 1)
809
- }, [d])]);
808
+ style: a(c === s.length - 1)
809
+ }, [f])]);
810
810
  })]);
811
811
  };
812
812
  }
813
- }), we = I(S("Space"), It), Xt = ["info", "success", "warning", "strong", "error"];
814
- function Te(e) {
815
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !L(e);
813
+ }), Be = V(B("Space"), _t), Zt = ["info", "success", "warning", "strong", "error"];
814
+ function pe(e) {
815
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !O(e);
816
816
  }
817
- const ge = F("message-box"), xe = (e) => {
817
+ const ke = $("message-box"), Oe = (e) => {
818
818
  const t = document.createElement("div"), l = () => {
819
- V(null, t);
820
- }, n = (f) => {
821
- if (f === "cancel")
819
+ I(null, t);
820
+ }, n = (d) => {
821
+ if (d === "cancel")
822
822
  return e.beforeOnCancel ? e.beforeOnCancel() : !0;
823
- if (f === "ok")
823
+ if (d === "ok")
824
824
  return e.beforeOnOk ? e.beforeOnOk() : !0;
825
- }, a = (f, m) => {
826
- f === "cancel" && e.onCancel && e.onCancel(m), f === "ok" && e.onOk && e.onOk(m);
827
- }, o = (f) => {
825
+ }, o = (d, m) => {
826
+ d === "cancel" && e.onCancel && e.onCancel(m), d === "ok" && e.onOk && e.onOk(m);
827
+ }, a = (d) => {
828
828
  let m;
829
- switch (f) {
829
+ switch (d) {
830
830
  case "warning":
831
- m = r(se, {
831
+ m = r(ye, {
832
832
  size: "22px",
833
833
  color: "#f6c64b"
834
834
  }, null);
835
835
  break;
836
836
  case "strong":
837
- m = r(ue, {
837
+ m = r(ve, {
838
838
  size: "22px",
839
839
  color: "#ff7125"
840
840
  }, null);
841
841
  break;
842
842
  case "error":
843
- m = r(oe, {
843
+ m = r(me, {
844
844
  size: "22px",
845
845
  color: "#e24f48"
846
846
  }, null);
847
847
  break;
848
848
  case "success":
849
- m = r(ie, {
849
+ m = r(he, {
850
850
  size: "22px",
851
851
  color: "#68d1ab"
852
852
  }, null);
853
853
  break;
854
854
  case "info":
855
- m = r(ce, {
855
+ m = r(ge, {
856
856
  size: "22px",
857
857
  color: "#2355f5"
858
858
  }, null);
859
859
  break;
860
860
  }
861
861
  return r("div", {
862
- class: ge.element("icon")
862
+ class: ke.element("icon")
863
863
  }, [m]);
864
- }, c = (f) => {
865
- if (L(f)) return f;
866
- if (O(f)) {
867
- const m = f();
868
- return L(m) ? m : null;
864
+ }, s = (d) => {
865
+ if (O(d)) return d;
866
+ if (S(d)) {
867
+ const m = d();
868
+ return O(m) ? m : null;
869
869
  }
870
870
  return r("div", {
871
- class: ge.element("title")
872
- }, [A(" "), f, A(" ")]);
873
- }, i = (f) => {
874
- if (L(f)) return f;
875
- if (O(f)) {
876
- const m = f();
877
- return L(m) ? m : null;
871
+ class: ke.element("title")
872
+ }, [p(" "), d, p(" ")]);
873
+ }, i = (d) => {
874
+ if (O(d)) return d;
875
+ if (S(d)) {
876
+ const m = d();
877
+ return O(m) ? m : null;
878
878
  }
879
879
  return r("div", {
880
- class: ge.element("content")
881
- }, [A(" "), e.content, A(" ")]);
882
- }, d = () => () => r(H, null, [o(e.type || "success"), e.title && c(e.title)]), s = () => () => r(H, null, [e.content && i(e.content)]), h = () => {
883
- if (L(e.footer) || O(e.footer))
880
+ class: ke.element("content")
881
+ }, [p(" "), e.content, p(" ")]);
882
+ }, f = () => () => r(Y, null, [a(e.type || "success"), e.title && s(e.title)]), c = () => () => r(Y, null, [e.content && i(e.content)]), y = () => {
883
+ if (O(e.footer) || S(e.footer))
884
884
  return e.footer;
885
- const f = (e == null ? void 0 : e.cancelText) || "取消", m = (e == null ? void 0 : e.okText) || "确认";
886
- return (C) => r(we, {
885
+ const d = (e == null ? void 0 : e.cancelText) || "取消", m = (e == null ? void 0 : e.okText) || "确认";
886
+ return (C) => r(Be, {
887
887
  size: 12
888
888
  }, {
889
889
  default: () => {
890
- var g, B;
891
- return [!e.hideCancel && r(G, {
890
+ var v, N;
891
+ return [!e.hideCancel && r(le, {
892
892
  size: "small",
893
893
  onClick: C.cancel,
894
- loading: (g = C.loadingObj) == null ? void 0 : g.cancel
895
- }, Te(f) ? f : {
896
- default: () => [f]
897
- }), !e.hideOk && r(G, {
894
+ loading: (v = C.loadingObj) == null ? void 0 : v.cancel
895
+ }, pe(d) ? d : {
896
+ default: () => [d]
897
+ }), !e.hideOk && r(le, {
898
898
  type: "primary",
899
899
  size: "small",
900
900
  onClick: C.ok,
901
- loading: (B = C.loadingObj) == null ? void 0 : B.ok
902
- }, Te(m) ? m : {
901
+ loading: (N = C.loadingObj) == null ? void 0 : N.ok
902
+ }, pe(m) ? m : {
903
903
  default: () => [m]
904
904
  })];
905
905
  }
906
906
  });
907
- }, u = r(Re, {
907
+ }, u = r(Ge, {
908
908
  messageBox: !0,
909
909
  width: (e == null ? void 0 : e.width) ?? 358,
910
910
  height: (e == null ? void 0 : e.height) ?? "auto",
@@ -915,7 +915,7 @@ const ge = F("message-box"), xe = (e) => {
915
915
  mask: (e == null ? void 0 : e.mask) ?? !0,
916
916
  maskToClose: (e == null ? void 0 : e.maskToClose) ?? !0,
917
917
  popupClass: e.popupClass,
918
- onClose: a,
918
+ onClose: o,
919
919
  onBeforeCancel: n,
920
920
  "onUpdate:modelValue": () => {
921
921
  u.component.props.modelValue = !1;
@@ -925,43 +925,43 @@ const ge = F("message-box"), xe = (e) => {
925
925
  onOpened: () => {
926
926
  }
927
927
  }, {
928
- title: d(),
929
- default: s(),
930
- footer: h()
928
+ title: f(),
929
+ default: c(),
930
+ footer: y()
931
931
  });
932
- V(u, t);
933
- }, Dt = () => {
934
- Xt.forEach((e) => {
935
- xe[e] = (t, l) => {
936
- const n = [], a = [];
937
- let o = () => !0, c = () => !0;
932
+ I(u, t);
933
+ }, qt = () => {
934
+ Zt.forEach((e) => {
935
+ Oe[e] = (t, l) => {
936
+ const n = [], o = [];
937
+ let a = () => !0, s = () => !0;
938
938
  return setTimeout(() => {
939
- xe({
939
+ Oe({
940
940
  title: t,
941
941
  content: l,
942
942
  type: e,
943
- beforeOnCancel: c,
944
- beforeOnOk: o,
943
+ beforeOnCancel: s,
944
+ beforeOnOk: a,
945
945
  onOk: () => {
946
- n.forEach((i) => O(i) && i());
946
+ n.forEach((i) => S(i) && i());
947
947
  },
948
948
  onCancel: () => {
949
- a.forEach((i) => O(i) && i());
949
+ o.forEach((i) => S(i) && i());
950
950
  }
951
951
  });
952
952
  }, 0), {
953
953
  ok(...i) {
954
- return i.length === 1 && n.push(i[0]), i.length === 2 && (o = i[0], n.push(i[1])), this;
954
+ return i.length === 1 && n.push(i[0]), i.length === 2 && (a = i[0], n.push(i[1])), this;
955
955
  },
956
956
  cancel(...i) {
957
- return i.length === 1 && a.push(i[0]), i.length === 2 && (c = i[0], a.push(i[1])), this;
957
+ return i.length === 1 && o.push(i[0]), i.length === 2 && (s = i[0], o.push(i[1])), this;
958
958
  }
959
959
  };
960
960
  };
961
961
  });
962
962
  };
963
- Dt();
964
- const Wt = I(S("MessageBox"), xe), Ht = {
963
+ qt();
964
+ const Ut = V(B("MessageBox"), Oe), Gt = {
965
965
  position: {
966
966
  type: String,
967
967
  default: "top-right"
@@ -999,50 +999,50 @@ const Wt = I(S("MessageBox"), xe), Ht = {
999
999
  type: Boolean,
1000
1000
  default: !1
1001
1001
  }
1002
- }, Ye = /* @__PURE__ */ z({
1003
- name: S("Notification"),
1004
- props: Ht,
1002
+ }, Ke = /* @__PURE__ */ E({
1003
+ name: B("Notification"),
1004
+ props: Gt,
1005
1005
  emits: ["close", "destroy"],
1006
1006
  setup(e, {
1007
1007
  emit: t,
1008
1008
  slots: l
1009
1009
  }) {
1010
- const n = F("notification"), a = n.block, o = v(() => [a, n.modifier(i.value.ver)]), {
1011
- zIndex: c
1012
- } = re("message", {
1010
+ const n = $("notification"), o = n.block, a = g(() => [o, n.modifier(i.value.ver)]), {
1011
+ zIndex: s
1012
+ } = fe("message", {
1013
1013
  runOnMounted: !0
1014
- }), i = v(() => {
1015
- const g = e.position.split("-");
1014
+ }), i = g(() => {
1015
+ const v = e.position.split("-");
1016
1016
  return {
1017
- hor: g[1],
1018
- ver: g[0]
1017
+ hor: v[1],
1018
+ ver: v[0]
1019
1019
  };
1020
- }), d = v(() => `x-notification-slide-${i.value.hor}`), s = v(() => {
1021
- const g = {};
1022
- return g.position = e.renderToBody ? "fixed" : "absolute", g.zIndex = c.value, g[i.value.hor] = "20px", g[i.value.ver] = `${e.offset}px`, g;
1023
- }), h = E(!1);
1020
+ }), f = g(() => `x-notification-slide-${i.value.hor}`), c = g(() => {
1021
+ const v = {};
1022
+ return v.position = e.renderToBody ? "fixed" : "absolute", v.zIndex = s.value, v[i.value.hor] = "20px", v[i.value.ver] = `${e.offset}px`, v;
1023
+ }), y = M(!1);
1024
1024
  let u = 0;
1025
- const f = () => {
1025
+ const d = () => {
1026
1026
  u = setTimeout(() => {
1027
- h.value = !1;
1027
+ y.value = !1;
1028
1028
  }, e.duration);
1029
- }, m = v(() => e.type === "info" ? ce : e.type === "warning" ? se : e.type === "strong" ? ue : e.type === "success" ? ie : e.type === "error" ? oe : ""), C = () => {
1030
- h.value = !1;
1029
+ }, m = g(() => e.type === "info" ? ge : e.type === "warning" ? ye : e.type === "strong" ? ve : e.type === "success" ? he : e.type === "error" ? me : ""), C = () => {
1030
+ y.value = !1;
1031
1031
  };
1032
- return R(() => {
1033
- e.duration !== 0 && f(), h.value = !0;
1034
- }), ne(() => {
1032
+ return W(() => {
1033
+ e.duration !== 0 && d(), y.value = !0;
1034
+ }), ue(() => {
1035
1035
  clearTimeout(u);
1036
- }), () => r(U, {
1037
- name: d.value,
1036
+ }), () => r(te, {
1037
+ name: f.value,
1038
1038
  onBeforeLeave: () => t("close"),
1039
1039
  onAfterLeave: () => t("destroy")
1040
1040
  }, {
1041
1041
  default: () => {
1042
- var g;
1043
- return [h.value && r("div", {
1044
- class: o.value,
1045
- style: s.value
1042
+ var v;
1043
+ return [y.value && r("div", {
1044
+ class: a.value,
1045
+ style: c.value
1046
1046
  }, [r("div", {
1047
1047
  class: [n.element("header")]
1048
1048
  }, [r("div", {
@@ -1051,14 +1051,14 @@ const Wt = I(S("MessageBox"), xe), Ht = {
1051
1051
  class: [n.element("title")]
1052
1052
  }, [e.title]), r("div", {
1053
1053
  class: [n.element("message")]
1054
- }, [((g = l.default) == null ? void 0 : g.call(l)) || e.message])])]), e.showClose && r("span", {
1054
+ }, [((v = l.default) == null ? void 0 : v.call(l)) || e.message])])]), e.showClose && r("span", {
1055
1055
  class: [n.element("close-icon")],
1056
1056
  onClick: C
1057
1057
  }, null)])];
1058
1058
  }
1059
1059
  });
1060
1060
  }
1061
- }), Rt = I(S("Notification"), Ye), Yt = (e) => {
1061
+ }), Kt = V(B("Notification"), Ke), Jt = (e) => {
1062
1062
  const t = e.split(" ").filter((n) => n !== "").map((n) => parseInt(n));
1063
1063
  let l = {};
1064
1064
  switch (t.length) {
@@ -1075,24 +1075,29 @@ const Wt = I(S("MessageBox"), xe), Ht = {
1075
1075
  l = { top: t[0], right: t[0], bottom: t[0], left: t[0] };
1076
1076
  }
1077
1077
  return l;
1078
- }, _t = (e) => {
1078
+ }, Qt = (e) => {
1079
1079
  const t = e.split(" ").filter((l) => l !== "").map((l) => parseInt(l));
1080
1080
  return t.length < 1 || t.length > 4 ? !1 : t.every((l) => typeof l == "number" && l >= 0);
1081
- }, Zt = {
1081
+ }, el = {
1082
1082
  // 数据集
1083
- datasets: {
1083
+ dataset: {
1084
1084
  required: !0,
1085
- type: N(Array)
1085
+ type: L(Array),
1086
+ default: () => []
1087
+ },
1088
+ status: {
1089
+ type: L(String),
1090
+ default: void 0
1086
1091
  },
1087
1092
  // 网格属性
1088
1093
  grid: {
1089
1094
  default: null,
1090
- type: N(Object)
1095
+ type: L(Object)
1091
1096
  },
1092
1097
  // 标签属性
1093
1098
  labels: {
1094
1099
  default: null,
1095
- type: N(Object)
1100
+ type: L(Object)
1096
1101
  },
1097
1102
  // 最大值,默认数据集最大值
1098
1103
  max: {
@@ -1107,7 +1112,7 @@ const Wt = I(S("MessageBox"), xe), Ht = {
1107
1112
  default: "5",
1108
1113
  type: String,
1109
1114
  validator(e) {
1110
- return _t(e);
1115
+ return Qt(e);
1111
1116
  }
1112
1117
  },
1113
1118
  // 开启交互,开启后启用onmousemove事件
@@ -1117,15 +1122,15 @@ const Wt = I(S("MessageBox"), xe), Ht = {
1117
1122
  },
1118
1123
  // 主题
1119
1124
  theme: {
1120
- type: N(Object),
1125
+ type: L(Object),
1121
1126
  default: () => ({
1122
1127
  activeLineColor: "#CCC"
1123
1128
  })
1124
1129
  }
1125
- }, qt = {
1130
+ }, tl = {
1126
1131
  boundary: {
1127
1132
  required: !0,
1128
- type: N(Object),
1133
+ type: L(Object),
1129
1134
  default: () => {
1130
1135
  }
1131
1136
  },
@@ -1146,38 +1151,41 @@ const Wt = I(S("MessageBox"), xe), Ht = {
1146
1151
  },
1147
1152
  data: {
1148
1153
  required: !0,
1149
- type: N(Array),
1154
+ type: L(Array),
1150
1155
  default: () => []
1151
1156
  },
1152
1157
  className: {
1153
1158
  type: String
1154
1159
  },
1160
+ // 平滑
1155
1161
  smooth: {
1156
- default: !1,
1162
+ default: !0,
1157
1163
  type: Boolean
1158
1164
  },
1159
1165
  stroke: {
1160
1166
  default: !0,
1161
1167
  type: Boolean
1162
1168
  },
1169
+ // 填充
1163
1170
  fill: {
1164
- default: !1,
1171
+ default: !0,
1165
1172
  type: Boolean
1166
1173
  },
1174
+ // 鼠标
1167
1175
  showPoints: {
1168
- default: !1,
1176
+ default: !0,
1169
1177
  type: Boolean
1170
1178
  },
1171
1179
  theme: {
1172
- type: N(Object)
1180
+ type: L(Object)
1173
1181
  },
1174
1182
  mainTheme: {
1175
- type: N(Object)
1183
+ type: L(Object)
1176
1184
  }
1177
- }, Ut = {
1185
+ }, ll = {
1178
1186
  boundary: {
1179
1187
  required: !0,
1180
- type: N(Object),
1188
+ type: L(Object),
1181
1189
  default: () => {
1182
1190
  }
1183
1191
  },
@@ -1197,10 +1205,10 @@ const Wt = I(S("MessageBox"), xe), Ht = {
1197
1205
  default: 0,
1198
1206
  type: Number
1199
1207
  }
1200
- }, Gt = {
1208
+ }, nl = {
1201
1209
  boundary: {
1202
1210
  required: !0,
1203
- type: N(Object),
1211
+ type: L(Object),
1204
1212
  default: () => {
1205
1213
  }
1206
1214
  },
@@ -1223,101 +1231,101 @@ const Wt = I(S("MessageBox"), xe), Ht = {
1223
1231
  default: (e) => e,
1224
1232
  type: Function
1225
1233
  }
1226
- }, Me = z({
1227
- name: S("TrendChartGrid"),
1228
- props: Ut,
1234
+ }, $e = E({
1235
+ name: B("TrendChartGrid"),
1236
+ props: ll,
1229
1237
  setup(e) {
1230
- const t = (o) => {
1231
- const c = e.verticalLinesNumber > 1 ? (e.boundary.maxX - e.boundary.minX) / (e.verticalLinesNumber - 1) : 0, i = e.boundary.minX + c * (o - 1), d = e.boundary.minY, s = e.boundary.maxY;
1238
+ const t = (a) => {
1239
+ const s = e.verticalLinesNumber > 1 ? (e.boundary.maxX - e.boundary.minX) / (e.verticalLinesNumber - 1) : 0, i = e.boundary.minX + s * (a - 1), f = e.boundary.minY, c = e.boundary.maxY;
1232
1240
  return {
1233
1241
  x1: i,
1234
1242
  x2: i,
1235
- y1: d,
1236
- y2: s,
1243
+ y1: f,
1244
+ y2: c,
1237
1245
  stroke: "rgba(0,0,0,0.1)"
1238
1246
  };
1239
- }, l = (o) => {
1240
- const c = e.horizontalLinesNumber > 1 ? (e.boundary.maxY - e.boundary.minY) / (e.horizontalLinesNumber - 1) : 0, i = e.boundary.maxY - c * (o - 1), d = e.boundary.minX, s = e.boundary.maxX;
1247
+ }, l = (a) => {
1248
+ const s = e.horizontalLinesNumber > 1 ? (e.boundary.maxY - e.boundary.minY) / (e.horizontalLinesNumber - 1) : 0, i = e.boundary.maxY - s * (a - 1), f = e.boundary.minX, c = e.boundary.maxX;
1241
1249
  return {
1242
- x1: d,
1243
- x2: s,
1250
+ x1: f,
1251
+ x2: c,
1244
1252
  y1: i,
1245
1253
  y2: i,
1246
1254
  stroke: "rgba(0,0,0,0.1)"
1247
1255
  };
1248
- }, n = v(() => {
1256
+ }, n = g(() => {
1249
1257
  if (e.verticalLines && e.verticalLinesNumber > 0) {
1250
- const o = [];
1251
- for (let c = 1; c <= e.verticalLinesNumber; c++)
1252
- o.push(
1253
- k("line", {
1258
+ const a = [];
1259
+ for (let s = 1; s <= e.verticalLinesNumber; s++)
1260
+ a.push(
1261
+ w("line", {
1254
1262
  class: "line",
1255
- ...t(c)
1263
+ ...t(s)
1256
1264
  })
1257
1265
  );
1258
- return k("g", { class: "vertical" }, o);
1266
+ return w("g", { class: "vertical" }, a);
1259
1267
  }
1260
1268
  return null;
1261
- }), a = v(() => {
1269
+ }), o = g(() => {
1262
1270
  if (e.horizontalLines && e.horizontalLinesNumber > 0) {
1263
- const o = [];
1264
- for (let c = 1; c <= e.horizontalLinesNumber; c++)
1265
- o.push(
1266
- k("line", {
1271
+ const a = [];
1272
+ for (let s = 1; s <= e.horizontalLinesNumber; s++)
1273
+ a.push(
1274
+ w("line", {
1267
1275
  class: "line",
1268
- ...l(c)
1276
+ ...l(s)
1269
1277
  })
1270
1278
  );
1271
- return k("g", { class: "horizontal" }, o);
1279
+ return w("g", { class: "horizontal" }, a);
1272
1280
  }
1273
1281
  return null;
1274
1282
  });
1275
1283
  return () => {
1276
- const o = [];
1277
- return n.value && o.push(n.value), a.value && o.push(a.value), o.length === 0 ? null : k("g", null, o);
1284
+ const a = [];
1285
+ return n.value && a.push(n.value), o.value && a.push(o.value), a.length === 0 ? null : w("g", null, a);
1278
1286
  };
1279
1287
  }
1280
- }), pe = z({
1281
- name: S("TrendChartLabels"),
1282
- props: Gt,
1288
+ }), Fe = E({
1289
+ name: B("TrendChartLabels"),
1290
+ props: nl,
1283
1291
  setup(e) {
1284
- const t = le({
1292
+ const t = ce({
1285
1293
  xLabelHeight: 0,
1286
1294
  yLabelHeight: 0
1287
- }), l = E(null), n = E(null), a = (d) => {
1288
- const s = (e.boundary.maxX - e.boundary.minX) / (e.xLabels.length - 1), h = e.boundary.minX + s * d, u = e.boundary.maxY;
1289
- return { transform: `translate(${h}, ${u})` };
1290
- }, o = (d) => {
1291
- const s = (e.boundary.maxY - e.boundary.minY) / (e.yLabels - 1), h = e.boundary.minX, u = e.boundary.maxY - s * d;
1292
- return { transform: `translate(${h}, ${u})` };
1295
+ }), l = M(null), n = M(null), o = (f) => {
1296
+ const c = (e.boundary.maxX - e.boundary.minX) / (e.xLabels.length - 1), y = e.boundary.minX + c * f, u = e.boundary.maxY;
1297
+ return { transform: `translate(${y}, ${u})` };
1298
+ }, a = (f) => {
1299
+ const c = (e.boundary.maxY - e.boundary.minY) / (e.yLabels - 1), y = e.boundary.minX, u = e.boundary.maxY - c * f;
1300
+ return { transform: `translate(${y}, ${u})` };
1293
1301
  };
1294
- R(() => {
1295
- var d, s;
1296
- l.value && e.xLabels && e.xLabels.length && (t.xLabelHeight = ((d = l.value.querySelector("text")) == null ? void 0 : d.getBoundingClientRect().height) || 0), n.value && e.yLabels && e.yLabels > 0 && (t.yLabelHeight = ((s = n.value.querySelector("text")) == null ? void 0 : s.getBoundingClientRect().height) || 0);
1302
+ W(() => {
1303
+ var f, c;
1304
+ l.value && e.xLabels && e.xLabels.length && (t.xLabelHeight = ((f = l.value.querySelector("text")) == null ? void 0 : f.getBoundingClientRect().height) || 0), n.value && e.yLabels && e.yLabels > 0 && (t.yLabelHeight = ((c = n.value.querySelector("text")) == null ? void 0 : c.getBoundingClientRect().height) || 0);
1297
1305
  });
1298
- const c = v(() => e.xLabels && e.xLabels.length ? k(
1306
+ const s = g(() => e.xLabels && e.xLabels.length ? w(
1299
1307
  "g",
1300
1308
  { class: "x-labels", ref: l },
1301
1309
  e.xLabels.map(
1302
- (d, s) => k("g", { class: "label", ...a(s) }, [
1303
- k(
1310
+ (f, c) => w("g", { class: "label", ...o(c) }, [
1311
+ w(
1304
1312
  "text",
1305
1313
  {
1306
1314
  dy: t.xLabelHeight + 5,
1307
1315
  "text-anchor": "middle"
1308
1316
  },
1309
- d
1317
+ f
1310
1318
  ),
1311
- k("line", { stroke: "rgba(0,0,0,0.1)", y2: 5 })
1319
+ w("line", { stroke: "rgba(0,0,0,0.1)", y2: 5 })
1312
1320
  ])
1313
1321
  )
1314
- ) : null), i = v(() => {
1322
+ ) : null), i = g(() => {
1315
1323
  if (e.yLabels && e.yLabels > 0) {
1316
- const d = [];
1317
- for (let s = 0; s < e.yLabels; s++)
1318
- d.push(
1319
- k("g", { class: "label", ...o(s) }, [
1320
- k(
1324
+ const f = [];
1325
+ for (let c = 0; c < e.yLabels; c++)
1326
+ f.push(
1327
+ w("g", { class: "label", ...a(c) }, [
1328
+ w(
1321
1329
  "text",
1322
1330
  {
1323
1331
  dx: -10,
@@ -1325,109 +1333,252 @@ const Wt = I(S("MessageBox"), xe), Ht = {
1325
1333
  "text-anchor": "end"
1326
1334
  },
1327
1335
  e.yLabelsTextFormatter(
1328
- e.minValue + (e.maxValue - e.minValue) / (e.yLabels - 1) * s
1336
+ e.minValue + (e.maxValue - e.minValue) / (e.yLabels - 1) * c
1329
1337
  )
1330
1338
  ),
1331
- k("line", { stroke: "rgba(0,0,0,0.1)", x1: 0, x2: -5 })
1339
+ w("line", { stroke: "rgba(0,0,0,0.1)", x1: 0, x2: -5 })
1332
1340
  ])
1333
1341
  );
1334
- return k("g", { class: "y-labels", ref: n }, d);
1342
+ return w("g", { class: "y-labels", ref: n }, f);
1335
1343
  }
1336
1344
  return null;
1337
1345
  });
1338
1346
  return () => {
1339
- const d = [];
1340
- return c.value && d.push(c.value), i.value && d.push(i.value), k("g", d);
1347
+ const f = [];
1348
+ return s.value && f.push(s.value), i.value && f.push(i.value), w("g", f);
1341
1349
  };
1342
1350
  }
1343
- }), Kt = (e, t, l, n, a) => {
1344
- e = e.map((d) => typeof d == "number" ? d : d.value);
1345
- const o = n - 1e-3, c = (t.maxX - t.minX) / (a - 1), i = (t.maxY - t.minY) / (l + 1e-3 - o);
1346
- return e.map((d, s) => ({
1347
- x: s * c + t.minX,
1348
- y: t.maxY - (d - o) * i + +(s === a - 1) * 1e-5 - +(s === 0) * 1e-5
1351
+ }), al = (e, t, l, n, o) => {
1352
+ const a = n - 1e-3, s = (t.maxX - t.minX) / (o - 1), i = (t.maxY - t.minY) / (l + 1e-3 - a);
1353
+ return e.map((f, c) => ({
1354
+ x: c * s + t.minX,
1355
+ y: t.maxY - (f - a) * i + +(c === o - 1) * 1e-5 - +(c === 0) * 1e-5
1349
1356
  }));
1350
- }, Jt = (e, t, { maxY: l }) => {
1351
- const n = e.shift(), a = e[e.length - 1], c = (e[0].x - n.x) / 2;
1357
+ }, rl = (e, t, { maxY: l }) => {
1358
+ const n = e.shift(), o = e[e.length - 1], s = (e[0].x - n.x) / 2;
1352
1359
  let i = `M ${n.x},${n.y}`;
1353
- e.forEach((s, h) => {
1354
- if (!t) i += ` L${s.x},${s.y}`;
1360
+ e.forEach((c, y) => {
1361
+ if (!t) i += ` L${c.x},${c.y}`;
1355
1362
  else {
1356
- const u = e[h - 1] || n;
1357
- i += ` C ${c + u.x},${u.y} ${c + u.x},${s.y} ${s.x},${s.y}`;
1363
+ const u = e[y - 1] || n;
1364
+ i += ` C ${s + u.x},${u.y} ${s + u.x},${c.y} ${c.x},${c.y}`;
1358
1365
  }
1359
1366
  });
1360
- let d = i;
1361
- return a.y !== l && (d += ` L${a.x},${l}`), n.y !== l && (d += ` L${n.x},${l}`), d += " Z", { linePath: i, fillPath: d };
1362
- }, Ee = /* @__PURE__ */ z({
1363
- name: S("TrendChartCurve"),
1364
- props: qt,
1367
+ let f = i;
1368
+ return o.y !== l && (f += ` L${o.x},${l}`), n.y !== l && (f += ` L${n.x},${l}`), f += " Z", { linePath: i, fillPath: f };
1369
+ }, je = /* @__PURE__ */ E({
1370
+ name: B("TrendChartCurve"),
1371
+ props: tl,
1365
1372
  setup(e) {
1366
- const t = v(() => Kt(e.data, e.boundary, e.maxValue, e.minValue, e.maxAmount)), l = v(() => Jt([...t.value], e.smooth, e.boundary)), n = v(() => {
1367
- var c, i, d, s, h, u, f, m, C, g, B, y;
1368
- const a = [];
1369
- console.log("世间自有公道----", e.mainTheme), e.fill && ((c = l.value) != null && c.fillPath) && a.push(r("path", {
1373
+ const t = g(() => al(e.data, e.boundary, e.maxValue, e.minValue, e.maxAmount)), l = g(() => rl([...t.value], e.smooth, e.boundary)), n = g(() => {
1374
+ var s, i, f, c, y, u, d, m, C, v, N, A;
1375
+ const o = [];
1376
+ e.fill && ((s = l.value) != null && s.fillPath) && o.push(r("path", {
1370
1377
  class: "x-trend-chart-fill",
1371
1378
  d: l.value.fillPath,
1372
1379
  fill: "none",
1373
1380
  style: {
1374
- fill: ((d = (i = e.theme) == null ? void 0 : i.fill) == null ? void 0 : d.color) || "#585858",
1375
- opacity: ((h = (s = e.theme) == null ? void 0 : s.fill) == null ? void 0 : h.opacity) || 0.1
1381
+ fill: ((f = (i = e.theme) == null ? void 0 : i.fill) == null ? void 0 : f.color) || "#585858",
1382
+ opacity: ((y = (c = e.theme) == null ? void 0 : c.fill) == null ? void 0 : y.opacity) || 0.1
1376
1383
  }
1377
- }, null)), e.stroke && ((u = l.value) != null && u.linePath) && (console.log("props.theme?.stroke?.color", e.theme), a.push(r("path", {
1384
+ }, null)), e.stroke && ((u = l.value) != null && u.linePath) && o.push(r("path", {
1378
1385
  class: "x-trend-chart-stroke",
1379
1386
  d: l.value.linePath,
1380
1387
  fill: "none",
1381
1388
  stroke: "none",
1382
1389
  style: {
1383
- stroke: ((m = (f = e.theme) == null ? void 0 : f.stroke) == null ? void 0 : m.color) || "#585858",
1384
- strokeWidth: ((g = (C = e.theme) == null ? void 0 : C.stroke) == null ? void 0 : g.width) || 2,
1385
- opacity: ((y = (B = e.theme) == null ? void 0 : B.stroke) == null ? void 0 : y.opacity) || 1
1390
+ stroke: (m = (d = e.theme) == null ? void 0 : d.stroke) == null ? void 0 : m.color,
1391
+ strokeWidth: (v = (C = e.theme) == null ? void 0 : C.stroke) == null ? void 0 : v.width,
1392
+ opacity: (A = (N = e.theme) == null ? void 0 : N.stroke) == null ? void 0 : A.opacity
1386
1393
  }
1387
- }, null)));
1388
- const o = (b) => b ? {
1389
- stroke: "#2f00a6",
1390
- strokeWidth: 2,
1391
- r: 2
1392
- } : {};
1394
+ }, null));
1395
+ const a = (h) => {
1396
+ var b, k, z, T;
1397
+ return h ? {
1398
+ stroke: (k = (b = e.theme) == null ? void 0 : b.point) == null ? void 0 : k.color,
1399
+ strokeWidth: (T = (z = e.theme) == null ? void 0 : z.point) == null ? void 0 : T.width,
1400
+ r: 1
1401
+ } : {};
1402
+ };
1393
1403
  if (e.showPoints && t.value) {
1394
- const b = t.value.map((w, M) => {
1395
- var $, T;
1404
+ const h = t.value.map((b, k) => {
1405
+ var z, T;
1396
1406
  return r("circle", {
1397
1407
  class: {
1398
1408
  point: !0,
1399
- "x-trend-chart-point-active": (($ = e.activeLineParams) == null ? void 0 : $.index) === M
1409
+ "x-trend-chart-point-active": ((z = e.activeLineParams) == null ? void 0 : z.index) === k
1400
1410
  },
1401
- cx: w.x,
1402
- cy: w.y,
1403
- style: o(((T = e.activeLineParams) == null ? void 0 : T.index) === M)
1411
+ cx: b.x,
1412
+ cy: b.y,
1413
+ style: a(((T = e.activeLineParams) == null ? void 0 : T.index) === k)
1404
1414
  }, null);
1405
1415
  });
1406
- a.push(r("g", {
1416
+ o.push(r("g", {
1407
1417
  class: "x-trend-chart-points"
1408
- }, [b]));
1418
+ }, [h]));
1409
1419
  }
1410
- return a;
1420
+ return o;
1411
1421
  });
1412
1422
  return () => r("g", {
1413
1423
  class: e.className
1414
1424
  }, [n.value]);
1415
1425
  }
1416
- }), Qt = /* @__PURE__ */ z({
1417
- name: S("TrendChart"),
1426
+ }), ie = "#f00", Z = "#ff7126", q = "#ffc703", U = "#363636", G = "#25c341", K = "#0056ff", R = {
1427
+ DANGER: {
1428
+ // 主题色
1429
+ color: "#f00",
1430
+ // 点
1431
+ point: {
1432
+ width: 3,
1433
+ color: ie
1434
+ },
1435
+ // 描边
1436
+ stroke: {
1437
+ width: 3,
1438
+ color: ie,
1439
+ opacity: 0.8
1440
+ },
1441
+ // 填充
1442
+ fill: {
1443
+ color: ie,
1444
+ opacity: 0.1
1445
+ },
1446
+ axisLine: {
1447
+ color: ie,
1448
+ width: 2,
1449
+ opacity: 0.9
1450
+ }
1451
+ },
1452
+ STRONG: {
1453
+ // 主题色
1454
+ color: Z,
1455
+ // 点
1456
+ point: {
1457
+ width: 4,
1458
+ color: Z
1459
+ },
1460
+ stroke: {
1461
+ width: 3,
1462
+ color: Z,
1463
+ opacity: 0.8
1464
+ },
1465
+ fill: {
1466
+ color: Z,
1467
+ opacity: 0.1
1468
+ },
1469
+ axisLine: {
1470
+ color: Z,
1471
+ width: 2,
1472
+ opacity: 0.9
1473
+ }
1474
+ },
1475
+ WARNING: {
1476
+ // 主题色
1477
+ color: q,
1478
+ // 点
1479
+ point: {
1480
+ width: 4,
1481
+ color: q
1482
+ },
1483
+ stroke: {
1484
+ width: 3,
1485
+ color: q,
1486
+ opacity: 1
1487
+ },
1488
+ fill: {
1489
+ color: q,
1490
+ opacity: 0.1
1491
+ },
1492
+ axisLine: {
1493
+ color: q,
1494
+ width: 2,
1495
+ opacity: 0.9
1496
+ }
1497
+ },
1498
+ SUCCESS: {
1499
+ // 主题色
1500
+ color: G,
1501
+ // 点
1502
+ point: {
1503
+ width: 4,
1504
+ color: G
1505
+ },
1506
+ stroke: {
1507
+ width: 3,
1508
+ color: G,
1509
+ opacity: 1
1510
+ },
1511
+ fill: {
1512
+ color: G,
1513
+ opacity: 0.1
1514
+ },
1515
+ axisLine: {
1516
+ color: G,
1517
+ width: 2,
1518
+ opacity: 0.9
1519
+ }
1520
+ },
1521
+ INFO: {
1522
+ // 主题色
1523
+ color: U,
1524
+ // 点
1525
+ point: {
1526
+ width: 4,
1527
+ color: U
1528
+ },
1529
+ stroke: {
1530
+ width: 3,
1531
+ color: U,
1532
+ opacity: 1
1533
+ },
1534
+ fill: {
1535
+ color: U,
1536
+ opacity: 0.1
1537
+ },
1538
+ axisLine: {
1539
+ color: U,
1540
+ width: 2,
1541
+ opacity: 0.9
1542
+ }
1543
+ },
1544
+ PRIMARY: {
1545
+ // 主题色
1546
+ color: K,
1547
+ // 点
1548
+ point: {
1549
+ width: 4,
1550
+ color: K
1551
+ },
1552
+ stroke: {
1553
+ width: 3,
1554
+ color: K,
1555
+ opacity: 0.9
1556
+ },
1557
+ fill: {
1558
+ color: K,
1559
+ opacity: 0.1
1560
+ },
1561
+ axisLine: {
1562
+ color: K,
1563
+ width: 2,
1564
+ opacity: 0.9
1565
+ }
1566
+ }
1567
+ }, ol = /* @__PURE__ */ E({
1568
+ name: B("TrendChart"),
1418
1569
  components: {
1419
- TrendChartGrid: Me,
1420
- TrendChartLabels: pe,
1421
- TrendChartCurve: Ee
1570
+ TrendChartGrid: $e,
1571
+ TrendChartLabels: Fe,
1572
+ TrendChartCurve: je
1422
1573
  },
1423
- props: Zt,
1574
+ props: el,
1424
1575
  emits: {
1425
1576
  "mouse-move": (e) => !0
1426
1577
  },
1427
1578
  setup(e, {
1428
1579
  emit: t
1429
1580
  }) {
1430
- const l = le({
1581
+ const l = ce({
1431
1582
  width: null,
1432
1583
  height: null,
1433
1584
  labelsOverflowObject: {
@@ -1438,46 +1589,48 @@ const Wt = I(S("MessageBox"), xe), Ht = {
1438
1589
  },
1439
1590
  activeLine: null,
1440
1591
  activeLineParams: null
1441
- }), n = v(() => Yt(e.padding || "0")), a = v(() => ({
1442
- minX: Number(n.value.left) + Number(l.labelsOverflowObject.left),
1443
- minY: Number(n.value.top) + Number(l.labelsOverflowObject.top),
1444
- maxX: (l.width ?? 0) - Number(n.value.right) - Number(l.labelsOverflowObject.right),
1445
- maxY: (l.height ?? 0) - Number(n.value.bottom) - Number(l.labelsOverflowObject.bottom)
1446
- })), o = v(() => {
1447
- var M;
1448
- let y = -1 / 0, b = 1 / 0, w = 0;
1449
- return (M = e == null ? void 0 : e.datasets) == null || M.forEach(($) => {
1450
- const T = $.data.map((p) => typeof p == "number" ? p : p.value);
1451
- y = Math.max(y, ...T), b = Math.min(b, ...T), w = Math.max(w, T.length);
1452
- }), e.max !== void 0 && (y = Math.max(y, e.max)), e.min !== void 0 && (b = Math.min(b, e.min)), {
1453
- maxValue: y,
1592
+ }), n = g(() => {
1593
+ let h = R.INFO;
1594
+ return e.status === "primary" ? h = R.PRIMARY : e.status === "success" ? h = R.SUCCESS : e.status === "danger" ? h = R.DANGER : e.status === "warning" ? h = R.WARNING : e.status === "strong" && (h = R.STRONG), {
1595
+ ...h,
1596
+ ...e.theme
1597
+ };
1598
+ }), o = g(() => Jt(e.padding || "0")), a = g(() => ({
1599
+ minX: Number(o.value.left) + Number(l.labelsOverflowObject.left),
1600
+ minY: Number(o.value.top) + Number(l.labelsOverflowObject.top),
1601
+ maxX: (l.width ?? 0) - Number(o.value.right) - Number(l.labelsOverflowObject.right),
1602
+ maxY: (l.height ?? 0) - Number(o.value.bottom) - Number(l.labelsOverflowObject.bottom)
1603
+ })), s = g(() => {
1604
+ let h = -1 / 0, b = 1 / 0, k = 0;
1605
+ return h = Math.max(h, ...e.dataset), b = Math.min(b, ...e.dataset), k = Math.max(k, e.dataset.length), e.max !== void 0 && (h = Math.max(h, e.max)), e.min !== void 0 && (b = Math.min(b, e.min)), {
1606
+ maxValue: h,
1454
1607
  minValue: b,
1455
- maxAmount: w
1608
+ maxAmount: k
1456
1609
  };
1457
- }), c = v(() => ({
1610
+ }), i = g(() => ({
1458
1611
  x: a.value.minX,
1459
1612
  y: a.value.minY,
1460
1613
  width: Math.max(0, a.value.maxX - a.value.minX),
1461
1614
  height: Math.max(0, a.value.maxY - a.value.minY),
1462
1615
  opacity: 0
1463
- })), i = v(() => {
1464
- const y = (a.value.maxX - a.value.minX) / (o.value.maxAmount - 1);
1616
+ })), f = g(() => {
1617
+ const h = (a.value.maxX - a.value.minX) / (s.value.maxAmount - 1);
1465
1618
  return Array.from({
1466
- length: o.value.maxAmount
1467
- }, (b, w) => Math.round(a.value.minX + y * w));
1468
- }), d = E(null), s = E(null), h = () => {
1469
- if (d.value) {
1470
- const y = d.value.getBoundingClientRect();
1471
- l.width = y.width, l.height = y.height;
1619
+ length: s.value.maxAmount
1620
+ }, (b, k) => Math.round(a.value.minX + h * k));
1621
+ }), c = M(null), y = M(null), u = () => {
1622
+ if (c.value) {
1623
+ const h = c.value.getBoundingClientRect();
1624
+ l.width = h.width, l.height = h.height;
1472
1625
  }
1473
- }, u = () => {
1474
- if (s.value) {
1475
- const y = d.value.getBoundingClientRect(), b = s.value.$el.getBoundingClientRect();
1626
+ }, d = () => {
1627
+ if (y.value) {
1628
+ const h = c.value.getBoundingClientRect(), b = y.value.$el.getBoundingClientRect();
1476
1629
  l.labelsOverflowObject = {
1477
- top: Math.max(0, Number(y.top) - Number(b.top) + Number(n.value.top)),
1478
- right: Math.max(0, Number(b.right) - Number(y.right) + Number(n.value.right)),
1479
- bottom: Math.max(0, Number(b.bottom) - Number(y.bottom) + Number(n.value.bottom)),
1480
- left: Math.max(0, Number(n.value.left) - Number(b.left) + Number(y.left))
1630
+ top: Math.max(0, Number(h.top) - Number(b.top) + Number(o.value.top)),
1631
+ right: Math.max(0, Number(b.right) - Number(h.right) + Number(o.value.right)),
1632
+ bottom: Math.max(0, Number(b.bottom) - Number(h.bottom) + Number(o.value.bottom)),
1633
+ left: Math.max(0, Number(o.value.left) - Number(b.left) + Number(h.left))
1481
1634
  };
1482
1635
  } else
1483
1636
  l.labelsOverflowObject = {
@@ -1486,75 +1639,74 @@ const Wt = I(S("MessageBox"), xe), Ht = {
1486
1639
  bottom: 0,
1487
1640
  left: 0
1488
1641
  };
1489
- }, f = () => {
1490
- h(), Ne(u);
1491
- }, m = (y) => i.value.reduce((b, w) => Math.abs(b - y) > Math.abs(w - y) ? w : b, 1 / 0), C = (y) => {
1492
- if (d.value) {
1493
- const b = d.value.getBoundingClientRect();
1494
- l.activeLine = m(y.clientX - b.left);
1642
+ }, m = () => {
1643
+ u(), Ee(d);
1644
+ }, C = (h) => f.value.reduce((b, k) => Math.abs(b - h) > Math.abs(k - h) ? k : b, 1 / 0), v = (h) => {
1645
+ if (c.value) {
1646
+ const b = c.value.getBoundingClientRect();
1647
+ l.activeLine = C(h.clientX - b.left);
1495
1648
  }
1496
- }, g = () => {
1649
+ }, N = () => {
1497
1650
  l.activeLine = null, l.activeLineParams = null;
1498
- }, B = () => {
1499
- h();
1651
+ }, A = () => {
1652
+ u();
1500
1653
  };
1501
- return R(() => {
1502
- f(), window.addEventListener("resize", B);
1503
- }), ne(() => {
1504
- window.removeEventListener("resize", B);
1505
- }), q(() => l.activeLine, (y) => {
1506
- var b;
1507
- if (y !== null) {
1508
- const w = i.value.indexOf(y);
1654
+ return W(() => {
1655
+ m(), window.addEventListener("resize", A);
1656
+ }), ue(() => {
1657
+ window.removeEventListener("resize", A);
1658
+ }), ee(() => l.activeLine, (h) => {
1659
+ if (h !== null) {
1660
+ const b = f.value.indexOf(h);
1509
1661
  l.activeLineParams = {
1510
- index: w
1662
+ index: b
1511
1663
  }, t("mouse-move", {
1512
1664
  ...l.activeLineParams,
1513
- data: ((b = e.datasets) == null ? void 0 : b.map((M) => M.data[w])) || []
1665
+ data: e.dataset[b]
1514
1666
  });
1515
1667
  } else
1516
1668
  t("mouse-move", null);
1517
- }), q(() => e.labels, () => {
1669
+ }), ee(() => e.labels, () => {
1518
1670
  l.labelsOverflowObject = {
1519
1671
  top: 0,
1520
1672
  right: 0,
1521
1673
  bottom: 0,
1522
1674
  left: 0
1523
- }, Ne(u);
1675
+ }, Ee(d);
1524
1676
  }, {
1525
1677
  deep: !0
1526
1678
  }), () => {
1527
- var y, b, w, M, $, T, p, J;
1679
+ var h, b, k, z, T, F, ae;
1528
1680
  return r("svg", {
1529
1681
  class: "x-trend-chart",
1530
- ref: d,
1682
+ ref: c,
1531
1683
  xmlns: "http://www.w3.org/2000/svg",
1532
1684
  width: "100%",
1533
1685
  height: "100%"
1534
- }, [e.grid && r(Me, {
1686
+ }, [e.grid && r($e, {
1535
1687
  class: "grid",
1536
1688
  verticalLines: e.grid.verticalLines,
1537
- verticalLinesNumber: e.grid.verticalLinesNumber || o.value.maxAmount,
1689
+ verticalLinesNumber: e.grid.verticalLinesNumber || s.value.maxAmount,
1538
1690
  horizontalLines: e.grid.horizontalLines,
1539
- horizontalLinesNumber: e.grid.horizontalLinesNumber || (((y = e.labels) == null ? void 0 : y.yLabels) ?? 0),
1691
+ horizontalLinesNumber: e.grid.horizontalLinesNumber || (((h = e.labels) == null ? void 0 : h.yLabels) ?? 0),
1540
1692
  boundary: a.value
1541
- }, null), e.labels && r(pe, me({
1542
- ref: s,
1693
+ }, null), e.labels && r(Fe, ze({
1694
+ ref: y,
1543
1695
  class: "labels"
1544
1696
  }, e.labels, {
1545
1697
  boundary: a.value,
1546
- minValue: o.value.minValue,
1547
- maxValue: o.value.maxValue
1548
- }), null), (b = e.datasets) == null ? void 0 : b.map((de) => r(Ee, me({
1549
- class: "curve"
1550
- }, de, {
1698
+ minValue: s.value.minValue,
1699
+ maxValue: s.value.maxValue
1700
+ }), null), r(je, {
1701
+ class: "curve",
1702
+ data: e.dataset,
1551
1703
  boundary: a.value,
1552
- minValue: o.value.minValue,
1553
- maxValue: o.value.maxValue,
1554
- maxAmount: o.value.maxAmount,
1704
+ minValue: s.value.minValue,
1705
+ maxValue: s.value.maxValue,
1706
+ maxAmount: s.value.maxAmount,
1555
1707
  activeLineParams: l.activeLineParams,
1556
- mainTheme: e.theme
1557
- }), null)), e.interactive && r(H, null, [r("line", {
1708
+ theme: n.value
1709
+ }, null), e.interactive && r(Y, null, [r("line", {
1558
1710
  class: "x-trend-chart-active-line",
1559
1711
  x1: l.activeLine ?? a.value.minX,
1560
1712
  x2: l.activeLine ?? a.value.minX,
@@ -1562,83 +1714,83 @@ const Wt = I(S("MessageBox"), xe), Ht = {
1562
1714
  y2: a.value.maxY,
1563
1715
  visibility: l.activeLine ? "visible" : "hidden",
1564
1716
  style: {
1565
- stroke: ((M = (w = e.theme) == null ? void 0 : w.axisLine) == null ? void 0 : M.color) || "#CCC",
1566
- strokeWidth: ((T = ($ = e.theme) == null ? void 0 : $.axisLine) == null ? void 0 : T.width) || 1,
1567
- strokeOpacity: ((J = (p = e.theme) == null ? void 0 : p.axisLine) == null ? void 0 : J.opacity) || 1
1717
+ stroke: (k = (b = n.value) == null ? void 0 : b.axisLine) == null ? void 0 : k.color,
1718
+ strokeWidth: (T = (z = n.value) == null ? void 0 : z.axisLine) == null ? void 0 : T.width,
1719
+ strokeOpacity: (ae = (F = n.value) == null ? void 0 : F.axisLine) == null ? void 0 : ae.opacity
1568
1720
  }
1569
- }, null), r("rect", me(c.value, {
1570
- onMousemove: C,
1571
- onMouseout: g
1721
+ }, null), r("rect", ze(i.value, {
1722
+ onMousemove: v,
1723
+ onMouseout: N
1572
1724
  }), null)])]);
1573
1725
  };
1574
1726
  }
1575
- }), el = I(S("TrendChart"), Qt), ze = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1727
+ }), il = V(B("TrendChart"), ol), Ie = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1576
1728
  __proto__: null,
1577
- XButton: G,
1578
- XDialog: Re,
1579
- XMessage: Vt,
1580
- XMessageBox: Wt,
1581
- XNotification: Rt,
1582
- XSpace: we,
1583
- XTrendChart: el
1729
+ XButton: le,
1730
+ XDialog: Ge,
1731
+ XMessage: Wt,
1732
+ XMessageBox: Ut,
1733
+ XNotification: Kt,
1734
+ XSpace: Be,
1735
+ XTrendChart: il
1584
1736
  }, Symbol.toStringTag, { value: "Module" }));
1585
- function Pe(e) {
1586
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !L(e);
1737
+ function Ve(e) {
1738
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !O(e);
1587
1739
  }
1588
- const $e = F("dialog"), dl = (e) => {
1740
+ const Xe = $("dialog"), bl = (e) => {
1589
1741
  const t = document.createElement("div"), l = () => {
1590
- V(null, t);
1742
+ I(null, t);
1591
1743
  }, n = (u) => {
1592
1744
  if (u === "cancel")
1593
1745
  return e.beforeOnCancel ? e.beforeOnCancel() : !0;
1594
1746
  if (u === "ok")
1595
1747
  return e.beforeOnOk ? e.beforeOnOk() : !0;
1596
- }, a = (u, f) => {
1597
- u === "cancel" && e.onCancel && e.onCancel(f), u === "ok" && e.onOk && e.onOk(f);
1598
- }, o = (u) => {
1599
- if (L(u)) return u;
1600
- if (O(u)) {
1601
- const f = u();
1602
- return L(f) ? f : null;
1748
+ }, o = (u, d) => {
1749
+ u === "cancel" && e.onCancel && e.onCancel(d), u === "ok" && e.onOk && e.onOk(d);
1750
+ }, a = (u) => {
1751
+ if (O(u)) return u;
1752
+ if (S(u)) {
1753
+ const d = u();
1754
+ return O(d) ? d : null;
1603
1755
  }
1604
1756
  return r("div", {
1605
- class: $e.element("header-title")
1606
- }, [A(" "), u, A(" ")]);
1607
- }, c = (u) => {
1608
- if (L(u)) return u;
1609
- if (O(u)) {
1610
- const f = u();
1611
- return L(f) ? f : null;
1757
+ class: Xe.element("header-title")
1758
+ }, [p(" "), u, p(" ")]);
1759
+ }, s = (u) => {
1760
+ if (O(u)) return u;
1761
+ if (S(u)) {
1762
+ const d = u();
1763
+ return O(d) ? d : null;
1612
1764
  }
1613
1765
  return r("div", {
1614
- class: $e.element("content")
1615
- }, [A(" "), e.content, A(" ")]);
1616
- }, i = () => () => r(H, null, [e.title && o(e.title)]), d = () => () => r(H, null, [e.content && c(e.content)]), s = () => {
1617
- if (L(e.footer) || O(e.footer))
1766
+ class: Xe.element("content")
1767
+ }, [p(" "), e.content, p(" ")]);
1768
+ }, i = () => () => r(Y, null, [e.title && a(e.title)]), f = () => () => r(Y, null, [e.content && s(e.content)]), c = () => {
1769
+ if (O(e.footer) || S(e.footer))
1618
1770
  return e.footer;
1619
- const u = (e == null ? void 0 : e.cancelText) || "取消", f = (e == null ? void 0 : e.okText) || "确认";
1620
- return (m) => r(we, {
1771
+ const u = (e == null ? void 0 : e.cancelText) || "取消", d = (e == null ? void 0 : e.okText) || "确认";
1772
+ return (m) => r(Be, {
1621
1773
  size: 12
1622
1774
  }, {
1623
1775
  default: () => {
1624
- var C, g;
1625
- return [!e.hideCancel && r(G, {
1776
+ var C, v;
1777
+ return [!e.hideCancel && r(le, {
1626
1778
  size: "small",
1627
1779
  onClick: m.cancel,
1628
1780
  loading: (C = m.loadingObj) == null ? void 0 : C.cancel
1629
- }, Pe(u) ? u : {
1781
+ }, Ve(u) ? u : {
1630
1782
  default: () => [u]
1631
- }), !e.hideOk && r(G, {
1783
+ }), !e.hideOk && r(le, {
1632
1784
  type: "primary",
1633
1785
  size: "small",
1634
1786
  onClick: m.ok,
1635
- loading: (g = m.loadingObj) == null ? void 0 : g.ok
1636
- }, Pe(f) ? f : {
1637
- default: () => [f]
1787
+ loading: (v = m.loadingObj) == null ? void 0 : v.ok
1788
+ }, Ve(d) ? d : {
1789
+ default: () => [d]
1638
1790
  })];
1639
1791
  }
1640
1792
  });
1641
- }, h = r(He, {
1793
+ }, y = r(Ue, {
1642
1794
  width: (e == null ? void 0 : e.width) ?? 368,
1643
1795
  height: (e == null ? void 0 : e.height) ?? "auto",
1644
1796
  modelValue: !0,
@@ -1648,10 +1800,10 @@ const $e = F("dialog"), dl = (e) => {
1648
1800
  mask: (e == null ? void 0 : e.mask) ?? !0,
1649
1801
  maskToClose: (e == null ? void 0 : e.maskToClose) ?? !0,
1650
1802
  popupClass: e.popupClass,
1651
- onClose: a,
1803
+ onClose: o,
1652
1804
  onBeforeCancel: n,
1653
1805
  "onUpdate:modelValue": () => {
1654
- h.component.props.modelValue = !1;
1806
+ y.component.props.modelValue = !1;
1655
1807
  },
1656
1808
  // 等待动画完全结束后销毁vm
1657
1809
  onClosed: l,
@@ -1659,18 +1811,18 @@ const $e = F("dialog"), dl = (e) => {
1659
1811
  }
1660
1812
  }, {
1661
1813
  title: i(),
1662
- default: d(),
1663
- footer: s()
1814
+ default: f(),
1815
+ footer: c()
1664
1816
  });
1665
- V(h, t);
1666
- }, tl = ["success", "warning", "error", "strong", "info"], ll = z({
1667
- name: S("Message"),
1817
+ I(y, t);
1818
+ }, sl = ["success", "warning", "error", "strong", "info"], cl = E({
1819
+ name: B("Message"),
1668
1820
  components: {
1669
- CloseCircleFill: oe,
1670
- CheckCircleFill: ie,
1671
- ExclamationCircleFill: se,
1672
- InfoCircleFill: ce,
1673
- MinusCircleFill: ue
1821
+ CloseCircleFill: me,
1822
+ CheckCircleFill: he,
1823
+ ExclamationCircleFill: ye,
1824
+ InfoCircleFill: ge,
1825
+ MinusCircleFill: ve
1674
1826
  },
1675
1827
  props: {
1676
1828
  id: {
@@ -1718,27 +1870,27 @@ const $e = F("dialog"), dl = (e) => {
1718
1870
  },
1719
1871
  emits: ["destroy"],
1720
1872
  setup(e) {
1721
- const t = F("message"), l = v(() => [
1873
+ const t = $("message"), l = g(() => [
1722
1874
  t.block,
1723
1875
  t.modifier(e.type),
1724
1876
  e.center && t.modifier("center"),
1725
1877
  e.showClose && !e.center && t.element("show-close"),
1726
1878
  e.popupClass && e.popupClass
1727
- ]), n = E(!1);
1728
- let a = null;
1729
- const o = () => {
1730
- a = setTimeout(() => {
1879
+ ]), n = M(!1);
1880
+ let o = null;
1881
+ const a = () => {
1882
+ o = setTimeout(() => {
1731
1883
  n.value = !1;
1732
1884
  }, e.duration);
1733
1885
  };
1734
- R(() => {
1735
- n.value = !0, e.duration !== 0 && o();
1736
- }), ne(() => {
1737
- clearTimeout(a);
1886
+ W(() => {
1887
+ n.value = !0, e.duration !== 0 && a();
1888
+ }), ue(() => {
1889
+ clearTimeout(o);
1738
1890
  });
1739
- const { zIndex: c } = re("message", { runOnMounted: !0 }), i = v(() => ({
1891
+ const { zIndex: s } = fe("message", { runOnMounted: !0 }), i = g(() => ({
1740
1892
  top: `${e.offset}px`,
1741
- zIndex: c.value
1893
+ zIndex: s.value
1742
1894
  }));
1743
1895
  return {
1744
1896
  cn: t,
@@ -1750,326 +1902,163 @@ const $e = F("dialog"), dl = (e) => {
1750
1902
  }
1751
1903
  };
1752
1904
  }
1753
- }), nl = (e, t) => {
1905
+ }), ul = (e, t) => {
1754
1906
  const l = e.__vccOpts || e;
1755
- for (const [n, a] of t)
1756
- l[n] = a;
1907
+ for (const [n, o] of t)
1908
+ l[n] = o;
1757
1909
  return l;
1758
- }, al = ["innerHTML"], rl = { key: 1 };
1759
- function ol(e, t, l, n, a, o) {
1760
- const c = Y("CheckCircleFill"), i = Y("ExclamationCircleFill"), d = Y("MinusCircleFill"), s = Y("CloseCircleFill"), h = Y("InfoCircleFill");
1761
- return P(), W(U, {
1910
+ }, dl = ["innerHTML"], fl = { key: 1 };
1911
+ function ml(e, t, l, n, o, a) {
1912
+ const s = _("CheckCircleFill"), i = _("ExclamationCircleFill"), f = _("MinusCircleFill"), c = _("CloseCircleFill"), y = _("InfoCircleFill");
1913
+ return P(), H(te, {
1762
1914
  name: "x-message-slide-top",
1763
1915
  onBeforeLeave: e.onClose,
1764
1916
  onAfterLeave: t[1] || (t[1] = (u) => e.$emit("destroy"))
1765
1917
  }, {
1766
- default: tt(() => [
1767
- lt(nt("div", {
1768
- class: he(e.cls),
1769
- style: at(e.styles)
1918
+ default: st(() => [
1919
+ ct(ut("div", {
1920
+ class: Ce(e.cls),
1921
+ style: dt(e.styles)
1770
1922
  }, [
1771
- e.$slots.icon ? ye("", !0) : (P(), ee("span", {
1923
+ e.$slots.icon ? xe("", !0) : (P(), oe("span", {
1772
1924
  key: 0,
1773
- class: he([e.cn.element("icon"), e.cn.modifier(`icon-${e.type}`)])
1925
+ class: Ce([e.cn.element("icon"), e.cn.modifier(`icon-${e.type}`)])
1774
1926
  }, [
1775
- Oe(e.$slots, "icon", {}, () => [
1776
- e.type === "success" ? (P(), W(c, { key: 0 })) : e.type === "warning" ? (P(), W(i, { key: 1 })) : e.type === "strong" ? (P(), W(d, { key: 2 })) : e.type === "error" ? (P(), W(s, { key: 3 })) : e.type === "info" ? (P(), W(h, { key: 4 })) : ye("", !0)
1927
+ Pe(e.$slots, "icon", {}, () => [
1928
+ e.type === "success" ? (P(), H(s, { key: 0 })) : e.type === "warning" ? (P(), H(i, { key: 1 })) : e.type === "strong" ? (P(), H(f, { key: 2 })) : e.type === "error" ? (P(), H(c, { key: 3 })) : e.type === "info" ? (P(), H(y, { key: 4 })) : xe("", !0)
1777
1929
  ])
1778
1930
  ], 2)),
1779
- Oe(e.$slots, "default", {}, () => [
1780
- e.useHTML ? (P(), ee("span", {
1931
+ Pe(e.$slots, "default", {}, () => [
1932
+ e.useHTML ? (P(), oe("span", {
1781
1933
  key: 0,
1782
1934
  innerHTML: e.message
1783
- }, null, 8, al)) : (P(), ee("span", rl, rt(e.message), 1)),
1784
- e.showClose ? (P(), ee("span", {
1935
+ }, null, 8, dl)) : (P(), oe("span", fl, ft(e.message), 1)),
1936
+ e.showClose ? (P(), oe("span", {
1785
1937
  key: 2,
1786
- class: he([e.cn.element("close-icon")]),
1938
+ class: Ce([e.cn.element("close-icon")]),
1787
1939
  onClick: t[0] || (t[0] = (...u) => e.handleClose && e.handleClose(...u))
1788
- }, null, 2)) : ye("", !0)
1940
+ }, null, 2)) : xe("", !0)
1789
1941
  ])
1790
1942
  ], 6), [
1791
- [ot, e.visible]
1943
+ [mt, e.visible]
1792
1944
  ])
1793
1945
  ]),
1794
1946
  _: 3
1795
1947
  }, 8, ["onBeforeLeave"]);
1796
1948
  }
1797
- const il = /* @__PURE__ */ nl(ll, [["render", ol]]), be = /* @__PURE__ */ new WeakMap(), Ce = (e) => {
1798
- (typeof e == "string" || L(e)) && (e = {
1949
+ const hl = /* @__PURE__ */ ul(cl, [["render", ml]]), Le = /* @__PURE__ */ new WeakMap(), Ne = (e) => {
1950
+ (typeof e == "string" || O(e)) && (e = {
1799
1951
  message: e
1800
1952
  });
1801
- const t = ke(e.renderTo || "body"), l = document.createElement("div");
1802
- be.has(t) || be.set(t, []);
1803
- const n = be.get(t);
1804
- let a = e.offset || 20;
1953
+ const t = Se(e.renderTo || "body"), l = document.createElement("div");
1954
+ Le.has(t) || Le.set(t, []);
1955
+ const n = Le.get(t);
1956
+ let o = e.offset || 20;
1805
1957
  n.forEach((u) => {
1806
- var f;
1807
- a += ((f = u.el) == null ? void 0 : f.offsetHeight) + 20;
1958
+ var d;
1959
+ o += ((d = u.el) == null ? void 0 : d.offsetHeight) + 20;
1808
1960
  });
1809
- const o = e.onClose;
1810
- let c = {};
1811
- c = { ...e, onClose: () => {
1961
+ const a = e.onClose;
1962
+ let s = {};
1963
+ s = { ...e, onClose: () => {
1812
1964
  var m;
1813
- const u = n.findIndex((C) => C === s);
1965
+ const u = n.findIndex((C) => C === c);
1814
1966
  if (u < 0) return;
1815
- const f = ((m = s.el) == null ? void 0 : m.offsetHeight) + 20;
1967
+ const d = ((m = c.el) == null ? void 0 : m.offsetHeight) + 20;
1816
1968
  n.slice(u + 1).forEach((C) => {
1817
- var B;
1818
- const g = (B = C.component) == null ? void 0 : B.props.offset;
1819
- C.component.props.offset = g - f;
1820
- }), n.splice(u, 1), o && o(s);
1969
+ var N;
1970
+ const v = (N = C.component) == null ? void 0 : N.props.offset;
1971
+ C.component.props.offset = v - d;
1972
+ }), n.splice(u, 1), a && a(c);
1821
1973
  }, onDestroy: () => {
1822
- V(null, l);
1823
- }, offset: a };
1824
- const s = r(
1825
- il,
1826
- c,
1827
- O(c.message) || L(c.message) ? {
1828
- default: O(c.message) ? c.message : () => c.message
1974
+ I(null, l);
1975
+ }, offset: o };
1976
+ const c = r(
1977
+ hl,
1978
+ s,
1979
+ S(s.message) || O(s.message) ? {
1980
+ default: S(s.message) ? s.message : () => s.message
1829
1981
  } : null
1830
1982
  );
1831
- return V(s, l), t.tagName === "BODY" ? s.el.style.position = "fixed" : (t.style.position = "relative", s.el.style.position = "absolute"), t.appendChild(l.firstElementChild), n.push(s), {
1983
+ return I(c, l), t.tagName === "BODY" ? c.el.style.position = "fixed" : (t.style.position = "relative", c.el.style.position = "absolute"), t.appendChild(l.firstElementChild), n.push(c), {
1832
1984
  close: () => {
1833
- s.component.proxy.handleClose();
1985
+ c.component.proxy.handleClose();
1834
1986
  }
1835
1987
  };
1836
- }, sl = () => {
1837
- tl.forEach((e) => {
1838
- Ce[e] = (t) => Ve(t) ? Ce({
1988
+ }, yl = () => {
1989
+ sl.forEach((e) => {
1990
+ Ne[e] = (t) => Ye(t) ? Ne({
1839
1991
  type: e,
1840
1992
  ...t
1841
- }) : Ce({
1993
+ }) : Ne({
1842
1994
  message: t,
1843
1995
  type: e
1844
1996
  });
1845
1997
  });
1846
1998
  };
1847
- sl();
1848
- const _ = /* @__PURE__ */ new WeakMap(), fl = (e) => {
1849
- const t = ke(e.renderTo || "body"), l = document.createElement("div");
1850
- _.get(t) || _.set(t, {}), _.get(t)[e.position] || (_.get(t)[e.position] = []);
1851
- const n = _.get(t)[e.position];
1852
- let a = e.offset || 20;
1853
- n.forEach((h) => {
1999
+ yl();
2000
+ const J = /* @__PURE__ */ new WeakMap(), Cl = (e) => {
2001
+ const t = Se(e.renderTo || "body"), l = document.createElement("div");
2002
+ J.get(t) || J.set(t, {}), J.get(t)[e.position] || (J.get(t)[e.position] = []);
2003
+ const n = J.get(t)[e.position];
2004
+ let o = e.offset || 20;
2005
+ n.forEach((y) => {
1854
2006
  var u;
1855
- a += ((u = h.el) == null ? void 0 : u.offsetHeight) + 20;
2007
+ o += ((u = y.el) == null ? void 0 : u.offsetHeight) + 20;
1856
2008
  });
1857
- const o = t.tagName === "BODY";
1858
- o || (t.style.position = "relative", t.style.overflowX = "hidden");
1859
- const c = e.onClose, i = () => {
1860
- var f;
1861
- const h = n.findIndex((m) => m === s);
1862
- if (h < 0) return;
1863
- const u = ((f = s.el) == null ? void 0 : f.offsetHeight) + 20;
1864
- n.slice(h + 1).forEach((m) => {
1865
- var g;
1866
- const C = (g = m.component) == null ? void 0 : g.props.offset;
2009
+ const a = t.tagName === "BODY";
2010
+ a || (t.style.position = "relative", t.style.overflowX = "hidden");
2011
+ const s = e.onClose, i = () => {
2012
+ var d;
2013
+ const y = n.findIndex((m) => m === c);
2014
+ if (y < 0) return;
2015
+ const u = ((d = c.el) == null ? void 0 : d.offsetHeight) + 20;
2016
+ n.slice(y + 1).forEach((m) => {
2017
+ var v;
2018
+ const C = (v = m.component) == null ? void 0 : v.props.offset;
1867
2019
  m.component.props.offset = C - u;
1868
- }), n.splice(h, 1), c && c(s);
1869
- }, d = () => {
1870
- V(null, l);
1871
- }, s = r(
1872
- Ye,
2020
+ }), n.splice(y, 1), s && s(c);
2021
+ }, f = () => {
2022
+ I(null, l);
2023
+ }, c = r(
2024
+ Ke,
1873
2025
  {
1874
2026
  message: e.message,
1875
2027
  title: e.title,
1876
2028
  type: e.type,
1877
- offset: a,
1878
- renderToBody: o,
2029
+ offset: o,
2030
+ renderToBody: a,
1879
2031
  position: e.position,
1880
2032
  duration: e.duration ?? 3e3,
1881
2033
  showClose: e.showClose ?? !0,
1882
2034
  onClose: i,
1883
- onDestroy: d
2035
+ onDestroy: f
1884
2036
  },
1885
- O(e.message) || L(e.message) ? {
1886
- default: O(e.message) ? e.message : () => e.message
2037
+ S(e.message) || O(e.message) ? {
2038
+ default: S(e.message) ? e.message : () => e.message
1887
2039
  } : null
1888
2040
  );
1889
- V(s, l), n.push(s), t == null || t.appendChild(l.firstChild);
1890
- }, ml = {
1891
- DANGER: {
1892
- // 主题色
1893
- color: "#f00",
1894
- // 点
1895
- point: {
1896
- radius: 4,
1897
- borderWidth: 2,
1898
- borderColor: "#f00",
1899
- backgroundColor: "#f00",
1900
- opacity: 0.5,
1901
- hoverRadius: 6,
1902
- hoverColor: "#f00",
1903
- hoverBorderWidth: 2,
1904
- hoverBorderColor: "#f00",
1905
- hoverBackgroundColor: "#f00",
1906
- hoverOpacity: 0.1
1907
- },
1908
- stroke: {
1909
- width: 2,
1910
- color: "#f00",
1911
- opacity: 0.5
1912
- },
1913
- fill: {
1914
- color: "#ffa8a8",
1915
- opacity: 0.2
1916
- }
1917
- },
1918
- STRONG: {
1919
- // 主题色
1920
- color: "#f00",
1921
- // 点
1922
- point: {
1923
- radius: 4,
1924
- borderWidth: 2,
1925
- borderColor: "#f00",
1926
- backgroundColor: "#f00",
1927
- opacity: 0.5,
1928
- hoverRadius: 6,
1929
- hoverColor: "#f00",
1930
- hoverBorderWidth: 2,
1931
- hoverBorderColor: "#f00",
1932
- hoverBackgroundColor: "#f00",
1933
- hoverOpacity: 0.5
1934
- },
1935
- stroke: {
1936
- width: 2,
1937
- color: "#ff7126",
1938
- opacity: 0.8
1939
- },
1940
- fill: {
1941
- color: "#ffdecc",
1942
- opacity: 0.5
1943
- }
1944
- },
1945
- WARNING: {
1946
- // 主题色
1947
- color: "#f00",
1948
- // 点
1949
- point: {
1950
- radius: 4,
1951
- borderWidth: 2,
1952
- borderColor: "#f00",
1953
- backgroundColor: "#f00",
1954
- opacity: 0.5,
1955
- hoverRadius: 6,
1956
- hoverColor: "#f00",
1957
- hoverBorderWidth: 2,
1958
- hoverBorderColor: "#f00",
1959
- hoverBackgroundColor: "#f00",
1960
- hoverOpacity: 0.1
1961
- },
1962
- stroke: {
1963
- width: 2,
1964
- color: "#ffc703",
1965
- opacity: 0.9
1966
- },
1967
- fill: {
1968
- color: "#fff5d3",
1969
- opacity: 0.8
1970
- }
1971
- },
1972
- SUCCESS: {
1973
- // 主题色
1974
- color: "#f00",
1975
- // 点
1976
- point: {
1977
- radius: 4,
1978
- borderWidth: 2,
1979
- borderColor: "#f00",
1980
- backgroundColor: "#f00",
1981
- opacity: 0.5,
1982
- hoverRadius: 6,
1983
- hoverColor: "#f00",
1984
- hoverBorderWidth: 2,
1985
- hoverBorderColor: "#f00",
1986
- hoverBackgroundColor: "#f00",
1987
- hoverOpacity: 0.5
1988
- },
1989
- stroke: {
1990
- width: 2,
1991
- color: "#25c341",
1992
- opacity: 0.9
1993
- },
1994
- fill: {
1995
- color: "#c4e5dc",
1996
- opacity: 0.5
1997
- }
1998
- },
1999
- INFO: {
2000
- // 主题色
2001
- color: "#f00",
2002
- // 点
2003
- point: {
2004
- radius: 4,
2005
- borderWidth: 2,
2006
- borderColor: "#f00",
2007
- backgroundColor: "#f00",
2008
- opacity: 0.5,
2009
- hoverRadius: 6,
2010
- hoverColor: "#f00",
2011
- hoverBorderWidth: 2,
2012
- hoverBorderColor: "#f00",
2013
- hoverBackgroundColor: "#f00",
2014
- hoverOpacity: 0.5
2015
- },
2016
- stroke: {
2017
- width: 2,
2018
- color: "#363636",
2019
- opacity: 0.8
2020
- },
2021
- fill: {
2022
- color: "#686868",
2023
- opacity: 0.1
2024
- }
2025
- },
2026
- PRIMARY: {
2027
- // 主题色
2028
- color: "#f00",
2029
- // 点
2030
- point: {
2031
- radius: 4,
2032
- borderWidth: 2,
2033
- borderColor: "#f00",
2034
- backgroundColor: "#f00",
2035
- opacity: 0.5,
2036
- hoverRadius: 6,
2037
- hoverColor: "#f00",
2038
- hoverBorderWidth: 2,
2039
- hoverBorderColor: "#f00",
2040
- hoverBackgroundColor: "#f00",
2041
- hoverOpacity: 0.5
2042
- },
2043
- stroke: {
2044
- width: 2,
2045
- color: "#0056ff",
2046
- opacity: 0.8
2047
- },
2048
- fill: {
2049
- color: "#dae0ed",
2050
- opacity: 0.5
2051
- }
2052
- }
2053
- }, hl = {
2041
+ I(c, l), n.push(c), t == null || t.appendChild(l.firstChild);
2042
+ }, xl = {
2054
2043
  install: function(e) {
2055
- Object.keys(ze).forEach((t) => {
2056
- const l = ze[t];
2044
+ Object.keys(Ie).forEach((t) => {
2045
+ const l = Ie[t];
2057
2046
  l.install && e.use(l);
2058
2047
  });
2059
2048
  }
2060
2049
  };
2061
2050
  export {
2062
- dl as Dialog,
2063
- Ce as Message,
2064
- xe as MessageBox,
2065
- fl as Notification,
2066
- ml as TrendChartTheme,
2067
- G as XButton,
2068
- Re as XDialog,
2069
- Vt as XMessage,
2070
- Wt as XMessageBox,
2071
- Rt as XNotification,
2072
- we as XSpace,
2073
- el as XTrendChart,
2074
- hl as default
2051
+ bl as Dialog,
2052
+ Ne as Message,
2053
+ Oe as MessageBox,
2054
+ Cl as Notification,
2055
+ R as TrendChartTheme,
2056
+ le as XButton,
2057
+ Ge as XDialog,
2058
+ Wt as XMessage,
2059
+ Ut as XMessageBox,
2060
+ Kt as XNotification,
2061
+ Be as XSpace,
2062
+ il as XTrendChart,
2063
+ xl as default
2075
2064
  };