n-design-readonly-plugin 1.0.10 → 1.0.12

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,48 +1,48 @@
1
- import { nextTick as Be, h as k, createVNode as ne, defineComponent as ze, inject as ce, ref as H, computed as M, provide as ue, useAttrs as Ue } from "vue";
2
- import { message as B, Form as se, Checkbox as de, Radio as pe, Select as be, Switch as We, TimePicker as Ge, DatePicker as qe, Cascader as Ke, TreeSelect as Ve, Textarea as Ye, InputNumber as Je, Input as Ze } from "n-designv3";
3
- function C(e, t) {
4
- Qe(e) && (e = "100%");
5
- var r = Xe(e);
1
+ import { nextTick as We, h as T, createVNode as ae, defineComponent as Ge, inject as ue, ref as B, computed as R, provide as se, useAttrs as qe } from "vue";
2
+ import { message as z, Form as de, Checkbox as pe, Radio as be, TimePicker as ye, DatePicker as ge, Select as me, Switch as Ke, Cascader as Ve, TreeSelect as Ye, Textarea as Je, InputNumber as Ze, Input as Qe } from "n-designv3";
3
+ function w(e, t) {
4
+ Xe(e) && (e = "100%");
5
+ var r = er(e);
6
6
  return e = t === 360 ? e : Math.min(t, Math.max(0, parseFloat(e))), r && (e = parseInt(String(e * t), 10) / 100), Math.abs(e - t) < 1e-6 ? 1 : (t === 360 ? e = (e < 0 ? e % t + t : e % t) / parseFloat(String(t)) : e = e % t / parseFloat(String(t)), e);
7
7
  }
8
- function Qe(e) {
8
+ function Xe(e) {
9
9
  return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1;
10
10
  }
11
- function Xe(e) {
11
+ function er(e) {
12
12
  return typeof e == "string" && e.indexOf("%") !== -1;
13
13
  }
14
- function er(e) {
14
+ function rr(e) {
15
15
  return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e;
16
16
  }
17
- function z(e) {
17
+ function U(e) {
18
18
  return e <= 1 ? "".concat(Number(e) * 100, "%") : e;
19
19
  }
20
- function J(e) {
20
+ function Z(e) {
21
21
  return e.length === 1 ? "0" + e : String(e);
22
22
  }
23
- function rr(e, t, r) {
23
+ function tr(e, t, r) {
24
24
  return {
25
- r: C(e, 255) * 255,
26
- g: C(t, 255) * 255,
27
- b: C(r, 255) * 255
25
+ r: w(e, 255) * 255,
26
+ g: w(t, 255) * 255,
27
+ b: w(r, 255) * 255
28
28
  };
29
29
  }
30
- function Z(e, t, r) {
30
+ function Q(e, t, r) {
31
31
  return r < 0 && (r += 1), r > 1 && (r -= 1), r < 1 / 6 ? e + (t - e) * (6 * r) : r < 1 / 2 ? t : r < 2 / 3 ? e + (t - e) * (2 / 3 - r) * 6 : e;
32
32
  }
33
- function tr(e, t, r) {
33
+ function nr(e, t, r) {
34
34
  var n, a, o;
35
- if (e = C(e, 360), t = C(t, 100), r = C(r, 100), t === 0)
35
+ if (e = w(e, 360), t = w(t, 100), r = w(r, 100), t === 0)
36
36
  a = r, o = r, n = r;
37
37
  else {
38
38
  var i = r < 0.5 ? r * (1 + t) : r + t - r * t, l = 2 * r - i;
39
- n = Z(l, i, e + 1 / 3), a = Z(l, i, e), o = Z(l, i, e - 1 / 3);
39
+ n = Q(l, i, e + 1 / 3), a = Q(l, i, e), o = Q(l, i, e - 1 / 3);
40
40
  }
41
41
  return { r: n * 255, g: a * 255, b: o * 255 };
42
42
  }
43
- function nr(e, t, r) {
44
- e = C(e, 255), t = C(t, 255), r = C(r, 255);
45
- var n = Math.max(e, t, r), a = Math.min(e, t, r), o = 0, i = n, l = n - a, f = n === 0 ? 0 : l / n;
43
+ function ar(e, t, r) {
44
+ e = w(e, 255), t = w(t, 255), r = w(r, 255);
45
+ var n = Math.max(e, t, r), a = Math.min(e, t, r), o = 0, i = n, l = n - a, c = n === 0 ? 0 : l / n;
46
46
  if (n === a)
47
47
  o = 0;
48
48
  else {
@@ -59,28 +59,28 @@ function nr(e, t, r) {
59
59
  }
60
60
  o /= 6;
61
61
  }
62
- return { h: o, s: f, v: i };
62
+ return { h: o, s: c, v: i };
63
63
  }
64
- function ar(e, t, r) {
65
- e = C(e, 360) * 6, t = C(t, 100), r = C(r, 100);
66
- var n = Math.floor(e), a = e - n, o = r * (1 - t), i = r * (1 - a * t), l = r * (1 - (1 - a) * t), f = n % 6, c = [r, i, o, o, l, r][f], s = [l, r, r, i, o, o][f], S = [o, o, l, r, r, i][f];
67
- return { r: c * 255, g: s * 255, b: S * 255 };
64
+ function or(e, t, r) {
65
+ e = w(e, 360) * 6, t = w(t, 100), r = w(r, 100);
66
+ var n = Math.floor(e), a = e - n, o = r * (1 - t), i = r * (1 - a * t), l = r * (1 - (1 - a) * t), c = n % 6, f = [r, i, o, o, l, r][c], s = [l, r, r, i, o, o][c], S = [o, o, l, r, r, i][c];
67
+ return { r: f * 255, g: s * 255, b: S * 255 };
68
68
  }
69
- function or(e, t, r, n) {
69
+ function ir(e, t, r, n) {
70
70
  var a = [
71
- J(Math.round(e).toString(16)),
72
- J(Math.round(t).toString(16)),
73
- J(Math.round(r).toString(16))
71
+ Z(Math.round(e).toString(16)),
72
+ Z(Math.round(t).toString(16)),
73
+ Z(Math.round(r).toString(16))
74
74
  ];
75
75
  return a.join("");
76
76
  }
77
- function ye(e) {
78
- return h(e) / 255;
77
+ function he(e) {
78
+ return k(e) / 255;
79
79
  }
80
- function h(e) {
80
+ function k(e) {
81
81
  return parseInt(e, 16);
82
82
  }
83
- var ge = {
83
+ var ve = {
84
84
  aliceblue: "#f0f8ff",
85
85
  antiquewhite: "#faebd7",
86
86
  aqua: "#00ffff",
@@ -230,9 +230,9 @@ var ge = {
230
230
  yellow: "#ffff00",
231
231
  yellowgreen: "#9acd32"
232
232
  };
233
- function $(e) {
233
+ function M(e) {
234
234
  var t = { r: 0, g: 0, b: 0 }, r = 1, n = null, a = null, o = null, i = !1, l = !1;
235
- return typeof e == "string" && (e = fr(e)), typeof e == "object" && (O(e.r) && O(e.g) && O(e.b) ? (t = rr(e.r, e.g, e.b), i = !0, l = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : O(e.h) && O(e.s) && O(e.v) ? (n = z(e.s), a = z(e.v), t = ar(e.h, n, a), i = !0, l = "hsv") : O(e.h) && O(e.s) && O(e.l) && (n = z(e.s), o = z(e.l), t = tr(e.h, n, o), i = !0, l = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (r = e.a)), r = er(r), {
235
+ return typeof e == "string" && (e = fr(e)), typeof e == "object" && (O(e.r) && O(e.g) && O(e.b) ? (t = tr(e.r, e.g, e.b), i = !0, l = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : O(e.h) && O(e.s) && O(e.v) ? (n = U(e.s), a = U(e.v), t = or(e.h, n, a), i = !0, l = "hsv") : O(e.h) && O(e.s) && O(e.l) && (n = U(e.s), o = U(e.l), t = nr(e.h, n, o), i = !0, l = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (r = e.a)), r = rr(r), {
236
236
  ok: i,
237
237
  format: e.format || l,
238
238
  r: Math.min(255, Math.max(t.r, 0)),
@@ -241,14 +241,14 @@ function $(e) {
241
241
  a: r
242
242
  };
243
243
  }
244
- var ir = "[-\\+]?\\d+%?", lr = "[-\\+]?\\d*\\.\\d+%?", P = "(?:".concat(lr, ")|(?:").concat(ir, ")"), Q = "[\\s|\\(]+(".concat(P, ")[,|\\s]+(").concat(P, ")[,|\\s]+(").concat(P, ")\\s*\\)?"), X = "[\\s|\\(]+(".concat(P, ")[,|\\s]+(").concat(P, ")[,|\\s]+(").concat(P, ")[,|\\s]+(").concat(P, ")\\s*\\)?"), x = {
245
- CSS_UNIT: new RegExp(P),
246
- rgb: new RegExp("rgb" + Q),
247
- rgba: new RegExp("rgba" + X),
248
- hsl: new RegExp("hsl" + Q),
249
- hsla: new RegExp("hsla" + X),
250
- hsv: new RegExp("hsv" + Q),
251
- hsva: new RegExp("hsva" + X),
244
+ var lr = "[-\\+]?\\d+%?", cr = "[-\\+]?\\d*\\.\\d+%?", N = "(?:".concat(cr, ")|(?:").concat(lr, ")"), X = "[\\s|\\(]+(".concat(N, ")[,|\\s]+(").concat(N, ")[,|\\s]+(").concat(N, ")\\s*\\)?"), ee = "[\\s|\\(]+(".concat(N, ")[,|\\s]+(").concat(N, ")[,|\\s]+(").concat(N, ")[,|\\s]+(").concat(N, ")\\s*\\)?"), x = {
245
+ CSS_UNIT: new RegExp(N),
246
+ rgb: new RegExp("rgb" + X),
247
+ rgba: new RegExp("rgba" + ee),
248
+ hsl: new RegExp("hsl" + X),
249
+ hsla: new RegExp("hsla" + ee),
250
+ hsv: new RegExp("hsv" + X),
251
+ hsva: new RegExp("hsva" + ee),
252
252
  hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
253
253
  hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
254
254
  hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
@@ -258,39 +258,39 @@ function fr(e) {
258
258
  if (e = e.trim().toLowerCase(), e.length === 0)
259
259
  return !1;
260
260
  var t = !1;
261
- if (ge[e])
262
- e = ge[e], t = !0;
261
+ if (ve[e])
262
+ e = ve[e], t = !0;
263
263
  else if (e === "transparent")
264
264
  return { r: 0, g: 0, b: 0, a: 0, format: "name" };
265
265
  var r = x.rgb.exec(e);
266
266
  return r ? { r: r[1], g: r[2], b: r[3] } : (r = x.rgba.exec(e), r ? { r: r[1], g: r[2], b: r[3], a: r[4] } : (r = x.hsl.exec(e), r ? { h: r[1], s: r[2], l: r[3] } : (r = x.hsla.exec(e), r ? { h: r[1], s: r[2], l: r[3], a: r[4] } : (r = x.hsv.exec(e), r ? { h: r[1], s: r[2], v: r[3] } : (r = x.hsva.exec(e), r ? { h: r[1], s: r[2], v: r[3], a: r[4] } : (r = x.hex8.exec(e), r ? {
267
- r: h(r[1]),
268
- g: h(r[2]),
269
- b: h(r[3]),
270
- a: ye(r[4]),
267
+ r: k(r[1]),
268
+ g: k(r[2]),
269
+ b: k(r[3]),
270
+ a: he(r[4]),
271
271
  format: t ? "name" : "hex8"
272
272
  } : (r = x.hex6.exec(e), r ? {
273
- r: h(r[1]),
274
- g: h(r[2]),
275
- b: h(r[3]),
273
+ r: k(r[1]),
274
+ g: k(r[2]),
275
+ b: k(r[3]),
276
276
  format: t ? "name" : "hex"
277
277
  } : (r = x.hex4.exec(e), r ? {
278
- r: h(r[1] + r[1]),
279
- g: h(r[2] + r[2]),
280
- b: h(r[3] + r[3]),
281
- a: ye(r[4] + r[4]),
278
+ r: k(r[1] + r[1]),
279
+ g: k(r[2] + r[2]),
280
+ b: k(r[3] + r[3]),
281
+ a: he(r[4] + r[4]),
282
282
  format: t ? "name" : "hex8"
283
283
  } : (r = x.hex3.exec(e), r ? {
284
- r: h(r[1] + r[1]),
285
- g: h(r[2] + r[2]),
286
- b: h(r[3] + r[3]),
284
+ r: k(r[1] + r[1]),
285
+ g: k(r[2] + r[2]),
286
+ b: k(r[3] + r[3]),
287
287
  format: t ? "name" : "hex"
288
288
  } : !1)))))))));
289
289
  }
290
290
  function O(e) {
291
291
  return !!x.CSS_UNIT.exec(String(e));
292
292
  }
293
- var U = 2, me = 0.16, cr = 0.05, ur = 0.05, sr = 0.15, Ee = 5, Fe = 4, dr = [{
293
+ var W = 2, ke = 0.16, ur = 0.05, sr = 0.05, dr = 0.15, Fe = 5, Re = 4, pr = [{
294
294
  index: 7,
295
295
  opacity: 0.15
296
296
  }, {
@@ -321,19 +321,19 @@ var U = 2, me = 0.16, cr = 0.05, ur = 0.05, sr = 0.15, Ee = 5, Fe = 4, dr = [{
321
321
  index: 1,
322
322
  opacity: 0.98
323
323
  }];
324
- function ve(e) {
325
- var t = e.r, r = e.g, n = e.b, a = nr(t, r, n);
324
+ function Ce(e) {
325
+ var t = e.r, r = e.g, n = e.b, a = ar(t, r, n);
326
326
  return {
327
327
  h: a.h * 360,
328
328
  s: a.s,
329
329
  v: a.v
330
330
  };
331
331
  }
332
- function W(e) {
332
+ function G(e) {
333
333
  var t = e.r, r = e.g, n = e.b;
334
- return "#".concat(or(t, r, n));
334
+ return "#".concat(ir(t, r, n));
335
335
  }
336
- function pr(e, t, r) {
336
+ function br(e, t, r) {
337
337
  var n = r / 100, a = {
338
338
  r: (t.r - e.r) * n + e.r,
339
339
  g: (t.g - e.g) * n + e.g,
@@ -341,44 +341,44 @@ function pr(e, t, r) {
341
341
  };
342
342
  return a;
343
343
  }
344
- function he(e, t, r) {
344
+ function we(e, t, r) {
345
345
  var n;
346
- return Math.round(e.h) >= 60 && Math.round(e.h) <= 240 ? n = r ? Math.round(e.h) - U * t : Math.round(e.h) + U * t : n = r ? Math.round(e.h) + U * t : Math.round(e.h) - U * t, n < 0 ? n += 360 : n >= 360 && (n -= 360), n;
346
+ return Math.round(e.h) >= 60 && Math.round(e.h) <= 240 ? n = r ? Math.round(e.h) - W * t : Math.round(e.h) + W * t : n = r ? Math.round(e.h) + W * t : Math.round(e.h) - W * t, n < 0 ? n += 360 : n >= 360 && (n -= 360), n;
347
347
  }
348
- function we(e, t, r) {
348
+ function Se(e, t, r) {
349
349
  if (e.h === 0 && e.s === 0)
350
350
  return e.s;
351
351
  var n;
352
- return r ? n = e.s - me * t : t === Fe ? n = e.s + me : n = e.s + cr * t, n > 1 && (n = 1), r && t === Ee && n > 0.1 && (n = 0.1), n < 0.06 && (n = 0.06), Number(n.toFixed(2));
352
+ return r ? n = e.s - ke * t : t === Re ? n = e.s + ke : n = e.s + ur * t, n > 1 && (n = 1), r && t === Fe && n > 0.1 && (n = 0.1), n < 0.06 && (n = 0.06), Number(n.toFixed(2));
353
353
  }
354
- function Ce(e, t, r) {
354
+ function xe(e, t, r) {
355
355
  var n;
356
- return r ? n = e.v + ur * t : n = e.v - sr * t, n > 1 && (n = 1), Number(n.toFixed(2));
357
- }
358
- function ae(e) {
359
- for (var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = [], n = $(e), a = Ee; a > 0; a -= 1) {
360
- var o = ve(n), i = W($({
361
- h: he(o, a, !0),
362
- s: we(o, a, !0),
363
- v: Ce(o, a, !0)
356
+ return r ? n = e.v + sr * t : n = e.v - dr * t, n > 1 && (n = 1), Number(n.toFixed(2));
357
+ }
358
+ function oe(e) {
359
+ for (var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = [], n = M(e), a = Fe; a > 0; a -= 1) {
360
+ var o = Ce(n), i = G(M({
361
+ h: we(o, a, !0),
362
+ s: Se(o, a, !0),
363
+ v: xe(o, a, !0)
364
364
  }));
365
365
  r.push(i);
366
366
  }
367
- r.push(W(n));
368
- for (var l = 1; l <= Fe; l += 1) {
369
- var f = ve(n), c = W($({
370
- h: he(f, l),
371
- s: we(f, l),
372
- v: Ce(f, l)
367
+ r.push(G(n));
368
+ for (var l = 1; l <= Re; l += 1) {
369
+ var c = Ce(n), f = G(M({
370
+ h: we(c, l),
371
+ s: Se(c, l),
372
+ v: xe(c, l)
373
373
  }));
374
- r.push(c);
374
+ r.push(f);
375
375
  }
376
- return t.theme === "dark" ? dr.map(function(s) {
377
- var S = s.index, g = s.opacity, T = W(pr($(t.backgroundColor || "#141414"), $(r[S]), g * 100));
378
- return T;
376
+ return t.theme === "dark" ? pr.map(function(s) {
377
+ var S = s.index, m = s.opacity, P = G(br(M(t.backgroundColor || "#141414"), M(r[S]), m * 100));
378
+ return P;
379
379
  }) : r;
380
380
  }
381
- var ee = {
381
+ var re = {
382
382
  red: "#F5222D",
383
383
  volcano: "#FA541C",
384
384
  orange: "#FA8C16",
@@ -392,45 +392,45 @@ var ee = {
392
392
  purple: "#722ED1",
393
393
  magenta: "#EB2F96",
394
394
  grey: "#666666"
395
- }, re = {}, te = {};
396
- Object.keys(ee).forEach(function(e) {
397
- re[e] = ae(ee[e]), re[e].primary = re[e][5], te[e] = ae(ee[e], {
395
+ }, te = {}, ne = {};
396
+ Object.keys(re).forEach(function(e) {
397
+ te[e] = oe(re[e]), te[e].primary = te[e][5], ne[e] = oe(re[e], {
398
398
  theme: "dark",
399
399
  backgroundColor: "#141414"
400
- }), te[e].primary = te[e][5];
400
+ }), ne[e].primary = ne[e][5];
401
401
  });
402
- var Se = [], R = [], br = "insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";
403
- function yr() {
402
+ var Oe = [], $ = [], yr = "insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";
403
+ function gr() {
404
404
  var e = document.createElement("style");
405
405
  return e.setAttribute("type", "text/css"), e;
406
406
  }
407
- function gr(e, t) {
407
+ function mr(e, t) {
408
408
  if (t = t || {}, e === void 0)
409
- throw new Error(br);
410
- var r = t.prepend === !0 ? "prepend" : "append", n = t.container !== void 0 ? t.container : document.querySelector("head"), a = Se.indexOf(n);
411
- a === -1 && (a = Se.push(n) - 1, R[a] = {});
409
+ throw new Error(yr);
410
+ var r = t.prepend === !0 ? "prepend" : "append", n = t.container !== void 0 ? t.container : document.querySelector("head"), a = Oe.indexOf(n);
411
+ a === -1 && (a = Oe.push(n) - 1, $[a] = {});
412
412
  var o;
413
- return R[a] !== void 0 && R[a][r] !== void 0 ? o = R[a][r] : (o = R[a][r] = yr(), r === "prepend" ? n.insertBefore(o, n.childNodes[0]) : n.appendChild(o)), e.charCodeAt(0) === 65279 && (e = e.substr(1, e.length)), o.styleSheet ? o.styleSheet.cssText += e : o.textContent += e, o;
413
+ return $[a] !== void 0 && $[a][r] !== void 0 ? o = $[a][r] : (o = $[a][r] = gr(), r === "prepend" ? n.insertBefore(o, n.childNodes[0]) : n.appendChild(o)), e.charCodeAt(0) === 65279 && (e = e.substr(1, e.length)), o.styleSheet ? o.styleSheet.cssText += e : o.textContent += e, o;
414
414
  }
415
- function xe(e) {
415
+ function Te(e) {
416
416
  for (var t = 1; t < arguments.length; t++) {
417
417
  var r = arguments[t] != null ? Object(arguments[t]) : {}, n = Object.keys(r);
418
418
  typeof Object.getOwnPropertySymbols == "function" && n.push.apply(n, Object.getOwnPropertySymbols(r).filter(function(a) {
419
419
  return Object.getOwnPropertyDescriptor(r, a).enumerable;
420
420
  })), n.forEach(function(a) {
421
- mr(e, a, r[a]);
421
+ hr(e, a, r[a]);
422
422
  });
423
423
  }
424
424
  return e;
425
425
  }
426
- function mr(e, t, r) {
426
+ function hr(e, t, r) {
427
427
  return t = vr(t), t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
428
428
  }
429
429
  function vr(e) {
430
- var t = hr(e, "string");
430
+ var t = kr(e, "string");
431
431
  return typeof t == "symbol" ? t : String(t);
432
432
  }
433
- function hr(e, t) {
433
+ function kr(e, t) {
434
434
  if (typeof e != "object" || e === null) return e;
435
435
  var r = e[Symbol.toPrimitive];
436
436
  if (r !== void 0) {
@@ -440,30 +440,30 @@ function hr(e, t) {
440
440
  }
441
441
  return (t === "string" ? String : Number)(e);
442
442
  }
443
- function wr(e, t) {
443
+ function Cr(e, t) {
444
444
  process.env.NODE_ENV !== "production" && !e && console !== void 0 && console.error("Warning: ".concat(t));
445
445
  }
446
- function Cr(e, t) {
447
- wr(e, "[@nancal-icon/icons-vue] ".concat(t));
446
+ function wr(e, t) {
447
+ Cr(e, "[@nancal-icon/icons-vue] ".concat(t));
448
448
  }
449
- function Oe(e) {
449
+ function Pe(e) {
450
450
  return typeof e == "object" && typeof e.name == "string" && typeof e.theme == "string" && (typeof e.icon == "object" || typeof e.icon == "function");
451
451
  }
452
- function oe(e, t, r) {
453
- return r ? k(e.tag, xe({
452
+ function ie(e, t, r) {
453
+ return r ? T(e.tag, Te({
454
454
  key: t
455
455
  }, r, e.attrs), (e.children || []).map(function(n, a) {
456
- return oe(n, "".concat(t, "-").concat(e.tag, "-").concat(a));
457
- })) : k(e.tag, xe({
456
+ return ie(n, "".concat(t, "-").concat(e.tag, "-").concat(a));
457
+ })) : T(e.tag, Te({
458
458
  key: t
459
459
  }, e.attrs), (e.children || []).map(function(n, a) {
460
- return oe(n, "".concat(t, "-").concat(e.tag, "-").concat(a));
460
+ return ie(n, "".concat(t, "-").concat(e.tag, "-").concat(a));
461
461
  }));
462
462
  }
463
- function Ie(e) {
464
- return ae(e)[0];
465
- }
466
463
  function Me(e) {
464
+ return oe(e)[0];
465
+ }
466
+ function $e(e) {
467
467
  return e ? Array.isArray(e) ? e : [e] : [];
468
468
  }
469
469
  var Sr = `
@@ -520,17 +520,17 @@ var Sr = `
520
520
  transform: rotate(360deg);
521
521
  }
522
522
  }
523
- `, ke = !1, xr = function() {
523
+ `, Ae = !1, xr = function() {
524
524
  var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Sr;
525
- Be(function() {
526
- ke || (typeof window < "u" && window.document && window.document.documentElement && gr(t, {
525
+ We(function() {
526
+ Ae || (typeof window < "u" && window.document && window.document.documentElement && mr(t, {
527
527
  prepend: !0
528
- }), ke = !0);
528
+ }), Ae = !0);
529
529
  });
530
530
  }, Or = ["icon", "primaryColor", "secondaryColor"];
531
- function kr(e, t) {
531
+ function Tr(e, t) {
532
532
  if (e == null) return {};
533
- var r = Tr(e, t), n, a;
533
+ var r = Pr(e, t), n, a;
534
534
  if (Object.getOwnPropertySymbols) {
535
535
  var o = Object.getOwnPropertySymbols(e);
536
536
  for (a = 0; a < o.length; a++)
@@ -538,14 +538,14 @@ function kr(e, t) {
538
538
  }
539
539
  return r;
540
540
  }
541
- function Tr(e, t) {
541
+ function Pr(e, t) {
542
542
  if (e == null) return {};
543
543
  var r = {}, n = Object.keys(e), a, o;
544
544
  for (o = 0; o < n.length; o++)
545
545
  a = n[o], !(t.indexOf(a) >= 0) && (r[a] = e[a]);
546
546
  return r;
547
547
  }
548
- function G(e) {
548
+ function q(e) {
549
549
  for (var t = 1; t < arguments.length; t++) {
550
550
  var r = arguments[t] != null ? Object(arguments[t]) : {}, n = Object.keys(r);
551
551
  typeof Object.getOwnPropertySymbols == "function" && n.push.apply(n, Object.getOwnPropertySymbols(r).filter(function(a) {
@@ -560,10 +560,10 @@ function Ar(e, t, r) {
560
560
  return t = jr(t), t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
561
561
  }
562
562
  function jr(e) {
563
- var t = Pr(e, "string");
563
+ var t = Nr(e, "string");
564
564
  return typeof t == "symbol" ? t : String(t);
565
565
  }
566
- function Pr(e, t) {
566
+ function Nr(e, t) {
567
567
  if (typeof e != "object" || e === null) return e;
568
568
  var r = e[Symbol.toPrimitive];
569
569
  if (r !== void 0) {
@@ -573,159 +573,159 @@ function Pr(e, t) {
573
573
  }
574
574
  return (t === "string" ? String : Number)(e);
575
575
  }
576
- var N = {
576
+ var _ = {
577
577
  primaryColor: "#333",
578
578
  secondaryColor: "#E6E6E6",
579
579
  calculated: !1
580
580
  };
581
- function Er(e) {
581
+ function Ir(e) {
582
582
  var t = e.primaryColor, r = e.secondaryColor;
583
- N.primaryColor = t, N.secondaryColor = r || Ie(t), N.calculated = !!r;
583
+ _.primaryColor = t, _.secondaryColor = r || Me(t), _.calculated = !!r;
584
584
  }
585
- function Fr() {
586
- return G({}, N);
585
+ function Er() {
586
+ return q({}, _);
587
587
  }
588
- var E = function(t, r) {
589
- var n = G({}, t, r.attrs), a = n.icon, o = n.primaryColor, i = n.secondaryColor, l = kr(n, Or), f = N;
590
- if (o && (f = {
588
+ var I = function(t, r) {
589
+ var n = q({}, t, r.attrs), a = n.icon, o = n.primaryColor, i = n.secondaryColor, l = Tr(n, Or), c = _;
590
+ if (o && (c = {
591
591
  primaryColor: o,
592
- secondaryColor: i || Ie(o)
593
- }), xr(), Cr(Oe(a), "icon should be icon definiton, but got ".concat(a)), !Oe(a))
592
+ secondaryColor: i || Me(o)
593
+ }), xr(), wr(Pe(a), "icon should be icon definiton, but got ".concat(a)), !Pe(a))
594
594
  return null;
595
- var c = a;
596
- return c && typeof c.icon == "function" && (c = G({}, c, {
597
- icon: c.icon(f.primaryColor, f.secondaryColor)
598
- })), oe(c.icon, "svg-".concat(c.name), G({}, l, {
599
- "data-icon": c.name,
595
+ var f = a;
596
+ return f && typeof f.icon == "function" && (f = q({}, f, {
597
+ icon: f.icon(c.primaryColor, c.secondaryColor)
598
+ })), ie(f.icon, "svg-".concat(f.name), q({}, l, {
599
+ "data-icon": f.name,
600
600
  width: "1em",
601
601
  height: "1em",
602
602
  fill: "currentColor",
603
603
  "aria-hidden": "true"
604
604
  }));
605
605
  };
606
- E.props = {
606
+ I.props = {
607
607
  icon: Object,
608
608
  primaryColor: String,
609
609
  secondaryColor: String,
610
610
  focusable: String
611
611
  };
612
- E.inheritAttrs = !1;
613
- E.displayName = "IconBase";
614
- E.getTwoToneColors = Fr;
615
- E.setTwoToneColors = Er;
616
- function Ir(e, t) {
617
- return Nr(e) || Rr(e, t) || $r(e, t) || Mr();
618
- }
619
- function Mr() {
612
+ I.inheritAttrs = !1;
613
+ I.displayName = "IconBase";
614
+ I.getTwoToneColors = Er;
615
+ I.setTwoToneColors = Ir;
616
+ function Fr(e, t) {
617
+ return _r(e) || $r(e, t) || Mr(e, t) || Rr();
618
+ }
619
+ function Rr() {
620
620
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
621
621
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
622
622
  }
623
- function $r(e, t) {
623
+ function Mr(e, t) {
624
624
  if (e) {
625
- if (typeof e == "string") return Te(e, t);
625
+ if (typeof e == "string") return je(e, t);
626
626
  var r = Object.prototype.toString.call(e).slice(8, -1);
627
627
  if (r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set") return Array.from(e);
628
- if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return Te(e, t);
628
+ if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return je(e, t);
629
629
  }
630
630
  }
631
- function Te(e, t) {
631
+ function je(e, t) {
632
632
  (t == null || t > e.length) && (t = e.length);
633
633
  for (var r = 0, n = new Array(t); r < t; r++) n[r] = e[r];
634
634
  return n;
635
635
  }
636
- function Rr(e, t) {
636
+ function $r(e, t) {
637
637
  var r = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
638
638
  if (r != null) {
639
- var n, a, o, i, l = [], f = !0, c = !1;
639
+ var n, a, o, i, l = [], c = !0, f = !1;
640
640
  try {
641
- if (o = (r = r.call(e)).next, t !== 0) for (; !(f = (n = o.call(r)).done) && (l.push(n.value), l.length !== t); f = !0) ;
641
+ if (o = (r = r.call(e)).next, t !== 0) for (; !(c = (n = o.call(r)).done) && (l.push(n.value), l.length !== t); c = !0) ;
642
642
  } catch (s) {
643
- c = !0, a = s;
643
+ f = !0, a = s;
644
644
  } finally {
645
645
  try {
646
- if (!f && r.return != null && (i = r.return(), Object(i) !== i)) return;
646
+ if (!c && r.return != null && (i = r.return(), Object(i) !== i)) return;
647
647
  } finally {
648
- if (c) throw a;
648
+ if (f) throw a;
649
649
  }
650
650
  }
651
651
  return l;
652
652
  }
653
653
  }
654
- function Nr(e) {
654
+ function _r(e) {
655
655
  if (Array.isArray(e)) return e;
656
656
  }
657
- function $e(e) {
658
- var t = Me(e), r = Ir(t, 2), n = r[0], a = r[1];
659
- return E.setTwoToneColors({
657
+ function _e(e) {
658
+ var t = $e(e), r = Fr(t, 2), n = r[0], a = r[1];
659
+ return I.setTwoToneColors({
660
660
  primaryColor: n,
661
661
  secondaryColor: a
662
662
  });
663
663
  }
664
- function _r() {
665
- var e = E.getTwoToneColors();
664
+ function Dr() {
665
+ var e = I.getTwoToneColors();
666
666
  return e.calculated ? [e.primaryColor, e.secondaryColor] : e.primaryColor;
667
667
  }
668
668
  var Lr = ["class", "icon", "spin", "rotate", "tabindex", "twoToneColor", "onClick"];
669
- function Dr(e, t) {
670
- return Ur(e) || zr(e, t) || Br(e, t) || Hr();
669
+ function Hr(e, t) {
670
+ return Wr(e) || Ur(e, t) || zr(e, t) || Br();
671
671
  }
672
- function Hr() {
672
+ function Br() {
673
673
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
674
674
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
675
675
  }
676
- function Br(e, t) {
676
+ function zr(e, t) {
677
677
  if (e) {
678
- if (typeof e == "string") return Ae(e, t);
678
+ if (typeof e == "string") return Ne(e, t);
679
679
  var r = Object.prototype.toString.call(e).slice(8, -1);
680
680
  if (r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set") return Array.from(e);
681
- if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return Ae(e, t);
681
+ if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return Ne(e, t);
682
682
  }
683
683
  }
684
- function Ae(e, t) {
684
+ function Ne(e, t) {
685
685
  (t == null || t > e.length) && (t = e.length);
686
686
  for (var r = 0, n = new Array(t); r < t; r++) n[r] = e[r];
687
687
  return n;
688
688
  }
689
- function zr(e, t) {
689
+ function Ur(e, t) {
690
690
  var r = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
691
691
  if (r != null) {
692
- var n, a, o, i, l = [], f = !0, c = !1;
692
+ var n, a, o, i, l = [], c = !0, f = !1;
693
693
  try {
694
- if (o = (r = r.call(e)).next, t !== 0) for (; !(f = (n = o.call(r)).done) && (l.push(n.value), l.length !== t); f = !0) ;
694
+ if (o = (r = r.call(e)).next, t !== 0) for (; !(c = (n = o.call(r)).done) && (l.push(n.value), l.length !== t); c = !0) ;
695
695
  } catch (s) {
696
- c = !0, a = s;
696
+ f = !0, a = s;
697
697
  } finally {
698
698
  try {
699
- if (!f && r.return != null && (i = r.return(), Object(i) !== i)) return;
699
+ if (!c && r.return != null && (i = r.return(), Object(i) !== i)) return;
700
700
  } finally {
701
- if (c) throw a;
701
+ if (f) throw a;
702
702
  }
703
703
  }
704
704
  return l;
705
705
  }
706
706
  }
707
- function Ur(e) {
707
+ function Wr(e) {
708
708
  if (Array.isArray(e)) return e;
709
709
  }
710
- function je(e) {
710
+ function Ie(e) {
711
711
  for (var t = 1; t < arguments.length; t++) {
712
712
  var r = arguments[t] != null ? Object(arguments[t]) : {}, n = Object.keys(r);
713
713
  typeof Object.getOwnPropertySymbols == "function" && n.push.apply(n, Object.getOwnPropertySymbols(r).filter(function(a) {
714
714
  return Object.getOwnPropertyDescriptor(r, a).enumerable;
715
715
  })), n.forEach(function(a) {
716
- ie(e, a, r[a]);
716
+ le(e, a, r[a]);
717
717
  });
718
718
  }
719
719
  return e;
720
720
  }
721
- function ie(e, t, r) {
722
- return t = Wr(t), t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
721
+ function le(e, t, r) {
722
+ return t = Gr(t), t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
723
723
  }
724
- function Wr(e) {
725
- var t = Gr(e, "string");
724
+ function Gr(e) {
725
+ var t = qr(e, "string");
726
726
  return typeof t == "symbol" ? t : String(t);
727
727
  }
728
- function Gr(e, t) {
728
+ function qr(e, t) {
729
729
  if (typeof e != "object" || e === null) return e;
730
730
  var r = e[Symbol.toPrimitive];
731
731
  if (r !== void 0) {
@@ -735,9 +735,9 @@ function Gr(e, t) {
735
735
  }
736
736
  return (t === "string" ? String : Number)(e);
737
737
  }
738
- function qr(e, t) {
738
+ function Kr(e, t) {
739
739
  if (e == null) return {};
740
- var r = Kr(e, t), n, a;
740
+ var r = Vr(e, t), n, a;
741
741
  if (Object.getOwnPropertySymbols) {
742
742
  var o = Object.getOwnPropertySymbols(e);
743
743
  for (a = 0; a < o.length; a++)
@@ -745,67 +745,67 @@ function qr(e, t) {
745
745
  }
746
746
  return r;
747
747
  }
748
- function Kr(e, t) {
748
+ function Vr(e, t) {
749
749
  if (e == null) return {};
750
750
  var r = {}, n = Object.keys(e), a, o;
751
751
  for (o = 0; o < n.length; o++)
752
752
  a = n[o], !(t.indexOf(a) >= 0) && (r[a] = e[a]);
753
753
  return r;
754
754
  }
755
- $e("#1890ff");
756
- var I = function(t, r) {
757
- var n, a = je({}, t, r.attrs), o = a.class, i = a.icon, l = a.spin, f = a.rotate, c = a.tabindex, s = a.twoToneColor, S = a.onClick, g = qr(a, Lr), T = (n = {
755
+ _e("#1890ff");
756
+ var F = function(t, r) {
757
+ var n, a = Ie({}, t, r.attrs), o = a.class, i = a.icon, l = a.spin, c = a.rotate, f = a.tabindex, s = a.twoToneColor, S = a.onClick, m = Kr(a, Lr), P = (n = {
758
758
  anticon: !0
759
- }, ie(n, "anticon-".concat(i.name), !!i.name), ie(n, o, o), n), p = l === "" || l || i.name === "loading" ? "anticon-spin" : "", b = c;
760
- b === void 0 && S && (b = -1, g.tabindex = b);
761
- var u = f ? {
762
- msTransform: "rotate(".concat(f, "deg)"),
763
- transform: "rotate(".concat(f, "deg)")
764
- } : void 0, y = Me(s), m = Dr(y, 2), v = m[0], A = m[1];
765
- return ne("span", je({
759
+ }, le(n, "anticon-".concat(i.name), !!i.name), le(n, o, o), n), b = l === "" || l || i.name === "loading" ? "anticon-spin" : "", y = f;
760
+ y === void 0 && S && (y = -1, m.tabindex = y);
761
+ var u = c ? {
762
+ msTransform: "rotate(".concat(c, "deg)"),
763
+ transform: "rotate(".concat(c, "deg)")
764
+ } : void 0, g = $e(s), h = Hr(g, 2), v = h[0], A = h[1];
765
+ return ae("span", Ie({
766
766
  role: "img",
767
767
  "aria-label": i.name
768
- }, g, {
768
+ }, m, {
769
769
  onClick: S,
770
- class: T
771
- }), [ne(E, {
772
- class: p,
770
+ class: P
771
+ }), [ae(I, {
772
+ class: b,
773
773
  icon: i,
774
774
  primaryColor: v,
775
775
  secondaryColor: A,
776
776
  style: u
777
777
  }, null)]);
778
778
  };
779
- I.props = {
779
+ F.props = {
780
780
  spin: Boolean,
781
781
  rotate: Number,
782
782
  icon: Object,
783
783
  twoToneColor: String
784
784
  };
785
- I.displayName = "AntdIcon";
786
- I.inheritAttrs = !1;
787
- I.getTwoToneColor = _r;
788
- I.setTwoToneColor = $e;
789
- var Vr = { icon: { tag: "svg", attrs: { viewBox: "32 32 960 960", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M384 32a96 96 0 00-96 96v96a32 32 0 0064 0v-96a32 32 0 0132-32h512a32 32 0 0132 32v512a32 32 0 01-32 32h-96a32 32 0 000 64h96a96 96 0 0096-96V128a96 96 0 00-96-96H384z" } }, { tag: "path", attrs: { d: "M128 288a96 96 0 00-96 96v512a96 96 0 0096 96h512a96 96 0 0096-96V384a96 96 0 00-96-96H128zm-32 96a32 32 0 0132-32h512a32 32 0 0132 32v512a32 32 0 01-32 32H128a32 32 0 01-32-32V384z" } }] }, name: "copy", theme: "outlined" };
790
- function Pe(e) {
785
+ F.displayName = "AntdIcon";
786
+ F.inheritAttrs = !1;
787
+ F.getTwoToneColor = Dr;
788
+ F.setTwoToneColor = _e;
789
+ var Yr = { icon: { tag: "svg", attrs: { viewBox: "32 32 960 960", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M384 32a96 96 0 00-96 96v96a32 32 0 0064 0v-96a32 32 0 0132-32h512a32 32 0 0132 32v512a32 32 0 01-32 32h-96a32 32 0 000 64h96a96 96 0 0096-96V128a96 96 0 00-96-96H384z" } }, { tag: "path", attrs: { d: "M128 288a96 96 0 00-96 96v512a96 96 0 0096 96h512a96 96 0 0096-96V384a96 96 0 00-96-96H128zm-32 96a32 32 0 0132-32h512a32 32 0 0132 32v512a32 32 0 01-32 32H128a32 32 0 01-32-32V384z" } }] }, name: "copy", theme: "outlined" };
790
+ function Ee(e) {
791
791
  for (var t = 1; t < arguments.length; t++) {
792
792
  var r = arguments[t] != null ? Object(arguments[t]) : {}, n = Object.keys(r);
793
793
  typeof Object.getOwnPropertySymbols == "function" && n.push.apply(n, Object.getOwnPropertySymbols(r).filter(function(a) {
794
794
  return Object.getOwnPropertyDescriptor(r, a).enumerable;
795
795
  })), n.forEach(function(a) {
796
- Yr(e, a, r[a]);
796
+ Jr(e, a, r[a]);
797
797
  });
798
798
  }
799
799
  return e;
800
800
  }
801
- function Yr(e, t, r) {
802
- return t = Jr(t), t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
801
+ function Jr(e, t, r) {
802
+ return t = Zr(t), t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
803
803
  }
804
- function Jr(e) {
805
- var t = Zr(e, "string");
804
+ function Zr(e) {
805
+ var t = Qr(e, "string");
806
806
  return typeof t == "symbol" ? t : String(t);
807
807
  }
808
- function Zr(e, t) {
808
+ function Qr(e, t) {
809
809
  if (typeof e != "object" || e === null) return e;
810
810
  var r = e[Symbol.toPrimitive];
811
811
  if (r !== void 0) {
@@ -815,31 +815,31 @@ function Zr(e, t) {
815
815
  }
816
816
  return (t === "string" ? String : Number)(e);
817
817
  }
818
- var le = function(t, r) {
819
- var n = Pe({}, t, r.attrs);
820
- return ne(I, Pe({}, n, {
821
- icon: Vr
818
+ var ce = function(t, r) {
819
+ var n = Ee({}, t, r.attrs);
820
+ return ae(F, Ee({}, n, {
821
+ icon: Yr
822
822
  }), null);
823
823
  };
824
- le.displayName = "CopyOutlined";
825
- le.inheritAttrs = !1;
826
- function _(e) {
824
+ ce.displayName = "CopyOutlined";
825
+ ce.inheritAttrs = !1;
826
+ function D(e) {
827
827
  if (e == null) return "";
828
828
  if (typeof e == "string") return e;
829
- if (Array.isArray(e)) return e.map(_).join("");
829
+ if (Array.isArray(e)) return e.map(D).join("");
830
830
  if (typeof e == "object") {
831
831
  if (typeof e.children == "string")
832
832
  return e.children;
833
833
  if (e?.default && typeof e.default == "function") {
834
834
  const t = e.default();
835
835
  if (Array.isArray(t))
836
- return _(t);
836
+ return D(t);
837
837
  }
838
- e.children && _(e.children);
838
+ e.children && D(e.children);
839
839
  }
840
840
  return "";
841
841
  }
842
- function Re(e, t = {}) {
842
+ function De(e, t = {}) {
843
843
  const r = /* @__PURE__ */ new Map(), { value: n = "value", label: a = "label" } = t;
844
844
  if (!e) return r;
845
845
  const o = Array.isArray(e) ? e : [e];
@@ -848,42 +848,42 @@ function Re(e, t = {}) {
848
848
  if (i.type && (typeof i.type == "object" || typeof i.type == "function")) {
849
849
  let l = i.type.name?.toLowerCase() || "";
850
850
  if (typeof i.type == "function" ? l = i.type.displayName?.toLowerCase() || "" : typeof i.type == "string" && (l = i.type?.toLowerCase() || ""), /option|radio|checkbox/i.test(l)) {
851
- const f = i.props || {}, c = f[n] ?? f.value, s = f[a] ?? f.label;
852
- if (c != null) {
853
- const S = _(i.children) || s || String(c);
854
- r.set(c, S);
851
+ const c = i.props || {}, f = c[n] ?? c.value, s = c[a] ?? c.label;
852
+ if (f != null) {
853
+ const S = D(i.children) || s || String(f);
854
+ r.set(f, S);
855
855
  }
856
856
  }
857
857
  }
858
- i.children && Re(i.children, t).forEach((f, c) => {
859
- r.has(c) || r.set(c, f);
858
+ i.children && De(i.children, t).forEach((c, f) => {
859
+ r.has(f) || r.set(f, c);
860
860
  });
861
861
  }
862
862
  return r;
863
863
  }
864
- function Qr(e, t, r) {
864
+ function Xr(e, t, r) {
865
865
  const { value: n = "value", label: a = "label", children: o = "children" } = r, i = [];
866
866
  let l = e;
867
- for (const f of t) {
868
- const c = l.find((s) => s[n] === f);
869
- if (c)
870
- i.push(c[a] || c[n] || String(f)), l = c[o] || [];
867
+ for (const c of t) {
868
+ const f = l.find((s) => s[n] === c);
869
+ if (f)
870
+ i.push(f[a] || f[n] || String(c)), l = f[o] || [];
871
871
  else {
872
- i.push(String(f));
872
+ i.push(String(c));
873
873
  break;
874
874
  }
875
875
  }
876
876
  return i;
877
877
  }
878
- function Xr(e, t, r) {
878
+ function et(e, t, r) {
879
879
  const { value: n = "value", label: a = "title", children: o = "children" } = r, i = [], l = new Set(Array.isArray(t) ? t : [t]);
880
- function f(c) {
881
- for (const s of c)
882
- l.has(s[n]) && i.push(s[a] || s[n]), s[o] && f(s[o]);
880
+ function c(f) {
881
+ for (const s of f)
882
+ l.has(s[n]) && i.push(s[a] || s[n]), s[o] && c(s[o]);
883
883
  }
884
- return f(e), i;
884
+ return c(e), i;
885
885
  }
886
- function et({
886
+ function rt({
887
887
  modelValue: e,
888
888
  options: t,
889
889
  treeData: r,
@@ -892,96 +892,96 @@ function et({
892
892
  slots: o,
893
893
  isSelect: i,
894
894
  isRadioGroup: l,
895
- isCheckboxGroup: f,
896
- isCheckbox: c,
895
+ isCheckboxGroup: c,
896
+ isCheckbox: f,
897
897
  isRadio: s,
898
898
  isCascader: S,
899
- isTreeSelect: g,
900
- isSwitch: T,
901
- attrs: p,
902
- emptyText: b
899
+ isTreeSelect: m,
900
+ isSwitch: P,
901
+ attrs: b,
902
+ emptyText: y
903
903
  }) {
904
904
  if (n)
905
905
  try {
906
- return n(e) || b;
906
+ return n(e) || y;
907
907
  } catch (u) {
908
908
  console.warn("[ReadonlyHOC] valueToLabel error", u);
909
909
  }
910
- if (T) {
911
- const u = p.checkedValue ?? p["checked-value"] ?? !0, y = p.uncheckedValue ?? p["un-checked-value"] ?? !1;
912
- return e === u ? p.checkedChildren ?? p["checked-children"] ?? "开启" : e === y ? p.uncheckedChildren ?? p["un-checked-children"] ?? "关闭" : String(e || b);
910
+ if (P) {
911
+ const u = b.checkedValue ?? b["checked-value"] ?? !0, g = b.uncheckedValue ?? b["un-checked-value"] ?? !1;
912
+ return e === u ? b.checkedChildren ?? b["checked-children"] ?? "开启" : e === g ? b.uncheckedChildren ?? b["un-checked-children"] ?? "关闭" : String(e || y);
913
913
  }
914
914
  if (S && Array.isArray(e) && t?.length)
915
- return Qr(t, e, a).join(" / ") || b;
916
- if (g && r?.length)
917
- return Xr(r, e, a).join(", ") || b;
915
+ return Xr(t, e, a).join(" / ") || y;
916
+ if (m && r?.length)
917
+ return et(r, e, a).join(", ") || y;
918
918
  if (t?.length) {
919
- const u = a.value || "value", y = a.label || "label", m = (v) => {
920
- const A = t.find((q) => q[u] === v);
921
- return A ? A[y] || A[u] : v == null ? "" : String(v);
919
+ const u = a.value || "value", g = a.label || "label", h = (v) => {
920
+ const A = t.find((K) => K[u] === v);
921
+ return A ? A[g] || A[u] : v == null ? "" : String(v);
922
922
  };
923
- return Array.isArray(e) ? e.map(m).join(", ") || b : m(e) || b;
924
- } else if ((i || l || f) && o?.default)
923
+ return Array.isArray(e) ? e.map(h).join(", ") || y : h(e) || y;
924
+ } else if ((i || l || c) && o?.default)
925
925
  try {
926
- const u = o.default(), y = Re(u, a);
927
- if (y.size > 0) {
928
- const m = (v) => v == null ? "" : y.get(v) || String(v);
929
- return Array.isArray(e) ? e.map(m).join(", ") || b : m(e) || b;
926
+ const u = o.default(), g = De(u, a);
927
+ if (g.size > 0) {
928
+ const h = (v) => v == null ? "" : g.get(v) || String(v);
929
+ return Array.isArray(e) ? e.map(h).join(", ") || y : h(e) || y;
930
930
  }
931
931
  } catch (u) {
932
932
  console.warn("[ReadonlyHOC] Failed to parse slot options", u);
933
933
  }
934
- else if (o?.default && (c || s) && typeof e == "boolean")
934
+ else if (o?.default && (f || s) && typeof e == "boolean")
935
935
  try {
936
- const u = o.default(), y = _(u);
937
- if (y) return y;
936
+ const u = o.default(), g = D(u);
937
+ if (g) return g;
938
938
  } catch {
939
939
  }
940
- return e == null || e === "" ? b : Array.isArray(e) ? e.join(", ") : String(e);
940
+ return e == null || e === "" ? y : Array.isArray(e) ? e.join(", ") : String(e);
941
941
  }
942
- function rt(e) {
942
+ function tt(e) {
943
943
  if (typeof e == "function")
944
944
  return e;
945
- const t = e.name || "", r = t.toLowerCase(), n = /select/i.test(r) && !/tree|cascader/i.test(r), a = /radio/i.test(r) && !/group/i.test(r), o = /radio.*group/i.test(r), i = /checkbox/i.test(r) && !/group/i.test(r), l = /checkbox.*group/i.test(r), f = /switch/i.test(r), c = /cascader/i.test(r), s = /tree.*select/i.test(r), g = i || f || a ? "checked" : "value", T = `update:${g}`, p = /form$/i.test(r), b = /form.*item/i.test(r);
946
- return ze({
945
+ const t = e.name || "", r = t.toLowerCase(), n = /select/i.test(r) && !/tree|cascader/i.test(r), a = /radio/i.test(r) && !/group/i.test(r), o = /radio.*group/i.test(r), i = /checkbox/i.test(r) && !/group/i.test(r), l = /checkbox.*group/i.test(r), c = /switch/i.test(r), f = /cascader/i.test(r), s = /tree.*select/i.test(r), m = i || c || a ? "checked" : "value", P = `update:${m}`, b = /form$/i.test(r), y = /form.*item/i.test(r);
946
+ return Ge({
947
947
  name: t,
948
948
  inheritAttrs: !1,
949
949
  props: {
950
950
  modelValue: { type: [String, Number, Boolean, Array, Object], default: void 0 },
951
- [g]: { type: [String, Number, Boolean, Array, Object], default: void 0 },
951
+ [m]: { type: [String, Number, Boolean, Array, Object], default: void 0 },
952
952
  readonly: { type: Boolean, default: void 0 },
953
953
  emptyText: { type: String, default: "--" },
954
954
  valueToLabel: { type: Function, default: null },
955
955
  copyable: { type: Boolean, default: void 0 }
956
956
  },
957
- emits: ["update:modelValue", T],
958
- setup(u, { emit: y, slots: m, expose: v }) {
959
- const A = ce("nkReadonly", H(!1)), q = ce("copyable", H(!0)), j = M(() => u.readonly ?? A.value), K = M(() => u.readonly ?? A.value), V = M(() => u.copyable ?? q.value ?? !0), L = H(!1);
960
- p && (ue("nkReadonly", K), ue("copyable", V));
961
- const fe = M(() => u[g] !== void 0 ? u[g] : u.modelValue), Ne = (d) => {
962
- y("update:modelValue", d), y(T, d);
963
- }, w = Ue(), D = M(() => {
957
+ emits: ["update:modelValue", P],
958
+ setup(u, { emit: g, slots: h, expose: v }) {
959
+ const A = ue("nkReadonly", B(!1)), K = ue("copyable", B(!0)), j = R(() => u.readonly ?? A.value), V = R(() => u.readonly ?? A.value), Y = R(() => u.copyable ?? K.value ?? !0), L = B(!1);
960
+ b && (se("nkReadonly", V), se("copyable", Y));
961
+ const fe = R(() => u[m] !== void 0 ? u[m] : u.modelValue), Le = (d) => {
962
+ g("update:modelValue", d), g(P, d);
963
+ }, C = qe(), H = R(() => {
964
964
  if (!j.value) return "";
965
- const d = w.fieldNames ?? w["field-names"] ?? {}, Y = w.options, He = w.treeData ?? w["tree-data"];
966
- return et({
965
+ const d = C.fieldNames ?? C["field-names"] ?? {}, J = C.options, Ue = C.treeData ?? C["tree-data"];
966
+ return rt({
967
967
  modelValue: fe.value,
968
- options: Y,
969
- treeData: He,
968
+ options: J,
969
+ treeData: Ue,
970
970
  valueToLabel: u.valueToLabel,
971
971
  fieldNames: d,
972
- slots: m,
972
+ slots: h,
973
973
  isSelect: n,
974
974
  isRadioGroup: o,
975
975
  isCheckboxGroup: l,
976
976
  isCheckbox: i,
977
977
  isRadio: a,
978
- isCascader: c,
978
+ isCascader: f,
979
979
  isTreeSelect: s,
980
- isSwitch: f,
981
- attrs: w,
980
+ isSwitch: c,
981
+ attrs: C,
982
982
  emptyText: u.emptyText
983
983
  });
984
- }), _e = {
984
+ }), He = {
985
985
  lineHeight: "32px",
986
986
  padding: "0 6px",
987
987
  display: "inline-block",
@@ -994,49 +994,49 @@ function rt(e) {
994
994
  border: "none",
995
995
  backgroundColor: "none",
996
996
  whiteSpace: "pre-wrap"
997
- }, F = H();
998
- p && v({
999
- validate: () => j.value ? Promise.resolve({}) : F.value?.validate?.(),
1000
- validateFields: (d) => j.value ? Promise.resolve({}) : F.value?.validateFields?.(d),
1001
- resetFields: (d) => !j.value && F.value?.resetFields?.(d),
1002
- clearValidate: (d) => !j.value && F.value?.clearValidate?.(d),
1003
- scrollToField: (d) => !j.value && F.value?.scrollToField?.(d)
997
+ }, E = B();
998
+ b && v({
999
+ validate: () => j.value ? Promise.resolve({}) : E.value?.validate?.(),
1000
+ validateFields: (d) => j.value ? Promise.resolve({}) : E.value?.validateFields?.(d),
1001
+ resetFields: (d) => !j.value && E.value?.resetFields?.(d),
1002
+ clearValidate: (d) => !j.value && E.value?.clearValidate?.(d),
1003
+ scrollToField: (d) => !j.value && E.value?.scrollToField?.(d)
1004
1004
  });
1005
- const Le = () => {
1005
+ const Be = () => {
1006
1006
  L.value = !0;
1007
- }, De = () => {
1007
+ }, ze = () => {
1008
1008
  L.value = !1;
1009
1009
  };
1010
- return () => b ? k(
1010
+ return () => y ? T(
1011
1011
  e,
1012
1012
  {
1013
- ...w,
1014
- style: { ...w.style || {}, marginBottom: j.value ? "10px" : void 0 }
1013
+ ...C,
1014
+ style: { ...C.style || {}, marginBottom: j.value ? "10px" : void 0 }
1015
1015
  },
1016
- m
1017
- ) : p ? k(
1016
+ h
1017
+ ) : b ? T(
1018
1018
  e,
1019
1019
  {
1020
- ...w,
1021
- rules: K.value ? null : w.rules,
1022
- disabled: K.value ? !0 : w.disabled,
1023
- ref: F
1020
+ ...C,
1021
+ rules: V.value ? null : C.rules,
1022
+ disabled: V.value ? !0 : C.disabled,
1023
+ ref: E
1024
1024
  },
1025
- m
1026
- ) : j.value ? k(
1025
+ h
1026
+ ) : j.value ? T(
1027
1027
  "span",
1028
1028
  {
1029
- onMouseenter: Le,
1030
- onMouseleave: De,
1029
+ onMouseenter: Be,
1030
+ onMouseleave: ze,
1031
1031
  class: "nk-readonly-wrapper",
1032
1032
  style: {
1033
- ..._e,
1034
- color: V.value && L.value ? "#6e9eff" : "rgba(0, 0, 0, 0.65)"
1033
+ ...He,
1034
+ color: Y.value && L.value ? "#6e9eff" : "rgba(0, 0, 0, 0.65)"
1035
1035
  }
1036
1036
  },
1037
1037
  [
1038
- k("span", { style: { marginRight: "8px" } }, D.value),
1039
- V.value && D.value !== u.emptyText ? k(
1038
+ T("span", { style: { marginRight: "8px" } }, H.value),
1039
+ Y.value && H.value !== u.emptyText ? T(
1040
1040
  "span",
1041
1041
  {
1042
1042
  class: "copy-icon",
@@ -1046,23 +1046,23 @@ function rt(e) {
1046
1046
  }
1047
1047
  },
1048
1048
  [
1049
- k(
1050
- le,
1049
+ T(
1050
+ ce,
1051
1051
  {
1052
1052
  onClick: async () => {
1053
1053
  try {
1054
1054
  if (window.__POWERED_BY_WUJIE__) {
1055
- if (await window.gvUtil?.clipboard(null, D.value) === !1) {
1056
- B.error("您的浏览器不支持自动复制,请手动复制");
1055
+ if (await window.gvUtil?.clipboard(null, H.value) === !1) {
1056
+ z.error("您的浏览器不支持自动复制,请手动复制");
1057
1057
  return;
1058
1058
  }
1059
- B.success("复制成功");
1059
+ z.success("复制成功");
1060
1060
  } else {
1061
- const d = new Blob([D.value], { type: "text/plain" }), Y = new ClipboardItem({ "text/plain": d });
1062
- await navigator.clipboard.write([Y]), B.success("复制成功");
1061
+ const d = new Blob([H.value], { type: "text/plain" }), J = new ClipboardItem({ "text/plain": d });
1062
+ await navigator.clipboard.write([J]), z.success("复制成功");
1063
1063
  }
1064
1064
  } catch {
1065
- B.error("您的浏览器不支持自动复制,请手动复制");
1065
+ z.error("您的浏览器不支持自动复制,请手动复制");
1066
1066
  }
1067
1067
  },
1068
1068
  style: {
@@ -1078,46 +1078,68 @@ function rt(e) {
1078
1078
  ]
1079
1079
  ) : null
1080
1080
  ]
1081
- ) : k(
1081
+ ) : T(
1082
1082
  e,
1083
1083
  {
1084
- ...w,
1085
- [g]: fe.value,
1086
- [`onUpdate:${g}`]: Ne,
1087
- ref: p ? F : void 0
1084
+ ...C,
1085
+ [m]: fe.value,
1086
+ [`onUpdate:${m}`]: Le,
1087
+ ref: b ? E : void 0
1088
1088
  },
1089
- m
1089
+ h
1090
1090
  );
1091
1091
  }
1092
1092
  });
1093
1093
  }
1094
- const tt = {
1095
- Input: Ze,
1096
- InputNumber: Je,
1097
- Textarea: Ye,
1098
- Select: be,
1099
- SelectOption: be.Option,
1100
- TreeSelect: Ve,
1101
- Cascader: Ke,
1102
- DatePicker: qe,
1103
- TimePicker: Ge,
1104
- Radio: pe,
1105
- Checkbox: de,
1106
- RadioGroup: pe.Group,
1107
- CheckboxGroup: de.Group,
1108
- Switch: We,
1109
- Form: se,
1110
- FormItem: se.Item
1111
- }, ot = {
1094
+ const nt = {
1095
+ Input: Qe,
1096
+ InputNumber: Ze,
1097
+ Textarea: Je,
1098
+ Select: me,
1099
+ SelectOption: me.Option,
1100
+ TreeSelect: Ye,
1101
+ Cascader: Ve,
1102
+ DatePicker: ge,
1103
+ RangePicker: ge.RangePicker,
1104
+ TimePicker: ye,
1105
+ TimeRangePicker: ye.TimeRangePicker,
1106
+ Radio: be,
1107
+ Checkbox: pe,
1108
+ RadioGroup: be.Group,
1109
+ CheckboxGroup: pe.Group,
1110
+ Switch: Ke,
1111
+ Form: de,
1112
+ FormItem: de.Item
1113
+ }, p = {};
1114
+ for (const [e, t] of Object.entries(nt))
1115
+ if (t) {
1116
+ const r = tt(t);
1117
+ p[`Nk${e}`] = r;
1118
+ }
1119
+ const it = {
1112
1120
  install(e) {
1113
- for (const [t, r] of Object.entries(tt))
1121
+ for (const [t, r] of Object.entries(p))
1114
1122
  if (r) {
1115
- const n = rt(r);
1116
- e.component(`Nk${t}`, n);
1123
+ const n = r;
1124
+ e.component(t, n);
1117
1125
  }
1118
1126
  }
1119
- };
1127
+ }, lt = p.NkInput, ct = p.NkInputNumber, ft = p.NkSelect, ut = p.NkCascader, st = p.NkTreeSelect, dt = p.NkDatePicker, pt = p.NkRangePicker, bt = p.NkTimePicker, yt = p.NkTimeRangePicker, gt = p.NkCheckbox, mt = p.NkRadio, ht = p.NkSwitch, vt = p.NkForm, kt = p.NkFormItem;
1120
1128
  export {
1121
- ot as default,
1122
- rt as withReadonly
1129
+ ut as NkCascader,
1130
+ gt as NkCheckbox,
1131
+ dt as NkDatePicker,
1132
+ vt as NkForm,
1133
+ kt as NkFormItem,
1134
+ lt as NkInput,
1135
+ ct as NkInputNumber,
1136
+ mt as NkRadio,
1137
+ pt as NkRangePicker,
1138
+ ft as NkSelect,
1139
+ ht as NkSwitch,
1140
+ bt as NkTimePicker,
1141
+ yt as NkTimeRangePicker,
1142
+ st as NkTreeSelect,
1143
+ it as default,
1144
+ tt as withReadonly
1123
1145
  };