@linxin666/dsh-client-ui-task-board-team 0.0.0-stage → 0.4.14

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 (74) hide show
  1. package/LICENSE +202 -0
  2. package/README.i18n.yaml +6 -0
  3. package/README.md +66 -2
  4. package/README.zh.md +67 -0
  5. package/cordis.patch.yml +14 -0
  6. package/icon.svg +3 -0
  7. package/lib/client.js +1490 -0
  8. package/lib/index.js +2968 -0
  9. package/lib/types/client/PluginSettingsCard.d.ts +255 -0
  10. package/lib/types/client/RangeBubble.d.ts +46 -0
  11. package/lib/types/client/SegmentGroup.d.ts +28 -0
  12. package/lib/types/client/index.d.ts +58 -0
  13. package/lib/types/client/locales.d.ts +90 -0
  14. package/lib/types/client/optional-service.d.ts +22 -0
  15. package/lib/types/client/settings-form.d.ts +235 -0
  16. package/lib/types/client/team/extension.d.ts +29 -0
  17. package/lib/types/client/team/sections.d.ts +38 -0
  18. package/lib/types/client/team/settings.d.ts +67 -0
  19. package/lib/types/client/team/summary.d.ts +34 -0
  20. package/lib/types/core/contract.d.ts +269 -0
  21. package/lib/types/core/hub-protocol.d.ts +175 -0
  22. package/lib/types/core/identity.d.ts +96 -0
  23. package/lib/types/core/mirror.d.ts +51 -0
  24. package/lib/types/core/question-report.d.ts +84 -0
  25. package/lib/types/core/settlement.d.ts +49 -0
  26. package/lib/types/core/task-record.d.ts +59 -0
  27. package/lib/types/core/timers.d.ts +20 -0
  28. package/lib/types/host/bindings.d.ts +92 -0
  29. package/lib/types/host/channel.d.ts +44 -0
  30. package/lib/types/host/credentials.d.ts +63 -0
  31. package/lib/types/host/extension.d.ts +57 -0
  32. package/lib/types/host/hub-client.d.ts +157 -0
  33. package/lib/types/host/questions.d.ts +105 -0
  34. package/lib/types/host/service.d.ts +209 -0
  35. package/lib/types/host/setup.d.ts +152 -0
  36. package/lib/types/host/tools.d.ts +19 -0
  37. package/lib/types/host/waterfall.d.ts +39 -0
  38. package/lib/types/index.d.ts +152 -0
  39. package/locale/en.json +6 -0
  40. package/locale/zh.json +6 -0
  41. package/package.json +84 -3
  42. package/src/client/PluginSettingsCard.tsx +838 -0
  43. package/src/client/RangeBubble.tsx +164 -0
  44. package/src/client/SegmentGroup.tsx +93 -0
  45. package/src/client/css-modules.d.ts +5 -0
  46. package/src/client/index.ts +139 -0
  47. package/src/client/locales.ts +168 -0
  48. package/src/client/optional-service.ts +30 -0
  49. package/src/client/settings-card.module.css +821 -0
  50. package/src/client/settings-form.ts +510 -0
  51. package/src/client/team/extension.ts +185 -0
  52. package/src/client/team/sections.tsx +159 -0
  53. package/src/client/team/settings.tsx +348 -0
  54. package/src/client/team/summary.ts +156 -0
  55. package/src/client/team/team.module.css +193 -0
  56. package/src/core/contract.ts +326 -0
  57. package/src/core/hub-protocol.ts +217 -0
  58. package/src/core/identity.ts +193 -0
  59. package/src/core/mirror.ts +88 -0
  60. package/src/core/question-report.ts +144 -0
  61. package/src/core/settlement.ts +84 -0
  62. package/src/core/task-record.ts +65 -0
  63. package/src/core/timers.ts +34 -0
  64. package/src/host/bindings.ts +211 -0
  65. package/src/host/channel.ts +97 -0
  66. package/src/host/credentials.ts +147 -0
  67. package/src/host/extension.ts +197 -0
  68. package/src/host/hub-client.ts +287 -0
  69. package/src/host/questions.ts +275 -0
  70. package/src/host/service.ts +1421 -0
  71. package/src/host/setup.ts +259 -0
  72. package/src/host/tools.ts +70 -0
  73. package/src/host/waterfall.ts +51 -0
  74. package/src/index.ts +452 -0
package/lib/client.js ADDED
@@ -0,0 +1,1490 @@
1
+ window.__ModuleLoader__.load({
2
+ id: "@linxin666/dsh-client-ui-task-board-team",
3
+ factory: (require) => {
4
+ var module = { exports: {} };
5
+ var exports = module.exports;
6
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
7
+ let react = require("react");
8
+ let react_jsx_runtime = require("react/jsx-runtime");
9
+ //#region src/core/identity.ts
10
+ /** Extension id: also the key of this provider's integration payload. */
11
+ const TEAM_EXTENSION_ID = "task-board-team";
12
+ function text(value) {
13
+ return typeof value === "string" && value.trim() !== "" ? value : void 0;
14
+ }
15
+ function count(value) {
16
+ return typeof value === "number" && Number.isFinite(value) ? value : void 0;
17
+ }
18
+ /**
19
+ * Read one linkage out of an opaque payload.
20
+ * @param payload - the stored payload, or undefined.
21
+ * @returns the linkage, or undefined when the payload carries no issue id.
22
+ */
23
+ function readTeamIssueLink(payload) {
24
+ if (payload === void 0) return void 0;
25
+ const issueId = text(payload.issueId);
26
+ if (issueId === void 0) return void 0;
27
+ const link = { issueId };
28
+ const issueNumber = count(payload.issueNumber);
29
+ if (issueNumber !== void 0) link.issueNumber = issueNumber;
30
+ const attemptId = text(payload.attemptId);
31
+ if (attemptId !== void 0) link.attemptId = attemptId;
32
+ const leaseToken = text(payload.leaseToken);
33
+ if (leaseToken !== void 0) link.leaseToken = leaseToken;
34
+ const leaseExpiresAt = count(payload.leaseExpiresAt);
35
+ if (leaseExpiresAt !== void 0) link.leaseExpiresAt = leaseExpiresAt;
36
+ const agentId = text(payload.agentId);
37
+ if (agentId !== void 0) link.agentId = agentId;
38
+ const agentMemberId = text(payload.agentMemberId);
39
+ if (agentMemberId !== void 0) link.agentMemberId = agentMemberId;
40
+ const preset = text(payload.preset);
41
+ if (preset !== void 0) link.preset = preset;
42
+ const hubStatus = text(payload.hubStatus);
43
+ if (hubStatus !== void 0) link.hubStatus = hubStatus;
44
+ const assignee = text(payload.assignee);
45
+ if (assignee !== void 0) link.assignee = assignee;
46
+ const reviewer = text(payload.reviewer);
47
+ if (reviewer !== void 0) link.reviewer = reviewer;
48
+ const lastError = text(payload.lastError);
49
+ if (lastError !== void 0) link.lastError = lastError;
50
+ const pendingSettle = readPendingSettle(payload.pendingSettle);
51
+ if (pendingSettle !== void 0) link.pendingSettle = pendingSettle;
52
+ return link;
53
+ }
54
+ /**
55
+ * Read one recorded settlement out of an opaque payload.
56
+ * @param value - the stored member, or undefined.
57
+ * @returns the body to retry, or undefined when it carries no usable outcome.
58
+ */
59
+ function readPendingSettle(value) {
60
+ if (typeof value !== "object" || value === null) return void 0;
61
+ const row = value;
62
+ const outcome = row.outcome === "succeeded" || row.outcome === "failed" ? row.outcome : void 0;
63
+ const summary = text(row.summary);
64
+ if (outcome === void 0 || summary === void 0) return void 0;
65
+ const pending = {
66
+ outcome,
67
+ summary
68
+ };
69
+ const error = text(row.error);
70
+ if (error !== void 0) pending.error = error;
71
+ const attemptId = text(row.execution_attempt_id);
72
+ if (attemptId !== void 0) pending.execution_attempt_id = attemptId;
73
+ const evidence = row.verification_evidence;
74
+ if (typeof evidence === "object" && evidence !== null && !Array.isArray(evidence)) pending.verification_evidence = evidence;
75
+ return pending;
76
+ }
77
+ /**
78
+ * Read the linkage off one card.
79
+ * @param task - the card to read.
80
+ * @returns its linkage, or undefined when it does not mirror an issue.
81
+ */
82
+ function readTaskIssueLink(task) {
83
+ return readTeamIssueLink(task.integrations?.[TEAM_EXTENSION_ID]);
84
+ }
85
+ //#endregion
86
+ //#region src/core/contract.ts
87
+ /** Cordis service name the board's host and browser halves each publish. */
88
+ const TASK_BOARD_SERVICE_NAME = "taskBoard";
89
+ /** Child seat a provider registers its task-detail section into. */
90
+ const TASK_BOARD_DETAIL_SECTION = "task-board.detail.section";
91
+ /** Child seat a provider registers its settings section into. */
92
+ const TASK_BOARD_SETTINGS_SECTION = "task-board.settings.section";
93
+ /** Child seat a provider registers its card decoration into. */
94
+ const TASK_BOARD_CARD_DECORATION = "task-board.card.decoration";
95
+ /**
96
+ * Resolve the board's browser-half client face by service name.
97
+ * @param ctx - browser context.
98
+ * @returns the client face, or undefined when the board is not loaded.
99
+ */
100
+ function resolveTaskBoardClientFace(ctx) {
101
+ try {
102
+ const face = ctx.get(TASK_BOARD_SERVICE_NAME);
103
+ return face !== void 0 && typeof face.dispatch === "function" ? face : void 0;
104
+ } catch {
105
+ return;
106
+ }
107
+ }
108
+ //#endregion
109
+ //#region src/client/locales.ts
110
+ /**
111
+ * Copy of the team provider's browser half.
112
+ *
113
+ * The Chinese dictionary is the key source: every other locale tracks exactly
114
+ * these keys (the repository gate enforces parity), and no user-facing string is
115
+ * written inline in a component. The third language is carried centrally by
116
+ * dsh-i18n, which is why this module ships zh and en only.
117
+ *
118
+ * @module dsh-task-board-team/client/locales
119
+ */
120
+ const zh = {
121
+ "section.title": "团队协作",
122
+ "section.description": "把云端 team-hub 指派给本机 dsh-agents 成员的 issue 领成看板镜像卡并在本机执行",
123
+ "section.hub": "Hub 地址",
124
+ "section.team": "团队 ID",
125
+ "section.token": "Host Token",
126
+ "section.token.configured": "已配置(保存在宿主侧,不回显)",
127
+ "section.token.missing": "未配置",
128
+ "section.token.placeholder": "粘贴 Host Token,保存后只在宿主侧使用",
129
+ "section.token.placeholderShort": "粘贴 Token",
130
+ "section.token.save": "保存 Token",
131
+ "section.token.clear": "清除 Token",
132
+ "section.agents": "团队 Agent 绑定",
133
+ "section.agents.empty": "尚未绑定任何 dsh-agents 成员,本机不会领取任何团队任务",
134
+ "section.agents.hint": "填写 dsh-agents 的成员 ID,用逗号分隔",
135
+ "section.questionWait": "本地兜底等待(分钟)",
136
+ "section.questionWait.hint": "0 = 不设本地上限,一直等到 hub 给出终态(回答、过期或撤回)",
137
+ "section.save": "保存设置",
138
+ "section.saved": "已保存",
139
+ "section.refresh": "立即领取",
140
+ "section.connection": "连接状态",
141
+ "section.connection.idle": "未启动",
142
+ "section.connection.connecting": "正在注册",
143
+ "section.connection.online": "在线",
144
+ "section.connection.reconnecting": "正在重连",
145
+ "section.connection.error": "连接失败",
146
+ "section.host": "主机",
147
+ "section.heartbeat": "最近心跳",
148
+ "section.reconnects": "重连次数",
149
+ "section.capabilities": "能力",
150
+ "section.capability.followUp": "后续消息投递",
151
+ "section.capability.rework": "同会话返工",
152
+ "section.capability.run": "自动开始执行",
153
+ "section.capability.available": "可用",
154
+ "section.capability.missing": "不可用",
155
+ "section.capability.followUpMissing": "当前看板版本不提供 followUp,评论里 @ 本机 Agent 时只能记在活动流里",
156
+ "section.capability.reworkMissing": "当前看板版本不提供 rework,收到返工请求时只记录,不会重跑",
157
+ "section.capability.runMissing": "当前看板版本不提供执行入口,领取到的卡片需要人工在看板上开始",
158
+ "section.capability.presetPin": "建卡时钉住预设与模型",
159
+ "section.capability.presetPinMissing": "当前看板版本无法在建卡时钉住 Agent 预设、模型与思考档位,因此领取到的镜像卡没有启动,需要人工处理",
160
+ "section.problems": "配置问题",
161
+ "settings.collapse": "收起设置",
162
+ "settings.expand": "展开设置",
163
+ "settings.notExposed": "当前版本未向设置页暴露本扩展的配置命名空间,配置表单不可用。",
164
+ "settings.readOnly": "当前部署的设置只读。",
165
+ "settings.saveFailed": "部署未接受这次改动。",
166
+ "detail.title": "团队协作",
167
+ "detail.issue": "团队 issue",
168
+ "detail.assignee": "负责人",
169
+ "detail.reviewer": "审阅人",
170
+ "detail.agent": "执行 Agent",
171
+ "detail.status": "Hub 状态",
172
+ "detail.comments": "评论",
173
+ "detail.activity": "活动",
174
+ "detail.pending": "待回答的问题",
175
+ "detail.empty": "暂无",
176
+ "detail.error": "最近错误",
177
+ "status.todo": "待办",
178
+ "status.assigned": "已分配",
179
+ "status.waiting_host": "等待执行节点",
180
+ "status.running": "执行中",
181
+ "status.in_review": "待审阅",
182
+ "status.done": "已完成",
183
+ "status.canceled": "已取消",
184
+ "status.failed": "失败",
185
+ "unavailable": "本扩展的团队配置尚不可用"
186
+ };
187
+ const en = {
188
+ "section.title": "Team collaboration",
189
+ "section.description": "Claims the issues the cloud team-hub assigns to this machine's dsh-agents members and runs them as board mirror cards",
190
+ "section.hub": "Hub URL",
191
+ "section.team": "Team ID",
192
+ "section.token": "Host Token",
193
+ "section.token.configured": "Configured (kept host-side, never echoed)",
194
+ "section.token.missing": "Not configured",
195
+ "section.token.placeholder": "Paste the Host Token; it is used host-side only",
196
+ "section.token.placeholderShort": "Paste token",
197
+ "section.token.save": "Save token",
198
+ "section.token.clear": "Clear token",
199
+ "section.agents": "Team Agent bindings",
200
+ "section.agents.empty": "No dsh-agents member is bound, so this machine claims nothing",
201
+ "section.agents.hint": "dsh-agents member ids, separated by commas",
202
+ "section.questionWait": "Local fallback wait (minutes)",
203
+ "section.questionWait.hint": "0 = no local cap; wait for the hub to settle the question (answered, expired or withdrawn)",
204
+ "section.save": "Save settings",
205
+ "section.saved": "Saved",
206
+ "section.refresh": "Claim now",
207
+ "section.connection": "Connection",
208
+ "section.connection.idle": "Stopped",
209
+ "section.connection.connecting": "Registering",
210
+ "section.connection.online": "Online",
211
+ "section.connection.reconnecting": "Reconnecting",
212
+ "section.connection.error": "Connection failed",
213
+ "section.host": "Host",
214
+ "section.heartbeat": "Last heartbeat",
215
+ "section.reconnects": "Reconnects",
216
+ "section.capabilities": "Capabilities",
217
+ "section.capability.followUp": "Follow-up delivery",
218
+ "section.capability.rework": "Rework in session",
219
+ "section.capability.run": "Start executions",
220
+ "section.capability.available": "Available",
221
+ "section.capability.missing": "Unavailable",
222
+ "section.capability.followUpMissing": "This board revision serves no followUp, so a mention is only recorded on the activity stream",
223
+ "section.capability.reworkMissing": "This board revision serves no rework, so a rework request is recorded and never re-run",
224
+ "section.capability.runMissing": "This board revision serves no execution entry, so a claimed card has to be started on the board",
225
+ "section.capability.presetPin": "Pinning a preset and model on create",
226
+ "section.capability.presetPinMissing": "This board revision cannot pin an agent preset, model or reasoning effort when creating a card, so the mirror card was not started and needs a human",
227
+ "section.problems": "Configuration problems",
228
+ "settings.collapse": "Hide settings",
229
+ "settings.expand": "Show settings",
230
+ "settings.notExposed": "This version does not expose the settings namespace of this extension to the configuration page, so the form is unavailable.",
231
+ "settings.readOnly": "This deployment serves settings read-only.",
232
+ "settings.saveFailed": "The deployment did not accept this change.",
233
+ "detail.title": "Team collaboration",
234
+ "detail.issue": "Team issue",
235
+ "detail.assignee": "Assignee",
236
+ "detail.reviewer": "Reviewer",
237
+ "detail.agent": "Executing agent",
238
+ "detail.status": "Hub status",
239
+ "detail.comments": "Comments",
240
+ "detail.activity": "Activity",
241
+ "detail.pending": "Open questions",
242
+ "detail.empty": "Nothing yet",
243
+ "detail.error": "Last error",
244
+ "status.todo": "Todo",
245
+ "status.assigned": "Assigned",
246
+ "status.waiting_host": "Waiting for the execution node",
247
+ "status.running": "Running",
248
+ "status.in_review": "In review",
249
+ "status.done": "Done",
250
+ "status.canceled": "Canceled",
251
+ "status.failed": "Failed",
252
+ "unavailable": "The team configuration of this extension is not available"
253
+ };
254
+ /** The translate seat the seats use when the client locale service is absent. */
255
+ let translate = (key) => zh[key];
256
+ /**
257
+ * Install the runtime translate seat.
258
+ * @param bound - the locale-bound lookup of this namespace.
259
+ */
260
+ function setRuntimeTranslate(bound) {
261
+ translate = bound;
262
+ }
263
+ /**
264
+ * Translate one key of this namespace.
265
+ * @param key - dictionary key.
266
+ * @returns the localized string.
267
+ */
268
+ function t(key) {
269
+ return translate(key);
270
+ }
271
+ //#endregion
272
+ //#region src/client/team/summary.ts
273
+ /**
274
+ * The published summary this extension's browser half renders.
275
+ *
276
+ * The Host publishes one opaque payload per extension; the board forwards it
277
+ * verbatim in the snapshot and this module is the only place that interprets it.
278
+ * It is a store rather than a hook so the seats (which receive only their owner
279
+ * props) can read one live value and re-render when the board pushes a new one.
280
+ *
281
+ * @module dsh-task-board-team/client/team/summary
282
+ */
283
+ let current = void 0;
284
+ const listeners = /* @__PURE__ */ new Set();
285
+ /**
286
+ * Take the summaries the board snapshot carries.
287
+ * @param extensions - the snapshot's published extension summaries.
288
+ */
289
+ function acceptPublishedSummaries(extensions) {
290
+ const entry = extensions?.["task-board-team"];
291
+ const next = readSummary(entry);
292
+ if (next === void 0 && current === void 0) return;
293
+ current = next;
294
+ for (const listener of [...listeners]) listener();
295
+ }
296
+ /** Drop the published summary: a hidden provider must not look like live state. */
297
+ function clearSummary() {
298
+ if (current === void 0) return;
299
+ current = void 0;
300
+ for (const listener of [...listeners]) listener();
301
+ }
302
+ /**
303
+ * Read the live summary.
304
+ * @returns the summary, or undefined before the Host published one.
305
+ */
306
+ function getSummary() {
307
+ return current;
308
+ }
309
+ function subscribe(listener) {
310
+ listeners.add(listener);
311
+ return () => {
312
+ listeners.delete(listener);
313
+ };
314
+ }
315
+ /**
316
+ * Subscribe one component to the live summary.
317
+ * @returns the current summary and a re-render on every change.
318
+ */
319
+ function useTeamSummary() {
320
+ return (0, react.useSyncExternalStore)(subscribe, getSummary, getSummary);
321
+ }
322
+ /**
323
+ * Validate one published payload into the summary shape.
324
+ *
325
+ * A payload from another revision of this extension is read for the fields it
326
+ * does carry and never trusted for the ones it does not, so a version skew
327
+ * degrades one section instead of throwing inside the board's render.
328
+ * @param raw - the opaque payload the board forwarded.
329
+ * @returns the summary, or undefined when it carries no usable shape.
330
+ */
331
+ function readSummary(raw) {
332
+ if (typeof raw !== "object" || raw === null) return void 0;
333
+ const value = raw;
334
+ if (typeof value.connection !== "object" || value.connection === null) return void 0;
335
+ const connection = value.connection;
336
+ return {
337
+ connection: {
338
+ state: readState(connection.state),
339
+ ...typeof connection.hostId === "string" ? { hostId: connection.hostId } : {},
340
+ ...typeof connection.lastHeartbeatAt === "number" ? { lastHeartbeatAt: connection.lastHeartbeatAt } : {},
341
+ reconnects: typeof connection.reconnects === "number" ? connection.reconnects : 0,
342
+ ...typeof connection.lastError === "string" ? { lastError: connection.lastError } : {}
343
+ },
344
+ capabilities: {
345
+ followUp: value.capabilities?.followUp === true,
346
+ rework: value.capabilities?.rework === true,
347
+ run: value.capabilities?.run === true
348
+ },
349
+ agents: Array.isArray(value.agents) ? value.agents.flatMap((agent) => typeof agent?.memberId === "string" && typeof agent?.name === "string" ? [{
350
+ memberId: agent.memberId,
351
+ name: agent.name,
352
+ ...typeof agent.preset === "string" ? { preset: agent.preset } : {},
353
+ ...typeof agent.hubAgentId === "string" ? { hubAgentId: agent.hubAgentId } : {}
354
+ }] : []) : [],
355
+ problems: Array.isArray(value.problems) ? value.problems.filter((line) => typeof line === "string") : [],
356
+ presetPin: value.presetPin === "supported" || value.presetPin === "missing" ? value.presetPin : "unknown",
357
+ cards: typeof value.cards === "object" && value.cards !== null ? value.cards : {},
358
+ ...readConfigurationField(value.configuration) === void 0 ? {} : { configuration: readConfigurationField(value.configuration) },
359
+ pendingQuestions: Array.isArray(value.pendingQuestions) ? value.pendingQuestions.flatMap((question) => typeof question?.taskId === "string" ? [{
360
+ id: typeof question.id === "string" ? question.id : "",
361
+ taskId: question.taskId,
362
+ issueId: typeof question.issueId === "string" ? question.issueId : "",
363
+ question: typeof question.question === "string" ? question.question : "",
364
+ askedAt: typeof question.askedAt === "number" ? question.askedAt : 0,
365
+ ...typeof question.hubQuestionId === "string" ? { hubQuestionId: question.hubQuestionId } : {}
366
+ }] : []) : []
367
+ };
368
+ }
369
+ /**
370
+ * Read the configuration half of one published payload.
371
+ * @param raw - the opaque member.
372
+ * @returns the fields this build understands, or undefined when there are none.
373
+ */
374
+ function readConfigurationField(raw) {
375
+ if (typeof raw !== "object" || raw === null) return void 0;
376
+ const value = raw;
377
+ const configuration = {
378
+ ...typeof value.hubUrl === "string" ? { hubUrl: value.hubUrl } : {},
379
+ ...typeof value.teamId === "string" ? { teamId: value.teamId } : {},
380
+ ...typeof value.hostname === "string" ? { hostname: value.hostname } : {},
381
+ ...typeof value.tokenConfigured === "boolean" ? { tokenConfigured: value.tokenConfigured } : {},
382
+ ...typeof value.questionWaitMinutes === "number" ? { questionWaitMinutes: value.questionWaitMinutes } : {}
383
+ };
384
+ return Object.keys(configuration).length === 0 ? void 0 : configuration;
385
+ }
386
+ function readState(raw) {
387
+ switch (raw) {
388
+ case "idle":
389
+ case "connecting":
390
+ case "online":
391
+ case "reconnecting":
392
+ case "error": return raw;
393
+ default: return "idle";
394
+ }
395
+ }
396
+ //#endregion
397
+ //#region \0dsh-css:packages/dsh-task-board-team/src/client/team/team.module.css.mjs
398
+ const css$1 = ".hI068G_section{flex-direction:column;gap:10px;font-size:12px;display:flex}.hI068G_title{color:var(--dsw-alias-label-primary);margin:0;font-size:12px;font-weight:600}.hI068G_row{grid-template-columns:max-content minmax(0,1fr);align-items:baseline;gap:8px;display:grid}.hI068G_label{color:var(--dsw-alias-label-secondary)}.hI068G_value{min-width:0;color:var(--dsw-alias-label-primary);text-align:right;overflow-wrap:anywhere}.hI068G_status{white-space:nowrap;color:var(--dsw-alias-label-secondary);flex:none;font-size:12px}.hI068G_badge{border:1px solid var(--dsw-alias-border-secondary);color:var(--dsw-alias-label-secondary);white-space:nowrap;border-radius:999px;align-items:center;gap:4px;padding:0 6px;font-size:11px;line-height:18px;display:inline-flex}.hI068G_badge[data-hub-status=in_review]{border-color:var(--dsw-alias-border-primary);color:var(--dsw-alias-label-primary)}.hI068G_badge[data-hub-status=running]{border-color:var(--dsw-alias-border-primary)}.hI068G_badge[data-hub-status=failed]{border-style:dashed}.hI068G_list{flex-direction:column;gap:6px;margin:0;padding:0;list-style:none;display:flex}.hI068G_entry{border-top:1px solid var(--dsw-alias-border-secondary);flex-direction:column;gap:2px;padding:4px 0;display:flex}.hI068G_meta{color:var(--dsw-alias-label-secondary);font-size:11px}.hI068G_body{color:var(--dsw-alias-label-primary);white-space:pre-wrap;overflow-wrap:anywhere}.hI068G_error{color:var(--dsw-alias-label-secondary);border-left:2px solid var(--dsw-alias-border-primary);overflow-wrap:anywhere;margin:12px 0 0;padding-left:6px;font-size:12px}.hI068G_groupTitle{color:var(--dsw-alias-label-secondary);margin:18px 0 0;font-size:12px;font-weight:600}.hI068G_actions{flex-wrap:wrap;gap:8px;padding:16px 0 4px;display:flex}.hI068G_primaryButton{background:var(--dsw-alias-button-primary-fill,var(--dsw-alias-label-primary));color:var(--dsw-alias-label-primary-foreground,var(--dsw-alias-bg-layer-3));font:inherit;cursor:pointer;border:1px solid #0000;border-radius:8px;padding:4px 14px;font-size:13px;font-weight:500;line-height:18px}.hI068G_primaryButton:hover:not(:disabled){background:var(--dsw-alias-button-primary-hover,var(--dsw-alias-button-primary-fill,var(--dsw-alias-label-primary)))}.hI068G_primaryButton:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:2px}.hI068G_button{border:1px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-primary);font:inherit;cursor:pointer;background:0 0;border-radius:8px;padding:4px 12px;font-size:13px;line-height:18px}.hI068G_button:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.hI068G_button:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:2px}.hI068G_primaryButton:disabled,.hI068G_button:disabled{opacity:.45;cursor:default}.hI068G_saved{color:var(--dsw-alias-label-secondary);margin:8px 0 0;font-size:12px}.hI068G_empty{color:var(--dsw-alias-label-secondary);margin:0;padding-top:12px}";
399
+ const tagId$1 = "@linxin666/dsh-client-ui-task-board-team/packages/dsh-task-board-team/src/client/team/team.module.css";
400
+ if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
401
+ const tag = document.createElement("style");
402
+ tag.dataset.plugin = "@linxin666/dsh-client-ui-task-board-team";
403
+ tag.dataset.pluginCss = tagId$1;
404
+ tag.textContent = css$1;
405
+ document.head.appendChild(tag);
406
+ }
407
+ var team_module_css_default = {
408
+ "actions": "hI068G_actions",
409
+ "badge": "hI068G_badge",
410
+ "body": "hI068G_body",
411
+ "button": "hI068G_button",
412
+ "empty": "hI068G_empty",
413
+ "entry": "hI068G_entry",
414
+ "error": "hI068G_error",
415
+ "groupTitle": "hI068G_groupTitle",
416
+ "label": "hI068G_label",
417
+ "list": "hI068G_list",
418
+ "meta": "hI068G_meta",
419
+ "primaryButton": "hI068G_primaryButton",
420
+ "row": "hI068G_row",
421
+ "saved": "hI068G_saved",
422
+ "section": "hI068G_section",
423
+ "status": "hI068G_status",
424
+ "title": "hI068G_title",
425
+ "value": "hI068G_value"
426
+ };
427
+ //#endregion
428
+ //#region src/client/team/sections.tsx
429
+ /** Hub status the badge renders; the key set is the protocol's own status column. */
430
+ const STATUS_KEYS = {
431
+ todo: "status.todo",
432
+ assigned: "status.assigned",
433
+ waiting_host: "status.waiting_host",
434
+ running: "status.running",
435
+ in_review: "status.in_review",
436
+ done: "status.done",
437
+ canceled: "status.canceled",
438
+ failed: "status.failed"
439
+ };
440
+ /**
441
+ * Translate one hub status.
442
+ * @param status - the collaboration status the hub reported.
443
+ * @returns the localized label, or the raw status for a value this build predates.
444
+ */
445
+ function statusLabel(status) {
446
+ if (status === void 0) return t("detail.empty");
447
+ const key = STATUS_KEYS[status];
448
+ return key === void 0 ? status : t(key);
449
+ }
450
+ /**
451
+ * The hub status badge of one mirrored card.
452
+ * @param props - the card the board renders.
453
+ * @returns the badge, or nothing for a card that mirrors no issue.
454
+ */
455
+ function TeamCardDecoration({ task }) {
456
+ useTeamSummary();
457
+ const link = readTaskIssueLink(task);
458
+ if (link === void 0) return null;
459
+ const status = link.hubStatus;
460
+ if (status === void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
461
+ className: team_module_css_default.badge,
462
+ "data-dsh-plugin": "task-board-team",
463
+ "data-dsh-part": "team-badge",
464
+ children: t("detail.title")
465
+ });
466
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
467
+ className: team_module_css_default.badge,
468
+ "data-dsh-plugin": "task-board-team",
469
+ "data-dsh-part": "team-badge",
470
+ "data-hub-status": status,
471
+ children: statusLabel(status)
472
+ });
473
+ }
474
+ /** One line of the detail block: label and value. */
475
+ function Field({ label, value }) {
476
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
477
+ className: team_module_css_default.row,
478
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
479
+ className: team_module_css_default.label,
480
+ children: label
481
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
482
+ className: team_module_css_default.value,
483
+ children: value
484
+ })]
485
+ });
486
+ }
487
+ /** The comments and activity one card carries, newest last. */
488
+ function Streams({ view }) {
489
+ const comments = view?.comments ?? [];
490
+ const activity = view?.activity ?? [];
491
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
492
+ className: team_module_css_default.title,
493
+ children: t("detail.comments")
494
+ }), comments.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
495
+ className: team_module_css_default.empty,
496
+ children: t("detail.empty")
497
+ }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
498
+ className: team_module_css_default.list,
499
+ "data-dsh-part": "team-comments",
500
+ children: comments.map((comment) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", {
501
+ className: team_module_css_default.entry,
502
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
503
+ className: team_module_css_default.meta,
504
+ children: comment.author
505
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
506
+ className: team_module_css_default.body,
507
+ children: comment.content
508
+ })]
509
+ }, comment.id))
510
+ })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
511
+ className: team_module_css_default.title,
512
+ children: t("detail.activity")
513
+ }), activity.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
514
+ className: team_module_css_default.empty,
515
+ children: t("detail.empty")
516
+ }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
517
+ className: team_module_css_default.list,
518
+ "data-dsh-part": "team-activity",
519
+ children: activity.map((entry) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", {
520
+ className: team_module_css_default.entry,
521
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
522
+ className: team_module_css_default.meta,
523
+ children: entry.type
524
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
525
+ className: team_module_css_default.body,
526
+ children: entry.text
527
+ })]
528
+ }, entry.id))
529
+ })] })] });
530
+ }
531
+ /**
532
+ * The team section of one card's detail view.
533
+ * @param props - the card the board renders, plus the action dispatcher.
534
+ * @returns the section, or nothing for a card that mirrors no issue.
535
+ */
536
+ function TeamDetailSection({ task }) {
537
+ const summary = useTeamSummary();
538
+ const link = readTaskIssueLink(task);
539
+ if (link === void 0) return null;
540
+ const view = summary?.cards[task.id];
541
+ const pending = (summary?.pendingQuestions ?? []).filter((question) => question.taskId === task.id);
542
+ const agent = summary?.agents.find((candidate) => candidate.memberId === link.agentMemberId);
543
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
544
+ className: team_module_css_default.section,
545
+ "data-dsh-plugin": "task-board-team",
546
+ "data-dsh-part": "team-detail",
547
+ style: {},
548
+ children: [
549
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
550
+ className: team_module_css_default.title,
551
+ children: t("detail.title")
552
+ }),
553
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Field, {
554
+ label: t("detail.issue"),
555
+ value: issueLabel(link)
556
+ }),
557
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Field, {
558
+ label: t("detail.status"),
559
+ value: statusLabel(view?.hubStatus ?? link.hubStatus)
560
+ }),
561
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Field, {
562
+ label: t("detail.agent"),
563
+ value: agent?.name ?? link.agentId ?? t("detail.empty")
564
+ }),
565
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Field, {
566
+ label: t("detail.assignee"),
567
+ value: link.assignee ?? t("detail.empty")
568
+ }),
569
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Field, {
570
+ label: t("detail.reviewer"),
571
+ value: link.reviewer ?? t("detail.empty")
572
+ }),
573
+ pending.length === 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
574
+ className: team_module_css_default.title,
575
+ children: t("detail.pending")
576
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
577
+ className: team_module_css_default.list,
578
+ "data-dsh-part": "team-questions",
579
+ children: pending.map((question) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", {
580
+ className: team_module_css_default.entry,
581
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
582
+ className: team_module_css_default.body,
583
+ children: question.question
584
+ })
585
+ }, question.id))
586
+ })] }),
587
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Streams, { view }),
588
+ view?.lastError === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
589
+ className: team_module_css_default.error,
590
+ children: [
591
+ t("detail.error"),
592
+ ": ",
593
+ view.lastError
594
+ ]
595
+ })
596
+ ]
597
+ });
598
+ }
599
+ /**
600
+ * Render the issue identity of one linkage.
601
+ * @param link - the card's linkage back to the hub.
602
+ * @returns the label, e.g. "issue #12".
603
+ */
604
+ function issueLabel(link) {
605
+ return link.issueNumber === void 0 ? link.issueId : "issue #" + String(link.issueNumber);
606
+ }
607
+ //#endregion
608
+ //#region \0dsh-css:packages/dsh-task-board-team/src/client/settings-card.module.css.mjs
609
+ const css = ".OjQ_Cq_card{--settings-card-radius:12px;--settings-card-header-pad:16px;--settings-card-header-gap:13px;--settings-card-title-size:15px;--settings-card-description-size:13px;--settings-card-body-inset:16px;--settings-card-motion:.18s;border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);border-radius:var(--settings-card-radius);list-style:none;transition:border-color .16s,background .16s}.OjQ_Cq_card:hover{border-color:var(--dsw-alias-label-dimmed)}.OjQ_Cq_cardOpen{background:var(--dsw-alias-bg-layer-2);border-color:var(--dsw-alias-label-dimmed)}.OjQ_Cq_cardNested{--settings-card-radius:10px;--settings-card-header-pad:10px 12px;--settings-card-header-gap:10px;--settings-card-title-size:13px;--settings-card-description-size:12px;--settings-card-body-inset:12px}.OjQ_Cq_cardNested .OjQ_Cq_description{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.OjQ_Cq_header{appearance:none;box-sizing:border-box;width:100%;font:inherit;color:inherit;text-align:left;cursor:pointer;border-radius:var(--settings-card-radius);align-items:center;gap:var(--settings-card-header-gap);padding:var(--settings-card-header-pad);background:0 0;border:0;display:flex}.OjQ_Cq_header:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-2px}.OjQ_Cq_headerStatic{box-sizing:border-box;border-radius:var(--settings-card-radius);align-items:center;gap:var(--settings-card-header-gap);width:100%;padding:var(--settings-card-header-pad);display:flex}.OjQ_Cq_headText{flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}.OjQ_Cq_mark{background:var(--dsw-alias-bg-module-platform);width:34px;height:34px;color:var(--dsw-alias-label-secondary);border-radius:10px;flex:none;place-items:center;transition:color .16s;display:grid}.OjQ_Cq_header:hover .OjQ_Cq_mark,.OjQ_Cq_cardOpen .OjQ_Cq_mark{color:var(--dsw-alias-label-primary)}.OjQ_Cq_name{color:var(--dsw-alias-label-primary);font-size:var(--settings-card-title-size);font-weight:600;line-height:1.4}.OjQ_Cq_description{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px}.OjQ_Cq_headerAction{flex:none;align-items:center;display:inline-flex}.OjQ_Cq_chevron{color:var(--dsw-alias-label-tertiary);flex:none;width:16px;height:16px;transition:transform .16s,color .16s}.OjQ_Cq_header:hover .OjQ_Cq_chevron{color:var(--dsw-alias-label-secondary)}.OjQ_Cq_chevronOpen{transform:rotate(180deg)}.OjQ_Cq_disclosure{opacity:0;transition:grid-template-rows var(--settings-card-motion) ease, opacity var(--settings-card-motion) ease;grid-template-rows:0fr;display:grid}.OjQ_Cq_disclosure[data-state=collapsed],.OjQ_Cq_disclosure[data-state=entering],.OjQ_Cq_disclosure[data-state=closing]{overflow:hidden}.OjQ_Cq_disclosure[data-state=entering],.OjQ_Cq_disclosure[data-state=shown]{opacity:1;grid-template-rows:1fr}.OjQ_Cq_disclosure>.OjQ_Cq_body{min-height:0}.OjQ_Cq_body{border-top:1px solid var(--dsw-alias-border-l2);margin:0 var(--settings-card-body-inset);padding-bottom:8px;container:OjQ_Cq_settings-card/inline-size}.OjQ_Cq_readOnly{color:var(--dsw-alias-label-secondary);margin:12px 0 0;font-size:12px;line-height:1.5}.OjQ_Cq_notExposed{color:var(--dsw-alias-state-warn-primary);margin:12px 0 0;font-size:12px;line-height:1.5}.OjQ_Cq_failed{color:var(--dsw-alias-state-error-primary,#b42318);overflow-wrap:anywhere;margin:8px 0 4px;font-size:12px;line-height:18px}.OjQ_Cq_field{grid-template-columns:minmax(0,1fr) fit-content(50%);grid-template-areas:\"OjQ_Cq_head OjQ_Cq_control\"\"OjQ_Cq_hint OjQ_Cq_control\";align-items:center;gap:4px 24px;padding:16px 0;display:grid}.OjQ_Cq_field>.OjQ_Cq_head{grid-area:OjQ_Cq_head}.OjQ_Cq_field>:is(.OjQ_Cq_hint,.OjQ_Cq_invalid){grid-area:OjQ_Cq_hint}.OjQ_Cq_field>:not(.OjQ_Cq_head,.OjQ_Cq_hint,.OjQ_Cq_invalid){grid-area:OjQ_Cq_control;justify-self:end;max-width:100%}.OjQ_Cq_field+.OjQ_Cq_field{border-top:1px solid var(--dsw-alias-border-l2)}.OjQ_Cq_head{align-items:center;gap:8px;display:flex}.OjQ_Cq_label{min-width:0;color:var(--dsw-alias-label-primary);flex:1;font-size:14px;font-weight:400;line-height:22px}.OjQ_Cq_badges{align-items:center;gap:8px;display:inline-flex}.OjQ_Cq_badge{white-space:nowrap;background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-secondary);border-radius:999px;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px}.OjQ_Cq_reset{font:inherit;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;padding:0;font-size:12px;line-height:1.5}.OjQ_Cq_reset:hover:not(:disabled){color:var(--dsw-alias-label-primary)}.OjQ_Cq_reset:disabled{cursor:default}.OjQ_Cq_reset:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:2px}.OjQ_Cq_segmentGroup{background:color-mix(in srgb, var(--dsw-alias-label-primary) 7%, transparent);box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--dsw-alias-label-primary) 5%, transparent);border-radius:8px;flex-wrap:wrap;align-items:center;gap:2px;padding:2px;display:inline-flex;position:relative}.OjQ_Cq_segment{appearance:none;color:var(--dsw-alias-label-secondary);font:inherit;white-space:nowrap;cursor:pointer;background:0 0;border:0;border-radius:7px;margin:0;padding:3px 12px;font-size:13px;font-weight:500;line-height:18px;transition:background-color .12s,color .12s}.OjQ_Cq_segment:hover:not(:disabled):not([data-active]){color:var(--dsw-alias-label-primary)}.OjQ_Cq_segmentGroup:not([data-pill])>.OjQ_Cq_segment[data-active],.OjQ_Cq_segmentGroup[data-pill]:before{background:var(--dsw-alias-bg-overlay,var(--dsw-alias-bg-layer-3));box-shadow:0 1px 2px #14141314}body[data-ds-dark-theme] .OjQ_Cq_segmentGroup:not([data-pill])>.OjQ_Cq_segment[data-active],body[data-ds-dark-theme] .OjQ_Cq_segmentGroup[data-pill]:before{box-shadow:none;background:#ffffff24}.OjQ_Cq_segment[data-active]{color:var(--dsw-alias-label-primary)}.OjQ_Cq_segmentGroup[data-pill]:before{content:\"\";width:var(--segment-pill-w,0px);height:var(--segment-pill-h,0px);transform:translate(var(--segment-pill-x,0px), var(--segment-pill-y,0px));pointer-events:none;border-radius:7px;transition:transform .24s cubic-bezier(.22,.61,.36,1),width .24s cubic-bezier(.22,.61,.36,1),height .24s cubic-bezier(.22,.61,.36,1);position:absolute;top:0;left:0}.OjQ_Cq_segmentGroup>*{z-index:1;position:relative}.OjQ_Cq_segment:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.OjQ_Cq_segment:disabled{cursor:not-allowed;opacity:.45}.OjQ_Cq_segmentGroup[data-pill]:has(>.OjQ_Cq_segment:disabled):before{opacity:.45}.OjQ_Cq_input,.OjQ_Cq_select{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);height:34px;font:inherit;color:var(--dsw-alias-label-primary);border-radius:8px;padding:0 12px;font-size:13px;line-height:1.5}.OjQ_Cq_input:focus-visible,.OjQ_Cq_select:focus-visible{border-color:var(--dsw-alias-brand-primary);outline:none}.OjQ_Cq_input:disabled,.OjQ_Cq_select:disabled{color:var(--dsw-alias-label-tertiary);cursor:default}.OjQ_Cq_inputInvalid{border:1px solid var(--dsw-alias-state-error-primary,#b42318);background:var(--dsw-alias-bg-layer-3);height:34px;font:inherit;color:var(--dsw-alias-label-primary);border-radius:8px;padding:0 12px;font-size:13px;line-height:1.5}.OjQ_Cq_inputInvalid:focus-visible{outline:2px solid var(--dsw-alias-state-error-primary,#b42318);outline-offset:1px;border-color:var(--dsw-alias-state-error-primary,#b42318)}.OjQ_Cq_field>:is(.OjQ_Cq_input,.OjQ_Cq_inputInvalid,.OjQ_Cq_select,.OjQ_Cq_selectWrap,.OjQ_Cq_rangeAnchor){box-sizing:border-box;width:220px}.OjQ_Cq_rangeAnchor>:is(.OjQ_Cq_input,.OjQ_Cq_inputInvalid){box-sizing:border-box;width:100%}@container OjQ_Cq_settings-card (width<=440px){.OjQ_Cq_field{grid-template-columns:minmax(0,1fr);grid-template-areas:\"OjQ_Cq_head\"\"OjQ_Cq_hint\"\"OjQ_Cq_control\";row-gap:8px}.OjQ_Cq_field>:not(.OjQ_Cq_head,.OjQ_Cq_hint,.OjQ_Cq_invalid){justify-self:start}.OjQ_Cq_field>:is(.OjQ_Cq_input,.OjQ_Cq_inputInvalid,.OjQ_Cq_select,.OjQ_Cq_selectWrap,.OjQ_Cq_rangeAnchor){justify-self:stretch;width:auto}}.OjQ_Cq_selectWrap{position:relative}.OjQ_Cq_selectButton{appearance:none;text-align:left;cursor:pointer;justify-content:space-between;align-items:center;gap:8px;width:100%;display:flex}.OjQ_Cq_selectLabel{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.OjQ_Cq_selectChevron{color:var(--dsw-alias-label-tertiary);flex:none;transition:transform .16s}.OjQ_Cq_selectChevronOpen{transform:rotate(180deg)}.OjQ_Cq_selectPopup{z-index:40;border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);max-height:240px;box-shadow:0 8px 24px var(--dsw-alias-bg-mask-2);opacity:0;border-radius:8px;flex-direction:column;padding:4px;transition:opacity .1s,transform .1s;display:flex;position:absolute;top:calc(100% + 4px);left:0;right:0;overflow-y:auto;transform:translateY(-4px)}.OjQ_Cq_selectPopupOpen{opacity:1;transform:none}.OjQ_Cq_selectPopupClose{opacity:0;pointer-events:none;transform:translateY(-4px)}.OjQ_Cq_rangeAnchor{display:inline-flex;position:relative}.OjQ_Cq_rangeBubble{z-index:40;box-sizing:border-box;border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);width:220px;box-shadow:0 8px 24px var(--dsw-alias-bg-mask-2);opacity:0;visibility:hidden;border-radius:10px;padding:10px 12px 6px;transition:opacity .12s,transform .12s,visibility 0s linear .12s;position:absolute;right:0}.OjQ_Cq_rangeBubble[data-side=above]{bottom:calc(100% + 6px);transform:translateY(4px)}.OjQ_Cq_rangeBubble[data-side=below]{top:calc(100% + 6px);transform:translateY(-4px)}.OjQ_Cq_rangeBubble[data-open]{opacity:1;visibility:visible;transition:opacity .12s,transform .12s,visibility;transform:none}.OjQ_Cq_rangeSlider{appearance:none;cursor:pointer;background:0 0;width:100%;height:18px;margin:0;display:block}.OjQ_Cq_rangeSlider::-webkit-slider-runnable-track{background:linear-gradient(to right, var(--dsw-alias-brand-primary) var(--range-fill,0%), color-mix(in srgb, var(--dsw-alias-label-primary) 12%, transparent) var(--range-fill,0%));border-radius:999px;height:4px}.OjQ_Cq_rangeSlider::-moz-range-track{background:color-mix(in srgb, var(--dsw-alias-label-primary) 12%, transparent);border-radius:999px;height:4px}.OjQ_Cq_rangeSlider::-moz-range-progress{background:var(--dsw-alias-brand-primary);border-radius:999px;height:4px}.OjQ_Cq_rangeSlider::-webkit-slider-thumb{appearance:none;background:#fff;border:0;border-radius:50%;width:14px;height:14px;margin-top:-5px;transition:transform .12s;box-shadow:0 0 0 1px #0000001f,0 1px 3px #00000040}.OjQ_Cq_rangeSlider::-moz-range-thumb{background:#fff;border:0;border-radius:50%;width:14px;height:14px;box-shadow:0 0 0 1px #0000001f,0 1px 3px #00000040}.OjQ_Cq_rangeSlider:active::-webkit-slider-thumb{transform:scale(1.15)}.OjQ_Cq_rangeSlider:focus-visible{outline:none}.OjQ_Cq_rangeSlider:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 2px var(--dsw-alias-brand-primary)}.OjQ_Cq_rangeSlider:disabled{cursor:not-allowed}.OjQ_Cq_rangeEnds{color:var(--dsw-alias-label-secondary);font-variant-numeric:tabular-nums;justify-content:space-between;margin-top:2px;font-size:11px;line-height:16px;display:flex}.OjQ_Cq_selectOption{color:var(--dsw-alias-label-primary);cursor:pointer;white-space:nowrap;text-overflow:ellipsis;border-radius:6px;flex-shrink:0;padding:6px 10px;font-size:13px;line-height:1.5;overflow:hidden}.OjQ_Cq_selectOption:hover,.OjQ_Cq_selectOptionActive{background:var(--dsw-alias-interactive-bg-hover)}.OjQ_Cq_selectOptionSelected{color:var(--dsw-alias-brand-primary);background:color-mix(in srgb, var(--dsw-alias-brand-primary) 10%, transparent);font-weight:500}.OjQ_Cq_invalid{color:var(--dsw-alias-state-error-primary,#b42318);margin:0;font-size:12px;line-height:18px}.OjQ_Cq_hint{color:var(--dsw-alias-label-secondary);margin:0;font-size:12px;line-height:18px}.OjQ_Cq_toggle{appearance:none;cursor:pointer;font:inherit;background:0 0;border:0;border-radius:999px;align-items:center;margin:0;padding:0;display:inline-flex}.OjQ_Cq_toggleTrack{background:var(--dsw-alias-label-dimmed);border-radius:999px;flex:none;width:36px;height:20px;transition:background-color .18s;position:relative}.OjQ_Cq_toggleThumb{--toggle-travel:16px;--toggle-overshoot:1px;background:var(--dsw-alias-bg-layer-3);border-radius:50%;width:16px;height:16px;transition:translate .18s;position:absolute;top:2px;left:2px;translate:0;box-shadow:0 1px 2px #1414132e}.OjQ_Cq_toggle[aria-checked=true] .OjQ_Cq_toggleTrack{background:var(--dsw-alias-button-primary-fill,var(--dsw-alias-label-primary))}.OjQ_Cq_toggle[aria-checked=true] .OjQ_Cq_toggleThumb{translate:var(--toggle-travel) 0;background:var(--dsw-alias-label-primary-foreground,var(--dsw-alias-bg-layer-3))}.OjQ_Cq_toggle[data-moved][aria-checked=true] .OjQ_Cq_toggleThumb{animation:.35s cubic-bezier(.34,1.45,.64,1) both OjQ_Cq_toggle-on}.OjQ_Cq_toggle[data-moved][aria-checked=false] .OjQ_Cq_toggleThumb{animation:.35s cubic-bezier(.34,1.45,.64,1) both OjQ_Cq_toggle-off}@keyframes OjQ_Cq_toggle-on{0%{translate:0}55%{translate:calc(var(--toggle-travel) + var(--toggle-overshoot)) 0}80%,to{translate:var(--toggle-travel) 0}}@keyframes OjQ_Cq_toggle-off{0%{translate:var(--toggle-travel) 0}55%{translate:calc(0px - var(--toggle-overshoot)) 0}80%,to{translate:0}}.OjQ_Cq_toggle:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:2px}.OjQ_Cq_toggle:disabled{opacity:.45;cursor:not-allowed}@media (prefers-reduced-motion:reduce){.OjQ_Cq_card,.OjQ_Cq_header,.OjQ_Cq_mark,.OjQ_Cq_chevron,.OjQ_Cq_chevronOpen,.OjQ_Cq_rangeBubble,.OjQ_Cq_selectChevron,.OjQ_Cq_selectChevronOpen,.OjQ_Cq_selectPopup,.OjQ_Cq_toggleTrack,.OjQ_Cq_toggleThumb{transition:none}.OjQ_Cq_toggle[data-moved] .OjQ_Cq_toggleThumb{animation:none}.OjQ_Cq_disclosure{transition-property:opacity}}";
610
+ const tagId = "@linxin666/dsh-client-ui-task-board-team/packages/dsh-task-board-team/src/client/settings-card.module.css";
611
+ if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
612
+ const tag = document.createElement("style");
613
+ tag.dataset.plugin = "@linxin666/dsh-client-ui-task-board-team";
614
+ tag.dataset.pluginCss = tagId;
615
+ tag.textContent = css;
616
+ document.head.appendChild(tag);
617
+ }
618
+ var settings_card_module_css_default = {
619
+ "badge": "OjQ_Cq_badge",
620
+ "badges": "OjQ_Cq_badges",
621
+ "body": "OjQ_Cq_body",
622
+ "card": "OjQ_Cq_card",
623
+ "cardNested": "OjQ_Cq_cardNested",
624
+ "cardOpen": "OjQ_Cq_cardOpen",
625
+ "chevron": "OjQ_Cq_chevron",
626
+ "chevronOpen": "OjQ_Cq_chevronOpen",
627
+ "control": "OjQ_Cq_control",
628
+ "description": "OjQ_Cq_description",
629
+ "disclosure": "OjQ_Cq_disclosure",
630
+ "failed": "OjQ_Cq_failed",
631
+ "field": "OjQ_Cq_field",
632
+ "head": "OjQ_Cq_head",
633
+ "headText": "OjQ_Cq_headText",
634
+ "header": "OjQ_Cq_header",
635
+ "headerAction": "OjQ_Cq_headerAction",
636
+ "headerStatic": "OjQ_Cq_headerStatic",
637
+ "hint": "OjQ_Cq_hint",
638
+ "input": "OjQ_Cq_input",
639
+ "inputInvalid": "OjQ_Cq_inputInvalid",
640
+ "invalid": "OjQ_Cq_invalid",
641
+ "label": "OjQ_Cq_label",
642
+ "mark": "OjQ_Cq_mark",
643
+ "name": "OjQ_Cq_name",
644
+ "notExposed": "OjQ_Cq_notExposed",
645
+ "rangeAnchor": "OjQ_Cq_rangeAnchor",
646
+ "rangeBubble": "OjQ_Cq_rangeBubble",
647
+ "rangeEnds": "OjQ_Cq_rangeEnds",
648
+ "rangeSlider": "OjQ_Cq_rangeSlider",
649
+ "readOnly": "OjQ_Cq_readOnly",
650
+ "reset": "OjQ_Cq_reset",
651
+ "segment": "OjQ_Cq_segment",
652
+ "segmentGroup": "OjQ_Cq_segmentGroup",
653
+ "select": "OjQ_Cq_select",
654
+ "selectButton": "OjQ_Cq_selectButton",
655
+ "selectChevron": "OjQ_Cq_selectChevron",
656
+ "selectChevronOpen": "OjQ_Cq_selectChevronOpen",
657
+ "selectLabel": "OjQ_Cq_selectLabel",
658
+ "selectOption": "OjQ_Cq_selectOption",
659
+ "selectOptionActive": "OjQ_Cq_selectOptionActive",
660
+ "selectOptionSelected": "OjQ_Cq_selectOptionSelected",
661
+ "selectPopup": "OjQ_Cq_selectPopup",
662
+ "selectPopupClose": "OjQ_Cq_selectPopupClose",
663
+ "selectPopupOpen": "OjQ_Cq_selectPopupOpen",
664
+ "selectWrap": "OjQ_Cq_selectWrap",
665
+ "settings-card": "OjQ_Cq_settings-card",
666
+ "toggle": "OjQ_Cq_toggle",
667
+ "toggle-off": "OjQ_Cq_toggle-off",
668
+ "toggle-on": "OjQ_Cq_toggle-on",
669
+ "toggleThumb": "OjQ_Cq_toggleThumb",
670
+ "toggleTrack": "OjQ_Cq_toggleTrack"
671
+ };
672
+ //#endregion
673
+ //#region src/client/RangeBubble.tsx
674
+ /**
675
+ * Coarse adjustment for a bounded number: resting the pointer on the control
676
+ * (or moving focus into it) raises a small bubble holding a slider across the
677
+ * field's whole range, so a large change is one drag instead of many presses
678
+ * or a retyped value. The control itself stays the precise entry.
679
+ *
680
+ * The bubble belongs to the anchor's subtree, so moving from the control onto
681
+ * the bubble never counts as leaving. It opens after a short rest and closes a
682
+ * moment after the pointer and focus have both gone, so crossing the control
683
+ * on the way elsewhere does not flash it. While a drag is in progress the
684
+ * bubble stays put even if the pointer strays off it.
685
+ *
686
+ * Dragging reports each value through `onInput`, so the field shows it live;
687
+ * releasing the thumb, or a key press on it, reports `onCommit` once. The
688
+ * bubble opens on the side of the control that has room inside the nearest
689
+ * scrolling ancestor, so a row near the top of a settings page does not hang
690
+ * its bubble under the page edge.
691
+ */
692
+ //#endregion
693
+ //#region src/client/SegmentGroup.tsx
694
+ /**
695
+ * The family's segmented control: a quiet track whose options share one
696
+ * highlight that slides to the pressed option, instead of each option fading
697
+ * its own background out and the next one in. The settings fields' small
698
+ * choices and the Web Extensions TAB strip both render through it, so the two
699
+ * read as one control.
700
+ *
701
+ * The caller builds the option buttons and marks the pressed one with
702
+ * `data-active`; the group measures that button after every render and writes
703
+ * its box as four custom properties, and the stylesheet draws the highlight
704
+ * there (`.segmentGroup[data-pill]::before`). Attribute and first placement
705
+ * land in the same task, so the highlight appears in place and only later
706
+ * changes slide. A ResizeObserver re-measures when the group or an option
707
+ * changes size: a longer locale, a font arriving, a container growing, a
708
+ * strip wrapping onto a second line.
709
+ */
710
+ //#endregion
711
+ //#region src/client/PluginSettingsCard.tsx
712
+ /**
713
+ * Family-shared chrome for plugin settings cards: a disclosure header naming
714
+ * the plugin and what its settings govern, the controls inside, and the line
715
+ * that reports a refused write. A pick is written the moment it is made and a
716
+ * typed value after a pause, so the card has no save button and nothing waits
717
+ * on the reader. Renders nothing while the namespace is unavailable — a
718
+ * deployment that does not compose the owning plugin should show no trace of
719
+ * it. Inlined into each consumer's client bundle; mirrors the official
720
+ * ui-plugin-config PluginCard in a self-contained slice.
721
+ *
722
+ * Every field inside the body is one settings row: the label and its hint on
723
+ * the left, the control on the right, a hairline between two rows; a narrow
724
+ * card stacks the control under the text (settings-card.module.css).
725
+ */
726
+ /**
727
+ * What a text field inside a card reaches without its plugin wiring it: write
728
+ * the pending draft now (Enter, leaving the field) or put it back (Escape).
729
+ * Picks need neither; they are written the moment they are made.
730
+ */
731
+ const CardApply = (0, react.createContext)(null);
732
+ /** Length of the body's disclosure motion; it matches `--settings-card-motion` on the card root. */
733
+ const BODY_MOTION_MS = 180;
734
+ /**
735
+ * Render one plugin settings card.
736
+ * @param props - the plugin's copy keys, its form state, and its controls.
737
+ * @returns the card, or nothing while the namespace is still loading.
738
+ */
739
+ function PluginSettingsCard(props) {
740
+ const [open, setOpen] = (0, react.useState)(props.defaultOpen ?? true);
741
+ const { state, alwaysOpen } = props;
742
+ const expanded = alwaysOpen === true || open;
743
+ const [bodyPhase, setBodyPhase] = (0, react.useState)(expanded ? "shown" : "hidden");
744
+ const bodyRef = (0, react.useRef)(null);
745
+ (0, react.useLayoutEffect)(() => {
746
+ if (expanded) {
747
+ if (bodyPhase === "hidden") setBodyPhase("collapsed");
748
+ else if (bodyPhase === "collapsed") {
749
+ const node = bodyRef.current;
750
+ if (node !== null) node.offsetHeight;
751
+ setBodyPhase("entering");
752
+ } else if (bodyPhase === "closing") setBodyPhase("entering");
753
+ return;
754
+ }
755
+ if (bodyPhase === "collapsed") setBodyPhase("hidden");
756
+ else if (bodyPhase === "entering" || bodyPhase === "shown") setBodyPhase("closing");
757
+ }, [expanded, bodyPhase]);
758
+ (0, react.useEffect)(() => {
759
+ if (bodyPhase !== "entering" && bodyPhase !== "closing") return;
760
+ const timer = setTimeout(() => {
761
+ setBodyPhase(bodyPhase === "entering" ? "shown" : "hidden");
762
+ }, BODY_MOTION_MS);
763
+ return () => {
764
+ clearTimeout(timer);
765
+ };
766
+ }, [bodyPhase]);
767
+ if (!state.available) return null;
768
+ const title = props.t(props.titleKey);
769
+ const description = props.t(props.descriptionKey);
770
+ const descriptionTitle = props.descriptionTitleKey === void 0 ? description : props.t(props.descriptionTitleKey);
771
+ const baseClass = expanded ? `${settings_card_module_css_default.cardOpen} ${settings_card_module_css_default.card}` : settings_card_module_css_default.card;
772
+ const cardClass = props.density === "nested" ? `${baseClass} ${settings_card_module_css_default.cardNested}` : baseClass;
773
+ /** The body region both legs share; a hidden phase renders nothing at all. */
774
+ const bodyRegion = (content) => bodyPhase === "hidden" ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
775
+ className: settings_card_module_css_default.disclosure,
776
+ "data-state": bodyPhase,
777
+ ref: bodyRef,
778
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
779
+ className: settings_card_module_css_default.body,
780
+ children: content
781
+ })
782
+ });
783
+ const header = alwaysOpen === true ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
784
+ className: settings_card_module_css_default.headerStatic,
785
+ children: [
786
+ props.icon !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
787
+ className: settings_card_module_css_default.mark,
788
+ "aria-hidden": "true",
789
+ children: props.icon
790
+ }) : null,
791
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
792
+ className: settings_card_module_css_default.headText,
793
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
794
+ className: settings_card_module_css_default.name,
795
+ id: props.titleId,
796
+ title,
797
+ children: title
798
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
799
+ className: settings_card_module_css_default.description,
800
+ title: descriptionTitle,
801
+ children: props.descriptionNode ?? description
802
+ })]
803
+ }),
804
+ props.headerAction !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
805
+ className: settings_card_module_css_default.headerAction,
806
+ children: props.headerAction
807
+ }) : null
808
+ ]
809
+ }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
810
+ type: "button",
811
+ className: settings_card_module_css_default.header,
812
+ "aria-expanded": open,
813
+ "aria-label": `${props.t(open ? "settings.collapse" : "settings.expand")}: ${title}`,
814
+ onClick: () => {
815
+ setOpen(!open);
816
+ },
817
+ children: [
818
+ props.icon !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
819
+ className: settings_card_module_css_default.mark,
820
+ "aria-hidden": "true",
821
+ children: props.icon
822
+ }) : null,
823
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
824
+ className: settings_card_module_css_default.headText,
825
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
826
+ className: settings_card_module_css_default.name,
827
+ id: props.titleId,
828
+ title,
829
+ children: title
830
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
831
+ className: settings_card_module_css_default.description,
832
+ title: descriptionTitle,
833
+ children: props.descriptionNode ?? description
834
+ })]
835
+ }),
836
+ props.headerAction !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
837
+ className: settings_card_module_css_default.headerAction,
838
+ children: props.headerAction
839
+ }) : null,
840
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
841
+ width: "14",
842
+ height: "14",
843
+ viewBox: "0 0 14 14",
844
+ fill: "none",
845
+ xmlns: "http://www.w3.org/2000/svg",
846
+ className: open ? `${settings_card_module_css_default.chevron} ${settings_card_module_css_default.chevronOpen}` : settings_card_module_css_default.chevron,
847
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
848
+ d: "M11.8486 5.5L11.4238 5.92383L8.69727 8.65137C8.44157 8.90706 8.21562 9.13382 8.01172 9.29785C7.79912 9.46883 7.55595 9.61756 7.25 9.66602C7.08435 9.69222 6.91565 9.69222 6.75 9.66602C6.44405 9.61756 6.20088 9.46883 5.98828 9.29785C5.78438 9.13382 5.55843 8.90706 5.30273 8.65137L2.57617 5.92383L2.15137 5.5L3 4.65137L3.42383 5.07617L6.15137 7.80273C6.42595 8.07732 6.59876 8.24849 6.74023 8.3623C6.87291 8.46904 6.92272 8.47813 6.9375 8.48047C6.97895 8.48703 7.02105 8.48703 7.0625 8.48047C7.07728 8.47813 7.12709 8.46904 7.25977 8.3623C7.40124 8.24849 7.57405 8.07732 7.84863 7.80273L10.5762 5.07617L11 4.65137L11.8486 5.5Z",
849
+ fill: "currentColor"
850
+ })
851
+ })
852
+ ]
853
+ });
854
+ const notExposedNotice = state.exposed || props.hideNotExposedNotice === true ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
855
+ className: settings_card_module_css_default.notExposed,
856
+ role: "status",
857
+ children: props.t("settings.notExposed")
858
+ });
859
+ if (!state.exposed && props.renderChildrenWhenNotExposed !== true) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", {
860
+ className: cardClass,
861
+ children: [header, bodyRegion(notExposedNotice)]
862
+ });
863
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", {
864
+ className: cardClass,
865
+ children: [header, props.headerOnly !== true ? bodyRegion(/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
866
+ notExposedNotice,
867
+ !state.writable ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
868
+ className: settings_card_module_css_default.readOnly,
869
+ role: "status",
870
+ children: props.t("settings.readOnly")
871
+ }) : null,
872
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CardApply.Provider, {
873
+ value: {
874
+ commit: props.onSave,
875
+ revert: props.onDiscard
876
+ },
877
+ children: props.children
878
+ }),
879
+ props.hideFooter !== true && state.failed ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
880
+ className: settings_card_module_css_default.failed,
881
+ role: "status",
882
+ children: [props.t("settings.saveFailed"), state.failedReason ? " - " + state.failedReason : ""]
883
+ }) : null
884
+ ] })) : null]
885
+ });
886
+ }
887
+ //#endregion
888
+ //#region src/client/team/settings.tsx
889
+ /**
890
+ * The team configuration block inside the board's own settings card.
891
+ *
892
+ * It renders what the Host published (hub URL, team id, hostname, whether a Host
893
+ * Token is configured, the live connection state and which optional board
894
+ * capabilities this deployment really serves) and it writes through the board's
895
+ * same-origin action channel, which is the only channel a provider has. A token
896
+ * value travels exactly once, from this input to the Host, and is never read
897
+ * back: the field always renders empty and the status line says whether one is
898
+ * stored.
899
+ *
900
+ * The block is one nested settings card of the board's topic list, exactly like
901
+ * the sibling provider sections: the family card chrome supplies the border, the
902
+ * header, the body insets and the hairline between rows, so this module owns only
903
+ * the rows themselves. Its rows use the shared field grid (label and hint on the
904
+ * left, the control at the trailing edge) instead of a hand-rolled flex row, so a
905
+ * label is never squeezed into a character-per-line column by the control beside
906
+ * it.
907
+ *
908
+ * The block stays reachable while the extension is switched off, because it is
909
+ * where the switch is turned back on; it only reports that fact instead of
910
+ * pretending the forms still apply.
911
+ *
912
+ * @module dsh-task-board-team/client/team/settings
913
+ */
914
+ /**
915
+ * The card state this block reports: the chrome asks for the family shape, and
916
+ * this block answers every field immediately through its own action channel, so
917
+ * there is never a pending draft or an invalid one.
918
+ * @param failed - whether the last write was refused.
919
+ * @returns the shell the card renders.
920
+ */
921
+ function shellOf(failed) {
922
+ return {
923
+ available: true,
924
+ exposed: true,
925
+ writable: true,
926
+ dirty: false,
927
+ invalid: false,
928
+ saving: false,
929
+ failed
930
+ };
931
+ }
932
+ /**
933
+ * Read the configuration half of one summary.
934
+ * @param summary - the published summary, or undefined.
935
+ * @returns the configuration fields the card renders.
936
+ */
937
+ function readConfiguration(summary) {
938
+ const configuration = summary?.configuration;
939
+ if (configuration === void 0) return {};
940
+ return {
941
+ ...configuration.hubUrl === void 0 ? {} : { hubUrl: configuration.hubUrl },
942
+ ...configuration.teamId === void 0 ? {} : { teamId: configuration.teamId },
943
+ ...configuration.hostname === void 0 ? {} : { hostname: configuration.hostname },
944
+ ...configuration.tokenConfigured === void 0 ? {} : { tokenConfigured: configuration.tokenConfigured },
945
+ ...configuration.questionWaitMinutes === void 0 ? {} : { questionWaitMinutes: configuration.questionWaitMinutes }
946
+ };
947
+ }
948
+ /**
949
+ * Dispatch one action of this extension.
950
+ * @param dispatch - the board's action dispatcher.
951
+ * @param action - provider-owned action name.
952
+ * @param payload - opaque payload.
953
+ * @returns whether the board accepted the action.
954
+ */
955
+ async function send(dispatch, action, payload) {
956
+ try {
957
+ return await dispatch({
958
+ extensionId: TEAM_EXTENSION_ID,
959
+ action,
960
+ ...payload === void 0 ? {} : { payload }
961
+ });
962
+ } catch {
963
+ return false;
964
+ }
965
+ }
966
+ /** A label with its control at the row's trailing edge. */
967
+ function ValueRow({ label, value }) {
968
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
969
+ className: settings_card_module_css_default.field,
970
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
971
+ className: settings_card_module_css_default.head,
972
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
973
+ className: settings_card_module_css_default.label,
974
+ children: label
975
+ })
976
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
977
+ className: team_module_css_default.value,
978
+ children: value
979
+ })]
980
+ });
981
+ }
982
+ /** A label with a text input: the hint sits under the label, the field at the trailing edge. */
983
+ function TextRow(props) {
984
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
985
+ className: settings_card_module_css_default.field,
986
+ children: [
987
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
988
+ className: settings_card_module_css_default.head,
989
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
990
+ className: settings_card_module_css_default.label,
991
+ htmlFor: props.id,
992
+ children: props.label
993
+ })
994
+ }),
995
+ props.hint === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
996
+ className: settings_card_module_css_default.hint,
997
+ children: props.hint
998
+ }),
999
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
1000
+ id: props.id,
1001
+ className: settings_card_module_css_default.input,
1002
+ ...props.placeholder === void 0 ? {} : { placeholder: props.placeholder },
1003
+ ...props.numeric === true ? { inputMode: "numeric" } : {},
1004
+ value: props.value,
1005
+ onChange: (event) => {
1006
+ props.onEdit(event.target.value);
1007
+ }
1008
+ })
1009
+ ]
1010
+ });
1011
+ }
1012
+ /**
1013
+ * One capability line of the settings block: the name, whether this deployment
1014
+ * serves it, and what a reader can do when it does not.
1015
+ */
1016
+ function Capability({ label, available, missing }) {
1017
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1018
+ className: settings_card_module_css_default.field,
1019
+ "data-dsh-part": "team-capability",
1020
+ children: [
1021
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1022
+ className: settings_card_module_css_default.head,
1023
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1024
+ className: settings_card_module_css_default.label,
1025
+ children: label
1026
+ })
1027
+ }),
1028
+ available ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
1029
+ className: settings_card_module_css_default.hint,
1030
+ children: missing
1031
+ }),
1032
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1033
+ className: team_module_css_default.value,
1034
+ children: available ? t("section.capability.available") : t("section.capability.missing")
1035
+ })
1036
+ ]
1037
+ });
1038
+ }
1039
+ /**
1040
+ * The body of the settings card: the configuration form and what the Host
1041
+ * reports about it. It is its own component so the card can own the disclosure
1042
+ * and the write report while this half owns the drafts.
1043
+ * @param props - the board's action dispatcher, plus the write report the card
1044
+ * renders in its footer.
1045
+ * @returns the card body.
1046
+ */
1047
+ function TeamSettingsBody({ dispatch, onSaved }) {
1048
+ const summary = useTeamSummary();
1049
+ const configuration = readConfiguration(summary);
1050
+ const [hubUrl, setHubUrl] = (0, react.useState)(void 0);
1051
+ const [teamId, setTeamId] = (0, react.useState)(void 0);
1052
+ const [members, setMembers] = (0, react.useState)(void 0);
1053
+ const [waitMinutes, setWaitMinutes] = (0, react.useState)(void 0);
1054
+ const [token, setToken] = (0, react.useState)("");
1055
+ const [saved, setSaved] = (0, react.useState)(void 0);
1056
+ const connection = summary?.connection.state ?? "idle";
1057
+ const membersValue = members ?? (summary?.agents ?? []).map((agent) => agent.memberId).join(", ");
1058
+ const stateKey = "section.connection." + connection;
1059
+ const saveSettings = async () => {
1060
+ const bindings = (membersValue ?? "").split(",").map((entry) => entry.trim()).filter((entry) => entry !== "").map((memberId) => ({ memberId }));
1061
+ const ok = await send(dispatch, "setup-save", {
1062
+ ...hubUrl === void 0 ? {} : { hubUrl },
1063
+ ...teamId === void 0 ? {} : { teamId },
1064
+ agents: bindings,
1065
+ questionWaitMinutes: Number.parseInt(waitMinutes ?? String(configuration.questionWaitMinutes ?? 0), 10) || 0
1066
+ });
1067
+ setSaved(ok);
1068
+ onSaved(ok);
1069
+ };
1070
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1071
+ "data-dsh-plugin": "task-board-team",
1072
+ "data-dsh-part": "team-settings",
1073
+ children: [
1074
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ValueRow, {
1075
+ label: t("section.connection"),
1076
+ value: t(stateKey)
1077
+ }),
1078
+ summary?.connection.hostId === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ValueRow, {
1079
+ label: t("section.host"),
1080
+ value: summary.connection.hostId
1081
+ }),
1082
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TextRow, {
1083
+ id: "task-board-team-hub",
1084
+ label: t("section.hub"),
1085
+ placeholder: "https://hub.example.com",
1086
+ value: hubUrl ?? configuration.hubUrl ?? "",
1087
+ onEdit: setHubUrl
1088
+ }),
1089
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TextRow, {
1090
+ id: "task-board-team-team",
1091
+ label: t("section.team"),
1092
+ placeholder: "team_...",
1093
+ value: teamId ?? configuration.teamId ?? "",
1094
+ onEdit: setTeamId
1095
+ }),
1096
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1097
+ className: settings_card_module_css_default.field,
1098
+ children: [
1099
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
1100
+ className: settings_card_module_css_default.head,
1101
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
1102
+ className: settings_card_module_css_default.label,
1103
+ htmlFor: "task-board-team-token",
1104
+ children: t("section.token")
1105
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1106
+ className: team_module_css_default.status,
1107
+ "data-dsh-part": "team-token-state",
1108
+ children: configuration.tokenConfigured === true ? t("section.token.configured") : t("section.token.missing")
1109
+ })]
1110
+ }),
1111
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
1112
+ className: settings_card_module_css_default.hint,
1113
+ children: t("section.token.placeholder")
1114
+ }),
1115
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
1116
+ id: "task-board-team-token",
1117
+ className: settings_card_module_css_default.input,
1118
+ type: "password",
1119
+ autoComplete: "off",
1120
+ spellCheck: false,
1121
+ placeholder: t("section.token.placeholderShort"),
1122
+ value: token,
1123
+ onChange: (event) => {
1124
+ setToken(event.target.value);
1125
+ }
1126
+ })
1127
+ ]
1128
+ }),
1129
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TextRow, {
1130
+ id: "task-board-team-agents",
1131
+ label: t("section.agents"),
1132
+ hint: t("section.agents.hint"),
1133
+ placeholder: "member_...",
1134
+ value: membersValue ?? "",
1135
+ onEdit: setMembers
1136
+ }),
1137
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TextRow, {
1138
+ id: "task-board-team-wait",
1139
+ label: t("section.questionWait"),
1140
+ hint: t("section.questionWait.hint"),
1141
+ numeric: true,
1142
+ value: waitMinutes ?? String(configuration.questionWaitMinutes ?? 0),
1143
+ onEdit: setWaitMinutes
1144
+ }),
1145
+ (summary?.agents ?? []).length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
1146
+ className: team_module_css_default.empty,
1147
+ children: t("section.agents.empty")
1148
+ }) : null,
1149
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1150
+ className: team_module_css_default.actions,
1151
+ children: [
1152
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
1153
+ className: team_module_css_default.primaryButton,
1154
+ type: "button",
1155
+ onClick: () => {
1156
+ saveSettings();
1157
+ },
1158
+ children: t("section.save")
1159
+ }),
1160
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
1161
+ className: team_module_css_default.button,
1162
+ type: "button",
1163
+ disabled: token.trim() === "",
1164
+ onClick: () => {
1165
+ send(dispatch, "set-token", { token }).then((ok) => {
1166
+ setSaved(ok);
1167
+ if (ok) setToken("");
1168
+ });
1169
+ },
1170
+ children: t("section.token.save")
1171
+ }),
1172
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
1173
+ className: team_module_css_default.button,
1174
+ type: "button",
1175
+ onClick: () => {
1176
+ send(dispatch, "clear-token");
1177
+ },
1178
+ children: t("section.token.clear")
1179
+ }),
1180
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
1181
+ className: team_module_css_default.button,
1182
+ type: "button",
1183
+ onClick: () => {
1184
+ send(dispatch, "refresh");
1185
+ },
1186
+ children: t("section.refresh")
1187
+ })
1188
+ ]
1189
+ }),
1190
+ saved === true ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
1191
+ className: team_module_css_default.saved,
1192
+ children: t("section.saved")
1193
+ }) : null,
1194
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
1195
+ className: team_module_css_default.groupTitle,
1196
+ children: t("section.capabilities")
1197
+ }),
1198
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Capability, {
1199
+ label: t("section.capability.followUp"),
1200
+ available: summary?.capabilities.followUp === true,
1201
+ missing: t("section.capability.followUpMissing")
1202
+ }),
1203
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Capability, {
1204
+ label: t("section.capability.rework"),
1205
+ available: summary?.capabilities.rework === true,
1206
+ missing: t("section.capability.reworkMissing")
1207
+ }),
1208
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Capability, {
1209
+ label: t("section.capability.run"),
1210
+ available: summary?.capabilities.run === true,
1211
+ missing: t("section.capability.runMissing")
1212
+ }),
1213
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Capability, {
1214
+ label: t("section.capability.presetPin"),
1215
+ available: summary?.presetPin === "supported",
1216
+ missing: t("section.capability.presetPinMissing")
1217
+ }),
1218
+ (summary?.problems ?? []).length === 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
1219
+ className: team_module_css_default.groupTitle,
1220
+ children: t("section.problems")
1221
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
1222
+ className: team_module_css_default.list,
1223
+ children: (summary?.problems ?? []).map((problem) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", {
1224
+ className: team_module_css_default.entry,
1225
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1226
+ className: team_module_css_default.body,
1227
+ children: problem
1228
+ })
1229
+ }, problem))
1230
+ })] }),
1231
+ summary?.connection.lastError === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
1232
+ className: team_module_css_default.error,
1233
+ children: summary.connection.lastError
1234
+ })
1235
+ ]
1236
+ });
1237
+ }
1238
+ /**
1239
+ * The settings block: one topic of the board's own settings card.
1240
+ *
1241
+ * Closed on arrival like the sibling provider card — the settings page opens as
1242
+ * a topic list, and this topic is one of them. The body is read only by a reader
1243
+ * who opens it, and its rows are written through the board's action channel, so
1244
+ * the card holds no staged draft: save and discard are the no-ops of an
1245
+ * always-committed form, and the footer reports a refused write.
1246
+ * @param props - the board's settings seat props.
1247
+ * @returns the block.
1248
+ */
1249
+ function TeamSettingsSection({ dispatch }) {
1250
+ const [saved, setSaved] = (0, react.useState)(void 0);
1251
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PluginSettingsCard, {
1252
+ t,
1253
+ titleKey: "section.title",
1254
+ descriptionKey: "section.description",
1255
+ density: "nested",
1256
+ defaultOpen: false,
1257
+ state: shellOf(saved === false),
1258
+ onSave: () => {},
1259
+ onDiscard: () => {},
1260
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TeamSettingsBody, {
1261
+ dispatch,
1262
+ onSaved: setSaved
1263
+ })
1264
+ });
1265
+ }
1266
+ //#endregion
1267
+ //#region src/client/optional-service.ts
1268
+ /**
1269
+ * Read one optional service by name, outside the inject contract.
1270
+ *
1271
+ * One external plugin must never take the GUI down: an unsupported read is
1272
+ * reported as "no such service" instead of reaching the shell's boot check.
1273
+ * @param ctx - the browser plugin context.
1274
+ * @param name - the service name to resolve.
1275
+ * @returns the service, or undefined when this deployment serves none.
1276
+ */
1277
+ function optionalService(ctx, name) {
1278
+ try {
1279
+ const get = ctx.get;
1280
+ return get === void 0 ? void 0 : get.call(ctx, name);
1281
+ } catch {
1282
+ return;
1283
+ }
1284
+ }
1285
+ //#endregion
1286
+ //#region src/client/team/extension.ts
1287
+ /** Locale namespace the seats bind to. */
1288
+ const LOCALE_NS = "task-board-team";
1289
+ /**
1290
+ * Register one contribution, then keep it registered across every re-declaration
1291
+ * of the seat it lives in.
1292
+ * @param slots - the slot registry.
1293
+ * @param seat - the seat key.
1294
+ * @param component - the component to render into it.
1295
+ * @param withLocale - whether the seat passes a locale namespace to the component.
1296
+ * @returns disposer releasing the contribution.
1297
+ */
1298
+ function registerSeat(slots, seat, component, withLocale) {
1299
+ const register = () => {
1300
+ try {
1301
+ const dispose = slots.register({
1302
+ name: seat,
1303
+ id: TEAM_EXTENSION_ID,
1304
+ ...withLocale ? { locale: LOCALE_NS } : {}
1305
+ }, component);
1306
+ return () => {
1307
+ try {
1308
+ dispose();
1309
+ } catch {}
1310
+ };
1311
+ } catch (error) {
1312
+ console.error("[dsh-task-board-team] seat registration failed: " + seat, error);
1313
+ return () => {};
1314
+ }
1315
+ };
1316
+ if (typeof slots.inject !== "function") return register();
1317
+ try {
1318
+ return slots.inject(seat, register);
1319
+ } catch (error) {
1320
+ console.error("[dsh-task-board-team] seat could not follow its declaration: " + seat, error);
1321
+ return register();
1322
+ }
1323
+ }
1324
+ /**
1325
+ * Install the team browser half.
1326
+ * @param ctx - client context (slot registry).
1327
+ * @param source - the extension's live enabled switch.
1328
+ * @returns disposer releasing every contribution.
1329
+ */
1330
+ function installTeamClientHalf(ctx, source) {
1331
+ let rendering;
1332
+ let configuration;
1333
+ const slots = optionalService(ctx, "slots");
1334
+ if (slots === void 0) return () => {};
1335
+ const install = () => {
1336
+ if (rendering !== void 0) return;
1337
+ rendering = ctx.inject(["taskBoard"], (scope) => {
1338
+ scope.effect(() => installSeats(scope, slots), "task-board-team: provider seats");
1339
+ });
1340
+ };
1341
+ const release = () => {
1342
+ const current = rendering;
1343
+ rendering = void 0;
1344
+ if (current === void 0) return;
1345
+ current.dispose();
1346
+ clearSummary();
1347
+ };
1348
+ const apply = () => {
1349
+ if (source.read()) install();
1350
+ else release();
1351
+ };
1352
+ configuration = ctx.inject(["taskBoard"], (scope) => {
1353
+ scope.effect(() => registerSeat(slots, TASK_BOARD_SETTINGS_SECTION, TeamSettingsSection, true), "task-board-team: provider settings section");
1354
+ });
1355
+ const unsubscribe = source.subscribe(apply);
1356
+ apply();
1357
+ return () => {
1358
+ unsubscribe();
1359
+ release();
1360
+ const currentConfiguration = configuration;
1361
+ configuration = void 0;
1362
+ if (currentConfiguration !== void 0) currentConfiguration.dispose();
1363
+ };
1364
+ }
1365
+ /**
1366
+ * Register the rendering seats and the mirror subscription for as long as the
1367
+ * board's own master switch is on.
1368
+ * @param ctx - client context.
1369
+ * @param slots - the slot registry.
1370
+ * @returns disposer releasing every contribution.
1371
+ */
1372
+ function installSeats(ctx, slots) {
1373
+ const face = resolveTaskBoardClientFace(ctx);
1374
+ if (face === void 0) {
1375
+ console.error("[dsh-task-board-team] the taskBoard service does not answer the client contract");
1376
+ return () => {};
1377
+ }
1378
+ const seats = [];
1379
+ let registered = false;
1380
+ const ensure = () => {
1381
+ if (registered) return;
1382
+ registered = true;
1383
+ seats.push(registerSeat(slots, TASK_BOARD_DETAIL_SECTION, TeamDetailSection, true));
1384
+ seats.push(registerSeat(slots, TASK_BOARD_CARD_DECORATION, TeamCardDecoration, false));
1385
+ };
1386
+ const release = () => {
1387
+ registered = false;
1388
+ for (const dispose of seats.splice(0)) try {
1389
+ dispose();
1390
+ } catch {}
1391
+ };
1392
+ const unsubscribe = face.subscribe((mirror) => {
1393
+ if (mirror.enabled) ensure();
1394
+ else release();
1395
+ acceptPublishedSummaries(mirror.extensions);
1396
+ });
1397
+ const current = face.snapshot();
1398
+ if (current.enabled) ensure();
1399
+ acceptPublishedSummaries(current.extensions);
1400
+ return () => {
1401
+ unsubscribe();
1402
+ release();
1403
+ };
1404
+ }
1405
+ //#endregion
1406
+ //#region src/client/index.ts
1407
+ /** Locale namespace this half owns. */
1408
+ const NS = "task-board-team";
1409
+ /** Settings namespace the block edits. */
1410
+ const SETTINGS_NAMESPACE = "task-board-team";
1411
+ /** Profile entry ids this package's patch rows carry, most specific first. */
1412
+ const ENTRY_IDS = [
1413
+ "web-ui-task-board-team",
1414
+ "ui-task-board-team",
1415
+ SETTINGS_NAMESPACE
1416
+ ];
1417
+ /**
1418
+ * A form for a page that serves this namespace to nobody: it never answers, so
1419
+ * the seats follow the documented default (enabled) instead of failing.
1420
+ * @returns an inert configuration form.
1421
+ */
1422
+ function unavailableForm() {
1423
+ const snapshot = {
1424
+ status: "unavailable",
1425
+ value: void 0,
1426
+ base: void 0,
1427
+ user: void 0,
1428
+ revision: void 0,
1429
+ writable: false
1430
+ };
1431
+ return {
1432
+ getSnapshot: () => snapshot,
1433
+ subscribe: () => () => {},
1434
+ set: async () => false,
1435
+ unset: async () => false,
1436
+ mutate: async () => false
1437
+ };
1438
+ }
1439
+ /**
1440
+ * Bind the settings form this extension's switch is read from.
1441
+ * @param ctx - the browser plugin context.
1442
+ * @returns the form, or an inert one when the page serves no such namespace.
1443
+ */
1444
+ function bindSettingsForm(ctx) {
1445
+ if (optionalService(ctx, "configForms") === void 0) return unavailableForm();
1446
+ const binder = optionalService(ctx, "webUiSettings");
1447
+ if (binder !== void 0 && typeof binder.bind === "function") try {
1448
+ return binder.bind({ namespace: SETTINGS_NAMESPACE });
1449
+ } catch {
1450
+ return unavailableForm();
1451
+ }
1452
+ return unavailableForm();
1453
+ }
1454
+ /**
1455
+ * Mount the extension's browser half.
1456
+ * @param ctx - the browser plugin context.
1457
+ */
1458
+ function apply(ctx) {
1459
+ const locale = optionalService(ctx, "locale");
1460
+ ctx.effect(() => {
1461
+ if (locale === void 0) return () => {};
1462
+ try {
1463
+ return locale.register(NS, {
1464
+ zh,
1465
+ en
1466
+ });
1467
+ } catch {
1468
+ return () => {};
1469
+ }
1470
+ }, "task-board-team: dictionaries");
1471
+ if (locale !== void 0) try {
1472
+ setRuntimeTranslate(locale.bind(NS));
1473
+ } catch {}
1474
+ const scope = bindSettingsForm(ctx);
1475
+ const enabledSource = {
1476
+ read: () => scope.getSnapshot().value?.enabled !== false,
1477
+ subscribe: (listener) => scope.subscribe(listener)
1478
+ };
1479
+ ctx.effect(() => installTeamClientHalf(ctx, enabledSource), "task-board-team: provider seats");
1480
+ }
1481
+ //#endregion
1482
+ exports.ENTRY_IDS = ENTRY_IDS;
1483
+ exports.NS = NS;
1484
+ exports.SETTINGS_NAMESPACE = SETTINGS_NAMESPACE;
1485
+ exports.apply = apply;
1486
+ return module.exports;
1487
+ }
1488
+ });
1489
+
1490
+ //# sourceMappingURL=client.js.map