@yuku123/z-team-component 0.2.137 → 0.2.138

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.
Files changed (49) hide show
  1. package/dist/{AdminModuleContent-B1YxyaNI.js → AdminModuleContent-9gH_G78B.js} +12824 -13238
  2. package/dist/{ChangeLogView-BKQfeeag.js → ChangeLogView-DzFmZVBw.js} +1 -1
  3. package/dist/{ComponentDoc-DHTIWtcE.js → ComponentDoc-KyD5wtuW.js} +435 -445
  4. package/dist/{InvitationManagementPage-DgVqNUvK.js → InvitationManagementPage-6-0uZNuO.js} +1 -1
  5. package/dist/{OnboardingPage-DiBVtw23.js → OnboardingPage-tLarxnp5.js} +2 -2
  6. package/dist/{ScheduledTasks-DuR4sg4k.js → ScheduledTasks-QGmD7Uhz.js} +6 -6
  7. package/dist/SystemShell-CWawiWOn.js +885 -0
  8. package/dist/SystemWorkbench.module-CZv_ruUa.js +36 -0
  9. package/dist/{admin-logs-BZasxvF5.js → admin-logs-DXjxD-y2.js} +1 -1
  10. package/dist/{api-CELjpxxS.js → api-DOjASQ0k.js} +1 -1
  11. package/dist/{api-BhdcdwWj.js → api-Dzr8HLsU.js} +1 -1
  12. package/dist/{createWorkspaceWsHandler-SY-wVjjh.js → createWorkspaceWsHandler-DCokPv4M.js} +3 -3
  13. package/dist/{index-CV3kkXgP.js → index-0AjMJyFL.js} +3 -3
  14. package/dist/{index-CtFdsOsR.js → index-4NOi2xz4.js} +2 -2
  15. package/dist/{index-D3YkA5j4.js → index-4icVyiM3.js} +5 -5
  16. package/dist/{index-BDZOz1cm.js → index-8VddM67M.js} +2 -2
  17. package/dist/{index-DkF5EnSi.js → index-B75TTql4.js} +2 -2
  18. package/dist/{index-C_OjaGAs.js → index-BHfNKXIA.js} +3 -3
  19. package/dist/{index-B2iHgJnx.js → index-BdEokzAv.js} +6 -6
  20. package/dist/{index-NfGgVmob.js → index-BgdqkNkT.js} +3 -3
  21. package/dist/{index-BB7G9ZN4.js → index-C9NwYJh-.js} +1 -1
  22. package/dist/{index-DOdAlZfA.js → index-CLP0LnEz.js} +12 -12
  23. package/dist/index-CNmSLd0s.js +1894 -0
  24. package/dist/{index-X-n1B8fi.js → index-CUOByyqy.js} +3 -3
  25. package/dist/{index-B6Nj2_Zo.js → index-CjYmL2yJ.js} +1 -1
  26. package/dist/{index-Cd3a7nol.js → index-Crzx3zh2.js} +2 -2
  27. package/dist/index-Cwptuq_d.js +1323 -0
  28. package/dist/{index-D9NoVz2x.js → index-DC1fQH0J.js} +2 -2
  29. package/dist/{index-DpiQW5SO.js → index-DGdtqBi4.js} +4 -4
  30. package/dist/{index-Cxvua23F.js → index-DXA0r7Co.js} +2 -2
  31. package/dist/{index-B3K7b3Bf.js → index-DZcMGMHV.js} +4 -4
  32. package/dist/{index-DSH-wcoD.js → index-DarTFF-M.js} +1 -1
  33. package/dist/{index-B0xiWAhM.js → index-DxZEpsT6.js} +10 -10
  34. package/dist/{index-DWi-8Esh.js → index-PJZV-bFc.js} +1 -1
  35. package/dist/{index-Btpel9AF.js → index-VqKcDrn3.js} +2 -2
  36. package/dist/{index-Bwe4EN63.js → index-ZqDoLUxb.js} +1 -1
  37. package/dist/index.js +1 -1
  38. package/dist/{instance-BOFjc82M.js → instance-CDA6R8yG.js} +1 -1
  39. package/dist/{menuPermission-Dfwf-EJP.js → menuPermission-LCjN8Osm.js} +3 -3
  40. package/dist/pages.js +1 -1
  41. package/dist/{send-default-agent-team-message-CvPaOp3a.js → send-default-agent-team-message-3Uyy88s_.js} +1 -1
  42. package/dist/{sso-user-CAWQupk5.js → sso-user-DX2FYQCh.js} +1 -1
  43. package/dist/{training-BYjqU8sn.js → training-BgYM7EV-.js} +1 -1
  44. package/dist/{webide-CDZpzRfx.js → webide-BsF30aLX.js} +1289 -1255
  45. package/dist/z-team-component.css +1 -1
  46. package/package.json +1 -1
  47. package/dist/SystemShell-DoMowhBn.js +0 -981
  48. package/dist/index-BHBuOhK5.js +0 -1299
  49. package/dist/index-DlxfYOdw.js +0 -1718
@@ -1,18 +1,18 @@
1
1
  import { jsx as o, jsxs as y, Fragment as ot } from "react/jsx-runtime";
2
- import { UserOutlined as Zn, FolderOpenOutlined as Pa, FileTextOutlined as jt, SettingOutlined as Fa, SearchOutlined as Ma, PlusOutlined as $n, FolderAddOutlined as Vt, StarFilled as mt, AppstoreOutlined as Ba, CloseOutlined as Ua, LinkOutlined as xn, UnorderedListOutlined as Ln, StarOutlined as Gt, ShareAltOutlined as An, BarsOutlined as za, EllipsisOutlined as Wa, EditOutlined as Dn, DeleteOutlined as Zt, ClockCircleOutlined as Ha, BoldOutlined as qa, ItalicOutlined as Ka, StrikethroughOutlined as ja, OrderedListOutlined as Va, CheckSquareOutlined as Ga, CodeOutlined as Ja, ConsoleSqlOutlined as Ya, PictureOutlined as Qa, TableOutlined as Xa, FileAddOutlined as Rn, InfoCircleOutlined as Za, DownloadOutlined as er, ApartmentOutlined as tr, SaveOutlined as nr, DownOutlined as ar } from "@ant-design/icons";
3
- import { message as K, Modal as je, Tooltip as ze, Button as se, Dropdown as $t, Popover as rr, Input as nt, Spin as en, Empty as xt, Tree as or, Segmented as sr, Radio as Jt, Checkbox as ir, TreeSelect as cr, Select as at, DatePicker as lr } from "antd";
4
- import dr, { useState as I, useCallback as R, useEffect as Y, useMemo as B, useRef as ne } from "react";
5
- import ur from "react-markdown";
6
- import mr from "rehype-highlight";
7
- import fr from "remark-gfm";
8
- import { h as pr } from "./history-BlrA1eaW.js";
9
- import { a as w, f as _, B as v, b as C, u as ea, n as yt, a5 as hr, t as et, e as yr, a7 as gr, a8 as On, a9 as _r, aa as ta } from "./ComponentDoc-DHTIWtcE.js";
10
- import { f as br, a as vr, u as En, b as Sr, c as wr, r as Cr, d as Nr, e as Tr, g as kr, h as Ir, m as $r } from "./admin-logs-BZasxvF5.js";
11
- import { a as xr, f as Lr, c as Ar } from "./index-Bwe4EN63.js";
12
- import { findTodosLinkedToNote as Dr, buildTodoProjectContext as Rr, linkedTodoChipLabel as Or } from "@yuku123/z-task-component";
13
- import Ne from "dayjs";
2
+ import { UserOutlined as Zn, FolderOpenOutlined as Ma, FileTextOutlined as jt, SettingOutlined as Ba, SearchOutlined as za, PlusOutlined as $n, FolderAddOutlined as Vt, StarFilled as mt, AppstoreOutlined as Ua, CloseOutlined as Wa, LinkOutlined as xn, UnorderedListOutlined as Ln, StarOutlined as Gt, ShareAltOutlined as An, BarsOutlined as Ha, EllipsisOutlined as Ka, EditOutlined as Dn, DeleteOutlined as Zt, ClockCircleOutlined as qa, BoldOutlined as ja, ItalicOutlined as Va, StrikethroughOutlined as Ga, OrderedListOutlined as Ja, CheckSquareOutlined as Ya, CodeOutlined as Qa, ConsoleSqlOutlined as Xa, PictureOutlined as Za, TableOutlined as er, FileAddOutlined as Rn, InfoCircleOutlined as tr, DownloadOutlined as nr, ApartmentOutlined as ar, SaveOutlined as rr, DownOutlined as or } from "@ant-design/icons";
3
+ import { message as q, Modal as je, Tooltip as Ue, Button as se, Dropdown as $t, Popover as sr, Input as nt, Spin as en, Empty as xt, Tree as ir, Segmented as cr, Radio as Jt, Checkbox as lr, TreeSelect as dr, Select as at, DatePicker as ur } from "antd";
4
+ import mr, { useState as I, useCallback as R, useEffect as Y, useMemo as B, useRef as ne } from "react";
5
+ import pr from "react-markdown";
6
+ import fr from "rehype-highlight";
7
+ import hr from "remark-gfm";
8
+ import { h as yr } from "./history-BlrA1eaW.js";
9
+ import { a as S, f as _, B as C, b as w, u as ea, n as yt, a5 as gr, t as et, e as _r, a7 as br, a8 as On, a9 as vr, aa as ta } from "./ComponentDoc-KyD5wtuW.js";
10
+ import { f as Sr, a as wr, u as En, b as Nr, c as Cr, r as kr, d as Tr, e as Ir, g as $r, h as xr, m as Lr } from "./admin-logs-DXjxD-y2.js";
11
+ import { a as Ar, f as Dr, c as Rr } from "./index-ZqDoLUxb.js";
12
+ import { findTodosLinkedToNote as Or, buildTodoProjectContext as Er, linkedTodoChipLabel as Pr } from "@yuku123/z-task-component";
13
+ import Ce from "dayjs";
14
14
  import "./echarts-B1OU1xr4.js";
15
- import * as Er from "echarts/core";
15
+ import * as Fr from "echarts/core";
16
16
  function ie(e) {
17
17
  const n = new URLSearchParams();
18
18
  Object.entries(e).forEach(([a, r]) => {
@@ -21,9 +21,9 @@ function ie(e) {
21
21
  const t = n.toString();
22
22
  return t ? `?${t}` : "";
23
23
  }
24
- async function Vl(e, n = "") {
25
- const t = await w(
26
- `${v}/admin/qa-eval/trigger${ie({ token: n })}`,
24
+ async function Xl(e, n = "") {
25
+ const t = await S(
26
+ `${C}/admin/qa-eval/trigger${ie({ token: n })}`,
27
27
  {
28
28
  ..._,
29
29
  method: "POST",
@@ -31,34 +31,34 @@ async function Vl(e, n = "") {
31
31
  body: JSON.stringify(e)
32
32
  }
33
33
  );
34
- return C(t, "发起评测失败");
34
+ return w(t, "发起评测失败");
35
35
  }
36
- async function Gl(e, n = "") {
37
- const t = await w(
38
- `${v}/admin/qa-eval/reports/progress${ie({
36
+ async function Zl(e, n = "") {
37
+ const t = await S(
38
+ `${C}/admin/qa-eval/reports/progress${ie({
39
39
  report_ids: e.join(","),
40
40
  token: n
41
41
  })}`,
42
42
  _
43
- ), a = await C(
43
+ ), a = await w(
44
44
  t,
45
45
  "获取评测进度失败"
46
46
  );
47
47
  return Array.isArray(a == null ? void 0 : a.items) ? a.items : [];
48
48
  }
49
- async function Jl(e, n = "") {
50
- const t = await w(
51
- `${v}/admin/qa-eval/report/by-instance/${e}${ie(
49
+ async function ed(e, n = "") {
50
+ const t = await S(
51
+ `${C}/admin/qa-eval/report/by-instance/${e}${ie(
52
52
  { token: n }
53
53
  )}`,
54
54
  _
55
55
  );
56
- return C(t, "获取实例评测报告失败");
56
+ return w(t, "获取实例评测报告失败");
57
57
  }
58
58
  const an = { "Content-Type": "application/json" };
59
- async function Yl(e = "", n = 1, t = 50) {
60
- const a = await w(
61
- `${v}/admin/schedule-task${ie({
59
+ async function td(e = "", n = 1, t = 50) {
60
+ const a = await S(
61
+ `${C}/admin/schedule-task${ie({
62
62
  token: e,
63
63
  task_type: "QA_EVAL",
64
64
  page: n,
@@ -66,11 +66,11 @@ async function Yl(e = "", n = 1, t = 50) {
66
66
  })}`,
67
67
  _
68
68
  );
69
- return C(a, "查询自动测评策略失败");
69
+ return w(a, "查询自动测评策略失败");
70
70
  }
71
- async function Ql(e = "", n) {
72
- const t = await w(
73
- `${v}/admin/schedule-task${ie({ token: e })}`,
71
+ async function nd(e = "", n) {
72
+ const t = await S(
73
+ `${C}/admin/schedule-task${ie({ token: e })}`,
74
74
  {
75
75
  ..._,
76
76
  method: "POST",
@@ -78,11 +78,11 @@ async function Ql(e = "", n) {
78
78
  body: JSON.stringify(n)
79
79
  }
80
80
  );
81
- return C(t, "创建自动测评策略失败");
81
+ return w(t, "创建自动测评策略失败");
82
82
  }
83
- async function Xl(e = "", n, t) {
84
- const a = await w(
85
- `${v}/admin/schedule-task/${n}${ie({ token: e })}`,
83
+ async function ad(e = "", n, t) {
84
+ const a = await S(
85
+ `${C}/admin/schedule-task/${n}${ie({ token: e })}`,
86
86
  {
87
87
  ..._,
88
88
  method: "PUT",
@@ -90,18 +90,18 @@ async function Xl(e = "", n, t) {
90
90
  body: JSON.stringify(t)
91
91
  }
92
92
  );
93
- return C(a, "更新自动测评策略失败");
93
+ return w(a, "更新自动测评策略失败");
94
94
  }
95
- async function Zl(e = "", n) {
96
- const t = await w(
97
- `${v}/admin/schedule-task/${n}${ie({ token: e })}`,
95
+ async function rd(e = "", n) {
96
+ const t = await S(
97
+ `${C}/admin/schedule-task/${n}${ie({ token: e })}`,
98
98
  { ..._, method: "DELETE" }
99
99
  );
100
- return C(t, "删除自动测评策略失败");
100
+ return w(t, "删除自动测评策略失败");
101
101
  }
102
- async function ed(e = "", n, t) {
103
- const a = await w(
104
- `${v}/admin/schedule-task/${n}/toggle${ie({
102
+ async function od(e = "", n, t) {
103
+ const a = await S(
104
+ `${C}/admin/schedule-task/${n}/toggle${ie({
105
105
  token: e
106
106
  })}`,
107
107
  {
@@ -111,27 +111,27 @@ async function ed(e = "", n, t) {
111
111
  body: JSON.stringify({ enabled: t })
112
112
  }
113
113
  );
114
- return C(a, "切换策略状态失败");
114
+ return w(a, "切换策略状态失败");
115
115
  }
116
- async function td(e = "", n) {
117
- const t = await w(
118
- `${v}/admin/schedule-task/${n}/activate${ie({
116
+ async function sd(e = "", n) {
117
+ const t = await S(
118
+ `${C}/admin/schedule-task/${n}/activate${ie({
119
119
  token: e
120
120
  })}`,
121
121
  { ..._, method: "POST" }
122
122
  );
123
- return C(t, "激活策略失败");
123
+ return w(t, "激活策略失败");
124
124
  }
125
- async function nd(e = "", n) {
126
- const t = await w(
127
- `${v}/admin/schedule-task/${n}/run${ie({ token: e })}`,
125
+ async function id(e = "", n) {
126
+ const t = await S(
127
+ `${C}/admin/schedule-task/${n}/run${ie({ token: e })}`,
128
128
  { ..._, method: "POST" }
129
129
  );
130
- return C(t, "手动执行失败");
130
+ return w(t, "手动执行失败");
131
131
  }
132
- async function ad(e = "", n = 1, t = 20) {
133
- const a = await w(
134
- `${v}/admin/schedule-task/history-all${ie({
132
+ async function cd(e = "", n = 1, t = 20) {
133
+ const a = await S(
134
+ `${C}/admin/schedule-task/history-all${ie({
135
135
  token: e,
136
136
  task_type: "QA_EVAL",
137
137
  page: n,
@@ -139,108 +139,108 @@ async function ad(e = "", n = 1, t = 20) {
139
139
  })}`,
140
140
  _
141
141
  );
142
- return C(a, "查询执行历史失败");
143
- }
144
- const Pr = "_wrap_5nym2_12", Fr = "_sidebar_5nym2_22", Mr = "_railHead_5nym2_35", Br = "_railTitleRow_5nym2_40", Ur = "_railTitle_5nym2_40", zr = "_railCount_5nym2_54", Wr = "_railIconBtn_5nym2_59", Hr = "_railSearch_5nym2_69", qr = "_railSearchIcon_5nym2_86", Kr = "_railCreateRow_5nym2_90", jr = "_railCreateBtn_5nym2_97", Vr = "_railFilterRow_5nym2_105", Gr = "_tagList_5nym2_110", Jr = "_tagChip_5nym2_117", Yr = "_tagChipActive_5nym2_139", Qr = "_tagChipSort_5nym2_150", Xr = "_tagSortArrow_5nym2_156", Zr = "_tagOrder_5nym2_163", eo = "_viewPopover_5nym2_180", to = "_viewPanel_5nym2_185", no = "_viewPanelSection_5nym2_192", ao = "_viewPanelLabel_5nym2_198", ro = "_treeWrap_5nym2_206", oo = "_treeTitle_5nym2_251", so = "_treeTitleActive_5nym2_262", io = "_treeIcon_5nym2_267", co = "_treeIconFolder_5nym2_274", lo = "_treeIconDoc_5nym2_278", uo = "_treeLabel_5nym2_282", mo = "_hit_5nym2_289", fo = "_resizer_5nym2_297", po = "_groupHeader_5nym2_313", ho = "_groupLabel_5nym2_324", yo = "_groupCount_5nym2_331", go = "_docList_5nym2_342", _o = "_docListRow_5nym2_348", bo = "_docListIcon_5nym2_362", vo = "_docListIconFav_5nym2_368", So = "_docListTitle_5nym2_374", wo = "_docListPath_5nym2_384", Co = "_docListTime_5nym2_394", No = "_railFoot_5nym2_402", To = "_railFootBtn_5nym2_412", ko = "_railFootBtnActive_5nym2_431", Io = "_railFootIcon_5nym2_441", $o = "_railFootLabel_5nym2_445", xo = "_railFootCount_5nym2_449", Lo = "_main_5nym2_456", Ao = "_docHead_5nym2_467", Do = "_breadcrumb_5nym2_474", Ro = "_breadcrumbRoot_5nym2_484", Oo = "_breadcrumbItem_5nym2_488", Eo = "_breadcrumbSep_5nym2_494", Po = "_docTitleRow_5nym2_498", Fo = "_docTitle_5nym2_498", Mo = "_docActions_5nym2_522", Bo = "_favActive_5nym2_529", Uo = "_docMeta_5nym2_533", zo = "_docMetaItem_5nym2_542", Wo = "_modeBar_5nym2_550", Ho = "_mdBtn_5nym2_562", qo = "_mdSep_5nym2_580", Ko = "_body_5nym2_591", jo = "_half_5nym2_599", Vo = "_textarea_5nym2_604", Go = "_preview_5nym2_623", Jo = "_tocPanel_5nym2_765", Yo = "_tocHeader_5nym2_775", Qo = "_tocHeaderTitle_5nym2_786", Xo = "_tocHeaderCount_5nym2_790", Zo = "_tocList_5nym2_799", es = "_tocItem_5nym2_805", ts = "_tocItemActive_5nym2_821", ns = "_tocEmpty_5nym2_827", as = "_tabBar_5nym2_836", rs = "_tabItem_5nym2_848", os = "_tabItemActive_5nym2_869", ss = "_tabTitle_5nym2_876", is = "_tabClose_5nym2_882", cs = "_tabDot_5nym2_897", ls = "_tabDotUnsaved_5nym2_904", ds = "_tabDotSaved_5nym2_908", us = "_treeDot_5nym2_912", ms = "_statusOk_5nym2_920", fs = "_statusWarn_5nym2_924", ps = "_centerSpin_5nym2_930", hs = "_emptyHint_5nym2_938", ys = "_emptyMain_5nym2_945", gs = "_emptyCard_5nym2_954", _s = "_emptyIcon_5nym2_967", bs = "_emptyTitle_5nym2_973", vs = "_emptyDesc_5nym2_979", Ss = "_treeIconOwner_5nym2_985", d = {
145
- wrap: Pr,
146
- sidebar: Fr,
147
- railHead: Mr,
148
- railTitleRow: Br,
149
- railTitle: Ur,
150
- railCount: zr,
151
- railIconBtn: Wr,
152
- railSearch: Hr,
153
- railSearchIcon: qr,
154
- railCreateRow: Kr,
155
- railCreateBtn: jr,
156
- railFilterRow: Vr,
157
- tagList: Gr,
158
- tagChip: Jr,
159
- tagChipActive: Yr,
160
- tagChipSort: Qr,
161
- tagSortArrow: Xr,
162
- tagOrder: Zr,
163
- viewPopover: eo,
164
- viewPanel: to,
165
- viewPanelSection: no,
166
- viewPanelLabel: ao,
167
- treeWrap: ro,
168
- treeTitle: oo,
169
- treeTitleActive: so,
170
- treeIcon: io,
171
- treeIconFolder: co,
172
- treeIconDoc: lo,
173
- treeLabel: uo,
174
- hit: mo,
175
- resizer: fo,
176
- groupHeader: po,
177
- groupLabel: ho,
178
- groupCount: yo,
179
- docList: go,
180
- docListRow: _o,
181
- docListIcon: bo,
182
- docListIconFav: vo,
183
- docListTitle: So,
184
- docListPath: wo,
185
- docListTime: Co,
186
- railFoot: No,
187
- railFootBtn: To,
188
- railFootBtnActive: ko,
189
- railFootIcon: Io,
190
- railFootLabel: $o,
191
- railFootCount: xo,
192
- main: Lo,
193
- docHead: Ao,
194
- breadcrumb: Do,
195
- breadcrumbRoot: Ro,
196
- breadcrumbItem: Oo,
197
- breadcrumbSep: Eo,
198
- docTitleRow: Po,
199
- docTitle: Fo,
200
- docActions: Mo,
201
- favActive: Bo,
202
- docMeta: Uo,
203
- docMetaItem: zo,
204
- modeBar: Wo,
205
- mdBtn: Ho,
206
- mdSep: qo,
207
- body: Ko,
208
- half: jo,
209
- textarea: Vo,
210
- preview: Go,
211
- tocPanel: Jo,
212
- tocHeader: Yo,
213
- tocHeaderTitle: Qo,
214
- tocHeaderCount: Xo,
215
- tocList: Zo,
216
- tocItem: es,
217
- tocItemActive: ts,
218
- tocEmpty: ns,
219
- tabBar: as,
220
- tabItem: rs,
221
- tabItemActive: os,
222
- tabTitle: ss,
223
- tabClose: is,
224
- tabDot: cs,
225
- tabDotUnsaved: ls,
226
- tabDotSaved: ds,
227
- treeDot: us,
228
- statusOk: ms,
229
- statusWarn: fs,
230
- centerSpin: ps,
231
- emptyHint: hs,
232
- emptyMain: ys,
233
- emptyCard: gs,
234
- emptyIcon: _s,
235
- emptyTitle: bs,
236
- emptyDesc: vs,
237
- treeIconOwner: Ss
142
+ return w(a, "查询执行历史失败");
143
+ }
144
+ const Mr = "_wrap_5nym2_12", Br = "_sidebar_5nym2_22", zr = "_railHead_5nym2_35", Ur = "_railTitleRow_5nym2_40", Wr = "_railTitle_5nym2_40", Hr = "_railCount_5nym2_54", Kr = "_railIconBtn_5nym2_59", qr = "_railSearch_5nym2_69", jr = "_railSearchIcon_5nym2_86", Vr = "_railCreateRow_5nym2_90", Gr = "_railCreateBtn_5nym2_97", Jr = "_railFilterRow_5nym2_105", Yr = "_tagList_5nym2_110", Qr = "_tagChip_5nym2_117", Xr = "_tagChipActive_5nym2_139", Zr = "_tagChipSort_5nym2_150", eo = "_tagSortArrow_5nym2_156", to = "_tagOrder_5nym2_163", no = "_viewPopover_5nym2_180", ao = "_viewPanel_5nym2_185", ro = "_viewPanelSection_5nym2_192", oo = "_viewPanelLabel_5nym2_198", so = "_treeWrap_5nym2_206", io = "_treeTitle_5nym2_251", co = "_treeTitleActive_5nym2_262", lo = "_treeIcon_5nym2_267", uo = "_treeIconFolder_5nym2_274", mo = "_treeIconDoc_5nym2_278", po = "_treeLabel_5nym2_282", fo = "_hit_5nym2_289", ho = "_resizer_5nym2_297", yo = "_groupHeader_5nym2_313", go = "_groupLabel_5nym2_324", _o = "_groupCount_5nym2_331", bo = "_docList_5nym2_342", vo = "_docListRow_5nym2_348", So = "_docListIcon_5nym2_362", wo = "_docListIconFav_5nym2_368", No = "_docListTitle_5nym2_374", Co = "_docListPath_5nym2_384", ko = "_docListTime_5nym2_394", To = "_railFoot_5nym2_402", Io = "_railFootBtn_5nym2_412", $o = "_railFootBtnActive_5nym2_431", xo = "_railFootIcon_5nym2_441", Lo = "_railFootLabel_5nym2_445", Ao = "_railFootCount_5nym2_449", Do = "_main_5nym2_456", Ro = "_docHead_5nym2_467", Oo = "_breadcrumb_5nym2_474", Eo = "_breadcrumbRoot_5nym2_484", Po = "_breadcrumbItem_5nym2_488", Fo = "_breadcrumbSep_5nym2_494", Mo = "_docTitleRow_5nym2_498", Bo = "_docTitle_5nym2_498", zo = "_docActions_5nym2_522", Uo = "_favActive_5nym2_529", Wo = "_docMeta_5nym2_533", Ho = "_docMetaItem_5nym2_542", Ko = "_modeBar_5nym2_550", qo = "_mdBtn_5nym2_562", jo = "_mdSep_5nym2_580", Vo = "_body_5nym2_591", Go = "_half_5nym2_599", Jo = "_textarea_5nym2_604", Yo = "_preview_5nym2_623", Qo = "_tocPanel_5nym2_765", Xo = "_tocHeader_5nym2_775", Zo = "_tocHeaderTitle_5nym2_786", es = "_tocHeaderCount_5nym2_790", ts = "_tocList_5nym2_799", ns = "_tocItem_5nym2_805", as = "_tocItemActive_5nym2_821", rs = "_tocEmpty_5nym2_827", os = "_tabBar_5nym2_836", ss = "_tabItem_5nym2_848", is = "_tabItemActive_5nym2_869", cs = "_tabTitle_5nym2_876", ls = "_tabClose_5nym2_882", ds = "_tabDot_5nym2_897", us = "_tabDotUnsaved_5nym2_904", ms = "_tabDotSaved_5nym2_908", ps = "_treeDot_5nym2_912", fs = "_statusOk_5nym2_920", hs = "_statusWarn_5nym2_924", ys = "_centerSpin_5nym2_930", gs = "_emptyHint_5nym2_938", _s = "_emptyMain_5nym2_945", bs = "_emptyCard_5nym2_954", vs = "_emptyIcon_5nym2_967", Ss = "_emptyTitle_5nym2_973", ws = "_emptyDesc_5nym2_979", Ns = "_treeIconOwner_5nym2_985", d = {
145
+ wrap: Mr,
146
+ sidebar: Br,
147
+ railHead: zr,
148
+ railTitleRow: Ur,
149
+ railTitle: Wr,
150
+ railCount: Hr,
151
+ railIconBtn: Kr,
152
+ railSearch: qr,
153
+ railSearchIcon: jr,
154
+ railCreateRow: Vr,
155
+ railCreateBtn: Gr,
156
+ railFilterRow: Jr,
157
+ tagList: Yr,
158
+ tagChip: Qr,
159
+ tagChipActive: Xr,
160
+ tagChipSort: Zr,
161
+ tagSortArrow: eo,
162
+ tagOrder: to,
163
+ viewPopover: no,
164
+ viewPanel: ao,
165
+ viewPanelSection: ro,
166
+ viewPanelLabel: oo,
167
+ treeWrap: so,
168
+ treeTitle: io,
169
+ treeTitleActive: co,
170
+ treeIcon: lo,
171
+ treeIconFolder: uo,
172
+ treeIconDoc: mo,
173
+ treeLabel: po,
174
+ hit: fo,
175
+ resizer: ho,
176
+ groupHeader: yo,
177
+ groupLabel: go,
178
+ groupCount: _o,
179
+ docList: bo,
180
+ docListRow: vo,
181
+ docListIcon: So,
182
+ docListIconFav: wo,
183
+ docListTitle: No,
184
+ docListPath: Co,
185
+ docListTime: ko,
186
+ railFoot: To,
187
+ railFootBtn: Io,
188
+ railFootBtnActive: $o,
189
+ railFootIcon: xo,
190
+ railFootLabel: Lo,
191
+ railFootCount: Ao,
192
+ main: Do,
193
+ docHead: Ro,
194
+ breadcrumb: Oo,
195
+ breadcrumbRoot: Eo,
196
+ breadcrumbItem: Po,
197
+ breadcrumbSep: Fo,
198
+ docTitleRow: Mo,
199
+ docTitle: Bo,
200
+ docActions: zo,
201
+ favActive: Uo,
202
+ docMeta: Wo,
203
+ docMetaItem: Ho,
204
+ modeBar: Ko,
205
+ mdBtn: qo,
206
+ mdSep: jo,
207
+ body: Vo,
208
+ half: Go,
209
+ textarea: Jo,
210
+ preview: Yo,
211
+ tocPanel: Qo,
212
+ tocHeader: Xo,
213
+ tocHeaderTitle: Zo,
214
+ tocHeaderCount: es,
215
+ tocList: ts,
216
+ tocItem: ns,
217
+ tocItemActive: as,
218
+ tocEmpty: rs,
219
+ tabBar: os,
220
+ tabItem: ss,
221
+ tabItemActive: is,
222
+ tabTitle: cs,
223
+ tabClose: ls,
224
+ tabDot: ds,
225
+ tabDotUnsaved: us,
226
+ tabDotSaved: ms,
227
+ treeDot: ps,
228
+ statusOk: fs,
229
+ statusWarn: hs,
230
+ centerSpin: ys,
231
+ emptyHint: gs,
232
+ emptyMain: _s,
233
+ emptyCard: bs,
234
+ emptyIcon: vs,
235
+ emptyTitle: Ss,
236
+ emptyDesc: ws,
237
+ treeIconOwner: Ns
238
238
  }, rt = {
239
239
  update_time: "desc",
240
240
  title: "asc",
241
241
  sort_order: "asc"
242
242
  }, na = "ft_note_sortDims", aa = "ft_note_groupDims", ra = "ft_note_typeFilter", oa = "ft_note_time_filter";
243
- function ws() {
243
+ function Cs() {
244
244
  try {
245
245
  const e = localStorage.getItem(na);
246
246
  if (!e) return [];
@@ -265,7 +265,7 @@ function ws() {
265
265
  return [];
266
266
  }
267
267
  }
268
- function Cs() {
268
+ function ks() {
269
269
  try {
270
270
  const e = localStorage.getItem(aa);
271
271
  return e ? JSON.parse(e) : [];
@@ -273,39 +273,39 @@ function Cs() {
273
273
  return [];
274
274
  }
275
275
  }
276
- function Ns() {
276
+ function Ts() {
277
277
  try {
278
278
  return localStorage.getItem(ra) || "all";
279
279
  } catch {
280
280
  return "all";
281
281
  }
282
282
  }
283
- function Ts() {
283
+ function Is() {
284
284
  try {
285
285
  return localStorage.getItem(oa) || "all";
286
286
  } catch {
287
287
  return "all";
288
288
  }
289
289
  }
290
- function ks(e) {
290
+ function $s(e) {
291
291
  try {
292
292
  localStorage.setItem(na, JSON.stringify(e));
293
293
  } catch {
294
294
  }
295
295
  }
296
- function Is(e) {
296
+ function xs(e) {
297
297
  try {
298
298
  localStorage.setItem(aa, JSON.stringify(e));
299
299
  } catch {
300
300
  }
301
301
  }
302
- function $s(e) {
302
+ function Ls(e) {
303
303
  try {
304
304
  localStorage.setItem(ra, e);
305
305
  } catch {
306
306
  }
307
307
  }
308
- function xs(e) {
308
+ function As(e) {
309
309
  try {
310
310
  localStorage.setItem(oa, e);
311
311
  } catch {
@@ -325,7 +325,7 @@ function Pt(e) {
325
325
  return !1;
326
326
  }
327
327
  }
328
- function Ls(e, n, t) {
328
+ function Ds(e, n, t) {
329
329
  if (n === "note" && e.type !== "note" || n === "folder" && e.type !== "folder" || n === "bound" && !Pt(e) || n === "plain" && Pt(e)) return !1;
330
330
  if (t > 0 && e.type === "note") {
331
331
  const a = tn(e.updateTime);
@@ -333,12 +333,12 @@ function Ls(e, n, t) {
333
333
  }
334
334
  return !0;
335
335
  }
336
- function As(e, n, t) {
336
+ function Rs(e, n, t) {
337
337
  const a = t === "1d" ? 1 : t === "3d" ? 3 : t === "7d" ? 7 : 0, r = a > 0 ? Date.now() - a * 864e5 : 0;
338
338
  function i(l) {
339
339
  const u = [];
340
340
  for (const m of l) {
341
- const N = Ls(m, n, r);
341
+ const N = Ds(m, n, r);
342
342
  if (m.type === "folder" || m.type === "owner") {
343
343
  const g = m.children && m.children.length > 0 ? i(m.children) : [];
344
344
  (N || g.length > 0) && u.push({ ...m, children: g });
@@ -349,7 +349,7 @@ function As(e, n, t) {
349
349
  }
350
350
  return i(e);
351
351
  }
352
- function Ds(e, n) {
352
+ function Os(e, n) {
353
353
  const t = (n || "").trim().toLowerCase();
354
354
  if (!t) return e;
355
355
  function a(r) {
@@ -381,7 +381,7 @@ function Pn(e, n) {
381
381
  }
382
382
  return t(e, []) ?? [];
383
383
  }
384
- function Rs(e) {
384
+ function Es(e) {
385
385
  const n = [];
386
386
  function t(a, r, i) {
387
387
  for (const l of a) {
@@ -397,7 +397,7 @@ function Rs(e) {
397
397
  }
398
398
  return t(e, [], 0), n;
399
399
  }
400
- function Os(e, n, t) {
400
+ function Ps(e, n, t) {
401
401
  for (const { dim: a, order: r } of t) {
402
402
  const i = r === "asc" ? 1 : -1;
403
403
  if (a === "update_time") {
@@ -414,11 +414,11 @@ function Os(e, n, t) {
414
414
  return e.type !== n.type ? e.type === "folder" ? -1 : 1 : (e.sortOrder ?? 0) - (n.sortOrder ?? 0);
415
415
  }
416
416
  function sa(e, n) {
417
- return (e.some((r) => r.type === "owner") ? [...e] : [...e].sort((r, i) => Os(r, i, n))).map(
417
+ return (e.some((r) => r.type === "owner") ? [...e] : [...e].sort((r, i) => Ps(r, i, n))).map(
418
418
  (r) => r.children && r.children.length > 0 ? { ...r, children: sa(r.children, n) } : r
419
419
  );
420
420
  }
421
- function Es(e) {
421
+ function Fs(e) {
422
422
  let n = 0;
423
423
  const t = (a) => {
424
424
  for (const r of a || [])
@@ -426,7 +426,7 @@ function Es(e) {
426
426
  };
427
427
  return t(e), n;
428
428
  }
429
- function Ps(e, n) {
429
+ function Ms(e, n) {
430
430
  switch (n) {
431
431
  case "type":
432
432
  return [e.type, e.type === "folder" ? "文件夹" : "文档"];
@@ -441,7 +441,7 @@ function Ps(e, n) {
441
441
  }
442
442
  }
443
443
  }
444
- function Fs(e, n, t) {
444
+ function Bs(e, n, t) {
445
445
  var i;
446
446
  if (n.length === 0)
447
447
  return [{ key: "__all__", label: "", nodes: e }];
@@ -450,31 +450,31 @@ function Fs(e, n, t) {
450
450
  if (u.length === 0) return [];
451
451
  const [N, ...g] = u, b = /* @__PURE__ */ new Map();
452
452
  for (const x of l) {
453
- const [S, D] = Ps(x, N);
454
- b.has(S) || b.set(S, { label: D, items: [] }), b.get(S).items.push(x);
453
+ const [v, D] = Ms(x, N);
454
+ b.has(v) || b.set(v, { label: D, items: [] }), b.get(v).items.push(x);
455
455
  }
456
- const k = [];
457
- for (const [x, { label: S, items: D }] of b) {
456
+ const T = [];
457
+ for (const [x, { label: v, items: D }] of b) {
458
458
  const P = `${m}::${N}=${x}`;
459
- g.length === 0 ? k.push({ key: P, label: S, nodes: D, rawKey: x }) : k.push({
459
+ g.length === 0 ? T.push({ key: P, label: v, nodes: D, rawKey: x }) : T.push({
460
460
  key: P,
461
- label: S,
461
+ label: v,
462
462
  nodes: D,
463
463
  children: r(D, g, P),
464
464
  rawKey: x
465
465
  });
466
466
  }
467
- return k.sort((x, S) => {
467
+ return T.sort((x, v) => {
468
468
  if (N === "time") {
469
- const D = x.rawKey === "(未知时间)" ? "" : x.rawKey || "", P = S.rawKey === "(未知时间)" ? "" : S.rawKey || "";
469
+ const D = x.rawKey === "(未知时间)" ? "" : x.rawKey || "", P = v.rawKey === "(未知时间)" ? "" : v.rawKey || "";
470
470
  return !D && !P ? 0 : D ? P ? a ? D.localeCompare(P) : P.localeCompare(D) : -1 : 1;
471
471
  }
472
- return S.nodes.length - x.nodes.length;
473
- }), k;
472
+ return v.nodes.length - x.nodes.length;
473
+ }), T;
474
474
  }
475
475
  return r(e, n, "");
476
476
  }
477
- function Ms(e) {
477
+ function zs(e) {
478
478
  const n = [];
479
479
  function t(a) {
480
480
  for (const r of a)
@@ -482,7 +482,7 @@ function Ms(e) {
482
482
  }
483
483
  return t(e), n;
484
484
  }
485
- const Ce = "0";
485
+ const Ne = "0";
486
486
  function Fn(e) {
487
487
  if (!e) return "";
488
488
  const n = /^(\d{4})-(\d{2})-(\d{2})[ T](\d{2}):(\d{2})/.exec(e);
@@ -492,7 +492,7 @@ function Fn(e) {
492
492
  const a = Math.floor((Date.now() - t) / 864e5);
493
493
  return a <= 0 ? "今天" : a === 1 ? "昨天" : a < 30 ? `${a} 天前` : `${n[2]}-${n[3]}`;
494
494
  }
495
- function Bs(e, n) {
495
+ function Us(e, n) {
496
496
  const t = /^\s*#\s+(.+?)\s*(?:\n|$)/.exec(e);
497
497
  if (!t) return { text: e, offset: 0 };
498
498
  const a = t[1].trim(), r = (n || "").trim();
@@ -509,7 +509,7 @@ function Yt(e, n) {
509
509
  ), l = u + t.length, u = a.indexOf(r, l);
510
510
  return l < e.length && i.push(e.slice(l)), i.length > 1 ? i : e;
511
511
  }
512
- function Us(e, n, t, a, r, i) {
512
+ function Ws(e, n, t, a, r, i) {
513
513
  const l = e.slice(n, t) || i, u = a + l + r;
514
514
  return {
515
515
  content: e.slice(0, n) + u + e.slice(t),
@@ -517,7 +517,7 @@ function Us(e, n, t, a, r, i) {
517
517
  selectTo: n + a.length + l.length
518
518
  };
519
519
  }
520
- function zs(e, n, t, a) {
520
+ function Hs(e, n, t, a) {
521
521
  const i = e.slice(0, n).lastIndexOf(`
522
522
  `) + 1, u = e.slice(i, t).split(`
523
523
  `).map((m) => m.startsWith(a) ? m.slice(a.length) : a + m).join(`
@@ -579,12 +579,12 @@ function Ft(e) {
579
579
  key: `owner:${n.userId ?? ""}`,
580
580
  title: n.title,
581
581
  type: "owner",
582
- id: Ce,
582
+ id: Ne,
583
583
  userId: n.userId,
584
584
  isLeaf: !1,
585
585
  virtual: !0,
586
586
  children: n.children && n.children.length > 0 ? Ft(n.children) : void 0
587
- } : yr(n.id) ? {
587
+ } : _r(n.id) ? {
588
588
  key: n.id,
589
589
  title: n.title,
590
590
  type: n.type,
@@ -599,22 +599,22 @@ function la(e, n, t) {
599
599
  key: `owner:${r.userId ?? ""}`,
600
600
  title: r.title,
601
601
  type: "owner",
602
- id: Ce,
602
+ id: Ne,
603
603
  userId: r.userId,
604
604
  isLeaf: !1,
605
605
  virtual: !0,
606
606
  children: la(r.children || [], n, t)
607
- })) : n.length === 0 ? Ft(e) : Ms(Fs(e, n, t)).map((r, i) => ({
607
+ })) : n.length === 0 ? Ft(e) : zs(Bs(e, n, t)).map((r, i) => ({
608
608
  key: `__group__${i}::${r.key}`,
609
609
  title: r.label,
610
610
  type: "group",
611
- id: Ce,
611
+ id: Ne,
612
612
  isLeaf: !1,
613
613
  virtual: !0,
614
614
  children: Ft(r.nodes)
615
615
  }));
616
616
  }
617
- function Ws(e) {
617
+ function Ks(e) {
618
618
  const n = [], t = e.split(`
619
619
  `);
620
620
  let a = 0, r = 0;
@@ -628,19 +628,19 @@ function Ws(e) {
628
628
  }
629
629
  return n;
630
630
  }
631
- const Hs = 3e3;
632
- function rd({
631
+ const qs = 3e3;
632
+ function ld({
633
633
  onOpenProject: e,
634
634
  showAllUsers: n = !1,
635
635
  onOpenTodo: t,
636
636
  openNoteId: a
637
637
  }) {
638
- const r = ea((s) => s.token) || "", [i, l] = I([]), [u, m] = I(!1), [N, g] = I([]), [b, k] = I(null), [x, S] = I(
638
+ const r = ea((s) => s.token) || "", [i, l] = I([]), [u, m] = I(!1), [N, g] = I([]), [b, T] = I(null), [x, v] = I(
639
639
  null
640
- ), [D, P] = I(!1), [j, Q] = I([]), [M, ae] = I(null), [pe, ee] = I(!1), [de, Se] = I(!1), ue = R(async () => {
640
+ ), [D, P] = I(!1), [j, Q] = I([]), [M, ae] = I(null), [fe, ee] = I(!1), [de, Se] = I(!1), ue = R(async () => {
641
641
  const [s, c] = await Promise.allSettled([
642
- xr({ view: "all" }, r),
643
- Lr(r)
642
+ Ar({ view: "all" }, r),
643
+ Dr(r)
644
644
  ]);
645
645
  Q(
646
646
  s.status === "fulfilled" && Array.isArray(s.value) ? s.value : []
@@ -651,23 +651,23 @@ function rd({
651
651
  Y(() => {
652
652
  ue();
653
653
  }, [ue]);
654
- const [me, be] = I(Cs), [A, re] = I(ws), [V, T] = I(Ns), [f, L] = I(Ts), [G, he] = I("tree"), [X, Fe] = I(""), [H, fe] = I(!1), [te, U] = I([]), [ye, xe] = I(/* @__PURE__ */ new Set()), [Le, _t] = I(!1), [We, Ge] = I(-1), [ge, st] = I([]), [q, it] = I(null), [fa, cn] = I(!1), [ke, ln] = I("edit"), [dn, pa] = I(!0), [Mt, ha] = I(264), un = B(() => q ? Dr(j, q) : [], [j, q]), ya = B(
655
- () => Rr(M),
654
+ const [me, be] = I(ks), [A, re] = I(Cs), [V, k] = I(Ts), [p, L] = I(Is), [G, he] = I("tree"), [X, Fe] = I(""), [H, pe] = I(!1), [te, z] = I([]), [ye, xe] = I(/* @__PURE__ */ new Set()), [Le, _t] = I(!1), [We, Ge] = I(-1), [ge, st] = I([]), [K, it] = I(null), [ha, cn] = I(!1), [Te, ln] = I("edit"), [dn, ya] = I(!0), [Mt, ga] = I(264), un = B(() => K ? Or(j, K) : [], [j, K]), _a = B(
655
+ () => Er(M),
656
656
  [M]
657
657
  ), He = ne(null), Bt = ne(null), mn = ne(null), Je = ne(null), Me = ne([]), _e = ne(null);
658
658
  Y(() => {
659
659
  Me.current = ge;
660
660
  }, [ge]), Y(() => {
661
- _e.current = q;
662
- }, [q]);
663
- const [ve, Ae] = I(null), [Ut, Ie] = I(""), zt = ne(!1), [ga, fn] = I(!1), [ct, bt] = I(null), [Wt, lt] = I(""), oe = ge.find((s) => yt(s.id, q)) ?? null, Ht = (oe == null ? void 0 : oe.content) ?? "", Ye = (oe == null ? void 0 : oe.title) ?? "", pn = (oe == null ? void 0 : oe.dirty) ?? !1, qe = (oe == null ? void 0 : oe.saveStatus) ?? "idle", ce = R((s, c) => {
661
+ _e.current = K;
662
+ }, [K]);
663
+ const [ve, Ae] = I(null), [zt, Ie] = I(""), Ut = ne(!1), [ba, pn] = I(!1), [ct, bt] = I(null), [Wt, lt] = I(""), oe = ge.find((s) => yt(s.id, K)) ?? null, Ht = (oe == null ? void 0 : oe.content) ?? "", Ye = (oe == null ? void 0 : oe.title) ?? "", fn = (oe == null ? void 0 : oe.dirty) ?? !1, Ke = (oe == null ? void 0 : oe.saveStatus) ?? "idle", ce = R((s, c) => {
664
664
  st(
665
- (p) => p.map((h) => yt(h.id, s) ? { ...h, ...c } : h)
665
+ (f) => f.map((h) => yt(h.id, s) ? { ...h, ...c } : h)
666
666
  );
667
667
  }, []), we = R(async () => {
668
668
  m(!0);
669
669
  try {
670
- const s = await br(r, n);
670
+ const s = await Sr(r, n);
671
671
  l(Array.isArray(s) ? s : []);
672
672
  } catch {
673
673
  l([]);
@@ -680,34 +680,34 @@ function rd({
680
680
  }, [we]);
681
681
  const vt = R(async () => {
682
682
  try {
683
- const s = await vr(r), c = Array.isArray(s) ? s : [];
684
- U(c), xe(new Set(c.map((p) => String(p.refId))));
683
+ const s = await wr(r), c = Array.isArray(s) ? s : [];
684
+ z(c), xe(new Set(c.map((f) => String(f.refId))));
685
685
  } catch {
686
- U([]), xe(/* @__PURE__ */ new Set());
686
+ z([]), xe(/* @__PURE__ */ new Set());
687
687
  }
688
688
  }, [r]);
689
689
  Y(() => {
690
690
  vt();
691
691
  }, [vt]), Y(() => {
692
- Is(me);
692
+ xs(me);
693
693
  }, [me]), Y(() => {
694
- ks(A);
694
+ $s(A);
695
695
  }, [A]), Y(() => {
696
- $s(V);
696
+ Ls(V);
697
697
  }, [V]), Y(() => {
698
- xs(f);
699
- }, [f]);
700
- const _a = R((s) => {
698
+ As(p);
699
+ }, [p]);
700
+ const va = R((s) => {
701
701
  be((c) => c.indexOf(s) >= 0 ? c.filter((h) => h !== s) : [...c, s]);
702
- }, []), ba = R((s) => {
702
+ }, []), Sa = R((s) => {
703
703
  re((c) => {
704
- const p = c.findIndex((h) => h.dim === s);
705
- if (p < 0) return [...c, { dim: s, order: rt[s] }];
706
- if (c[p].order === rt[s]) {
704
+ const f = c.findIndex((h) => h.dim === s);
705
+ if (f < 0) return [...c, { dim: s, order: rt[s] }];
706
+ if (c[f].order === rt[s]) {
707
707
  const h = [...c];
708
- return h[p] = {
708
+ return h[f] = {
709
709
  dim: s,
710
- order: c[p].order === "asc" ? "desc" : "asc"
710
+ order: c[f].order === "asc" ? "desc" : "asc"
711
711
  }, h;
712
712
  }
713
713
  return c.filter((h) => h.dim !== s);
@@ -715,19 +715,19 @@ function rd({
715
715
  }, []), St = R(async () => {
716
716
  const s = _e.current;
717
717
  if (!s) return;
718
- const c = Me.current.find((p) => p.id === s);
718
+ const c = Me.current.find((f) => f.id === s);
719
719
  if (!(!c || !c.dirty)) {
720
720
  ce(s, { saveStatus: "saving" });
721
721
  try {
722
722
  await En(s, { title: c.title, content: c.content }, r), ce(s, { dirty: !1, saveStatus: "saved" }), we(), setTimeout(() => {
723
723
  st(
724
- (p) => p.map(
724
+ (f) => f.map(
725
725
  (h) => h.id === s && h.saveStatus === "saved" ? { ...h, saveStatus: "idle" } : h
726
726
  )
727
727
  );
728
- }, Hs);
728
+ }, qs);
729
729
  } catch {
730
- ce(s, { saveStatus: "error" }), K.error("保存失败");
730
+ ce(s, { saveStatus: "error" }), q.error("保存失败");
731
731
  }
732
732
  }
733
733
  }, [r, we, ce]), Be = R(() => {
@@ -735,59 +735,59 @@ function rd({
735
735
  s && (ce(s, { dirty: !0, saveStatus: "unsaved" }), Je.current && clearTimeout(Je.current), Je.current = setTimeout(() => {
736
736
  St();
737
737
  }, 2e3));
738
- }, [St, ce]), Ue = R(async () => {
738
+ }, [St, ce]), ze = R(async () => {
739
739
  Je.current && (clearTimeout(Je.current), Je.current = null), await St();
740
740
  }, [St]), De = R(
741
741
  async (s) => {
742
- if (Me.current.find((p) => p.id === s)) {
742
+ if (Me.current.find((f) => f.id === s)) {
743
743
  if (_e.current && _e.current !== s) {
744
- const p = Me.current.find(
744
+ const f = Me.current.find(
745
745
  (h) => h.id === _e.current
746
746
  );
747
- p != null && p.dirty && await Ue();
747
+ f != null && f.dirty && await ze();
748
748
  }
749
- it(s), k(s), S(null);
749
+ it(s), T(s), v(null);
750
750
  return;
751
751
  }
752
752
  if (_e.current) {
753
- const p = Me.current.find(
753
+ const f = Me.current.find(
754
754
  (h) => h.id === _e.current
755
755
  );
756
- p != null && p.dirty && await Ue();
756
+ f != null && f.dirty && await ze();
757
757
  }
758
758
  cn(!0);
759
759
  try {
760
- const p = await Sr(s, r);
760
+ const f = await Nr(s, r);
761
761
  st((h) => [
762
762
  ...h,
763
763
  {
764
764
  id: s,
765
- title: p.title,
766
- content: p.content || "",
765
+ title: f.title,
766
+ content: f.content || "",
767
767
  dirty: !1,
768
768
  saveStatus: "idle",
769
- extraInfo: p.extraInfo
769
+ extraInfo: f.extraInfo
770
770
  }
771
- ]), it(s), k(s), S(null), ln("edit");
771
+ ]), it(s), T(s), v(null), ln("edit");
772
772
  } catch {
773
773
  } finally {
774
774
  cn(!1);
775
775
  }
776
776
  },
777
- [r, Ue]
777
+ [r, ze]
778
778
  ), hn = ne(0);
779
779
  Y(() => {
780
780
  !a || a.ts === hn.current || (hn.current = a.ts, De(a.id));
781
781
  }, [a, De]);
782
- const va = R(
782
+ const wa = R(
783
783
  (s) => {
784
784
  const c = ge.find((h) => h.id === s);
785
785
  if (!c) return;
786
- const p = () => {
786
+ const f = () => {
787
787
  const h = ge.filter(($) => $.id !== s);
788
- if (st(h), q === s) {
788
+ if (st(h), K === s) {
789
789
  const $ = h.length > 0 ? h[h.length - 1].id : null;
790
- it($), k($);
790
+ it($), T($);
791
791
  }
792
792
  };
793
793
  c.dirty ? je.confirm({
@@ -803,25 +803,25 @@ function rd({
803
803
  r
804
804
  );
805
805
  } catch {
806
- K.error("保存失败");
806
+ q.error("保存失败");
807
807
  }
808
- p();
808
+ f();
809
809
  },
810
- onCancel: () => p()
811
- }) : p();
810
+ onCancel: () => f()
811
+ }) : f();
812
812
  },
813
- [ge, q, r]
814
- ), Sa = R(
813
+ [ge, K, r]
814
+ ), Na = R(
815
815
  (s) => {
816
- s === "preview" && pn && Ue(), ln(s);
816
+ s === "preview" && fn && ze(), ln(s);
817
817
  },
818
- [Ue, pn]
818
+ [ze, fn]
819
819
  ), yn = R(async () => {
820
- if (!ve || zt.current) return;
821
- zt.current = !0, fn(!0);
822
- const s = Ut.trim() || "未命名";
820
+ if (!ve || Ut.current) return;
821
+ Ut.current = !0, pn(!0);
822
+ const s = zt.trim() || "未命名";
823
823
  try {
824
- const c = await wr(
824
+ const c = await Cr(
825
825
  {
826
826
  parentId: ve.parentId,
827
827
  type: ve.type,
@@ -829,8 +829,8 @@ function rd({
829
829
  ownerUserId: ve.ownerUserId
830
830
  },
831
831
  r
832
- ), p = ve.parentId, h = ve.type;
833
- if (Ae(null), Ie(""), await we(), p !== Ce && !N.includes(p) && g(($) => [...$, p]), ve.ownerUserId) {
832
+ ), f = ve.parentId, h = ve.type;
833
+ if (Ae(null), Ie(""), await we(), f !== Ne && !N.includes(f) && g(($) => [...$, f]), ve.ownerUserId) {
834
834
  const $ = `owner:${ve.ownerUserId}`;
835
835
  g(
836
836
  (W) => W.includes($) ? W : [...W, $]
@@ -838,22 +838,22 @@ function rd({
838
838
  }
839
839
  h === "note" && await De(c);
840
840
  } catch {
841
- K.error("新建失败");
841
+ q.error("新建失败");
842
842
  } finally {
843
- zt.current = !1, fn(!1);
843
+ Ut.current = !1, pn(!1);
844
844
  }
845
- }, [ve, Ut, r, we, N, De]), gn = R(async () => {
845
+ }, [ve, zt, r, we, N, De]), gn = R(async () => {
846
846
  if (!ct) return;
847
847
  const s = Wt.trim();
848
848
  if (s)
849
849
  try {
850
- await Cr(ct.id, s, r);
850
+ await kr(ct.id, s, r);
851
851
  const c = ct.id;
852
852
  bt(null), lt(""), await we(), ce(c, { title: s });
853
853
  } catch {
854
- K.error("重命名失败");
854
+ q.error("重命名失败");
855
855
  }
856
- }, [ct, Wt, r, we, ce]), qt = R(
856
+ }, [ct, Wt, r, we, ce]), Kt = R(
857
857
  (s, c) => {
858
858
  je.confirm({
859
859
  title: `删除「${c}」?`,
@@ -863,37 +863,37 @@ function rd({
863
863
  cancelText: "取消",
864
864
  onOk: async () => {
865
865
  try {
866
- await Nr(s, r), st((p) => p.filter((h) => h.id !== s)), q === s && (it(null), k(null)), await we(), K.success("已删除");
866
+ await Tr(s, r), st((f) => f.filter((h) => h.id !== s)), K === s && (it(null), T(null)), await we(), q.success("已删除");
867
867
  } catch {
868
- K.error("删除失败");
868
+ q.error("删除失败");
869
869
  }
870
870
  }
871
871
  });
872
872
  },
873
- [r, we, q]
873
+ [r, we, K]
874
874
  ), _n = R(async () => {
875
875
  const s = _e.current;
876
876
  if (s) {
877
877
  P(!0);
878
878
  try {
879
- const c = await Tr(s, r), p = `${window.location.origin}/note/shared?token=${c}`;
879
+ const c = await Ir(s, r), f = `${window.location.origin}/note/shared?token=${c}`;
880
880
  let h = !1;
881
881
  try {
882
- await navigator.clipboard.writeText(p), h = !0;
882
+ await navigator.clipboard.writeText(f), h = !0;
883
883
  } catch {
884
884
  const $ = document.createElement("textarea");
885
- $.value = p, $.style.cssText = "position:fixed;opacity:0;", document.body.appendChild($), $.select();
885
+ $.value = f, $.style.cssText = "position:fixed;opacity:0;", document.body.appendChild($), $.select();
886
886
  try {
887
887
  document.execCommand("copy"), h = !0;
888
888
  } catch {
889
889
  }
890
890
  document.body.removeChild($);
891
891
  }
892
- K.success(
892
+ q.success(
893
893
  h ? "分享链接已复制到剪贴板" : "复制失败,请手动复制链接"
894
894
  );
895
895
  } catch {
896
- K.error("生成分享链接失败");
896
+ q.error("生成分享链接失败");
897
897
  } finally {
898
898
  P(!1);
899
899
  }
@@ -902,15 +902,15 @@ function rd({
902
902
  async (s) => {
903
903
  if (Le) return;
904
904
  _t(!0);
905
- const c = String(s), p = ye.has(c), h = ($) => xe((W) => {
906
- const z = new Set(W);
907
- return $ ? z.add(c) : z.delete(c), z;
905
+ const c = String(s), f = ye.has(c), h = ($) => xe((W) => {
906
+ const U = new Set(W);
907
+ return $ ? U.add(c) : U.delete(c), U;
908
908
  });
909
- h(!p);
909
+ h(!f);
910
910
  try {
911
- p ? await kr(s, r) : await Ir(s, r), await vt(), K.success(p ? "已取消收藏" : "已收藏");
911
+ f ? await $r(s, r) : await xr(s, r), await vt(), q.success(f ? "已取消收藏" : "已收藏");
912
912
  } catch {
913
- h(p), K.error(p ? "取消收藏失败" : "收藏失败");
913
+ h(f), q.error(f ? "取消收藏失败" : "收藏失败");
914
914
  } finally {
915
915
  _t(!1);
916
916
  }
@@ -919,69 +919,69 @@ function rd({
919
919
  ), bn = R(() => {
920
920
  const s = _e.current;
921
921
  s && wt(s);
922
- }, [wt]), wa = R(async () => {
922
+ }, [wt]), Ca = R(async () => {
923
923
  const s = _e.current;
924
924
  if (!s || de) return;
925
- const c = Me.current.find((h) => h.id === s), p = ((c == null ? void 0 : c.title) || "未命名笔记").trim();
925
+ const c = Me.current.find((h) => h.id === s), f = ((c == null ? void 0 : c.title) || "未命名笔记").trim();
926
926
  Se(!0);
927
927
  try {
928
- await Ar(
928
+ await Rr(
929
929
  {
930
- title: p,
931
- links: [{ type: "note", id: s, title: p }]
930
+ title: f,
931
+ links: [{ type: "note", id: s, title: f }]
932
932
  },
933
933
  r
934
- ), K.success("已从笔记创建待办"), await ue(), ee(!0);
934
+ ), q.success("已从笔记创建待办"), await ue(), ee(!0);
935
935
  } catch {
936
- K.error("从笔记创建待办失败");
936
+ q.error("从笔记创建待办失败");
937
937
  } finally {
938
938
  Se(!1);
939
939
  }
940
940
  }, [r, de, ue]), dt = R(
941
941
  async (s) => {
942
- const c = He.current, p = _e.current;
943
- if (!p) return;
944
- const h = Me.current.find((Z) => Z.id === p);
942
+ const c = He.current, f = _e.current;
943
+ if (!f) return;
944
+ const h = Me.current.find((Z) => Z.id === f);
945
945
  if (!h) return;
946
- const $ = (c == null ? void 0 : c.selectionStart) ?? h.content.length, W = (c == null ? void 0 : c.selectionEnd) ?? h.content.length, z = K.loading("上传图片中...", 0);
946
+ const $ = (c == null ? void 0 : c.selectionStart) ?? h.content.length, W = (c == null ? void 0 : c.selectionEnd) ?? h.content.length, U = q.loading("上传图片中...", 0);
947
947
  try {
948
948
  const J = `
949
- ![](${await hr(s)})
949
+ ![](${await gr(s)})
950
950
  `, Oe = h.content.slice(0, $) + J + h.content.slice(W);
951
- ce(p, {
951
+ ce(f, {
952
952
  content: Oe,
953
953
  dirty: !0,
954
954
  saveStatus: "unsaved"
955
955
  }), Be(), requestAnimationFrame(() => {
956
956
  if (c) {
957
- const kt = $ + J.length;
958
- c.focus(), c.setSelectionRange(kt, kt);
957
+ const Tt = $ + J.length;
958
+ c.focus(), c.setSelectionRange(Tt, Tt);
959
959
  }
960
960
  });
961
961
  } catch {
962
- K.error("图片上传失败");
962
+ q.error("图片上传失败");
963
963
  } finally {
964
- z();
964
+ U();
965
965
  }
966
966
  },
967
967
  [ce, Be]
968
- ), Ca = R(
968
+ ), ka = R(
969
969
  async (s) => {
970
970
  var $, W;
971
971
  const c = ($ = s.clipboardData) == null ? void 0 : $.items;
972
972
  if (!c) return;
973
- const p = [];
974
- for (let z = 0; z < c.length; z++) {
975
- const Z = c[z];
973
+ const f = [];
974
+ for (let U = 0; U < c.length; U++) {
975
+ const Z = c[U];
976
976
  if (Z.kind === "file" && Z.type.startsWith("image/")) {
977
977
  const J = Z.getAsFile();
978
- J && p.push(J);
978
+ J && f.push(J);
979
979
  }
980
980
  }
981
- if (p.length > 0) {
981
+ if (f.length > 0) {
982
982
  s.preventDefault();
983
- for (const z of p)
984
- await dt(z);
983
+ for (const U of f)
984
+ await dt(U);
985
985
  return;
986
986
  }
987
987
  const h = (W = s.clipboardData.getData("text/plain")) == null ? void 0 : W.trim();
@@ -989,35 +989,35 @@ function rd({
989
989
  h
990
990
  )) {
991
991
  s.preventDefault();
992
- const z = s.currentTarget, Z = _e.current;
992
+ const U = s.currentTarget, Z = _e.current;
993
993
  if (!Z) return;
994
994
  const J = Me.current.find((It) => It.id === Z);
995
995
  if (!J) return;
996
- const Oe = z.selectionStart, kt = z.selectionEnd, In = `
996
+ const Oe = U.selectionStart, Tt = U.selectionEnd, In = `
997
997
  ![](${h})
998
- `, Ea = J.content.slice(0, Oe) + In + J.content.slice(kt);
998
+ `, Fa = J.content.slice(0, Oe) + In + J.content.slice(Tt);
999
999
  ce(Z, {
1000
- content: Ea,
1000
+ content: Fa,
1001
1001
  dirty: !0,
1002
1002
  saveStatus: "unsaved"
1003
1003
  }), Be(), requestAnimationFrame(() => {
1004
1004
  const It = Oe + In.length;
1005
- z.focus(), z.setSelectionRange(It, It);
1005
+ U.focus(), U.setSelectionRange(It, It);
1006
1006
  });
1007
1007
  }
1008
1008
  },
1009
1009
  [dt, ce, Be]
1010
- ), Na = R(
1010
+ ), Ta = R(
1011
1011
  (s) => {
1012
1012
  var h;
1013
1013
  const c = (h = s.dataTransfer) == null ? void 0 : h.files;
1014
1014
  if (!c || c.length === 0) return;
1015
- const p = Array.from(c).filter(
1015
+ const f = Array.from(c).filter(
1016
1016
  ($) => $.type.startsWith("image/")
1017
1017
  );
1018
- if (p.length !== 0) {
1018
+ if (f.length !== 0) {
1019
1019
  s.preventDefault();
1020
- for (const $ of p)
1020
+ for (const $ of f)
1021
1021
  dt($);
1022
1022
  }
1023
1023
  },
@@ -1031,14 +1031,14 @@ function rd({
1031
1031
  dirty: !0,
1032
1032
  saveStatus: "unsaved"
1033
1033
  }), Be();
1034
- const p = He.current;
1035
- p && requestAnimationFrame(() => {
1036
- p.focus(), p.setSelectionRange(s.selectFrom, s.selectTo);
1034
+ const f = He.current;
1035
+ f && requestAnimationFrame(() => {
1036
+ f.focus(), f.setSelectionRange(s.selectFrom, s.selectTo);
1037
1037
  });
1038
1038
  },
1039
1039
  [ce, Be]
1040
1040
  ), le = R(
1041
- (s, c, p, h) => /* @__PURE__ */ o(ze, { title: p, children: /* @__PURE__ */ o(
1041
+ (s, c, f, h) => /* @__PURE__ */ o(Ue, { title: f, children: /* @__PURE__ */ o(
1042
1042
  se,
1043
1043
  {
1044
1044
  size: "small",
@@ -1050,25 +1050,25 @@ function rd({
1050
1050
  ) }, s),
1051
1051
  []
1052
1052
  ), $e = R(
1053
- (s, c, p) => {
1053
+ (s, c, f) => {
1054
1054
  const h = He.current;
1055
1055
  h && Re(
1056
- Us(
1056
+ Ws(
1057
1057
  h.value,
1058
1058
  h.selectionStart,
1059
1059
  h.selectionEnd,
1060
1060
  s,
1061
1061
  c,
1062
- p
1062
+ f
1063
1063
  )
1064
1064
  );
1065
1065
  },
1066
1066
  [Re]
1067
- ), Ke = R(
1067
+ ), qe = R(
1068
1068
  (s) => {
1069
1069
  const c = He.current;
1070
1070
  c && Re(
1071
- zs(c.value, c.selectionStart, c.selectionEnd, s)
1071
+ Hs(c.value, c.selectionStart, c.selectionEnd, s)
1072
1072
  );
1073
1073
  },
1074
1074
  [Re]
@@ -1078,51 +1078,51 @@ function rd({
1078
1078
  c && Re(Mn(c.value, c.selectionStart, c.selectionEnd, s));
1079
1079
  },
1080
1080
  [Re]
1081
- ), Ta = R(
1081
+ ), Ia = R(
1082
1082
  (s) => {
1083
- const c = s.currentTarget, p = s.ctrlKey || s.metaKey;
1083
+ const c = s.currentTarget, f = s.ctrlKey || s.metaKey;
1084
1084
  if (s.key === "Tab") {
1085
1085
  s.preventDefault();
1086
1086
  const { selectionStart: h, selectionEnd: $ } = c;
1087
1087
  if (s.shiftKey) {
1088
- const z = c.value.slice(0, h).lastIndexOf(`
1089
- `) + 1, J = c.value.slice(z, $).split(`
1088
+ const U = c.value.slice(0, h).lastIndexOf(`
1089
+ `) + 1, J = c.value.slice(U, $).split(`
1090
1090
  `).map((Oe) => Oe.startsWith(" ") ? Oe.slice(2) : Oe.replace(/^ /, "")).join(`
1091
1091
  `);
1092
1092
  Re({
1093
- content: c.value.slice(0, z) + J + c.value.slice($),
1094
- selectFrom: z,
1095
- selectTo: z + J.length
1093
+ content: c.value.slice(0, U) + J + c.value.slice($),
1094
+ selectFrom: U,
1095
+ selectTo: U + J.length
1096
1096
  });
1097
1097
  } else
1098
1098
  Re(Mn(c.value, h, $, " "));
1099
1099
  return;
1100
1100
  }
1101
- p && !s.shiftKey && s.key.toLowerCase() === "b" ? (s.preventDefault(), $e("**", "**", "加粗")) : p && !s.shiftKey && s.key.toLowerCase() === "i" ? (s.preventDefault(), $e("*", "*", "斜体")) : p && !s.shiftKey && s.key.toLowerCase() === "k" ? (s.preventDefault(), $e("[", "](url)", "链接文本")) : p && s.key.toLowerCase() === "s" && (s.preventDefault(), Ue());
1101
+ f && !s.shiftKey && s.key.toLowerCase() === "b" ? (s.preventDefault(), $e("**", "**", "加粗")) : f && !s.shiftKey && s.key.toLowerCase() === "i" ? (s.preventDefault(), $e("*", "*", "斜体")) : f && !s.shiftKey && s.key.toLowerCase() === "k" ? (s.preventDefault(), $e("[", "](url)", "链接文本")) : f && s.key.toLowerCase() === "s" && (s.preventDefault(), ze());
1102
1102
  },
1103
- [Re, $e, Ue]
1104
- ), Kt = B(
1105
- () => Bs(Ht, Ye),
1103
+ [Re, $e, ze]
1104
+ ), qt = B(
1105
+ () => Us(Ht, Ye),
1106
1106
  [Ht, Ye]
1107
- ), Qe = Kt.text, Ct = B(() => Ws(Qe), [Qe]), ka = R(
1107
+ ), Qe = qt.text, Nt = B(() => Ks(Qe), [Qe]), $a = R(
1108
1108
  (s) => {
1109
- var c, p;
1110
- if (ke === "edit") {
1109
+ var c, f;
1110
+ if (Te === "edit") {
1111
1111
  const h = He.current;
1112
1112
  if (h) {
1113
1113
  h.focus();
1114
- const $ = s.offset + Kt.offset;
1114
+ const $ = s.offset + qt.offset;
1115
1115
  h.setSelectionRange($, $);
1116
1116
  }
1117
1117
  } else {
1118
1118
  const h = (c = Bt.current) == null ? void 0 : c.querySelectorAll(
1119
1119
  "h1,h2,h3,h4,h5,h6"
1120
1120
  );
1121
- (p = h == null ? void 0 : h[s.index]) == null || p.scrollIntoView({ behavior: "smooth" });
1121
+ (f = h == null ? void 0 : h[s.index]) == null || f.scrollIntoView({ behavior: "smooth" });
1122
1122
  }
1123
1123
  },
1124
- [ke, Kt.offset]
1125
- ), Ia = R(() => {
1124
+ [Te, qt.offset]
1125
+ ), xa = R(() => {
1126
1126
  const s = Bt.current;
1127
1127
  if (!s) return;
1128
1128
  const c = s.querySelectorAll(
@@ -1132,92 +1132,92 @@ function rd({
1132
1132
  Ge(-1);
1133
1133
  return;
1134
1134
  }
1135
- const p = s.getBoundingClientRect().top + 32;
1135
+ const f = s.getBoundingClientRect().top + 32;
1136
1136
  let h = -1;
1137
1137
  c.forEach(($, W) => {
1138
- $.getBoundingClientRect().top <= p && (h = W);
1138
+ $.getBoundingClientRect().top <= f && (h = W);
1139
1139
  }), Ge(h);
1140
1140
  }, []), Sn = B(
1141
- () => As(i, V, f),
1142
- [i, V, f]
1143
- ), Nt = B(
1144
- () => Ds(Sn, X),
1141
+ () => Rs(i, V, p),
1142
+ [i, V, p]
1143
+ ), Ct = B(
1144
+ () => Os(Sn, X),
1145
1145
  [Sn, X]
1146
1146
  ), wn = B(
1147
- () => sa(Nt, A),
1148
- [Nt, A]
1147
+ () => sa(Ct, A),
1148
+ [Ct, A]
1149
1149
  ), Xe = B(
1150
1150
  () => la(wn, me, A),
1151
1151
  [wn, me, A]
1152
- ), $a = B(
1153
- () => Es(Nt),
1154
- [Nt]
1155
- ), ut = B(() => Rs(i), [i]), Cn = B(() => {
1152
+ ), La = B(
1153
+ () => Fs(Ct),
1154
+ [Ct]
1155
+ ), ut = B(() => Es(i), [i]), Nn = B(() => {
1156
1156
  const s = X.trim().toLowerCase();
1157
1157
  return s ? ut.filter(
1158
1158
  (c) => (c.node.title || "").toLowerCase().includes(s) || c.path.join("/").toLowerCase().includes(s)
1159
1159
  ) : ut;
1160
- }, [ut, X]), Nn = B(() => {
1160
+ }, [ut, X]), Cn = B(() => {
1161
1161
  const s = X.trim().toLowerCase();
1162
1162
  return s ? te.filter(
1163
1163
  (c) => (c.title || "").toLowerCase().includes(s)
1164
1164
  ) : te;
1165
- }, [te, X]), Tn = B(() => q ? Pn(i, q).slice(0, -1) : [], [i, q]), Tt = B(() => {
1166
- if (!q) return null;
1167
- const s = Pn(i, q);
1165
+ }, [te, X]), kn = B(() => K ? Pn(i, K).slice(0, -1) : [], [i, K]), kt = B(() => {
1166
+ if (!K) return null;
1167
+ const s = Pn(i, K);
1168
1168
  return s.length > 0 ? s[s.length - 1] : null;
1169
- }, [i, q]), Ze = B(
1170
- () => q ? ye.has(String(q)) : !1,
1171
- [q, ye]
1172
- ), xa = R(
1169
+ }, [i, K]), Ze = B(
1170
+ () => K ? ye.has(String(K)) : !1,
1171
+ [K, ye]
1172
+ ), Aa = R(
1173
1173
  async (s) => {
1174
1174
  if (Lt(s.dragNode.key) || tt(s.dragNode.key))
1175
1175
  return;
1176
1176
  const c = et(s.dragNode.key);
1177
1177
  if (c === "" || c === "0") return;
1178
- const p = nn(Xe, s.dragNode.key), h = p == null ? void 0 : p.userId, $ = et(s.node.key);
1178
+ const f = nn(Xe, s.dragNode.key), h = f == null ? void 0 : f.userId, $ = et(s.node.key);
1179
1179
  let W;
1180
1180
  if (tt(s.node.key)) {
1181
- const z = Bn(s.node.key);
1182
- if (h && z && h !== z) {
1183
- K.warning("不能将笔记移动到其他人的目录下");
1181
+ const U = Bn(s.node.key);
1182
+ if (h && U && h !== U) {
1183
+ q.warning("不能将笔记移动到其他人的目录下");
1184
1184
  return;
1185
1185
  }
1186
- W = Ce;
1186
+ W = Ne;
1187
1187
  } else if (Lt(s.node.key)) {
1188
- K.info("分组标题不是移动目标,请展开分组后拖到具体文件夹/文档上落位");
1188
+ q.info("分组标题不是移动目标,请展开分组后拖到具体文件夹/文档上落位");
1189
1189
  return;
1190
1190
  } else {
1191
- const z = $, Z = nn(Xe, z);
1191
+ const U = $, Z = nn(Xe, U);
1192
1192
  if (h && (Z != null && Z.userId) && h !== Z.userId) {
1193
- K.warning("不能将笔记移动到其他人的目录下");
1193
+ q.warning("不能将笔记移动到其他人的目录下");
1194
1194
  return;
1195
1195
  }
1196
1196
  if (!s.dropToGap)
1197
- W = z;
1197
+ W = U;
1198
1198
  else {
1199
- const J = ia(Xe, z);
1199
+ const J = ia(Xe, U);
1200
1200
  if (J && J.type === "owner")
1201
- W = Ce;
1201
+ W = Ne;
1202
1202
  else if (J && J.type === "group") {
1203
- K.info("拖到分组内两行之间不会移动,请直接拖到目标文件夹/文档上落位");
1203
+ q.info("拖到分组内两行之间不会移动,请直接拖到目标文件夹/文档上落位");
1204
1204
  return;
1205
1205
  } else
1206
- W = J ? J.id : Ce;
1206
+ W = J ? J.id : Ne;
1207
1207
  }
1208
1208
  }
1209
1209
  if (!yt(W, c))
1210
1210
  try {
1211
- await $r(c, { parentId: W, sortOrder: 0 }, r), await we(), K.success("已移动");
1211
+ await Lr(c, { parentId: W, sortOrder: 0 }, r), await we(), q.success("已移动");
1212
1212
  } catch {
1213
- K.error("移动失败");
1213
+ q.error("移动失败");
1214
1214
  }
1215
1215
  },
1216
1216
  [r, Xe, we]
1217
- ), La = B(
1217
+ ), Da = B(
1218
1218
  () => Qe.replace(/\s/g, "").length,
1219
1219
  [Qe]
1220
- ), Aa = qe === "unsaved" ? "未保存" : qe === "saving" ? "保存中…" : qe === "saved" ? "已保存" : qe === "error" ? "保存失败" : "已就绪", Da = R(
1220
+ ), Ra = Ke === "unsaved" ? "未保存" : Ke === "saving" ? "保存中…" : Ke === "saved" ? "已保存" : Ke === "error" ? "保存失败" : "已就绪", Oa = R(
1221
1221
  (s) => {
1222
1222
  var Z;
1223
1223
  if (Lt(s.key)) {
@@ -1237,7 +1237,7 @@ function rd({
1237
1237
  label: "新建文件夹",
1238
1238
  onClick: () => {
1239
1239
  Ae({
1240
- parentId: Ce,
1240
+ parentId: Ne,
1241
1241
  type: "folder",
1242
1242
  ownerUserId: J
1243
1243
  }), Ie("");
@@ -1249,7 +1249,7 @@ function rd({
1249
1249
  label: "新建文档",
1250
1250
  onClick: () => {
1251
1251
  Ae({
1252
- parentId: Ce,
1252
+ parentId: Ne,
1253
1253
  type: "note",
1254
1254
  ownerUserId: J
1255
1255
  }), Ie("");
@@ -1261,7 +1261,7 @@ function rd({
1261
1261
  /* @__PURE__ */ o("span", { className: d.treeLabel, children: s.title })
1262
1262
  ] }) });
1263
1263
  }
1264
- const c = s.id, p = s.type, h = s.title, $ = ge.find((J) => J.id === c), W = ye.has(String(c));
1264
+ const c = s.id, f = s.type, h = s.title, $ = ge.find((J) => J.id === c), W = ye.has(String(c));
1265
1265
  return /* @__PURE__ */ o($t, { menu: {
1266
1266
  items: [
1267
1267
  {
@@ -1301,7 +1301,7 @@ function rd({
1301
1301
  icon: /* @__PURE__ */ o(Zt, {}),
1302
1302
  label: "删除",
1303
1303
  danger: !0,
1304
- onClick: () => qt(c, h)
1304
+ onClick: () => Kt(c, h)
1305
1305
  }
1306
1306
  ]
1307
1307
  }, trigger: ["contextMenu"], children: /* @__PURE__ */ y(
@@ -1313,8 +1313,8 @@ function rd({
1313
1313
  /* @__PURE__ */ o(
1314
1314
  "span",
1315
1315
  {
1316
- className: `${d.treeIcon} ${p === "folder" ? d.treeIconFolder : d.treeIconDoc}`,
1317
- children: p === "folder" ? /* @__PURE__ */ o(Pa, {}) : /* @__PURE__ */ o(jt, {})
1316
+ className: `${d.treeIcon} ${f === "folder" ? d.treeIconFolder : d.treeIconDoc}`,
1317
+ children: f === "folder" ? /* @__PURE__ */ o(Ma, {}) : /* @__PURE__ */ o(jt, {})
1318
1318
  }
1319
1319
  ),
1320
1320
  /* @__PURE__ */ o("span", { className: d.treeLabel, children: Yt(h, X) }),
@@ -1328,20 +1328,20 @@ function rd({
1328
1328
  }
1329
1329
  ) });
1330
1330
  },
1331
- [qt, wt, b, ge, ye, X]
1332
- ), kn = ke === "edit" || ke === "split", Ra = R(
1331
+ [Kt, wt, b, ge, ye, X]
1332
+ ), Tn = Te === "edit" || Te === "split", Ea = R(
1333
1333
  (s) => {
1334
1334
  s.preventDefault();
1335
- const c = s.clientX, p = Mt, h = (W) => {
1336
- const z = W.clientX - c;
1337
- ha(Math.min(Math.max(p + z, 200), 600));
1335
+ const c = s.clientX, f = Mt, h = (W) => {
1336
+ const U = W.clientX - c;
1337
+ ga(Math.min(Math.max(f + U, 200), 600));
1338
1338
  }, $ = () => {
1339
1339
  document.removeEventListener("mousemove", h), document.removeEventListener("mouseup", $);
1340
1340
  };
1341
1341
  document.addEventListener("mousemove", h), document.addEventListener("mouseup", $);
1342
1342
  },
1343
1343
  [Mt]
1344
- ), Oa = /* @__PURE__ */ y("div", { className: d.viewPanel, children: [
1344
+ ), Pa = /* @__PURE__ */ y("div", { className: d.viewPanel, children: [
1345
1345
  /* @__PURE__ */ y("div", { className: d.viewPanelSection, children: [
1346
1346
  /* @__PURE__ */ o("div", { className: d.viewPanelLabel, children: "分组" }),
1347
1347
  /* @__PURE__ */ o("div", { className: d.tagList, children: [
@@ -1349,14 +1349,14 @@ function rd({
1349
1349
  { key: "bind", label: "绑定" },
1350
1350
  { key: "time", label: "时间" }
1351
1351
  ].map((s) => {
1352
- const c = me.indexOf(s.key), p = c >= 0;
1352
+ const c = me.indexOf(s.key), f = c >= 0;
1353
1353
  return /* @__PURE__ */ y(
1354
1354
  "button",
1355
1355
  {
1356
- className: `${d.tagChip} ${p ? d.tagChipActive : ""}`,
1357
- onClick: () => _a(s.key),
1356
+ className: `${d.tagChip} ${f ? d.tagChipActive : ""}`,
1357
+ onClick: () => va(s.key),
1358
1358
  children: [
1359
- p && /* @__PURE__ */ o("span", { className: d.tagOrder, children: c + 1 }),
1359
+ f && /* @__PURE__ */ o("span", { className: d.tagOrder, children: c + 1 }),
1360
1360
  s.label
1361
1361
  ]
1362
1362
  },
@@ -1371,17 +1371,17 @@ function rd({
1371
1371
  { key: "title", label: "标题" },
1372
1372
  { key: "sort_order", label: "序号" }
1373
1373
  ].map((s) => {
1374
- const c = A.findIndex(($) => $.dim === s.key), p = c >= 0, h = p ? A[c].order : void 0;
1374
+ const c = A.findIndex(($) => $.dim === s.key), f = c >= 0, h = f ? A[c].order : void 0;
1375
1375
  return /* @__PURE__ */ y(
1376
1376
  "button",
1377
1377
  {
1378
- className: `${d.tagChip} ${d.tagChipSort} ${p ? d.tagChipActive : ""}`,
1379
- title: p ? h === "asc" ? "升序(再次点击切换/取消)" : "降序(再次点击切换/取消)" : "点击排序",
1380
- onClick: () => ba(s.key),
1378
+ className: `${d.tagChip} ${d.tagChipSort} ${f ? d.tagChipActive : ""}`,
1379
+ title: f ? h === "asc" ? "升序(再次点击切换/取消)" : "降序(再次点击切换/取消)" : "点击排序",
1380
+ onClick: () => Sa(s.key),
1381
1381
  children: [
1382
- p && /* @__PURE__ */ o("span", { className: d.tagOrder, children: c + 1 }),
1382
+ f && /* @__PURE__ */ o("span", { className: d.tagOrder, children: c + 1 }),
1383
1383
  s.label,
1384
- p && /* @__PURE__ */ o("span", { className: d.tagSortArrow, children: h === "asc" ? "↑" : "↓" })
1384
+ f && /* @__PURE__ */ o("span", { className: d.tagSortArrow, children: h === "asc" ? "↑" : "↓" })
1385
1385
  ]
1386
1386
  },
1387
1387
  s.key
@@ -1398,7 +1398,7 @@ function rd({
1398
1398
  ].map((s) => /* @__PURE__ */ o(
1399
1399
  "button",
1400
1400
  {
1401
- className: `${d.tagChip} ${f === s.key ? d.tagChipActive : ""}`,
1401
+ className: `${d.tagChip} ${p === s.key ? d.tagChipActive : ""}`,
1402
1402
  onClick: () => L(s.key),
1403
1403
  children: s.label
1404
1404
  },
@@ -1416,21 +1416,21 @@ function rd({
1416
1416
  " 篇"
1417
1417
  ] }),
1418
1418
  /* @__PURE__ */ o(
1419
- rr,
1419
+ sr,
1420
1420
  {
1421
1421
  open: H,
1422
- onOpenChange: fe,
1422
+ onOpenChange: pe,
1423
1423
  trigger: "click",
1424
1424
  placement: "bottomRight",
1425
1425
  overlayClassName: d.viewPopover,
1426
- content: Oa,
1426
+ content: Pa,
1427
1427
  children: /* @__PURE__ */ o(
1428
1428
  se,
1429
1429
  {
1430
1430
  size: "small",
1431
1431
  type: "text",
1432
1432
  className: d.railIconBtn,
1433
- icon: /* @__PURE__ */ o(Fa, {}),
1433
+ icon: /* @__PURE__ */ o(Ba, {}),
1434
1434
  title: "视图设置"
1435
1435
  }
1436
1436
  )
@@ -1444,7 +1444,7 @@ function rd({
1444
1444
  allowClear: !0,
1445
1445
  value: X,
1446
1446
  placeholder: "搜索文档",
1447
- prefix: /* @__PURE__ */ o(Ma, { className: d.railSearchIcon }),
1447
+ prefix: /* @__PURE__ */ o(za, { className: d.railSearchIcon }),
1448
1448
  onChange: (s) => Fe(s.target.value)
1449
1449
  }
1450
1450
  ),
@@ -1459,7 +1459,7 @@ function rd({
1459
1459
  title: "新建文档",
1460
1460
  onClick: () => {
1461
1461
  Ae({
1462
- parentId: b ?? Ce,
1462
+ parentId: b ?? Ne,
1463
1463
  type: "note",
1464
1464
  ownerUserId: b == null ? x ?? void 0 : void 0
1465
1465
  }), Ie("");
@@ -1476,7 +1476,7 @@ function rd({
1476
1476
  title: "新建文件夹",
1477
1477
  onClick: () => {
1478
1478
  Ae({
1479
- parentId: b ?? Ce,
1479
+ parentId: b ?? Ne,
1480
1480
  type: "folder",
1481
1481
  ownerUserId: b == null ? x ?? void 0 : void 0
1482
1482
  }), Ie("");
@@ -1494,14 +1494,14 @@ function rd({
1494
1494
  "button",
1495
1495
  {
1496
1496
  className: `${d.tagChip} ${V === s.key ? d.tagChipActive : ""}`,
1497
- onClick: () => T(V === s.key ? "all" : s.key),
1497
+ onClick: () => k(V === s.key ? "all" : s.key),
1498
1498
  children: s.label
1499
1499
  },
1500
1500
  s.key
1501
1501
  )) }) }),
1502
1502
  /* @__PURE__ */ o("div", { className: d.treeWrap, children: G === "all" ? (
1503
1503
  /* ── 全部文档(语雀的「全部文档」清单视图)── */
1504
- Cn.length === 0 ? /* @__PURE__ */ o("div", { className: d.emptyHint, children: X ? "没有匹配的文档" : "还没有文档" }) : /* @__PURE__ */ o("div", { className: d.docList, children: Cn.map((s) => /* @__PURE__ */ y(
1504
+ Nn.length === 0 ? /* @__PURE__ */ o("div", { className: d.emptyHint, children: X ? "没有匹配的文档" : "还没有文档" }) : /* @__PURE__ */ o("div", { className: d.docList, children: Nn.map((s) => /* @__PURE__ */ y(
1505
1505
  "div",
1506
1506
  {
1507
1507
  className: d.docListRow,
@@ -1523,7 +1523,7 @@ function rd({
1523
1523
  )) })
1524
1524
  ) : G === "fav" ? (
1525
1525
  /* ── 收藏夹 ── */
1526
- Nn.length === 0 ? /* @__PURE__ */ o("div", { className: d.emptyHint, children: X ? "没有匹配的收藏" : "还没有收藏" }) : /* @__PURE__ */ o("div", { className: d.docList, children: Nn.map((s) => /* @__PURE__ */ y(
1526
+ Cn.length === 0 ? /* @__PURE__ */ o("div", { className: d.emptyHint, children: X ? "没有匹配的收藏" : "还没有收藏" }) : /* @__PURE__ */ o("div", { className: d.docList, children: Cn.map((s) => /* @__PURE__ */ y(
1527
1527
  "div",
1528
1528
  {
1529
1529
  className: d.docListRow,
@@ -1549,8 +1549,8 @@ function rd({
1549
1549
  description: "暂无笔记",
1550
1550
  image: xt.PRESENTED_IMAGE_SIMPLE
1551
1551
  }
1552
- ) : $a === 0 ? /* @__PURE__ */ o("div", { className: d.emptyHint, children: "无匹配内容,请调整过滤条件" }) : /* @__PURE__ */ o(
1553
- or,
1552
+ ) : La === 0 ? /* @__PURE__ */ o("div", { className: d.emptyHint, children: "无匹配内容,请调整过滤条件" }) : /* @__PURE__ */ o(
1553
+ ir,
1554
1554
  {
1555
1555
  treeData: Xe,
1556
1556
  expandedKeys: N,
@@ -1560,20 +1560,20 @@ function rd({
1560
1560
  if (s.length === 0) return;
1561
1561
  const c = s[0];
1562
1562
  if (Lt(c) || tt(c)) {
1563
- tt(c) && (S(Bn(c) ?? null), k(null)), N.includes(c) ? g(($) => $.filter((W) => W !== c)) : g(($) => [...$, c]);
1563
+ tt(c) && (v(Bn(c) ?? null), T(null)), N.includes(c) ? g(($) => $.filter((W) => W !== c)) : g(($) => [...$, c]);
1564
1564
  return;
1565
1565
  }
1566
- const p = ca(Xe, et(c));
1567
- if (p && p.type === "folder") {
1568
- N.includes(c) ? g(($) => $.filter((W) => W !== c)) : g(($) => [...$, c]), k(null), S(null);
1566
+ const f = ca(Xe, et(c));
1567
+ if (f && f.type === "folder") {
1568
+ N.includes(c) ? g(($) => $.filter((W) => W !== c)) : g(($) => [...$, c]), T(null), v(null);
1569
1569
  return;
1570
1570
  }
1571
1571
  const h = et(c);
1572
- S(null), h !== "" && h !== "0" && De(h);
1572
+ v(null), h !== "" && h !== "0" && De(h);
1573
1573
  },
1574
- titleRender: Da,
1574
+ titleRender: Oa,
1575
1575
  draggable: !0,
1576
- onDrop: xa,
1576
+ onDrop: Aa,
1577
1577
  blockNode: !0
1578
1578
  }
1579
1579
  ) }),
@@ -1586,7 +1586,7 @@ function rd({
1586
1586
  title: "全部文档",
1587
1587
  onClick: () => he((s) => s === "all" ? "tree" : "all"),
1588
1588
  children: [
1589
- /* @__PURE__ */ o(Ba, { className: d.railFootIcon }),
1589
+ /* @__PURE__ */ o(Ua, { className: d.railFootIcon }),
1590
1590
  /* @__PURE__ */ o("span", { className: d.railFootLabel, children: "全部文档" }),
1591
1591
  /* @__PURE__ */ o("span", { className: d.railFootCount, children: ut.length })
1592
1592
  ]
@@ -1608,14 +1608,14 @@ function rd({
1608
1608
  )
1609
1609
  ] })
1610
1610
  ] }),
1611
- /* @__PURE__ */ o("div", { className: d.resizer, onMouseDown: Ra }),
1611
+ /* @__PURE__ */ o("div", { className: d.resizer, onMouseDown: Ea }),
1612
1612
  /* @__PURE__ */ y("div", { className: d.main, children: [
1613
1613
  ge.length > 0 && /* @__PURE__ */ o("div", { className: d.tabBar, children: ge.map((s) => /* @__PURE__ */ y(
1614
1614
  "div",
1615
1615
  {
1616
- className: `${d.tabItem} ${s.id === q ? d.tabItemActive : ""}`,
1616
+ className: `${d.tabItem} ${s.id === K ? d.tabItemActive : ""}`,
1617
1617
  onClick: () => {
1618
- it(s.id), k(s.id), S(null);
1618
+ it(s.id), T(s.id), v(null);
1619
1619
  },
1620
1620
  children: [
1621
1621
  /* @__PURE__ */ o(
@@ -1626,11 +1626,11 @@ function rd({
1626
1626
  ),
1627
1627
  /* @__PURE__ */ o("span", { className: d.tabTitle, children: s.title }),
1628
1628
  /* @__PURE__ */ o(
1629
- Ua,
1629
+ Wa,
1630
1630
  {
1631
1631
  className: d.tabClose,
1632
1632
  onClick: (c) => {
1633
- c.stopPropagation(), va(s.id);
1633
+ c.stopPropagation(), wa(s.id);
1634
1634
  }
1635
1635
  }
1636
1636
  )
@@ -1638,11 +1638,11 @@ function rd({
1638
1638
  },
1639
1639
  s.id
1640
1640
  )) }),
1641
- fa ? /* @__PURE__ */ o("div", { className: d.centerSpin, children: /* @__PURE__ */ o(en, {}) }) : oe ? /* @__PURE__ */ y(ot, { children: [
1641
+ ha ? /* @__PURE__ */ o("div", { className: d.centerSpin, children: /* @__PURE__ */ o(en, {}) }) : oe ? /* @__PURE__ */ y(ot, { children: [
1642
1642
  /* @__PURE__ */ y("div", { className: d.docHead, children: [
1643
- Tn.length > 0 && /* @__PURE__ */ y("div", { className: d.breadcrumb, children: [
1643
+ kn.length > 0 && /* @__PURE__ */ y("div", { className: d.breadcrumb, children: [
1644
1644
  /* @__PURE__ */ o("span", { className: d.breadcrumbRoot, children: "个人笔记" }),
1645
- Tn.map((s) => /* @__PURE__ */ y("span", { className: d.breadcrumbItem, children: [
1645
+ kn.map((s) => /* @__PURE__ */ y("span", { className: d.breadcrumbItem, children: [
1646
1646
  /* @__PURE__ */ o("span", { className: d.breadcrumbSep, children: "/" }),
1647
1647
  s.title
1648
1648
  ] }, s.id))
@@ -1653,7 +1653,7 @@ function rd({
1653
1653
  {
1654
1654
  value: Ye,
1655
1655
  onChange: (s) => {
1656
- q && (ce(q, {
1656
+ K && (ce(K, {
1657
1657
  title: s.target.value,
1658
1658
  dirty: !0,
1659
1659
  saveStatus: "unsaved"
@@ -1668,14 +1668,14 @@ function rd({
1668
1668
  try {
1669
1669
  const s = oe != null && oe.extraInfo ? JSON.parse(oe.extraInfo) : null;
1670
1670
  if ((s == null ? void 0 : s.type) === "team" && (s != null && s.id))
1671
- return /* @__PURE__ */ o(ze, { title: "跳转到群聊", children: /* @__PURE__ */ o(
1671
+ return /* @__PURE__ */ o(Ue, { title: "跳转到群聊", children: /* @__PURE__ */ o(
1672
1672
  se,
1673
1673
  {
1674
1674
  size: "small",
1675
1675
  type: "text",
1676
1676
  icon: /* @__PURE__ */ o(xn, {}),
1677
1677
  title: "跳转到群聊",
1678
- onClick: () => e ? e(et(s.id), !0) : pr.push(`/workspace?projectId=${s.id}`)
1678
+ onClick: () => e ? e(et(s.id), !0) : yr.push(`/workspace?projectId=${s.id}`)
1679
1679
  }
1680
1680
  ) });
1681
1681
  } catch {
@@ -1685,7 +1685,7 @@ function rd({
1685
1685
  t ? /* @__PURE__ */ o(
1686
1686
  $t,
1687
1687
  {
1688
- open: pe,
1688
+ open: fe,
1689
1689
  onOpenChange: ee,
1690
1690
  trigger: ["click"],
1691
1691
  menu: {
@@ -1699,9 +1699,9 @@ function rd({
1699
1699
  onClick: () => {
1700
1700
  ee(!1), t(s.id);
1701
1701
  },
1702
- children: Or(
1702
+ children: Pr(
1703
1703
  s,
1704
- ya
1704
+ _a
1705
1705
  )
1706
1706
  }
1707
1707
  )
@@ -1718,7 +1718,7 @@ function rd({
1718
1718
  label: de ? "创建中…" : "从本笔记新建待办",
1719
1719
  disabled: de,
1720
1720
  onClick: () => {
1721
- wa();
1721
+ Ca();
1722
1722
  }
1723
1723
  }
1724
1724
  ]
@@ -1734,7 +1734,7 @@ function rd({
1734
1734
  )
1735
1735
  }
1736
1736
  ) : null,
1737
- /* @__PURE__ */ o(ze, { title: Ze ? "取消收藏" : "收藏", children: /* @__PURE__ */ o(
1737
+ /* @__PURE__ */ o(Ue, { title: Ze ? "取消收藏" : "收藏", children: /* @__PURE__ */ o(
1738
1738
  se,
1739
1739
  {
1740
1740
  size: "small",
@@ -1746,7 +1746,7 @@ function rd({
1746
1746
  onClick: () => void bn()
1747
1747
  }
1748
1748
  ) }),
1749
- /* @__PURE__ */ o(ze, { title: "分享链接", children: /* @__PURE__ */ o(
1749
+ /* @__PURE__ */ o(Ue, { title: "分享链接", children: /* @__PURE__ */ o(
1750
1750
  se,
1751
1751
  {
1752
1752
  size: "small",
@@ -1757,14 +1757,14 @@ function rd({
1757
1757
  onClick: () => void _n()
1758
1758
  }
1759
1759
  ) }),
1760
- /* @__PURE__ */ o(ze, { title: "大纲", children: /* @__PURE__ */ o(
1760
+ /* @__PURE__ */ o(Ue, { title: "大纲", children: /* @__PURE__ */ o(
1761
1761
  se,
1762
1762
  {
1763
1763
  size: "small",
1764
1764
  type: dn ? "primary" : "text",
1765
- icon: /* @__PURE__ */ o(za, {}),
1765
+ icon: /* @__PURE__ */ o(Ha, {}),
1766
1766
  title: "大纲",
1767
- onClick: () => pa((s) => !s)
1767
+ onClick: () => ya((s) => !s)
1768
1768
  }
1769
1769
  ) }),
1770
1770
  /* @__PURE__ */ o(
@@ -1778,7 +1778,7 @@ function rd({
1778
1778
  icon: /* @__PURE__ */ o(Dn, {}),
1779
1779
  label: "重命名",
1780
1780
  onClick: () => {
1781
- bt({ id: q, title: Ye }), lt(Ye);
1781
+ bt({ id: K, title: Ye }), lt(Ye);
1782
1782
  }
1783
1783
  },
1784
1784
  {
@@ -1803,7 +1803,7 @@ function rd({
1803
1803
  label: "删除",
1804
1804
  danger: !0,
1805
1805
  onClick: () => {
1806
- q && qt(q, Ye);
1806
+ K && Kt(K, Ye);
1807
1807
  }
1808
1808
  }
1809
1809
  ]
@@ -1813,7 +1813,7 @@ function rd({
1813
1813
  {
1814
1814
  size: "small",
1815
1815
  type: "text",
1816
- icon: /* @__PURE__ */ o(Wa, {}),
1816
+ icon: /* @__PURE__ */ o(Ka, {}),
1817
1817
  title: "更多操作"
1818
1818
  }
1819
1819
  )
@@ -1825,8 +1825,8 @@ function rd({
1825
1825
  size: "small",
1826
1826
  type: "primary",
1827
1827
  title: "保存",
1828
- loading: qe === "saving",
1829
- onClick: () => void Ue(),
1828
+ loading: Ke === "saving",
1829
+ onClick: () => void ze(),
1830
1830
  children: "保存"
1831
1831
  }
1832
1832
  )
@@ -1834,29 +1834,29 @@ function rd({
1834
1834
  ] }),
1835
1835
  /* @__PURE__ */ y("div", { className: d.docMeta, children: [
1836
1836
  /* @__PURE__ */ y("span", { className: d.docMetaItem, children: [
1837
- /* @__PURE__ */ o(Ha, {}),
1838
- Tt != null && Tt.updateTime ? `最后编辑 ${Tt.updateTime}` : "尚未保存"
1837
+ /* @__PURE__ */ o(qa, {}),
1838
+ kt != null && kt.updateTime ? `最后编辑 ${kt.updateTime}` : "尚未保存"
1839
1839
  ] }),
1840
1840
  /* @__PURE__ */ y("span", { className: d.docMetaItem, children: [
1841
- La,
1841
+ Da,
1842
1842
  " 字"
1843
1843
  ] }),
1844
1844
  /* @__PURE__ */ o(
1845
1845
  "span",
1846
1846
  {
1847
- className: `${d.docMetaItem} ${qe === "unsaved" || qe === "error" ? d.statusWarn : d.statusOk}`,
1848
- children: Aa
1847
+ className: `${d.docMetaItem} ${Ke === "unsaved" || Ke === "error" ? d.statusWarn : d.statusOk}`,
1848
+ children: Ra
1849
1849
  }
1850
1850
  )
1851
1851
  ] })
1852
1852
  ] }),
1853
1853
  /* @__PURE__ */ y("div", { className: d.modeBar, children: [
1854
1854
  /* @__PURE__ */ o(
1855
- sr,
1855
+ cr,
1856
1856
  {
1857
1857
  size: "small",
1858
- value: ke,
1859
- onChange: (s) => Sa(s),
1858
+ value: Te,
1859
+ onChange: (s) => Na(s),
1860
1860
  options: [
1861
1861
  { label: "编辑", value: "edit" },
1862
1862
  { label: "分屏", value: "split" },
@@ -1864,60 +1864,60 @@ function rd({
1864
1864
  ]
1865
1865
  }
1866
1866
  ),
1867
- kn && /* @__PURE__ */ o("span", { className: d.mdSep }),
1868
- kn && /* @__PURE__ */ y(ot, { children: [
1869
- le("h1", "H1", "一级标题", () => Ke("# ")),
1870
- le("h2", "H2", "二级标题", () => Ke("## ")),
1871
- le("h3", "H3", "三级标题", () => Ke("### ")),
1867
+ Tn && /* @__PURE__ */ o("span", { className: d.mdSep }),
1868
+ Tn && /* @__PURE__ */ y(ot, { children: [
1869
+ le("h1", "H1", "一级标题", () => qe("# ")),
1870
+ le("h2", "H2", "二级标题", () => qe("## ")),
1871
+ le("h3", "H3", "三级标题", () => qe("### ")),
1872
1872
  /* @__PURE__ */ o("span", { className: d.mdSep }),
1873
1873
  le(
1874
1874
  "bold",
1875
- /* @__PURE__ */ o(qa, {}),
1875
+ /* @__PURE__ */ o(ja, {}),
1876
1876
  "加粗 Ctrl+B",
1877
1877
  () => $e("**", "**", "加粗")
1878
1878
  ),
1879
1879
  le(
1880
1880
  "italic",
1881
- /* @__PURE__ */ o(Ka, {}),
1881
+ /* @__PURE__ */ o(Va, {}),
1882
1882
  "斜体 Ctrl+I",
1883
1883
  () => $e("*", "*", "斜体")
1884
1884
  ),
1885
1885
  le(
1886
1886
  "strike",
1887
- /* @__PURE__ */ o(ja, {}),
1887
+ /* @__PURE__ */ o(Ga, {}),
1888
1888
  "删除线",
1889
1889
  () => $e("~~", "~~", "删除线")
1890
1890
  ),
1891
1891
  /* @__PURE__ */ o("span", { className: d.mdSep }),
1892
- le("quote", "❝", "引用", () => Ke("> ")),
1892
+ le("quote", "❝", "引用", () => qe("> ")),
1893
1893
  le(
1894
1894
  "ul",
1895
1895
  /* @__PURE__ */ o(Ln, {}),
1896
1896
  "无序列表",
1897
- () => Ke("- ")
1897
+ () => qe("- ")
1898
1898
  ),
1899
1899
  le(
1900
1900
  "ol",
1901
- /* @__PURE__ */ o(Va, {}),
1901
+ /* @__PURE__ */ o(Ja, {}),
1902
1902
  "有序列表",
1903
- () => Ke("1. ")
1903
+ () => qe("1. ")
1904
1904
  ),
1905
1905
  le(
1906
1906
  "task",
1907
- /* @__PURE__ */ o(Ga, {}),
1907
+ /* @__PURE__ */ o(Ya, {}),
1908
1908
  "任务列表",
1909
- () => Ke("- [ ] ")
1909
+ () => qe("- [ ] ")
1910
1910
  ),
1911
1911
  /* @__PURE__ */ o("span", { className: d.mdSep }),
1912
1912
  le(
1913
1913
  "code",
1914
- /* @__PURE__ */ o(Ja, {}),
1914
+ /* @__PURE__ */ o(Qa, {}),
1915
1915
  "代码块",
1916
1916
  () => $e("```ts\n", "\n```", "code")
1917
1917
  ),
1918
1918
  le(
1919
1919
  "inlineCode",
1920
- /* @__PURE__ */ o(Ya, {}),
1920
+ /* @__PURE__ */ o(Xa, {}),
1921
1921
  "行内代码",
1922
1922
  () => $e("`", "`", "code")
1923
1923
  ),
@@ -1929,7 +1929,7 @@ function rd({
1929
1929
  ),
1930
1930
  le(
1931
1931
  "image",
1932
- /* @__PURE__ */ o(Qa, {}),
1932
+ /* @__PURE__ */ o(Za, {}),
1933
1933
  "图片(可粘贴/拖拽)",
1934
1934
  () => {
1935
1935
  var s;
@@ -1938,7 +1938,7 @@ function rd({
1938
1938
  ),
1939
1939
  le(
1940
1940
  "table",
1941
- /* @__PURE__ */ o(Xa, {}),
1941
+ /* @__PURE__ */ o(er, {}),
1942
1942
  "表格",
1943
1943
  () => vn(
1944
1944
  `
@@ -1954,38 +1954,38 @@ function rd({
1954
1954
  ] })
1955
1955
  ] }),
1956
1956
  /* @__PURE__ */ y("div", { className: d.body, children: [
1957
- (ke === "edit" || ke === "split") && /* @__PURE__ */ o(
1957
+ (Te === "edit" || Te === "split") && /* @__PURE__ */ o(
1958
1958
  "textarea",
1959
1959
  {
1960
1960
  ref: He,
1961
- className: `${d.textarea} ${ke === "split" ? d.half : ""}`,
1961
+ className: `${d.textarea} ${Te === "split" ? d.half : ""}`,
1962
1962
  value: Ht,
1963
1963
  onChange: (s) => {
1964
- q && (ce(q, {
1964
+ K && (ce(K, {
1965
1965
  content: s.target.value,
1966
1966
  dirty: !0,
1967
1967
  saveStatus: "unsaved"
1968
1968
  }), Be());
1969
1969
  },
1970
- onKeyDown: Ta,
1971
- onPaste: Ca,
1972
- onDrop: Na,
1970
+ onKeyDown: Ia,
1971
+ onPaste: ka,
1972
+ onDrop: Ta,
1973
1973
  onDragOver: (s) => s.preventDefault(),
1974
1974
  placeholder: "在此输入 Markdown,支持工具栏 / 快捷键 / 粘贴或拖拽图片…",
1975
1975
  spellCheck: !1
1976
1976
  }
1977
1977
  ),
1978
- (ke === "preview" || ke === "split") && /* @__PURE__ */ o(
1978
+ (Te === "preview" || Te === "split") && /* @__PURE__ */ o(
1979
1979
  "div",
1980
1980
  {
1981
1981
  ref: Bt,
1982
- className: `${d.preview} ${ke === "split" ? d.half : ""}`,
1983
- onScroll: Ia,
1982
+ className: `${d.preview} ${Te === "split" ? d.half : ""}`,
1983
+ onScroll: xa,
1984
1984
  children: Qe ? /* @__PURE__ */ o(
1985
- ur,
1985
+ pr,
1986
1986
  {
1987
- remarkPlugins: [fr],
1988
- rehypePlugins: [mr],
1987
+ remarkPlugins: [hr],
1988
+ rehypePlugins: [fr],
1989
1989
  children: Qe
1990
1990
  }
1991
1991
  ) : /* @__PURE__ */ o(
@@ -2000,14 +2000,14 @@ function rd({
2000
2000
  dn && /* @__PURE__ */ y("div", { className: d.tocPanel, children: [
2001
2001
  /* @__PURE__ */ y("div", { className: d.tocHeader, children: [
2002
2002
  /* @__PURE__ */ o("span", { className: d.tocHeaderTitle, children: "大纲" }),
2003
- Ct.length > 0 && /* @__PURE__ */ o("span", { className: d.tocHeaderCount, children: Ct.length })
2003
+ Nt.length > 0 && /* @__PURE__ */ o("span", { className: d.tocHeaderCount, children: Nt.length })
2004
2004
  ] }),
2005
- /* @__PURE__ */ o("div", { className: d.tocList, children: Ct.length === 0 ? /* @__PURE__ */ o("span", { className: d.tocEmpty, children: "暂无标题" }) : Ct.map((s) => /* @__PURE__ */ o(
2005
+ /* @__PURE__ */ o("div", { className: d.tocList, children: Nt.length === 0 ? /* @__PURE__ */ o("span", { className: d.tocEmpty, children: "暂无标题" }) : Nt.map((s) => /* @__PURE__ */ o(
2006
2006
  "div",
2007
2007
  {
2008
2008
  className: `${d.tocItem} ${We === s.index ? d.tocItemActive : ""}`,
2009
2009
  style: { paddingLeft: 8 + (s.level - 1) * 14 },
2010
- onClick: () => ka(s),
2010
+ onClick: () => $a(s),
2011
2011
  title: s.text,
2012
2012
  children: s.text
2013
2013
  },
@@ -2031,7 +2031,7 @@ function rd({
2031
2031
  title: "新建文档",
2032
2032
  onClick: () => {
2033
2033
  Ae({
2034
- parentId: b ?? Ce,
2034
+ parentId: b ?? Ne,
2035
2035
  type: "note",
2036
2036
  ownerUserId: b == null ? x ?? void 0 : void 0
2037
2037
  }), Ie("");
@@ -2049,8 +2049,8 @@ function rd({
2049
2049
  accept: "image/*",
2050
2050
  style: { display: "none" },
2051
2051
  onChange: (s) => {
2052
- var p;
2053
- const c = (p = s.target.files) == null ? void 0 : p[0];
2052
+ var f;
2053
+ const c = (f = s.target.files) == null ? void 0 : f[0];
2054
2054
  c && dt(c), s.target.value = "";
2055
2055
  }
2056
2056
  }
@@ -2066,11 +2066,11 @@ function rd({
2066
2066
  onOk: () => void yn(),
2067
2067
  okText: "创建",
2068
2068
  cancelText: "取消",
2069
- confirmLoading: ga,
2069
+ confirmLoading: ba,
2070
2070
  children: /* @__PURE__ */ o(
2071
2071
  nt,
2072
2072
  {
2073
- value: Ut,
2073
+ value: zt,
2074
2074
  onChange: (s) => Ie(s.target.value),
2075
2075
  placeholder: "名称",
2076
2076
  onPressEnter: () => void yn(),
@@ -2104,57 +2104,42 @@ function rd({
2104
2104
  )
2105
2105
  ] });
2106
2106
  }
2107
- async function od(e = "") {
2108
- const n = e ? `?token=${encodeURIComponent(e)}` : "", t = await w(`${v}/admin/agents${n}`, _);
2109
- return C(t, "获取 Agent 列表失败");
2107
+ async function dd(e = "") {
2108
+ const n = e ? `?token=${encodeURIComponent(e)}` : "", t = await S(`${C}/admin/agents${n}`, _);
2109
+ return w(t, "获取 Agent 列表失败");
2110
2110
  }
2111
- async function sd(e = "") {
2112
- const n = e ? `?token=${encodeURIComponent(e)}` : "", t = await w(
2113
- `${v}/admin/agent-categories${n}`,
2111
+ async function ud(e = "") {
2112
+ const n = e ? `?token=${encodeURIComponent(e)}` : "", t = await S(
2113
+ `${C}/admin/agent-categories${n}`,
2114
2114
  _
2115
2115
  );
2116
- return C(t, "获取 Agent 分类树失败");
2116
+ return w(t, "获取 Agent 分类树失败");
2117
2117
  }
2118
- async function id(e, n = "") {
2119
- const t = n ? `?token=${encodeURIComponent(n)}` : "", a = await w(`${v}/admin/agent-categories${t}`, {
2118
+ async function md(e, n = "") {
2119
+ const t = n ? `?token=${encodeURIComponent(n)}` : "", a = await S(`${C}/admin/agent-categories${t}`, {
2120
2120
  ..._,
2121
2121
  method: "POST",
2122
2122
  body: JSON.stringify(e)
2123
2123
  });
2124
- return C(a, "创建分类失败");
2124
+ return w(a, "创建分类失败");
2125
2125
  }
2126
- async function cd(e = "") {
2127
- const n = e ? `?token=${encodeURIComponent(e)}` : "", t = await w(
2128
- `${v}/admin/skill-categories${n}`,
2126
+ async function pd(e, n = "") {
2127
+ const t = n ? `?token=${encodeURIComponent(n)}` : "", a = await S(
2128
+ `${C}/admin/agents/${encodeURIComponent(e)}${t}`,
2129
2129
  _
2130
2130
  );
2131
- return C(t, "获取 Skill 分类树失败");
2131
+ return w(a, "获取 Agent 详情失败");
2132
2132
  }
2133
- async function ld(e, n = "") {
2134
- const t = n ? `?token=${encodeURIComponent(n)}` : "", a = await w(`${v}/admin/skill-categories${t}`, {
2135
- ..._,
2136
- method: "POST",
2137
- body: JSON.stringify(e)
2138
- });
2139
- return C(a, "创建 Skill 分类失败");
2140
- }
2141
- async function dd(e, n = "") {
2142
- const t = n ? `?token=${encodeURIComponent(n)}` : "", a = await w(
2143
- `${v}/admin/agents/${encodeURIComponent(e)}${t}`,
2133
+ async function fd(e, n = "") {
2134
+ const t = n ? `?token=${encodeURIComponent(n)}` : "", a = await S(
2135
+ `${C}/admin/agents/${encodeURIComponent(e)}/identity${t}`,
2144
2136
  _
2145
2137
  );
2146
- return C(a, "获取 Agent 详情失败");
2138
+ return w(a, "获取 Agent 身份绑定失败");
2147
2139
  }
2148
- async function ud(e, n = "") {
2149
- const t = n ? `?token=${encodeURIComponent(n)}` : "", a = await w(
2150
- `${v}/admin/agents/${encodeURIComponent(e)}/identity${t}`,
2151
- _
2152
- );
2153
- return C(a, "获取 Agent 身份绑定失败");
2154
- }
2155
- async function md(e, n, t = "") {
2156
- const a = t ? `?token=${encodeURIComponent(t)}` : "", r = await w(
2157
- `${v}/admin/agents/${encodeURIComponent(e)}/identity${a}`,
2140
+ async function hd(e, n, t = "") {
2141
+ const a = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(
2142
+ `${C}/admin/agents/${encodeURIComponent(e)}/identity${a}`,
2158
2143
  {
2159
2144
  ..._,
2160
2145
  method: "PUT",
@@ -2162,23 +2147,23 @@ async function md(e, n, t = "") {
2162
2147
  body: JSON.stringify(n)
2163
2148
  }
2164
2149
  );
2165
- return C(r, "绑定 Agent 身份失败");
2150
+ return w(r, "绑定 Agent 身份失败");
2166
2151
  }
2167
- async function fd(e, n = "", t) {
2152
+ async function yd(e, n = "", t) {
2168
2153
  let a = n ? `?token=${encodeURIComponent(n)}` : "";
2169
2154
  t && (a += (a ? "&" : "?") + `envCode=${encodeURIComponent(t)}`);
2170
- const r = await w(
2171
- `${v}/admin/agents/${encodeURIComponent(e)}/identity${a}`,
2155
+ const r = await S(
2156
+ `${C}/admin/agents/${encodeURIComponent(e)}/identity${a}`,
2172
2157
  {
2173
2158
  ..._,
2174
2159
  method: "DELETE"
2175
2160
  }
2176
2161
  );
2177
- return C(r, "解绑 Agent 身份失败");
2162
+ return w(r, "解绑 Agent 身份失败");
2178
2163
  }
2179
- async function pd(e, n, t = "") {
2180
- const a = t ? `?token=${encodeURIComponent(t)}` : "", r = await w(
2181
- `${v}/admin/agents/${encodeURIComponent(
2164
+ async function gd(e, n, t = "") {
2165
+ const a = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(
2166
+ `${C}/admin/agents/${encodeURIComponent(
2182
2167
  e
2183
2168
  )}/identity/verify${a}`,
2184
2169
  {
@@ -2188,59 +2173,59 @@ async function pd(e, n, t = "") {
2188
2173
  body: JSON.stringify({ envCode: n })
2189
2174
  }
2190
2175
  );
2191
- return C(r, "验证身份失败");
2176
+ return w(r, "验证身份失败");
2192
2177
  }
2193
- async function qs(e, n = "") {
2178
+ async function js(e, n = "") {
2194
2179
  const t = new URLSearchParams();
2195
2180
  n && t.set("token", n);
2196
- const a = t.toString() ? `?${t.toString()}` : "", r = await w(
2197
- `${v}/admin/agents/ctc-members${a}`,
2181
+ const a = t.toString() ? `?${t.toString()}` : "", r = await S(
2182
+ `${C}/admin/agents/ctc-members${a}`,
2198
2183
  _
2199
2184
  );
2200
- return C(r, "获取 Apex 成员列表失败") ?? [];
2185
+ return w(r, "获取 Apex 成员列表失败") ?? [];
2201
2186
  }
2202
- async function hd(e, n = "") {
2203
- const t = n ? `?token=${encodeURIComponent(n)}` : "", a = await w(`${v}/admin/agents${t}`, {
2187
+ async function _d(e, n = "") {
2188
+ const t = n ? `?token=${encodeURIComponent(n)}` : "", a = await S(`${C}/admin/agents${t}`, {
2204
2189
  ..._,
2205
2190
  method: "POST",
2206
2191
  headers: { "Content-Type": "application/json" },
2207
2192
  body: JSON.stringify(e)
2208
2193
  });
2209
- return C(a, "创建 Agent 失败");
2194
+ return w(a, "创建 Agent 失败");
2210
2195
  }
2211
- async function yd(e, n, t = "") {
2212
- const a = t ? `?token=${encodeURIComponent(t)}` : "", r = await w(`${v}/admin/agents/${e}${a}`, {
2196
+ async function bd(e, n, t = "") {
2197
+ const a = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(`${C}/admin/agents/${e}${a}`, {
2213
2198
  ..._,
2214
2199
  method: "PUT",
2215
2200
  headers: { "Content-Type": "application/json" },
2216
2201
  body: JSON.stringify(n)
2217
2202
  });
2218
- return C(r, "更新 Agent 失败");
2203
+ return w(r, "更新 Agent 失败");
2219
2204
  }
2220
- async function gd(e, n = "") {
2221
- const t = n ? `?token=${encodeURIComponent(n)}` : "", a = await w(`${v}/admin/agents/${e}${t}`, {
2205
+ async function vd(e, n = "") {
2206
+ const t = n ? `?token=${encodeURIComponent(n)}` : "", a = await S(`${C}/admin/agents/${e}${t}`, {
2222
2207
  ..._,
2223
2208
  method: "DELETE"
2224
2209
  });
2225
- return C(a, "删除 Agent 失败");
2210
+ return w(a, "删除 Agent 失败");
2226
2211
  }
2227
- async function _d(e = "") {
2228
- const n = e ? `?token=${encodeURIComponent(e)}` : "", t = await w(`${v}/admin/agents/refresh-cache${n}`, {
2212
+ async function Sd(e = "") {
2213
+ const n = e ? `?token=${encodeURIComponent(e)}` : "", t = await S(`${C}/admin/agents/refresh-cache${n}`, {
2229
2214
  ..._,
2230
2215
  method: "POST"
2231
2216
  });
2232
- return C(t, "刷新 Agent 缓存失败");
2217
+ return w(t, "刷新 Agent 缓存失败");
2233
2218
  }
2234
- async function bd(e, n = "") {
2235
- const t = n ? `?token=${encodeURIComponent(n)}` : "", a = await w(
2236
- `${v}/admin/agent-ext-configs/${encodeURIComponent(e)}${t}`,
2219
+ async function wd(e, n = "") {
2220
+ const t = n ? `?token=${encodeURIComponent(n)}` : "", a = await S(
2221
+ `${C}/admin/agent-ext-configs/${encodeURIComponent(e)}${t}`,
2237
2222
  _
2238
2223
  );
2239
- return C(a, "加载扩展配置失败");
2224
+ return w(a, "加载扩展配置失败");
2240
2225
  }
2241
- async function vd(e, n, t = "") {
2242
- const a = t ? `?token=${encodeURIComponent(t)}` : "", r = await w(
2243
- `${v}/admin/agent-ext-configs/${encodeURIComponent(e)}${a}`,
2226
+ async function Nd(e, n, t = "") {
2227
+ const a = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(
2228
+ `${C}/admin/agent-ext-configs/${encodeURIComponent(e)}${a}`,
2244
2229
  {
2245
2230
  ..._,
2246
2231
  method: "POST",
@@ -2248,18 +2233,18 @@ async function vd(e, n, t = "") {
2248
2233
  body: JSON.stringify(n)
2249
2234
  }
2250
2235
  );
2251
- return C(r, "新增扩展配置失败");
2236
+ return w(r, "新增扩展配置失败");
2252
2237
  }
2253
- async function Sd(e, n = "") {
2254
- const t = n ? `?token=${encodeURIComponent(n)}` : "", a = await w(`${v}/admin/agent-ext-configs/${e}${t}`, {
2238
+ async function Cd(e, n = "") {
2239
+ const t = n ? `?token=${encodeURIComponent(n)}` : "", a = await S(`${C}/admin/agent-ext-configs/${e}${t}`, {
2255
2240
  ..._,
2256
2241
  method: "DELETE"
2257
2242
  });
2258
- return C(a, "删除扩展配置失败");
2243
+ return w(a, "删除扩展配置失败");
2259
2244
  }
2260
- async function wd(e, n, t = "") {
2261
- const a = t ? `?token=${encodeURIComponent(t)}` : "", r = await w(
2262
- `${v}/admin/agents/${encodeURIComponent(e)}/ontology${a}`,
2245
+ async function kd(e, n, t = "") {
2246
+ const a = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(
2247
+ `${C}/admin/agents/${encodeURIComponent(e)}/ontology${a}`,
2263
2248
  {
2264
2249
  ..._,
2265
2250
  method: "PUT",
@@ -2267,177 +2252,228 @@ async function wd(e, n, t = "") {
2267
2252
  body: JSON.stringify(n)
2268
2253
  }
2269
2254
  );
2270
- return C(r, "保存本体绑定失败");
2255
+ return w(r, "保存本体绑定失败");
2271
2256
  }
2272
- async function Cd(e, n = "") {
2273
- const t = n ? `?token=${encodeURIComponent(n)}` : "", a = await w(
2274
- `${v}/admin/agents/ontology/knowledges/${encodeURIComponent(
2257
+ async function Td(e, n = "") {
2258
+ const t = n ? `?token=${encodeURIComponent(n)}` : "", a = await S(
2259
+ `${C}/admin/agents/ontology/knowledges/${encodeURIComponent(
2275
2260
  e
2276
2261
  )}${t}`,
2277
2262
  _
2278
2263
  );
2279
- return C(a, "获取知识详情失败");
2264
+ return w(a, "获取知识详情失败");
2265
+ }
2266
+ function Vs(e) {
2267
+ const n = String(e.slug ?? ""), t = String(e.id ?? n);
2268
+ return {
2269
+ id: n || t,
2270
+ name: String(e.name ?? e.title ?? n),
2271
+ category: String(e.category ?? "General"),
2272
+ description: String(e.description ?? ""),
2273
+ version: e.version != null ? String(e.version) : void 0,
2274
+ source: e.source != null ? String(e.source) : void 0,
2275
+ _agenthub_raw: {
2276
+ skillId: t,
2277
+ code: n || t,
2278
+ version: e.version,
2279
+ source: e.source
2280
+ }
2281
+ };
2280
2282
  }
2281
- async function Nd(e = "") {
2282
- const n = e ? `?token=${encodeURIComponent(e)}` : "", t = await w(`${v}/admin/skills${n}`, _);
2283
- return C(t, "获取 Skill 列表失败");
2283
+ async function Id(e = "") {
2284
+ const n = await S("/api/skill/search?page=0&perPage=200", _), t = await w(
2285
+ n,
2286
+ "获取 Skill 列表失败"
2287
+ );
2288
+ return (Array.isArray(t) ? t : (t == null ? void 0 : t.skills) ?? (t == null ? void 0 : t.records) ?? []).map(Vs);
2284
2289
  }
2285
- async function Td(e, n = "") {
2286
- const t = n ? `?token=${encodeURIComponent(n)}` : "", a = await w(`${v}/admin/skills${t}`, {
2290
+ async function $d(e = "") {
2291
+ const n = await S("/api/skill/categories", _), t = await w(
2292
+ n,
2293
+ "获取 Skill 分类失败"
2294
+ ), a = (t == null ? void 0 : t.categories) ?? {};
2295
+ return Object.entries(a).map(([r, i]) => ({
2296
+ id: r,
2297
+ name: r,
2298
+ count: Number(i) || 0
2299
+ }));
2300
+ }
2301
+ function Gs(e) {
2302
+ return e.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || `skill-${Date.now()}`;
2303
+ }
2304
+ function Js(e) {
2305
+ const n = /^(\d+)\.(\d+)\.(\d+)$/.exec((e ?? "").trim());
2306
+ return n ? `${n[1]}.${n[2]}.${Number(n[3]) + 1}` : "0.1.0";
2307
+ }
2308
+ function da(e, n) {
2309
+ const t = e.name.trim(), a = (e.description ?? "").trim();
2310
+ return {
2311
+ slug: (e.code ?? "").trim() || Gs(e.name),
2312
+ title: t,
2313
+ description: a,
2314
+ category: (e.category ?? "").trim() || "General",
2315
+ version: n || e.version || "0.1.0",
2316
+ tags: [],
2317
+ content: `# ${t}
2318
+
2319
+ ${a}`
2320
+ };
2321
+ }
2322
+ async function ua() {
2323
+ try {
2324
+ await S("/api/skill/refresh", { ..._, method: "POST" });
2325
+ } catch {
2326
+ }
2327
+ }
2328
+ async function xd(e, n = "") {
2329
+ const t = await S("/api/skill/publish", {
2287
2330
  ..._,
2288
2331
  method: "POST",
2289
2332
  headers: { "Content-Type": "application/json" },
2290
- body: JSON.stringify(e)
2291
- });
2292
- return C(a, "创建 Skill 失败");
2333
+ body: JSON.stringify(da(e))
2334
+ }), a = await w(t, "发布 Skill 失败");
2335
+ return await ua(), a;
2293
2336
  }
2294
- async function kd(e, n, t = "") {
2295
- const a = t ? `?token=${encodeURIComponent(t)}` : "", r = await w(`${v}/admin/skills/${e}${a}`, {
2337
+ async function Ld(e, n, t = "") {
2338
+ const a = await S("/api/skill/publish", {
2296
2339
  ..._,
2297
- method: "PUT",
2340
+ method: "POST",
2298
2341
  headers: { "Content-Type": "application/json" },
2299
- body: JSON.stringify(n)
2300
- });
2301
- return C(r, "更新 Skill 失败");
2342
+ body: JSON.stringify(da(n, Js(n.version)))
2343
+ }), r = await w(a, "更新 Skill 失败");
2344
+ return await ua(), r;
2302
2345
  }
2303
- async function Id(e, n = "") {
2304
- const t = n ? `?token=${encodeURIComponent(n)}` : "", a = await w(`${v}/admin/skills/${e}${t}`, {
2305
- ..._,
2306
- method: "DELETE"
2307
- });
2308
- return C(a, "删除 Skill 失败");
2309
- }
2310
- async function $d(e = "") {
2311
- const n = e ? `?token=${encodeURIComponent(e)}` : "", t = await w(`${v}/admin/skills/refresh-cache${n}`, {
2346
+ async function Ad(e = "") {
2347
+ const n = await S("/api/skill/refresh", {
2312
2348
  ..._,
2313
2349
  method: "POST"
2314
2350
  });
2315
- return C(t, "刷新 Skill 缓存失败");
2351
+ return await w(n, "刷新 Skill 缓存失败"), { ok: !0, count: 0, message: "z-skill 注册表已重新聚合" };
2316
2352
  }
2317
- async function xd(e = "") {
2318
- const n = e ? `?token=${encodeURIComponent(e)}` : "", t = await w(
2319
- `${v}/admin/scenarios/available-agents${n}`,
2353
+ async function Dd(e = "") {
2354
+ const n = e ? `?token=${encodeURIComponent(e)}` : "", t = await S(
2355
+ `${C}/admin/scenarios/available-agents${n}`,
2320
2356
  _
2321
2357
  );
2322
- return C(t, "获取可用 Agent 列表失败");
2358
+ return w(t, "获取可用 Agent 列表失败");
2323
2359
  }
2324
- async function Ld(e = "") {
2325
- const n = e ? `?token=${encodeURIComponent(e)}` : "", t = await w(
2326
- `${v}/admin/scenarios/available-skills${n}`,
2360
+ async function Rd(e = "") {
2361
+ const n = e ? `?token=${encodeURIComponent(e)}` : "", t = await S(
2362
+ `${C}/admin/scenarios/available-skills${n}`,
2327
2363
  _
2328
2364
  );
2329
- return C(t, "获取可用 Skill 列表失败");
2365
+ return w(t, "获取可用 Skill 列表失败");
2330
2366
  }
2331
- async function Ad(e = "", n) {
2367
+ async function Od(e = "", n) {
2332
2368
  const t = new URLSearchParams();
2333
2369
  e && t.set("token", e), t.set("source", n);
2334
- const a = t.toString(), r = a ? `${v}/admin/scenarios?${a}` : `${v}/admin/scenarios`, i = await w(r, _);
2335
- return C(i, "获取场景列表失败");
2370
+ const a = t.toString(), r = a ? `${C}/admin/scenarios?${a}` : `${C}/admin/scenarios`, i = await S(r, _);
2371
+ return w(i, "获取场景列表失败");
2336
2372
  }
2337
- async function Dd(e, n = "") {
2338
- const t = n ? `?token=${encodeURIComponent(n)}` : "", a = await w(`${v}/admin/scenarios${t}`, {
2373
+ async function Ed(e, n = "") {
2374
+ const t = n ? `?token=${encodeURIComponent(n)}` : "", a = await S(`${C}/admin/scenarios${t}`, {
2339
2375
  ..._,
2340
2376
  method: "POST",
2341
2377
  headers: { "Content-Type": "application/json" },
2342
2378
  body: JSON.stringify(e)
2343
2379
  });
2344
- return C(a, "新建场景失败");
2380
+ return w(a, "新建场景失败");
2345
2381
  }
2346
- async function Rd(e, n, t = "") {
2347
- const a = t ? `?token=${encodeURIComponent(t)}` : "", r = await w(`${v}/admin/scenarios/${e}${a}`, {
2382
+ async function Pd(e, n, t = "") {
2383
+ const a = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(`${C}/admin/scenarios/${e}${a}`, {
2348
2384
  ..._,
2349
2385
  method: "PUT",
2350
2386
  headers: { "Content-Type": "application/json" },
2351
2387
  body: JSON.stringify(n)
2352
2388
  });
2353
- return C(r, "更新场景失败");
2389
+ return w(r, "更新场景失败");
2354
2390
  }
2355
- async function Od(e, n = "") {
2356
- const t = n ? `?token=${encodeURIComponent(n)}` : "", a = await w(`${v}/admin/scenarios/${e}${t}`, {
2391
+ async function Fd(e, n = "") {
2392
+ const t = n ? `?token=${encodeURIComponent(n)}` : "", a = await S(`${C}/admin/scenarios/${e}${t}`, {
2357
2393
  ..._,
2358
2394
  method: "DELETE"
2359
2395
  });
2360
- return C(a, "删除场景失败");
2396
+ return w(a, "删除场景失败");
2361
2397
  }
2362
- async function Ed(e = "", n = "") {
2398
+ async function Md(e = "", n = "") {
2363
2399
  const t = [];
2364
2400
  e && t.push(`keyword=${encodeURIComponent(e)}`), n && t.push(`token=${encodeURIComponent(n)}`);
2365
- const a = t.length ? `?${t.join("&")}` : "", r = await w(
2366
- `${v}/admin/generic-configs${a}`,
2401
+ const a = t.length ? `?${t.join("&")}` : "", r = await S(
2402
+ `${C}/admin/generic-configs${a}`,
2367
2403
  _
2368
2404
  );
2369
- return C(r, "获取通用配置列表失败");
2405
+ return w(r, "获取通用配置列表失败");
2370
2406
  }
2371
- async function Pd(e, n = "") {
2372
- const t = n ? `?token=${encodeURIComponent(n)}` : "", a = await w(`${v}/admin/generic-configs${t}`, {
2407
+ async function Bd(e, n = "") {
2408
+ const t = n ? `?token=${encodeURIComponent(n)}` : "", a = await S(`${C}/admin/generic-configs${t}`, {
2373
2409
  ..._,
2374
2410
  method: "POST",
2375
2411
  headers: { "Content-Type": "application/json" },
2376
2412
  body: JSON.stringify(e)
2377
2413
  });
2378
- return C(a, "新建通用配置失败");
2414
+ return w(a, "新建通用配置失败");
2379
2415
  }
2380
- async function Fd(e, n, t = "") {
2381
- const a = t ? `?token=${encodeURIComponent(t)}` : "", r = await w(`${v}/admin/generic-configs/${e}${a}`, {
2416
+ async function zd(e, n, t = "") {
2417
+ const a = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(`${C}/admin/generic-configs/${e}${a}`, {
2382
2418
  ..._,
2383
2419
  method: "PUT",
2384
2420
  headers: { "Content-Type": "application/json" },
2385
2421
  body: JSON.stringify(n)
2386
2422
  });
2387
- return C(r, "更新通用配置失败");
2423
+ return w(r, "更新通用配置失败");
2388
2424
  }
2389
- async function Md(e, n = "") {
2390
- const t = n ? `?token=${encodeURIComponent(n)}` : "", a = await w(`${v}/admin/generic-configs/${e}${t}`, {
2425
+ async function Ud(e, n = "") {
2426
+ const t = n ? `?token=${encodeURIComponent(n)}` : "", a = await S(`${C}/admin/generic-configs/${e}${t}`, {
2391
2427
  ..._,
2392
2428
  method: "DELETE"
2393
2429
  });
2394
- return C(a, "删除通用配置失败");
2430
+ return w(a, "删除通用配置失败");
2395
2431
  }
2396
- async function Bd(e, n, t = "") {
2432
+ async function Wd(e, n, t = "") {
2397
2433
  const a = new URLSearchParams();
2398
2434
  e && a.set("scenario_code", e), n && a.set("sub_scenario_code", n), t && a.set("token", t);
2399
- const r = a.toString() ? `?${a.toString()}` : "", i = await w(
2400
- `${v}/admin/scenario-templates${r}`,
2435
+ const r = a.toString() ? `?${a.toString()}` : "", i = await S(
2436
+ `${C}/admin/scenario-templates${r}`,
2401
2437
  _
2402
2438
  );
2403
- return C(i, "获取场景模板列表失败");
2439
+ return w(i, "获取场景模板列表失败");
2404
2440
  }
2405
- async function Ud(e, n = "") {
2406
- const t = n ? `?token=${encodeURIComponent(n)}` : "", a = await w(`${v}/admin/scenario-templates${t}`, {
2441
+ async function Hd(e, n = "") {
2442
+ const t = n ? `?token=${encodeURIComponent(n)}` : "", a = await S(`${C}/admin/scenario-templates${t}`, {
2407
2443
  ..._,
2408
2444
  method: "POST",
2409
2445
  headers: { "Content-Type": "application/json" },
2410
2446
  body: JSON.stringify(e)
2411
2447
  });
2412
- return C(a, "新建场景模板失败");
2448
+ return w(a, "新建场景模板失败");
2413
2449
  }
2414
- async function zd(e, n = "") {
2415
- const t = n ? `?token=${encodeURIComponent(n)}` : "", a = await w(
2416
- `${v}/admin/scenario-templates/${e}${t}`,
2450
+ async function Kd(e, n = "") {
2451
+ const t = n ? `?token=${encodeURIComponent(n)}` : "", a = await S(
2452
+ `${C}/admin/scenario-templates/${e}${t}`,
2417
2453
  {
2418
2454
  ..._,
2419
2455
  method: "DELETE"
2420
2456
  }
2421
2457
  );
2422
- return C(a, "删除场景模板失败");
2458
+ return w(a, "删除场景模板失败");
2423
2459
  }
2424
- async function Wd(e, n = "") {
2425
- const t = n ? `?token=${encodeURIComponent(n)}` : "", a = await w(
2426
- `${v}/admin/scenario-templates/${e}/versions${t}`,
2460
+ async function qd(e, n = "") {
2461
+ const t = n ? `?token=${encodeURIComponent(n)}` : "", a = await S(
2462
+ `${C}/admin/scenario-templates/${e}/versions${t}`,
2427
2463
  _
2428
2464
  );
2429
- return C(a, "获取版本列表失败");
2465
+ return w(a, "获取版本列表失败");
2430
2466
  }
2431
- async function Hd(e, n, t = "") {
2432
- const a = `?from_published=${n}${t ? `&token=${encodeURIComponent(t)}` : ""}`, r = await w(
2433
- `${v}/admin/scenario-templates/${e}/versions${a}`,
2467
+ async function jd(e, n, t = "") {
2468
+ const a = `?from_published=${n}${t ? `&token=${encodeURIComponent(t)}` : ""}`, r = await S(
2469
+ `${C}/admin/scenario-templates/${e}/versions${a}`,
2434
2470
  { ..._, method: "POST" }
2435
2471
  );
2436
- return C(r, "新建版本失败");
2472
+ return w(r, "新建版本失败");
2437
2473
  }
2438
- async function qd(e, n, t, a = "") {
2439
- const r = a ? `?token=${encodeURIComponent(a)}` : "", i = await w(
2440
- `${v}/admin/scenario-templates/${e}/versions/${n}${r}`,
2474
+ async function Vd(e, n, t, a = "") {
2475
+ const r = a ? `?token=${encodeURIComponent(a)}` : "", i = await S(
2476
+ `${C}/admin/scenario-templates/${e}/versions/${n}${r}`,
2441
2477
  {
2442
2478
  ..._,
2443
2479
  method: "PUT",
@@ -2445,68 +2481,68 @@ async function qd(e, n, t, a = "") {
2445
2481
  body: JSON.stringify(t)
2446
2482
  }
2447
2483
  );
2448
- return C(i, "保存版本失败");
2484
+ return w(i, "保存版本失败");
2449
2485
  }
2450
- async function Kd(e, n, t = "") {
2451
- const a = t ? `?token=${encodeURIComponent(t)}` : "", r = await w(
2452
- `${v}/admin/scenario-templates/${e}/versions/${n}/publish${a}`,
2486
+ async function Gd(e, n, t = "") {
2487
+ const a = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(
2488
+ `${C}/admin/scenario-templates/${e}/versions/${n}/publish${a}`,
2453
2489
  { ..._, method: "POST" }
2454
2490
  );
2455
- return C(r, "发布失败");
2491
+ return w(r, "发布失败");
2456
2492
  }
2457
- async function jd(e, n, t = "") {
2458
- const a = t ? `?token=${encodeURIComponent(t)}` : "", r = await w(
2459
- `${v}/admin/scenario-templates/${e}/versions/${n}/archive${a}`,
2493
+ async function Jd(e, n, t = "") {
2494
+ const a = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(
2495
+ `${C}/admin/scenario-templates/${e}/versions/${n}/archive${a}`,
2460
2496
  { ..._, method: "POST" }
2461
2497
  );
2462
- return C(r, "归档失败");
2498
+ return w(r, "归档失败");
2463
2499
  }
2464
- async function Ks(e, n = "", t) {
2500
+ async function Ys(e, n = "", t) {
2465
2501
  const a = new URLSearchParams({ scenarioCode: e, token: n });
2466
2502
  t && a.set("source", t);
2467
- const r = await w(
2468
- `${v}/admin/scenario-tags?${a.toString()}`,
2503
+ const r = await S(
2504
+ `${C}/admin/scenario-tags?${a.toString()}`,
2469
2505
  _
2470
2506
  );
2471
- return C(r, "获取标签定义失败");
2507
+ return w(r, "获取标签定义失败");
2472
2508
  }
2473
- async function Vd(e, n = "") {
2474
- const t = n ? `?token=${encodeURIComponent(n)}` : "", a = await w(`${v}/admin/scenario-tags${t}`, {
2509
+ async function Yd(e, n = "") {
2510
+ const t = n ? `?token=${encodeURIComponent(n)}` : "", a = await S(`${C}/admin/scenario-tags${t}`, {
2475
2511
  ..._,
2476
2512
  method: "POST",
2477
2513
  headers: { ..._.headers, "Content-Type": "application/json" },
2478
2514
  body: JSON.stringify(e)
2479
2515
  });
2480
- return C(a, "创建标签失败");
2516
+ return w(a, "创建标签失败");
2481
2517
  }
2482
- async function Gd(e, n, t = "") {
2483
- const a = t ? `?token=${encodeURIComponent(t)}` : "", r = await w(`${v}/admin/scenario-tags/${e}${a}`, {
2518
+ async function Qd(e, n, t = "") {
2519
+ const a = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(`${C}/admin/scenario-tags/${e}${a}`, {
2484
2520
  ..._,
2485
2521
  method: "PUT",
2486
2522
  headers: { ..._.headers, "Content-Type": "application/json" },
2487
2523
  body: JSON.stringify(n)
2488
2524
  });
2489
- return C(r, "更新标签失败");
2525
+ return w(r, "更新标签失败");
2490
2526
  }
2491
- async function Jd(e, n = "") {
2492
- const t = n ? `?token=${encodeURIComponent(n)}` : "", a = await w(`${v}/admin/scenario-tags/${e}${t}`, {
2527
+ async function Xd(e, n = "") {
2528
+ const t = n ? `?token=${encodeURIComponent(n)}` : "", a = await S(`${C}/admin/scenario-tags/${e}${t}`, {
2493
2529
  ..._,
2494
2530
  method: "DELETE"
2495
2531
  });
2496
- return C(a, "删除标签失败");
2532
+ return w(a, "删除标签失败");
2497
2533
  }
2498
- async function js(e, n = "", t) {
2534
+ async function Qs(e, n = "", t) {
2499
2535
  const a = new URLSearchParams();
2500
2536
  n && a.set("token", n), t && a.set("source", t);
2501
- const r = a.toString(), i = r ? `?${r}` : "", l = await w(
2502
- `${v}/admin/scenario-tags/${e}/values${i}`,
2537
+ const r = a.toString(), i = r ? `?${r}` : "", l = await S(
2538
+ `${C}/admin/scenario-tags/${e}/values${i}`,
2503
2539
  _
2504
2540
  );
2505
- return C(l, "获取标签值失败");
2541
+ return w(l, "获取标签值失败");
2506
2542
  }
2507
- async function Yd(e, n, t = "") {
2508
- const a = t ? `?token=${encodeURIComponent(t)}` : "", r = await w(
2509
- `${v}/admin/scenario-tags/${e}/values${a}`,
2543
+ async function Zd(e, n, t = "") {
2544
+ const a = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(
2545
+ `${C}/admin/scenario-tags/${e}/values${a}`,
2510
2546
  {
2511
2547
  ..._,
2512
2548
  method: "POST",
@@ -2514,11 +2550,11 @@ async function Yd(e, n, t = "") {
2514
2550
  body: JSON.stringify(n)
2515
2551
  }
2516
2552
  );
2517
- return C(r, "创建标签值失败");
2553
+ return w(r, "创建标签值失败");
2518
2554
  }
2519
- async function Qd(e, n, t = "") {
2520
- const a = t ? `?token=${encodeURIComponent(t)}` : "", r = await w(
2521
- `${v}/admin/scenario-tags/values/${e}${a}`,
2555
+ async function eu(e, n, t = "") {
2556
+ const a = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(
2557
+ `${C}/admin/scenario-tags/values/${e}${a}`,
2522
2558
  {
2523
2559
  ..._,
2524
2560
  method: "PUT",
@@ -2526,26 +2562,26 @@ async function Qd(e, n, t = "") {
2526
2562
  body: JSON.stringify(n)
2527
2563
  }
2528
2564
  );
2529
- return C(r, "更新标签值失败");
2565
+ return w(r, "更新标签值失败");
2530
2566
  }
2531
- async function Xd(e = "", n = 1, t = 20) {
2532
- const a = await w(
2533
- `${v}/admin/runtime-monitor/queue${ie({
2567
+ async function tu(e = "", n = 1, t = 20) {
2568
+ const a = await S(
2569
+ `${C}/admin/runtime-monitor/queue${ie({
2534
2570
  token: e,
2535
2571
  page: n,
2536
2572
  pageSize: t
2537
2573
  })}`,
2538
2574
  _
2539
2575
  );
2540
- return C(a, "查询排队队列状态失败");
2576
+ return w(a, "查询排队队列状态失败");
2541
2577
  }
2542
- async function Vs(e) {
2578
+ async function Xs(e) {
2543
2579
  const n = new URLSearchParams();
2544
2580
  n.set("scenarioCode", e.scenarioCode), e.startDate && n.set("startDate", e.startDate), e.endDate && n.set("endDate", e.endDate), e.creatorId && n.set("creatorId", e.creatorId), e.tagFilters && Object.keys(e.tagFilters).length > 0 && n.set("tagFilters", JSON.stringify(e.tagFilters)), e.deptId && n.set("deptId", e.deptId), e.source && n.set("source", e.source), e.token && n.set("token", e.token);
2545
- const t = await w(
2546
- `${v}/admin/statistics/business/export/workitems?${n.toString()}`,
2581
+ const t = await S(
2582
+ `${C}/admin/statistics/business/export/workitems?${n.toString()}`,
2547
2583
  _
2548
- ), a = await C(t, "工单明细导出失败");
2584
+ ), a = await w(t, "工单明细导出失败");
2549
2585
  return {
2550
2586
  total: Number((a == null ? void 0 : a.total) ?? 0),
2551
2587
  truncated: !!(a != null && a.truncated),
@@ -2553,118 +2589,118 @@ async function Vs(e) {
2553
2589
  rows: Array.isArray(a == null ? void 0 : a.rows) ? a.rows : []
2554
2590
  };
2555
2591
  }
2556
- async function Gs(e = "") {
2557
- const n = e ? `?token=${encodeURIComponent(e)}` : "", t = await w(
2558
- `${v}/admin/statistics/dept-tree${n}`,
2592
+ async function Zs(e = "") {
2593
+ const n = e ? `?token=${encodeURIComponent(e)}` : "", t = await S(
2594
+ `${C}/admin/statistics/dept-tree${n}`,
2559
2595
  _
2560
2596
  );
2561
- return C(t, "获取组织部门树失败");
2597
+ return w(t, "获取组织部门树失败");
2562
2598
  }
2563
- async function Zd(e = "", n = 6) {
2564
- const t = await w(
2565
- `${v}/admin/runtime-monitor/history${ie({
2599
+ async function nu(e = "", n = 6) {
2600
+ const t = await S(
2601
+ `${C}/admin/runtime-monitor/history${ie({
2566
2602
  token: e,
2567
2603
  hours: n
2568
2604
  })}`,
2569
2605
  _
2570
2606
  );
2571
- return C(t, "查询历史趋势失败");
2607
+ return w(t, "查询历史趋势失败");
2572
2608
  }
2573
- async function eu(e = "", n = 24) {
2574
- const t = await w(
2575
- `${v}/admin/runtime-monitor/config${ie({
2609
+ async function au(e = "", n = 24) {
2610
+ const t = await S(
2611
+ `${C}/admin/runtime-monitor/config${ie({
2576
2612
  token: e,
2577
2613
  hours: n
2578
2614
  })}`,
2579
2615
  _
2580
2616
  );
2581
- return C(t, "查询配置生效值失败");
2617
+ return w(t, "查询配置生效值失败");
2582
2618
  }
2583
- async function tu(e = 1, n = "") {
2584
- const t = await w(
2585
- `${v}/admin/llm-call-monitor/stats${ie({ hours: e, token: n })}`,
2619
+ async function ru(e = 1, n = "") {
2620
+ const t = await S(
2621
+ `${C}/admin/llm-call-monitor/stats${ie({ hours: e, token: n })}`,
2586
2622
  _
2587
2623
  );
2588
- return C(t, "查询调用监控汇总失败");
2624
+ return w(t, "查询调用监控汇总失败");
2589
2625
  }
2590
- async function nu(e = {}) {
2626
+ async function ou(e = {}) {
2591
2627
  const { page: n = 1, size: t = 50, token: a = "" } = e, r = { page: n, size: t, token: a };
2592
2628
  e.success !== void 0 && (r.success = e.success), e.agentName && (r.agentName = e.agentName), e.scenarioInstanceId && (r.scenarioInstanceId = e.scenarioInstanceId), e.errorType && (r.errorType = e.errorType);
2593
- const i = await w(
2594
- `${v}/admin/llm-call-monitor/recent${ie(r)}`,
2629
+ const i = await S(
2630
+ `${C}/admin/llm-call-monitor/recent${ie(r)}`,
2595
2631
  _
2596
2632
  );
2597
- return C(i, "查询调用明细失败");
2633
+ return w(i, "查询调用明细失败");
2598
2634
  }
2599
- async function au(e, n = "") {
2600
- const t = await w(
2601
- `${v}/admin/llm-call-monitor/conversation${ie({
2635
+ async function su(e, n = "") {
2636
+ const t = await S(
2637
+ `${C}/admin/llm-call-monitor/conversation${ie({
2602
2638
  executionId: e,
2603
2639
  token: n
2604
2640
  })}`,
2605
2641
  _
2606
2642
  );
2607
- return C(t, "查询对话详情失败");
2608
- }
2609
- const Js = "_page_1il4h_3", Ys = "_toolbar_1il4h_14", Qs = "_toolbarLeft_1il4h_22", Xs = "_pageTitle_1il4h_28", Zs = "_toolbarRight_1il4h_35", ei = "_toolbarDivider_1il4h_44", ti = "_viewToggle_1il4h_51", ni = "_trendTable_1il4h_57", ai = "_trendTableDate_1il4h_105", ri = "_trendTableWeekend_1il4h_118", oi = "_trendTableNum_1il4h_123", si = "_kpiGrid_1il4h_130", ii = "_kpiCard_1il4h_138", ci = "_kpiLabel_1il4h_148", li = "_kpiValue_1il4h_157", di = "_kpiSub_1il4h_165", ui = "_kpiSubPositive_1il4h_170", mi = "_kpiSubNegative_1il4h_174", fi = "_statsTabs_1il4h_179", pi = "_tabContent_1il4h_188", hi = "_statsCard_1il4h_196", yi = "_cardTitle_1il4h_203", gi = "_infoIcon_1il4h_213", _i = "_statsCardFull_1il4h_226", bi = "_distList_1il4h_235", vi = "_distItem_1il4h_241", Si = "_distHeader_1il4h_247", wi = "_distLabel_1il4h_254", Ci = "_distValue_1il4h_259", Ni = "_distPct_1il4h_265", Ti = "_distBar_1il4h_271", ki = "_distBarFill_1il4h_278", Ii = "_metricRow_1il4h_285", $i = "_metricLabel_1il4h_298", xi = "_metricValue_1il4h_302", Li = "_rankTable_1il4h_309", Ai = "_rankNum_1il4h_333", Di = "_rankNumTop_1il4h_346", Ri = "_loadingWrap_1il4h_352", Oi = "_trendEmpty_1il4h_360", Ei = "_rankRowClickable_1il4h_391", Pi = "_normalDistSummary_1il4h_405", Fi = "_summaryGroup_1il4h_418", Mi = "_summaryItem_1il4h_424", Bi = "_summarySep_1il4h_429", E = {
2610
- page: Js,
2611
- toolbar: Ys,
2612
- toolbarLeft: Qs,
2613
- pageTitle: Xs,
2614
- toolbarRight: Zs,
2615
- toolbarDivider: ei,
2616
- viewToggle: ti,
2617
- trendTable: ni,
2618
- trendTableDate: ai,
2619
- trendTableWeekend: ri,
2620
- trendTableNum: oi,
2621
- kpiGrid: si,
2622
- kpiCard: ii,
2623
- kpiLabel: ci,
2624
- kpiValue: li,
2625
- kpiSub: di,
2626
- kpiSubPositive: ui,
2627
- kpiSubNegative: mi,
2628
- statsTabs: fi,
2629
- tabContent: pi,
2630
- statsCard: hi,
2631
- cardTitle: yi,
2632
- infoIcon: gi,
2633
- statsCardFull: _i,
2634
- distList: bi,
2635
- distItem: vi,
2636
- distHeader: Si,
2637
- distLabel: wi,
2638
- distValue: Ci,
2639
- distPct: Ni,
2640
- distBar: Ti,
2641
- distBarFill: ki,
2642
- metricRow: Ii,
2643
- metricLabel: $i,
2644
- metricValue: xi,
2645
- rankTable: Li,
2646
- rankNum: Ai,
2647
- rankNumTop: Di,
2648
- loadingWrap: Ri,
2649
- trendEmpty: Oi,
2650
- rankRowClickable: Ei,
2651
- normalDistSummary: Pi,
2652
- summaryGroup: Fi,
2653
- summaryItem: Mi,
2654
- summarySep: Bi
2643
+ return w(t, "查询对话详情失败");
2644
+ }
2645
+ const ei = "_page_1il4h_3", ti = "_toolbar_1il4h_14", ni = "_toolbarLeft_1il4h_22", ai = "_pageTitle_1il4h_28", ri = "_toolbarRight_1il4h_35", oi = "_toolbarDivider_1il4h_44", si = "_viewToggle_1il4h_51", ii = "_trendTable_1il4h_57", ci = "_trendTableDate_1il4h_105", li = "_trendTableWeekend_1il4h_118", di = "_trendTableNum_1il4h_123", ui = "_kpiGrid_1il4h_130", mi = "_kpiCard_1il4h_138", pi = "_kpiLabel_1il4h_148", fi = "_kpiValue_1il4h_157", hi = "_kpiSub_1il4h_165", yi = "_kpiSubPositive_1il4h_170", gi = "_kpiSubNegative_1il4h_174", _i = "_statsTabs_1il4h_179", bi = "_tabContent_1il4h_188", vi = "_statsCard_1il4h_196", Si = "_cardTitle_1il4h_203", wi = "_infoIcon_1il4h_213", Ni = "_statsCardFull_1il4h_226", Ci = "_distList_1il4h_235", ki = "_distItem_1il4h_241", Ti = "_distHeader_1il4h_247", Ii = "_distLabel_1il4h_254", $i = "_distValue_1il4h_259", xi = "_distPct_1il4h_265", Li = "_distBar_1il4h_271", Ai = "_distBarFill_1il4h_278", Di = "_metricRow_1il4h_285", Ri = "_metricLabel_1il4h_298", Oi = "_metricValue_1il4h_302", Ei = "_rankTable_1il4h_309", Pi = "_rankNum_1il4h_333", Fi = "_rankNumTop_1il4h_346", Mi = "_loadingWrap_1il4h_352", Bi = "_trendEmpty_1il4h_360", zi = "_rankRowClickable_1il4h_391", Ui = "_normalDistSummary_1il4h_405", Wi = "_summaryGroup_1il4h_418", Hi = "_summaryItem_1il4h_424", Ki = "_summarySep_1il4h_429", E = {
2646
+ page: ei,
2647
+ toolbar: ti,
2648
+ toolbarLeft: ni,
2649
+ pageTitle: ai,
2650
+ toolbarRight: ri,
2651
+ toolbarDivider: oi,
2652
+ viewToggle: si,
2653
+ trendTable: ii,
2654
+ trendTableDate: ci,
2655
+ trendTableWeekend: li,
2656
+ trendTableNum: di,
2657
+ kpiGrid: ui,
2658
+ kpiCard: mi,
2659
+ kpiLabel: pi,
2660
+ kpiValue: fi,
2661
+ kpiSub: hi,
2662
+ kpiSubPositive: yi,
2663
+ kpiSubNegative: gi,
2664
+ statsTabs: _i,
2665
+ tabContent: bi,
2666
+ statsCard: vi,
2667
+ cardTitle: Si,
2668
+ infoIcon: wi,
2669
+ statsCardFull: Ni,
2670
+ distList: Ci,
2671
+ distItem: ki,
2672
+ distHeader: Ti,
2673
+ distLabel: Ii,
2674
+ distValue: $i,
2675
+ distPct: xi,
2676
+ distBar: Li,
2677
+ distBarFill: Ai,
2678
+ metricRow: Di,
2679
+ metricLabel: Ri,
2680
+ metricValue: Oi,
2681
+ rankTable: Ei,
2682
+ rankNum: Pi,
2683
+ rankNumTop: Fi,
2684
+ loadingWrap: Mi,
2685
+ trendEmpty: Bi,
2686
+ rankRowClickable: zi,
2687
+ normalDistSummary: Ui,
2688
+ summaryGroup: Wi,
2689
+ summaryItem: Hi,
2690
+ summarySep: Ki
2655
2691
  };
2656
2692
  function Ve(e) {
2657
2693
  if (e == null) return "0";
2658
2694
  const n = Number(e);
2659
2695
  return isNaN(n) ? "0" : n >= 1e8 ? (n / 1e8).toFixed(1) + "亿" : n >= 1e4 ? (n / 1e4).toFixed(1) + "w" : n >= 1e3 ? (n / 1e3).toFixed(1) + "k" : String(n);
2660
2696
  }
2661
- function ru(e) {
2697
+ function iu(e) {
2662
2698
  return !e || e <= 0 ? "—" : e < 1e3 ? Math.round(e) + "ms" : e < 6e4 ? (e / 1e3).toFixed(1) + "s" : e < 36e5 ? (e / 6e4).toFixed(1) + "min" : (e / 36e5).toFixed(1) + "h";
2663
2699
  }
2664
- function ou(e) {
2700
+ function cu(e) {
2665
2701
  return e == null ? "0%" : e + "%";
2666
2702
  }
2667
- function ft({
2703
+ function pt({
2668
2704
  label: e,
2669
2705
  value: n,
2670
2706
  sub: t,
@@ -2674,7 +2710,7 @@ function ft({
2674
2710
  return /* @__PURE__ */ y("div", { className: E.kpiCard, children: [
2675
2711
  /* @__PURE__ */ y("span", { className: E.kpiLabel, children: [
2676
2712
  e,
2677
- r && /* @__PURE__ */ o(ze, { title: r, children: /* @__PURE__ */ o(Za, { className: E.infoIcon }) })
2713
+ r && /* @__PURE__ */ o(Ue, { title: r, children: /* @__PURE__ */ o(tr, { className: E.infoIcon }) })
2678
2714
  ] }),
2679
2715
  /* @__PURE__ */ o("span", { className: E.kpiValue, children: n }),
2680
2716
  t && /* @__PURE__ */ o(
@@ -2699,22 +2735,22 @@ function Ee({
2699
2735
  let u = !1, m = 0;
2700
2736
  const N = () => {
2701
2737
  if (u || !t.current || t.current.clientWidth === 0) return;
2702
- a.current || (a.current = Er.init(t.current), a.current.on("legendselectchanged", (S) => {
2703
- i.current = S.selected;
2738
+ a.current || (a.current = Fr.init(t.current), a.current.on("legendselectchanged", (v) => {
2739
+ i.current = v.selected;
2704
2740
  }));
2705
- const k = r.current, x = i.current && k && k.legend ? {
2706
- ...k,
2707
- legend: { ...k.legend, selected: i.current }
2708
- } : k;
2741
+ const T = r.current, x = i.current && T && T.legend ? {
2742
+ ...T,
2743
+ legend: { ...T.legend, selected: i.current }
2744
+ } : T;
2709
2745
  a.current.setOption(x, !0), m = requestAnimationFrame(() => {
2710
- var S;
2711
- u || (S = a.current) == null || S.resize();
2746
+ var v;
2747
+ u || (v = a.current) == null || v.resize();
2712
2748
  });
2713
2749
  };
2714
2750
  N();
2715
2751
  const g = () => {
2716
- var k;
2717
- return (k = a.current) == null ? void 0 : k.resize();
2752
+ var T;
2753
+ return (T = a.current) == null ? void 0 : T.resize();
2718
2754
  };
2719
2755
  window.addEventListener("resize", g);
2720
2756
  let b;
@@ -2737,7 +2773,7 @@ function Ee({
2737
2773
  []
2738
2774
  ), /* @__PURE__ */ o("div", { ref: t, style: { width: "100%", height: `${n}px` } });
2739
2775
  }
2740
- function su({
2776
+ function lu({
2741
2777
  data: e,
2742
2778
  field: n,
2743
2779
  altField: t,
@@ -2756,21 +2792,21 @@ function su({
2756
2792
  createdCount: "创建数",
2757
2793
  doneCount: "完成数",
2758
2794
  failedCount: "失败数"
2759
- }, u = e.map((k) => {
2795
+ }, u = e.map((T) => {
2760
2796
  var x;
2761
- return ((x = k.date) == null ? void 0 : x.slice(5)) || "";
2797
+ return ((x = T.date) == null ? void 0 : x.slice(5)) || "";
2762
2798
  }), m = [], N = [], g = r || l[String(n)] || String(n);
2763
2799
  if (N.push(g), m.push({
2764
2800
  name: g,
2765
2801
  type: "bar",
2766
2802
  stack: "total",
2767
- data: e.map((k) => Number(k[n] || 0)),
2803
+ data: e.map((T) => Number(T[n] || 0)),
2768
2804
  itemStyle: { color: "#4285f4", borderRadius: [3, 3, 0, 0] },
2769
2805
  barMaxWidth: 20
2770
2806
  }), t) {
2771
- const k = l[String(t)] || String(t);
2772
- N.push(k), m.push({
2773
- name: k,
2807
+ const T = l[String(t)] || String(t);
2808
+ N.push(T), m.push({
2809
+ name: T,
2774
2810
  type: "bar",
2775
2811
  stack: "total",
2776
2812
  data: e.map((x) => Number(x[t] || 0)),
@@ -2779,9 +2815,9 @@ function su({
2779
2815
  });
2780
2816
  }
2781
2817
  if (a) {
2782
- const k = l[String(a)] || String(a);
2783
- N.push(k), m.push({
2784
- name: k,
2818
+ const T = l[String(a)] || String(a);
2819
+ N.push(T), m.push({
2820
+ name: T,
2785
2821
  type: "bar",
2786
2822
  stack: "total",
2787
2823
  data: e.map((x) => Number(x[a] || 0)),
@@ -2824,7 +2860,7 @@ function su({
2824
2860
  };
2825
2861
  return /* @__PURE__ */ o(Ee, { option: b, height: i });
2826
2862
  }
2827
- function iu({ data: e }) {
2863
+ function du({ data: e }) {
2828
2864
  if (!e || e.length === 0)
2829
2865
  return /* @__PURE__ */ o("div", { className: E.trendEmpty, children: "暂无数据" });
2830
2866
  const n = e.map((a) => {
@@ -2939,7 +2975,7 @@ function iu({ data: e }) {
2939
2975
  };
2940
2976
  return /* @__PURE__ */ o(Ee, { option: t, height: 240 });
2941
2977
  }
2942
- function cu({ data: e }) {
2978
+ function uu({ data: e }) {
2943
2979
  if (!e || e.length === 0)
2944
2980
  return /* @__PURE__ */ o("div", { className: E.trendEmpty, children: "暂无数据" });
2945
2981
  const n = e.map((u) => {
@@ -3048,7 +3084,7 @@ function cu({ data: e }) {
3048
3084
  };
3049
3085
  return /* @__PURE__ */ o(Ee, { option: l, height: 240 });
3050
3086
  }
3051
- function lu({
3087
+ function mu({
3052
3088
  messageTrend: e,
3053
3089
  taskTrend: n
3054
3090
  }) {
@@ -3056,22 +3092,22 @@ function lu({
3056
3092
  if (t.length === 0 && a.length === 0)
3057
3093
  return /* @__PURE__ */ o("div", { className: E.trendEmpty, children: "暂无数据" });
3058
3094
  const r = /* @__PURE__ */ new Set();
3059
- for (const S of t)
3060
- S != null && S.date && r.add(S.date);
3061
- for (const S of a)
3062
- S != null && S.date && r.add(S.date);
3063
- const i = Array.from(r).sort(), l = new Map(t.map((S) => [S.date, S])), u = new Map(a.map((S) => [S.date, S])), m = i.map((S) => S.slice(5)), N = i.map((S) => {
3095
+ for (const v of t)
3096
+ v != null && v.date && r.add(v.date);
3097
+ for (const v of a)
3098
+ v != null && v.date && r.add(v.date);
3099
+ const i = Array.from(r).sort(), l = new Map(t.map((v) => [v.date, v])), u = new Map(a.map((v) => [v.date, v])), m = i.map((v) => v.slice(5)), N = i.map((v) => {
3064
3100
  var D;
3065
- return Number(((D = l.get(S)) == null ? void 0 : D.humanCount) || 0);
3066
- }), g = i.map((S) => {
3101
+ return Number(((D = l.get(v)) == null ? void 0 : D.humanCount) || 0);
3102
+ }), g = i.map((v) => {
3067
3103
  var D;
3068
- return Number(((D = l.get(S)) == null ? void 0 : D.agentCount) || 0);
3069
- }), b = i.map((S) => {
3104
+ return Number(((D = l.get(v)) == null ? void 0 : D.agentCount) || 0);
3105
+ }), b = i.map((v) => {
3070
3106
  var D;
3071
- return Number(((D = u.get(S)) == null ? void 0 : D.doneCount) || 0);
3072
- }), k = i.map((S) => {
3107
+ return Number(((D = u.get(v)) == null ? void 0 : D.doneCount) || 0);
3108
+ }), T = i.map((v) => {
3073
3109
  var j, Q;
3074
- const D = Number(((j = u.get(S)) == null ? void 0 : j.createdCount) || 0), P = Number(((Q = u.get(S)) == null ? void 0 : Q.doneCount) || 0);
3110
+ const D = Number(((j = u.get(v)) == null ? void 0 : j.createdCount) || 0), P = Number(((Q = u.get(v)) == null ? void 0 : Q.doneCount) || 0);
3075
3111
  return Math.max(0, D - P);
3076
3112
  }), x = {
3077
3113
  tooltip: {
@@ -3133,7 +3169,7 @@ function lu({
3133
3169
  name: "失败数",
3134
3170
  type: "bar",
3135
3171
  stack: "task",
3136
- data: k,
3172
+ data: T,
3137
3173
  itemStyle: { color: "#ff4d4f", borderRadius: [3, 3, 0, 0] },
3138
3174
  barMaxWidth: 20
3139
3175
  }
@@ -3141,7 +3177,7 @@ function lu({
3141
3177
  };
3142
3178
  return /* @__PURE__ */ o(Ee, { option: x, height: 240 });
3143
3179
  }
3144
- function du({
3180
+ function pu({
3145
3181
  data: e
3146
3182
  }) {
3147
3183
  if (!e || e.length === 0)
@@ -3260,7 +3296,7 @@ function du({
3260
3296
  };
3261
3297
  return /* @__PURE__ */ o(Ee, { option: a, height: 240 });
3262
3298
  }
3263
- function uu({
3299
+ function fu({
3264
3300
  data: e
3265
3301
  }) {
3266
3302
  const n = Array.isArray(e) ? e : [];
@@ -3356,7 +3392,7 @@ function uu({
3356
3392
  };
3357
3393
  return /* @__PURE__ */ o(Ee, { option: a, height: 240 });
3358
3394
  }
3359
- function mu({
3395
+ function hu({
3360
3396
  agentPrompt: e,
3361
3397
  agentCompletion: n,
3362
3398
  imageParsePrompt: t,
@@ -3391,7 +3427,7 @@ function mu({
3391
3427
  }
3392
3428
  ];
3393
3429
  return /* @__PURE__ */ o("div", { className: E.distList, children: u.map((m, N) => {
3394
- const g = m.prompt + m.completion, b = l > 0 ? m.prompt * 100 / l : 0, k = l > 0 ? m.completion * 100 / l : 0;
3430
+ const g = m.prompt + m.completion, b = l > 0 ? m.prompt * 100 / l : 0, T = l > 0 ? m.completion * 100 / l : 0;
3395
3431
  return /* @__PURE__ */ y("div", { className: E.distItem, children: [
3396
3432
  /* @__PURE__ */ y("div", { className: E.distHeader, children: [
3397
3433
  /* @__PURE__ */ o("span", { className: E.distLabel, children: m.label }),
@@ -3421,7 +3457,7 @@ function mu({
3421
3457
  "div",
3422
3458
  {
3423
3459
  style: {
3424
- width: `${k}%`,
3460
+ width: `${T}%`,
3425
3461
  background: m.completionColor,
3426
3462
  height: "100%"
3427
3463
  }
@@ -3431,7 +3467,7 @@ function mu({
3431
3467
  ] }, N);
3432
3468
  }) });
3433
3469
  }
3434
- function fu({ items: e }) {
3470
+ function yu({ items: e }) {
3435
3471
  const n = e.reduce((t, a) => t + a.value, 0);
3436
3472
  return n === 0 ? /* @__PURE__ */ o("div", { className: E.trendEmpty, children: "暂无数据" }) : /* @__PURE__ */ o("div", { className: E.distList, children: e.map((t, a) => {
3437
3473
  const r = n > 0 ? t.value * 100 / n : 0;
@@ -3456,13 +3492,13 @@ function fu({ items: e }) {
3456
3492
  ] }, a);
3457
3493
  }) });
3458
3494
  }
3459
- function pu({ label: e, value: n }) {
3495
+ function gu({ label: e, value: n }) {
3460
3496
  return /* @__PURE__ */ y("div", { className: E.metricRow, children: [
3461
3497
  /* @__PURE__ */ o("span", { className: E.metricLabel, children: e }),
3462
3498
  /* @__PURE__ */ o("span", { className: E.metricValue, children: n })
3463
3499
  ] });
3464
3500
  }
3465
- function hu({
3501
+ function _u({
3466
3502
  columns: e,
3467
3503
  rows: n
3468
3504
  }) {
@@ -3477,7 +3513,7 @@ function hu({
3477
3513
  ) : String(r) }, i)) }, a)) })
3478
3514
  ] });
3479
3515
  }
3480
- const yu = {
3516
+ const bu = {
3481
3517
  blue: "#4285f4",
3482
3518
  green: "#52c41a",
3483
3519
  orange: "#faad14",
@@ -3485,14 +3521,14 @@ const yu = {
3485
3521
  purple: "#722ed1",
3486
3522
  cyan: "#13c2c2",
3487
3523
  gray: "#8c8c8c"
3488
- }, pt = [
3524
+ }, ft = [
3489
3525
  "#4285f4",
3490
3526
  "#36cfc9",
3491
3527
  "#722ed1",
3492
3528
  "#2f54eb",
3493
3529
  "#13c2c2",
3494
3530
  "#597ef7"
3495
- ], Ui = { left: 44, right: 20, top: 24, bottom: 32 }, At = { fontSize: 10, color: "#8c8c8c" }, Un = {
3531
+ ], qi = { left: 44, right: 20, top: 24, bottom: 32 }, At = { fontSize: 10, color: "#8c8c8c" }, zn = {
3496
3532
  lineStyle: { color: "#f0f0f0", type: "dashed" }
3497
3533
  }, Qt = {
3498
3534
  trigger: "axis",
@@ -3500,24 +3536,24 @@ const yu = {
3500
3536
  backgroundColor: "rgba(255,255,255,0.96)",
3501
3537
  borderColor: "#e6eaf0",
3502
3538
  borderWidth: 1
3503
- }, zn = { lineStyle: { color: "#e8e8e8" } }, zi = "_exportBtn_5ts4h_4", Wi = "_exportTip_5ts4h_31", Hi = "_exportModal_5ts4h_40", qi = "_section_5ts4h_78", Ki = "_sectionTitle_5ts4h_86", ji = "_sectionHint_5ts4h_93", Vi = "_rangeList_5ts4h_101", Gi = "_rangeRow_5ts4h_107", Ji = "_rangeLabel_5ts4h_114", Yi = "_rangeValue_5ts4h_121", Qi = "_radioRow_5ts4h_128", Xi = "_fieldHeader_5ts4h_133", Zi = "_fieldLink_5ts4h_140", ec = "_fieldGroup_5ts4h_151", tc = "_fileInput_5ts4h_171", nc = "_footerHint_5ts4h_179", ac = "_footerBar_5ts4h_186", F = {
3504
- exportBtn: zi,
3505
- exportTip: Wi,
3506
- exportModal: Hi,
3507
- section: qi,
3508
- sectionTitle: Ki,
3509
- sectionHint: ji,
3510
- rangeList: Vi,
3511
- rangeRow: Gi,
3512
- rangeLabel: Ji,
3513
- rangeValue: Yi,
3514
- radioRow: Qi,
3515
- fieldHeader: Xi,
3516
- fieldLink: Zi,
3517
- fieldGroup: ec,
3518
- fileInput: tc,
3519
- footerHint: nc,
3520
- footerBar: ac
3539
+ }, Un = { lineStyle: { color: "#e8e8e8" } }, ji = "_exportBtn_5ts4h_4", Vi = "_exportTip_5ts4h_31", Gi = "_exportModal_5ts4h_40", Ji = "_section_5ts4h_78", Yi = "_sectionTitle_5ts4h_86", Qi = "_sectionHint_5ts4h_93", Xi = "_rangeList_5ts4h_101", Zi = "_rangeRow_5ts4h_107", ec = "_rangeLabel_5ts4h_114", tc = "_rangeValue_5ts4h_121", nc = "_radioRow_5ts4h_128", ac = "_fieldHeader_5ts4h_133", rc = "_fieldLink_5ts4h_140", oc = "_fieldGroup_5ts4h_151", sc = "_fileInput_5ts4h_171", ic = "_footerHint_5ts4h_179", cc = "_footerBar_5ts4h_186", F = {
3540
+ exportBtn: ji,
3541
+ exportTip: Vi,
3542
+ exportModal: Gi,
3543
+ section: Ji,
3544
+ sectionTitle: Yi,
3545
+ sectionHint: Qi,
3546
+ rangeList: Xi,
3547
+ rangeRow: Zi,
3548
+ rangeLabel: ec,
3549
+ rangeValue: tc,
3550
+ radioRow: nc,
3551
+ fieldHeader: ac,
3552
+ fieldLink: rc,
3553
+ fieldGroup: oc,
3554
+ fileInput: sc,
3555
+ footerHint: ic,
3556
+ footerBar: cc
3521
3557
  };
3522
3558
  function Wn(e) {
3523
3559
  if (e == null) return "";
@@ -3534,11 +3570,11 @@ function Hn(e, n) {
3534
3570
  return "\uFEFF" + [t, ...a].join(`\r
3535
3571
  `);
3536
3572
  }
3537
- function qn(e, n) {
3573
+ function Kn(e, n) {
3538
3574
  const t = new Blob([n], { type: "text/csv;charset=utf-8" }), a = URL.createObjectURL(t), r = document.createElement("a");
3539
3575
  r.href = a, r.download = e.endsWith(".csv") ? e : `${e}.csv`, document.body.appendChild(r), r.click(), document.body.removeChild(r), setTimeout(() => URL.revokeObjectURL(a), 0);
3540
3576
  }
3541
- const Kn = (e) => e.map((n) => ({ key: n.key, header: n.label })), rc = {
3577
+ const qn = (e) => e.map((n) => ({ key: n.key, header: n.label })), lc = {
3542
3578
  kpi: "KPI",
3543
3579
  trend: "趋势",
3544
3580
  ranking: "排名",
@@ -3548,7 +3584,7 @@ const Kn = (e) => e.map((n) => ({ key: n.key, header: n.label })), rc = {
3548
3584
  trend: "aggregate",
3549
3585
  ranking: "aggregate",
3550
3586
  distribution: "aggregate"
3551
- }, oc = {
3587
+ }, dc = {
3552
3588
  kpi: [
3553
3589
  { key: "label", label: "指标名" },
3554
3590
  { key: "value", label: "数值" }
@@ -3586,18 +3622,18 @@ function Et({
3586
3622
  onClick: e,
3587
3623
  style: n
3588
3624
  }) {
3589
- return /* @__PURE__ */ o(ze, { title: "导出 CSV", overlayClassName: F.exportTip, children: /* @__PURE__ */ o(
3625
+ return /* @__PURE__ */ o(Ue, { title: "导出 CSV", overlayClassName: F.exportTip, children: /* @__PURE__ */ o(
3590
3626
  "button",
3591
3627
  {
3592
3628
  type: "button",
3593
3629
  className: F.exportBtn,
3594
3630
  style: n,
3595
3631
  onClick: e,
3596
- children: /* @__PURE__ */ o(er, {})
3632
+ children: /* @__PURE__ */ o(nr, {})
3597
3633
  }
3598
3634
  ) });
3599
3635
  }
3600
- function sc({
3636
+ function uc({
3601
3637
  open: e,
3602
3638
  source: n,
3603
3639
  onClose: t,
@@ -3611,12 +3647,12 @@ function sc({
3611
3647
  }) {
3612
3648
  const [g, b] = I(
3613
3649
  jn[n]
3614
- ), [k, x] = I([]), [S, D] = I(""), [P, j] = I(!1), [Q, M] = I(null), ae = B(() => {
3615
- var T;
3616
- const A = oc[n], re = (m == null ? void 0 : m.total) ?? 0;
3650
+ ), [T, x] = I([]), [v, D] = I(""), [P, j] = I(!1), [Q, M] = I(null), ae = B(() => {
3651
+ var k;
3652
+ const A = dc[n], re = (m == null ? void 0 : m.total) ?? 0;
3617
3653
  let V = [];
3618
3654
  if (n === "kpi") {
3619
- const f = (T = m == null ? void 0 : m.ranking) == null ? void 0 : T[0], L = m == null ? void 0 : m.tagCoverage;
3655
+ const p = (k = m == null ? void 0 : m.ranking) == null ? void 0 : k[0], L = m == null ? void 0 : m.tagCoverage;
3620
3656
  V = [
3621
3657
  { label: "工单总量", value: re },
3622
3658
  {
@@ -3627,38 +3663,38 @@ function sc({
3627
3663
  label: "标签覆盖率",
3628
3664
  value: `${L != null ? Number(L.toFixed(1)) : 0}%`
3629
3665
  },
3630
- { label: "排名第一", value: (f == null ? void 0 : f.key) || "—" },
3666
+ { label: "排名第一", value: (p == null ? void 0 : p.key) || "—" },
3631
3667
  { label: "活跃创建人", value: (m == null ? void 0 : m.activeCreators) ?? 0 }
3632
3668
  ];
3633
3669
  } else if (n === "trend")
3634
- V = ((m == null ? void 0 : m.trend) ?? []).map((f) => ({
3635
- date: f.date,
3636
- count: f.count
3670
+ V = ((m == null ? void 0 : m.trend) ?? []).map((p) => ({
3671
+ date: p.date,
3672
+ count: p.count
3637
3673
  }));
3638
3674
  else if (n === "ranking")
3639
- V = ((m == null ? void 0 : m.ranking) ?? []).map((f) => ({
3640
- key: f.key || "未设置",
3641
- count: f.count,
3642
- ratio: Gn(Number(f.count || 0), re)
3675
+ V = ((m == null ? void 0 : m.ranking) ?? []).map((p) => ({
3676
+ key: p.key || "未设置",
3677
+ count: p.count,
3678
+ ratio: Gn(Number(p.count || 0), re)
3643
3679
  }));
3644
3680
  else {
3645
- const f = (m == null ? void 0 : m.creatorDistribution) ?? [], L = f.reduce((G, he) => G + Number(he.count || 0), 0);
3646
- V = f.map((G) => ({
3681
+ const p = (m == null ? void 0 : m.creatorDistribution) ?? [], L = p.reduce((G, he) => G + Number(he.count || 0), 0);
3682
+ V = p.map((G) => ({
3647
3683
  key: G.key || "未设置",
3648
3684
  count: G.count,
3649
3685
  ratio: Gn(Number(G.count || 0), L)
3650
3686
  }));
3651
3687
  }
3652
3688
  return { columns: A, rows: V };
3653
- }, [n, m]), pe = B(
3689
+ }, [n, m]), fe = B(
3654
3690
  () => g === "detail" ? Vn : ae.columns,
3655
3691
  [g, ae.columns]
3656
3692
  );
3657
3693
  Y(() => {
3658
- e && (x(pe.map((A) => A.key)), M(null));
3659
- }, [e, n, g, pe]), Y(() => {
3694
+ e && (x(fe.map((A) => A.key)), M(null));
3695
+ }, [e, n, g, fe]), Y(() => {
3660
3696
  if (!e) return;
3661
- const A = g === "detail" ? "工单明细" : rc[n], re = N.startDate && N.endDate ? `_${Jn(N.startDate)}-${Jn(
3697
+ const A = g === "detail" ? "工单明细" : lc[n], re = N.startDate && N.endDate ? `_${Jn(N.startDate)}-${Jn(
3662
3698
  N.endDate
3663
3699
  )}` : "";
3664
3700
  D(`业务指标_${a || "全部"}_${A}${re}.csv`);
@@ -3672,26 +3708,26 @@ function sc({
3672
3708
  ]), Y(() => {
3673
3709
  e && b(jn[n]);
3674
3710
  }, [e, n]);
3675
- const ee = pe.map((A) => A.key), de = k.length === ee.length && ee.length > 0, Se = () => {
3711
+ const ee = fe.map((A) => A.key), de = T.length === ee.length && ee.length > 0, Se = () => {
3676
3712
  x(de ? ee.slice(0, 1) : ee);
3677
3713
  }, ue = ae.rows.length, me = g === "aggregate" ? `预计导出 ${ue} 行` : Q ? `共 ${Q.total} 行${Q.truncated ? "(受安全上限,最多 10000 行)" : ""}` : "点击导出后拉取全量数据", be = async () => {
3678
- if (k.length === 0) {
3679
- K.warning("请至少选择一列导出字段");
3714
+ if (T.length === 0) {
3715
+ q.warning("请至少选择一列导出字段");
3680
3716
  return;
3681
3717
  }
3682
3718
  j(!0);
3683
3719
  try {
3684
3720
  if (g === "aggregate") {
3685
- const A = ae.columns.filter((re) => k.includes(re.key));
3686
- qn(S, Hn(Kn(A), ae.rows)), K.success("导出成功"), t();
3721
+ const A = ae.columns.filter((re) => T.includes(re.key));
3722
+ Kn(v, Hn(qn(A), ae.rows)), q.success("导出成功"), t();
3687
3723
  } else {
3688
- const A = await Vs(N);
3724
+ const A = await Xs(N);
3689
3725
  M({ total: A.total, truncated: A.truncated });
3690
- const re = A.headers.length ? A.headers : Vn, V = re.filter((f) => k.includes(f.key)).map((f) => ({ key: f.key, label: f.label })), T = V.length ? V : re.map((f) => ({ key: f.key, label: f.label }));
3691
- qn(S, Hn(Kn(T), A.rows)), K.success("导出成功"), A.truncated ? K.warning("导出结果已达安全上限,仅包含前 10000 行") : t();
3726
+ const re = A.headers.length ? A.headers : Vn, V = re.filter((p) => T.includes(p.key)).map((p) => ({ key: p.key, label: p.label })), k = V.length ? V : re.map((p) => ({ key: p.key, label: p.label }));
3727
+ Kn(v, Hn(qn(k), A.rows)), q.success("导出成功"), A.truncated ? q.warning("导出结果已达安全上限,仅包含前 10000 行") : t();
3692
3728
  }
3693
3729
  } catch (A) {
3694
- K.error((A == null ? void 0 : A.userMessage) ?? (A == null ? void 0 : A.message) ?? "导出失败");
3730
+ q.error((A == null ? void 0 : A.userMessage) ?? (A == null ? void 0 : A.message) ?? "导出失败");
3695
3731
  } finally {
3696
3732
  j(!1);
3697
3733
  }
@@ -3768,13 +3804,13 @@ function sc({
3768
3804
  /* @__PURE__ */ o("span", { className: F.fieldLink, onClick: Se, children: de ? "取消" : "全选" })
3769
3805
  ] }),
3770
3806
  /* @__PURE__ */ o("div", { className: F.fieldGroup, children: /* @__PURE__ */ o(
3771
- ir.Group,
3807
+ lr.Group,
3772
3808
  {
3773
- value: k,
3809
+ value: T,
3774
3810
  onChange: (A) => {
3775
3811
  A.length !== 0 && x(A.map(String));
3776
3812
  },
3777
- options: pe.map((A) => ({
3813
+ options: fe.map((A) => ({
3778
3814
  label: A.label,
3779
3815
  value: A.key
3780
3816
  }))
@@ -3788,7 +3824,7 @@ function sc({
3788
3824
  {
3789
3825
  className: F.fileInput,
3790
3826
  size: "small",
3791
- value: S,
3827
+ value: v,
3792
3828
  onChange: (A) => D(A.target.value),
3793
3829
  placeholder: "导出文件名"
3794
3830
  }
@@ -3798,49 +3834,49 @@ function sc({
3798
3834
  }
3799
3835
  );
3800
3836
  }
3801
- const ic = "_headerRow_pm3v4_4", cc = "_title_pm3v4_12", lc = "_headerDivider_pm3v4_22", dc = "_scenarioLabel_pm3v4_31", uc = "_scenarioSelect_pm3v4_40", mc = "_scenarioName_pm3v4_78", fc = "_scenarioCode_pm3v4_83", pc = "_filterBar_pm3v4_90", hc = "_filterLeft_pm3v4_98", yc = "_filterRight_pm3v4_108", gc = "_resetBtn_pm3v4_167", _c = "_filterDivider_pm3v4_179", bc = "_savedOption_pm3v4_187", vc = "_savedOptionName_pm3v4_195", Sc = "_savedOptionDel_pm3v4_201", wc = "_kpiRow_pm3v4_256", Cc = "_kpiItem_pm3v4_263", Nc = "_metricDesc_pm3v4_319", Tc = "_chartFull_pm3v4_329", kc = "_chartRow_pm3v4_337", Ic = "_chartCard_pm3v4_344", $c = "_chartTitle_pm3v4_352", xc = "_chartTitleExtra_pm3v4_366", Lc = "_chartDesc_pm3v4_374", Ac = "_dimTags_pm3v4_382", Dc = "_dimTag_pm3v4_382", Rc = "_dimTagActive_pm3v4_411", Oc = "_emptyState_pm3v4_417", Ec = "_smallDropdown_pm3v4_444", Pc = "_saveModal_pm3v4_457", Fc = "_smallCalendar_pm3v4_487", Mc = "_confirmModal_pm3v4_533", O = {
3802
- headerRow: ic,
3803
- title: cc,
3804
- headerDivider: lc,
3805
- scenarioLabel: dc,
3806
- scenarioSelect: uc,
3807
- scenarioName: mc,
3808
- scenarioCode: fc,
3809
- filterBar: pc,
3810
- filterLeft: hc,
3811
- filterRight: yc,
3812
- resetBtn: gc,
3813
- filterDivider: _c,
3814
- savedOption: bc,
3815
- savedOptionName: vc,
3816
- savedOptionDel: Sc,
3817
- kpiRow: wc,
3818
- kpiItem: Cc,
3819
- metricDesc: Nc,
3820
- chartFull: Tc,
3821
- chartRow: kc,
3822
- chartCard: Ic,
3823
- chartTitle: $c,
3824
- chartTitleExtra: xc,
3825
- chartDesc: Lc,
3826
- dimTags: Ac,
3827
- dimTag: Dc,
3828
- dimTagActive: Rc,
3829
- emptyState: Oc,
3830
- smallDropdown: Ec,
3831
- saveModal: Pc,
3832
- smallCalendar: Fc,
3833
- confirmModal: Mc
3834
- }, Bc = 15, Dt = 8;
3835
- function Uc(e, n, t) {
3837
+ const mc = "_headerRow_pm3v4_4", pc = "_title_pm3v4_12", fc = "_headerDivider_pm3v4_22", hc = "_scenarioLabel_pm3v4_31", yc = "_scenarioSelect_pm3v4_40", gc = "_scenarioName_pm3v4_78", _c = "_scenarioCode_pm3v4_83", bc = "_filterBar_pm3v4_90", vc = "_filterLeft_pm3v4_98", Sc = "_filterRight_pm3v4_108", wc = "_resetBtn_pm3v4_167", Nc = "_filterDivider_pm3v4_179", Cc = "_savedOption_pm3v4_187", kc = "_savedOptionName_pm3v4_195", Tc = "_savedOptionDel_pm3v4_201", Ic = "_kpiRow_pm3v4_256", $c = "_kpiItem_pm3v4_263", xc = "_metricDesc_pm3v4_319", Lc = "_chartFull_pm3v4_329", Ac = "_chartRow_pm3v4_337", Dc = "_chartCard_pm3v4_344", Rc = "_chartTitle_pm3v4_352", Oc = "_chartTitleExtra_pm3v4_366", Ec = "_chartDesc_pm3v4_374", Pc = "_dimTags_pm3v4_382", Fc = "_dimTag_pm3v4_382", Mc = "_dimTagActive_pm3v4_411", Bc = "_emptyState_pm3v4_417", zc = "_smallDropdown_pm3v4_444", Uc = "_saveModal_pm3v4_457", Wc = "_smallCalendar_pm3v4_487", Hc = "_confirmModal_pm3v4_533", O = {
3838
+ headerRow: mc,
3839
+ title: pc,
3840
+ headerDivider: fc,
3841
+ scenarioLabel: hc,
3842
+ scenarioSelect: yc,
3843
+ scenarioName: gc,
3844
+ scenarioCode: _c,
3845
+ filterBar: bc,
3846
+ filterLeft: vc,
3847
+ filterRight: Sc,
3848
+ resetBtn: wc,
3849
+ filterDivider: Nc,
3850
+ savedOption: Cc,
3851
+ savedOptionName: kc,
3852
+ savedOptionDel: Tc,
3853
+ kpiRow: Ic,
3854
+ kpiItem: $c,
3855
+ metricDesc: xc,
3856
+ chartFull: Lc,
3857
+ chartRow: Ac,
3858
+ chartCard: Dc,
3859
+ chartTitle: Rc,
3860
+ chartTitleExtra: Oc,
3861
+ chartDesc: Ec,
3862
+ dimTags: Pc,
3863
+ dimTag: Fc,
3864
+ dimTagActive: Mc,
3865
+ emptyState: Bc,
3866
+ smallDropdown: zc,
3867
+ saveModal: Uc,
3868
+ smallCalendar: Wc,
3869
+ confirmModal: Hc
3870
+ }, Kc = 15, Dt = 8;
3871
+ function qc(e, n, t) {
3836
3872
  const a = (b) => [
3837
3873
  parseInt(b.slice(1, 3), 16),
3838
3874
  parseInt(b.slice(3, 5), 16),
3839
3875
  parseInt(b.slice(5, 7), 16)
3840
- ], [r, i, l] = a(e), [u, m, N] = a(n), g = (b, k) => Math.round(b + (k - b) * t);
3876
+ ], [r, i, l] = a(e), [u, m, N] = a(n), g = (b, T) => Math.round(b + (T - b) * t);
3841
3877
  return `rgb(${g(r, u)},${g(i, m)},${g(l, N)})`;
3842
3878
  }
3843
- function zc({
3879
+ function jc({
3844
3880
  data: e,
3845
3881
  groupBy: n,
3846
3882
  setGroupBy: t,
@@ -3851,14 +3887,14 @@ function zc({
3851
3887
  onExportRanking: u,
3852
3888
  onExportDistribution: m
3853
3889
  }) {
3854
- const N = (e == null ? void 0 : e.trend) ?? [], g = (e == null ? void 0 : e.ranking) ?? [], b = (e == null ? void 0 : e.creatorDistribution) ?? [], k = B(() => {
3890
+ const N = (e == null ? void 0 : e.trend) ?? [], g = (e == null ? void 0 : e.ranking) ?? [], b = (e == null ? void 0 : e.creatorDistribution) ?? [], T = B(() => {
3855
3891
  const D = N.map((P) => {
3856
3892
  var j;
3857
3893
  return ((j = P.date) == null ? void 0 : j.slice(5)) || "";
3858
3894
  });
3859
3895
  return {
3860
3896
  tooltip: { ...Qt, axisPointer: { type: "line" } },
3861
- grid: { ...Ui, top: 16 },
3897
+ grid: { ...qi, top: 16 },
3862
3898
  xAxis: {
3863
3899
  type: "category",
3864
3900
  boundaryGap: !1,
@@ -3868,13 +3904,13 @@ function zc({
3868
3904
  interval: "auto",
3869
3905
  rotate: D.length > 20 ? 35 : 0
3870
3906
  },
3871
- axisLine: zn,
3907
+ axisLine: Un,
3872
3908
  axisTick: { show: !1 }
3873
3909
  },
3874
3910
  yAxis: {
3875
3911
  type: "value",
3876
3912
  axisLabel: At,
3877
- splitLine: Un
3913
+ splitLine: zn
3878
3914
  },
3879
3915
  series: [
3880
3916
  {
@@ -3885,8 +3921,8 @@ function zc({
3885
3921
  symbolSize: 3,
3886
3922
  showSymbol: D.length <= 40,
3887
3923
  data: N.map((P) => Number(P.count || 0)),
3888
- itemStyle: { color: pt[0] },
3889
- lineStyle: { color: pt[0], width: 2 },
3924
+ itemStyle: { color: ft[0] },
3925
+ lineStyle: { color: ft[0], width: 2 },
3890
3926
  areaStyle: {
3891
3927
  color: {
3892
3928
  type: "linear",
@@ -3904,14 +3940,14 @@ function zc({
3904
3940
  ]
3905
3941
  };
3906
3942
  }, [N]), x = B(() => {
3907
- const P = [...g.slice(0, Bc)].reverse(), j = Math.max(P.length - 1, 1);
3943
+ const P = [...g.slice(0, Kc)].reverse(), j = Math.max(P.length - 1, 1);
3908
3944
  return {
3909
3945
  tooltip: { ...Qt, axisPointer: { type: "shadow" } },
3910
3946
  grid: { left: 8, right: 44, top: 8, bottom: 8, containLabel: !0 },
3911
3947
  xAxis: {
3912
3948
  type: "value",
3913
3949
  axisLabel: At,
3914
- splitLine: Un
3950
+ splitLine: zn
3915
3951
  },
3916
3952
  yAxis: {
3917
3953
  type: "category",
@@ -3922,7 +3958,7 @@ function zc({
3922
3958
  width: 96,
3923
3959
  overflow: "truncate"
3924
3960
  },
3925
- axisLine: zn,
3961
+ axisLine: Un,
3926
3962
  axisTick: { show: !1 }
3927
3963
  },
3928
3964
  series: [
@@ -3934,7 +3970,7 @@ function zc({
3934
3970
  value: Number(Q.count || 0),
3935
3971
  // 倒序后 idx 越大名次越高,故用 idx/size 反推渐变位置
3936
3972
  itemStyle: {
3937
- color: Uc(pt[2], pt[0], M / j)
3973
+ color: qc(ft[2], ft[0], M / j)
3938
3974
  }
3939
3975
  })),
3940
3976
  label: {
@@ -3946,7 +3982,7 @@ function zc({
3946
3982
  }
3947
3983
  ]
3948
3984
  };
3949
- }, [g]), S = B(() => {
3985
+ }, [g]), v = B(() => {
3950
3986
  const D = [...b].sort(
3951
3987
  (M, ae) => Number(ae.count || 0) - Number(M.count || 0)
3952
3988
  ), P = D.slice(0, Dt).map((M) => ({
@@ -3956,7 +3992,7 @@ function zc({
3956
3992
  j > 0 && P.push({ name: "其他", value: j });
3957
3993
  const Q = (e == null ? void 0 : e.total) ?? 0;
3958
3994
  return {
3959
- color: pt,
3995
+ color: ft,
3960
3996
  tooltip: {
3961
3997
  ...Qt,
3962
3998
  trigger: "item",
@@ -4009,7 +4045,7 @@ function zc({
4009
4045
  l && /* @__PURE__ */ o(Et, { onClick: l })
4010
4046
  ] }),
4011
4047
  /* @__PURE__ */ o("div", { className: O.chartDesc, children: "按创建日期逐日统计工单量,展示所选时间范围内的每日新建工单数变化趋势" }),
4012
- N.length > 0 ? /* @__PURE__ */ o(Ee, { option: k, height: 220 }) : /* @__PURE__ */ o("div", { className: O.emptyState, children: "暂无数据" })
4048
+ N.length > 0 ? /* @__PURE__ */ o(Ee, { option: T, height: 220 }) : /* @__PURE__ */ o("div", { className: O.emptyState, children: "暂无数据" })
4013
4049
  ] }),
4014
4050
  /* @__PURE__ */ y("div", { className: O.chartRow, children: [
4015
4051
  /* @__PURE__ */ y("div", { className: O.chartCard, children: [
@@ -4037,57 +4073,57 @@ function zc({
4037
4073
  m && /* @__PURE__ */ o(Et, { onClick: m })
4038
4074
  ] }),
4039
4075
  /* @__PURE__ */ o("div", { className: O.chartDesc, children: "按工单创建人分组统计数量占比,展示 Top 8 创建人的工单分布" }),
4040
- b.length > 0 ? /* @__PURE__ */ o(Ee, { option: S, height: 280 }) : /* @__PURE__ */ o("div", { className: O.emptyState, children: "暂无数据" })
4076
+ b.length > 0 ? /* @__PURE__ */ o(Ee, { option: v, height: 280 }) : /* @__PURE__ */ o("div", { className: O.emptyState, children: "暂无数据" })
4041
4077
  ] })
4042
4078
  ] })
4043
4079
  ] });
4044
4080
  }
4045
- const Wc = ["id", "deptId"], Hc = ["name", "deptName"], qc = ["childrenList", "children"], Kc = ["staffInfos", "staffList", "staffIds"], jc = ["id", "staffId"];
4081
+ const Vc = ["id", "deptId"], Gc = ["name", "deptName"], Jc = ["childrenList", "children"], Yc = ["staffInfos", "staffList", "staffIds"], Qc = ["id", "staffId"];
4046
4082
  function gt(e, n) {
4047
4083
  for (const t of n) {
4048
4084
  const a = e == null ? void 0 : e[t];
4049
4085
  if (a != null) return a;
4050
4086
  }
4051
4087
  }
4052
- function Vc(e) {
4053
- const n = gt(e, Kc);
4088
+ function Xc(e) {
4089
+ const n = gt(e, Yc);
4054
4090
  return Array.isArray(n) ? n : [];
4055
4091
  }
4056
4092
  function rn(e) {
4057
4093
  const n = [];
4058
- for (const t of Vc(e)) {
4094
+ for (const t of Xc(e)) {
4059
4095
  if (t == null) continue;
4060
- const a = typeof t == "object" ? gt(t, jc) : t;
4096
+ const a = typeof t == "object" ? gt(t, Qc) : t;
4061
4097
  a == null || a === "" || n.push(String(a));
4062
4098
  }
4063
4099
  return n;
4064
4100
  }
4065
4101
  function on(e) {
4066
- const n = gt(e, Wc);
4102
+ const n = gt(e, Vc);
4067
4103
  return n == null ? "" : String(n);
4068
4104
  }
4069
- function Gc(e) {
4070
- const n = gt(e, Hc);
4105
+ function Zc(e) {
4106
+ const n = gt(e, Gc);
4071
4107
  return n == null ? "" : String(n);
4072
4108
  }
4073
4109
  function sn(e) {
4074
- const n = gt(e, qc);
4110
+ const n = gt(e, Jc);
4075
4111
  return Array.isArray(n) ? n : [];
4076
4112
  }
4077
- const Jc = "_deptSelect_2yaf1_4", Yc = "_deptDropdown_2yaf1_14", Qc = "_nodeRoot_2yaf1_144", Xc = "_switcherIcon_2yaf1_175", Zc = "_nodeRow_2yaf1_257", el = "_nodeIcon_2yaf1_268", tl = "_iconRoot_2yaf1_279", nl = "_iconDept_2yaf1_284", al = "_nodeName_2yaf1_288", rl = "_nodeCount_2yaf1_299", ol = "_countIcon_2yaf1_314", sl = "_emptyText_2yaf1_346", Te = {
4078
- deptSelect: Jc,
4079
- deptDropdown: Yc,
4080
- nodeRoot: Qc,
4081
- switcherIcon: Xc,
4082
- nodeRow: Zc,
4083
- nodeIcon: el,
4084
- iconRoot: tl,
4085
- iconDept: nl,
4086
- nodeName: al,
4087
- nodeCount: rl,
4088
- countIcon: ol,
4089
- emptyText: sl
4090
- }, il = /* @__PURE__ */ o("span", { className: Te.switcherIcon, children: /* @__PURE__ */ o("svg", { viewBox: "0 0 12 12", width: "9", height: "9", "aria-hidden": !0, children: /* @__PURE__ */ o(
4113
+ const el = "_deptSelect_2yaf1_4", tl = "_deptDropdown_2yaf1_14", nl = "_nodeRoot_2yaf1_144", al = "_switcherIcon_2yaf1_175", rl = "_nodeRow_2yaf1_257", ol = "_nodeIcon_2yaf1_268", sl = "_iconRoot_2yaf1_279", il = "_iconDept_2yaf1_284", cl = "_nodeName_2yaf1_288", ll = "_nodeCount_2yaf1_299", dl = "_countIcon_2yaf1_314", ul = "_emptyText_2yaf1_346", ke = {
4114
+ deptSelect: el,
4115
+ deptDropdown: tl,
4116
+ nodeRoot: nl,
4117
+ switcherIcon: al,
4118
+ nodeRow: rl,
4119
+ nodeIcon: ol,
4120
+ iconRoot: sl,
4121
+ iconDept: il,
4122
+ nodeName: cl,
4123
+ nodeCount: ll,
4124
+ countIcon: dl,
4125
+ emptyText: ul
4126
+ }, ml = /* @__PURE__ */ o("span", { className: ke.switcherIcon, children: /* @__PURE__ */ o("svg", { viewBox: "0 0 12 12", width: "9", height: "9", "aria-hidden": !0, children: /* @__PURE__ */ o(
4091
4127
  "path",
4092
4128
  {
4093
4129
  d: "M2.5 4.2L6 7.7l3.5-3.5",
@@ -4097,18 +4133,18 @@ const Jc = "_deptSelect_2yaf1_4", Yc = "_deptDropdown_2yaf1_14", Qc = "_nodeRoot
4097
4133
  strokeLinecap: "round",
4098
4134
  strokeLinejoin: "round"
4099
4135
  }
4100
- ) }) }), cl = { minWidth: 240 }, ll = [], dl = [];
4101
- function ul({
4136
+ ) }) }), pl = { minWidth: 240 }, fl = [], hl = [];
4137
+ function yl({
4102
4138
  value: e,
4103
4139
  onChange: n,
4104
4140
  treeData: t,
4105
4141
  loading: a,
4106
4142
  style: r
4107
4143
  }) {
4108
- const [i, l] = I(""), [u, m] = I(null), [N, g] = I(!1), b = N || !!e, k = B(
4109
- () => b ? da(t, 0) : dl,
4144
+ const [i, l] = I(""), [u, m] = I(null), [N, g] = I(!1), b = N || !!e, T = B(
4145
+ () => b ? ma(t, 0) : hl,
4110
4146
  [t, b]
4111
- ), x = B(() => pl(t), [t]), S = u ?? x, D = R((M) => {
4147
+ ), x = B(() => bl(t), [t]), v = u ?? x, D = R((M) => {
4112
4148
  if (M) {
4113
4149
  g(!0);
4114
4150
  return;
@@ -4117,7 +4153,7 @@ function ul({
4117
4153
  }, []), P = R(
4118
4154
  (M) => {
4119
4155
  l(M), m(
4120
- M ? hl(t, M) : null
4156
+ M ? vl(t, M) : null
4121
4157
  );
4122
4158
  },
4123
4159
  [t]
@@ -4130,7 +4166,7 @@ function ul({
4130
4166
  m(M);
4131
4167
  }, []);
4132
4168
  return /* @__PURE__ */ o(
4133
- cr,
4169
+ dr,
4134
4170
  {
4135
4171
  size: "small",
4136
4172
  allowClear: !0,
@@ -4140,29 +4176,29 @@ function ul({
4140
4176
  loading: a,
4141
4177
  value: e,
4142
4178
  onChange: j,
4143
- treeData: k,
4144
- className: Te.deptSelect,
4145
- dropdownClassName: Te.deptDropdown,
4179
+ treeData: T,
4180
+ className: ke.deptSelect,
4181
+ dropdownClassName: ke.deptDropdown,
4146
4182
  treeNodeFilterProp: "searchName",
4147
4183
  treeNodeLabelProp: "label",
4148
4184
  searchValue: i,
4149
4185
  onSearch: P,
4150
4186
  onDropdownVisibleChange: D,
4151
- treeExpandedKeys: S,
4187
+ treeExpandedKeys: v,
4152
4188
  onTreeExpand: Q,
4153
- switcherIcon: il,
4189
+ switcherIcon: ml,
4154
4190
  virtual: !1,
4155
4191
  listHeight: 320,
4156
4192
  dropdownMatchSelectWidth: !1,
4157
- dropdownStyle: cl,
4158
- notFoundContent: /* @__PURE__ */ o("span", { className: Te.emptyText, children: "无匹配部门" })
4193
+ dropdownStyle: pl,
4194
+ notFoundContent: /* @__PURE__ */ o("span", { className: ke.emptyText, children: "无匹配部门" })
4159
4195
  }
4160
4196
  );
4161
4197
  }
4162
- const ml = dr.memo(ul);
4163
- function da(e, n) {
4198
+ const gl = mr.memo(yl);
4199
+ function ma(e, n) {
4164
4200
  return !Array.isArray(e) || e.length === 0 ? [] : e.map((t) => {
4165
- const a = da(sn(t), n + 1), r = Gc(t) || "未命名", i = rn(t).length + a.reduce((u, m) => u + m.staffCount, 0), l = on(t);
4201
+ const a = ma(sn(t), n + 1), r = Zc(t) || "未命名", i = rn(t).length + a.reduce((u, m) => u + m.staffCount, 0), l = on(t);
4166
4202
  return {
4167
4203
  value: l,
4168
4204
  key: l,
@@ -4171,30 +4207,30 @@ function da(e, n) {
4171
4207
  staffCount: i,
4172
4208
  depth: n,
4173
4209
  /* 根节点标记:无父级,连接线不画拐角(CSS 依赖此 class 区分) */
4174
- className: n === 0 ? Te.nodeRoot : void 0,
4210
+ className: n === 0 ? ke.nodeRoot : void 0,
4175
4211
  children: a,
4176
4212
  /* title 承载「图标 + 部门名 + 人数」:内容只随数据变化,展开态不参与,整树 title 可缓存 */
4177
- title: /* @__PURE__ */ y("span", { className: Te.nodeRow, children: [
4178
- fl(n),
4179
- /* @__PURE__ */ o("span", { className: Te.nodeName, children: r }),
4213
+ title: /* @__PURE__ */ y("span", { className: ke.nodeRow, children: [
4214
+ _l(n),
4215
+ /* @__PURE__ */ o("span", { className: ke.nodeName, children: r }),
4180
4216
  i > 0 && /* 人数带人形图标 + 原生 title:不加图标时纯数字会被误读为编号/工单量。
4181
4217
  用原生 title 而非 antd Tooltip——树行数多,逐行挂 Tooltip 组件会显著拖慢下拉渲染 */
4182
- /* @__PURE__ */ y("span", { className: Te.nodeCount, title: "成员数(含下级部门)", children: [
4183
- /* @__PURE__ */ o(Zn, { className: Te.countIcon }),
4218
+ /* @__PURE__ */ y("span", { className: ke.nodeCount, title: "成员数(含下级部门)", children: [
4219
+ /* @__PURE__ */ o(Zn, { className: ke.countIcon }),
4184
4220
  i
4185
4221
  ] })
4186
4222
  ] })
4187
4223
  };
4188
4224
  });
4189
4225
  }
4190
- function fl(e) {
4191
- const n = e === 0 ? Te.iconRoot : Te.iconDept;
4192
- return /* @__PURE__ */ o(tr, { className: `${Te.nodeIcon} ${n}` });
4226
+ function _l(e) {
4227
+ const n = e === 0 ? ke.iconRoot : ke.iconDept;
4228
+ return /* @__PURE__ */ o(ar, { className: `${ke.nodeIcon} ${n}` });
4193
4229
  }
4194
- function pl(e) {
4195
- return !Array.isArray(e) || e.length === 0 ? ll : e.map((n) => String((n == null ? void 0 : n.id) ?? (n == null ? void 0 : n.deptId) ?? "")).filter((n) => !!n);
4230
+ function bl(e) {
4231
+ return !Array.isArray(e) || e.length === 0 ? fl : e.map((n) => String((n == null ? void 0 : n.id) ?? (n == null ? void 0 : n.deptId) ?? "")).filter((n) => !!n);
4196
4232
  }
4197
- function hl(e, n) {
4233
+ function vl(e, n) {
4198
4234
  const t = n.toUpperCase(), a = [], r = (i) => {
4199
4235
  if (!Array.isArray(i)) return !1;
4200
4236
  let l = !1;
@@ -4209,8 +4245,8 @@ function hl(e, n) {
4209
4245
  };
4210
4246
  return r(e), a;
4211
4247
  }
4212
- const yl = lr.RangePicker, gl = { width: 200 };
4213
- function _l({
4248
+ const Sl = ur.RangePicker, wl = { width: 200 };
4249
+ function Nl({
4214
4250
  scenarioCode: e,
4215
4251
  creatorId: n,
4216
4252
  setCreatorId: t,
@@ -4223,9 +4259,9 @@ function _l({
4223
4259
  range: N,
4224
4260
  setRange: g,
4225
4261
  loading: b,
4226
- onSearch: k,
4262
+ onSearch: T,
4227
4263
  onReset: x,
4228
- tagDefs: S,
4264
+ tagDefs: v,
4229
4265
  selectedTags: D,
4230
4266
  setTag: P,
4231
4267
  savedFilters: j,
@@ -4233,41 +4269,41 @@ function _l({
4233
4269
  onDeleteFilter: M,
4234
4270
  onLoadFilter: ae
4235
4271
  }) {
4236
- const [pe, ee] = I(), [de, Se] = I(!1), [ue, me] = I(""), be = {
4237
- 今日: [Ne().startOf("day"), Ne().endOf("day")],
4238
- 近三天: [Ne().subtract(2, "day").startOf("day"), Ne().endOf("day")],
4239
- 本周: [Ne().startOf("week"), Ne().endOf("day")],
4240
- 本月: [Ne().startOf("month"), Ne().endOf("day")]
4241
- }, A = S.filter((f) => f.values.length > 0), re = R(
4242
- (f) => l(f || void 0),
4272
+ const [fe, ee] = I(), [de, Se] = I(!1), [ue, me] = I(""), be = {
4273
+ 今日: [Ce().startOf("day"), Ce().endOf("day")],
4274
+ 近三天: [Ce().subtract(2, "day").startOf("day"), Ce().endOf("day")],
4275
+ 本周: [Ce().startOf("week"), Ce().endOf("day")],
4276
+ 本月: [Ce().startOf("month"), Ce().endOf("day")]
4277
+ }, A = v.filter((p) => p.values.length > 0), re = R(
4278
+ (p) => l(p || void 0),
4243
4279
  [l]
4244
4280
  ), V = () => {
4245
- const f = ue.trim();
4246
- f && (Q(f), Se(!1), me(""));
4247
- }, T = (f) => {
4281
+ const p = ue.trim();
4282
+ p && (Q(p), Se(!1), me(""));
4283
+ }, k = (p) => {
4248
4284
  je.confirm({
4249
4285
  title: "确认删除",
4250
- content: `确定要删除已保存条件「${f.name}」吗?`,
4286
+ content: `确定要删除已保存条件「${p.name}」吗?`,
4251
4287
  okText: "确认",
4252
4288
  cancelText: "取消",
4253
4289
  okButtonProps: { size: "small" },
4254
4290
  cancelButtonProps: { size: "small" },
4255
4291
  className: O.confirmModal,
4256
4292
  onOk: () => {
4257
- M(f.id), pe === f.id && ee(void 0);
4293
+ M(p.id), fe === p.id && ee(void 0);
4258
4294
  }
4259
4295
  });
4260
4296
  };
4261
4297
  return /* @__PURE__ */ y("div", { className: O.filterBar, children: [
4262
4298
  /* @__PURE__ */ y("div", { className: O.filterLeft, children: [
4263
4299
  /* @__PURE__ */ o(
4264
- ml,
4300
+ gl,
4265
4301
  {
4266
4302
  value: i,
4267
4303
  onChange: re,
4268
4304
  treeData: u,
4269
4305
  loading: m,
4270
- style: gl
4306
+ style: wl
4271
4307
  }
4272
4308
  ),
4273
4309
  /* @__PURE__ */ o(
@@ -4281,13 +4317,13 @@ function _l({
4281
4317
  dropdownClassName: O.smallDropdown,
4282
4318
  loading: r,
4283
4319
  value: n,
4284
- onChange: (f) => t(f || void 0),
4285
- filterOption: (f, L) => String((L == null ? void 0 : L.label) ?? "").toLowerCase().includes(f.toLowerCase()),
4320
+ onChange: (p) => t(p || void 0),
4321
+ filterOption: (p, L) => String((L == null ? void 0 : L.label) ?? "").toLowerCase().includes(p.toLowerCase()),
4286
4322
  options: a
4287
4323
  }
4288
4324
  ),
4289
4325
  /* @__PURE__ */ o(
4290
- yl,
4326
+ Sl,
4291
4327
  {
4292
4328
  size: "small",
4293
4329
  allowClear: !0,
@@ -4295,29 +4331,29 @@ function _l({
4295
4331
  ranges: be,
4296
4332
  dropdownClassName: O.smallCalendar,
4297
4333
  value: N,
4298
- onChange: (f) => {
4299
- f && f[0] && f[1] ? g([f[0], f[1]]) : f || g(null);
4334
+ onChange: (p) => {
4335
+ p && p[0] && p[1] ? g([p[0], p[1]]) : p || g(null);
4300
4336
  }
4301
4337
  }
4302
4338
  ),
4303
4339
  A.length > 0 && /* @__PURE__ */ y(ot, { children: [
4304
4340
  /* @__PURE__ */ o("span", { className: O.filterDivider }),
4305
- A.map((f) => /* @__PURE__ */ o(
4341
+ A.map((p) => /* @__PURE__ */ o(
4306
4342
  at,
4307
4343
  {
4308
4344
  size: "small",
4309
4345
  allowClear: !0,
4310
- placeholder: f.tagName,
4346
+ placeholder: p.tagName,
4311
4347
  style: { width: 130 },
4312
4348
  dropdownClassName: O.smallDropdown,
4313
- value: D[f.tagKey],
4314
- onChange: (L) => P(f.tagKey, L || void 0),
4315
- options: f.values.map((L) => ({
4349
+ value: D[p.tagKey],
4350
+ onChange: (L) => P(p.tagKey, L || void 0),
4351
+ options: p.values.map((L) => ({
4316
4352
  value: L.value,
4317
4353
  label: L.valueDesc
4318
4354
  }))
4319
4355
  },
4320
- f.tagKey
4356
+ p.tagKey
4321
4357
  ))
4322
4358
  ] })
4323
4359
  ] }),
@@ -4329,16 +4365,16 @@ function _l({
4329
4365
  allowClear: !0,
4330
4366
  placeholder: "已保存条件",
4331
4367
  style: { width: 140 },
4332
- value: pe,
4368
+ value: fe,
4333
4369
  dropdownMatchSelectWidth: !1,
4334
4370
  dropdownClassName: O.smallDropdown,
4335
4371
  optionLabelProp: "label",
4336
4372
  notFoundContent: /* @__PURE__ */ o("span", { style: { fontSize: 11, color: "#999" }, children: "暂无存档" }),
4337
- onChange: (f) => {
4338
- ee(f || void 0), f && ae(f);
4373
+ onChange: (p) => {
4374
+ ee(p || void 0), p && ae(p);
4339
4375
  },
4340
- children: j.map((f) => /* @__PURE__ */ o(at.Option, { value: f.id, label: f.name, children: /* @__PURE__ */ y("div", { className: O.savedOption, children: [
4341
- /* @__PURE__ */ o("span", { className: O.savedOptionName, children: f.name }),
4376
+ children: j.map((p) => /* @__PURE__ */ o(at.Option, { value: p.id, label: p.name, children: /* @__PURE__ */ y("div", { className: O.savedOption, children: [
4377
+ /* @__PURE__ */ o("span", { className: O.savedOptionName, children: p.name }),
4342
4378
  /* @__PURE__ */ o(
4343
4379
  Zt,
4344
4380
  {
@@ -4347,18 +4383,18 @@ function _l({
4347
4383
  L.preventDefault(), L.stopPropagation();
4348
4384
  },
4349
4385
  onClick: (L) => {
4350
- L.stopPropagation(), T(f);
4386
+ L.stopPropagation(), k(p);
4351
4387
  }
4352
4388
  }
4353
4389
  )
4354
- ] }) }, f.id))
4390
+ ] }) }, p.id))
4355
4391
  }
4356
4392
  ),
4357
- /* @__PURE__ */ o(ze, { title: "把当前场景、日期、发起人与标签条件存为常用条件", children: /* @__PURE__ */ o(
4393
+ /* @__PURE__ */ o(Ue, { title: "把当前场景、日期、发起人与标签条件存为常用条件", children: /* @__PURE__ */ o(
4358
4394
  se,
4359
4395
  {
4360
4396
  size: "small",
4361
- icon: /* @__PURE__ */ o(nr, {}),
4397
+ icon: /* @__PURE__ */ o(rr, {}),
4362
4398
  disabled: !e,
4363
4399
  onClick: () => Se(!0),
4364
4400
  children: "保存当前"
@@ -4372,7 +4408,7 @@ function _l({
4372
4408
  type: "primary",
4373
4409
  loading: b,
4374
4410
  disabled: !e,
4375
- onClick: k,
4411
+ onClick: T,
4376
4412
  children: "查询"
4377
4413
  }
4378
4414
  )
@@ -4399,7 +4435,7 @@ function _l({
4399
4435
  maxLength: 20,
4400
4436
  placeholder: "条件名称,如「核心团队近 30 天」",
4401
4437
  value: ue,
4402
- onChange: (f) => me(f.target.value),
4438
+ onChange: (p) => me(p.target.value),
4403
4439
  onPressEnter: V
4404
4440
  }
4405
4441
  )
@@ -4407,7 +4443,7 @@ function _l({
4407
4443
  )
4408
4444
  ] });
4409
4445
  }
4410
- function bl({
4446
+ function Cl({
4411
4447
  data: e,
4412
4448
  groupLabel: n,
4413
4449
  days: t,
@@ -4422,7 +4458,7 @@ function bl({
4422
4458
  ] }),
4423
4459
  /* @__PURE__ */ y("div", { className: O.kpiRow, children: [
4424
4460
  /* @__PURE__ */ o("div", { className: O.kpiItem, children: /* @__PURE__ */ o(
4425
- ft,
4461
+ pt,
4426
4462
  {
4427
4463
  label: "工单总量",
4428
4464
  tip: "当前筛选条件下的场景实例总数",
@@ -4431,7 +4467,7 @@ function bl({
4431
4467
  }
4432
4468
  ) }),
4433
4469
  /* @__PURE__ */ o("div", { className: O.kpiItem, children: /* @__PURE__ */ o(
4434
- ft,
4470
+ pt,
4435
4471
  {
4436
4472
  label: "日均工单量",
4437
4473
  tip: "工单总量 ÷ 统计天数",
@@ -4440,7 +4476,7 @@ function bl({
4440
4476
  }
4441
4477
  ) }),
4442
4478
  /* @__PURE__ */ o("div", { className: O.kpiItem, children: /* @__PURE__ */ o(
4443
- ft,
4479
+ pt,
4444
4480
  {
4445
4481
  label: "标签覆盖率",
4446
4482
  tip: "设置了标签的工单占筛选结果总量的百分比",
@@ -4449,7 +4485,7 @@ function bl({
4449
4485
  }
4450
4486
  ) }),
4451
4487
  /* @__PURE__ */ o("div", { className: O.kpiItem, children: /* @__PURE__ */ o(
4452
- ft,
4488
+ pt,
4453
4489
  {
4454
4490
  label: "排名第一",
4455
4491
  tip: `当前「${n}」维度下工单量最多的分组`,
@@ -4458,7 +4494,7 @@ function bl({
4458
4494
  }
4459
4495
  ) }),
4460
4496
  /* @__PURE__ */ o("div", { className: O.kpiItem, children: /* @__PURE__ */ o(
4461
- ft,
4497
+ pt,
4462
4498
  {
4463
4499
  label: "活跃创建人",
4464
4500
  tip: "去重后的工单创建人数量",
@@ -4470,20 +4506,20 @@ function bl({
4470
4506
  /* @__PURE__ */ o("div", { className: O.metricDesc, children: "统计口径:当前场景下,按「创建日期」在所选时间范围内的已发起工单(含全部状态)进行统计。 标签覆盖率 = 有标签工单数 ÷ 总工单数。排名维度可通过下方切换按钮调整。" })
4471
4507
  ] });
4472
4508
  }
4473
- const ht = "creator", Yn = "day", vl = "department", Qn = () => [
4474
- Ne().startOf("month"),
4475
- Ne().endOf("day")
4509
+ const ht = "creator", Yn = "day", kl = "department", Qn = () => [
4510
+ Ce().startOf("month"),
4511
+ Ce().endOf("day")
4476
4512
  ];
4477
- function Sl(e = "", n = "admin") {
4513
+ function Tl(e = "", n = "admin") {
4478
4514
  var Fe;
4479
- const [t, a] = I(), [r, i] = I(), [l, u] = I(Qn), [m, N] = I(ht), [g, b] = I(), [k, x] = I([]), [S, D] = I([]), [P, j] = I(!1), [Q, M] = I([]), [ae, pe] = I(!1), [ee, de] = I(null), [Se, ue] = I(!1), me = ne({});
4515
+ const [t, a] = I(), [r, i] = I(), [l, u] = I(Qn), [m, N] = I(ht), [g, b] = I(), [T, x] = I([]), [v, D] = I([]), [P, j] = I(!1), [Q, M] = I([]), [ae, fe] = I(!1), [ee, de] = I(null), [Se, ue] = I(!1), me = ne({});
4480
4516
  Y(() => {
4481
4517
  let H = !1;
4482
- return gr(e).then((fe) => {
4518
+ return br(e).then((pe) => {
4483
4519
  if (H) return;
4484
- const te = (Array.isArray(fe) ? fe : []).filter((U) => U.code).map((U) => ({
4485
- value: U.code,
4486
- label: U.name ? `${U.name} (${U.code})` : U.code
4520
+ const te = (Array.isArray(pe) ? pe : []).filter((z) => z.code).map((z) => ({
4521
+ value: z.code,
4522
+ label: z.name ? `${z.name} (${z.code})` : z.code
4487
4523
  }));
4488
4524
  x(te), te.length > 0 && a(te[0].value);
4489
4525
  }).catch(() => {
@@ -4493,8 +4529,8 @@ function Sl(e = "", n = "admin") {
4493
4529
  };
4494
4530
  }, [e, n]), Y(() => {
4495
4531
  let H = !1;
4496
- return j(!0), qs(void 0, e).then((fe) => {
4497
- H || D(Array.isArray(fe) ? fe : []);
4532
+ return j(!0), js(void 0, e).then((pe) => {
4533
+ H || D(Array.isArray(pe) ? pe : []);
4498
4534
  }).catch(() => {
4499
4535
  H || D([]);
4500
4536
  }).finally(() => {
@@ -4504,19 +4540,19 @@ function Sl(e = "", n = "admin") {
4504
4540
  };
4505
4541
  }, [e]), Y(() => {
4506
4542
  let H = !1;
4507
- return pe(!0), (async () => {
4508
- const te = await Gs(e), U = Array.isArray(te) ? te : [];
4509
- if (n !== "scenario") return { tree: U, scoped: !1 };
4510
- const ye = await _r(e).catch(() => null), xe = (ye == null ? void 0 : ye.staffId) != null ? String(ye.staffId) : "";
4511
- if (!xe) return { tree: U, scoped: !1 };
4512
- const Le = Nl(U, xe);
4513
- return Le.length > 0 ? { tree: Le, scoped: !0 } : { tree: U, scoped: !1 };
4514
- })().then(({ tree: te, scoped: U }) => {
4515
- H || (M(te), U && te.length === 1 && b(Cl(te[0]) || void 0));
4543
+ return fe(!0), (async () => {
4544
+ const te = await Zs(e), z = Array.isArray(te) ? te : [];
4545
+ if (n !== "scenario") return { tree: z, scoped: !1 };
4546
+ const ye = await vr(e).catch(() => null), xe = (ye == null ? void 0 : ye.staffId) != null ? String(ye.staffId) : "";
4547
+ if (!xe) return { tree: z, scoped: !1 };
4548
+ const Le = xl(z, xe);
4549
+ return Le.length > 0 ? { tree: Le, scoped: !0 } : { tree: z, scoped: !1 };
4550
+ })().then(({ tree: te, scoped: z }) => {
4551
+ H || (M(te), z && te.length === 1 && b($l(te[0]) || void 0));
4516
4552
  }).catch(() => {
4517
4553
  H || M([]);
4518
4554
  }).finally(() => {
4519
- H || pe(!1);
4555
+ H || fe(!1);
4520
4556
  }), () => {
4521
4557
  H = !0;
4522
4558
  };
@@ -4524,31 +4560,31 @@ function Sl(e = "", n = "admin") {
4524
4560
  i(void 0);
4525
4561
  }, [g]);
4526
4562
  const be = B(
4527
- () => S.filter((H) => H.staffId != null).map((H) => ({
4563
+ () => v.filter((H) => H.staffId != null).map((H) => ({
4528
4564
  value: String(H.staffId),
4529
4565
  label: H.name ? `${H.name} (${H.accountNo})` : H.accountNo
4530
4566
  })),
4531
- [S]
4567
+ [v]
4532
4568
  ), A = B(
4533
- () => wl(Q),
4569
+ () => Il(Q),
4534
4570
  [Q]
4535
4571
  ), re = B(() => {
4536
4572
  if (!g || !A.hasStaff) return be;
4537
4573
  const H = A.byDept.get(g);
4538
- return H ? be.filter((fe) => H.has(fe.value)) : be;
4539
- }, [be, A, g]), V = l ? l[0].format("YYYY-MM-DD") : void 0, T = l ? l[1].format("YYYY-MM-DD") : void 0, f = ne(0), L = R(
4574
+ return H ? be.filter((pe) => H.has(pe.value)) : be;
4575
+ }, [be, A, g]), V = l ? l[0].format("YYYY-MM-DD") : void 0, k = l ? l[1].format("YYYY-MM-DD") : void 0, p = ne(0), L = R(
4540
4576
  async (H) => {
4541
4577
  if (!t) {
4542
4578
  de(null);
4543
4579
  return;
4544
4580
  }
4545
- const fe = ++f.current, te = H ?? me.current;
4581
+ const pe = ++p.current, te = H ?? me.current;
4546
4582
  ue(!0);
4547
4583
  try {
4548
- const U = await On({
4584
+ const z = await On({
4549
4585
  scenarioCode: t,
4550
4586
  startDate: V,
4551
- endDate: T,
4587
+ endDate: k,
4552
4588
  creatorId: r,
4553
4589
  tagFilters: te,
4554
4590
  groupBy: m,
@@ -4556,15 +4592,15 @@ function Sl(e = "", n = "admin") {
4556
4592
  source: n,
4557
4593
  token: e
4558
4594
  });
4559
- if (fe !== f.current) return;
4560
- const ye = U.trend ?? [], xe = Number(U.total ?? 0), Le = ye.length, _t = U.dailyAvg ?? (Le > 0 ? Number((xe / Le).toFixed(2)) : 0);
4561
- let We = U.creatorDistribution ?? (m === ht ? U.ranking : void 0), Ge = U.activeCreators;
4595
+ if (pe !== p.current) return;
4596
+ const ye = z.trend ?? [], xe = Number(z.total ?? 0), Le = ye.length, _t = z.dailyAvg ?? (Le > 0 ? Number((xe / Le).toFixed(2)) : 0);
4597
+ let We = z.creatorDistribution ?? (m === ht ? z.ranking : void 0), Ge = z.activeCreators;
4562
4598
  if (!We)
4563
4599
  try {
4564
4600
  const ge = await On({
4565
4601
  scenarioCode: t,
4566
4602
  startDate: V,
4567
- endDate: T,
4603
+ endDate: k,
4568
4604
  creatorId: r,
4569
4605
  tagFilters: te,
4570
4606
  groupBy: ht,
@@ -4572,7 +4608,7 @@ function Sl(e = "", n = "admin") {
4572
4608
  source: n,
4573
4609
  token: e
4574
4610
  });
4575
- if (fe !== f.current) return;
4611
+ if (pe !== p.current) return;
4576
4612
  We = ge.ranking ?? [];
4577
4613
  } catch {
4578
4614
  We = [];
@@ -4580,23 +4616,23 @@ function Sl(e = "", n = "admin") {
4580
4616
  Ge == null && (Ge = We.filter((ge) => ge.key).length), de({
4581
4617
  total: xe,
4582
4618
  trend: ye,
4583
- ranking: U.ranking ?? [],
4584
- tagCoverage: U.tagCoverage,
4619
+ ranking: z.ranking ?? [],
4620
+ tagCoverage: z.tagCoverage,
4585
4621
  creatorDistribution: We,
4586
4622
  dailyAvg: _t,
4587
4623
  activeCreators: Ge
4588
4624
  });
4589
- } catch (U) {
4590
- if (fe !== f.current) return;
4591
- de(null), K.warning((U == null ? void 0 : U.userMessage) ?? (U == null ? void 0 : U.message) ?? "业务指标查询失败");
4625
+ } catch (z) {
4626
+ if (pe !== p.current) return;
4627
+ de(null), q.warning((z == null ? void 0 : z.userMessage) ?? (z == null ? void 0 : z.message) ?? "业务指标查询失败");
4592
4628
  } finally {
4593
- fe === f.current && ue(!1);
4629
+ pe === p.current && ue(!1);
4594
4630
  }
4595
4631
  },
4596
4632
  [
4597
4633
  t,
4598
4634
  V,
4599
- T,
4635
+ k,
4600
4636
  r,
4601
4637
  m,
4602
4638
  g,
@@ -4621,9 +4657,9 @@ function Sl(e = "", n = "admin") {
4621
4657
  deptId: g,
4622
4658
  setDeptId: b,
4623
4659
  startDate: V,
4624
- endDate: T,
4660
+ endDate: k,
4625
4661
  /* 下拉数据源 */
4626
- scenarioOptions: k,
4662
+ scenarioOptions: T,
4627
4663
  memberOptions: re,
4628
4664
  memberLoading: P,
4629
4665
  deptTreeData: Q,
@@ -4639,7 +4675,7 @@ function Sl(e = "", n = "admin") {
4639
4675
  tagFiltersRef: me
4640
4676
  };
4641
4677
  }
4642
- function wl(e) {
4678
+ function Il(e) {
4643
4679
  const n = /* @__PURE__ */ new Map();
4644
4680
  let t = !1;
4645
4681
  const a = (r) => {
@@ -4653,10 +4689,10 @@ function wl(e) {
4653
4689
  };
4654
4690
  return Array.isArray(e) && e.forEach(a), { byDept: n, hasStaff: t };
4655
4691
  }
4656
- function Cl(e) {
4692
+ function $l(e) {
4657
4693
  return on(e);
4658
4694
  }
4659
- function Nl(e, n) {
4695
+ function xl(e, n) {
4660
4696
  const t = [], a = (i, l) => {
4661
4697
  Array.isArray(i) && i.forEach((u) => {
4662
4698
  rn(u).some((N) => N === n) && t.push({ node: u, depth: l }), a(sn(u), l + 1);
@@ -4666,10 +4702,10 @@ function Nl(e, n) {
4666
4702
  const r = Math.min(...t.map((i) => i.depth));
4667
4703
  return t.filter((i) => i.depth === r).map((i) => i.node);
4668
4704
  }
4669
- const ua = "ft_biz_metrics_saved_filters";
4670
- function Tl() {
4705
+ const pa = "ft_biz_metrics_saved_filters";
4706
+ function Ll() {
4671
4707
  try {
4672
- const e = window.localStorage.getItem(ua);
4708
+ const e = window.localStorage.getItem(pa);
4673
4709
  if (!e) return [];
4674
4710
  const n = JSON.parse(e);
4675
4711
  return Array.isArray(n) ? n.filter(
@@ -4681,14 +4717,14 @@ function Tl() {
4681
4717
  }
4682
4718
  function Xn(e) {
4683
4719
  try {
4684
- window.localStorage.setItem(ua, JSON.stringify(e));
4720
+ window.localStorage.setItem(pa, JSON.stringify(e));
4685
4721
  } catch {
4686
4722
  }
4687
4723
  }
4688
- function kl() {
4724
+ function Al() {
4689
4725
  const [e, n] = I([]);
4690
4726
  Y(() => {
4691
- n(Tl());
4727
+ n(Ll());
4692
4728
  }, []);
4693
4729
  const t = R((i, l) => {
4694
4730
  const u = i.trim();
@@ -4716,17 +4752,17 @@ function kl() {
4716
4752
  return { savedFilters: e, saveFilter: t, deleteFilter: a, getFilter: r };
4717
4753
  }
4718
4754
  const Rt = [], Ot = {};
4719
- function Il(e) {
4755
+ function Dl(e) {
4720
4756
  const n = e == null ? void 0 : e.id, t = (e == null ? void 0 : e.tagKey) ?? "";
4721
4757
  return n == null || !t ? null : { id: et(n), tagKey: t, tagName: (e == null ? void 0 : e.tagName) ?? t };
4722
4758
  }
4723
- function $l(e) {
4759
+ function Rl(e) {
4724
4760
  return (Array.isArray(e) ? e : []).filter((n) => n == null ? void 0 : n.value).map((n) => ({
4725
4761
  value: String(n.value),
4726
4762
  valueDesc: n.valueDesc ?? String(n.value)
4727
4763
  }));
4728
4764
  }
4729
- function xl(e, n = "", t = "admin") {
4765
+ function Ol(e, n = "", t = "admin") {
4730
4766
  const [a, r] = I({
4731
4767
  tagDefs: Rt,
4732
4768
  selectedTags: Ot
@@ -4737,19 +4773,19 @@ function xl(e, n = "", t = "admin") {
4737
4773
  return;
4738
4774
  }
4739
4775
  let N = !1;
4740
- return l(!0), Ks(e, n, t).then(async (g) => {
4776
+ return l(!0), Ys(e, n, t).then(async (g) => {
4741
4777
  if (N) return;
4742
- const b = (Array.isArray(g) ? g : []).map(Il).filter(
4778
+ const b = (Array.isArray(g) ? g : []).map(Dl).filter(
4743
4779
  (x) => !!x
4744
- ), k = await Promise.all(
4780
+ ), T = await Promise.all(
4745
4781
  b.map(async (x) => {
4746
4782
  try {
4747
- const S = await js(
4783
+ const v = await Qs(
4748
4784
  x.id,
4749
4785
  n,
4750
4786
  t
4751
4787
  );
4752
- return { ...x, values: $l(S) };
4788
+ return { ...x, values: Rl(v) };
4753
4789
  } catch {
4754
4790
  return { ...x, values: [] };
4755
4791
  }
@@ -4757,7 +4793,7 @@ function xl(e, n = "", t = "admin") {
4757
4793
  );
4758
4794
  N || r({
4759
4795
  ownerCode: e,
4760
- tagDefs: k,
4796
+ tagDefs: T,
4761
4797
  selectedTags: {}
4762
4798
  });
4763
4799
  }).catch(() => {
@@ -4774,8 +4810,8 @@ function xl(e, n = "", t = "admin") {
4774
4810
  }, [e, n, t]);
4775
4811
  const u = R((N, g) => {
4776
4812
  r((b) => {
4777
- const k = { ...b.selectedTags };
4778
- return g === void 0 || g === "" ? delete k[N] : k[N] = g, { ...b, selectedTags: k };
4813
+ const T = { ...b.selectedTags };
4814
+ return g === void 0 || g === "" ? delete T[N] : T[N] = g, { ...b, selectedTags: T };
4779
4815
  });
4780
4816
  }, []), m = !!e && a.ownerCode === e;
4781
4817
  return {
@@ -4786,42 +4822,42 @@ function xl(e, n = "", t = "admin") {
4786
4822
  };
4787
4823
  }
4788
4824
  const Xt = (e) => e.replace(/\s*\(.*?\)\s*$/, "");
4789
- function gu({
4825
+ function vu({
4790
4826
  source: e = "admin"
4791
4827
  } = {}) {
4792
4828
  var V;
4793
- const n = ea((T) => T.token) || "", t = Sl(n, e), {
4829
+ const n = ea((k) => k.token) || "", t = Tl(n, e), {
4794
4830
  tagDefs: a,
4795
4831
  selectedTags: r,
4796
4832
  setTag: i,
4797
4833
  loading: l
4798
- } = xl(t.scenarioCode, n, e), { savedFilters: u, saveFilter: m, deleteFilter: N, getFilter: g } = kl();
4834
+ } = Ol(t.scenarioCode, n, e), { savedFilters: u, saveFilter: m, deleteFilter: N, getFilter: g } = Al();
4799
4835
  t.tagFiltersRef.current = r;
4800
4836
  const b = B(() => {
4801
- const T = [
4837
+ const k = [
4802
4838
  { label: "按人员", value: ht },
4803
- { label: "按部门", value: vl },
4839
+ { label: "按部门", value: kl },
4804
4840
  { label: "按日期", value: Yn }
4805
4841
  ];
4806
- return a.filter((f) => f.values.length > 0).forEach((f) => {
4807
- T.push({ label: f.tagName, value: f.tagKey });
4808
- }), T;
4809
- }, [a]), k = B(
4810
- () => b.some((T) => T.value === t.groupBy),
4842
+ return a.filter((p) => p.values.length > 0).forEach((p) => {
4843
+ k.push({ label: p.tagName, value: p.tagKey });
4844
+ }), k;
4845
+ }, [a]), T = B(
4846
+ () => b.some((k) => k.value === t.groupBy),
4811
4847
  [b, t.groupBy]
4812
4848
  );
4813
4849
  Y(() => {
4814
- k || t.setGroupBy(Yn);
4815
- }, [k, t.setGroupBy]);
4816
- const x = ne(null), S = ne(!1);
4850
+ T || t.setGroupBy(Yn);
4851
+ }, [T, t.setGroupBy]);
4852
+ const x = ne(null), v = ne(!1);
4817
4853
  Y(() => {
4818
- l && (S.current = !0);
4854
+ l && (v.current = !0);
4819
4855
  }, [l]);
4820
4856
  const D = ne(null);
4821
4857
  Y(() => {
4822
4858
  D.current && clearTimeout(D.current), D.current = setTimeout(() => {
4823
- const T = x.current;
4824
- T && Object.keys(T).length > 0 || t.loadRef.current();
4859
+ const k = x.current;
4860
+ k && Object.keys(k).length > 0 || t.loadRef.current();
4825
4861
  }, 400);
4826
4862
  }, [
4827
4863
  t.scenarioCode,
@@ -4834,18 +4870,18 @@ function gu({
4834
4870
  ]), Y(() => {
4835
4871
  t.loadRef.current();
4836
4872
  }, [t.groupBy, t.loadRef]), Y(() => {
4837
- const T = x.current;
4838
- !T || l || !S.current || (x.current = null, S.current = !1, Object.entries(T).forEach(([f, L]) => i(f, L)));
4873
+ const k = x.current;
4874
+ !k || l || !v.current || (x.current = null, v.current = !1, Object.entries(k).forEach(([p, L]) => i(p, L)));
4839
4875
  }, [l, a, i]);
4840
- const P = ((V = b.find((T) => T.value === t.groupBy)) == null ? void 0 : V.label) ?? "按日期", [j, Q] = I({ open: !1, source: "kpi" }), M = R((T) => {
4841
- Q({ open: !0, source: T });
4876
+ const P = ((V = b.find((k) => k.value === t.groupBy)) == null ? void 0 : V.label) ?? "按日期", [j, Q] = I({ open: !1, source: "kpi" }), M = R((k) => {
4877
+ Q({ open: !0, source: k });
4842
4878
  }, []), ae = R(() => {
4843
- Q((T) => ({ ...T, open: !1 }));
4844
- }, []), pe = B(
4879
+ Q((k) => ({ ...k, open: !1 }));
4880
+ }, []), fe = B(
4845
4881
  () => {
4846
- var T;
4882
+ var k;
4847
4883
  return Xt(
4848
- ((T = t.scenarioOptions.find((f) => f.value === t.scenarioCode)) == null ? void 0 : T.label) ?? ""
4884
+ ((k = t.scenarioOptions.find((p) => p.value === t.scenarioCode)) == null ? void 0 : k.label) ?? ""
4849
4885
  );
4850
4886
  },
4851
4887
  [t.scenarioOptions, t.scenarioCode]
@@ -4854,33 +4890,33 @@ function gu({
4854
4890
  [t.startDate, t.endDate]
4855
4891
  ), de = B(() => {
4856
4892
  if (!t.deptId) return;
4857
- const T = (f) => {
4858
- for (const L of f) {
4893
+ const k = (p) => {
4894
+ for (const L of p) {
4859
4895
  const G = String((L == null ? void 0 : L.id) ?? (L == null ? void 0 : L.deptId) ?? "");
4860
4896
  if (G === t.deptId) return (L == null ? void 0 : L.name) ?? (L == null ? void 0 : L.deptName) ?? G;
4861
4897
  const he = (L == null ? void 0 : L.childrenList) || (L == null ? void 0 : L.children);
4862
4898
  if (Array.isArray(he)) {
4863
- const X = T(he);
4899
+ const X = k(he);
4864
4900
  if (X) return X;
4865
4901
  }
4866
4902
  }
4867
4903
  };
4868
- return T(t.deptTreeData);
4904
+ return k(t.deptTreeData);
4869
4905
  }, [t.deptId, t.deptTreeData]), Se = B(
4870
4906
  () => {
4871
- var T;
4872
- return t.creatorId ? (T = t.memberOptions.find((f) => f.value === t.creatorId)) == null ? void 0 : T.label : void 0;
4907
+ var k;
4908
+ return t.creatorId ? (k = t.memberOptions.find((p) => p.value === t.creatorId)) == null ? void 0 : k.label : void 0;
4873
4909
  },
4874
4910
  [t.creatorId, t.memberOptions]
4875
4911
  ), ue = B(() => {
4876
- const T = Object.entries(r).filter(
4877
- ([, f]) => f != null && f !== ""
4912
+ const k = Object.entries(r).filter(
4913
+ ([, p]) => p != null && p !== ""
4878
4914
  );
4879
- if (T.length !== 0)
4880
- return T.map(([f, L]) => {
4915
+ if (k.length !== 0)
4916
+ return k.map(([p, L]) => {
4881
4917
  var X;
4882
- const G = a.find((Fe) => Fe.tagKey === f), he = ((X = G == null ? void 0 : G.values.find((Fe) => Fe.value === L)) == null ? void 0 : X.valueDesc) ?? L;
4883
- return `${(G == null ? void 0 : G.tagName) ?? f}: ${he}`;
4918
+ const G = a.find((Fe) => Fe.tagKey === p), he = ((X = G == null ? void 0 : G.values.find((Fe) => Fe.value === L)) == null ? void 0 : X.valueDesc) ?? L;
4919
+ return `${(G == null ? void 0 : G.tagName) ?? p}: ${he}`;
4884
4920
  }).join(";");
4885
4921
  }, [r, a]), me = B(
4886
4922
  () => ({
@@ -4904,15 +4940,15 @@ function gu({
4904
4940
  n
4905
4941
  ]
4906
4942
  ), be = R(() => {
4907
- t.reset(), a.forEach((T) => i(T.tagKey, void 0));
4943
+ t.reset(), a.forEach((k) => i(k.tagKey, void 0));
4908
4944
  }, [t.reset, a, i]), A = R(
4909
- (T) => {
4910
- t.scenarioCode && (m(T, {
4945
+ (k) => {
4946
+ t.scenarioCode && (m(k, {
4911
4947
  scenarioCode: t.scenarioCode,
4912
4948
  range: t.startDate && t.endDate ? [t.startDate, t.endDate] : null,
4913
4949
  creatorId: t.creatorId,
4914
4950
  tags: r
4915
- }), K.success(`已保存条件「${T}」`));
4951
+ }), q.success(`已保存条件「${k}」`));
4916
4952
  },
4917
4953
  [
4918
4954
  m,
@@ -4923,18 +4959,18 @@ function gu({
4923
4959
  r
4924
4960
  ]
4925
4961
  ), re = R(
4926
- (T) => {
4927
- const f = g(T);
4928
- if (f) {
4929
- if (t.setCreatorId(f.creatorId), t.setRange(
4930
- f.range ? [Ne(f.range[0]), Ne(f.range[1])] : null
4931
- ), f.scenarioCode !== t.scenarioCode) {
4932
- x.current = f.tags ?? {}, S.current = !1, t.setScenarioCode(f.scenarioCode);
4962
+ (k) => {
4963
+ const p = g(k);
4964
+ if (p) {
4965
+ if (t.setCreatorId(p.creatorId), t.setRange(
4966
+ p.range ? [Ce(p.range[0]), Ce(p.range[1])] : null
4967
+ ), p.scenarioCode !== t.scenarioCode) {
4968
+ x.current = p.tags ?? {}, v.current = !1, t.setScenarioCode(p.scenarioCode);
4933
4969
  return;
4934
4970
  }
4935
4971
  a.forEach((L) => {
4936
4972
  var he;
4937
- const G = (he = f.tags) == null ? void 0 : he[L.tagKey];
4973
+ const G = (he = p.tags) == null ? void 0 : he[L.tagKey];
4938
4974
  r[L.tagKey] !== G && i(L.tagKey, G);
4939
4975
  });
4940
4976
  }
@@ -4966,27 +5002,27 @@ function gu({
4966
5002
  dropdownMatchSelectWidth: !1,
4967
5003
  dropdownClassName: O.smallDropdown,
4968
5004
  className: O.scenarioSelect,
4969
- suffixIcon: /* @__PURE__ */ o(ar, { style: { color: "#999", fontSize: 10 } }),
5005
+ suffixIcon: /* @__PURE__ */ o(or, { style: { color: "#999", fontSize: 10 } }),
4970
5006
  value: t.scenarioCode,
4971
- onChange: (T) => t.setScenarioCode(T || void 0),
4972
- filterOption: (T, f) => `${(f == null ? void 0 : f.label) ?? ""}${(f == null ? void 0 : f.value) ?? ""}`.toLowerCase().includes(T.toLowerCase()),
4973
- children: t.scenarioOptions.map((T) => /* @__PURE__ */ y(
5007
+ onChange: (k) => t.setScenarioCode(k || void 0),
5008
+ filterOption: (k, p) => `${(p == null ? void 0 : p.label) ?? ""}${(p == null ? void 0 : p.value) ?? ""}`.toLowerCase().includes(k.toLowerCase()),
5009
+ children: t.scenarioOptions.map((k) => /* @__PURE__ */ y(
4974
5010
  at.Option,
4975
5011
  {
4976
- value: T.value,
4977
- label: Xt(T.label),
5012
+ value: k.value,
5013
+ label: Xt(k.label),
4978
5014
  children: [
4979
- /* @__PURE__ */ o("span", { className: O.scenarioName, children: Xt(T.label) }),
4980
- /* @__PURE__ */ o("span", { className: O.scenarioCode, children: T.value })
5015
+ /* @__PURE__ */ o("span", { className: O.scenarioName, children: Xt(k.label) }),
5016
+ /* @__PURE__ */ o("span", { className: O.scenarioCode, children: k.value })
4981
5017
  ]
4982
5018
  },
4983
- T.value
5019
+ k.value
4984
5020
  ))
4985
5021
  }
4986
5022
  )
4987
5023
  ] }),
4988
5024
  /* @__PURE__ */ o(
4989
- _l,
5025
+ Nl,
4990
5026
  {
4991
5027
  scenarioCode: t.scenarioCode,
4992
5028
  creatorId: t.creatorId,
@@ -5013,7 +5049,7 @@ function gu({
5013
5049
  ),
5014
5050
  t.loading && !t.data ? /* @__PURE__ */ o("div", { className: E.loadingWrap, children: /* @__PURE__ */ o(en, { tip: "加载中..." }) }) : /* @__PURE__ */ y(ot, { children: [
5015
5051
  /* @__PURE__ */ o(
5016
- bl,
5052
+ Cl,
5017
5053
  {
5018
5054
  data: t.data,
5019
5055
  groupLabel: P,
@@ -5022,7 +5058,7 @@ function gu({
5022
5058
  }
5023
5059
  ),
5024
5060
  /* @__PURE__ */ o(
5025
- zc,
5061
+ jc,
5026
5062
  {
5027
5063
  data: t.data,
5028
5064
  groupBy: t.groupBy,
@@ -5037,12 +5073,12 @@ function gu({
5037
5073
  )
5038
5074
  ] }),
5039
5075
  /* @__PURE__ */ o(
5040
- sc,
5076
+ uc,
5041
5077
  {
5042
5078
  open: j.open,
5043
5079
  source: j.source,
5044
5080
  onClose: ae,
5045
- scenarioName: pe,
5081
+ scenarioName: fe,
5046
5082
  dateRangeText: ee,
5047
5083
  deptName: de,
5048
5084
  creatorName: Se,
@@ -5054,26 +5090,26 @@ function gu({
5054
5090
  )
5055
5091
  ] });
5056
5092
  }
5057
- function Ll(e) {
5093
+ function El(e) {
5058
5094
  if (!e) return e;
5059
5095
  const n = e.trim(), t = n.indexOf("://");
5060
5096
  if (t < 0) return n;
5061
5097
  const a = n.substring(t + 3), r = a.indexOf("@");
5062
5098
  return r < 0 ? n : n.substring(0, t + 3) + a.substring(r + 1);
5063
5099
  }
5064
- function Al(e, n) {
5100
+ function Pl(e, n) {
5065
5101
  const t = new URLSearchParams();
5066
5102
  if (t.set("type", e.type), e.name && t.set("name", e.name), e.type === "git") {
5067
- const a = Ll(e.giturl || "");
5103
+ const a = El(e.giturl || "");
5068
5104
  a && t.set("giturl", a), e.branch && t.set("branch", e.branch), e.workspace && t.set("workspace", e.workspace);
5069
5105
  } else
5070
5106
  e.path && t.set("path", e.path);
5071
5107
  return `${n}/embed?${t.toString()}`;
5072
5108
  }
5073
- function _u(e) {
5074
- return Al(e, ta);
5109
+ function Su(e) {
5110
+ return Pl(e, ta);
5075
5111
  }
5076
- async function ma(e, n) {
5112
+ async function fa(e, n) {
5077
5113
  const t = await fetch(`${ta}${e}`, {
5078
5114
  credentials: "include",
5079
5115
  headers: { Accept: "application/json" },
@@ -5083,15 +5119,15 @@ async function ma(e, n) {
5083
5119
  throw new Error(`z-webide 请求失败 (${t.status})`);
5084
5120
  return t.json();
5085
5121
  }
5086
- function bu() {
5087
- return ma("/instances");
5122
+ function wu() {
5123
+ return fa("/instances");
5088
5124
  }
5089
- function vu(e) {
5090
- return ma(`/instances/${e}/stop`, { method: "POST" });
5125
+ function Nu(e) {
5126
+ return fa(`/instances/${e}/stop`, { method: "POST" });
5091
5127
  }
5092
- const Dl = "http://127.0.0.1/kapi/z-webide/admin";
5128
+ const Fl = "http://127.0.0.1/kapi/z-webide/admin";
5093
5129
  async function Pe(e, n) {
5094
- const t = await fetch(`${Dl}${e}`, {
5130
+ const t = await fetch(`${Fl}${e}`, {
5095
5131
  credentials: "include",
5096
5132
  headers: {
5097
5133
  Accept: "application/json",
@@ -5103,138 +5139,136 @@ async function Pe(e, n) {
5103
5139
  throw new Error(`z-webide admin 请求失败 (${t.status})`);
5104
5140
  return t.json();
5105
5141
  }
5106
- function Su() {
5142
+ function Cu() {
5107
5143
  return Pe("/overview");
5108
5144
  }
5109
- function wu() {
5145
+ function ku() {
5110
5146
  return Pe("/trends");
5111
5147
  }
5112
- function Cu() {
5148
+ function Tu() {
5113
5149
  return Pe("/users");
5114
5150
  }
5115
- function Nu() {
5151
+ function Iu() {
5116
5152
  return Pe("/instances/all");
5117
5153
  }
5118
- function Tu() {
5154
+ function $u() {
5119
5155
  return Pe("/machines");
5120
5156
  }
5121
- function ku(e) {
5157
+ function xu(e) {
5122
5158
  return Pe(`/instances/${e}/stop`, {
5123
5159
  method: "POST"
5124
5160
  });
5125
5161
  }
5126
- function Iu() {
5162
+ function Lu() {
5127
5163
  return Pe("/presets");
5128
5164
  }
5129
- function $u(e) {
5165
+ function Au(e) {
5130
5166
  return Pe("/presets", {
5131
5167
  method: "POST",
5132
5168
  body: JSON.stringify(e)
5133
5169
  });
5134
5170
  }
5135
- function xu(e, n) {
5171
+ function Du(e, n) {
5136
5172
  return Pe(`/presets/${e}`, {
5137
5173
  method: "PUT",
5138
5174
  body: JSON.stringify(n)
5139
5175
  });
5140
5176
  }
5141
5177
  export {
5142
- Hd as $,
5143
- tu as A,
5144
- nu as B,
5145
- Ad as C,
5146
- qs as D,
5147
- Jl as E,
5148
- Yl as F,
5149
- ad as G,
5150
- Xl as H,
5151
- Ql as I,
5152
- td as J,
5153
- ed as K,
5154
- nd as L,
5155
- Zl as M,
5156
- Gl as N,
5157
- Vl as O,
5158
- rd as P,
5159
- Zd as Q,
5160
- Xd as R,
5161
- gu as S,
5162
- eu as T,
5163
- xd as U,
5164
- Ld as V,
5165
- Rd as W,
5166
- Dd as X,
5167
- Od as Y,
5168
- Bd as Z,
5169
- Wd as _,
5170
- bu as a,
5171
- qd as a0,
5172
- Ud as a1,
5173
- zd as a2,
5174
- Kd as a3,
5175
- jd as a4,
5176
- cd as a5,
5177
- ld as a6,
5178
- $d as a7,
5179
- kd as a8,
5180
- Td as a9,
5181
- Cu as aA,
5182
- Nu as aB,
5183
- Tu as aC,
5184
- wu as aD,
5185
- Iu as aE,
5186
- ku as aF,
5187
- xu as aG,
5188
- $u as aH,
5189
- Id as aa,
5190
- E as ab,
5191
- ft as ac,
5192
- Ve as ad,
5193
- ou as ae,
5194
- cu as af,
5195
- lu as ag,
5196
- su as ah,
5197
- fu as ai,
5198
- yu as aj,
5199
- hu as ak,
5178
+ jd as $,
5179
+ ru as A,
5180
+ ou as B,
5181
+ Od as C,
5182
+ js as D,
5183
+ ed as E,
5184
+ td as F,
5185
+ cd as G,
5186
+ ad as H,
5187
+ nd as I,
5188
+ sd as J,
5189
+ od as K,
5190
+ id as L,
5191
+ rd as M,
5192
+ Zl as N,
5193
+ Xl as O,
5194
+ ld as P,
5195
+ nu as Q,
5196
+ tu as R,
5197
+ vu as S,
5198
+ au as T,
5199
+ Dd as U,
5200
+ Rd as V,
5201
+ Pd as W,
5202
+ Ed as X,
5203
+ Fd as Y,
5204
+ Wd as Z,
5205
+ qd as _,
5206
+ wu as a,
5207
+ Vd as a0,
5208
+ Hd as a1,
5209
+ Kd as a2,
5210
+ Gd as a3,
5211
+ Jd as a4,
5212
+ $d as a5,
5213
+ Ad as a6,
5214
+ Ld as a7,
5215
+ xd as a8,
5216
+ E as a9,
5217
+ $u as aA,
5218
+ ku as aB,
5219
+ Lu as aC,
5220
+ xu as aD,
5221
+ Du as aE,
5222
+ Au as aF,
5223
+ pt as aa,
5224
+ Ve as ab,
5225
+ cu as ac,
5226
+ uu as ad,
5227
+ mu as ae,
5228
+ lu as af,
5229
+ yu as ag,
5230
+ bu as ah,
5231
+ _u as ai,
5232
+ gu as aj,
5233
+ du as ak,
5200
5234
  pu as al,
5201
5235
  iu as am,
5202
- du as an,
5203
- ru as ao,
5204
- Ee as ap,
5205
- uu as aq,
5206
- mu as ar,
5207
- Ks as as,
5208
- js as at,
5209
- Gd as au,
5210
- Vd as av,
5211
- Jd as aw,
5212
- Qd as ax,
5213
- Yd as ay,
5214
- Su as az,
5215
- _u as b,
5216
- wd as c,
5217
- Cd as d,
5218
- sd as e,
5219
- dd as f,
5220
- Nd as g,
5221
- id as h,
5222
- od as i,
5223
- bd as j,
5224
- vd as k,
5225
- Sd as l,
5226
- hd as m,
5227
- gd as n,
5228
- ud as o,
5229
- md as p,
5230
- fd as q,
5231
- _d as r,
5232
- vu as s,
5233
- Ed as t,
5234
- yd as u,
5235
- pd as v,
5236
- Fd as w,
5237
- Pd as x,
5238
- Md as y,
5239
- au as z
5236
+ Ee as an,
5237
+ fu as ao,
5238
+ hu as ap,
5239
+ Ys as aq,
5240
+ Qs as ar,
5241
+ Qd as as,
5242
+ Yd as at,
5243
+ Xd as au,
5244
+ eu as av,
5245
+ Zd as aw,
5246
+ Cu as ax,
5247
+ Tu as ay,
5248
+ Iu as az,
5249
+ Su as b,
5250
+ kd as c,
5251
+ Td as d,
5252
+ ud as e,
5253
+ pd as f,
5254
+ Id as g,
5255
+ md as h,
5256
+ dd as i,
5257
+ wd as j,
5258
+ Nd as k,
5259
+ Cd as l,
5260
+ _d as m,
5261
+ vd as n,
5262
+ fd as o,
5263
+ hd as p,
5264
+ yd as q,
5265
+ Sd as r,
5266
+ Nu as s,
5267
+ Md as t,
5268
+ bd as u,
5269
+ gd as v,
5270
+ zd as w,
5271
+ Bd as x,
5272
+ Ud as y,
5273
+ su as z
5240
5274
  };