@yuku123/z-frontend-common 1.1.4 → 1.1.6

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.
@@ -1,8 +1,8 @@
1
- import { jsxs as m, jsx as t, Fragment as Ce } from "react/jsx-runtime";
2
- import { useState as B, useRef as N, useEffect as L, useMemo as q, useCallback as be, useLayoutEffect as Re, createElement as ae, Fragment as O } from "react";
3
- import { Button as V, Skeleton as _, Input as Te, Card as me, Table as ye, Breadcrumb as Ee, Space as se, Tag as ce } from "antd";
4
- import { InboxOutlined as Ie, ExclamationCircleOutlined as Ae, ReloadOutlined as re, SearchOutlined as ze, ReadOutlined as Be } from "@ant-design/icons";
5
- import { useNavigate as xe, useInRouterContext as De } from "react-router-dom";
1
+ import { jsxs as m, jsx as t, Fragment as Te } from "react/jsx-runtime";
2
+ import { useState as B, useRef as P, useEffect as L, useMemo as q, useCallback as me, useLayoutEffect as Ee, createElement as ae, Fragment as O } from "react";
3
+ import { Button as V, Skeleton as N, Input as Ae, Card as ye, Table as xe, Breadcrumb as Ie, Space as se, Tag as ce } from "antd";
4
+ import { InboxOutlined as ze, ExclamationCircleOutlined as Be, ReloadOutlined as re, SearchOutlined as De, ReadOutlined as Le } from "@ant-design/icons";
5
+ import { useInRouterContext as ve, useNavigate as Se } from "react-router-dom";
6
6
  const T = {
7
7
  // 主色 (蓝紫) - 顶导/重点按钮/链接
8
8
  primary: "#7c3aed",
@@ -88,10 +88,10 @@ const T = {
88
88
  md: "0 2px 4px -1px rgba(15, 23, 42, 0.04), 0 4px 8px -1px rgba(15, 23, 42, 0.08)",
89
89
  lg: "0 4px 6px -2px rgba(15, 23, 42, 0.05), 0 12px 16px -4px rgba(15, 23, 42, 0.10)",
90
90
  xl: "0 8px 24px -6px rgba(15, 23, 42, 0.10), 0 24px 48px -12px rgba(15, 23, 42, 0.18)"
91
- }, at = {
91
+ }, st = {
92
92
  rest: D.md,
93
93
  hover: "0 8px 16px -4px rgba(15, 23, 42, 0.08), 0 20px 32px -8px rgba(15, 23, 42, 0.14)"
94
- }, P = {
94
+ }, _ = {
95
95
  1: 4,
96
96
  2: 8,
97
97
  3: 12,
@@ -189,49 +189,49 @@ const T = {
189
189
  }
190
190
  }
191
191
  };
192
- function st({
192
+ function ct({
193
193
  icon: e,
194
194
  label: n,
195
- value: s,
196
- suffix: o,
197
- color: c = "blue",
195
+ value: c,
196
+ suffix: i,
197
+ color: d = "blue",
198
198
  trend: a,
199
199
  href: r,
200
- loading: l = !1,
201
- precision: i = 0
200
+ loading: o = !1,
201
+ precision: l = 0
202
202
  }) {
203
- const d = E[c] || E.blue, [f, g] = B(0), p = N(0);
203
+ const s = E[d] || E.blue, [g, f] = B(0), p = P(0);
204
204
  L(() => {
205
- if (l || s == null) return;
206
- const b = p.current, S = Number(s) || 0;
207
- if (b === S) {
208
- g(S);
205
+ if (o || c == null) return;
206
+ const b = p.current, w = Number(c) || 0;
207
+ if (b === w) {
208
+ f(w);
209
209
  return;
210
210
  }
211
- const w = 600, A = performance.now();
211
+ const k = 600, I = performance.now();
212
212
  let $;
213
213
  const G = (U) => {
214
- const j = Math.min(1, (U - A) / w), J = 1 - Math.pow(1 - j, 3), u = b + (S - b) * J;
215
- g(u), j < 1 ? $ = requestAnimationFrame(G) : p.current = S;
214
+ const j = Math.min(1, (U - I) / k), J = 1 - Math.pow(1 - j, 3), u = b + (w - b) * J;
215
+ f(u), j < 1 ? $ = requestAnimationFrame(G) : p.current = w;
216
216
  };
217
217
  return $ = requestAnimationFrame(G), () => $ && cancelAnimationFrame($);
218
- }, [s, l]);
218
+ }, [c, o]);
219
219
  const h = () => {
220
220
  r && typeof window < "u" && (window.location.href = r);
221
- }, k = l ? "--" : Number(f).toLocaleString("zh-CN", {
222
- minimumFractionDigits: i,
223
- maximumFractionDigits: i
224
- }), v = a != null ? Number(a) : null, I = v != null && v >= 0;
221
+ }, v = o ? "--" : Number(g).toLocaleString("zh-CN", {
222
+ minimumFractionDigits: l,
223
+ maximumFractionDigits: l
224
+ }), S = a != null ? Number(a) : null, A = S != null && S >= 0;
225
225
  return /* @__PURE__ */ m(
226
226
  "div",
227
227
  {
228
228
  onClick: h,
229
229
  style: {
230
230
  position: "relative",
231
- background: d.gradient,
231
+ background: s.gradient,
232
232
  borderRadius: C.lg,
233
- padding: P[5],
234
- color: d.fg,
233
+ padding: _[5],
234
+ color: s.fg,
235
235
  cursor: r ? "pointer" : "default",
236
236
  boxShadow: D.md,
237
237
  overflow: "hidden",
@@ -266,7 +266,7 @@ function st({
266
266
  /* @__PURE__ */ m("div", { style: {
267
267
  display: "flex",
268
268
  alignItems: "center",
269
- gap: P[2],
269
+ gap: _[2],
270
270
  position: "relative"
271
271
  }, children: [
272
272
  /* @__PURE__ */ t("div", { style: {
@@ -289,9 +289,9 @@ function st({
289
289
  /* @__PURE__ */ m("div", { style: {
290
290
  display: "flex",
291
291
  alignItems: "baseline",
292
- gap: P[2],
292
+ gap: _[2],
293
293
  position: "relative",
294
- marginTop: P[3]
294
+ marginTop: _[3]
295
295
  }, children: [
296
296
  /* @__PURE__ */ t("div", { style: {
297
297
  fontSize: 30,
@@ -299,21 +299,21 @@ function st({
299
299
  lineHeight: 1.1,
300
300
  letterSpacing: "-0.02em",
301
301
  fontVariantNumeric: "tabular-nums"
302
- }, children: k }),
303
- o && /* @__PURE__ */ t("div", { style: { fontSize: 14, opacity: 0.85, fontWeight: 500 }, children: o }),
304
- v != null && /* @__PURE__ */ m("div", { style: {
302
+ }, children: v }),
303
+ i && /* @__PURE__ */ t("div", { style: { fontSize: 14, opacity: 0.85, fontWeight: 500 }, children: i }),
304
+ S != null && /* @__PURE__ */ m("div", { style: {
305
305
  marginLeft: "auto",
306
306
  fontSize: 12,
307
307
  fontWeight: 600,
308
308
  padding: "2px 8px",
309
309
  borderRadius: 999,
310
- background: I ? "rgba(255, 255, 255, 0.22)" : "rgba(0, 0, 0, 0.18)",
310
+ background: A ? "rgba(255, 255, 255, 0.22)" : "rgba(0, 0, 0, 0.18)",
311
311
  display: "flex",
312
312
  alignItems: "center",
313
313
  gap: 2
314
314
  }, children: [
315
- /* @__PURE__ */ t("span", { style: { fontSize: 10 }, children: I ? "▲" : "▼" }),
316
- Math.abs(v).toFixed(1),
315
+ /* @__PURE__ */ t("span", { style: { fontSize: 10 }, children: A ? "▲" : "▼" }),
316
+ Math.abs(S).toFixed(1),
317
317
  "%"
318
318
  ] })
319
319
  ] })
@@ -321,8 +321,8 @@ function st({
321
321
  }
322
322
  );
323
323
  }
324
- function Le({ color: e = "blue", label: n, size: s = 8 }) {
325
- const o = E[e] || E.blue;
324
+ function $e({ color: e = "blue", label: n, size: c = 8 }) {
325
+ const i = E[e] || E.blue;
326
326
  return /* @__PURE__ */ m("span", { style: {
327
327
  display: "inline-flex",
328
328
  alignItems: "center",
@@ -332,22 +332,22 @@ function Le({ color: e = "blue", label: n, size: s = 8 }) {
332
332
  color: "#111827"
333
333
  }, children: [
334
334
  /* @__PURE__ */ t("span", { style: {
335
- width: s,
336
- height: s,
335
+ width: c,
336
+ height: c,
337
337
  borderRadius: "50%",
338
- background: o.bg,
339
- boxShadow: `0 0 0 3px ${o.soft}`,
338
+ background: i.bg,
339
+ boxShadow: `0 0 0 3px ${i.soft}`,
340
340
  flexShrink: 0
341
341
  } }),
342
342
  n && /* @__PURE__ */ t("span", { children: n })
343
343
  ] });
344
344
  }
345
- function ct({
345
+ function dt({
346
346
  color: e = "blue",
347
347
  title: n,
348
- subtitle: s,
349
- moreText: o = "全部",
350
- moreHref: c,
348
+ subtitle: c,
349
+ moreText: i = "全部",
350
+ moreHref: d,
351
351
  onMore: a
352
352
  }) {
353
353
  return /* @__PURE__ */ m("div", { style: {
@@ -357,17 +357,17 @@ function ct({
357
357
  marginBottom: 16
358
358
  }, children: [
359
359
  /* @__PURE__ */ m("div", { style: { display: "flex", alignItems: "baseline", gap: 12 }, children: [
360
- /* @__PURE__ */ t(Le, { color: e, label: n, size: 10 }),
361
- s && /* @__PURE__ */ t("span", { style: {
360
+ /* @__PURE__ */ t($e, { color: e, label: n, size: 10 }),
361
+ c && /* @__PURE__ */ t("span", { style: {
362
362
  fontSize: 13,
363
363
  color: "#6b7280",
364
364
  fontWeight: 400
365
- }, children: s })
365
+ }, children: c })
366
366
  ] }),
367
- (c || a) && /* @__PURE__ */ m(
367
+ (d || a) && /* @__PURE__ */ m(
368
368
  "a",
369
369
  {
370
- href: c,
370
+ href: d,
371
371
  onClick: (r) => {
372
372
  a && (r.preventDefault(), a());
373
373
  },
@@ -388,40 +388,40 @@ function ct({
388
388
  r.currentTarget.style.color = "#6b7280";
389
389
  },
390
390
  children: [
391
- o,
391
+ i,
392
392
  /* @__PURE__ */ t("span", { style: { fontSize: 12 }, children: "›" })
393
393
  ]
394
394
  }
395
395
  )
396
396
  ] });
397
397
  }
398
- function dt({
398
+ function ft({
399
399
  title: e,
400
400
  description: n,
401
- icon: s,
402
- cover: o,
403
- color: c = "violet",
401
+ icon: c,
402
+ cover: i,
403
+ color: d = "violet",
404
404
  tags: a = [],
405
405
  meta: r,
406
- href: l,
407
- extra: i
406
+ href: o,
407
+ extra: l
408
408
  }) {
409
- const d = E[c] || E.violet, [f, g] = B(!1);
409
+ const s = E[d] || E.violet, [g, f] = B(!1);
410
410
  return /* @__PURE__ */ m(
411
411
  "div",
412
412
  {
413
413
  onClick: () => {
414
- l && typeof window < "u" && (window.location.href = l);
414
+ o && typeof window < "u" && (window.location.href = o);
415
415
  },
416
- onMouseEnter: () => g(!0),
417
- onMouseLeave: () => g(!1),
416
+ onMouseEnter: () => f(!0),
417
+ onMouseLeave: () => f(!1),
418
418
  style: {
419
419
  background: "#ffffff",
420
420
  borderRadius: C.lg,
421
421
  overflow: "hidden",
422
- cursor: l ? "pointer" : "default",
423
- boxShadow: f ? D.lg : D.sm,
424
- transform: f ? "translateY(-2px)" : "translateY(0)",
422
+ cursor: o ? "pointer" : "default",
423
+ boxShadow: g ? D.lg : D.sm,
424
+ transform: g ? "translateY(-2px)" : "translateY(0)",
425
425
  transition: "transform 200ms ease, box-shadow 200ms ease",
426
426
  border: "1px solid #f1f5f9",
427
427
  display: "flex",
@@ -431,16 +431,16 @@ function dt({
431
431
  /* @__PURE__ */ m("div", { style: {
432
432
  position: "relative",
433
433
  aspectRatio: "16 / 9",
434
- background: o ? "#f1f5f9" : d.gradient,
434
+ background: i ? "#f1f5f9" : s.gradient,
435
435
  display: "flex",
436
436
  alignItems: "center",
437
437
  justifyContent: "center",
438
438
  overflow: "hidden"
439
439
  }, children: [
440
- o ? /* @__PURE__ */ t(
440
+ i ? /* @__PURE__ */ t(
441
441
  "img",
442
442
  {
443
- src: o,
443
+ src: i,
444
444
  alt: e,
445
445
  style: {
446
446
  width: "100%",
@@ -452,8 +452,8 @@ function dt({
452
452
  fontSize: 48,
453
453
  color: "rgba(255, 255, 255, 0.9)",
454
454
  display: "flex"
455
- }, children: s }),
456
- !o && /* @__PURE__ */ t("div", { style: {
455
+ }, children: c }),
456
+ !i && /* @__PURE__ */ t("div", { style: {
457
457
  position: "absolute",
458
458
  top: -24,
459
459
  right: -24,
@@ -462,25 +462,25 @@ function dt({
462
462
  borderRadius: "50%",
463
463
  background: "rgba(255, 255, 255, 0.15)"
464
464
  } }),
465
- i && /* @__PURE__ */ t("div", { style: {
465
+ l && /* @__PURE__ */ t("div", { style: {
466
466
  position: "absolute",
467
467
  top: 8,
468
468
  right: 8
469
- }, children: i })
469
+ }, children: l })
470
470
  ] }),
471
471
  /* @__PURE__ */ m("div", { style: {
472
- padding: P[4],
472
+ padding: _[4],
473
473
  display: "flex",
474
474
  flexDirection: "column",
475
- gap: P[2],
475
+ gap: _[2],
476
476
  flex: 1
477
477
  }, children: [
478
478
  a.length > 0 && /* @__PURE__ */ t("div", { style: {
479
479
  display: "flex",
480
480
  flexWrap: "wrap",
481
481
  gap: 6
482
- }, children: a.slice(0, 3).map((h, k) => {
483
- const v = E[h.color] || E.blue;
482
+ }, children: a.slice(0, 3).map((h, v) => {
483
+ const S = E[h.color] || E.blue;
484
484
  return /* @__PURE__ */ t(
485
485
  "span",
486
486
  {
@@ -489,12 +489,12 @@ function dt({
489
489
  fontWeight: 500,
490
490
  padding: "2px 8px",
491
491
  borderRadius: 999,
492
- background: v.soft,
493
- color: v.bg
492
+ background: S.soft,
493
+ color: S.bg
494
494
  },
495
495
  children: h.label
496
496
  },
497
- k
497
+ v
498
498
  );
499
499
  }) }),
500
500
  /* @__PURE__ */ t("div", { style: {
@@ -523,7 +523,7 @@ function dt({
523
523
  fontSize: 11,
524
524
  color: "#9ca3af",
525
525
  marginTop: "auto",
526
- paddingTop: P[2],
526
+ paddingTop: _[2],
527
527
  borderTop: "1px dashed #f1f5f9"
528
528
  }, children: r })
529
529
  ] })
@@ -531,12 +531,12 @@ function dt({
531
531
  }
532
532
  );
533
533
  }
534
- function ft({
534
+ function gt({
535
535
  tag: e,
536
536
  title: n,
537
- description: s,
538
- buttonText: o,
539
- buttonHref: c,
537
+ description: c,
538
+ buttonText: i,
539
+ buttonHref: d,
540
540
  onButtonClick: a
541
541
  }) {
542
542
  return /* @__PURE__ */ m("div", { style: {
@@ -591,17 +591,17 @@ function ft({
591
591
  lineHeight: 1.3,
592
592
  marginBottom: 8
593
593
  }, children: n }),
594
- s && /* @__PURE__ */ t("div", { style: {
594
+ c && /* @__PURE__ */ t("div", { style: {
595
595
  fontSize: 14,
596
596
  color: "rgba(255, 255, 255, 0.7)",
597
597
  lineHeight: 1.6,
598
598
  maxWidth: 540
599
- }, children: s })
599
+ }, children: c })
600
600
  ] }),
601
- o && (c || a) && /* @__PURE__ */ m(
601
+ i && (d || a) && /* @__PURE__ */ m(
602
602
  "a",
603
603
  {
604
- href: c || "#",
604
+ href: d || "#",
605
605
  onClick: (r) => {
606
606
  a && (r.preventDefault(), a());
607
607
  },
@@ -627,7 +627,7 @@ function ft({
627
627
  r.currentTarget.style.transform = "translateY(0)", r.currentTarget.style.boxShadow = "0 4px 12px rgba(16, 185, 129, 0.4)";
628
628
  },
629
629
  children: [
630
- o,
630
+ i,
631
631
  /* @__PURE__ */ t("span", { children: "→" })
632
632
  ]
633
633
  }
@@ -638,20 +638,20 @@ function ft({
638
638
  function ne({
639
639
  icon: e,
640
640
  title: n = "暂无数据",
641
- description: s,
642
- actionText: o,
643
- onAction: c,
641
+ description: c,
642
+ actionText: i,
643
+ onAction: d,
644
644
  size: a = "md",
645
645
  style: r
646
646
  }) {
647
- const l = { sm: 24, md: 40, lg: 64 }, i = { sm: 14, md: 16, lg: 20 };
647
+ const o = { sm: 24, md: 40, lg: 64 }, l = { sm: 14, md: 16, lg: 20 };
648
648
  return /* @__PURE__ */ m(
649
649
  "div",
650
650
  {
651
651
  role: "status",
652
652
  "aria-live": "polite",
653
653
  style: {
654
- padding: l[a] || l.md,
654
+ padding: o[a] || o.md,
655
655
  textAlign: "center",
656
656
  background: "#ffffff",
657
657
  borderRadius: C.md,
@@ -670,63 +670,63 @@ function ne({
670
670
  marginBottom: 16,
671
671
  fontSize: 28,
672
672
  color: "#9ca3af"
673
- }, children: e || /* @__PURE__ */ t(Ie, {}) }),
673
+ }, children: e || /* @__PURE__ */ t(ze, {}) }),
674
674
  /* @__PURE__ */ t("div", { style: {
675
- fontSize: i[a],
675
+ fontSize: l[a],
676
676
  fontWeight: 600,
677
677
  color: x.text,
678
- marginBottom: s ? 6 : 16
678
+ marginBottom: c ? 6 : 16
679
679
  }, children: n }),
680
- s && /* @__PURE__ */ t("div", { style: {
680
+ c && /* @__PURE__ */ t("div", { style: {
681
681
  fontSize: 13,
682
682
  color: x.textMuted,
683
683
  lineHeight: 1.6,
684
684
  maxWidth: 360,
685
685
  margin: "0 auto 16px"
686
- }, children: s }),
687
- o && c && /* @__PURE__ */ t(
686
+ }, children: c }),
687
+ i && d && /* @__PURE__ */ t(
688
688
  V,
689
689
  {
690
690
  type: "primary",
691
- onClick: c,
691
+ onClick: d,
692
692
  style: {
693
693
  background: "linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%)",
694
694
  border: "none",
695
695
  minHeight: 36
696
696
  },
697
- children: o
697
+ children: i
698
698
  }
699
699
  )
700
700
  ]
701
701
  }
702
702
  );
703
703
  }
704
- function $e({
704
+ function We({
705
705
  error: e,
706
706
  title: n = "加载失败",
707
- description: s,
708
- onRetry: o,
709
- retryText: c = "重新加载",
707
+ description: c,
708
+ onRetry: i,
709
+ retryText: d = "重新加载",
710
710
  variant: a = "inline",
711
711
  style: r
712
712
  }) {
713
713
  var p;
714
- const l = a === "full", i = (p = e == null ? void 0 : e.response) == null ? void 0 : p.data, d = i && typeof i == "object" && (typeof i.message == "string" && i.message || typeof i.msg == "string" && i.msg) || null, f = d || (typeof e == "string" ? e : (e == null ? void 0 : e.message) || (e == null ? void 0 : e.msg) || (e ? String(e) : null)), g = s || (d ? `原因: ${d}` : f ? `原因: ${f}。请检查网络或稍后重试。` : "请检查网络或稍后重试。");
714
+ const o = a === "full", l = (p = e == null ? void 0 : e.response) == null ? void 0 : p.data, s = l && typeof l == "object" && (typeof l.message == "string" && l.message || typeof l.msg == "string" && l.msg) || null, g = s || (typeof e == "string" ? e : (e == null ? void 0 : e.message) || (e == null ? void 0 : e.msg) || (e ? String(e) : null)), f = c || (s ? `原因: ${s}` : g ? `原因: ${g}。请检查网络或稍后重试。` : "请检查网络或稍后重试。");
715
715
  return /* @__PURE__ */ m(
716
716
  "div",
717
717
  {
718
718
  role: "alert",
719
719
  "aria-live": "assertive",
720
720
  style: {
721
- padding: l ? "48px 24px" : "20px 24px",
722
- background: l ? "#ffffff" : "#fef2f2",
723
- border: l ? `1px dashed ${x.border}` : "1px solid #fecaca",
721
+ padding: o ? "48px 24px" : "20px 24px",
722
+ background: o ? "#ffffff" : "#fef2f2",
723
+ border: o ? `1px dashed ${x.border}` : "1px solid #fecaca",
724
724
  borderRadius: C.md,
725
- textAlign: l ? "center" : "left",
725
+ textAlign: o ? "center" : "left",
726
726
  display: "flex",
727
- flexDirection: l ? "column" : "row",
728
- alignItems: l ? "center" : "flex-start",
729
- gap: l ? 12 : 16,
727
+ flexDirection: o ? "column" : "row",
728
+ alignItems: o ? "center" : "flex-start",
729
+ gap: o ? 12 : 16,
730
730
  ...r
731
731
  },
732
732
  children: [
@@ -734,17 +734,17 @@ function $e({
734
734
  display: "inline-flex",
735
735
  alignItems: "center",
736
736
  justifyContent: "center",
737
- width: l ? 56 : 36,
738
- height: l ? 56 : 36,
737
+ width: o ? 56 : 36,
738
+ height: o ? 56 : 36,
739
739
  borderRadius: "50%",
740
- background: l ? "#fef2f2" : "#ffffff",
740
+ background: o ? "#fef2f2" : "#ffffff",
741
741
  color: "#dc2626",
742
- fontSize: l ? 28 : 18,
742
+ fontSize: o ? 28 : 18,
743
743
  flexShrink: 0
744
- }, children: /* @__PURE__ */ t(Ae, {}) }),
744
+ }, children: /* @__PURE__ */ t(Be, {}) }),
745
745
  /* @__PURE__ */ m("div", { style: { flex: 1, minWidth: 0 }, children: [
746
746
  /* @__PURE__ */ t("div", { style: {
747
- fontSize: l ? 16 : 14,
747
+ fontSize: o ? 16 : 14,
748
748
  fontWeight: 600,
749
749
  color: "#991b1b",
750
750
  marginBottom: 4
@@ -754,17 +754,17 @@ function $e({
754
754
  color: "#7f1d1d",
755
755
  lineHeight: 1.6,
756
756
  wordBreak: "break-word"
757
- }, children: g }),
758
- o && /* @__PURE__ */ t(
757
+ }, children: f }),
758
+ i && /* @__PURE__ */ t(
759
759
  V,
760
760
  {
761
761
  type: "primary",
762
762
  danger: !0,
763
763
  icon: /* @__PURE__ */ t(re, {}),
764
- onClick: o,
765
- size: l ? "middle" : "small",
764
+ onClick: i,
765
+ size: o ? "middle" : "small",
766
766
  style: { marginTop: 12 },
767
- children: c
767
+ children: d
768
768
  }
769
769
  )
770
770
  ] })
@@ -772,11 +772,11 @@ function $e({
772
772
  }
773
773
  );
774
774
  }
775
- function gt({
775
+ function ut({
776
776
  variant: e = "cards",
777
777
  rows: n = 4,
778
- active: s = !0,
779
- style: o
778
+ active: c = !0,
779
+ style: i
780
780
  }) {
781
781
  return e === "cards" ? /* @__PURE__ */ t(
782
782
  "div",
@@ -788,9 +788,9 @@ function gt({
788
788
  display: "grid",
789
789
  gridTemplateColumns: "repeat(auto-fill, minmax(220px, 1fr))",
790
790
  gap: 16,
791
- ...o
791
+ ...i
792
792
  },
793
- children: Array.from({ length: n }).map((c, a) => /* @__PURE__ */ m(
793
+ children: Array.from({ length: n }).map((d, a) => /* @__PURE__ */ m(
794
794
  "div",
795
795
  {
796
796
  style: {
@@ -801,13 +801,13 @@ function gt({
801
801
  },
802
802
  children: [
803
803
  /* @__PURE__ */ t(
804
- _.Image,
804
+ N.Image,
805
805
  {
806
- active: s,
806
+ active: c,
807
807
  style: { width: "100%", height: 140, borderRadius: 0 }
808
808
  }
809
809
  ),
810
- /* @__PURE__ */ t("div", { style: { padding: 16 }, children: /* @__PURE__ */ t(_, { active: s, paragraph: { rows: 2 }, title: { width: "60%" } }) })
810
+ /* @__PURE__ */ t("div", { style: { padding: 16 }, children: /* @__PURE__ */ t(N, { active: c, paragraph: { rows: 2 }, title: { width: "60%" } }) })
811
811
  ]
812
812
  },
813
813
  a
@@ -823,11 +823,11 @@ function gt({
823
823
  background: "#ffffff",
824
824
  padding: 24,
825
825
  borderRadius: C.md,
826
- ...o
826
+ ...i
827
827
  },
828
- children: /* @__PURE__ */ t(_, { active: s, paragraph: { rows: n } })
828
+ children: /* @__PURE__ */ t(N, { active: c, paragraph: { rows: n } })
829
829
  }
830
- ) : e === "list" ? /* @__PURE__ */ t("div", { role: "status", "aria-busy": "true", "aria-label": "加载中", style: o, children: Array.from({ length: n }).map((c, a) => /* @__PURE__ */ m(
830
+ ) : e === "list" ? /* @__PURE__ */ t("div", { role: "status", "aria-busy": "true", "aria-label": "加载中", style: i, children: Array.from({ length: n }).map((d, a) => /* @__PURE__ */ m(
831
831
  "div",
832
832
  {
833
833
  style: {
@@ -838,8 +838,8 @@ function gt({
838
838
  borderBottom: a < n - 1 ? "1px solid #f1f5f9" : "none"
839
839
  },
840
840
  children: [
841
- /* @__PURE__ */ t(_.Avatar, { active: s, size: "default" }),
842
- /* @__PURE__ */ t(_, { active: s, paragraph: { rows: 1 }, title: { width: 120 }, style: { flex: 1 } })
841
+ /* @__PURE__ */ t(N.Avatar, { active: c, size: "default" }),
842
+ /* @__PURE__ */ t(N, { active: c, paragraph: { rows: 1 }, title: { width: 120 }, style: { flex: 1 } })
843
843
  ]
844
844
  },
845
845
  a
@@ -853,154 +853,154 @@ function gt({
853
853
  background: "#ffffff",
854
854
  padding: 32,
855
855
  borderRadius: C.md,
856
- ...o
856
+ ...i
857
857
  },
858
- children: /* @__PURE__ */ t(_, { active: s, title: { width: "40%" }, paragraph: { rows: n } })
858
+ children: /* @__PURE__ */ t(N, { active: c, title: { width: "40%" }, paragraph: { rows: n } })
859
859
  }
860
860
  );
861
861
  }
862
- function We({
862
+ function Me({
863
863
  value: e,
864
864
  onChange: n,
865
- onSearch: s,
866
- placeholder: o = "搜索...",
867
- debounceMs: c = 300,
865
+ onSearch: c,
866
+ placeholder: i = "搜索...",
867
+ debounceMs: d = 300,
868
868
  width: a = 280,
869
869
  allowClear: r = !0,
870
870
  // antd v6: enterButton 已被废弃,SearchInput 已通过 onKeyDown 自行处理 Enter 键,
871
871
  // 所以从 rest 里过滤掉,避免透传到原生 <input> 报 React 警告。
872
- enterButton: l,
873
- ...i
872
+ enterButton: o,
873
+ ...l
874
874
  }) {
875
- const [d, f] = B(e || ""), g = N(null), p = N(e || "");
875
+ const [s, g] = B(e || ""), f = P(null), p = P(e || "");
876
876
  L(() => {
877
- e !== void 0 && e !== d && (f(e || ""), p.current = e || "");
877
+ e !== void 0 && e !== s && (g(e || ""), p.current = e || "");
878
878
  }, [e]), L(() => () => {
879
- g.current && clearTimeout(g.current);
879
+ f.current && clearTimeout(f.current);
880
880
  }, []);
881
- const h = (S) => {
882
- p.current = S, n && n(S);
883
- }, k = (S) => {
884
- const w = S.target.value;
885
- if (f(w), g.current && clearTimeout(g.current), w === "") {
881
+ const h = (w) => {
882
+ p.current = w, n && n(w);
883
+ }, v = (w) => {
884
+ const k = w.target.value;
885
+ if (g(k), f.current && clearTimeout(f.current), k === "") {
886
886
  h("");
887
887
  return;
888
888
  }
889
- g.current = setTimeout(() => h(w), c);
890
- }, v = (S) => {
891
- g.current && clearTimeout(g.current), h(S), s && s(S);
889
+ f.current = setTimeout(() => h(k), d);
890
+ }, S = (w) => {
891
+ f.current && clearTimeout(f.current), h(w), c && c(w);
892
892
  };
893
893
  return /* @__PURE__ */ t(
894
- Te,
894
+ Ae,
895
895
  {
896
- ...i,
897
- value: d,
898
- onChange: k,
899
- onPressEnter: v,
900
- onKeyDown: (S) => {
901
- S.key === "Enter" ? (S.preventDefault(), v(d)) : S.key === "Escape" && (f(""), v(""));
896
+ ...l,
897
+ value: s,
898
+ onChange: v,
899
+ onPressEnter: S,
900
+ onKeyDown: (w) => {
901
+ w.key === "Enter" ? (w.preventDefault(), S(s)) : w.key === "Escape" && (g(""), S(""));
902
902
  },
903
- placeholder: o,
903
+ placeholder: i,
904
904
  allowClear: r ? { clearIcon: /* @__PURE__ */ t("span", { onClick: () => {
905
- f(""), v("");
905
+ g(""), S("");
906
906
  }, children: "×" }) } : !1,
907
- prefix: /* @__PURE__ */ t(ze, { style: { color: "#9ca3af" } }),
907
+ prefix: /* @__PURE__ */ t(De, { style: { color: "#9ca3af" } }),
908
908
  style: {
909
909
  width: a,
910
910
  borderRadius: C.md,
911
- ...i.style || {}
911
+ ...l.style || {}
912
912
  }
913
913
  }
914
914
  );
915
915
  }
916
- function Me(e, n, s) {
917
- const o = Array.isArray(e) ? e : [], c = String(s ?? "").trim().toLowerCase();
918
- if (!c) return o;
916
+ function He(e, n, c) {
917
+ const i = Array.isArray(e) ? e : [], d = String(c ?? "").trim().toLowerCase();
918
+ if (!d) return i;
919
919
  const a = (Array.isArray(n) ? n : String(n || "").split(",")).map((r) => String(r || "").trim()).filter(Boolean);
920
- return a.length ? o.filter((r) => !r || typeof r != "object" ? !1 : a.some((l) => {
921
- const i = r[l];
922
- return i == null ? !1 : String(i).toLowerCase().includes(c);
923
- })) : o;
920
+ return a.length ? i.filter((r) => !r || typeof r != "object" ? !1 : a.some((o) => {
921
+ const l = r[o];
922
+ return l == null ? !1 : String(l).toLowerCase().includes(d);
923
+ })) : i;
924
924
  }
925
- function He(e, n) {
926
- const [s, o] = B(""), c = (Array.isArray(n) ? n.join(",") : String(n || "")).trim(), a = q(
927
- () => Me(e, c, s),
928
- [e, c, s]
929
- ), r = be(() => o(""), []);
930
- return { keyword: s, setKeyword: o, filtered: a, reset: r };
925
+ function Pe(e, n) {
926
+ const [c, i] = B(""), d = (Array.isArray(n) ? n.join(",") : String(n || "")).trim(), a = q(
927
+ () => He(e, d, c),
928
+ [e, d, c]
929
+ ), r = me(() => i(""), []);
930
+ return { keyword: c, setKeyword: i, filtered: a, reset: r };
931
931
  }
932
- const Ne = {
932
+ const _e = {
933
933
  pageSize: 10,
934
934
  showSizeChanger: !0,
935
935
  pageSizeOptions: ["10", "20", "50", "100"],
936
936
  showTotal: (e) => `共 ${e} 条`
937
937
  };
938
- function ut({
938
+ function pt({
939
939
  rows: e,
940
940
  columns: n,
941
- rowKey: s,
942
- loading: o,
943
- searchKeys: c,
941
+ rowKey: c,
942
+ loading: i,
943
+ searchKeys: d,
944
944
  searchPlaceholder: a = "过滤",
945
945
  searchWidth: r = 220,
946
- cardTitle: l,
947
- cardExtra: i,
948
- emptyTitle: d = "暂无数据",
949
- emptyDescription: f,
950
- emptyActionText: g,
946
+ cardTitle: o,
947
+ cardExtra: l,
948
+ emptyTitle: s = "暂无数据",
949
+ emptyDescription: g,
950
+ emptyActionText: f,
951
951
  emptyOnAction: p,
952
- pagination: h = Ne,
953
- cardProps: k = {},
954
- tableProps: v = {},
955
- ...I
952
+ pagination: h = _e,
953
+ cardProps: v = {},
954
+ tableProps: S = {},
955
+ ...A
956
956
  }) {
957
- const { keyword: b, setKeyword: S, filtered: w } = He(e, c), A = c ? /* @__PURE__ */ t(
958
- We,
957
+ const { keyword: b, setKeyword: w, filtered: k } = Pe(e, d), I = d ? /* @__PURE__ */ t(
958
+ Me,
959
959
  {
960
960
  allowClear: !0,
961
961
  width: r,
962
962
  placeholder: a,
963
963
  value: b,
964
- onChange: S
964
+ onChange: w
965
965
  }
966
966
  ) : null;
967
- return /* @__PURE__ */ t(me, { title: l, extra: A && i ? /* @__PURE__ */ m("span", { style: { display: "inline-flex", alignItems: "center", gap: 8 }, children: [
968
- A,
969
- i
970
- ] }) : A || i, ...k, children: /* @__PURE__ */ t(
971
- ye,
967
+ return /* @__PURE__ */ t(ye, { title: o, extra: I && l ? /* @__PURE__ */ m("span", { style: { display: "inline-flex", alignItems: "center", gap: 8 }, children: [
968
+ I,
969
+ l
970
+ ] }) : I || l, ...v, children: /* @__PURE__ */ t(
971
+ xe,
972
972
  {
973
- rowKey: s,
973
+ rowKey: c,
974
974
  columns: n,
975
- dataSource: w,
976
- loading: o,
975
+ dataSource: k,
976
+ loading: i,
977
977
  size: "small",
978
978
  pagination: h,
979
979
  locale: {
980
980
  emptyText: /* @__PURE__ */ t(
981
981
  ne,
982
982
  {
983
- title: d,
984
- description: f,
985
- actionText: g,
983
+ title: s,
984
+ description: g,
985
+ actionText: f,
986
986
  onAction: p
987
987
  }
988
988
  )
989
989
  },
990
- ...v,
991
- ...I
990
+ ...S,
991
+ ...A
992
992
  }
993
993
  ) });
994
994
  }
995
- function ve({
995
+ function we({
996
996
  title: e,
997
997
  subtitle: n,
998
- breadcrumb: s,
999
- extra: o,
1000
- back: c,
998
+ breadcrumb: c,
999
+ extra: i,
1000
+ back: d,
1001
1001
  onBack: a
1002
1002
  }) {
1003
- const r = xe();
1003
+ const o = ve() ? Se() : null;
1004
1004
  return /* @__PURE__ */ t("div", { style: {
1005
1005
  marginBottom: 12,
1006
1006
  paddingBottom: 10,
@@ -1019,11 +1019,11 @@ function ve({
1019
1019
  minWidth: 0,
1020
1020
  flexWrap: "wrap"
1021
1021
  }, children: [
1022
- c && /* @__PURE__ */ t(
1022
+ d && /* @__PURE__ */ t(
1023
1023
  "button",
1024
1024
  {
1025
1025
  onClick: () => {
1026
- a ? a() : r(-1);
1026
+ a ? a() : o && o(-1);
1027
1027
  },
1028
1028
  "aria-label": "返回上一页",
1029
1029
  style: {
@@ -1041,28 +1041,30 @@ function ve({
1041
1041
  transition: "all 150ms ease",
1042
1042
  flexShrink: 0
1043
1043
  },
1044
- onMouseEnter: (i) => {
1045
- i.currentTarget.style.background = "#f8fafc", i.currentTarget.style.color = "#111827", i.currentTarget.style.borderColor = "#7c3aed";
1044
+ onMouseEnter: (s) => {
1045
+ s.currentTarget.style.background = "#f8fafc", s.currentTarget.style.color = "#111827", s.currentTarget.style.borderColor = "#7c3aed";
1046
1046
  },
1047
- onMouseLeave: (i) => {
1048
- i.currentTarget.style.background = "#ffffff", i.currentTarget.style.color = "#6b7280", i.currentTarget.style.borderColor = "#e5e7eb";
1047
+ onMouseLeave: (s) => {
1048
+ s.currentTarget.style.background = "#ffffff", s.currentTarget.style.color = "#6b7280", s.currentTarget.style.borderColor = "#e5e7eb";
1049
1049
  },
1050
1050
  children: "←"
1051
1051
  }
1052
1052
  ),
1053
- s && s.length > 0 ? /* @__PURE__ */ t(
1054
- Ee,
1053
+ c && c.length > 0 ? /* @__PURE__ */ t(
1054
+ Ie,
1055
1055
  {
1056
- items: s.map((i, d) => {
1057
- const f = d === s.length - 1;
1058
- return {
1059
- title: i.href && !f ? /* @__PURE__ */ t("a", { onClick: (g) => {
1060
- g.preventDefault(), r(i.href);
1061
- }, children: i.label }) : /* @__PURE__ */ t("span", { style: f ? {
1062
- fontWeight: 600,
1063
- color: "#111827"
1064
- } : void 0, children: i.label })
1065
- };
1056
+ items: c.map((s, g) => {
1057
+ const f = g === c.length - 1;
1058
+ return { title: !f && (s.href || s.onClick) ? /* @__PURE__ */ t("a", { onClick: (v) => {
1059
+ if (v.preventDefault(), s.onClick) {
1060
+ s.onClick(v);
1061
+ return;
1062
+ }
1063
+ o && o(s.href);
1064
+ }, children: s.label }) : /* @__PURE__ */ t("span", { style: f ? {
1065
+ fontWeight: 600,
1066
+ color: "#111827"
1067
+ } : void 0, children: s.label }) };
1066
1068
  })
1067
1069
  }
1068
1070
  ) : e && /* @__PURE__ */ t("span", { role: "heading", "aria-level": 1, style: {
@@ -1081,14 +1083,14 @@ function ve({
1081
1083
  maxWidth: 360
1082
1084
  }, children: n })
1083
1085
  ] }),
1084
- o && /* @__PURE__ */ t("div", { style: {
1086
+ i && /* @__PURE__ */ t("div", { style: {
1085
1087
  display: "flex",
1086
1088
  gap: 8,
1087
1089
  flexShrink: 0
1088
- }, children: o })
1090
+ }, children: i })
1089
1091
  ] }) });
1090
1092
  }
1091
- function pt({ left: e, right: n, extra: s }) {
1093
+ function ht({ left: e, right: n, extra: c }) {
1092
1094
  return /* @__PURE__ */ m(
1093
1095
  "div",
1094
1096
  {
@@ -1104,106 +1106,121 @@ function pt({ left: e, right: n, extra: s }) {
1104
1106
  /* @__PURE__ */ t(se, { size: 8, wrap: !0, children: e }),
1105
1107
  /* @__PURE__ */ m(se, { size: 8, wrap: !0, children: [
1106
1108
  n,
1107
- s
1109
+ c
1108
1110
  ] })
1109
1111
  ]
1110
1112
  }
1111
1113
  );
1112
1114
  }
1113
- function ht({ onClick: e, loading: n, title: s = "刷新" }) {
1114
- return /* @__PURE__ */ t(V, { icon: /* @__PURE__ */ t(re, {}), onClick: e, loading: n, title: s, children: s });
1115
+ function bt({ onClick: e, loading: n, title: c = "刷新" }) {
1116
+ return /* @__PURE__ */ t(V, { icon: /* @__PURE__ */ t(re, {}), onClick: e, loading: n, title: c, children: c });
1115
1117
  }
1116
- const Pe = {
1118
+ const Ne = {
1117
1119
  0: { label: "待办", color: "default" },
1118
1120
  1: { label: "进行中", color: "blue" },
1119
1121
  2: { label: "已完成", color: "green" }
1120
- }, _e = {
1122
+ }, Oe = {
1121
1123
  ACTIVE: { label: "正常", color: "green" },
1122
1124
  INACTIVE: { label: "禁用", color: "red" },
1123
1125
  ENABLED: { label: "启用", color: "green" },
1124
1126
  DISABLED: { label: "禁用", color: "red" }
1125
- }, Oe = {
1127
+ }, Fe = {
1126
1128
  low: { label: "低", color: "default" },
1127
1129
  medium: { label: "中", color: "orange" },
1128
1130
  high: { label: "高", color: "red" },
1129
1131
  1: { label: "低", color: "default" },
1130
1132
  2: { label: "中", color: "orange" },
1131
1133
  3: { label: "高", color: "red" }
1132
- }, Fe = {
1134
+ }, je = {
1133
1135
  PENDING: { label: "待审批", color: "orange" },
1134
1136
  APPROVED: { label: "已通过", color: "green" },
1135
1137
  REJECTED: { label: "已拒绝", color: "red" },
1136
1138
  CANCELLED: { label: "已撤回", color: "default" }
1137
- }, je = {
1139
+ }, qe = {
1138
1140
  RUNNING: { label: "运行中", color: "green" },
1139
1141
  PAUSED: { label: "已暂停", color: "orange" },
1140
1142
  STOPPED: { label: "已停止", color: "default" },
1141
1143
  FAILED: { label: "失败", color: "red" },
1142
1144
  SUCCESS: { label: "成功", color: "green" }
1143
- }, qe = {
1144
- task: Pe,
1145
- model: _e,
1146
- priority: Oe,
1147
- approval: Fe,
1148
- schedule: je
1145
+ }, Ge = {
1146
+ task: Ne,
1147
+ model: Oe,
1148
+ priority: Fe,
1149
+ approval: je,
1150
+ schedule: qe
1149
1151
  };
1150
- function bt({ status: e, type: n = "task", mapping: s, ...o }) {
1151
- const a = (s || qe[n] || {})[e];
1152
- return a ? /* @__PURE__ */ t(ce, { color: a.color, ...o, children: a.label }) : /* @__PURE__ */ t(ce, { ...o, children: String(e) });
1152
+ function mt({ status: e, type: n = "task", mapping: c, ...i }) {
1153
+ const a = (c || Ge[n] || {})[e];
1154
+ return a ? /* @__PURE__ */ t(ce, { color: a.color, ...i, children: a.label }) : /* @__PURE__ */ t(ce, { ...i, children: String(e) });
1153
1155
  }
1154
- function mt({ title: e, description: n, load: s, columns: o, rowKey: c = "id", extra: a, expandable: r }) {
1155
- const [l, i] = B([]), [d, f] = B({ current: 1, size: 10, total: null }), [g, p] = B(!1), [h, k] = B(null), v = be(async (b = d.current, S = d.size) => {
1156
- p(!0), k(null);
1156
+ const fe = {
1157
+ // total 有效 ⇒ 标准口径
1158
+ known: (e) => `共 ${e} 条`,
1159
+ // total 缺失/为 0 —— 后端 z-meta 的分页 count 有缺陷(records 有值但 total 返回 "0"),
1160
+ // 这时不能显示「共 0 条」(页面上会出现"有数据却说没有数据"的假象)
1161
+ unknown: (e) => `本页 ${e} 条(接口 total 未返回有效值)`
1162
+ };
1163
+ function yt({ title: e, description: n, load: c, columns: i, rowKey: d = "id", extra: a, expandable: r }) {
1164
+ const [o, l] = B([]), [s, g] = B({ current: 1, size: 10, total: null }), [f, p] = B(!1), [h, v] = B(null), S = me(async (b = s.current, w = s.size) => {
1165
+ p(!0), v(null);
1157
1166
  try {
1158
- const w = await s(b, S);
1159
- if (Array.isArray(w))
1160
- i(w || []), f({ current: b, size: S, total: w.length });
1167
+ const k = await c(b, w);
1168
+ if (Array.isArray(k))
1169
+ l(k || []), g({ current: b, size: w, total: k.length });
1161
1170
  else {
1162
- const A = (w == null ? void 0 : w.records) || [];
1163
- i(A), f({ current: b, size: S, total: (w == null ? void 0 : w.total) == null ? null : Number(w.total) });
1171
+ const I = (k == null ? void 0 : k.records) || [];
1172
+ l(I), g({ current: b, size: w, total: (k == null ? void 0 : k.total) == null ? null : Number(k.total) });
1164
1173
  }
1165
- } catch (w) {
1166
- i([]), k(w);
1174
+ } catch (k) {
1175
+ l([]), v(k);
1167
1176
  } finally {
1168
1177
  p(!1);
1169
1178
  }
1170
- }, [s, d.current, d.size]);
1179
+ }, [c, s.current, s.size]);
1171
1180
  L(() => {
1172
- v(1);
1181
+ S(1);
1173
1182
  }, []);
1174
- const I = d.total != null && d.total > 0;
1183
+ const A = s.total != null && s.total > 0;
1175
1184
  return /* @__PURE__ */ m("div", { children: [
1176
- /* @__PURE__ */ t(ve, { title: e, subtitle: n }),
1185
+ /* @__PURE__ */ t(we, { title: e, subtitle: n }),
1177
1186
  /* @__PURE__ */ m(
1178
- me,
1187
+ ye,
1179
1188
  {
1180
1189
  extra: /* @__PURE__ */ t(
1181
1190
  V,
1182
1191
  {
1183
1192
  icon: /* @__PURE__ */ t(re, {}),
1184
- loading: g,
1185
- onClick: () => v(d.current, d.size),
1193
+ loading: f,
1194
+ onClick: () => S(s.current, s.size),
1186
1195
  children: "刷新"
1187
1196
  }
1188
1197
  ),
1189
1198
  children: [
1190
1199
  a,
1191
- h ? /* @__PURE__ */ t($e, { error: h, onRetry: () => v(d.current, d.size), type: "inline" }) : /* @__PURE__ */ t(
1192
- ye,
1200
+ h ? /* @__PURE__ */ t(We, { error: h, onRetry: () => S(s.current, s.size), type: "inline" }) : /* @__PURE__ */ t(
1201
+ xe,
1193
1202
  {
1194
1203
  size: "small",
1195
- columns: o,
1196
- dataSource: l,
1197
- loading: g,
1198
- rowKey: (b) => (b == null ? void 0 : b[c]) ?? (b == null ? void 0 : b.key) ?? JSON.stringify(b).slice(0, 32),
1204
+ columns: i,
1205
+ dataSource: o,
1206
+ loading: f,
1207
+ rowKey: (b) => (b == null ? void 0 : b[d]) ?? (b == null ? void 0 : b.key) ?? JSON.stringify(b).slice(0, 32),
1199
1208
  pagination: {
1200
- current: d.current,
1201
- pageSize: d.size,
1202
- total: I ? d.total : l.length,
1209
+ current: s.current,
1210
+ pageSize: s.size,
1211
+ total: A ? s.total : o.length,
1203
1212
  showSizeChanger: !0,
1204
- showTotal: () => I ? `共 ${d.total} 条` : `本页 ${l.length} 条(接口 total 未返回有效值)`
1213
+ // §2 强制规则 2:分页必须凑齐 pageSize + showSizeChanger
1214
+ // + pageSizeOptions + showTotal 四件套。只给 showSizeChanger
1215
+ // 而不给 pageSizeOptions,antd 会用默认的 ['10','20','50','100']
1216
+ // 之外的行为渲染(实际 antd 默认也是这组,但那是**默认值**不是
1217
+ // **声明值**)—— 规范要的是声明,不是碰巧对。
1218
+ // 少这一项时,全库尺子(lead 008 §2 元素级普查)会把本页判成
1219
+ // 「分页参数不全」⇒ 8 个仓的 PagedTable 拷贝全部误红。
1220
+ pageSizeOptions: ["10", "20", "50", "100"],
1221
+ showTotal: () => A ? fe.known(s.total) : fe.unknown(o.length)
1205
1222
  },
1206
- onChange: (b) => v(b.current, b.pageSize),
1223
+ onChange: (b) => S(b.current, b.pageSize),
1207
1224
  expandable: r,
1208
1225
  locale: { emptyText: /* @__PURE__ */ t(ne, { title: "暂无数据", description: "接口返回空列表" }) }
1209
1226
  }
@@ -1213,210 +1230,210 @@ function mt({ title: e, description: n, load: s, columns: o, rowKey: c = "id", e
1213
1230
  )
1214
1231
  ] });
1215
1232
  }
1216
- const Ge = 240, fe = 96, Ue = { behavior: "smooth", block: "start" }, Ye = `
1233
+ const Ue = 240, ge = 96, Ye = { behavior: "smooth", block: "start" }, Ke = `
1217
1234
  .zfc-doc-table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
1218
1235
  @media (max-width: 800px) { .zfc-doc-table-wrap > table { min-width: 520px; } }
1219
- `, Ke = (e) => String(e || "").trim().toLowerCase().replace(/\s+/g, "-").replace(/[^\p{L}\p{N}\p{M}\p{Pc}-]/gu, "").replace(/-+/g, "-").replace(/^-|-$/g, ""), ie = (e) => String(e || "").replace(/!\[([^\]]*)\]\([^)]*\)/g, "$1").replace(/\[([^\]]*)\]\([^)]*\)/g, "$1").replace(/`([^`]*)`/g, "$1").replace(/\*\*([^*]+)\*\*/g, "$1").replace(/__([^_]+)__/g, "$1").replace(/\*([^*]+)\*/g, "$1").trim(), Se = () => {
1236
+ `, Ve = (e) => String(e || "").trim().toLowerCase().replace(/\s+/g, "-").replace(/[^\p{L}\p{N}\p{M}\p{Pc}-]/gu, "").replace(/-+/g, "-").replace(/^-|-$/g, ""), ie = (e) => String(e || "").replace(/!\[([^\]]*)\]\([^)]*\)/g, "$1").replace(/\[([^\]]*)\]\([^)]*\)/g, "$1").replace(/`([^`]*)`/g, "$1").replace(/\*\*([^*]+)\*\*/g, "$1").replace(/__([^_]+)__/g, "$1").replace(/\*([^*]+)\*/g, "$1").trim(), ke = () => {
1220
1237
  const e = /* @__PURE__ */ new Map();
1221
1238
  let n = 0;
1222
- return (s) => {
1239
+ return (c) => {
1223
1240
  n += 1;
1224
- const o = Ke(s) || `section-${n}`, c = e.get(o) || 0;
1225
- return e.set(o, c + 1), c > 0 ? `${o}-${c}` : o;
1241
+ const i = Ve(c) || `section-${n}`, d = e.get(i) || 0;
1242
+ return e.set(i, d + 1), d > 0 ? `${i}-${d}` : i;
1226
1243
  };
1227
- }, Ve = (e) => {
1228
- const n = [], s = Se();
1229
- let o = !1;
1230
- for (const c of String(e || "").split(`
1244
+ }, Je = (e) => {
1245
+ const n = [], c = ke();
1246
+ let i = !1;
1247
+ for (const d of String(e || "").split(`
1231
1248
  `)) {
1232
- const a = c.replace(/\s+$/, "");
1249
+ const a = d.replace(/\s+$/, "");
1233
1250
  if (/^\s*(```|~~~)/.test(a)) {
1234
- o = !o;
1251
+ i = !i;
1235
1252
  continue;
1236
1253
  }
1237
- if (o) continue;
1254
+ if (i) continue;
1238
1255
  const r = /^(#{1,6})[ \t]+(.+?)[ \t]*#*[ \t]*$/.exec(a);
1239
1256
  if (!r) continue;
1240
- const l = r[1].length;
1241
- if (l > 3) continue;
1242
- const i = ie(r[2]);
1243
- i && n.push({ level: l, text: i, id: s(i) });
1257
+ const o = r[1].length;
1258
+ if (o > 3) continue;
1259
+ const l = ie(r[2]);
1260
+ l && n.push({ level: o, text: l, id: c(l) });
1244
1261
  }
1245
1262
  return n;
1246
- }, X = (e) => e == null || typeof e == "boolean" ? "" : typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map(X).join("") : e.props ? X(e.props.children) : "", ge = (e) => String(e).replace(/["\\]/g, "\\$&"), ue = (e, n = Ue) => !e || typeof e.scrollIntoView != "function" ? !1 : (e.scrollIntoView(n), !0), Z = /^\s*(`{3,}|~{3,})\s*([\w+#-]*)\s*$/, ee = /^(#{1,6})\s+(.*?)\s*#*$/, te = /^\s*([-*_])\s*(\1\s*){2,}$/, F = /^(\s*)([-*+]|\d+[.)])(\s+)(.*)$/, Y = /^\s*>\s?(.*)$/, Je = /(!?\[([^\]]*)\]\(([^)\s]+)(?:\s+"[^"]*")?\)|`([^`]+)`|\*\*([^*]+)\*\*|__([^_]+)__|~~([^~]+)~~|\*([^*\n]+)\*|<((?:https?:\/\/|mailto:)[^>\s]+)>)/g, K = (e) => {
1263
+ }, Q = (e) => e == null || typeof e == "boolean" ? "" : typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map(Q).join("") : e.props ? Q(e.props.children) : "", ue = (e) => String(e).replace(/["\\]/g, "\\$&"), pe = (e, n = Ye) => !e || typeof e.scrollIntoView != "function" ? !1 : (e.scrollIntoView(n), !0), Z = /^\s*(`{3,}|~{3,})\s*([\w+#-]*)\s*$/, ee = /^(#{1,6})\s+(.*?)\s*#*$/, te = /^\s*([-*_])\s*(\1\s*){2,}$/, F = /^(\s*)([-*+]|\d+[.)])(\s+)(.*)$/, Y = /^\s*>\s?(.*)$/, Xe = /(!?\[([^\]]*)\]\(([^)\s]+)(?:\s+"[^"]*")?\)|`([^`]+)`|\*\*([^*]+)\*\*|__([^_]+)__|~~([^~]+)~~|\*([^*\n]+)\*|<((?:https?:\/\/|mailto:)[^>\s]+)>)/g, K = (e) => {
1247
1264
  let n = String(e).trim();
1248
- return n.startsWith("|") && (n = n.slice(1)), n.endsWith("|") && (n = n.slice(0, -1)), n.split("|").map((s) => s.trim());
1265
+ return n.startsWith("|") && (n = n.slice(1)), n.endsWith("|") && (n = n.slice(0, -1)), n.split("|").map((c) => c.trim());
1249
1266
  }, Qe = (e) => {
1250
1267
  if (!String(e).includes("-")) return !1;
1251
1268
  const n = K(e);
1252
- return n.length > 0 && n.every((s) => /^:?-+:?$/.test(s));
1253
- }, Xe = (e) => {
1254
- const n = e.startsWith(":"), s = e.endsWith(":");
1255
- return n && s ? "center" : s ? "right" : "left";
1256
- }, Ze = (e, n) => {
1257
- const s = F.exec(e[n]), o = /\d/.test(s[2]), c = [];
1269
+ return n.length > 0 && n.every((c) => /^:?-+:?$/.test(c));
1270
+ }, Ze = (e) => {
1271
+ const n = e.startsWith(":"), c = e.endsWith(":");
1272
+ return n && c ? "center" : c ? "right" : "left";
1273
+ }, et = (e, n) => {
1274
+ const c = F.exec(e[n]), i = /\d/.test(c[2]), d = [];
1258
1275
  let a = n;
1259
1276
  for (; a < e.length; ) {
1260
1277
  const r = F.exec(e[a]);
1261
1278
  if (!r) break;
1262
- const l = r[1].length, i = l + r[2].length + r[3].length, d = [r[4]];
1279
+ const o = r[1].length, l = o + r[2].length + r[3].length, s = [r[4]];
1263
1280
  for (a += 1; a < e.length; ) {
1264
- const f = e[a];
1265
- if (!f.trim()) {
1281
+ const g = e[a];
1282
+ if (!g.trim()) {
1266
1283
  let h = a;
1267
1284
  for (; h < e.length && !e[h].trim(); ) h += 1;
1268
- const k = h < e.length ? F.exec(e[h]) : null;
1269
- if (k && k[1].length >= l) {
1285
+ const v = h < e.length ? F.exec(e[h]) : null;
1286
+ if (v && v[1].length >= o) {
1270
1287
  a = h;
1271
1288
  continue;
1272
1289
  }
1273
1290
  break;
1274
1291
  }
1275
- const g = /^[ \t]*/.exec(f)[0].length, p = F.exec(f);
1276
- if (p && p[1].length <= l) break;
1277
- if (g >= i) {
1278
- d.push(f.slice(i)), a += 1;
1292
+ const f = /^[ \t]*/.exec(g)[0].length, p = F.exec(g);
1293
+ if (p && p[1].length <= o) break;
1294
+ if (f >= l) {
1295
+ s.push(g.slice(l)), a += 1;
1279
1296
  continue;
1280
1297
  }
1281
- if (g > l) {
1282
- d.push(f.slice(g)), a += 1;
1298
+ if (f > o) {
1299
+ s.push(g.slice(f)), a += 1;
1283
1300
  continue;
1284
1301
  }
1285
- if (!p && !Z.test(f) && !ee.test(f) && !te.test(f) && !Y.test(f)) {
1286
- d.push(f.trim()), a += 1;
1302
+ if (!p && !Z.test(g) && !ee.test(g) && !te.test(g) && !Y.test(g)) {
1303
+ s.push(g.trim()), a += 1;
1287
1304
  continue;
1288
1305
  }
1289
1306
  break;
1290
1307
  }
1291
- c.push({ blocks: we(d, !0) });
1308
+ d.push({ blocks: Ce(s, !0) });
1292
1309
  }
1293
- return { block: { type: "list", ordered: o, items: c }, next: a };
1310
+ return { block: { type: "list", ordered: i, items: d }, next: a };
1294
1311
  };
1295
- function we(e, n = !1) {
1296
- const s = [];
1297
- let o = 0;
1298
- for (; o < e.length; ) {
1299
- const c = e[o];
1300
- if (!c.trim()) {
1301
- o += 1;
1312
+ function Ce(e, n = !1) {
1313
+ const c = [];
1314
+ let i = 0;
1315
+ for (; i < e.length; ) {
1316
+ const d = e[i];
1317
+ if (!d.trim()) {
1318
+ i += 1;
1302
1319
  continue;
1303
1320
  }
1304
- const a = Z.exec(c);
1321
+ const a = Z.exec(d);
1305
1322
  if (a) {
1306
- const i = a[1][0], d = a[1].length, f = [];
1307
- for (o += 1; o < e.length; ) {
1308
- const g = e[o];
1309
- if (new RegExp(`^\\s*\\${i}{${d},}\\s*$`).test(g)) {
1310
- o += 1;
1323
+ const l = a[1][0], s = a[1].length, g = [];
1324
+ for (i += 1; i < e.length; ) {
1325
+ const f = e[i];
1326
+ if (new RegExp(`^\\s*\\${l}{${s},}\\s*$`).test(f)) {
1327
+ i += 1;
1311
1328
  break;
1312
1329
  }
1313
- f.push(g), o += 1;
1330
+ g.push(f), i += 1;
1314
1331
  }
1315
- s.push({ type: "code", lang: a[2] || "", text: f.join(`
1332
+ c.push({ type: "code", lang: a[2] || "", text: g.join(`
1316
1333
  `) });
1317
1334
  continue;
1318
1335
  }
1319
- const r = ee.exec(c);
1336
+ const r = ee.exec(d);
1320
1337
  if (r) {
1321
- if (o += 1, !ie(r[2]).trim()) continue;
1322
- n ? s.push({ type: "paragraph", text: r[2] }) : s.push({ type: "heading", level: r[1].length, text: r[2] });
1338
+ if (i += 1, !ie(r[2]).trim()) continue;
1339
+ n ? c.push({ type: "paragraph", text: r[2] }) : c.push({ type: "heading", level: r[1].length, text: r[2] });
1323
1340
  continue;
1324
1341
  }
1325
- if (te.test(c)) {
1326
- s.push({ type: "hr" }), o += 1;
1342
+ if (te.test(d)) {
1343
+ c.push({ type: "hr" }), i += 1;
1327
1344
  continue;
1328
1345
  }
1329
- if (c.includes("|") && o + 1 < e.length && Qe(e[o + 1])) {
1330
- const i = K(c), d = K(e[o + 1]).map(Xe);
1331
- o += 2;
1332
- const f = [];
1333
- for (; o < e.length && e[o].trim() && e[o].includes("|"); )
1334
- f.push(K(e[o])), o += 1;
1335
- s.push({ type: "table", header: i, aligns: d, rows: f });
1346
+ if (d.includes("|") && i + 1 < e.length && Qe(e[i + 1])) {
1347
+ const l = K(d), s = K(e[i + 1]).map(Ze);
1348
+ i += 2;
1349
+ const g = [];
1350
+ for (; i < e.length && e[i].trim() && e[i].includes("|"); )
1351
+ g.push(K(e[i])), i += 1;
1352
+ c.push({ type: "table", header: l, aligns: s, rows: g });
1336
1353
  continue;
1337
1354
  }
1338
- if (Y.test(c)) {
1339
- const i = [];
1340
- for (; o < e.length; ) {
1341
- const d = Y.exec(e[o]);
1342
- if (!d) break;
1343
- i.push(d[1]), o += 1;
1355
+ if (Y.test(d)) {
1356
+ const l = [];
1357
+ for (; i < e.length; ) {
1358
+ const s = Y.exec(e[i]);
1359
+ if (!s) break;
1360
+ l.push(s[1]), i += 1;
1344
1361
  }
1345
- s.push({ type: "quote", lines: i });
1362
+ c.push({ type: "quote", lines: l });
1346
1363
  continue;
1347
1364
  }
1348
- if (F.test(c)) {
1349
- const i = Ze(e, o);
1350
- s.push(i.block), o = i.next;
1365
+ if (F.test(d)) {
1366
+ const l = et(e, i);
1367
+ c.push(l.block), i = l.next;
1351
1368
  continue;
1352
1369
  }
1353
- const l = [];
1354
- for (; o < e.length; ) {
1355
- const i = e[o];
1356
- if (!i.trim() || l.length && (Z.test(i) || ee.test(i) || te.test(i) || F.test(i) || Y.test(i))) break;
1357
- l.push(i.trim()), o += 1;
1370
+ const o = [];
1371
+ for (; i < e.length; ) {
1372
+ const l = e[i];
1373
+ if (!l.trim() || o.length && (Z.test(l) || ee.test(l) || te.test(l) || F.test(l) || Y.test(l))) break;
1374
+ o.push(l.trim()), i += 1;
1358
1375
  }
1359
- s.push({ type: "paragraph", text: l.join(" ") });
1376
+ c.push({ type: "paragraph", text: o.join(" ") });
1360
1377
  }
1361
- return s;
1378
+ return c;
1362
1379
  }
1363
1380
  const z = (e, n) => {
1364
- const s = [];
1365
- let o = 0, c = 0;
1366
- const a = (r) => s.push(/* @__PURE__ */ t(O, { children: r }, `i${c++}`));
1367
- for (const r of e.matchAll(Je)) {
1368
- if (r.index > o && a(e.slice(o, r.index)), r[1] !== void 0)
1381
+ const c = [];
1382
+ let i = 0, d = 0;
1383
+ const a = (r) => c.push(/* @__PURE__ */ t(O, { children: r }, `i${d++}`));
1384
+ for (const r of e.matchAll(Xe)) {
1385
+ if (r.index > i && a(e.slice(i, r.index)), r[1] !== void 0)
1369
1386
  if (r[0].startsWith("!"))
1370
1387
  a(n.img ? n.img({ src: r[3], alt: r[2] }) : /* @__PURE__ */ t("img", { src: r[3], alt: r[2] || "" }));
1371
1388
  else {
1372
- const l = z(r[2], n);
1373
- a(n.a ? n.a({ href: r[3], children: l }) : /* @__PURE__ */ t("a", { href: r[3], children: l }));
1389
+ const o = z(r[2], n);
1390
+ a(n.a ? n.a({ href: r[3], children: o }) : /* @__PURE__ */ t("a", { href: r[3], children: o }));
1374
1391
  }
1375
1392
  else r[4] !== void 0 ? a(n.code ? n.code({ children: r[4] }) : /* @__PURE__ */ t("code", { children: r[4] })) : r[5] !== void 0 ? a(/* @__PURE__ */ t("strong", { children: z(r[5], n) })) : r[6] !== void 0 ? a(/* @__PURE__ */ t("strong", { children: z(r[6], n) })) : r[7] !== void 0 ? a(/* @__PURE__ */ t("del", { children: z(r[7], n) })) : r[8] !== void 0 ? a(/* @__PURE__ */ t("em", { children: z(r[8], n) })) : r[9] !== void 0 && a(n.a ? n.a({ href: r[9], children: r[9] }) : /* @__PURE__ */ t("a", { href: r[9], children: r[9] }));
1376
- o = r.index + r[0].length;
1393
+ i = r.index + r[0].length;
1377
1394
  }
1378
- return o < e.length && a(e.slice(o)), s;
1379
- }, ke = (e, n, s) => {
1380
- const o = [];
1381
- return e.forEach((c, a) => {
1382
- const r = `b${a}`, l = (i) => o.push(/* @__PURE__ */ t(O, { children: i }, r));
1383
- if (c.type === "heading") {
1384
- const i = Math.min(c.level, 6), d = `h${i}`, f = n[d], g = z(c.text, n), p = i <= 3 ? s(ie(c.text)) : void 0;
1385
- l(f ? f({ children: g, id: p }) : ae(d, { id: p }, g));
1386
- } else if (c.type === "paragraph") {
1387
- const i = z(c.text, n);
1388
- l(n.p ? n.p({ children: i }) : /* @__PURE__ */ t("p", { children: i }));
1389
- } else if (c.type === "code") {
1390
- const i = /* @__PURE__ */ t("code", { className: c.lang ? `language-${c.lang}` : void 0, children: c.text });
1391
- l(n.pre ? n.pre({ children: i }) : /* @__PURE__ */ t("pre", { children: i }));
1392
- } else if (c.type === "list") {
1393
- const i = c.ordered ? "ol" : "ul", d = n[i], f = c.items.map((g, p) => {
1394
- const h = ke(g.blocks, n, s), k = n.li ? n.li({ children: h }) : /* @__PURE__ */ t("li", { children: h });
1395
- return /* @__PURE__ */ t(O, { children: k }, `li${p}`);
1395
+ return i < e.length && a(e.slice(i)), c;
1396
+ }, Re = (e, n, c) => {
1397
+ const i = [];
1398
+ return e.forEach((d, a) => {
1399
+ const r = `b${a}`, o = (l) => i.push(/* @__PURE__ */ t(O, { children: l }, r));
1400
+ if (d.type === "heading") {
1401
+ const l = Math.min(d.level, 6), s = `h${l}`, g = n[s], f = z(d.text, n), p = l <= 3 ? c(ie(d.text)) : void 0;
1402
+ o(g ? g({ children: f, id: p }) : ae(s, { id: p }, f));
1403
+ } else if (d.type === "paragraph") {
1404
+ const l = z(d.text, n);
1405
+ o(n.p ? n.p({ children: l }) : /* @__PURE__ */ t("p", { children: l }));
1406
+ } else if (d.type === "code") {
1407
+ const l = /* @__PURE__ */ t("code", { className: d.lang ? `language-${d.lang}` : void 0, children: d.text });
1408
+ o(n.pre ? n.pre({ children: l }) : /* @__PURE__ */ t("pre", { children: l }));
1409
+ } else if (d.type === "list") {
1410
+ const l = d.ordered ? "ol" : "ul", s = n[l], g = d.items.map((f, p) => {
1411
+ const h = Re(f.blocks, n, c), v = n.li ? n.li({ children: h }) : /* @__PURE__ */ t("li", { children: h });
1412
+ return /* @__PURE__ */ t(O, { children: v }, `li${p}`);
1396
1413
  });
1397
- l(d ? d({ children: f }) : ae(i, null, f));
1398
- } else if (c.type === "table") {
1399
- const i = /* @__PURE__ */ t("thead", { children: /* @__PURE__ */ t("tr", { children: c.header.map((g, p) => {
1400
- const h = n.th ? n.th({ children: z(g, n), align: c.aligns[p] }) : /* @__PURE__ */ t("th", { children: g });
1414
+ o(s ? s({ children: g }) : ae(l, null, g));
1415
+ } else if (d.type === "table") {
1416
+ const l = /* @__PURE__ */ t("thead", { children: /* @__PURE__ */ t("tr", { children: d.header.map((f, p) => {
1417
+ const h = n.th ? n.th({ children: z(f, n), align: d.aligns[p] }) : /* @__PURE__ */ t("th", { children: f });
1401
1418
  return /* @__PURE__ */ t(O, { children: h }, `th${p}`);
1402
- }) }) }, "thead"), d = /* @__PURE__ */ t("tbody", { children: c.rows.map((g, p) => /* @__PURE__ */ t("tr", { children: g.map((h, k) => {
1403
- const v = n.td ? n.td({ children: z(h, n), align: c.aligns[k] }) : /* @__PURE__ */ t("td", { children: h });
1404
- return /* @__PURE__ */ t(O, { children: v }, `td${k}`);
1405
- }) }, `tr${p}`)) }, "tbody"), f = n.table ? n.table({ children: [i, d] }) : /* @__PURE__ */ t("table", { children: [i, d] });
1406
- l(f);
1407
- } else if (c.type === "quote") {
1408
- const i = c.lines.filter((d) => d.trim()).map((d, f) => {
1409
- const g = n.p ? n.p({ children: z(d, n) }) : /* @__PURE__ */ t("p", { children: d });
1410
- return /* @__PURE__ */ t(O, { children: g }, `q${f}`);
1419
+ }) }) }, "thead"), s = /* @__PURE__ */ t("tbody", { children: d.rows.map((f, p) => /* @__PURE__ */ t("tr", { children: f.map((h, v) => {
1420
+ const S = n.td ? n.td({ children: z(h, n), align: d.aligns[v] }) : /* @__PURE__ */ t("td", { children: h });
1421
+ return /* @__PURE__ */ t(O, { children: S }, `td${v}`);
1422
+ }) }, `tr${p}`)) }, "tbody"), g = n.table ? n.table({ children: [l, s] }) : /* @__PURE__ */ t("table", { children: [l, s] });
1423
+ o(g);
1424
+ } else if (d.type === "quote") {
1425
+ const l = d.lines.filter((s) => s.trim()).map((s, g) => {
1426
+ const f = n.p ? n.p({ children: z(s, n) }) : /* @__PURE__ */ t("p", { children: s });
1427
+ return /* @__PURE__ */ t(O, { children: f }, `q${g}`);
1411
1428
  });
1412
- l(n.blockquote ? n.blockquote({ children: i }) : /* @__PURE__ */ t("blockquote", { children: i }));
1413
- } else c.type === "hr" && l(n.hr ? n.hr({}) : /* @__PURE__ */ t("hr", {}));
1414
- }), o;
1415
- }, et = (e, n = {}) => ke(we(String(e || "").split(`
1416
- `)), n, Se());
1417
- let pe = null;
1418
- const he = /* @__PURE__ */ new Set(), tt = ({ navigate: e, Prism: n, oneDark: s, onAnchorClick: o }) => {
1419
- const c = {
1429
+ o(n.blockquote ? n.blockquote({ children: l }) : /* @__PURE__ */ t("blockquote", { children: l }));
1430
+ } else d.type === "hr" && o(n.hr ? n.hr({}) : /* @__PURE__ */ t("hr", {}));
1431
+ }), i;
1432
+ }, tt = (e, n = {}) => Re(Ce(String(e || "").split(`
1433
+ `)), n, ke());
1434
+ let he = null;
1435
+ const be = /* @__PURE__ */ new Set(), rt = ({ navigate: e, Prism: n, oneDark: c, onAnchorClick: i }) => {
1436
+ const d = {
1420
1437
  background: T.primarySoft,
1421
1438
  color: T.primary,
1422
1439
  padding: "1px 6px",
@@ -1425,7 +1442,7 @@ const he = /* @__PURE__ */ new Set(), tt = ({ navigate: e, Prism: n, oneDark: s,
1425
1442
  fontFamily: "ui-monospace, SFMono-Regular, Menlo, monospace"
1426
1443
  };
1427
1444
  return {
1428
- h1: ({ node: a, children: r, ...l }) => /* @__PURE__ */ t("h1", { ...l, style: {
1445
+ h1: ({ node: a, children: r, ...o }) => /* @__PURE__ */ t("h1", { ...o, style: {
1429
1446
  fontSize: 22,
1430
1447
  fontWeight: 700,
1431
1448
  margin: "8px 0 16px",
@@ -1433,25 +1450,25 @@ const he = /* @__PURE__ */ new Set(), tt = ({ navigate: e, Prism: n, oneDark: s,
1433
1450
  paddingBottom: 8,
1434
1451
  scrollMarginTop: 16
1435
1452
  }, children: r }),
1436
- h2: ({ node: a, children: r, ...l }) => /* @__PURE__ */ t("h2", { ...l, style: {
1453
+ h2: ({ node: a, children: r, ...o }) => /* @__PURE__ */ t("h2", { ...o, style: {
1437
1454
  fontSize: 18,
1438
1455
  fontWeight: 700,
1439
1456
  margin: "24px 0 12px",
1440
1457
  color: x.text,
1441
1458
  scrollMarginTop: 16
1442
1459
  }, children: r }),
1443
- h3: ({ node: a, children: r, ...l }) => /* @__PURE__ */ t("h3", { ...l, style: {
1460
+ h3: ({ node: a, children: r, ...o }) => /* @__PURE__ */ t("h3", { ...o, style: {
1444
1461
  fontSize: 15,
1445
1462
  fontWeight: 600,
1446
1463
  margin: "16px 0 8px",
1447
1464
  color: "#334155",
1448
1465
  scrollMarginTop: 16
1449
1466
  }, children: r }),
1450
- p: ({ node: a, children: r, ...l }) => /* @__PURE__ */ t("p", { ...l, style: { margin: "8px 0", color: "#1f2937" }, children: r }),
1451
- ul: ({ node: a, children: r, ...l }) => /* @__PURE__ */ t("ul", { ...l, style: { margin: "8px 0", paddingLeft: 22 }, children: r }),
1452
- ol: ({ node: a, children: r, ...l }) => /* @__PURE__ */ t("ol", { ...l, style: { margin: "8px 0", paddingLeft: 22 }, children: r }),
1453
- li: ({ node: a, children: r, ...l }) => /* @__PURE__ */ t("li", { ...l, style: { margin: "4px 0" }, children: r }),
1454
- blockquote: ({ node: a, children: r, ...l }) => /* @__PURE__ */ t("blockquote", { ...l, style: {
1467
+ p: ({ node: a, children: r, ...o }) => /* @__PURE__ */ t("p", { ...o, style: { margin: "8px 0", color: "#1f2937" }, children: r }),
1468
+ ul: ({ node: a, children: r, ...o }) => /* @__PURE__ */ t("ul", { ...o, style: { margin: "8px 0", paddingLeft: 22 }, children: r }),
1469
+ ol: ({ node: a, children: r, ...o }) => /* @__PURE__ */ t("ol", { ...o, style: { margin: "8px 0", paddingLeft: 22 }, children: r }),
1470
+ li: ({ node: a, children: r, ...o }) => /* @__PURE__ */ t("li", { ...o, style: { margin: "4px 0" }, children: r }),
1471
+ blockquote: ({ node: a, children: r, ...o }) => /* @__PURE__ */ t("blockquote", { ...o, style: {
1455
1472
  margin: "12px 0",
1456
1473
  padding: "8px 14px",
1457
1474
  borderLeft: `3px solid ${H.token.colorPrimary}`,
@@ -1460,29 +1477,29 @@ const he = /* @__PURE__ */ new Set(), tt = ({ navigate: e, Prism: n, oneDark: s,
1460
1477
  borderRadius: 4
1461
1478
  }, children: r }),
1462
1479
  hr: () => /* @__PURE__ */ t("hr", { style: { border: "none", borderTop: `1px solid ${x.border}`, margin: "20px 0" } }),
1463
- img: ({ node: a, src: r, alt: l, ...i }) => /* @__PURE__ */ t("img", { ...i, src: r, alt: l || "", style: { maxWidth: "100%", height: "auto", display: "block" } }),
1464
- table: ({ node: a, children: r, ...l }) => (
1480
+ img: ({ node: a, src: r, alt: o, ...l }) => /* @__PURE__ */ t("img", { ...l, src: r, alt: o || "", style: { maxWidth: "100%", height: "auto", display: "block" } }),
1481
+ table: ({ node: a, children: r, ...o }) => (
1465
1482
  // §7:窄屏表格要能横向滚动,不能把列挤成一团
1466
- /* @__PURE__ */ t("div", { className: "zfc-doc-table-wrap", children: /* @__PURE__ */ t("table", { ...l, style: { width: "100%", borderCollapse: "collapse", fontSize: 13 }, children: r }) })
1483
+ /* @__PURE__ */ t("div", { className: "zfc-doc-table-wrap", children: /* @__PURE__ */ t("table", { ...o, style: { width: "100%", borderCollapse: "collapse", fontSize: 13 }, children: r }) })
1467
1484
  ),
1468
- th: ({ node: a, children: r, align: l, ...i }) => /* @__PURE__ */ t("th", { ...i, style: {
1485
+ th: ({ node: a, children: r, align: o, ...l }) => /* @__PURE__ */ t("th", { ...l, style: {
1469
1486
  padding: "8px 10px",
1470
1487
  background: x.surfaceAlt,
1471
1488
  border: `1px solid ${x.border}`,
1472
- textAlign: l || "left",
1489
+ textAlign: o || "left",
1473
1490
  fontWeight: 600,
1474
1491
  color: "#334155"
1475
1492
  }, children: r }),
1476
- td: ({ node: a, children: r, align: l, ...i }) => /* @__PURE__ */ t("td", { ...i, style: {
1493
+ td: ({ node: a, children: r, align: o, ...l }) => /* @__PURE__ */ t("td", { ...l, style: {
1477
1494
  padding: "8px 10px",
1478
1495
  border: `1px solid ${x.border}`,
1479
- textAlign: l || "left",
1496
+ textAlign: o || "left",
1480
1497
  color: "#1f2937"
1481
1498
  }, children: r }),
1482
1499
  pre: ({ node: a, children: r }) => {
1483
- const l = Array.isArray(r) ? r[0] : r;
1484
- l && l.props && l.props.className;
1485
- const i = X(l).replace(/\n$/, "");
1500
+ const o = Array.isArray(r) ? r[0] : r;
1501
+ o && o.props && o.props.className;
1502
+ const l = Q(o).replace(/\n$/, "");
1486
1503
  return /* @__PURE__ */ t("pre", { style: {
1487
1504
  margin: "12px 0",
1488
1505
  padding: "12px 14px",
@@ -1491,127 +1508,127 @@ const he = /* @__PURE__ */ new Set(), tt = ({ navigate: e, Prism: n, oneDark: s,
1491
1508
  color: "#e2e8f0",
1492
1509
  overflowX: "auto",
1493
1510
  fontSize: 13
1494
- }, children: /* @__PURE__ */ t("code", { style: { background: "transparent", color: "inherit", padding: 0, fontSize: "inherit" }, children: i }) });
1511
+ }, children: /* @__PURE__ */ t("code", { style: { background: "transparent", color: "inherit", padding: 0, fontSize: "inherit" }, children: l }) });
1495
1512
  },
1496
- code: ({ node: a, className: r, children: l, ...i }) => /* @__PURE__ */ t("code", { ...i, className: r, style: c, children: l }),
1497
- a: ({ node: a, href: r, children: l, ...i }) => {
1498
- const d = r || "";
1499
- return /^https?:\/\//i.test(d) || d.startsWith("//") ? /* @__PURE__ */ t(
1513
+ code: ({ node: a, className: r, children: o, ...l }) => /* @__PURE__ */ t("code", { ...l, className: r, style: d, children: o }),
1514
+ a: ({ node: a, href: r, children: o, ...l }) => {
1515
+ const s = r || "";
1516
+ return /^https?:\/\//i.test(s) || s.startsWith("//") ? /* @__PURE__ */ t(
1500
1517
  "a",
1501
1518
  {
1502
- ...i,
1503
- href: d,
1519
+ ...l,
1520
+ href: s,
1504
1521
  target: "_blank",
1505
1522
  rel: "noopener noreferrer",
1506
1523
  style: { color: H.token.colorPrimary },
1507
- children: l
1524
+ children: o
1508
1525
  }
1509
- ) : d.startsWith("#") ? /* @__PURE__ */ t(
1526
+ ) : s.startsWith("#") ? /* @__PURE__ */ t(
1510
1527
  "a",
1511
1528
  {
1512
- ...i,
1513
- href: d,
1529
+ ...l,
1530
+ href: s,
1514
1531
  style: { color: H.token.colorPrimary },
1515
- onClick: (g) => o(g, d.slice(1)),
1516
- children: l
1532
+ onClick: (f) => i(f, s.slice(1)),
1533
+ children: o
1517
1534
  }
1518
- ) : d.startsWith("/") ? /* @__PURE__ */ t(
1535
+ ) : s.startsWith("/") ? /* @__PURE__ */ t(
1519
1536
  "a",
1520
1537
  {
1521
- ...i,
1522
- href: d,
1538
+ ...l,
1539
+ href: s,
1523
1540
  style: { color: H.token.colorPrimary },
1524
- onClick: (g) => {
1525
- g.preventDefault(), e ? e(d) : typeof window < "u" && (window.location.href = d);
1541
+ onClick: (f) => {
1542
+ f.preventDefault(), e ? e(s) : typeof window < "u" && (window.location.href = s);
1526
1543
  },
1527
- children: l
1544
+ children: o
1528
1545
  }
1529
- ) : /* @__PURE__ */ t("a", { ...i, href: d, style: { color: H.token.colorPrimary }, children: l });
1546
+ ) : /* @__PURE__ */ t("a", { ...l, href: s, style: { color: H.token.colorPrimary }, children: o });
1530
1547
  }
1531
1548
  };
1532
1549
  };
1533
- function yt({
1550
+ function xt({
1534
1551
  markdown: e,
1535
1552
  title: n,
1536
- tocWidth: s = Ge,
1537
- tocLevels: o = [2],
1538
- height: c = "calc(100vh - 120px)",
1553
+ tocWidth: c = Ue,
1554
+ tocLevels: i = [2],
1555
+ height: d = "calc(100vh - 120px)",
1539
1556
  markdownComponents: a,
1540
1557
  renderMarkdown: r
1541
1558
  }) {
1542
- const i = De() ? xe() : null, d = N(null), f = N(null), g = N(""), p = N(null), [h, k] = B(""), [v, I] = B(0), b = q(() => Ve(e), [e]), S = q(
1543
- () => b.filter((u) => o.includes(u.level)),
1544
- [b, o]
1559
+ const l = ve() ? Se() : null, s = P(null), g = P(null), f = P(""), p = P(null), [h, v] = B(""), [S, A] = B(0), b = q(() => Je(e), [e]), w = q(
1560
+ () => b.filter((u) => i.includes(u.level)),
1561
+ [b, i]
1545
1562
  );
1546
1563
  L(() => {
1547
- const u = () => I((y) => y + 1);
1548
- return he.add(u), () => {
1549
- he.delete(u);
1564
+ const u = () => A((y) => y + 1);
1565
+ return be.add(u), () => {
1566
+ be.delete(u);
1550
1567
  };
1551
1568
  }, []);
1552
- const w = (u) => {
1553
- g.current = u, p.current && clearTimeout(p.current), p.current = setTimeout(() => {
1554
- g.current = "";
1569
+ const k = (u) => {
1570
+ f.current = u, p.current && clearTimeout(p.current), p.current = setTimeout(() => {
1571
+ f.current = "";
1555
1572
  }, 700);
1556
1573
  };
1557
1574
  L(() => () => {
1558
1575
  p.current && clearTimeout(p.current);
1559
- }, []), Re(() => {
1560
- const u = d.current;
1576
+ }, []), Ee(() => {
1577
+ const u = s.current;
1561
1578
  if (!u) return;
1562
1579
  const y = Array.from(u.querySelectorAll("h1, h2, h3"));
1563
1580
  b.forEach((R, W) => {
1564
1581
  const M = y[W];
1565
1582
  M && (M.id !== R.id && (M.id = R.id), M.setAttribute("data-anchor", R.id));
1566
1583
  });
1567
- }, [b, v, r]), L(() => {
1568
- const u = d.current;
1584
+ }, [b, S, r]), L(() => {
1585
+ const u = s.current;
1569
1586
  if (!u) return;
1570
1587
  const y = Array.from(u.querySelectorAll("h1, h2, h3"));
1571
1588
  if (!y.length) return;
1572
1589
  const R = () => {
1573
- const Q = u.getBoundingClientRect().top;
1590
+ const X = u.getBoundingClientRect().top;
1574
1591
  let oe = y[0];
1575
1592
  for (const le of y)
1576
- if (le.getBoundingClientRect().top - Q <= fe) oe = le;
1593
+ if (le.getBoundingClientRect().top - X <= ge) oe = le;
1577
1594
  else break;
1578
- g.current || k(oe.id);
1595
+ f.current || v(oe.id);
1579
1596
  }, W = new IntersectionObserver(R, {
1580
1597
  root: u,
1581
- rootMargin: `-${fe}px 0px 0px 0px`,
1598
+ rootMargin: `-${ge}px 0px 0px 0px`,
1582
1599
  threshold: 0
1583
1600
  });
1584
- y.forEach((Q) => W.observe(Q)), R();
1601
+ y.forEach((X) => W.observe(X)), R();
1585
1602
  const M = () => {
1586
- g.current = "";
1603
+ f.current = "";
1587
1604
  };
1588
1605
  return u.addEventListener("scrollend", M), () => {
1589
1606
  W.disconnect(), u.removeEventListener("scrollend", M);
1590
1607
  };
1591
- }, [b, v, r]), L(() => {
1592
- const u = f.current;
1608
+ }, [b, S, r]), L(() => {
1609
+ const u = g.current;
1593
1610
  if (!u || !h) return;
1594
- const y = u.querySelector(`[data-toc-id="${ge(h)}"]`);
1611
+ const y = u.querySelector(`[data-toc-id="${ue(h)}"]`);
1595
1612
  if (!y) return;
1596
1613
  const R = u.getBoundingClientRect(), W = y.getBoundingClientRect();
1597
1614
  (W.top < R.top + 24 || W.bottom > R.bottom - 24) && y.scrollIntoView({ block: "nearest", behavior: "smooth" });
1598
1615
  }, [h]);
1599
- const A = (u) => {
1600
- const y = d.current;
1601
- return y && y.querySelector(`[data-anchor="${ge(u)}"]`) || (typeof document < "u" ? document.getElementById(u) : null);
1616
+ const I = (u) => {
1617
+ const y = s.current;
1618
+ return y && y.querySelector(`[data-anchor="${ue(u)}"]`) || (typeof document < "u" ? document.getElementById(u) : null);
1602
1619
  }, $ = (u, y) => {
1603
- u.preventDefault(), w(y), ue(A(y)), k(y);
1620
+ u.preventDefault(), k(y), pe(I(y)), v(y);
1604
1621
  }, G = (u, y) => {
1605
- u.preventDefault(), w(y), ue(A(y)), k(y);
1622
+ u.preventDefault(), k(y), pe(I(y)), v(y);
1606
1623
  }, U = q(
1607
- () => tt({
1608
- navigate: i,
1609
- Prism: pe,
1610
- oneDark: pe,
1624
+ () => rt({
1625
+ navigate: l,
1626
+ Prism: he,
1627
+ oneDark: he,
1611
1628
  onAnchorClick: G
1612
1629
  }),
1613
1630
  // eslint-disable-next-line react-hooks/exhaustive-deps
1614
- [i, v]
1631
+ [l, S]
1615
1632
  ), j = q(
1616
1633
  () => ({ ...U, ...a || {} }),
1617
1634
  [U, a]
@@ -1621,22 +1638,22 @@ function yt({
1621
1638
  title: "暂无文档",
1622
1639
  description: "把组件说明写成 DOC.md,用编译期 import 的字符串传给 ComponentDoc 即可"
1623
1640
  }
1624
- ) : r ? r({ markdown: e, components: j }) : /* @__PURE__ */ t(Ce, { children: et(e, j) });
1641
+ ) : r ? r({ markdown: e, components: j }) : /* @__PURE__ */ t(Te, { children: tt(e, j) });
1625
1642
  return /* @__PURE__ */ m("div", { style: { display: "flex", flexDirection: "column", minHeight: 0, flex: 1 }, children: [
1626
- /* @__PURE__ */ t("style", { children: Ye }),
1627
- n ? /* @__PURE__ */ t(ve, { title: n }) : null,
1643
+ /* @__PURE__ */ t("style", { children: Ke }),
1644
+ n ? /* @__PURE__ */ t(we, { title: n }) : null,
1628
1645
  /* @__PURE__ */ m("div", { style: { display: "flex", gap: 16, alignItems: "flex-start", minHeight: 0 }, children: [
1629
1646
  /* @__PURE__ */ m(
1630
1647
  "aside",
1631
1648
  {
1632
- ref: f,
1649
+ ref: g,
1633
1650
  style: {
1634
- width: s,
1651
+ width: c,
1635
1652
  flexShrink: 0,
1636
1653
  position: "sticky",
1637
1654
  top: 12,
1638
1655
  alignSelf: "flex-start",
1639
- maxHeight: c,
1656
+ maxHeight: d,
1640
1657
  overflowY: "auto",
1641
1658
  padding: "8px 8px 12px",
1642
1659
  background: x.surface,
@@ -1653,10 +1670,10 @@ function yt({
1653
1670
  marginBottom: 8,
1654
1671
  padding: "0 4px"
1655
1672
  }, children: [
1656
- /* @__PURE__ */ t(Be, {}),
1673
+ /* @__PURE__ */ t(Le, {}),
1657
1674
  /* @__PURE__ */ t("span", { style: { fontWeight: 600 }, children: "本文目录" })
1658
1675
  ] }),
1659
- /* @__PURE__ */ t("ul", { style: { listStyle: "none", margin: 0, padding: 0 }, children: S.map((u) => {
1676
+ /* @__PURE__ */ t("ul", { style: { listStyle: "none", margin: 0, padding: 0 }, children: w.map((u) => {
1660
1677
  const y = h === u.id;
1661
1678
  return /* @__PURE__ */ t("li", { "data-toc-id": u.id, children: /* @__PURE__ */ t(
1662
1679
  "a",
@@ -1689,7 +1706,7 @@ function yt({
1689
1706
  /* @__PURE__ */ t(
1690
1707
  "article",
1691
1708
  {
1692
- ref: d,
1709
+ ref: s,
1693
1710
  style: {
1694
1711
  flex: 1,
1695
1712
  minWidth: 0,
@@ -1699,8 +1716,8 @@ function yt({
1699
1716
  padding: "24px 32px",
1700
1717
  lineHeight: 1.75,
1701
1718
  color: x.text,
1702
- overflowY: c === "auto" ? "visible" : "auto",
1703
- maxHeight: c === "auto" ? "none" : c
1719
+ overflowY: d === "auto" ? "visible" : "auto",
1720
+ maxHeight: d === "auto" ? "none" : d
1704
1721
  },
1705
1722
  children: J()
1706
1723
  }
@@ -1709,32 +1726,32 @@ function yt({
1709
1726
  ] });
1710
1727
  }
1711
1728
  export {
1712
- Le as C,
1713
- Ne as D,
1729
+ $e as C,
1730
+ _e as D,
1714
1731
  ne as E,
1715
- dt as F,
1716
- st as G,
1717
- ut as L,
1718
- ve as P,
1719
- ht as R,
1720
- We as S,
1721
- pt as T,
1722
- yt as a,
1723
- ft as b,
1724
- $e as c,
1725
- gt as d,
1726
- mt as e,
1727
- ct as f,
1728
- bt as g,
1732
+ ft as F,
1733
+ ct as G,
1734
+ pt as L,
1735
+ we as P,
1736
+ bt as R,
1737
+ Me as S,
1738
+ ht as T,
1739
+ xt as a,
1740
+ gt as b,
1741
+ We as c,
1742
+ ut as d,
1743
+ yt as e,
1744
+ dt as f,
1745
+ mt as g,
1729
1746
  H as h,
1730
1747
  T as i,
1731
- Me as j,
1748
+ He as j,
1732
1749
  de as k,
1733
- at as l,
1734
- P as m,
1750
+ st as l,
1751
+ _ as m,
1735
1752
  x as n,
1736
1753
  E as p,
1737
1754
  C as r,
1738
1755
  D as s,
1739
- He as u
1756
+ Pe as u
1740
1757
  };