@svar-ui/react-core 2.5.1 → 2.6.1

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,306 +1,313 @@
1
- import { jsx as l, jsxs as $, Fragment as _ } from "react/jsx-runtime";
2
- import { createContext as fe, useContext as K, useState as B, useCallback as D, useRef as C, useEffect as E, useMemo as A, useLayoutEffect as me, memo as Ue, useId as _e, forwardRef as Qe, useImperativeHandle as qe } from "react";
3
- import { useWritableProp as J, snippet as ae, useHotkeys as Ke } from "@svar-ui/lib-react";
4
- import { uid as oe, env as pe, calculatePosition as Ze, getAbsParent as ze, clickOutside as ve, locale as Ae, locateID as Xe, getDuodecade as Be, dateToString as ne, delegateClick as Ee, setEnv as et } from "@svar-ui/lib-dom";
5
- import { locale as bn } from "@svar-ui/lib-dom";
6
- import { createPortal as tt } from "react-dom";
7
- import { en as We } from "@svar-ui/core-locales";
8
- import { en as Vn } from "@svar-ui/core-locales";
9
- const ie = fe(""), Oe = fe({}), q = fe(null), ue = fe(null), Ut = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1
+ import { jsx as r, jsxs as C, Fragment as Q } from "react/jsx-runtime";
2
+ import { createContext as fe, useContext as X, useState as O, useCallback as V, useRef as S, useEffect as J, useMemo as E, useLayoutEffect as pe, memo as Xe, useId as et, forwardRef as tt, useImperativeHandle as nt } from "react";
3
+ import { useWritableProp as U, snippet as oe, useHotkeys as rt } from "@svar-ui/lib-react";
4
+ import { uid as ae, env as ge, calculatePosition as We, getAbsParent as Ye, clickOutside as Ne, locale as je, locateID as lt, getDuodecade as Je, dateToString as re, delegateClick as Ge, setEnv as st } from "@svar-ui/lib-dom";
5
+ import { locale as Mn } from "@svar-ui/lib-dom";
6
+ import { createPortal as ct } from "react-dom";
7
+ import { en as _e } from "@svar-ui/core-locales";
8
+ import { en as Cn } from "@svar-ui/core-locales";
9
+ const ie = fe(""), Ue = fe({}), K = fe(null), ue = fe(null), qt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10
10
  __proto__: null,
11
11
  fieldId: ue,
12
- helpers: Oe,
13
- i18n: q,
12
+ helpers: Ue,
13
+ i18n: K,
14
14
  theme: ie
15
15
  }, Symbol.toStringTag, { value: "Module" }));
16
- function z(e) {
17
- const n = K(ue), [t] = B(() => e || n || oe());
16
+ function te(e) {
17
+ const n = X(ue), [t] = O(() => e || n || ae());
18
18
  return t;
19
19
  }
20
- function _t({
20
+ function Kt({
21
21
  value: e = "",
22
22
  id: n,
23
23
  placeholder: t = "",
24
24
  title: s = "",
25
- disabled: r = !1,
26
- error: u = !1,
27
- readonly: i = !1,
28
- onChange: c
25
+ tooltip: l,
26
+ disabled: i = !1,
27
+ error: a = !1,
28
+ readonly: o = !1,
29
+ css: c = "",
30
+ onChange: u
29
31
  }) {
30
- const a = z(n), [o, w] = J(e), d = D(
31
- (x) => {
32
- const f = x.target.value;
33
- w(f), c && c({ value: f, input: !0 });
32
+ const d = te(n), [p, w] = U(e), h = V(
33
+ (f) => {
34
+ const x = f.target.value;
35
+ w(x), u && u({ value: x, input: !0 });
34
36
  },
35
- [c]
36
- ), p = D(
37
- (x) => {
38
- const f = x.target.value;
39
- w(f), c && c({ value: f });
37
+ [u]
38
+ ), v = V(
39
+ (f) => {
40
+ const x = f.target.value;
41
+ w(x), u && u({ value: x });
40
42
  },
41
- [c]
42
- ), v = C(null);
43
- return E(() => {
44
- const x = p, f = v.current;
45
- return f.addEventListener("change", x), () => {
46
- f && f.removeEventListener("change", x);
43
+ [u]
44
+ ), N = S(null);
45
+ return J(() => {
46
+ const f = v, x = N.current;
47
+ return x.addEventListener("change", f), () => {
48
+ x && x.removeEventListener("change", f);
47
49
  };
48
- }, [p]), /* @__PURE__ */ l(
50
+ }, [v]), /* @__PURE__ */ r(
49
51
  "textarea",
50
52
  {
51
- className: `wx-3yFVAC wx-textarea ${u ? "wx-error" : ""}`,
52
- id: a,
53
- disabled: r,
53
+ className: `wx-3yFVAC wx-textarea ${c} ${a ? "wx-error" : ""}`,
54
+ id: d,
55
+ disabled: i,
54
56
  placeholder: t,
55
- readOnly: i,
57
+ readOnly: o,
56
58
  title: s,
57
- value: o,
58
- onInput: d,
59
- ref: v
59
+ value: p,
60
+ onInput: h,
61
+ ref: N,
62
+ "data-tooltip-text": l
60
63
  }
61
64
  );
62
65
  }
63
- function re({
66
+ function le({
64
67
  type: e = "",
65
68
  css: n = "",
66
69
  icon: t = "",
67
70
  disabled: s = !1,
68
- title: r = "",
69
- text: u = "",
70
- children: i,
71
+ title: l = "",
72
+ tooltip: i,
73
+ text: a = "",
74
+ children: o,
71
75
  onClick: c
72
76
  }) {
73
- const a = A(() => {
74
- let w = e ? e.split(" ").filter((d) => d !== "").map((d) => "wx-" + d).join(" ") : "";
75
- return n + (n ? " " : "") + w;
76
- }, [e, n]), o = (w) => {
77
- c && c(w);
77
+ const u = E(() => {
78
+ let p = e ? e.split(" ").filter((w) => w !== "").map((w) => "wx-" + w).join(" ") : "";
79
+ return n + (n ? " " : "") + p;
80
+ }, [e, n]), d = (p) => {
81
+ c && c(p);
78
82
  };
79
- return /* @__PURE__ */ $(
83
+ return /* @__PURE__ */ C(
80
84
  "button",
81
85
  {
82
- title: r,
83
- className: `wx-2ZWgb4 wx-button ${a} ${t && !i ? "wx-icon" : ""}`,
86
+ title: l,
87
+ className: `wx-2ZWgb4 wx-button ${u} ${t && !o ? "wx-icon" : ""}`,
84
88
  disabled: s,
85
- onClick: o,
89
+ onClick: d,
90
+ "data-tooltip-text": i,
86
91
  children: [
87
- t && /* @__PURE__ */ l("i", { className: "wx-2ZWgb4 " + t }),
88
- i || u || " "
92
+ t && /* @__PURE__ */ r("i", { className: "wx-2ZWgb4 " + t }),
93
+ o || a || " "
89
94
  ]
90
95
  }
91
96
  );
92
97
  }
93
- function Ye({
98
+ function Ze({
94
99
  id: e,
95
100
  label: n = "",
96
101
  inputValue: t = "",
97
102
  value: s = !1,
98
- onChange: r,
99
- disabled: u = !1,
100
- style: i
103
+ onChange: l,
104
+ disabled: i = !1,
105
+ css: a = ""
101
106
  }) {
102
- const c = z(e), [a, o] = J(s);
103
- return /* @__PURE__ */ $("div", { style: i, className: "wx-2IvefP wx-checkbox", children: [
104
- /* @__PURE__ */ l(
107
+ const o = te(e), [c, u] = U(s), d = ({ target: p }) => {
108
+ const w = p.checked;
109
+ u(w), l && l({ value: w, inputValue: t });
110
+ };
111
+ return /* @__PURE__ */ C("div", { className: `wx-2IvefP wx-checkbox ${a}`, children: [
112
+ /* @__PURE__ */ r(
105
113
  "input",
106
114
  {
107
115
  type: "checkbox",
108
- id: c,
109
- disabled: u,
116
+ id: o,
117
+ disabled: i,
110
118
  className: "wx-2IvefP wx-check",
111
- checked: a,
119
+ checked: c,
112
120
  value: t,
113
- onChange: ({ target: d }) => {
114
- const p = d.checked;
115
- o(p), r && r({ value: p, inputValue: t });
116
- }
121
+ onChange: d
117
122
  }
118
123
  ),
119
- /* @__PURE__ */ $("label", { htmlFor: c, className: "wx-2IvefP wx-label", children: [
120
- /* @__PURE__ */ l("span", { className: "wx-2IvefP wx-before" }),
121
- n && /* @__PURE__ */ l("span", { className: "wx-2IvefP wx-after", children: n })
124
+ /* @__PURE__ */ C("label", { htmlFor: o, className: "wx-2IvefP wx-label", children: [
125
+ /* @__PURE__ */ r("span", { className: "wx-2IvefP wx-before" }),
126
+ n && /* @__PURE__ */ r("span", { className: "wx-2IvefP wx-after", children: n })
122
127
  ] })
123
128
  ] });
124
129
  }
125
- function Qt({
130
+ function Xt({
126
131
  options: e = [],
127
132
  value: n = [],
128
133
  type: t = "",
129
- onChange: s
134
+ css: s = "",
135
+ onChange: l
130
136
  }) {
131
- const r = D(
132
- (u) => {
133
- let i;
134
- u.value ? i = [...n, u.inputValue] : i = n.filter((c) => c !== u.inputValue), s && s({ value: i });
137
+ const i = V(
138
+ (a) => {
139
+ let o;
140
+ a.value ? o = [...n, a.inputValue] : o = n.filter((c) => c !== a.inputValue), l && l({ value: o });
135
141
  },
136
- [n, s]
142
+ [n, l]
137
143
  );
138
- return /* @__PURE__ */ l(ue.Provider, { value: null, children: /* @__PURE__ */ l("div", { className: `wx-q8xwRD wx-checkboxgroup ${t && `wx-${t}`}`, children: e.map((u) => /* @__PURE__ */ l("div", { className: "wx-q8xwRD wx-item", children: /* @__PURE__ */ l(
139
- Ye,
144
+ return /* @__PURE__ */ r(ue.Provider, { value: null, children: /* @__PURE__ */ r("div", { className: `wx-q8xwRD wx-checkboxgroup ${t && `wx-${t}`} ${s}`, children: e.map((a) => /* @__PURE__ */ r("div", { className: "wx-q8xwRD wx-item", children: /* @__PURE__ */ r(
145
+ Ze,
140
146
  {
141
- label: u.label,
142
- inputValue: u.id,
143
- value: n.includes(u.id),
144
- onChange: r
147
+ label: a.label,
148
+ inputValue: a.id,
149
+ value: n.includes(a.id),
150
+ onChange: i
145
151
  }
146
- ) }, u.id)) }) });
152
+ ) }, a.id)) }) });
147
153
  }
148
- function nt({ theme: e = "", target: n, children: t }) {
149
- const s = C(null), r = C(null), [u, i] = B(null);
154
+ function Qe({ theme: e = "", target: n, children: t }) {
155
+ const s = S(null), l = S(null), [i, a] = O(null);
150
156
  s.current || (s.current = document.createElement("div"));
151
- const c = K(ie);
152
- return E(() => {
153
- i(
154
- n || rt(r.current) || pe.getTopNode(r.current)
157
+ const o = X(ie);
158
+ return J(() => {
159
+ a(
160
+ n || ot(l.current) || ge.getTopNode(l.current)
155
161
  );
156
- }, [r.current]), /* @__PURE__ */ $(_, { children: [
157
- /* @__PURE__ */ l("span", { ref: r, style: { display: "none" } }),
158
- r.current && u ? tt(
159
- /* @__PURE__ */ l(
162
+ }, [l.current]), /* @__PURE__ */ C(Q, { children: [
163
+ /* @__PURE__ */ r("span", { ref: l, style: { display: "none" } }),
164
+ l.current && i ? ct(
165
+ /* @__PURE__ */ r(
160
166
  "div",
161
167
  {
162
- className: `wx-3ZWsT0 wx-${e || c}-theme`,
168
+ className: `wx-3ZWsT0 wx-${e || o}-theme`,
163
169
  children: t
164
170
  }
165
171
  ),
166
- u
172
+ i
167
173
  ) : null
168
174
  ] });
169
175
  }
170
- function rt(e) {
171
- const n = pe.getTopNode(e);
176
+ function ot(e) {
177
+ const n = ge.getTopNode(e);
172
178
  for (; e && e !== n && !e.getAttribute("data-wx-portal-root"); )
173
179
  e = e.parentNode;
174
180
  return e;
175
181
  }
176
- function lt({
182
+ function at({
177
183
  left: e = 0,
178
184
  top: n = 0,
179
185
  at: t = "bottom",
180
186
  parent: s = null,
181
- width: r = "auto",
182
- css: u = "",
183
- onCancel: i,
184
- children: c,
185
- trackScroll: a = !1
187
+ width: l = "auto",
188
+ css: i = "",
189
+ onCancel: a,
190
+ children: o,
191
+ trackScroll: c = !1
186
192
  }) {
187
- const [o, w] = B(0), [d, p] = B(0), [v, x] = B("auto"), [f, h] = B(!1), m = C(null), g = C(null), V = C(i);
188
- E(() => {
189
- V.current = i;
190
- }, [i]);
191
- function b(N) {
192
- return s && (r + "").indexOf("%") > -1 ? r.replace(/(\d+)%/, (M, T) => (T = T * s.offsetWidth / 100 + "px", r.replace(M, T))) : r && r !== "auto" ? r : N;
193
+ const [u, d] = O(0), [p, w] = O(0), [h, v] = O("auto"), [N, f] = O(!1), x = S(null), m = S(null), g = S(a);
194
+ J(() => {
195
+ g.current = a;
196
+ }, [a]);
197
+ function T(b) {
198
+ return s && (l + "").indexOf("%") > -1 ? l.replace(/(\d+)%/, (y, A) => (A = A * s.offsetWidth / 100 + "px", l.replace(y, A))) : l && l !== "auto" ? l : b;
193
199
  }
194
- const y = D(() => {
195
- if (!m.current) return;
196
- const N = Ze(m.current, s, t, e, n);
197
- N && (w(N.x), p(N.y), x(b(N.width)));
198
- }, [m, s, t, e, n, r]);
199
- return me(() => {
200
- const N = (M) => {
201
- V.current && M.target !== g.current && m.current && !m.current.contains(M.target) && V.current(M);
200
+ const k = V(() => {
201
+ if (!x.current) return;
202
+ const b = We(x.current, s, t, e, n);
203
+ b && (d(b.x), w(b.y), v(T(b.width)));
204
+ }, [x, s, t, e, n, l]);
205
+ return pe(() => {
206
+ const b = (A) => {
207
+ g.current && A.target !== m.current && x.current && !x.current.contains(A.target) && g.current(A);
202
208
  };
209
+ let y;
203
210
  return requestAnimationFrame(() => {
204
- y(), h(!0), a && m.current && (g.current = ze(m.current), g.current && g.current.addEventListener("scroll", N, !0));
211
+ k(), f(!0), c && x.current && (m.current = Ye(x.current), m.current && m.current.addEventListener("scroll", b, !0)), s && (y = new ResizeObserver(k), y.observe(s));
205
212
  }), () => {
206
- a && g.current && g.current.removeEventListener("scroll", N, !0);
213
+ c && m.current && m.current.removeEventListener("scroll", b, !0), y?.disconnect();
207
214
  };
208
- }, []), me(() => {
209
- y();
210
- }, [s, t, e, n]), E(() => {
211
- const N = (M) => {
212
- V.current && V.current(M);
215
+ }, []), pe(() => {
216
+ k();
217
+ }, [s, t, e, n]), J(() => {
218
+ const b = (y) => {
219
+ g.current && g.current(y);
213
220
  };
214
- if (m.current)
215
- return ve(m.current, N).destroy;
216
- }, []), /* @__PURE__ */ l(
221
+ if (x.current)
222
+ return Ne(x.current, { callback: b, parent: () => s }).destroy;
223
+ }, [s]), /* @__PURE__ */ r(
217
224
  "div",
218
225
  {
219
- ref: m,
220
- className: ["wx-37M6Fj", "wx-popup", u].filter(Boolean).join(" "),
226
+ ref: x,
227
+ className: ["wx-37M6Fj", "wx-popup", i].filter(Boolean).join(" "),
221
228
  style: {
222
229
  position: "absolute",
223
- visibility: f ? "visible" : "hidden",
224
- top: d + "px",
225
- left: o + "px",
226
- width: v
230
+ visibility: N ? "visible" : "hidden",
231
+ top: p + "px",
232
+ left: u + "px",
233
+ width: h
227
234
  },
228
- children: c
235
+ children: o
229
236
  }
230
237
  );
231
238
  }
232
- function ct({
239
+ function it({
233
240
  position: e = "bottom",
234
241
  align: n = "start",
235
242
  autoFit: t = !0,
236
243
  onCancel: s = null,
237
- width: r = "100%",
238
- css: u = "",
239
- children: i
244
+ width: l = "100%",
245
+ css: i = "",
246
+ children: a
240
247
  }) {
241
- const c = C(null), [a, o] = B(e), [w, d] = B(n), p = C(s);
242
- return E(() => {
243
- p.current = s;
244
- }, [s]), E(() => {
248
+ const o = S(null), [c, u] = O(e), [d, p] = O(n), w = S(s);
249
+ return J(() => {
250
+ w.current = s;
251
+ }, [s]), J(() => {
245
252
  if (t) {
246
- const v = c.current;
247
- if (v) {
248
- const x = v.getBoundingClientRect(), f = document.body.getBoundingClientRect();
249
- x.right >= f.right && d("end"), x.bottom >= f.bottom && o("top");
253
+ const h = o.current;
254
+ if (h) {
255
+ const v = h.getBoundingClientRect(), N = document.body.getBoundingClientRect();
256
+ v.right >= N.right && p("end"), v.bottom >= N.bottom && u("top");
250
257
  }
251
258
  }
252
- }, []), E(() => {
253
- if (c.current) {
254
- const v = (x) => {
255
- p.current && p.current(x);
259
+ }, []), J(() => {
260
+ if (o.current) {
261
+ const h = (v) => {
262
+ w.current && w.current(v);
256
263
  };
257
- return ve(c.current, v).destroy;
264
+ return Ne(o.current, h).destroy;
258
265
  }
259
- }, []), /* @__PURE__ */ l(
266
+ }, []), /* @__PURE__ */ r(
260
267
  "div",
261
268
  {
262
- ref: c,
269
+ ref: o,
263
270
  className: [
264
271
  "wx-dropdown",
265
- `wx-${a}-${w}`,
266
- u || "",
272
+ `wx-${c}-${d}`,
273
+ i || "",
267
274
  "wx-aaaVytZW"
268
275
  ].filter(Boolean).join(" "),
269
- style: { width: r },
270
- children: i
276
+ style: { width: l },
277
+ children: a
271
278
  }
272
279
  );
273
280
  }
274
- function le({
281
+ function se({
275
282
  position: e = "bottom",
276
283
  align: n = "start",
277
284
  autoFit: t = !0,
278
285
  inline: s = !1,
279
- onCancel: r,
280
- width: u = "100%",
281
- children: i,
282
- ...c
286
+ onCancel: l,
287
+ width: i = "100%",
288
+ children: a,
289
+ ...o
283
290
  }) {
284
- const [a, o] = B(void 0), w = C(null), d = A(() => `${e}-${n}`, [e, n]);
285
- return me(() => {
286
- w.current && o(w.current.parentNode);
287
- }, []), /* @__PURE__ */ $(_, { children: [
288
- a && (s ? /* @__PURE__ */ l(
289
- ct,
291
+ const [c, u] = O(void 0), d = S(null), p = E(() => `${e}-${n}`, [e, n]);
292
+ return pe(() => {
293
+ d.current && u(d.current.parentNode);
294
+ }, []), /* @__PURE__ */ C(Q, { children: [
295
+ c && (s ? /* @__PURE__ */ r(
296
+ it,
290
297
  {
291
- onCancel: r,
298
+ onCancel: l,
292
299
  position: e,
293
300
  align: n,
294
301
  autoFit: t,
295
- width: u,
296
- ...c,
297
- children: i
302
+ width: i,
303
+ ...o,
304
+ children: a
298
305
  }
299
- ) : /* @__PURE__ */ l(nt, { children: /* @__PURE__ */ l(lt, { parent: a, at: d, onCancel: r, width: u, ...c, children: i }) })),
300
- /* @__PURE__ */ l("span", { ref: w, className: "wx-portal-node wx-32GZ52" })
306
+ ) : /* @__PURE__ */ r(Qe, { children: /* @__PURE__ */ r(at, { parent: c, at: p, onCancel: l, width: i, ...o, children: a }) })),
307
+ /* @__PURE__ */ r("span", { ref: d, className: "wx-portal-node wx-32GZ52" })
301
308
  ] });
302
309
  }
303
- const st = [
310
+ const ut = [
304
311
  "#00a037",
305
312
  "#37a9ef",
306
313
  "#f5a623",
@@ -309,93 +316,103 @@ const st = [
309
316
  "#000000",
310
317
  "#ffffff"
311
318
  ];
312
- function qt({
313
- colors: e = st,
319
+ function en({
320
+ colors: e = ut,
314
321
  value: n = "",
315
322
  onChange: t,
316
323
  id: s,
317
- clear: r = !1,
318
- placeholder: u = "",
319
- title: i = "",
324
+ clear: l = !1,
325
+ placeholder: i = "",
326
+ title: a = "",
327
+ tooltip: o,
320
328
  disabled: c = !1,
321
- error: a = !1,
322
- dropdown: o = {}
329
+ error: u = !1,
330
+ css: d = "",
331
+ dropdown: p = {}
323
332
  }) {
324
- const w = z(s), [d, p] = B(n), [v, x] = B(!1), f = D(
325
- (g, V) => {
326
- g.stopPropagation(), p(V), x(!1), t && t({ value: V });
333
+ const w = te(s), [h, v] = O(n), [N, f] = O(!1), x = V(
334
+ (T, k) => {
335
+ T.stopPropagation(), v(k), f(!1), t && t({ value: k });
327
336
  },
328
337
  [t]
329
- ), h = D(
330
- (g) => {
331
- g.stopPropagation(), p(""), t && t({ value: "" });
338
+ ), m = V(
339
+ (T) => {
340
+ T.stopPropagation(), v(""), t && t({ value: "" });
332
341
  },
333
342
  [t]
334
- ), m = D(() => {
343
+ ), g = V(() => {
335
344
  if (c) return !1;
336
- x(!0);
345
+ f(!0);
337
346
  }, [c]);
338
- return /* @__PURE__ */ $("div", { className: "wx-121TgJ wx-colorselect", onClick: m, children: [
339
- /* @__PURE__ */ l(
340
- "input",
341
- {
342
- className: "wx-121TgJ wx-input" + (a ? " wx-error" : "") + (v ? " wx-focus" : ""),
343
- title: i,
344
- value: d,
345
- readOnly: !0,
346
- id: w,
347
- placeholder: u,
348
- disabled: c
349
- }
350
- ),
351
- r && d && !c && /* @__PURE__ */ l("i", { className: "wx-121TgJ wx-clear wxi-close", onClick: h }),
352
- d ? /* @__PURE__ */ l(
353
- "div",
354
- {
355
- className: "wx-121TgJ wx-color wx-selected",
356
- style: { backgroundColor: d || "#00a037" }
357
- }
358
- ) : /* @__PURE__ */ l("div", { className: "wx-121TgJ wx-empty wx-selected" }),
359
- v && /* @__PURE__ */ l(le, { onCancel: () => x(!1), ...o, children: /* @__PURE__ */ $("div", { className: "wx-121TgJ wx-colors", children: [
360
- /* @__PURE__ */ l(
361
- "div",
362
- {
363
- className: "wx-121TgJ wx-empty",
364
- onClick: (g) => f(g, "")
365
- }
366
- ),
367
- e.map((g, V) => /* @__PURE__ */ l(
368
- "div",
369
- {
370
- className: "wx-121TgJ wx-color",
371
- style: { backgroundColor: g },
372
- onClick: (b) => f(b, g)
373
- },
374
- V
375
- ))
376
- ] }) })
377
- ] });
347
+ return /* @__PURE__ */ C(
348
+ "div",
349
+ {
350
+ className: "wx-121TgJ wx-colorselect " + d,
351
+ onClick: g,
352
+ "data-tooltip-text": o,
353
+ children: [
354
+ /* @__PURE__ */ r(
355
+ "input",
356
+ {
357
+ className: "wx-121TgJ wx-input" + (u ? " wx-error" : "") + (N ? " wx-focus" : ""),
358
+ title: a,
359
+ value: h,
360
+ readOnly: !0,
361
+ id: w,
362
+ placeholder: i,
363
+ disabled: c
364
+ }
365
+ ),
366
+ l && h && !c && /* @__PURE__ */ r("i", { className: "wx-121TgJ wx-clear wxi-close", onClick: m }),
367
+ h ? /* @__PURE__ */ r(
368
+ "div",
369
+ {
370
+ className: "wx-121TgJ wx-color wx-selected",
371
+ style: { backgroundColor: h || "#00a037" }
372
+ }
373
+ ) : /* @__PURE__ */ r("div", { className: "wx-121TgJ wx-empty wx-selected" }),
374
+ N && /* @__PURE__ */ r(se, { onCancel: () => f(!1), ...p, children: /* @__PURE__ */ C("div", { className: "wx-121TgJ wx-colors", children: [
375
+ /* @__PURE__ */ r(
376
+ "div",
377
+ {
378
+ className: "wx-121TgJ wx-empty",
379
+ onClick: (T) => x(T, "")
380
+ }
381
+ ),
382
+ e.map((T, k) => /* @__PURE__ */ r(
383
+ "div",
384
+ {
385
+ className: "wx-121TgJ wx-color",
386
+ style: { backgroundColor: T },
387
+ onClick: (b) => x(b, T)
388
+ },
389
+ k
390
+ ))
391
+ ] }) })
392
+ ]
393
+ }
394
+ );
378
395
  }
379
- function be(e, n) {
380
- const t = e.firstChild, { moveBlockSlider: s, moveLineSlider: r } = n || {};
381
- function u(a) {
382
- i(a), t.focus(), window.addEventListener("mousemove", i), window.addEventListener("mouseup", c);
396
+ function $e(e, n) {
397
+ const t = e.firstChild, { moveBlockSlider: s, moveLineSlider: l } = n || {};
398
+ function i(c) {
399
+ a(c), t.focus(), window.addEventListener("mousemove", a), window.addEventListener("mouseup", o);
383
400
  }
384
- function i(a) {
385
- let o, w, d, p;
386
- const v = e.getBoundingClientRect();
387
- o = v.left, w = v.top, d = a.clientX - o, p = a.clientY - w, s && n.moveBlockSlider(d, p), r && n.moveLineSlider(d);
401
+ function a(c) {
402
+ let u, d, p, w;
403
+ const h = e.getBoundingClientRect();
404
+ u = h.left, d = h.top, p = c.clientX - u, w = c.clientY - d, s && n.moveBlockSlider(p, w), l && n.moveLineSlider(p);
388
405
  }
389
- function c() {
390
- t.blur(), window.removeEventListener("mousemove", i), window.removeEventListener("mouseup", c);
406
+ function o() {
407
+ t.blur(), window.removeEventListener("mousemove", a), window.removeEventListener("mouseup", o);
391
408
  }
392
- return e.addEventListener("mousedown", u), {
409
+ return e.addEventListener("mousedown", i), {
393
410
  destroy() {
394
- e.removeEventListener("mousedown", u);
411
+ e.removeEventListener("mousedown", i);
395
412
  }
396
413
  };
397
414
  }
398
- const se = {
415
+ const ce = {
399
416
  _toHex: [
400
417
  "0",
401
418
  "1",
@@ -433,38 +450,38 @@ const se = {
433
450
  hexToRgb(e) {
434
451
  e = e.charAt(0) === "#" ? e.slice(1) : e;
435
452
  const n = e.match(/.{1,2}/g);
436
- let [t, s, r] = n;
437
- return t = this.hexToDec(t), s = this.hexToDec(s), r = this.hexToDec(r), [t, s, r];
453
+ let [t, s, l] = n;
454
+ return t = this.hexToDec(t), s = this.hexToDec(s), l = this.hexToDec(l), [t, s, l];
438
455
  },
439
456
  hsvToRgb(e, n, t) {
440
- let s, r, u, i, c, a, o, w;
441
- switch (s = Math.floor(e / 60) % 6, r = e / 60 - s, u = t * (1 - n), i = t * (1 - r * n), c = t * (1 - (1 - r) * n), a = 0, o = 0, w = 0, s) {
457
+ let s, l, i, a, o, c, u, d;
458
+ switch (s = Math.floor(e / 60) % 6, l = e / 60 - s, i = t * (1 - n), a = t * (1 - l * n), o = t * (1 - (1 - l) * n), c = 0, u = 0, d = 0, s) {
442
459
  case 0:
443
- a = t, o = c, w = u;
460
+ c = t, u = o, d = i;
444
461
  break;
445
462
  case 1:
446
- a = i, o = t, w = u;
463
+ c = a, u = t, d = i;
447
464
  break;
448
465
  case 2:
449
- a = u, o = t, w = c;
466
+ c = i, u = t, d = o;
450
467
  break;
451
468
  case 3:
452
- a = u, o = i, w = t;
469
+ c = i, u = a, d = t;
453
470
  break;
454
471
  case 4:
455
- a = c, o = u, w = t;
472
+ c = o, u = i, d = t;
456
473
  break;
457
474
  case 5:
458
- a = t, o = u, w = i;
475
+ c = t, u = i, d = a;
459
476
  break;
460
477
  }
461
- return a = Math.floor(a * 255), o = Math.floor(o * 255), w = Math.floor(w * 255), [a, o, w];
478
+ return c = Math.floor(c * 255), u = Math.floor(u * 255), d = Math.floor(d * 255), [c, u, d];
462
479
  },
463
480
  rgbToHsv(e, n, t) {
464
- let s, r, u;
481
+ let s, l, i;
465
482
  e /= 255, n /= 255, t /= 255;
466
- let i = Math.min(e, n, t), c = Math.max(e, n, t);
467
- return r = 0, s = c === 0 ? 0 : 1 - i / c, u = c, c === i ? r = 0 : c === e && n >= t ? r = 60 * (n - t) / (c - i) + 0 : c === e && n < t ? r = 60 * (n - t) / (c - i) + 360 : c === n ? r = 60 * (t - e) / (c - i) + 120 : c === t && (r = 60 * (e - n) / (c - i) + 240), [r, s, u];
483
+ let a = Math.min(e, n, t), o = Math.max(e, n, t);
484
+ return l = 0, s = o === 0 ? 0 : 1 - a / o, i = o, o === a ? l = 0 : o === e && n >= t ? l = 60 * (n - t) / (o - a) + 0 : o === e && n < t ? l = 60 * (n - t) / (o - a) + 360 : o === n ? l = 60 * (t - e) / (o - a) + 120 : o === t && (l = 60 * (e - n) / (o - a) + 240), [l, s, i];
468
485
  },
469
486
  hexToHvs(e) {
470
487
  const n = this.hexToRgb(e);
@@ -474,83 +491,84 @@ const se = {
474
491
  const s = this.hsvToRgb(e, n, t);
475
492
  return "#" + this.rgbToHex(s).toUpperCase();
476
493
  }
477
- }, at = (e) => /^([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(e);
478
- function De(e) {
479
- return e ? (e = e.toString(16), e.charAt(0) === "#" && (e = e.slice(1)), at(e) ? (e.length === 3 && (e = e.slice(0, 3).split("").reduce((n, t) => n + t + t, "")), `#${e.toUpperCase()}`) : null) : null;
494
+ }, dt = (e) => /^([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(e);
495
+ function Te(e) {
496
+ return e ? (e = e.toString(16), e.charAt(0) === "#" && (e = e.slice(1)), dt(e) ? (e.length === 3 && (e = e.slice(0, 3).split("").reduce((n, t) => n + t + t, "")), `#${e.toUpperCase()}`) : null) : null;
480
497
  }
481
- function X() {
482
- return Ae(We);
498
+ function ne() {
499
+ return je(_e);
483
500
  }
484
501
  const Ve = "Block", Re = "Line";
485
- function ot({
502
+ function ft({
486
503
  value: e = "#65D3B3",
487
504
  button: n = !1,
488
- onChange: t
505
+ css: t = "",
506
+ onChange: s
489
507
  }) {
490
- const s = (K(q) || X()).getGroup("core"), r = C(null), u = C(null), [i, c] = B(), [a, o] = B(), [w, d] = B(), [p, v] = B(), [x, f] = J(e), [h, m] = B(e), g = C(null), V = C(null), b = A(() => De(x) || "#65D3B3", [x]), y = A(
491
- () => se.hvsToHex(w || 0, 1, 1),
492
- [w]
493
- ), N = D(
494
- (L, P) => {
495
- const { width: S, height: O } = r.current.getBoundingClientRect();
496
- P < 0 ? P = 0 : P > O && (P = O), L < 0 ? L = 0 : L > S && (L = S), c(P), o(L);
497
- let U, Y;
498
- const I = S / 100, G = O / 100;
499
- U = Math.ceil(L / I) / 100, Y = Math.ceil(Math.abs(P / G - 100)) / 100;
500
- const Q = se.hvsToHex(
501
- w,
502
- U,
503
- Y
508
+ const l = (X(K) || ne()).getGroup("core"), i = S(null), a = S(null), [o, c] = O(), [u, d] = O(), [p, w] = O(), [h, v] = O(), [N, f] = U(e), [x, m] = O(e), g = S(null), T = S(null), k = E(() => Te(N) || "#65D3B3", [N]), b = E(
509
+ () => ce.hvsToHex(p || 0, 1, 1),
510
+ [p]
511
+ ), y = V(
512
+ (L, B) => {
513
+ const { width: _, height: Z } = i.current.getBoundingClientRect();
514
+ B < 0 ? B = 0 : B > Z && (B = Z), L < 0 ? L = 0 : L > _ && (L = _), c(B), d(L);
515
+ let F, j;
516
+ const I = _ / 100, $ = Z / 100;
517
+ F = Math.ceil(L / I) / 100, j = Math.ceil(Math.abs(B / $ - 100)) / 100;
518
+ const M = ce.hvsToHex(
519
+ p,
520
+ F,
521
+ j
504
522
  );
505
- f(Q), m(Q), t && t({ value: Q, input: !0 });
523
+ f(M), m(M), s && s({ value: M, input: !0 });
506
524
  },
507
- [b, w, t]
508
- ), M = D(
525
+ [k, p, s]
526
+ ), A = V(
509
527
  (L) => {
510
- const P = u.current.getBoundingClientRect().width;
511
- L < 0 ? L = 0 : L > P && (L = P);
512
- const S = Math.round(L * 359 / P), O = Math.max(Math.min(S, 359), 0);
513
- d(O), v(L);
514
- let U, Y;
515
- [, U, Y] = se.hexToHvs(b);
516
- const I = se.hvsToHex(O, U, Y);
517
- f(I), m(I), t && t({ value: I, input: !0 });
528
+ const B = a.current.getBoundingClientRect().width;
529
+ L < 0 ? L = 0 : L > B && (L = B);
530
+ const _ = Math.round(L * 359 / B), Z = Math.max(Math.min(_, 359), 0);
531
+ w(Z), v(L);
532
+ let F, j;
533
+ [, F, j] = ce.hexToHvs(k);
534
+ const I = ce.hvsToHex(Z, F, j);
535
+ f(I), m(I), s && s({ value: I, input: !0 });
518
536
  },
519
- [b, t]
537
+ [k, s]
520
538
  );
521
- g.current = N, V.current = M;
522
- const T = D((L) => {
523
- const [P, S, O] = se.hexToHvs(L || b);
524
- if (d(P), r.current) {
525
- const { width: U, height: Y } = r.current.getBoundingClientRect();
526
- u.current && v(
527
- P * u.current.getBoundingClientRect().width / 359
528
- ), o(S * U), c(Math.abs(Y * (O - 1)));
539
+ g.current = y, T.current = A;
540
+ const P = V((L) => {
541
+ const [B, _, Z] = ce.hexToHvs(L || k);
542
+ if (w(B), i.current) {
543
+ const { width: F, height: j } = i.current.getBoundingClientRect();
544
+ a.current && v(
545
+ B * a.current.getBoundingClientRect().width / 359
546
+ ), d(_ * F), c(Math.abs(j * (Z - 1)));
529
547
  }
530
- }, [b]), R = D(
548
+ }, [k]), R = V(
531
549
  ({ target: L }) => {
532
- const P = De(L.value);
533
- m(L.value), P && (f(P), t && t({ value: P, input: !0 }), T(P));
550
+ const B = Te(L.value);
551
+ m(L.value), B && (f(B), s && s({ value: B, input: !0 }), P(B));
534
552
  },
535
- [t, T]
536
- ), F = D(
553
+ [s, P]
554
+ ), Y = V(
537
555
  (L) => {
538
- L.stopPropagation(), t && t({ value: b });
556
+ L.stopPropagation(), s && s({ value: k });
539
557
  },
540
- [b, t]
541
- ), j = D(
558
+ [k, s]
559
+ ), G = V(
542
560
  (L) => {
543
- const P = L.target, S = P.getAttribute("data-slider") === Ve, O = P.getAttribute("data-slider") === Re;
544
- let U = window.getComputedStyle(P), Y = parseFloat(U.left), I = parseFloat(U.top);
545
- const G = L.code;
546
- if (S) {
547
- switch (G) {
561
+ const B = L.target, _ = B.getAttribute("data-slider") === Ve, Z = B.getAttribute("data-slider") === Re;
562
+ let F = window.getComputedStyle(B), j = parseFloat(F.left), I = parseFloat(F.top);
563
+ const $ = L.code;
564
+ if (_) {
565
+ switch ($) {
548
566
  case "ArrowLeft": {
549
- Y--;
567
+ j--;
550
568
  break;
551
569
  }
552
570
  case "ArrowRight": {
553
- Y++;
571
+ j++;
554
572
  break;
555
573
  }
556
574
  case "ArrowDown": {
@@ -564,788 +582,804 @@ function ot({
564
582
  default:
565
583
  return;
566
584
  }
567
- N(Y, I);
585
+ y(j, I);
568
586
  }
569
- if (O) {
570
- if (G === "ArrowLeft" || G === "ArrowDown") Y--;
571
- else if (G === "ArrowRight" || G === "ArrowUp") Y++;
587
+ if (Z) {
588
+ if ($ === "ArrowLeft" || $ === "ArrowDown") j--;
589
+ else if ($ === "ArrowRight" || $ === "ArrowUp") j++;
572
590
  else return;
573
- M(Y);
591
+ A(j);
574
592
  }
575
593
  L.preventDefault();
576
594
  },
577
- [N, M]
595
+ [y, A]
578
596
  );
579
- E(() => {
597
+ J(() => {
580
598
  const L = [];
581
- return r.current && L.push(
582
- be(r.current, {
583
- moveBlockSlider: (P, S) => {
584
- g.current?.(P, S);
599
+ return i.current && L.push(
600
+ $e(i.current, {
601
+ moveBlockSlider: (B, _) => {
602
+ g.current?.(B, _);
585
603
  }
586
604
  }).destroy
587
- ), u.current && L.push(
588
- be(u.current, {
589
- moveLineSlider: (P) => {
590
- V.current?.(P);
605
+ ), a.current && L.push(
606
+ $e(a.current, {
607
+ moveLineSlider: (B) => {
608
+ T.current?.(B);
591
609
  }
592
610
  }).destroy
593
- ), requestAnimationFrame(() => T()), () => {
594
- L.forEach((P) => P());
611
+ ), requestAnimationFrame(() => P()), () => {
612
+ L.forEach((B) => B());
595
613
  };
596
614
  }, []);
597
- const H = "wx-1yoKzq";
598
- return /* @__PURE__ */ $("div", { className: H + " wx-colorboard", children: [
599
- /* @__PURE__ */ l(
615
+ const W = "wx-1yoKzq";
616
+ return /* @__PURE__ */ C("div", { className: W + " wx-colorboard " + t, children: [
617
+ /* @__PURE__ */ r(
600
618
  "div",
601
619
  {
602
- className: H + " wx-color-block",
603
- style: { background: y },
604
- ref: r,
605
- children: /* @__PURE__ */ l(
620
+ className: W + " wx-color-block",
621
+ style: { background: b },
622
+ ref: i,
623
+ children: /* @__PURE__ */ r(
606
624
  "div",
607
625
  {
608
- className: H + " wx-color-block-slider wx-slider",
626
+ className: W + " wx-color-block-slider wx-slider",
609
627
  style: {
610
- background: b,
611
- top: i + "px",
612
- left: a + "px"
628
+ background: k,
629
+ top: o + "px",
630
+ left: u + "px"
613
631
  },
614
632
  tabIndex: 0,
615
633
  "data-slider": Ve,
616
- onKeyDown: j
634
+ onKeyDown: G
617
635
  }
618
636
  )
619
637
  }
620
638
  ),
621
- /* @__PURE__ */ l("div", { className: H + " wx-color-line", ref: u, children: /* @__PURE__ */ l(
639
+ /* @__PURE__ */ r("div", { className: W + " wx-color-line", ref: a, children: /* @__PURE__ */ r(
622
640
  "div",
623
641
  {
624
- className: H + " wx-color-line-slider wx-slider",
625
- style: { background: y, left: p + "px" },
642
+ className: W + " wx-color-line-slider wx-slider",
643
+ style: { background: b, left: h + "px" },
626
644
  tabIndex: 0,
627
645
  "data-slider": Re,
628
- onKeyDown: j
646
+ onKeyDown: G
629
647
  }
630
648
  ) }),
631
- /* @__PURE__ */ $("div", { className: H + " wx-color-controls", children: [
632
- /* @__PURE__ */ l(
649
+ /* @__PURE__ */ C("div", { className: W + " wx-color-controls", children: [
650
+ /* @__PURE__ */ r(
633
651
  "div",
634
652
  {
635
- className: H + " wx-color",
636
- style: { background: b }
653
+ className: W + " wx-color",
654
+ style: { background: k }
637
655
  }
638
656
  ),
639
- /* @__PURE__ */ l(
657
+ /* @__PURE__ */ r(
640
658
  "input",
641
659
  {
642
660
  type: "text",
643
- className: H + " wx-text",
644
- value: h,
661
+ className: W + " wx-text",
662
+ value: x,
645
663
  onChange: R
646
664
  }
647
665
  )
648
666
  ] }),
649
- n && /* @__PURE__ */ l(re, { onClick: F, type: "secondary", children: s("select") })
667
+ n && /* @__PURE__ */ r(le, { onClick: Y, type: "secondary", children: l("select") })
650
668
  ] });
651
669
  }
652
- function Kt({
670
+ function tn({
653
671
  value: e = "",
654
672
  id: n,
655
673
  placeholder: t = "",
656
674
  title: s = "",
657
- disabled: r = !1,
658
- error: u = !1,
659
- clear: i = !1,
660
- onChange: c,
661
- dropdown: a = {}
675
+ tooltip: l,
676
+ disabled: i = !1,
677
+ error: a = !1,
678
+ clear: o = !1,
679
+ css: c = "",
680
+ onChange: u,
681
+ dropdown: d = {}
662
682
  }) {
663
- const o = z(n);
664
- let [w, d] = J(e);
665
- const [p, v] = B(!1);
666
- function x() {
667
- if (r) return !1;
668
- v(!0);
683
+ const p = te(n);
684
+ let [w, h] = U(e);
685
+ const [v, N] = O(!1);
686
+ function f() {
687
+ if (i) return !1;
688
+ N(!0);
669
689
  }
670
- function f(m) {
671
- if (m.input) return;
672
- v(!1);
673
- const g = m.value;
674
- d(g), c && c({ value: g });
690
+ function x(g) {
691
+ if (g.input) return;
692
+ N(!1);
693
+ const T = g.value;
694
+ h(T), u && u({ value: T });
675
695
  }
676
- function h(m) {
677
- m.stopPropagation(), d(""), c && c({ value: "" });
696
+ function m(g) {
697
+ g.stopPropagation(), h(""), u && u({ value: "" });
678
698
  }
679
- return /* @__PURE__ */ $("div", { className: "wx-mmT8WH wx-colorpicker", onClick: x, children: [
680
- /* @__PURE__ */ l(
681
- "input",
682
- {
683
- className: "wx-mmT8WH wx-input" + (u ? " wx-error" : "") + (p ? " wx-focus" : ""),
684
- title: s,
685
- value: w,
686
- readOnly: !0,
687
- id: o,
688
- placeholder: t,
689
- disabled: r
690
- }
691
- ),
692
- /* @__PURE__ */ l("div", { className: "wx-mmT8WH wx-color", style: { background: w } }),
693
- i && !r && w && /* @__PURE__ */ l("i", { className: "wx-mmT8WH wxi-close", onClick: h }),
694
- p && /* @__PURE__ */ l(le, { onCancel: () => v(!1), ...a, children: /* @__PURE__ */ l(ot, { value: w, button: "true", onChange: f }) })
695
- ] });
699
+ return /* @__PURE__ */ C(
700
+ "div",
701
+ {
702
+ className: "wx-mmT8WH wx-colorpicker " + c,
703
+ onClick: f,
704
+ "data-tooltip-text": l,
705
+ children: [
706
+ /* @__PURE__ */ r(
707
+ "input",
708
+ {
709
+ className: "wx-mmT8WH wx-input" + (a ? " wx-error" : "") + (v ? " wx-focus" : ""),
710
+ title: s,
711
+ value: w,
712
+ readOnly: !0,
713
+ id: p,
714
+ placeholder: t,
715
+ disabled: i
716
+ }
717
+ ),
718
+ /* @__PURE__ */ r("div", { className: "wx-mmT8WH wx-color", style: { background: w } }),
719
+ o && !i && w && /* @__PURE__ */ r("i", { className: "wx-mmT8WH wxi-close", onClick: m }),
720
+ v && /* @__PURE__ */ r(se, { onCancel: () => N(!1), ...d, children: /* @__PURE__ */ r(ft, { value: w, button: "true", onChange: x }) })
721
+ ]
722
+ }
723
+ );
696
724
  }
697
- function it() {
698
- let e = null, n = !1, t = !1, s, r, u, i;
699
- const c = (v, x, f, h, m) => {
700
- s = v, r = x, u = f, i = h, t = m;
701
- }, a = (v) => {
702
- e = v, n = e !== null, u(e);
703
- }, o = (v, x) => {
704
- if (!t && v !== null && s) {
705
- const f = s.querySelectorAll(".wx-list > .wx-item")[v];
706
- f && (f.scrollIntoView({ block: "nearest" }), x && x.preventDefault());
725
+ function wt() {
726
+ let e = null, n = !1, t = !1, s, l, i, a;
727
+ const o = (h, v, N, f, x) => {
728
+ s = h, l = v, i = N, a = f, t = x;
729
+ }, c = (h) => {
730
+ e = h, n = e !== null, i(e);
731
+ }, u = (h, v) => {
732
+ if (!t && h !== null && s) {
733
+ const N = s.querySelectorAll(".wx-list > .wx-item")[h];
734
+ N && (N.scrollIntoView({ block: "nearest" }), v && v.preventDefault());
707
735
  }
708
- }, w = (v, x) => {
709
- const f = v === null ? null : Math.max(0, Math.min(e + v, r.length - 1));
710
- f !== e && (a(f), s ? o(f, x) : requestAnimationFrame(() => o(f, x)));
736
+ }, d = (h, v) => {
737
+ const N = h === null ? null : Math.max(0, Math.min(e + h, l.length - 1));
738
+ N !== e && (c(N), s ? u(N, v) : requestAnimationFrame(() => u(N, v)));
711
739
  };
712
- return { move: (v) => {
713
- const x = Xe(v), f = r.findIndex((h) => h.id === x);
714
- f !== e && a(f);
715
- }, keydown: (v, x) => {
716
- switch (v.code) {
740
+ return { move: (h) => {
741
+ const v = lt(h), N = l.findIndex((f) => f.id === v);
742
+ N !== e && c(N);
743
+ }, keydown: (h, v) => {
744
+ switch (h.code) {
717
745
  case "Enter":
718
- n ? i() : a(0);
746
+ n ? a() : c(0);
719
747
  break;
720
748
  case "Space":
721
- n || a(0);
749
+ n || c(0);
722
750
  break;
723
751
  case "Escape":
724
- u(e = null);
752
+ i(e = null);
725
753
  break;
726
754
  case "Tab":
727
- u(e = null);
755
+ i(e = null);
728
756
  break;
729
757
  case "ArrowDown":
730
- w(n ? 1 : x || 0, v);
758
+ d(n ? 1 : v || 0, h);
731
759
  break;
732
760
  case "ArrowUp":
733
- w(n ? -1 : x || 0, v);
761
+ d(n ? -1 : v || 0, h);
734
762
  break;
735
763
  }
736
- }, init: c, navigate: w };
764
+ }, init: o, navigate: d };
737
765
  }
738
- const Te = 10, ut = Ue(function({ data: n, checkboxes: t, children: s, value: r }) {
739
- return /* @__PURE__ */ $(_, { children: [
740
- t && /* @__PURE__ */ l(
741
- Ye,
766
+ const Me = 10, xt = Xe(function({ data: n, checkboxes: t, itemTemplate: s, value: l }) {
767
+ return /* @__PURE__ */ C(Q, { children: [
768
+ t && /* @__PURE__ */ r(
769
+ Ze,
742
770
  {
743
771
  id: n.id,
744
- style: { marginRight: "8px", pointerEvents: "none" },
745
- value: r && r.includes(n.id)
772
+ css: "wx-list-checkbox",
773
+ value: l && l.includes(n.id)
746
774
  }
747
775
  ),
748
- s ? ae(s, { option: n }) : n.label
776
+ s ? oe(s, { option: n }) : n.label
749
777
  ] });
750
778
  });
751
- function $e({
779
+ function Ie({
752
780
  visibleItems: e,
753
781
  visibleRange: n,
754
782
  navIndex: t,
755
783
  checkboxes: s,
756
- children: r,
757
- value: u,
758
- measureRefCallback: i
784
+ itemTemplate: l,
785
+ value: i,
786
+ measureRefCallback: a
759
787
  }) {
760
- return e.map((c, a) => {
761
- const o = n.start + a;
762
- return /* @__PURE__ */ l(
788
+ return e.map((o, c) => {
789
+ const u = n.start + c;
790
+ return /* @__PURE__ */ r(
763
791
  "div",
764
792
  {
765
- ref: a === 0 ? i : void 0,
766
- className: `wx-233fr7 wx-item ${o === t ? "wx-focus" : ""}`,
767
- "data-id": c.id,
768
- children: /* @__PURE__ */ l(
769
- ut,
793
+ ref: c === 0 ? a : void 0,
794
+ className: `wx-233fr7 wx-item ${u === t ? "wx-focus" : ""}`,
795
+ "data-id": o.id,
796
+ children: /* @__PURE__ */ r(
797
+ xt,
770
798
  {
771
- data: c,
799
+ data: o,
772
800
  checkboxes: s,
773
- children: r,
774
- value: u
801
+ itemTemplate: l,
802
+ value: i
775
803
  }
776
804
  )
777
805
  },
778
- c.id
806
+ o.id
779
807
  );
780
808
  });
781
809
  }
782
- function ge({
810
+ function ke({
783
811
  items: e = [],
784
812
  children: n,
785
813
  onSelect: t,
786
814
  onReady: s,
787
- virtualized: r = !1,
788
- checkboxes: u,
789
- multiselect: i,
790
- value: c,
791
- ...a
815
+ virtualized: l = !1,
816
+ checkboxes: i,
817
+ multiselect: a,
818
+ value: o,
819
+ ...c
792
820
  }) {
793
- const o = C(), w = C(!1), d = C(it()), [p, v] = B(null), x = C(p), [f, h] = B(0), [m, g] = B(24), V = C(!1), b = (K(q) || X()).getGroup("core"), y = C(e);
794
- E(() => {
795
- y.current = e;
821
+ const u = S(), d = S(!1), p = S(wt()), [w, h] = O(null), v = S(w), [N, f] = O(0), [x, m] = O(24), g = S(!1), T = (X(K) || ne()).getGroup("core"), k = S(e);
822
+ J(() => {
823
+ k.current = e;
796
824
  }, [e]);
797
- const N = C(c);
798
- E(() => {
799
- N.current = c;
800
- }, [c]);
801
- const M = C(0);
802
- E(() => {
803
- M.current = m;
804
- }, [m]);
805
- const T = D((k) => {
806
- k && k.stopPropagation();
807
- const W = y.current, Z = N.current, ce = x.current;
808
- let ee;
809
- const te = W[ce]?.id;
810
- i ? Z && Z.includes(te) ? ee = Z.filter((we) => we !== te) : ee = [...Z || [], te] : ee = te, t && t({ id: ee });
811
- }, [i, t]), R = C(T);
812
- E(() => {
813
- R.current = T;
814
- }, [T]);
815
- const F = D((k) => {
816
- if (o.current) {
817
- let W = k * M.current - o.current.clientHeight + M.current;
818
- h(W), o.current.scrollTop = W;
825
+ const b = S(o);
826
+ J(() => {
827
+ b.current = o;
828
+ }, [o]);
829
+ const y = S(0);
830
+ J(() => {
831
+ y.current = x;
832
+ }, [x]);
833
+ const A = V((M) => {
834
+ M && M.stopPropagation();
835
+ const D = k.current, H = b.current, ee = v.current;
836
+ let z;
837
+ const q = D[ee]?.id;
838
+ a ? H && H.includes(q) ? z = H.filter((we) => we !== q) : z = [...H || [], q] : z = q, t && t({ id: z });
839
+ }, [a, t]), P = S(A);
840
+ J(() => {
841
+ P.current = A;
842
+ }, [A]);
843
+ const R = V((M) => {
844
+ if (u.current) {
845
+ let D = M * y.current - u.current.clientHeight + y.current;
846
+ f(D), u.current.scrollTop = D;
819
847
  }
820
- }, [M.current]), j = D(
821
- (k) => {
822
- o.current = k, r && (k && !w.current && x.current !== null && requestAnimationFrame(() => {
823
- o.current && (F(x.current), w.current = !0);
824
- }), k || (w.current = !1));
848
+ }, [y.current]), Y = V(
849
+ (M) => {
850
+ u.current = M, l && (M && !d.current && v.current !== null && requestAnimationFrame(() => {
851
+ u.current && (R(v.current), d.current = !0);
852
+ }), M || (d.current = !1));
825
853
  },
826
- [F]
827
- ), H = D((k) => {
828
- if (!k || V.current) return;
829
- const W = k.getBoundingClientRect().height;
830
- W && (g(W), M.current = W, V.current = !0);
854
+ [R]
855
+ ), G = V((M) => {
856
+ if (!M || g.current) return;
857
+ const D = M.getBoundingClientRect().height;
858
+ D && (m(D), y.current = D, g.current = !0);
831
859
  }, []);
832
- E(() => {
833
- d.current.init(
834
- o.current,
860
+ J(() => {
861
+ p.current.init(
862
+ u.current,
835
863
  e,
836
- (k) => {
837
- v(k), x.current = k;
864
+ (M) => {
865
+ h(M), v.current = M;
838
866
  },
839
- (k) => R.current(k),
840
- r
867
+ (M) => P.current(M),
868
+ l
841
869
  );
842
- }, [e, o.current, r]), E(() => {
843
- const k = (Z, ce) => {
844
- d.current.navigate(Z, ce), F(x.current);
845
- }, W = (Z, ce) => {
846
- const ee = x.current, te = y.current;
847
- if (ee !== 0 && ee !== te.length - 1 && (Z.key === "ArrowDown" || Z.key === "ArrowUp") && Z.preventDefault(), d.current.keydown(Z, ce), o.current) {
848
- const we = o.current.scrollTop <= x.current * M.current, Ge = o.current.scrollTop + o.current.clientHeight >= x.current * M.current + M.current;
849
- we ? Ge || F(x.current) : (o.current.scrollTop = x.current * M.current, h(o.current.scrollTop));
870
+ }, [e, u.current, l]), J(() => {
871
+ const M = (H, ee) => {
872
+ p.current.navigate(H, ee), R(v.current);
873
+ }, D = (H, ee) => {
874
+ const z = v.current, q = k.current;
875
+ if (z !== 0 && z !== q.length - 1 && (H.key === "ArrowDown" || H.key === "ArrowUp") && H.preventDefault(), p.current.keydown(H, ee), u.current) {
876
+ const we = u.current.scrollTop <= v.current * y.current, Ke = u.current.scrollTop + u.current.clientHeight >= v.current * y.current + y.current;
877
+ we ? Ke || R(v.current) : (u.current.scrollTop = v.current * y.current, f(u.current.scrollTop));
850
878
  }
851
879
  };
852
880
  s && s({
853
- navigate: r ? k : d.current.navigate,
854
- keydown: r ? W : d.current.keydown,
855
- move: d.current.move
881
+ navigate: l ? M : p.current.navigate,
882
+ keydown: l ? D : p.current.keydown,
883
+ move: p.current.move
856
884
  });
857
885
  }, []);
858
- const L = C(0), P = C(e);
859
- P.current !== e && (P.current = e, L.current += 1);
860
- const S = D(() => {
861
- d.current.navigate(null);
862
- }, [d]), O = D((k) => {
863
- r && h(k.target.scrollTop);
864
- }, [r]), U = A(
865
- () => Math.ceil((o.current?.clientHeight || 0) / m),
866
- [m, f]
867
- ), Y = A(() => {
868
- if (!r) return { start: 0, end: e.length };
886
+ const W = S(0), L = S(e);
887
+ L.current !== e && (L.current = e, W.current += 1);
888
+ const B = V(() => {
889
+ p.current.navigate(null);
890
+ }, [p]), _ = V((M) => {
891
+ l && f(M.target.scrollTop);
892
+ }, [l]), Z = E(
893
+ () => Math.ceil((u.current?.clientHeight || 0) / x),
894
+ [x, N]
895
+ ), F = E(() => {
896
+ if (!l) return { start: 0, end: e.length };
869
897
  if (!e.length) return { start: 0, end: 0 };
870
- const k = Math.floor(f / m), W = k + U;
898
+ const M = Math.floor(N / x), D = M + Z;
871
899
  return {
872
- start: Math.max(0, k - Te),
873
- end: Math.min(e.length, W + Te)
900
+ start: Math.max(0, M - Me),
901
+ end: Math.min(e.length, D + Me)
874
902
  };
875
- }, [r, e, f, m, U]), I = A(() => {
876
- if (!r) return e;
877
- const { start: k, end: W } = Y;
878
- return e.slice(k, W).map((Z) => ({
879
- ...Z
903
+ }, [l, e, N, x, Z]), j = E(() => {
904
+ if (!l) return e;
905
+ const { start: M, end: D } = F;
906
+ return e.slice(M, D).map((H) => ({
907
+ ...H
880
908
  }));
881
- }, [r, e, Y]), G = Y.start * m, Q = e.length * m;
882
- return E(() => {
883
- p === null && (w.current = !1);
884
- }, [p]), p === null ? null : /* @__PURE__ */ l(le, { onCancel: S, ...a, children: /* @__PURE__ */ l(
909
+ }, [l, e, F]), I = F.start * x, $ = e.length * x;
910
+ return J(() => {
911
+ l && f(0);
912
+ }, [e, l]), J(() => {
913
+ w === null && (d.current = !1);
914
+ }, [w]), w === null ? null : /* @__PURE__ */ r(se, { onCancel: B, ...c, children: /* @__PURE__ */ r(
885
915
  "div",
886
916
  {
887
917
  className: "wx-233fr7 wx-list",
888
- ref: j,
889
- onClick: T,
890
- onMouseMove: d.current.move,
891
- onScroll: O,
892
- children: e.length ? r ? /* @__PURE__ */ l(
918
+ ref: Y,
919
+ onClick: A,
920
+ onMouseMove: p.current.move,
921
+ onScroll: _,
922
+ children: e.length ? l ? /* @__PURE__ */ r(
893
923
  "div",
894
924
  {
895
925
  className: "wx-233fr7 wx-list-wrapper",
896
- style: { height: `${Q}px` },
897
- children: /* @__PURE__ */ l(
926
+ style: { height: `${$}px` },
927
+ children: /* @__PURE__ */ r(
898
928
  "div",
899
929
  {
900
930
  className: "wx-233fr7 wx-list-content",
901
- style: { transform: `translateY(${G}px)` },
902
- children: /* @__PURE__ */ l(
903
- $e,
931
+ style: { transform: `translateY(${I}px)` },
932
+ children: /* @__PURE__ */ r(
933
+ Ie,
904
934
  {
905
- visibleRange: Y,
906
- visibleItems: I,
907
- navIndex: p,
908
- measureRefCallback: H,
909
- checkboxes: u,
910
- children: n,
911
- value: c
935
+ visibleRange: F,
936
+ visibleItems: j,
937
+ navIndex: w,
938
+ measureRefCallback: G,
939
+ checkboxes: i,
940
+ itemTemplate: n,
941
+ value: o
912
942
  }
913
943
  )
914
944
  }
915
945
  )
916
946
  }
917
- ) : /* @__PURE__ */ l(
918
- $e,
947
+ ) : /* @__PURE__ */ r(
948
+ Ie,
919
949
  {
920
- visibleRange: Y,
921
- visibleItems: I,
922
- navIndex: p,
923
- measureRefCallback: H,
924
- checkboxes: u,
925
- children: n,
926
- value: c
950
+ visibleRange: F,
951
+ visibleItems: j,
952
+ navIndex: w,
953
+ measureRefCallback: G,
954
+ checkboxes: i,
955
+ itemTemplate: n,
956
+ value: o
927
957
  }
928
- ) : /* @__PURE__ */ l("div", { className: "wx-233fr7 wx-no-data", children: b("No data") })
958
+ ) : /* @__PURE__ */ r("div", { className: "wx-233fr7 wx-no-data", children: T("No data") })
929
959
  }
930
- ) }, L.current);
960
+ ) }, W.current);
931
961
  }
932
- function Zt({
962
+ function nn({
933
963
  value: e = "",
934
964
  id: n,
935
965
  options: t = [],
936
966
  textOptions: s = null,
937
- textField: r = "label",
938
- placeholder: u = "",
939
- title: i = "",
967
+ textField: l = "label",
968
+ placeholder: i = "",
969
+ title: a = "",
970
+ tooltip: o,
940
971
  disabled: c = !1,
941
- error: a = !1,
942
- clear: o = !1,
972
+ error: u = !1,
973
+ clear: d = !1,
974
+ css: p = "",
943
975
  children: w,
944
- onChange: d,
945
- dropdown: p = {}
976
+ onChange: h,
977
+ dropdown: v = {}
946
978
  }) {
947
- const v = z(n), x = C(null), f = C(null), [h, m] = J(e), [g, V] = B(!1), [b, y] = B(""), N = C(null), M = C(!1), T = A(() => {
948
- if (g) return b;
949
- if (h || h === 0) {
950
- const I = (s || t).find((G) => G.id === h);
951
- if (I) return I[r];
979
+ const N = te(n), f = S(null), x = S(null), [m, g] = U(e), [T, k] = O(!1), [b, y] = O(""), A = S(null), P = S(!1), R = E(() => {
980
+ if (T) return b;
981
+ if (m || m === 0) {
982
+ const $ = (s || t).find((M) => M.id === m);
983
+ if ($) return $[l];
952
984
  }
953
985
  return "";
954
- }, [g, b, h, s, t, r]), R = A(() => !T || !g ? t : t.filter(
955
- (I) => I[r].toLowerCase().includes(T.toLowerCase())
956
- ), [T, g, t, r]), F = D(
957
- () => R.findIndex((I) => I.id === h),
958
- [R, h]
959
- ), j = D((I) => {
960
- x.current = I.navigate, f.current = I.keydown;
961
- }, []), H = D(
962
- (I, G) => {
963
- if (I || I === 0) {
964
- let Q = t.find((k) => k.id === I);
965
- if (V(!1), G && x.current(null), Q && h !== Q.id) {
966
- const k = Q.id;
967
- m(k), d && d({ value: k });
986
+ }, [T, b, m, s, t, l]), Y = E(() => !R || !T ? t : t.filter(
987
+ ($) => $[l].toLowerCase().includes(R.toLowerCase())
988
+ ), [R, T, t, l]), G = V(
989
+ () => Y.findIndex(($) => $.id === m),
990
+ [Y, m]
991
+ ), W = V(($) => {
992
+ f.current = $.navigate, x.current = $.keydown;
993
+ }, []), L = V(
994
+ ($, M) => {
995
+ if ($ || $ === 0) {
996
+ let D = t.find((H) => H.id === $);
997
+ if (k(!1), M && f.current(null), D && m !== D.id) {
998
+ const H = D.id;
999
+ g(H), h && h({ value: H });
968
1000
  }
969
1001
  }
970
- !M.current && G && N.current.focus();
1002
+ !P.current && M && A.current.focus();
971
1003
  },
972
- [t, h, d]
973
- ), L = D(
974
- ({ id: I }) => {
975
- H(I, !0);
1004
+ [t, m, h]
1005
+ ), B = V(
1006
+ ({ id: $ }) => {
1007
+ L($, !0);
976
1008
  },
977
- [H]
978
- ), P = D(
979
- (I) => {
980
- I && I.stopPropagation(), m(""), V(!1), d && d({ value: "" });
1009
+ [L]
1010
+ ), _ = V(
1011
+ ($) => {
1012
+ $ && $.stopPropagation(), g(""), k(!1), h && h({ value: "" });
981
1013
  },
982
- [d]
983
- ), S = D(
984
- (I) => {
1014
+ [h]
1015
+ ), Z = V(
1016
+ ($) => {
985
1017
  if (!t.length) return;
986
- if (I === "" && o) {
987
- P();
1018
+ if ($ === "" && d) {
1019
+ _();
988
1020
  return;
989
1021
  }
990
- let G = t.find((k) => k[r] === I);
991
- G || (G = t.find(
992
- (k) => k[r].toLowerCase().includes(I.toLowerCase())
1022
+ let M = t.find((H) => H[l] === $);
1023
+ M || (M = t.find(
1024
+ (H) => H[l].toLowerCase().includes($.toLowerCase())
993
1025
  ));
994
- const Q = G ? G.id : h || t[0].id;
995
- H(Q, !1);
1026
+ const D = M ? M.id : m || t[0].id;
1027
+ L(D, !1);
996
1028
  },
997
- [t, r, o, h, H, P]
998
- ), O = D(() => {
999
- y(N.current.value), V(!0), R.length && x.current(0);
1000
- }, [R.length, x]), U = D(() => {
1001
- M.current = !0;
1002
- }, []), Y = D(() => {
1003
- M.current = !1, setTimeout(() => {
1004
- M.current || S(T);
1029
+ [t, l, d, m, L, _]
1030
+ ), F = V(() => {
1031
+ y(A.current.value), k(!0), Y.length && f.current(0);
1032
+ }, [Y.length, f]), j = V(() => {
1033
+ P.current = !0;
1034
+ }, []), I = V(() => {
1035
+ P.current = !1, setTimeout(() => {
1036
+ P.current || Z(R);
1005
1037
  }, 200);
1006
- }, [S, T]);
1007
- return /* @__PURE__ */ $(
1038
+ }, [Z, R]);
1039
+ return /* @__PURE__ */ C(
1008
1040
  "div",
1009
1041
  {
1010
- className: "wx-1j11Jk wx-combo",
1011
- onClick: () => x.current(F()),
1012
- onKeyDown: (I) => f.current(I, F()),
1013
- title: i,
1042
+ className: "wx-1j11Jk wx-combo " + p,
1043
+ onClick: () => f.current(G()),
1044
+ onKeyDown: ($) => x.current($, G()),
1045
+ title: a,
1046
+ "data-tooltip-text": o,
1014
1047
  children: [
1015
- /* @__PURE__ */ l(
1048
+ /* @__PURE__ */ r(
1016
1049
  "input",
1017
1050
  {
1018
- className: "wx-1j11Jk wx-input " + (a ? "wx-error" : ""),
1019
- id: v,
1020
- ref: N,
1021
- value: T,
1051
+ className: "wx-1j11Jk wx-input " + (u ? "wx-error" : ""),
1052
+ id: N,
1053
+ ref: A,
1054
+ value: R,
1022
1055
  disabled: c,
1023
- placeholder: u,
1024
- onFocus: U,
1025
- onBlur: Y,
1026
- onInput: O
1056
+ placeholder: i,
1057
+ onFocus: j,
1058
+ onBlur: I,
1059
+ onInput: F
1027
1060
  }
1028
1061
  ),
1029
- o && !c && h ? /* @__PURE__ */ l("i", { className: "wx-1j11Jk wx-icon wxi-close", onClick: P }) : /* @__PURE__ */ l("i", { className: "wx-1j11Jk wx-icon wxi-angle-down" }),
1030
- !c && /* @__PURE__ */ l(ge, { items: R, onReady: j, onSelect: L, ...p, children: ({ option: I }) => /* @__PURE__ */ l(_, { children: w ? w({ option: I }) : I[r] }) })
1062
+ d && !c && m ? /* @__PURE__ */ r("i", { className: "wx-1j11Jk wx-icon wxi-close", onClick: _ }) : /* @__PURE__ */ r("i", { className: "wx-1j11Jk wx-icon wxi-angle-down" }),
1063
+ !c && /* @__PURE__ */ r(ke, { items: Y, onReady: W, onSelect: B, ...v, children: ({ option: $ }) => /* @__PURE__ */ r(Q, { children: w ? w({ option: $ }) : $[l] }) })
1031
1064
  ]
1032
1065
  }
1033
1066
  );
1034
1067
  }
1035
- function Ne({
1068
+ function ye({
1036
1069
  value: e = "",
1037
1070
  id: n,
1038
1071
  readonly: t = !1,
1039
1072
  focus: s = !1,
1040
- select: r = !1,
1041
- type: u = "text",
1042
- placeholder: i = "",
1043
- disabled: c = !1,
1044
- error: a = !1,
1045
- inputStyle: o = {},
1046
- title: w = "",
1047
- css: d = "",
1048
- icon: p = "",
1049
- clear: v = !1,
1050
- onChange: x
1073
+ select: l = !1,
1074
+ type: i = "text",
1075
+ placeholder: a = "",
1076
+ disabled: o = !1,
1077
+ error: c = !1,
1078
+ title: u = "",
1079
+ tooltip: d,
1080
+ css: p = "",
1081
+ icon: w = "",
1082
+ clear: h = !1,
1083
+ onChange: v
1051
1084
  }) {
1052
- const f = z(n), [h, m] = J(e), g = C(null), V = A(
1053
- () => p && d.indexOf("wx-icon-left") === -1 ? "wx-icon-right " + d : d,
1054
- [p, d]
1055
- ), b = A(
1056
- () => p && d.indexOf("wx-icon-left") !== -1,
1057
- [p, d]
1085
+ const N = te(n), [f, x] = U(e), m = S(null), g = E(
1086
+ () => w && p.indexOf("wx-icon-left") === -1 ? "wx-icon-right " + p : p,
1087
+ [w, p]
1088
+ ), T = E(
1089
+ () => w && p.indexOf("wx-icon-left") !== -1,
1090
+ [w, p]
1058
1091
  );
1059
- E(() => {
1060
- const R = setTimeout(() => {
1061
- s && g.current && g.current.focus(), r && g.current && g.current.select();
1092
+ J(() => {
1093
+ const P = setTimeout(() => {
1094
+ s && m.current && m.current.focus(), l && m.current && m.current.select();
1062
1095
  }, 1);
1063
- return () => clearTimeout(R);
1064
- }, [s, r]);
1065
- const y = D(
1066
- (R) => {
1067
- const F = R.target.value;
1068
- m(F), x && x({ value: F, input: !0 });
1096
+ return () => clearTimeout(P);
1097
+ }, [s, l]);
1098
+ const k = V(
1099
+ (P) => {
1100
+ const R = P.target.value;
1101
+ x(R), v && v({ value: R, input: !0 });
1069
1102
  },
1070
- [x]
1071
- ), N = D(
1072
- (R) => x && x({ value: R.target.value }),
1073
- [x]
1103
+ [v]
1104
+ ), b = V(
1105
+ (P) => v && v({ value: P.target.value }),
1106
+ [v]
1074
1107
  );
1075
- function M(R) {
1076
- R.stopPropagation(), m(""), x && x({ value: "" });
1108
+ function y(P) {
1109
+ P.stopPropagation(), x(""), v && v({ value: "" });
1077
1110
  }
1078
- let T = u;
1079
- return u !== "password" && u !== "number" && (T = "text"), E(() => {
1080
- const R = N, F = g.current;
1081
- return F.addEventListener("change", R), () => {
1082
- F && F.removeEventListener("change", R);
1111
+ let A = i;
1112
+ return i !== "password" && i !== "number" && (A = "text"), J(() => {
1113
+ const P = b, R = m.current;
1114
+ return R.addEventListener("change", P), () => {
1115
+ R && R.removeEventListener("change", P);
1083
1116
  };
1084
- }, [N]), /* @__PURE__ */ $(
1117
+ }, [b]), /* @__PURE__ */ C(
1085
1118
  "div",
1086
1119
  {
1087
- className: `wx-hQ64J4 wx-text ${V} ${a ? "wx-error" : ""} ${c ? "wx-disabled" : ""} ${v ? "wx-clear" : ""}`,
1120
+ className: `wx-hQ64J4 wx-text ${g} ${c ? "wx-error" : ""} ${o ? "wx-disabled" : ""} ${h ? "wx-clear" : ""}`,
1121
+ "data-tooltip-text": d,
1088
1122
  children: [
1089
- /* @__PURE__ */ l(
1123
+ /* @__PURE__ */ r(
1090
1124
  "input",
1091
1125
  {
1092
1126
  className: "wx-hQ64J4 wx-input",
1093
- ref: g,
1094
- id: f,
1127
+ ref: m,
1128
+ id: N,
1095
1129
  readOnly: t,
1096
- disabled: c,
1097
- placeholder: i,
1098
- type: T,
1099
- style: o,
1100
- title: w,
1101
- value: h,
1102
- onInput: y
1130
+ disabled: o,
1131
+ placeholder: a,
1132
+ type: A,
1133
+ title: u,
1134
+ value: f,
1135
+ onInput: k
1103
1136
  }
1104
1137
  ),
1105
- v && !c && h ? /* @__PURE__ */ $(_, { children: [
1106
- /* @__PURE__ */ l("i", { className: "wx-hQ64J4 wx-icon wxi-close", onClick: M }),
1107
- b && /* @__PURE__ */ l("i", { className: `wx-hQ64J4 wx-icon ${p}` })
1108
- ] }) : p ? /* @__PURE__ */ l("i", { className: `wx-hQ64J4 wx-icon ${p}` }) : null
1138
+ h && !o && f ? /* @__PURE__ */ C(Q, { children: [
1139
+ /* @__PURE__ */ r("i", { className: "wx-hQ64J4 wx-icon wxi-close", onClick: y }),
1140
+ T && /* @__PURE__ */ r("i", { className: `wx-hQ64J4 wx-icon ${w}` })
1141
+ ] }) : w ? /* @__PURE__ */ r("i", { className: `wx-hQ64J4 wx-icon ${w}` }) : null
1109
1142
  ]
1110
1143
  }
1111
1144
  );
1112
1145
  }
1113
- function dt({ date: e, type: n, part: t, onShift: s }) {
1114
- const { calendar: r, formats: u } = K(q).getRaw(), i = e.getFullYear(), c = A(() => {
1146
+ function mt({ date: e, type: n, part: t, onShift: s }) {
1147
+ const { calendar: l, formats: i } = X(K).getRaw(), a = e.getFullYear(), o = E(() => {
1115
1148
  switch (n) {
1116
1149
  case "month":
1117
- return ne(u.monthYearFormat, r)(e);
1150
+ return re(i.monthYearFormat, l)(e);
1118
1151
  case "year":
1119
- return ne(u.yearFormat, r)(e);
1152
+ return re(i.yearFormat, l)(e);
1120
1153
  case "duodecade": {
1121
- const { start: o, end: w } = Be(i), d = ne(u.yearFormat, r);
1122
- return `${d(new Date(o, 0, 1))} - ${d(new Date(w, 11, 31))}`;
1154
+ const { start: u, end: d } = Je(a), p = re(i.yearFormat, l);
1155
+ return `${p(new Date(u, 0, 1))} - ${p(new Date(d, 11, 31))}`;
1123
1156
  }
1124
1157
  default:
1125
1158
  return "";
1126
1159
  }
1127
- }, [e, n, i, r, u]);
1128
- function a() {
1160
+ }, [e, n, a, l, i]);
1161
+ function c() {
1129
1162
  s && s({ diff: 0, type: n });
1130
1163
  }
1131
- return /* @__PURE__ */ $("div", { className: "wx-8HQVQV wx-header", children: [
1132
- t !== "right" ? /* @__PURE__ */ l(
1164
+ return /* @__PURE__ */ C("div", { className: "wx-8HQVQV wx-header", children: [
1165
+ t !== "right" ? /* @__PURE__ */ r(
1133
1166
  "i",
1134
1167
  {
1135
1168
  className: "wx-8HQVQV wx-pager wxi-angle-left",
1136
1169
  onClick: () => s && s({ diff: -1, type: n })
1137
1170
  }
1138
- ) : /* @__PURE__ */ l("span", { className: "wx-8HQVQV wx-spacer" }),
1139
- /* @__PURE__ */ l("span", { className: "wx-8HQVQV wx-label", onClick: a, children: c }),
1140
- t !== "left" ? /* @__PURE__ */ l(
1171
+ ) : /* @__PURE__ */ r("span", { className: "wx-8HQVQV wx-spacer" }),
1172
+ /* @__PURE__ */ r("span", { className: "wx-8HQVQV wx-label", onClick: c, children: o }),
1173
+ t !== "left" ? /* @__PURE__ */ r(
1141
1174
  "i",
1142
1175
  {
1143
1176
  className: "wx-8HQVQV wx-pager wxi-angle-right",
1144
1177
  onClick: () => s && s({ diff: 1, type: n })
1145
1178
  }
1146
- ) : /* @__PURE__ */ l("span", { className: "wx-8HQVQV wx-spacer" })
1179
+ ) : /* @__PURE__ */ r("span", { className: "wx-8HQVQV wx-spacer" })
1147
1180
  ] });
1148
1181
  }
1149
- function ke({ onClick: e, children: n }) {
1150
- return /* @__PURE__ */ l("button", { className: "wx-3s8W4d wx-button", onClick: e, children: n });
1182
+ function be({ onClick: e, children: n }) {
1183
+ return /* @__PURE__ */ r("button", { className: "wx-3s8W4d wx-button", onClick: e, children: n });
1151
1184
  }
1152
- function ft({
1185
+ function ht({
1153
1186
  value: e,
1154
1187
  current: n,
1155
1188
  part: t = "",
1156
1189
  markers: s = null,
1157
- onCancel: r,
1158
- onChange: u
1190
+ css: l = "",
1191
+ onCancel: i,
1192
+ onChange: a
1159
1193
  }) {
1160
- const i = (K(q) || X()).getRaw().calendar, c = (i.weekStart || 7) % 7, a = i.dayShort.slice(c).concat(i.dayShort.slice(0, c)), o = (b, y, N) => new Date(
1161
- b.getFullYear(),
1162
- b.getMonth() + (y || 0),
1163
- b.getDate() + (N || 0)
1194
+ const o = (X(K) || ne()).getRaw().calendar, c = (o.weekStart || 7) % 7, u = o.dayShort.slice(c).concat(o.dayShort.slice(0, c)), d = (k, b, y) => new Date(
1195
+ k.getFullYear(),
1196
+ k.getMonth() + (b || 0),
1197
+ k.getDate() + (y || 0)
1164
1198
  );
1165
- let w = t !== "normal";
1166
- function d(b) {
1167
- const y = b.getDay();
1168
- return y === 0 || y === 6;
1199
+ let p = t !== "normal";
1200
+ function w(k) {
1201
+ const b = k.getDay();
1202
+ return b === 0 || b === 6;
1169
1203
  }
1170
- function p() {
1171
- const b = o(n, 0, 1 - n.getDate());
1172
- return b.setDate(b.getDate() - (b.getDay() - (c - 7)) % 7), b;
1204
+ function h() {
1205
+ const k = d(n, 0, 1 - n.getDate());
1206
+ return k.setDate(k.getDate() - (k.getDay() - (c - 7)) % 7), k;
1173
1207
  }
1174
1208
  function v() {
1175
- const b = o(n, 1, -n.getDate());
1176
- return b.setDate(b.getDate() + (6 - b.getDay() + c) % 7), b;
1209
+ const k = d(n, 1, -n.getDate());
1210
+ return k.setDate(k.getDate() + (6 - k.getDay() + c) % 7), k;
1177
1211
  }
1178
- const x = C(0);
1179
- function f(b, y) {
1180
- y.timeStamp !== x.current && (x.current = y.timeStamp, y.stopPropagation(), u && u(new Date(b)), r && r());
1212
+ const N = S(0);
1213
+ function f(k, b) {
1214
+ b.timeStamp !== N.current && (N.current = b.timeStamp, b.stopPropagation(), a && a(new Date(k)), i && i());
1181
1215
  }
1182
- const h = A(() => t == "normal" ? [e ? o(e).valueOf() : 0] : e ? [
1183
- e.start ? o(e.start).valueOf() : 0,
1184
- e.end ? o(e.end).valueOf() : 0
1185
- ] : [0, 0], [t, e]), m = A(() => {
1186
- const b = p(), y = v(), N = n.getMonth();
1187
- let M = [];
1188
- for (let T = b; T <= y; T.setDate(T.getDate() + 1)) {
1216
+ const x = E(() => t == "normal" ? [e ? d(e).valueOf() : 0] : e ? [
1217
+ e.start ? d(e.start).valueOf() : 0,
1218
+ e.end ? d(e.end).valueOf() : 0
1219
+ ] : [0, 0], [t, e]), m = E(() => {
1220
+ const k = h(), b = v(), y = n.getMonth();
1221
+ let A = [];
1222
+ for (let P = k; P <= b; P.setDate(P.getDate() + 1)) {
1189
1223
  const R = {
1190
- day: T.getDate(),
1191
- in: T.getMonth() === N,
1192
- date: T.valueOf()
1224
+ day: P.getDate(),
1225
+ in: P.getMonth() === y,
1226
+ date: P.valueOf()
1193
1227
  };
1194
- let F = "";
1195
- if (F += R.in ? "" : " wx-inactive", F += h.indexOf(R.date) > -1 ? " wx-selected" : "", w) {
1196
- const j = R.date == h[0], H = R.date == h[1];
1197
- j && !H ? F += " wx-left" : H && !j && (F += " wx-right"), R.date > h[0] && R.date < h[1] && (F += " wx-inrange");
1228
+ let Y = "";
1229
+ if (Y += R.in ? "" : " wx-inactive", Y += x.indexOf(R.date) > -1 ? " wx-selected" : "", p) {
1230
+ const G = R.date == x[0], W = R.date == x[1];
1231
+ G && !W ? Y += " wx-left" : W && !G && (Y += " wx-right"), R.date > x[0] && R.date < x[1] && (Y += " wx-inrange");
1198
1232
  }
1199
- if (F += d(T) ? " wx-weekend" : "", s) {
1200
- const j = s(T);
1201
- j && (F += " " + j);
1233
+ if (Y += w(P) ? " wx-weekend" : "", s) {
1234
+ const G = s(P);
1235
+ G && (Y += " " + G);
1202
1236
  }
1203
- M.push({ ...R, css: F });
1237
+ A.push({ ...R, css: Y });
1204
1238
  }
1205
- return M;
1206
- }, [n, h, w, s]), g = C(null);
1207
- let V = C({});
1208
- return V.current.click = f, E(() => {
1209
- Ee(g.current, V.current);
1210
- }, []), /* @__PURE__ */ $("div", { children: [
1211
- /* @__PURE__ */ l("div", { className: "wx-398RBS wx-weekdays", children: a.map((b) => /* @__PURE__ */ l("div", { className: "wx-398RBS wx-weekday", children: b }, b)) }),
1212
- /* @__PURE__ */ l("div", { className: "wx-398RBS wx-days", ref: g, children: m.map((b) => /* @__PURE__ */ l(
1239
+ return A;
1240
+ }, [n, x, p, s]), g = S(null);
1241
+ let T = S({});
1242
+ return T.current.click = f, J(() => {
1243
+ Ge(g.current, T.current);
1244
+ }, []), /* @__PURE__ */ C("div", { className: `wx-398RBS wx-month ${l}`, children: [
1245
+ /* @__PURE__ */ r("div", { className: "wx-398RBS wx-weekdays", children: u.map((k) => /* @__PURE__ */ r("div", { className: "wx-398RBS wx-weekday", children: k }, k)) }),
1246
+ /* @__PURE__ */ r("div", { className: "wx-398RBS wx-days", ref: g, children: m.map((k) => /* @__PURE__ */ r(
1213
1247
  "div",
1214
1248
  {
1215
- className: `wx-398RBS wx-day ${b.css} ${b.in ? "" : "wx-out"}`,
1216
- "data-id": b.date,
1217
- children: b.day
1249
+ className: `wx-398RBS wx-day ${k.css} ${k.in ? "" : "wx-out"}`,
1250
+ "data-id": k.date,
1251
+ children: k.day
1218
1252
  },
1219
- b.date
1253
+ k.date
1220
1254
  )) })
1221
1255
  ] });
1222
1256
  }
1223
- function wt({
1257
+ function pt({
1224
1258
  value: e,
1225
1259
  current: n,
1226
1260
  part: t,
1227
1261
  onCancel: s,
1228
- onChange: r,
1229
- onShift: u
1262
+ onChange: l,
1263
+ onShift: i
1230
1264
  }) {
1231
- const i = C(/* @__PURE__ */ new Date()), [c, a] = J(e || i.current), [o, w] = J(n || i.current), d = K(q).getRaw().calendar, p = d.monthShort || [], v = A(() => o.getMonth(), [o]), x = D(
1232
- (m, g) => {
1233
- if (m != null) {
1234
- g.stopPropagation();
1235
- const V = new Date(o);
1236
- V.setMonth(m), w(V), u && u({ current: V });
1265
+ const a = S(/* @__PURE__ */ new Date()), [o, c] = U(e || a.current), [u, d] = U(n || a.current), p = X(K).getRaw().calendar, w = p.monthShort || [], h = E(() => u.getMonth(), [u]), v = V(
1266
+ (x, m) => {
1267
+ if (x != null) {
1268
+ m.stopPropagation();
1269
+ const g = new Date(u);
1270
+ g.setMonth(x), d(g), i && i({ current: g });
1237
1271
  }
1238
- t === "normal" && a(new Date(o)), s && s();
1272
+ t === "normal" && c(new Date(u)), s && s();
1239
1273
  },
1240
- [o, t, u, s]
1241
- ), f = D(() => {
1242
- const m = new Date(je(c, t) || o);
1243
- m.setMonth(o.getMonth()), m.setFullYear(o.getFullYear()), r && r(m);
1244
- }, [c, o, t, r]), h = D(
1245
- (m) => {
1246
- const g = m.target.closest("[data-id]");
1247
- if (g) {
1248
- const V = parseInt(g.getAttribute("data-id"), 10);
1249
- x(V, m);
1274
+ [u, t, i, s]
1275
+ ), N = V(() => {
1276
+ const x = new Date(ze(o, t) || u);
1277
+ x.setMonth(u.getMonth()), x.setFullYear(u.getFullYear()), l && l(x);
1278
+ }, [o, u, t, l]), f = V(
1279
+ (x) => {
1280
+ const m = x.target.closest("[data-id]");
1281
+ if (m) {
1282
+ const g = parseInt(m.getAttribute("data-id"), 10);
1283
+ v(g, x);
1250
1284
  }
1251
1285
  },
1252
- [x]
1286
+ [v]
1253
1287
  );
1254
- return /* @__PURE__ */ $(_, { children: [
1255
- /* @__PURE__ */ l("div", { className: "wx-34U8T8 wx-months", onClick: h, children: p.map((m, g) => /* @__PURE__ */ l(
1288
+ return /* @__PURE__ */ C(Q, { children: [
1289
+ /* @__PURE__ */ r("div", { className: "wx-34U8T8 wx-months", onClick: f, children: w.map((x, m) => /* @__PURE__ */ r(
1256
1290
  "div",
1257
1291
  {
1258
- className: "wx-34U8T8 wx-month" + (v === g ? " wx-current" : ""),
1259
- "data-id": g,
1260
- children: m
1292
+ className: "wx-34U8T8 wx-month" + (h === m ? " wx-current" : ""),
1293
+ "data-id": m,
1294
+ children: x
1261
1295
  },
1262
- g
1296
+ m
1263
1297
  )) }),
1264
- /* @__PURE__ */ l("div", { className: "wx-34U8T8 wx-buttons", children: /* @__PURE__ */ l(ke, { onClick: f, children: d.done }) })
1298
+ /* @__PURE__ */ r("div", { className: "wx-34U8T8 wx-buttons", children: /* @__PURE__ */ r(be, { onClick: N, children: p.done }) })
1265
1299
  ] });
1266
1300
  }
1267
- const xe = "wx-1XEF33", xt = ({ value: e, current: n, onCancel: t, onChange: s, onShift: r, part: u }) => {
1268
- const i = K(q).getRaw().calendar, [c, a] = J(n), [o, w] = J(e), d = A(() => c.getFullYear(), [c]), p = A(() => {
1269
- const { start: m, end: g } = Be(d), V = [];
1270
- for (let b = m; b <= g; ++b)
1271
- V.push(b);
1272
- return V;
1273
- }, [d]), v = {
1274
- click: x
1301
+ const xe = "wx-1XEF33", vt = ({ value: e, current: n, onCancel: t, onChange: s, onShift: l, part: i }) => {
1302
+ const a = X(K).getRaw().calendar, [o, c] = U(n), [u, d] = U(e), p = E(() => o.getFullYear(), [o]), w = E(() => {
1303
+ const { start: x, end: m } = Je(p), g = [];
1304
+ for (let T = x; T <= m; ++T)
1305
+ g.push(T);
1306
+ return g;
1307
+ }, [p]), h = {
1308
+ click: v
1275
1309
  };
1276
- function x(m, g) {
1277
- if (m) {
1278
- g.stopPropagation();
1279
- const V = new Date(c);
1280
- V.setFullYear(m), a(V), r && r({ current: V });
1310
+ function v(x, m) {
1311
+ if (x) {
1312
+ m.stopPropagation();
1313
+ const g = new Date(o);
1314
+ g.setFullYear(x), c(g), l && l({ current: g });
1281
1315
  }
1282
- u === "normal" && w(new Date(c)), t && t();
1316
+ i === "normal" && d(new Date(o)), t && t();
1283
1317
  }
1284
- function f() {
1285
- const m = new Date(je(o, u) || c);
1286
- m.setFullYear(c.getFullYear()), s && s(m);
1318
+ function N() {
1319
+ const x = new Date(ze(u, i) || o);
1320
+ x.setFullYear(o.getFullYear()), s && s(x);
1287
1321
  }
1288
- const h = C(null);
1289
- return E(() => {
1290
- h.current && Ee(h.current, v);
1291
- }, []), /* @__PURE__ */ $(_, { children: [
1292
- /* @__PURE__ */ l("div", { className: xe + " wx-years", ref: h, children: p.map((m, g) => /* @__PURE__ */ l(
1322
+ const f = S(null);
1323
+ return J(() => {
1324
+ f.current && Ge(f.current, h);
1325
+ }, []), /* @__PURE__ */ C(Q, { children: [
1326
+ /* @__PURE__ */ r("div", { className: xe + " wx-years", ref: f, children: w.map((x, m) => /* @__PURE__ */ r(
1293
1327
  "div",
1294
1328
  {
1295
- className: xe + ` wx-year ${d == m ? "wx-current" : ""} ${g === 0 ? "wx-prev-decade" : ""} ${g === 11 ? "wx-next-decade" : ""}`,
1296
- "data-id": m,
1297
- children: m
1329
+ className: xe + ` wx-year ${p == x ? "wx-current" : ""} ${m === 0 ? "wx-prev-decade" : ""} ${m === 11 ? "wx-next-decade" : ""}`,
1330
+ "data-id": x,
1331
+ children: x
1298
1332
  },
1299
- g
1333
+ m
1300
1334
  )) }),
1301
- /* @__PURE__ */ l("div", { className: xe + " wx-buttons", children: /* @__PURE__ */ l(ke, { onClick: f, children: i.done }) })
1335
+ /* @__PURE__ */ r("div", { className: xe + " wx-buttons", children: /* @__PURE__ */ r(be, { onClick: N, children: a.done }) })
1302
1336
  ] });
1303
- }, Me = {
1337
+ }, Ce = {
1304
1338
  month: {
1305
- component: ft,
1306
- next: ht,
1307
- prev: mt
1339
+ component: ht,
1340
+ next: Nt,
1341
+ prev: gt
1308
1342
  },
1309
1343
  year: {
1310
- component: wt,
1311
- next: vt,
1312
- prev: pt
1344
+ component: pt,
1345
+ next: yt,
1346
+ prev: kt
1313
1347
  },
1314
1348
  duodecade: {
1315
- component: xt,
1316
- next: Nt,
1317
- prev: gt
1349
+ component: vt,
1350
+ next: Dt,
1351
+ prev: bt
1318
1352
  }
1319
1353
  };
1320
- function mt(e) {
1354
+ function gt(e) {
1321
1355
  return e = new Date(e), e.setMonth(e.getMonth() - 1), e;
1322
1356
  }
1323
- function ht(e) {
1357
+ function Nt(e) {
1324
1358
  return e = new Date(e), e.setMonth(e.getMonth() + 1), e;
1325
1359
  }
1326
- function pt(e) {
1360
+ function kt(e) {
1327
1361
  return e = new Date(e), e.setFullYear(e.getFullYear() - 1), e;
1328
1362
  }
1329
- function vt(e) {
1363
+ function yt(e) {
1330
1364
  return e = new Date(e), e.setFullYear(e.getFullYear() + 1), e;
1331
1365
  }
1332
- function gt(e) {
1366
+ function bt(e) {
1333
1367
  return e = new Date(e), e.setFullYear(e.getFullYear() - 10), e;
1334
1368
  }
1335
- function Nt(e) {
1369
+ function Dt(e) {
1336
1370
  return e = new Date(e), e.setFullYear(e.getFullYear() + 10), e;
1337
1371
  }
1338
- function je(e, n) {
1372
+ function ze(e, n) {
1339
1373
  let t;
1340
1374
  if (n === "normal") t = e;
1341
1375
  else {
1342
- const { start: s, end: r } = e;
1343
- n === "left" ? t = s : n == "right" ? t = r : t = s && r;
1376
+ const { start: s, end: l } = e;
1377
+ n === "left" ? t = s : n == "right" ? t = l : t = s && l;
1344
1378
  }
1345
1379
  return t;
1346
1380
  }
1347
- const kt = ["clear", "today"];
1348
- function yt(e) {
1381
+ const $t = ["clear", "today"];
1382
+ function Tt(e) {
1349
1383
  if (e === "done") return -1;
1350
1384
  if (e === "clear") return null;
1351
1385
  if (e === "today") return /* @__PURE__ */ new Date();
@@ -1355,54 +1389,55 @@ function de({
1355
1389
  current: n,
1356
1390
  onCurrentChange: t,
1357
1391
  part: s = "normal",
1358
- markers: r = null,
1359
- buttons: u,
1360
- onShift: i,
1392
+ markers: l = null,
1393
+ buttons: i,
1394
+ css: a = "",
1395
+ onShift: o,
1361
1396
  onChange: c
1362
1397
  }) {
1363
- const a = K(q).getGroup("calendar"), [o, w] = B("month"), d = Array.isArray(u) ? u : u ? kt : [], p = (m, g) => {
1398
+ const u = X(K).getGroup("calendar"), [d, p] = O("month"), w = Array.isArray(i) ? i : i ? $t : [], h = (m, g) => {
1364
1399
  m.preventDefault(), c && c({ value: g });
1365
1400
  }, v = () => {
1366
- o === "duodecade" ? w("year") : o === "year" && w("month");
1367
- }, x = (m) => {
1368
- const { diff: g, current: V } = m;
1401
+ d === "duodecade" ? p("year") : d === "year" && p("month");
1402
+ }, N = (m) => {
1403
+ const { diff: g, current: T } = m;
1369
1404
  if (g === 0) {
1370
- o === "month" ? w("year") : o === "year" && w("duodecade");
1405
+ d === "month" ? p("year") : d === "year" && p("duodecade");
1371
1406
  return;
1372
1407
  }
1373
1408
  if (g) {
1374
- const b = Me[o];
1375
- t(g > 0 ? b.next(n) : b.prev(n));
1376
- } else V && t(V);
1377
- i && i();
1409
+ const k = Ce[d];
1410
+ t(g > 0 ? k.next(n) : k.prev(n));
1411
+ } else T && t(T);
1412
+ o && o();
1378
1413
  }, f = (m) => {
1379
- w("month"), c && c({ select: !0, value: m });
1380
- }, h = A(() => Me[o].component, [o]);
1381
- return /* @__PURE__ */ l(
1414
+ p("month"), c && c({ select: !0, value: m });
1415
+ }, x = E(() => Ce[d].component, [d]);
1416
+ return /* @__PURE__ */ r(
1382
1417
  "div",
1383
1418
  {
1384
- className: `wx-2Gr4AS wx-calendar ${s !== "normal" && s !== "both" ? "wx-part" : ""}`,
1385
- children: /* @__PURE__ */ $("div", { className: "wx-2Gr4AS wx-wrap", children: [
1386
- /* @__PURE__ */ l(dt, { date: n, part: s, type: o, onShift: x }),
1387
- /* @__PURE__ */ $("div", { children: [
1388
- /* @__PURE__ */ l(
1389
- h,
1419
+ className: `wx-2Gr4AS wx-calendar ${s !== "normal" && s !== "both" ? "wx-part" : ""} ${a}`,
1420
+ children: /* @__PURE__ */ C("div", { className: "wx-2Gr4AS wx-wrap", children: [
1421
+ /* @__PURE__ */ r(mt, { date: n, part: s, type: d, onShift: N }),
1422
+ /* @__PURE__ */ C("div", { children: [
1423
+ /* @__PURE__ */ r(
1424
+ x,
1390
1425
  {
1391
1426
  value: e,
1392
1427
  current: n,
1393
1428
  onCurrentChange: t,
1394
1429
  part: s,
1395
- markers: r,
1430
+ markers: l,
1396
1431
  onCancel: v,
1397
1432
  onChange: f,
1398
- onShift: x
1433
+ onShift: N
1399
1434
  }
1400
1435
  ),
1401
- o === "month" && d.length > 0 && /* @__PURE__ */ l("div", { className: "wx-2Gr4AS wx-buttons", children: d.map((m) => /* @__PURE__ */ l("div", { className: "wx-2Gr4AS wx-button-item", children: /* @__PURE__ */ l(
1402
- ke,
1436
+ d === "month" && w.length > 0 && /* @__PURE__ */ r("div", { className: "wx-2Gr4AS wx-buttons", children: w.map((m) => /* @__PURE__ */ r("div", { className: "wx-2Gr4AS wx-button-item", children: /* @__PURE__ */ r(
1437
+ be,
1403
1438
  {
1404
- onClick: (g) => p(g, yt(m)),
1405
- children: a(m)
1439
+ onClick: (g) => h(g, Tt(m)),
1440
+ children: u(m)
1406
1441
  }
1407
1442
  ) }, m)) })
1408
1443
  ] })
@@ -1410,320 +1445,316 @@ function de({
1410
1445
  }
1411
1446
  );
1412
1447
  }
1413
- function he(e) {
1414
- let { words: n = null, optional: t = !1, children: s } = e, r = K(q);
1415
- const u = A(() => {
1416
- let i = r;
1417
- return (!i || !i.extend) && (i = Ae(We)), n !== null && (i = i.extend(n, t)), i;
1418
- }, [n, t, r]);
1419
- return /* @__PURE__ */ l(q.Provider, { value: u, children: s });
1448
+ function ve(e) {
1449
+ let { words: n = null, optional: t = !1, children: s } = e, l = X(K);
1450
+ const i = E(() => {
1451
+ let a = l;
1452
+ return (!a || !a.extend) && (a = je(_e)), n !== null && (a = a.extend(n, t)), a;
1453
+ }, [n, t, l]);
1454
+ return /* @__PURE__ */ r(K.Provider, { value: i, children: s });
1420
1455
  }
1421
- function Ie(e, n, t, s) {
1456
+ function Le(e, n, t, s) {
1422
1457
  if (!e || s) {
1423
- const r = n ? new Date(n) : /* @__PURE__ */ new Date();
1424
- r.setDate(1), t(r);
1458
+ const l = n ? new Date(n) : /* @__PURE__ */ new Date();
1459
+ l.setDate(1), t(l);
1425
1460
  } else if (e.getDate() !== 1) {
1426
- const r = new Date(e);
1427
- r.setDate(1), t(r);
1461
+ const l = new Date(e);
1462
+ l.setDate(1), t(l);
1428
1463
  }
1429
1464
  }
1430
- const bt = ["clear", "today"];
1431
- function Dt({
1465
+ const Vt = ["clear", "today"];
1466
+ function Rt({
1432
1467
  value: e,
1433
1468
  current: n,
1434
1469
  markers: t = null,
1435
- buttons: s = bt,
1436
- onChange: r
1470
+ buttons: s = Vt,
1471
+ css: l = "",
1472
+ onChange: i
1437
1473
  }) {
1438
- const [u, i] = J(e), [c, a] = J(n);
1439
- E(() => {
1440
- Ie(c, u, a, !1);
1441
- }, [u, c]);
1442
- const o = D(
1443
- (d) => {
1444
- const p = d.value;
1445
- p ? (i(new Date(p)), Ie(c, new Date(p), a, !0)) : i(null), r && r({ value: p ? new Date(p) : null });
1474
+ const [a, o] = U(e), [c, u] = U(n);
1475
+ J(() => {
1476
+ Le(c, a, u, !1);
1477
+ }, [a, c]);
1478
+ const d = V(
1479
+ (w) => {
1480
+ const h = w.value;
1481
+ h ? (o(new Date(h)), Le(c, new Date(h), u, !0)) : o(null), i && i({ value: h ? new Date(h) : null });
1446
1482
  },
1447
- [r, c]
1448
- ), w = D(
1449
- (d) => {
1450
- a(d);
1483
+ [i, c]
1484
+ ), p = V(
1485
+ (w) => {
1486
+ u(w);
1451
1487
  },
1452
- [a]
1488
+ [u]
1453
1489
  );
1454
- return c ? /* @__PURE__ */ l(he, { children: /* @__PURE__ */ l(
1490
+ return c ? /* @__PURE__ */ r(ve, { children: /* @__PURE__ */ r(
1455
1491
  de,
1456
1492
  {
1457
- value: u,
1493
+ value: a,
1458
1494
  current: c,
1459
1495
  markers: t,
1460
1496
  buttons: s,
1461
- onChange: o,
1462
- onCurrentChange: w
1497
+ css: l,
1498
+ onChange: d,
1499
+ onCurrentChange: p
1463
1500
  }
1464
1501
  ) }) : null;
1465
1502
  }
1466
- function ye(e) {
1503
+ function De(e) {
1467
1504
  return e || (e = {}), e.width || (e.width = "unset"), e;
1468
1505
  }
1469
- const Vt = ["clear", "today"];
1470
- function zt({
1506
+ const Mt = ["clear", "today"];
1507
+ function rn({
1471
1508
  value: e,
1472
1509
  id: n,
1473
1510
  disabled: t = !1,
1474
1511
  error: s = !1,
1475
- placeholder: r = "",
1476
- format: u = "",
1477
- buttons: i = Vt,
1478
- css: c = "",
1479
- title: a = "",
1480
- editable: o = !1,
1481
- clear: w = !1,
1482
- onChange: d,
1483
- dropdown: p = {}
1512
+ placeholder: l = "",
1513
+ format: i = "",
1514
+ buttons: a = Mt,
1515
+ css: o = "",
1516
+ title: c = "",
1517
+ tooltip: u,
1518
+ editable: d = !1,
1519
+ clear: p = !1,
1520
+ onChange: w,
1521
+ dropdown: h = {}
1484
1522
  }) {
1485
- const { calendar: v, formats: x } = (K(q) || X()).getRaw(), f = u || x?.dateFormat;
1486
- let h = typeof f == "function" ? f : ne(f, v);
1487
- const [m, g] = B(e), [V, b] = B(!1);
1488
- E(() => {
1523
+ const { calendar: v, formats: N } = (X(K) || ne()).getRaw(), f = i || N?.dateFormat;
1524
+ let x = typeof f == "function" ? f : re(f, v);
1525
+ const [m, g] = O(e), [T, k] = O(!1);
1526
+ J(() => {
1489
1527
  g(e);
1490
1528
  }, [e]);
1491
- function y() {
1492
- b(!1);
1529
+ function b() {
1530
+ k(!1);
1493
1531
  }
1494
- function N(R) {
1495
- const F = R === m || R && m && R.valueOf() === m.valueOf() || !R && !m;
1496
- g(R), F || d && d({ value: R }), setTimeout(y, 1);
1532
+ function y(R) {
1533
+ const Y = R === m || R && m && R.valueOf() === m.valueOf() || !R && !m;
1534
+ g(R), Y || w && w({ value: R }), setTimeout(b, 1);
1497
1535
  }
1498
- const M = A(
1499
- () => m ? h(m) : "",
1500
- [m, h]
1536
+ const A = E(
1537
+ () => m ? x(m) : "",
1538
+ [m, x]
1501
1539
  );
1502
- function T({ value: R, input: F }) {
1503
- if (!o && !w || F) return;
1504
- let j = typeof o == "function" ? o(R) : R ? new Date(R) : null;
1505
- j = isNaN(j) ? m || null : j || null, N(j);
1540
+ function P({ value: R, input: Y }) {
1541
+ if (!d && !p || Y) return;
1542
+ let G = typeof d == "function" ? d(R) : R ? new Date(R) : null;
1543
+ G = isNaN(G) ? m || null : G || null, y(G);
1506
1544
  }
1507
- return E(() => {
1508
- const R = y;
1545
+ return J(() => {
1546
+ const R = b;
1509
1547
  return window.addEventListener("scroll", R), () => window.removeEventListener("scroll", R);
1510
- }, []), /* @__PURE__ */ $("div", { className: "wx-1lKOFG wx-datepicker", onClick: () => b(!0), children: [
1511
- /* @__PURE__ */ l(
1512
- Ne,
1548
+ }, []), /* @__PURE__ */ C("div", { className: "wx-1lKOFG wx-datepicker", onClick: () => k(!0), children: [
1549
+ /* @__PURE__ */ r(
1550
+ ye,
1513
1551
  {
1514
- css: c,
1515
- title: a,
1516
- value: M,
1552
+ css: `wx-date-input ${o}`,
1553
+ title: c,
1554
+ tooltip: u,
1555
+ value: A,
1517
1556
  id: n,
1518
- readonly: !o,
1557
+ readonly: !d,
1519
1558
  disabled: t,
1520
1559
  error: s,
1521
- placeholder: r,
1522
- onInput: y,
1523
- onChange: T,
1560
+ placeholder: l,
1561
+ onInput: b,
1562
+ onChange: P,
1524
1563
  icon: "wxi-calendar",
1525
- inputStyle: {
1526
- cursor: "pointer",
1527
- width: "100%",
1528
- paddingRight: "calc(var(--wx-input-icon-size) + var(--wx-input-icon-indent) * 2)"
1529
- },
1530
- clear: w
1564
+ clear: p
1531
1565
  }
1532
1566
  ),
1533
- V && !t && /* @__PURE__ */ l(
1534
- le,
1567
+ T && !t && /* @__PURE__ */ r(
1568
+ se,
1535
1569
  {
1536
- onCancel: y,
1537
- ...ye(p),
1538
- children: /* @__PURE__ */ l(
1539
- Dt,
1570
+ onCancel: b,
1571
+ ...De(h),
1572
+ children: /* @__PURE__ */ r(
1573
+ Rt,
1540
1574
  {
1541
- buttons: i,
1575
+ buttons: a,
1542
1576
  value: m,
1543
- onChange: (R) => N(R.value)
1577
+ onChange: (R) => y(R.value)
1544
1578
  }
1545
1579
  )
1546
1580
  }
1547
1581
  )
1548
1582
  ] });
1549
1583
  }
1550
- const Rt = ["clear", "today"], Tt = ({
1584
+ const It = ["clear", "today"], me = (e, n, t) => {
1585
+ const s = new Date(e);
1586
+ return s.setMonth(s.getMonth() + n), s;
1587
+ }, Se = (e, n) => {
1588
+ const t = new Date(e || n || /* @__PURE__ */ new Date());
1589
+ return t.setDate(1), t;
1590
+ }, Ct = ({
1551
1591
  start: e,
1552
1592
  end: n,
1553
1593
  current: t,
1554
1594
  months: s = 2,
1555
- markers: r = null,
1556
- buttons: u = Rt,
1557
- onChange: i
1595
+ markers: l = null,
1596
+ buttons: i = It,
1597
+ css: a = "",
1598
+ onChange: o
1558
1599
  }) => {
1559
- const [c, a] = J(e), [o, w] = J(n), [d, p] = B(), [v, x] = B(), f = D((y, N, M) => {
1560
- const T = new Date(y);
1561
- return T.setMonth(T.getMonth() + N), M && T.valueOf() === M.valueOf() ? M : T;
1562
- }, []), h = D(
1563
- (y) => {
1564
- p(() => {
1565
- const N = new Date(y);
1566
- return N.setDate(1), x(f(N, 1)), N;
1567
- });
1568
- },
1569
- [f]
1570
- ), m = D(
1571
- (y) => {
1572
- x(() => {
1573
- const N = new Date(y);
1574
- return N.setDate(1), p(f(N, -1)), N;
1575
- });
1576
- },
1577
- [f]
1578
- );
1579
- E(() => {
1580
- const y = c;
1581
- d || h(y ? new Date(y) : t || /* @__PURE__ */ new Date());
1582
- }, [c, t, d, h]);
1583
- const g = D(
1584
- (y) => {
1585
- const N = y.value;
1586
- let M = c, T = o;
1587
- const R = N === -1;
1588
- return R || (y.select ? !c || o ? (a(M = N), w(T = null)) : c > N ? (w(T = c), a(M = N)) : w(T = N) : N ? (a(M = new Date(N)), w(T = new Date(N))) : (a(M = null), w(T = null))), (R || !u.includes("done")) && i && i({ start: M, end: T }), [M, T];
1600
+ const [c, u] = U(e), [d, p] = U(n), [w, h] = O(() => Se(c, t)), [v, N] = O(
1601
+ () => me(Se(c, t), 1)
1602
+ ), f = V((k) => {
1603
+ h(() => {
1604
+ const b = new Date(k);
1605
+ return b.setDate(1), N(me(b, 1)), b;
1606
+ });
1607
+ }, []), x = V((k) => {
1608
+ N(() => {
1609
+ const b = new Date(k);
1610
+ return b.setDate(1), h(me(b, -1)), b;
1611
+ });
1612
+ }, []);
1613
+ J(() => {
1614
+ f(c ? new Date(c) : t || /* @__PURE__ */ new Date());
1615
+ }, [c, t, f]);
1616
+ const m = V(
1617
+ (k) => {
1618
+ const b = k.value;
1619
+ let y = c, A = d;
1620
+ const P = b === -1;
1621
+ return P || (k.select ? !c || d ? (u(y = b), p(A = null)) : c > b ? (p(A = c), u(y = b)) : p(A = b) : b ? (u(y = new Date(b)), p(A = new Date(b))) : (u(y = null), p(A = null))), (P || !i.includes("done")) && o && o({ start: y, end: A }), [y, A];
1589
1622
  },
1590
- [c, o, u, i]
1591
- ), V = D(
1592
- (y) => {
1593
- const [N] = g(y);
1594
- N && h(new Date(N));
1623
+ [c, d, i, o]
1624
+ ), g = V(
1625
+ (k) => {
1626
+ const [b] = m(k);
1627
+ b && f(new Date(b));
1595
1628
  },
1596
- [h, c, o]
1597
- ), b = D(
1598
- (y) => {
1599
- const [, N] = g(y);
1600
- N && m(new Date(N));
1629
+ [f, c, d]
1630
+ ), T = V(
1631
+ (k) => {
1632
+ const [, b] = m(k);
1633
+ b && x(new Date(b));
1601
1634
  },
1602
- [m, c, o]
1635
+ [x, c, d]
1603
1636
  );
1604
- return !d || !v ? null : s === 1 ? /* @__PURE__ */ l(he, { children: /* @__PURE__ */ l(
1637
+ return s === 1 ? /* @__PURE__ */ r(ve, { children: /* @__PURE__ */ r(
1605
1638
  de,
1606
1639
  {
1607
- value: { start: c, end: o },
1608
- current: d,
1609
- markers: r,
1610
- buttons: u,
1640
+ value: { start: c, end: d },
1641
+ current: w,
1642
+ markers: l,
1643
+ buttons: i,
1644
+ css: a,
1611
1645
  part: "both",
1612
- onChange: V,
1613
- onCurrentChange: h
1646
+ onChange: g,
1647
+ onCurrentChange: f
1614
1648
  }
1615
- ) }) : /* @__PURE__ */ l(he, { children: /* @__PURE__ */ $("div", { className: "wx-p2jCaW wx-rangecalendar", children: [
1616
- /* @__PURE__ */ l("div", { className: "wx-p2jCaW wx-half", children: /* @__PURE__ */ l(
1649
+ ) }) : /* @__PURE__ */ r(ve, { children: /* @__PURE__ */ C("div", { className: `wx-p2jCaW wx-rangecalendar ${a}`, children: [
1650
+ /* @__PURE__ */ r("div", { className: "wx-p2jCaW wx-half", children: /* @__PURE__ */ r(
1617
1651
  de,
1618
1652
  {
1619
- value: { start: c, end: o },
1620
- current: d,
1621
- markers: r,
1653
+ value: { start: c, end: d },
1654
+ current: w,
1655
+ markers: l,
1622
1656
  buttons: !1,
1623
1657
  part: "left",
1624
- onChange: V,
1625
- onCurrentChange: h
1658
+ onChange: g,
1659
+ onCurrentChange: f
1626
1660
  }
1627
1661
  ) }),
1628
- /* @__PURE__ */ l("div", { className: "wx-p2jCaW wx-half", children: /* @__PURE__ */ l(
1662
+ /* @__PURE__ */ r("div", { className: "wx-p2jCaW wx-half", children: /* @__PURE__ */ r(
1629
1663
  de,
1630
1664
  {
1631
- value: { start: c, end: o },
1665
+ value: { start: c, end: d },
1632
1666
  current: v,
1633
- markers: r,
1634
- buttons: u,
1667
+ markers: l,
1668
+ buttons: i,
1635
1669
  part: "right",
1636
- onChange: b,
1637
- onCurrentChange: m
1670
+ onChange: T,
1671
+ onCurrentChange: x
1638
1672
  }
1639
1673
  ) })
1640
1674
  ] }) });
1641
- }, $t = ["clear", "today"], Xt = ({
1675
+ }, Lt = ["clear", "today"], ln = ({
1642
1676
  value: e,
1643
1677
  onChange: n,
1644
1678
  id: t,
1645
1679
  disabled: s = !1,
1646
- error: r = !1,
1647
- placeholder: u = "",
1648
- css: i = "",
1649
- title: c = "",
1650
- format: a = "",
1651
- months: o = 2,
1652
- buttons: w = $t,
1653
- editable: d = !1,
1654
- clear: p = !1,
1680
+ error: l = !1,
1681
+ placeholder: i = "",
1682
+ css: a = "",
1683
+ title: o = "",
1684
+ tooltip: c,
1685
+ format: u = "",
1686
+ months: d = 2,
1687
+ buttons: p = Lt,
1688
+ editable: w = !1,
1689
+ clear: h = !1,
1655
1690
  dropdown: v
1656
1691
  }) => {
1657
- const [x, f] = J(e), { calendar: h, formats: m } = (K(q) || X()).getRaw(), g = a || m?.dateFormat, V = typeof g == "function" ? g : ne(g, h), [b, y] = B(!1), N = D(() => {
1658
- y(!1);
1659
- }, []), M = A(() => x ? x.start ? V(x.start) + (x.end ? ` - ${V(x.end)}` : "") : V(x) : "", [x, V]), T = A(() => x && x.start || null, [x]), R = A(() => x && x.end || null, [x]), F = D(
1660
- (H) => {
1661
- const L = H.start || H.end ? { start: H.start, end: H.end } : null;
1662
- f && f(L), (H.start && H.end || !H.start && !H.end) && (n && n({ value: L }), setTimeout(N, 1));
1692
+ const [N, f] = U(e), { calendar: x, formats: m } = (X(K) || ne()).getRaw(), g = u || m?.dateFormat, T = typeof g == "function" ? g : re(g, x), [k, b] = O(!1), y = V(() => {
1693
+ b(!1);
1694
+ }, []), A = E(() => N ? N.start ? T(N.start) + (N.end ? ` - ${T(N.end)}` : "") : T(N) : "", [N, T]), P = E(() => N && N.start || null, [N]), R = E(() => N && N.end || null, [N]), Y = V(
1695
+ (W) => {
1696
+ const L = W.start || W.end ? { start: W.start, end: W.end } : null;
1697
+ f && f(L), (W.start && W.end || !W.start && !W.end) && (n && n({ value: L }), setTimeout(y, 1));
1663
1698
  },
1664
- [n, N, f]
1665
- ), j = D(
1666
- (H) => {
1667
- if (!d && !p) return;
1668
- const { value: L, input: P } = H;
1669
- if (P) return;
1670
- const [S, O] = L.split(" -").map((U, Y) => {
1671
- const I = U.trim();
1672
- let G = typeof d == "function" ? d(I) : I ? new Date(I) : null, Q = Y === 0 ? T : R;
1673
- return isNaN(G) ? Q || null : G || null;
1699
+ [n, y, f]
1700
+ ), G = V(
1701
+ (W) => {
1702
+ if (!w && !h) return;
1703
+ const { value: L, input: B } = W;
1704
+ if (B) return;
1705
+ const [_, Z] = L.split(" -").map((F, j) => {
1706
+ const I = F.trim();
1707
+ let $ = typeof w == "function" ? w(I) : I ? new Date(I) : null, M = j === 0 ? P : R;
1708
+ return isNaN($) ? M || null : $ || null;
1674
1709
  });
1675
- F({ start: S, end: O });
1710
+ Y({ start: _, end: Z });
1676
1711
  },
1677
- [d, p, T, R, F]
1712
+ [w, h, P, R, Y]
1678
1713
  );
1679
- return E(() => {
1680
- const H = () => {
1681
- N();
1714
+ return J(() => {
1715
+ const W = () => {
1716
+ y();
1682
1717
  };
1683
- return window.addEventListener("scroll", H), () => {
1684
- window.removeEventListener("scroll", H);
1718
+ return window.addEventListener("scroll", W), () => {
1719
+ window.removeEventListener("scroll", W);
1685
1720
  };
1686
- }, [N]), /* @__PURE__ */ $(
1721
+ }, [y]), /* @__PURE__ */ C(
1687
1722
  "div",
1688
1723
  {
1689
- className: `wx-1b0WDQ wx-daterangepicker ${s ? "wx-disabled" : ""} ${r ? "wx-error" : ""}`,
1690
- onClick: () => y(!0),
1724
+ className: `wx-1b0WDQ wx-daterangepicker ${s ? "wx-disabled" : ""} ${l ? "wx-error" : ""}`,
1725
+ onClick: () => b(!0),
1691
1726
  children: [
1692
- /* @__PURE__ */ l(
1693
- Ne,
1727
+ /* @__PURE__ */ r(
1728
+ ye,
1694
1729
  {
1695
- css: i,
1696
- title: c,
1697
- value: M,
1730
+ css: `wx-date-input ${a}`,
1731
+ title: o,
1732
+ tooltip: c,
1733
+ value: A,
1698
1734
  id: t,
1699
- readonly: !d,
1735
+ readonly: !w,
1700
1736
  disabled: s,
1701
- placeholder: u,
1702
- error: r,
1703
- onChange: j,
1737
+ placeholder: i,
1738
+ error: l,
1739
+ onChange: G,
1704
1740
  icon: "wxi-calendar",
1705
- inputStyle: {
1706
- cursor: "pointer",
1707
- width: "100%",
1708
- paddingRight: "calc(var(--wx-input-icon-size) + var(--wx-input-icon-indent) * 2)"
1709
- },
1710
- clear: p
1741
+ clear: h
1711
1742
  }
1712
1743
  ),
1713
- b && !s && /* @__PURE__ */ l(
1714
- le,
1744
+ k && !s && /* @__PURE__ */ r(
1745
+ se,
1715
1746
  {
1716
- onCancel: N,
1717
- ...ye(v),
1718
- children: /* @__PURE__ */ l(
1719
- Tt,
1747
+ onCancel: y,
1748
+ ...De(v),
1749
+ children: /* @__PURE__ */ r(
1750
+ Ct,
1720
1751
  {
1721
- onCancel: N,
1722
- buttons: w,
1723
- start: T,
1752
+ onCancel: y,
1753
+ buttons: p,
1754
+ start: P,
1724
1755
  end: R,
1725
- months: o,
1726
- onChange: F
1756
+ months: d,
1757
+ onChange: Y
1727
1758
  }
1728
1759
  )
1729
1760
  }
@@ -1732,583 +1763,620 @@ const Rt = ["clear", "today"], Tt = ({
1732
1763
  }
1733
1764
  );
1734
1765
  };
1735
- function en({
1766
+ function sn({
1736
1767
  hotkey: e = null,
1737
1768
  toggleButton: n,
1738
1769
  children: t
1739
1770
  }) {
1740
- const s = C(null), [r, u] = B(!1), i = A(
1741
- () => `wxi-${r ? "collapse" : "expand"}`,
1742
- [r]
1743
- ), c = C(null);
1744
- return c.current = () => {
1745
- const a = s.current;
1746
- !r && a ? a.requestFullscreen() : r && document.exitFullscreen(), u((o) => !o);
1747
- }, Ke({ [e]: () => c.current() }, s), E(() => {
1748
- const a = () => {
1749
- u(document.fullscreenElement === s.current);
1771
+ const s = S(null), [l, i] = O(!1), a = E(
1772
+ () => `wxi-${l ? "collapse" : "expand"}`,
1773
+ [l]
1774
+ ), o = S(null);
1775
+ return o.current = () => {
1776
+ const c = s.current;
1777
+ !l && c ? c.requestFullscreen() : l && document.exitFullscreen(), i((u) => !u);
1778
+ }, rt({ [e]: () => o.current() }, s), J(() => {
1779
+ const c = () => {
1780
+ i(document.fullscreenElement === s.current);
1750
1781
  };
1751
- return document.addEventListener("fullscreenchange", a), () => {
1752
- document.removeEventListener("fullscreenchange", a);
1782
+ return document.addEventListener("fullscreenchange", c), () => {
1783
+ document.removeEventListener("fullscreenchange", c);
1753
1784
  };
1754
- }, []), /* @__PURE__ */ $("div", { className: "wx-13aa5W wx-fullscreen", ref: s, tabIndex: -1, children: [
1785
+ }, []), /* @__PURE__ */ C("div", { className: "wx-13aa5W wx-fullscreen", ref: s, tabIndex: -1, children: [
1755
1786
  t,
1756
- n ? n(c.current, r) : /* @__PURE__ */ l(re, { css: "wx-13aa5W wx-fullscreen-button", onClick: c.current, children: /* @__PURE__ */ l("i", { className: `wx-13aa5W ${i} wx-fullscreen-icon`, children: " " }) })
1787
+ n ? n(o.current, l) : /* @__PURE__ */ r(le, { css: "wx-13aa5W wx-fullscreen-button", onClick: o.current, children: /* @__PURE__ */ r("i", { className: `wx-13aa5W ${a} wx-fullscreen-icon`, children: " " }) })
1757
1788
  ] });
1758
1789
  }
1759
- function tn({ css: e = "", title: n = "", children: t, onClick: s }) {
1760
- return t ? /* @__PURE__ */ l(
1790
+ function cn({ css: e = "", title: n = "", tooltip: t, children: s, onClick: l }) {
1791
+ return s ? /* @__PURE__ */ r(
1761
1792
  "i",
1762
1793
  {
1763
1794
  title: n,
1764
1795
  role: "img",
1765
1796
  className: `wx-mdnST1 wx-icon ${e}`,
1766
- onClick: s,
1767
- children: t
1797
+ onClick: l,
1798
+ "data-tooltip-text": t,
1799
+ children: s
1768
1800
  }
1769
- ) : /* @__PURE__ */ l(
1801
+ ) : /* @__PURE__ */ r(
1770
1802
  "i",
1771
1803
  {
1772
1804
  title: n,
1773
1805
  className: `wx-mdnST1 wx-icon ${e}`,
1774
- onClick: s
1806
+ onClick: l,
1807
+ "data-tooltip-text": t
1775
1808
  }
1776
1809
  );
1777
1810
  }
1778
- const Mt = [];
1779
- function nn({
1811
+ const St = [];
1812
+ function on({
1780
1813
  id: e,
1781
- value: n = Mt,
1814
+ value: n = St,
1782
1815
  options: t = [],
1783
1816
  textOptions: s = null,
1784
- textField: r = "label",
1785
- placeholder: u = "",
1786
- title: i = "",
1787
- disabled: c = !1,
1788
- error: a = !1,
1789
- checkboxes: o = !1,
1790
- onChange: w,
1791
- children: d,
1792
- dropdown: p = {}
1817
+ textField: l = "label",
1818
+ keepText: i = !1,
1819
+ placeholder: a = "",
1820
+ title: o = "",
1821
+ tooltip: c,
1822
+ disabled: u = !1,
1823
+ error: d = !1,
1824
+ checkboxes: p = !1,
1825
+ css: w = "",
1826
+ onChange: h,
1827
+ children: v,
1828
+ dropdown: N = {}
1793
1829
  }) {
1794
- const v = z(e), x = C(null), f = C(null), [h, m] = J(n), [g, V] = B(""), [b, y] = B(!1), N = C(null), M = A(() => h ? (s || t).filter((S) => h.includes(S.id)) : [], [h, s, t]), T = A(() => {
1795
- const S = t;
1796
- return g ? S.filter((O) => O[r].toLowerCase().includes(g.toLowerCase())) : S;
1797
- }, [g, t, r]), R = D((S) => {
1798
- x.current = S.navigate, f.current = S.keydown;
1799
- }, []), F = D(() => {
1800
- T.length ? x.current(0) : x.current(null);
1801
- }, [T]), j = D(
1802
- (S) => {
1803
- const { id: O } = S;
1804
- O && (m(O), w && w({ value: O }), N.current.focus());
1830
+ const f = te(e), x = S(null), m = S(null), [g, T] = U(n), [k, b] = O(""), [y, A] = O(!1), P = S(null), R = E(() => g ? (s || t).filter((F) => g.includes(F.id)) : [], [g, s, t]), Y = E(() => {
1831
+ const F = t;
1832
+ return k ? F.filter((j) => j[l].toLowerCase().includes(k.toLowerCase())) : F;
1833
+ }, [k, t, l]), G = V((F) => {
1834
+ x.current = F.navigate, m.current = F.keydown;
1835
+ }, []), W = V(() => {
1836
+ Y.length ? x.current(0) : x.current(null);
1837
+ }, [Y]), L = V(
1838
+ (F) => {
1839
+ const { id: j } = F;
1840
+ j && (T(j), i || b(""), h && h({ value: j }), P.current.focus());
1805
1841
  },
1806
- [w]
1807
- ), H = D(
1808
- (S, O) => {
1809
- O && O.stopPropagation();
1810
- const U = h.filter((Y) => Y !== S);
1811
- m(U), w && w({ value: U });
1842
+ [h, i]
1843
+ ), B = V(
1844
+ (F, j) => {
1845
+ j && j.stopPropagation();
1846
+ const I = g.filter(($) => $ !== F);
1847
+ T(I), h && h({ value: I });
1812
1848
  },
1813
- [h, w]
1814
- ), L = D(
1815
- () => h && h.length ? T.findIndex((S) => S.id === h[0]) : 0,
1816
- [h, T]
1817
- ), P = D(() => {
1818
- c || (N.current.focus(), x.current(L()));
1819
- }, [c, L]);
1820
- return /* @__PURE__ */ $(
1849
+ [g, h]
1850
+ ), _ = V(
1851
+ () => g && g.length ? Y.findIndex((F) => F.id === g[0]) : 0,
1852
+ [g, Y]
1853
+ ), Z = V(() => {
1854
+ u || (P.current.focus(), x.current(_()));
1855
+ }, [u, _]);
1856
+ return /* @__PURE__ */ C(
1821
1857
  "div",
1822
1858
  {
1823
- title: i,
1824
- className: `wx-12Wj21 wx-multicombo ${a ? "wx-error" : ""} ${c ? "wx-disabled" : ""} ${M.length ? "wx-not-empty" : ""} ${b && !c ? "wx-focus" : ""}`,
1825
- onClick: P,
1826
- onKeyDown: (S) => f.current(S, L()),
1859
+ title: o,
1860
+ className: `wx-12Wj21 wx-multicombo ${w} ${d ? "wx-error" : ""} ${u ? "wx-disabled" : ""} ${R.length ? "wx-not-empty" : ""} ${y && !u ? "wx-focus" : ""}`,
1861
+ onClick: Z,
1862
+ onKeyDown: (F) => m.current(F, _()),
1863
+ "data-tooltip-text": c,
1827
1864
  children: [
1828
- /* @__PURE__ */ $("div", { className: "wx-12Wj21 wx-wrapper", children: [
1829
- /* @__PURE__ */ l("div", { className: "wx-12Wj21 wx-tags", children: M.map((S) => /* @__PURE__ */ $("div", { className: "wx-12Wj21 wx-tag", children: [
1830
- d ? ae(d, { option: S }) : S[r],
1831
- !c && /* @__PURE__ */ l(
1865
+ /* @__PURE__ */ C("div", { className: "wx-12Wj21 wx-wrapper", children: [
1866
+ /* @__PURE__ */ r("div", { className: "wx-12Wj21 wx-tags", children: R.map((F) => /* @__PURE__ */ C("div", { className: "wx-12Wj21 wx-tag", children: [
1867
+ v ? oe(v, { option: F }) : F[l],
1868
+ !u && /* @__PURE__ */ r(
1832
1869
  "i",
1833
1870
  {
1834
1871
  className: "wx-12Wj21 wx-icon wxi-close",
1835
- onClick: (O) => H(S.id, O)
1872
+ onClick: (j) => B(F.id, j)
1836
1873
  }
1837
1874
  )
1838
- ] }, S.id)) }),
1839
- /* @__PURE__ */ $("div", { className: "wx-12Wj21 wx-select", children: [
1840
- /* @__PURE__ */ l(
1875
+ ] }, F.id)) }),
1876
+ /* @__PURE__ */ C("div", { className: "wx-12Wj21 wx-select", children: [
1877
+ /* @__PURE__ */ r(
1841
1878
  "input",
1842
1879
  {
1843
1880
  className: "wx-12Wj21 wx-input",
1844
- id: v,
1881
+ id: f,
1845
1882
  type: "text",
1846
- value: g,
1847
- onChange: (S) => V(S.target.value),
1848
- onInput: F,
1849
- placeholder: u,
1850
- disabled: c,
1851
- onFocus: () => y(!0),
1852
- onBlur: () => y(!1),
1853
- ref: N
1883
+ value: k,
1884
+ onChange: (F) => b(F.target.value),
1885
+ onInput: W,
1886
+ placeholder: a,
1887
+ disabled: u,
1888
+ onFocus: () => A(!0),
1889
+ onBlur: () => A(!1),
1890
+ ref: P
1854
1891
  }
1855
1892
  ),
1856
- /* @__PURE__ */ l("i", { className: "wx-12Wj21 wx-icon wxi-angle-down" })
1893
+ /* @__PURE__ */ r("i", { className: "wx-12Wj21 wx-icon wxi-angle-down" })
1857
1894
  ] })
1858
1895
  ] }),
1859
- !c && /* @__PURE__ */ l(
1860
- ge,
1896
+ !u && /* @__PURE__ */ r(
1897
+ ke,
1861
1898
  {
1862
- items: T,
1899
+ items: Y,
1863
1900
  multiselect: !0,
1864
- onReady: R,
1865
- onSelect: j,
1866
- checkboxes: o,
1867
- value: h,
1868
- ...p,
1869
- children: ({ option: S }) => /* @__PURE__ */ l(_, { children: d ? ae(d, { option: S }) : S[r] })
1901
+ onReady: G,
1902
+ onSelect: L,
1903
+ checkboxes: p,
1904
+ value: g,
1905
+ ...N,
1906
+ children: ({ option: F }) => /* @__PURE__ */ r(Q, { children: v ? oe(v, { option: F }) : F[l] })
1870
1907
  }
1871
1908
  )
1872
1909
  ]
1873
1910
  }
1874
1911
  );
1875
1912
  }
1876
- const rn = ({
1913
+ const an = ({
1877
1914
  total: e = 0,
1878
1915
  pageSize: n = 20,
1879
1916
  value: t = 1,
1880
- onChange: s
1917
+ css: s = "",
1918
+ onChange: l
1881
1919
  }) => {
1882
- const [r, u] = J(n), [i, c] = J(t), a = (K(q) || X()).getGroup("core"), o = Math.ceil(e / r), w = (i - 1) * r, d = Math.min(i * r, e), p = (f, h) => {
1883
- Number.isNaN(f) || (h || c(f), f = Math.max(1, Math.min(f, o)), h && c(f), f !== i && setTimeout(() => {
1884
- s && s({
1920
+ const [i, a] = U(n), [o, c] = U(t), u = (X(K) || ne()).getGroup("core"), d = Math.ceil(e / i), p = (o - 1) * i, w = Math.min(o * i, e), h = (f, x) => {
1921
+ Number.isNaN(f) || (x || c(f), f = Math.max(1, Math.min(f, d)), x && c(f), f !== o && setTimeout(() => {
1922
+ l && l({
1885
1923
  value: f,
1886
- from: (f - 1) * r,
1887
- to: Math.min(f * r, e),
1888
- pageSize: r
1924
+ from: (f - 1) * i,
1925
+ to: Math.min(f * i, e),
1926
+ pageSize: i
1889
1927
  });
1890
1928
  }));
1891
1929
  };
1892
1930
  function v(f) {
1893
1931
  switch (f) {
1894
1932
  case "first":
1895
- p(1);
1933
+ h(1);
1896
1934
  break;
1897
1935
  case "prev":
1898
- p(i - 1);
1936
+ h(o - 1);
1899
1937
  break;
1900
1938
  case "next":
1901
- p(i + 1);
1939
+ h(o + 1);
1902
1940
  break;
1903
1941
  case "last":
1904
- p(o);
1942
+ h(d);
1905
1943
  break;
1906
1944
  }
1907
1945
  }
1908
- const x = (f) => {
1909
- const h = f.target.value * 1;
1910
- Number.isNaN(h) || (u(h), s && s({ value: i, from: w, to: d, pageSize: h }));
1946
+ const N = (f) => {
1947
+ const x = f.target.value * 1;
1948
+ Number.isNaN(x) || (a(x), l && l({ value: o, from: p, to: w, pageSize: x }));
1911
1949
  };
1912
- return /* @__PURE__ */ $("div", { className: "wx-35Np0p wx-pager", children: [
1913
- /* @__PURE__ */ $("div", { className: "wx-35Np0p wx-left", children: [
1914
- /* @__PURE__ */ $("span", { children: [
1915
- a("Rows per page"),
1950
+ return /* @__PURE__ */ C("div", { className: `wx-35Np0p wx-pager ${s}`, children: [
1951
+ /* @__PURE__ */ C("div", { className: "wx-35Np0p wx-left", children: [
1952
+ /* @__PURE__ */ C("span", { children: [
1953
+ u("Rows per page"),
1916
1954
  ": "
1917
1955
  ] }),
1918
- /* @__PURE__ */ l(
1956
+ /* @__PURE__ */ r(
1919
1957
  "input",
1920
1958
  {
1921
1959
  type: "number",
1922
1960
  min: 1,
1923
1961
  className: "wx-35Np0p wx-input",
1924
- value: r,
1925
- onChange: x
1962
+ value: i,
1963
+ onChange: N
1926
1964
  }
1927
1965
  )
1928
1966
  ] }),
1929
- /* @__PURE__ */ $("div", { className: "wx-35Np0p wx-center", children: [
1930
- /* @__PURE__ */ l(
1967
+ /* @__PURE__ */ C("div", { className: "wx-35Np0p wx-center", children: [
1968
+ /* @__PURE__ */ r(
1931
1969
  "i",
1932
1970
  {
1933
- className: "wx-35Np0p wx-icon wxi-angle-dbl-left" + (i === 1 ? " wx-disabled" : ""),
1971
+ className: "wx-35Np0p wx-icon wxi-angle-dbl-left" + (o === 1 ? " wx-disabled" : ""),
1934
1972
  onClick: () => v("first")
1935
1973
  }
1936
1974
  ),
1937
- /* @__PURE__ */ l(
1975
+ /* @__PURE__ */ r(
1938
1976
  "i",
1939
1977
  {
1940
- className: "wx-35Np0p wx-icon wxi-angle-left" + (i === 1 ? " wx-disabled" : ""),
1978
+ className: "wx-35Np0p wx-icon wxi-angle-left" + (o === 1 ? " wx-disabled" : ""),
1941
1979
  onClick: () => v("prev")
1942
1980
  }
1943
1981
  ),
1944
- /* @__PURE__ */ l(
1982
+ /* @__PURE__ */ r(
1945
1983
  "input",
1946
1984
  {
1947
1985
  type: "text",
1948
- value: i,
1986
+ value: o,
1949
1987
  className: "wx-35Np0p wx-input",
1950
- onChange: (f) => p(f.target.value * 1),
1951
- onBlur: (f) => p(f.target.value * 1, !0)
1988
+ onChange: (f) => h(f.target.value * 1),
1989
+ onBlur: (f) => h(f.target.value * 1, !0)
1952
1990
  }
1953
1991
  ),
1954
- /* @__PURE__ */ l(
1992
+ /* @__PURE__ */ r(
1955
1993
  "i",
1956
1994
  {
1957
- className: "wx-35Np0p wx-icon wxi-angle-right" + (i === o ? " wx-disabled" : ""),
1995
+ className: "wx-35Np0p wx-icon wxi-angle-right" + (o === d ? " wx-disabled" : ""),
1958
1996
  onClick: () => v("next")
1959
1997
  }
1960
1998
  ),
1961
- /* @__PURE__ */ l(
1999
+ /* @__PURE__ */ r(
1962
2000
  "i",
1963
2001
  {
1964
- className: "wx-35Np0p wx-icon wxi-angle-dbl-right" + (i === o ? " wx-disabled" : ""),
2002
+ className: "wx-35Np0p wx-icon wxi-angle-dbl-right" + (o === d ? " wx-disabled" : ""),
1965
2003
  onClick: () => v("last")
1966
2004
  }
1967
2005
  )
1968
2006
  ] }),
1969
- /* @__PURE__ */ $("div", { className: "wx-35Np0p wx-right", children: [
1970
- a("Total pages"),
2007
+ /* @__PURE__ */ C("div", { className: "wx-35Np0p wx-right", children: [
2008
+ u("Total pages"),
1971
2009
  ": ",
1972
- o
2010
+ d
1973
2011
  ] })
1974
2012
  ] });
1975
2013
  };
1976
- function It({
2014
+ function Ft({
1977
2015
  id: e,
1978
2016
  label: n = "",
1979
2017
  value: t,
1980
2018
  name: s = "",
1981
- inputValue: r = "",
1982
- disabled: u = !1,
1983
- onChange: i
2019
+ inputValue: l = "",
2020
+ disabled: i = !1,
2021
+ css: a = "",
2022
+ onChange: o
1984
2023
  }) {
1985
- const c = _e(), a = z(e) || c, [o, w] = B(!1), d = t !== void 0, p = d ? t : o;
1986
- function v(x) {
1987
- const f = x.target.checked;
1988
- d || w(f), f && i && i({ value: !0, inputValue: r });
2024
+ const c = et(), u = te(e) || c, [d, p] = O(!1), w = t !== void 0, h = w ? t : d;
2025
+ function v(N) {
2026
+ const f = N.target.checked;
2027
+ w || p(f), f && o && o({ value: !0, inputValue: l });
1989
2028
  }
1990
- return /* @__PURE__ */ $("div", { className: "wx-3lDF1s wx-radio", children: [
1991
- /* @__PURE__ */ l(
2029
+ return /* @__PURE__ */ C("div", { className: `wx-3lDF1s wx-radio ${a}`, children: [
2030
+ /* @__PURE__ */ r(
1992
2031
  "input",
1993
2032
  {
1994
2033
  type: "radio",
1995
2034
  className: "wx-3lDF1s wx-input",
1996
- id: a,
1997
- disabled: u,
2035
+ id: u,
2036
+ disabled: i,
1998
2037
  name: s,
1999
- value: r,
2000
- checked: p,
2038
+ value: l,
2039
+ checked: h,
2001
2040
  onChange: v
2002
2041
  }
2003
2042
  ),
2004
- /* @__PURE__ */ $("label", { htmlFor: a, className: "wx-3lDF1s wx-label", children: [
2005
- /* @__PURE__ */ l("span", { className: "wx-3lDF1s wx-circle" }),
2006
- n && /* @__PURE__ */ l("span", { className: "wx-3lDF1s wx-radio-text", children: n })
2043
+ /* @__PURE__ */ C("label", { htmlFor: u, className: "wx-3lDF1s wx-label", children: [
2044
+ /* @__PURE__ */ r("span", { className: "wx-3lDF1s wx-circle" }),
2045
+ n && /* @__PURE__ */ r("span", { className: "wx-3lDF1s wx-radio-text", children: n })
2007
2046
  ] })
2008
2047
  ] });
2009
2048
  }
2010
- function ln({
2049
+ function un({
2011
2050
  options: e = [{}],
2012
2051
  value: n = "",
2013
2052
  onChange: t,
2014
- type: s = ""
2053
+ type: s = "",
2054
+ css: l = ""
2015
2055
  }) {
2016
- const r = oe(), [u, i] = B(n);
2017
- E(() => {
2018
- i(n);
2056
+ const i = ae(), [a, o] = O(n);
2057
+ J(() => {
2058
+ o(n);
2019
2059
  }, [n]);
2020
- function c(a) {
2021
- const o = a.inputValue;
2022
- i(o), t && t({ value: o });
2060
+ function c(u) {
2061
+ const d = u.inputValue;
2062
+ o(d), t && t({ value: d });
2023
2063
  }
2024
- return /* @__PURE__ */ l(ue.Provider, { value: null, children: /* @__PURE__ */ l("div", { className: `wx-38w70j wx-radiogroup ${s && `wx-${s}`}`, children: e.map((a) => /* @__PURE__ */ l("div", { className: "wx-38w70j wx-item", children: /* @__PURE__ */ l(
2025
- It,
2064
+ return /* @__PURE__ */ r(ue.Provider, { value: null, children: /* @__PURE__ */ r("div", { className: `wx-38w70j wx-radiogroup ${s && `wx-${s}`} ${l}`, children: e.map((u) => /* @__PURE__ */ r("div", { className: "wx-38w70j wx-item", children: /* @__PURE__ */ r(
2065
+ Ft,
2026
2066
  {
2027
- label: a.label,
2028
- inputValue: a.id,
2029
- value: u === a.id,
2030
- name: r,
2067
+ label: u.label,
2068
+ inputValue: u.id,
2069
+ value: a === u.id,
2070
+ name: i,
2031
2071
  onChange: c
2032
2072
  }
2033
- ) }, a.id)) }) });
2073
+ ) }, u.id)) }) });
2034
2074
  }
2035
- function cn({
2075
+ function dn({
2036
2076
  value: e = "",
2037
2077
  options: n = [],
2038
2078
  textOptions: t = null,
2039
2079
  placeholder: s = "",
2040
- disabled: r = !1,
2041
- error: u = !1,
2042
- title: i = "",
2080
+ disabled: l = !1,
2081
+ error: i = !1,
2082
+ title: a = "",
2083
+ tooltip: o,
2043
2084
  textField: c = "label",
2044
- clear: a = !1,
2045
- children: o,
2085
+ clear: u = !1,
2086
+ css: d = "",
2087
+ children: p,
2046
2088
  onChange: w,
2047
- dropdown: d = {}
2089
+ dropdown: h = {}
2048
2090
  }) {
2049
- const p = C(null), v = C(null);
2050
- let [x, f] = J(e);
2051
- function h(y) {
2052
- p.current = y.navigate, v.current = y.keydown;
2091
+ const v = S(null), N = S(null);
2092
+ let [f, x] = U(e);
2093
+ function m(y) {
2094
+ v.current = y.navigate, N.current = y.keydown;
2053
2095
  }
2054
- const m = A(() => x || x === 0 ? (t || n).find((y) => y.id === x) : null, [x, t, n]), g = D(
2096
+ const g = E(() => f || f === 0 ? (t || n).find((y) => y.id === f) : null, [f, t, n]), T = V(
2055
2097
  ({ id: y }) => {
2056
- (y || y === 0) && (f(y), p.current(null), w && w({ value: y }));
2098
+ (y || y === 0) && (x(y), v.current(null), w && w({ value: y }));
2057
2099
  },
2058
- [f, w]
2059
- ), V = D(
2100
+ [x, w]
2101
+ ), k = V(
2060
2102
  (y) => {
2061
- y.stopPropagation(), f(""), w && w({ value: "" });
2103
+ y.stopPropagation(), x(""), w && w({ value: "" });
2062
2104
  },
2063
- [f, w]
2064
- ), b = D(() => n.findIndex((y) => y.id === x), [n, x]);
2065
- return /* @__PURE__ */ $(
2105
+ [x, w]
2106
+ ), b = V(() => n.findIndex((y) => y.id === f), [n, f]);
2107
+ return /* @__PURE__ */ C(
2066
2108
  "div",
2067
2109
  {
2068
- className: `wx-2YgblL wx-richselect ${u ? "wx-2YgblL wx-error" : ""} ${r ? "wx-2YgblL wx-disabled" : ""} ${o ? "" : "wx-2YgblL wx-nowrap"}`,
2069
- title: i,
2070
- onClick: () => p.current(b()),
2071
- onKeyDown: (y) => v.current(y, b()),
2110
+ className: `wx-2YgblL wx-richselect ${d} ${i ? "wx-2YgblL wx-error" : ""} ${l ? "wx-2YgblL wx-disabled" : ""} ${p ? "" : "wx-2YgblL wx-nowrap"}`,
2111
+ title: a,
2112
+ onClick: () => v.current(b()),
2113
+ onKeyDown: (y) => N.current(y, b()),
2072
2114
  tabIndex: 0,
2115
+ "data-tooltip-text": o,
2073
2116
  children: [
2074
- /* @__PURE__ */ l("div", { className: "wx-2YgblL wx-label", children: m ? o ? o(m) : m[c] : s ? /* @__PURE__ */ l("span", { className: "wx-2YgblL wx-placeholder", children: s }) : " " }),
2075
- a && !r && x ? /* @__PURE__ */ l("i", { className: "wx-2YgblL wx-icon wxi-close", onClick: V }) : /* @__PURE__ */ l("i", { className: "wx-2YgblL wx-icon wxi-angle-down" }),
2076
- !r && /* @__PURE__ */ l(ge, { items: n, onReady: h, onSelect: g, ...d, children: ({ option: y }) => o ? o(y) : y[c] })
2117
+ /* @__PURE__ */ r("div", { className: "wx-2YgblL wx-label", children: g ? p ? p(g) : g[c] : s ? /* @__PURE__ */ r("span", { className: "wx-2YgblL wx-placeholder", children: s }) : " " }),
2118
+ u && !l && f ? /* @__PURE__ */ r("i", { className: "wx-2YgblL wx-icon wxi-close", onClick: k }) : /* @__PURE__ */ r("i", { className: "wx-2YgblL wx-icon wxi-angle-down" }),
2119
+ !l && /* @__PURE__ */ r(ke, { items: n, onReady: m, onSelect: T, ...h, children: ({ option: y }) => p ? p(y) : y[c] })
2077
2120
  ]
2078
2121
  }
2079
2122
  );
2080
2123
  }
2081
- const sn = ({
2124
+ const fn = ({
2082
2125
  options: e = [],
2083
2126
  value: n = "",
2084
2127
  css: t = "",
2085
2128
  children: s,
2086
- onChange: r
2129
+ onChange: l
2087
2130
  }) => {
2088
- const [u, i] = B(n), c = (a) => {
2089
- i(a), r && r({ value: a });
2131
+ const [i, a] = O(n), o = (c) => {
2132
+ a(c), l && l({ value: c });
2090
2133
  };
2091
- return E(() => {
2092
- i(n);
2093
- }, [n]), /* @__PURE__ */ l("div", { className: `wx-0hMO7P wx-segmented ${t}`, children: e.map((a) => /* @__PURE__ */ l(
2134
+ return J(() => {
2135
+ a(n);
2136
+ }, [n]), /* @__PURE__ */ r("div", { className: `wx-0hMO7P wx-segmented ${t}`, children: e.map((c) => /* @__PURE__ */ r(
2094
2137
  "button",
2095
2138
  {
2096
- className: `wx-0hMO7P wx-segment ${a.css} ${a.id === u ? "wx-selected" : ""}`,
2097
- title: a.title,
2098
- onClick: () => c(a.id),
2099
- children: s ? ae(s, { option: a }) : /* @__PURE__ */ $(_, { children: [
2100
- a.icon && /* @__PURE__ */ l(
2139
+ className: `wx-0hMO7P wx-segment ${c.css} ${c.id === i ? "wx-selected" : ""}`,
2140
+ title: c.title,
2141
+ onClick: () => o(c.id),
2142
+ "data-tooltip-text": c.tooltip,
2143
+ children: s ? oe(s, { option: c }) : /* @__PURE__ */ C(Q, { children: [
2144
+ c.icon && /* @__PURE__ */ r(
2101
2145
  "i",
2102
2146
  {
2103
- className: `wx-0hMO7P wx-icon ${a.icon} ${a.label ? "" : "wx-only"}`
2147
+ className: `wx-0hMO7P wx-icon ${c.icon} ${c.label ? "" : "wx-only"}`
2104
2148
  }
2105
2149
  ),
2106
- a.label && /* @__PURE__ */ l("span", { className: "wx-0hMO7P wx-label", children: a.label })
2150
+ c.label && /* @__PURE__ */ r("span", { className: "wx-0hMO7P wx-label", children: c.label })
2107
2151
  ] })
2108
2152
  },
2109
- a.id
2153
+ c.id
2110
2154
  )) });
2111
2155
  };
2112
- function an({
2156
+ function wn({
2113
2157
  value: e,
2114
2158
  options: n = [],
2115
2159
  placeholder: t = "",
2116
2160
  title: s = "",
2117
- disabled: r = !1,
2118
- error: u = !1,
2119
- textField: i = "label",
2161
+ tooltip: l,
2162
+ disabled: i = !1,
2163
+ error: a = !1,
2164
+ textField: o = "label",
2120
2165
  clear: c = !1,
2121
- id: a,
2122
- onChange: o
2166
+ id: u,
2167
+ css: d = "",
2168
+ onChange: p
2123
2169
  }) {
2124
- const w = z(a), [d, p] = B(e || ""), v = D(
2125
- (f) => {
2126
- const h = f.target.value;
2127
- p(h), o && o({ value: h });
2170
+ const w = te(u), [h, v] = O(e || ""), N = V(
2171
+ (x) => {
2172
+ const m = x.target.value;
2173
+ v(m), p && p({ value: m });
2128
2174
  },
2129
- [o]
2130
- ), x = D(() => {
2131
- p(""), o && o({ value: "" });
2132
- }, [o]);
2133
- return /* @__PURE__ */ $("div", { className: "wx-2yx1Fo wx-select-box", children: [
2134
- /* @__PURE__ */ $(
2135
- "select",
2136
- {
2137
- id: w,
2138
- value: d,
2139
- disabled: r,
2140
- className: `wx-2yx1Fo wx-select ${u ? "wx-2yx1Fo wx-error" : ""}`,
2141
- title: s,
2142
- onChange: v,
2143
- children: [
2144
- /* @__PURE__ */ l("option", { value: "", children: t }),
2145
- n.map((f) => /* @__PURE__ */ l("option", { value: f.id, children: f[i] }, f.id))
2146
- ]
2147
- }
2148
- ),
2149
- c && !r && d ? /* @__PURE__ */ l("i", { className: "wx-2yx1Fo wx-icon wxi-close", onClick: x }) : /* @__PURE__ */ l("i", { className: "wx-2yx1Fo wx-icon wxi-angle-down" })
2150
- ] });
2175
+ [p]
2176
+ ), f = V(() => {
2177
+ v(""), p && p({ value: "" });
2178
+ }, [p]);
2179
+ return /* @__PURE__ */ C(
2180
+ "div",
2181
+ {
2182
+ className: "wx-2yx1Fo wx-select-box " + d,
2183
+ "data-tooltip-text": l,
2184
+ children: [
2185
+ /* @__PURE__ */ C(
2186
+ "select",
2187
+ {
2188
+ id: w,
2189
+ value: h,
2190
+ disabled: i,
2191
+ className: `wx-2yx1Fo wx-select ${a ? "wx-2yx1Fo wx-error" : ""}`,
2192
+ title: s,
2193
+ onChange: N,
2194
+ children: [
2195
+ /* @__PURE__ */ r("option", { value: "", children: t }),
2196
+ n.map((x) => /* @__PURE__ */ r("option", { value: x.id, children: x[o] }, x.id))
2197
+ ]
2198
+ }
2199
+ ),
2200
+ c && !i && h ? /* @__PURE__ */ r("i", { className: "wx-2yx1Fo wx-icon wxi-close", onClick: f }) : /* @__PURE__ */ r("i", { className: "wx-2yx1Fo wx-icon wxi-angle-down" })
2201
+ ]
2202
+ }
2203
+ );
2151
2204
  }
2152
- function Ce({
2205
+ function Fe({
2153
2206
  id: e,
2154
2207
  label: n = "",
2155
2208
  css: t = "",
2156
2209
  min: s = 0,
2157
- max: r = 100,
2158
- value: u = 0,
2159
- step: i = 1,
2160
- title: c = "",
2161
- disabled: a = !1,
2162
- onChange: o,
2163
- width: w = ""
2210
+ max: l = 100,
2211
+ value: i = 0,
2212
+ step: a = 1,
2213
+ title: o = "",
2214
+ tooltip: c,
2215
+ disabled: u = !1,
2216
+ onChange: d,
2217
+ width: p = ""
2164
2218
  }) {
2165
- const d = z(e), [p, v] = J(u), x = C({ value: p, input: p }), f = A(
2166
- () => (p - s) / (r - s) * 100 + "%",
2167
- [p, s, r]
2168
- ), h = A(() => a ? "" : `linear-gradient(90deg, var(--wx-slider-primary) 0% ${f}, var(--wx-slider-background) ${f} 100%)`, [a, f]);
2169
- function m({ target: y }) {
2170
- const N = y.value * 1;
2171
- v(N), o && o({
2172
- value: N,
2173
- previous: x.current.input,
2219
+ const w = te(e), [h, v] = U(i), N = S({ value: h, input: h }), f = E(
2220
+ () => (h - s) / (l - s) * 100 + "%",
2221
+ [h, s, l]
2222
+ ), x = E(() => u ? "" : `linear-gradient(90deg, var(--wx-slider-primary) 0% ${f}, var(--wx-slider-background) ${f} 100%)`, [u, f]);
2223
+ function m({ target: b }) {
2224
+ const y = b.value * 1;
2225
+ v(y), d && d({
2226
+ value: y,
2227
+ previous: N.current.input,
2174
2228
  input: !0
2175
- }), x.current.input = N;
2229
+ }), N.current.input = y;
2176
2230
  }
2177
- function g({ target: y }) {
2178
- const N = y.value * 1;
2179
- v(N), o && o({ value: N, previous: x.current.value }), x.current.value = N;
2231
+ function g({ target: b }) {
2232
+ const y = b.value * 1;
2233
+ v(y), d && d({ value: y, previous: N.current.value }), N.current.value = y;
2180
2234
  }
2181
- E(() => {
2182
- v(u);
2183
- }, [u]);
2184
- const V = C(null);
2185
- E(() => {
2186
- if (V.current)
2187
- return V.current.addEventListener("change", g), () => {
2188
- V.current && V.current.removeEventListener("change", g);
2235
+ J(() => {
2236
+ v(i);
2237
+ }, [i]);
2238
+ const T = S(null);
2239
+ J(() => {
2240
+ if (T.current)
2241
+ return T.current.addEventListener("change", g), () => {
2242
+ T.current && T.current.removeEventListener("change", g);
2189
2243
  };
2190
- }, [V, g]);
2191
- const b = { ...w && { width: w } };
2192
- return /* @__PURE__ */ $("div", { className: `wx-2EDJ8G wx-slider ${t}`, style: b, title: c, children: [
2193
- n && /* @__PURE__ */ l("label", { className: "wx-2EDJ8G wx-label", htmlFor: d, children: n }),
2194
- /* @__PURE__ */ l("div", { className: "wx-2EDJ8G wx-inner", children: /* @__PURE__ */ l(
2195
- "input",
2196
- {
2197
- id: d,
2198
- className: "wx-2EDJ8G wx-input",
2199
- type: "range",
2200
- min: s,
2201
- max: r,
2202
- step: i,
2203
- disabled: a,
2204
- value: p,
2205
- onInput: m,
2206
- style: { background: h },
2207
- ref: V
2208
- }
2209
- ) })
2210
- ] });
2244
+ }, [T, g]);
2245
+ const k = { ...p && { width: p } };
2246
+ return /* @__PURE__ */ C(
2247
+ "div",
2248
+ {
2249
+ className: `wx-2EDJ8G wx-slider ${t}`,
2250
+ style: k,
2251
+ title: o,
2252
+ "data-tooltip-text": c,
2253
+ children: [
2254
+ n && /* @__PURE__ */ r("label", { className: "wx-2EDJ8G wx-label", htmlFor: w, children: n }),
2255
+ /* @__PURE__ */ r("div", { className: "wx-2EDJ8G wx-inner", children: /* @__PURE__ */ r(
2256
+ "input",
2257
+ {
2258
+ id: w,
2259
+ className: "wx-2EDJ8G wx-input",
2260
+ type: "range",
2261
+ min: s,
2262
+ max: l,
2263
+ step: a,
2264
+ disabled: u,
2265
+ value: h,
2266
+ onInput: m,
2267
+ style: { background: x },
2268
+ ref: T
2269
+ }
2270
+ ) })
2271
+ ]
2272
+ }
2273
+ );
2211
2274
  }
2212
- function on({
2275
+ function xn({
2213
2276
  id: e,
2214
2277
  value: n = !1,
2215
2278
  disabled: t = !1,
2216
- onChange: s
2279
+ css: s = "",
2280
+ onChange: l
2217
2281
  }) {
2218
- const r = z(e), [u, i] = J(n), c = D(
2219
- (a) => {
2220
- const o = a.target.checked;
2221
- i(o), s && s({ value: o });
2282
+ const i = te(e), [a, o] = U(n), c = V(
2283
+ (u) => {
2284
+ const d = u.target.checked;
2285
+ o(d), l && l({ value: d });
2222
2286
  },
2223
- [s]
2287
+ [l]
2224
2288
  );
2225
- return /* @__PURE__ */ $("label", { className: "wx-2dAR5c wx-switch", children: [
2226
- /* @__PURE__ */ l(
2289
+ return /* @__PURE__ */ C("label", { className: `wx-2dAR5c wx-switch ${s}`, children: [
2290
+ /* @__PURE__ */ r(
2227
2291
  "input",
2228
2292
  {
2229
2293
  className: "wx-2dAR5c wx-input",
2230
2294
  type: "checkbox",
2231
- checked: u,
2295
+ checked: a,
2232
2296
  onChange: c,
2233
2297
  disabled: t,
2234
- id: r
2298
+ id: i
2235
2299
  }
2236
2300
  ),
2237
- /* @__PURE__ */ l("span", { className: "wx-2dAR5c wx-box" })
2301
+ /* @__PURE__ */ r("span", { className: "wx-2dAR5c wx-box" })
2238
2302
  ] });
2239
2303
  }
2240
- const un = ({
2304
+ const mn = ({
2241
2305
  options: e = [],
2242
2306
  value: n = "",
2243
2307
  type: t = "top",
2244
2308
  css: s = "",
2245
- onChange: r
2309
+ onChange: l
2246
2310
  }) => {
2247
- const [u, i] = J(n), c = (a) => {
2248
- i(a), r && r({ value: a });
2311
+ const [i, a] = U(n), o = (c) => {
2312
+ a(c), l && l({ value: c });
2249
2313
  };
2250
- return /* @__PURE__ */ l("div", { className: `wx-138fWJ wx-tabs wx-${t} ${s}`, children: e.map((a) => /* @__PURE__ */ $(
2314
+ return /* @__PURE__ */ r("div", { className: `wx-138fWJ wx-tabs wx-${t} ${s}`, children: e.map((c) => /* @__PURE__ */ C(
2251
2315
  "button",
2252
2316
  {
2253
- className: `wx-138fWJ wx-tab ${a.css} ${a.id === u ? "wx-active" : ""}`,
2254
- title: a.title,
2255
- onClick: () => c(a.id),
2317
+ className: `wx-138fWJ wx-tab ${c.css} ${c.id === i ? "wx-active" : ""}`,
2318
+ title: c.title,
2319
+ onClick: () => o(c.id),
2320
+ "data-tooltip-text": c.tooltip,
2256
2321
  children: [
2257
- a.icon && /* @__PURE__ */ l(
2322
+ c.icon && /* @__PURE__ */ r(
2258
2323
  "i",
2259
2324
  {
2260
- className: `wx-138fWJ wx-icon ${a.icon} ${a.label ? "" : "wx-only"}`
2325
+ className: `wx-138fWJ wx-icon ${c.icon} ${c.label ? "" : "wx-only"}`
2261
2326
  }
2262
2327
  ),
2263
- a.label && /* @__PURE__ */ l("span", { className: "wx-138fWJ wx-label", children: a.label })
2328
+ c.label && /* @__PURE__ */ r("span", { className: "wx-138fWJ wx-label", children: c.label })
2264
2329
  ]
2265
2330
  },
2266
- a.id
2331
+ c.id
2267
2332
  )) });
2268
- }, dn = ({
2333
+ }, hn = ({
2269
2334
  id: e,
2270
2335
  value: n = 0,
2271
2336
  step: t = 1,
2272
2337
  min: s = 0,
2273
- max: r = 1 / 0,
2274
- error: u = !1,
2275
- disabled: i = !1,
2276
- readonly: c = !1,
2277
- onChange: a
2338
+ max: l = 1 / 0,
2339
+ error: i = !1,
2340
+ disabled: a = !1,
2341
+ readonly: o = !1,
2342
+ css: c = "",
2343
+ tooltip: u,
2344
+ onChange: d
2278
2345
  }) => {
2279
- const o = z(e), [w, d] = J(n), p = D(() => {
2280
- if (c || w <= s) return;
2281
- const h = w - t;
2282
- d(h), a && a({ value: h });
2283
- }, [w, c, s, t, a]), v = D(() => {
2284
- if (c || w >= r) return;
2285
- const h = w + t;
2286
- d(h), a && a({ value: h });
2287
- }, [w, c, r, t, a]), x = D(() => {
2288
- if (!c) {
2289
- const h = Math.round(Math.min(r, Math.max(w, s)) / t) * t, m = isNaN(h) ? Math.max(s, 0) : h;
2290
- d(m), a && a({ value: m });
2346
+ const p = te(e), [w, h] = U(n), v = V(() => {
2347
+ if (o || w <= s) return;
2348
+ const m = w - t;
2349
+ h(m), d && d({ value: m });
2350
+ }, [w, o, s, t, d]), N = V(() => {
2351
+ if (o || w >= l) return;
2352
+ const m = w + t;
2353
+ h(m), d && d({ value: m });
2354
+ }, [w, o, l, t, d]), f = V(() => {
2355
+ if (!o) {
2356
+ const m = Math.round(Math.min(l, Math.max(w, s)) / t) * t, g = isNaN(m) ? Math.max(s, 0) : m;
2357
+ h(g), d && d({ value: g });
2291
2358
  }
2292
- }, [c, w, r, s, t, a]), f = D(
2293
- (h) => {
2294
- const m = h.target.value * 1;
2295
- d(m), a && a({ value: m, input: !0 });
2359
+ }, [o, w, l, s, t, d]), x = V(
2360
+ (m) => {
2361
+ const g = m.target.value * 1;
2362
+ h(g), d && d({ value: g, input: !0 });
2296
2363
  },
2297
- [a]
2364
+ [d]
2298
2365
  );
2299
- return /* @__PURE__ */ $(
2366
+ return /* @__PURE__ */ C(
2300
2367
  "div",
2301
2368
  {
2302
- className: `wx-22t21n wx-counter ${i ? "wx-disabled" : ""} ${c ? "wx-readonly" : ""} ${u ? "wx-error" : ""}`,
2369
+ className: `wx-22t21n wx-counter ${c} ${a ? "wx-disabled" : ""} ${o ? "wx-readonly" : ""} ${i ? "wx-error" : ""}`,
2370
+ "data-tooltip-text": u,
2303
2371
  children: [
2304
- /* @__PURE__ */ l(
2372
+ /* @__PURE__ */ r(
2305
2373
  "button",
2306
2374
  {
2307
2375
  "aria-label": "-",
2308
2376
  className: "wx-22t21n wx-btn wx-btn-dec",
2309
- disabled: i,
2310
- onClick: p,
2311
- children: /* @__PURE__ */ l(
2377
+ disabled: a,
2378
+ onClick: v,
2379
+ children: /* @__PURE__ */ r(
2312
2380
  "svg",
2313
2381
  {
2314
2382
  className: "wx-22t21n wx-dec",
@@ -2317,33 +2385,33 @@ const un = ({
2317
2385
  viewBox: "0 0 12 2",
2318
2386
  fill: "none",
2319
2387
  xmlns: "http://www.w3.org/2000/svg",
2320
- children: /* @__PURE__ */ l("path", { d: "M11.2501 1.74994H0.750092V0.249939H11.2501V1.74994Z" })
2388
+ children: /* @__PURE__ */ r("path", { d: "M11.2501 1.74994H0.750092V0.249939H11.2501V1.74994Z" })
2321
2389
  }
2322
2390
  )
2323
2391
  }
2324
2392
  ),
2325
- /* @__PURE__ */ l(
2393
+ /* @__PURE__ */ r(
2326
2394
  "input",
2327
2395
  {
2328
- id: o,
2396
+ id: p,
2329
2397
  type: "text",
2330
2398
  className: "wx-22t21n wx-input",
2331
- disabled: i,
2332
- readOnly: c,
2399
+ disabled: a,
2400
+ readOnly: o,
2333
2401
  required: !0,
2334
2402
  value: w,
2335
- onBlur: x,
2336
- onInput: f
2403
+ onBlur: f,
2404
+ onInput: x
2337
2405
  }
2338
2406
  ),
2339
- /* @__PURE__ */ l(
2407
+ /* @__PURE__ */ r(
2340
2408
  "button",
2341
2409
  {
2342
2410
  "aria-label": "-",
2343
2411
  className: "wx-22t21n wx-btn wx-btn-inc",
2344
- disabled: i,
2345
- onClick: v,
2346
- children: /* @__PURE__ */ l(
2412
+ disabled: a,
2413
+ onClick: N,
2414
+ children: /* @__PURE__ */ r(
2347
2415
  "svg",
2348
2416
  {
2349
2417
  className: "wx-22t21n wx-inc",
@@ -2352,7 +2420,7 @@ const un = ({
2352
2420
  viewBox: "0 0 12 12",
2353
2421
  fill: "none",
2354
2422
  xmlns: "http://www.w3.org/2000/svg",
2355
- children: /* @__PURE__ */ l(
2423
+ children: /* @__PURE__ */ r(
2356
2424
  "path",
2357
2425
  {
2358
2426
  d: `M11.2501
@@ -2367,102 +2435,103 @@ const un = ({
2367
2435
  }
2368
2436
  );
2369
2437
  };
2370
- function Ct({ notice: e = {} }) {
2438
+ function Pt({ notice: e = {} }) {
2371
2439
  function n() {
2372
2440
  e.remove && e.remove();
2373
2441
  }
2374
- return /* @__PURE__ */ $(
2442
+ return /* @__PURE__ */ C(
2375
2443
  "div",
2376
2444
  {
2377
2445
  className: `wx-11sNg5 wx-notice wx-${e.type ? e.type : ""}`,
2378
2446
  role: "status",
2379
2447
  "aria-live": "polite",
2380
2448
  children: [
2381
- /* @__PURE__ */ l("div", { className: "wx-11sNg5 wx-text", children: e.text }),
2382
- /* @__PURE__ */ l("div", { className: "wx-11sNg5 wx-button", children: /* @__PURE__ */ l("i", { className: "wx-11sNg5 wxi-close", onClick: n }) })
2449
+ /* @__PURE__ */ r("div", { className: "wx-11sNg5 wx-text", children: e.text }),
2450
+ /* @__PURE__ */ r("div", { className: "wx-11sNg5 wx-button", children: /* @__PURE__ */ r("i", { className: "wx-11sNg5 wxi-close", onClick: n }) })
2383
2451
  ]
2384
2452
  }
2385
2453
  );
2386
2454
  }
2387
- function St({ data: e = [] }) {
2388
- return /* @__PURE__ */ l("div", { className: "wx-3nwoO9 wx-notices", children: e.map((n) => /* @__PURE__ */ l(Ct, { notice: n }, n.id)) });
2455
+ function Ht({ data: e = [] }) {
2456
+ return /* @__PURE__ */ r("div", { className: "wx-3nwoO9 wx-notices", children: e.map((n) => /* @__PURE__ */ r(Pt, { notice: n }, n.id)) });
2389
2457
  }
2390
- function Lt({
2458
+ function At({
2391
2459
  title: e = "",
2392
2460
  buttons: n = ["cancel", "ok"],
2393
2461
  header: t,
2394
2462
  children: s,
2395
- footer: r,
2396
- onConfirm: u,
2397
- onCancel: i
2463
+ footer: l,
2464
+ css: i = "",
2465
+ onConfirm: a,
2466
+ onCancel: o
2398
2467
  }) {
2399
- const c = (K(q) || X()).getGroup("core"), a = C(null);
2400
- E(() => {
2401
- a.current?.focus();
2468
+ const c = (X(K) || ne()).getGroup("core"), u = S(null);
2469
+ J(() => {
2470
+ u.current?.focus();
2402
2471
  }, []);
2403
- function o(d) {
2404
- switch (d.code) {
2472
+ function d(w) {
2473
+ switch (w.code) {
2405
2474
  case "Enter": {
2406
- const p = d.target.tagName;
2407
- if (p === "TEXTAREA" || p === "BUTTON") return;
2408
- u && u({ event: d });
2475
+ const h = w.target.tagName;
2476
+ if (h === "TEXTAREA" || h === "BUTTON") return;
2477
+ a && a({ event: w });
2409
2478
  break;
2410
2479
  }
2411
2480
  case "Escape":
2412
- i && i({ event: d });
2481
+ o && o({ event: w });
2413
2482
  break;
2414
2483
  }
2415
2484
  }
2416
- function w(d, p) {
2417
- const v = { event: d, button: p };
2418
- p === "cancel" ? i && i(v) : u && u(v);
2485
+ function p(w, h) {
2486
+ const v = { event: w, button: h };
2487
+ h === "cancel" ? o && o(v) : a && a(v);
2419
2488
  }
2420
- return /* @__PURE__ */ l(
2489
+ return /* @__PURE__ */ r(
2421
2490
  "div",
2422
2491
  {
2423
- className: "wx-1FxkZa wx-modal",
2424
- ref: a,
2492
+ className: `wx-1FxkZa wx-modal ${i}`,
2493
+ ref: u,
2425
2494
  tabIndex: 0,
2426
- onKeyDown: o,
2427
- children: /* @__PURE__ */ $("div", { className: "wx-1FxkZa wx-window", children: [
2428
- t || (e ? /* @__PURE__ */ l("div", { className: "wx-1FxkZa wx-header", children: e }) : null),
2429
- /* @__PURE__ */ l("div", { children: s }),
2430
- r || n && /* @__PURE__ */ l("div", { className: "wx-1FxkZa wx-buttons", children: n.map((d) => /* @__PURE__ */ l("div", { className: "wx-1FxkZa wx-button", children: /* @__PURE__ */ l(
2431
- re,
2495
+ onKeyDown: d,
2496
+ children: /* @__PURE__ */ C("div", { className: "wx-1FxkZa wx-window", children: [
2497
+ t || (e ? /* @__PURE__ */ r("div", { className: "wx-1FxkZa wx-header", children: e }) : null),
2498
+ /* @__PURE__ */ r("div", { children: s }),
2499
+ l || n && /* @__PURE__ */ r("div", { className: "wx-1FxkZa wx-buttons", children: n.map((w) => /* @__PURE__ */ r("div", { className: "wx-1FxkZa wx-button", children: /* @__PURE__ */ r(
2500
+ le,
2432
2501
  {
2433
- type: `block ${d === "ok" ? "primary" : "secondary"}`,
2434
- onClick: (p) => w(p, d),
2435
- children: c(d)
2502
+ type: `block ${w === "ok" ? "primary" : "secondary"}`,
2503
+ onClick: (h) => p(h, w),
2504
+ children: c(w)
2436
2505
  }
2437
- ) }, d)) })
2506
+ ) }, w)) })
2438
2507
  ] })
2439
2508
  }
2440
2509
  );
2441
2510
  }
2442
- function Ft({ children: e }, n) {
2443
- const [t, s] = B(null), [r, u] = B([]);
2444
- return qe(
2511
+ function Bt({ children: e }, n) {
2512
+ const [t, s] = O(null), [l, i] = O([]);
2513
+ return nt(
2445
2514
  n,
2446
2515
  () => ({
2447
- showModal: (i) => {
2448
- const c = { ...i };
2449
- return s(c), new Promise((a, o) => {
2450
- c.resolve = (w) => {
2451
- s(null), a(w);
2452
- }, c.reject = (w) => {
2453
- s(null), o(w);
2516
+ showModal: (a) => {
2517
+ const o = { ...a };
2518
+ return s(o), new Promise((c, u) => {
2519
+ o.resolve = (d) => {
2520
+ s(null), c(d);
2521
+ }, o.reject = (d) => {
2522
+ s(null), u(d);
2454
2523
  };
2455
2524
  });
2456
2525
  },
2457
- showNotice: (i) => {
2458
- i = { ...i }, i.id = i.id || oe(), i.remove = () => u((c) => c.filter((a) => a.id !== i.id)), i.expire != -1 && setTimeout(i.remove, i.expire || 5100), u((c) => [...c, i]);
2526
+ showNotice: (a) => {
2527
+ a = { ...a }, a.id = a.id || ae(), a.remove = () => i((o) => o.filter((c) => c.id !== a.id)), a.expire != -1 && setTimeout(a.remove, a.expire || 5100), i((o) => [...o, a]);
2459
2528
  }
2460
2529
  }),
2461
2530
  []
2462
- ), /* @__PURE__ */ $(_, { children: [
2531
+ ), /* @__PURE__ */ C(Q, { children: [
2463
2532
  e,
2464
- t && /* @__PURE__ */ l(
2465
- Lt,
2533
+ t && /* @__PURE__ */ r(
2534
+ At,
2466
2535
  {
2467
2536
  title: t.title,
2468
2537
  buttons: t.buttons,
@@ -2471,218 +2540,220 @@ function Ft({ children: e }, n) {
2471
2540
  children: t.message
2472
2541
  }
2473
2542
  ),
2474
- /* @__PURE__ */ l(St, { data: r })
2543
+ /* @__PURE__ */ r(Ht, { data: l })
2475
2544
  ] });
2476
2545
  }
2477
- const Ht = Qe(Ft);
2478
- function fn(e) {
2479
- let { children: n } = e, t = C();
2480
- const s = A(() => ({
2481
- showNotice: (r) => t.current.showNotice(r),
2482
- showModal: (r) => t.current.showModal(r)
2546
+ const Et = tt(Bt);
2547
+ function pn(e) {
2548
+ let { children: n } = e, t = S();
2549
+ const s = E(() => ({
2550
+ showNotice: (l) => t.current.showNotice(l),
2551
+ showModal: (l) => t.current.showModal(l)
2483
2552
  }), []);
2484
- return /* @__PURE__ */ l(Oe.Provider, { value: s, children: /* @__PURE__ */ l(Ht, { ref: t, children: n }) });
2553
+ return /* @__PURE__ */ r(Ue.Provider, { value: s, children: /* @__PURE__ */ r(Et, { ref: t, children: n }) });
2485
2554
  }
2486
- function Se({
2555
+ function Pe({
2487
2556
  label: e = "",
2488
2557
  position: n = "",
2489
2558
  error: t = !1,
2490
2559
  type: s = "",
2491
- required: r = !1,
2492
- id: u,
2493
- children: i,
2560
+ required: l = !1,
2561
+ id: i,
2562
+ css: a = "",
2563
+ children: o,
2494
2564
  width: c = ""
2495
2565
  }) {
2496
- const a = A(() => u === void 0 ? oe() : u, [u]), o = { ...c && { width: c } };
2497
- return /* @__PURE__ */ l(ue.Provider, { value: a, children: /* @__PURE__ */ $(
2566
+ const u = E(() => i === void 0 ? ae() : i, [i]), d = { ...c && { width: c } };
2567
+ return /* @__PURE__ */ r(ue.Provider, { value: u, children: /* @__PURE__ */ C(
2498
2568
  "div",
2499
2569
  {
2500
- style: o,
2501
- className: `wx-2oVUvC wx-field wx-${n} ${t ? "wx-error" : ""} ${r ? "wx-required" : ""}`.trim(),
2570
+ style: d,
2571
+ className: `wx-2oVUvC wx-field wx-${n} ${a} ${t ? "wx-error" : ""} ${l ? "wx-required" : ""}`.trim(),
2502
2572
  children: [
2503
- e && (a ? /* @__PURE__ */ l("label", { className: "wx-2oVUvC wx-label", htmlFor: a, children: e }) : /* @__PURE__ */ l("div", { className: "wx-2oVUvC wx-label", children: e })),
2504
- /* @__PURE__ */ l("div", { className: `wx-2oVUvC wx-field-control wx-${s}`, children: i })
2573
+ e && (u ? /* @__PURE__ */ r("label", { className: "wx-2oVUvC wx-label", htmlFor: u, children: e }) : /* @__PURE__ */ r("div", { className: "wx-2oVUvC wx-label", children: e })),
2574
+ /* @__PURE__ */ r("div", { className: `wx-2oVUvC wx-field-control wx-${s}`, children: o })
2505
2575
  ]
2506
2576
  }
2507
2577
  ) });
2508
2578
  }
2509
- const Pt = ({
2579
+ const Ot = ({
2510
2580
  value: e = !1,
2511
2581
  type: n = "",
2512
2582
  icon: t = "",
2513
2583
  disabled: s = !1,
2514
- iconActive: r = "",
2515
- onClick: u,
2516
- title: i = "",
2584
+ iconActive: l = "",
2585
+ onClick: i,
2586
+ title: a = "",
2587
+ tooltip: o,
2517
2588
  css: c = "",
2518
- text: a = "",
2519
- textActive: o = "",
2520
- children: w,
2521
- active: d,
2522
- onChange: p
2589
+ text: u = "",
2590
+ textActive: d = "",
2591
+ children: p,
2592
+ active: w,
2593
+ onChange: h
2523
2594
  }) => {
2524
- const [v, x] = J(e), f = A(() => (v ? "pressed" : "") + (n ? " " + n : ""), [v, n]), h = D(
2595
+ const [v, N] = U(e), f = E(() => (v ? "pressed" : "") + (n ? " " + n : ""), [v, n]), x = V(
2525
2596
  (m) => {
2526
2597
  let g = !v;
2527
- u && u(m), m.defaultPrevented || (x(g), p && p({ value: g }));
2598
+ i && i(m), m.defaultPrevented || (N(g), h && h({ value: g }));
2528
2599
  },
2529
- [v, u, p]
2600
+ [v, i, h]
2530
2601
  );
2531
- return v && d ? /* @__PURE__ */ l(
2532
- re,
2602
+ return v && w ? /* @__PURE__ */ r(
2603
+ le,
2533
2604
  {
2534
- title: i,
2535
- text: v && o || a,
2605
+ title: a,
2606
+ tooltip: o,
2607
+ text: v && d || u,
2536
2608
  css: c,
2537
2609
  type: f,
2538
- icon: v && r || t,
2539
- onClick: h,
2610
+ icon: v && l || t,
2611
+ onClick: x,
2540
2612
  disabled: s,
2541
- children: ae(d, { value: v })
2613
+ children: oe(w, { value: v })
2542
2614
  }
2543
- ) : w ? /* @__PURE__ */ l(
2544
- re,
2615
+ ) : p ? /* @__PURE__ */ r(
2616
+ le,
2545
2617
  {
2546
- title: i,
2547
- text: v && o || a,
2618
+ title: a,
2619
+ tooltip: o,
2620
+ text: v && d || u,
2548
2621
  css: c,
2549
2622
  type: f,
2550
- icon: v && r || t,
2551
- onClick: h,
2623
+ icon: v && l || t,
2624
+ onClick: x,
2552
2625
  disabled: s,
2553
- children: w
2626
+ children: p
2554
2627
  }
2555
- ) : /* @__PURE__ */ l(
2556
- re,
2628
+ ) : /* @__PURE__ */ r(
2629
+ le,
2557
2630
  {
2558
- title: i,
2559
- text: v && o || a,
2631
+ title: a,
2632
+ tooltip: o,
2633
+ text: v && d || u,
2560
2634
  css: c,
2561
2635
  type: f,
2562
- icon: v && r || t,
2563
- onClick: h,
2636
+ icon: v && l || t,
2637
+ onClick: x,
2564
2638
  disabled: s
2565
2639
  }
2566
2640
  );
2567
- }, Le = new Date(0, 0, 0, 0, 0);
2568
- function wn({
2569
- value: e = Le,
2641
+ }, He = new Date(0, 0, 0, 0, 0);
2642
+ function vn({
2643
+ value: e = He,
2570
2644
  id: n,
2571
2645
  title: t = "",
2572
- css: s = "",
2573
- disabled: r = !1,
2574
- error: u = !1,
2575
- format: i = "",
2646
+ tooltip: s,
2647
+ css: l = "",
2648
+ disabled: i = !1,
2649
+ error: a = !1,
2650
+ format: o = "",
2576
2651
  onChange: c,
2577
- dropdown: a
2652
+ dropdown: u
2578
2653
  }) {
2579
- let [o, w] = J(e);
2580
- const { calendar: d, formats: p } = (K(q) || X()).getRaw(), v = d.clockFormat == 12, x = 23, f = 59, h = A(() => {
2581
- const k = i || p?.timeFormat;
2582
- return typeof k == "function" ? k : ne(k, d);
2583
- }, [i, p, d]), m = A(() => h(new Date(0, 0, 0, 1)).indexOf("01") != -1, [h]), g = (k, W) => (k < 10 && W ? `0${k}` : `${k}`).slice(-2), V = (k) => g(k, !0), b = (k) => `${k}`.replace(/[^\d]/g, "") || 0, y = (k) => v && (k = k % 12, k === 0) ? "12" : g(k, m), N = D((k, W) => (k = b(k), Math.min(k, W)), []), [M, T] = B(null), R = o || Le, F = N(R.getHours(), x), j = N(R.getMinutes(), f), H = F > 12, L = y(F), P = V(j), S = A(
2584
- () => h(new Date(0, 0, 0, F, j)),
2585
- [F, j, h]
2586
- ), O = D(() => {
2587
- T(!0);
2588
- }, []), U = D(() => {
2589
- const k = new Date(R);
2590
- k.setHours(k.getHours() + (H ? -12 : 12)), w(k), c && c({ value: k });
2591
- }, [R, H, c]), Y = D(
2592
- ({ value: k }) => {
2593
- if (R.getHours() === k) return;
2594
- const W = new Date(R);
2595
- W.setHours(k), w(W), c && c({ value: W });
2654
+ let [d, p] = U(e);
2655
+ const { calendar: w, formats: h } = (X(K) || ne()).getRaw(), v = w.clockFormat == 12, N = 23, f = 59, x = E(() => {
2656
+ const D = o || h?.timeFormat;
2657
+ return typeof D == "function" ? D : re(D, w);
2658
+ }, [o, h, w]), m = E(() => x(new Date(0, 0, 0, 1)).indexOf("01") != -1, [x]), g = (D, H) => (D < 10 && H ? `0${D}` : `${D}`).slice(-2), T = (D) => g(D, !0), k = (D) => `${D}`.replace(/[^\d]/g, "") || 0, b = (D) => v && (D = D % 12, D === 0) ? "12" : g(D, m), y = V((D, H) => (D = k(D), Math.min(D, H)), []), [A, P] = O(null), R = d || He, Y = y(R.getHours(), N), G = y(R.getMinutes(), f), W = Y > 12, L = b(Y), B = T(G), _ = E(
2659
+ () => x(new Date(0, 0, 0, Y, G)),
2660
+ [Y, G, x]
2661
+ ), Z = V(() => {
2662
+ P(!0);
2663
+ }, []), F = V(() => {
2664
+ const D = new Date(R);
2665
+ D.setHours(D.getHours() + (W ? -12 : 12)), p(D), c && c({ value: D });
2666
+ }, [R, W, c]), j = V(
2667
+ ({ value: D }) => {
2668
+ if (R.getHours() === D) return;
2669
+ const H = new Date(R);
2670
+ H.setHours(D), p(H), c && c({ value: H });
2596
2671
  },
2597
2672
  [R, c]
2598
- ), I = D(
2599
- ({ value: k }) => {
2600
- if (R.getMinutes() === k) return;
2601
- const W = new Date(R);
2602
- W.setMinutes(k), w(W), c && c({ value: W });
2673
+ ), I = V(
2674
+ ({ value: D }) => {
2675
+ if (R.getMinutes() === D) return;
2676
+ const H = new Date(R);
2677
+ H.setMinutes(D), p(H), c && c({ value: H });
2603
2678
  },
2604
2679
  [R, c]
2605
- ), G = D(
2606
- (k) => (k = N(k, x), v && (k = k * 1, k === 12 && (k = 0), H && (k += 12)), k),
2607
- [N, v, H]
2608
- ), Q = D(() => {
2609
- T(null);
2680
+ ), $ = V(
2681
+ (D) => (D = y(D, N), v && (D = D * 1, D === 12 && (D = 0), W && (D += 12)), D),
2682
+ [y, v, W]
2683
+ ), M = V(() => {
2684
+ P(null);
2610
2685
  }, []);
2611
- return /* @__PURE__ */ $(
2686
+ return /* @__PURE__ */ C(
2612
2687
  "div",
2613
2688
  {
2614
- className: `wx-7f497i wx-timepicker ${u ? "wx-7f497i wx-error" : ""} ${r ? "wx-7f497i wx-disabled" : ""}`,
2615
- onClick: r ? void 0 : O,
2616
- style: { cursor: r ? "default" : "pointer" },
2689
+ className: `wx-7f497i wx-timepicker ${a ? "wx-7f497i wx-error" : ""} ${i ? "wx-7f497i wx-disabled" : ""}`,
2690
+ onClick: i ? void 0 : Z,
2691
+ style: { cursor: i ? "default" : "pointer" },
2617
2692
  children: [
2618
- /* @__PURE__ */ l(
2619
- Ne,
2693
+ /* @__PURE__ */ r(
2694
+ ye,
2620
2695
  {
2621
2696
  id: n,
2622
- css: s,
2697
+ css: `wx-date-input ${l}`,
2623
2698
  title: t,
2624
- value: S,
2699
+ tooltip: s,
2700
+ value: _,
2625
2701
  readonly: !0,
2626
- disabled: r,
2627
- error: u,
2628
- icon: "wxi-clock",
2629
- inputStyle: {
2630
- cursor: "pointer",
2631
- width: "100%",
2632
- paddingRight: "calc(var(--wx-input-icon-size) + var(--wx-input-icon-indent) * 2)"
2633
- }
2702
+ disabled: i,
2703
+ error: a,
2704
+ icon: "wxi-clock"
2634
2705
  }
2635
2706
  ),
2636
- M && !r && /* @__PURE__ */ l(le, { onCancel: Q, ...ye(a), children: /* @__PURE__ */ $("div", { className: "wx-7f497i wx-wrapper", children: [
2637
- /* @__PURE__ */ $("div", { className: "wx-7f497i wx-timer", children: [
2638
- /* @__PURE__ */ l(
2707
+ A && !i && /* @__PURE__ */ r(se, { onCancel: M, ...De(u), children: /* @__PURE__ */ C("div", { className: "wx-7f497i wx-wrapper", children: [
2708
+ /* @__PURE__ */ C("div", { className: "wx-7f497i wx-timer", children: [
2709
+ /* @__PURE__ */ r(
2639
2710
  "input",
2640
2711
  {
2641
2712
  className: "wx-7f497i wx-digit",
2642
2713
  value: L,
2643
- onChange: (k) => {
2644
- const W = G(k.target.value);
2645
- Y({ value: W });
2714
+ onChange: (D) => {
2715
+ const H = $(D.target.value);
2716
+ j({ value: H });
2646
2717
  }
2647
2718
  }
2648
2719
  ),
2649
- /* @__PURE__ */ l("div", { className: "wx-7f497i wx-separator", children: ":" }),
2650
- /* @__PURE__ */ l(
2720
+ /* @__PURE__ */ r("div", { className: "wx-7f497i wx-separator", children: ":" }),
2721
+ /* @__PURE__ */ r(
2651
2722
  "input",
2652
2723
  {
2653
2724
  className: "wx-7f497i wx-digit",
2654
- value: P,
2655
- onChange: (k) => {
2656
- const W = N(k.target.value, f);
2657
- I({ value: W });
2725
+ value: B,
2726
+ onChange: (D) => {
2727
+ const H = y(D.target.value, f);
2728
+ I({ value: H });
2658
2729
  }
2659
2730
  }
2660
2731
  ),
2661
- v && /* @__PURE__ */ l(
2662
- Pt,
2732
+ v && /* @__PURE__ */ r(
2733
+ Ot,
2663
2734
  {
2664
- value: H,
2665
- onClick: U,
2666
- active: () => /* @__PURE__ */ l("span", { children: "pm" }),
2667
- children: /* @__PURE__ */ l("span", { children: "am" })
2735
+ value: W,
2736
+ onClick: F,
2737
+ active: () => /* @__PURE__ */ r("span", { children: "pm" }),
2738
+ children: /* @__PURE__ */ r("span", { children: "am" })
2668
2739
  }
2669
2740
  )
2670
2741
  ] }),
2671
- /* @__PURE__ */ l(Se, { width: "unset", children: /* @__PURE__ */ l(
2672
- Ce,
2742
+ /* @__PURE__ */ r(Pe, { width: "unset", children: /* @__PURE__ */ r(
2743
+ Fe,
2673
2744
  {
2674
- label: d.hours,
2675
- value: F,
2745
+ label: w.hours,
2746
+ value: Y,
2676
2747
  width: "unset",
2677
- onChange: Y,
2678
- max: x
2748
+ onChange: j,
2749
+ max: N
2679
2750
  }
2680
2751
  ) }),
2681
- /* @__PURE__ */ l(Se, { width: "unset", children: /* @__PURE__ */ l(
2682
- Ce,
2752
+ /* @__PURE__ */ r(Pe, { width: "unset", children: /* @__PURE__ */ r(
2753
+ Fe,
2683
2754
  {
2684
- label: d.minutes,
2685
- value: j,
2755
+ label: w.minutes,
2756
+ value: G,
2686
2757
  width: "unset",
2687
2758
  onChange: I,
2688
2759
  max: f
@@ -2693,85 +2764,262 @@ function wn({
2693
2764
  }
2694
2765
  );
2695
2766
  }
2696
- function xn({ children: e }) {
2697
- return /* @__PURE__ */ l("div", { className: "wx-KgpO9N wx-modal", children: /* @__PURE__ */ l("div", { className: "wx-KgpO9N wx-window", children: e }) });
2767
+ function Ae(e) {
2768
+ return e === "point" ? "point" : e.split("-")[0];
2698
2769
  }
2699
- function mn({ position: e = "right", children: n, onCancel: t }) {
2700
- const s = C(null);
2701
- return E(() => ve(s.current, t).destroy, []), /* @__PURE__ */ l("div", { ref: s, className: `wx-2L733M wx-sidearea wx-pos-${e}`, children: n });
2770
+ function Wt(e) {
2771
+ if (e === "point") return "center";
2772
+ const n = e.split("-");
2773
+ return n.length === 1 ? "center" : n[1];
2702
2774
  }
2703
- const Fe = "#dfe2e6", He = "#2c2f3c", At = 0.75;
2704
- function Pe(e) {
2775
+ function he(e, n, t) {
2776
+ const s = getComputedStyle(e).getPropertyValue(n);
2777
+ return parseInt(s) || t;
2778
+ }
2779
+ function gn(e) {
2780
+ const {
2781
+ at: n = "top-center",
2782
+ arrow: t = !1,
2783
+ touch: s = !1,
2784
+ overflow: l = !1,
2785
+ delay: i = 300,
2786
+ content: a = null,
2787
+ children: o,
2788
+ css: c = ""
2789
+ } = e;
2790
+ function u(I) {
2791
+ if (l && I.scrollWidth <= I.clientWidth) return null;
2792
+ const $ = I.getAttribute?.("data-tooltip-text");
2793
+ return $ || null;
2794
+ }
2795
+ const d = e.resolver || u, p = E(() => Ae(n), [n]), w = E(() => Wt(n), [n]), h = E(() => n === "point" ? "point" : `${p}-${w}`, [n, p, w]), v = S(null), N = S(!1), [f, x] = O(null), [m, g] = O(null), [T, k] = O(null), [b, y] = O(!1), A = S(m);
2796
+ J(() => {
2797
+ A.current = m;
2798
+ }, [m]);
2799
+ const P = E(
2800
+ () => m !== null && (!!m.result || a != null),
2801
+ [m, a]
2802
+ );
2803
+ function R() {
2804
+ return he(f, "--wx-tooltip-point-offset", 14);
2805
+ }
2806
+ function Y() {
2807
+ return he(f, "--wx-tooltip-arrow-size", 6);
2808
+ }
2809
+ function G(I, $, M, D) {
2810
+ if (p === "point") return "50%";
2811
+ const H = D?.getBoundingClientRect() ?? { top: 0, left: 0 }, ee = I / 2;
2812
+ let z, q;
2813
+ return p === "top" || p === "bottom" ? (q = $.x - (D?.scrollLeft ?? 0) + H.left, w === "start" ? z = M.left + I + ee : w === "end" ? z = M.right - I - ee : z = M.left + M.width / 2) : (q = $.y - (D?.scrollTop ?? 0) + H.top, w === "start" ? z = M.top + I + ee : w === "end" ? z = M.bottom - I - ee : z = M.top + M.height / 2), `${z - q}px`;
2814
+ }
2815
+ J(() => {
2816
+ if (!f || !m) return void k(null);
2817
+ const I = n === "point" ? R() : 0, $ = We(
2818
+ f,
2819
+ m.anchor,
2820
+ h,
2821
+ m.mouseX + I,
2822
+ m.mouseY + I
2823
+ );
2824
+ if ($ === null) return void k(null);
2825
+ const M = m.anchor.getBoundingClientRect(), D = Ye(f), H = Ae($.at);
2826
+ let ee = "50%";
2827
+ if ($ && t && n !== "point") {
2828
+ const q = Y();
2829
+ H === "top" ? $.y -= q : H === "bottom" ? $.y += q : H === "left" ? $.x -= q : H === "right" && ($.x += q), ee = G(q, $, M, D);
2830
+ }
2831
+ const z = he(f, "--wx-tooltip-z-index", 1002);
2832
+ k({
2833
+ x: Math.round($.x),
2834
+ y: Math.round($.y),
2835
+ z: Math.max($.z, z),
2836
+ side: H,
2837
+ arrowOffset: ee
2838
+ });
2839
+ }, [f, m, n, t, p, w, h]);
2840
+ function W(I, $) {
2841
+ if (!N.current || ("ontouchstart" in window || window.navigator.maxTouchPoints > 0) && !s) return null;
2842
+ for (; I && I !== v.current; I = I.parentNode) {
2843
+ if (I.nodeType !== window.Node.ELEMENT_NODE) continue;
2844
+ const D = d(I, $);
2845
+ if (D != null)
2846
+ return {
2847
+ result: D,
2848
+ anchor: I,
2849
+ mouseX: $.clientX,
2850
+ mouseY: $.clientY
2851
+ };
2852
+ }
2853
+ return null;
2854
+ }
2855
+ const L = S(void 0), B = S(!1);
2856
+ function _(I, ...$) {
2857
+ clearTimeout(L.current), L.current = setTimeout(I, i, ...$);
2858
+ }
2859
+ function Z(I) {
2860
+ if (I.target.closest(".wx-tooltip-area") !== v.current) {
2861
+ N.current = !1, g(null), clearTimeout(L.current);
2862
+ return;
2863
+ }
2864
+ N.current = !0;
2865
+ const $ = A.current;
2866
+ if ($?.anchor?.contains(I.target)) {
2867
+ clearTimeout(L.current), B.current = !1;
2868
+ const M = d(I.target, I);
2869
+ if (M != null) {
2870
+ g({
2871
+ result: M,
2872
+ anchor: I.target,
2873
+ mouseX: I.clientX,
2874
+ mouseY: I.clientY
2875
+ });
2876
+ return;
2877
+ }
2878
+ }
2879
+ if ($ !== null) {
2880
+ const M = W(I.target, I);
2881
+ M ? (clearTimeout(L.current), B.current = !1, g(M), y(!1)) : B.current || (B.current = !0, _(() => {
2882
+ B.current = !1, g(null);
2883
+ }));
2884
+ } else
2885
+ _(() => {
2886
+ g(W(I.target, I)), y(!0);
2887
+ });
2888
+ }
2889
+ function F() {
2890
+ _(() => {
2891
+ B.current = !1, N.current = !1, g(null);
2892
+ });
2893
+ }
2894
+ J(() => {
2895
+ function I() {
2896
+ clearTimeout(L.current), g(null);
2897
+ }
2898
+ return window.addEventListener("scroll", I, {
2899
+ capture: !0,
2900
+ passive: !0
2901
+ }), () => {
2902
+ clearTimeout(L.current), window.removeEventListener("scroll", I, { capture: !0 });
2903
+ };
2904
+ }, []);
2905
+ const j = [
2906
+ "wx-tooltip",
2907
+ c,
2908
+ t && T?.side === "top" ? "wx-arrow-top" : "",
2909
+ t && T?.side === "bottom" ? "wx-arrow-bottom" : "",
2910
+ t && T?.side === "left" ? "wx-arrow-left" : "",
2911
+ t && T?.side === "right" ? "wx-arrow-right" : "",
2912
+ b ? "" : "wx-tooltip-transition",
2913
+ "wx-aab5ZNfz"
2914
+ ].filter(Boolean).join(" ");
2915
+ return /* @__PURE__ */ C(
2916
+ "div",
2917
+ {
2918
+ ref: v,
2919
+ className: "wx-tooltip-area wx-aab5ZNfz",
2920
+ role: "none",
2921
+ onMouseMove: Z,
2922
+ onMouseLeave: F,
2923
+ children: [
2924
+ P ? /* @__PURE__ */ r(Qe, { children: /* @__PURE__ */ r(
2925
+ "div",
2926
+ {
2927
+ className: j,
2928
+ role: "tooltip",
2929
+ ref: x,
2930
+ style: {
2931
+ translate: `${T?.x ?? 0}px ${T?.y ?? 0}px`,
2932
+ zIndex: T?.z ?? 20,
2933
+ visibility: T ? void 0 : "hidden",
2934
+ "--wx-arrow-offset": T?.arrowOffset ?? "50%"
2935
+ },
2936
+ children: /* @__PURE__ */ r("div", { className: "wx-tooltip-wrapper wx-aab5ZNfz", children: /* @__PURE__ */ r("div", { className: "wx-tooltip-inner wx-aab5ZNfz", children: typeof m.result == "string" ? a ? /* @__PURE__ */ r(a, { data: m.result }) : /* @__PURE__ */ r("div", { className: "wx-tooltip-text wx-aab5ZNfz", children: m.result }) : a ? /* @__PURE__ */ r(a, { ...m.result }) : /* @__PURE__ */ r("div", { className: "wx-tooltip-text wx-aab5ZNfz", children: m.result?.data }) }) })
2937
+ }
2938
+ ) }) : null,
2939
+ o
2940
+ ]
2941
+ }
2942
+ );
2943
+ }
2944
+ function Nn({ children: e }) {
2945
+ return /* @__PURE__ */ r("div", { className: "wx-KgpO9N wx-modal", children: /* @__PURE__ */ r("div", { className: "wx-KgpO9N wx-window", children: e }) });
2946
+ }
2947
+ function kn({ position: e = "right", css: n = "", children: t, onCancel: s }) {
2948
+ const l = S(null);
2949
+ return J(() => Ne(l.current, s).destroy, []), /* @__PURE__ */ r("div", { ref: l, className: `wx-2L733M wx-sidearea wx-pos-${e} ${n}`, children: t });
2950
+ }
2951
+ const Be = "#dfe2e6", Ee = "#2c2f3c", Yt = 0.75;
2952
+ function Oe(e) {
2705
2953
  if (e = e?.trim() || "", !e) return "";
2706
2954
  const n = e.split(/\s+/);
2707
2955
  return (n[0][0] + (n[1]?.[0] || "")).toUpperCase().slice(0, 2);
2708
2956
  }
2709
- function Bt(e) {
2957
+ function jt(e) {
2710
2958
  let n = e.replace("#", "");
2711
- if (n.length === 3 && (n = n[0] + n[0] + n[1] + n[1] + n[2] + n[2]), n.length !== 6) return He;
2712
- const t = parseInt(n.slice(0, 2), 16) / 255, s = parseInt(n.slice(2, 4), 16) / 255, r = parseInt(n.slice(4, 6), 16) / 255;
2713
- return 0.299 * t + 0.587 * s + 0.114 * r > 0.5 ? He : "#ffffff";
2959
+ if (n.length === 3 && (n = n[0] + n[0] + n[1] + n[1] + n[2] + n[2]), n.length !== 6) return Ee;
2960
+ const t = parseInt(n.slice(0, 2), 16) / 255, s = parseInt(n.slice(2, 4), 16) / 255, l = parseInt(n.slice(4, 6), 16) / 255;
2961
+ return 0.299 * t + 0.587 * s + 0.114 * l > 0.5 ? Ee : "#ffffff";
2714
2962
  }
2715
- function hn(e) {
2716
- const { value: n, size: t = 32, limit: s } = e, r = C(null), [u, i] = B(null), c = A(() => n ? Array.isArray(n) ? n : [n] : [], [n]), a = A(() => {
2717
- if (u == null || u <= 0)
2963
+ function yn(e) {
2964
+ const { value: n, size: t = 32, limit: s, css: l = "" } = e, i = S(null), [a, o] = O(null), c = E(() => n ? Array.isArray(n) ? n : [n] : [], [n]), u = E(() => {
2965
+ if (a == null || a <= 0)
2718
2966
  return null;
2719
- const f = 1 + (u / t - 1) / At;
2967
+ const f = 1 + (a / t - 1) / Yt;
2720
2968
  return Math.max(1, Math.floor(f));
2721
- }, [u, t]), o = A(() => {
2969
+ }, [a, t]), d = E(() => {
2722
2970
  const f = s != null ? Math.min(c.length, s) : c.length;
2723
- return a != null ? Math.min(f, a) : f;
2724
- }, [c, s, a]), w = A(() => c.slice(0, o), [c, o]), d = A(() => Math.max(0, c.length - o), [c, o]);
2725
- E(() => {
2726
- const f = r.current;
2971
+ return u != null ? Math.min(f, u) : f;
2972
+ }, [c, s, u]), p = E(() => c.slice(0, d), [c, d]), w = E(() => Math.max(0, c.length - d), [c, d]);
2973
+ J(() => {
2974
+ const f = i.current;
2727
2975
  if (!f) return;
2728
- const h = new ResizeObserver((m) => {
2976
+ const x = new ResizeObserver((m) => {
2729
2977
  const g = m[0];
2730
- g && i(g.contentRect.width);
2978
+ g && o(g.contentRect.width);
2731
2979
  });
2732
- return h.observe(f), () => h.disconnect();
2980
+ return x.observe(f), () => x.disconnect();
2733
2981
  }, []);
2734
- const p = Math.round(t * 0.4), v = {
2982
+ const h = Math.round(t * 0.4), v = {
2735
2983
  width: t + "px",
2736
2984
  height: t + "px",
2737
2985
  minWidth: t + "px",
2738
2986
  minHeight: t + "px",
2739
- fontSize: p + "px"
2987
+ fontSize: h + "px"
2740
2988
  };
2741
- function x(f, h) {
2742
- const m = h === 0 ? "0" : `${t * -0.25}px`, g = f.avatar ? "transparent" : f.color || Fe, V = f.avatar ? "transparent" : Bt(f.color || Fe);
2743
- return { marginLeft: m, backgroundColor: g, color: V };
2989
+ function N(f, x) {
2990
+ const m = x === 0 ? "0" : `${t * -0.25}px`, g = f.avatar ? "transparent" : f.color || Be, T = f.avatar ? "transparent" : jt(f.color || Be);
2991
+ return { marginLeft: m, backgroundColor: g, color: T };
2744
2992
  }
2745
- return /* @__PURE__ */ l("div", { className: "wx-avatar-root wx-aadkRiRf", ref: r, children: w.length > 0 && /* @__PURE__ */ l("div", { className: "wx-avatar-stack wx-aadkRiRf", children: w.map((f, h) => /* @__PURE__ */ $(
2993
+ return /* @__PURE__ */ r("div", { className: `wx-avatar-root wx-aadkRiRf ${l}`, ref: i, children: p.length > 0 && /* @__PURE__ */ r("div", { className: "wx-avatar-stack wx-aadkRiRf", children: p.map((f, x) => /* @__PURE__ */ C(
2746
2994
  "div",
2747
2995
  {
2748
2996
  className: [
2749
2997
  "wx-avatar",
2750
2998
  "wx-avatar-item",
2751
- h === w.length - 1 && d > 0 ? "wx-avatar-overflow" : "",
2999
+ x === p.length - 1 && w > 0 ? "wx-avatar-overflow" : "",
2752
3000
  "wx-aadkRiRf"
2753
3001
  ].filter(Boolean).join(" "),
2754
- style: { ...v, ...x(f, h) },
3002
+ style: { ...v, ...N(f, x) },
2755
3003
  children: [
2756
- f.avatar ? /* @__PURE__ */ l("img", { src: f.avatar, alt: "", loading: "lazy" }) : Pe(f.name) ? /* @__PURE__ */ l("span", { className: "wx-aadkRiRf", children: Pe(f.name) }) : null,
2757
- h === w.length - 1 && d > 0 && /* @__PURE__ */ $("span", { className: "wx-avatar-overflow-badge wx-aadkRiRf", children: [
3004
+ f.avatar ? /* @__PURE__ */ r("img", { src: f.avatar, alt: "", loading: "lazy" }) : Oe(f.name) ? /* @__PURE__ */ r("span", { className: "wx-aadkRiRf", children: Oe(f.name) }) : null,
3005
+ x === p.length - 1 && w > 0 && /* @__PURE__ */ C("span", { className: "wx-avatar-overflow-badge wx-aadkRiRf", children: [
2758
3006
  "+",
2759
- d
3007
+ w
2760
3008
  ] })
2761
3009
  ]
2762
3010
  },
2763
3011
  f.id
2764
3012
  )) }) });
2765
3013
  }
2766
- function Et() {
2767
- return /* @__PURE__ */ l(_, {});
3014
+ function Jt() {
3015
+ return /* @__PURE__ */ r(Q, {});
2768
3016
  }
2769
- function pn(e) {
3017
+ function bn(e) {
2770
3018
  const { fonts: n = !0, children: t } = e;
2771
- return /* @__PURE__ */ l(ie.Provider, { value: "material", children: /* @__PURE__ */ $(_, { children: [
2772
- t && /* @__PURE__ */ l("div", { className: "wx-theme wx-material-theme", children: t }),
2773
- n && /* @__PURE__ */ $(_, { children: [
2774
- /* @__PURE__ */ l(
3019
+ return /* @__PURE__ */ r(ie.Provider, { value: "material", children: /* @__PURE__ */ C(Q, { children: [
3020
+ t && /* @__PURE__ */ r("div", { className: "wx-theme wx-material-theme", children: t }),
3021
+ n && /* @__PURE__ */ C(Q, { children: [
3022
+ /* @__PURE__ */ r(
2775
3023
  "link",
2776
3024
  {
2777
3025
  rel: "preconnect",
@@ -2779,8 +3027,8 @@ function pn(e) {
2779
3027
  crossOrigin: "true"
2780
3028
  }
2781
3029
  ),
2782
- /* @__PURE__ */ l(Et, {}),
2783
- /* @__PURE__ */ l(
3030
+ /* @__PURE__ */ r(Jt, {}),
3031
+ /* @__PURE__ */ r(
2784
3032
  "link",
2785
3033
  {
2786
3034
  rel: "stylesheet",
@@ -2790,15 +3038,15 @@ function pn(e) {
2790
3038
  ] })
2791
3039
  ] }) });
2792
3040
  }
2793
- function Je() {
2794
- return /* @__PURE__ */ l(_, {});
3041
+ function qe() {
3042
+ return /* @__PURE__ */ r(Q, {});
2795
3043
  }
2796
- function vn(e) {
3044
+ function Dn(e) {
2797
3045
  const { fonts: n = !0, children: t } = e;
2798
- return /* @__PURE__ */ l(ie.Provider, { value: "willow", children: /* @__PURE__ */ $(_, { children: [
2799
- t && t && /* @__PURE__ */ l("div", { className: "wx-theme wx-willow-theme", children: t }),
2800
- n && /* @__PURE__ */ $(_, { children: [
2801
- /* @__PURE__ */ l(
3046
+ return /* @__PURE__ */ r(ie.Provider, { value: "willow", children: /* @__PURE__ */ C(Q, { children: [
3047
+ t && t && /* @__PURE__ */ r("div", { className: "wx-theme wx-willow-theme", children: t }),
3048
+ n && /* @__PURE__ */ C(Q, { children: [
3049
+ /* @__PURE__ */ r(
2802
3050
  "link",
2803
3051
  {
2804
3052
  rel: "preconnect",
@@ -2806,8 +3054,8 @@ function vn(e) {
2806
3054
  crossOrigin: "true"
2807
3055
  }
2808
3056
  ),
2809
- /* @__PURE__ */ l(Je, {}),
2810
- /* @__PURE__ */ l(
3057
+ /* @__PURE__ */ r(qe, {}),
3058
+ /* @__PURE__ */ r(
2811
3059
  "link",
2812
3060
  {
2813
3061
  rel: "stylesheet",
@@ -2817,12 +3065,12 @@ function vn(e) {
2817
3065
  ] })
2818
3066
  ] }) });
2819
3067
  }
2820
- function gn(e) {
3068
+ function $n(e) {
2821
3069
  const { fonts: n = !0, children: t } = e;
2822
- return /* @__PURE__ */ l(ie.Provider, { value: "willow-dark", children: /* @__PURE__ */ $(_, { children: [
2823
- t && t && /* @__PURE__ */ l("div", { className: "wx-theme wx-willow-dark-theme", children: t }),
2824
- n && /* @__PURE__ */ $(_, { children: [
2825
- /* @__PURE__ */ l(
3070
+ return /* @__PURE__ */ r(ie.Provider, { value: "willow-dark", children: /* @__PURE__ */ C(Q, { children: [
3071
+ t && t && /* @__PURE__ */ r("div", { className: "wx-theme wx-willow-dark-theme", children: t }),
3072
+ n && /* @__PURE__ */ C(Q, { children: [
3073
+ /* @__PURE__ */ r(
2826
3074
  "link",
2827
3075
  {
2828
3076
  rel: "preconnect",
@@ -2830,8 +3078,8 @@ function gn(e) {
2830
3078
  crossOrigin: "true"
2831
3079
  }
2832
3080
  ),
2833
- /* @__PURE__ */ l(Je, {}),
2834
- /* @__PURE__ */ l(
3081
+ /* @__PURE__ */ r(qe, {}),
3082
+ /* @__PURE__ */ r(
2835
3083
  "link",
2836
3084
  {
2837
3085
  rel: "stylesheet",
@@ -2841,58 +3089,59 @@ function gn(e) {
2841
3089
  ] })
2842
3090
  ] }) });
2843
3091
  }
2844
- function Nn(e) {
2845
- const n = oe();
3092
+ function Tn(e) {
3093
+ const n = ae();
2846
3094
  e.setAttribute("data-wx-portal-root", n);
2847
3095
  }
2848
- et(pe);
3096
+ st(ge);
2849
3097
  export {
2850
- hn as Avatar,
2851
- re as Button,
2852
- Dt as Calendar,
2853
- Ye as Checkbox,
2854
- Qt as CheckboxGroup,
2855
- ot as ColorBoard,
2856
- Kt as ColorPicker,
2857
- qt as ColorSelect,
2858
- Zt as Combo,
2859
- dn as Counter,
2860
- zt as DatePicker,
2861
- Xt as DateRangePicker,
2862
- le as Dropdown,
2863
- Se as Field,
2864
- en as Fullscreen,
2865
- fn as Globals,
2866
- tn as Icon,
2867
- he as Locale,
2868
- pn as Material,
2869
- Lt as Modal,
2870
- xn as ModalArea,
2871
- ft as Month,
2872
- nn as MultiCombo,
2873
- rn as Pager,
2874
- lt as Popup,
2875
- nt as Portal,
2876
- It as RadioButton,
2877
- ln as RadioButtonGroup,
2878
- Tt as RangeCalendar,
2879
- cn as RichSelect,
2880
- sn as Segmented,
2881
- an as Select,
2882
- mn as SideArea,
2883
- Ce as Slider,
2884
- ge as SuggestDropdown,
2885
- on as Switch,
2886
- un as Tabs,
2887
- Ne as Text,
2888
- _t as TextArea,
2889
- wn as TimePicker,
2890
- Pt as TwoState,
2891
- vn as Willow,
2892
- gn as WillowDark,
2893
- Ut as context,
2894
- Vn as en,
2895
- bn as locale,
2896
- Nn as popupContainer
3098
+ yn as Avatar,
3099
+ le as Button,
3100
+ Rt as Calendar,
3101
+ Ze as Checkbox,
3102
+ Xt as CheckboxGroup,
3103
+ ft as ColorBoard,
3104
+ tn as ColorPicker,
3105
+ en as ColorSelect,
3106
+ nn as Combo,
3107
+ hn as Counter,
3108
+ rn as DatePicker,
3109
+ ln as DateRangePicker,
3110
+ se as Dropdown,
3111
+ Pe as Field,
3112
+ sn as Fullscreen,
3113
+ pn as Globals,
3114
+ cn as Icon,
3115
+ ve as Locale,
3116
+ bn as Material,
3117
+ At as Modal,
3118
+ Nn as ModalArea,
3119
+ ht as Month,
3120
+ on as MultiCombo,
3121
+ an as Pager,
3122
+ at as Popup,
3123
+ Qe as Portal,
3124
+ Ft as RadioButton,
3125
+ un as RadioButtonGroup,
3126
+ Ct as RangeCalendar,
3127
+ dn as RichSelect,
3128
+ fn as Segmented,
3129
+ wn as Select,
3130
+ kn as SideArea,
3131
+ Fe as Slider,
3132
+ ke as SuggestDropdown,
3133
+ xn as Switch,
3134
+ mn as Tabs,
3135
+ ye as Text,
3136
+ Kt as TextArea,
3137
+ vn as TimePicker,
3138
+ gn as Tooltip,
3139
+ Ot as TwoState,
3140
+ Dn as Willow,
3141
+ $n as WillowDark,
3142
+ qt as context,
3143
+ Cn as en,
3144
+ Mn as locale,
3145
+ Tn as popupContainer
2897
3146
  };
2898
3147
  //# sourceMappingURL=index.es.js.map