@nivaro/react 0.3.137 → 0.3.139

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 (50) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +1 -1
  3. package/dist/index.d.ts +95 -4
  4. package/dist/index.js +748 -743
  5. package/dist/shared/components/CollectionBrowserView.js +392 -389
  6. package/dist/shared/components/DelegateCoverLine.js +80 -87
  7. package/dist/shared/components/ItemEditForm.js +589 -588
  8. package/dist/shared/components/MyWorkView.js +284 -286
  9. package/dist/shared/components/NotificationBell.js +251 -205
  10. package/dist/shared/components/ai/AiAnalyticsView.js +878 -417
  11. package/dist/shared/components/ai/AiPlanCard.js +164 -122
  12. package/dist/shared/components/ai/AiPlanUndo.js +291 -0
  13. package/dist/shared/components/ai/call-log/CallDrawer.js +357 -0
  14. package/dist/shared/components/ai/call-log/RawJson.js +126 -0
  15. package/dist/shared/components/ai/call-log/ThreadView.js +223 -0
  16. package/dist/shared/components/ai/call-log/TranscriptView.js +227 -0
  17. package/dist/shared/components/ai/call-log/controls.js +364 -0
  18. package/dist/shared/components/ai/call-log/format.js +46 -0
  19. package/dist/shared/components/ai/call-log/url.js +105 -0
  20. package/dist/shared/components/chat/chat-core.js +422 -346
  21. package/dist/shared/components/integrations/IntegrationObligationsView.js +98 -98
  22. package/dist/shared/components/integrations/RecordIntegrationPreview.js +102 -93
  23. package/dist/shared/components/integrations/console/api.js +11 -1
  24. package/dist/shared/components/item-edit/HeaderRollupExplainer.js +5 -1
  25. package/dist/shared/components/item-edit/RecordLiveSync.js +241 -229
  26. package/dist/shared/components/item-edit/RecordRecapChanges.js +166 -0
  27. package/dist/shared/components/item-edit/RecordRecapStrip.js +254 -84
  28. package/dist/shared/components/item-edit/live-related.js +34 -18
  29. package/dist/shared/components/panels/RevisionsPanel.js +735 -683
  30. package/dist/shared/components/queue/QueueWorklist.js +323 -316
  31. package/dist/shared/components/support/SupportRequestDialog.js +198 -181
  32. package/dist/shared/components/trackers/use-tracker-link.js +74 -65
  33. package/dist/shared/lib/activity-sentence.js +167 -151
  34. package/dist/shared/lib/config-update-refresh.js +34 -0
  35. package/dist/shared/lib/config-watch.js +17 -17
  36. package/dist/shared/lib/gap-refresh.js +49 -0
  37. package/dist/shared/lib/integration-dots.js +8 -8
  38. package/dist/shared/lib/live-ops.js +26 -23
  39. package/dist/shared/lib/live-pickers.js +1 -1
  40. package/dist/shared/lib/live-queries.js +223 -195
  41. package/dist/shared/lib/live.js +56 -51
  42. package/dist/shared/lib/obligation-banner.js +11 -10
  43. package/dist/shared/lib/obligation-filters.js +22 -18
  44. package/dist/shared/lib/obligation-reason-text.js +18 -8
  45. package/dist/shared/lib/presence-hooks.js +133 -132
  46. package/dist/shared/lib/reconnect-resync.js +90 -0
  47. package/dist/shared/lib/record-room-holds.js +43 -0
  48. package/dist/shared/lib/socket-realtime.js +116 -105
  49. package/dist/shared/lib/user-sync.js +1 -6
  50. package/package.json +1 -1
@@ -1,65 +1,66 @@
1
- import { jsx as e, jsxs as n } from "react/jsx-runtime";
2
- import { useQueryClient as Se, useQuery as Ce, useMutation as H } from "@tanstack/react-query";
3
- import { Check as $e, Bot as Te } from "lucide-react";
4
- import { useState as O, useMemo as J, useRef as W, useEffect as V } from "react";
5
- import { useApiFetchConfig as je, useItemNavigation as Oe, useNavigation as Ie } from "../context.js";
6
- import { useDeadlineNow as Le, liveSlaReading as Me } from "../lib/deadline-ticker.js";
7
- import { useLiveEvent as Ae } from "../lib/live.js";
8
- import { useLiveOps as De, useFreshIds as qe } from "../lib/live-ops.js";
9
- import { useSettledRows as Fe } from "../lib/live-screen.js";
10
- import { resolveNotificationTarget as ue, runNotificationTarget as We } from "../lib/notification-target.js";
11
- import { usePrefetchIntent as Ee } from "../lib/prefetch.js";
12
- import { useOptionalRealtime as Ue, updateItemIds as Ke } from "../lib/realtime.js";
13
- import { usePeekOrOpen as Pe, peekable as pe } from "../lib/record-peek.js";
14
- import { userErrorMessage as Qe } from "../lib/safe-error.js";
15
- import { withinDay as Be, slaChip as Re } from "../lib/sla-chip.js";
16
- import { cn as I, formatRelative as ze } from "../lib/utils.js";
17
- import { AgentQuestionsCard as He } from "./AgentQuestionsCard.js";
18
- import { FirstWeekCard as Je } from "./ai/FirstWeekCard.js";
19
- import { TaskDoButton as Ve } from "./ai/TaskDo.js";
20
- import { openChatRoom as Ye, canOpenChatRoom as Ze } from "./chat/chat-core.js";
21
- import { useMyRecordRooms as Ge } from "./chat/chat-hooks.js";
22
- import { useCoveringQuery as Xe, DelegateCoverLine as et } from "./DelegateCoverLine.js";
23
- import { LearningPathCard as tt } from "./help-videos/viewer/LearningPathCard.js";
24
- import { RequiredVideosCard as rt } from "./help-videos/viewer/RequiredVideosCard.js";
25
- import { SkeletonBar as at, ListSkeleton as nt } from "./Skeletons.js";
1
+ import { jsx as e, jsxs as s } from "react/jsx-runtime";
2
+ import { useQueryClient as _e, useQuery as Se, useMutation as R } from "@tanstack/react-query";
3
+ import { Check as Ce, Bot as $e } from "lucide-react";
4
+ import { useState as O, useMemo as z, useRef as ie, useEffect as le } from "react";
5
+ import { useApiFetchConfig as Te, useItemNavigation as je, useNavigation as Oe } from "../context.js";
6
+ import { useDeadlineNow as Ie, liveSlaReading as Me } from "../lib/deadline-ticker.js";
7
+ import { useGapRefresh as Ae } from "../lib/gap-refresh.js";
8
+ import { useLiveEvent as ce } from "../lib/live.js";
9
+ import { useLiveOps as Le, useFreshIds as qe } from "../lib/live-ops.js";
10
+ import { useSettledRows as De } from "../lib/live-screen.js";
11
+ import { resolveNotificationTarget as me, runNotificationTarget as Fe } from "../lib/notification-target.js";
12
+ import { usePrefetchIntent as We } from "../lib/prefetch.js";
13
+ import { useOptionalRealtime as Ee, updateItemIds as Ue } from "../lib/realtime.js";
14
+ import { usePeekOrOpen as Ke, peekable as ue } from "../lib/record-peek.js";
15
+ import { userErrorMessage as Pe } from "../lib/safe-error.js";
16
+ import { withinDay as Qe, slaChip as Be } from "../lib/sla-chip.js";
17
+ import { cn as I, formatRelative as Re } from "../lib/utils.js";
18
+ import { AgentQuestionsCard as ze } from "./AgentQuestionsCard.js";
19
+ import { FirstWeekCard as He } from "./ai/FirstWeekCard.js";
20
+ import { TaskDoButton as Je } from "./ai/TaskDo.js";
21
+ import { openChatRoom as Ve, canOpenChatRoom as Ye } from "./chat/chat-core.js";
22
+ import { useMyRecordRooms as Ze } from "./chat/chat-hooks.js";
23
+ import { useCoveringQuery as Ge, DelegateCoverLine as Xe } from "./DelegateCoverLine.js";
24
+ import { LearningPathCard as et } from "./help-videos/viewer/LearningPathCard.js";
25
+ import { RequiredVideosCard as tt } from "./help-videos/viewer/RequiredVideosCard.js";
26
+ import { SkeletonBar as rt, ListSkeleton as at } from "./Skeletons.js";
26
27
  import { TickerNumber as st } from "./TickerNumber.js";
27
- import { UserAvatar as dt } from "./UserAvatar.js";
28
- const ot = 8e3, he = ["records", "proposals", "tasks", "team", "waiting", "notifications"], be = /* @__PURE__ */ new Set(["records", "proposals"]), xe = {
28
+ import { UserAvatar as nt } from "./UserAvatar.js";
29
+ const dt = 8e3, pe = ["records", "proposals", "tasks", "team", "waiting", "notifications"], he = /* @__PURE__ */ new Set(["records", "proposals"]), be = {
29
30
  records: "Waiting on you",
30
31
  proposals: "Changes to review",
31
32
  tasks: "My tasks",
32
33
  team: "Team tasks",
33
34
  waiting: "Waiting on others",
34
35
  notifications: "Notifications"
35
- }, it = () => (/* @__PURE__ */ new Date()).toISOString().slice(0, 10), E = (d) => !!d && String(d).slice(0, 10) < it(), lt = {
36
+ }, ot = () => (/* @__PURE__ */ new Date()).toISOString().slice(0, 10), F = (d) => !!d && String(d).slice(0, 10) < ot(), it = {
36
37
  alert: "bg-red-500/10 text-red-600 dark:text-red-400",
37
38
  warn: "bg-amber-400/15 text-amber-700 dark:text-amber-400",
38
39
  neutral: "bg-slate-500/10 text-slate-600 dark:text-slate-400",
39
40
  ok: "bg-emerald-500/10 text-emerald-700 dark:text-emerald-400"
40
41
  };
41
- function Y(d, u) {
42
+ function H(d, u) {
42
43
  return d != null && d.due_at ? Me(d, u) : d;
43
44
  }
44
- function ct(d, u) {
45
- const l = Ke(d);
45
+ function lt(d, u) {
46
+ const l = Ue(d);
46
47
  return l == null ? !0 : l.some((g) => String(g) === "*" || u.has(`${d.collection}:${g}`));
47
48
  }
48
- function Z(d) {
49
- return !d || d.status === "breached" ? !1 : d.status === "warning" || Be(d);
49
+ function J(d) {
50
+ return !d || d.status === "breached" ? !1 : d.status === "warning" || Qe(d);
50
51
  }
51
- function mt({ sla: d }) {
52
- const u = Re(d), l = u && Z(d) ? { ...u, tone: "warn" } : u;
52
+ function ct({ sla: d }) {
53
+ const u = Be(d), l = u && J(d) ? { ...u, tone: "warn" } : u;
53
54
  return l ? /* @__PURE__ */ e(
54
55
  "span",
55
56
  {
56
57
  "data-sla-chip": l.tone,
57
- className: `rounded px-1.5 py-0.5 text-[10px] font-semibold tabular-nums transition-colors duration-500 ${lt[l.tone]}`,
58
+ className: `rounded px-1.5 py-0.5 text-[10px] font-semibold tabular-nums transition-colors duration-500 ${it[l.tone]}`,
58
59
  children: l.label
59
60
  }
60
61
  ) : null;
61
62
  }
62
- function ut({ state: d, color: u }) {
63
+ function mt({ state: d, color: u }) {
63
64
  return d ? /* @__PURE__ */ e(
64
65
  "span",
65
66
  {
@@ -73,20 +74,20 @@ function ut({ state: d, color: u }) {
73
74
  }
74
75
  ) : null;
75
76
  }
76
- function pt({ order: d, hidden: u }) {
77
+ function ut({ order: d, hidden: u }) {
77
78
  const l = d.filter(
78
79
  (p) => !u.includes(p) && (p === "records" || p === "tasks" || p === "notifications")
79
- ), g = (p, w) => /* @__PURE__ */ n(
80
+ ), g = (p, w) => /* @__PURE__ */ s(
80
81
  "section",
81
82
  {
82
83
  className: "rounded-lg border border-slate-200 bg-white dark:border-border dark:bg-card",
83
84
  children: [
84
- /* @__PURE__ */ n("div", { className: "border-b border-slate-200 px-4 py-2.5 dark:border-border", children: [
85
- /* @__PURE__ */ e("h2", { className: "text-[13px] font-medium text-slate-400 dark:text-slate-500", children: xe[p] ?? p }),
85
+ /* @__PURE__ */ s("div", { className: "border-b border-slate-200 px-4 py-2.5 dark:border-border", children: [
86
+ /* @__PURE__ */ e("h2", { className: "text-[13px] font-medium text-slate-400 dark:text-slate-500", children: be[p] ?? p }),
86
87
  p === "records" && /* @__PURE__ */ e("p", { className: "text-[11px] text-muted-foreground", children: "Records whose current step resolves you as an owner — most urgent first." })
87
88
  ] }),
88
89
  /* @__PURE__ */ e(
89
- nt,
90
+ at,
90
91
  {
91
92
  header: !1,
92
93
  rows: w,
@@ -116,15 +117,15 @@ function pt({ order: d, hidden: u }) {
116
117
  /* @__PURE__ */ e("div", { className: "grid grid-cols-1 gap-5 lg:grid-cols-2", children: w.map((y) => g(y, 4)) }, w.join("+"))
117
118
  ), p += w.length;
118
119
  }
119
- return /* @__PURE__ */ n("div", { className: "space-y-5 p-4 sm:p-6", "data-my-work-loading": !0, "aria-busy": "true", children: [
120
- /* @__PURE__ */ n("div", { className: "flex items-start justify-between", children: [
121
- /* @__PURE__ */ e("div", { className: "grid flex-1 grid-cols-2 gap-3 lg:grid-cols-4", children: ["Waiting on you", "SLA breached", "Open tasks", "Unread notifications"].map((p) => /* @__PURE__ */ n(
120
+ return /* @__PURE__ */ s("div", { className: "space-y-5 p-4 sm:p-6", "data-my-work-loading": !0, "aria-busy": "true", children: [
121
+ /* @__PURE__ */ s("div", { className: "flex items-start justify-between", children: [
122
+ /* @__PURE__ */ e("div", { className: "grid flex-1 grid-cols-2 gap-3 lg:grid-cols-4", children: ["Waiting on you", "SLA breached", "Open tasks", "Unread notifications"].map((p) => /* @__PURE__ */ s(
122
123
  "div",
123
124
  {
124
125
  className: "rounded-lg border border-slate-200 bg-white p-3 dark:border-border dark:bg-card",
125
126
  children: [
126
127
  /* @__PURE__ */ e("p", { className: "text-[10.5px] uppercase tracking-wide text-muted-foreground", children: p }),
127
- /* @__PURE__ */ e("p", { className: "mt-0.5 flex h-[27px] items-center", children: /* @__PURE__ */ e(at, { width: 34, className: "h-[18px] rounded-md" }) })
128
+ /* @__PURE__ */ e("p", { className: "mt-0.5 flex h-[27px] items-center", children: /* @__PURE__ */ e(rt, { width: 34, className: "h-[18px] rounded-md" }) })
128
129
  ]
129
130
  },
130
131
  p
@@ -135,8 +136,8 @@ function pt({ order: d, hidden: u }) {
135
136
  k
136
137
  ] });
137
138
  }
138
- function U({ label: d, value: u, tone: l }) {
139
- return /* @__PURE__ */ n("div", { className: "min-w-0 rounded-lg border border-slate-200 bg-white p-3 dark:border-border dark:bg-card", children: [
139
+ function W({ label: d, value: u, tone: l }) {
140
+ return /* @__PURE__ */ s("div", { className: "min-w-0 rounded-lg border border-slate-200 bg-white p-3 dark:border-border dark:bg-card", children: [
140
141
  /* @__PURE__ */ e("p", { className: "break-words text-[10.5px] uppercase tracking-wide text-muted-foreground", children: d }),
141
142
  /* @__PURE__ */ e("p", { className: `mt-0.5 text-[18px] font-semibold tabular-nums ${l ?? ""}`, children: /* @__PURE__ */ e(st, { value: u }) })
142
143
  ] });
@@ -145,193 +146,190 @@ function Pt({
145
146
  notificationRoutes: d,
146
147
  onOpenPath: u
147
148
  } = {}) {
148
- const { apiBase: l, authHeaders: g, credentials: k } = je(), { open: p } = Oe(), w = Pe(), y = Ie(), v = Se(), G = Ee(), X = (r) => {
149
+ const { apiBase: l, authHeaders: g, credentials: k } = Te(), { open: p } = je(), w = Ke(), y = Oe(), v = _e(), V = We(), Y = (t) => {
149
150
  var h, c;
150
- const s = ((h = d == null ? void 0 : d.support) == null ? void 0 : h.call(d, String(r))) ?? ((c = y.consoleUrl) == null ? void 0 : c.call(y, `/support?ticket=${r}`)) ?? `/support?ticket=${r}`;
151
- u ? u(s) : y.navigate(s);
152
- }, K = Ue(), [x, ge] = O(() => {
151
+ const n = ((h = d == null ? void 0 : d.support) == null ? void 0 : h.call(d, String(t))) ?? ((c = y.consoleUrl) == null ? void 0 : c.call(y, `/support?ticket=${t}`)) ?? `/support?ticket=${t}`;
152
+ u ? u(n) : y.navigate(n);
153
+ }, E = Ee(), [x, xe] = O(() => {
153
154
  try {
154
- const r = localStorage.getItem("nvr_mywork_sections");
155
- if (r) {
156
- const s = JSON.parse(r);
157
- if (Array.isArray(s == null ? void 0 : s.order) && Array.isArray(s == null ? void 0 : s.hidden)) {
158
- const h = he.map((c, b) => ({
155
+ const t = localStorage.getItem("nvr_mywork_sections");
156
+ if (t) {
157
+ const n = JSON.parse(t);
158
+ if (Array.isArray(n == null ? void 0 : n.order) && Array.isArray(n == null ? void 0 : n.hidden)) {
159
+ const h = pe.map((c, b) => ({
159
160
  k: c,
160
- at: s.order.indexOf(c) >= 0 ? s.order.indexOf(c) : b - 0.5
161
+ at: n.order.indexOf(c) >= 0 ? n.order.indexOf(c) : b - 0.5
161
162
  })).sort((c, b) => c.at - b.at).map((c) => c.k);
162
- return { order: h, hidden: s.hidden.filter((c) => h.includes(c)) };
163
+ return { order: h, hidden: n.hidden.filter((c) => h.includes(c)) };
163
164
  }
164
165
  }
165
166
  } catch {
166
167
  }
167
- return { order: [...he], hidden: [] };
168
- }), ee = (r) => {
169
- ge(r);
168
+ return { order: [...pe], hidden: [] };
169
+ }), Z = (t) => {
170
+ xe(t);
170
171
  try {
171
- localStorage.setItem("nvr_mywork_sections", JSON.stringify(r));
172
+ localStorage.setItem("nvr_mywork_sections", JSON.stringify(t));
172
173
  } catch {
173
174
  }
174
- }, [fe, ke] = O(!1), [_, ye] = O("all"), L = Le(!0), [M, te] = O(null), { data: A } = Xe(), f = J(() => {
175
- const r = M ? A == null ? void 0 : A.find((s) => s.user_id === M) : null;
176
- return r ? { userId: r.user_id, name: r.first_name || r.name, keys: new Set(r.keys) } : null;
177
- }, [M, A]), { data: a, isLoading: we, refetch: Ne, isFetching: re } = Ce({
175
+ }, [ge, fe] = O(!1), [_, ke] = O("all"), M = Ie(!0), [A, G] = O(null), { data: L } = Ge(), f = z(() => {
176
+ const t = A ? L == null ? void 0 : L.find((n) => n.user_id === A) : null;
177
+ return t ? { userId: t.user_id, name: t.first_name || t.name, keys: new Set(t.keys) } : null;
178
+ }, [A, L]), { data: a, isLoading: ye, refetch: we, isFetching: X } = Se({
178
179
  queryKey: ["my-work"],
179
180
  queryFn: async () => {
180
- const r = await fetch(`${l}/my-work`, { headers: g, credentials: k });
181
- if (!r.ok) throw new Error("my-work failed");
182
- return (await r.json()).data;
181
+ const t = await fetch(`${l}/my-work`, { headers: g, credentials: k });
182
+ if (!t.ok) throw new Error("my-work failed");
183
+ return (await t.json()).data;
183
184
  },
184
185
  staleTime: 6e4
185
- }), ae = W(0), $ = W(null), D = () => {
186
- const r = () => {
187
- $.current = null, ae.current = Date.now(), v.invalidateQueries({ queryKey: ["my-work"] });
188
- }, s = ae.current + ot - Date.now();
189
- $.current || (s <= 0 ? r() : $.current = setTimeout(r, s));
190
- };
191
- De("my-work", D, { debounceMs: 1500 }), Ae("notification:new", D, { debounceMs: 1500 }), V(
192
- () => () => {
193
- $.current && clearTimeout($.current);
194
- },
195
- []
186
+ }), $ = Ae(
187
+ () => void v.invalidateQueries({ queryKey: ["my-work"] }, { cancelRefetch: !1 }),
188
+ dt
196
189
  );
197
- const ne = qe([
198
- ...((a == null ? void 0 : a.owned) ?? []).map((r) => `o:${r.collection}:${r.item}`),
199
- ...((a == null ? void 0 : a.tasks) ?? []).map((r) => `t:${r.id}`),
200
- ...((a == null ? void 0 : a.team_tasks) ?? []).map((r) => `tt:${r.id}`),
201
- ...((a == null ? void 0 : a.requested) ?? []).map((r) => `r:${r.id}`),
202
- ...((a == null ? void 0 : a.notifications) ?? []).map((r) => `n:${r.id}`),
203
- ...((a == null ? void 0 : a.proposals) ?? []).map((r) => `p:${r.id}`)
204
- ]), S = (r) => ne.has(r) ? "bg-nvr-cyan/10 transition-colors duration-700" : "transition-colors duration-700", P = J(() => {
205
- const r = /* @__PURE__ */ new Set();
206
- for (const s of (a == null ? void 0 : a.owned) ?? []) s.collection && r.add(s.collection);
207
- return [...r];
208
- }, [a]), se = W(/* @__PURE__ */ new Set());
209
- se.current = new Set(((a == null ? void 0 : a.owned) ?? []).map((r) => `${r.collection}:${r.item}`));
210
- const de = W(D);
211
- de.current = D, V(() => {
212
- if (!(!K || P.length === 0))
213
- return K.subscribeCollections(P, (r) => {
214
- ct(r, se.current) && de.current();
190
+ Le("my-work", $, { debounceMs: 1500 }), ce("notification:new", $, { debounceMs: 1500 }), ce(["read:changed", "notification:retired"], $, {
191
+ debounceMs: 1500,
192
+ includeOwn: !0,
193
+ match: (t) => (t == null ? void 0 : t.kind) !== "chat"
194
+ });
195
+ const ee = qe([
196
+ ...((a == null ? void 0 : a.owned) ?? []).map((t) => `o:${t.collection}:${t.item}`),
197
+ ...((a == null ? void 0 : a.tasks) ?? []).map((t) => `t:${t.id}`),
198
+ ...((a == null ? void 0 : a.team_tasks) ?? []).map((t) => `tt:${t.id}`),
199
+ ...((a == null ? void 0 : a.requested) ?? []).map((t) => `r:${t.id}`),
200
+ ...((a == null ? void 0 : a.notifications) ?? []).map((t) => `n:${t.id}`),
201
+ ...((a == null ? void 0 : a.proposals) ?? []).map((t) => `p:${t.id}`)
202
+ ]), S = (t) => ee.has(t) ? "bg-nvr-cyan/10 transition-colors duration-700" : "transition-colors duration-700", U = z(() => {
203
+ const t = /* @__PURE__ */ new Set();
204
+ for (const n of (a == null ? void 0 : a.owned) ?? []) n.collection && t.add(n.collection);
205
+ return [...t];
206
+ }, [a]), te = ie(/* @__PURE__ */ new Set());
207
+ te.current = new Set(((a == null ? void 0 : a.owned) ?? []).map((t) => `${t.collection}:${t.item}`));
208
+ const re = ie($);
209
+ re.current = $, le(() => {
210
+ if (!(!E || U.length === 0))
211
+ return E.subscribeCollections(U, (t) => {
212
+ lt(t, te.current) && re.current();
215
213
  });
216
- }, [K, P]);
217
- const oe = J(() => {
218
- const r = (a == null ? void 0 : a.owned) ?? [], s = _ === "all" ? r : r.filter((h) => {
219
- const c = Y(h.sla, L);
220
- return _ === "soon" ? Z(c) : (c == null ? void 0 : c.status) === "breached";
214
+ }, [E, U]);
215
+ const ae = z(() => {
216
+ const t = (a == null ? void 0 : a.owned) ?? [], n = _ === "all" ? t : t.filter((h) => {
217
+ const c = H(h.sla, M);
218
+ return _ === "soon" ? J(c) : (c == null ? void 0 : c.status) === "breached";
221
219
  });
222
- return f ? s.filter((h) => f.keys.has(`${h.collection}:${h.item}`)) : s;
223
- }, [a, _, L, f]), Q = Fe(oe, (r) => `${r.collection}:${r.item}`, {
224
- resetKey: `${_}|${M ?? ""}`
225
- }), ie = H({
220
+ return f ? n.filter((h) => f.keys.has(`${h.collection}:${h.item}`)) : n;
221
+ }, [a, _, M, f]), K = De(ae, (t) => `${t.collection}:${t.item}`, {
222
+ resetKey: `${_}|${A ?? ""}`
223
+ }), se = R({
226
224
  // A ticket closes through /support so its requester hears about it.
227
- mutationFn: (r) => fetch(`${l}/${r.kind === "support" ? "support/tickets" : "tasks"}/${r.id}`, {
225
+ mutationFn: (t) => fetch(`${l}/${t.kind === "support" ? "support/tickets" : "tasks"}/${t.id}`, {
228
226
  method: "PATCH",
229
227
  headers: { ...g, "content-type": "application/json" },
230
228
  credentials: k,
231
229
  body: JSON.stringify({ status: "done" })
232
230
  }),
233
231
  onSuccess: () => v.invalidateQueries({ queryKey: ["my-work"] })
234
- }), q = H({
235
- mutationFn: async ({ id: r, action: s }) => {
236
- const h = await fetch(`${l}/tasks/${r}/${s}`, {
232
+ }), q = R({
233
+ mutationFn: async ({ id: t, action: n }) => {
234
+ const h = await fetch(`${l}/tasks/${t}/${n}`, {
237
235
  method: "POST",
238
236
  headers: { ...g, "content-type": "application/json" },
239
237
  credentials: k,
240
238
  body: "{}"
241
239
  }), c = await h.json().catch(() => ({}));
242
240
  if (!h.ok) throw new Error(c.error ?? "Failed");
243
- return s;
241
+ return n;
244
242
  },
245
- onSuccess: (r) => {
246
- B(r === "claim" ? "It’s yours — it moved to My tasks." : "Reminder sent."), v.invalidateQueries({ queryKey: ["my-work"] });
243
+ onSuccess: (t) => {
244
+ P(t === "claim" ? "It’s yours — it moved to My tasks." : "Reminder sent."), v.invalidateQueries({ queryKey: ["my-work"] });
247
245
  },
248
- onError: (r) => B(Qe(r, "Failed"))
249
- }), [F, B] = O(null);
250
- V(() => {
251
- if (!F) return;
252
- const r = setTimeout(() => B(null), 4e3);
253
- return () => clearTimeout(r);
254
- }, [F]);
255
- const le = H({
256
- mutationFn: (r) => fetch(`${l}/notifications/mark-read`, {
246
+ onError: (t) => P(Pe(t, "Failed"))
247
+ }), [D, P] = O(null);
248
+ le(() => {
249
+ if (!D) return;
250
+ const t = setTimeout(() => P(null), 4e3);
251
+ return () => clearTimeout(t);
252
+ }, [D]);
253
+ const ne = R({
254
+ mutationFn: (t) => fetch(`${l}/notifications/mark-read`, {
257
255
  method: "POST",
258
256
  headers: { ...g, "content-type": "application/json" },
259
257
  credentials: k,
260
- body: JSON.stringify({ ids: r })
258
+ body: JSON.stringify({ ids: t })
261
259
  }),
262
260
  onSuccess: () => {
263
261
  v.invalidateQueries({ queryKey: ["my-work"] }), v.invalidateQueries({ queryKey: ["notifications"] });
264
262
  }
265
- }), C = (r, s, h, c) => {
266
- if (r && s && pe(r)) {
267
- const m = (c ?? []).filter((o) => o.collection && o.item && pe(o.collection)).map((o) => ({ collection: o.collection, itemId: String(o.item) }));
268
- if (w({ collection: r, itemId: String(s) }, h, { list: m }) !== "navigate")
263
+ }), C = (t, n, h, c) => {
264
+ if (t && n && ue(t)) {
265
+ const m = (c ?? []).filter((o) => o.collection && o.item && ue(o.collection)).map((o) => ({ collection: o.collection, itemId: String(o.item) }));
266
+ if (w({ collection: t, itemId: String(n) }, h, { list: m }) !== "navigate")
269
267
  return;
270
268
  }
271
269
  const b = {
272
270
  record: (m, o) => (p({ collection: m, itemId: o }), null),
273
271
  ...d
274
- }, t = ue(r, s, {
272
+ }, r = me(t, n, {
275
273
  ...b,
276
274
  record: (m, o) => {
277
275
  var N;
278
276
  return ((N = d == null ? void 0 : d.record) == null ? void 0 : N.call(d, m, o)) ?? null;
279
277
  }
280
278
  });
281
- if (t) {
282
- We(t, (m) => u == null ? void 0 : u(m));
279
+ if (r) {
280
+ Fe(r, (m) => u == null ? void 0 : u(m));
283
281
  return;
284
282
  }
285
- r && s && !/^nivaro_/i.test(r) && r !== "__chat__" && p({ collection: r, itemId: s });
286
- }, ve = (r, s) => r && s && !/^nivaro_/i.test(r) && r !== "__chat__" ? !0 : !!ue(r, s, {
283
+ t && n && !/^nivaro_/i.test(t) && t !== "__chat__" && p({ collection: t, itemId: n });
284
+ }, Ne = (t, n) => t && n && !/^nivaro_/i.test(t) && t !== "__chat__" ? !0 : !!me(t, n, {
287
285
  record: () => null,
288
286
  ...d
289
287
  });
290
- return we || !a ? /* @__PURE__ */ e(pt, { order: x.order, hidden: x.hidden }) : /* @__PURE__ */ n("div", { className: "space-y-5 p-4 sm:p-6", "data-my-work": !0, children: [
291
- /* @__PURE__ */ e(Je, { onOpenPath: u }),
292
- /* @__PURE__ */ n("div", { className: "flex flex-col-reverse gap-3 sm:flex-row sm:items-start sm:justify-between", children: [
293
- /* @__PURE__ */ n("div", { className: "grid min-w-0 flex-1 grid-cols-2 gap-3 lg:grid-cols-4", children: [
294
- /* @__PURE__ */ e(U, { label: "Waiting on you", value: a.counts.owned }),
288
+ return ye || !a ? /* @__PURE__ */ e(ut, { order: x.order, hidden: x.hidden }) : /* @__PURE__ */ s("div", { className: "space-y-5 p-4 sm:p-6", "data-my-work": !0, children: [
289
+ /* @__PURE__ */ e(He, { onOpenPath: u }),
290
+ /* @__PURE__ */ s("div", { className: "flex flex-col-reverse gap-3 sm:flex-row sm:items-start sm:justify-between", children: [
291
+ /* @__PURE__ */ s("div", { className: "grid min-w-0 flex-1 grid-cols-2 gap-3 lg:grid-cols-4", children: [
292
+ /* @__PURE__ */ e(W, { label: "Waiting on you", value: a.counts.owned }),
295
293
  /* @__PURE__ */ e(
296
- U,
294
+ W,
297
295
  {
298
296
  label: "SLA breached",
299
297
  value: a.counts.owned_breached,
300
298
  tone: a.counts.owned_breached > 0 ? "text-red-600 dark:text-red-400" : ""
301
299
  }
302
300
  ),
303
- /* @__PURE__ */ e(U, { label: "Open tasks", value: a.counts.tasks }),
304
- /* @__PURE__ */ e(U, { label: "Unread notifications", value: a.counts.notifications })
301
+ /* @__PURE__ */ e(W, { label: "Open tasks", value: a.counts.tasks }),
302
+ /* @__PURE__ */ e(W, { label: "Unread notifications", value: a.counts.notifications })
305
303
  ] }),
306
- /* @__PURE__ */ n("div", { className: "flex shrink-0 flex-wrap items-center justify-end gap-2", children: [
304
+ /* @__PURE__ */ s("div", { className: "flex shrink-0 flex-wrap items-center justify-end gap-2", children: [
307
305
  /* @__PURE__ */ e(
308
306
  "button",
309
307
  {
310
308
  type: "button",
311
- onClick: () => void Ne(),
312
- disabled: re,
309
+ onClick: () => void we(),
310
+ disabled: X,
313
311
  className: "rounded-md border border-slate-200 px-2.5 py-1.5 text-[12px] hover:bg-muted disabled:opacity-50 dark:border-border",
314
- children: re ? "Refreshing…" : "Refresh"
312
+ children: X ? "Refreshing…" : "Refresh"
315
313
  }
316
314
  ),
317
- /* @__PURE__ */ n("div", { className: "relative", children: [
315
+ /* @__PURE__ */ s("div", { className: "relative", children: [
318
316
  /* @__PURE__ */ e(
319
317
  "button",
320
318
  {
321
319
  type: "button",
322
- onClick: () => ke((r) => !r),
320
+ onClick: () => fe((t) => !t),
323
321
  className: "rounded-md border border-slate-200 px-2.5 py-1.5 text-[12px] hover:bg-muted dark:border-border",
324
322
  children: "Customize"
325
323
  }
326
324
  ),
327
- fe && /* @__PURE__ */ n("div", { className: "absolute right-0 top-full z-20 mt-1 w-56 rounded-lg border border-slate-200 bg-white p-2 shadow-lg dark:border-border dark:bg-card", children: [
325
+ ge && /* @__PURE__ */ s("div", { className: "absolute right-0 top-full z-20 mt-1 w-56 rounded-lg border border-slate-200 bg-white p-2 shadow-lg dark:border-border dark:bg-card", children: [
328
326
  /* @__PURE__ */ e("p", { className: "px-1 pb-1.5 text-[11px] font-semibold text-slate-500", children: "Sections" }),
329
- x.order.map((r, s) => {
330
- const h = xe[r] ?? r, c = x.hidden.includes(r), b = (t) => {
331
- const m = [...x.order], o = s + t;
332
- o < 0 || o >= m.length || ([m[s], m[o]] = [m[o], m[s]], ee({ ...x, order: m }));
327
+ x.order.map((t, n) => {
328
+ const h = be[t] ?? t, c = x.hidden.includes(t), b = (r) => {
329
+ const m = [...x.order], o = n + r;
330
+ o < 0 || o >= m.length || ([m[n], m[o]] = [m[o], m[n]], Z({ ...x, order: m }));
333
331
  };
334
- return /* @__PURE__ */ n(
332
+ return /* @__PURE__ */ s(
335
333
  "div",
336
334
  {
337
335
  className: "flex items-center gap-1 rounded px-1 py-1 hover:bg-muted",
@@ -340,9 +338,9 @@ function Pt({
340
338
  "button",
341
339
  {
342
340
  type: "button",
343
- onClick: () => ee({
341
+ onClick: () => Z({
344
342
  ...x,
345
- hidden: c ? x.hidden.filter((t) => t !== r) : [...x.hidden, r]
343
+ hidden: c ? x.hidden.filter((r) => r !== t) : [...x.hidden, t]
346
344
  }),
347
345
  className: "flex h-4 w-4 items-center justify-center rounded border border-slate-300 text-[10px] dark:border-border",
348
346
  title: c ? "Show section" : "Hide section",
@@ -361,7 +359,7 @@ function Pt({
361
359
  {
362
360
  type: "button",
363
361
  onClick: () => b(-1),
364
- disabled: s === 0,
362
+ disabled: n === 0,
365
363
  className: "px-1 text-[11px] text-slate-400 hover:text-foreground disabled:opacity-30",
366
364
  children: "↑"
367
365
  }
@@ -371,63 +369,63 @@ function Pt({
371
369
  {
372
370
  type: "button",
373
371
  onClick: () => b(1),
374
- disabled: s === x.order.length - 1,
372
+ disabled: n === x.order.length - 1,
375
373
  className: "px-1 text-[11px] text-slate-400 hover:text-foreground disabled:opacity-30",
376
374
  children: "↓"
377
375
  }
378
376
  )
379
377
  ]
380
378
  },
381
- r
379
+ t
382
380
  );
383
381
  })
384
382
  ] })
385
383
  ] })
386
384
  ] })
387
385
  ] }),
388
- F && /* @__PURE__ */ e(
386
+ D && /* @__PURE__ */ e(
389
387
  "p",
390
388
  {
391
389
  className: "rounded-md border border-slate-200 bg-white px-3 py-2 text-[12px] dark:border-border dark:bg-card",
392
390
  role: "status",
393
391
  "data-my-work-task-note": !0,
394
- children: F
392
+ children: D
395
393
  }
396
394
  ),
397
- /* @__PURE__ */ e(He, { questions: a.questions ?? [] }),
395
+ /* @__PURE__ */ e(ze, { questions: a.questions ?? [] }),
398
396
  /* @__PURE__ */ e(
399
- et,
397
+ Xe,
400
398
  {
401
399
  showing: (f == null ? void 0 : f.userId) ?? null,
402
- onShow: (r) => te((s) => s === r.user_id ? null : r.user_id)
400
+ onShow: (t) => G((n) => n === t.user_id ? null : t.user_id)
403
401
  }
404
402
  ),
405
- /* @__PURE__ */ e(rt, { className: "mb-4" }),
406
403
  /* @__PURE__ */ e(tt, { className: "mb-4" }),
404
+ /* @__PURE__ */ e(et, { className: "mb-4" }),
407
405
  (() => {
408
- const r = {
406
+ const t = {
409
407
  records: () => {
410
- const t = new Map(a.owned.map((i) => [i, Y(i.sla, L)])), m = (i) => Z(t.get(i) ?? null), o = (i) => {
408
+ const r = new Map(a.owned.map((i) => [i, H(i.sla, M)])), m = (i) => J(r.get(i) ?? null), o = (i) => {
411
409
  var j;
412
- return ((j = t.get(i)) == null ? void 0 : j.status) === "breached";
413
- }, N = a.owned.filter(m).length, T = a.owned.filter(o).length, R = oe, _e = [
410
+ return ((j = r.get(i)) == null ? void 0 : j.status) === "breached";
411
+ }, N = a.owned.filter(m).length, T = a.owned.filter(o).length, Q = ae, ve = [
414
412
  { key: "all", label: `All (${a.owned.length})` },
415
413
  { key: "soon", label: `Due soon (${N})` },
416
414
  { key: "breached", label: `Breached (${T})` }
417
415
  ];
418
- return /* @__PURE__ */ n("section", { className: "rounded-lg border border-slate-200 bg-white dark:border-border dark:bg-card", children: [
419
- /* @__PURE__ */ n("div", { className: "border-b border-slate-200 px-4 py-2.5 dark:border-border", children: [
416
+ return /* @__PURE__ */ s("section", { className: "rounded-lg border border-slate-200 bg-white dark:border-border dark:bg-card", children: [
417
+ /* @__PURE__ */ s("div", { className: "border-b border-slate-200 px-4 py-2.5 dark:border-border", children: [
420
418
  /* @__PURE__ */ e("h2", { className: "text-[13px] font-medium", children: "Waiting on you" }),
421
419
  /* @__PURE__ */ e("p", { className: "text-[11px] text-muted-foreground", children: "Records whose current step resolves you as an owner — most urgent first." })
422
420
  ] }),
423
- a.owned.length > 0 && /* @__PURE__ */ n("div", { className: "flex flex-wrap items-center gap-1 border-b border-slate-100 px-4 py-2 dark:border-border/60", children: [
424
- /* @__PURE__ */ e("div", { className: "flex items-center gap-1 rounded-lg bg-slate-100 p-1 dark:bg-muted", children: _e.map((i) => /* @__PURE__ */ e(
421
+ a.owned.length > 0 && /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-1 border-b border-slate-100 px-4 py-2 dark:border-border/60", children: [
422
+ /* @__PURE__ */ e("div", { className: "flex items-center gap-1 rounded-lg bg-slate-100 p-1 dark:bg-muted", children: ve.map((i) => /* @__PURE__ */ e(
425
423
  "button",
426
424
  {
427
425
  type: "button",
428
426
  "data-my-work-sla-filter": i.key,
429
427
  "aria-pressed": _ === i.key,
430
- onClick: () => ye(i.key),
428
+ onClick: () => ke(i.key),
431
429
  className: [
432
430
  "rounded-md px-2.5 py-1 text-[11px] font-medium transition-colors duration-150",
433
431
  _ === i.key ? "bg-white text-slate-900 shadow-sm dark:bg-card dark:text-foreground" : "text-slate-500 hover:text-slate-700 dark:text-slate-400 dark:hover:text-slate-200"
@@ -436,12 +434,12 @@ function Pt({
436
434
  },
437
435
  i.key
438
436
  )) }),
439
- f && /* @__PURE__ */ n(
437
+ f && /* @__PURE__ */ s(
440
438
  "button",
441
439
  {
442
440
  type: "button",
443
441
  "data-my-work-cover-filter": !0,
444
- onClick: () => te(null),
442
+ onClick: () => G(null),
445
443
  "aria-label": `Show all records, not only ${f.name}'s`,
446
444
  className: "ml-1 inline-flex items-center gap-1 rounded-full border border-nvr-cyan/40 bg-nvr-cyan/10 px-2.5 py-1 text-[11px] font-medium text-[#0e7490] hover:bg-nvr-cyan/20 dark:text-[#67e8f9]",
447
445
  children: [
@@ -452,13 +450,13 @@ function Pt({
452
450
  }
453
451
  )
454
452
  ] }),
455
- Q.rows.length === 0 ? /* @__PURE__ */ e("p", { className: "px-4 py-6 text-center text-[12.5px] text-muted-foreground", children: a.owned.length === 0 ? "Nothing is waiting on you. Enjoy it." : "Nothing matches this filter." }) : /* @__PURE__ */ e(
453
+ K.rows.length === 0 ? /* @__PURE__ */ e("p", { className: "px-4 py-6 text-center text-[12.5px] text-muted-foreground", children: a.owned.length === 0 ? "Nothing is waiting on you. Enjoy it." : "Nothing matches this filter." }) : /* @__PURE__ */ e(
456
454
  "ul",
457
455
  {
458
- ref: Q.containerRef,
456
+ ref: K.containerRef,
459
457
  className: "divide-y divide-slate-100 dark:divide-border/60",
460
- children: Q.rows.map(({ row: i, state: j }) => {
461
- var ce, me;
458
+ children: K.rows.map(({ row: i, state: j }) => {
459
+ var de, oe;
462
460
  return /* @__PURE__ */ e(
463
461
  "li",
464
462
  {
@@ -466,19 +464,19 @@ function Pt({
466
464
  S(`o:${i.collection}:${i.item}`),
467
465
  j === "departed" && "opacity-50"
468
466
  ),
469
- "data-my-work-fresh": ne.has(`o:${i.collection}:${i.item}`) || void 0,
467
+ "data-my-work-fresh": ee.has(`o:${i.collection}:${i.item}`) || void 0,
470
468
  "data-my-work-departed": j === "departed" || void 0,
471
- children: /* @__PURE__ */ n(
469
+ children: /* @__PURE__ */ s(
472
470
  "button",
473
471
  {
474
472
  type: "button",
475
- onClick: (z) => C(i.collection, i.item, z, R),
476
- ...G.record(i.collection, i.item),
473
+ onClick: (B) => C(i.collection, i.item, B, Q),
474
+ ...V.record(i.collection, i.item),
477
475
  className: "flex w-full items-center gap-2.5 px-4 py-2 text-left hover:bg-muted",
478
476
  children: [
479
477
  /* @__PURE__ */ e("span", { className: "min-w-[6.5rem] flex-1 truncate text-[12.5px] font-medium", children: i.label }),
480
478
  /* @__PURE__ */ e("span", { className: "hidden text-[11px] text-muted-foreground sm:inline", children: i.collection.replace(/_/g, " ") }),
481
- ((ce = i.flags) == null ? void 0 : ce.some((z) => /^on hold$/i.test(z.name.trim()))) && /* @__PURE__ */ e(
479
+ ((de = i.flags) == null ? void 0 : de.some((B) => /^on hold$/i.test(B.name.trim()))) && /* @__PURE__ */ e(
482
480
  "span",
483
481
  {
484
482
  "data-my-work-hold": !0,
@@ -487,13 +485,13 @@ function Pt({
487
485
  }
488
486
  ),
489
487
  /* @__PURE__ */ e(
490
- ut,
488
+ mt,
491
489
  {
492
- state: i.state_label || ((me = i.state) == null ? void 0 : me.replace(/_/g, " ")) || null,
490
+ state: i.state_label || ((oe = i.state) == null ? void 0 : oe.replace(/_/g, " ")) || null,
493
491
  color: i.state_color
494
492
  }
495
493
  ),
496
- /* @__PURE__ */ e("span", { className: "shrink-0", children: /* @__PURE__ */ e(mt, { sla: t.get(i) ?? Y(i.sla, L) }) })
494
+ /* @__PURE__ */ e("span", { className: "shrink-0", children: /* @__PURE__ */ e(ct, { sla: r.get(i) ?? H(i.sla, M) }) })
497
495
  ]
498
496
  }
499
497
  )
@@ -506,141 +504,141 @@ function Pt({
506
504
  ] });
507
505
  },
508
506
  // Idea 6 — only when something waits on this person's decision.
509
- proposals: () => (a.proposals ?? []).length === 0 ? null : /* @__PURE__ */ n(
507
+ proposals: () => (a.proposals ?? []).length === 0 ? null : /* @__PURE__ */ s(
510
508
  "section",
511
509
  {
512
510
  className: "rounded-lg border border-slate-200 bg-white dark:border-border dark:bg-card",
513
511
  "data-my-work-proposals": !0,
514
512
  children: [
515
- /* @__PURE__ */ n("div", { className: "border-b border-slate-200 px-4 py-2.5 dark:border-border", children: [
513
+ /* @__PURE__ */ s("div", { className: "border-b border-slate-200 px-4 py-2.5 dark:border-border", children: [
516
514
  /* @__PURE__ */ e("h2", { className: "text-[13px] font-medium", children: "Changes to review" }),
517
515
  /* @__PURE__ */ e("p", { className: "text-[11px] text-muted-foreground", children: "Proposed changes on locked records — open one to compare old and new and accept or decline it." })
518
516
  ] }),
519
- /* @__PURE__ */ e("ul", { className: "divide-y divide-slate-100 dark:divide-border/60", children: (a.proposals ?? []).map((t) => /* @__PURE__ */ e("li", { className: S(`p:${t.id}`), "data-my-work-proposal": t.id, children: /* @__PURE__ */ n(
517
+ /* @__PURE__ */ e("ul", { className: "divide-y divide-slate-100 dark:divide-border/60", children: (a.proposals ?? []).map((r) => /* @__PURE__ */ e("li", { className: S(`p:${r.id}`), "data-my-work-proposal": r.id, children: /* @__PURE__ */ s(
520
518
  "button",
521
519
  {
522
520
  type: "button",
523
- onClick: () => C(t.collection, t.item),
524
- ...G.record(t.collection, t.item),
521
+ onClick: () => C(r.collection, r.item),
522
+ ...V.record(r.collection, r.item),
525
523
  className: "flex w-full items-start gap-2.5 px-4 py-2 text-left hover:bg-muted",
526
524
  children: [
527
- /* @__PURE__ */ n("span", { className: "min-w-0 flex-1", children: [
528
- /* @__PURE__ */ n("span", { className: "flex flex-wrap items-baseline gap-x-2", children: [
529
- /* @__PURE__ */ e("span", { className: "text-[12.5px] font-medium", children: t.item_label }),
530
- /* @__PURE__ */ e("span", { className: "text-[11.5px] text-muted-foreground", children: t.fields.join(", ") })
525
+ /* @__PURE__ */ s("span", { className: "min-w-0 flex-1", children: [
526
+ /* @__PURE__ */ s("span", { className: "flex flex-wrap items-baseline gap-x-2", children: [
527
+ /* @__PURE__ */ e("span", { className: "text-[12.5px] font-medium", children: r.item_label }),
528
+ /* @__PURE__ */ e("span", { className: "text-[11.5px] text-muted-foreground", children: r.fields.join(", ") })
531
529
  ] }),
532
- /* @__PURE__ */ n("span", { className: "mt-0.5 block truncate text-[11.5px] text-slate-500 dark:text-slate-400", children: [
533
- t.created_by_name ?? "Someone",
530
+ /* @__PURE__ */ s("span", { className: "mt-0.5 block truncate text-[11.5px] text-slate-500 dark:text-slate-400", children: [
531
+ r.created_by_name ?? "Someone",
534
532
  ": ",
535
- t.reason
533
+ r.reason
536
534
  ] })
537
535
  ] }),
538
- /* @__PURE__ */ e("span", { className: "shrink-0 pt-0.5 text-[11px] text-muted-foreground", children: ze(t.created_at) })
536
+ /* @__PURE__ */ e("span", { className: "shrink-0 pt-0.5 text-[11px] text-muted-foreground", children: Re(r.created_at) })
539
537
  ]
540
538
  }
541
- ) }, t.id)) })
539
+ ) }, r.id)) })
542
540
  ]
543
541
  }
544
542
  ),
545
- tasks: () => /* @__PURE__ */ n("section", { className: "rounded-lg border border-slate-200 bg-white dark:border-border dark:bg-card", children: [
543
+ tasks: () => /* @__PURE__ */ s("section", { className: "rounded-lg border border-slate-200 bg-white dark:border-border dark:bg-card", children: [
546
544
  /* @__PURE__ */ e("div", { className: "border-b border-slate-200 px-4 py-2.5 dark:border-border", children: /* @__PURE__ */ e("h2", { className: "text-[13px] font-medium", children: "My tasks" }) }),
547
- a.tasks.length === 0 ? /* @__PURE__ */ e("p", { className: "px-4 py-5 text-center text-[12.5px] text-muted-foreground", children: "No open tasks." }) : /* @__PURE__ */ e("ul", { className: "divide-y divide-slate-100 dark:divide-border/60", children: a.tasks.map((t) => /* @__PURE__ */ n(
545
+ a.tasks.length === 0 ? /* @__PURE__ */ e("p", { className: "px-4 py-5 text-center text-[12.5px] text-muted-foreground", children: "No open tasks." }) : /* @__PURE__ */ e("ul", { className: "divide-y divide-slate-100 dark:divide-border/60", children: a.tasks.map((r) => /* @__PURE__ */ s(
548
546
  "li",
549
547
  {
550
- className: I("flex items-center gap-2.5 px-4 py-2", S(`t:${t.id}`)),
548
+ className: I("flex items-center gap-2.5 px-4 py-2", S(`t:${r.id}`)),
551
549
  children: [
552
550
  /* @__PURE__ */ e(
553
551
  "button",
554
552
  {
555
553
  type: "button",
556
554
  title: "Mark done",
557
- onClick: () => ie.mutate(t),
558
- disabled: ie.isPending,
555
+ onClick: () => se.mutate(r),
556
+ disabled: se.isPending,
559
557
  className: "flex h-4 w-4 shrink-0 items-center justify-center rounded border border-slate-300 text-transparent hover:border-emerald-500 hover:text-emerald-500 dark:border-border",
560
558
  children: "✓"
561
559
  }
562
560
  ),
563
- t.priority === "urgent" && /* @__PURE__ */ e("span", { className: "shrink-0 rounded bg-red-500/10 px-1 py-px text-[9.5px] font-semibold uppercase tracking-wide text-red-600 dark:text-red-400", children: "urgent" }),
564
- t.kind === "support" && /* @__PURE__ */ e("span", { className: "shrink-0 rounded bg-slate-100 px-1 py-px text-[9.5px] font-semibold uppercase tracking-wide text-slate-600 dark:bg-white/10 dark:text-slate-300", children: "support" }),
565
- t.agent_assignee && /* @__PURE__ */ n(
561
+ r.priority === "urgent" && /* @__PURE__ */ e("span", { className: "shrink-0 rounded bg-red-500/10 px-1 py-px text-[9.5px] font-semibold uppercase tracking-wide text-red-600 dark:text-red-400", children: "urgent" }),
562
+ r.kind === "support" && /* @__PURE__ */ e("span", { className: "shrink-0 rounded bg-slate-100 px-1 py-px text-[9.5px] font-semibold uppercase tracking-wide text-slate-600 dark:bg-white/10 dark:text-slate-300", children: "support" }),
563
+ r.agent_assignee && /* @__PURE__ */ s(
566
564
  "span",
567
565
  {
568
566
  className: "inline-flex shrink-0 items-center gap-1 rounded bg-nvr-cyan/10 px-1 py-px text-[10px] font-medium text-[#0e7490] dark:text-[#67e8f9]",
569
- "data-tip": `Handed to ${t.agent_name ?? "your agent"} — it picks this up through My Work`,
570
- "data-my-work-agent-task": t.id,
567
+ "data-tip": `Handed to ${r.agent_name ?? "your agent"} — it picks this up through My Work`,
568
+ "data-my-work-agent-task": r.id,
571
569
  children: [
572
- /* @__PURE__ */ e(Te, { className: "h-3 w-3", "aria-hidden": !0 }),
573
- t.agent_name ?? "Agent"
570
+ /* @__PURE__ */ e($e, { className: "h-3 w-3", "aria-hidden": !0 }),
571
+ r.agent_name ?? "Agent"
574
572
  ]
575
573
  }
576
574
  ),
577
- /* @__PURE__ */ n(
575
+ /* @__PURE__ */ s(
578
576
  "button",
579
577
  {
580
578
  type: "button",
581
- onClick: (m) => t.kind === "support" ? X(t.id) : C(t.collection, t.item, m),
579
+ onClick: (m) => r.kind === "support" ? Y(r.id) : C(r.collection, r.item, m),
582
580
  className: "min-w-0 flex-1 truncate text-left text-[12.5px] hover:underline",
583
581
  children: [
584
- t.title,
585
- t.item_label && /* @__PURE__ */ e("span", { className: "ml-1.5 text-[11px] text-muted-foreground", children: t.item_label })
582
+ r.title,
583
+ r.item_label && /* @__PURE__ */ e("span", { className: "ml-1.5 text-[11px] text-muted-foreground", children: r.item_label })
586
584
  ]
587
585
  }
588
586
  ),
589
587
  /* @__PURE__ */ e(
590
- Ve,
588
+ Je,
591
589
  {
592
- task: t,
590
+ task: r,
593
591
  isAssignee: !0,
594
592
  compact: !0,
595
593
  onTaskChanged: () => void v.invalidateQueries({ queryKey: ["my-work"] })
596
594
  }
597
595
  ),
598
- t.due_date && /* @__PURE__ */ e(
596
+ r.due_date && /* @__PURE__ */ e(
599
597
  "span",
600
598
  {
601
- className: `text-[11px] tabular-nums ${E(t.due_date) ? "font-medium text-red-600 dark:text-red-400" : "text-muted-foreground"}`,
602
- children: new Date(t.due_date).toLocaleDateString(void 0, { timeZone: "UTC" })
599
+ className: `text-[11px] tabular-nums ${F(r.due_date) ? "font-medium text-red-600 dark:text-red-400" : "text-muted-foreground"}`,
600
+ children: new Date(r.due_date).toLocaleDateString(void 0, { timeZone: "UTC" })
603
601
  }
604
602
  )
605
603
  ]
606
604
  },
607
- t.id
605
+ r.id
608
606
  )) })
609
607
  ] }),
610
- team: () => !a.on_a_team && !(a.team_tasks ?? []).length ? null : /* @__PURE__ */ n(
608
+ team: () => !a.on_a_team && !(a.team_tasks ?? []).length ? null : /* @__PURE__ */ s(
611
609
  "section",
612
610
  {
613
611
  className: "rounded-lg border border-slate-200 bg-white dark:border-border dark:bg-card",
614
612
  "data-my-work-team": !0,
615
613
  children: [
616
- /* @__PURE__ */ n("div", { className: "border-b border-slate-200 px-4 py-2.5 dark:border-border", children: [
614
+ /* @__PURE__ */ s("div", { className: "border-b border-slate-200 px-4 py-2.5 dark:border-border", children: [
617
615
  /* @__PURE__ */ e("h2", { className: "text-[13px] font-medium", children: "Team tasks" }),
618
616
  /* @__PURE__ */ e("p", { className: "text-[11px] text-muted-foreground", children: "Waiting with a team you are on — pick one up to make it yours." })
619
617
  ] }),
620
- (a.team_tasks ?? []).length === 0 ? /* @__PURE__ */ e("p", { className: "px-4 py-5 text-center text-[12.5px] text-muted-foreground", children: "Nothing waiting with your teams." }) : /* @__PURE__ */ e("ul", { className: "divide-y divide-slate-100 dark:divide-border/60", children: (a.team_tasks ?? []).map((t) => /* @__PURE__ */ n(
618
+ (a.team_tasks ?? []).length === 0 ? /* @__PURE__ */ e("p", { className: "px-4 py-5 text-center text-[12.5px] text-muted-foreground", children: "Nothing waiting with your teams." }) : /* @__PURE__ */ e("ul", { className: "divide-y divide-slate-100 dark:divide-border/60", children: (a.team_tasks ?? []).map((r) => /* @__PURE__ */ s(
621
619
  "li",
622
620
  {
623
- className: I("flex items-center gap-2.5 px-4 py-2", S(`tt:${t.id}`)),
624
- "data-my-work-team-task": t.id,
621
+ className: I("flex items-center gap-2.5 px-4 py-2", S(`tt:${r.id}`)),
622
+ "data-my-work-team-task": r.id,
625
623
  children: [
626
- t.priority === "urgent" && /* @__PURE__ */ e("span", { className: "shrink-0 rounded bg-red-500/10 px-1 py-px text-[9.5px] font-semibold uppercase tracking-wide text-red-600 dark:text-red-400", children: "urgent" }),
627
- /* @__PURE__ */ n(
624
+ r.priority === "urgent" && /* @__PURE__ */ e("span", { className: "shrink-0 rounded bg-red-500/10 px-1 py-px text-[9.5px] font-semibold uppercase tracking-wide text-red-600 dark:text-red-400", children: "urgent" }),
625
+ /* @__PURE__ */ s(
628
626
  "button",
629
627
  {
630
628
  type: "button",
631
- onClick: (m) => C(t.collection, t.item, m),
629
+ onClick: (m) => C(r.collection, r.item, m),
632
630
  className: "min-w-0 flex-1 truncate text-left text-[12.5px] hover:underline",
633
631
  children: [
634
- t.title,
635
- /* @__PURE__ */ e("span", { className: "ml-1.5 text-[11px] text-muted-foreground", children: [t.team_name, t.item_label].filter(Boolean).join(" · ") })
632
+ r.title,
633
+ /* @__PURE__ */ e("span", { className: "ml-1.5 text-[11px] text-muted-foreground", children: [r.team_name, r.item_label].filter(Boolean).join(" · ") })
636
634
  ]
637
635
  }
638
636
  ),
639
- t.due_date && /* @__PURE__ */ e(
637
+ r.due_date && /* @__PURE__ */ e(
640
638
  "span",
641
639
  {
642
- className: `text-[11px] tabular-nums ${E(t.due_date) ? "font-medium text-red-600 dark:text-red-400" : "text-muted-foreground"}`,
643
- children: new Date(t.due_date).toLocaleDateString(void 0, {
640
+ className: `text-[11px] tabular-nums ${F(r.due_date) ? "font-medium text-red-600 dark:text-red-400" : "text-muted-foreground"}`,
641
+ children: new Date(r.due_date).toLocaleDateString(void 0, {
644
642
  timeZone: "UTC"
645
643
  })
646
644
  }
@@ -649,51 +647,51 @@ function Pt({
649
647
  "button",
650
648
  {
651
649
  type: "button",
652
- onClick: () => q.mutate({ id: t.id, action: "claim" }),
650
+ onClick: () => q.mutate({ id: r.id, action: "claim" }),
653
651
  disabled: q.isPending,
654
652
  className: "shrink-0 rounded-md border border-slate-200 px-2 py-0.5 text-[11px] font-medium hover:bg-muted dark:border-border",
655
- "data-my-work-claim": t.id,
653
+ "data-my-work-claim": r.id,
656
654
  children: "Pick it up"
657
655
  }
658
656
  )
659
657
  ]
660
658
  },
661
- t.id
659
+ r.id
662
660
  )) })
663
661
  ]
664
662
  }
665
663
  ),
666
664
  waiting: () => {
667
- const t = a.requested ?? [], m = t.filter((o) => E(o.due_date)).length;
668
- return /* @__PURE__ */ n(
665
+ const r = a.requested ?? [], m = r.filter((o) => F(o.due_date)).length;
666
+ return /* @__PURE__ */ s(
669
667
  "section",
670
668
  {
671
669
  className: "rounded-lg border border-slate-200 bg-white dark:border-border dark:bg-card",
672
670
  "data-my-work-waiting": !0,
673
671
  children: [
674
- /* @__PURE__ */ n("div", { className: "border-b border-slate-200 px-4 py-2.5 dark:border-border", children: [
675
- /* @__PURE__ */ n("h2", { className: "text-[13px] font-medium", children: [
672
+ /* @__PURE__ */ s("div", { className: "border-b border-slate-200 px-4 py-2.5 dark:border-border", children: [
673
+ /* @__PURE__ */ s("h2", { className: "text-[13px] font-medium", children: [
676
674
  "Waiting on others",
677
- m > 0 && /* @__PURE__ */ n("span", { className: "ml-2 rounded bg-red-500/10 px-1.5 py-0.5 text-[10.5px] font-semibold text-red-600 dark:text-red-400", children: [
675
+ m > 0 && /* @__PURE__ */ s("span", { className: "ml-2 rounded bg-red-500/10 px-1.5 py-0.5 text-[10.5px] font-semibold text-red-600 dark:text-red-400", children: [
678
676
  m,
679
677
  " overdue"
680
678
  ] })
681
679
  ] }),
682
680
  /* @__PURE__ */ e("p", { className: "text-[11px] text-muted-foreground", children: "Tasks you asked someone else to do." })
683
681
  ] }),
684
- t.length === 0 ? /* @__PURE__ */ e("p", { className: "px-4 py-5 text-center text-[12.5px] text-muted-foreground", children: "You are not waiting on anyone." }) : /* @__PURE__ */ e("ul", { className: "divide-y divide-slate-100 dark:divide-border/60", children: t.map((o) => {
685
- const N = E(o.due_date), T = !!o.nudged_at && Date.now() - new Date(o.nudged_at).getTime() < 20 * 36e5;
686
- return /* @__PURE__ */ n(
682
+ r.length === 0 ? /* @__PURE__ */ e("p", { className: "px-4 py-5 text-center text-[12.5px] text-muted-foreground", children: "You are not waiting on anyone." }) : /* @__PURE__ */ e("ul", { className: "divide-y divide-slate-100 dark:divide-border/60", children: r.map((o) => {
683
+ const N = F(o.due_date), T = !!o.nudged_at && Date.now() - new Date(o.nudged_at).getTime() < 20 * 36e5;
684
+ return /* @__PURE__ */ s(
687
685
  "li",
688
686
  {
689
687
  className: I("flex items-center gap-2.5 px-4 py-2", S(`r:${o.id}`)),
690
688
  "data-my-work-requested": o.id,
691
689
  children: [
692
- /* @__PURE__ */ n(
690
+ /* @__PURE__ */ s(
693
691
  "button",
694
692
  {
695
693
  type: "button",
696
- onClick: (R) => o.kind === "support" ? X(o.id) : C(o.collection, o.item, R),
694
+ onClick: (Q) => o.kind === "support" ? Y(o.id) : C(o.collection, o.item, Q),
697
695
  className: "min-w-0 flex-1 truncate text-left text-[12.5px] hover:underline",
698
696
  children: [
699
697
  o.title,
@@ -704,7 +702,7 @@ function Pt({
704
702
  ]
705
703
  }
706
704
  ),
707
- o.due_date && /* @__PURE__ */ n(
705
+ o.due_date && /* @__PURE__ */ s(
708
706
  "span",
709
707
  {
710
708
  className: `text-[11px] tabular-nums ${N ? "font-medium text-red-600 dark:text-red-400" : "text-muted-foreground"}`,
@@ -737,48 +735,48 @@ function Pt({
737
735
  }
738
736
  );
739
737
  },
740
- notifications: () => /* @__PURE__ */ n("section", { className: "rounded-lg border border-slate-200 bg-white dark:border-border dark:bg-card", children: [
741
- /* @__PURE__ */ n("div", { className: "flex items-center justify-between border-b border-slate-200 px-4 py-2.5 dark:border-border", children: [
738
+ notifications: () => /* @__PURE__ */ s("section", { className: "rounded-lg border border-slate-200 bg-white dark:border-border dark:bg-card", children: [
739
+ /* @__PURE__ */ s("div", { className: "flex items-center justify-between border-b border-slate-200 px-4 py-2.5 dark:border-border", children: [
742
740
  /* @__PURE__ */ e("h2", { className: "text-[13px] font-medium", children: "Unread notifications" }),
743
741
  a.notifications.length > 0 && /* @__PURE__ */ e(
744
742
  "button",
745
743
  {
746
744
  type: "button",
747
- onClick: () => le.mutate(a.notifications.map((t) => t.id)),
745
+ onClick: () => ne.mutate(a.notifications.map((r) => r.id)),
748
746
  className: "text-[11px] text-[#00a5cc] hover:underline",
749
747
  children: "Mark all read"
750
748
  }
751
749
  )
752
750
  ] }),
753
- a.notifications.length === 0 ? /* @__PURE__ */ e("p", { className: "px-4 py-5 text-center text-[12.5px] text-muted-foreground", children: "You're all caught up." }) : /* @__PURE__ */ e("ul", { className: "divide-y divide-slate-100 dark:divide-border/60", children: a.notifications.map((t) => /* @__PURE__ */ n(
751
+ a.notifications.length === 0 ? /* @__PURE__ */ e("p", { className: "px-4 py-5 text-center text-[12.5px] text-muted-foreground", children: "You're all caught up." }) : /* @__PURE__ */ e("ul", { className: "divide-y divide-slate-100 dark:divide-border/60", children: a.notifications.map((r) => /* @__PURE__ */ s(
754
752
  "li",
755
753
  {
756
- className: I("flex items-start gap-2.5 px-4 py-2", S(`n:${t.id}`)),
754
+ className: I("flex items-start gap-2.5 px-4 py-2", S(`n:${r.id}`)),
757
755
  children: [
758
756
  /* @__PURE__ */ e(
759
- dt,
757
+ nt,
760
758
  {
761
- userId: t.sender,
759
+ userId: r.sender,
762
760
  className: "mt-0.5 h-5 w-5",
763
761
  fallback: /* @__PURE__ */ e("span", { className: "mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-slate-100 text-[9px] font-semibold text-slate-500 dark:bg-muted" })
764
762
  }
765
763
  ),
766
- ve(t.collection, t.item) ? /* @__PURE__ */ n(
764
+ Ne(r.collection, r.item) ? /* @__PURE__ */ s(
767
765
  "button",
768
766
  {
769
767
  type: "button",
770
- onClick: (m) => C(t.collection, t.item, m, a.notifications),
768
+ onClick: (m) => C(r.collection, r.item, m, a.notifications),
771
769
  className: "min-w-0 flex-1 cursor-pointer text-left hover:opacity-80",
772
770
  children: [
773
- /* @__PURE__ */ e("p", { className: "truncate text-[12.5px] font-medium", children: t.subject }),
774
- t.message && /* @__PURE__ */ e("p", { className: "truncate text-[11.5px] text-muted-foreground", children: t.message })
771
+ /* @__PURE__ */ e("p", { className: "truncate text-[12.5px] font-medium", children: r.subject }),
772
+ r.message && /* @__PURE__ */ e("p", { className: "truncate text-[11.5px] text-muted-foreground", children: r.message })
775
773
  ]
776
774
  }
777
775
  ) : (
778
776
  // Nowhere to open: plain text, never a button that does nothing.
779
- /* @__PURE__ */ n("div", { className: "min-w-0 flex-1", "data-notification-plain": !0, children: [
780
- /* @__PURE__ */ e("p", { className: "truncate text-[12.5px] font-medium", children: t.subject }),
781
- t.message && /* @__PURE__ */ e("p", { className: "truncate text-[11.5px] text-muted-foreground", children: t.message })
777
+ /* @__PURE__ */ s("div", { className: "min-w-0 flex-1", "data-notification-plain": !0, children: [
778
+ /* @__PURE__ */ e("p", { className: "truncate text-[12.5px] font-medium", children: r.subject }),
779
+ r.message && /* @__PURE__ */ e("p", { className: "truncate text-[11.5px] text-muted-foreground", children: r.message })
782
780
  ] })
783
781
  ),
784
782
  /* @__PURE__ */ e(
@@ -787,58 +785,58 @@ function Pt({
787
785
  type: "button",
788
786
  "aria-label": "Mark read",
789
787
  "data-tip": "Mark read",
790
- onClick: () => le.mutate([t.id]),
788
+ onClick: () => ne.mutate([r.id]),
791
789
  className: "mt-0.5 shrink-0 rounded p-1 text-slate-400 hover:bg-slate-100 hover:text-slate-700 dark:hover:bg-muted dark:hover:text-slate-200",
792
- children: /* @__PURE__ */ e($e, { className: "h-3 w-3" })
790
+ children: /* @__PURE__ */ e(Ce, { className: "h-3 w-3" })
793
791
  }
794
792
  )
795
793
  ]
796
794
  },
797
- t.id
795
+ r.id
798
796
  )) })
799
797
  ] })
800
- }, s = new Map(
801
- x.order.filter((t) => !x.hidden.includes(t) && r[t]).map((t) => [t, r[t]()]).filter(([, t]) => t != null)
802
- ), h = [...s.keys()], c = [];
798
+ }, n = new Map(
799
+ x.order.filter((r) => !x.hidden.includes(r) && t[r]).map((r) => [r, t[r]()]).filter(([, r]) => r != null)
800
+ ), h = [...n.keys()], c = [];
803
801
  let b = 0;
804
802
  for (; b < h.length; ) {
805
- const t = h[b];
806
- if (be.has(t))
803
+ const r = h[b];
804
+ if (he.has(r))
807
805
  c.push(
808
- /* @__PURE__ */ e("div", { className: "min-w-0", children: s.get(t) }, t)
806
+ /* @__PURE__ */ e("div", { className: "min-w-0", children: n.get(r) }, r)
809
807
  ), b++;
810
808
  else {
811
- const m = [t];
812
- b + 1 < h.length && !be.has(h[b + 1]) && m.push(h[b + 1]), c.push(
813
- /* @__PURE__ */ e("div", { className: "grid grid-cols-1 gap-5 lg:grid-cols-2", children: m.map((o) => /* @__PURE__ */ e("div", { className: "min-w-0", children: s.get(o) }, o)) }, m.join("+"))
809
+ const m = [r];
810
+ b + 1 < h.length && !he.has(h[b + 1]) && m.push(h[b + 1]), c.push(
811
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-1 gap-5 lg:grid-cols-2", children: m.map((o) => /* @__PURE__ */ e("div", { className: "min-w-0", children: n.get(o) }, o)) }, m.join("+"))
814
812
  ), b += m.length;
815
813
  }
816
814
  }
817
815
  return c;
818
816
  })(),
819
- /* @__PURE__ */ e(ht, {})
817
+ /* @__PURE__ */ e(pt, {})
820
818
  ] });
821
819
  }
822
- function ht() {
823
- const d = Ze(), { rooms: u } = Ge(d);
824
- return !d || u.length === 0 ? null : /* @__PURE__ */ n(
820
+ function pt() {
821
+ const d = Ye(), { rooms: u } = Ze(d);
822
+ return !d || u.length === 0 ? null : /* @__PURE__ */ s(
825
823
  "section",
826
824
  {
827
825
  className: "rounded-lg border border-slate-200 bg-white dark:border-border dark:bg-card",
828
826
  "data-my-work-chat": !0,
829
827
  children: [
830
828
  /* @__PURE__ */ e("div", { className: "border-b border-slate-200 px-4 py-2.5 dark:border-border", children: /* @__PURE__ */ e("h2", { className: "text-[13px] font-medium", children: "Record conversations" }) }),
831
- /* @__PURE__ */ e("ul", { className: "divide-y divide-slate-100 dark:divide-border/60", children: u.map((l) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ n(
829
+ /* @__PURE__ */ e("ul", { className: "divide-y divide-slate-100 dark:divide-border/60", children: u.map((l) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ s(
832
830
  "button",
833
831
  {
834
832
  type: "button",
835
- onClick: () => Ye(l.room, l.label),
833
+ onClick: () => Ve(l.room, l.label),
836
834
  className: "flex w-full items-center gap-2.5 px-4 py-2 text-left hover:bg-slate-50 dark:hover:bg-muted/40",
837
835
  "data-my-work-chat-room": l.room,
838
836
  children: [
839
- /* @__PURE__ */ n("span", { className: "min-w-0 flex-1", children: [
837
+ /* @__PURE__ */ s("span", { className: "min-w-0 flex-1", children: [
840
838
  /* @__PURE__ */ e("span", { className: "block truncate text-[12.5px] font-medium", children: l.label }),
841
- l.last_message && /* @__PURE__ */ n("span", { className: "block truncate text-[11.5px] text-muted-foreground", children: [
839
+ l.last_message && /* @__PURE__ */ s("span", { className: "block truncate text-[11.5px] text-muted-foreground", children: [
842
840
  l.last_message.sender_name ? `${l.last_message.sender_name}: ` : "",
843
841
  l.last_message.message.replace(/@\[([^\]]+)\]/g, "@$1")
844
842
  ] })
@@ -854,5 +852,5 @@ function ht() {
854
852
  }
855
853
  export {
856
854
  Pt as MyWorkView,
857
- ct as touchesOnScreen
855
+ lt as touchesOnScreen
858
856
  };