@cyberpunk-vue/components 1.0.2 → 1.0.4

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.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { defineComponent as Q, computed as n, openBlock as u, createElementBlock as f, normalizeStyle as j, normalizeClass as c, unref as a, createElementVNode as k, createBlock as ee, resolveDynamicComponent as $e, withCtx as fe, renderSlot as F, useSlots as Se, Fragment as de, createVNode as be, Transition as Ie, createCommentVNode as O, provide as ze, toRef as ve, watchEffect as ht, ref as W, onMounted as Ve, toDisplayString as Z, nextTick as Be, watch as ge, onBeforeUnmount as Ae, renderList as ke, createTextVNode as pe, withModifiers as Pe, withKeys as Ge, withDirectives as Te, vShow as Re, inject as xe, Teleport as Ue, vModelText as tt, resolveComponent as st, useAttrs as bt, mergeProps as Le, getCurrentInstance as kt, createStaticVNode as St } from "vue";
2
- import { useNamespace as le, isPresetSize as U, normalizeSize as we, normalizeDuration as Ne, useImageSrc as rt } from "@cyberpunk-vue/hooks";
1
+ import { defineComponent as Q, computed as n, openBlock as u, createElementBlock as f, normalizeStyle as j, normalizeClass as c, unref as a, createElementVNode as k, createBlock as ee, resolveDynamicComponent as $e, withCtx as fe, renderSlot as F, useSlots as Se, Fragment as de, createVNode as be, Transition as Te, createCommentVNode as O, provide as ze, toRef as ve, watchEffect as ht, ref as H, onMounted as Ve, toDisplayString as J, nextTick as Be, watch as ge, onBeforeUnmount as Ae, renderList as ke, createTextVNode as pe, withModifiers as Pe, withKeys as Ge, withDirectives as Ie, vShow as Re, inject as xe, Teleport as Ue, vModelText as tt, resolveComponent as st, useAttrs as bt, mergeProps as Le, getCurrentInstance as kt, createStaticVNode as St } from "vue";
2
+ import { useNamespace as le, isPresetSize as Z, normalizeSize as we, normalizeDuration as Ne, useImageSrc as rt } from "@cyberpunk-vue/hooks";
3
3
  import { COMPONENT_PREFIX as oe, DEFAULTS_KEY as Ct, THEME_KEY as wt, DIALOG_CONTEXT_KEY as $t, TABLE_CONTEXT_KEY as it } from "@cyberpunk-vue/constants";
4
4
  function te(s) {
5
5
  return s.install = (t) => {
@@ -295,12 +295,12 @@ const xt = {
295
295
  }), l = n(() => (r.value - t.strokeWidth) / 2), d = n(() => [
296
296
  o.b(),
297
297
  o.m(t.type),
298
- U(t.size) && o.m(t.size),
298
+ Z(t.size) && o.m(t.size),
299
299
  o.is("custom-color", !!t.color),
300
- o.is("custom-size", !U(t.size))
300
+ o.is("custom-size", !Z(t.size))
301
301
  ]), i = n(() => {
302
302
  const p = {};
303
- return t.color && (p["--cp-loading-color"] = t.color), U(t.size) || (p["--cp-loading-size"] = we(t.size, e)), p;
303
+ return t.color && (p["--cp-loading-color"] = t.color), Z(t.size) || (p["--cp-loading-size"] = we(t.size, e)), p;
304
304
  });
305
305
  return (p, m) => (u(), f("div", {
306
306
  class: c(d.value),
@@ -408,7 +408,7 @@ const xt = {
408
408
  type: Boolean,
409
409
  default: !1
410
410
  }
411
- }, Tt = ["innerHTML"], ut = /* @__PURE__ */ Q({
411
+ }, It = ["innerHTML"], ut = /* @__PURE__ */ Q({
412
412
  name: `${oe}Icon`,
413
413
  __name: "icon",
414
414
  props: At,
@@ -439,7 +439,7 @@ const xt = {
439
439
  key: 2,
440
440
  class: c(a(o).e("svg")),
441
441
  innerHTML: p.icon
442
- }, null, 10, Tt)) : (u(), f("i", {
442
+ }, null, 10, It)) : (u(), f("i", {
443
443
  key: 3,
444
444
  class: c(p.icon)
445
445
  }, null, 2))
@@ -447,7 +447,7 @@ const xt = {
447
447
  _: 3
448
448
  }, 8, ["class", "style"]));
449
449
  }
450
- }), Ee = te(ut), It = ["type", "disabled"], Oe = /* @__PURE__ */ Q({
450
+ }), Ee = te(ut), Tt = ["type", "disabled"], Oe = /* @__PURE__ */ Q({
451
451
  name: `${oe}Button`,
452
452
  __name: "button",
453
453
  props: xt,
@@ -457,7 +457,7 @@ const xt = {
457
457
  l.b(),
458
458
  l.m(o.type),
459
459
  // 只有预设值才添加 size 类名
460
- U(o.size) && l.m(o.size),
460
+ Z(o.size) && l.m(o.size),
461
461
  l.m(o.variant),
462
462
  l.m(`shape-${o.shape}`),
463
463
  l.is("disabled", o.disabled || o.loading && o.loadingDisabled),
@@ -466,91 +466,91 @@ const xt = {
466
466
  l.is("dashed", o.dashed),
467
467
  l.is("custom-color", !!o.color),
468
468
  l.is("loading-placeholder", o.loadingPlaceholder),
469
- l.is("icon-only", w.value || o.square),
470
- l.is("custom-size", !U(o.size))
469
+ l.is("icon-only", B.value || o.square),
470
+ l.is("custom-size", !Z(o.size))
471
471
  ]), p = n(() => {
472
- const I = {};
473
- return o.color && (I["--cp-button-custom-color"] = o.color, I["--cp-button-custom-color-light"] = `${o.color}33`), o.textColor && (I.color = o.textColor), U(o.size) || (I["--cp-button-height"] = we(o.size, d)), I;
474
- }), m = (I) => {
475
- o.disabled || o.loading || e("click", I);
476
- }, v = n(() => !!r.prefix || !!o.prefixIcon), S = n(() => !!r.suffix || !!o.suffixIcon), w = n(() => !!o.icon && !r.default), x = n(() => o.iconColor || o.textColor || ""), T = n(() => o.prefixIconColor || o.iconColor || o.textColor || ""), B = n(() => o.suffixIconColor || o.iconColor || o.textColor || ""), g = n(() => x.value ? { color: x.value } : {}), _ = n(() => T.value ? { color: T.value } : {}), N = n(() => B.value ? { color: B.value } : {}), E = n(() => (U(o.size), o.size)), M = n(() => o.iconSize || E.value), b = n(() => o.prefixIconSize || o.iconSize || E.value), y = n(() => o.suffixIconSize || o.iconSize || E.value), H = { sm: 18, md: 20, lg: 24 }, J = n(() => U(o.size) && H[o.size] || 16);
477
- return (I, ae) => (u(), f("button", {
472
+ const T = {};
473
+ return o.color && (T["--cp-button-custom-color"] = o.color, T["--cp-button-custom-color-light"] = `${o.color}33`), o.textColor && (T.color = o.textColor), Z(o.size) || (T["--cp-button-height"] = we(o.size, d)), T;
474
+ }), m = (T) => {
475
+ o.disabled || o.loading || e("click", T);
476
+ }, v = n(() => !!r.prefix || !!o.prefixIcon), S = n(() => !!r.suffix || !!o.suffixIcon), B = n(() => !!o.icon && !r.default), w = n(() => o.iconColor || o.textColor || ""), P = n(() => o.prefixIconColor || o.iconColor || o.textColor || ""), _ = n(() => o.suffixIconColor || o.iconColor || o.textColor || ""), g = n(() => w.value ? { color: w.value } : {}), E = n(() => P.value ? { color: P.value } : {}), z = n(() => _.value ? { color: _.value } : {}), M = n(() => (Z(o.size), o.size)), N = n(() => o.iconSize || M.value), b = n(() => o.prefixIconSize || o.iconSize || M.value), y = n(() => o.suffixIconSize || o.iconSize || M.value), W = { sm: 18, md: 20, lg: 24 }, G = n(() => Z(o.size) && W[o.size] || 16);
477
+ return (T, ae) => (u(), f("button", {
478
478
  class: c(i.value),
479
479
  style: j(p.value),
480
- type: I.nativeType,
481
- disabled: I.disabled || I.loading,
480
+ type: T.nativeType,
481
+ disabled: T.disabled || T.loading,
482
482
  onClick: m
483
483
  }, [
484
- w.value ? (u(), f(de, { key: 0 }, [
485
- I.loading ? (u(), ee(a(et), {
484
+ B.value ? (u(), f(de, { key: 0 }, [
485
+ T.loading ? (u(), ee(a(et), {
486
486
  key: 0,
487
- size: J.value,
487
+ size: G.value,
488
488
  "stroke-width": 3
489
489
  }, null, 8, ["size"])) : (u(), ee(a(Ee), {
490
490
  key: 1,
491
- icon: I.icon,
492
- size: M.value,
491
+ icon: T.icon,
492
+ size: N.value,
493
493
  style: j(g.value)
494
494
  }, null, 8, ["icon", "size", "style"]))
495
495
  ], 64)) : (u(), f(de, { key: 1 }, [
496
- I.loadingPlaceholder ? (u(), f("span", {
496
+ T.loadingPlaceholder ? (u(), f("span", {
497
497
  key: 0,
498
498
  class: c(a(l).e("loader"))
499
499
  }, [
500
500
  be(a(et), {
501
- size: J.value,
501
+ size: G.value,
502
502
  "stroke-width": 3
503
503
  }, null, 8, ["size"])
504
- ], 2)) : (u(), ee(Ie, {
504
+ ], 2)) : (u(), ee(Te, {
505
505
  key: 1,
506
506
  name: "cp-loader"
507
507
  }, {
508
508
  default: fe(() => [
509
- I.loading ? (u(), f("span", {
509
+ T.loading ? (u(), f("span", {
510
510
  key: 0,
511
511
  class: c(a(l).e("loader"))
512
512
  }, [
513
513
  be(a(et), {
514
- size: J.value,
514
+ size: G.value,
515
515
  "stroke-width": 3
516
516
  }, null, 8, ["size"])
517
517
  ], 2)) : O("", !0)
518
518
  ]),
519
519
  _: 1
520
520
  })),
521
- v.value && !I.loading ? (u(), f("span", {
521
+ v.value && !T.loading ? (u(), f("span", {
522
522
  key: 2,
523
523
  class: c(a(l).e("prefix"))
524
524
  }, [
525
- F(I.$slots, "prefix", {}, () => [
526
- I.prefixIcon ? (u(), ee(a(Ee), {
525
+ F(T.$slots, "prefix", {}, () => [
526
+ T.prefixIcon ? (u(), ee(a(Ee), {
527
527
  key: 0,
528
- icon: I.prefixIcon,
528
+ icon: T.prefixIcon,
529
529
  size: b.value,
530
- style: j(_.value)
530
+ style: j(E.value)
531
531
  }, null, 8, ["icon", "size", "style"])) : O("", !0)
532
532
  ])
533
533
  ], 2)) : O("", !0),
534
534
  k("span", {
535
535
  class: c(a(l).e("content"))
536
536
  }, [
537
- F(I.$slots, "default")
537
+ F(T.$slots, "default")
538
538
  ], 2),
539
539
  S.value ? (u(), f("span", {
540
540
  key: 3,
541
541
  class: c(a(l).e("suffix"))
542
542
  }, [
543
- F(I.$slots, "suffix", {}, () => [
544
- I.suffixIcon ? (u(), ee(a(Ee), {
543
+ F(T.$slots, "suffix", {}, () => [
544
+ T.suffixIcon ? (u(), ee(a(Ee), {
545
545
  key: 0,
546
- icon: I.suffixIcon,
546
+ icon: T.suffixIcon,
547
547
  size: y.value,
548
- style: j(N.value)
548
+ style: j(z.value)
549
549
  }, null, 8, ["icon", "size", "style"])) : O("", !0)
550
550
  ])
551
551
  ], 2)) : O("", !0)
552
552
  ], 64))
553
- ], 14, It));
553
+ ], 14, Tt));
554
554
  }
555
555
  }), at = te(Oe), Et = {
556
556
  /**
@@ -810,11 +810,11 @@ const xt = {
810
810
  * @example `<CpInput clearable @clear="onClear" />`
811
811
  */
812
812
  clear: () => !0
813
- }, Rt = ["type", "value", "placeholder", "disabled", "readonly", "maxlength"], Kt = {
813
+ }, Rt = ["type", "value", "placeholder", "disabled", "readonly", "maxlength"], _t = {
814
814
  key: 0,
815
815
  viewBox: "0 0 24 24",
816
816
  fill: "currentColor"
817
- }, _t = {
817
+ }, Kt = {
818
818
  key: 1,
819
819
  viewBox: "0 0 24 24",
820
820
  fill: "currentColor"
@@ -824,9 +824,9 @@ const xt = {
824
824
  props: Dt,
825
825
  emits: Ot,
826
826
  setup(s, { expose: t, emit: o }) {
827
- const e = s, r = o, l = Se(), d = le("input"), i = { sm: 28, md: 36, lg: 44 }, p = W(), m = W(!1), v = W(!1), S = W(!1), w = n(() => e.type === "password" && e.showPassword ? S.value ? "text" : "password" : e.type), x = n(() => [
827
+ const e = s, r = o, l = Se(), d = le("input"), i = { sm: 28, md: 36, lg: 44 }, p = H(), m = H(!1), v = H(!1), S = H(!1), B = n(() => e.type === "password" && e.showPassword ? S.value ? "text" : "password" : e.type), w = n(() => [
828
828
  d.b(),
829
- U(e.size) && d.m(e.size),
829
+ Z(e.size) && d.m(e.size),
830
830
  d.m(e.variant),
831
831
  d.m(`shape-${e.shape}`),
832
832
  d.is("disabled", e.disabled),
@@ -835,72 +835,72 @@ const xt = {
835
835
  d.is("clearable", e.clearable && !!e.modelValue),
836
836
  d.is("custom-color", !!e.color),
837
837
  d.is("clearing", v.value),
838
- d.is("custom-size", !U(e.size))
839
- ]), T = n(() => {
840
- const P = {};
841
- return e.color && (P["--cp-input-custom-color"] = e.color, P["--cp-input-custom-color-light"] = `${e.color}33`), e.inactiveBorderColor && (P["--cp-input-inactive-border-color"] = e.inactiveBorderColor), e.placeholderColor && (P["--cp-input-placeholder-color"] = e.placeholderColor), e.textColor && (P["--cp-input-text-color"] = e.textColor), U(e.size) || (P["--cp-input-height"] = we(e.size, i)), e.clearDuration !== 150 && (P["--cp-input-clear-duration"] = `${e.clearDuration}ms`), P;
842
- }), B = n(() => e.clearable && !e.disabled && !e.readonly && !!e.modelValue), g = n(() => e.type === "password" && e.showPassword && !e.disabled), _ = n(() => String(e.modelValue || "").length), N = n(() => e.showWordLimit && e.maxlength !== void 0), E = n(() => !!l.prefix), M = (P) => {
843
- const Y = P.target, h = e.type === "number" ? Number(Y.value) : Y.value;
844
- r("update:modelValue", h), r("input", h, P);
845
- }, b = (P) => {
846
- const Y = P.target, h = e.type === "number" ? Number(Y.value) : Y.value;
838
+ d.is("custom-size", !Z(e.size))
839
+ ]), P = n(() => {
840
+ const V = {};
841
+ return e.color && (V["--cp-input-custom-color"] = e.color, V["--cp-input-custom-color-light"] = `${e.color}33`), e.inactiveBorderColor && (V["--cp-input-inactive-border-color"] = e.inactiveBorderColor), e.placeholderColor && (V["--cp-input-placeholder-color"] = e.placeholderColor), e.textColor && (V["--cp-input-text-color"] = e.textColor), Z(e.size) || (V["--cp-input-height"] = we(e.size, i)), e.clearDuration !== 150 && (V["--cp-input-clear-duration"] = `${e.clearDuration}ms`), V;
842
+ }), _ = n(() => e.clearable && !e.disabled && !e.readonly && !!e.modelValue), g = n(() => e.type === "password" && e.showPassword && !e.disabled), E = n(() => String(e.modelValue || "").length), z = n(() => e.showWordLimit && e.maxlength !== void 0), M = n(() => !!l.prefix), N = (V) => {
843
+ const Y = V.target, h = e.type === "number" ? Number(Y.value) : Y.value;
844
+ r("update:modelValue", h), r("input", h, V);
845
+ }, b = (V) => {
846
+ const Y = V.target, h = e.type === "number" ? Number(Y.value) : Y.value;
847
847
  r("change", h);
848
- }, y = (P) => {
849
- m.value = !0, r("focus", P);
850
- }, H = (P) => {
851
- m.value = !1, r("blur", P);
852
- }, J = () => {
848
+ }, y = (V) => {
849
+ m.value = !0, r("focus", V);
850
+ }, W = (V) => {
851
+ m.value = !1, r("blur", V);
852
+ }, G = () => {
853
853
  v.value = !0, setTimeout(() => {
854
854
  r("update:modelValue", ""), r("clear"), v.value = !1, Be(() => {
855
- var P;
856
- (P = p.value) == null || P.focus();
855
+ var V;
856
+ (V = p.value) == null || V.focus();
857
857
  });
858
858
  }, e.clearDuration);
859
- }, I = () => {
859
+ }, T = () => {
860
860
  S.value = !S.value;
861
861
  };
862
862
  return t({
863
863
  focus: () => {
864
- var P;
865
- return (P = p.value) == null ? void 0 : P.focus();
864
+ var V;
865
+ return (V = p.value) == null ? void 0 : V.focus();
866
866
  },
867
867
  blur: () => {
868
- var P;
869
- return (P = p.value) == null ? void 0 : P.blur();
868
+ var V;
869
+ return (V = p.value) == null ? void 0 : V.blur();
870
870
  },
871
871
  inputRef: p
872
872
  }), Ve(() => {
873
- var P;
874
- e.autofocus && ((P = p.value) == null || P.focus());
875
- }), (P, Y) => (u(), f("div", {
876
- class: c(x.value),
877
- style: j(T.value)
873
+ var V;
874
+ e.autofocus && ((V = p.value) == null || V.focus());
875
+ }), (V, Y) => (u(), f("div", {
876
+ class: c(w.value),
877
+ style: j(P.value)
878
878
  }, [
879
- E.value ? (u(), f("span", {
879
+ M.value ? (u(), f("span", {
880
880
  key: 0,
881
881
  class: c(a(d).e("prefix"))
882
882
  }, [
883
- F(P.$slots, "prefix")
883
+ F(V.$slots, "prefix")
884
884
  ], 2)) : O("", !0),
885
885
  k("input", {
886
886
  ref_key: "inputRef",
887
887
  ref: p,
888
888
  class: c(a(d).e("inner")),
889
- type: w.value,
890
- value: P.modelValue,
891
- placeholder: P.placeholder,
892
- disabled: P.disabled,
893
- readonly: P.readonly,
894
- maxlength: P.maxlength,
895
- onInput: M,
889
+ type: B.value,
890
+ value: V.modelValue,
891
+ placeholder: V.placeholder,
892
+ disabled: V.disabled,
893
+ readonly: V.readonly,
894
+ maxlength: V.maxlength,
895
+ onInput: N,
896
896
  onChange: b,
897
897
  onFocus: y,
898
- onBlur: H
898
+ onBlur: W
899
899
  }, null, 42, Rt),
900
- B.value ? (u(), f("span", {
900
+ _.value ? (u(), f("span", {
901
901
  key: 1,
902
902
  class: c(a(d).e("clear")),
903
- onClick: J
903
+ onClick: G
904
904
  }, [...Y[0] || (Y[0] = [
905
905
  k("svg", {
906
906
  viewBox: "0 0 24 24",
@@ -912,11 +912,11 @@ const xt = {
912
912
  g.value ? (u(), f("span", {
913
913
  key: 2,
914
914
  class: c(a(d).e("password")),
915
- onClick: I
915
+ onClick: T
916
916
  }, [
917
- S.value ? (u(), f("svg", Kt, [...Y[1] || (Y[1] = [
917
+ S.value ? (u(), f("svg", _t, [...Y[1] || (Y[1] = [
918
918
  k("path", { d: "M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z" }, null, -1)
919
- ])])) : (u(), f("svg", _t, [...Y[2] || (Y[2] = [
919
+ ])])) : (u(), f("svg", Kt, [...Y[2] || (Y[2] = [
920
920
  k("path", { d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z" }, null, -1)
921
921
  ])]))
922
922
  ], 2)) : O("", !0),
@@ -924,15 +924,15 @@ const xt = {
924
924
  key: 3,
925
925
  class: c(a(d).e("suffix"))
926
926
  }, [
927
- F(P.$slots, "suffix")
927
+ F(V.$slots, "suffix")
928
928
  ], 2)) : O("", !0),
929
- N.value ? (u(), f("span", {
929
+ z.value ? (u(), f("span", {
930
930
  key: 4,
931
931
  class: c(a(d).e("count"))
932
- }, Z(_.value) + " / " + Z(P.maxlength), 3)) : O("", !0)
932
+ }, J(E.value) + " / " + J(V.maxlength), 3)) : O("", !0)
933
933
  ], 6));
934
934
  }
935
- }), Ta = te(jt), Ft = {
935
+ }), Ia = te(jt), Ft = {
936
936
  /** 绑定值 (v-model) */
937
937
  modelValue: {
938
938
  type: String,
@@ -1005,43 +1005,43 @@ const xt = {
1005
1005
  props: Ft,
1006
1006
  emits: Wt,
1007
1007
  setup(s, { expose: t, emit: o }) {
1008
- const e = s, r = o, l = le("textarea"), d = { sm: 28, md: 36, lg: 44 }, i = W(), p = W(!1), m = n(() => [
1008
+ const e = s, r = o, l = le("textarea"), d = { sm: 28, md: 36, lg: 44 }, i = H(), p = H(!1), m = n(() => [
1009
1009
  l.b(),
1010
- U(e.size) && l.m(e.size),
1010
+ Z(e.size) && l.m(e.size),
1011
1011
  l.m(e.variant),
1012
1012
  l.is("disabled", e.disabled),
1013
1013
  l.is("readonly", e.readonly),
1014
1014
  l.is("focused", p.value),
1015
1015
  l.is("custom-color", !!e.color),
1016
- l.is("custom-size", !U(e.size))
1016
+ l.is("custom-size", !Z(e.size))
1017
1017
  ]), v = n(() => {
1018
1018
  const b = {};
1019
- return e.color && (b["--cp-textarea-custom-color"] = e.color, b["--cp-textarea-custom-color-light"] = `${e.color}33`), e.textColor && (b["--cp-textarea-text-color"] = e.textColor), U(e.size) || (b["--cp-textarea-font-size"] = we(e.size, d)), b;
1019
+ return e.color && (b["--cp-textarea-custom-color"] = e.color, b["--cp-textarea-custom-color-light"] = `${e.color}33`), e.textColor && (b["--cp-textarea-text-color"] = e.textColor), Z(e.size) || (b["--cp-textarea-font-size"] = we(e.size, d)), b;
1020
1020
  }), S = n(() => {
1021
1021
  var b;
1022
1022
  return ((b = e.modelValue) == null ? void 0 : b.length) || 0;
1023
- }), w = n(() => e.showWordLimit && e.maxlength !== void 0), x = n(() => {
1023
+ }), B = n(() => e.showWordLimit && e.maxlength !== void 0), w = n(() => {
1024
1024
  const b = {};
1025
1025
  return typeof e.autosize == "object" && (e.autosize.minRows && (b.minHeight = `${e.autosize.minRows * 1.5}em`), e.autosize.maxRows && (b.maxHeight = `${e.autosize.maxRows * 1.5}em`)), b;
1026
- }), T = () => {
1026
+ }), P = () => {
1027
1027
  if (!e.autosize || !i.value) return;
1028
1028
  const b = i.value;
1029
1029
  b.style.height = "auto", b.style.height = `${b.scrollHeight}px`;
1030
1030
  };
1031
1031
  ge(() => e.modelValue, () => {
1032
- Be(T);
1032
+ Be(P);
1033
1033
  }), Ve(() => {
1034
- e.autosize && T();
1034
+ e.autosize && P();
1035
1035
  });
1036
- const B = (b) => {
1036
+ const _ = (b) => {
1037
1037
  const y = b.target;
1038
- r("update:modelValue", y.value), r("input", y.value, b), e.autosize && T();
1038
+ r("update:modelValue", y.value), r("input", y.value, b), e.autosize && P();
1039
1039
  }, g = (b) => {
1040
1040
  const y = b.target;
1041
1041
  r("change", y.value);
1042
- }, _ = (b) => {
1042
+ }, E = (b) => {
1043
1043
  p.value = !0, r("focus", b);
1044
- }, N = (b) => {
1044
+ }, z = (b) => {
1045
1045
  p.value = !1, r("blur", b);
1046
1046
  };
1047
1047
  return t({
@@ -1068,19 +1068,19 @@ const xt = {
1068
1068
  readonly: b.readonly,
1069
1069
  rows: b.rows,
1070
1070
  maxlength: b.maxlength,
1071
- style: j(x.value),
1072
- onInput: B,
1071
+ style: j(w.value),
1072
+ onInput: _,
1073
1073
  onChange: g,
1074
- onFocus: _,
1075
- onBlur: N
1074
+ onFocus: E,
1075
+ onBlur: z
1076
1076
  }, null, 46, Ht),
1077
- w.value ? (u(), f("span", {
1077
+ B.value ? (u(), f("span", {
1078
1078
  key: 0,
1079
1079
  class: c(a(l).e("count"))
1080
- }, Z(S.value) + " / " + Z(b.maxlength), 3)) : O("", !0)
1080
+ }, J(S.value) + " / " + J(b.maxlength), 3)) : O("", !0)
1081
1081
  ], 6));
1082
1082
  }
1083
- }), Ia = te(Yt), Xt = {
1083
+ }), Ta = te(Yt), Xt = {
1084
1084
  /** 绑定值 (v-model) */
1085
1085
  modelValue: {
1086
1086
  type: Number,
@@ -1152,63 +1152,63 @@ const xt = {
1152
1152
  props: Xt,
1153
1153
  emits: qt,
1154
1154
  setup(s, { expose: t, emit: o }) {
1155
- const e = s, r = o, l = le("input-number"), d = { sm: 28, md: 36, lg: 44 }, i = W(), p = W(!1), m = W(null), v = n(() => m.value !== null ? m.value : e.modelValue === void 0 || e.modelValue === null ? "" : e.precision !== void 0 ? e.modelValue.toFixed(e.precision) : String(e.modelValue)), S = n(() => [
1155
+ const e = s, r = o, l = le("input-number"), d = { sm: 28, md: 36, lg: 44 }, i = H(), p = H(!1), m = H(null), v = n(() => m.value !== null ? m.value : e.modelValue === void 0 || e.modelValue === null ? "" : e.precision !== void 0 ? e.modelValue.toFixed(e.precision) : String(e.modelValue)), S = n(() => [
1156
1156
  l.b(),
1157
- U(e.size) && l.m(e.size),
1157
+ Z(e.size) && l.m(e.size),
1158
1158
  l.m(`controls-${e.controlsPosition}`),
1159
1159
  l.is("disabled", e.disabled),
1160
1160
  l.is("readonly", e.readonly),
1161
1161
  l.is("focused", p.value),
1162
1162
  l.is("custom-color", !!e.color),
1163
1163
  l.is("without-controls", !e.controls),
1164
- l.is("custom-size", !U(e.size))
1165
- ]), w = n(() => {
1166
- const I = {};
1167
- return e.color && (I["--cp-input-number-custom-color"] = e.color, I["--cp-input-number-custom-color-light"] = `${e.color}33`), U(e.size) || (I["--cp-input-number-height"] = we(e.size, d)), I;
1168
- }), x = n(() => e.modelValue <= e.min), T = n(() => e.modelValue >= e.max), B = (I) => e.precision === void 0 ? I : parseFloat(I.toFixed(e.precision)), g = (I) => {
1164
+ l.is("custom-size", !Z(e.size))
1165
+ ]), B = n(() => {
1166
+ const T = {};
1167
+ return e.color && (T["--cp-input-number-custom-color"] = e.color, T["--cp-input-number-custom-color-light"] = `${e.color}33`), Z(e.size) || (T["--cp-input-number-height"] = we(e.size, d)), T;
1168
+ }), w = n(() => e.modelValue <= e.min), P = n(() => e.modelValue >= e.max), _ = (T) => e.precision === void 0 ? T : parseFloat(T.toFixed(e.precision)), g = (T) => {
1169
1169
  const ae = e.modelValue;
1170
- let ne = I;
1171
- ne < e.min && (ne = e.min), ne > e.max && (ne = e.max), ne = B(ne), ae !== ne && (r("update:modelValue", ne), r("change", ne, ae));
1172
- }, _ = () => {
1173
- e.disabled || e.readonly || T.value || g(e.modelValue + e.step);
1174
- }, N = () => {
1175
- e.disabled || e.readonly || x.value || g(e.modelValue - e.step);
1176
- }, E = (I) => {
1177
- const ae = I.target;
1170
+ let ne = T;
1171
+ ne < e.min && (ne = e.min), ne > e.max && (ne = e.max), ne = _(ne), ae !== ne && (r("update:modelValue", ne), r("change", ne, ae));
1172
+ }, E = () => {
1173
+ e.disabled || e.readonly || P.value || g(e.modelValue + e.step);
1174
+ }, z = () => {
1175
+ e.disabled || e.readonly || w.value || g(e.modelValue - e.step);
1176
+ }, M = (T) => {
1177
+ const ae = T.target;
1178
1178
  m.value = ae.value;
1179
- }, M = (I) => {
1180
- const ne = I.target.value;
1179
+ }, N = (T) => {
1180
+ const ne = T.target.value;
1181
1181
  if (m.value = null, ne === "" || ne === "-") {
1182
1182
  g(e.min > -1 / 0 ? e.min : 0);
1183
1183
  return;
1184
1184
  }
1185
- const P = parseFloat(ne);
1186
- isNaN(P) || g(P);
1187
- }, b = (I) => {
1188
- p.value = !0, r("focus", I);
1189
- }, y = (I) => {
1190
- p.value = !1, m.value = null, r("blur", I);
1185
+ const V = parseFloat(ne);
1186
+ isNaN(V) || g(V);
1187
+ }, b = (T) => {
1188
+ p.value = !0, r("focus", T);
1189
+ }, y = (T) => {
1190
+ p.value = !1, m.value = null, r("blur", T);
1191
1191
  };
1192
1192
  return t({
1193
1193
  focus: () => {
1194
- var I;
1195
- return (I = i.value) == null ? void 0 : I.focus();
1194
+ var T;
1195
+ return (T = i.value) == null ? void 0 : T.focus();
1196
1196
  },
1197
1197
  blur: () => {
1198
- var I;
1199
- return (I = i.value) == null ? void 0 : I.blur();
1198
+ var T;
1199
+ return (T = i.value) == null ? void 0 : T.blur();
1200
1200
  },
1201
1201
  inputRef: i
1202
- }), (I, ae) => (u(), f("div", {
1202
+ }), (T, ae) => (u(), f("div", {
1203
1203
  class: c(S.value),
1204
- style: j(w.value)
1204
+ style: j(B.value)
1205
1205
  }, [
1206
- I.controls && I.controlsPosition === "both" ? (u(), f("button", {
1206
+ T.controls && T.controlsPosition === "both" ? (u(), f("button", {
1207
1207
  key: 0,
1208
1208
  type: "button",
1209
- class: c([a(l).e("decrease"), { "is-disabled": x.value || I.disabled }]),
1210
- disabled: x.value || I.disabled,
1211
- onClick: N
1209
+ class: c([a(l).e("decrease"), { "is-disabled": w.value || T.disabled }]),
1210
+ disabled: w.value || T.disabled,
1211
+ onClick: z
1212
1212
  }, [...ae[0] || (ae[0] = [
1213
1213
  k("svg", {
1214
1214
  viewBox: "0 0 24 24",
@@ -1224,20 +1224,20 @@ const xt = {
1224
1224
  type: "text",
1225
1225
  inputmode: "decimal",
1226
1226
  value: v.value,
1227
- placeholder: I.placeholder,
1228
- disabled: I.disabled,
1229
- readonly: I.readonly,
1230
- onInput: E,
1231
- onChange: M,
1227
+ placeholder: T.placeholder,
1228
+ disabled: T.disabled,
1229
+ readonly: T.readonly,
1230
+ onInput: M,
1231
+ onChange: N,
1232
1232
  onFocus: b,
1233
1233
  onBlur: y
1234
1234
  }, null, 42, Ut),
1235
- I.controls && I.controlsPosition === "both" ? (u(), f("button", {
1235
+ T.controls && T.controlsPosition === "both" ? (u(), f("button", {
1236
1236
  key: 1,
1237
1237
  type: "button",
1238
- class: c([a(l).e("increase"), { "is-disabled": T.value || I.disabled }]),
1239
- disabled: T.value || I.disabled,
1240
- onClick: _
1238
+ class: c([a(l).e("increase"), { "is-disabled": P.value || T.disabled }]),
1239
+ disabled: P.value || T.disabled,
1240
+ onClick: E
1241
1241
  }, [...ae[1] || (ae[1] = [
1242
1242
  k("svg", {
1243
1243
  viewBox: "0 0 24 24",
@@ -1246,15 +1246,15 @@ const xt = {
1246
1246
  k("path", { d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" })
1247
1247
  ], -1)
1248
1248
  ])], 10, Zt)) : O("", !0),
1249
- I.controls && I.controlsPosition === "right" ? (u(), f("div", {
1249
+ T.controls && T.controlsPosition === "right" ? (u(), f("div", {
1250
1250
  key: 2,
1251
1251
  class: c(a(l).e("controls"))
1252
1252
  }, [
1253
1253
  k("button", {
1254
1254
  type: "button",
1255
- class: c([a(l).e("increase"), { "is-disabled": T.value || I.disabled }]),
1256
- disabled: T.value || I.disabled,
1257
- onClick: _
1255
+ class: c([a(l).e("increase"), { "is-disabled": P.value || T.disabled }]),
1256
+ disabled: P.value || T.disabled,
1257
+ onClick: E
1258
1258
  }, [...ae[2] || (ae[2] = [
1259
1259
  k("svg", {
1260
1260
  viewBox: "0 0 24 24",
@@ -1265,9 +1265,9 @@ const xt = {
1265
1265
  ])], 10, Jt),
1266
1266
  k("button", {
1267
1267
  type: "button",
1268
- class: c([a(l).e("decrease"), { "is-disabled": x.value || I.disabled }]),
1269
- disabled: x.value || I.disabled,
1270
- onClick: N
1268
+ class: c([a(l).e("decrease"), { "is-disabled": w.value || T.disabled }]),
1269
+ disabled: w.value || T.disabled,
1270
+ onClick: z
1271
1271
  }, [...ae[3] || (ae[3] = [
1272
1272
  k("svg", {
1273
1273
  viewBox: "0 0 24 24",
@@ -1431,98 +1431,98 @@ const xt = {
1431
1431
  props: to,
1432
1432
  emits: oo,
1433
1433
  setup(s, { expose: t, emit: o }) {
1434
- const e = s, r = o, l = le("slider"), d = { sm: 4, md: 6, lg: 8 }, i = W(), p = W(!1), m = W(null), v = W(!1), S = W(!1), w = W(null), x = W(null), T = n(() => [
1434
+ const e = s, r = o, l = le("slider"), d = { sm: 4, md: 6, lg: 8 }, i = H(), p = H(!1), m = H(null), v = H(!1), S = H(!1), B = H(null), w = H(null), P = n(() => [
1435
1435
  l.b(),
1436
- U(e.size) && l.m(e.size),
1436
+ Z(e.size) && l.m(e.size),
1437
1437
  l.m(`shape-${e.shape}`),
1438
1438
  l.is("disabled", e.disabled),
1439
1439
  l.is("vertical", e.vertical),
1440
1440
  l.is("range", e.range),
1441
1441
  l.is("dragging", p.value),
1442
1442
  l.is("custom-color", !!e.color),
1443
- l.is("custom-size", !U(e.size))
1444
- ]), B = n(() => {
1445
- const z = {}, L = U(e.size) ? e.size : "md", R = U(e.size) ? d[L] : parseInt(we(e.size, d)), V = U(e.size) ? L === "sm" ? 14 : L === "lg" ? 22 : 18 : Math.max(R + 8, R * 2.5);
1446
- z["--cp-slider-track-height"] = `${R}px`, z["--cp-slider-thumb-size"] = `${V}px`;
1447
- const G = Math.max(2, Math.floor(V / 10));
1448
- z["--cp-slider-thumb-border-width"] = `${G}px`;
1449
- const ue = Math.max(2, Math.floor(V / 4.5));
1450
- z["--cp-slider-inner-dot-size"] = `${ue}px`;
1451
- const A = Math.max(1, Math.floor(ue / 3));
1452
- z["--cp-slider-inner-clip-size"] = `${A}px`;
1453
- const D = U(e.size) ? L === "sm" ? 3 : L === "lg" ? 5 : 4 : Math.max(2, Math.floor(R * 0.6));
1454
- return z["--cp-slider-clip-size"] = `${D}px`, e.color && (z["--cp-slider-custom-color"] = e.color, z["--cp-slider-custom-color-light"] = `color-mix(in srgb, ${e.color}, transparent 60%)`), e.vertical && e.height && (z.height = e.height), z;
1455
- }), g = n(() => e.range && Array.isArray(e.modelValue) ? e.modelValue : [e.min, typeof e.modelValue == "number" ? e.modelValue : e.min]), _ = n(() => {
1443
+ l.is("custom-size", !Z(e.size))
1444
+ ]), _ = n(() => {
1445
+ const x = {}, L = Z(e.size) ? e.size : "md", R = Z(e.size) ? d[L] : parseInt(we(e.size, d)), A = Z(e.size) ? L === "sm" ? 14 : L === "lg" ? 22 : 18 : Math.max(R + 8, R * 2.5);
1446
+ x["--cp-slider-track-height"] = `${R}px`, x["--cp-slider-thumb-size"] = `${A}px`;
1447
+ const U = Math.max(2, Math.floor(A / 10));
1448
+ x["--cp-slider-thumb-border-width"] = `${U}px`;
1449
+ const ue = Math.max(2, Math.floor(A / 4.5));
1450
+ x["--cp-slider-inner-dot-size"] = `${ue}px`;
1451
+ const I = Math.max(1, Math.floor(ue / 3));
1452
+ x["--cp-slider-inner-clip-size"] = `${I}px`;
1453
+ const D = Z(e.size) ? L === "sm" ? 3 : L === "lg" ? 5 : 4 : Math.max(2, Math.floor(R * 0.6));
1454
+ return x["--cp-slider-clip-size"] = `${D}px`, e.color && (x["--cp-slider-custom-color"] = e.color, x["--cp-slider-custom-color-light"] = `color-mix(in srgb, ${e.color}, transparent 60%)`), e.vertical && e.height && (x.height = e.height), x;
1455
+ }), g = n(() => e.range && Array.isArray(e.modelValue) ? e.modelValue : [e.min, typeof e.modelValue == "number" ? e.modelValue : e.min]), E = n(() => {
1456
1456
  if (p.value) {
1457
- const z = w.value ?? g.value[0], L = x.value ?? g.value[1];
1458
- return [z, L];
1457
+ const x = B.value ?? g.value[0], L = w.value ?? g.value[1];
1458
+ return [x, L];
1459
1459
  }
1460
1460
  return g.value;
1461
- }), N = n(() => {
1462
- const z = Number(e.min), R = Number(e.max) - z;
1463
- return R === 0 ? 0 : (_.value[0] - z) / R * 100;
1464
- }), E = n(() => {
1465
- const z = Number(e.min), R = Number(e.max) - z;
1466
- return R === 0 ? 0 : (_.value[1] - z) / R * 100;
1467
- }), M = n(() => e.vertical ? e.range ? { bottom: `${N.value}%`, height: `${E.value - N.value}%` } : { bottom: "0%", height: `${E.value}%` } : e.range ? { left: `${N.value}%`, width: `${E.value - N.value}%` } : { left: "0%", width: `${E.value}%` }), b = n(() => e.vertical ? { bottom: `${N.value}%` } : { left: `${N.value}%` }), y = n(() => e.vertical ? { bottom: `${E.value}%` } : { left: `${E.value}%` }), H = n(() => {
1468
- const z = Number(e.min), L = Number(e.max), R = Number(e.step);
1461
+ }), z = n(() => {
1462
+ const x = Number(e.min), R = Number(e.max) - x;
1463
+ return R === 0 ? 0 : (E.value[0] - x) / R * 100;
1464
+ }), M = n(() => {
1465
+ const x = Number(e.min), R = Number(e.max) - x;
1466
+ return R === 0 ? 0 : (E.value[1] - x) / R * 100;
1467
+ }), N = n(() => e.vertical ? e.range ? { bottom: `${z.value}%`, height: `${M.value - z.value}%` } : { bottom: "0%", height: `${M.value}%` } : e.range ? { left: `${z.value}%`, width: `${M.value - z.value}%` } : { left: "0%", width: `${M.value}%` }), b = n(() => e.vertical ? { bottom: `${z.value}%` } : { left: `${z.value}%` }), y = n(() => e.vertical ? { bottom: `${M.value}%` } : { left: `${M.value}%` }), W = n(() => {
1468
+ const x = Number(e.min), L = Number(e.max), R = Number(e.step);
1469
1469
  if (!e.showStops || R <= 0) return [];
1470
- const V = Math.floor((L - z) / R), G = [];
1471
- for (let ue = 1; ue < V; ue++) {
1472
- const D = (z + ue * R - z) / (L - z) * 100;
1473
- G.push(D);
1470
+ const A = Math.floor((L - x) / R), U = [];
1471
+ for (let ue = 1; ue < A; ue++) {
1472
+ const D = (x + ue * R - x) / (L - x) * 100;
1473
+ U.push(D);
1474
1474
  }
1475
- return G;
1476
- }), J = n(() => H.value.filter((L) => e.range && L < N.value - 0.01 || L > E.value + 0.01)), I = n(() => {
1477
- const z = Number(e.min), L = Number(e.max);
1478
- return e.marks ? Object.entries(e.marks).map(([R, V]) => {
1479
- const G = Number(R), ue = (G - z) / (L - z) * 100, A = typeof V == "string" ? V : V.label || "", D = typeof V == "object" ? V.style : void 0;
1480
- return { value: G, percent: ue, label: A, style: D };
1475
+ return U;
1476
+ }), G = n(() => W.value.filter((L) => e.range && L < z.value - 0.01 || L > M.value + 0.01)), T = n(() => {
1477
+ const x = Number(e.min), L = Number(e.max);
1478
+ return e.marks ? Object.entries(e.marks).map(([R, A]) => {
1479
+ const U = Number(R), ue = (U - x) / (L - x) * 100, I = typeof A == "string" ? A : A.label || "", D = typeof A == "object" ? A.style : void 0;
1480
+ return { value: U, percent: ue, label: I, style: D };
1481
1481
  }) : [];
1482
- }), ae = (z) => e.formatTooltip ? e.formatTooltip(z) : String(z), ne = (z, L) => {
1482
+ }), ae = (x) => e.formatTooltip ? e.formatTooltip(x) : String(x), ne = (x, L) => {
1483
1483
  if (!i.value) return Number(e.min);
1484
1484
  const R = i.value.getBoundingClientRect();
1485
- let V;
1486
- e.vertical ? V = (R.bottom - L) / R.height : V = (z - R.left) / R.width, V = Math.max(0, Math.min(1, V));
1487
- const G = Number(e.min), ue = Number(e.max), A = Number(e.step);
1488
- let D = G + V * (ue - G);
1489
- return A > 0 && (D = Math.round(D / A) * A), D = Math.max(G, Math.min(ue, D)), D;
1490
- }, P = (z, L = !1) => {
1485
+ let A;
1486
+ e.vertical ? A = (R.bottom - L) / R.height : A = (x - R.left) / R.width, A = Math.max(0, Math.min(1, A));
1487
+ const U = Number(e.min), ue = Number(e.max), I = Number(e.step);
1488
+ let D = U + A * (ue - U);
1489
+ return I > 0 && (D = Math.round(D / I) * I), D = Math.max(U, Math.min(ue, D)), D;
1490
+ }, V = (x, L = !1) => {
1491
1491
  if (e.disabled) return;
1492
1492
  let R;
1493
1493
  if (e.range) {
1494
- const [V, G] = g.value;
1495
- m.value === "start" ? R = [Math.min(z, G), G] : R = [V, Math.max(z, V)];
1494
+ const [A, U] = g.value;
1495
+ m.value === "start" ? R = [Math.min(x, U), U] : R = [A, Math.max(x, A)];
1496
1496
  } else
1497
- R = z;
1497
+ R = x;
1498
1498
  r("update:modelValue", R), r("input", R), L && r("change", R);
1499
- }, Y = (z) => {
1499
+ }, Y = (x) => {
1500
1500
  if (!e.range) {
1501
1501
  m.value = "end";
1502
1502
  return;
1503
1503
  }
1504
- const [L, R] = g.value, V = Math.abs(z - L), G = Math.abs(z - R);
1505
- m.value = V <= G ? "start" : "end";
1506
- }, h = (z) => {
1504
+ const [L, R] = g.value, A = Math.abs(x - L), U = Math.abs(x - R);
1505
+ m.value = A <= U ? "start" : "end";
1506
+ }, h = (x) => {
1507
1507
  if (e.disabled) return;
1508
- const L = ne(z.clientX, z.clientY);
1509
- Y(L), P(L, !0);
1510
- }, q = (z, L) => {
1511
- e.disabled || (z.preventDefault(), z.stopPropagation(), m.value = L, p.value = !0, w.value = g.value[0], x.value = g.value[1], L === "start" ? v.value = !0 : S.value = !0, document.addEventListener("mousemove", re), document.addEventListener("mouseup", $));
1512
- }, re = (z) => {
1508
+ const L = ne(x.clientX, x.clientY);
1509
+ Y(L), V(L, !0);
1510
+ }, q = (x, L) => {
1511
+ e.disabled || (x.preventDefault(), x.stopPropagation(), m.value = L, p.value = !0, B.value = g.value[0], w.value = g.value[1], L === "start" ? v.value = !0 : S.value = !0, document.addEventListener("mousemove", re), document.addEventListener("mouseup", $));
1512
+ }, re = (x) => {
1513
1513
  if (!p.value || e.disabled) return;
1514
- const L = ne(z.clientX, z.clientY);
1515
- e.range ? m.value === "start" ? w.value = Math.min(L, x.value ?? g.value[1]) : x.value = Math.max(L, w.value ?? g.value[0]) : x.value = L, P(L);
1514
+ const L = ne(x.clientX, x.clientY);
1515
+ e.range ? m.value === "start" ? B.value = Math.min(L, w.value ?? g.value[1]) : w.value = Math.max(L, B.value ?? g.value[0]) : w.value = L, V(L);
1516
1516
  }, $ = () => {
1517
1517
  if (p.value) {
1518
- const z = w.value ?? g.value[0], L = x.value ?? g.value[1], R = e.range ? [z, L] : L;
1519
- r("update:modelValue", R), r("input", R), r("change", R), p.value = !1, m.value = null, v.value = !1, S.value = !1, w.value = null, x.value = null;
1518
+ const x = B.value ?? g.value[0], L = w.value ?? g.value[1], R = e.range ? [x, L] : L;
1519
+ r("update:modelValue", R), r("input", R), r("change", R), p.value = !1, m.value = null, v.value = !1, S.value = !1, B.value = null, w.value = null;
1520
1520
  }
1521
1521
  document.removeEventListener("mousemove", re), document.removeEventListener("mouseup", $);
1522
- }, C = (z, L) => {
1522
+ }, C = (x, L) => {
1523
1523
  if (e.disabled) return;
1524
1524
  let R = 0;
1525
- switch (z.key) {
1525
+ switch (x.key) {
1526
1526
  case "ArrowLeft":
1527
1527
  case "ArrowDown":
1528
1528
  R = -e.step;
@@ -1540,23 +1540,23 @@ const xt = {
1540
1540
  default:
1541
1541
  return;
1542
1542
  }
1543
- z.preventDefault(), m.value = L;
1544
- const V = L === "start" ? g.value[0] : g.value[1];
1545
- P(V + R, !0);
1546
- }, K = (z) => {
1547
- !e.showTooltip || e.disabled || (z === "start" ? v.value = !0 : S.value = !0);
1548
- }, ie = (z) => {
1549
- p.value || (z === "start" ? v.value = !1 : S.value = !1);
1543
+ x.preventDefault(), m.value = L;
1544
+ const A = L === "start" ? g.value[0] : g.value[1];
1545
+ V(A + R, !0);
1546
+ }, K = (x) => {
1547
+ !e.showTooltip || e.disabled || (x === "start" ? v.value = !0 : S.value = !0);
1548
+ }, ie = (x) => {
1549
+ p.value || (x === "start" ? v.value = !1 : S.value = !1);
1550
1550
  };
1551
1551
  return Ae(() => {
1552
1552
  document.removeEventListener("mousemove", re), document.removeEventListener("mouseup", $);
1553
1553
  }), t({
1554
1554
  sliderRef: i
1555
- }), (z, L) => (u(), f("div", {
1555
+ }), (x, L) => (u(), f("div", {
1556
1556
  ref_key: "sliderRef",
1557
1557
  ref: i,
1558
- class: c(T.value),
1559
- style: j(B.value)
1558
+ class: c(P.value),
1559
+ style: j(_.value)
1560
1560
  }, [
1561
1561
  k("div", {
1562
1562
  class: c(a(l).e("runway")),
@@ -1564,32 +1564,32 @@ const xt = {
1564
1564
  }, [
1565
1565
  k("div", {
1566
1566
  class: c(a(l).e("bar")),
1567
- style: j(M.value)
1567
+ style: j(N.value)
1568
1568
  }, null, 6)
1569
1569
  ], 2),
1570
- (u(!0), f(de, null, ke(J.value, (R, V) => (u(), f("div", {
1571
- key: V,
1570
+ (u(!0), f(de, null, ke(G.value, (R, A) => (u(), f("div", {
1571
+ key: A,
1572
1572
  class: c(a(l).e("stop")),
1573
- style: j(z.vertical ? { bottom: `${R}%` } : { left: `${R}%` })
1573
+ style: j(x.vertical ? { bottom: `${R}%` } : { left: `${R}%` })
1574
1574
  }, null, 6))), 128)),
1575
- z.marks ? (u(), f("div", {
1575
+ x.marks ? (u(), f("div", {
1576
1576
  key: 0,
1577
1577
  class: c(a(l).e("marks"))
1578
1578
  }, [
1579
- (u(!0), f(de, null, ke(I.value, (R) => (u(), f("div", {
1579
+ (u(!0), f(de, null, ke(T.value, (R) => (u(), f("div", {
1580
1580
  key: R.value,
1581
1581
  class: c(a(l).e("mark")),
1582
1582
  style: j([
1583
- z.vertical ? { bottom: `${R.percent}%` } : { left: `${R.percent}%` },
1583
+ x.vertical ? { bottom: `${R.percent}%` } : { left: `${R.percent}%` },
1584
1584
  R.style
1585
1585
  ])
1586
1586
  }, [
1587
1587
  k("span", {
1588
1588
  class: c(a(l).e("mark-text"))
1589
- }, Z(R.label), 3)
1589
+ }, J(R.label), 3)
1590
1590
  ], 6))), 128))
1591
1591
  ], 2)) : O("", !0),
1592
- z.range ? (u(), f("div", {
1592
+ x.range ? (u(), f("div", {
1593
1593
  key: 1,
1594
1594
  class: c([a(l).e("thumb"), a(l).is("active", m.value === "start")]),
1595
1595
  style: j(b.value),
@@ -1599,10 +1599,10 @@ const xt = {
1599
1599
  onMouseleave: L[2] || (L[2] = (R) => ie("start")),
1600
1600
  onKeydown: L[3] || (L[3] = (R) => C(R, "start"))
1601
1601
  }, [
1602
- z.showTooltip && v.value ? (u(), f("div", {
1602
+ x.showTooltip && v.value ? (u(), f("div", {
1603
1603
  key: 0,
1604
1604
  class: c(a(l).e("tooltip"))
1605
- }, Z(ae(_.value[0])), 3)) : O("", !0)
1605
+ }, J(ae(E.value[0])), 3)) : O("", !0)
1606
1606
  ], 38)) : O("", !0),
1607
1607
  k("div", {
1608
1608
  class: c([a(l).e("thumb"), a(l).is("active", m.value === "end")]),
@@ -1613,10 +1613,10 @@ const xt = {
1613
1613
  onMouseleave: L[6] || (L[6] = (R) => ie("end")),
1614
1614
  onKeydown: L[7] || (L[7] = (R) => C(R, "end"))
1615
1615
  }, [
1616
- z.showTooltip && S.value ? (u(), f("div", {
1616
+ x.showTooltip && S.value ? (u(), f("div", {
1617
1617
  key: 0,
1618
1618
  class: c(a(l).e("tooltip"))
1619
- }, Z(ae(_.value[1])), 3)) : O("", !0)
1619
+ }, J(ae(E.value[1])), 3)) : O("", !0)
1620
1620
  ], 38)
1621
1621
  ], 6));
1622
1622
  }
@@ -1847,13 +1847,13 @@ const xt = {
1847
1847
  if (typeof t.color == "function")
1848
1848
  return t.color(t.percentage);
1849
1849
  if (Array.isArray(t.color)) {
1850
- const y = t.color, H = Math.floor(l.value / 100 * (y.length - 1));
1851
- return y[Math.min(H, y.length - 1)];
1850
+ const y = t.color, W = Math.floor(l.value / 100 * (y.length - 1));
1851
+ return y[Math.min(W, y.length - 1)];
1852
1852
  }
1853
1853
  return t.color || void 0;
1854
1854
  }), i = n(() => {
1855
1855
  if (t.strokeWidth !== void 0) return t.strokeWidth;
1856
- if (U(t.size, e))
1856
+ if (Z(t.size, e))
1857
1857
  return r[t.size] || 8;
1858
1858
  const y = typeof t.size == "number" ? t.size : parseInt(t.size, 10);
1859
1859
  return isNaN(y) ? 8 : y;
@@ -1865,14 +1865,14 @@ const xt = {
1865
1865
  }), m = n(() => ({
1866
1866
  "--cp-progress-duration": Ne(t.duration)
1867
1867
  })), v = n(() => {
1868
- const y = t.width, H = i.value, J = (y - H) / 2, I = 2 * Math.PI * J, ae = y / 2, ne = t.type === "dashboard" ? 0.75 : 1, P = I * ne, Y = I, h = P * (1 - l.value / 100), q = J - H - 4, re = 2 * Math.PI * q, $ = re * ne, C = re * (1 - ne), K = $;
1868
+ const y = t.width, W = i.value, G = (y - W) / 2, T = 2 * Math.PI * G, ae = y / 2, ne = t.type === "dashboard" ? 0.75 : 1, V = T * ne, Y = T, h = V * (1 - l.value / 100), q = G - W - 4, re = 2 * Math.PI * q, $ = re * ne, C = re * (1 - ne), K = $;
1869
1869
  return {
1870
1870
  size: y,
1871
- stroke: H,
1872
- radius: J,
1873
- circumference: I,
1871
+ stroke: W,
1872
+ radius: G,
1873
+ circumference: T,
1874
1874
  center: ae,
1875
- dashLength: P,
1875
+ dashLength: V,
1876
1876
  gapLength: Y,
1877
1877
  offset: h,
1878
1878
  innerRadius: Math.max(0, q),
@@ -1883,67 +1883,67 @@ const xt = {
1883
1883
  innerOffset: K
1884
1884
  };
1885
1885
  }), S = n(() => {
1886
- const { dashLength: y, gapLength: H } = v.value;
1886
+ const { dashLength: y, gapLength: W } = v.value;
1887
1887
  return {
1888
- strokeDasharray: `${y} ${H}`,
1888
+ strokeDasharray: `${y} ${W}`,
1889
1889
  strokeWidth: `${i.value - 2}`
1890
1890
  // 轨道稍微细一点,更有层次感
1891
1891
  };
1892
- }), w = n(() => t.showInnerStripe !== void 0 ? t.showInnerStripe : t.type === "circle"), x = n(() => ({
1892
+ }), B = n(() => t.showInnerStripe !== void 0 ? t.showInnerStripe : t.type === "circle"), w = n(() => ({
1893
1893
  strokeDasharray: "4 8",
1894
1894
  strokeDashoffset: "0",
1895
1895
  strokeWidth: "2",
1896
1896
  // 固定细线
1897
1897
  opacity: 0.5
1898
- })), T = n(() => {
1898
+ })), P = n(() => {
1899
1899
  const y = {};
1900
1900
  return d.value && (y["--cp-progress-color"] = d.value), y;
1901
- }), B = n(() => {
1902
- const { center: y, radius: H } = v.value, J = i.value, I = l.value / 100, ne = 360 * (t.type === "dashboard" ? 0.75 : 1) * I;
1901
+ }), _ = n(() => {
1902
+ const { center: y, radius: W } = v.value, G = i.value, T = l.value / 100, ne = 360 * (t.type === "dashboard" ? 0.75 : 1) * T;
1903
1903
  if (ne <= 0 || t.percentage <= 0)
1904
- return `M ${y + H} ${y} L ${y + H + 0.01} ${y}`;
1904
+ return `M ${y + W} ${y} L ${y + W + 0.01} ${y}`;
1905
1905
  if (t.shape === "round") return "";
1906
- const P = (D) => D * Math.PI / 180, Y = H - J / 2, h = H + J / 2, q = 0, re = Math.min(ne, 359.99), $ = P(q), C = P(re), K = y + h * Math.cos($), ie = y + h * Math.sin($), z = y + h * Math.cos(C), L = y + h * Math.sin(C), R = y + Y * Math.cos($), V = y + Y * Math.sin($), G = y + Y * Math.cos(C), ue = y + Y * Math.sin(C), A = re > 180 ? 1 : 0;
1906
+ const V = (D) => D * Math.PI / 180, Y = W - G / 2, h = W + G / 2, q = 0, re = Math.min(ne, 359.99), $ = V(q), C = V(re), K = y + h * Math.cos($), ie = y + h * Math.sin($), x = y + h * Math.cos(C), L = y + h * Math.sin(C), R = y + Y * Math.cos($), A = y + Y * Math.sin($), U = y + Y * Math.cos(C), ue = y + Y * Math.sin(C), I = re > 180 ? 1 : 0;
1907
1907
  if (l.value >= 100 && t.type !== "dashboard") {
1908
- const se = P(180), ce = y + h * Math.cos(se), ye = y + h * Math.sin(se), he = y + Y * Math.cos(se), Ce = y + Y * Math.sin(se);
1908
+ const se = V(180), ce = y + h * Math.cos(se), ye = y + h * Math.sin(se), he = y + Y * Math.cos(se), Ce = y + Y * Math.sin(se);
1909
1909
  return [
1910
1910
  `M ${K} ${ie}`,
1911
1911
  `A ${h} ${h} 0 0 1 ${ce} ${ye}`,
1912
1912
  `A ${h} ${h} 0 0 1 ${K} ${ie + 0.01}`,
1913
- `L ${R} ${V + 0.01}`,
1913
+ `L ${R} ${A + 0.01}`,
1914
1914
  `A ${Y} ${Y} 0 0 0 ${he} ${Ce}`,
1915
- `A ${Y} ${Y} 0 0 0 ${R} ${V}`,
1915
+ `A ${Y} ${Y} 0 0 0 ${R} ${A}`,
1916
1916
  "Z"
1917
1917
  ].join(" ");
1918
1918
  }
1919
1919
  if (t.shape === "clip") {
1920
- const D = J / 2 / H * (180 / Math.PI), se = P(q + D), ce = P(re - D), ye = y + Y * Math.cos(se), he = y + Y * Math.sin(se), Ce = y + Y * Math.cos(ce), X = y + Y * Math.sin(ce);
1920
+ const D = G / 2 / W * (180 / Math.PI), se = V(q + D), ce = V(re - D), ye = y + Y * Math.cos(se), he = y + Y * Math.sin(se), Ce = y + Y * Math.cos(ce), X = y + Y * Math.sin(ce);
1921
1921
  return [
1922
1922
  `M ${K} ${ie}`,
1923
- `A ${h} ${h} 0 ${A} 1 ${z} ${L}`,
1923
+ `A ${h} ${h} 0 ${I} 1 ${x} ${L}`,
1924
1924
  `L ${Ce} ${X}`,
1925
- `A ${Y} ${Y} 0 ${A} 0 ${ye} ${he}`,
1925
+ `A ${Y} ${Y} 0 ${I} 0 ${ye} ${he}`,
1926
1926
  "Z"
1927
1927
  ].join(" ");
1928
1928
  } else
1929
1929
  return [
1930
1930
  `M ${K} ${ie}`,
1931
- `A ${h} ${h} 0 ${A} 1 ${z} ${L}`,
1932
- `L ${G} ${ue}`,
1933
- `A ${Y} ${Y} 0 ${A} 0 ${R} ${V}`,
1931
+ `A ${h} ${h} 0 ${I} 1 ${x} ${L}`,
1932
+ `L ${U} ${ue}`,
1933
+ `A ${Y} ${Y} 0 ${I} 0 ${R} ${A}`,
1934
1934
  "Z"
1935
1935
  ].join(" ");
1936
- }), g = n(() => t.shape !== "round"), _ = n(() => {
1936
+ }), g = n(() => t.shape !== "round"), E = n(() => {
1937
1937
  const y = t.type === "dashboard" ? "rotate(135deg)" : "rotate(-90deg)";
1938
1938
  return {
1939
1939
  width: `${t.width}px`,
1940
1940
  height: `${t.width}px`,
1941
1941
  transform: y
1942
1942
  };
1943
- }), N = n(() => t.format ? t.format(t.percentage) : t.steps ? `${t.percentage}/${t.max}` : `${Math.round(l.value)}%`), E = n(() => [
1943
+ }), z = n(() => t.format ? t.format(t.percentage) : t.steps ? `${t.percentage}/${t.max}` : `${Math.round(l.value)}%`), M = n(() => [
1944
1944
  o.b(),
1945
1945
  o.m(t.type),
1946
- U(t.size, e) && o.m(t.size),
1946
+ Z(t.size, e) && o.m(t.size),
1947
1947
  o.is("status", !!t.status),
1948
1948
  o.is(t.status, !!t.status),
1949
1949
  o.is("text-inside", t.textInside && t.type === "line"),
@@ -1953,26 +1953,26 @@ const xt = {
1953
1953
  o.is("loading", t.loading),
1954
1954
  o.is("custom-color", !!d.value),
1955
1955
  o.m(`shape-${t.shape}`),
1956
- o.is("custom-size", !U(t.size, e))
1957
- ]), M = n(() => t.steps && t.type === "line"), b = n(() => {
1956
+ o.is("custom-size", !Z(t.size, e))
1957
+ ]), N = n(() => t.steps && t.type === "line"), b = n(() => {
1958
1958
  if (!t.steps) return [];
1959
1959
  const y = Math.max(1, Math.floor(t.max));
1960
- return Array.from({ length: y }, (H, J) => {
1961
- const I = J + 1;
1960
+ return Array.from({ length: y }, (W, G) => {
1961
+ const T = G + 1;
1962
1962
  let ae;
1963
- return t.percentage >= I ? ae = "full" : t.percentage > J ? ae = "current" : ae = "empty", {
1964
- index: J,
1963
+ return t.percentage >= T ? ae = "full" : t.percentage > G ? ae = "current" : ae = "empty", {
1964
+ index: G,
1965
1965
  state: ae,
1966
- color: t.stepColors[J] || void 0
1966
+ color: t.stepColors[G] || void 0
1967
1967
  };
1968
1968
  });
1969
1969
  });
1970
- return (y, H) => (u(), f("div", {
1971
- class: c(E.value),
1970
+ return (y, W) => (u(), f("div", {
1971
+ class: c(M.value),
1972
1972
  style: j(y.indeterminate ? m.value : void 0)
1973
1973
  }, [
1974
1974
  y.type === "line" ? (u(), f(de, { key: 0 }, [
1975
- M.value ? (u(), f(de, { key: 0 }, [
1975
+ N.value ? (u(), f(de, { key: 0 }, [
1976
1976
  k("div", {
1977
1977
  class: c(a(o).e("outer"))
1978
1978
  }, [
@@ -1980,14 +1980,14 @@ const xt = {
1980
1980
  class: c([a(o).e("inner"), a(o).e("steps")]),
1981
1981
  style: j({ height: `${i.value}px`, gap: `${y.stepGap}px` })
1982
1982
  }, [
1983
- (u(!0), f(de, null, ke(b.value, (J) => (u(), f("div", {
1984
- key: J.index,
1983
+ (u(!0), f(de, null, ke(b.value, (G) => (u(), f("div", {
1984
+ key: G.index,
1985
1985
  class: c([
1986
1986
  a(o).e("step"),
1987
- a(o).is("full", J.state === "full"),
1988
- a(o).is("current", J.state === "current")
1987
+ a(o).is("full", G.state === "full"),
1988
+ a(o).is("current", G.state === "current")
1989
1989
  ]),
1990
- style: j(J.color ? { "--cp-progress-color": J.color } : void 0)
1990
+ style: j(G.color ? { "--cp-progress-color": G.color } : void 0)
1991
1991
  }, null, 6))), 128))
1992
1992
  ], 6)
1993
1993
  ], 2),
@@ -1996,7 +1996,7 @@ const xt = {
1996
1996
  class: c(a(o).e("text"))
1997
1997
  }, [
1998
1998
  F(y.$slots, "default", {}, () => [
1999
- pe(Z(N.value), 1)
1999
+ pe(J(z.value), 1)
2000
2000
  ])
2001
2001
  ], 2)) : O("", !0)
2002
2002
  ], 64)) : (u(), f(de, { key: 1 }, [
@@ -2016,7 +2016,7 @@ const xt = {
2016
2016
  class: c(a(o).e("innerText"))
2017
2017
  }, [
2018
2018
  F(y.$slots, "default", {}, () => [
2019
- pe(Z(N.value), 1)
2019
+ pe(J(z.value), 1)
2020
2020
  ])
2021
2021
  ], 2)) : O("", !0)
2022
2022
  ], 6)
@@ -2027,14 +2027,14 @@ const xt = {
2027
2027
  class: c(a(o).e("text"))
2028
2028
  }, [
2029
2029
  F(y.$slots, "default", {}, () => [
2030
- pe(Z(N.value), 1)
2030
+ pe(J(z.value), 1)
2031
2031
  ])
2032
2032
  ], 2)) : O("", !0)
2033
2033
  ], 64))
2034
2034
  ], 64)) : (u(), f(de, { key: 1 }, [
2035
2035
  (u(), f("svg", {
2036
2036
  class: c(a(o).e("circle")),
2037
- style: j(_.value),
2037
+ style: j(E.value),
2038
2038
  viewBox: `0 0 ${v.value.size} ${v.value.size}`
2039
2039
  }, [
2040
2040
  k("circle", {
@@ -2045,20 +2045,20 @@ const xt = {
2045
2045
  fill: "none",
2046
2046
  style: j(S.value)
2047
2047
  }, null, 14, so),
2048
- w.value ? (u(), f("circle", {
2048
+ B.value ? (u(), f("circle", {
2049
2049
  key: 0,
2050
2050
  class: c(a(o).e("inner-track")),
2051
2051
  cx: v.value.center,
2052
2052
  cy: v.value.center,
2053
2053
  r: v.value.innerRadius,
2054
2054
  fill: "none",
2055
- style: j(x.value)
2055
+ style: j(w.value)
2056
2056
  }, null, 14, ro)) : O("", !0),
2057
2057
  g.value ? (u(), f("path", {
2058
2058
  key: 1,
2059
2059
  class: c(a(o).e("path")),
2060
- d: B.value,
2061
- style: j(T.value)
2060
+ d: _.value,
2061
+ style: j(P.value)
2062
2062
  }, null, 14, io)) : (u(), f("circle", {
2063
2063
  key: 2,
2064
2064
  class: c(a(o).e("path")),
@@ -2069,7 +2069,7 @@ const xt = {
2069
2069
  "stroke-width": i.value,
2070
2070
  "stroke-linecap": "round",
2071
2071
  style: j({
2072
- ...T.value,
2072
+ ...P.value,
2073
2073
  strokeDasharray: `${v.value.dashLength} ${v.value.gapLength}`,
2074
2074
  strokeDashoffset: v.value.offset
2075
2075
  })
@@ -2080,7 +2080,7 @@ const xt = {
2080
2080
  class: c(a(o).e("text"))
2081
2081
  }, [
2082
2082
  F(y.$slots, "default", {}, () => [
2083
- pe(Z(N.value), 1)
2083
+ pe(J(z.value), 1)
2084
2084
  ])
2085
2085
  ], 2)) : O("", !0)
2086
2086
  ], 64))
@@ -2229,26 +2229,26 @@ const xt = {
2229
2229
  props: po,
2230
2230
  emits: fo,
2231
2231
  setup(s, { expose: t, emit: o }) {
2232
- const e = s, r = o, l = le("switch"), d = { sm: 16, md: 20, lg: 24 }, i = W(), p = W(!1), m = n(() => e.disabled || e.loading || p.value), v = n(() => [
2232
+ const e = s, r = o, l = le("switch"), d = { sm: 16, md: 20, lg: 24 }, i = H(), p = H(!1), m = n(() => e.disabled || e.loading || p.value), v = n(() => [
2233
2233
  l.b(),
2234
- U(e.size) && l.m(e.size),
2234
+ Z(e.size) && l.m(e.size),
2235
2235
  l.is("checked", e.modelValue),
2236
2236
  l.is("disabled", e.disabled),
2237
2237
  l.is("loading", e.loading),
2238
2238
  l.is("fit-text", e.fitText),
2239
- l.is("custom-size", !U(e.size))
2239
+ l.is("custom-size", !Z(e.size))
2240
2240
  ]), S = {
2241
2241
  primary: "var(--cp-color-primary)",
2242
2242
  success: "var(--cp-color-success)",
2243
2243
  warning: "var(--cp-color-warning)",
2244
2244
  error: "var(--cp-color-error)",
2245
2245
  info: "var(--cp-color-info)"
2246
- }, w = n(() => {
2247
- const T = {};
2248
- return e.color ? (T["--cp-switch-active-color"] = e.color, T["--cp-switch-active-color-light"] = `${e.color}40`) : e.type && S[e.type] && (T["--cp-switch-active-color"] = S[e.type], T["--cp-switch-active-color-light"] = `var(--cp-color-${e.type}-light)`), e.inactiveColor && (T["--cp-switch-inactive-color"] = e.inactiveColor), e.width && (T.width = typeof e.width == "string" ? e.width : `${e.width}px`), U(e.size) || (T["--cp-switch-height"] = we(e.size, d)), T;
2249
- }), x = async () => {
2246
+ }, B = n(() => {
2247
+ const P = {};
2248
+ return e.color ? (P["--cp-switch-active-color"] = e.color, P["--cp-switch-active-color-light"] = `${e.color}40`) : e.type && S[e.type] && (P["--cp-switch-active-color"] = S[e.type], P["--cp-switch-active-color-light"] = `var(--cp-color-${e.type}-light)`), e.inactiveColor && (P["--cp-switch-inactive-color"] = e.inactiveColor), e.width && (P.width = typeof e.width == "string" ? e.width : `${e.width}px`), Z(e.size) || (P["--cp-switch-height"] = we(e.size, d)), P;
2249
+ }), w = async () => {
2250
2250
  if (m.value) return;
2251
- const T = !e.modelValue;
2251
+ const P = !e.modelValue;
2252
2252
  if (e.beforeChange) {
2253
2253
  p.value = !0;
2254
2254
  try {
@@ -2262,17 +2262,17 @@ const xt = {
2262
2262
  }
2263
2263
  p.value = !1;
2264
2264
  }
2265
- r("update:modelValue", T), r("change", T);
2265
+ r("update:modelValue", P), r("change", P);
2266
2266
  };
2267
2267
  return t({
2268
2268
  inputRef: i
2269
- }), (T, B) => (u(), f("div", {
2269
+ }), (P, _) => (u(), f("div", {
2270
2270
  class: c(v.value),
2271
- style: j(w.value),
2271
+ style: j(B.value),
2272
2272
  role: "switch",
2273
2273
  "aria-checked": e.modelValue,
2274
2274
  "aria-disabled": m.value,
2275
- onClick: x
2275
+ onClick: w
2276
2276
  }, [
2277
2277
  k("input", {
2278
2278
  ref_key: "inputRef",
@@ -2282,7 +2282,7 @@ const xt = {
2282
2282
  name: e.name,
2283
2283
  checked: e.modelValue,
2284
2284
  disabled: m.value,
2285
- onChange: B[0] || (B[0] = Pe(() => {
2285
+ onChange: _[0] || (_[0] = Pe(() => {
2286
2286
  }, ["stop"]))
2287
2287
  }, null, 42, vo),
2288
2288
  k("div", {
@@ -2292,19 +2292,19 @@ const xt = {
2292
2292
  key: 0,
2293
2293
  class: c(a(l).e("wrapper"))
2294
2294
  }, [
2295
- k("span", mo, Z(e.activeText), 1),
2296
- k("span", go, Z(e.inactiveText), 1)
2295
+ k("span", mo, J(e.activeText), 1),
2296
+ k("span", go, J(e.inactiveText), 1)
2297
2297
  ], 2)) : O("", !0),
2298
2298
  e.inactiveText ? (u(), f("span", {
2299
2299
  key: 1,
2300
2300
  class: c(a(l).e("inactive-text"))
2301
2301
  }, [
2302
- k("span", ho, Z(e.inactiveText), 1)
2302
+ k("span", ho, J(e.inactiveText), 1)
2303
2303
  ], 2)) : O("", !0),
2304
2304
  k("div", {
2305
2305
  class: c(a(l).e("thumb"))
2306
2306
  }, [
2307
- e.loading ? (u(), f("div", bo, [...B[1] || (B[1] = [
2307
+ e.loading ? (u(), f("div", bo, [..._[1] || (_[1] = [
2308
2308
  k("svg", {
2309
2309
  viewBox: "0 0 24 24",
2310
2310
  class: "loading-svg"
@@ -2332,7 +2332,7 @@ const xt = {
2332
2332
  key: 2,
2333
2333
  class: c(a(l).e("active-text"))
2334
2334
  }, [
2335
- k("span", ko, Z(e.activeText), 1)
2335
+ k("span", ko, J(e.activeText), 1)
2336
2336
  ], 2)) : O("", !0)
2337
2337
  ], 2)
2338
2338
  ], 14, yo));
@@ -2605,36 +2605,36 @@ const xt = {
2605
2605
  ]), d = n(() => t.color ? t.color : t.type && t.type !== "default" ? `var(--cp-color-${t.type})` : null), i = n(() => t.color ? `color-mix(in srgb, ${t.color} 30%, transparent)` : t.type && t.type !== "default" ? `var(--cp-color-${t.type}-light)` : null), p = n(() => {
2606
2606
  const y = {};
2607
2607
  d.value && (y["--cp-card-color"] = d.value), i.value && (y["--cp-card-color-light"] = i.value), t.bgColor && (y["--cp-card-bg"] = t.bgColor), t.borderColor && (y["--cp-card-border-color"] = t.borderColor), t.dividerColor && (y["--cp-card-divider-color"] = t.dividerColor), t.headerDividerColor && (y["--cp-card-header-divider-color"] = t.headerDividerColor), t.footerDividerColor && (y["--cp-card-footer-divider-color"] = t.footerDividerColor), t.shadowColor ? y["--cp-card-shadow-color"] = t.shadowColor : d.value && (y["--cp-card-shadow-color"] = `color-mix(in srgb, ${d.value} 40%, black)`);
2608
- const H = Ne(t.dimmedDuration);
2609
- return H && (y["--cp-card-dimmed-duration"] = H), y;
2608
+ const W = Ne(t.dimmedDuration);
2609
+ return W && (y["--cp-card-dimmed-duration"] = W), y;
2610
2610
  }), m = n(() => {
2611
2611
  const y = typeof t.bodyStyle == "string" ? {} : { ...t.bodyStyle };
2612
2612
  return t.bodyPadding && (y.padding = t.bodyPadding), y;
2613
2613
  }), v = n(
2614
2614
  () => t.title || o.header || o.title || o.extra
2615
- ), S = n(() => !!o.footer), w = n(() => !!o.overlay), x = n(() => [
2615
+ ), S = n(() => !!o.footer), B = n(() => !!o.overlay), w = n(() => [
2616
2616
  e.e("header"),
2617
2617
  e.is("bordered", t.headerBorder),
2618
2618
  t.headerClass
2619
- ]), T = n(() => [
2619
+ ]), P = n(() => [
2620
2620
  e.e("footer"),
2621
2621
  e.is("bordered", t.footerBorder)
2622
- ]), B = n(() => t.actionEffect ?? t.overlayEffect), g = n(() => t.actionColor ?? t.overlayColor), _ = n(() => t.actionBlur ?? t.overlayBlur), N = n(() => [
2622
+ ]), _ = n(() => t.actionEffect ?? t.overlayEffect), g = n(() => t.actionColor ?? t.overlayColor), E = n(() => t.actionBlur ?? t.overlayBlur), z = n(() => [
2623
2623
  e.e("overlay"),
2624
2624
  e.bem("", "overlay", t.overlayAnimation),
2625
2625
  e.bem("", "overlay", t.overlayPosition),
2626
- e.bem("", "overlay", `effect-${B.value}`)
2627
- ]), E = n(() => [
2626
+ e.bem("", "overlay", `effect-${_.value}`)
2627
+ ]), M = n(() => [
2628
2628
  e.e("overlay-backdrop"),
2629
2629
  e.bem("", "overlay-backdrop", `effect-${t.overlayEffect}`)
2630
- ]), M = (y) => y === void 0 ? "10px" : typeof y == "number" ? `${y}px` : y, b = n(() => ({
2630
+ ]), N = (y) => y === void 0 ? "10px" : typeof y == "number" ? `${y}px` : y, b = n(() => ({
2631
2631
  "--cp-card-overlay-duration": Ne(t.overlayDuration),
2632
2632
  "--cp-card-overlay-color": t.overlayColor,
2633
- "--cp-card-overlay-blur": M(t.overlayBlur),
2633
+ "--cp-card-overlay-blur": N(t.overlayBlur),
2634
2634
  "--cp-card-action-color": g.value,
2635
- "--cp-card-action-blur": M(_.value)
2635
+ "--cp-card-action-blur": N(E.value)
2636
2636
  }));
2637
- return (y, H) => (u(), f("div", {
2637
+ return (y, W) => (u(), f("div", {
2638
2638
  class: c(r.value),
2639
2639
  style: j(p.value)
2640
2640
  }, [
@@ -2650,7 +2650,7 @@ const xt = {
2650
2650
  ], 2)) : O("", !0),
2651
2651
  v.value ? (u(), f("div", {
2652
2652
  key: 1,
2653
- class: c(x.value),
2653
+ class: c(w.value),
2654
2654
  style: j(y.headerStyle)
2655
2655
  }, [
2656
2656
  F(y.$slots, "header", {}, () => [
@@ -2658,7 +2658,7 @@ const xt = {
2658
2658
  class: c(a(e).e("title"))
2659
2659
  }, [
2660
2660
  F(y.$slots, "title", {}, () => [
2661
- pe(Z(y.title), 1)
2661
+ pe(J(y.title), 1)
2662
2662
  ])
2663
2663
  ], 2),
2664
2664
  a(o).extra ? (u(), f("div", {
@@ -2677,18 +2677,18 @@ const xt = {
2677
2677
  ], 6),
2678
2678
  S.value ? (u(), f("div", {
2679
2679
  key: 2,
2680
- class: c(T.value)
2680
+ class: c(P.value)
2681
2681
  }, [
2682
2682
  F(y.$slots, "footer")
2683
2683
  ], 2)) : O("", !0),
2684
- w.value ? (u(), f("div", {
2684
+ B.value ? (u(), f("div", {
2685
2685
  key: 3,
2686
- class: c(E.value),
2686
+ class: c(M.value),
2687
2687
  style: j(b.value)
2688
2688
  }, null, 6)) : O("", !0),
2689
- w.value ? (u(), f("div", {
2689
+ B.value ? (u(), f("div", {
2690
2690
  key: 4,
2691
- class: c(N.value),
2691
+ class: c(z.value),
2692
2692
  style: j(b.value)
2693
2693
  }, [
2694
2694
  F(y.$slots, "overlay")
@@ -2819,7 +2819,7 @@ const xt = {
2819
2819
  info: "var(--cp-color-info)"
2820
2820
  }, d = { sm: 20, md: 24, lg: 28 }, i = n(() => [
2821
2821
  r.b(),
2822
- U(o.size) && r.m(o.size),
2822
+ Z(o.size) && r.m(o.size),
2823
2823
  r.m(`variant-${o.variant}`),
2824
2824
  r.m(`shape-${o.shape}`),
2825
2825
  r.m(`type-${o.type}`),
@@ -2831,38 +2831,38 @@ const xt = {
2831
2831
  r.is("typed", o.type !== "default" && !o.color),
2832
2832
  r.is("selectable", o.selectable),
2833
2833
  r.is("selected", o.selected),
2834
- r.is("custom-size", !U(o.size))
2834
+ r.is("custom-size", !Z(o.size))
2835
2835
  ]), p = n(() => {
2836
- const w = {};
2837
- return o.color ? (w["--cp-tag-color"] = o.color, w["--cp-tag-color-light"] = `${o.color}33`) : o.type && o.type !== "default" && l[o.type] && (w["--cp-tag-color"] = l[o.type], w["--cp-tag-color-light"] = `var(--cp-color-${o.type}-light)`), U(o.size) || (w["--cp-tag-height"] = we(o.size, d)), w;
2838
- }), m = (w) => {
2839
- o.disabled || (e("click", w), o.selectable && e("update:selected", !o.selected));
2840
- }, v = (w) => {
2841
- w.stopPropagation(), !o.disabled && e("close", w);
2842
- }, S = (w) => {
2843
- w.stopPropagation(), !o.disabled && e("close", new MouseEvent("click"));
2836
+ const B = {};
2837
+ return o.color ? (B["--cp-tag-color"] = o.color, B["--cp-tag-color-light"] = `${o.color}33`) : o.type && o.type !== "default" && l[o.type] && (B["--cp-tag-color"] = l[o.type], B["--cp-tag-color-light"] = `var(--cp-color-${o.type}-light)`), Z(o.size) || (B["--cp-tag-height"] = we(o.size, d)), B;
2838
+ }), m = (B) => {
2839
+ o.disabled || (e("click", B), o.selectable && e("update:selected", !o.selected));
2840
+ }, v = (B) => {
2841
+ B.stopPropagation(), !o.disabled && e("close", B);
2842
+ }, S = (B) => {
2843
+ B.stopPropagation(), !o.disabled && e("close", new MouseEvent("click"));
2844
2844
  };
2845
- return (w, x) => (u(), f("span", {
2845
+ return (B, w) => (u(), f("span", {
2846
2846
  class: c(i.value),
2847
2847
  style: j(p.value),
2848
2848
  onClick: m
2849
2849
  }, [
2850
- w.$slots.prefix ? (u(), f("span", {
2850
+ B.$slots.prefix ? (u(), f("span", {
2851
2851
  key: 0,
2852
2852
  class: c(a(r).e("prefix"))
2853
2853
  }, [
2854
- F(w.$slots, "prefix")
2854
+ F(B.$slots, "prefix")
2855
2855
  ], 2)) : O("", !0),
2856
2856
  k("span", {
2857
2857
  class: c(a(r).e("content"))
2858
2858
  }, [
2859
- F(w.$slots, "default")
2859
+ F(B.$slots, "default")
2860
2860
  ], 2),
2861
- w.$slots.suffix ? (u(), f("span", {
2861
+ B.$slots.suffix ? (u(), f("span", {
2862
2862
  key: 1,
2863
2863
  class: c(a(r).e("suffix"))
2864
2864
  }, [
2865
- F(w.$slots, "suffix")
2865
+ F(B.$slots, "suffix")
2866
2866
  ], 2)) : O("", !0),
2867
2867
  o.closable ? (u(), f("span", {
2868
2868
  key: 2,
@@ -2871,7 +2871,7 @@ const xt = {
2871
2871
  tabindex: "0",
2872
2872
  onClick: v,
2873
2873
  onKeydown: Ge(Pe(S, ["prevent"]), ["enter"])
2874
- }, [...x[0] || (x[0] = [
2874
+ }, [...w[0] || (w[0] = [
2875
2875
  k("svg", {
2876
2876
  viewBox: "0 0 24 24",
2877
2877
  fill: "none",
@@ -2888,7 +2888,7 @@ const xt = {
2888
2888
  }, null, 2)) : O("", !0)
2889
2889
  ], 6));
2890
2890
  }
2891
- }), Ka = te(Bo), Mo = {
2891
+ }), _a = te(Bo), Mo = {
2892
2892
  /**
2893
2893
  * 文字类型(颜色预设)
2894
2894
  * @default 'default'
@@ -3161,7 +3161,7 @@ const xt = {
3161
3161
  ], 14, No);
3162
3162
  };
3163
3163
  }
3164
- }), _a = te(Po), Vo = {
3164
+ }), Ka = te(Po), Vo = {
3165
3165
  /**
3166
3166
  * 状态指示器颜色类型
3167
3167
  * @default 'default'
@@ -3256,19 +3256,19 @@ const xt = {
3256
3256
  const t = s, o = Se(), e = le("status-indicator"), r = { sm: 8, md: 12, lg: 16 }, l = n(() => !!t.label || !!o.default), d = n(() => [
3257
3257
  e.b(),
3258
3258
  e.m(t.type),
3259
- U(t.size) && e.m(t.size),
3259
+ Z(t.size) && e.m(t.size),
3260
3260
  e.m(`shape-${t.shape}`),
3261
3261
  e.m(`animation-${t.animation}`),
3262
3262
  e.is("custom-color", !!t.color),
3263
3263
  e.is("with-label", l.value),
3264
- e.is("custom-size", !U(t.size))
3264
+ e.is("custom-size", !Z(t.size))
3265
3265
  ]), i = n(() => {
3266
3266
  const p = {};
3267
3267
  if (t.color && (p["--cp-status-indicator-color"] = t.color), t.duration) {
3268
3268
  const m = Ne(t.duration);
3269
3269
  m && (p["--cp-status-indicator-duration"] = m);
3270
3270
  }
3271
- return t.intensity !== 1 && (p["--cp-status-indicator-intensity"] = String(t.intensity)), t.gap !== "" && (p["--cp-status-indicator-gap"] = typeof t.gap == "number" ? `${t.gap}px` : t.gap), U(t.size) || (p["--cp-status-indicator-size"] = we(t.size, r)), p;
3271
+ return t.intensity !== 1 && (p["--cp-status-indicator-intensity"] = String(t.intensity)), t.gap !== "" && (p["--cp-status-indicator-gap"] = typeof t.gap == "number" ? `${t.gap}px` : t.gap), Z(t.size) || (p["--cp-status-indicator-size"] = we(t.size, r)), p;
3272
3272
  });
3273
3273
  return (p, m) => (u(), f("span", {
3274
3274
  class: c(d.value),
@@ -3287,12 +3287,12 @@ const xt = {
3287
3287
  class: c(a(e).e("label"))
3288
3288
  }, [
3289
3289
  F(p.$slots, "default", {}, () => [
3290
- pe(Z(p.label), 1)
3290
+ pe(J(p.label), 1)
3291
3291
  ])
3292
3292
  ], 2)) : O("", !0)
3293
3293
  ], 6));
3294
3294
  }
3295
- }), ja = te(Ao), To = {
3295
+ }), ja = te(Ao), Io = {
3296
3296
  /**
3297
3297
  * 图片源地址
3298
3298
  * @default ''
@@ -3462,7 +3462,7 @@ const xt = {
3462
3462
  type: Boolean,
3463
3463
  default: !1
3464
3464
  }
3465
- }, Io = {
3465
+ }, To = {
3466
3466
  /**
3467
3467
  * 图片加载成功时触发
3468
3468
  * @param event - 原生加载事件
@@ -3476,23 +3476,23 @@ const xt = {
3476
3476
  }, Eo = ["src", "alt", "draggable"], Lo = /* @__PURE__ */ Q({
3477
3477
  name: `${oe}Image`,
3478
3478
  __name: "image",
3479
- props: To,
3480
- emits: Io,
3479
+ props: Io,
3480
+ emits: To,
3481
3481
  setup(s, { emit: t }) {
3482
- const o = s, e = t, r = le("image"), l = W(!0), d = W(!1), i = W(""), p = W(null), m = W(null), v = W(!o.lazy);
3482
+ const o = s, e = t, r = le("image"), l = H(!0), d = H(!1), i = H(""), p = H(null), m = H(null), v = H(!o.lazy);
3483
3483
  let S = null;
3484
- const { processedSrc: w } = rt({
3484
+ const { processedSrc: B } = rt({
3485
3485
  src: ve(o, "src"),
3486
3486
  processor: ve(o, "srcProcessor"),
3487
3487
  params: ve(o, "processorParams")
3488
- }), x = {
3488
+ }), w = {
3489
3489
  default: "var(--cp-text-muted)",
3490
3490
  primary: "var(--cp-color-primary)",
3491
3491
  success: "var(--cp-color-success)",
3492
3492
  warning: "var(--cp-color-warning)",
3493
3493
  error: "var(--cp-color-error)",
3494
3494
  info: "var(--cp-color-info)"
3495
- }, T = n(() => [
3495
+ }, P = n(() => [
3496
3496
  r.b(),
3497
3497
  r.m(`shape-${o.shape}`),
3498
3498
  r.m(`fit-${o.fit}`),
@@ -3500,31 +3500,31 @@ const xt = {
3500
3500
  r.is("error", d.value),
3501
3501
  r.is("hoverable", o.hoverable),
3502
3502
  o.hoverable && r.m(`hover-${o.hoverMode}`)
3503
- ]), B = n(() => {
3504
- const M = {};
3505
- if (o.width && (M.width = typeof o.width == "number" ? `${o.width}px` : o.width), o.height && (M.height = typeof o.height == "number" ? `${o.height}px` : o.height), o.color ? M["--cp-image-decor-color"] = o.color : o.type && x[o.type] && (M["--cp-image-decor-color"] = x[o.type]), o.hoverable && o.hoverDuration) {
3503
+ ]), _ = n(() => {
3504
+ const N = {};
3505
+ if (o.width && (N.width = typeof o.width == "number" ? `${o.width}px` : o.width), o.height && (N.height = typeof o.height == "number" ? `${o.height}px` : o.height), o.color ? N["--cp-image-decor-color"] = o.color : o.type && w[o.type] && (N["--cp-image-decor-color"] = w[o.type]), o.hoverable && o.hoverDuration) {
3506
3506
  const b = Ne(o.hoverDuration);
3507
- b && (M["--cp-image-hover-duration"] = b);
3507
+ b && (N["--cp-image-hover-duration"] = b);
3508
3508
  }
3509
- return M;
3509
+ return N;
3510
3510
  }), g = () => {
3511
3511
  if (!i.value) {
3512
3512
  l.value = !1;
3513
3513
  return;
3514
3514
  }
3515
3515
  l.value = !0, d.value = !1;
3516
- }, _ = (M) => {
3517
- l.value = !1, d.value = !1, e("load", M);
3518
- }, N = (M) => {
3516
+ }, E = (N) => {
3517
+ l.value = !1, d.value = !1, e("load", N);
3518
+ }, z = (N) => {
3519
3519
  if (l.value = !1, o.fallbackSrc && i.value !== o.fallbackSrc) {
3520
3520
  i.value = o.fallbackSrc;
3521
3521
  return;
3522
3522
  }
3523
- d.value = !0, e("error", M);
3524
- }, E = () => {
3523
+ d.value = !0, e("error", N);
3524
+ }, M = () => {
3525
3525
  !o.lazy || !m.value || (S = new IntersectionObserver(
3526
- (M) => {
3527
- M[0].isIntersecting && (v.value = !0, S == null || S.disconnect());
3526
+ (N) => {
3527
+ N[0].isIntersecting && (v.value = !0, S == null || S.disconnect());
3528
3528
  },
3529
3529
  {
3530
3530
  rootMargin: "50px"
@@ -3533,28 +3533,28 @@ const xt = {
3533
3533
  ), S.observe(m.value));
3534
3534
  };
3535
3535
  return ge(
3536
- w,
3537
- (M) => {
3538
- v.value && (i.value = M, g());
3536
+ B,
3537
+ (N) => {
3538
+ v.value && (i.value = N, g());
3539
3539
  },
3540
3540
  { immediate: !0 }
3541
- ), ge(v, (M) => {
3542
- M && w.value && (i.value = w.value, g());
3541
+ ), ge(v, (N) => {
3542
+ N && B.value && (i.value = B.value, g());
3543
3543
  }), Ve(() => {
3544
- o.lazy ? E() : (i.value = w.value, g());
3544
+ o.lazy ? M() : (i.value = B.value, g());
3545
3545
  }), Ae(() => {
3546
3546
  S == null || S.disconnect();
3547
- }), (M, b) => (u(), f("div", {
3547
+ }), (N, b) => (u(), f("div", {
3548
3548
  ref_key: "containerRef",
3549
3549
  ref: m,
3550
- class: c(T.value),
3551
- style: j(B.value)
3550
+ class: c(P.value),
3551
+ style: j(_.value)
3552
3552
  }, [
3553
3553
  l.value ? (u(), f("div", {
3554
3554
  key: 0,
3555
3555
  class: c(a(r).e("placeholder"))
3556
3556
  }, [
3557
- F(M.$slots, "placeholder", {}, () => [
3557
+ F(N.$slots, "placeholder", {}, () => [
3558
3558
  k("div", {
3559
3559
  class: c(a(r).e("skeleton"))
3560
3560
  }, [
@@ -3587,7 +3587,7 @@ const xt = {
3587
3587
  key: 1,
3588
3588
  class: c(a(r).e("error"))
3589
3589
  }, [
3590
- F(M.$slots, "error", {}, () => [
3590
+ F(N.$slots, "error", {}, () => [
3591
3591
  (u(), f("svg", {
3592
3592
  class: c(a(r).e("error-icon")),
3593
3593
  viewBox: "0 0 24 24",
@@ -3609,15 +3609,15 @@ const xt = {
3609
3609
  }, "加载失败", 2)
3610
3610
  ])
3611
3611
  ], 2)) : O("", !0),
3612
- Te(k("img", {
3612
+ Ie(k("img", {
3613
3613
  ref_key: "imageRef",
3614
3614
  ref: p,
3615
3615
  class: c(a(r).e("inner")),
3616
3616
  src: i.value,
3617
- alt: M.alt,
3617
+ alt: N.alt,
3618
3618
  draggable: o.draggable,
3619
- onLoad: _,
3620
- onError: N
3619
+ onLoad: E,
3620
+ onError: z
3621
3621
  }, null, 42, Eo), [
3622
3622
  [Re, !l.value && !d.value]
3623
3623
  ]),
@@ -3817,7 +3817,7 @@ const xt = {
3817
3817
  type: String,
3818
3818
  default: void 0
3819
3819
  }
3820
- }, ct = Symbol("avatarGroup"), Ko = ["src", "alt", "draggable"], _o = /* @__PURE__ */ Q({
3820
+ }, ct = Symbol("avatarGroup"), _o = ["src", "alt", "draggable"], Ko = /* @__PURE__ */ Q({
3821
3821
  name: `${oe}Avatar`,
3822
3822
  __name: "avatar",
3823
3823
  props: Do,
@@ -3827,19 +3827,19 @@ const xt = {
3827
3827
  src: ve(o, "src"),
3828
3828
  processor: ve(o, "srcProcessor"),
3829
3829
  params: ve(o, "processorParams")
3830
- }), p = W(!0), m = W(!1), v = W(i.value), S = n(() => o.size !== "md" ? o.size : (d == null ? void 0 : d.size) ?? o.size), w = n(() => o.shape !== "circle" ? o.shape : (d == null ? void 0 : d.shape) ?? o.shape), x = n(() => {
3830
+ }), p = H(!0), m = H(!1), v = H(i.value), S = n(() => o.size !== "md" ? o.size : (d == null ? void 0 : d.size) ?? o.size), B = n(() => o.shape !== "circle" ? o.shape : (d == null ? void 0 : d.shape) ?? o.shape), w = n(() => {
3831
3831
  const b = S.value;
3832
3832
  return typeof b == "number" ? b : He[b] ?? He.md;
3833
- }), T = n(() => [
3833
+ }), P = n(() => [
3834
3834
  l.b(),
3835
- l.m(`shape-${w.value}`),
3835
+ l.m(`shape-${B.value}`),
3836
3836
  l.is("loading", p.value),
3837
3837
  l.is("error", m.value)
3838
- ]), B = n(() => ({
3839
- "--cp-avatar-size": `${x.value}px`
3840
- })), g = n(() => !!v.value && !m.value), _ = n(() => !g.value && o.icon && !r.default), N = n(() => !g.value && !_.value && !r.default), E = (b) => {
3838
+ ]), _ = n(() => ({
3839
+ "--cp-avatar-size": `${w.value}px`
3840
+ })), g = n(() => !!v.value && !m.value), E = n(() => !g.value && o.icon && !r.default), z = n(() => !g.value && !E.value && !r.default), M = (b) => {
3841
3841
  p.value = !1, m.value = !1, e("load", b);
3842
- }, M = (b) => {
3842
+ }, N = (b) => {
3843
3843
  if (p.value = !1, o.fallbackSrc && v.value !== o.fallbackSrc) {
3844
3844
  v.value = o.fallbackSrc;
3845
3845
  return;
@@ -3852,8 +3852,8 @@ const xt = {
3852
3852
  v.value = b, p.value = !0, m.value = !1;
3853
3853
  }
3854
3854
  ), (b, y) => (u(), f("span", {
3855
- class: c(T.value),
3856
- style: j(B.value)
3855
+ class: c(P.value),
3856
+ style: j(_.value)
3857
3857
  }, [
3858
3858
  g.value ? (u(), f("img", {
3859
3859
  key: 0,
@@ -3862,9 +3862,9 @@ const xt = {
3862
3862
  alt: b.alt,
3863
3863
  style: j({ objectFit: b.fit }),
3864
3864
  draggable: o.draggable,
3865
- onLoad: E,
3866
- onError: M
3867
- }, null, 46, Ko)) : _.value ? (u(), ee(a(Ee), {
3865
+ onLoad: M,
3866
+ onError: N
3867
+ }, null, 46, _o)) : E.value ? (u(), ee(a(Ee), {
3868
3868
  key: 1,
3869
3869
  class: c(a(l).e("icon")),
3870
3870
  icon: b.icon
@@ -3873,7 +3873,7 @@ const xt = {
3873
3873
  class: c(a(l).e("text"))
3874
3874
  }, [
3875
3875
  F(b.$slots, "default")
3876
- ], 2)) : N.value ? (u(), f("svg", {
3876
+ ], 2)) : z.value ? (u(), f("svg", {
3877
3877
  key: 3,
3878
3878
  class: c(a(l).e("placeholder")),
3879
3879
  viewBox: "0 0 24 24",
@@ -3894,11 +3894,11 @@ const xt = {
3894
3894
  props: Ro,
3895
3895
  setup(s) {
3896
3896
  const t = s, o = Se(), e = le("avatar-group"), r = n(() => {
3897
- const x = t.size;
3898
- return typeof x == "number" ? x : He[x] ?? He.md;
3897
+ const w = t.size;
3898
+ return typeof w == "number" ? w : He[w] ?? He.md;
3899
3899
  }), l = n(() => {
3900
- const x = t.spacing;
3901
- return typeof x == "number" ? `${x}px` : x;
3900
+ const w = t.spacing;
3901
+ return typeof w == "number" ? `${w}px` : w;
3902
3902
  });
3903
3903
  ze(ct, {
3904
3904
  size: t.size,
@@ -3911,43 +3911,43 @@ const xt = {
3911
3911
  "--cp-avatar-size": `${r.value}px`,
3912
3912
  "--cp-avatar-group-spacing": l.value
3913
3913
  })), p = () => {
3914
- const x = o.default;
3915
- if (!x) return [];
3916
- const T = x();
3917
- if (!T) return [];
3918
- const B = [], g = (_) => {
3919
- _.forEach((N) => {
3920
- Array.isArray(N.children) ? g(N.children) : B.push(N);
3914
+ const w = o.default;
3915
+ if (!w) return [];
3916
+ const P = w();
3917
+ if (!P) return [];
3918
+ const _ = [], g = (E) => {
3919
+ E.forEach((z) => {
3920
+ Array.isArray(z.children) ? g(z.children) : _.push(z);
3921
3921
  });
3922
3922
  };
3923
- return g(T), B;
3923
+ return g(P), _;
3924
3924
  }, m = n(() => {
3925
- const x = p();
3926
- return t.max === void 0 || t.max >= x.length ? x.length : t.max;
3925
+ const w = p();
3926
+ return t.max === void 0 || t.max >= w.length ? w.length : t.max;
3927
3927
  }), v = n(() => {
3928
- const x = p();
3929
- return t.max === void 0 || t.max >= x.length ? 0 : x.length - t.max;
3930
- }), S = n(() => t.collapseShape ?? t.shape), w = n(() => [
3928
+ const w = p();
3929
+ return t.max === void 0 || t.max >= w.length ? 0 : w.length - t.max;
3930
+ }), S = n(() => t.collapseShape ?? t.shape), B = n(() => [
3931
3931
  e.e("counter"),
3932
3932
  e.bem("", "counter", `shape-${S.value}`),
3933
3933
  t.collapseClass
3934
3934
  ]);
3935
- return (x, T) => (u(), f("div", {
3935
+ return (w, P) => (u(), f("div", {
3936
3936
  class: c(d.value),
3937
3937
  style: j(i.value)
3938
3938
  }, [
3939
- (u(!0), f(de, null, ke(p(), (B, g) => (u(), f(de, { key: g }, [
3940
- g < m.value ? (u(), ee($e(B), { key: 0 })) : O("", !0)
3939
+ (u(!0), f(de, null, ke(p(), (_, g) => (u(), f(de, { key: g }, [
3940
+ g < m.value ? (u(), ee($e(_), { key: 0 })) : O("", !0)
3941
3941
  ], 64))), 128)),
3942
3942
  v.value > 0 ? (u(), f("span", {
3943
3943
  key: 0,
3944
- class: c(w.value),
3944
+ class: c(B.value),
3945
3945
  style: j(t.collapseStyle),
3946
3946
  title: t.collapseAvatarsTooltip
3947
- }, " +" + Z(v.value), 15, jo)) : O("", !0)
3947
+ }, " +" + J(v.value), 15, jo)) : O("", !0)
3948
3948
  ], 6));
3949
3949
  }
3950
- }), Wa = te(_o), Ha = te(Fo), Wo = { style: { "flex-grow": "1" } }, Ho = /* @__PURE__ */ Q({
3950
+ }), Wa = te(Ko), Ha = te(Fo), Wo = { style: { "flex-grow": "1" } }, Ho = /* @__PURE__ */ Q({
3951
3951
  name: `${oe}Spacer`,
3952
3952
  __name: "spacer",
3953
3953
  setup(s) {
@@ -4147,39 +4147,39 @@ const xt = {
4147
4147
  props: Yo,
4148
4148
  emits: Xo,
4149
4149
  setup(s, { expose: t, emit: o }) {
4150
- const e = s, r = o, l = le("popover"), d = Se(), i = W(!1), p = n({
4150
+ const e = s, r = o, l = le("popover"), d = Se(), i = H(!1), p = n({
4151
4151
  get: () => e.modelValue !== void 0 ? e.modelValue : i.value,
4152
4152
  set: (C) => {
4153
4153
  e.modelValue !== void 0 ? r("update:modelValue", C) : i.value = C, r(C ? "open" : "close");
4154
4154
  }
4155
- }), m = W(null), v = W(null), S = W({ top: 0, left: 0 });
4156
- let w = null, x = null;
4157
- const T = () => {
4158
- w && (clearTimeout(w), w = null), x && (clearTimeout(x), x = null);
4159
- }, B = () => {
4160
- e.disabled || (T(), e.trigger === "hover" && e.openDelay > 0 ? w = setTimeout(() => {
4155
+ }), m = H(null), v = H(null), S = H({ top: 0, left: 0 });
4156
+ let B = null, w = null;
4157
+ const P = () => {
4158
+ B && (clearTimeout(B), B = null), w && (clearTimeout(w), w = null);
4159
+ }, _ = () => {
4160
+ e.disabled || (P(), e.trigger === "hover" && e.openDelay > 0 ? B = setTimeout(() => {
4161
4161
  p.value = !0;
4162
4162
  }, e.openDelay) : p.value = !0);
4163
4163
  }, g = () => {
4164
- T(), e.trigger === "hover" && e.closeDelay > 0 ? x = setTimeout(() => {
4164
+ P(), e.trigger === "hover" && e.closeDelay > 0 ? w = setTimeout(() => {
4165
4165
  p.value = !1;
4166
4166
  }, e.closeDelay) : p.value = !1;
4167
- }, _ = () => {
4168
- p.value ? g() : B();
4167
+ }, E = () => {
4168
+ p.value ? g() : _();
4169
4169
  };
4170
- let N = !1;
4171
- const E = () => {
4172
- !p.value || !m.value || !v.value || N || (N = !0, requestAnimationFrame(() => {
4170
+ let z = !1;
4171
+ const M = () => {
4172
+ !p.value || !m.value || !v.value || z || (z = !0, requestAnimationFrame(() => {
4173
4173
  if (!m.value || !v.value) {
4174
- N = !1;
4174
+ z = !1;
4175
4175
  return;
4176
4176
  }
4177
- const C = m.value.getBoundingClientRect(), K = e.showArrow && !e.flipArrow && e.offset === 8 ? 12 : e.offset, ie = v.value.offsetWidth, z = v.value.offsetHeight;
4177
+ const C = m.value.getBoundingClientRect(), K = e.showArrow && !e.flipArrow && e.offset === 8 ? 12 : e.offset, ie = v.value.offsetWidth, x = v.value.offsetHeight;
4178
4178
  let L = 0, R = 0;
4179
- const [V, G] = e.placement.includes("-") ? e.placement.split("-") : [e.placement, "center"];
4180
- switch (V) {
4179
+ const [A, U] = e.placement.includes("-") ? e.placement.split("-") : [e.placement, "center"];
4180
+ switch (A) {
4181
4181
  case "top":
4182
- L = C.top - z - K + window.scrollY;
4182
+ L = C.top - x - K + window.scrollY;
4183
4183
  break;
4184
4184
  case "bottom":
4185
4185
  L = C.bottom + K + window.scrollY;
@@ -4191,8 +4191,8 @@ const xt = {
4191
4191
  R = C.right + K + window.scrollX;
4192
4192
  break;
4193
4193
  }
4194
- if (V === "top" || V === "bottom")
4195
- switch (G) {
4194
+ if (A === "top" || A === "bottom")
4195
+ switch (U) {
4196
4196
  case "start":
4197
4197
  R = C.right - ie + window.scrollX;
4198
4198
  break;
@@ -4202,29 +4202,29 @@ const xt = {
4202
4202
  default:
4203
4203
  R = C.left + (C.width - ie) / 2 + window.scrollX;
4204
4204
  }
4205
- else if (V === "left" || V === "right")
4206
- switch (G) {
4205
+ else if (A === "left" || A === "right")
4206
+ switch (U) {
4207
4207
  case "start":
4208
4208
  L = C.top + window.scrollY;
4209
4209
  break;
4210
4210
  case "end":
4211
- L = C.bottom - z + window.scrollY;
4211
+ L = C.bottom - x + window.scrollY;
4212
4212
  break;
4213
4213
  default:
4214
- L = C.top + (C.height - z) / 2 + window.scrollY;
4214
+ L = C.top + (C.height - x) / 2 + window.scrollY;
4215
4215
  }
4216
- S.value = { top: L, left: R }, N = !1;
4216
+ S.value = { top: L, left: R }, z = !1;
4217
4217
  }));
4218
- }, M = n(() => e.color ? e.color : e.type && e.type !== "default" ? `var(--cp-color-${e.type})` : null), b = n(() => e.color ? `color-mix(in srgb, ${e.color} 30%, transparent)` : e.type && e.type !== "default" ? `var(--cp-color-${e.type}-light)` : null), y = n(() => {
4218
+ }, N = n(() => e.color ? e.color : e.type && e.type !== "default" ? `var(--cp-color-${e.type})` : null), b = n(() => e.color ? `color-mix(in srgb, ${e.color} 30%, transparent)` : e.type && e.type !== "default" ? `var(--cp-color-${e.type}-light)` : null), y = n(() => {
4219
4219
  const C = typeof e.width == "number" ? `${e.width}px` : e.width, K = typeof e.maxWidth == "number" ? `${e.maxWidth}px` : e.maxWidth, ie = {};
4220
- return M.value && (ie["--cp-popover-color"] = M.value), b.value && (ie["--cp-popover-color-light"] = b.value), {
4220
+ return N.value && (ie["--cp-popover-color"] = N.value), b.value && (ie["--cp-popover-color-light"] = b.value), {
4221
4221
  ...ie,
4222
4222
  top: `${S.value.top}px`,
4223
4223
  left: `${S.value.left}px`,
4224
4224
  width: C === "auto" ? void 0 : C,
4225
4225
  maxWidth: K
4226
4226
  };
4227
- }), H = n(() => [
4227
+ }), W = n(() => [
4228
4228
  l.e("content"),
4229
4229
  `${l.e("content")}--${e.placement.split("-")[0]}`,
4230
4230
  `${l.e("content")}--${e.variant}`,
@@ -4234,46 +4234,46 @@ const xt = {
4234
4234
  l.is("has-title", !!e.title && !e.tooltip),
4235
4235
  l.is("has-arrow", e.showArrow),
4236
4236
  l.is("flipped", e.flipArrow)
4237
- ]), J = n(() => [
4237
+ ]), G = n(() => [
4238
4238
  l.e("arrow"),
4239
4239
  `${l.e("arrow")}--${e.placement.split("-")[0]}`
4240
- ]), I = () => {
4241
- e.trigger === "hover" && B();
4240
+ ]), T = () => {
4241
+ e.trigger === "hover" && _();
4242
4242
  }, ae = () => {
4243
4243
  e.trigger === "hover" && g();
4244
4244
  }, ne = () => {
4245
- e.trigger === "click" && _();
4246
- }, P = () => {
4247
- e.trigger === "focus" && B();
4245
+ e.trigger === "click" && E();
4246
+ }, V = () => {
4247
+ e.trigger === "focus" && _();
4248
4248
  }, Y = () => {
4249
4249
  e.trigger === "focus" && g();
4250
4250
  }, h = () => {
4251
- e.trigger === "hover" && T();
4251
+ e.trigger === "hover" && P();
4252
4252
  }, q = () => {
4253
4253
  e.trigger === "hover" && g();
4254
4254
  }, re = (C) => {
4255
- var z, L;
4255
+ var x, L;
4256
4256
  if (!e.closeOnClickOutside || e.trigger !== "click" && e.trigger !== "manual" || !p.value) return;
4257
4257
  const K = C.target;
4258
- ((z = m.value) == null ? void 0 : z.contains(K)) || ((L = v.value) == null ? void 0 : L.contains(K)) || g();
4258
+ ((x = m.value) == null ? void 0 : x.contains(K)) || ((L = v.value) == null ? void 0 : L.contains(K)) || g();
4259
4259
  }, $ = (C) => {
4260
4260
  e.closeOnEscape && C.key === "Escape" && p.value && g();
4261
4261
  };
4262
4262
  return ge(p, async (C) => {
4263
- C && (await Be(), E());
4263
+ C && (await Be(), M());
4264
4264
  }), t({
4265
4265
  /** @description 打开弹层 */
4266
- open: B,
4266
+ open: _,
4267
4267
  /** @description 关闭弹层 */
4268
4268
  close: g,
4269
4269
  /** @description 切换弹层 */
4270
- toggle: _,
4270
+ toggle: E,
4271
4271
  /** @description 更新位置 */
4272
- updatePosition: E
4272
+ updatePosition: M
4273
4273
  }), Ve(() => {
4274
- document.addEventListener("click", re), document.addEventListener("keydown", $), window.addEventListener("resize", E), window.addEventListener("scroll", E, !0);
4274
+ document.addEventListener("click", re), document.addEventListener("keydown", $), window.addEventListener("resize", M), window.addEventListener("scroll", M, !0);
4275
4275
  }), Ae(() => {
4276
- T(), document.removeEventListener("click", re), document.removeEventListener("keydown", $), window.removeEventListener("resize", E), window.removeEventListener("scroll", E, !0);
4276
+ P(), document.removeEventListener("click", re), document.removeEventListener("keydown", $), window.removeEventListener("resize", M), window.removeEventListener("scroll", M, !0);
4277
4277
  }), (C, K) => (u(), f("div", {
4278
4278
  class: c(a(l).b())
4279
4279
  }, [
@@ -4281,16 +4281,16 @@ const xt = {
4281
4281
  ref_key: "triggerRef",
4282
4282
  ref: m,
4283
4283
  class: c(a(l).e("trigger")),
4284
- onMouseenter: I,
4284
+ onMouseenter: T,
4285
4285
  onMouseleave: ae,
4286
4286
  onClick: ne,
4287
- onFocus: P,
4287
+ onFocus: V,
4288
4288
  onBlur: Y
4289
4289
  }, [
4290
4290
  F(C.$slots, "default")
4291
4291
  ], 34),
4292
4292
  (u(), ee(Ue, { to: C.teleportTo }, [
4293
- be(Ie, {
4293
+ be(Te, {
4294
4294
  name: a(l).namespace + "-popover-fade"
4295
4295
  }, {
4296
4296
  default: fe(() => [
@@ -4298,7 +4298,7 @@ const xt = {
4298
4298
  key: 0,
4299
4299
  ref_key: "popoverRef",
4300
4300
  ref: v,
4301
- class: c(H.value),
4301
+ class: c(W.value),
4302
4302
  style: j(y.value),
4303
4303
  onMouseenter: h,
4304
4304
  onMouseleave: q
@@ -4308,18 +4308,18 @@ const xt = {
4308
4308
  }, null, 2),
4309
4309
  C.showArrow ? (u(), f("div", {
4310
4310
  key: 0,
4311
- class: c(J.value)
4311
+ class: c(G.value)
4312
4312
  }, null, 2)) : O("", !0),
4313
4313
  a(d).popover ? F(C.$slots, "popover", { key: 1 }) : (u(), f(de, { key: 2 }, [
4314
4314
  C.title && !C.tooltip ? (u(), f("div", {
4315
4315
  key: 0,
4316
4316
  class: c(a(l).e("title"))
4317
- }, Z(C.title), 3)) : O("", !0),
4317
+ }, J(C.title), 3)) : O("", !0),
4318
4318
  k("div", {
4319
4319
  class: c(a(l).e("body"))
4320
4320
  }, [
4321
4321
  F(C.$slots, "content", {}, () => [
4322
- pe(Z(C.content), 1)
4322
+ pe(J(C.content), 1)
4323
4323
  ])
4324
4324
  ], 2)
4325
4325
  ], 64))
@@ -4421,8 +4421,8 @@ const xt = {
4421
4421
  setup(s) {
4422
4422
  const t = s, o = le("pattern-background"), e = (g) => typeof g == "number" ? `${g}px` : g, r = (g) => {
4423
4423
  if (typeof g == "number") return g;
4424
- const _ = parseFloat(g);
4425
- return isNaN(_) ? 20 : _;
4424
+ const E = parseFloat(g);
4425
+ return isNaN(E) ? 20 : E;
4426
4426
  }, l = (g) => {
4427
4427
  switch (g) {
4428
4428
  case "horizontal":
@@ -4437,20 +4437,20 @@ const xt = {
4437
4437
  return 45;
4438
4438
  }
4439
4439
  }, d = () => {
4440
- const g = e(t.lineWidth), _ = t.color;
4441
- return `linear-gradient(${_} ${g}, transparent 0), linear-gradient(90deg, ${_} ${g}, transparent 0)`;
4440
+ const g = e(t.lineWidth), E = t.color;
4441
+ return `linear-gradient(${E} ${g}, transparent 0), linear-gradient(90deg, ${E} ${g}, transparent 0)`;
4442
4442
  }, i = () => {
4443
4443
  const g = t.color;
4444
4444
  return `linear-gradient(45deg, ${g} 25%, transparent 25%), linear-gradient(-45deg, ${g} 25%, transparent 25%), linear-gradient(45deg, transparent 75%, ${g} 75%), linear-gradient(-45deg, transparent 75%, ${g} 75%)`;
4445
4445
  }, p = () => {
4446
- const g = t.color, N = r(t.size) * t.dotScale / 2;
4447
- return `radial-gradient(circle at center, ${g} ${N}px, transparent 0)`;
4446
+ const g = t.color, z = r(t.size) * t.dotScale / 2;
4447
+ return `radial-gradient(circle at center, ${g} ${z}px, transparent 0)`;
4448
4448
  }, m = () => {
4449
- const g = l(t.direction), _ = r(t.lineWidth), N = t.color, E = r(t.size);
4450
- return `repeating-linear-gradient(${g}deg, ${N}, ${N} ${_}px, transparent ${_}px, transparent ${E}px)`;
4449
+ const g = l(t.direction), E = r(t.lineWidth), z = t.color, M = r(t.size);
4450
+ return `repeating-linear-gradient(${g}deg, ${z}, ${z} ${E}px, transparent ${E}px, transparent ${M}px)`;
4451
4451
  }, v = () => {
4452
- const g = e(t.lineWidth), _ = t.color;
4453
- return `linear-gradient(${_} ${g}, transparent 0), linear-gradient(90deg, ${_} ${g}, transparent 0)`;
4452
+ const g = e(t.lineWidth), E = t.color;
4453
+ return `linear-gradient(${E} ${g}, transparent 0), linear-gradient(90deg, ${E} ${g}, transparent 0)`;
4454
4454
  }, S = n(() => {
4455
4455
  const g = e(t.size);
4456
4456
  switch (t.pattern) {
@@ -4463,20 +4463,20 @@ const xt = {
4463
4463
  default:
4464
4464
  return `${g} ${g}`;
4465
4465
  }
4466
- }), w = n(() => {
4467
- const g = r(t.size), N = r(t.lineWidth) / 2;
4466
+ }), B = n(() => {
4467
+ const g = r(t.size), z = r(t.lineWidth) / 2;
4468
4468
  switch (t.pattern) {
4469
4469
  case "checkerboard": {
4470
- const E = g / 2;
4471
- return `0 0, 0 ${E}px, ${E}px -${E}px, -${E}px 0`;
4470
+ const M = g / 2;
4471
+ return `0 0, 0 ${M}px, ${M}px -${M}px, -${M}px 0`;
4472
4472
  }
4473
4473
  case "grid":
4474
4474
  case "cross":
4475
- return `0 -${N}px, -${N}px 0`;
4475
+ return `0 -${z}px, -${z}px 0`;
4476
4476
  default:
4477
4477
  return "0 0";
4478
4478
  }
4479
- }), x = n(() => {
4479
+ }), w = n(() => {
4480
4480
  switch (t.pattern) {
4481
4481
  case "grid":
4482
4482
  return d();
@@ -4491,20 +4491,20 @@ const xt = {
4491
4491
  default:
4492
4492
  return d();
4493
4493
  }
4494
- }), T = n(() => ({
4495
- backgroundImage: x.value,
4494
+ }), P = n(() => ({
4495
+ backgroundImage: w.value,
4496
4496
  backgroundSize: S.value,
4497
- backgroundPosition: w.value,
4497
+ backgroundPosition: B.value,
4498
4498
  backgroundColor: t.backgroundColor,
4499
4499
  opacity: t.opacity
4500
- })), B = n(() => [
4500
+ })), _ = n(() => [
4501
4501
  o.b(),
4502
4502
  o.is("cover", t.cover),
4503
4503
  o.is("decorative", t.decorative)
4504
4504
  ]);
4505
- return (g, _) => (u(), f("div", {
4506
- class: c(B.value),
4507
- style: j(T.value)
4505
+ return (g, E) => (u(), f("div", {
4506
+ class: c(_.value),
4507
+ style: j(P.value)
4508
4508
  }, null, 6));
4509
4509
  }
4510
4510
  }), Ga = te(Go), Uo = {
@@ -4701,105 +4701,105 @@ const xt = {
4701
4701
  props: Uo,
4702
4702
  emits: Zo,
4703
4703
  setup(s, { expose: t, emit: o }) {
4704
- const e = s, r = o, l = Se(), d = le("dropdown"), i = { sm: 28, md: 36, lg: 44 }, p = W(null), m = W(null), v = W(null), S = W(null), w = W(!1), x = W(""), T = W(-1), B = W(!1), g = n(() => e.inline && e.filterable), _ = n({
4705
- get: () => w.value ? x.value : M.value,
4706
- set: (V) => {
4707
- x.value = V;
4704
+ const e = s, r = o, l = Se(), d = le("dropdown"), i = { sm: 28, md: 36, lg: 44 }, p = H(null), m = H(null), v = H(null), S = H(null), B = H(!1), w = H(""), P = H(-1), _ = H(!1), g = n(() => e.inline && e.filterable), E = n({
4705
+ get: () => B.value ? w.value : N.value,
4706
+ set: (A) => {
4707
+ w.value = A;
4708
4708
  }
4709
- }), N = W({ top: 0, left: 0, width: 0 }), E = n(() => e.options.find((V) => V.value === e.modelValue)), M = n(() => {
4710
- var V;
4711
- return ((V = E.value) == null ? void 0 : V.label) || "";
4709
+ }), z = H({ top: 0, left: 0, width: 0 }), M = n(() => e.options.find((A) => A.value === e.modelValue)), N = n(() => {
4710
+ var A;
4711
+ return ((A = M.value) == null ? void 0 : A.label) || "";
4712
4712
  }), b = n(() => {
4713
- if (!e.filterable || !x.value)
4713
+ if (!e.filterable || !w.value)
4714
4714
  return e.options;
4715
- const V = x.value.toLowerCase();
4715
+ const A = w.value.toLowerCase();
4716
4716
  return e.options.filter(
4717
- (G) => G.label.toLowerCase().includes(V)
4717
+ (U) => U.label.toLowerCase().includes(A)
4718
4718
  );
4719
- }), y = n(() => e.modelValue !== "" && e.modelValue !== null && e.modelValue !== void 0), H = n(() => e.clearable && !e.disabled && y.value), J = n(() => [
4719
+ }), y = n(() => e.modelValue !== "" && e.modelValue !== null && e.modelValue !== void 0), W = n(() => e.clearable && !e.disabled && y.value), G = n(() => [
4720
4720
  d.b(),
4721
- U(e.size) && d.m(e.size),
4721
+ Z(e.size) && d.m(e.size),
4722
4722
  d.m(e.variant),
4723
4723
  d.m(`shape-${e.shape}`),
4724
4724
  d.is("disabled", e.disabled),
4725
- d.is("active", w.value),
4726
- d.is("clearable", H.value),
4727
- d.is("clearing", B.value),
4725
+ d.is("active", B.value),
4726
+ d.is("clearable", W.value),
4727
+ d.is("clearing", _.value),
4728
4728
  d.is("inline", g.value),
4729
4729
  d.is("custom-color", !!e.color),
4730
- d.is("custom-size", !U(e.size))
4731
- ]), I = n(() => {
4732
- const V = {};
4733
- return e.color && (V["--cp-dropdown-custom-color"] = e.color, V["--cp-dropdown-custom-color-light"] = `${e.color}33`), e.inactiveColor && (V["--cp-dropdown-inactive-color"] = e.inactiveColor), e.placeholderColor && (V["--cp-dropdown-placeholder-color"] = e.placeholderColor), U(e.size) || (V["--cp-dropdown-height"] = we(e.size, i)), e.clearDuration !== 150 && (V["--cp-dropdown-clear-duration"] = `${e.clearDuration}ms`), V;
4730
+ d.is("custom-size", !Z(e.size))
4731
+ ]), T = n(() => {
4732
+ const A = {};
4733
+ return e.color && (A["--cp-dropdown-custom-color"] = e.color, A["--cp-dropdown-custom-color-light"] = `${e.color}33`), e.inactiveColor && (A["--cp-dropdown-inactive-color"] = e.inactiveColor), e.placeholderColor && (A["--cp-dropdown-placeholder-color"] = e.placeholderColor), Z(e.size) || (A["--cp-dropdown-height"] = we(e.size, i)), e.clearDuration !== 150 && (A["--cp-dropdown-clear-duration"] = `${e.clearDuration}ms`), A;
4734
4734
  }), ae = n(() => ({
4735
- top: `${N.value.top}px`,
4736
- left: `${N.value.left}px`,
4737
- width: `${N.value.width}px`,
4735
+ top: `${z.value.top}px`,
4736
+ left: `${z.value.left}px`,
4737
+ width: `${z.value.width}px`,
4738
4738
  maxHeight: `${e.maxHeight}px`
4739
4739
  })), ne = n(() => [
4740
4740
  d.e("popper"),
4741
4741
  `${d.e("popper")}--${e.placement.split("-")[0]}`,
4742
4742
  d.m(`shape-${e.shape}`)
4743
4743
  ]);
4744
- let P = !1;
4744
+ let V = !1;
4745
4745
  const Y = () => {
4746
- !w.value || !p.value || P || (P = !0, requestAnimationFrame(() => {
4746
+ !B.value || !p.value || V || (V = !0, requestAnimationFrame(() => {
4747
4747
  if (!p.value) {
4748
- P = !1;
4748
+ V = !1;
4749
4749
  return;
4750
4750
  }
4751
- const V = p.value.getBoundingClientRect(), G = 4;
4752
- let ue = 0, A = V.left + window.scrollX;
4753
- const D = V.width;
4754
- e.placement.split("-")[0] === "bottom" ? ue = V.bottom + G + window.scrollY : ue = V.top - e.maxHeight - G + window.scrollY, N.value = { top: ue, left: A, width: D }, P = !1;
4751
+ const A = p.value.getBoundingClientRect(), U = 4;
4752
+ let ue = 0, I = A.left + window.scrollX;
4753
+ const D = A.width;
4754
+ e.placement.split("-")[0] === "bottom" ? ue = A.bottom + U + window.scrollY : ue = A.top - e.maxHeight - U + window.scrollY, z.value = { top: ue, left: I, width: D }, V = !1;
4755
4755
  }));
4756
4756
  }, h = () => {
4757
- e.disabled || (w.value = !0, r("visibleChange", !0), r("focus"), Be(() => {
4757
+ e.disabled || (B.value = !0, r("visibleChange", !0), r("focus"), Be(() => {
4758
4758
  Y(), g.value && S.value ? S.value.focus() : e.filterable && v.value && v.value.focus();
4759
4759
  }));
4760
4760
  }, q = () => {
4761
- w.value = !1, x.value = "", T.value = -1, r("visibleChange", !1), r("blur");
4761
+ B.value = !1, w.value = "", P.value = -1, r("visibleChange", !1), r("blur");
4762
4762
  }, re = () => {
4763
- w.value ? q() : h();
4764
- }, $ = (V) => {
4765
- V.disabled || (r("update:modelValue", V.value), r("change", V.value), q());
4766
- }, C = (V) => {
4767
- V.stopPropagation(), B.value = !0, setTimeout(() => {
4768
- r("update:modelValue", ""), r("clear"), B.value = !1;
4763
+ B.value ? q() : h();
4764
+ }, $ = (A) => {
4765
+ A.disabled || (r("update:modelValue", A.value), r("change", A.value), q());
4766
+ }, C = (A) => {
4767
+ A.stopPropagation(), _.value = !0, setTimeout(() => {
4768
+ r("update:modelValue", ""), r("clear"), _.value = !1;
4769
4769
  }, e.clearDuration);
4770
- }, K = (V) => V.value === e.modelValue, ie = (V) => {
4771
- var A, D;
4772
- if (!w.value) return;
4773
- const G = V.target;
4774
- ((A = p.value) == null ? void 0 : A.contains(G)) || ((D = m.value) == null ? void 0 : D.contains(G)) || q();
4775
- }, z = (V) => {
4776
- if (!w.value) {
4777
- (V.key === "Enter" || V.key === " " || V.key === "ArrowDown") && (V.preventDefault(), h());
4770
+ }, K = (A) => A.value === e.modelValue, ie = (A) => {
4771
+ var I, D;
4772
+ if (!B.value) return;
4773
+ const U = A.target;
4774
+ ((I = p.value) == null ? void 0 : I.contains(U)) || ((D = m.value) == null ? void 0 : D.contains(U)) || q();
4775
+ }, x = (A) => {
4776
+ if (!B.value) {
4777
+ (A.key === "Enter" || A.key === " " || A.key === "ArrowDown") && (A.preventDefault(), h());
4778
4778
  return;
4779
4779
  }
4780
- switch (V.key) {
4780
+ switch (A.key) {
4781
4781
  case "Escape":
4782
- V.preventDefault(), q();
4782
+ A.preventDefault(), q();
4783
4783
  break;
4784
4784
  case "ArrowDown":
4785
- V.preventDefault(), T.value = Math.min(T.value + 1, b.value.length - 1);
4785
+ A.preventDefault(), P.value = Math.min(P.value + 1, b.value.length - 1);
4786
4786
  break;
4787
4787
  case "ArrowUp":
4788
- V.preventDefault(), T.value = Math.max(T.value - 1, 0);
4788
+ A.preventDefault(), P.value = Math.max(P.value - 1, 0);
4789
4789
  break;
4790
4790
  case "Enter":
4791
- V.preventDefault(), T.value >= 0 && T.value < b.value.length && $(b.value[T.value]);
4791
+ A.preventDefault(), P.value >= 0 && P.value < b.value.length && $(b.value[P.value]);
4792
4792
  break;
4793
4793
  }
4794
4794
  }, L = () => {
4795
- var V;
4796
- (V = p.value) == null || V.focus();
4795
+ var A;
4796
+ (A = p.value) == null || A.focus();
4797
4797
  }, R = () => {
4798
- var V;
4799
- (V = p.value) == null || V.blur();
4798
+ var A;
4799
+ (A = p.value) == null || A.blur();
4800
4800
  };
4801
- return ge(w, async (V) => {
4802
- V && (await Be(), Y());
4801
+ return ge(B, async (A) => {
4802
+ A && (await Be(), Y());
4803
4803
  }), t({
4804
4804
  /** @description 打开下拉面板 */
4805
4805
  open: h,
@@ -4815,48 +4815,48 @@ const xt = {
4815
4815
  document.addEventListener("click", ie), window.addEventListener("resize", Y), window.addEventListener("scroll", Y, !0);
4816
4816
  }), Ae(() => {
4817
4817
  document.removeEventListener("click", ie), window.removeEventListener("resize", Y), window.removeEventListener("scroll", Y, !0);
4818
- }), (V, G) => (u(), f("div", {
4819
- class: c(J.value),
4820
- style: j(I.value)
4818
+ }), (A, U) => (u(), f("div", {
4819
+ class: c(G.value),
4820
+ style: j(T.value)
4821
4821
  }, [
4822
4822
  k("div", {
4823
4823
  ref_key: "triggerRef",
4824
4824
  ref: p,
4825
4825
  class: c(a(d).e("trigger")),
4826
4826
  tabindex: g.value ? -1 : 0,
4827
- onClick: G[2] || (G[2] = (ue) => !g.value && re()),
4828
- onKeydown: G[3] || (G[3] = (ue) => !g.value && z(ue))
4827
+ onClick: U[2] || (U[2] = (ue) => !g.value && re()),
4828
+ onKeydown: U[3] || (U[3] = (ue) => !g.value && x(ue))
4829
4829
  }, [
4830
4830
  a(l).prefix ? (u(), f("span", {
4831
4831
  key: 0,
4832
4832
  class: c(a(d).e("prefix"))
4833
4833
  }, [
4834
- F(V.$slots, "prefix")
4834
+ F(A.$slots, "prefix")
4835
4835
  ], 2)) : O("", !0),
4836
- g.value ? Te((u(), f("input", {
4836
+ g.value ? Ie((u(), f("input", {
4837
4837
  key: 1,
4838
4838
  ref_key: "inlineInputRef",
4839
4839
  ref: S,
4840
- "onUpdate:modelValue": G[0] || (G[0] = (ue) => _.value = ue),
4841
- class: c([a(d).e("inline-input"), a(d).is("active", w.value)]),
4842
- placeholder: w.value ? "" : y.value ? M.value : e.placeholder,
4840
+ "onUpdate:modelValue": U[0] || (U[0] = (ue) => E.value = ue),
4841
+ class: c([a(d).e("inline-input"), a(d).is("active", B.value)]),
4842
+ placeholder: B.value ? "" : y.value ? N.value : e.placeholder,
4843
4843
  autocomplete: "off",
4844
4844
  disabled: e.disabled,
4845
- onClick: G[1] || (G[1] = Pe(() => {
4845
+ onClick: U[1] || (U[1] = Pe(() => {
4846
4846
  }, ["stop"])),
4847
4847
  onFocus: h,
4848
- onKeydown: z
4848
+ onKeydown: x
4849
4849
  }, null, 42, Qo)), [
4850
- [tt, _.value]
4850
+ [tt, E.value]
4851
4851
  ]) : (u(), f("span", {
4852
4852
  key: 2,
4853
4853
  class: c([a(d).e("value"), { [a(d).is("placeholder")]: !y.value }])
4854
- }, Z(y.value ? M.value : e.placeholder), 3)),
4855
- H.value ? (u(), f("span", {
4854
+ }, J(y.value ? N.value : e.placeholder), 3)),
4855
+ W.value ? (u(), f("span", {
4856
4856
  key: 3,
4857
4857
  class: c(a(d).e("clear")),
4858
4858
  onClick: C
4859
- }, [...G[6] || (G[6] = [
4859
+ }, [...U[6] || (U[6] = [
4860
4860
  k("svg", {
4861
4861
  viewBox: "0 0 24 24",
4862
4862
  fill: "currentColor"
@@ -4865,8 +4865,8 @@ const xt = {
4865
4865
  ], -1)
4866
4866
  ])], 2)) : O("", !0),
4867
4867
  k("span", {
4868
- class: c([a(d).e("arrow"), { [a(d).is("reverse")]: w.value }])
4869
- }, [...G[7] || (G[7] = [
4868
+ class: c([a(d).e("arrow"), { [a(d).is("reverse")]: B.value }])
4869
+ }, [...U[7] || (U[7] = [
4870
4870
  k("svg", {
4871
4871
  viewBox: "0 0 24 24",
4872
4872
  fill: "currentColor"
@@ -4875,12 +4875,12 @@ const xt = {
4875
4875
  ], -1)
4876
4876
  ])], 2)
4877
4877
  ], 42, Jo),
4878
- (u(), ee(Ue, { to: V.teleportTo }, [
4879
- be(Ie, {
4878
+ (u(), ee(Ue, { to: A.teleportTo }, [
4879
+ be(Te, {
4880
4880
  name: a(d).namespace + "-dropdown-fade"
4881
4881
  }, {
4882
4882
  default: fe(() => [
4883
- w.value ? (u(), f("div", {
4883
+ B.value ? (u(), f("div", {
4884
4884
  key: 0,
4885
4885
  ref_key: "popperRef",
4886
4886
  ref: m,
@@ -4891,51 +4891,51 @@ const xt = {
4891
4891
  key: 0,
4892
4892
  class: c(a(d).e("filter"))
4893
4893
  }, [
4894
- Te(k("input", {
4894
+ Ie(k("input", {
4895
4895
  ref_key: "filterInputRef",
4896
4896
  ref: v,
4897
- "onUpdate:modelValue": G[4] || (G[4] = (ue) => x.value = ue),
4897
+ "onUpdate:modelValue": U[4] || (U[4] = (ue) => w.value = ue),
4898
4898
  class: c(a(d).e("filter-input")),
4899
4899
  type: "text",
4900
4900
  placeholder: e.filterPlaceholder,
4901
- onClick: G[5] || (G[5] = Pe(() => {
4901
+ onClick: U[5] || (U[5] = Pe(() => {
4902
4902
  }, ["stop"]))
4903
4903
  }, null, 10, el), [
4904
- [tt, x.value]
4904
+ [tt, w.value]
4905
4905
  ])
4906
4906
  ], 2)) : O("", !0),
4907
4907
  k("ul", {
4908
4908
  class: c(a(d).e("options"))
4909
4909
  }, [
4910
- V.options.length === 0 ? (u(), f("li", {
4910
+ A.options.length === 0 ? (u(), f("li", {
4911
4911
  key: 0,
4912
4912
  class: c(a(d).e("empty"))
4913
4913
  }, [
4914
- F(V.$slots, "empty", {}, () => [
4915
- pe(Z(V.noDataText), 1)
4914
+ F(A.$slots, "empty", {}, () => [
4915
+ pe(J(A.noDataText), 1)
4916
4916
  ])
4917
4917
  ], 2)) : b.value.length === 0 ? (u(), f("li", {
4918
4918
  key: 1,
4919
4919
  class: c(a(d).e("empty"))
4920
- }, Z(V.noMatchText), 3)) : O("", !0),
4921
- (u(!0), f(de, null, ke(b.value, (ue, A) => (u(), f("li", {
4920
+ }, J(A.noMatchText), 3)) : O("", !0),
4921
+ (u(!0), f(de, null, ke(b.value, (ue, I) => (u(), f("li", {
4922
4922
  key: ue.value,
4923
4923
  class: c([
4924
4924
  a(d).e("option"),
4925
4925
  a(d).is("selected", K(ue)),
4926
4926
  a(d).is("disabled", !!ue.disabled),
4927
- a(d).is("hover", T.value === A)
4927
+ a(d).is("hover", P.value === I)
4928
4928
  ]),
4929
4929
  onClick: (D) => $(ue),
4930
- onMouseenter: (D) => T.value = A
4930
+ onMouseenter: (D) => P.value = I
4931
4931
  }, [
4932
- F(V.$slots, "default", { option: ue }, () => [
4933
- pe(Z(ue.label), 1)
4932
+ F(A.$slots, "default", { option: ue }, () => [
4933
+ pe(J(ue.label), 1)
4934
4934
  ]),
4935
4935
  K(ue) ? (u(), f("span", {
4936
4936
  key: 0,
4937
4937
  class: c(a(d).e("check"))
4938
- }, [...G[8] || (G[8] = [
4938
+ }, [...U[8] || (U[8] = [
4939
4939
  k("svg", {
4940
4940
  viewBox: "0 0 24 24",
4941
4941
  fill: "currentColor"
@@ -5078,31 +5078,31 @@ const xt = {
5078
5078
  emits: ll,
5079
5079
  setup(s, { expose: t, emit: o }) {
5080
5080
  const e = s, r = o, l = le("checkbox"), d = { sm: 14, md: 18, lg: 22 }, i = xe(pt, void 0), p = n(() => !!i), m = n(() => {
5081
- var M;
5082
- return e.disabled || ((M = i == null ? void 0 : i.disabled) == null ? void 0 : M.value) || !1;
5081
+ var N;
5082
+ return e.disabled || ((N = i == null ? void 0 : i.disabled) == null ? void 0 : N.value) || !1;
5083
5083
  }), v = n(() => {
5084
- var M;
5085
- return ((M = i == null ? void 0 : i.size) == null ? void 0 : M.value) || e.size;
5084
+ var N;
5085
+ return ((N = i == null ? void 0 : i.size) == null ? void 0 : N.value) || e.size;
5086
5086
  }), S = n(() => {
5087
- var M;
5088
- return ((M = i == null ? void 0 : i.type) == null ? void 0 : M.value) || e.type;
5087
+ var N;
5088
+ return ((N = i == null ? void 0 : i.type) == null ? void 0 : N.value) || e.type;
5089
+ }), B = n(() => {
5090
+ var N;
5091
+ return ((N = i == null ? void 0 : i.shape) == null ? void 0 : N.value) || e.shape;
5089
5092
  }), w = n(() => {
5090
- var M;
5091
- return ((M = i == null ? void 0 : i.shape) == null ? void 0 : M.value) || e.shape;
5092
- }), x = n(() => {
5093
- var M;
5093
+ var N;
5094
5094
  if (p.value && i) {
5095
- const b = (M = i.modelValue) == null ? void 0 : M.value;
5095
+ const b = (N = i.modelValue) == null ? void 0 : N.value;
5096
5096
  return Array.isArray(b) && e.label !== void 0 ? b.includes(e.label) : !1;
5097
5097
  }
5098
5098
  return typeof e.modelValue == "boolean" ? e.modelValue : e.modelValue === e.trueValue;
5099
- }), T = {
5099
+ }), P = {
5100
5100
  primary: "var(--cp-color-primary)",
5101
5101
  success: "var(--cp-color-success)",
5102
5102
  warning: "var(--cp-color-warning)",
5103
5103
  error: "var(--cp-color-error)",
5104
5104
  info: "var(--cp-color-info)"
5105
- }, B = {
5105
+ }, _ = {
5106
5106
  primary: "var(--cp-color-primary-text)",
5107
5107
  success: "var(--cp-color-success-text)",
5108
5108
  warning: "var(--cp-color-warning-text)",
@@ -5110,48 +5110,48 @@ const xt = {
5110
5110
  info: "var(--cp-color-info-text)"
5111
5111
  }, g = n(() => [
5112
5112
  l.b(),
5113
- U(v.value) && l.m(v.value),
5114
- l.m(`shape-${w.value}`),
5115
- l.is("checked", x.value),
5113
+ Z(v.value) && l.m(v.value),
5114
+ l.m(`shape-${B.value}`),
5115
+ l.is("checked", w.value),
5116
5116
  l.is("disabled", m.value),
5117
5117
  l.is("indeterminate", e.indeterminate),
5118
5118
  l.is("border", e.border),
5119
- l.is("custom-size", !U(v.value))
5120
- ]), _ = n(() => {
5121
- const M = {};
5122
- return e.color ? (M["--cp-checkbox-active-color"] = e.color, M["--cp-checkbox-active-color-light"] = `${e.color}40`) : S.value && T[S.value] && (M["--cp-checkbox-active-color"] = T[S.value], M["--cp-checkbox-active-color-light"] = `var(--cp-color-${S.value}-light)`), e.checkColor ? M["--cp-checkbox-check-color"] = e.checkColor : S.value && B[S.value] && (M["--cp-checkbox-check-color"] = B[S.value]), U(v.value) || (M["--cp-checkbox-size"] = we(v.value, d)), M;
5123
- }), N = () => {
5119
+ l.is("custom-size", !Z(v.value))
5120
+ ]), E = n(() => {
5121
+ const N = {};
5122
+ return e.color ? (N["--cp-checkbox-active-color"] = e.color, N["--cp-checkbox-active-color-light"] = `${e.color}40`) : S.value && P[S.value] && (N["--cp-checkbox-active-color"] = P[S.value], N["--cp-checkbox-active-color-light"] = `var(--cp-color-${S.value}-light)`), e.checkColor ? N["--cp-checkbox-check-color"] = e.checkColor : S.value && _[S.value] && (N["--cp-checkbox-check-color"] = _[S.value]), Z(v.value) || (N["--cp-checkbox-size"] = we(v.value, d)), N;
5123
+ }), z = () => {
5124
5124
  if (!m.value)
5125
5125
  if (p.value && i && e.label !== void 0)
5126
5126
  i.handleChange(e.label);
5127
5127
  else {
5128
- const M = x.value ? e.falseValue : e.trueValue;
5129
- r("update:modelValue", M), r("change", M);
5128
+ const N = w.value ? e.falseValue : e.trueValue;
5129
+ r("update:modelValue", N), r("change", N);
5130
5130
  }
5131
- }, E = W();
5131
+ }, M = H();
5132
5132
  return t({
5133
5133
  /** @description input 元素引用 */
5134
- inputRef: E,
5134
+ inputRef: M,
5135
5135
  /** @description 是否选中 */
5136
- checked: x
5137
- }), (M, b) => (u(), f("label", {
5136
+ checked: w
5137
+ }), (N, b) => (u(), f("label", {
5138
5138
  class: c(g.value),
5139
- style: j(_.value)
5139
+ style: j(E.value)
5140
5140
  }, [
5141
5141
  k("input", {
5142
5142
  ref_key: "inputRef",
5143
- ref: E,
5143
+ ref: M,
5144
5144
  type: "checkbox",
5145
5145
  class: c(a(l).e("input")),
5146
5146
  name: e.name,
5147
- checked: x.value,
5147
+ checked: w.value,
5148
5148
  disabled: m.value,
5149
- onChange: N
5149
+ onChange: z
5150
5150
  }, null, 42, al),
5151
5151
  k("span", {
5152
5152
  class: c(a(l).e("indicator"))
5153
5153
  }, [
5154
- x.value && !e.indeterminate ? (u(), f("svg", {
5154
+ w.value && !e.indeterminate ? (u(), f("svg", {
5155
5155
  key: 0,
5156
5156
  class: c(a(l).e("icon")),
5157
5157
  viewBox: "0 0 24 24",
@@ -5180,8 +5180,8 @@ const xt = {
5180
5180
  k("span", {
5181
5181
  class: c(a(l).e("label"))
5182
5182
  }, [
5183
- F(M.$slots, "default", {}, () => [
5184
- pe(Z(e.label), 1)
5183
+ F(N.$slots, "default", {}, () => [
5184
+ pe(J(e.label), 1)
5185
5185
  ])
5186
5186
  ], 2)
5187
5187
  ], 6));
@@ -5403,64 +5403,64 @@ const xt = {
5403
5403
  emits: ul,
5404
5404
  setup(s, { expose: t, emit: o }) {
5405
5405
  const e = s, r = o, l = le("radio"), d = { sm: 14, md: 18, lg: 22 }, i = xe(ft, void 0), p = n(() => !!i), m = n(() => {
5406
- var E;
5407
- return e.disabled || ((E = i == null ? void 0 : i.disabled) == null ? void 0 : E.value) || !1;
5406
+ var M;
5407
+ return e.disabled || ((M = i == null ? void 0 : i.disabled) == null ? void 0 : M.value) || !1;
5408
5408
  }), v = n(() => {
5409
- var E;
5410
- return ((E = i == null ? void 0 : i.size) == null ? void 0 : E.value) || e.size;
5409
+ var M;
5410
+ return ((M = i == null ? void 0 : i.size) == null ? void 0 : M.value) || e.size;
5411
5411
  }), S = n(() => {
5412
- var E;
5413
- return ((E = i == null ? void 0 : i.type) == null ? void 0 : E.value) || e.type;
5414
- }), w = n(() => {
5415
- var E;
5416
- return p.value && i ? ((E = i.modelValue) == null ? void 0 : E.value) === e.value : e.modelValue === e.value;
5417
- }), x = {
5412
+ var M;
5413
+ return ((M = i == null ? void 0 : i.type) == null ? void 0 : M.value) || e.type;
5414
+ }), B = n(() => {
5415
+ var M;
5416
+ return p.value && i ? ((M = i.modelValue) == null ? void 0 : M.value) === e.value : e.modelValue === e.value;
5417
+ }), w = {
5418
5418
  primary: "var(--cp-color-primary)",
5419
5419
  success: "var(--cp-color-success)",
5420
5420
  warning: "var(--cp-color-warning)",
5421
5421
  error: "var(--cp-color-error)",
5422
5422
  info: "var(--cp-color-info)"
5423
- }, T = {
5423
+ }, P = {
5424
5424
  primary: "var(--cp-color-primary-text)",
5425
5425
  success: "var(--cp-color-success-text)",
5426
5426
  warning: "var(--cp-color-warning-text)",
5427
5427
  error: "var(--cp-color-error-text)",
5428
5428
  info: "var(--cp-color-info-text)"
5429
- }, B = n(() => [
5429
+ }, _ = n(() => [
5430
5430
  l.b(),
5431
- U(v.value) && l.m(v.value),
5432
- l.is("checked", w.value),
5431
+ Z(v.value) && l.m(v.value),
5432
+ l.is("checked", B.value),
5433
5433
  l.is("disabled", m.value),
5434
5434
  l.is("border", e.border),
5435
5435
  l.is("glow", e.glow),
5436
- l.is("custom-size", !U(v.value))
5436
+ l.is("custom-size", !Z(v.value))
5437
5437
  ]), g = n(() => {
5438
- const E = {};
5439
- return e.color ? (E["--cp-radio-active-color"] = e.color, E["--cp-radio-active-color-light"] = `${e.color}40`) : S.value && x[S.value] && (E["--cp-radio-active-color"] = x[S.value], E["--cp-radio-active-color-light"] = `var(--cp-color-${S.value}-light)`), e.dotColor ? E["--cp-radio-dot-color"] = e.dotColor : S.value && T[S.value] && (E["--cp-radio-dot-color"] = T[S.value]), U(v.value) || (E["--cp-radio-size"] = we(v.value, d)), E;
5440
- }), _ = () => {
5441
- if (m.value || w.value) return;
5442
- const E = e.value;
5443
- p.value && i ? i.handleChange(E) : (r("update:modelValue", E), r("change", E));
5444
- }, N = W();
5438
+ const M = {};
5439
+ return e.color ? (M["--cp-radio-active-color"] = e.color, M["--cp-radio-active-color-light"] = `${e.color}40`) : S.value && w[S.value] && (M["--cp-radio-active-color"] = w[S.value], M["--cp-radio-active-color-light"] = `var(--cp-color-${S.value}-light)`), e.dotColor ? M["--cp-radio-dot-color"] = e.dotColor : S.value && P[S.value] && (M["--cp-radio-dot-color"] = P[S.value]), Z(v.value) || (M["--cp-radio-size"] = we(v.value, d)), M;
5440
+ }), E = () => {
5441
+ if (m.value || B.value) return;
5442
+ const M = e.value;
5443
+ p.value && i ? i.handleChange(M) : (r("update:modelValue", M), r("change", M));
5444
+ }, z = H();
5445
5445
  return t({
5446
5446
  /** @description input 元素引用 */
5447
- inputRef: N,
5447
+ inputRef: z,
5448
5448
  /** @description 是否选中 */
5449
- checked: w
5450
- }), (E, M) => (u(), f("label", {
5451
- class: c(B.value),
5449
+ checked: B
5450
+ }), (M, N) => (u(), f("label", {
5451
+ class: c(_.value),
5452
5452
  style: j(g.value)
5453
5453
  }, [
5454
5454
  k("input", {
5455
5455
  ref_key: "inputRef",
5456
- ref: N,
5456
+ ref: z,
5457
5457
  type: "radio",
5458
5458
  class: c(a(l).e("input")),
5459
5459
  name: e.name,
5460
5460
  value: e.value,
5461
- checked: w.value,
5461
+ checked: B.value,
5462
5462
  disabled: m.value,
5463
- onChange: _
5463
+ onChange: E
5464
5464
  }, null, 42, cl),
5465
5465
  k("span", {
5466
5466
  class: c(a(l).e("indicator-wrap"))
@@ -5468,7 +5468,7 @@ const xt = {
5468
5468
  k("span", {
5469
5469
  class: c(a(l).e("indicator"))
5470
5470
  }, [
5471
- w.value ? (u(), f("span", {
5471
+ B.value ? (u(), f("span", {
5472
5472
  key: 0,
5473
5473
  class: c(a(l).e("dot"))
5474
5474
  }, null, 2)) : O("", !0)
@@ -5477,8 +5477,8 @@ const xt = {
5477
5477
  k("span", {
5478
5478
  class: c(a(l).e("label"))
5479
5479
  }, [
5480
- F(E.$slots, "default", {}, () => [
5481
- pe(Z(e.label), 1)
5480
+ F(M.$slots, "default", {}, () => [
5481
+ pe(J(e.label), 1)
5482
5482
  ])
5483
5483
  ], 2)
5484
5484
  ], 6));
@@ -5701,14 +5701,14 @@ const xt = {
5701
5701
  style: j(i.value)
5702
5702
  }, [
5703
5703
  F(p.$slots, "default"),
5704
- be(Ie, {
5704
+ be(Te, {
5705
5705
  name: a(o).namespace + "-badge-fade"
5706
5706
  }, {
5707
5707
  default: fe(() => [
5708
5708
  r.value ? O("", !0) : (u(), f("sup", {
5709
5709
  key: 0,
5710
5710
  class: c(d.value)
5711
- }, Z(l.value), 3))
5711
+ }, J(l.value), 3))
5712
5712
  ]),
5713
5713
  _: 1
5714
5714
  }, 8, ["name"])
@@ -5967,7 +5967,7 @@ const xt = {
5967
5967
  o.is("current", p.value),
5968
5968
  o.is("disabled", t.node.disabled),
5969
5969
  o.is("leaf", t.node.isLeaf)
5970
- ]), w = n(() => t.node.isLeaf ? null : l.value && e.collapseIcon ? r(e.collapseIcon) : !l.value && e.expandIcon || e.expandIcon ? r(e.expandIcon) : null), x = n(() => t.node.isLeaf ? r(e.leafIcon) : null), T = n(() => !!e.expandIcon && !e.collapseIcon), B = n(() => {
5970
+ ]), B = n(() => t.node.isLeaf ? null : l.value && e.collapseIcon ? r(e.collapseIcon) : !l.value && e.expandIcon || e.expandIcon ? r(e.expandIcon) : null), w = n(() => t.node.isLeaf ? r(e.leafIcon) : null), P = n(() => !!e.expandIcon && !e.collapseIcon), _ = n(() => {
5971
5971
  var b;
5972
5972
  if (e.nodeIcon) {
5973
5973
  if (typeof e.nodeIcon == "function")
@@ -5988,41 +5988,41 @@ const xt = {
5988
5988
  }
5989
5989
  return { component: null, iconString: null };
5990
5990
  }), g = n(
5991
- () => B.value.component !== null || B.value.iconString !== null
5992
- ), _ = (b) => {
5991
+ () => _.value.component !== null || _.value.iconString !== null
5992
+ ), E = (b) => {
5993
5993
  b.stopPropagation(), t.node.isLeaf || e.toggleExpand(t.node);
5994
- }, N = (b) => {
5994
+ }, z = (b) => {
5995
5995
  b.stopPropagation(), e.toggleCheck(t.node);
5996
- }, E = () => {
5996
+ }, M = () => {
5997
5997
  e.handleNodeClick(t.node), !t.node.isLeaf && !e.showCheckbox && e.toggleExpand(t.node);
5998
- }, M = W();
5998
+ }, N = H();
5999
5999
  return (b, y) => {
6000
- const H = st("CpTreeNode");
6001
- return Te((u(), f("div", {
6000
+ const W = st("CpTreeNode");
6001
+ return Ie((u(), f("div", {
6002
6002
  class: c(a(o).e("node")),
6003
6003
  role: "treeitem"
6004
6004
  }, [
6005
6005
  k("div", {
6006
6006
  class: c(S.value),
6007
6007
  style: j(v.value),
6008
- onClick: E
6008
+ onClick: M
6009
6009
  }, [
6010
6010
  k("span", {
6011
6011
  class: c([
6012
6012
  a(o).e("expand-icon"),
6013
6013
  a(o).is("expanded", l.value),
6014
6014
  a(o).is("leaf", b.node.isLeaf),
6015
- a(o).is("custom-icon", !!w.value || !!x.value),
6016
- a(o).is("rotate-expand", T.value && l.value)
6015
+ a(o).is("custom-icon", !!B.value || !!w.value),
6016
+ a(o).is("rotate-expand", P.value && l.value)
6017
6017
  ]),
6018
- onClick: _
6018
+ onClick: E
6019
6019
  }, [
6020
6020
  a(e).slots.icon ? (u(), ee($e(a(e).slots.icon), {
6021
6021
  key: 0,
6022
6022
  node: b.node,
6023
6023
  data: b.node.data,
6024
6024
  expanded: l.value
6025
- }, null, 8, ["node", "data", "expanded"])) : w.value ? (u(), ee($e(w.value), { key: 1 })) : x.value ? (u(), ee($e(x.value), { key: 2 })) : (u(), f(de, { key: 3 }, [
6025
+ }, null, 8, ["node", "data", "expanded"])) : B.value ? (u(), ee($e(B.value), { key: 1 })) : w.value ? (u(), ee($e(w.value), { key: 2 })) : (u(), f(de, { key: 3 }, [
6026
6026
  b.node.isLeaf ? (u(), f("span", {
6027
6027
  key: 1,
6028
6028
  class: c(a(o).e("leaf-dot"))
@@ -6035,9 +6035,9 @@ const xt = {
6035
6035
  key: 0,
6036
6036
  class: c(a(o).e("node-icon"))
6037
6037
  }, [
6038
- B.value.component ? (u(), ee($e(B.value.component), { key: 0 })) : B.value.iconString ? (u(), ee(ut, {
6038
+ _.value.component ? (u(), ee($e(_.value.component), { key: 0 })) : _.value.iconString ? (u(), ee(ut, {
6039
6039
  key: 1,
6040
- icon: B.value.iconString,
6040
+ icon: _.value.iconString,
6041
6041
  size: "sm"
6042
6042
  }, null, 8, ["icon"])) : O("", !0)
6043
6043
  ], 2)) : O("", !0),
@@ -6049,7 +6049,7 @@ const xt = {
6049
6049
  a(o).is("indeterminate", i.value),
6050
6050
  a(o).is("disabled", b.node.disabled)
6051
6051
  ]),
6052
- onClick: Pe(N, ["stop"])
6052
+ onClick: Pe(z, ["stop"])
6053
6053
  }, [
6054
6054
  d.value && !i.value ? (u(), f("svg", {
6055
6055
  key: 0,
@@ -6087,20 +6087,20 @@ const xt = {
6087
6087
  node: b.node,
6088
6088
  data: b.node.data
6089
6089
  }, null, 8, ["node", "data"])) : (u(), f(de, { key: 1 }, [
6090
- pe(Z(b.node.label), 1)
6090
+ pe(J(b.node.label), 1)
6091
6091
  ], 64))
6092
6092
  ], 2)
6093
6093
  ], 6),
6094
- b.node.children.length > 0 ? Te((u(), f("div", {
6094
+ b.node.children.length > 0 ? Ie((u(), f("div", {
6095
6095
  key: 0,
6096
6096
  ref_key: "childrenRef",
6097
- ref: M,
6097
+ ref: N,
6098
6098
  class: c(a(o).e("children"))
6099
6099
  }, [
6100
- (u(!0), f(de, null, ke(b.node.children, (J, I) => (u(), ee(H, {
6101
- key: J.key,
6102
- node: J,
6103
- "is-last": I === b.node.children.length - 1
6100
+ (u(!0), f(de, null, ke(b.node.children, (G, T) => (u(), ee(W, {
6101
+ key: G.key,
6102
+ node: G,
6103
+ "is-last": T === b.node.children.length - 1
6104
6104
  }, null, 8, ["node", "is-last"]))), 128))
6105
6105
  ], 2)), [
6106
6106
  [Re, l.value]
@@ -6116,22 +6116,22 @@ const xt = {
6116
6116
  props: gl,
6117
6117
  emits: hl,
6118
6118
  setup(s, { expose: t, emit: o }) {
6119
- const e = s, r = o, l = Se(), d = le("tree"), i = (A) => {
6119
+ const e = s, r = o, l = Se(), d = le("tree"), i = (I) => {
6120
6120
  var D;
6121
- return A[((D = e.props) == null ? void 0 : D.label) || "label"];
6122
- }, p = (A) => {
6121
+ return I[((D = e.props) == null ? void 0 : D.label) || "label"];
6122
+ }, p = (I) => {
6123
6123
  var D;
6124
- return A[((D = e.props) == null ? void 0 : D.children) || "children"];
6125
- }, m = (A) => {
6124
+ return I[((D = e.props) == null ? void 0 : D.children) || "children"];
6125
+ }, m = (I) => {
6126
6126
  var D;
6127
- return A[((D = e.props) == null ? void 0 : D.disabled) || "disabled"];
6128
- }, v = (A) => {
6127
+ return I[((D = e.props) == null ? void 0 : D.disabled) || "disabled"];
6128
+ }, v = (I) => {
6129
6129
  var D;
6130
- return A[((D = e.props) == null ? void 0 : D.isLeaf) || "isLeaf"];
6131
- }, S = (A) => {
6132
- const D = A[e.nodeKey];
6133
- return typeof D == "string" || typeof D == "number" ? D : A.label;
6134
- }, w = /* @__PURE__ */ new Map(), x = (A, D = null, se = 0) => A.map((ce) => {
6130
+ return I[((D = e.props) == null ? void 0 : D.isLeaf) || "isLeaf"];
6131
+ }, S = (I) => {
6132
+ const D = I[e.nodeKey];
6133
+ return typeof D == "string" || typeof D == "number" ? D : I.label;
6134
+ }, B = /* @__PURE__ */ new Map(), w = (I, D = null, se = 0) => I.map((ce) => {
6135
6135
  const ye = S(ce), he = p(ce), Ce = {
6136
6136
  key: ye,
6137
6137
  label: i(ce),
@@ -6144,102 +6144,102 @@ const xt = {
6144
6144
  loading: !1,
6145
6145
  loaded: !1
6146
6146
  };
6147
- return w.set(ye, Ce), he && he.length > 0 && (Ce.children = x(he, Ce, se + 1)), Ce;
6148
- }), T = W([]);
6147
+ return B.set(ye, Ce), he && he.length > 0 && (Ce.children = w(he, Ce, se + 1)), Ce;
6148
+ }), P = H([]);
6149
6149
  ge(() => e.data, () => {
6150
- w.clear(), T.value = x(e.data);
6150
+ B.clear(), P.value = w(e.data);
6151
6151
  }, { immediate: !0, deep: !0 });
6152
- const g = W(/* @__PURE__ */ new Set());
6153
- ge(T, () => {
6152
+ const g = H(/* @__PURE__ */ new Set());
6153
+ ge(P, () => {
6154
6154
  if (e.defaultExpandAll) {
6155
- const A = /* @__PURE__ */ new Set(), D = (se) => {
6155
+ const I = /* @__PURE__ */ new Set(), D = (se) => {
6156
6156
  for (const ce of se)
6157
- ce.isLeaf || A.add(ce.key), ce.children.length > 0 && D(ce.children);
6157
+ ce.isLeaf || I.add(ce.key), ce.children.length > 0 && D(ce.children);
6158
6158
  };
6159
- D(T.value), g.value = A;
6159
+ D(P.value), g.value = I;
6160
6160
  } else e.defaultExpandedKeys.length > 0 && (g.value = new Set(e.defaultExpandedKeys));
6161
6161
  }, { immediate: !0 });
6162
- const N = n(() => e.expandedKeys !== void 0 ? new Set(e.expandedKeys) : g.value), E = W(/* @__PURE__ */ new Set()), M = n(() => e.checkedKeys !== void 0 ? new Set(e.checkedKeys) : E.value);
6162
+ const z = n(() => e.expandedKeys !== void 0 ? new Set(e.expandedKeys) : g.value), M = H(/* @__PURE__ */ new Set()), N = n(() => e.checkedKeys !== void 0 ? new Set(e.checkedKeys) : M.value);
6163
6163
  ge(
6164
6164
  () => e.checkedKeys,
6165
- (A) => {
6166
- A !== void 0 && (E.value = new Set(A), e.checkStrictly || y());
6165
+ (I) => {
6166
+ I !== void 0 && (M.value = new Set(I), e.checkStrictly || y());
6167
6167
  },
6168
6168
  { immediate: !0 }
6169
6169
  );
6170
- const b = W(/* @__PURE__ */ new Set()), y = () => {
6170
+ const b = H(/* @__PURE__ */ new Set()), y = () => {
6171
6171
  if (e.checkStrictly) {
6172
6172
  b.value = /* @__PURE__ */ new Set();
6173
6173
  return;
6174
6174
  }
6175
- const A = /* @__PURE__ */ new Set(), D = M.value, se = (ce) => {
6175
+ const I = /* @__PURE__ */ new Set(), D = N.value, se = (ce) => {
6176
6176
  for (const ye of ce)
6177
6177
  if (ye.children.length > 0) {
6178
6178
  se(ye.children);
6179
6179
  const he = ye.children.filter((me) => !me.disabled);
6180
6180
  if (he.length === 0) continue;
6181
6181
  const Ce = he.every((me) => D.has(me.key)), X = he.some(
6182
- (me) => D.has(me.key) || A.has(me.key)
6182
+ (me) => D.has(me.key) || I.has(me.key)
6183
6183
  );
6184
- !Ce && X && A.add(ye.key);
6184
+ !Ce && X && I.add(ye.key);
6185
6185
  }
6186
6186
  };
6187
- se(T.value), b.value = A;
6187
+ se(P.value), b.value = I;
6188
6188
  };
6189
- ge(M, y, { immediate: !0 });
6190
- const H = W(null), J = W(""), I = W(null);
6191
- ge(J, () => {
6192
- if (!J.value || !e.filterMethod) {
6193
- I.value = null;
6189
+ ge(N, y, { immediate: !0 });
6190
+ const W = H(null), G = H(""), T = H(null);
6191
+ ge(G, () => {
6192
+ if (!G.value || !e.filterMethod) {
6193
+ T.value = null;
6194
6194
  return;
6195
6195
  }
6196
- const A = /* @__PURE__ */ new Set(), D = (se) => {
6196
+ const I = /* @__PURE__ */ new Set(), D = (se) => {
6197
6197
  let ce = !1;
6198
6198
  for (const ye of se) {
6199
6199
  let he = !1;
6200
6200
  ye.children.length > 0 && (he = D(ye.children)), (e.filterMethod(
6201
- J.value,
6201
+ G.value,
6202
6202
  ye.data,
6203
6203
  ye
6204
- ) || he) && (A.add(ye.key), ce = !0);
6204
+ ) || he) && (I.add(ye.key), ce = !0);
6205
6205
  }
6206
6206
  return ce;
6207
6207
  };
6208
- D(T.value), I.value = A;
6208
+ D(P.value), T.value = I;
6209
6209
  });
6210
- const ne = (A) => {
6211
- const D = new Set(N.value);
6212
- if (D.has(A.key))
6213
- D.delete(A.key), r("node-collapse", A.data, A);
6210
+ const ne = (I) => {
6211
+ const D = new Set(z.value);
6212
+ if (D.has(I.key))
6213
+ D.delete(I.key), r("node-collapse", I.data, I);
6214
6214
  else {
6215
- if (e.accordion && A.parent)
6216
- for (const ce of A.parent.children)
6215
+ if (e.accordion && I.parent)
6216
+ for (const ce of I.parent.children)
6217
6217
  D.delete(ce.key);
6218
- else if (e.accordion && !A.parent)
6219
- for (const ce of T.value)
6218
+ else if (e.accordion && !I.parent)
6219
+ for (const ce of P.value)
6220
6220
  D.delete(ce.key);
6221
- D.add(A.key), r("node-expand", A.data, A);
6221
+ D.add(I.key), r("node-expand", I.data, I);
6222
6222
  }
6223
6223
  e.expandedKeys !== void 0 ? r("update:expandedKeys", Array.from(D)) : g.value = D;
6224
- }, P = (A) => {
6225
- if (A.disabled) return;
6226
- const D = new Set(M.value), se = D.has(A.key);
6227
- e.checkStrictly ? se ? D.delete(A.key) : D.add(A.key) : (se ? (D.delete(A.key), h(A, D)) : (D.add(A.key), Y(A, D)), q(A.parent, D)), r("check-change", A.data, !se), e.checkedKeys !== void 0 ? r("update:checkedKeys", Array.from(D)) : E.value = D;
6228
- }, Y = (A, D) => {
6229
- for (const se of A.children)
6224
+ }, V = (I) => {
6225
+ if (I.disabled) return;
6226
+ const D = new Set(N.value), se = D.has(I.key);
6227
+ e.checkStrictly ? se ? D.delete(I.key) : D.add(I.key) : (se ? (D.delete(I.key), h(I, D)) : (D.add(I.key), Y(I, D)), q(I.parent, D)), r("check-change", I.data, !se), e.checkedKeys !== void 0 ? r("update:checkedKeys", Array.from(D)) : M.value = D;
6228
+ }, Y = (I, D) => {
6229
+ for (const se of I.children)
6230
6230
  se.disabled || D.add(se.key), Y(se, D);
6231
- }, h = (A, D) => {
6232
- for (const se of A.children)
6231
+ }, h = (I, D) => {
6232
+ for (const se of I.children)
6233
6233
  se.disabled || D.delete(se.key), h(se, D);
6234
- }, q = (A, D) => {
6235
- if (!A) return;
6236
- const se = A.children.filter((ye) => !ye.disabled);
6234
+ }, q = (I, D) => {
6235
+ if (!I) return;
6236
+ const se = I.children.filter((ye) => !ye.disabled);
6237
6237
  if (se.length === 0) return;
6238
- se.every((ye) => D.has(ye.key)) ? D.add(A.key) : D.delete(A.key), q(A.parent, D);
6239
- }, re = (A) => {
6240
- e.highlightCurrent && (H.value = A.key);
6241
- }, $ = (A) => {
6242
- re(A), r("node-click", A.data, A);
6238
+ se.every((ye) => D.has(ye.key)) ? D.add(I.key) : D.delete(I.key), q(I.parent, D);
6239
+ }, re = (I) => {
6240
+ e.highlightCurrent && (W.value = I.key);
6241
+ }, $ = (I) => {
6242
+ re(I), r("node-click", I.data, I);
6243
6243
  }, C = n(() => [
6244
6244
  d.b(),
6245
6245
  d.m(e.type),
@@ -6249,10 +6249,10 @@ const xt = {
6249
6249
  "--cp-tree-active-color": e.color,
6250
6250
  "--cp-tree-active-color-light": `${e.color}66`
6251
6251
  } : {}), ie = {
6252
- expandedKeys: N,
6253
- checkedKeys: M,
6252
+ expandedKeys: z,
6253
+ checkedKeys: N,
6254
6254
  indeterminateKeys: b,
6255
- currentNodeKey: H,
6255
+ currentNodeKey: W,
6256
6256
  showCheckbox: e.showCheckbox,
6257
6257
  checkStrictly: e.checkStrictly,
6258
6258
  accordion: e.accordion,
@@ -6260,13 +6260,13 @@ const xt = {
6260
6260
  highlightCurrent: e.highlightCurrent,
6261
6261
  type: e.type,
6262
6262
  connectorLine: e.connectorLine,
6263
- filterText: J,
6264
- visibleKeys: I,
6263
+ filterText: G,
6264
+ visibleKeys: T,
6265
6265
  toggleExpand: ne,
6266
- toggleCheck: P,
6266
+ toggleCheck: V,
6267
6267
  setCurrentNode: re,
6268
6268
  handleNodeClick: $,
6269
- nodeMap: w,
6269
+ nodeMap: B,
6270
6270
  slots: l,
6271
6271
  expandIcon: e.expandIcon,
6272
6272
  collapseIcon: e.collapseIcon,
@@ -6275,39 +6275,39 @@ const xt = {
6275
6275
  showNodeIcon: e.showNodeIcon
6276
6276
  };
6277
6277
  return ze(yt, ie), t({
6278
- filter: (A) => {
6279
- J.value = A;
6278
+ filter: (I) => {
6279
+ G.value = I;
6280
6280
  },
6281
- getCheckedKeys: () => Array.from(M.value),
6282
- setCheckedKeys: (A) => {
6283
- e.checkedKeys !== void 0 ? r("update:checkedKeys", A) : E.value = new Set(A);
6281
+ getCheckedKeys: () => Array.from(N.value),
6282
+ setCheckedKeys: (I) => {
6283
+ e.checkedKeys !== void 0 ? r("update:checkedKeys", I) : M.value = new Set(I);
6284
6284
  },
6285
6285
  getHalfCheckedKeys: () => Array.from(b.value),
6286
6286
  expandAll: () => {
6287
- const A = /* @__PURE__ */ new Set(), D = (se) => {
6287
+ const I = /* @__PURE__ */ new Set(), D = (se) => {
6288
6288
  for (const ce of se)
6289
- ce.isLeaf || A.add(ce.key), ce.children.length && D(ce.children);
6289
+ ce.isLeaf || I.add(ce.key), ce.children.length && D(ce.children);
6290
6290
  };
6291
- D(T.value), e.expandedKeys !== void 0 ? r("update:expandedKeys", Array.from(A)) : g.value = A;
6291
+ D(P.value), e.expandedKeys !== void 0 ? r("update:expandedKeys", Array.from(I)) : g.value = I;
6292
6292
  },
6293
6293
  collapseAll: () => {
6294
6294
  e.expandedKeys !== void 0 ? r("update:expandedKeys", []) : g.value = /* @__PURE__ */ new Set();
6295
6295
  },
6296
- treeNodes: T
6297
- }), (A, D) => (u(), f("div", {
6296
+ treeNodes: P
6297
+ }), (I, D) => (u(), f("div", {
6298
6298
  class: c(C.value),
6299
6299
  style: j(K.value),
6300
6300
  role: "tree"
6301
6301
  }, [
6302
- T.value.length > 0 ? (u(!0), f(de, { key: 0 }, ke(T.value, (se, ce) => (u(), ee(Sl, {
6302
+ P.value.length > 0 ? (u(!0), f(de, { key: 0 }, ke(P.value, (se, ce) => (u(), ee(Sl, {
6303
6303
  key: se.key,
6304
6304
  node: se,
6305
- "is-last": ce === T.value.length - 1
6305
+ "is-last": ce === P.value.length - 1
6306
6306
  }, null, 8, ["node", "is-last"]))), 128)) : (u(), f("div", {
6307
6307
  key: 1,
6308
6308
  class: c(a(d).e("empty"))
6309
6309
  }, [
6310
- F(A.$slots, "empty", {}, () => [
6310
+ F(I.$slots, "empty", {}, () => [
6311
6311
  k("span", {
6312
6312
  class: c(a(d).e("empty-text"))
6313
6313
  }, "NO DATA", 2)
@@ -6398,7 +6398,7 @@ const xt = {
6398
6398
  type: [Number, String],
6399
6399
  default: ""
6400
6400
  }
6401
- }, Ke = /* @__PURE__ */ Q({
6401
+ }, _e = /* @__PURE__ */ Q({
6402
6402
  name: `${oe}Divider`,
6403
6403
  __name: "divider",
6404
6404
  props: wl,
@@ -6424,7 +6424,7 @@ const xt = {
6424
6424
  const S = {};
6425
6425
  return t.color ? S["--cp-divider-color"] = t.color : t.type !== "default" && r[t.type] && (S["--cp-divider-color"] = r[t.type]), t.thickness !== 1 && (S["--cp-divider-thickness"] = m(t.thickness)), t.margin !== void 0 && t.margin !== "" && (S["--cp-divider-margin"] = m(t.margin)), S;
6426
6426
  });
6427
- return (S, w) => (u(), f("div", {
6427
+ return (S, B) => (u(), f("div", {
6428
6428
  role: "separator",
6429
6429
  class: c(p.value),
6430
6430
  style: j(v.value)
@@ -6437,7 +6437,7 @@ const xt = {
6437
6437
  ], 2)) : O("", !0)
6438
6438
  ], 6));
6439
6439
  }
6440
- }), ln = te(Ke), $l = {
6440
+ }), ln = te(_e), $l = {
6441
6441
  /**
6442
6442
  * 是否显示对话框 (v-model)
6443
6443
  * @default false
@@ -6829,40 +6829,40 @@ const xt = {
6829
6829
  type: ve(e, "type"),
6830
6830
  color: ve(e, "color")
6831
6831
  });
6832
- const p = W(!1), m = W(!1), v = W(!1), S = W(null), w = W(null), x = () => {
6832
+ const p = H(!1), m = H(!1), v = H(!1), S = H(null), B = H(null), w = () => {
6833
6833
  S.value && (S.value.classList.remove("is-shaking"), S.value.offsetWidth, S.value.classList.add("is-shaking")), v.value = !0;
6834
- }, T = () => {
6834
+ }, P = () => {
6835
6835
  v.value = !1;
6836
- }, B = W(!1), g = { offsetX: 0, offsetY: 0 };
6837
- let _ = "";
6838
- const N = (X, me) => {
6836
+ }, _ = H(!1), g = { offsetX: 0, offsetY: 0 };
6837
+ let E = "";
6838
+ const z = (X, me) => {
6839
6839
  if (!S.value) return;
6840
- const { offsetX: _e, offsetY: je } = g, Me = S.value.getBoundingClientRect(), Fe = document.documentElement.clientWidth, De = document.documentElement.clientHeight;
6840
+ const { offsetX: Ke, offsetY: je } = g, Me = S.value.getBoundingClientRect(), Fe = document.documentElement.clientWidth, De = document.documentElement.clientHeight;
6841
6841
  if (!e.overflow) {
6842
- const We = -Me.left + _e, Je = -Me.top + je, Qe = Fe - Me.left - Me.width + _e, gt = De - Me.top - (Me.height < De ? Me.height : 0) + je;
6842
+ const We = -Me.left + Ke, Je = -Me.top + je, Qe = Fe - Me.left - Me.width + Ke, gt = De - Me.top - (Me.height < De ? Me.height : 0) + je;
6843
6843
  X = Math.min(Math.max(X, We), Qe), me = Math.min(Math.max(me, Je), gt);
6844
6844
  }
6845
6845
  g.offsetX = X, g.offsetY = me, S.value.style.transform = `translate(${X}px, ${me}px)`;
6846
- }, E = () => {
6847
- g.offsetX = 0, g.offsetY = 0, S.value && (S.value.style.transform = "");
6848
6846
  }, M = () => {
6849
- N(g.offsetX, g.offsetY);
6847
+ g.offsetX = 0, g.offsetY = 0, S.value && (S.value.style.transform = "");
6848
+ }, N = () => {
6849
+ z(g.offsetX, g.offsetY);
6850
6850
  }, b = (X) => {
6851
6851
  if (!e.draggable || !S.value) return;
6852
- const me = X.clientX, _e = X.clientY, { offsetX: je, offsetY: Me } = g, Fe = (We) => {
6853
- B.value || (B.value = !0);
6854
- const Je = je + We.clientX - me, Qe = Me + We.clientY - _e;
6855
- N(Je, Qe);
6852
+ const me = X.clientX, Ke = X.clientY, { offsetX: je, offsetY: Me } = g, Fe = (We) => {
6853
+ _.value || (_.value = !0);
6854
+ const Je = je + We.clientX - me, Qe = Me + We.clientY - Ke;
6855
+ z(Je, Qe);
6856
6856
  }, De = () => {
6857
- B.value = !1, document.removeEventListener("mousemove", Fe), document.removeEventListener("mouseup", De);
6857
+ _.value = !1, document.removeEventListener("mousemove", Fe), document.removeEventListener("mouseup", De);
6858
6858
  };
6859
6859
  document.addEventListener("mousemove", Fe), document.addEventListener("mouseup", De);
6860
- }, y = n(() => e.color ? e.color : e.type && e.type !== "default" ? `var(--cp-color-${e.type})` : null), H = n(() => e.color ? `color-mix(in srgb, ${e.color} 30%, transparent)` : e.type && e.type !== "default" ? `var(--cp-color-${e.type}-light)` : null), J = n(() => {
6860
+ }, y = n(() => e.color ? e.color : e.type && e.type !== "default" ? `var(--cp-color-${e.type})` : null), W = n(() => e.color ? `color-mix(in srgb, ${e.color} 30%, transparent)` : e.type && e.type !== "default" ? `var(--cp-color-${e.type}-light)` : null), G = n(() => {
6861
6861
  const X = {};
6862
- return y.value && (X["--cp-dialog-color"] = y.value), H.value && (X["--cp-dialog-color-light"] = H.value), e.bgColor && (X["--cp-dialog-bg"] = e.bgColor), e.borderColor && (X["--cp-dialog-border-color"] = e.borderColor), e.titleColor && (X["--cp-dialog-title-color"] = e.titleColor), e.textColor && (X["--cp-dialog-text-color"] = e.textColor), e.closeColor && (X["--cp-dialog-close-color"] = e.closeColor), e.headerDividerColor && (X["--cp-dialog-header-divider-color"] = e.headerDividerColor), e.footerDividerColor && (X["--cp-dialog-footer-divider-color"] = e.footerDividerColor), X;
6863
- }), I = n(() => {
6862
+ return y.value && (X["--cp-dialog-color"] = y.value), W.value && (X["--cp-dialog-color-light"] = W.value), e.bgColor && (X["--cp-dialog-bg"] = e.bgColor), e.borderColor && (X["--cp-dialog-border-color"] = e.borderColor), e.titleColor && (X["--cp-dialog-title-color"] = e.titleColor), e.textColor && (X["--cp-dialog-text-color"] = e.textColor), e.closeColor && (X["--cp-dialog-close-color"] = e.closeColor), e.headerDividerColor && (X["--cp-dialog-header-divider-color"] = e.headerDividerColor), e.footerDividerColor && (X["--cp-dialog-footer-divider-color"] = e.footerDividerColor), X;
6863
+ }), T = n(() => {
6864
6864
  const X = typeof e.width == "number" ? `${e.width}px` : e.width, me = {
6865
- ...J.value,
6865
+ ...G.value,
6866
6866
  width: e.fullscreen ? void 0 : X
6867
6867
  };
6868
6868
  return !e.fullscreen && !e.alignCenter && (me.marginTop = e.top), e.dialogStyle && typeof e.dialogStyle != "string" && Object.assign(me, e.dialogStyle), me;
@@ -6875,7 +6875,7 @@ const xt = {
6875
6875
  i.e("wrapper"),
6876
6876
  e.fullscreen ? i.is("fullscreen") : "",
6877
6877
  i.is("align-center", e.alignCenter)
6878
- ]), P = n(() => [
6878
+ ]), V = n(() => [
6879
6879
  i.e("panel"),
6880
6880
  i.m(e.variant),
6881
6881
  i.m(`shape-${e.shape}`),
@@ -6883,7 +6883,7 @@ const xt = {
6883
6883
  i.is("fullscreen", e.fullscreen),
6884
6884
  i.is("center", e.center),
6885
6885
  i.is("draggable", e.draggable),
6886
- i.is("dragging", B.value),
6886
+ i.is("dragging", _.value),
6887
6887
  i.is("shaking", v.value),
6888
6888
  e.dialogClass
6889
6889
  ]), Y = n(() => [
@@ -6908,7 +6908,7 @@ const xt = {
6908
6908
  () => e.title || l.header || l.title || e.showClose
6909
6909
  ), C = n(
6910
6910
  () => !!l.footer || e.showConfirmButton || e.showCancelButton
6911
- ), K = n(() => e.type && e.type !== "default" ? e.type : "primary"), ie = n(() => e.color || ""), z = n(() => {
6911
+ ), K = n(() => e.type && e.type !== "default" ? e.type : "primary"), ie = n(() => e.color || ""), x = n(() => {
6912
6912
  if (e.beforeClose) return e.beforeClose;
6913
6913
  const X = d["before-close"] ?? d.beforeClose;
6914
6914
  return typeof X == "function" ? X : void 0;
@@ -6918,15 +6918,15 @@ const xt = {
6918
6918
  const X = (me) => {
6919
6919
  me || L();
6920
6920
  };
6921
- z.value ? z.value(X) : X();
6922
- }, V = () => {
6923
- e.closeOnClickModal ? R() : x();
6924
- }, G = () => {
6921
+ x.value ? x.value(X) : X();
6922
+ }, A = () => {
6923
+ e.closeOnClickModal ? R() : w();
6924
+ }, U = () => {
6925
6925
  r("confirm"), R();
6926
6926
  }, ue = () => {
6927
6927
  r("cancel"), R();
6928
- }, A = (X) => {
6929
- X.key === "Escape" && p.value && (e.closeOnEscape ? R() : x());
6928
+ }, I = (X) => {
6929
+ X.key === "Escape" && p.value && (e.closeOnEscape ? R() : w());
6930
6930
  }, D = (X) => {
6931
6931
  X.stopPropagation();
6932
6932
  }, se = () => {
@@ -6944,59 +6944,59 @@ const xt = {
6944
6944
  () => e.modelValue,
6945
6945
  (X) => {
6946
6946
  X ? (m.value = !0, p.value = !0, r("open"), Be(() => {
6947
- E(), he(), document.addEventListener("keydown", A), e.draggable && window.addEventListener("resize", M);
6947
+ M(), he(), document.addEventListener("keydown", I), e.draggable && window.addEventListener("resize", N);
6948
6948
  })) : p.value && L();
6949
6949
  }
6950
6950
  ), ge(p, (X) => {
6951
- !X && e.modelValue && (r("close"), r("update:modelValue", !1), Ce(), document.removeEventListener("keydown", A), window.removeEventListener("resize", M));
6951
+ !X && e.modelValue && (r("close"), r("update:modelValue", !1), Ce(), document.removeEventListener("keydown", I), window.removeEventListener("resize", N));
6952
6952
  }), ge(
6953
6953
  () => e.fullscreen,
6954
6954
  (X) => {
6955
- S.value && (X ? (_ = S.value.style.transform, S.value.style.transform = "") : S.value.style.transform = _);
6955
+ S.value && (X ? (E = S.value.style.transform, S.value.style.transform = "") : S.value.style.transform = E);
6956
6956
  }
6957
6957
  ), Ve(() => {
6958
6958
  e.modelValue && (m.value = !0, p.value = !0, Be(() => {
6959
- he(), document.addEventListener("keydown", A), e.draggable && window.addEventListener("resize", M);
6959
+ he(), document.addEventListener("keydown", I), e.draggable && window.addEventListener("resize", N);
6960
6960
  }));
6961
6961
  }), Ae(() => {
6962
- Ce(), document.removeEventListener("keydown", A), window.removeEventListener("resize", M);
6962
+ Ce(), document.removeEventListener("keydown", I), window.removeEventListener("resize", N);
6963
6963
  }), t({
6964
6964
  /** @description 关闭对话框 */
6965
6965
  close: R,
6966
6966
  /** @description 重置拖拽位置 */
6967
- resetPosition: E,
6967
+ resetPosition: M,
6968
6968
  /** @description 当前是否可见 */
6969
6969
  visible: p
6970
6970
  }), (X, me) => (u(), ee(Ue, {
6971
6971
  to: "body",
6972
6972
  disabled: !X.appendToBody
6973
6973
  }, [
6974
- be(Ie, {
6974
+ be(Te, {
6975
6975
  name: a(i).namespace + "-dialog-fade",
6976
6976
  onAfterEnter: se,
6977
6977
  onAfterLeave: ce
6978
6978
  }, {
6979
6979
  default: fe(() => [
6980
- (X.destroyOnClose ? p.value : m.value || p.value) ? Te((u(), f("div", {
6980
+ (X.destroyOnClose ? p.value : m.value || p.value) ? Ie((u(), f("div", {
6981
6981
  key: 0,
6982
6982
  class: c(re.value),
6983
6983
  style: j(ae.value),
6984
- onClick: Pe(V, ["self"])
6984
+ onClick: Pe(A, ["self"])
6985
6985
  }, [
6986
6986
  k("div", {
6987
6987
  class: c(ne.value),
6988
- onClick: Pe(V, ["self"])
6988
+ onClick: Pe(A, ["self"])
6989
6989
  }, [
6990
6990
  k("div", Le({
6991
6991
  ref_key: "panelRef",
6992
6992
  ref: S
6993
6993
  }, X.$attrs, {
6994
- class: P.value,
6995
- style: I.value,
6994
+ class: V.value,
6995
+ style: T.value,
6996
6996
  role: "dialog",
6997
6997
  "aria-modal": "true",
6998
6998
  onClick: D,
6999
- onAnimationend: T
6999
+ onAnimationend: P
7000
7000
  }), [
7001
7001
  k("div", {
7002
7002
  class: c(a(i).e("decor"))
@@ -7004,7 +7004,7 @@ const xt = {
7004
7004
  $.value ? (u(), f("div", {
7005
7005
  key: 0,
7006
7006
  ref_key: "headerRef",
7007
- ref: w,
7007
+ ref: B,
7008
7008
  class: c(Y.value),
7009
7009
  style: j(X.headerStyle),
7010
7010
  onMousedown: b
@@ -7014,7 +7014,7 @@ const xt = {
7014
7014
  class: c(a(i).e("title"))
7015
7015
  }, [
7016
7016
  F(X.$slots, "title", {}, () => [
7017
- pe(Z(X.title), 1)
7017
+ pe(J(X.title), 1)
7018
7018
  ])
7019
7019
  ], 2),
7020
7020
  X.showClose ? (u(), f("button", {
@@ -7054,7 +7054,7 @@ const xt = {
7054
7054
  onClick: ue
7055
7055
  }, {
7056
7056
  default: fe(() => [
7057
- pe(Z(X.cancelText || "取消"), 1)
7057
+ pe(J(X.cancelText || "取消"), 1)
7058
7058
  ]),
7059
7059
  _: 1
7060
7060
  }, 8, ["class"])) : O("", !0),
@@ -7063,10 +7063,10 @@ const xt = {
7063
7063
  class: c(a(i).e("confirm-btn")),
7064
7064
  type: K.value,
7065
7065
  color: ie.value,
7066
- onClick: G
7066
+ onClick: U
7067
7067
  }, {
7068
7068
  default: fe(() => [
7069
- pe(Z(X.confirmText || "确认"), 1)
7069
+ pe(J(X.confirmText || "确认"), 1)
7070
7070
  ]),
7071
7071
  _: 1
7072
7072
  }, 8, ["class", "type", "color"])) : O("", !0)
@@ -7275,7 +7275,7 @@ const xt = {
7275
7275
  default: "60px"
7276
7276
  },
7277
7277
  ...lt
7278
- }, Tl = {
7278
+ }, Il = {
7279
7279
  /**
7280
7280
  * 底部高度
7281
7281
  * @default '60px'
@@ -7285,7 +7285,7 @@ const xt = {
7285
7285
  default: "60px"
7286
7286
  },
7287
7287
  ...lt
7288
- }, Il = {
7288
+ }, Tl = {
7289
7289
  /**
7290
7290
  * 侧边栏宽度
7291
7291
  * @default '300px'
@@ -7346,7 +7346,7 @@ const xt = {
7346
7346
  style: j(e.value)
7347
7347
  }, [
7348
7348
  F(l.$slots, "default"),
7349
- be(Ke, Le(r.value, {
7349
+ be(_e, Le(r.value, {
7350
7350
  class: a(o).e("divider")
7351
7351
  }), null, 16, ["class"])
7352
7352
  ], 6));
@@ -7354,7 +7354,7 @@ const xt = {
7354
7354
  }), Dl = /* @__PURE__ */ Q({
7355
7355
  name: `${oe}Footer`,
7356
7356
  __name: "footer",
7357
- props: Tl,
7357
+ props: Il,
7358
7358
  setup(s) {
7359
7359
  const t = s, o = le("footer"), e = n(() => ({
7360
7360
  "--cp-footer-height": t.height
@@ -7368,7 +7368,7 @@ const xt = {
7368
7368
  class: c(a(o).b()),
7369
7369
  style: j(e.value)
7370
7370
  }, [
7371
- be(Ke, Le(r.value, {
7371
+ be(_e, Le(r.value, {
7372
7372
  class: a(o).e("divider")
7373
7373
  }), null, 16, ["class"]),
7374
7374
  F(l.$slots, "default")
@@ -7385,10 +7385,10 @@ const xt = {
7385
7385
  F(o.$slots, "default")
7386
7386
  ], 2));
7387
7387
  }
7388
- }), Rl = ["data-position"], Kl = /* @__PURE__ */ Q({
7388
+ }), Rl = ["data-position"], _l = /* @__PURE__ */ Q({
7389
7389
  name: `${oe}Aside`,
7390
7390
  __name: "aside",
7391
- props: Il,
7391
+ props: Tl,
7392
7392
  setup(s) {
7393
7393
  const t = s, o = le("aside"), e = n(() => ({
7394
7394
  "--cp-aside-width": t.width
@@ -7404,7 +7404,7 @@ const xt = {
7404
7404
  style: j(e.value),
7405
7405
  "data-position": t.position
7406
7406
  }, [
7407
- l.value ? (u(), ee(Ke, Le({ key: 0 }, r.value, {
7407
+ l.value ? (u(), ee(_e, Le({ key: 0 }, r.value, {
7408
7408
  class: a(o).e("divider")
7409
7409
  }), null, 16, ["class"])) : O("", !0),
7410
7410
  k("div", {
@@ -7412,12 +7412,12 @@ const xt = {
7412
7412
  }, [
7413
7413
  F(d.$slots, "default")
7414
7414
  ], 2),
7415
- l.value ? O("", !0) : (u(), ee(Ke, Le({ key: 1 }, r.value, {
7415
+ l.value ? O("", !0) : (u(), ee(_e, Le({ key: 1 }, r.value, {
7416
7416
  class: a(o).e("divider")
7417
7417
  }), null, 16, ["class"]))
7418
7418
  ], 14, Rl));
7419
7419
  }
7420
- }), rn = te(El), un = te(Ll), cn = te(Dl), dn = te(Ol), pn = te(Kl), _l = {
7420
+ }), rn = te(El), un = te(Ll), cn = te(Dl), dn = te(Ol), pn = te(_l), Kl = {
7421
7421
  /**
7422
7422
  * 菜单布局方向
7423
7423
  * @default 'vertical'
@@ -7516,36 +7516,39 @@ const xt = {
7516
7516
  }, Ze = Symbol("menuContext"), Ye = Symbol("subMenuContext"), Fl = /* @__PURE__ */ Q({
7517
7517
  name: "CpMenu",
7518
7518
  __name: "menu",
7519
- props: _l,
7519
+ props: Kl,
7520
7520
  emits: jl,
7521
7521
  setup(s, { emit: t }) {
7522
- const o = s, e = t, r = le("menu"), l = W(o.defaultActive), d = W([]), i = W(new Set(o.defaultOpeneds));
7522
+ const o = s, e = t, r = le("menu"), l = H(o.defaultActive), d = H([]), i = H(new Set(o.defaultOpeneds));
7523
7523
  ge(
7524
7524
  () => o.defaultActive,
7525
- (B) => {
7526
- l.value = B;
7525
+ (E) => {
7526
+ l.value = E;
7527
7527
  }
7528
7528
  );
7529
- const p = (B, g) => {
7530
- l.value = B, d.value = g, e("select", B, g);
7531
- }, m = (B, g) => {
7532
- const _ = new Set(i.value);
7533
- _.has(B) || (o.uniqueOpened && _.clear(), _.add(B), i.value = _, e("open", B, g));
7534
- }, v = (B, g) => {
7535
- const _ = new Set(i.value);
7536
- _.has(B) && (_.delete(B), i.value = _, e("close", B, g));
7537
- }, S = (B, g) => {
7538
- i.value.has(B) ? v(B, g) : m(B, g);
7539
- }, w = n(() => [
7529
+ const p = (E, z) => {
7530
+ l.value = E, d.value = z, e("select", E, z);
7531
+ }, m = (E, z) => {
7532
+ const M = new Set(i.value);
7533
+ M.has(E) || (o.uniqueOpened && M.clear(), M.add(E), i.value = M, e("open", E, z));
7534
+ }, v = (E, z) => {
7535
+ const M = new Set(i.value);
7536
+ M.has(E) && (M.delete(E), i.value = M, e("close", E, z));
7537
+ }, S = (E, z) => {
7538
+ i.value.has(E) ? v(E, z) : m(E, z);
7539
+ };
7540
+ let B = 0;
7541
+ const w = () => `__cp_auto_${++B}`, P = n(() => [
7540
7542
  r.b(),
7541
7543
  r.m(o.mode),
7542
7544
  r.is("collapse", o.collapse && o.mode === "vertical"),
7543
7545
  o.type !== "default" ? r.m(o.type) : "",
7544
7546
  o.color ? r.is("custom-color") : ""
7545
- ]), x = n(() => {
7546
- const B = {};
7547
- return o.backgroundColor && (B["--cp-menu-bg"] = o.backgroundColor), o.textColor && (B["--cp-menu-text"] = o.textColor), o.activeTextColor && (B["--cp-menu-active-text"] = o.activeTextColor), o.color && (B["--cp-menu-active-color"] = o.color, B["--cp-menu-active-color-light"] = `${o.color}33`), B;
7548
- }), T = {
7547
+ ]), _ = n(() => {
7548
+ const E = {};
7549
+ return o.backgroundColor && (E["--cp-menu-bg"] = o.backgroundColor), o.textColor && (E["--cp-menu-text"] = o.textColor), o.activeTextColor && (E["--cp-menu-active-text"] = o.activeTextColor), o.color && (E["--cp-menu-active-color"] = o.color, E["--cp-menu-active-color-light"] = `${o.color}33`), E;
7550
+ }), g = {
7551
+ generateIndex: w,
7549
7552
  activeIndex: l,
7550
7553
  activeIndexPath: d,
7551
7554
  openedMenus: i,
@@ -7562,21 +7565,21 @@ const xt = {
7562
7565
  openMenu: m,
7563
7566
  closeMenu: v
7564
7567
  };
7565
- return ze(Ze, T), (B, g) => (u(), f("ul", {
7566
- class: c(w.value),
7567
- style: j(x.value),
7568
+ return ze(Ze, g), (E, z) => (u(), f("ul", {
7569
+ class: c(P.value),
7570
+ style: j(_.value),
7568
7571
  role: "menubar"
7569
7572
  }, [
7570
- F(B.$slots, "default")
7573
+ F(E.$slots, "default")
7571
7574
  ], 6));
7572
7575
  }
7573
7576
  }), Wl = te(Fl), Hl = {
7574
7577
  /**
7575
- * 菜单项唯一标识
7578
+ * 菜单项唯一标识(可选,不传时自动生成)
7576
7579
  */
7577
7580
  index: {
7578
7581
  type: String,
7579
- required: !0
7582
+ default: void 0
7580
7583
  },
7581
7584
  /**
7582
7585
  * 是否禁用
@@ -7609,28 +7612,28 @@ const xt = {
7609
7612
  props: Hl,
7610
7613
  emits: Yl,
7611
7614
  setup(s, { emit: t }) {
7612
- const o = s, e = t, r = le("menu-item"), l = xe(Ze, void 0), d = xe(Ye, void 0), i = n(() => (l == null ? void 0 : l.activeIndex.value) === o.index), p = n(() => [...(d == null ? void 0 : d.indexPath) ?? [], o.index]), m = n(() => (l == null ? void 0 : l.mode) === "horizontal" ? {} : { paddingLeft: `${20 * (((d == null ? void 0 : d.level) ?? 0) + 1)}px` }), v = n(() => [
7615
+ const o = s, e = t, r = le("menu-item"), l = xe(Ze, void 0), d = xe(Ye, void 0), i = o.index ?? (l == null ? void 0 : l.generateIndex()) ?? `__cp_auto_fallback_${Math.random().toString(36).slice(2)}`, p = n(() => (l == null ? void 0 : l.activeIndex.value) === i), m = n(() => [...(d == null ? void 0 : d.indexPath) ?? [], i]), v = n(() => (l == null ? void 0 : l.mode) === "horizontal" ? {} : { paddingLeft: `${20 * (((d == null ? void 0 : d.level) ?? 0) + 1)}px` }), S = n(() => [
7613
7616
  r.b(),
7614
- r.is("active", i.value),
7617
+ r.is("active", p.value),
7615
7618
  r.is("disabled", o.disabled)
7616
- ]), S = () => {
7617
- if (!o.disabled && (l == null || l.handleSelect(o.index, p.value), e("click", o.index), l != null && l.router)) {
7618
- const w = kt(), x = w == null ? void 0 : w.appContext.config.globalProperties.$router;
7619
- if (x) {
7620
- const T = o.route ?? o.index;
7621
- x.push(T).catch((B) => {
7622
- B.name !== "NavigationDuplicated" && console.warn("[CpMenuItem] Router navigation failed:", B);
7619
+ ]), B = () => {
7620
+ if (!o.disabled && (l == null || l.handleSelect(i, m.value), e("click", i), l != null && l.router)) {
7621
+ const w = kt(), P = w == null ? void 0 : w.appContext.config.globalProperties.$router;
7622
+ if (P) {
7623
+ const _ = o.route ?? i;
7624
+ P.push(_).catch((g) => {
7625
+ g.name !== "NavigationDuplicated" && console.warn("[CpMenuItem] Router navigation failed:", g);
7623
7626
  });
7624
7627
  }
7625
7628
  }
7626
7629
  };
7627
- return (w, x) => (u(), f("li", {
7628
- class: c(v.value),
7629
- style: j(m.value),
7630
+ return (w, P) => (u(), f("li", {
7631
+ class: c(S.value),
7632
+ style: j(v.value),
7630
7633
  role: "menuitem",
7631
7634
  tabindex: w.disabled ? -1 : 0,
7632
- onClick: S,
7633
- onKeydown: Ge(S, ["enter"])
7635
+ onClick: B,
7636
+ onKeydown: Ge(B, ["enter"])
7634
7637
  }, [
7635
7638
  w.icon || w.$slots.icon ? (u(), f("span", {
7636
7639
  key: 0,
@@ -7655,7 +7658,7 @@ const xt = {
7655
7658
  */
7656
7659
  index: {
7657
7660
  type: String,
7658
- required: !0
7661
+ default: void 0
7659
7662
  },
7660
7663
  /**
7661
7664
  * 是否禁用
@@ -7678,72 +7681,72 @@ const xt = {
7678
7681
  __name: "sub-menu",
7679
7682
  props: Gl,
7680
7683
  setup(s) {
7681
- const t = s, o = le("sub-menu"), e = xe(Ze, void 0), r = xe(Ye, void 0), l = W(!1), d = n(() => (r == null ? void 0 : r.level) ?? 0), i = n(() => [...(r == null ? void 0 : r.indexPath) ?? [], t.index]), p = n(() => (e == null ? void 0 : e.openedMenus.value.has(t.index)) ?? !1), m = n(() => e ? e.activeIndexPath.value.includes(t.index) : !1), v = n(() => e ? e.mode === "horizontal" || e.collapse.value : !1), S = n(() => (e == null ? void 0 : e.mode) === "horizontal" ? {} : { paddingLeft: `${20 * (d.value + 1)}px` }), w = n(() => [
7684
+ const t = s, o = le("sub-menu"), e = xe(Ze, void 0), r = xe(Ye, void 0), l = t.index ?? (e == null ? void 0 : e.generateIndex()) ?? `__cp_sub_auto_${Math.random().toString(36).slice(2)}`, d = H(!1), i = n(() => (r == null ? void 0 : r.level) ?? 0), p = n(() => [...(r == null ? void 0 : r.indexPath) ?? [], l]), m = n(() => (e == null ? void 0 : e.openedMenus.value.has(l)) ?? !1), v = n(() => e ? e.activeIndexPath.value.includes(l) : !1), S = n(() => e ? e.mode === "horizontal" || e.collapse.value : !1), B = n(() => (e == null ? void 0 : e.mode) === "horizontal" ? {} : { paddingLeft: `${20 * (i.value + 1)}px` }), w = n(() => [
7682
7685
  o.b(),
7683
- o.is("opened", p.value),
7684
- o.is("active", m.value),
7686
+ o.is("opened", m.value),
7687
+ o.is("active", v.value),
7685
7688
  o.is("disabled", t.disabled)
7686
7689
  ]);
7687
- let x = null, T = null;
7688
- const B = () => {
7689
- x && (clearTimeout(x), x = null), T && (clearTimeout(T), T = null);
7690
- }, g = () => {
7691
- t.disabled || v.value || e == null || e.handleSubMenuClick(t.index, i.value);
7692
- }, _ = () => {
7693
- t.disabled || !v.value || (B(), x = setTimeout(() => {
7694
- e == null || e.openMenu(t.index, i.value);
7695
- }, Zl), r && (r.mouseInChild.value = !0));
7696
- }, N = (y = !1) => {
7697
- v.value && (B(), r && (r.mouseInChild.value = !1), T = setTimeout(() => {
7698
- l.value || e == null || e.closeMenu(t.index, i.value);
7699
- }, Jl), y && (r != null && r.handleMouseleave) && r.handleMouseleave(!0));
7690
+ let P = null, _ = null;
7691
+ const g = () => {
7692
+ P && (clearTimeout(P), P = null), _ && (clearTimeout(_), _ = null);
7700
7693
  }, E = () => {
7701
- v.value && (B(), l.value = !0);
7702
- }, M = () => {
7703
- v.value && (l.value = !1, N(!0));
7694
+ t.disabled || S.value || e == null || e.handleSubMenuClick(l, p.value);
7695
+ }, z = () => {
7696
+ t.disabled || !S.value || (g(), P = setTimeout(() => {
7697
+ e == null || e.openMenu(l, p.value);
7698
+ }, Zl), r && (r.mouseInChild.value = !0));
7699
+ }, M = (W = !1) => {
7700
+ S.value && (g(), r && (r.mouseInChild.value = !1), _ = setTimeout(() => {
7701
+ d.value || e == null || e.closeMenu(l, p.value);
7702
+ }, Jl), W && (r != null && r.handleMouseleave) && r.handleMouseleave(!0));
7703
+ }, N = () => {
7704
+ S.value && (g(), d.value = !0);
7705
+ }, b = () => {
7706
+ S.value && (d.value = !1, M(!0));
7704
7707
  };
7705
7708
  Ae(() => {
7706
- B();
7709
+ g();
7707
7710
  });
7708
- const b = {
7709
- indexPath: i.value,
7710
- level: d.value + 1,
7711
- mouseInChild: l,
7712
- handleMouseleave: N
7711
+ const y = {
7712
+ indexPath: p.value,
7713
+ level: i.value + 1,
7714
+ mouseInChild: d,
7715
+ handleMouseleave: M
7713
7716
  };
7714
- return ze(Ye, b), (y, H) => (u(), f("li", {
7717
+ return ze(Ye, y), (W, G) => (u(), f("li", {
7715
7718
  class: c(w.value),
7716
7719
  role: "none",
7717
- onMouseenter: _,
7718
- onMouseleave: H[0] || (H[0] = (J) => N(!1))
7720
+ onMouseenter: z,
7721
+ onMouseleave: G[0] || (G[0] = (T) => M(!1))
7719
7722
  }, [
7720
7723
  k("div", {
7721
7724
  class: c(a(o).e("title")),
7722
- style: j(S.value),
7725
+ style: j(B.value),
7723
7726
  role: "menuitem",
7724
- "aria-expanded": p.value,
7725
- tabindex: y.disabled ? -1 : 0,
7726
- onClick: g,
7727
- onKeydown: Ge(g, ["enter"])
7727
+ "aria-expanded": m.value,
7728
+ tabindex: W.disabled ? -1 : 0,
7729
+ onClick: E,
7730
+ onKeydown: Ge(E, ["enter"])
7728
7731
  }, [
7729
- y.icon || y.$slots.icon ? (u(), f("span", {
7732
+ W.icon || W.$slots.icon ? (u(), f("span", {
7730
7733
  key: 0,
7731
7734
  class: c(a(o).e("icon"))
7732
7735
  }, [
7733
- y.icon ? (u(), ee(a(Ee), {
7736
+ W.icon ? (u(), ee(a(Ee), {
7734
7737
  key: 0,
7735
- icon: y.icon,
7738
+ icon: W.icon,
7736
7739
  size: "sm"
7737
- }, null, 8, ["icon"])) : F(y.$slots, "icon", { key: 1 })
7740
+ }, null, 8, ["icon"])) : F(W.$slots, "icon", { key: 1 })
7738
7741
  ], 2)) : O("", !0),
7739
7742
  k("span", {
7740
7743
  class: c(a(o).e("title-content"))
7741
7744
  }, [
7742
- F(y.$slots, "title")
7745
+ F(W.$slots, "title")
7743
7746
  ], 2),
7744
7747
  k("span", {
7745
- class: c([a(o).e("arrow"), p.value ? "is-open" : ""])
7746
- }, [...H[1] || (H[1] = [
7748
+ class: c([a(o).e("arrow"), m.value ? "is-open" : ""])
7749
+ }, [...G[1] || (G[1] = [
7747
7750
  k("svg", {
7748
7751
  viewBox: "0 0 1024 1024",
7749
7752
  width: "12",
@@ -7756,21 +7759,21 @@ const xt = {
7756
7759
  ], -1)
7757
7760
  ])], 2)
7758
7761
  ], 46, Ul),
7759
- be(Ie, { name: "cp-sub-menu" }, {
7762
+ be(Te, { name: "cp-sub-menu" }, {
7760
7763
  default: fe(() => [
7761
- Te(k("div", {
7764
+ Ie(k("div", {
7762
7765
  class: c(a(o).e("popup")),
7763
- onMouseenter: E,
7764
- onMouseleave: M
7766
+ onMouseenter: N,
7767
+ onMouseleave: b
7765
7768
  }, [
7766
7769
  k("ul", {
7767
7770
  class: c(a(o).e("content")),
7768
7771
  role: "menu"
7769
7772
  }, [
7770
- F(y.$slots, "default")
7773
+ F(W.$slots, "default")
7771
7774
  ], 2)
7772
7775
  ], 34), [
7773
- [Re, p.value]
7776
+ [Re, m.value]
7774
7777
  ])
7775
7778
  ]),
7776
7779
  _: 3
@@ -7801,7 +7804,7 @@ const xt = {
7801
7804
  style: j(r.value)
7802
7805
  }, [
7803
7806
  F(l.$slots, "title", {}, () => [
7804
- pe(Z(l.title), 1)
7807
+ pe(J(l.title), 1)
7805
7808
  ])
7806
7809
  ], 6),
7807
7810
  k("ul", {
@@ -7984,30 +7987,30 @@ const xt = {
7984
7987
  props: oa,
7985
7988
  emits: la,
7986
7989
  setup(s, { expose: t, emit: o }) {
7987
- const e = s, r = o, l = Se(), d = le("notification"), i = W(!1);
7990
+ const e = s, r = o, l = Se(), d = le("notification"), i = H(!1);
7988
7991
  let p = null, m = 0, v = 0;
7989
7992
  const S = () => {
7990
7993
  e.duration <= 0 || (v <= 0 && (v = e.duration), m = Date.now(), p = setTimeout(() => {
7991
- H();
7994
+ W();
7992
7995
  }, v));
7993
- }, w = () => {
7996
+ }, B = () => {
7994
7997
  p && (clearTimeout(p), p = null, v -= Date.now() - m, v < 0 && (v = 0));
7995
- }, x = () => {
7998
+ }, w = () => {
7996
7999
  p && (clearTimeout(p), p = null), v = 0;
7997
- }, T = () => {
7998
- w();
7999
- }, B = () => {
8000
+ }, P = () => {
8001
+ B();
8002
+ }, _ = () => {
8000
8003
  S();
8001
- }, g = n(() => e.position.includes("right")), _ = n(() => e.position.includes("top")), N = n(() => e.color ? e.color : e.type && e.type !== "default" ? `var(--cp-color-${e.type})` : null), E = n(() => e.color ? `color-mix(in srgb, ${e.color} 30%, transparent)` : e.type && e.type !== "default" ? `var(--cp-color-${e.type}-light)` : null), M = n(() => {
8002
- const P = {};
8003
- return N.value && (P["--cp-notification-color"] = N.value), E.value && (P["--cp-notification-color-light"] = E.value), e.bgColor && (P["--cp-notification-bg"] = e.bgColor), e.borderColor && (P["--cp-notification-border-color"] = e.borderColor), e.titleColor && (P["--cp-notification-title-color"] = e.titleColor), e.textColor && (P["--cp-notification-text-color"] = e.textColor), P["--cp-notification-animation-duration"] = `${e.animationDuration}ms`, e.duration > 0 && (P["--cp-notification-duration"] = `${e.duration}ms`), P;
8004
+ }, g = n(() => e.position.includes("right")), E = n(() => e.position.includes("top")), z = n(() => e.color ? e.color : e.type && e.type !== "default" ? `var(--cp-color-${e.type})` : null), M = n(() => e.color ? `color-mix(in srgb, ${e.color} 30%, transparent)` : e.type && e.type !== "default" ? `var(--cp-color-${e.type}-light)` : null), N = n(() => {
8005
+ const V = {};
8006
+ return z.value && (V["--cp-notification-color"] = z.value), M.value && (V["--cp-notification-color-light"] = M.value), e.bgColor && (V["--cp-notification-bg"] = e.bgColor), e.borderColor && (V["--cp-notification-border-color"] = e.borderColor), e.titleColor && (V["--cp-notification-title-color"] = e.titleColor), e.textColor && (V["--cp-notification-text-color"] = e.textColor), V["--cp-notification-animation-duration"] = `${e.animationDuration}ms`, e.duration > 0 && (V["--cp-notification-duration"] = `${e.duration}ms`), V;
8004
8007
  }), b = n(() => {
8005
- const P = typeof e.width == "number" ? `${e.width}px` : e.width, Y = {
8006
- ...M.value,
8007
- width: P,
8008
+ const V = typeof e.width == "number" ? `${e.width}px` : e.width, Y = {
8009
+ ...N.value,
8010
+ width: V,
8008
8011
  zIndex: e.zIndex
8009
8012
  };
8010
- return g.value ? Y.right = `${e.offset}px` : Y.left = `${e.offset}px`, _.value ? Y.top = `${e.offset}px` : Y.bottom = `${e.offset}px`, Y;
8013
+ return g.value ? Y.right = `${e.offset}px` : Y.left = `${e.offset}px`, E.value ? Y.top = `${e.offset}px` : Y.bottom = `${e.offset}px`, Y;
8011
8014
  }), y = n(() => [
8012
8015
  d.b(),
8013
8016
  d.m(e.variant),
@@ -8016,9 +8019,9 @@ const xt = {
8016
8019
  d.m(e.position),
8017
8020
  d.is("has-icon", e.type !== "default" || !!l.icon),
8018
8021
  d.is("closable", e.showClose)
8019
- ]), H = () => {
8022
+ ]), W = () => {
8020
8023
  i.value = !1;
8021
- }, J = n(() => g.value ? `${d.namespace}-notification-right` : `${d.namespace}-notification-left`), I = () => {
8024
+ }, G = n(() => g.value ? `${d.namespace}-notification-right` : `${d.namespace}-notification-left`), T = () => {
8022
8025
  r("destroy");
8023
8026
  }, ae = {
8024
8027
  success: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",
@@ -8028,32 +8031,32 @@ const xt = {
8028
8031
  }, ne = n(() => e.type === "default" || e.type === "primary" ? null : ae[e.type] || null);
8029
8032
  return ge(
8030
8033
  () => e.modelValue,
8031
- (P) => {
8032
- P ? (i.value = !0, v = e.duration, S()) : H();
8034
+ (V) => {
8035
+ V ? (i.value = !0, v = e.duration, S()) : W();
8033
8036
  }
8034
- ), ge(i, (P) => {
8035
- !P && e.modelValue && (x(), r("close"), r("update:modelValue", !1));
8037
+ ), ge(i, (V) => {
8038
+ !V && e.modelValue && (w(), r("close"), r("update:modelValue", !1));
8036
8039
  }), Ve(() => {
8037
8040
  e.modelValue && (i.value = !0, v = e.duration, S());
8038
8041
  }), Ae(() => {
8039
- x();
8042
+ w();
8040
8043
  }), t({
8041
8044
  /** @description 关闭通知 */
8042
- close: H,
8045
+ close: W,
8043
8046
  /** @description 当前是否可见 */
8044
8047
  visible: i
8045
- }), (P, Y) => (u(), ee(Ue, { to: "body" }, [
8046
- be(Ie, {
8047
- name: J.value,
8048
- onAfterLeave: I
8048
+ }), (V, Y) => (u(), ee(Ue, { to: "body" }, [
8049
+ be(Te, {
8050
+ name: G.value,
8051
+ onAfterLeave: T
8049
8052
  }, {
8050
8053
  default: fe(() => [
8051
- i.value ? (u(), f("div", Le({ key: 0 }, P.$attrs, {
8054
+ i.value ? (u(), f("div", Le({ key: 0 }, V.$attrs, {
8052
8055
  class: y.value,
8053
8056
  style: b.value,
8054
8057
  role: "alert",
8055
- onMouseenter: T,
8056
- onMouseleave: B
8058
+ onMouseenter: P,
8059
+ onMouseleave: _
8057
8060
  }), [
8058
8061
  k("div", {
8059
8062
  class: c(a(d).e("decor"))
@@ -8062,7 +8065,7 @@ const xt = {
8062
8065
  key: 0,
8063
8066
  class: c(a(d).e("icon"))
8064
8067
  }, [
8065
- F(P.$slots, "icon", {}, () => [
8068
+ F(V.$slots, "icon", {}, () => [
8066
8069
  (u(), f("svg", aa, [
8067
8070
  k("path", {
8068
8071
  d: ne.value
@@ -8073,30 +8076,30 @@ const xt = {
8073
8076
  k("div", {
8074
8077
  class: c(a(d).e("group"))
8075
8078
  }, [
8076
- P.title || a(l).title ? (u(), f("div", {
8079
+ V.title || a(l).title ? (u(), f("div", {
8077
8080
  key: 0,
8078
8081
  class: c(a(d).e("title"))
8079
8082
  }, [
8080
- F(P.$slots, "title", {}, () => [
8081
- pe(Z(P.title), 1)
8083
+ F(V.$slots, "title", {}, () => [
8084
+ pe(J(V.title), 1)
8082
8085
  ])
8083
8086
  ], 2)) : O("", !0),
8084
8087
  k("div", {
8085
8088
  class: c(a(d).e("content"))
8086
8089
  }, [
8087
- F(P.$slots, "default", {}, () => [
8088
- P.dangerouslyUseHTMLString ? (u(), f("p", {
8090
+ F(V.$slots, "default", {}, () => [
8091
+ V.dangerouslyUseHTMLString ? (u(), f("p", {
8089
8092
  key: 0,
8090
- innerHTML: P.message
8091
- }, null, 8, sa)) : (u(), f("p", ra, Z(P.message), 1))
8093
+ innerHTML: V.message
8094
+ }, null, 8, sa)) : (u(), f("p", ra, J(V.message), 1))
8092
8095
  ])
8093
8096
  ], 2)
8094
8097
  ], 2),
8095
- P.showClose ? (u(), f("button", {
8098
+ V.showClose ? (u(), f("button", {
8096
8099
  key: 1,
8097
8100
  class: c(a(d).e("close")),
8098
8101
  "aria-label": "Close",
8099
- onClick: H
8102
+ onClick: W
8100
8103
  }, [...Y[0] || (Y[0] = [
8101
8104
  k("svg", {
8102
8105
  viewBox: "0 0 24 24",
@@ -8109,7 +8112,7 @@ const xt = {
8109
8112
  k("path", { d: "M18 6L6 18M6 6l12 12" })
8110
8113
  ], -1)
8111
8114
  ])], 2)) : O("", !0),
8112
- P.duration > 0 ? (u(), f("div", {
8115
+ V.duration > 0 ? (u(), f("div", {
8113
8116
  key: 2,
8114
8117
  class: c(a(d).e("progress"))
8115
8118
  }, null, 2)) : O("", !0)
@@ -8147,7 +8150,7 @@ const xt = {
8147
8150
  disabled: d.disabled
8148
8151
  }, {
8149
8152
  title: fe(() => [
8150
- pe(Z(d.label), 1)
8153
+ pe(J(d.label), 1)
8151
8154
  ]),
8152
8155
  default: fe(() => [
8153
8156
  be(r, {
@@ -8163,7 +8166,7 @@ const xt = {
8163
8166
  route: d.route
8164
8167
  }, {
8165
8168
  default: fe(() => [
8166
- pe(Z(d.label), 1)
8169
+ pe(J(d.label), 1)
8167
8170
  ]),
8168
8171
  _: 2
8169
8172
  }, 1032, ["index", "icon", "disabled", "route"]))
@@ -8177,7 +8180,7 @@ const xt = {
8177
8180
  disabled: l.disabled
8178
8181
  }, {
8179
8182
  title: fe(() => [
8180
- pe(Z(l.label), 1)
8183
+ pe(J(l.label), 1)
8181
8184
  ]),
8182
8185
  default: fe(() => [
8183
8186
  be(r, {
@@ -8193,7 +8196,7 @@ const xt = {
8193
8196
  route: l.route
8194
8197
  }, {
8195
8198
  default: fe(() => [
8196
- pe(Z(l.label), 1)
8199
+ pe(J(l.label), 1)
8197
8200
  ]),
8198
8201
  _: 2
8199
8202
  }, 1032, ["index", "icon", "disabled", "route"]))
@@ -8348,7 +8351,7 @@ const xt = {
8348
8351
  disabled: v.disabled
8349
8352
  }, {
8350
8353
  title: fe(() => [
8351
- pe(Z(v.label), 1)
8354
+ pe(J(v.label), 1)
8352
8355
  ]),
8353
8356
  default: fe(() => [
8354
8357
  be(nt, {
@@ -8364,7 +8367,7 @@ const xt = {
8364
8367
  route: v.route
8365
8368
  }, {
8366
8369
  default: fe(() => [
8367
- pe(Z(v.label), 1)
8370
+ pe(J(v.label), 1)
8368
8371
  ]),
8369
8372
  _: 2
8370
8373
  }, 1032, ["index", "icon", "disabled", "route"]))
@@ -8378,7 +8381,7 @@ const xt = {
8378
8381
  disabled: m.disabled
8379
8382
  }, {
8380
8383
  title: fe(() => [
8381
- pe(Z(m.label), 1)
8384
+ pe(J(m.label), 1)
8382
8385
  ]),
8383
8386
  default: fe(() => [
8384
8387
  be(nt, {
@@ -8394,7 +8397,7 @@ const xt = {
8394
8397
  route: m.route
8395
8398
  }, {
8396
8399
  default: fe(() => [
8397
- pe(Z(m.label), 1)
8400
+ pe(J(m.label), 1)
8398
8401
  ]),
8399
8402
  _: 2
8400
8403
  }, 1032, ["index", "icon", "disabled", "route"]))
@@ -8545,33 +8548,33 @@ const xt = {
8545
8548
  props: pa,
8546
8549
  emits: fa,
8547
8550
  setup(s, { emit: t }) {
8548
- const o = s, e = t, r = le("pagination"), l = W(o.currentPage), d = W(o.pageSize);
8551
+ const o = s, e = t, r = le("pagination"), l = H(o.currentPage), d = H(o.pageSize);
8549
8552
  ge(() => o.currentPage, (h) => {
8550
8553
  l.value = h;
8551
8554
  }), ge(() => o.pageSize, (h) => {
8552
8555
  d.value = h;
8553
8556
  });
8554
- const i = n(() => o.total <= 0 ? 1 : Math.ceil(o.total / d.value)), p = n(() => l.value <= 1), m = n(() => l.value >= i.value), v = n(() => o.layout.split(",").map((h) => h.trim()).filter(Boolean)), S = n(() => o.hideOnSinglePage && i.value <= 1), w = { sm: 24, md: 32, lg: 40 }, x = n(() => o.shape), T = n(() => o.color || ""), B = n(() => [
8557
+ const i = n(() => o.total <= 0 ? 1 : Math.ceil(o.total / d.value)), p = n(() => l.value <= 1), m = n(() => l.value >= i.value), v = n(() => o.layout.split(",").map((h) => h.trim()).filter(Boolean)), S = n(() => o.hideOnSinglePage && i.value <= 1), B = { sm: 24, md: 32, lg: 40 }, w = n(() => o.shape), P = n(() => o.color || ""), _ = n(() => [
8555
8558
  r.b(),
8556
- U(o.size) && r.m(o.size),
8559
+ Z(o.size) && r.m(o.size),
8557
8560
  r.m(`shape-${o.shape}`),
8558
8561
  r.m(`type-${o.type}`),
8559
8562
  r.is("disabled", o.disabled),
8560
- r.is("custom-size", !U(o.size)),
8563
+ r.is("custom-size", !Z(o.size)),
8561
8564
  r.is("custom-color", !!o.color)
8562
8565
  ]), g = n(() => {
8563
8566
  const h = {};
8564
- return U(o.size) || (h["--cp-pagination-height"] = we(o.size, w)), o.color && (h["--cp-pagination-color"] = o.color, h["--cp-pagination-color-light"] = `${o.color}33`), h;
8565
- }), _ = n(() => o.pageSizes.map((h) => ({
8567
+ return Z(o.size) || (h["--cp-pagination-height"] = we(o.size, B)), o.color && (h["--cp-pagination-color"] = o.color, h["--cp-pagination-color-light"] = `${o.color}33`), h;
8568
+ }), E = n(() => o.pageSizes.map((h) => ({
8566
8569
  label: o.sizeTemplate.replace("{size}", String(h)),
8567
8570
  value: h
8568
- }))), N = {
8571
+ }))), z = {
8569
8572
  primary: "var(--cp-color-primary)",
8570
8573
  success: "var(--cp-color-success)",
8571
8574
  warning: "var(--cp-color-warning)",
8572
8575
  error: "var(--cp-color-error)",
8573
8576
  info: "var(--cp-color-info)"
8574
- }, E = n(() => o.color ? o.color : o.type !== "default" && N[o.type] || ""), M = n(() => o.shape === "circle" ? "round" : o.shape), b = n(() => {
8577
+ }, M = n(() => o.color ? o.color : o.type !== "default" && z[o.type] || ""), N = n(() => o.shape === "circle" ? "round" : o.shape), b = n(() => {
8575
8578
  const h = o.totalTemplate, q = h.indexOf("{total}");
8576
8579
  return q === -1 ? { before: h, after: "" } : {
8577
8580
  before: h.slice(0, q),
@@ -8580,33 +8583,33 @@ const xt = {
8580
8583
  }), y = n(() => {
8581
8584
  const h = i.value, q = l.value, re = o.pagerCount, $ = Math.floor(re / 2);
8582
8585
  if (h <= re)
8583
- return Array.from({ length: h }, (z, L) => L + 1);
8586
+ return Array.from({ length: h }, (x, L) => L + 1);
8584
8587
  const C = [];
8585
8588
  C.push(1);
8586
8589
  const K = q - $ > 2, ie = q + $ < h - 1;
8587
8590
  if (K && ie) {
8588
8591
  C.push("left-ellipsis");
8589
- for (let z = q - $ + 2; z <= q + $ - 2; z++)
8590
- C.push(z);
8592
+ for (let x = q - $ + 2; x <= q + $ - 2; x++)
8593
+ C.push(x);
8591
8594
  C.push("right-ellipsis");
8592
8595
  } else if (K) {
8593
8596
  C.push("left-ellipsis");
8594
- for (let z = h - re + 3; z < h; z++)
8595
- C.push(z);
8597
+ for (let x = h - re + 3; x < h; x++)
8598
+ C.push(x);
8596
8599
  } else if (ie) {
8597
- for (let z = 2; z <= re - 2; z++)
8598
- C.push(z);
8600
+ for (let x = 2; x <= re - 2; x++)
8601
+ C.push(x);
8599
8602
  C.push("right-ellipsis");
8600
8603
  }
8601
8604
  return h > 1 && C.push(h), C;
8602
- }), H = (h) => {
8605
+ }), W = (h) => {
8603
8606
  if (o.disabled) return;
8604
8607
  const q = Math.max(1, Math.min(h, i.value));
8605
8608
  q !== l.value && (l.value = q, e("update:currentPage", q), e("change", q));
8606
- }, J = () => {
8607
- p.value || H(l.value - 1);
8608
- }, I = () => {
8609
- m.value || H(l.value + 1);
8609
+ }, G = () => {
8610
+ p.value || W(l.value - 1);
8611
+ }, T = () => {
8612
+ m.value || W(l.value + 1);
8610
8613
  }, ae = (h) => {
8611
8614
  if (o.disabled) return;
8612
8615
  const q = Number(h);
@@ -8614,15 +8617,15 @@ const xt = {
8614
8617
  }, ne = (h) => {
8615
8618
  if (o.disabled) return;
8616
8619
  const q = o.pagerCount - 2;
8617
- H(h === "left-ellipsis" ? Math.max(1, l.value - q) : Math.min(i.value, l.value + q));
8618
- }, P = W(""), Y = () => {
8620
+ W(h === "left-ellipsis" ? Math.max(1, l.value - q) : Math.min(i.value, l.value + q));
8621
+ }, V = H(""), Y = () => {
8619
8622
  if (o.disabled) return;
8620
- const h = parseInt(P.value, 10);
8621
- !isNaN(h) && h >= 1 && h <= i.value && H(h), P.value = "";
8623
+ const h = parseInt(V.value, 10);
8624
+ !isNaN(h) && h >= 1 && h <= i.value && W(h), V.value = "";
8622
8625
  };
8623
8626
  return (h, q) => S.value ? O("", !0) : (u(), f("nav", {
8624
8627
  key: 0,
8625
- class: c(B.value),
8628
+ class: c(_.value),
8626
8629
  style: j(g.value),
8627
8630
  role: "navigation",
8628
8631
  "aria-label": "分页"
@@ -8635,20 +8638,20 @@ const xt = {
8635
8638
  key: 1,
8636
8639
  class: c(a(r).e("total"))
8637
8640
  }, [
8638
- pe(Z(b.value.before), 1),
8641
+ pe(J(b.value.before), 1),
8639
8642
  k("span", {
8640
8643
  class: c(a(r).e("total-count"))
8641
- }, Z(h.total), 3),
8642
- pe(Z(b.value.after), 1)
8644
+ }, J(h.total), 3),
8645
+ pe(J(b.value.after), 1)
8643
8646
  ], 2)) : re === "sizes" ? F(h.$slots, "sizes", {
8644
8647
  key: 2,
8645
8648
  pageSize: d.value,
8646
8649
  pageSizes: h.pageSizes,
8647
- options: _.value,
8650
+ options: E.value,
8648
8651
  onChange: ae,
8649
8652
  disabled: h.disabled,
8650
8653
  type: h.type,
8651
- color: h.color || E.value,
8654
+ color: h.color || M.value,
8652
8655
  shape: h.shape,
8653
8656
  size: h.size
8654
8657
  }, () => [
@@ -8657,19 +8660,19 @@ const xt = {
8657
8660
  }, [
8658
8661
  be(dt, {
8659
8662
  "model-value": d.value,
8660
- options: _.value,
8663
+ options: E.value,
8661
8664
  disabled: h.disabled,
8662
- shape: M.value,
8665
+ shape: N.value,
8663
8666
  size: h.size,
8664
8667
  variant: "filled",
8665
- color: E.value,
8668
+ color: M.value,
8666
8669
  onChange: ae
8667
8670
  }, null, 8, ["model-value", "options", "disabled", "shape", "size", "color"])
8668
8671
  ], 2)
8669
8672
  ]) : re === "prev" ? F(h.$slots, "prev", {
8670
8673
  key: 3,
8671
8674
  disabled: p.value || h.disabled,
8672
- onClick: J,
8675
+ onClick: G,
8673
8676
  currentPage: l.value,
8674
8677
  type: h.type,
8675
8678
  color: h.color,
@@ -8681,12 +8684,12 @@ const xt = {
8681
8684
  class: c(a(r).e("prev")),
8682
8685
  type: "default",
8683
8686
  variant: h.buttonVariant,
8684
- shape: x.value,
8687
+ shape: w.value,
8685
8688
  size: h.size,
8686
8689
  square: "",
8687
8690
  disabled: p.value || h.disabled,
8688
8691
  "aria-label": "上一页",
8689
- onClick: J
8692
+ onClick: G
8690
8693
  }, {
8691
8694
  default: fe(() => [...q[1] || (q[1] = [
8692
8695
  k("svg", {
@@ -8709,7 +8712,7 @@ const xt = {
8709
8712
  pages: y.value,
8710
8713
  currentPage: l.value,
8711
8714
  pageCount: i.value,
8712
- onPageClick: H,
8715
+ onPageClick: W,
8713
8716
  onEllipsisClick: ne,
8714
8717
  disabled: h.disabled,
8715
8718
  type: h.type,
@@ -8741,7 +8744,7 @@ const xt = {
8741
8744
  be(Oe, {
8742
8745
  variant: "ghost",
8743
8746
  type: "default",
8744
- shape: x.value,
8747
+ shape: w.value,
8745
8748
  size: h.size,
8746
8749
  square: "",
8747
8750
  disabled: h.disabled,
@@ -8779,7 +8782,7 @@ const xt = {
8779
8782
  page: $,
8780
8783
  active: $ === l.value,
8781
8784
  disabled: h.disabled,
8782
- onClick: () => H($),
8785
+ onClick: () => W($),
8783
8786
  type: h.type,
8784
8787
  color: h.color,
8785
8788
  buttonVariant: h.buttonVariant
@@ -8787,15 +8790,15 @@ const xt = {
8787
8790
  be(Oe, {
8788
8791
  type: $ === l.value ? h.type === "default" ? "primary" : h.type : "default",
8789
8792
  variant: $ === l.value ? "solid" : h.buttonVariant,
8790
- shape: x.value,
8793
+ shape: w.value,
8791
8794
  size: h.size,
8792
8795
  square: "",
8793
- color: $ === l.value ? T.value : "",
8796
+ color: $ === l.value ? P.value : "",
8794
8797
  disabled: h.disabled,
8795
- onClick: (C) => H($)
8798
+ onClick: (C) => W($)
8796
8799
  }, {
8797
8800
  default: fe(() => [
8798
- pe(Z($), 1)
8801
+ pe(J($), 1)
8799
8802
  ]),
8800
8803
  _: 2
8801
8804
  }, 1032, ["type", "variant", "shape", "size", "color", "disabled", "onClick"])
@@ -8805,7 +8808,7 @@ const xt = {
8805
8808
  ]) : re === "next" ? F(h.$slots, "next", {
8806
8809
  key: 5,
8807
8810
  disabled: m.value || h.disabled,
8808
- onClick: I,
8811
+ onClick: T,
8809
8812
  currentPage: l.value,
8810
8813
  type: h.type,
8811
8814
  color: h.color,
@@ -8817,12 +8820,12 @@ const xt = {
8817
8820
  class: c(a(r).e("next")),
8818
8821
  type: "default",
8819
8822
  variant: h.buttonVariant,
8820
- shape: x.value,
8823
+ shape: w.value,
8821
8824
  size: h.size,
8822
8825
  square: "",
8823
8826
  disabled: m.value || h.disabled,
8824
8827
  "aria-label": "下一页",
8825
- onClick: I
8828
+ onClick: T
8826
8829
  }, {
8827
8830
  default: fe(() => [...q[3] || (q[3] = [
8828
8831
  k("svg", {
@@ -8844,7 +8847,7 @@ const xt = {
8844
8847
  key: 6,
8845
8848
  pageCount: i.value,
8846
8849
  disabled: h.disabled,
8847
- onJump: H,
8850
+ onJump: W,
8848
8851
  type: h.type,
8849
8852
  color: h.color,
8850
8853
  shape: h.shape,
@@ -8854,8 +8857,8 @@ const xt = {
8854
8857
  class: c(a(r).e("jumper"))
8855
8858
  }, [
8856
8859
  q[4] || (q[4] = pe(" 前往 ", -1)),
8857
- Te(k("input", {
8858
- "onUpdate:modelValue": q[0] || (q[0] = ($) => P.value = $),
8860
+ Ie(k("input", {
8861
+ "onUpdate:modelValue": q[0] || (q[0] = ($) => V.value = $),
8859
8862
  class: c(a(r).e("jumper-input")),
8860
8863
  type: "number",
8861
8864
  min: 1,
@@ -8863,7 +8866,7 @@ const xt = {
8863
8866
  disabled: h.disabled,
8864
8867
  onKeydown: Ge(Y, ["enter"])
8865
8868
  }, null, 42, ya), [
8866
- [tt, P.value]
8869
+ [tt, V.value]
8867
8870
  ]),
8868
8871
  q[5] || (q[5] = pe(" 页 ", -1))
8869
8872
  ], 2)
@@ -8959,17 +8962,17 @@ const xt = {
8959
8962
  props: ma,
8960
8963
  emits: ga,
8961
8964
  setup(s, { expose: t, emit: o }) {
8962
- const e = s, r = o, l = le("segmented"), d = { sm: 28, md: 36, lg: 44 }, i = n(() => e.options.map((N) => typeof N == "string" || typeof N == "number" ? { label: String(N), value: N } : N)), p = W(), m = W([]), v = W({}), S = (N, E) => {
8963
- N && (m.value[E] = N);
8964
- }, w = () => {
8965
- const N = i.value.findIndex(
8966
- (H) => H.value === e.modelValue
8965
+ const e = s, r = o, l = le("segmented"), d = { sm: 28, md: 36, lg: 44 }, i = n(() => e.options.map((z) => typeof z == "string" || typeof z == "number" ? { label: String(z), value: z } : z)), p = H(), m = H([]), v = H({}), S = (z, M) => {
8966
+ z && (m.value[M] = z);
8967
+ }, B = () => {
8968
+ const z = i.value.findIndex(
8969
+ (W) => W.value === e.modelValue
8967
8970
  );
8968
- if (N < 0 || !m.value[N] || !p.value) {
8971
+ if (z < 0 || !m.value[z] || !p.value) {
8969
8972
  v.value = { opacity: "0" };
8970
8973
  return;
8971
8974
  }
8972
- const E = m.value[N], b = p.value.getBoundingClientRect(), y = E.getBoundingClientRect();
8975
+ const M = m.value[z], b = p.value.getBoundingClientRect(), y = M.getBoundingClientRect();
8973
8976
  v.value = {
8974
8977
  width: `${y.width}px`,
8975
8978
  transform: `translateX(calc(${y.left - b.left}px + var(--cp-segmented-indicator-offset, -2px)))`,
@@ -8978,72 +8981,72 @@ const xt = {
8978
8981
  };
8979
8982
  ge(
8980
8983
  () => e.modelValue,
8981
- () => Be(w)
8984
+ () => Be(B)
8982
8985
  ), ge(
8983
8986
  () => e.options,
8984
- () => Be(w),
8987
+ () => Be(B),
8985
8988
  { deep: !0 }
8986
8989
  );
8987
- let x = null;
8990
+ let w = null;
8988
8991
  Ve(() => {
8989
- Be(w), p.value && (x = new ResizeObserver(() => {
8990
- w();
8991
- }), x.observe(p.value));
8992
+ Be(B), p.value && (w = new ResizeObserver(() => {
8993
+ B();
8994
+ }), w.observe(p.value));
8992
8995
  }), Ae(() => {
8993
- x == null || x.disconnect();
8996
+ w == null || w.disconnect();
8994
8997
  });
8995
- const T = n(() => [
8998
+ const P = n(() => [
8996
8999
  l.b(),
8997
9000
  l.m(e.variant),
8998
9001
  l.m(e.type),
8999
- U(e.size) && l.m(e.size),
9002
+ Z(e.size) && l.m(e.size),
9000
9003
  l.m(`shape-${e.shape}`),
9001
9004
  l.is("disabled", e.disabled),
9002
9005
  l.is("block", e.block),
9003
9006
  l.is("custom-color", !!e.color),
9004
- l.is("custom-size", !U(e.size))
9005
- ]), B = n(() => {
9006
- const N = {};
9007
- return e.color && (N["--cp-segmented-color"] = e.color, N["--cp-segmented-color-light"] = `${e.color}25`), U(e.size) || (N["--cp-segmented-height"] = we(e.size, d)), N;
9008
- }), g = (N) => {
9009
- e.disabled || N.disabled || N.value !== e.modelValue && (r("update:modelValue", N.value), r("change", N.value));
9010
- }, _ = (N) => [
9007
+ l.is("custom-size", !Z(e.size))
9008
+ ]), _ = n(() => {
9009
+ const z = {};
9010
+ return e.color && (z["--cp-segmented-color"] = e.color, z["--cp-segmented-color-light"] = `${e.color}25`), Z(e.size) || (z["--cp-segmented-height"] = we(e.size, d)), z;
9011
+ }), g = (z) => {
9012
+ e.disabled || z.disabled || z.value !== e.modelValue && (r("update:modelValue", z.value), r("change", z.value));
9013
+ }, E = (z) => [
9011
9014
  l.e("item"),
9012
- l.is("active", N.value === e.modelValue),
9013
- l.is("disabled", !!N.disabled)
9015
+ l.is("active", z.value === e.modelValue),
9016
+ l.is("disabled", !!z.disabled)
9014
9017
  ];
9015
9018
  return t({
9016
9019
  /** @description 更新滑块位置 */
9017
- updateIndicator: w
9018
- }), (N, E) => (u(), f("div", {
9020
+ updateIndicator: B
9021
+ }), (z, M) => (u(), f("div", {
9019
9022
  ref_key: "trackRef",
9020
9023
  ref: p,
9021
- class: c(T.value),
9022
- style: j(B.value),
9024
+ class: c(P.value),
9025
+ style: j(_.value),
9023
9026
  role: "radiogroup"
9024
9027
  }, [
9025
9028
  k("div", {
9026
9029
  class: c(a(l).e("indicator")),
9027
9030
  style: j(v.value)
9028
9031
  }, null, 6),
9029
- (u(!0), f(de, null, ke(i.value, (M, b) => (u(), f("button", {
9030
- key: M.value,
9032
+ (u(!0), f(de, null, ke(i.value, (N, b) => (u(), f("button", {
9033
+ key: N.value,
9031
9034
  ref_for: !0,
9032
9035
  ref: (y) => S(y, b),
9033
- class: c(_(M)),
9034
- disabled: N.disabled || M.disabled,
9036
+ class: c(E(N)),
9037
+ disabled: z.disabled || N.disabled,
9035
9038
  type: "button",
9036
9039
  role: "radio",
9037
- "aria-checked": M.value === N.modelValue,
9038
- onClick: (y) => g(M)
9040
+ "aria-checked": N.value === z.modelValue,
9041
+ onClick: (y) => g(N)
9039
9042
  }, [
9040
- M.icon ? (u(), ee($e(M.icon), {
9043
+ N.icon ? (u(), ee($e(N.icon), {
9041
9044
  key: 0,
9042
9045
  class: c(a(l).e("item-icon"))
9043
9046
  }, null, 8, ["class"])) : O("", !0),
9044
9047
  k("span", {
9045
9048
  class: c(a(l).e("item-label"))
9046
- }, Z(M.label), 3)
9049
+ }, J(N.label), 3)
9047
9050
  ], 10, ha))), 128))
9048
9051
  ], 6));
9049
9052
  }
@@ -9167,7 +9170,7 @@ const xt = {
9167
9170
  var q, re;
9168
9171
  const e = s, r = o;
9169
9172
  Se();
9170
- const l = le("table"), d = W([]);
9173
+ const l = le("table"), d = H([]);
9171
9174
  let i = 0;
9172
9175
  ze(it, { registerColumn: ($) => {
9173
9176
  const C = `cp-col-${i++}`, K = { ...$, id: C };
@@ -9176,62 +9179,62 @@ const xt = {
9176
9179
  const C = d.value.findIndex((K) => K.id === $);
9177
9180
  C > -1 && d.value.splice(C, 1);
9178
9181
  } });
9179
- const v = W({
9182
+ const v = H({
9180
9183
  prop: ((q = e.defaultSort) == null ? void 0 : q.prop) || "",
9181
9184
  order: ((re = e.defaultSort) == null ? void 0 : re.order) || null
9182
9185
  }), S = n(() => {
9183
9186
  const { prop: $, order: C } = v.value;
9184
9187
  return !$ || !C ? [...e.data] : [...e.data].sort((K, ie) => {
9185
- const z = K[$], L = ie[$];
9186
- if (z == null && L == null) return 0;
9187
- if (z == null) return C === "ascending" ? -1 : 1;
9188
+ const x = K[$], L = ie[$];
9189
+ if (x == null && L == null) return 0;
9190
+ if (x == null) return C === "ascending" ? -1 : 1;
9188
9191
  if (L == null) return C === "ascending" ? 1 : -1;
9189
- if (typeof z == "number" && typeof L == "number")
9190
- return C === "ascending" ? z - L : L - z;
9191
- const R = String(z), V = String(L);
9192
- return C === "ascending" ? R.localeCompare(V) : V.localeCompare(R);
9192
+ if (typeof x == "number" && typeof L == "number")
9193
+ return C === "ascending" ? x - L : L - x;
9194
+ const R = String(x), A = String(L);
9195
+ return C === "ascending" ? R.localeCompare(A) : A.localeCompare(R);
9193
9196
  });
9194
- }), w = ($) => {
9197
+ }), B = ($) => {
9195
9198
  if (!$.sortable) return;
9196
9199
  const C = v.value.prop === $.prop ? v.value.order : null;
9197
9200
  let K = null;
9198
9201
  C === null ? K = "ascending" : C === "ascending" ? K = "descending" : K = null, v.value = { prop: $.prop, order: K }, r("sort-change", v.value);
9199
- }, x = ($) => !$.sortable || v.value.prop !== $.prop ? "" : v.value.order === "ascending" ? "is-ascending" : v.value.order === "descending" ? "is-descending" : "", T = ($, C) => v.value.prop === $.prop && v.value.order === C, B = W(/* @__PURE__ */ new Set());
9202
+ }, w = ($) => !$.sortable || v.value.prop !== $.prop ? "" : v.value.order === "ascending" ? "is-ascending" : v.value.order === "descending" ? "is-descending" : "", P = ($, C) => v.value.prop === $.prop && v.value.order === C, _ = H(/* @__PURE__ */ new Set());
9200
9203
  n(() => d.value.some(($) => $.columnType === "selection"));
9201
- const g = n(() => S.value.length === 0 ? !1 : S.value.every(($) => B.value.has($))), _ = n(() => {
9202
- const $ = S.value.filter((C) => B.value.has(C)).length;
9204
+ const g = n(() => S.value.length === 0 ? !1 : S.value.every(($) => _.value.has($))), E = n(() => {
9205
+ const $ = S.value.filter((C) => _.value.has(C)).length;
9203
9206
  return $ > 0 && $ < S.value.length;
9204
- }), N = ($) => {
9205
- const C = new Set(B.value);
9206
- C.has($) ? C.delete($) : C.add($), B.value = C;
9207
+ }), z = ($) => {
9208
+ const C = new Set(_.value);
9209
+ C.has($) ? C.delete($) : C.add($), _.value = C;
9207
9210
  const K = Array.from(C);
9208
9211
  r("select", K, $), r("selection-change", K);
9209
- }, E = () => {
9212
+ }, M = () => {
9210
9213
  let $;
9211
- g.value ? $ = /* @__PURE__ */ new Set() : $ = new Set(S.value), B.value = $;
9214
+ g.value ? $ = /* @__PURE__ */ new Set() : $ = new Set(S.value), _.value = $;
9212
9215
  const C = Array.from($);
9213
9216
  r("select-all", C), r("selection-change", C);
9214
- }, M = W(null), b = ($, C, K) => {
9217
+ }, N = H(null), b = ($, C, K) => {
9215
9218
  if (r("row-click", $, C, K), e.highlightCurrentRow) {
9216
- const ie = M.value;
9217
- M.value = $, r("current-change", $, ie);
9219
+ const ie = N.value;
9220
+ N.value = $, r("current-change", $, ie);
9218
9221
  }
9219
- }, y = ($, C) => typeof e.rowKey == "function" ? e.rowKey($) : $[e.rowKey] ?? C, H = n(() => [
9222
+ }, y = ($, C) => typeof e.rowKey == "function" ? e.rowKey($) : $[e.rowKey] ?? C, W = n(() => [
9220
9223
  l.b(),
9221
- U(e.size) && l.m(e.size),
9224
+ Z(e.size) && l.m(e.size),
9222
9225
  l.m(`type-${e.type}`),
9223
9226
  l.is("stripe", e.stripe),
9224
9227
  l.is("border", e.border),
9225
9228
  l.is("highlight-current-row", e.highlightCurrentRow),
9226
9229
  l.is("scrollable", !!(e.height || e.maxHeight))
9227
- ]), J = n(() => e.color ? {
9230
+ ]), G = n(() => e.color ? {
9228
9231
  "--cp-table-color": e.color,
9229
9232
  "--cp-table-header-bg": `linear-gradient(180deg, color-mix(in srgb, ${e.color} 18%, transparent) 0%, color-mix(in srgb, ${e.color} 6%, transparent) 100%)`,
9230
9233
  "--cp-table-header-border-color": `color-mix(in srgb, ${e.color} 40%, transparent)`,
9231
9234
  "--cp-table-row-hover-bg": `color-mix(in srgb, ${e.color} 6%, transparent)`,
9232
9235
  "--cp-table-row-current-bg": `color-mix(in srgb, ${e.color} 10%, transparent)`,
9233
9236
  "--cp-table-row-selected-bg": `color-mix(in srgb, ${e.color} 8%, transparent)`
9234
- } : {}), I = n(() => e.color || e.type === "default" ? void 0 : e.type), ae = n(() => e.color || void 0), ne = n(() => {
9237
+ } : {}), T = n(() => e.color || e.type === "default" ? void 0 : e.type), ae = n(() => e.color || void 0), ne = n(() => {
9235
9238
  const $ = {};
9236
9239
  if (e.height) {
9237
9240
  const C = typeof e.height == "number" ? `${e.height}px` : e.height;
@@ -9242,29 +9245,29 @@ const xt = {
9242
9245
  $["max-height"] = C, $["overflow-y"] = "auto";
9243
9246
  }
9244
9247
  return $;
9245
- }), P = ($) => {
9248
+ }), V = ($) => {
9246
9249
  const C = {};
9247
9250
  return $.width && (C.width = typeof $.width == "number" ? `${$.width}px` : $.width), $.minWidth && (C.minWidth = typeof $.minWidth == "number" ? `${$.minWidth}px` : $.minWidth), ($.columnType === "selection" || $.columnType === "index") && ($.width || (C.width = "50px")), C;
9248
9251
  }, Y = ($, C) => C.prop ? C.prop.split(".").reduce((K, ie) => K == null ? void 0 : K[ie], $) : "", h = ($) => $ === "center" ? l.m("align-center") : $ === "right" ? l.m("align-right") : "";
9249
9252
  return t({
9250
9253
  /** 清空选择 */
9251
9254
  clearSelection: () => {
9252
- B.value = /* @__PURE__ */ new Set(), r("selection-change", []);
9255
+ _.value = /* @__PURE__ */ new Set(), r("selection-change", []);
9253
9256
  },
9254
9257
  /** 获取选中行 */
9255
- getSelectionRows: () => Array.from(B.value),
9258
+ getSelectionRows: () => Array.from(_.value),
9256
9259
  /** 排序 */
9257
9260
  sort: ($, C) => {
9258
9261
  v.value = { prop: $, order: C }, r("sort-change", v.value);
9259
9262
  },
9260
9263
  /** 设置当前行 */
9261
9264
  setCurrentRow: ($) => {
9262
- const C = M.value;
9263
- M.value = $, r("current-change", $, C);
9265
+ const C = N.value;
9266
+ N.value = $, r("current-change", $, C);
9264
9267
  }
9265
9268
  }), ($, C) => (u(), f("div", {
9266
- class: c(H.value),
9267
- style: j(J.value)
9269
+ class: c(W.value),
9270
+ style: j(G.value)
9268
9271
  }, [
9269
9272
  k("div", Ca, [
9270
9273
  F($.$slots, "default")
@@ -9287,32 +9290,32 @@ const xt = {
9287
9290
  class: c([
9288
9291
  a(l).e("header-cell"),
9289
9292
  K.sortable && a(l).is("sortable", !0),
9290
- x(K),
9293
+ w(K),
9291
9294
  h(K.headerAlign || K.align)
9292
9295
  ]),
9293
- style: j(P(K)),
9294
- onClick: (ie) => K.sortable ? w(K) : void 0
9296
+ style: j(V(K)),
9297
+ onClick: (ie) => K.sortable ? B(K) : void 0
9295
9298
  }, [
9296
9299
  K.columnType === "selection" ? (u(), ee(ot, {
9297
9300
  key: 0,
9298
9301
  "model-value": g.value,
9299
- indeterminate: _.value,
9300
- type: I.value,
9302
+ indeterminate: E.value,
9303
+ type: T.value,
9301
9304
  color: ae.value,
9302
- onChange: E,
9305
+ onChange: M,
9303
9306
  onClick: C[0] || (C[0] = Pe(() => {
9304
9307
  }, ["stop"]))
9305
9308
  }, null, 8, ["model-value", "indeterminate", "type", "color"])) : (u(), f(de, { key: 1 }, [
9306
9309
  K.slots.header ? (u(), ee($e({ render: () => K.slots.header({ column: K, $index: d.value.indexOf(K) }) }), { key: 0 })) : (u(), f("span", {
9307
9310
  key: 1,
9308
9311
  class: c(a(l).e("header-label"))
9309
- }, Z(K.columnType === "index" ? K.label || "#" : K.label), 3)),
9312
+ }, J(K.columnType === "index" ? K.label || "#" : K.label), 3)),
9310
9313
  K.sortable ? (u(), f("span", {
9311
9314
  key: 2,
9312
9315
  class: c(a(l).e("sort-icon"))
9313
9316
  }, [
9314
9317
  (u(), f("svg", {
9315
- class: c([a(l).e("sort-caret"), a(l).is("ascending"), a(l).is("active", T(K, "ascending"))]),
9318
+ class: c([a(l).e("sort-caret"), a(l).is("ascending"), a(l).is("active", P(K, "ascending"))]),
9316
9319
  viewBox: "0 0 8 5",
9317
9320
  width: "8",
9318
9321
  height: "5"
@@ -9323,7 +9326,7 @@ const xt = {
9323
9326
  }, null, -1)
9324
9327
  ])], 2)),
9325
9328
  (u(), f("svg", {
9326
- class: c([a(l).e("sort-caret"), a(l).is("descending"), a(l).is("active", T(K, "descending"))]),
9329
+ class: c([a(l).e("sort-caret"), a(l).is("descending"), a(l).is("active", P(K, "descending"))]),
9327
9330
  viewBox: "0 0 8 5",
9328
9331
  width: "8",
9329
9332
  height: "5"
@@ -9347,28 +9350,28 @@ const xt = {
9347
9350
  class: c([
9348
9351
  a(l).e("row"),
9349
9352
  a(l).is("striped", $.stripe && ie % 2 === 1),
9350
- a(l).is("current", $.highlightCurrentRow && M.value === K),
9351
- a(l).is("selected", B.value.has(K))
9353
+ a(l).is("current", $.highlightCurrentRow && N.value === K),
9354
+ a(l).is("selected", _.value.has(K))
9352
9355
  ]),
9353
- onClick: (z) => b(K, ie, z)
9356
+ onClick: (x) => b(K, ie, x)
9354
9357
  }, [
9355
- (u(!0), f(de, null, ke(d.value, (z) => (u(), f("td", {
9356
- key: z.id,
9357
- class: c([a(l).e("cell"), h(z.align)]),
9358
- style: j(P(z))
9358
+ (u(!0), f(de, null, ke(d.value, (x) => (u(), f("td", {
9359
+ key: x.id,
9360
+ class: c([a(l).e("cell"), h(x.align)]),
9361
+ style: j(V(x))
9359
9362
  }, [
9360
- z.columnType === "selection" ? (u(), ee(ot, {
9363
+ x.columnType === "selection" ? (u(), ee(ot, {
9361
9364
  key: 0,
9362
- "model-value": B.value.has(K),
9363
- type: I.value,
9365
+ "model-value": _.value.has(K),
9366
+ type: T.value,
9364
9367
  color: ae.value,
9365
- onChange: (L) => N(K),
9368
+ onChange: (L) => z(K),
9366
9369
  onClick: C[1] || (C[1] = Pe(() => {
9367
9370
  }, ["stop"]))
9368
- }, null, 8, ["model-value", "type", "color", "onChange"])) : z.columnType === "index" ? (u(), f(de, { key: 1 }, [
9369
- pe(Z(ie + 1), 1)
9370
- ], 64)) : z.slots.default ? (u(), ee($e({ render: () => z.slots.default({ row: K, column: z, $index: ie }) }), { key: 2 })) : (u(), f(de, { key: 3 }, [
9371
- pe(Z(Y(K, z)), 1)
9371
+ }, null, 8, ["model-value", "type", "color", "onChange"])) : x.columnType === "index" ? (u(), f(de, { key: 1 }, [
9372
+ pe(J(ie + 1), 1)
9373
+ ], 64)) : x.slots.default ? (u(), ee($e({ render: () => x.slots.default({ row: K, column: x, $index: ie }) }), { key: 2 })) : (u(), f(de, { key: 3 }, [
9374
+ pe(J(Y(K, x)), 1)
9372
9375
  ], 64))
9373
9376
  ], 6))), 128))
9374
9377
  ], 10, $a))), 128)) : (u(), f("tr", {
@@ -9396,7 +9399,7 @@ const xt = {
9396
9399
  ])], 2)),
9397
9400
  k("span", {
9398
9401
  class: c(a(l).e("empty-text"))
9399
- }, Z($.emptyText), 3)
9402
+ }, J($.emptyText), 3)
9400
9403
  ], 2)
9401
9404
  ])
9402
9405
  ], 10, xa)
@@ -9513,7 +9516,7 @@ export {
9513
9516
  un as CpHeader,
9514
9517
  Ee as CpIcon,
9515
9518
  Fa as CpImage,
9516
- Ta as CpInput,
9519
+ Ia as CpInput,
9517
9520
  Ea as CpInputNumber,
9518
9521
  et as CpLoading,
9519
9522
  dn as CpMain,
@@ -9537,11 +9540,11 @@ export {
9537
9540
  Oa as CpSwitch,
9538
9541
  gn as CpTable,
9539
9542
  hn as CpTableColumn,
9540
- Ka as CpTag,
9541
- _a as CpText,
9542
- Ia as CpTextarea,
9543
+ _a as CpTag,
9544
+ Ka as CpText,
9545
+ Ta as CpTextarea,
9543
9546
  on as CpTree,
9544
- Il as asideProps,
9547
+ Tl as asideProps,
9545
9548
  Oo as avatarEmits,
9546
9549
  Ro as avatarGroupProps,
9547
9550
  Do as avatarProps,
@@ -9563,11 +9566,11 @@ export {
9563
9566
  wl as dividerProps,
9564
9567
  Zo as dropdownEmits,
9565
9568
  Uo as dropdownProps,
9566
- Tl as footerProps,
9569
+ Il as footerProps,
9567
9570
  Al as headerProps,
9568
9571
  At as iconProps,
9569
- Io as imageEmits,
9570
- To as imageProps,
9572
+ To as imageEmits,
9573
+ Io as imageProps,
9571
9574
  Ot as inputEmits,
9572
9575
  qt as inputNumberEmits,
9573
9576
  Xt as inputNumberProps,
@@ -9580,7 +9583,7 @@ export {
9580
9583
  Hl as menuItemProps,
9581
9584
  ca as menuNavEmits,
9582
9585
  ua as menuNavProps,
9583
- _l as menuProps,
9586
+ Kl as menuProps,
9584
9587
  la as notificationEmits,
9585
9588
  oa as notificationProps,
9586
9589
  fa as paginationEmits,