x-next 0.0.0-alpha.23 → 0.0.0-alpha.26

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 Ze = Object.defineProperty;
2
- var Xe = (e, t, n) => t in e ? Ze(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var M = (e, t, n) => Xe(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { defineComponent as E, computed as C, createVNode as r, h as A, reactive as xe, getCurrentInstance as Ue, ref as T, watch as de, onMounted as K, onBeforeUnmount as Oe, readonly as Re, Teleport as Ke, Transition as H, onUnmounted as fe, Comment as Ye, Fragment as _, render as N, isVNode as k, createTextVNode as O, resolveComponent as I, openBlock as B, createBlock as F, withCtx as Ge, withDirectives as qe, createElementVNode as Je, normalizeClass as re, normalizeStyle as Qe, createElementBlock as U, renderSlot as ke, createCommentVNode as oe, toDisplayString as et, vShow as tt } from "vue";
5
- const nt = "X", lt = "x", Ne = (e) => e ? lt + "-" + e : e || "", S = (e) => nt + e, p = (e) => {
6
- const t = Ne(e);
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 p = (e, t, l) => Ge(e, typeof t != "symbol" ? t + "" : t, l);
4
+ import { defineComponent as P, computed as g, createVNode as r, h as k, reactive as le, getCurrentInstance as Ke, ref as E, watch as q, onMounted as W, onBeforeUnmount as Ae, readonly as Je, Teleport as Qe, Transition as U, createTextVNode as A, onUnmounted as ne, Comment as et, Fragment as Y, render as X, isVNode as N, nextTick as Be, mergeProps as me, resolveComponent as _, openBlock as $, createBlock as H, 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 st = "X", it = "x", je = (e) => e ? it + "-" + e : e || "", S = (e) => st + e, j = (e) => {
6
+ const t = je(e);
7
7
  return {
8
8
  block: t,
9
- element: (s) => `${t}--${s}`,
10
- modifier: (s) => `${t}-${s}`,
11
- is: (s) => `${t}-is-${s}`
9
+ element: (o) => `${t}--${o}`,
10
+ modifier: (o) => `${t}-${o}`,
11
+ is: (o) => `${t}-is-${o}`
12
12
  };
13
- }, W = Object.prototype.toString;
14
- function Te(e) {
15
- return W.call(e) === "[object Array]";
13
+ }, K = Object.prototype.toString;
14
+ function Ve(e) {
15
+ return K.call(e) === "[object Array]";
16
16
  }
17
- function Ee(e) {
18
- return W.call(e) === "[object Object]";
17
+ function Xe(e) {
18
+ return K.call(e) === "[object Object]";
19
19
  }
20
- const Me = (e) => W.call(e) === "[object Promise]", rt = (e) => b(e) && e.constructor.name === "AsyncFunction", ot = (e) => Me(e) || rt(e);
21
- function Fe(e) {
22
- return W.call(e) === "[object String]";
20
+ const Ie = (e) => K.call(e) === "[object Promise]", ut = (e) => O(e) && e.constructor.name === "AsyncFunction", ct = (e) => Ie(e) || ut(e);
21
+ function De(e) {
22
+ return K.call(e) === "[object String]";
23
23
  }
24
- function at(e) {
25
- return W.call(e) === "[object Number]" && e === e;
24
+ function dt(e) {
25
+ return K.call(e) === "[object Number]" && e === e;
26
26
  }
27
- function b(e) {
27
+ function O(e) {
28
28
  return typeof e == "function";
29
29
  }
30
- function Y() {
30
+ function ae() {
31
31
  return typeof window < "u";
32
32
  }
33
- const j = (e) => e, st = (e) => !!(e && e.shapeFlag & 1), ct = (e, t) => !!(e && e.shapeFlag & 6), it = (e, t) => !!(e && e.shapeFlag & 8), ut = (e, t) => !!(e && e.shapeFlag & 16), dt = (e, t) => !!(e && e.shapeFlag & 32), R = (e, t = !1) => {
34
- var l, a;
35
- const n = [];
36
- for (const s of e ?? [])
37
- st(s) || ct(s) || t && it(s, s.children) ? n.push(s) : ut(s, s.children) ? n.push(...R(s.children, t)) : dt(s, s.children) ? n.push(...R((a = (l = s.children).default) == null ? void 0 : a.call(l), t)) : Te(s) && n.push(...R(s, t));
38
- return n;
39
- }, $ = (e, t) => Object.assign(t, {
40
- install(n) {
41
- n.component(e) || n.component(e, t);
33
+ const B = (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), gt = (e, t) => !!(e && e.shapeFlag & 32), te = (e, t = !1) => {
34
+ var n, a;
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)) : gt(o, o.children) ? l.push(...te((a = (n = o.children).default) == null ? void 0 : a.call(n), t)) : Ve(o) && l.push(...te(o, t));
38
+ return l;
39
+ }, I = (e, t) => Object.assign(t, {
40
+ install(l) {
41
+ l.component(e) || l.component(e, t);
42
42
  }
43
- }), ft = {
43
+ }), vt = {
44
44
  disabled: Boolean,
45
45
  block: Boolean,
46
46
  loading: Boolean,
@@ -53,7 +53,7 @@ const j = (e) => e, st = (e) => !!(e && e.shapeFlag & 1), ct = (e, t) => !!(e &&
53
53
  default: 0
54
54
  },
55
55
  shape: {
56
- type: j(String),
56
+ type: B(String),
57
57
  default: void 0
58
58
  },
59
59
  link: {
@@ -61,11 +61,11 @@ const j = (e) => e, st = (e) => !!(e && e.shapeFlag & 1), ct = (e, t) => !!(e &&
61
61
  default: !1
62
62
  },
63
63
  type: {
64
- type: j(String),
64
+ type: B(String),
65
65
  default: void 0
66
66
  },
67
67
  status: {
68
- type: j(String),
68
+ type: B(String),
69
69
  default: void 0
70
70
  },
71
71
  plain: {
@@ -73,21 +73,21 @@ const j = (e) => e, st = (e) => !!(e && e.shapeFlag & 1), ct = (e, t) => !!(e &&
73
73
  default: !1
74
74
  },
75
75
  size: {
76
- type: j(String),
76
+ type: B(String),
77
77
  default: "medium"
78
78
  },
79
79
  border: {
80
80
  type: Boolean,
81
81
  default: !0
82
82
  }
83
- }, mt = (e) => Fe(e) ? e.split("-").map((t) => t.charAt(0).toUpperCase() + t.slice(1)).join("") : "", gt = (e, t = "px") => {
83
+ }, bt = (e) => De(e) ? e.split("-").map((t) => t.charAt(0).toUpperCase() + t.slice(1)).join("") : "", Ct = (e, t = "px") => {
84
84
  if (e === void 0) return "";
85
- const n = typeof e == "number" ? `${e}` : e;
86
- return ["px", "%", "vh", "vw", "calc"].some((a) => n.includes(a)) ? n : n + t;
85
+ const l = typeof e == "number" ? `${e}` : e;
86
+ return ["px", "%", "vh", "vw", "calc"].some((a) => l.includes(a)) ? l : l + t;
87
87
  };
88
- function z(e, t) {
89
- return /* @__PURE__ */ E({
90
- name: Ne(`Icon${mt(e)}`),
88
+ function D(e, t) {
89
+ return /* @__PURE__ */ P({
90
+ name: je(`Icon${bt(e)}`),
91
91
  props: {
92
92
  size: {
93
93
  type: [Number, String],
@@ -110,21 +110,21 @@ function z(e, t) {
110
110
  default: void 0
111
111
  }
112
112
  },
113
- setup(n) {
114
- const l = "x-icon", a = C(() => {
115
- const d = {};
116
- return n.size && (d.fontSize = gt(n.size)), n.rotate && (d.transform = `rotate(${n.rotate}deg)`), n.color && (d.color = n.color), d;
117
- }), s = C(() => [l, {
118
- [`${l}-loading`]: n.spin
113
+ setup(l) {
114
+ const n = "x-icon", a = g(() => {
115
+ const u = {};
116
+ return l.size && (u.fontSize = Ct(l.size)), l.rotate && (u.transform = `rotate(${l.rotate}deg)`), l.color && (u.color = l.color), u;
117
+ }), o = g(() => [n, {
118
+ [`${n}-loading`]: l.spin
119
119
  }]);
120
120
  return () => r("div", {
121
- class: s.value,
121
+ class: o.value,
122
122
  style: a.value
123
123
  }, [t]);
124
124
  }
125
125
  });
126
126
  }
127
- const yt = z("InfoCircleFill", A(r("svg", {
127
+ const xt = D("InfoCircleFill", k(r("svg", {
128
128
  viewBox: "0 0 50 50",
129
129
  class: "x-icon-loading-svg"
130
130
  }, [r("circle", {
@@ -134,54 +134,54 @@ const yt = z("InfoCircleFill", A(r("svg", {
134
134
  class: "path",
135
135
  fill: "none",
136
136
  stroke: "currentColor"
137
- }, null)]))), ht = /* @__PURE__ */ E({
137
+ }, null)]))), kt = /* @__PURE__ */ P({
138
138
  name: "Button",
139
- props: ft,
139
+ props: vt,
140
140
  emits: ["click"],
141
141
  // 显式导入插槽
142
142
  $slots: ["prefix", "suffix"],
143
143
  setup(e, {
144
144
  slots: t,
145
- emit: n
145
+ emit: l
146
146
  }) {
147
- const l = xe({
147
+ const n = le({
148
148
  clicked: !1,
149
149
  isDebounce: !1
150
- }), a = p("button"), s = C(() => [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"), o.value && a.modifier("is-loading")]), d = () => {
151
- e.debounce > 0 && !l.isDebounce && (l.isDebounce = !0, setTimeout(() => {
152
- l.isDebounce = !1;
150
+ }), a = j("button"), o = g(() => [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"), s.value && a.modifier("is-loading")]), u = () => {
151
+ e.debounce > 0 && !n.isDebounce && (n.isDebounce = !0, setTimeout(() => {
152
+ n.isDebounce = !1;
153
153
  }, e.debounce));
154
- }, o = C(() => e.loading || l.clicked || l.isDebounce), m = Ue(), f = (c, i) => {
155
- const u = c(i);
156
- ot(u) && (l.clicked = !0, u.finally(() => {
157
- l.clicked = !1;
154
+ }, s = g(() => e.loading || n.clicked || n.isDebounce), d = Ke(), i = (c, f) => {
155
+ const m = c(f);
156
+ ct(m) && (n.clicked = !0, m.finally(() => {
157
+ n.clicked = !1;
158
158
  }));
159
- }, y = (c) => {
160
- var u, v, g, w;
161
- if (c.stopPropagation(), (v = (u = c.target).blur) == null || v.call(u), o.value) return;
162
- d();
163
- const i = (w = (g = m == null ? void 0 : m.vnode) == null ? void 0 : g.props) == null ? void 0 : w.onClick;
164
- if (Te(i))
165
- i.forEach((ne) => f(ne, c));
166
- else if (b(i)) {
167
- f(i, c);
159
+ }, h = (c) => {
160
+ var m, C, v, L;
161
+ if (c.stopPropagation(), (C = (m = c.target).blur) == null || C.call(m), s.value) return;
162
+ u();
163
+ const f = (L = (v = d == null ? void 0 : d.vnode) == null ? void 0 : v.props) == null ? void 0 : L.onClick;
164
+ if (Ve(f))
165
+ f.forEach((y) => i(y, c));
166
+ else if (O(f)) {
167
+ i(f, c);
168
168
  return;
169
169
  }
170
170
  };
171
171
  return () => {
172
172
  var c;
173
173
  return r("button", {
174
- class: s.value,
174
+ class: o.value,
175
175
  type: "button",
176
176
  disabled: e.disabled,
177
- onClick: y
177
+ onClick: h
178
178
  }, [r("span", {
179
179
  style: {
180
- display: o.value ? "flex" : "none",
181
- marginRight: o.value ? "4px" : "0px"
180
+ display: s.value ? "flex" : "none",
181
+ marginRight: s.value ? "4px" : "0px"
182
182
  },
183
183
  class: a.element("loading")
184
- }, [r(yt, null, null)]), t.prefix && r("span", {
184
+ }, [r(xt, null, null)]), t.prefix && r("span", {
185
185
  class: a.element("prefix")
186
186
  }, [t.prefix()]), r("span", {
187
187
  class: a.element("content")
@@ -190,137 +190,137 @@ const yt = z("InfoCircleFill", A(r("svg", {
190
190
  }, [t.suffix()])]);
191
191
  };
192
192
  }
193
- }), V = $(S("Button"), ht), vt = ["px", "%", "vh", "vw", "calc"], be = (e, t = "px") => {
193
+ }), G = I(S("Button"), kt), wt = ["px", "%", "vh", "vw", "calc"], Se = (e, t = "px") => {
194
194
  if (e === void 0) return "";
195
- const n = String(e);
196
- return vt.some((l) => n.includes(l)) ? n : n + t;
197
- }, Ct = 1e3, kt = 3e3, bt = 1;
198
- class wt {
195
+ const l = String(e);
196
+ return wt.some((n) => l.includes(n)) ? l : l + t;
197
+ }, Lt = 1e3, Nt = 3e3, Bt = 1;
198
+ class Ot {
199
199
  constructor() {
200
- M(this, "popupStack", {
200
+ p(this, "popupStack", {
201
201
  popup: /* @__PURE__ */ new Set(),
202
202
  dialog: /* @__PURE__ */ new Set(),
203
203
  message: /* @__PURE__ */ new Set()
204
204
  });
205
- M(this, "getNextZIndex", (t) => (t === "message" ? Array.from(this.popupStack.message).pop() || kt : Array.from(this.popupStack.popup).pop() || Ct) + bt);
206
- M(this, "add", (t) => {
207
- const n = this.getNextZIndex(t);
208
- return this.popupStack[t].add(n), t === "dialog" && this.popupStack.popup.add(n), n;
205
+ p(this, "getNextZIndex", (t) => (t === "message" ? Array.from(this.popupStack.message).pop() || Nt : Array.from(this.popupStack.popup).pop() || Lt) + Bt);
206
+ p(this, "add", (t) => {
207
+ const l = this.getNextZIndex(t);
208
+ return this.popupStack[t].add(l), t === "dialog" && this.popupStack.popup.add(l), l;
209
209
  });
210
- M(this, "delete", (t, n) => {
211
- this.popupStack[n].delete(t), n === "dialog" && this.popupStack.popup.delete(t);
210
+ p(this, "delete", (t, l) => {
211
+ this.popupStack[l].delete(t), l === "dialog" && this.popupStack.popup.delete(t);
212
212
  });
213
- M(this, "isLastDialog", (t) => this.popupStack.dialog.size > 1 ? t === Array.from(this.popupStack.dialog).pop() : !0);
213
+ p(this, "isLastDialog", (t) => this.popupStack.dialog.size > 1 ? t === Array.from(this.popupStack.dialog).pop() : !0);
214
214
  }
215
215
  }
216
- const ae = new wt();
217
- function G(e, {
216
+ const ge = new Ot();
217
+ function re(e, {
218
218
  visible: t,
219
- runOnMounted: n
219
+ runOnMounted: l
220
220
  } = {}) {
221
- const l = T(0), a = () => {
222
- l.value = ae.add(e);
223
- }, s = () => {
224
- ae.delete(l.value, e);
225
- }, d = () => e === "dialog" ? ae.isLastDialog(l.value) : !1;
226
- return de(
221
+ const n = E(0), a = () => {
222
+ n.value = ge.add(e);
223
+ }, o = () => {
224
+ ge.delete(n.value, e);
225
+ }, u = () => e === "dialog" ? ge.isLastDialog(n.value) : !1;
226
+ return q(
227
227
  () => t == null ? void 0 : t.value,
228
- (o) => {
229
- o ? a() : s();
228
+ (s) => {
229
+ s ? a() : o();
230
230
  },
231
231
  {
232
232
  immediate: !0
233
233
  }
234
- ), n && (K(a), Oe(s)), {
235
- zIndex: Re(l),
234
+ ), l && (W(a), Ae(o)), {
235
+ zIndex: Je(n),
236
236
  open: a,
237
- close: s,
238
- isLastDialog: d
237
+ close: o,
238
+ isLastDialog: u
239
239
  };
240
240
  }
241
- const Ae = (e) => e.replace(/^./, (t) => t.toLowerCase()).replace(/-(\w)/g, (t, n) => (n == null ? void 0 : n.toUpperCase()) ?? ""), $e = () => {
242
- }, Bt = (e, t) => {
243
- if (Y)
241
+ const pe = (e) => e.replace(/^./, (t) => t.toLowerCase()).replace(/-(\w)/g, (t, l) => (l == null ? void 0 : l.toUpperCase()) ?? ""), He = () => {
242
+ }, St = (e, t) => {
243
+ if (ae)
244
244
  return (t ?? document).querySelector(e) ?? void 0;
245
- }, St = (e) => {
245
+ }, Tt = (e) => {
246
246
  if (e.tagName === "BODY")
247
247
  return window.innerWidth - (document.documentElement.offsetWidth || document.body.offsetWidth);
248
- const { borderLeftWidth: t, borderRightWidth: n } = window.getComputedStyle(e), l = Number(t.replace("px", "")) + Number(n.replace("px", ""));
249
- return e.offsetWidth - (e.clientWidth + l);
250
- }, pt = (e) => e.tagName === "BODY" ? document.documentElement.scrollHeight > window.innerHeight : e.scrollHeight > e.offsetHeight, xt = (e, t) => {
251
- var l;
252
- if (!Y || !e || !t) return "";
253
- let n = Ae(t);
254
- n === "float" && (n = "cssFloat");
248
+ const { borderLeftWidth: t, borderRightWidth: l } = window.getComputedStyle(e), n = Number(t.replace("px", "")) + Number(l.replace("px", ""));
249
+ return e.offsetWidth - (e.clientWidth + n);
250
+ }, Mt = (e) => e.tagName === "BODY" ? document.documentElement.scrollHeight > window.innerHeight : e.scrollHeight > e.offsetHeight, zt = (e, t) => {
251
+ var n;
252
+ if (!ae || !e || !t) return "";
253
+ let l = pe(t);
254
+ l === "float" && (l = "cssFloat");
255
255
  try {
256
- const a = e.style[n];
256
+ const a = e.style[l];
257
257
  if (a) return a;
258
- const s = (l = document.defaultView) == null ? void 0 : l.getComputedStyle(e, "");
259
- return s ? s[n] : "";
258
+ const o = (n = document.defaultView) == null ? void 0 : n.getComputedStyle(e, "");
259
+ return o ? o[l] : "";
260
260
  } catch {
261
- return e.style[n];
261
+ return e.style[l];
262
262
  }
263
- }, P = (e, t, n) => {
263
+ }, R = (e, t, l) => {
264
264
  if (!(!e || !t))
265
- if (Ee(t))
265
+ if (Xe(t))
266
266
  Object.entries(t).forEach(
267
- ([l, a]) => P(e, l, a)
267
+ ([n, a]) => R(e, n, a)
268
268
  );
269
269
  else {
270
- const l = Ae(t);
271
- e.style[l] = n;
270
+ const n = pe(t);
271
+ e.style[n] = l;
272
272
  }
273
- }, me = (e, t) => {
274
- if (Fe(e)) {
275
- const n = e[0] === "#" ? `[id='${e.slice(1)}']` : e;
276
- return Bt(n, t);
273
+ }, ke = (e, t) => {
274
+ if (De(e)) {
275
+ const l = e[0] === "#" ? `[id='${e.slice(1)}']` : e;
276
+ return St(l, t);
277
277
  }
278
278
  return e;
279
- }, Ot = Y ? (e, t, n, l = !1) => {
280
- e.addEventListener(t, n, l);
281
- } : $e, Nt = Y ? (e, t, n, l = !1) => {
282
- e.removeEventListener(t, n, l);
283
- } : $e, Tt = (e, t) => {
284
- let n = !1;
285
- const l = {
279
+ }, Et = ae ? (e, t, l, n = !1) => {
280
+ e.addEventListener(t, l, n);
281
+ } : He, Pt = ae ? (e, t, l, n = !1) => {
282
+ e.removeEventListener(t, l, n);
283
+ } : He, $t = (e, t) => {
284
+ let l = !1;
285
+ const n = {
286
286
  overflow: "",
287
287
  width: ""
288
- }, a = (o) => o.tagName === "BODY", s = () => {
288
+ }, a = (s) => s.tagName === "BODY", o = () => {
289
289
  if (e.value) {
290
- const o = e.value;
291
- if (!n && o.style.overflow !== "hidden") {
292
- const m = St(o);
293
- if (m > 0 || pt(o)) {
294
- l.overflow = o.style.overflow, l.width = o.style.width;
295
- let f = 0;
296
- a(o) && (f = o.getBoundingClientRect().left || 0), P(o, {
297
- width: `calc(100% - ${Math.ceil(m - f)}px)`,
290
+ const s = e.value;
291
+ if (!l && s.style.overflow !== "hidden") {
292
+ const d = Tt(s);
293
+ if (d > 0 || Mt(s)) {
294
+ n.overflow = s.style.overflow, n.width = s.style.width;
295
+ let i = 0;
296
+ a(s) && (i = s.getBoundingClientRect().left || 0), R(s, {
297
+ width: `calc(100% - ${Math.ceil(d - i)}px)`,
298
298
  overflow: "hidden"
299
- }), n = !0;
299
+ }), l = !0;
300
300
  }
301
301
  }
302
302
  }
303
- }, d = () => {
304
- if (e.value && n) {
305
- const o = e.value;
306
- P(o, {
307
- overflow: l.overflow,
308
- width: l.width
309
- }), n = !1;
303
+ }, u = () => {
304
+ if (e.value && l) {
305
+ const s = e.value;
306
+ R(s, {
307
+ overflow: n.overflow,
308
+ width: n.width
309
+ }), l = !1;
310
310
  }
311
311
  };
312
- return de(
312
+ return q(
313
313
  () => t == null ? void 0 : t.value,
314
- (o) => {
315
- e.value && !a(e.value) && (o && P(o, {
314
+ (s) => {
315
+ e.value && !a(e.value) && (s && R(s, {
316
316
  position: "absolute"
317
- }), xt(e.value, "position") === "static" && P(e.value, { position: "relative" }));
317
+ }), zt(e.value, "position") === "static" && R(e.value, { position: "relative" }));
318
318
  }
319
319
  ), {
320
- setOverflowHidden: s,
321
- resetOverflow: d
320
+ setOverflowHidden: o,
321
+ resetOverflow: u
322
322
  };
323
- }, Et = {
323
+ }, Ft = {
324
324
  ENTER: "Enter",
325
325
  ESC: "Escape",
326
326
  BACKSPACE: "Backspace",
@@ -330,9 +330,9 @@ const Ae = (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
- }, Mt = {
333
+ }, At = {
334
334
  renderTo: {
335
- type: j([String, Object]),
335
+ type: B([String, Object]),
336
336
  default: "body"
337
337
  },
338
338
  disabled: {
@@ -416,122 +416,122 @@ const Ae = (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"], ze = /* @__PURE__ */ E({
419
+ }, jt = ["width", "minWidth", "height", "minHeight"], Ye = /* @__PURE__ */ P({
420
420
  name: S("Dialog"),
421
421
  inheritAttrs: !1,
422
- props: Mt,
422
+ props: At,
423
423
  emits: ["closed", "close", "open", "opened", "update:modelValue"],
424
424
  setup(e, {
425
425
  emit: t,
426
- slots: n
426
+ slots: l
427
427
  }) {
428
- const l = p("dialog"), a = l.block, s = p("message-box");
429
- s.block;
430
- const d = C(() => [a, e.messageBox && "is-message-box", e.popupClass && e.popupClass]), o = C(() => me(e.renderTo)), m = T(), f = C(() => e.disabled || !o.value), y = C(() => ({
431
- zIndex: g.value
432
- })), c = C(() => {
433
- const h = {};
434
- return e.fullscreen || (!e.center && e.top && (h.top = be(e.top)), Ft.forEach((x) => {
435
- e[x] && (h[x] = be(e[x]));
436
- })), h;
437
- }), i = T(!1), u = C(() => e.modelValue), v = C(() => u.value || i.value), {
438
- zIndex: g,
439
- isLastDialog: w
440
- } = G("dialog", {
441
- visible: u
428
+ const n = j("dialog"), a = n.block, o = j("message-box");
429
+ o.block;
430
+ const u = g(() => [a, e.messageBox && "is-message-box", e.popupClass && e.popupClass]), s = g(() => ke(e.renderTo)), d = E(), i = g(() => e.disabled || !s.value), h = g(() => ({
431
+ zIndex: v.value
432
+ })), c = g(() => {
433
+ const x = {};
434
+ return e.fullscreen || (!e.center && e.top && (x.top = Se(e.top)), jt.forEach((V) => {
435
+ e[V] && (x[V] = Se(e[V]));
436
+ })), x;
437
+ }), f = E(!1), m = g(() => e.modelValue), C = g(() => m.value || f.value), {
438
+ zIndex: v,
439
+ isLastDialog: L
440
+ } = re("dialog", {
441
+ visible: m
442
442
  }), {
443
- setOverflowHidden: ne,
444
- resetOverflow: ye
445
- } = Tt(o, m), he = (h, x) => {
446
- t("update:modelValue", !1), t("close", e.messageBox ? h : void 0, e.messageBox ? x : void 0);
447
- }, Le = () => {
448
- i.value = !1, ye(), t("closed");
449
- }, je = () => {
443
+ setOverflowHidden: y,
444
+ resetOverflow: b
445
+ } = $t(s, d), w = (x, V) => {
446
+ t("update:modelValue", !1), t("close", e.messageBox ? x : void 0, e.messageBox ? V : void 0);
447
+ }, M = () => {
448
+ f.value = !1, b(), t("closed");
449
+ }, F = () => {
450
450
  t("opened");
451
- }, Z = xe({
451
+ }, T = le({
452
452
  ok: !1,
453
453
  cancel: !1
454
- }), D = (h, x) => {
455
- let X = !0;
456
- if (Z[h] = !0, b(e.onBeforeCancel) && (X = e.onBeforeCancel(h) ?? !1), Me(X)) {
457
- X.then((We) => {
458
- Z[h] = !1, We && he(h, x);
454
+ }), z = (x, V) => {
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, V);
459
459
  });
460
460
  return;
461
461
  }
462
- Z[h] = !1, X && he(h, x);
463
- }, Pe = () => {
464
- e.maskToClose && e.mask && D("cancel");
465
- }, He = (h) => {
466
- D("cancel", h);
467
- }, _e = (h) => {
468
- D("ok", h);
462
+ T[x] = !1, Q && w(x, V);
463
+ }, J = () => {
464
+ e.maskToClose && e.mask && z("cancel");
465
+ }, de = (x) => {
466
+ z("cancel", x);
467
+ }, Ze = (x) => {
468
+ z("ok", x);
469
469
  };
470
- let le = !1;
471
- const ve = (h) => {
472
- e.escToClose && h.key === Et.ESC && w() && D("cancel");
473
- }, Ve = () => {
474
- e.escToClose && !le && (le = !0, Ot(document.documentElement, "keydown", ve));
475
- }, Ce = () => {
476
- le = !1, Nt(document.documentElement, "keydown", ve);
470
+ let fe = !1;
471
+ const Le = (x) => {
472
+ e.escToClose && x.key === Ft.ESC && L() && z("cancel");
473
+ }, Re = () => {
474
+ e.escToClose && !fe && (fe = !0, Et(document.documentElement, "keydown", Le));
475
+ }, Ne = () => {
476
+ fe = !1, Pt(document.documentElement, "keydown", Le);
477
477
  };
478
- return Oe(() => {
479
- ye(), Ce();
480
- }), de(() => u.value, (h) => {
481
- h ? (t("open"), ne(), i.value = !0, Ve()) : Ce();
478
+ return Ae(() => {
479
+ b(), Ne();
480
+ }), q(() => m.value, (x) => {
481
+ x ? (t("open"), y(), f.value = !0, Re()) : Ne();
482
482
  }, {
483
483
  immediate: !0
484
- }), () => r(Ke, {
485
- to: o.value,
486
- disabled: f.value
484
+ }), () => r(Qe, {
485
+ to: s.value,
486
+ disabled: i.value
487
487
  }, {
488
- default: () => [v.value && r("div", {
489
- ref: m,
490
- class: d.value,
491
- style: y.value
492
- }, [r(H, {
488
+ default: () => [C.value && r("div", {
489
+ ref: d,
490
+ class: u.value,
491
+ style: h.value
492
+ }, [r(U, {
493
493
  name: "x-fade-in-standard",
494
494
  appear: !0
495
495
  }, {
496
- default: () => [e.mask && u.value && r("div", {
497
- class: l.element("mask")
496
+ default: () => [e.mask && m.value && r("div", {
497
+ class: n.element("mask")
498
498
  }, null)]
499
499
  }), r("div", {
500
- class: [l.element("wrapper"), {
500
+ class: [n.element("wrapper"), {
501
501
  "is-center": e.center
502
502
  }],
503
- onClick: (h) => h.target === h.currentTarget && Pe()
504
- }, [r(H, {
503
+ onClick: (x) => x.target === x.currentTarget && J()
504
+ }, [r(U, {
505
505
  name: "x-zoom-in",
506
506
  appear: !0,
507
- onAfterEnter: je,
508
- onAfterLeave: Le
507
+ onAfterEnter: F,
508
+ onAfterLeave: M
509
509
  }, {
510
- default: () => [u.value && r("div", {
511
- class: [l.element("container"), {
510
+ default: () => [m.value && r("div", {
511
+ class: [n.element("container"), {
512
512
  "is-fullscreen": e.fullscreen
513
513
  }],
514
514
  style: c.value
515
515
  }, [r("div", {
516
- class: [e.messageBox ? s.element("header") : l.element("header"), e.showHeaderBottomLine && "is-bottom-line"]
517
- }, [n.title ? n.title() : r("div", {
518
- class: [l.element("header-title")]
516
+ class: [e.messageBox ? o.element("header") : n.element("header"), e.showHeaderBottomLine && "is-bottom-line"]
517
+ }, [l.title ? l.title() : r("div", {
518
+ class: [n.element("header-title")]
519
519
  }, [e.title])]), r("div", {
520
- class: [e.messageBox ? s.element("body") : l.element("body")]
521
- }, [n.default && n.default()]), r("div", {
522
- class: [e.messageBox ? s.element("footer") : l.element("footer")]
523
- }, [n.footer && n.footer({
524
- cancel: He,
525
- ok: _e,
526
- "loading-obj": Z
520
+ class: [e.messageBox ? o.element("body") : n.element("body")]
521
+ }, [l.default && l.default()]), r("div", {
522
+ class: [e.messageBox ? o.element("footer") : n.element("footer")]
523
+ }, [l.footer && l.footer({
524
+ cancel: de,
525
+ ok: Ze,
526
+ "loading-obj": T
527
527
  })]), e.showClose && r("span", {
528
- class: [l.element("close-icon"), e.messageBox && s.element("close-icon")],
529
- onClick: () => D("cancel")
528
+ class: [n.element("close-icon"), e.messageBox && o.element("close-icon")],
529
+ onClick: () => z("cancel")
530
530
  }, null)])]
531
531
  })])])]
532
532
  });
533
533
  }
534
- }), De = $(S("Dialog"), ze), q = z("CloseCircleFill", A(r("svg", {
534
+ }), We = I(S("Dialog"), Ye), oe = D("CloseCircleFill", k(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 Ae = (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)]))), J = z("CheckCircleFill", A(r("svg", {
549
+ }, null)]))), se = D("CheckCircleFill", k(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 Ae = (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)]))), Q = z("ExclamationCircleFill", A(r("svg", {
564
+ }, null)]))), ie = D("ExclamationCircleFill", k(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 Ae = (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)]))), ee = z("InfoCircleFill", A(r("svg", {
579
+ }, null)]))), ue = D("InfoCircleFill", k(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 Ae = (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)]))), te = z("MinusCircleFill", A(r("svg", {
594
+ }, null)]))), ce = D("MinusCircleFill", k(r("svg", {
595
595
  viewBox: "0 0 48 48",
596
596
  fill: "none",
597
597
  xmlns: "http://www.w3.org/2000/svg",
@@ -606,7 +606,34 @@ const Ae = (e) => e.replace(/^./, (t) => t.toLowerCase()).replace(/-(\w)/g, (t,
606
606
  d: "M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4 4 12.954 4 24s8.954 20 20 20Zm-7-22a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1H17Z",
607
607
  fill: "currentColor",
608
608
  stroke: "none"
609
- }, null)]))), At = /* @__PURE__ */ E({
609
+ }, null)])));
610
+ D("LogoSimple", k(r("svg", {
611
+ width: "61.000000",
612
+ height: "41.000000",
613
+ viewBox: "0 0 61 41",
614
+ fill: "none",
615
+ xmlns: "http://www.w3.org/2000/svg",
616
+ "xmlns:xlink": "http://www.w3.org/1999/xlink"
617
+ }, [r("desc", null, [A("Created with Pixso.")]), r("defs", null, null), r("path", {
618
+ id: "path",
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
+ fill: "#00C1FF",
621
+ "fill-opacity": "1.000000",
622
+ "fill-rule": "nonzero"
623
+ }, null), r("path", {
624
+ id: "path",
625
+ d: "M10 20.5C10 27.14 13.15 33.04 18.05 36.79L18.05 41L30.5 41C41.82 41 51 31.82 51 20.5C51 9.17 41.82 0 30.5 0C19.17 0 10 9.17 10 20.5Z",
626
+ fill: "#1C99FF",
627
+ "fill-opacity": "1.000000",
628
+ "fill-rule": "nonzero"
629
+ }, null), r("path", {
630
+ id: "path",
631
+ d: "M32 25C32 25.52 31.97 26.04 31.92 26.56C31.87 27.08 31.79 27.6 31.69 28.12C31.59 28.63 31.46 29.14 31.31 29.64C31.15 30.14 30.98 30.63 30.78 31.12C30.58 31.6 30.35 32.08 30.11 32.54C29.86 33 29.59 33.45 29.3 33.88C29.01 34.32 28.7 34.74 28.36 35.15C28.03 35.55 27.68 35.94 27.31 36.31C26.94 36.68 26.55 37.03 26.15 37.36C25.74 37.7 25.32 38.01 24.88 38.3C24.45 38.59 24 38.86 23.54 39.11C23.08 39.35 22.6 39.58 22.12 39.78C21.63 39.98 21.14 40.15 20.64 40.31C20.14 40.46 19.63 40.59 19.12 40.69C18.6 40.79 18.08 40.87 17.56 40.92C17.04 40.97 16.52 41 16 41C15.47 41 14.95 40.97 14.43 40.92C13.91 40.87 13.39 40.79 12.87 40.69C12.36 40.59 11.85 40.46 11.35 40.31C10.85 40.15 10.36 39.98 9.87 39.78C9.39 39.58 8.91 39.35 8.45 39.11C7.99 38.86 7.54 38.59 7.11 38.3C6.67 38.01 6.25 37.7 5.84 37.36C5.44 37.03 5.05 36.68 4.68 36.31C4.31 35.94 3.96 35.55 3.63 35.15C3.29 34.74 2.98 34.32 2.69 33.88C2.4 33.45 2.13 33 1.88 32.54C1.64 32.08 1.41 31.6 1.21 31.12C1.01 30.63 0.84 30.14 0.68 29.64C0.53 29.14 0.4 28.63 0.3 28.12C0.2 27.6 0.12 27.08 0.07 26.56C0.02 26.04 0 25.52 0 25C0 24.47 0.02 23.95 0.07 23.43C0.12 22.91 0.2 22.39 0.3 21.87C0.4 21.36 0.53 20.85 0.68 20.35C0.84 19.85 1.01 19.36 1.21 18.87C1.41 18.39 1.64 17.91 1.88 17.45C2.13 16.99 2.4 16.54 2.69 16.11C2.98 15.67 3.29 15.25 3.63 14.84C3.96 14.44 4.31 14.05 4.68 13.68C5.05 13.31 5.44 12.96 5.84 12.63C6.25 12.29 6.67 11.98 7.11 11.69C7.54 11.4 7.99 11.13 8.45 10.88C8.91 10.64 9.39 10.41 9.87 10.21C10.36 10.01 10.85 9.84 11.35 9.68C11.85 9.53 12.36 9.4 12.87 9.3C13.39 9.2 13.91 9.12 14.43 9.07C14.95 9.02 15.47 9 16 9C16.52 9 17.04 9.02 17.56 9.07C18.08 9.12 18.6 9.2 19.12 9.3C19.63 9.4 20.14 9.53 20.64 9.68C21.14 9.84 21.63 10.01 22.12 10.21C22.6 10.41 23.08 10.64 23.54 10.88C24 11.13 24.45 11.4 24.88 11.69C25.32 11.98 25.74 12.29 26.15 12.63C26.55 12.96 26.94 13.31 27.31 13.68C27.68 14.05 28.03 14.44 28.36 14.84C28.7 15.25 29.01 15.67 29.3 16.11C29.59 16.54 29.86 16.99 30.11 17.45C30.35 17.91 30.58 18.39 30.78 18.87C30.98 19.36 31.15 19.85 31.31 20.35C31.46 20.85 31.59 21.36 31.69 21.87C31.79 22.39 31.87 22.91 31.92 23.43C31.97 23.95 32 24.47 32 25Z",
632
+ fill: "#1666FF",
633
+ "fill-opacity": "1.000000",
634
+ "fill-rule": "nonzero"
635
+ }, null)])));
636
+ const Vt = /* @__PURE__ */ P({
610
637
  name: S("Message"),
611
638
  props: {
612
639
  id: {
@@ -658,66 +685,66 @@ const Ae = (e) => e.replace(/^./, (t) => t.toLowerCase()).replace(/-(\w)/g, (t,
658
685
  emits: ["destroy"],
659
686
  setup(e, {
660
687
  emit: t,
661
- slots: n
688
+ slots: l
662
689
  }) {
663
- const l = p("message"), a = T(!1), s = T(null), d = C(() => [l.block, l.modifier(e.type), e.center && l.modifier("center"), e.showClose && !e.center && l.element("show-close"), e.popupClass]), {
664
- zIndex: o
665
- } = G("message", {
690
+ const n = j("message"), a = E(!1), o = E(null), u = g(() => [n.block, n.modifier(e.type), e.center && n.modifier("center"), e.showClose && !e.center && n.element("show-close"), e.popupClass]), {
691
+ zIndex: s
692
+ } = re("message", {
666
693
  runOnMounted: !0
667
- }), m = C(() => ({
694
+ }), d = g(() => ({
668
695
  top: `${e.offset}px`,
669
- zIndex: o.value
670
- })), f = () => {
671
- if (n.icon) return n.icon();
696
+ zIndex: s.value
697
+ })), i = () => {
698
+ if (l.icon) return l.icon();
672
699
  switch (e.type) {
673
700
  case "success":
674
- return r(J, null, null);
701
+ return r(se, null, null);
675
702
  case "warning":
676
- return r(Q, null, null);
703
+ return r(ie, null, null);
677
704
  case "strong":
678
- return r(te, null, null);
705
+ return r(ce, null, null);
679
706
  case "error":
680
- return r(q, null, null);
707
+ return r(oe, null, null);
681
708
  case "info":
682
- return r(ee, null, null);
709
+ return r(ue, null, null);
683
710
  default:
684
711
  return null;
685
712
  }
686
- }, y = () => {
687
- e.duration > 0 && (s.value = setTimeout(() => {
713
+ }, h = () => {
714
+ e.duration > 0 && (o.value = setTimeout(() => {
688
715
  a.value = !1;
689
716
  }, e.duration));
690
717
  }, c = () => {
691
- s.value && (clearTimeout(s.value), s.value = null);
718
+ o.value && (clearTimeout(o.value), o.value = null);
692
719
  };
693
- K(() => {
694
- a.value = !0, y();
695
- }), fe(() => {
720
+ W(() => {
721
+ a.value = !0, h();
722
+ }), ne(() => {
696
723
  c();
697
724
  });
698
- const i = () => {
699
- var u;
700
- a.value = !1, c(), (u = e.onClose) == null || u.call(e);
725
+ const f = () => {
726
+ var m;
727
+ a.value = !1, c(), (m = e.onClose) == null || m.call(e);
701
728
  };
702
- return () => r(H, {
729
+ return () => r(U, {
703
730
  name: "x-message-slide-top",
704
731
  onBeforeLeave: e.onClose,
705
732
  onAfterLeave: () => t("destroy")
706
733
  }, {
707
734
  default: () => [a.value && r("div", {
708
- class: d.value,
709
- style: m.value
735
+ class: u.value,
736
+ style: d.value
710
737
  }, [r("span", {
711
- class: [l.element("icon"), l.modifier(`icon-${e.type}`)]
712
- }, [f()]), r("div", null, [n.default ? n.default() : e.useHTML ? r("span", {
738
+ class: [n.element("icon"), n.modifier(`icon-${e.type}`)]
739
+ }, [i()]), r("div", null, [l.default ? l.default() : e.useHTML ? r("span", {
713
740
  innerHTML: e.message
714
741
  }, null) : r("span", null, [e.message]), e.showClose && r("span", {
715
- class: l.element("close-icon"),
716
- onClick: i
742
+ class: n.element("close-icon"),
743
+ onClick: f
717
744
  }, null)])])]
718
745
  });
719
746
  }
720
- }), $t = $(S("Message"), At), zt = /* @__PURE__ */ E({
747
+ }), Xt = I(S("Message"), Vt), It = /* @__PURE__ */ P({
721
748
  name: "Space",
722
749
  props: {
723
750
  direction: {
@@ -740,11 +767,11 @@ const Ae = (e) => e.replace(/^./, (t) => t.toLowerCase()).replace(/-(\w)/g, (t,
740
767
  setup(e, {
741
768
  slots: t
742
769
  }) {
743
- const n = p("space"), l = C(() => [n.block, n.element(e.direction), e.fill && "is-fill", n.element(`${e.direction}-${e.align}`)]);
744
- function a(d) {
745
- if (at(d))
746
- return d;
747
- switch (d) {
770
+ const l = j("space"), n = g(() => [l.block, l.element(e.direction), e.fill && "is-fill", l.element(`${e.direction}-${e.align}`)]);
771
+ function a(u) {
772
+ if (dt(u))
773
+ return u;
774
+ switch (u) {
748
775
  case "mini":
749
776
  return 4;
750
777
  case "small":
@@ -757,127 +784,127 @@ const Ae = (e) => e.replace(/^./, (t) => t.toLowerCase()).replace(/-(\w)/g, (t,
757
784
  return 8;
758
785
  }
759
786
  }
760
- const s = (d) => {
761
- const o = {};
762
- if (d) return o;
763
- const m = `${a(e.size)}px`, f = `${a(e.size)}px`;
764
- return e.direction === "horizontal" && (o.marginRight = m), e.direction === "vertical" && (o.marginBottom = f), o;
787
+ const o = (u) => {
788
+ const s = {};
789
+ if (u) return s;
790
+ const d = `${a(e.size)}px`, i = `${a(e.size)}px`;
791
+ return e.direction === "horizontal" && (s.marginRight = d), e.direction === "vertical" && (s.marginBottom = i), s;
765
792
  };
766
793
  return () => {
767
- var o;
768
- const d = R((o = t.default) == null ? void 0 : o.call(t), !0).filter((m) => m.type !== Ye);
794
+ var s;
795
+ const u = te((s = t.default) == null ? void 0 : s.call(t), !0).filter((d) => d.type !== et);
769
796
  return r("div", {
770
- class: [l.value]
771
- }, [d.map((m, f) => {
797
+ class: [n.value]
798
+ }, [u.map((d, i) => {
772
799
  var c;
773
- const y = t.split && f > 0;
774
- return r(_, {
775
- key: `space-item-${f}`
776
- }, [y && r("div", {
777
- className: n.element("split"),
778
- style: s(!1)
800
+ const h = t.split && i > 0;
801
+ return r(Y, {
802
+ key: `space-item-${i}`
803
+ }, [h && r("div", {
804
+ className: l.element("split"),
805
+ style: o(!1)
779
806
  }, [(c = t.split) == null ? void 0 : c.call(t)]), r("div", {
780
- className: n.element("item"),
781
- style: s(f === d.length - 1)
782
- }, [m])]);
807
+ className: l.element("item"),
808
+ style: o(i === u.length - 1)
809
+ }, [d])]);
783
810
  })]);
784
811
  };
785
812
  }
786
- }), ge = $(S("Space"), zt), Dt = ["info", "success", "warning", "strong", "error"];
787
- function we(e) {
788
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !k(e);
813
+ }), we = I(S("Space"), It), Dt = ["info", "success", "warning", "strong", "error"];
814
+ function Te(e) {
815
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !N(e);
789
816
  }
790
- const se = p("message-box"), ue = (e) => {
791
- const t = document.createElement("div"), n = () => {
792
- N(null, t);
793
- }, l = (i) => {
794
- if (i === "cancel")
817
+ const ve = j("message-box"), xe = (e) => {
818
+ const t = document.createElement("div"), l = () => {
819
+ X(null, t);
820
+ }, n = (f) => {
821
+ if (f === "cancel")
795
822
  return e.beforeOnCancel ? e.beforeOnCancel() : !0;
796
- if (i === "ok")
823
+ if (f === "ok")
797
824
  return e.beforeOnOk ? e.beforeOnOk() : !0;
798
- }, a = (i, u) => {
799
- i === "cancel" && e.onCancel && e.onCancel(u), i === "ok" && e.onOk && e.onOk(u);
800
- }, s = (i) => {
801
- let u;
802
- switch (i) {
825
+ }, a = (f, m) => {
826
+ f === "cancel" && e.onCancel && e.onCancel(m), f === "ok" && e.onOk && e.onOk(m);
827
+ }, o = (f) => {
828
+ let m;
829
+ switch (f) {
803
830
  case "warning":
804
- u = r(Q, {
831
+ m = r(ie, {
805
832
  size: "22px",
806
833
  color: "#f6c64b"
807
834
  }, null);
808
835
  break;
809
836
  case "strong":
810
- u = r(te, {
837
+ m = r(ce, {
811
838
  size: "22px",
812
839
  color: "#ff7125"
813
840
  }, null);
814
841
  break;
815
842
  case "error":
816
- u = r(q, {
843
+ m = r(oe, {
817
844
  size: "22px",
818
845
  color: "#e24f48"
819
846
  }, null);
820
847
  break;
821
848
  case "success":
822
- u = r(J, {
849
+ m = r(se, {
823
850
  size: "22px",
824
851
  color: "#68d1ab"
825
852
  }, null);
826
853
  break;
827
854
  case "info":
828
- u = r(ee, {
855
+ m = r(ue, {
829
856
  size: "22px",
830
857
  color: "#2355f5"
831
858
  }, null);
832
859
  break;
833
860
  }
834
861
  return r("div", {
835
- class: se.element("icon")
836
- }, [u]);
837
- }, d = (i) => {
838
- if (k(i)) return i;
839
- if (b(i)) {
840
- const u = i();
841
- return k(u) ? u : null;
862
+ class: ve.element("icon")
863
+ }, [m]);
864
+ }, u = (f) => {
865
+ if (N(f)) return f;
866
+ if (O(f)) {
867
+ const m = f();
868
+ return N(m) ? m : null;
842
869
  }
843
870
  return r("div", {
844
- class: se.element("title")
845
- }, [O(" "), i, O(" ")]);
846
- }, o = (i) => {
847
- if (k(i)) return i;
848
- if (b(i)) {
849
- const u = i();
850
- return k(u) ? u : null;
871
+ class: ve.element("title")
872
+ }, [A(" "), f, A(" ")]);
873
+ }, s = (f) => {
874
+ if (N(f)) return f;
875
+ if (O(f)) {
876
+ const m = f();
877
+ return N(m) ? m : null;
851
878
  }
852
879
  return r("div", {
853
- class: se.element("content")
854
- }, [O(" "), e.content, O(" ")]);
855
- }, m = () => () => r(_, null, [s(e.type || "success"), e.title && d(e.title)]), f = () => () => r(_, null, [e.content && o(e.content)]), y = () => {
856
- if (k(e.footer) || b(e.footer))
880
+ class: ve.element("content")
881
+ }, [A(" "), e.content, A(" ")]);
882
+ }, d = () => () => r(Y, null, [o(e.type || "success"), e.title && u(e.title)]), i = () => () => r(Y, null, [e.content && s(e.content)]), h = () => {
883
+ if (N(e.footer) || O(e.footer))
857
884
  return e.footer;
858
- const i = (e == null ? void 0 : e.cancelText) || "取消", u = (e == null ? void 0 : e.okText) || "确认";
859
- return (v) => r(ge, {
885
+ const f = (e == null ? void 0 : e.cancelText) || "取消", m = (e == null ? void 0 : e.okText) || "确认";
886
+ return (C) => r(we, {
860
887
  size: 12
861
888
  }, {
862
889
  default: () => {
863
- var g, w;
864
- return [!e.hideCancel && r(V, {
890
+ var v, L;
891
+ return [!e.hideCancel && r(G, {
865
892
  size: "small",
866
- onClick: v.cancel,
867
- loading: (g = v.loadingObj) == null ? void 0 : g.cancel
868
- }, we(i) ? i : {
869
- default: () => [i]
870
- }), !e.hideOk && r(V, {
893
+ onClick: C.cancel,
894
+ loading: (v = C.loadingObj) == null ? void 0 : v.cancel
895
+ }, Te(f) ? f : {
896
+ default: () => [f]
897
+ }), !e.hideOk && r(G, {
871
898
  type: "primary",
872
899
  size: "small",
873
- onClick: v.ok,
874
- loading: (w = v.loadingObj) == null ? void 0 : w.ok
875
- }, we(u) ? u : {
876
- default: () => [u]
900
+ onClick: C.ok,
901
+ loading: (L = C.loadingObj) == null ? void 0 : L.ok
902
+ }, Te(m) ? m : {
903
+ default: () => [m]
877
904
  })];
878
905
  }
879
906
  });
880
- }, c = r(De, {
907
+ }, c = r(We, {
881
908
  messageBox: !0,
882
909
  width: (e == null ? void 0 : e.width) ?? 358,
883
910
  height: (e == null ? void 0 : e.height) ?? "auto",
@@ -889,52 +916,52 @@ const se = p("message-box"), ue = (e) => {
889
916
  maskToClose: (e == null ? void 0 : e.maskToClose) ?? !0,
890
917
  popupClass: e.popupClass,
891
918
  onClose: a,
892
- onBeforeCancel: l,
919
+ onBeforeCancel: n,
893
920
  "onUpdate:modelValue": () => {
894
921
  c.component.props.modelValue = !1;
895
922
  },
896
923
  // 等待动画完全结束后销毁vm
897
- onClosed: n,
924
+ onClosed: l,
898
925
  onOpened: () => {
899
926
  }
900
927
  }, {
901
- title: m(),
902
- default: f(),
903
- footer: y()
928
+ title: d(),
929
+ default: i(),
930
+ footer: h()
904
931
  });
905
- N(c, t);
906
- }, It = () => {
932
+ X(c, t);
933
+ }, pt = () => {
907
934
  Dt.forEach((e) => {
908
- ue[e] = (t, n) => {
909
- const l = [], a = [];
910
- let s = () => !0, d = () => !0;
935
+ xe[e] = (t, l) => {
936
+ const n = [], a = [];
937
+ let o = () => !0, u = () => !0;
911
938
  return setTimeout(() => {
912
- ue({
939
+ xe({
913
940
  title: t,
914
- content: n,
941
+ content: l,
915
942
  type: e,
916
- beforeOnCancel: d,
917
- beforeOnOk: s,
943
+ beforeOnCancel: u,
944
+ beforeOnOk: o,
918
945
  onOk: () => {
919
- l.forEach((o) => b(o) && o());
946
+ n.forEach((s) => O(s) && s());
920
947
  },
921
948
  onCancel: () => {
922
- a.forEach((o) => b(o) && o());
949
+ a.forEach((s) => O(s) && s());
923
950
  }
924
951
  });
925
952
  }, 0), {
926
- ok(...o) {
927
- return o.length === 1 && l.push(o[0]), o.length === 2 && (s = o[0], l.push(o[1])), this;
953
+ ok(...s) {
954
+ return s.length === 1 && n.push(s[0]), s.length === 2 && (o = s[0], n.push(s[1])), this;
928
955
  },
929
- cancel(...o) {
930
- return o.length === 1 && a.push(o[0]), o.length === 2 && (d = o[0], a.push(o[1])), this;
956
+ cancel(...s) {
957
+ return s.length === 1 && a.push(s[0]), s.length === 2 && (u = s[0], a.push(s[1])), this;
931
958
  }
932
959
  };
933
960
  };
934
961
  });
935
962
  };
936
- It();
937
- const Lt = $(S("MessageBox"), ue), jt = {
963
+ pt();
964
+ const Ht = I(S("MessageBox"), xe), Yt = {
938
965
  position: {
939
966
  type: String,
940
967
  default: "top-right"
@@ -972,131 +999,646 @@ const Lt = $(S("MessageBox"), ue), jt = {
972
999
  type: Boolean,
973
1000
  default: !1
974
1001
  }
975
- }, Ie = /* @__PURE__ */ E({
1002
+ }, _e = /* @__PURE__ */ P({
976
1003
  name: S("Notification"),
977
- props: jt,
1004
+ props: Yt,
978
1005
  emits: ["close", "destroy"],
979
1006
  setup(e, {
980
1007
  emit: t,
981
- slots: n
1008
+ slots: l
982
1009
  }) {
983
- const l = p("notification"), a = l.block, s = C(() => [a, l.modifier(o.value.ver)]), {
984
- zIndex: d
985
- } = G("message", {
1010
+ const n = j("notification"), a = n.block, o = g(() => [a, n.modifier(s.value.ver)]), {
1011
+ zIndex: u
1012
+ } = re("message", {
986
1013
  runOnMounted: !0
987
- }), o = C(() => {
988
- const g = e.position.split("-");
1014
+ }), s = g(() => {
1015
+ const v = e.position.split("-");
989
1016
  return {
990
- hor: g[1],
991
- ver: g[0]
1017
+ hor: v[1],
1018
+ ver: v[0]
992
1019
  };
993
- }), m = C(() => `x-notification-slide-${o.value.hor}`), f = C(() => {
994
- const g = {};
995
- return g.position = e.renderToBody ? "fixed" : "absolute", g.zIndex = d.value, g[o.value.hor] = "20px", g[o.value.ver] = `${e.offset}px`, g;
996
- }), y = T(!1);
1020
+ }), d = g(() => `x-notification-slide-${s.value.hor}`), i = g(() => {
1021
+ const v = {};
1022
+ return v.position = e.renderToBody ? "fixed" : "absolute", v.zIndex = u.value, v[s.value.hor] = "20px", v[s.value.ver] = `${e.offset}px`, v;
1023
+ }), h = E(!1);
997
1024
  let c = 0;
998
- const i = () => {
1025
+ const f = () => {
999
1026
  c = setTimeout(() => {
1000
- y.value = !1;
1027
+ h.value = !1;
1001
1028
  }, e.duration);
1002
- }, u = C(() => e.type === "info" ? ee : e.type === "warning" ? Q : e.type === "strong" ? te : e.type === "success" ? J : e.type === "error" ? q : ""), v = () => {
1003
- y.value = !1;
1029
+ }, m = g(() => e.type === "info" ? ue : e.type === "warning" ? ie : e.type === "strong" ? ce : e.type === "success" ? se : e.type === "error" ? oe : ""), C = () => {
1030
+ h.value = !1;
1004
1031
  };
1005
- return K(() => {
1006
- e.duration !== 0 && i(), y.value = !0;
1007
- }), fe(() => {
1032
+ return W(() => {
1033
+ e.duration !== 0 && f(), h.value = !0;
1034
+ }), ne(() => {
1008
1035
  clearTimeout(c);
1009
- }), () => r(H, {
1010
- name: m.value,
1036
+ }), () => r(U, {
1037
+ name: d.value,
1011
1038
  onBeforeLeave: () => t("close"),
1012
1039
  onAfterLeave: () => t("destroy")
1013
1040
  }, {
1014
1041
  default: () => {
1015
- var g;
1016
- return [y.value && r("div", {
1017
- class: s.value,
1018
- style: f.value
1042
+ var v;
1043
+ return [h.value && r("div", {
1044
+ class: o.value,
1045
+ style: i.value
1019
1046
  }, [r("div", {
1020
- class: [l.element("header")]
1047
+ class: [n.element("header")]
1021
1048
  }, [r("div", {
1022
- class: [l.element("icon"), l.modifier(`icon-${e.type}`)]
1023
- }, [u.value && r(u.value, null, null)]), r("div", null, [r("div", {
1024
- class: [l.element("title")]
1049
+ class: [n.element("icon"), n.modifier(`icon-${e.type}`)]
1050
+ }, [m.value && r(m.value, null, null)]), r("div", null, [r("div", {
1051
+ class: [n.element("title")]
1025
1052
  }, [e.title]), r("div", {
1026
- class: [l.element("message")]
1027
- }, [((g = n.default) == null ? void 0 : g.call(n)) || e.message])])]), e.showClose && r("span", {
1028
- class: [l.element("close-icon")],
1029
- onClick: v
1053
+ class: [n.element("message")]
1054
+ }, [((v = l.default) == null ? void 0 : v.call(l)) || e.message])])]), e.showClose && r("span", {
1055
+ class: [n.element("close-icon")],
1056
+ onClick: C
1030
1057
  }, null)])];
1031
1058
  }
1032
1059
  });
1033
1060
  }
1034
- }), Pt = $(S("Notification"), Ie), Be = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1061
+ }), Wt = I(S("Notification"), _e), _t = (e) => {
1062
+ const t = e.split(" ").filter((n) => n !== "").map((n) => parseInt(n));
1063
+ let l = {};
1064
+ switch (t.length) {
1065
+ case 4:
1066
+ l = { top: t[0], right: t[1], bottom: t[2], left: t[3] };
1067
+ break;
1068
+ case 3:
1069
+ l = { top: t[0], right: t[1], bottom: t[2], left: t[1] };
1070
+ break;
1071
+ case 2:
1072
+ l = { top: t[0], right: t[1], bottom: t[0], left: t[1] };
1073
+ break;
1074
+ default:
1075
+ l = { top: t[0], right: t[0], bottom: t[0], left: t[0] };
1076
+ }
1077
+ return l;
1078
+ }, Zt = (e) => {
1079
+ const t = e.split(" ").filter((l) => l !== "").map((l) => parseInt(l));
1080
+ return t.length < 1 || t.length > 4 ? !1 : t.every((l) => typeof l == "number" && l >= 0);
1081
+ }, Rt = {
1082
+ // 数据集
1083
+ datasets: {
1084
+ required: !0,
1085
+ type: B(Array)
1086
+ },
1087
+ // 网格属性
1088
+ grid: {
1089
+ default: null,
1090
+ type: B(Object)
1091
+ },
1092
+ // 标签属性
1093
+ labels: {
1094
+ default: null,
1095
+ type: B(Object)
1096
+ },
1097
+ // 最大值,默认数据集最大值
1098
+ max: {
1099
+ type: Number
1100
+ },
1101
+ // 最小值,默认数据集最小值
1102
+ min: {
1103
+ type: Number
1104
+ },
1105
+ // 绘制边距
1106
+ padding: {
1107
+ default: "5",
1108
+ type: String,
1109
+ validator(e) {
1110
+ return Zt(e);
1111
+ }
1112
+ },
1113
+ // 开启交互,开启后启用onmousemove事件
1114
+ interactive: {
1115
+ default: !1,
1116
+ type: Boolean
1117
+ },
1118
+ // 主题
1119
+ theme: {
1120
+ type: B(Object),
1121
+ default: () => ({
1122
+ activeLineColor: "#CCC"
1123
+ })
1124
+ }
1125
+ }, qt = {
1126
+ boundary: {
1127
+ required: !0,
1128
+ type: B(Object),
1129
+ default: () => {
1130
+ }
1131
+ },
1132
+ minValue: {
1133
+ required: !0,
1134
+ type: Number
1135
+ },
1136
+ maxValue: {
1137
+ required: !0,
1138
+ type: Number
1139
+ },
1140
+ maxAmount: {
1141
+ required: !0,
1142
+ type: Number
1143
+ },
1144
+ activeLineParams: {
1145
+ type: Object
1146
+ },
1147
+ data: {
1148
+ required: !0,
1149
+ type: B(Array),
1150
+ default: () => []
1151
+ },
1152
+ className: {
1153
+ type: String
1154
+ },
1155
+ smooth: {
1156
+ default: !1,
1157
+ type: Boolean
1158
+ },
1159
+ stroke: {
1160
+ default: !0,
1161
+ type: Boolean
1162
+ },
1163
+ fill: {
1164
+ default: !1,
1165
+ type: Boolean
1166
+ },
1167
+ showPoints: {
1168
+ default: !1,
1169
+ type: Boolean
1170
+ },
1171
+ theme: {
1172
+ type: B(Object)
1173
+ },
1174
+ mainTheme: {
1175
+ type: B(Object)
1176
+ }
1177
+ }, Ut = {
1178
+ boundary: {
1179
+ required: !0,
1180
+ type: B(Object),
1181
+ default: () => {
1182
+ }
1183
+ },
1184
+ verticalLines: {
1185
+ default: !1,
1186
+ type: Boolean
1187
+ },
1188
+ verticalLinesNumber: {
1189
+ default: 0,
1190
+ type: Number
1191
+ },
1192
+ horizontalLines: {
1193
+ default: !1,
1194
+ type: Boolean
1195
+ },
1196
+ horizontalLinesNumber: {
1197
+ default: 0,
1198
+ type: Number
1199
+ }
1200
+ }, Gt = {
1201
+ boundary: {
1202
+ required: !0,
1203
+ type: B(Object),
1204
+ default: () => {
1205
+ }
1206
+ },
1207
+ minValue: {
1208
+ type: Number,
1209
+ required: !0
1210
+ },
1211
+ maxValue: {
1212
+ type: Number,
1213
+ required: !0
1214
+ },
1215
+ xLabels: {
1216
+ type: Array
1217
+ },
1218
+ yLabels: {
1219
+ type: Number,
1220
+ required: !0
1221
+ },
1222
+ yLabelsTextFormatter: {
1223
+ default: (e) => e,
1224
+ type: Function
1225
+ }
1226
+ }, Me = P({
1227
+ name: S("TrendChartGrid"),
1228
+ props: Ut,
1229
+ setup(e) {
1230
+ const t = (o) => {
1231
+ const u = e.verticalLinesNumber > 1 ? (e.boundary.maxX - e.boundary.minX) / (e.verticalLinesNumber - 1) : 0, s = e.boundary.minX + u * (o - 1), d = e.boundary.minY, i = e.boundary.maxY;
1232
+ return {
1233
+ x1: s,
1234
+ x2: s,
1235
+ y1: d,
1236
+ y2: i,
1237
+ stroke: "rgba(0,0,0,0.1)"
1238
+ };
1239
+ }, l = (o) => {
1240
+ const u = e.horizontalLinesNumber > 1 ? (e.boundary.maxY - e.boundary.minY) / (e.horizontalLinesNumber - 1) : 0, s = e.boundary.maxY - u * (o - 1), d = e.boundary.minX, i = e.boundary.maxX;
1241
+ return {
1242
+ x1: d,
1243
+ x2: i,
1244
+ y1: s,
1245
+ y2: s,
1246
+ stroke: "rgba(0,0,0,0.1)"
1247
+ };
1248
+ }, n = g(() => {
1249
+ if (e.verticalLines && e.verticalLinesNumber > 0) {
1250
+ const o = [];
1251
+ for (let u = 1; u <= e.verticalLinesNumber; u++)
1252
+ o.push(
1253
+ k("line", {
1254
+ class: "line",
1255
+ ...t(u)
1256
+ })
1257
+ );
1258
+ return k("g", { class: "vertical" }, o);
1259
+ }
1260
+ return null;
1261
+ }), a = g(() => {
1262
+ if (e.horizontalLines && e.horizontalLinesNumber > 0) {
1263
+ const o = [];
1264
+ for (let u = 1; u <= e.horizontalLinesNumber; u++)
1265
+ o.push(
1266
+ k("line", {
1267
+ class: "line",
1268
+ ...l(u)
1269
+ })
1270
+ );
1271
+ return k("g", { class: "horizontal" }, o);
1272
+ }
1273
+ return null;
1274
+ });
1275
+ 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);
1278
+ };
1279
+ }
1280
+ }), ze = P({
1281
+ name: S("TrendChartLabels"),
1282
+ props: Gt,
1283
+ setup(e) {
1284
+ const t = le({
1285
+ xLabelHeight: 0,
1286
+ yLabelHeight: 0
1287
+ }), l = E(null), n = E(null), a = (d) => {
1288
+ const i = (e.boundary.maxX - e.boundary.minX) / (e.xLabels.length - 1), h = e.boundary.minX + i * d, c = e.boundary.maxY;
1289
+ return { transform: `translate(${h}, ${c})` };
1290
+ }, o = (d) => {
1291
+ const i = (e.boundary.maxY - e.boundary.minY) / (e.yLabels - 1), h = e.boundary.minX, c = e.boundary.maxY - i * d;
1292
+ return { transform: `translate(${h}, ${c})` };
1293
+ };
1294
+ W(() => {
1295
+ var d, i;
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 = ((i = n.value.querySelector("text")) == null ? void 0 : i.getBoundingClientRect().height) || 0);
1297
+ });
1298
+ const u = g(() => e.xLabels && e.xLabels.length ? k(
1299
+ "g",
1300
+ { class: "x-labels", ref: l },
1301
+ e.xLabels.map(
1302
+ (d, i) => k("g", { class: "label", ...a(i) }, [
1303
+ k(
1304
+ "text",
1305
+ {
1306
+ dy: t.xLabelHeight + 5,
1307
+ "text-anchor": "middle"
1308
+ },
1309
+ d
1310
+ ),
1311
+ k("line", { stroke: "rgba(0,0,0,0.1)", y2: 5 })
1312
+ ])
1313
+ )
1314
+ ) : null), s = g(() => {
1315
+ if (e.yLabels && e.yLabels > 0) {
1316
+ const d = [];
1317
+ for (let i = 0; i < e.yLabels; i++)
1318
+ d.push(
1319
+ k("g", { class: "label", ...o(i) }, [
1320
+ k(
1321
+ "text",
1322
+ {
1323
+ dx: -10,
1324
+ dy: t.yLabelHeight / 4,
1325
+ "text-anchor": "end"
1326
+ },
1327
+ e.yLabelsTextFormatter(
1328
+ e.minValue + (e.maxValue - e.minValue) / (e.yLabels - 1) * i
1329
+ )
1330
+ ),
1331
+ k("line", { stroke: "rgba(0,0,0,0.1)", x1: 0, x2: -5 })
1332
+ ])
1333
+ );
1334
+ return k("g", { class: "y-labels", ref: n }, d);
1335
+ }
1336
+ return null;
1337
+ });
1338
+ return () => {
1339
+ const d = [];
1340
+ return u.value && d.push(u.value), s.value && d.push(s.value), k("g", d);
1341
+ };
1342
+ }
1343
+ }), Kt = (e, t, l, n, a) => {
1344
+ e = e.map((d) => typeof d == "number" ? d : d.value);
1345
+ const o = n - 1e-3, u = (t.maxX - t.minX) / (a - 1), s = (t.maxY - t.minY) / (l + 1e-3 - o);
1346
+ return e.map((d, i) => ({
1347
+ x: i * u + t.minX,
1348
+ y: t.maxY - (d - o) * s + +(i === a - 1) * 1e-5 - +(i === 0) * 1e-5
1349
+ }));
1350
+ }, Jt = (e, t, { maxY: l }) => {
1351
+ const n = e.shift(), a = e[e.length - 1], u = (e[0].x - n.x) / 2;
1352
+ let s = `M ${n.x},${n.y}`;
1353
+ e.forEach((i, h) => {
1354
+ if (!t) s += ` L${i.x},${i.y}`;
1355
+ else {
1356
+ const c = e[h - 1] || n;
1357
+ s += ` C ${u + c.x},${c.y} ${u + c.x},${i.y} ${i.x},${i.y}`;
1358
+ }
1359
+ });
1360
+ let d = s;
1361
+ return a.y !== l && (d += ` L${a.x},${l}`), n.y !== l && (d += ` L${n.x},${l}`), d += " Z", { linePath: s, fillPath: d };
1362
+ }, Ee = /* @__PURE__ */ P({
1363
+ name: S("TrendChartCurve"),
1364
+ props: qt,
1365
+ setup(e) {
1366
+ const t = g(() => Kt(e.data, e.boundary, e.maxValue, e.minValue, e.maxAmount)), l = g(() => Jt([...t.value], e.smooth, e.boundary)), n = g(() => {
1367
+ var u, s, d, i, h, c, f, m, C, v, L, y;
1368
+ const a = [];
1369
+ console.log("世间自有公道----", e.mainTheme), e.fill && ((u = l.value) != null && u.fillPath) && a.push(r("path", {
1370
+ class: "x-trend-chart-fill",
1371
+ d: l.value.fillPath,
1372
+ fill: "none",
1373
+ style: {
1374
+ fill: ((d = (s = e.theme) == null ? void 0 : s.fill) == null ? void 0 : d.color) || "#585858",
1375
+ opacity: ((h = (i = e.theme) == null ? void 0 : i.fill) == null ? void 0 : h.opacity) || 0.1
1376
+ }
1377
+ }, null)), e.stroke && ((c = l.value) != null && c.linePath) && (console.log("props.theme?.stroke?.color", e.theme), a.push(r("path", {
1378
+ class: "x-trend-chart-stroke",
1379
+ d: l.value.linePath,
1380
+ fill: "none",
1381
+ stroke: "none",
1382
+ style: {
1383
+ stroke: ((m = (f = e.theme) == null ? void 0 : f.stroke) == null ? void 0 : m.color) || "#585858",
1384
+ strokeWidth: ((v = (C = e.theme) == null ? void 0 : C.stroke) == null ? void 0 : v.width) || 2,
1385
+ opacity: ((y = (L = e.theme) == null ? void 0 : L.stroke) == null ? void 0 : y.opacity) || 1
1386
+ }
1387
+ }, null)));
1388
+ const o = (b) => b ? {
1389
+ stroke: "#2f00a6",
1390
+ strokeWidth: 2,
1391
+ r: 2
1392
+ } : {};
1393
+ if (e.showPoints && t.value) {
1394
+ const b = t.value.map((w, M) => {
1395
+ var F, T;
1396
+ return r("circle", {
1397
+ class: {
1398
+ point: !0,
1399
+ "x-trend-chart-point-active": ((F = e.activeLineParams) == null ? void 0 : F.index) === M
1400
+ },
1401
+ cx: w.x,
1402
+ cy: w.y,
1403
+ style: o(((T = e.activeLineParams) == null ? void 0 : T.index) === M)
1404
+ }, null);
1405
+ });
1406
+ a.push(r("g", {
1407
+ class: "x-trend-chart-points"
1408
+ }, [b]));
1409
+ }
1410
+ return a;
1411
+ });
1412
+ return () => r("g", {
1413
+ class: e.className
1414
+ }, [n.value]);
1415
+ }
1416
+ }), Qt = /* @__PURE__ */ P({
1417
+ name: S("TrendChart"),
1418
+ components: {
1419
+ TrendChartGrid: Me,
1420
+ TrendChartLabels: ze,
1421
+ TrendChartCurve: Ee
1422
+ },
1423
+ props: Rt,
1424
+ emits: {
1425
+ "mouse-move": (e) => !0
1426
+ },
1427
+ setup(e, {
1428
+ emit: t
1429
+ }) {
1430
+ const l = le({
1431
+ width: null,
1432
+ height: null,
1433
+ labelsOverflowObject: {
1434
+ top: 0,
1435
+ right: 0,
1436
+ bottom: 0,
1437
+ left: 0
1438
+ },
1439
+ activeLine: null,
1440
+ activeLineParams: null
1441
+ }), n = g(() => _t(e.padding || "0")), a = g(() => ({
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 = g(() => {
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((F) => {
1450
+ const T = F.data.map((z) => typeof z == "number" ? z : z.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,
1454
+ minValue: b,
1455
+ maxAmount: w
1456
+ };
1457
+ }), u = g(() => ({
1458
+ x: a.value.minX,
1459
+ y: a.value.minY,
1460
+ width: Math.max(0, a.value.maxX - a.value.minX),
1461
+ height: Math.max(0, a.value.maxY - a.value.minY),
1462
+ opacity: 0
1463
+ })), s = g(() => {
1464
+ const y = (a.value.maxX - a.value.minX) / (o.value.maxAmount - 1);
1465
+ return Array.from({
1466
+ length: o.value.maxAmount
1467
+ }, (b, w) => Math.round(a.value.minX + y * w));
1468
+ }), d = E(null), i = E(null), h = () => {
1469
+ if (d.value) {
1470
+ const y = d.value.getBoundingClientRect();
1471
+ l.width = y.width, l.height = y.height;
1472
+ }
1473
+ }, c = () => {
1474
+ if (i.value) {
1475
+ const y = d.value.getBoundingClientRect(), b = i.value.$el.getBoundingClientRect();
1476
+ 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))
1481
+ };
1482
+ } else
1483
+ l.labelsOverflowObject = {
1484
+ top: 0,
1485
+ right: 0,
1486
+ bottom: 0,
1487
+ left: 0
1488
+ };
1489
+ }, f = () => {
1490
+ h(), Be(c);
1491
+ }, m = (y) => s.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);
1495
+ }
1496
+ }, v = () => {
1497
+ l.activeLine = null, l.activeLineParams = null;
1498
+ }, L = () => {
1499
+ h();
1500
+ };
1501
+ return W(() => {
1502
+ f(), window.addEventListener("resize", L);
1503
+ }), ne(() => {
1504
+ window.removeEventListener("resize", L);
1505
+ }), q(() => l.activeLine, (y) => {
1506
+ var b;
1507
+ if (y !== null) {
1508
+ const w = s.value.indexOf(y);
1509
+ l.activeLineParams = {
1510
+ index: w
1511
+ }, t("mouse-move", {
1512
+ ...l.activeLineParams,
1513
+ data: ((b = e.datasets) == null ? void 0 : b.map((M) => M.data[w])) || []
1514
+ });
1515
+ } else
1516
+ t("mouse-move", null);
1517
+ }), q(() => e.labels, () => {
1518
+ l.labelsOverflowObject = {
1519
+ top: 0,
1520
+ right: 0,
1521
+ bottom: 0,
1522
+ left: 0
1523
+ }, Be(c);
1524
+ }, {
1525
+ deep: !0
1526
+ }), () => {
1527
+ var y, b, w, M, F, T, z, J;
1528
+ return r("svg", {
1529
+ class: "x-trend-chart",
1530
+ ref: d,
1531
+ xmlns: "http://www.w3.org/2000/svg",
1532
+ width: "100%",
1533
+ height: "100%"
1534
+ }, [e.grid && r(Me, {
1535
+ class: "grid",
1536
+ verticalLines: e.grid.verticalLines,
1537
+ verticalLinesNumber: e.grid.verticalLinesNumber || o.value.maxAmount,
1538
+ horizontalLines: e.grid.horizontalLines,
1539
+ horizontalLinesNumber: e.grid.horizontalLinesNumber || (((y = e.labels) == null ? void 0 : y.yLabels) ?? 0),
1540
+ boundary: a.value
1541
+ }, null), e.labels && r(ze, me({
1542
+ ref: i,
1543
+ class: "labels"
1544
+ }, e.labels, {
1545
+ 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, {
1551
+ boundary: a.value,
1552
+ minValue: o.value.minValue,
1553
+ maxValue: o.value.maxValue,
1554
+ maxAmount: o.value.maxAmount,
1555
+ activeLineParams: l.activeLineParams,
1556
+ mainTheme: e.theme
1557
+ }), null)), e.interactive && r(Y, null, [r("line", {
1558
+ class: "x-trend-chart-active-line",
1559
+ x1: l.activeLine ?? a.value.minX,
1560
+ x2: l.activeLine ?? a.value.minX,
1561
+ y1: a.value.minY,
1562
+ y2: a.value.maxY,
1563
+ visibility: l.activeLine ? "visible" : "hidden",
1564
+ style: {
1565
+ stroke: ((M = (w = e.theme) == null ? void 0 : w.axisLine) == null ? void 0 : M.color) || "#CCC",
1566
+ strokeWidth: ((T = (F = e.theme) == null ? void 0 : F.axisLine) == null ? void 0 : T.width) || 1,
1567
+ strokeOpacity: ((J = (z = e.theme) == null ? void 0 : z.axisLine) == null ? void 0 : J.opacity) || 1
1568
+ }
1569
+ }, null), r("rect", me(u.value, {
1570
+ onMousemove: C,
1571
+ onMouseout: v
1572
+ }), null)])]);
1573
+ };
1574
+ }
1575
+ }), el = I(S("TrendChart"), Qt), Pe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1035
1576
  __proto__: null,
1036
- XButton: V,
1037
- XDialog: De,
1038
- XMessage: $t,
1039
- XMessageBox: Lt,
1040
- XNotification: Pt,
1041
- XSpace: ge
1577
+ XButton: G,
1578
+ XDialog: We,
1579
+ XMessage: Xt,
1580
+ XMessageBox: Ht,
1581
+ XNotification: Wt,
1582
+ XSpace: we,
1583
+ XTrendChart: el
1042
1584
  }, Symbol.toStringTag, { value: "Module" }));
1043
- function Se(e) {
1044
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !k(e);
1585
+ function $e(e) {
1586
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !N(e);
1045
1587
  }
1046
- const pe = p("dialog"), Gt = (e) => {
1047
- const t = document.createElement("div"), n = () => {
1048
- N(null, t);
1049
- }, l = (c) => {
1588
+ const Fe = j("dialog"), dl = (e) => {
1589
+ const t = document.createElement("div"), l = () => {
1590
+ X(null, t);
1591
+ }, n = (c) => {
1050
1592
  if (c === "cancel")
1051
1593
  return e.beforeOnCancel ? e.beforeOnCancel() : !0;
1052
1594
  if (c === "ok")
1053
1595
  return e.beforeOnOk ? e.beforeOnOk() : !0;
1054
- }, a = (c, i) => {
1055
- c === "cancel" && e.onCancel && e.onCancel(i), c === "ok" && e.onOk && e.onOk(i);
1056
- }, s = (c) => {
1057
- if (k(c)) return c;
1058
- if (b(c)) {
1059
- const i = c();
1060
- return k(i) ? i : null;
1596
+ }, a = (c, f) => {
1597
+ c === "cancel" && e.onCancel && e.onCancel(f), c === "ok" && e.onOk && e.onOk(f);
1598
+ }, o = (c) => {
1599
+ if (N(c)) return c;
1600
+ if (O(c)) {
1601
+ const f = c();
1602
+ return N(f) ? f : null;
1061
1603
  }
1062
1604
  return r("div", {
1063
- class: pe.element("header-title")
1064
- }, [O(" "), c, O(" ")]);
1065
- }, d = (c) => {
1066
- if (k(c)) return c;
1067
- if (b(c)) {
1068
- const i = c();
1069
- return k(i) ? i : null;
1605
+ class: Fe.element("header-title")
1606
+ }, [A(" "), c, A(" ")]);
1607
+ }, u = (c) => {
1608
+ if (N(c)) return c;
1609
+ if (O(c)) {
1610
+ const f = c();
1611
+ return N(f) ? f : null;
1070
1612
  }
1071
1613
  return r("div", {
1072
- class: pe.element("content")
1073
- }, [O(" "), e.content, O(" ")]);
1074
- }, o = () => () => r(_, null, [e.title && s(e.title)]), m = () => () => r(_, null, [e.content && d(e.content)]), f = () => {
1075
- if (k(e.footer) || b(e.footer))
1614
+ class: Fe.element("content")
1615
+ }, [A(" "), e.content, A(" ")]);
1616
+ }, s = () => () => r(Y, null, [e.title && o(e.title)]), d = () => () => r(Y, null, [e.content && u(e.content)]), i = () => {
1617
+ if (N(e.footer) || O(e.footer))
1076
1618
  return e.footer;
1077
- const c = (e == null ? void 0 : e.cancelText) || "取消", i = (e == null ? void 0 : e.okText) || "确认";
1078
- return (u) => r(ge, {
1619
+ const c = (e == null ? void 0 : e.cancelText) || "取消", f = (e == null ? void 0 : e.okText) || "确认";
1620
+ return (m) => r(we, {
1079
1621
  size: 12
1080
1622
  }, {
1081
1623
  default: () => {
1082
- var v, g;
1083
- return [!e.hideCancel && r(V, {
1624
+ var C, v;
1625
+ return [!e.hideCancel && r(G, {
1084
1626
  size: "small",
1085
- onClick: u.cancel,
1086
- loading: (v = u.loadingObj) == null ? void 0 : v.cancel
1087
- }, Se(c) ? c : {
1627
+ onClick: m.cancel,
1628
+ loading: (C = m.loadingObj) == null ? void 0 : C.cancel
1629
+ }, $e(c) ? c : {
1088
1630
  default: () => [c]
1089
- }), !e.hideOk && r(V, {
1631
+ }), !e.hideOk && r(G, {
1090
1632
  type: "primary",
1091
1633
  size: "small",
1092
- onClick: u.ok,
1093
- loading: (g = u.loadingObj) == null ? void 0 : g.ok
1094
- }, Se(i) ? i : {
1095
- default: () => [i]
1634
+ onClick: m.ok,
1635
+ loading: (v = m.loadingObj) == null ? void 0 : v.ok
1636
+ }, $e(f) ? f : {
1637
+ default: () => [f]
1096
1638
  })];
1097
1639
  }
1098
1640
  });
1099
- }, y = r(ze, {
1641
+ }, h = r(Ye, {
1100
1642
  width: (e == null ? void 0 : e.width) ?? 368,
1101
1643
  height: (e == null ? void 0 : e.height) ?? "auto",
1102
1644
  modelValue: !0,
@@ -1107,28 +1649,28 @@ const pe = p("dialog"), Gt = (e) => {
1107
1649
  maskToClose: (e == null ? void 0 : e.maskToClose) ?? !0,
1108
1650
  popupClass: e.popupClass,
1109
1651
  onClose: a,
1110
- onBeforeCancel: l,
1652
+ onBeforeCancel: n,
1111
1653
  "onUpdate:modelValue": () => {
1112
- y.component.props.modelValue = !1;
1654
+ h.component.props.modelValue = !1;
1113
1655
  },
1114
1656
  // 等待动画完全结束后销毁vm
1115
- onClosed: n,
1657
+ onClosed: l,
1116
1658
  onOpened: () => {
1117
1659
  }
1118
1660
  }, {
1119
- title: o(),
1120
- default: m(),
1121
- footer: f()
1661
+ title: s(),
1662
+ default: d(),
1663
+ footer: i()
1122
1664
  });
1123
- N(y, t);
1124
- }, Ht = ["success", "warning", "error", "strong", "info"], _t = E({
1665
+ X(h, t);
1666
+ }, tl = ["success", "warning", "error", "strong", "info"], ll = P({
1125
1667
  name: S("Message"),
1126
1668
  components: {
1127
- CloseCircleFill: q,
1128
- CheckCircleFill: J,
1129
- ExclamationCircleFill: Q,
1130
- InfoCircleFill: ee,
1131
- MinusCircleFill: te
1669
+ CloseCircleFill: oe,
1670
+ CheckCircleFill: se,
1671
+ ExclamationCircleFill: ie,
1672
+ InfoCircleFill: ue,
1673
+ MinusCircleFill: ce
1132
1674
  },
1133
1675
  props: {
1134
1676
  id: {
@@ -1176,193 +1718,194 @@ const pe = p("dialog"), Gt = (e) => {
1176
1718
  },
1177
1719
  emits: ["destroy"],
1178
1720
  setup(e) {
1179
- const t = p("message"), n = C(() => [
1721
+ const t = j("message"), l = g(() => [
1180
1722
  t.block,
1181
1723
  t.modifier(e.type),
1182
1724
  e.center && t.modifier("center"),
1183
1725
  e.showClose && !e.center && t.element("show-close"),
1184
1726
  e.popupClass && e.popupClass
1185
- ]), l = T(!1);
1727
+ ]), n = E(!1);
1186
1728
  let a = null;
1187
- const s = () => {
1729
+ const o = () => {
1188
1730
  a = setTimeout(() => {
1189
- l.value = !1;
1731
+ n.value = !1;
1190
1732
  }, e.duration);
1191
1733
  };
1192
- K(() => {
1193
- l.value = !0, e.duration !== 0 && s();
1194
- }), fe(() => {
1734
+ W(() => {
1735
+ n.value = !0, e.duration !== 0 && o();
1736
+ }), ne(() => {
1195
1737
  clearTimeout(a);
1196
1738
  });
1197
- const { zIndex: d } = G("message", { runOnMounted: !0 }), o = C(() => ({
1739
+ const { zIndex: u } = re("message", { runOnMounted: !0 }), s = g(() => ({
1198
1740
  top: `${e.offset}px`,
1199
- zIndex: d.value
1741
+ zIndex: u.value
1200
1742
  }));
1201
1743
  return {
1202
1744
  cn: t,
1203
- cls: n,
1204
- styles: o,
1205
- visible: l,
1745
+ cls: l,
1746
+ styles: s,
1747
+ visible: n,
1206
1748
  handleClose: () => {
1207
- l.value = !1;
1749
+ n.value = !1;
1208
1750
  }
1209
1751
  };
1210
1752
  }
1211
- }), Vt = (e, t) => {
1212
- const n = e.__vccOpts || e;
1213
- for (const [l, a] of t)
1214
- n[l] = a;
1215
- return n;
1216
- }, Wt = ["innerHTML"], Zt = { key: 1 };
1217
- function Xt(e, t, n, l, a, s) {
1218
- const d = I("CheckCircleFill"), o = I("ExclamationCircleFill"), m = I("MinusCircleFill"), f = I("CloseCircleFill"), y = I("InfoCircleFill");
1219
- return B(), F(H, {
1753
+ }), nl = (e, t) => {
1754
+ const l = e.__vccOpts || e;
1755
+ for (const [n, a] of t)
1756
+ l[n] = a;
1757
+ return l;
1758
+ }, al = ["innerHTML"], rl = { key: 1 };
1759
+ function ol(e, t, l, n, a, o) {
1760
+ const u = _("CheckCircleFill"), s = _("ExclamationCircleFill"), d = _("MinusCircleFill"), i = _("CloseCircleFill"), h = _("InfoCircleFill");
1761
+ return $(), H(U, {
1220
1762
  name: "x-message-slide-top",
1221
1763
  onBeforeLeave: e.onClose,
1222
1764
  onAfterLeave: t[1] || (t[1] = (c) => e.$emit("destroy"))
1223
1765
  }, {
1224
- default: Ge(() => [
1225
- qe(Je("div", {
1226
- class: re(e.cls),
1227
- style: Qe(e.styles)
1766
+ default: tt(() => [
1767
+ lt(nt("div", {
1768
+ class: he(e.cls),
1769
+ style: at(e.styles)
1228
1770
  }, [
1229
- e.$slots.icon ? oe("", !0) : (B(), U("span", {
1771
+ e.$slots.icon ? ye("", !0) : ($(), ee("span", {
1230
1772
  key: 0,
1231
- class: re([e.cn.element("icon"), e.cn.modifier(`icon-${e.type}`)])
1773
+ class: he([e.cn.element("icon"), e.cn.modifier(`icon-${e.type}`)])
1232
1774
  }, [
1233
- ke(e.$slots, "icon", {}, () => [
1234
- e.type === "success" ? (B(), F(d, { key: 0 })) : e.type === "warning" ? (B(), F(o, { key: 1 })) : e.type === "strong" ? (B(), F(m, { key: 2 })) : e.type === "error" ? (B(), F(f, { key: 3 })) : e.type === "info" ? (B(), F(y, { key: 4 })) : oe("", !0)
1775
+ Oe(e.$slots, "icon", {}, () => [
1776
+ e.type === "success" ? ($(), H(u, { key: 0 })) : e.type === "warning" ? ($(), H(s, { key: 1 })) : e.type === "strong" ? ($(), H(d, { key: 2 })) : e.type === "error" ? ($(), H(i, { key: 3 })) : e.type === "info" ? ($(), H(h, { key: 4 })) : ye("", !0)
1235
1777
  ])
1236
1778
  ], 2)),
1237
- ke(e.$slots, "default", {}, () => [
1238
- e.useHTML ? (B(), U("span", {
1779
+ Oe(e.$slots, "default", {}, () => [
1780
+ e.useHTML ? ($(), ee("span", {
1239
1781
  key: 0,
1240
1782
  innerHTML: e.message
1241
- }, null, 8, Wt)) : (B(), U("span", Zt, et(e.message), 1)),
1242
- e.showClose ? (B(), U("span", {
1783
+ }, null, 8, al)) : ($(), ee("span", rl, rt(e.message), 1)),
1784
+ e.showClose ? ($(), ee("span", {
1243
1785
  key: 2,
1244
- class: re([e.cn.element("close-icon")]),
1786
+ class: he([e.cn.element("close-icon")]),
1245
1787
  onClick: t[0] || (t[0] = (...c) => e.handleClose && e.handleClose(...c))
1246
- }, null, 2)) : oe("", !0)
1788
+ }, null, 2)) : ye("", !0)
1247
1789
  ])
1248
1790
  ], 6), [
1249
- [tt, e.visible]
1791
+ [ot, e.visible]
1250
1792
  ])
1251
1793
  ]),
1252
1794
  _: 3
1253
1795
  }, 8, ["onBeforeLeave"]);
1254
1796
  }
1255
- const Ut = /* @__PURE__ */ Vt(_t, [["render", Xt]]), ce = /* @__PURE__ */ new WeakMap(), ie = (e) => {
1256
- (typeof e == "string" || k(e)) && (e = {
1797
+ const sl = /* @__PURE__ */ nl(ll, [["render", ol]]), be = /* @__PURE__ */ new WeakMap(), Ce = (e) => {
1798
+ (typeof e == "string" || N(e)) && (e = {
1257
1799
  message: e
1258
1800
  });
1259
- const t = me(e.renderTo || "body"), n = document.createElement("div");
1260
- ce.has(t) || ce.set(t, []);
1261
- const l = ce.get(t);
1801
+ const t = ke(e.renderTo || "body"), l = document.createElement("div");
1802
+ be.has(t) || be.set(t, []);
1803
+ const n = be.get(t);
1262
1804
  let a = e.offset || 20;
1263
- l.forEach((c) => {
1264
- var i;
1265
- a += ((i = c.el) == null ? void 0 : i.offsetHeight) + 20;
1805
+ n.forEach((c) => {
1806
+ var f;
1807
+ a += ((f = c.el) == null ? void 0 : f.offsetHeight) + 20;
1266
1808
  });
1267
- const s = e.onClose;
1268
- let d = {};
1269
- d = { ...e, onClose: () => {
1270
- var u;
1271
- const c = l.findIndex((v) => v === f);
1809
+ const o = e.onClose;
1810
+ let u = {};
1811
+ u = { ...e, onClose: () => {
1812
+ var m;
1813
+ const c = n.findIndex((C) => C === i);
1272
1814
  if (c < 0) return;
1273
- const i = ((u = f.el) == null ? void 0 : u.offsetHeight) + 20;
1274
- l.slice(c + 1).forEach((v) => {
1275
- var w;
1276
- const g = (w = v.component) == null ? void 0 : w.props.offset;
1277
- v.component.props.offset = g - i;
1278
- }), l.splice(c, 1), s && s(f);
1815
+ const f = ((m = i.el) == null ? void 0 : m.offsetHeight) + 20;
1816
+ n.slice(c + 1).forEach((C) => {
1817
+ var L;
1818
+ const v = (L = C.component) == null ? void 0 : L.props.offset;
1819
+ C.component.props.offset = v - f;
1820
+ }), n.splice(c, 1), o && o(i);
1279
1821
  }, onDestroy: () => {
1280
- N(null, n);
1822
+ X(null, l);
1281
1823
  }, offset: a };
1282
- const f = r(
1283
- Ut,
1284
- d,
1285
- b(d.message) || k(d.message) ? {
1286
- default: b(d.message) ? d.message : () => d.message
1824
+ const i = r(
1825
+ sl,
1826
+ u,
1827
+ O(u.message) || N(u.message) ? {
1828
+ default: O(u.message) ? u.message : () => u.message
1287
1829
  } : null
1288
1830
  );
1289
- return N(f, n), t.tagName === "BODY" ? f.el.style.position = "fixed" : (t.style.position = "relative", f.el.style.position = "absolute"), t.appendChild(n.firstElementChild), l.push(f), {
1831
+ return X(i, l), t.tagName === "BODY" ? i.el.style.position = "fixed" : (t.style.position = "relative", i.el.style.position = "absolute"), t.appendChild(l.firstElementChild), n.push(i), {
1290
1832
  close: () => {
1291
- f.component.proxy.handleClose();
1833
+ i.component.proxy.handleClose();
1292
1834
  }
1293
1835
  };
1294
- }, Rt = () => {
1295
- Ht.forEach((e) => {
1296
- ie[e] = (t) => Ee(t) ? ie({
1836
+ }, il = () => {
1837
+ tl.forEach((e) => {
1838
+ Ce[e] = (t) => Xe(t) ? Ce({
1297
1839
  type: e,
1298
1840
  ...t
1299
- }) : ie({
1841
+ }) : Ce({
1300
1842
  message: t,
1301
1843
  type: e
1302
1844
  });
1303
1845
  });
1304
1846
  };
1305
- Rt();
1306
- const L = /* @__PURE__ */ new WeakMap(), qt = (e) => {
1307
- const t = me(e.renderTo || "body"), n = document.createElement("div");
1308
- L.get(t) || L.set(t, {}), L.get(t)[e.position] || (L.get(t)[e.position] = []);
1309
- const l = L.get(t)[e.position];
1847
+ il();
1848
+ const Z = /* @__PURE__ */ new WeakMap(), fl = (e) => {
1849
+ const t = ke(e.renderTo || "body"), l = document.createElement("div");
1850
+ Z.get(t) || Z.set(t, {}), Z.get(t)[e.position] || (Z.get(t)[e.position] = []);
1851
+ const n = Z.get(t)[e.position];
1310
1852
  let a = e.offset || 20;
1311
- l.forEach((y) => {
1853
+ n.forEach((h) => {
1312
1854
  var c;
1313
- a += ((c = y.el) == null ? void 0 : c.offsetHeight) + 20;
1855
+ a += ((c = h.el) == null ? void 0 : c.offsetHeight) + 20;
1314
1856
  });
1315
- const s = t.tagName === "BODY";
1316
- s || (t.style.position = "relative", t.style.overflowX = "hidden");
1317
- const d = e.onClose, o = () => {
1318
- var i;
1319
- const y = l.findIndex((u) => u === f);
1320
- if (y < 0) return;
1321
- const c = ((i = f.el) == null ? void 0 : i.offsetHeight) + 20;
1322
- l.slice(y + 1).forEach((u) => {
1323
- var g;
1324
- const v = (g = u.component) == null ? void 0 : g.props.offset;
1325
- u.component.props.offset = v - c;
1326
- }), l.splice(y, 1), d && d(f);
1327
- }, m = () => {
1328
- N(null, n);
1329
- }, f = r(
1330
- Ie,
1857
+ const o = t.tagName === "BODY";
1858
+ o || (t.style.position = "relative", t.style.overflowX = "hidden");
1859
+ const u = e.onClose, s = () => {
1860
+ var f;
1861
+ const h = n.findIndex((m) => m === i);
1862
+ if (h < 0) return;
1863
+ const c = ((f = i.el) == null ? void 0 : f.offsetHeight) + 20;
1864
+ n.slice(h + 1).forEach((m) => {
1865
+ var v;
1866
+ const C = (v = m.component) == null ? void 0 : v.props.offset;
1867
+ m.component.props.offset = C - c;
1868
+ }), n.splice(h, 1), u && u(i);
1869
+ }, d = () => {
1870
+ X(null, l);
1871
+ }, i = r(
1872
+ _e,
1331
1873
  {
1332
1874
  message: e.message,
1333
1875
  title: e.title,
1334
1876
  type: e.type,
1335
1877
  offset: a,
1336
- renderToBody: s,
1878
+ renderToBody: o,
1337
1879
  position: e.position,
1338
1880
  duration: e.duration ?? 3e3,
1339
1881
  showClose: e.showClose ?? !0,
1340
- onClose: o,
1341
- onDestroy: m
1882
+ onClose: s,
1883
+ onDestroy: d
1342
1884
  },
1343
- b(e.message) || k(e.message) ? {
1344
- default: b(e.message) ? e.message : () => e.message
1885
+ O(e.message) || N(e.message) ? {
1886
+ default: O(e.message) ? e.message : () => e.message
1345
1887
  } : null
1346
1888
  );
1347
- N(f, n), l.push(f), t == null || t.appendChild(n.firstChild);
1348
- }, Jt = {
1889
+ X(i, l), n.push(i), t == null || t.appendChild(l.firstChild);
1890
+ }, ml = {
1349
1891
  install: function(e) {
1350
- Object.keys(Be).forEach((t) => {
1351
- const n = Be[t];
1352
- n.install && e.use(n);
1892
+ Object.keys(Pe).forEach((t) => {
1893
+ const l = Pe[t];
1894
+ l.install && e.use(l);
1353
1895
  });
1354
1896
  }
1355
1897
  };
1356
1898
  export {
1357
- Gt as Dialog,
1358
- ie as Message,
1359
- ue as MessageBox,
1360
- qt as Notification,
1361
- V as XButton,
1362
- De as XDialog,
1363
- $t as XMessage,
1364
- Lt as XMessageBox,
1365
- Pt as XNotification,
1366
- ge as XSpace,
1367
- Jt as default
1899
+ dl as Dialog,
1900
+ Ce as Message,
1901
+ xe as MessageBox,
1902
+ fl as Notification,
1903
+ G as XButton,
1904
+ We as XDialog,
1905
+ Xt as XMessage,
1906
+ Ht as XMessageBox,
1907
+ Wt as XNotification,
1908
+ we as XSpace,
1909
+ el as XTrendChart,
1910
+ ml as default
1368
1911
  };