@yuku123/z-team-component 0.2.129 → 0.2.130

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 (46) hide show
  1. package/dist/{ChangeLogView-prUA0IUb.js → ChangeLogView-AY7dKChQ.js} +1 -1
  2. package/dist/{ComponentDoc-C2CX0Xw2.js → ComponentDoc-DTpTBK1V.js} +3 -3
  3. package/dist/{InvitationManagementPage-BcubClbW.js → InvitationManagementPage-YzQVnNWz.js} +1 -1
  4. package/dist/{OnboardingPage-Cxqhhaqv.js → OnboardingPage-ClH-s7zs.js} +2 -2
  5. package/dist/{ScheduledTasks-CjElzdMF.js → ScheduledTasks-DhcmGmhu.js} +6 -6
  6. package/dist/{SystemShell-Cx-v4Hpj.js → SystemShell-Cz7S4YnT.js} +4 -4
  7. package/dist/{admin-logs-D6ikiSH_.js → admin-logs-2gdJxEwA.js} +1 -1
  8. package/dist/{api-BZgWlYlv.js → api---aB1ADx.js} +1 -1
  9. package/dist/{api-DOwJiPuB.js → api-BHYf7Uyx.js} +1 -1
  10. package/dist/{createWorkspaceWsHandler-CZJ76AhW.js → createWorkspaceWsHandler-BC4HmdFu.js} +3 -3
  11. package/dist/{index-D6Hmcvfk.js → index--HSE1tzT.js} +3 -3
  12. package/dist/{index-xkMK0DD6.js → index--L2wU6OV.js} +1 -1
  13. package/dist/{index-BpwFkwbQ.js → index-4apTfQuo.js} +6 -6
  14. package/dist/{index-DpBh6ZiS.js → index-9coNts0T.js} +6 -6
  15. package/dist/{index-DqQmFDgG.js → index-CROBbbCB.js} +1 -1
  16. package/dist/{index-Cb4Q2j9G.js → index-CTqU8nrB.js} +2 -2
  17. package/dist/{index-B7TlMXsI.js → index-Ca08VoFz.js} +2 -2
  18. package/dist/{index-ClxrFdMY.js → index-Ccvhn50s.js} +3 -3
  19. package/dist/{index-CINjd8dS.js → index-Chzml7fB.js} +3 -3
  20. package/dist/{index-S7dnw51f.js → index-Ci31buz9.js} +10 -10
  21. package/dist/{index-D0tpYkvs.js → index-CnIbuXF9.js} +2 -2
  22. package/dist/{index-C9qwuEjl.js → index-CnRAUDUi.js} +1 -1
  23. package/dist/{index-BGv75VC-.js → index-CnyMTIyv.js} +5 -5
  24. package/dist/{index-T81OuZsl.js → index-CqOsWy6H.js} +2 -2
  25. package/dist/index-Cui8SX9p.js +1299 -0
  26. package/dist/{index-CnT2Lzj_.js → index-DA0MCrVH.js} +2 -2
  27. package/dist/{index-DUCQ-vg5.js → index-DHubhPeT.js} +1 -1
  28. package/dist/{index-DoTLYXzl.js → index-DfpB0BR9.js} +3 -3
  29. package/dist/{index-Dmqq-TZg.js → index-DqiBrPAv.js} +1 -1
  30. package/dist/{index-Bmst20j8.js → index-Opx4qrhX.js} +3 -3
  31. package/dist/{index-CivLA2Ck.js → index-Zr09eAzk.js} +2 -2
  32. package/dist/{index-3az2HcZV.js → index-baUMWaRm.js} +3 -3
  33. package/dist/{index-BoJfKCna.js → index-fJnhCAB9.js} +2 -2
  34. package/dist/{index-DBXtiyyO.js → index-lucAUJAv.js} +2 -2
  35. package/dist/{index-Mn6ZX7eg.js → index-mwKbvNPB.js} +4 -4
  36. package/dist/index.js +1 -1
  37. package/dist/{instance-DOYjT4ym.js → instance-ITIB5e5v.js} +1 -1
  38. package/dist/{menuPermission-CpTIhKPL.js → menuPermission-Dw1EJWIf.js} +3 -3
  39. package/dist/pages.js +1 -1
  40. package/dist/{send-default-agent-team-message-Bys3ZsLG.js → send-default-agent-team-message-DzRmAa6S.js} +1 -1
  41. package/dist/{sso-user-CFA43hkh.js → sso-user-497FBkoQ.js} +1 -1
  42. package/dist/{training-BYJejDfy.js → training-B4IByvWW.js} +1 -1
  43. package/dist/{webide-pyfurtu3.js → webide-DwQqqS-I.js} +3 -3
  44. package/dist/z-team-component.css +1 -1
  45. package/package.json +1 -1
  46. package/dist/index-IvhRfboz.js +0 -1248
@@ -0,0 +1,1299 @@
1
+ import { jsxs as r, jsx as a, Fragment as lt } from "react/jsx-runtime";
2
+ import { ReloadOutlined as dt, AppstoreOutlined as pt, DeploymentUnitOutlined as ut, SearchOutlined as mt, RightOutlined as ht, TeamOutlined as _t, MessageOutlined as gt } from "@ant-design/icons";
3
+ import { Button as Q, Select as Ae, Spin as ue, Empty as f, Tag as I, Input as O } from "antd";
4
+ import { useState as p, useCallback as g, useEffect as me, useMemo as he, useRef as vt } from "react";
5
+ import { u as $ } from "./ComponentDoc-DTpTBK1V.js";
6
+ import { h as W } from "./history-BlrA1eaW.js";
7
+ import { menuItems as Nt } from "@yuku123/z-product-component";
8
+ import { C as yt } from "./createWorkspaceWsHandler-BC4HmdFu.js";
9
+ import { l as ft, c as wt } from "./api-BHYf7Uyx.js";
10
+ const bt = "product-workspace", qe = "productCode";
11
+ function w(n) {
12
+ if (!n.ok) throw new Error(`产品接口失败 (${n.status})`);
13
+ return n.json();
14
+ }
15
+ async function Tt() {
16
+ const n = $.getState().token, s = await fetch(`/api/product/list${n ? `?token=${encodeURIComponent(n)}` : ""}`, {
17
+ credentials: "include",
18
+ headers: { Accept: "application/json" }
19
+ }), i = await w(s), o = Array.isArray(i) ? i : i == null ? void 0 : i.data;
20
+ return Array.isArray(o) ? o.map((v) => ({
21
+ ...v,
22
+ productCode: String(v.productCode ?? v.code ?? ""),
23
+ name: String(v.name ?? v.productCode ?? v.code ?? "未命名")
24
+ })) : [];
25
+ }
26
+ async function Ct(n) {
27
+ try {
28
+ const s = await fetch(`/api/product/${encodeURIComponent(n)}`, {
29
+ credentials: "include",
30
+ headers: { Accept: "application/json" }
31
+ }), i = await w(s), o = (i == null ? void 0 : i.data) ?? i;
32
+ return o && typeof o == "object" ? { ...o, productCode: n } : null;
33
+ } catch {
34
+ return null;
35
+ }
36
+ }
37
+ async function St(n) {
38
+ try {
39
+ const s = await fetch(`/api/product/${encodeURIComponent(n)}/atelier/workspace`, {
40
+ credentials: "include",
41
+ headers: { Accept: "application/json" }
42
+ }), i = await w(s), o = (i == null ? void 0 : i.data) ?? i;
43
+ return o && typeof o == "object" && Array.isArray(o.files) ? o.files : Array.isArray(o) ? o : [];
44
+ } catch {
45
+ return [];
46
+ }
47
+ }
48
+ async function At(n, s) {
49
+ try {
50
+ const i = await fetch(
51
+ `/api/product/${encodeURIComponent(n)}/atelier/files/raw?path=${encodeURIComponent(s)}`,
52
+ { credentials: "include", headers: { Accept: "text/html, application/json" } }
53
+ );
54
+ return i.ok ? await i.text() : null;
55
+ } catch {
56
+ return null;
57
+ }
58
+ }
59
+ function Pt(n) {
60
+ var o;
61
+ const s = (o = n.ext) == null ? void 0 : o.params;
62
+ if (!s || typeof s != "object") return null;
63
+ const i = s[qe];
64
+ return i == null ? null : String(i);
65
+ }
66
+ async function Rt(n, s) {
67
+ try {
68
+ return (await ft(s)).filter((o) => Pt(o) === n);
69
+ } catch {
70
+ return [];
71
+ }
72
+ }
73
+ async function It(n, s, i) {
74
+ return wt(
75
+ { scenario_code: bt, name: s || `产品 ${n} 讨论组` },
76
+ i,
77
+ { [qe]: n }
78
+ );
79
+ }
80
+ function T(n) {
81
+ return n && typeof n == "object" && "data" in n ? n.data : n;
82
+ }
83
+ async function Lt() {
84
+ try {
85
+ const n = await fetch("/api/product/group/list", {
86
+ credentials: "include",
87
+ headers: { Accept: "application/json" }
88
+ }), s = await w(n), i = T(s);
89
+ return Array.isArray(i) ? i : [];
90
+ } catch {
91
+ return [];
92
+ }
93
+ }
94
+ async function kt(n) {
95
+ try {
96
+ const s = await fetch("/api/product/group", {
97
+ method: "POST",
98
+ credentials: "include",
99
+ headers: { Accept: "application/json", "Content-Type": "application/json" },
100
+ body: JSON.stringify(n)
101
+ }), i = await w(s);
102
+ return T(i);
103
+ } catch {
104
+ return null;
105
+ }
106
+ }
107
+ async function Et(n) {
108
+ try {
109
+ const s = await fetch(`/api/product/${encodeURIComponent(n)}/app-binding/list`, {
110
+ credentials: "include",
111
+ headers: { Accept: "application/json" }
112
+ }), i = await w(s), o = T(i);
113
+ return Array.isArray(o) ? o : [];
114
+ } catch {
115
+ return [];
116
+ }
117
+ }
118
+ async function Gt(n, s) {
119
+ try {
120
+ const i = await fetch(`/api/product/${encodeURIComponent(n)}/app-binding`, {
121
+ method: "POST",
122
+ credentials: "include",
123
+ headers: { Accept: "application/json", "Content-Type": "application/json" },
124
+ body: JSON.stringify(s)
125
+ }), o = await w(i);
126
+ return T(o);
127
+ } catch {
128
+ return null;
129
+ }
130
+ }
131
+ async function $t(n) {
132
+ try {
133
+ const s = await fetch(`/api/product/${encodeURIComponent(n)}/requirement/list`, {
134
+ credentials: "include",
135
+ headers: { Accept: "application/json" }
136
+ }), i = await w(s), o = T(i);
137
+ return Array.isArray(o) ? o : [];
138
+ } catch {
139
+ return [];
140
+ }
141
+ }
142
+ async function Bt(n, s) {
143
+ try {
144
+ const i = await fetch(`/api/product/${encodeURIComponent(n)}/requirement`, {
145
+ method: "POST",
146
+ credentials: "include",
147
+ headers: { Accept: "application/json", "Content-Type": "application/json" },
148
+ body: JSON.stringify(s)
149
+ }), o = await w(i);
150
+ return T(o);
151
+ } catch {
152
+ return null;
153
+ }
154
+ }
155
+ async function H(n, s) {
156
+ try {
157
+ const i = await fetch(
158
+ `/api/product/${encodeURIComponent(n)}/${s}`,
159
+ { credentials: "include", headers: { Accept: "application/json" } }
160
+ ), o = await w(i), v = T(o);
161
+ return Array.isArray(v) ? v : [];
162
+ } catch {
163
+ return [];
164
+ }
165
+ }
166
+ async function Ft(n) {
167
+ return H(n, "glossary/list");
168
+ }
169
+ async function jt(n) {
170
+ return H(n, "concept/list");
171
+ }
172
+ async function qt(n) {
173
+ return H(n, "scenario/list");
174
+ }
175
+ async function Ot(n) {
176
+ return H(n, "design/list");
177
+ }
178
+ async function Ht(n) {
179
+ return H(n, "chat/sessions");
180
+ }
181
+ async function Dt(n) {
182
+ return H(n, "chat/proposals");
183
+ }
184
+ async function Ut() {
185
+ try {
186
+ const n = await fetch("/api/product/relation/types", {
187
+ credentials: "include",
188
+ headers: { Accept: "application/json" }
189
+ }), s = await w(n), i = T(s);
190
+ return i && typeof i == "object" ? i : {};
191
+ } catch {
192
+ return {};
193
+ }
194
+ }
195
+ async function Mt() {
196
+ try {
197
+ const n = await fetch("/api/product/architecture", {
198
+ credentials: "include",
199
+ headers: { Accept: "application/json" }
200
+ }), s = await w(n), i = T(s);
201
+ return i && typeof i == "object" ? {
202
+ products: Array.isArray(i.products) ? i.products : [],
203
+ groups: Array.isArray(i.groups) ? i.groups : [],
204
+ relations: Array.isArray(i.relations) ? i.relations : [],
205
+ appBindings: Array.isArray(i.appBindings) ? i.appBindings : []
206
+ } : { products: [], groups: [], relations: [], appBindings: [] };
207
+ } catch {
208
+ return { products: [], groups: [], relations: [], appBindings: [] };
209
+ }
210
+ }
211
+ async function xt(n) {
212
+ try {
213
+ const s = await fetch("/api/product/relation", {
214
+ method: "POST",
215
+ credentials: "include",
216
+ headers: { Accept: "application/json", "Content-Type": "application/json" },
217
+ body: JSON.stringify(n)
218
+ }), i = await w(s);
219
+ return T(i);
220
+ } catch {
221
+ return null;
222
+ }
223
+ }
224
+ async function zt(n) {
225
+ try {
226
+ return await fetch(`/api/product/relation/${n}`, {
227
+ method: "DELETE",
228
+ credentials: "include",
229
+ headers: { Accept: "application/json" }
230
+ }), !0;
231
+ } catch {
232
+ return !1;
233
+ }
234
+ }
235
+ async function Kt(n, s) {
236
+ try {
237
+ const i = await fetch(`/api/product/${encodeURIComponent(n)}/requirement/${s.id}`, {
238
+ method: "PUT",
239
+ credentials: "include",
240
+ headers: { Accept: "application/json", "Content-Type": "application/json" },
241
+ body: JSON.stringify(s)
242
+ }), o = await w(i);
243
+ return T(o);
244
+ } catch {
245
+ return null;
246
+ }
247
+ }
248
+ const Vt = "_container_v1vhg_3", Jt = "_header_v1vhg_11", Wt = "_title_v1vhg_23", Qt = "_subtitle_v1vhg_30", Yt = "_actions_v1vhg_36", Zt = "_stats_v1vhg_42", Xt = "_relForm_v1vhg_55", ea = "_relFormLabel_v1vhg_66", ta = "_centerFill_v1vhg_72", aa = "_groups_v1vhg_79", na = "_groupBlock_v1vhg_89", ra = "_groupHeader_v1vhg_95", ia = "_groupName_v1vhg_101", ca = "_groupCount_v1vhg_107", sa = "_productGrid_v1vhg_112", oa = "_productCard_v1vhg_118", la = "_cardHead_v1vhg_134", da = "_cardName_v1vhg_141", pa = "_cardTag_v1vhg_150", ua = "_cardCode_v1vhg_156", ma = "_cardDesc_v1vhg_161", ha = "_cardSection_v1vhg_171", _a = "_sectionLabel_v1vhg_180", ga = "_bindList_v1vhg_185", va = "_bindTag_v1vhg_191", Na = "_relList_v1vhg_196", ya = "_relRow_v1vhg_202", fa = "_relTag_v1vhg_209", wa = "_relTarget_v1vhg_215", ba = "_relDel_v1vhg_225", m = {
249
+ container: Vt,
250
+ header: Jt,
251
+ title: Wt,
252
+ subtitle: Qt,
253
+ actions: Yt,
254
+ stats: Zt,
255
+ relForm: Xt,
256
+ relFormLabel: ea,
257
+ centerFill: ta,
258
+ groups: aa,
259
+ groupBlock: na,
260
+ groupHeader: ra,
261
+ groupName: ia,
262
+ groupCount: ca,
263
+ productGrid: sa,
264
+ productCard: oa,
265
+ cardHead: la,
266
+ cardName: da,
267
+ cardTag: pa,
268
+ cardCode: ua,
269
+ cardDesc: ma,
270
+ cardSection: ha,
271
+ sectionLabel: _a,
272
+ bindList: ga,
273
+ bindTag: va,
274
+ relList: Na,
275
+ relRow: ya,
276
+ relTag: fa,
277
+ relTarget: wa,
278
+ relDel: ba
279
+ };
280
+ function Ta() {
281
+ const [n, s] = p({ products: [], groups: [], relations: [], appBindings: [] }), [i, o] = p({}), [v, E] = p(!0), [d, D] = p(null), [l, U] = p(null), [b, Y] = p("DEPENDS_ON"), B = g(async () => {
282
+ E(!0);
283
+ try {
284
+ const [u, _] = await Promise.all([Mt(), Ut()]);
285
+ s(u), o(_);
286
+ } finally {
287
+ E(!1);
288
+ }
289
+ }, []);
290
+ me(() => {
291
+ B();
292
+ }, [B]);
293
+ const L = g(
294
+ (u) => {
295
+ if (!u) return null;
296
+ const _ = n.groups.find((h) => h.groupCode === u);
297
+ return _ ? _.name : u;
298
+ },
299
+ [n.groups]
300
+ ), _e = he(() => {
301
+ const u = /* @__PURE__ */ new Map();
302
+ for (const _ of n.products) {
303
+ const h = _.groupCode ?? null;
304
+ u.has(h) || u.set(h, []), u.get(h).push(_);
305
+ }
306
+ return [...u.entries()].sort((_, h) => _[0] === null ? 1 : h[0] === null ? -1 : String(L(_[0])).localeCompare(String(L(h[0])), "zh"));
307
+ }, [n.products, L]), Z = g(
308
+ (u) => n.appBindings.filter((_) => _.productCode === u),
309
+ [n.appBindings]
310
+ ), M = g(
311
+ (u) => n.relations.filter((_) => _.productCode === u),
312
+ [n.relations]
313
+ ), C = g(
314
+ (u) => {
315
+ const _ = n.products.find((h) => h.productCode === u);
316
+ return _ ? _.name : u;
317
+ },
318
+ [n.products]
319
+ ), x = g(async () => {
320
+ if (!d || !l || d === l) return;
321
+ const u = await xt({
322
+ productCode: d,
323
+ relatedCode: l,
324
+ relationType: b,
325
+ description: `${C(d)} ${i[b] ?? b} ${C(l)}`
326
+ });
327
+ u && (s((_) => ({ ..._, relations: [..._.relations, u] })), D(null), U(null));
328
+ }, [d, l, b, i, C]), k = he(
329
+ () => n.products.map((u) => ({
330
+ value: u.productCode,
331
+ label: `${u.name}(${u.productCode})`
332
+ })),
333
+ [n.products]
334
+ );
335
+ return /* @__PURE__ */ r("div", { className: m.container, children: [
336
+ /* @__PURE__ */ r("div", { className: m.header, children: [
337
+ /* @__PURE__ */ r("div", { children: [
338
+ /* @__PURE__ */ a("h2", { className: m.title, children: "架构全景" }),
339
+ /* @__PURE__ */ a("p", { className: m.subtitle, children: "租户下所有产品整顿成一张架构图:产品群 · 产品↔产品关系 · 挂接的中间件/应用" })
340
+ ] }),
341
+ /* @__PURE__ */ r("div", { className: m.actions, children: [
342
+ /* @__PURE__ */ r("span", { className: m.stats, children: [
343
+ /* @__PURE__ */ a("b", { children: n.products.length }),
344
+ " 产品",
345
+ /* @__PURE__ */ a("b", { children: n.groups.length }),
346
+ " 群",
347
+ /* @__PURE__ */ a("b", { children: n.relations.length }),
348
+ " 关系",
349
+ /* @__PURE__ */ a("b", { children: n.appBindings.filter((u) => u.appType === "INFRA").length }),
350
+ " 基建"
351
+ ] }),
352
+ /* @__PURE__ */ a(Q, { size: "small", icon: /* @__PURE__ */ a(dt, {}), onClick: () => void B(), children: "刷新" })
353
+ ] })
354
+ ] }),
355
+ /* @__PURE__ */ r("div", { className: m.relForm, children: [
356
+ /* @__PURE__ */ a("span", { className: m.relFormLabel, children: "新建产品关系:" }),
357
+ /* @__PURE__ */ a(
358
+ Ae,
359
+ {
360
+ size: "small",
361
+ placeholder: "起点产品",
362
+ value: d,
363
+ onChange: D,
364
+ options: k,
365
+ style: { width: 200 },
366
+ showSearch: !0,
367
+ optionFilterProp: "label"
368
+ }
369
+ ),
370
+ /* @__PURE__ */ a(
371
+ Ae,
372
+ {
373
+ size: "small",
374
+ placeholder: "关系类型",
375
+ value: b,
376
+ onChange: (u) => Y(u),
377
+ style: { width: 130 },
378
+ options: Object.entries(i).map(([u, _]) => ({ value: u, label: _ }))
379
+ }
380
+ ),
381
+ /* @__PURE__ */ a(
382
+ Ae,
383
+ {
384
+ size: "small",
385
+ placeholder: "终点产品",
386
+ value: l,
387
+ onChange: U,
388
+ options: k,
389
+ style: { width: 200 },
390
+ showSearch: !0,
391
+ optionFilterProp: "label"
392
+ }
393
+ ),
394
+ /* @__PURE__ */ a(
395
+ Q,
396
+ {
397
+ size: "small",
398
+ type: "primary",
399
+ onClick: () => void x(),
400
+ disabled: !d || !l || d === l,
401
+ children: "建立关系"
402
+ }
403
+ )
404
+ ] }),
405
+ v ? /* @__PURE__ */ a("div", { className: m.centerFill, children: /* @__PURE__ */ a(ue, {}) }) : n.products.length === 0 ? /* @__PURE__ */ a("div", { className: m.centerFill, children: /* @__PURE__ */ a(f, { image: f.PRESENTED_IMAGE_SIMPLE, description: "暂无产品,先在产品库创建" }) }) : /* @__PURE__ */ a("div", { className: m.groups, children: _e.map(([u, _]) => /* @__PURE__ */ r("div", { className: m.groupBlock, children: [
406
+ /* @__PURE__ */ r("div", { className: m.groupHeader, children: [
407
+ /* @__PURE__ */ a("span", { className: m.groupName, children: L(u) ? `📦 ${L(u)}` : "🗂 未分组" }),
408
+ /* @__PURE__ */ r("span", { className: m.groupCount, children: [
409
+ _.length,
410
+ " 个产品"
411
+ ] })
412
+ ] }),
413
+ /* @__PURE__ */ a("div", { className: m.productGrid, children: _.map((h) => {
414
+ const X = Z(h.productCode ?? ""), F = M(h.productCode ?? "");
415
+ return /* @__PURE__ */ r("div", { className: m.productCard, children: [
416
+ /* @__PURE__ */ r("div", { className: m.cardHead, children: [
417
+ /* @__PURE__ */ a("span", { className: m.cardName, title: h.name, children: h.name }),
418
+ h.status && /* @__PURE__ */ a(I, { className: m.cardTag, children: h.status })
419
+ ] }),
420
+ /* @__PURE__ */ a("div", { className: m.cardCode, children: h.productCode }),
421
+ h.description && /* @__PURE__ */ a("div", { className: m.cardDesc, title: h.description, children: h.description }),
422
+ X.length > 0 && /* @__PURE__ */ r("div", { className: m.cardSection, children: [
423
+ /* @__PURE__ */ a("div", { className: m.sectionLabel, children: "挂接" }),
424
+ /* @__PURE__ */ a("div", { className: m.bindList, children: X.map((N) => /* @__PURE__ */ r(
425
+ I,
426
+ {
427
+ className: m.bindTag,
428
+ color: N.appType === "INFRA" ? "purple" : "geekblue",
429
+ children: [
430
+ N.appType === "INFRA" ? "🏗" : "🧩",
431
+ " ",
432
+ N.appName
433
+ ]
434
+ },
435
+ N.id
436
+ )) })
437
+ ] }),
438
+ F.length > 0 && /* @__PURE__ */ r("div", { className: m.cardSection, children: [
439
+ /* @__PURE__ */ a("div", { className: m.sectionLabel, children: "关系" }),
440
+ /* @__PURE__ */ a("div", { className: m.relList, children: F.map((N) => /* @__PURE__ */ r("div", { className: m.relRow, children: [
441
+ /* @__PURE__ */ a(
442
+ I,
443
+ {
444
+ className: m.relTag,
445
+ color: N.relationType === "DEPENDS_ON" ? "orange" : N.relationType === "BUILT_ON" ? "cyan" : "blue",
446
+ children: i[N.relationType] ?? N.relationType
447
+ }
448
+ ),
449
+ /* @__PURE__ */ a("span", { className: m.relTarget, title: C(N.relatedCode), children: C(N.relatedCode) }),
450
+ /* @__PURE__ */ a(
451
+ "button",
452
+ {
453
+ type: "button",
454
+ className: m.relDel,
455
+ onClick: async () => {
456
+ await zt(N.id), s((G) => ({
457
+ ...G,
458
+ relations: G.relations.filter((z) => z.id !== N.id)
459
+ }));
460
+ },
461
+ title: "删除关系",
462
+ children: "✕"
463
+ }
464
+ )
465
+ ] }, N.id)) })
466
+ ] })
467
+ ] }, h.productCode);
468
+ }) })
469
+ ] }, u ?? "__none__")) })
470
+ ] });
471
+ }
472
+ const Ca = "_container_g4re4_5", Sa = "_libraryView_g4re4_14", Aa = "_libraryHeader_g4re4_22", Pa = "_libraryTitle_g4re4_34", Ra = "_librarySubtitle_g4re4_41", Ia = "_librarySearch_g4re4_47", La = "_libraryBody_g4re4_52", ka = "_productGrid_g4re4_59", Ea = "_productCard_g4re4_65", Ga = "_cardCode_g4re4_85", $a = "_cardName_g4re4_98", Ba = "_cardDesc_g4re4_107", Fa = "_cardFoot_g4re4_118", ja = "_cardEnter_g4re4_126", qa = "_cardTag_g4re4_134", Oa = "_left_g4re4_140", Ha = "_leftHeader_g4re4_150", Da = "_leftTitleRow_g4re4_156", Ua = "_leftTitle_g4re4_156", Ma = "_backBtn_g4re4_173", xa = "_sectionBar_g4re4_203", za = "_sectionTab_g4re4_213", Ka = "_sectionTabActive_g4re4_235", Va = "_sectionIcon_g4re4_242", Ja = "_leftBody_g4re4_247", Wa = "_fileList_g4re4_258", Qa = "_fileTreeHint_g4re4_297", Ya = "_fileRow_g4re4_303", Za = "_fileRowActive_g4re4_317", Xa = "_fileRowIcon_g4re4_321", en = "_fileRowName_g4re4_326", tn = "_fileKindTag_g4re4_335", an = "_center_g4re4_343", nn = "_centerFill_g4re4_352", rn = "_renderArea_g4re4_407", cn = "_renderIframe_g4re4_417", sn = "_renderCode_g4re4_423", on = "_right_g4re4_436", ln = "_chatSide_g4re4_447", dn = "_chatSideHeader_g4re4_453", pn = "_chatSideTitle_g4re4_462", un = "_chatGroupList_g4re4_471", mn = "_chatGroupRow_g4re4_480", hn = "_chatGroupRowActive_g4re4_494", _n = "_chatGroupName_g4re4_498", gn = "_chatGroupTime_g4re4_507", vn = "_chatPane_g4re4_514", Nn = "_chatPaneHeader_g4re4_520", yn = "_chatPaneTitle_g4re4_529", fn = "_chatPaneBody_g4re4_538", wn = "_sideNav_g4re4_549", bn = "_sideNavTitle_g4re4_560", Tn = "_sideNavScroll_g4re4_569", Cn = "_sideNavGroup_g4re4_575", Sn = "_sideNavGroupLabel_g4re4_579", An = "_sideNavItem_g4re4_585", Pn = "_sideNavItemActive_g4re4_604", Rn = "_sideNavIcon_g4re4_610", In = "_sideNavLabel_g4re4_623", Ln = "_groupChips_g4re4_630", kn = "_groupChip_g4re4_630", En = "_groupChipActive_g4re4_654", Gn = "_groupNewHint_g4re4_660", $n = "_groupAddBtn_g4re4_667", Bn = "_cardGroup_g4re4_682", Fn = "_overviewArea_g4re4_692", jn = "_overviewHeader_g4re4_697", qn = "_overviewTitle_g4re4_701", On = "_overviewSubtitle_g4re4_708", Hn = "_overviewTabs_g4re4_714", Dn = "_overviewTab_g4re4_714", Un = "_overviewTabActive_g4re4_737", Mn = "_overviewPanel_g4re4_743", xn = "_reqForm_g4re4_751", zn = "_reqList_g4re4_757", Kn = "_reqRow_g4re4_763", Vn = "_reqTitle_g4re4_772", Jn = "_reqTag_g4re4_781", Wn = "_reqStatusTag_g4re4_787", Qn = "_reqTime_g4re4_800", Yn = "_appForm_g4re4_807", Zn = "_appTypeSelect_g4re4_814", Xn = "_appList_g4re4_825", er = "_appRow_g4re4_831", tr = "_appIcon_g4re4_840", ar = "_appName_g4re4_845", nr = "_appCode_g4re4_855", rr = "_appTag_g4re4_861", ir = "_appGo_g4re4_867", cr = "_appInfraNote_g4re4_882", sr = "_appUnbind_g4re4_888", or = "_statsRow_g4re4_905", lr = "_statItem_g4re4_916", dr = "_domainBlock_g4re4_930", pr = "_domainBlockTitle_g4re4_938", ur = "_domainEmpty_g4re4_945", mr = "_domainList_g4re4_953", hr = "_domainRow_g4re4_959", _r = "_domainName_g4re4_968", gr = "_domainDesc_g4re4_982", vr = "_designHint_g4re4_993", Nr = "_designList_g4re4_1002", yr = "_designRow_g4re4_1008", fr = "_designIcon_g4re4_1017", wr = "_designName_g4re4_1022", br = "_designTime_g4re4_1032", Tr = "_overviewEntryBtn_g4re4_1039", t = {
473
+ container: Ca,
474
+ libraryView: Sa,
475
+ libraryHeader: Aa,
476
+ libraryTitle: Pa,
477
+ librarySubtitle: Ra,
478
+ librarySearch: Ia,
479
+ libraryBody: La,
480
+ productGrid: ka,
481
+ productCard: Ea,
482
+ cardCode: Ga,
483
+ cardName: $a,
484
+ cardDesc: Ba,
485
+ cardFoot: Fa,
486
+ cardEnter: ja,
487
+ cardTag: qa,
488
+ left: Oa,
489
+ leftHeader: Ha,
490
+ leftTitleRow: Da,
491
+ leftTitle: Ua,
492
+ backBtn: Ma,
493
+ sectionBar: xa,
494
+ sectionTab: za,
495
+ sectionTabActive: Ka,
496
+ sectionIcon: Va,
497
+ leftBody: Ja,
498
+ fileList: Wa,
499
+ fileTreeHint: Qa,
500
+ fileRow: Ya,
501
+ fileRowActive: Za,
502
+ fileRowIcon: Xa,
503
+ fileRowName: en,
504
+ fileKindTag: tn,
505
+ center: an,
506
+ centerFill: nn,
507
+ renderArea: rn,
508
+ renderIframe: cn,
509
+ renderCode: sn,
510
+ right: on,
511
+ chatSide: ln,
512
+ chatSideHeader: dn,
513
+ chatSideTitle: pn,
514
+ chatGroupList: un,
515
+ chatGroupRow: mn,
516
+ chatGroupRowActive: hn,
517
+ chatGroupName: _n,
518
+ chatGroupTime: gn,
519
+ chatPane: vn,
520
+ chatPaneHeader: Nn,
521
+ chatPaneTitle: yn,
522
+ chatPaneBody: fn,
523
+ sideNav: wn,
524
+ sideNavTitle: bn,
525
+ sideNavScroll: Tn,
526
+ sideNavGroup: Cn,
527
+ sideNavGroupLabel: Sn,
528
+ sideNavItem: An,
529
+ sideNavItemActive: Pn,
530
+ sideNavIcon: Rn,
531
+ sideNavLabel: In,
532
+ groupChips: Ln,
533
+ groupChip: kn,
534
+ groupChipActive: En,
535
+ groupNewHint: Gn,
536
+ groupAddBtn: $n,
537
+ cardGroup: Bn,
538
+ overviewArea: Fn,
539
+ overviewHeader: jn,
540
+ overviewTitle: qn,
541
+ overviewSubtitle: On,
542
+ overviewTabs: Hn,
543
+ overviewTab: Dn,
544
+ overviewTabActive: Un,
545
+ overviewPanel: Mn,
546
+ reqForm: xn,
547
+ reqList: zn,
548
+ reqRow: Kn,
549
+ reqTitle: Vn,
550
+ reqTag: Jn,
551
+ reqStatusTag: Wn,
552
+ reqTime: Qn,
553
+ appForm: Yn,
554
+ appTypeSelect: Zn,
555
+ appList: Xn,
556
+ appRow: er,
557
+ appIcon: tr,
558
+ appName: ar,
559
+ appCode: nr,
560
+ appTag: rr,
561
+ appGo: ir,
562
+ appInfraNote: cr,
563
+ appUnbind: sr,
564
+ statsRow: or,
565
+ statItem: lr,
566
+ domainBlock: dr,
567
+ domainBlockTitle: pr,
568
+ domainEmpty: ur,
569
+ domainList: mr,
570
+ domainRow: hr,
571
+ domainName: _r,
572
+ domainDesc: gr,
573
+ designHint: vr,
574
+ designList: Nr,
575
+ designRow: yr,
576
+ designIcon: fr,
577
+ designName: wr,
578
+ designTime: br,
579
+ overviewEntryBtn: Tr
580
+ };
581
+ function Cr(n) {
582
+ return {
583
+ id: String(n.id),
584
+ name: n.name,
585
+ description: n.description ?? "",
586
+ workspace_path: n.workspacePath || n.name,
587
+ status: n.status,
588
+ created_at: n.createTime ?? "",
589
+ scenario_id: String(n.id),
590
+ scenario_code: n.scenarioCode,
591
+ scenario_name: n.scenarioName ?? n.name
592
+ };
593
+ }
594
+ function Oe(n) {
595
+ const s = n.toLowerCase();
596
+ return /\.(html?|png|jpe?g|webp|svg|pdf)$/.test(s) ? "design" : /\.(md|markdown|txt|docx?)$/.test(s) ? "doc" : /\.(js|ts|tsx|jsx|java|py|json|yml|yaml|sql|css|vue|go|rs)$/.test(s) ? "code" : "other";
597
+ }
598
+ function He(n, s = "") {
599
+ const i = [];
600
+ for (const o of n ?? []) {
601
+ const v = o.path || `${s}${o.name ?? ""}`, E = o.name || v.split("/").pop() || v, d = o.type === "dir" || Array.isArray(o.children);
602
+ i.push({ path: v, name: E, dir: d, kind: Oe(v), depth: s.split("/").filter(Boolean).length }), d && Array.isArray(o.children) && i.push(...He(o.children, `${v}/`));
603
+ }
604
+ return i;
605
+ }
606
+ function $r() {
607
+ const n = $((e) => e.token), s = $((e) => e.selectProject), [i, o] = p([]), [v, E] = p(!0), [d, D] = p(null), [l, U] = p(null), [b, Y] = p(!1), [B, L] = p([]), [_e, Z] = p(!1), [M, C] = p(null), [x, k] = p(null), [u, _] = p("other"), [h, X] = p(""), [F, N] = p("library"), [G, z] = p([]), [Pe, ge] = p(null), [ee, Re] = p(!1), [De, te] = p("list"), A = vt(null), [ve, Ie] = p([]), [K, Le] = p(null), [ae, Ne] = p([]), [ne, ye] = p([]), [P, j] = p("req"), [V, ke] = p(""), [re, Ue] = p([]), [ie, Me] = p([]), [ce, xe] = p([]), [se, ze] = p([]), [oe, Ke] = p([]), [Ee, Ve] = p([]), fe = g(
608
+ async (e) => {
609
+ D(e), Y(!0), C(null), k(null), te("list"), ge(null), j("req");
610
+ const c = await Ct(e);
611
+ U(c);
612
+ const y = await Rt(e, n);
613
+ z(y);
614
+ const S = await Et(e);
615
+ Ne(S);
616
+ const pe = await $t(e);
617
+ ye(pe);
618
+ const [Se, J, rt, it, ct, st] = await Promise.all([
619
+ Ft(e),
620
+ jt(e),
621
+ qt(e),
622
+ Ot(e),
623
+ Ht(e),
624
+ Dt(e)
625
+ ]);
626
+ Ue(Se), Me(J), xe(rt), ze(it), Ke(ct), Ve(st), Z(!0);
627
+ const ot = await St(e);
628
+ L(ot), Z(!1);
629
+ },
630
+ [n]
631
+ ), Ge = g(async () => {
632
+ E(!0);
633
+ try {
634
+ const e = await Tt();
635
+ o(e);
636
+ const c = await Lt();
637
+ Ie(c);
638
+ try {
639
+ const y = new URLSearchParams(window.location.search).get("product");
640
+ if (y) {
641
+ const S = e.find((pe) => pe.productCode === y);
642
+ if (S) {
643
+ fe(S.productCode);
644
+ return;
645
+ }
646
+ }
647
+ } catch {
648
+ }
649
+ } catch {
650
+ o([]);
651
+ } finally {
652
+ E(!1);
653
+ }
654
+ }, [fe]);
655
+ me(() => {
656
+ Ge();
657
+ }, [Ge]);
658
+ const Je = g(() => {
659
+ if (!d) return;
660
+ const e = new URLSearchParams();
661
+ e.set("product", d), l != null && l.name && e.set("productName", l.name), W.push(`/lc/apps?${e.toString()}`);
662
+ }, [d, l == null ? void 0 : l.name]), We = g(() => {
663
+ if (!d) return;
664
+ const e = new URLSearchParams();
665
+ e.set("product", d), l != null && l.name && e.set("productName", l.name), W.push(`/test/qa/dashboard?${e.toString()}`);
666
+ }, [d, l == null ? void 0 : l.name]), we = g(() => {
667
+ D(null), Y(!1), U(null), L([]), z([]), C(null), k(null), ge(null), te("list"), A.current !== void 0 && $.setState({ currentProject: A.current }), A.current = void 0;
668
+ }, []);
669
+ me(() => {
670
+ new URLSearchParams(window.location.search).get("view") === "architecture" && N("architecture");
671
+ }, []);
672
+ const $e = g(
673
+ (e) => {
674
+ b && we(), N(e);
675
+ const c = new URL(window.location.href);
676
+ c.searchParams.set("view", e), W.replace(`${c.pathname}${c.search}${c.hash}`);
677
+ },
678
+ [b, we]
679
+ ), Qe = g((e) => {
680
+ W.push(e);
681
+ }, []), Be = g(async () => {
682
+ if (!d || !V.trim()) return;
683
+ const e = await Bt(d, {
684
+ title: V.trim(),
685
+ priority: "P2"
686
+ });
687
+ e && (ye((c) => [...c, e]), ke(""));
688
+ }, [d, V]), Ye = ["OPEN", "IN_PROGRESS", "DONE", "CLOSED"], [le] = p(Ye), Ze = g(
689
+ async (e) => {
690
+ if (!d || e.id == null) return;
691
+ const c = String(e.status ?? "OPEN"), y = le.indexOf(c), S = le[(y + 1) % le.length];
692
+ await Kt(d, { id: e.id, status: S }) && ye((Se) => Se.map((J) => J.id === e.id ? { ...J, status: S } : J));
693
+ },
694
+ [d, le]
695
+ ), [R, de] = p({
696
+ appCode: "",
697
+ appName: "",
698
+ appType: "APP"
699
+ }), Xe = g(async () => {
700
+ if (!d || !R.appCode.trim() || !R.appName.trim()) return;
701
+ const e = await Gt(d, R);
702
+ e && (Ne((c) => [...c, e]), de({ appCode: "", appName: "", appType: "APP" }));
703
+ }, [d, R]), et = g(
704
+ async (e) => {
705
+ d && (await unbindProductApp(d, e), Ne((c) => c.filter((y) => y.id !== e)));
706
+ },
707
+ [d]
708
+ ), [q, be] = p({ groupCode: "", name: "" }), tt = g(async () => {
709
+ if (!q.groupCode.trim() || !q.name.trim()) return;
710
+ const e = await kt(q);
711
+ e && (Ie((c) => [...c, e]), be({ groupCode: "", name: "" }));
712
+ }, [q]), at = g(
713
+ async (e) => {
714
+ if (!d) return;
715
+ C(e), k(null);
716
+ const c = Oe(e);
717
+ _(c);
718
+ const y = await At(d, e);
719
+ k(y ?? "");
720
+ },
721
+ [d]
722
+ ), Te = g(
723
+ async (e) => {
724
+ if (!e) return;
725
+ const c = Cr(e);
726
+ A.current = $.getState().currentProject, ge(e.id), te("chat"), s(c);
727
+ },
728
+ [s]
729
+ ), nt = g(async () => {
730
+ if (!(!d || ee)) {
731
+ Re(!0);
732
+ try {
733
+ const e = await It(
734
+ d,
735
+ `${(l == null ? void 0 : l.name) || d} · 讨论组 ${G.length + 1}`,
736
+ n
737
+ );
738
+ z((c) => [...c, e]), await Te(e);
739
+ } finally {
740
+ Re(!1);
741
+ }
742
+ }
743
+ }, [d, ee, G.length, l == null ? void 0 : l.name, n, Te]);
744
+ me(() => () => {
745
+ A.current !== void 0 && $.setState({ currentProject: A.current });
746
+ }, [Pe]);
747
+ const Ce = he(() => He(B), [B]), Fe = he(
748
+ () => i.filter((e) => !(h && !e.name.includes(h) && !e.productCode.includes(h) || K && e.groupCode !== K)),
749
+ [i, h, K]
750
+ ), je = g(
751
+ (e) => {
752
+ if (!e) return null;
753
+ const c = ve.find((y) => y.groupCode === e);
754
+ return c ? c.name : e;
755
+ },
756
+ [ve]
757
+ );
758
+ return /* @__PURE__ */ r("div", { className: t.container, children: [
759
+ /* @__PURE__ */ r("aside", { className: t.sideNav, children: [
760
+ /* @__PURE__ */ a("div", { className: t.sideNavTitle, children: "产品" }),
761
+ /* @__PURE__ */ r("div", { className: t.sideNavScroll, children: [
762
+ /* @__PURE__ */ r("div", { className: t.sideNavGroup, children: [
763
+ /* @__PURE__ */ a("div", { className: t.sideNavGroupLabel, children: "产品域" }),
764
+ /* @__PURE__ */ r(
765
+ "button",
766
+ {
767
+ type: "button",
768
+ className: `${t.sideNavItem} ${!b && F === "library" ? t.sideNavItemActive : ""}`,
769
+ onClick: () => $e("library"),
770
+ children: [
771
+ /* @__PURE__ */ a(pt, { className: t.sideNavIcon }),
772
+ /* @__PURE__ */ a("span", { className: t.sideNavLabel, children: "产品库" })
773
+ ]
774
+ }
775
+ ),
776
+ /* @__PURE__ */ r(
777
+ "button",
778
+ {
779
+ type: "button",
780
+ className: `${t.sideNavItem} ${!b && F === "architecture" ? t.sideNavItemActive : ""}`,
781
+ onClick: () => $e("architecture"),
782
+ title: "租户下所有产品的架构关系(产品↔产品、产品↔中间件)",
783
+ children: [
784
+ /* @__PURE__ */ a(ut, { className: t.sideNavIcon }),
785
+ /* @__PURE__ */ a("span", { className: t.sideNavLabel, children: "架构全景" })
786
+ ]
787
+ }
788
+ )
789
+ ] }),
790
+ /* @__PURE__ */ r("div", { className: t.sideNavGroup, children: [
791
+ /* @__PURE__ */ a("div", { className: t.sideNavGroupLabel, children: "产品工作台" }),
792
+ Nt.map((e) => /* @__PURE__ */ r(
793
+ "button",
794
+ {
795
+ type: "button",
796
+ className: t.sideNavItem,
797
+ onClick: () => Qe(e.key),
798
+ title: e.label,
799
+ children: [
800
+ /* @__PURE__ */ a("span", { className: t.sideNavIcon, children: e.icon }),
801
+ /* @__PURE__ */ a("span", { className: t.sideNavLabel, children: e.label })
802
+ ]
803
+ },
804
+ e.key
805
+ ))
806
+ ] })
807
+ ] })
808
+ ] }),
809
+ b ? /* @__PURE__ */ r(lt, { children: [
810
+ /* @__PURE__ */ r("aside", { className: t.left, children: [
811
+ /* @__PURE__ */ r("div", { className: t.leftHeader, children: [
812
+ /* @__PURE__ */ r("div", { className: t.leftTitleRow, children: [
813
+ /* @__PURE__ */ a("button", { type: "button", className: t.backBtn, onClick: we, title: "返回产品库", children: "←" }),
814
+ /* @__PURE__ */ a("span", { className: t.leftTitle, title: (l == null ? void 0 : l.name) || d || "", children: (l == null ? void 0 : l.name) || d })
815
+ ] }),
816
+ /* @__PURE__ */ r("div", { className: t.sectionBar, children: [
817
+ /* @__PURE__ */ r("span", { className: `${t.sectionTab} ${t.sectionTabActive}`, children: [
818
+ /* @__PURE__ */ a("span", { className: t.sectionIcon, children: "📦" }),
819
+ " 产品"
820
+ ] }),
821
+ /* @__PURE__ */ r("button", { type: "button", className: t.sectionTab, onClick: Je, title: "进入研发工作台(z-lc)", children: [
822
+ /* @__PURE__ */ a("span", { className: t.sectionIcon, children: "💻" }),
823
+ " 研发"
824
+ ] }),
825
+ /* @__PURE__ */ r("button", { type: "button", className: t.sectionTab, onClick: We, title: "进入测试工作台(QA)", children: [
826
+ /* @__PURE__ */ a("span", { className: t.sectionIcon, children: "🧪" }),
827
+ " 测试"
828
+ ] })
829
+ ] })
830
+ ] }),
831
+ /* @__PURE__ */ r("div", { className: t.leftBody, children: [
832
+ /* @__PURE__ */ a(
833
+ "button",
834
+ {
835
+ type: "button",
836
+ className: t.overviewEntryBtn,
837
+ onClick: () => {
838
+ C(null), k(null);
839
+ },
840
+ title: "回到产品总览(沉淀台)",
841
+ children: "📋 产品总览 · 返回沉淀台"
842
+ }
843
+ ),
844
+ /* @__PURE__ */ a("div", { className: t.fileTreeHint, children: "文件(设计稿 · 文档 · 产物)" }),
845
+ _e ? /* @__PURE__ */ a("div", { className: t.centerFill, children: /* @__PURE__ */ a(ue, { size: "small" }) }) : Ce.length === 0 ? /* @__PURE__ */ a(f, { image: f.PRESENTED_IMAGE_SIMPLE, description: "产品下暂无文件" }) : /* @__PURE__ */ a("div", { className: t.fileList, children: Ce.map((e) => /* @__PURE__ */ r(
846
+ "div",
847
+ {
848
+ className: `${t.fileRow} ${M === e.path ? t.fileRowActive : ""}`,
849
+ style: { paddingLeft: 12 + e.depth * 16 },
850
+ onClick: () => !e.dir && at(e.path),
851
+ children: [
852
+ /* @__PURE__ */ a("span", { className: t.fileRowIcon, children: e.dir ? "📁" : e.kind === "design" ? "🖼" : e.kind === "doc" ? "📄" : e.kind === "code" ? "{" : "◦" }),
853
+ /* @__PURE__ */ a("span", { className: t.fileRowName, children: e.name }),
854
+ e.kind === "design" && /* @__PURE__ */ a(I, { className: t.fileKindTag, color: "blue", children: "设计稿" })
855
+ ]
856
+ },
857
+ e.path
858
+ )) })
859
+ ] })
860
+ ] }),
861
+ /* @__PURE__ */ a("main", { className: t.center, children: M == null ? /* @__PURE__ */ r("div", { className: t.overviewArea, children: [
862
+ /* @__PURE__ */ r("div", { className: t.overviewHeader, children: [
863
+ /* @__PURE__ */ a("h2", { className: t.overviewTitle, children: "产品总览" }),
864
+ /* @__PURE__ */ a("p", { className: t.overviewSubtitle, children: "「关于这个产品的一切」沉淀在这里:需求 · 应用群 · 领域资产 · 设计稿 · 聊天蒸馏" })
865
+ ] }),
866
+ /* @__PURE__ */ r("div", { className: t.statsRow, children: [
867
+ /* @__PURE__ */ r("span", { className: t.statItem, children: [
868
+ /* @__PURE__ */ a("b", { children: ne.length }),
869
+ " 需求"
870
+ ] }),
871
+ /* @__PURE__ */ r("span", { className: t.statItem, children: [
872
+ /* @__PURE__ */ a("b", { children: ae.length }),
873
+ " 应用"
874
+ ] }),
875
+ /* @__PURE__ */ r("span", { className: t.statItem, children: [
876
+ /* @__PURE__ */ a("b", { children: re.length }),
877
+ " 术语"
878
+ ] }),
879
+ /* @__PURE__ */ r("span", { className: t.statItem, children: [
880
+ /* @__PURE__ */ a("b", { children: ie.length }),
881
+ " 概念"
882
+ ] }),
883
+ /* @__PURE__ */ r("span", { className: t.statItem, children: [
884
+ /* @__PURE__ */ a("b", { children: ce.length }),
885
+ " 场景"
886
+ ] }),
887
+ /* @__PURE__ */ r("span", { className: t.statItem, children: [
888
+ /* @__PURE__ */ a("b", { children: se.length }),
889
+ " 设计稿"
890
+ ] }),
891
+ /* @__PURE__ */ r("span", { className: t.statItem, children: [
892
+ /* @__PURE__ */ a("b", { children: oe.length }),
893
+ " 会话"
894
+ ] }),
895
+ /* @__PURE__ */ r("span", { className: t.statItem, children: [
896
+ /* @__PURE__ */ a("b", { children: Ce.filter((e) => !e.dir).length }),
897
+ " 文件"
898
+ ] })
899
+ ] }),
900
+ /* @__PURE__ */ r("div", { className: t.overviewTabs, children: [
901
+ /* @__PURE__ */ r(
902
+ "button",
903
+ {
904
+ type: "button",
905
+ className: `${t.overviewTab} ${P === "req" ? t.overviewTabActive : ""}`,
906
+ onClick: () => j("req"),
907
+ children: [
908
+ "需求(",
909
+ ne.length,
910
+ ")"
911
+ ]
912
+ }
913
+ ),
914
+ /* @__PURE__ */ r(
915
+ "button",
916
+ {
917
+ type: "button",
918
+ className: `${t.overviewTab} ${P === "apps" ? t.overviewTabActive : ""}`,
919
+ onClick: () => j("apps"),
920
+ children: [
921
+ "应用群(",
922
+ ae.length,
923
+ ")"
924
+ ]
925
+ }
926
+ ),
927
+ /* @__PURE__ */ r(
928
+ "button",
929
+ {
930
+ type: "button",
931
+ className: `${t.overviewTab} ${P === "domain" ? t.overviewTabActive : ""}`,
932
+ onClick: () => j("domain"),
933
+ children: [
934
+ "领域资产(",
935
+ re.length + ie.length + ce.length,
936
+ ")"
937
+ ]
938
+ }
939
+ ),
940
+ /* @__PURE__ */ r(
941
+ "button",
942
+ {
943
+ type: "button",
944
+ className: `${t.overviewTab} ${P === "design" ? t.overviewTabActive : ""}`,
945
+ onClick: () => j("design"),
946
+ children: [
947
+ "设计稿(",
948
+ se.length,
949
+ ")"
950
+ ]
951
+ }
952
+ ),
953
+ /* @__PURE__ */ r(
954
+ "button",
955
+ {
956
+ type: "button",
957
+ className: `${t.overviewTab} ${P === "chat" ? t.overviewTabActive : ""}`,
958
+ onClick: () => j("chat"),
959
+ children: [
960
+ "聊天蒸馏(",
961
+ oe.length,
962
+ ")"
963
+ ]
964
+ }
965
+ )
966
+ ] }),
967
+ P === "req" ? /* @__PURE__ */ r("div", { className: t.overviewPanel, children: [
968
+ /* @__PURE__ */ r("div", { className: t.reqForm, children: [
969
+ /* @__PURE__ */ a(
970
+ O,
971
+ {
972
+ placeholder: "新增需求标题(针对本产品)",
973
+ value: V,
974
+ onChange: (e) => ke(e.target.value),
975
+ onPressEnter: () => void Be(),
976
+ style: { flex: 1 }
977
+ }
978
+ ),
979
+ /* @__PURE__ */ a(Q, { type: "primary", onClick: () => void Be(), disabled: !V.trim(), children: "添加需求" })
980
+ ] }),
981
+ ne.length === 0 ? /* @__PURE__ */ a(f, { image: f.PRESENTED_IMAGE_SIMPLE, description: "还没有需求,先落一条" }) : /* @__PURE__ */ a("div", { className: t.reqList, children: ne.map((e) => /* @__PURE__ */ r("div", { className: t.reqRow, children: [
982
+ /* @__PURE__ */ a("span", { className: t.reqTitle, title: e.title, children: e.title }),
983
+ /* @__PURE__ */ a(I, { className: t.reqTag, color: e.priority === "P0" ? "red" : e.priority === "P1" ? "orange" : "blue", children: e.priority || "P2" }),
984
+ /* @__PURE__ */ a(
985
+ I,
986
+ {
987
+ className: t.reqStatusTag,
988
+ onClick: () => void Ze(e),
989
+ title: "点击流转状态(OPEN → IN_PROGRESS → DONE → CLOSED)",
990
+ children: e.status || "OPEN"
991
+ }
992
+ ),
993
+ /* @__PURE__ */ a("span", { className: t.reqTime, children: String(e.createdAt ?? "").slice(0, 10) })
994
+ ] }, e.id)) })
995
+ ] }) : P === "apps" ? /* @__PURE__ */ r("div", { className: t.overviewPanel, children: [
996
+ /* @__PURE__ */ r("div", { className: t.appForm, children: [
997
+ /* @__PURE__ */ a(
998
+ O,
999
+ {
1000
+ placeholder: "应用编码(如 z-lc 应用 code)",
1001
+ value: R.appCode,
1002
+ onChange: (e) => de((c) => ({ ...c, appCode: e.target.value })),
1003
+ style: { flex: 1 }
1004
+ }
1005
+ ),
1006
+ /* @__PURE__ */ a(
1007
+ O,
1008
+ {
1009
+ placeholder: "应用名称",
1010
+ value: R.appName,
1011
+ onChange: (e) => de((c) => ({ ...c, appName: e.target.value })),
1012
+ style: { width: 150 }
1013
+ }
1014
+ ),
1015
+ /* @__PURE__ */ r(
1016
+ "select",
1017
+ {
1018
+ className: t.appTypeSelect,
1019
+ value: R.appType,
1020
+ onChange: (e) => de((c) => ({ ...c, appType: e.target.value })),
1021
+ children: [
1022
+ /* @__PURE__ */ a("option", { value: "APP", children: "应用" }),
1023
+ /* @__PURE__ */ a("option", { value: "INFRA", children: "基建" })
1024
+ ]
1025
+ }
1026
+ ),
1027
+ /* @__PURE__ */ a(
1028
+ Q,
1029
+ {
1030
+ type: "primary",
1031
+ onClick: () => void Xe(),
1032
+ disabled: !R.appCode.trim() || !R.appName.trim(),
1033
+ children: "绑定"
1034
+ }
1035
+ )
1036
+ ] }),
1037
+ ae.length === 0 ? /* @__PURE__ */ a(f, { image: f.PRESENTED_IMAGE_SIMPLE, description: "还没有应用群,绑定支撑这个产品的应用/基建" }) : /* @__PURE__ */ a("div", { className: t.appList, children: ae.map((e) => /* @__PURE__ */ r("div", { className: t.appRow, children: [
1038
+ /* @__PURE__ */ a("span", { className: t.appIcon, children: e.appType === "INFRA" ? "🏗" : "🧩" }),
1039
+ /* @__PURE__ */ a("span", { className: t.appName, title: e.appName, children: e.appName }),
1040
+ /* @__PURE__ */ a("span", { className: t.appCode, children: e.appCode }),
1041
+ /* @__PURE__ */ a(
1042
+ I,
1043
+ {
1044
+ className: t.appTag,
1045
+ color: e.appType === "INFRA" ? "purple" : "geekblue",
1046
+ children: e.appType === "INFRA" ? "基建" : "应用"
1047
+ }
1048
+ ),
1049
+ e.appType === "APP" ? /* @__PURE__ */ a(
1050
+ "button",
1051
+ {
1052
+ type: "button",
1053
+ className: t.appGo,
1054
+ onClick: () => {
1055
+ const c = new URLSearchParams();
1056
+ c.set("product", d || ""), l != null && l.name && c.set("productName", l.name), c.set("app", e.appCode), W.push(`/lc/apps?${c.toString()}`);
1057
+ },
1058
+ children: "去研发"
1059
+ }
1060
+ ) : /* @__PURE__ */ a("span", { className: t.appInfraNote, children: "横切多产品" }),
1061
+ /* @__PURE__ */ a(
1062
+ "button",
1063
+ {
1064
+ type: "button",
1065
+ className: t.appUnbind,
1066
+ onClick: () => void et(e.id),
1067
+ title: "解绑",
1068
+ children: "✕"
1069
+ }
1070
+ )
1071
+ ] }, e.id)) })
1072
+ ] }) : P === "domain" ? /* @__PURE__ */ r("div", { className: t.overviewPanel, children: [
1073
+ /* @__PURE__ */ r("div", { className: t.domainBlock, children: [
1074
+ /* @__PURE__ */ a("div", { className: t.domainBlockTitle, children: "📖 统一语言 · 术语" }),
1075
+ re.length === 0 ? /* @__PURE__ */ a("div", { className: t.domainEmpty, children: "还没有术语,先在对话里对齐统一语言" }) : /* @__PURE__ */ a("div", { className: t.domainList, children: re.map((e, c) => /* @__PURE__ */ r("div", { className: t.domainRow, children: [
1076
+ /* @__PURE__ */ a("span", { className: t.domainName, children: String(e.term ?? e.term_code ?? "") }),
1077
+ /* @__PURE__ */ a("span", { className: t.domainDesc, children: String(e.definition ?? "") })
1078
+ ] }, String(e.id ?? c))) })
1079
+ ] }),
1080
+ /* @__PURE__ */ r("div", { className: t.domainBlock, children: [
1081
+ /* @__PURE__ */ a("div", { className: t.domainBlockTitle, children: "🧬 领域概念" }),
1082
+ ie.length === 0 ? /* @__PURE__ */ a("div", { className: t.domainEmpty, children: "还没有概念模型" }) : /* @__PURE__ */ a("div", { className: t.domainList, children: ie.map((e, c) => /* @__PURE__ */ r("div", { className: t.domainRow, children: [
1083
+ /* @__PURE__ */ a("span", { className: t.domainName, children: String(e.name ?? e.code ?? "") }),
1084
+ /* @__PURE__ */ a("span", { className: t.domainDesc, children: String(e.description ?? "") })
1085
+ ] }, String(e.id ?? c))) })
1086
+ ] }),
1087
+ /* @__PURE__ */ r("div", { className: t.domainBlock, children: [
1088
+ /* @__PURE__ */ a("div", { className: t.domainBlockTitle, children: "🎬 用户场景" }),
1089
+ ce.length === 0 ? /* @__PURE__ */ a("div", { className: t.domainEmpty, children: "还没有场景,描述目标用户的典型操作链路" }) : /* @__PURE__ */ a("div", { className: t.domainList, children: ce.map((e, c) => /* @__PURE__ */ r("div", { className: t.domainRow, children: [
1090
+ /* @__PURE__ */ a("span", { className: t.domainName, children: String(e.title ?? e.name ?? "") }),
1091
+ /* @__PURE__ */ a("span", { className: t.domainDesc, children: String(e.description ?? "") })
1092
+ ] }, String(e.id ?? c))) })
1093
+ ] })
1094
+ ] }) : P === "design" ? /* @__PURE__ */ r("div", { className: t.overviewPanel, children: [
1095
+ /* @__PURE__ */ a("div", { className: t.designHint, children: "设计稿在左侧文件树(标注「设计稿」标签);点选后在中间渲染区直渲 raw HTML" }),
1096
+ se.length === 0 ? /* @__PURE__ */ a(f, { image: f.PRESENTED_IMAGE_SIMPLE, description: "还没有设计稿记录" }) : /* @__PURE__ */ a("div", { className: t.designList, children: se.map((e, c) => /* @__PURE__ */ r("div", { className: t.designRow, children: [
1097
+ /* @__PURE__ */ a("span", { className: t.designIcon, children: "🖼" }),
1098
+ /* @__PURE__ */ a("span", { className: t.designName, children: String(e.title ?? e.name ?? "") }),
1099
+ /* @__PURE__ */ a("span", { className: t.designTime, children: String(e.updated_at ?? e.created_at ?? "").slice(0, 10) })
1100
+ ] }, String(e.id ?? c))) })
1101
+ ] }) : /* @__PURE__ */ r("div", { className: t.overviewPanel, children: [
1102
+ /* @__PURE__ */ r("div", { className: t.domainBlock, children: [
1103
+ /* @__PURE__ */ a("div", { className: t.domainBlockTitle, children: "💬 群聊会话" }),
1104
+ oe.length === 0 ? /* @__PURE__ */ a("div", { className: t.domainEmpty, children: "还没有群聊会话,右侧「发起聊天」开始" }) : /* @__PURE__ */ a("div", { className: t.domainList, children: oe.map((e, c) => /* @__PURE__ */ r("div", { className: t.domainRow, children: [
1105
+ /* @__PURE__ */ a("span", { className: t.domainName, children: String(e.title ?? e.session_code ?? "") }),
1106
+ /* @__PURE__ */ a("span", { className: t.domainDesc, children: String(e.updated_at ?? e.created_at ?? "").slice(0, 16).replace("T", " ") })
1107
+ ] }, String(e.id ?? c))) })
1108
+ ] }),
1109
+ /* @__PURE__ */ r("div", { className: t.domainBlock, children: [
1110
+ /* @__PURE__ */ a("div", { className: t.domainBlockTitle, children: "📌 蒸馏提案" }),
1111
+ Ee.length === 0 ? /* @__PURE__ */ a("div", { className: t.domainEmpty, children: "还没有提案(聊天中沉淀的需求/设计提案会出现在这里)" }) : /* @__PURE__ */ a("div", { className: t.domainList, children: Ee.map((e, c) => {
1112
+ let y = {};
1113
+ try {
1114
+ y = JSON.parse(String(e.payload ?? "{}"));
1115
+ } catch {
1116
+ }
1117
+ const S = String(e.proposal_type ?? "requirement");
1118
+ return /* @__PURE__ */ r("div", { className: t.domainRow, children: [
1119
+ /* @__PURE__ */ r("span", { className: t.domainName, children: [
1120
+ /* @__PURE__ */ a(I, { className: t.reqTag, color: S === "design" ? "geekblue" : "blue", children: S }),
1121
+ String(y.title ?? "")
1122
+ ] }),
1123
+ /* @__PURE__ */ a("span", { className: t.domainDesc, children: String(y.description ?? "") })
1124
+ ] }, String(e.id ?? c));
1125
+ }) })
1126
+ ] })
1127
+ ] })
1128
+ ] }) : x == null ? /* @__PURE__ */ a("div", { className: t.centerFill, children: /* @__PURE__ */ a(ue, {}) }) : /* @__PURE__ */ a("div", { className: t.renderArea, children: u === "design" ? (
1129
+ /* 设计稿:raw 通常为 HTML → iframe srcdoc 渲染 */
1130
+ /* @__PURE__ */ a(
1131
+ "iframe",
1132
+ {
1133
+ className: t.renderIframe,
1134
+ srcDoc: x,
1135
+ title: M,
1136
+ sandbox: "allow-scripts allow-same-origin"
1137
+ }
1138
+ )
1139
+ ) : /* @__PURE__ */ a("pre", { className: t.renderCode, children: x || "(空文件)" }) }) }),
1140
+ /* @__PURE__ */ a("aside", { className: t.right, children: De === "list" ? /* @__PURE__ */ r("div", { className: t.chatSide, children: [
1141
+ /* @__PURE__ */ r("div", { className: t.chatSideHeader, children: [
1142
+ /* @__PURE__ */ r("span", { className: t.chatSideTitle, children: [
1143
+ /* @__PURE__ */ a(_t, {}),
1144
+ " 聊天组"
1145
+ ] }),
1146
+ /* @__PURE__ */ r(
1147
+ Q,
1148
+ {
1149
+ size: "small",
1150
+ type: "primary",
1151
+ ghost: !0,
1152
+ loading: ee,
1153
+ onClick: nt,
1154
+ children: [
1155
+ /* @__PURE__ */ a(gt, {}),
1156
+ " 发起聊天"
1157
+ ]
1158
+ }
1159
+ )
1160
+ ] }),
1161
+ /* @__PURE__ */ a("div", { className: t.chatGroupList, children: G.length === 0 ? /* @__PURE__ */ a(f, { image: f.PRESENTED_IMAGE_SIMPLE, description: "还没有聊天组,点「发起聊天」开始" }) : G.map((e) => /* @__PURE__ */ r(
1162
+ "div",
1163
+ {
1164
+ className: `${t.chatGroupRow} ${Pe === e.id ? t.chatGroupRowActive : ""}`,
1165
+ onClick: () => !ee && Te(e),
1166
+ children: [
1167
+ /* @__PURE__ */ a("span", { className: t.chatGroupName, title: e.name, children: e.name }),
1168
+ /* @__PURE__ */ a("span", { className: t.chatGroupTime, children: String(e.createTime ?? "").slice(5, 16).replace("T", " ") })
1169
+ ]
1170
+ },
1171
+ e.id
1172
+ )) })
1173
+ ] }) : /* @__PURE__ */ r("div", { className: t.chatPane, children: [
1174
+ /* @__PURE__ */ r("div", { className: t.chatPaneHeader, children: [
1175
+ /* @__PURE__ */ a(
1176
+ "button",
1177
+ {
1178
+ type: "button",
1179
+ className: t.backBtn,
1180
+ onClick: () => {
1181
+ te("list"), A.current !== void 0 && $.setState({ currentProject: A.current }), A.current = void 0;
1182
+ },
1183
+ title: "返回聊天组列表",
1184
+ children: "←"
1185
+ }
1186
+ ),
1187
+ /* @__PURE__ */ r("span", { className: t.chatPaneTitle, children: [
1188
+ "群聊 · ",
1189
+ (l == null ? void 0 : l.name) || d
1190
+ ] })
1191
+ ] }),
1192
+ /* @__PURE__ */ a("div", { className: t.chatPaneBody, children: /* @__PURE__ */ a(yt, { hideTabs: !0 }) })
1193
+ ] }) })
1194
+ ] }) : F === "architecture" ? (
1195
+ /* ═══ 架构全景:架构语言的表达面 ═══ */
1196
+ /* @__PURE__ */ a(Ta, {})
1197
+ ) : (
1198
+ /* ═══ 产品库视图:全宽产品卡片网格,点卡片直接进入 ═══ */
1199
+ /* @__PURE__ */ r("div", { className: t.libraryView, children: [
1200
+ /* @__PURE__ */ r("div", { className: t.libraryHeader, children: [
1201
+ /* @__PURE__ */ r("div", { children: [
1202
+ /* @__PURE__ */ a("h2", { className: t.libraryTitle, children: "产品库" }),
1203
+ /* @__PURE__ */ a("p", { className: t.librarySubtitle, children: "选择产品进入工作区:文件 · 设计稿 · 群聊 · 应用群" }),
1204
+ /* @__PURE__ */ r("div", { className: t.groupChips, children: [
1205
+ /* @__PURE__ */ a(
1206
+ "button",
1207
+ {
1208
+ type: "button",
1209
+ className: `${t.groupChip} ${K === null ? t.groupChipActive : ""}`,
1210
+ onClick: () => Le(null),
1211
+ children: "全部"
1212
+ }
1213
+ ),
1214
+ ve.map((e) => /* @__PURE__ */ a(
1215
+ "button",
1216
+ {
1217
+ type: "button",
1218
+ className: `${t.groupChip} ${K === e.groupCode ? t.groupChipActive : ""}`,
1219
+ onClick: () => Le(e.groupCode),
1220
+ title: e.description || e.name,
1221
+ children: e.name
1222
+ },
1223
+ e.groupCode
1224
+ )),
1225
+ /* @__PURE__ */ r("span", { className: t.groupNewHint, children: [
1226
+ /* @__PURE__ */ a(
1227
+ O,
1228
+ {
1229
+ size: "small",
1230
+ placeholder: "新群码",
1231
+ value: q.groupCode,
1232
+ onChange: (e) => be((c) => ({ ...c, groupCode: e.target.value })),
1233
+ style: { width: 96 }
1234
+ }
1235
+ ),
1236
+ /* @__PURE__ */ a(
1237
+ O,
1238
+ {
1239
+ size: "small",
1240
+ placeholder: "群名",
1241
+ value: q.name,
1242
+ onChange: (e) => be((c) => ({ ...c, name: e.target.value })),
1243
+ style: { width: 110 }
1244
+ }
1245
+ ),
1246
+ /* @__PURE__ */ a(
1247
+ "button",
1248
+ {
1249
+ type: "button",
1250
+ className: t.groupAddBtn,
1251
+ onClick: () => void tt(),
1252
+ title: "新建产品群",
1253
+ children: "+"
1254
+ }
1255
+ )
1256
+ ] })
1257
+ ] })
1258
+ ] }),
1259
+ /* @__PURE__ */ a(
1260
+ O,
1261
+ {
1262
+ prefix: /* @__PURE__ */ a(mt, {}),
1263
+ placeholder: "搜索产品",
1264
+ value: h,
1265
+ onChange: (e) => X(e.target.value),
1266
+ allowClear: !0,
1267
+ className: t.librarySearch
1268
+ }
1269
+ )
1270
+ ] }),
1271
+ /* @__PURE__ */ a("div", { className: t.libraryBody, children: v ? /* @__PURE__ */ a("div", { className: t.centerFill, children: /* @__PURE__ */ a(ue, {}) }) : Fe.length === 0 ? /* @__PURE__ */ a(f, { image: f.PRESENTED_IMAGE_SIMPLE, description: "暂无产品" }) : /* @__PURE__ */ a("div", { className: t.productGrid, children: Fe.map((e) => /* @__PURE__ */ r(
1272
+ "button",
1273
+ {
1274
+ type: "button",
1275
+ className: t.productCard,
1276
+ onClick: () => void fe(e.productCode),
1277
+ children: [
1278
+ /* @__PURE__ */ a("span", { className: t.cardCode, children: e.productCode }),
1279
+ /* @__PURE__ */ a("span", { className: t.cardName, title: e.name, children: e.name }),
1280
+ /* @__PURE__ */ a("span", { className: t.cardDesc, children: e.description || "暂无产品描述" }),
1281
+ /* @__PURE__ */ r("span", { className: t.cardFoot, children: [
1282
+ /* @__PURE__ */ r("span", { className: t.cardEnter, children: [
1283
+ "进入产品 ",
1284
+ /* @__PURE__ */ a(ht, {})
1285
+ ] }),
1286
+ je(e.groupCode) && /* @__PURE__ */ a("span", { className: t.cardGroup, children: je(e.groupCode) }),
1287
+ e.status && /* @__PURE__ */ a(I, { className: t.cardTag, children: e.status })
1288
+ ] })
1289
+ ]
1290
+ },
1291
+ e.productCode
1292
+ )) }) })
1293
+ ] })
1294
+ )
1295
+ ] });
1296
+ }
1297
+ export {
1298
+ $r as default
1299
+ };