@yuku123/z-team-component 0.2.75 → 0.2.77

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 (42) hide show
  1. package/dist/{ChangeLogView-BJxIhIPc.js → ChangeLogView-DwuIBDL5.js} +1 -1
  2. package/dist/{ComponentDoc-CMfr27b7.js → ComponentDoc-B83ray2w.js} +5 -5
  3. package/dist/{InvitationManagementPage-SMhrq5dN.js → InvitationManagementPage-CIzCRWPq.js} +1 -1
  4. package/dist/{OnboardingPage-CjLgp-jE.js → OnboardingPage-BpjNlxUb.js} +2 -2
  5. package/dist/{ScheduledTasks-C2wsuoa9.js → ScheduledTasks-B87VNnoB.js} +5 -5
  6. package/dist/{SystemShell-y3kvbENk.js → SystemShell-B0kCPBz3.js} +4 -4
  7. package/dist/{api-CVKSSNXw.js → api-CpE2blgj.js} +1 -1
  8. package/dist/{createWorkspaceWsHandler-25JfnMML.js → createWorkspaceWsHandler-CzfcRs0V.js} +3801 -3890
  9. package/dist/index-B2rRYGQK.js +9567 -0
  10. package/dist/{index-B_oOPFoQ.js → index-BBu4pWAN.js} +2 -2
  11. package/dist/{index-DWd0Y6qP.js → index-BHDrnEnt.js} +2 -2
  12. package/dist/{index-CeCBja5s.js → index-BO5y0Gwn.js} +3 -3
  13. package/dist/{index-WIsi8fln.js → index-B_LJRFsK.js} +73 -73
  14. package/dist/{index-CbTwXfER.js → index-BoJxTQwX.js} +68 -68
  15. package/dist/{index-BADGOdUu.js → index-BydWNuk5.js} +392 -392
  16. package/dist/{index-CfW9kGYJ.js → index-CW-JDoj9.js} +3 -3
  17. package/dist/{index-D54nAoGP.js → index-CpAUbzCH.js} +5 -5
  18. package/dist/{index-CchpPnBl.js → index-D1KPGWN9.js} +1 -1
  19. package/dist/{index-DfecivMN.js → index-D6yh1Kok.js} +13 -13
  20. package/dist/{index-C9YhDxMT.js → index-DCwvhwes.js} +1 -1
  21. package/dist/{index-BA3lZUmW.js → index-DF2jRLkS.js} +1 -1
  22. package/dist/{index-rPNKkWaw.js → index-DK6-iytM.js} +1 -1
  23. package/dist/{index-fW1JBhEB.js → index-DTBIyd4I.js} +2 -2
  24. package/dist/{index-3c6HvG__.js → index-DahQUH9c.js} +1 -1
  25. package/dist/{index-B_O9mXF6.js → index-DeT_z9Dg.js} +1 -1
  26. package/dist/{index-C6S3MIu4.js → index-DhDdFRHC.js} +2 -2
  27. package/dist/index-LA0c93lD.js +2908 -0
  28. package/dist/{index-_53KTMhL.js → index-Sk6xoy0n.js} +1 -1
  29. package/dist/{index-Pq3n7-vE.js → index-cDBJpBAd.js} +2 -2
  30. package/dist/index.js +1 -1
  31. package/dist/{instance-B9aQMplq.js → instance-CDGmSyID.js} +13 -13
  32. package/dist/{menuPermission-CtJddtOO.js → menuPermission-Cn3TADR1.js} +2 -2
  33. package/dist/pages.js +3 -3
  34. package/dist/personal-VG7XVvW-.js +294 -0
  35. package/dist/{schedule-iMEGim0L.js → schedule-Dt_ZRuce.js} +268 -230
  36. package/dist/webide-BM1A4eJr.js +8399 -0
  37. package/dist/z-team-component.css +1 -1
  38. package/package.json +1 -1
  39. package/dist/admin-logs-asBlA9MU.js +0 -199
  40. package/dist/index-Cd_xAvmO.js +0 -9419
  41. package/dist/index-e9H9wjYU.js +0 -2882
  42. package/dist/webide-BlpH-J-H.js +0 -8255
@@ -1,32 +1,32 @@
1
- import { a as i, f as c, B as d, n as u, u as h, t as N, g as R } from "./api-DPkUB1DA.js";
2
- import { jsx as g, jsxs as O } from "react/jsx-runtime";
1
+ import { a as i, f as c, B as d, n as u, u as S, t as h, g as P } from "./api-DPkUB1DA.js";
2
+ import { jsx as g, jsxs as _ } from "react/jsx-runtime";
3
3
  import { useMemo as b, useState as L, useEffect as D, Component as M } from "react";
4
- const T = [
4
+ const N = [
5
5
  { status: "TODO", label: "待办" },
6
6
  { status: "DOING", label: "进行中" },
7
7
  { status: "DONE", label: "已完成" }
8
8
  ];
9
- function se(t) {
10
- if (!t || !t.trim()) return [...T];
9
+ function at(e) {
10
+ if (!e || !e.trim()) return [...N];
11
11
  try {
12
- const e = JSON.parse(t), n = Array.isArray(e == null ? void 0 : e.statusColumns) ? e.statusColumns : null;
13
- if (!n) return [...T];
12
+ const t = JSON.parse(e), n = Array.isArray(t == null ? void 0 : t.statusColumns) ? t.statusColumns : null;
13
+ if (!n) return [...N];
14
14
  const o = n.map((r) => {
15
15
  const a = r ?? {}, s = String(a.status ?? "").trim().toUpperCase(), l = String(a.label ?? "").trim();
16
16
  return s && l ? { status: s, label: l } : null;
17
17
  }).filter((r) => r != null);
18
- return o.length > 0 ? o : [...T];
18
+ return o.length > 0 ? o : [...N];
19
19
  } catch {
20
- return [...T];
20
+ return [...N];
21
21
  }
22
22
  }
23
- function B(t) {
24
- if (t == null) return !0;
25
- const e = String(t).trim();
26
- return e === "" || e === "0";
23
+ function B(e) {
24
+ if (e == null) return !0;
25
+ const t = String(e).trim();
26
+ return t === "" || t === "0";
27
27
  }
28
- function S(t) {
29
- const e = (s) => {
28
+ function I(e) {
29
+ const t = (s) => {
30
30
  if (typeof s != "string" || !s.trim()) return [];
31
31
  try {
32
32
  const l = JSON.parse(s);
@@ -45,7 +45,7 @@ function S(t) {
45
45
  return [];
46
46
  }
47
47
  }, o = () => {
48
- const s = t.assigneeUserIds;
48
+ const s = e.assigneeUserIds;
49
49
  let l = null;
50
50
  if (Array.isArray(s))
51
51
  l = s;
@@ -60,189 +60,225 @@ function S(t) {
60
60
  const m = l.map((f) => String(f ?? "").trim()).filter(Boolean);
61
61
  if (m.length > 0) return Array.from(new Set(m));
62
62
  }
63
- const p = t.assigneeUserId == null ? "" : String(t.assigneeUserId);
63
+ const p = e.assigneeUserId == null ? "" : String(e.assigneeUserId);
64
64
  return p.trim() ? [p.trim()] : [];
65
65
  }, r = (s) => {
66
- const l = t.assignees, p = Array.isArray(l) ? l.map((m) => {
66
+ const l = e.assignees, p = Array.isArray(l) ? l.map((m) => {
67
67
  const f = m ?? {}, $ = String(f.userId ?? "").trim();
68
68
  return $ ? { userId: $, name: String(f.name ?? "").trim() || $ } : null;
69
69
  }).filter((m) => m != null) : [];
70
70
  return p.length > 0 ? p : s.map((m) => ({ userId: m, name: m }));
71
71
  }, a = o();
72
72
  return {
73
- id: N(t.id),
74
- projectId: t.projectId == null ? null : N(t.projectId),
75
- userId: String(t.userId ?? ""),
76
- title: String(t.title ?? ""),
77
- detail: t.detail == null ? null : String(t.detail),
78
- status: t.status ?? "TODO",
79
- priority: t.priority ?? "MEDIUM",
80
- dueDate: t.dueDate == null ? null : String(t.dueDate).slice(0, 10),
73
+ id: h(e.id),
74
+ projectId: e.projectId == null ? null : h(e.projectId),
75
+ userId: String(e.userId ?? ""),
76
+ title: String(e.title ?? ""),
77
+ detail: e.detail == null ? null : String(e.detail),
78
+ status: e.status ?? "TODO",
79
+ priority: e.priority ?? "MEDIUM",
80
+ dueDate: e.dueDate == null ? null : String(e.dueDate).slice(0, 10),
81
81
  assigneeUserId: a[0] ?? null,
82
82
  assigneeUserIds: a,
83
83
  assignees: r(a),
84
- projectTitle: t.projectTitle == null || !String(t.projectTitle).trim() ? null : String(t.projectTitle),
85
- tags: e(t.tags),
86
- links: n(t.links),
87
- parentId: B(t.parentId) ? "" : N(t.parentId),
88
- sortOrder: t.sortOrder == null ? 0 : Number(t.sortOrder),
89
- completedAt: t.completedAt == null ? null : String(t.completedAt),
90
- completedBy: t.completedBy == null ? null : String(t.completedBy),
91
- createByName: t.createByName == null ? null : String(t.createByName),
92
- updateTime: t.updateTime == null ? null : String(t.updateTime)
84
+ projectTitle: e.projectTitle == null || !String(e.projectTitle).trim() ? null : String(e.projectTitle),
85
+ tags: t(e.tags),
86
+ links: n(e.links),
87
+ parentId: B(e.parentId) ? "" : h(e.parentId),
88
+ sortOrder: e.sortOrder == null ? 0 : Number(e.sortOrder),
89
+ completedAt: e.completedAt == null ? null : String(e.completedAt),
90
+ completedBy: e.completedBy == null ? null : String(e.completedBy),
91
+ createByName: e.createByName == null ? null : String(e.createByName),
92
+ updateTime: e.updateTime == null ? null : String(e.updateTime),
93
+ agentId: e.agentId == null ? null : h(e.agentId),
94
+ agentSessionId: e.agentSessionId == null ? null : h(e.agentSessionId)
93
95
  };
94
96
  }
95
- function I(t) {
96
- const e = t ?? {};
97
+ function T(e) {
98
+ const t = e ?? {};
97
99
  return {
98
- id: N(e.id),
99
- userId: String(e.userId ?? ""),
100
- title: String(e.title ?? ""),
101
- icon: e.icon == null ? null : String(e.icon),
102
- description: e.description == null ? null : String(e.description),
103
- visibility: e.visibility === "shared" ? "shared" : "private",
104
- sortOrder: e.sortOrder == null ? 0 : Number(e.sortOrder),
105
- extraInfo: e.extraInfo == null ? null : String(e.extraInfo),
106
- createByName: e.createByName == null ? null : String(e.createByName)
100
+ id: h(t.id),
101
+ userId: String(t.userId ?? ""),
102
+ title: String(t.title ?? ""),
103
+ icon: t.icon == null ? null : String(t.icon),
104
+ description: t.description == null ? null : String(t.description),
105
+ visibility: t.visibility === "shared" ? "shared" : "private",
106
+ sortOrder: t.sortOrder == null ? 0 : Number(t.sortOrder),
107
+ extraInfo: t.extraInfo == null ? null : String(t.extraInfo),
108
+ createByName: t.createByName == null ? null : String(t.createByName)
107
109
  };
108
110
  }
109
- function C(t) {
110
- const e = t ?? {}, n = Array.isArray(e.memberDetails) ? e.memberDetails : [];
111
+ function C(e) {
112
+ const t = e ?? {}, n = Array.isArray(t.memberDetails) ? t.memberDetails : [];
111
113
  return {
112
- ...I(e),
113
- openCount: e.openCount == null ? 0 : Number(e.openCount),
114
+ ...T(t),
115
+ openCount: t.openCount == null ? 0 : Number(t.openCount),
114
116
  memberDetails: n.map((o) => {
115
117
  const r = o ?? {}, a = String(r.userId ?? "").trim();
116
118
  return a ? { userId: a, userName: String(r.userName ?? "").trim() || a } : null;
117
119
  }).filter((o) => o != null)
118
120
  };
119
121
  }
120
- async function ae(t = "") {
121
- const e = t ? `?token=${encodeURIComponent(t)}` : "", n = await i(`${d}/todo/projects${e}`, c), o = await u(n, "获取待办项目失败");
122
+ async function it(e = "") {
123
+ const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await i(`${d}/todo/projects${t}`, c), o = await u(n, "获取待办项目失败");
122
124
  return {
123
125
  owned: ((o == null ? void 0 : o.owned) ?? []).map(C),
124
126
  joined: ((o == null ? void 0 : o.joined) ?? []).map(C)
125
127
  };
126
128
  }
127
- async function ie(t, e = "") {
128
- const n = e ? `?token=${encodeURIComponent(e)}` : "", o = await i(`${d}/todo/projects${n}`, {
129
+ async function ct(e, t = "") {
130
+ const n = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(`${d}/todo/projects${n}`, {
129
131
  ...c,
130
132
  method: "POST",
131
133
  headers: { "Content-Type": "application/json" },
132
- body: JSON.stringify(t)
134
+ body: JSON.stringify(e)
133
135
  }), r = await u(o, "新建项目失败");
134
- return I(r);
136
+ return T(r);
135
137
  }
136
- async function ce(t, e, n = "") {
137
- const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(`${d}/todo/projects/${t}${o}`, {
138
+ async function dt(e, t, n = "") {
139
+ const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(`${d}/todo/projects/${e}${o}`, {
138
140
  ...c,
139
141
  method: "PUT",
140
142
  headers: { "Content-Type": "application/json" },
141
- body: JSON.stringify(e)
143
+ body: JSON.stringify(t)
142
144
  }), a = await u(r, "更新项目失败");
143
- return I(a);
145
+ return T(a);
144
146
  }
145
- async function de(t, e = "") {
146
- const n = e ? `?token=${encodeURIComponent(e)}` : "", o = await i(`${d}/todo/projects/${t}${n}`, {
147
+ async function lt(e, t = "") {
148
+ const n = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(`${d}/todo/projects/${e}${n}`, {
147
149
  ...c,
148
150
  method: "DELETE"
149
151
  });
150
- return h(o, "删除项目失败");
152
+ return S(o, "删除项目失败");
151
153
  }
152
- async function le(t, e, n = "") {
153
- const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(`${d}/todo/projects/${t}/members${o}`, {
154
+ async function ut(e, t, n = "") {
155
+ const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(`${d}/todo/projects/${e}/members${o}`, {
154
156
  ...c,
155
157
  method: "POST",
156
158
  headers: { "Content-Type": "application/json" },
157
- body: JSON.stringify(e)
159
+ body: JSON.stringify(t)
158
160
  }), a = await u(r, "添加成员失败");
159
- return I(a);
161
+ return T(a);
160
162
  }
161
- async function ue(t, e, n = "") {
163
+ async function pt(e, t, n = "") {
162
164
  const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(
163
- `${d}/todo/projects/${t}/members/${encodeURIComponent(e)}${o}`,
165
+ `${d}/todo/projects/${e}/members/${encodeURIComponent(t)}${o}`,
164
166
  { ...c, method: "DELETE" }
165
167
  ), a = await u(r, "移除成员失败");
166
- return I(a);
168
+ return T(a);
167
169
  }
168
- async function pe(t = {}, e = "") {
170
+ async function mt(e = {}, t = "") {
169
171
  const n = new URLSearchParams();
170
- e && n.set("token", e), t.view && n.set("view", t.view), t.projectId != null && n.set("projectId", String(t.projectId)), t.status && n.set("status", t.status), t.keyword && n.set("keyword", t.keyword);
172
+ t && n.set("token", t), e.view && n.set("view", e.view), e.projectId != null && n.set("projectId", String(e.projectId)), e.status && n.set("status", e.status), e.keyword && n.set("keyword", e.keyword);
171
173
  const o = n.toString() ? `?${n.toString()}` : "", r = await i(`${d}/todo/items${o}`, c);
172
174
  return (await u(
173
175
  r,
174
176
  "获取事项失败"
175
- ) ?? []).map(S);
177
+ ) ?? []).map(I);
176
178
  }
177
- async function me(t, e = "") {
178
- const n = e ? `?token=${encodeURIComponent(e)}` : "", o = await i(`${d}/todo/items${n}`, {
179
+ async function yt(e, t = "") {
180
+ const n = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(`${d}/todo/items${n}`, {
179
181
  ...c,
180
182
  method: "POST",
181
183
  headers: { "Content-Type": "application/json" },
182
- body: JSON.stringify(t)
184
+ body: JSON.stringify(e)
183
185
  }), r = await u(o, "新建事项失败");
184
- return S(r);
186
+ return I(r);
185
187
  }
186
- async function ye(t, e, n = "") {
187
- const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(`${d}/todo/items/${t}${o}`, {
188
+ async function ft(e, t, n = "") {
189
+ const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(`${d}/todo/items/${e}${o}`, {
188
190
  ...c,
189
191
  method: "PUT",
190
192
  headers: { "Content-Type": "application/json" },
191
- body: JSON.stringify(e)
193
+ body: JSON.stringify(t)
192
194
  }), a = await u(r, "更新事项失败");
193
- return S(a);
195
+ return I(a);
194
196
  }
195
- async function fe(t, e = "", n = "") {
196
- const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(`${d}/todo/items/${t}/complete${o}`, {
197
+ async function gt(e, t = "", n = "") {
198
+ const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(`${d}/todo/items/${e}/complete${o}`, {
197
199
  ...c,
198
200
  method: "POST",
199
201
  headers: { "Content-Type": "application/json" },
200
- body: JSON.stringify({ result: e })
202
+ body: JSON.stringify({ result: t })
201
203
  }), a = await u(r, "完成事项失败");
202
- return S(a);
204
+ return I(a);
203
205
  }
204
- async function ge(t, e = "") {
205
- const n = e ? `?token=${encodeURIComponent(e)}` : "", o = await i(`${d}/todo/items/${t}/reopen${n}`, {
206
+ async function ht(e, t = "") {
207
+ const n = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(`${d}/todo/items/${e}/reopen${n}`, {
206
208
  ...c,
207
209
  method: "POST"
208
210
  }), r = await u(o, "重开事项失败");
209
- return S(r);
211
+ return I(r);
210
212
  }
211
- async function he(t, e, n = "") {
212
- const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(`${d}/todo/items/${t}/reorder${o}`, {
213
+ async function St(e, t, n = "") {
214
+ const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(`${d}/todo/items/${e}/reorder${o}`, {
213
215
  ...c,
214
216
  method: "POST",
215
217
  headers: { "Content-Type": "application/json" },
216
- body: JSON.stringify(e)
218
+ body: JSON.stringify(t)
217
219
  }), a = await u(r, "调整排序失败");
218
- return S(a);
220
+ return I(a);
219
221
  }
220
- async function $e(t, e = "") {
221
- const n = e ? `?token=${encodeURIComponent(e)}` : "", o = await i(`${d}/todo/items/reorder-batch${n}`, {
222
+ async function $t(e, t = "") {
223
+ const n = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(`${d}/todo/items/reorder-batch${n}`, {
222
224
  ...c,
223
225
  method: "POST",
224
226
  headers: { "Content-Type": "application/json" },
225
- body: JSON.stringify({ updates: t })
227
+ body: JSON.stringify({ updates: e })
226
228
  });
227
- return h(o, "调整排序失败");
229
+ return S(o, "调整排序失败");
228
230
  }
229
- async function Se(t, e = "") {
230
- const n = e ? `?token=${encodeURIComponent(e)}` : "", o = await i(`${d}/todo/projects/reorder-batch${n}`, {
231
+ async function It(e, t = "") {
232
+ const n = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(`${d}/todo/projects/reorder-batch${n}`, {
231
233
  ...c,
232
234
  method: "POST",
233
235
  headers: { "Content-Type": "application/json" },
234
- body: JSON.stringify({ updates: t })
236
+ body: JSON.stringify({ updates: e })
235
237
  });
236
- return h(o, "调整项目排序失败");
238
+ return S(o, "调整项目排序失败");
237
239
  }
238
- async function Ie(t, e = "") {
239
- const n = e ? `?token=${encodeURIComponent(e)}` : "", o = await i(`${d}/todo/items/${t}${n}`, {
240
+ async function Tt(e, t = "") {
241
+ const n = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(`${d}/todo/items/${e}${n}`, {
240
242
  ...c,
241
243
  method: "DELETE"
242
244
  });
243
- return h(o, "删除事项失败");
245
+ return S(o, "删除事项失败");
246
+ }
247
+ function G(e) {
248
+ const t = e ?? {};
249
+ return {
250
+ todoId: h(t.todoId),
251
+ sessionId: t.sessionId == null ? null : h(t.sessionId),
252
+ agentId: t.agentId == null ? null : h(t.agentId),
253
+ projectSpaceId: t.projectSpaceId == null ? 0 : h(t.projectSpaceId),
254
+ projectSpaceTitle: String(t.projectSpaceTitle ?? ""),
255
+ status: String(t.status ?? ""),
256
+ kickoff: String(t.kickoff ?? ""),
257
+ spaceEntries: Array.isArray(t.spaceEntries) ? t.spaceEntries.map((n) => ({
258
+ path: String(n.path ?? ""),
259
+ name: String(n.name ?? ""),
260
+ dir: !!n.dir,
261
+ size: n.size == null ? 0 : Number(n.size)
262
+ })) : []
263
+ };
264
+ }
265
+ async function Nt(e, t, n = "") {
266
+ const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(`${d}/todo/items/${e}/dispatch${o}`, {
267
+ ...c,
268
+ method: "POST",
269
+ headers: { "Content-Type": "application/json" },
270
+ body: JSON.stringify({ agentId: t })
271
+ }), a = await u(r, "派发给 Agent 失败");
272
+ return G(a);
273
+ }
274
+ async function Et(e, t = "") {
275
+ const n = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(`${d}/todo/items/${e}/undispatch${n}`, {
276
+ ...c,
277
+ method: "POST"
278
+ }), r = await u(o, "取消派发失败");
279
+ return I(r);
244
280
  }
245
- const G = {
281
+ const q = {
246
282
  RUNTIME_MONITOR_VIEW: ["RUNTIME_MONITOR_MANAGE"],
247
283
  EVALUATION_VIEW: ["EVALUATION_MANAGE"],
248
284
  COLLABORATION_VIEW: [
@@ -263,67 +299,67 @@ const G = {
263
299
  KNOWLEDGE_VIEW: ["KNOWLEDGE_MANAGE"],
264
300
  WEBIDE_VIEW: ["WEBIDE_MANAGE"]
265
301
  };
266
- function Te(t, e) {
302
+ function Ot(e, t) {
267
303
  var o;
268
- if (!t) return !1;
269
- if (t.is_global_admin || (o = t.permissions) != null && o.includes(e)) return !0;
270
- const n = G[e];
304
+ if (!e) return !1;
305
+ if (e.is_global_admin || (o = e.permissions) != null && o.includes(t)) return !0;
306
+ const n = q[t];
271
307
  return !!(n != null && n.some((r) => {
272
308
  var a;
273
- return (a = t.permissions) == null ? void 0 : a.includes(r);
309
+ return (a = e.permissions) == null ? void 0 : a.includes(r);
274
310
  }));
275
311
  }
276
- const q = "_wrap_2gcw5_1", J = "_card_2gcw5_9", V = "_badge_2gcw5_19", W = "_title_2gcw5_41", v = "_desc_2gcw5_48", x = "_actions_2gcw5_55", z = "_primary_2gcw5_63", F = "_secondary_2gcw5_75", K = "_details_2gcw5_90", H = "_pre_2gcw5_102", Y = "_copy_2gcw5_117", Q = "_compact_2gcw5_127", y = {
277
- wrap: q,
278
- card: J,
312
+ const J = "_wrap_2gcw5_1", z = "_card_2gcw5_9", V = "_badge_2gcw5_19", W = "_title_2gcw5_41", v = "_desc_2gcw5_48", x = "_actions_2gcw5_55", F = "_primary_2gcw5_63", K = "_secondary_2gcw5_75", H = "_details_2gcw5_90", Y = "_pre_2gcw5_102", Q = "_copy_2gcw5_117", X = "_compact_2gcw5_127", y = {
313
+ wrap: J,
314
+ card: z,
279
315
  badge: V,
280
316
  title: W,
281
317
  desc: v,
282
318
  actions: x,
283
- primary: z,
284
- secondary: F,
285
- details: K,
286
- pre: H,
287
- copy: Y,
288
- compact: Q
319
+ primary: F,
320
+ secondary: K,
321
+ details: H,
322
+ pre: Y,
323
+ copy: Q,
324
+ compact: X
289
325
  };
290
- function X(t) {
291
- const e = t, n = `${(e == null ? void 0 : e.name) ?? ""} ${(e == null ? void 0 : e.message) ?? ""} ${typeof t == "string" ? t : ""}`;
326
+ function Z(e) {
327
+ const t = e, n = `${(t == null ? void 0 : t.name) ?? ""} ${(t == null ? void 0 : t.message) ?? ""} ${typeof e == "string" ? e : ""}`;
292
328
  return /ChunkLoadError|Loading chunk|Failed to fetch dynamically imported module|Importing a module script failed|error loading dynamically imported module/i.test(n);
293
329
  }
294
- function Z(t) {
295
- const { status: e, error: n } = t;
296
- return e === 401 ? {
330
+ function tt(e) {
331
+ const { status: t, error: n } = e;
332
+ return t === 401 ? {
297
333
  kind: "unauthorized",
298
- status: e,
334
+ status: t,
299
335
  badge: "401",
300
336
  title: "登录已失效",
301
337
  description: "当前会话已过期或未建立,请重新登录后继续。重登后会回到这个页面。"
302
- } : e === 403 ? {
338
+ } : t === 403 ? {
303
339
  kind: "forbidden",
304
- status: e,
340
+ status: t,
305
341
  badge: "403",
306
342
  title: "没有访问权限",
307
343
  description: "当前账号无权访问该功能。如需开通,请联系管理员分配权限。"
308
- } : e === 404 ? {
344
+ } : t === 404 ? {
309
345
  kind: "not-found",
310
- status: e,
346
+ status: t,
311
347
  badge: "404",
312
348
  title: "功能接口未就绪",
313
349
  description: "这个页面要用的后端接口还没有部署,或前后端路径对不上。可以重试;若持续如此,请把技术详情发给运维确认版本。"
314
- } : e && e >= 500 ? {
350
+ } : t && t >= 500 ? {
315
351
  kind: "server",
316
- status: e,
317
- badge: String(e),
352
+ status: t,
353
+ badge: String(t),
318
354
  title: "服务暂时不可用",
319
355
  description: "后端返回了错误。稍后重试;如果反复出现,请把技术详情发给运维。"
320
- } : e === 0 ? {
356
+ } : t === 0 ? {
321
357
  kind: "network",
322
- status: e,
358
+ status: t,
323
359
  badge: "!",
324
360
  title: "网络不可用",
325
361
  description: "请求没有到达后端。请检查网络,或确认本地后端服务是否已启动。"
326
- } : X(n) ? {
362
+ } : Z(n) ? {
327
363
  kind: "chunk",
328
364
  badge: "⟳",
329
365
  title: "页面资源加载失败",
@@ -340,19 +376,19 @@ function Z(t) {
340
376
  description: "发生了未知错误。请重试,或返回首页换个入口再试。"
341
377
  };
342
378
  }
343
- function ee(t, e) {
379
+ function et(e, t) {
344
380
  const n = [];
345
- if (n.push(`页面:${typeof location < "u" ? location.pathname + location.search : "-"}`), n.push(`时间:${(/* @__PURE__ */ new Date()).toISOString()}`), t != null && n.push(`HTTP:${t}`), e != null) {
346
- const o = e;
381
+ if (n.push(`页面:${typeof location < "u" ? location.pathname + location.search : "-"}`), n.push(`时间:${(/* @__PURE__ */ new Date()).toISOString()}`), e != null && n.push(`HTTP:${e}`), t != null) {
382
+ const o = t;
347
383
  o != null && o.name && n.push(`错误名:${String(o.name)}`), o != null && o.message && n.push(`消息:${String(o.message)}`), o != null && o.stack ? n.push(`堆栈:
348
- ${String(o.stack)}`) : typeof e != "object" && n.push(`原文:${String(e)}`);
384
+ ${String(o.stack)}`) : typeof t != "object" && n.push(`原文:${String(t)}`);
349
385
  }
350
386
  return n.join(`
351
387
  `).slice(0, 4e3);
352
388
  }
353
- const te = ({
354
- status: t,
355
- error: e,
389
+ const nt = ({
390
+ status: e,
391
+ error: t,
356
392
  title: n,
357
393
  description: o,
358
394
  retry: r,
@@ -362,38 +398,38 @@ const te = ({
362
398
  compact: p = !1,
363
399
  className: m
364
400
  }) => {
365
- const f = b(() => Z({ status: t, error: e }), [t, e]), [$, _] = L(!1), A = b(() => ee(t, e), [t, e]);
401
+ const f = b(() => tt({ status: e, error: t }), [e, t]), [$, E] = L(!1), A = b(() => et(e, t), [e, t]);
366
402
  D(() => {
367
403
  if (!$) return;
368
- const E = setTimeout(() => _(!1), 2e3);
369
- return () => clearTimeout(E);
404
+ const O = setTimeout(() => E(!1), 2e3);
405
+ return () => clearTimeout(O);
370
406
  }, [$]);
371
407
  const j = async () => {
372
408
  try {
373
- await navigator.clipboard.writeText(A), _(!0);
409
+ await navigator.clipboard.writeText(A), E(!0);
374
410
  } catch {
375
- _(!1);
411
+ E(!1);
376
412
  }
377
- }, U = () => {
378
- const E = encodeURIComponent(location.pathname + location.search);
379
- location.assign(`/login?redirect=${E}`);
380
- }, k = () => r ? /* @__PURE__ */ g("button", { type: "button", className: y.primary, onClick: r, children: a || "重试" }) : f.kind === "chunk" ? /* @__PURE__ */ g("button", { type: "button", className: y.primary, onClick: () => location.reload(), children: "刷新页面" }) : f.kind === "unauthorized" ? /* @__PURE__ */ g("button", { type: "button", className: y.primary, onClick: U, children: "重新登录" }) : null, P = e != null || t != null;
413
+ }, k = () => {
414
+ const O = encodeURIComponent(location.pathname + location.search);
415
+ location.assign(`/login?redirect=${O}`);
416
+ }, U = () => r ? /* @__PURE__ */ g("button", { type: "button", className: y.primary, onClick: r, children: a || "重试" }) : f.kind === "chunk" ? /* @__PURE__ */ g("button", { type: "button", className: y.primary, onClick: () => location.reload(), children: "刷新页面" }) : f.kind === "unauthorized" ? /* @__PURE__ */ g("button", { type: "button", className: y.primary, onClick: k, children: "重新登录" }) : null, R = t != null || e != null;
381
417
  return /* @__PURE__ */ g(
382
418
  "div",
383
419
  {
384
420
  className: [y.wrap, p ? y.compact : "", m || ""].filter(Boolean).join(" "),
385
421
  role: "alert",
386
422
  "data-error-kind": f.kind,
387
- children: /* @__PURE__ */ O("div", { className: y.card, children: [
423
+ children: /* @__PURE__ */ _("div", { className: y.card, children: [
388
424
  /* @__PURE__ */ g("div", { className: y.badge, "data-kind": f.kind, children: f.badge }),
389
425
  /* @__PURE__ */ g("h2", { className: y.title, children: n || f.title }),
390
426
  /* @__PURE__ */ g("p", { className: y.desc, children: o || f.description }),
391
- /* @__PURE__ */ O("div", { className: y.actions, children: [
392
- k(),
427
+ /* @__PURE__ */ _("div", { className: y.actions, children: [
428
+ U(),
393
429
  s,
394
430
  l && f.kind !== "unauthorized" && /* @__PURE__ */ g("a", { className: y.secondary, href: "/", children: "返回首页" })
395
431
  ] }),
396
- P && /* @__PURE__ */ O("details", { className: y.details, children: [
432
+ R && /* @__PURE__ */ _("details", { className: y.details, children: [
397
433
  /* @__PURE__ */ g("summary", { children: "技术详情" }),
398
434
  /* @__PURE__ */ g("pre", { className: y.pre, children: A }),
399
435
  /* @__PURE__ */ g("button", { type: "button", className: y.copy, onClick: j, children: $ ? "已复制" : "复制详情" })
@@ -402,19 +438,19 @@ const te = ({
402
438
  }
403
439
  );
404
440
  };
405
- class Ne extends M {
406
- constructor(e) {
407
- super(e), this.state = { hasError: !1, error: null };
441
+ class _t extends M {
442
+ constructor(t) {
443
+ super(t), this.state = { hasError: !1, error: null };
408
444
  }
409
- static getDerivedStateFromError(e) {
410
- return { hasError: !0, error: e };
445
+ static getDerivedStateFromError(t) {
446
+ return { hasError: !0, error: t };
411
447
  }
412
- componentDidCatch(e, n) {
413
- console.error("[ErrorBoundary]", e, n.componentStack);
448
+ componentDidCatch(t, n) {
449
+ console.error("[ErrorBoundary]", t, n.componentStack);
414
450
  }
415
451
  render() {
416
452
  return this.state.hasError ? this.props.fallback ? this.props.fallback : /* @__PURE__ */ g(
417
- te,
453
+ nt,
418
454
  {
419
455
  error: this.state.error,
420
456
  retry: () => this.setState({ hasError: !1, error: null })
@@ -422,26 +458,26 @@ class Ne extends M {
422
458
  ) : this.props.children;
423
459
  }
424
460
  }
425
- function w(t) {
426
- const e = t && typeof t == "object" ? t : {}, n = Array.isArray(e.items) ? R(e.items) : [];
427
- return { ...e, items: n };
461
+ function w(e) {
462
+ const t = e && typeof e == "object" ? e : {}, n = Array.isArray(t.items) ? P(t.items) : [];
463
+ return { ...t, items: n };
428
464
  }
429
- async function _e(t, e = "") {
430
- const n = e ? `?token=${encodeURIComponent(e)}` : "", o = await i(
431
- `${d}/personal-agents/${t}/schedules${n}`,
465
+ async function At(e, t = "") {
466
+ const n = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(
467
+ `${d}/personal-agents/${e}/schedules${n}`,
432
468
  c
433
469
  );
434
470
  return u(o, "获取定时任务列表失败");
435
471
  }
436
- async function Ee(t, e, n, o, r = "", a = "", s = "") {
472
+ async function bt(e, t, n, o, r = "", a = "", s = "") {
437
473
  const l = s ? `?token=${encodeURIComponent(s)}` : "", p = await i(
438
- `${d}/personal-agents/${t}/schedules${l}`,
474
+ `${d}/personal-agents/${e}/schedules${l}`,
439
475
  {
440
476
  ...c,
441
477
  method: "POST",
442
478
  headers: { "Content-Type": "application/json" },
443
479
  body: JSON.stringify({
444
- name: e,
480
+ name: t,
445
481
  prompt: n,
446
482
  cron_expression: o,
447
483
  notify_user_id: r,
@@ -451,9 +487,9 @@ async function Ee(t, e, n, o, r = "", a = "", s = "") {
451
487
  );
452
488
  return u(p, "创建定时任务失败");
453
489
  }
454
- async function Oe(t, e, n, o = "") {
490
+ async function Ct(e, t, n, o = "") {
455
491
  const r = o ? `?token=${encodeURIComponent(o)}` : "", a = await i(
456
- `${d}/personal-agents/${t}/schedules/${e}${r}`,
492
+ `${d}/personal-agents/${e}/schedules/${t}${r}`,
457
493
  {
458
494
  ...c,
459
495
  method: "PUT",
@@ -463,19 +499,19 @@ async function Oe(t, e, n, o = "") {
463
499
  );
464
500
  return u(a, "更新定时任务失败");
465
501
  }
466
- async function Ae(t, e, n = "") {
502
+ async function wt(e, t, n = "") {
467
503
  const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(
468
- `${d}/personal-agents/${t}/schedules/${e}${o}`,
504
+ `${d}/personal-agents/${e}/schedules/${t}${o}`,
469
505
  {
470
506
  ...c,
471
507
  method: "DELETE"
472
508
  }
473
509
  );
474
- return h(r, "删除定时任务失败");
510
+ return S(r, "删除定时任务失败");
475
511
  }
476
- async function be(t, e, n, o = "") {
512
+ async function jt(e, t, n, o = "") {
477
513
  const r = o ? `?token=${encodeURIComponent(o)}` : "", a = await i(
478
- `${d}/personal-agents/${t}/schedules/${e}/toggle${r}`,
514
+ `${d}/personal-agents/${e}/schedules/${t}/toggle${r}`,
479
515
  {
480
516
  ...c,
481
517
  method: "POST",
@@ -485,18 +521,18 @@ async function be(t, e, n, o = "") {
485
521
  );
486
522
  return u(a, "切换定时任务状态失败");
487
523
  }
488
- async function Ce(t, e, n = 1, o = 20, r = "") {
524
+ async function kt(e, t, n = 1, o = 20, r = "") {
489
525
  const a = new URLSearchParams();
490
526
  a.set("page", String(n)), a.set("size", String(o)), r && a.set("token", r);
491
527
  const s = await i(
492
- `${d}/personal-agents/${t}/schedules/${e}/logs?${a.toString()}`,
528
+ `${d}/personal-agents/${e}/schedules/${t}/logs?${a.toString()}`,
493
529
  c
494
- ), l = await h(s, "获取执行历史失败");
530
+ ), l = await S(s, "获取执行历史失败");
495
531
  return w(l);
496
532
  }
497
- async function we(t, e, n = "") {
533
+ async function Ut(e, t, n = "") {
498
534
  const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(
499
- `${d}/personal-agents/${t}/schedules/${e}/run${o}`,
535
+ `${d}/personal-agents/${e}/schedules/${t}/run${o}`,
500
536
  {
501
537
  ...c,
502
538
  method: "POST"
@@ -504,14 +540,14 @@ async function we(t, e, n = "") {
504
540
  );
505
541
  return u(r, "手动触发任务失败");
506
542
  }
507
- async function je(t, e = "", n = "") {
543
+ async function Rt(e, t = "", n = "") {
508
544
  const o = new URLSearchParams();
509
- e && o.set("keyword", e), n && o.set("token", n);
545
+ t && o.set("keyword", t), n && o.set("token", n);
510
546
  const r = await i(
511
- `${d}/personal-agents/${t}/schedules/staff-search?${o.toString()}`,
547
+ `${d}/personal-agents/${e}/schedules/staff-search?${o.toString()}`,
512
548
  c
513
549
  );
514
- return (await h(r, "搜索员工失败") ?? []).map((s) => {
550
+ return (await S(r, "搜索员工失败") ?? []).map((s) => {
515
551
  const l = (s == null ? void 0 : s.extend) ?? {};
516
552
  return {
517
553
  userId: String((s == null ? void 0 : s.userId) ?? (s == null ? void 0 : s.id) ?? ""),
@@ -522,66 +558,68 @@ async function je(t, e = "", n = "") {
522
558
  };
523
559
  });
524
560
  }
525
- async function Ue(t = "", e = 50) {
561
+ async function Pt(e = "", t = 50) {
526
562
  const n = new URLSearchParams();
527
- n.set("limit", String(e)), t && n.set("token", t);
563
+ n.set("limit", String(t)), e && n.set("token", e);
528
564
  const o = await i(
529
565
  `${d}/personal-agents/schedules/notifications?${n.toString()}`,
530
566
  c
531
- ), r = await h(o, "获取通知失败");
567
+ ), r = await S(o, "获取通知失败");
532
568
  return w(r);
533
569
  }
534
- async function ke(t, e = "") {
535
- const n = e ? `?token=${encodeURIComponent(e)}` : "", o = await i(
536
- `${d}/personal-agents/schedules/notifications/${t}/read${n}`,
570
+ async function Lt(e, t = "") {
571
+ const n = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(
572
+ `${d}/personal-agents/schedules/notifications/${e}/read${n}`,
537
573
  {
538
574
  ...c,
539
575
  method: "POST"
540
576
  }
541
577
  );
542
- return h(o, "标记已读失败");
578
+ return S(o, "标记已读失败");
543
579
  }
544
- async function Pe(t = "") {
545
- const e = t ? `?token=${encodeURIComponent(t)}` : "", n = await i(
546
- `${d}/personal-agents/schedules/notifications/read-all${e}`,
580
+ async function Dt(e = "") {
581
+ const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await i(
582
+ `${d}/personal-agents/schedules/notifications/read-all${t}`,
547
583
  {
548
584
  ...c,
549
585
  method: "POST"
550
586
  }
551
587
  );
552
- return h(n, "标记已读失败");
588
+ return S(n, "标记已读失败");
553
589
  }
554
590
  export {
555
- $e as A,
556
- he as B,
557
- Se as C,
558
- T as D,
559
- Ne as E,
560
- te as P,
561
- _e as a,
562
- Ue as b,
563
- Ce as c,
564
- Ee as d,
565
- Ae as e,
566
- ae as f,
567
- Pe as g,
568
- Te as h,
569
- X as i,
570
- le as j,
571
- me as k,
572
- ye as l,
573
- ke as m,
574
- ge as n,
575
- fe as o,
576
- se as p,
577
- Ie as q,
578
- we as r,
579
- je as s,
580
- be as t,
581
- Oe as u,
582
- ue as v,
583
- ie as w,
584
- ce as x,
585
- de as y,
586
- pe as z
591
+ lt as A,
592
+ mt as B,
593
+ $t as C,
594
+ N as D,
595
+ St as E,
596
+ It as F,
597
+ _t as G,
598
+ nt as P,
599
+ At as a,
600
+ Pt as b,
601
+ kt as c,
602
+ bt as d,
603
+ wt as e,
604
+ it as f,
605
+ Dt as g,
606
+ Ot as h,
607
+ Z as i,
608
+ ut as j,
609
+ yt as k,
610
+ ft as l,
611
+ Lt as m,
612
+ Nt as n,
613
+ Et as o,
614
+ at as p,
615
+ ht as q,
616
+ Ut as r,
617
+ Rt as s,
618
+ jt as t,
619
+ Ct as u,
620
+ gt as v,
621
+ Tt as w,
622
+ pt as x,
623
+ ct as y,
624
+ dt as z
587
625
  };