@nivaro/react 0.3.114 → 0.3.115

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 (281) hide show
  1. package/dist/components/ScreenShareHost.js +24 -0
  2. package/dist/full.css +50 -2
  3. package/dist/hooks/useSessionRecorder.js +61 -60
  4. package/dist/index.d.ts +1717 -21
  5. package/dist/index.js +1091 -950
  6. package/dist/shared/components/ActivityEntry.js +209 -97
  7. package/dist/shared/components/AgentPresenceChip.js +51 -0
  8. package/dist/shared/components/AnnouncementBanner.js +56 -41
  9. package/dist/shared/components/AutolinkedText.js +98 -85
  10. package/dist/shared/components/BroadcastView.js +149 -141
  11. package/dist/shared/components/CacheStamp.js +78 -30
  12. package/dist/shared/components/CollectionBrowserView.js +4088 -3592
  13. package/dist/shared/components/ConfigChangeStrip.js +63 -0
  14. package/dist/shared/components/ConfigReachNote.js +107 -0
  15. package/dist/shared/components/ConformanceView.js +389 -319
  16. package/dist/shared/components/DataTable.js +1 -0
  17. package/dist/shared/components/DelegateCoverLine.js +164 -0
  18. package/dist/shared/components/EnvironmentNotice.js +56 -65
  19. package/dist/shared/components/FilePreviewLightbox.js +89 -43
  20. package/dist/shared/components/FindingFixedMark.js +23 -0
  21. package/dist/shared/components/GridPresenceLine.js +100 -0
  22. package/dist/shared/components/IdleReloadWatcher.js +82 -43
  23. package/dist/shared/components/InStep.js +46 -0
  24. package/dist/shared/components/ItemEditForm.js +5504 -4889
  25. package/dist/shared/components/LiveAnnouncer.js +62 -0
  26. package/dist/shared/components/LiveCount.js +54 -0
  27. package/dist/shared/components/LiveFigure.js +28 -0
  28. package/dist/shared/components/LiveListControls.js +114 -0
  29. package/dist/shared/components/LiveNewMatchesPill.js +25 -0
  30. package/dist/shared/components/LiveOffNote.js +44 -0
  31. package/dist/shared/components/LivePreferenceHost.js +42 -0
  32. package/dist/shared/components/LiveRowMark.js +25 -20
  33. package/dist/shared/components/LiveTraceView.js +257 -0
  34. package/dist/shared/components/MapView.js +30 -29
  35. package/dist/shared/components/MatrixEditor.js +497 -462
  36. package/dist/shared/components/MyWorkView.js +346 -272
  37. package/dist/shared/components/NotificationBell.js +215 -201
  38. package/dist/shared/components/PageRenderer.js +636 -599
  39. package/dist/shared/components/PresenceDot.js +21 -0
  40. package/dist/shared/components/ProfileView.js +656 -536
  41. package/dist/shared/components/RealtimeStatusBanner.js +25 -25
  42. package/dist/shared/components/RecentRecordsRail.js +51 -48
  43. package/dist/shared/components/RecordCompare.js +241 -150
  44. package/dist/shared/components/RecordDrilldownSheet.js +66 -64
  45. package/dist/shared/components/RecordGridEditor.js +350 -311
  46. package/dist/shared/components/RecordHoverCard.js +147 -0
  47. package/dist/shared/components/RecordPeekHost.js +111 -0
  48. package/dist/shared/components/RecordReadView.js +414 -412
  49. package/dist/shared/components/RelativeTime.js +16 -0
  50. package/dist/shared/components/ReportView.js +1396 -1304
  51. package/dist/shared/components/ScreenRefreshButton.js +77 -0
  52. package/dist/shared/components/TabCountHost.js +10 -0
  53. package/dist/shared/components/TickerNumber.js +19 -18
  54. package/dist/shared/components/TipLayer.js +70 -58
  55. package/dist/shared/components/WidgetImageMenu.js +59 -0
  56. package/dist/shared/components/WidgetSlot.js +571 -524
  57. package/dist/shared/components/activity/RecordActivityStream.js +317 -0
  58. package/dist/shared/components/bulk/BulkSelectionNotices.js +220 -0
  59. package/dist/shared/components/cbv/approval-changed.js +20 -0
  60. package/dist/shared/components/cbv/changed-by-others.js +251 -0
  61. package/dist/shared/components/change-proposals/ChangeProposalsPanel.js +320 -0
  62. package/dist/shared/components/change-proposals/ProposalValue.js +28 -0
  63. package/dist/shared/components/change-proposals/ProposeChangeButton.js +44 -0
  64. package/dist/shared/components/change-proposals/ProposeChangeDialog.js +359 -0
  65. package/dist/shared/components/change-proposals/types.js +4 -0
  66. package/dist/shared/components/chat/ChatPanel.js +1571 -1528
  67. package/dist/shared/components/chat/Composer.js +276 -298
  68. package/dist/shared/components/chat/room-due.js +13 -0
  69. package/dist/shared/components/collections-directory/CollectionRow.js +76 -75
  70. package/dist/shared/components/collections-directory/CollectionsDirectory.js +415 -395
  71. package/dist/shared/components/collections-directory/directory-data.js +75 -63
  72. package/dist/shared/components/imports/ImportConsole.js +159 -155
  73. package/dist/shared/components/imports/ImportDuplicatesNotice.js +46 -31
  74. package/dist/shared/components/integrations/SendStatus.js +202 -0
  75. package/dist/shared/components/integrations/console/IntegrationsConsole.js +45 -36
  76. package/dist/shared/components/integrations/console/ReadyToSendView.js +453 -0
  77. package/dist/shared/components/integrations/console/api.js +161 -117
  78. package/dist/shared/components/integrations/console/tone.js +15 -12
  79. package/dist/shared/components/item-edit/CatalogPickerField.js +1353 -1245
  80. package/dist/shared/components/item-edit/ChangedAfterApprovalBadge.js +162 -0
  81. package/dist/shared/components/item-edit/CloneDialog.js +208 -206
  82. package/dist/shared/components/item-edit/DerivedCauseNote.js +57 -0
  83. package/dist/shared/components/item-edit/DraftRecoveryBanner.js +81 -70
  84. package/dist/shared/components/item-edit/DuplicateNotice.js +169 -101
  85. package/dist/shared/components/item-edit/FieldAffordances.js +294 -385
  86. package/dist/shared/components/item-edit/FieldComments.js +159 -116
  87. package/dist/shared/components/item-edit/FieldPointer.js +132 -0
  88. package/dist/shared/components/item-edit/FieldRenderer.js +277 -273
  89. package/dist/shared/components/item-edit/FieldRow.js +519 -439
  90. package/dist/shared/components/item-edit/FieldSourceBadge.js +88 -0
  91. package/dist/shared/components/item-edit/FilePickerField.js +454 -369
  92. package/dist/shared/components/item-edit/GroupSection.js +618 -567
  93. package/dist/shared/components/item-edit/HeldEditsChip.js +113 -0
  94. package/dist/shared/components/item-edit/InlineTableField.js +2891 -2723
  95. package/dist/shared/components/item-edit/ListNeighborNav.js +79 -0
  96. package/dist/shared/components/item-edit/LiveTraceSheet.js +26 -0
  97. package/dist/shared/components/item-edit/M2MCombobox.js +284 -273
  98. package/dist/shared/components/item-edit/OutboxReviewTray.js +313 -0
  99. package/dist/shared/components/item-edit/PickerBadges.js +52 -0
  100. package/dist/shared/components/item-edit/PlanGrid.js +434 -439
  101. package/dist/shared/components/item-edit/RecalcValue.js +55 -0
  102. package/dist/shared/components/item-edit/RecordChatActions.js +76 -64
  103. package/dist/shared/components/item-edit/RecordChatMentionsChip.js +103 -0
  104. package/dist/shared/components/item-edit/RecordGrantTools.js +87 -86
  105. package/dist/shared/components/item-edit/RecordHelpChip.js +70 -0
  106. package/dist/shared/components/item-edit/RecordLiveSync.js +230 -217
  107. package/dist/shared/components/item-edit/RecordOutbox.js +53 -52
  108. package/dist/shared/components/item-edit/RecordRecapStrip.js +109 -36
  109. package/dist/shared/components/item-edit/RelationCombobox.js +229 -217
  110. package/dist/shared/components/item-edit/RelationGroupedCombobox.js +105 -100
  111. package/dist/shared/components/item-edit/RemoteChangeUi.js +454 -0
  112. package/dist/shared/components/item-edit/RemoteUploads.js +55 -0
  113. package/dist/shared/components/item-edit/RemovedLineNote.js +92 -0
  114. package/dist/shared/components/item-edit/RichTextEditorImpl.js +298 -223
  115. package/dist/shared/components/item-edit/ScheduledChangeChip.js +244 -0
  116. package/dist/shared/components/item-edit/SectionPresence.js +78 -0
  117. package/dist/shared/components/item-edit/SplitLinesButton.js +166 -0
  118. package/dist/shared/components/item-edit/catalog-line-watch.js +94 -0
  119. package/dist/shared/components/item-edit/coedit/collab.js +84 -0
  120. package/dist/shared/components/item-edit/coedit/context.js +24 -0
  121. package/dist/shared/components/item-edit/coedit/cursors.js +103 -0
  122. package/dist/shared/components/item-edit/coedit/safe-link.js +15 -0
  123. package/dist/shared/components/item-edit/coedit/session.js +382 -0
  124. package/dist/shared/components/item-edit/coedit/useCoedit.js +49 -0
  125. package/dist/shared/components/item-edit/file-live.js +77 -0
  126. package/dist/shared/components/item-edit/file-processing.js +87 -0
  127. package/dist/shared/components/item-edit/layout-switch.js +148 -0
  128. package/dist/shared/components/item-edit/live-related.js +23 -0
  129. package/dist/shared/components/item-edit/live-title.js +66 -0
  130. package/dist/shared/components/item-edit/partner-needs.js +142 -0
  131. package/dist/shared/components/item-edit/removed-line.js +58 -0
  132. package/dist/shared/components/item-edit/render-stability.js +70 -59
  133. package/dist/shared/components/layout-editor/ChangeNote.js +36 -34
  134. package/dist/shared/components/layout-editor/CollabParts.js +72 -70
  135. package/dist/shared/components/layout-editor/LayoutEditor.js +306 -303
  136. package/dist/shared/components/list/InlineEdit.js +504 -208
  137. package/dist/shared/components/list/ListViewers.js +81 -0
  138. package/dist/shared/components/merge/MergeRecordsDialog.js +1227 -0
  139. package/dist/shared/components/merge/MergeWithFlow.js +290 -0
  140. package/dist/shared/components/merge/merge-values.js +110 -0
  141. package/dist/shared/components/monitoring/InactiveUserLinksView.js +285 -258
  142. package/dist/shared/components/notifications/NotificationCenterView.js +388 -321
  143. package/dist/shared/components/notifications/NotificationDetailBits.js +205 -130
  144. package/dist/shared/components/notifications/NotificationRulesEditor.js +72 -52
  145. package/dist/shared/components/notifications/bundles.js +21 -19
  146. package/dist/shared/components/notifications/resolved-line.js +25 -0
  147. package/dist/shared/components/ops/OpsTasksView.js +45 -44
  148. package/dist/shared/components/panels/AccessGrantedNote.js +85 -0
  149. package/dist/shared/components/panels/AlertBanners.js +132 -0
  150. package/dist/shared/components/panels/AsyncUserPicker.js +54 -45
  151. package/dist/shared/components/panels/BranchLanes.js +82 -54
  152. package/dist/shared/components/panels/CommentAwareness.js +332 -0
  153. package/dist/shared/components/panels/CommentImages.js +219 -0
  154. package/dist/shared/components/panels/CommentPanel.js +649 -530
  155. package/dist/shared/components/panels/ExternalRequestsChip.js +98 -80
  156. package/dist/shared/components/panels/NewSinceChip.js +16 -0
  157. package/dist/shared/components/panels/OwnerOpenedLine.js +85 -0
  158. package/dist/shared/components/panels/PipelinePanel.js +1644 -1494
  159. package/dist/shared/components/panels/ResubmissionDiff.js +293 -0
  160. package/dist/shared/components/panels/SlaBreachBanner.js +30 -29
  161. package/dist/shared/components/panels/SlaClock.js +130 -99
  162. package/dist/shared/components/panels/TaskPanel.js +308 -287
  163. package/dist/shared/components/panels/unseen-move-check.js +101 -0
  164. package/dist/shared/components/pipeline/OwnerMatrix.js +80 -71
  165. package/dist/shared/components/pipeline/OwnerMatrixSheet.js +495 -0
  166. package/dist/shared/components/pipeline/PipelineEditorView.js +1855 -1771
  167. package/dist/shared/components/profile/AgentNameField.js +141 -0
  168. package/dist/shared/components/profile/AgentsPanel.js +55 -46
  169. package/dist/shared/components/profile/PersonAccess.js +398 -330
  170. package/dist/shared/components/profile/PersonAdminTools.js +127 -113
  171. package/dist/shared/components/profile/PersonProfile.js +81 -73
  172. package/dist/shared/components/profile/SignInTroubleshooter.js +361 -0
  173. package/dist/shared/components/queue/QueueBulkBar.js +101 -84
  174. package/dist/shared/components/queue/QueueItemSheet.js +66 -66
  175. package/dist/shared/components/queue/QueueTeamStrip.js +279 -0
  176. package/dist/shared/components/queue/QueueWorklist.js +1927 -1635
  177. package/dist/shared/components/send-view/SendViewButton.js +136 -0
  178. package/dist/shared/components/send-view/SentViewCards.js +147 -0
  179. package/dist/shared/components/support/ReportProblem.js +1 -0
  180. package/dist/shared/components/support/ScreenShare.js +554 -0
  181. package/dist/shared/components/support/SupportView.js +160 -129
  182. package/dist/shared/components/support/TicketDetailSheet.js +101 -89
  183. package/dist/shared/components/watch-list/WatchDock.js +1044 -0
  184. package/dist/shared/components/watch-list/WatchExtras.js +723 -0
  185. package/dist/shared/components/watch-list/WatchListButton.js +46 -0
  186. package/dist/shared/components/watch-list/WatchPinButton.js +67 -0
  187. package/dist/shared/components/watch-list/WatchRows.js +348 -0
  188. package/dist/shared/lib/activity-sentence.js +87 -75
  189. package/dist/shared/lib/agent-presence.js +46 -0
  190. package/dist/shared/lib/approval-progress.js +49 -0
  191. package/dist/shared/lib/attention-prefs.js +27 -0
  192. package/dist/shared/lib/cell-locks.js +56 -0
  193. package/dist/shared/lib/co-edit.js +166 -0
  194. package/dist/shared/lib/coedit-registry.js +44 -0
  195. package/dist/shared/lib/comment-awareness.js +124 -0
  196. package/dist/shared/lib/comment-images.js +45 -0
  197. package/dist/shared/lib/config-watch.js +94 -0
  198. package/dist/shared/lib/copy-rules.js +65 -0
  199. package/dist/shared/lib/count-step.js +30 -0
  200. package/dist/shared/lib/deadline-ticker.js +68 -0
  201. package/dist/shared/lib/derived-causes.js +115 -0
  202. package/dist/shared/lib/draft-store.js +114 -85
  203. package/dist/shared/lib/error-hints.js +1 -0
  204. package/dist/shared/lib/field-merge.js +126 -0
  205. package/dist/shared/lib/filter-sentence.js +10 -10
  206. package/dist/shared/lib/focus-mode.js +16 -12
  207. package/dist/shared/lib/grid-cursors.js +77 -0
  208. package/dist/shared/lib/grid-presence.js +182 -0
  209. package/dist/shared/lib/idle-reload.js +100 -73
  210. package/dist/shared/lib/in-step.js +45 -0
  211. package/dist/shared/lib/integration-chip.js +19 -18
  212. package/dist/shared/lib/line-locks.js +141 -0
  213. package/dist/shared/lib/line-split.js +41 -0
  214. package/dist/shared/lib/linked-changes.js +150 -0
  215. package/dist/shared/lib/list-return.js +231 -0
  216. package/dist/shared/lib/list-viewers.js +52 -0
  217. package/dist/shared/lib/live-announcer.js +86 -0
  218. package/dist/shared/lib/live-counts.js +85 -0
  219. package/dist/shared/lib/live-data-changed.js +108 -0
  220. package/dist/shared/lib/live-deltas.js +81 -0
  221. package/dist/shared/lib/live-findings.js +113 -0
  222. package/dist/shared/lib/live-groups.js +122 -0
  223. package/dist/shared/lib/live-link-labels.js +162 -0
  224. package/dist/shared/lib/live-list-flow.js +334 -0
  225. package/dist/shared/lib/live-list.js +143 -129
  226. package/dist/shared/lib/live-moves.js +51 -0
  227. package/dist/shared/lib/live-ops.js +26 -26
  228. package/dist/shared/lib/live-pickers.js +7 -0
  229. package/dist/shared/lib/live-preference.js +184 -0
  230. package/dist/shared/lib/live-queries.js +226 -181
  231. package/dist/shared/lib/live-screen.js +333 -0
  232. package/dist/shared/lib/live-search.js +108 -0
  233. package/dist/shared/lib/live-seen.js +35 -0
  234. package/dist/shared/lib/live-views.js +100 -0
  235. package/dist/shared/lib/live.js +159 -133
  236. package/dist/shared/lib/missed-updates.js +198 -0
  237. package/dist/shared/lib/newer-file.js +56 -0
  238. package/dist/shared/lib/notification-sound.js +42 -20
  239. package/dist/shared/lib/own-writes.js +59 -41
  240. package/dist/shared/lib/picker-badges.js +94 -0
  241. package/dist/shared/lib/presence-signals.js +131 -84
  242. package/dist/shared/lib/realtime.js +49 -24
  243. package/dist/shared/lib/record-gaps.js +85 -0
  244. package/dist/shared/lib/record-outbox.js +369 -222
  245. package/dist/shared/lib/record-peek.js +75 -0
  246. package/dist/shared/lib/record-tabs.js +92 -72
  247. package/dist/shared/lib/relative-ticker.js +42 -0
  248. package/dist/shared/lib/request-gate.js +119 -119
  249. package/dist/shared/lib/rollup-recalc.js +107 -0
  250. package/dist/shared/lib/room-gaps.js +40 -36
  251. package/dist/shared/lib/rum.js +137 -87
  252. package/dist/shared/lib/save-progress.js +20 -0
  253. package/dist/shared/lib/scheduled-countdown.js +67 -0
  254. package/dist/shared/lib/screen-refresh.js +160 -0
  255. package/dist/shared/lib/screen-share.js +234 -0
  256. package/dist/shared/lib/seen-since.js +74 -0
  257. package/dist/shared/lib/selection-watch.js +205 -0
  258. package/dist/shared/lib/send-status.js +132 -0
  259. package/dist/shared/lib/send-view.js +23 -0
  260. package/dist/shared/lib/socket-liveness.js +155 -0
  261. package/dist/shared/lib/socket-realtime.js +168 -140
  262. package/dist/shared/lib/state-census.js +53 -0
  263. package/dist/shared/lib/summary-mode.js +61 -39
  264. package/dist/shared/lib/tab-attention.js +143 -32
  265. package/dist/shared/lib/table-density.js +64 -0
  266. package/dist/shared/lib/track-travel.js +40 -0
  267. package/dist/shared/lib/unseen-changes.js +68 -0
  268. package/dist/shared/lib/upload-file.js +33 -0
  269. package/dist/shared/lib/upload-presence.js +127 -0
  270. package/dist/shared/lib/urgent-chime.js +65 -0
  271. package/dist/shared/lib/use-online-users.js +32 -11
  272. package/dist/shared/lib/user-sync.js +155 -39
  273. package/dist/shared/lib/waiting-count.js +44 -0
  274. package/dist/shared/lib/watch-desktop.js +83 -0
  275. package/dist/shared/lib/watch-list.js +447 -0
  276. package/dist/shared/lib/widget-image-render.js +64 -0
  277. package/dist/shared/lib/widget-image.js +111 -0
  278. package/dist/shared/lib/worker-socket.js +130 -104
  279. package/dist/shared/lib/write-to-screen.js +133 -0
  280. package/package.json +1 -1
  281. package/styles.css +49 -1
@@ -1,12 +1,14 @@
1
- import { jsxs as r, jsx as e, Fragment as J } from "react/jsx-runtime";
1
+ import { jsxs as a, jsx as e, Fragment as J } from "react/jsx-runtime";
2
2
  import { useQueryClient as ie, useQuery as K } from "@tanstack/react-query";
3
3
  import { RotateCw as ce, Search as ue, UserX as me, ChevronDown as Y, ChevronRight as Z } from "lucide-react";
4
- import { useState as x, useEffect as xe, useMemo as F, useCallback as he } from "react";
4
+ import { useState as x, useEffect as xe, useMemo as A, useCallback as pe } from "react";
5
5
  import { useNivaroClient as B, useNavigation as ee, useItemNavigation as te } from "../../context.js";
6
6
  import { get as M, post as ae } from "../../lib/commands.js";
7
+ import { useResolvedFindings as he } from "../../lib/live-findings.js";
7
8
  import { userErrorMessage as Q } from "../../lib/safe-error.js";
8
- import { cn as A, formatRelative as pe } from "../../lib/utils.js";
9
- import { UserAvatar as fe } from "../UserAvatar.js";
9
+ import { cn as F, formatRelative as fe } from "../../lib/utils.js";
10
+ import { FindingFixedMark as be } from "../FindingFixedMark.js";
11
+ import { UserAvatar as ge } from "../UserAvatar.js";
10
12
  const re = {
11
13
  suspended: "Suspended",
12
14
  redacted: "Redacted",
@@ -18,104 +20,104 @@ const re = {
18
20
  redacted: "Personal details were removed by a retention policy (or the legacy retention job).",
19
21
  anonymised: "Redacted by the legacy retention job — the name and email were replaced.",
20
22
  placeholder: "Stands in for a legacy account that no longer exists."
21
- }, be = {
23
+ }, ke = {
22
24
  suspended: "bg-[#fef3c7] text-[#92400e] dark:bg-[#3a2a12] dark:text-[#f5c97a]",
23
25
  redacted: "bg-[#ffe4e6] text-[#9f1239] dark:bg-[#3d1a20] dark:text-[#f4a3ad]",
24
26
  anonymised: "bg-[#ffe4e6] text-[#9f1239] dark:bg-[#3d1a20] dark:text-[#f4a3ad]",
25
27
  placeholder: "bg-[#e2e8f0] text-[#334155] dark:bg-[#2c3038] dark:text-[#cbd5e1]"
26
- }, b = (l) => l.toLocaleString(), X = (l) => l === "anonymised" ? "redacted" : l, ge = ["suspended", "redacted", "placeholder"];
27
- function Ee({
28
- className: l,
28
+ }, b = (o) => o.toLocaleString(), X = (o) => o === "anonymised" ? "redacted" : o, ve = ["suspended", "redacted", "placeholder"];
29
+ function Fe({
30
+ className: o,
29
31
  focusUserId: s,
30
- onClearFocus: o
32
+ onClearFocus: d
31
33
  }) {
32
- var I;
33
- const N = B(), y = ie(), [h, d] = x(!0), [u, k] = x(!1), [i, m] = x(!1), [g, w] = x(!0), [c, C] = x(null), [q, j] = x(""), [_, E] = x(s ?? null), [$, L] = x(s ?? null);
34
+ var H;
35
+ const $ = B(), R = ie(), [p, i] = x(!0), [u, v] = x(!1), [c, m] = x(!1), [g, E] = x(!0), [w, L] = x(null), [S, j] = x(""), [l, y] = x(s ?? null), [N, k] = x(s ?? null);
34
36
  xe(() => {
35
- L(s ?? null), s && E(s);
37
+ k(s ?? null), s && y(s);
36
38
  }, [s]);
37
- const [n, p] = x(0), a = K({
39
+ const [n, h] = x(0), r = K({
38
40
  queryKey: ["inactive-user-links", n],
39
- queryFn: () => N.request(M(`/inactive-user-links${n ? "?fresh=1" : ""}`)).then((t) => t.data),
41
+ queryFn: () => $.request(M(`/inactive-user-links${n ? "?fresh=1" : ""}`)).then((t) => t.data),
40
42
  staleTime: 6e4
41
- }), f = F(
43
+ }), f = A(
42
44
  () => {
43
45
  var t;
44
- return new Map((((t = a.data) == null ? void 0 : t.sources) ?? []).map((S) => [S.key, S]));
46
+ return new Map((((t = r.data) == null ? void 0 : t.sources) ?? []).map((q) => [q.key, q]));
45
47
  },
46
- [a.data]
47
- ), D = he(
48
- (t) => !(!t || t.role === "audit" && !u || t.role === "own" && !i || t.role === "seat" && !g || h && t.scope !== "open" && t.role !== "seat"),
49
- [h, u, i, g]
50
- ), T = F(() => {
51
- var S;
52
- const t = q.trim().toLowerCase();
53
- return (((S = a.data) == null ? void 0 : S.users) ?? []).map((v) => {
54
- const P = v.links.filter((R) => D(f.get(R.source))).sort(
55
- (R, z) => {
48
+ [r.data]
49
+ ), D = pe(
50
+ (t) => !(!t || t.role === "audit" && !u || t.role === "own" && !c || t.role === "seat" && !g || p && t.scope !== "open" && t.role !== "seat"),
51
+ [p, u, c, g]
52
+ ), T = A(() => {
53
+ var q;
54
+ const t = S.trim().toLowerCase();
55
+ return (((q = r.data) == null ? void 0 : q.users) ?? []).map((C) => {
56
+ const P = C.links.filter((_) => D(f.get(_.source))).sort(
57
+ (_, z) => {
56
58
  var G, V;
57
- return +(((G = f.get(R.source)) == null ? void 0 : G.role) === "seat") - +(((V = f.get(z.source)) == null ? void 0 : V.role) === "seat") || z.count - R.count;
59
+ return +(((G = f.get(_.source)) == null ? void 0 : G.role) === "seat") - +(((V = f.get(z.source)) == null ? void 0 : V.role) === "seat") || z.count - _.count;
58
60
  }
59
61
  );
60
- return { ...v, links: P, total: P.reduce((R, z) => R + z.count, 0) };
61
- }).filter((v) => v.total > 0).filter((v) => !$ || v.user.id.toUpperCase() === $.toUpperCase()).filter(
62
- (v) => !t || `${v.user.name} ${v.user.email ?? ""}`.toLowerCase().includes(t)
63
- ).sort((v, P) => P.total - v.total);
64
- }, [a.data, f, q, D, $]), W = F(() => {
62
+ return { ...C, links: P, total: P.reduce((_, z) => _ + z.count, 0) };
63
+ }).filter((C) => C.total > 0).filter((C) => !N || C.user.id.toUpperCase() === N.toUpperCase()).filter(
64
+ (C) => !t || `${C.user.name} ${C.user.email ?? ""}`.toLowerCase().includes(t)
65
+ ).sort((C, P) => P.total - C.total);
66
+ }, [r.data, f, S, D, N]), I = A(() => {
65
67
  const t = { suspended: 0, redacted: 0, anonymised: 0, placeholder: 0 };
66
- for (const S of T) t[X(S.user.reason)]++;
68
+ for (const q of T) t[X(q.user.reason)]++;
67
69
  return t;
68
- }, [T]), O = c ? T.filter((t) => X(t.user.reason) === c) : T, H = F(() => {
69
- var v;
70
- let t = 0, S = 0;
70
+ }, [T]), O = w ? T.filter((t) => X(t.user.reason) === w) : T, W = A(() => {
71
+ var C;
72
+ let t = 0, q = 0;
71
73
  for (const P of O)
72
- for (const R of P.links)
73
- ((v = f.get(R.source)) == null ? void 0 : v.role) === "seat" ? S += R.count : t += R.count;
74
- return { records: t, seats: S };
75
- }, [O, f]), oe = () => {
76
- p((t) => t + 1), E(null);
74
+ for (const _ of P.links)
75
+ ((C = f.get(_.source)) == null ? void 0 : C.role) === "seat" ? q += _.count : t += _.count;
76
+ return { records: t, seats: q };
77
+ }, [O, f]), le = () => {
78
+ h((t) => t + 1), y(null);
77
79
  }, de = () => {
78
- y.invalidateQueries({ queryKey: ["inactive-user-links"] }), y.invalidateQueries({ queryKey: ["inactive-user-records"] });
80
+ R.invalidateQueries({ queryKey: ["inactive-user-links"] }), R.invalidateQueries({ queryKey: ["inactive-user-records"] });
79
81
  };
80
- return /* @__PURE__ */ r("div", { className: A("flex min-h-0 flex-1 flex-col gap-4 p-6", l), "data-inactive-links": !0, children: [
81
- /* @__PURE__ */ r("div", { className: "flex flex-wrap items-center gap-x-5 gap-y-3", children: [
82
- /* @__PURE__ */ r("dl", { className: "flex items-baseline gap-5 text-[12px] text-slate-500 dark:text-muted-foreground", children: [
83
- /* @__PURE__ */ r("div", { className: "flex items-baseline gap-1.5", children: [
82
+ return /* @__PURE__ */ a("div", { className: F("flex min-h-0 flex-1 flex-col gap-4 p-6", o), "data-inactive-links": !0, children: [
83
+ /* @__PURE__ */ a("div", { className: "flex flex-wrap items-center gap-x-5 gap-y-3", children: [
84
+ /* @__PURE__ */ a("dl", { className: "flex items-baseline gap-5 text-[12px] text-slate-500 dark:text-muted-foreground", children: [
85
+ /* @__PURE__ */ a("div", { className: "flex items-baseline gap-1.5", children: [
84
86
  /* @__PURE__ */ e(
85
87
  "dd",
86
88
  {
87
89
  className: "text-[20px] font-semibold tabular-nums text-slate-900 dark:text-foreground",
88
90
  "data-inactive-people": !0,
89
- children: a.isLoading ? "—" : b(O.length)
91
+ children: r.isLoading ? "—" : b(O.length)
90
92
  }
91
93
  ),
92
94
  /* @__PURE__ */ e("dt", { children: O.length === 1 ? "person" : "people" })
93
95
  ] }),
94
- /* @__PURE__ */ r("div", { className: "flex items-baseline gap-1.5", children: [
95
- /* @__PURE__ */ e("dd", { className: "text-[20px] font-semibold tabular-nums text-slate-900 dark:text-foreground", children: a.isLoading ? "—" : b(H.records) }),
96
- /* @__PURE__ */ e("dt", { children: h ? "links on open records" : "record links" })
96
+ /* @__PURE__ */ a("div", { className: "flex items-baseline gap-1.5", children: [
97
+ /* @__PURE__ */ e("dd", { className: "text-[20px] font-semibold tabular-nums text-slate-900 dark:text-foreground", children: r.isLoading ? "—" : b(W.records) }),
98
+ /* @__PURE__ */ e("dt", { children: p ? "links on open records" : "record links" })
97
99
  ] }),
98
- /* @__PURE__ */ r("div", { className: "flex items-baseline gap-1.5", children: [
99
- /* @__PURE__ */ e("dd", { className: "text-[20px] font-semibold tabular-nums text-slate-900 dark:text-foreground", children: a.isLoading ? "—" : b(H.seats) }),
100
+ /* @__PURE__ */ a("div", { className: "flex items-baseline gap-1.5", children: [
101
+ /* @__PURE__ */ e("dd", { className: "text-[20px] font-semibold tabular-nums text-slate-900 dark:text-foreground", children: r.isLoading ? "—" : b(W.seats) }),
100
102
  /* @__PURE__ */ e("dt", { children: "owner seats and team places" })
101
103
  ] })
102
104
  ] }),
103
- /* @__PURE__ */ r(
105
+ /* @__PURE__ */ a(
104
106
  "button",
105
107
  {
106
108
  type: "button",
107
- onClick: oe,
108
- disabled: a.isFetching,
109
+ onClick: le,
110
+ disabled: r.isFetching,
109
111
  className: "ml-auto inline-flex h-8 items-center gap-1.5 rounded-md border border-slate-200 px-2.5 text-[12px] font-medium text-slate-600 hover:border-slate-300 hover:text-slate-900 disabled:opacity-60 dark:border-border dark:text-muted-foreground dark:hover:text-foreground",
110
112
  "data-inactive-rescan": !0,
111
113
  children: [
112
- /* @__PURE__ */ e(ce, { className: A("h-3.5 w-3.5", a.isFetching && "animate-spin") }),
114
+ /* @__PURE__ */ e(ce, { className: F("h-3.5 w-3.5", r.isFetching && "animate-spin") }),
113
115
  "Scan again"
114
116
  ]
115
117
  }
116
118
  )
117
119
  ] }),
118
- $ && /* @__PURE__ */ r(
120
+ N && /* @__PURE__ */ a(
119
121
  "p",
120
122
  {
121
123
  className: "flex flex-wrap items-center gap-2 text-[12px] text-slate-600 dark:text-muted-foreground",
@@ -127,7 +129,7 @@ function Ee({
127
129
  {
128
130
  type: "button",
129
131
  onClick: () => {
130
- L(null), o == null || o();
132
+ k(null), d == null || d();
131
133
  },
132
134
  className: "font-medium text-slate-800 underline underline-offset-2 dark:text-foreground",
133
135
  children: "Show everyone"
@@ -136,13 +138,13 @@ function Ee({
136
138
  ]
137
139
  }
138
140
  ),
139
- /* @__PURE__ */ r("div", { className: "flex flex-wrap items-center gap-2", children: [
140
- /* @__PURE__ */ r("label", { className: "relative", children: [
141
+ /* @__PURE__ */ a("div", { className: "flex flex-wrap items-center gap-2", children: [
142
+ /* @__PURE__ */ a("label", { className: "relative", children: [
141
143
  /* @__PURE__ */ e(ue, { className: "pointer-events-none absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-slate-400" }),
142
144
  /* @__PURE__ */ e(
143
145
  "input",
144
146
  {
145
- value: q,
147
+ value: S,
146
148
  onChange: (t) => j(t.target.value),
147
149
  placeholder: "Find a person",
148
150
  className: "h-8 w-56 rounded-md border border-slate-200 bg-background pl-7 pr-2 text-[12.5px] text-slate-800 placeholder:text-slate-500 focus:border-slate-400 focus:outline-none dark:border-border dark:text-foreground dark:placeholder:text-muted-foreground",
@@ -150,35 +152,35 @@ function Ee({
150
152
  }
151
153
  )
152
154
  ] }),
153
- /* @__PURE__ */ e("span", { className: "flex flex-wrap items-center gap-1", children: ge.map(
154
- (t) => W[t] || c === t ? /* @__PURE__ */ r(
155
+ /* @__PURE__ */ e("span", { className: "flex flex-wrap items-center gap-1", children: ve.map(
156
+ (t) => I[t] || w === t ? /* @__PURE__ */ a(
155
157
  "button",
156
158
  {
157
159
  type: "button",
158
- "aria-pressed": c === t,
159
- onClick: () => C(c === t ? null : t),
160
+ "aria-pressed": w === t,
161
+ onClick: () => L(w === t ? null : t),
160
162
  "data-tip": ne[t],
161
163
  "data-inactive-reason": t,
162
- className: A(
164
+ className: F(
163
165
  "h-7 rounded-md border px-2 text-[11.5px] font-medium transition-colors",
164
- c === t ? "border-slate-400 bg-slate-100 text-slate-900 dark:border-border dark:bg-muted dark:text-foreground" : "border-slate-200 text-slate-600 hover:border-slate-300 dark:border-border dark:text-muted-foreground"
166
+ w === t ? "border-slate-400 bg-slate-100 text-slate-900 dark:border-border dark:bg-muted dark:text-foreground" : "border-slate-200 text-slate-600 hover:border-slate-300 dark:border-border dark:text-muted-foreground"
165
167
  ),
166
168
  children: [
167
169
  re[t],
168
170
  " ",
169
- /* @__PURE__ */ e("span", { className: "tabular-nums text-slate-500 dark:text-muted-foreground", children: b(W[t]) })
171
+ /* @__PURE__ */ e("span", { className: "tabular-nums text-slate-500 dark:text-muted-foreground", children: b(I[t]) })
170
172
  ]
171
173
  },
172
174
  t
173
175
  ) : null
174
176
  ) }),
175
- /* @__PURE__ */ r("span", { className: "ml-auto flex flex-wrap items-center gap-x-4 gap-y-1", children: [
177
+ /* @__PURE__ */ a("span", { className: "ml-auto flex flex-wrap items-center gap-x-4 gap-y-1", children: [
176
178
  /* @__PURE__ */ e(
177
179
  U,
178
180
  {
179
181
  label: "Only records in an open workflow",
180
- checked: h,
181
- onChange: d,
182
+ checked: p,
183
+ onChange: i,
182
184
  hook: "open"
183
185
  }
184
186
  ),
@@ -187,7 +189,7 @@ function Ee({
187
189
  {
188
190
  label: "Owner seats and team places",
189
191
  checked: g,
190
- onChange: w,
192
+ onChange: E,
191
193
  hook: "seats"
192
194
  }
193
195
  ),
@@ -196,7 +198,7 @@ function Ee({
196
198
  {
197
199
  label: "Created by / updated by",
198
200
  checked: u,
199
- onChange: k,
201
+ onChange: v,
200
202
  hook: "audit"
201
203
  }
202
204
  ),
@@ -204,41 +206,41 @@ function Ee({
204
206
  U,
205
207
  {
206
208
  label: "The person's own saved sets",
207
- checked: i,
209
+ checked: c,
208
210
  onChange: m,
209
211
  hook: "own"
210
212
  }
211
213
  )
212
214
  ] })
213
215
  ] }),
214
- (I = a.data) != null && I.failed.length ? /* @__PURE__ */ r("p", { className: "text-[11.5px] text-amber-700 dark:text-amber-300", children: [
215
- a.data.failed.length,
216
+ (H = r.data) != null && H.failed.length ? /* @__PURE__ */ a("p", { className: "text-[11.5px] text-amber-700 dark:text-amber-300", children: [
217
+ r.data.failed.length,
216
218
  " link ",
217
- a.data.failed.length === 1 ? "type" : "types",
219
+ r.data.failed.length === 1 ? "type" : "types",
218
220
  " could not be read and are left out: ",
219
- a.data.failed.join(", ")
221
+ r.data.failed.join(", ")
220
222
  ] }) : null,
221
- /* @__PURE__ */ e("div", { className: "flex min-h-0 flex-1 flex-col overflow-hidden rounded-lg border border-slate-200 bg-white dark:border-border dark:bg-card", children: a.isLoading ? /* @__PURE__ */ e("div", { className: "space-y-2 p-4", children: [0, 1, 2, 3, 4].map((t) => /* @__PURE__ */ e(
223
+ /* @__PURE__ */ e("div", { className: "flex min-h-0 flex-1 flex-col overflow-hidden rounded-lg border border-slate-200 bg-white dark:border-border dark:bg-card", children: r.isLoading ? /* @__PURE__ */ e("div", { className: "space-y-2 p-4", children: [0, 1, 2, 3, 4].map((t) => /* @__PURE__ */ e(
222
224
  "div",
223
225
  {
224
226
  className: "h-9 animate-pulse rounded",
225
227
  style: { background: "hsl(var(--nvr-skeleton))" }
226
228
  },
227
229
  t
228
- )) }) : a.isError ? /* @__PURE__ */ r("p", { className: "p-6 text-[12.5px] text-rose-700 dark:text-rose-300", children: [
230
+ )) }) : r.isError ? /* @__PURE__ */ a("p", { className: "p-6 text-[12.5px] text-rose-700 dark:text-rose-300", children: [
229
231
  "The scan failed. ",
230
- Q(a.error, "")
231
- ] }) : O.length === 0 ? /* @__PURE__ */ r("div", { className: "flex flex-1 flex-col items-center justify-center gap-2 p-10 text-center", children: [
232
+ Q(r.error, "")
233
+ ] }) : O.length === 0 ? /* @__PURE__ */ a("div", { className: "flex flex-1 flex-col items-center justify-center gap-2 p-10 text-center", children: [
232
234
  /* @__PURE__ */ e(me, { className: "h-6 w-6 text-slate-400" }),
233
- /* @__PURE__ */ e("p", { className: "text-[13px] font-medium text-slate-800 dark:text-foreground", children: h ? "Nobody inactive is named on open work" : "Nothing matches" }),
234
- /* @__PURE__ */ e("p", { className: "max-w-[52ch] text-[12px] text-slate-500 dark:text-muted-foreground", children: h ? "Every contact, owner and task on a record in an open workflow belongs to someone who can still act. Clear the first switch to look at closed records too." : "Change the switches above to widen what counts as a link." })
235
+ /* @__PURE__ */ e("p", { className: "text-[13px] font-medium text-slate-800 dark:text-foreground", children: p ? "Nobody inactive is named on open work" : "Nothing matches" }),
236
+ /* @__PURE__ */ e("p", { className: "max-w-[52ch] text-[12px] text-slate-500 dark:text-muted-foreground", children: p ? "Every contact, owner and task on a record in an open workflow belongs to someone who can still act. Clear the first switch to look at closed records too." : "Change the switches above to widen what counts as a link." })
235
237
  ] }) : /* @__PURE__ */ e("ul", { className: "min-h-0 flex-1 divide-y divide-slate-100 overflow-y-auto dark:divide-border", children: O.map((t) => /* @__PURE__ */ e(
236
- ke,
238
+ ye,
237
239
  {
238
240
  person: t,
239
241
  sources: f,
240
- open: _ === t.user.id,
241
- onToggle: () => E(_ === t.user.id ? null : t.user.id),
242
+ open: l === t.user.id,
243
+ onToggle: () => y(l === t.user.id ? null : t.user.id),
242
244
  onChanged: de
243
245
  },
244
246
  t.user.id
@@ -246,103 +248,103 @@ function Ee({
246
248
  ] });
247
249
  }
248
250
  function U({
249
- label: l,
251
+ label: o,
250
252
  checked: s,
251
- onChange: o,
252
- hook: N
253
+ onChange: d,
254
+ hook: $
253
255
  }) {
254
- return /* @__PURE__ */ r("label", { className: "flex cursor-pointer items-center gap-1.5 text-[11.5px] text-slate-600 dark:text-muted-foreground", children: [
256
+ return /* @__PURE__ */ a("label", { className: "flex cursor-pointer items-center gap-1.5 text-[11.5px] text-slate-600 dark:text-muted-foreground", children: [
255
257
  /* @__PURE__ */ e(
256
258
  "input",
257
259
  {
258
260
  type: "checkbox",
259
261
  checked: s,
260
- onChange: (y) => o(y.target.checked),
262
+ onChange: (R) => d(R.target.checked),
261
263
  className: "h-3.5 w-3.5 accent-slate-700",
262
- "data-inactive-switch": N
264
+ "data-inactive-switch": $
263
265
  }
264
266
  ),
265
- l
267
+ o
266
268
  ] });
267
269
  }
268
- function se(l) {
269
- return l.kind === "builtin" ? l.label : `${l.collection_label} · ${l.label}`;
270
+ function se(o) {
271
+ return o.kind === "builtin" ? o.label : `${o.collection_label} · ${o.label}`;
270
272
  }
271
- function ke({
272
- person: l,
273
+ function ye({
274
+ person: o,
273
275
  sources: s,
274
- open: o,
275
- onToggle: N,
276
- onChanged: y
276
+ open: d,
277
+ onToggle: $,
278
+ onChanged: R
277
279
  }) {
278
- const h = ee(), d = l.user, u = h.userUrl ? h.userUrl(d.id) : `/users/${d.id}`, k = d.name.split(/\s+/).map((i) => i[0]).join("").slice(0, 2).toUpperCase();
279
- return /* @__PURE__ */ r("li", { "data-inactive-person": d.id, children: [
280
- /* @__PURE__ */ r(
280
+ const p = ee(), i = o.user, u = p.userUrl ? p.userUrl(i.id) : `/users/${i.id}`, v = i.name.split(/\s+/).map((c) => c[0]).join("").slice(0, 2).toUpperCase();
281
+ return /* @__PURE__ */ a("li", { "data-inactive-person": i.id, children: [
282
+ /* @__PURE__ */ a(
281
283
  "button",
282
284
  {
283
285
  type: "button",
284
- onClick: N,
285
- "aria-expanded": o,
286
+ onClick: $,
287
+ "aria-expanded": d,
286
288
  className: "flex w-full items-center gap-3 px-4 py-2.5 text-left hover:bg-muted",
287
289
  children: [
288
- o ? /* @__PURE__ */ e(Y, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" }) : /* @__PURE__ */ e(Z, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" }),
290
+ d ? /* @__PURE__ */ e(Y, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" }) : /* @__PURE__ */ e(Z, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" }),
289
291
  /* @__PURE__ */ e(
290
- fe,
292
+ ge,
291
293
  {
292
- userId: d.id,
294
+ userId: i.id,
293
295
  className: "h-6 w-6 shrink-0 rounded-full object-cover",
294
- fallback: /* @__PURE__ */ e("span", { className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-slate-200 text-[9px] font-semibold text-slate-600 dark:bg-muted dark:text-muted-foreground", children: k })
296
+ fallback: /* @__PURE__ */ e("span", { className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-slate-200 text-[9px] font-semibold text-slate-600 dark:bg-muted dark:text-muted-foreground", children: v })
295
297
  }
296
298
  ),
297
- /* @__PURE__ */ r("span", { className: "min-w-0 flex-[0_1_260px]", children: [
298
- /* @__PURE__ */ e("span", { className: "block truncate text-[12.5px] font-medium text-slate-900 dark:text-foreground", children: d.name }),
299
- /* @__PURE__ */ e("span", { className: "block truncate text-[11px] text-slate-500 dark:text-muted-foreground", children: d.email ?? "—" })
299
+ /* @__PURE__ */ a("span", { className: "min-w-0 flex-[0_1_260px]", children: [
300
+ /* @__PURE__ */ e("span", { className: "block truncate text-[12.5px] font-medium text-slate-900 dark:text-foreground", children: i.name }),
301
+ /* @__PURE__ */ e("span", { className: "block truncate text-[11px] text-slate-500 dark:text-muted-foreground", children: i.email ?? "—" })
300
302
  ] }),
301
303
  /* @__PURE__ */ e(
302
304
  "span",
303
305
  {
304
- className: A(
306
+ className: F(
305
307
  "shrink-0 rounded px-1.5 py-0.5 text-[10.5px] font-medium",
306
- be[d.reason]
308
+ ke[i.reason]
307
309
  ),
308
- "data-tip": ne[d.reason],
309
- children: re[d.reason]
310
+ "data-tip": ne[i.reason],
311
+ children: re[i.reason]
310
312
  }
311
313
  ),
312
- /* @__PURE__ */ r("span", { className: "hidden min-w-0 flex-1 truncate text-[11.5px] text-slate-500 md:block dark:text-muted-foreground", children: [
313
- l.links.slice(0, 3).map((i) => {
314
- const m = s.get(i.source);
315
- return m ? `${se(m)} ${b(i.count)}` : "";
314
+ /* @__PURE__ */ a("span", { className: "hidden min-w-0 flex-1 truncate text-[11.5px] text-slate-500 md:block dark:text-muted-foreground", children: [
315
+ o.links.slice(0, 3).map((c) => {
316
+ const m = s.get(c.source);
317
+ return m ? `${se(m)} ${b(c.count)}` : "";
316
318
  }).filter(Boolean).join(" · "),
317
- l.links.length > 3 ? ` · +${l.links.length - 3} more` : ""
319
+ o.links.length > 3 ? ` · +${o.links.length - 3} more` : ""
318
320
  ] }),
319
- /* @__PURE__ */ e("span", { className: "ml-auto shrink-0 text-[11px] text-slate-500 dark:text-muted-foreground", children: d.last_access ? `last active ${pe(d.last_access)}` : "never signed in" }),
320
- /* @__PURE__ */ e("span", { className: "w-14 shrink-0 text-right text-[12.5px] font-semibold tabular-nums text-slate-900 dark:text-foreground", children: b(l.total) })
321
+ /* @__PURE__ */ e("span", { className: "ml-auto shrink-0 text-[11px] text-slate-500 dark:text-muted-foreground", children: i.last_access ? `last active ${fe(i.last_access)}` : "never signed in" }),
322
+ /* @__PURE__ */ e("span", { className: "w-14 shrink-0 text-right text-[12.5px] font-semibold tabular-nums text-slate-900 dark:text-foreground", children: b(o.total) })
321
323
  ]
322
324
  }
323
325
  ),
324
- o && /* @__PURE__ */ r("div", { className: "border-t border-slate-100 bg-slate-50/60 px-4 py-3 pl-11 dark:border-border dark:bg-white/[0.02]", children: [
325
- /* @__PURE__ */ e("ul", { className: "space-y-1", children: l.links.map((i) => {
326
- const m = s.get(i.source);
326
+ d && /* @__PURE__ */ a("div", { className: "border-t border-slate-100 bg-slate-50/60 px-4 py-3 pl-11 dark:border-border dark:bg-white/[0.02]", children: [
327
+ /* @__PURE__ */ e("ul", { className: "space-y-1", children: o.links.map((c) => {
328
+ const m = s.get(c.source);
327
329
  return m ? /* @__PURE__ */ e(
328
- ve,
330
+ Ne,
329
331
  {
330
- userId: d.id,
332
+ userId: i.id,
331
333
  source: m,
332
- count: i.count,
333
- onChanged: y
334
+ count: c.count,
335
+ onChanged: R
334
336
  },
335
- i.source
337
+ c.source
336
338
  ) : null;
337
339
  }) }),
338
- u && /* @__PURE__ */ r("p", { className: "mt-3 text-[11.5px] text-slate-500 dark:text-muted-foreground", children: [
340
+ u && /* @__PURE__ */ a("p", { className: "mt-3 text-[11.5px] text-slate-500 dark:text-muted-foreground", children: [
339
341
  "Everything this person holds can also move in one pass from",
340
342
  " ",
341
343
  /* @__PURE__ */ e(
342
344
  "button",
343
345
  {
344
346
  type: "button",
345
- onClick: () => h.navigate(u),
347
+ onClick: () => p.navigate(u),
346
348
  className: "font-medium text-slate-700 underline decoration-dotted underline-offset-2 hover:text-slate-900 dark:text-foreground",
347
349
  children: "their account page"
348
350
  }
@@ -353,110 +355,135 @@ function ke({
353
355
  ] })
354
356
  ] });
355
357
  }
356
- function ve({
357
- userId: l,
358
+ function Ne({
359
+ userId: o,
358
360
  source: s,
359
- count: o,
360
- onChanged: N
361
+ count: d,
362
+ onChanged: $
361
363
  }) {
362
- var g, w;
363
- const y = B(), { open: h } = te(), [d, u] = x(!1), k = !0, i = s.kind === "builtin", m = K({
364
- queryKey: ["inactive-user-records", l, s.key],
365
- queryFn: () => y.request(
364
+ var L, S, j;
365
+ const R = B(), { open: p } = te(), [i, u] = x(!1), v = !0, c = s.kind === "builtin", m = K({
366
+ queryKey: ["inactive-user-records", o, s.key],
367
+ queryFn: () => R.request(
368
+ M(
369
+ `/inactive-user-links/${o}/records?source=${encodeURIComponent(s.key)}&limit=100`
370
+ )
371
+ ).then((l) => l.data),
372
+ enabled: i && v
373
+ }), g = (L = m.data) == null ? void 0 : L.records, E = A(
374
+ () => c ? [] : (g ?? []).map((l) => ({
375
+ key: `${l.collection}:${l.id}`,
376
+ collection: l.collection,
377
+ itemId: l.id
378
+ })),
379
+ [g, c]
380
+ ), { resolved: w } = he({
381
+ findings: E,
382
+ enabled: i && !c,
383
+ recheck: (l) => R.request(
366
384
  M(
367
- `/inactive-user-links/${l}/records?source=${encodeURIComponent(s.key)}&limit=100`
385
+ `/inactive-user-links/${o}/records?source=${encodeURIComponent(s.key)}&limit=100`
368
386
  )
369
- ).then((c) => c.data),
370
- enabled: d && k
387
+ ).then((y) => {
388
+ const N = new Set((y.data.records ?? []).map((k) => `${k.collection}:${k.id}`));
389
+ return l.filter((k) => !N.has(k.key)).map((k) => k.key);
390
+ })
371
391
  });
372
- return /* @__PURE__ */ r("li", { "data-inactive-source": s.key, children: [
373
- /* @__PURE__ */ r("div", { className: "flex items-center gap-2 text-[12px]", children: [
374
- /* @__PURE__ */ r(
392
+ return /* @__PURE__ */ a("li", { "data-inactive-source": s.key, children: [
393
+ /* @__PURE__ */ a("div", { className: "flex items-center gap-2 text-[12px]", children: [
394
+ /* @__PURE__ */ a(
375
395
  "button",
376
396
  {
377
397
  type: "button",
378
- disabled: !k,
379
- onClick: () => u((c) => !c),
380
- "aria-expanded": d,
398
+ disabled: !v,
399
+ onClick: () => u((l) => !l),
400
+ "aria-expanded": i,
381
401
  className: "flex min-w-0 items-center gap-1.5 text-left text-slate-700 enabled:hover:text-slate-900 dark:text-foreground",
382
402
  children: [
383
- d ? /* @__PURE__ */ e(Y, { className: "h-3 w-3 shrink-0 text-slate-400" }) : /* @__PURE__ */ e(Z, { className: "h-3 w-3 shrink-0 text-slate-400" }),
403
+ i ? /* @__PURE__ */ e(Y, { className: "h-3 w-3 shrink-0 text-slate-400" }) : /* @__PURE__ */ e(Z, { className: "h-3 w-3 shrink-0 text-slate-400" }),
384
404
  /* @__PURE__ */ e("span", { className: "truncate", children: se(s) })
385
405
  ]
386
406
  }
387
407
  ),
388
- /* @__PURE__ */ e("span", { className: "tabular-nums text-slate-500 dark:text-muted-foreground", children: b(o) }),
408
+ /* @__PURE__ */ e("span", { className: "tabular-nums text-slate-500 dark:text-muted-foreground", children: b(d) }),
389
409
  s.scope === "open" && /* @__PURE__ */ e("span", { className: "rounded bg-[#e0f2fe] px-1.5 py-0.5 text-[10px] font-medium text-[#075985] dark:bg-[#15303f] dark:text-[#8fcdf0]", children: "open workflow" }),
390
- s.reassignable && !i && /* @__PURE__ */ e("span", { className: "ml-auto", children: /* @__PURE__ */ e(le, { userId: l, source: s, count: o, onDone: N }) })
410
+ s.reassignable && !c && /* @__PURE__ */ e("span", { className: "ml-auto", children: /* @__PURE__ */ e(oe, { userId: o, source: s, count: d, onDone: $ }) })
391
411
  ] }),
392
- d && k && /* @__PURE__ */ e("div", { className: "ml-[18px] mt-1 mb-2", children: m.isLoading ? /* @__PURE__ */ e("p", { className: "text-[11.5px] text-slate-500 dark:text-muted-foreground", children: "Loading…" }) : i ? /* @__PURE__ */ e(
393
- Ne,
412
+ i && v && /* @__PURE__ */ e("div", { className: "ml-[18px] mt-1 mb-2", children: m.isLoading ? /* @__PURE__ */ e("p", { className: "text-[11.5px] text-slate-500 dark:text-muted-foreground", children: "Loading…" }) : c ? /* @__PURE__ */ e(
413
+ we,
394
414
  {
395
- userId: l,
415
+ userId: o,
396
416
  source: s,
397
- entries: ((g = m.data) == null ? void 0 : g.entries) ?? [],
398
- onChanged: N
417
+ entries: ((S = m.data) == null ? void 0 : S.entries) ?? [],
418
+ onChanged: $
399
419
  }
400
- ) : (w = m.data) != null && w.records.length ? /* @__PURE__ */ r("ul", { className: "flex flex-wrap gap-1", "data-inactive-records": !0, children: [
401
- m.data.records.map((c) => {
402
- var C;
403
- return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
420
+ ) : (j = m.data) != null && j.records.length ? /* @__PURE__ */ a("ul", { className: "flex flex-wrap gap-1", "data-inactive-records": !0, children: [
421
+ m.data.records.map((l) => {
422
+ var N;
423
+ const y = w.get(`${l.collection}:${l.id}`);
424
+ return /* @__PURE__ */ e("li", { "data-finding-resolved": y ? "" : void 0, children: /* @__PURE__ */ a(
404
425
  "button",
405
426
  {
406
427
  type: "button",
407
- onClick: () => h({ collection: c.collection, itemId: c.id }),
408
- className: "rounded border border-slate-200 bg-white px-1.5 py-0.5 text-[11px] text-slate-700 hover:border-slate-400 dark:border-border dark:bg-card dark:text-foreground",
409
- children: ((C = c.label) == null ? void 0 : C.trim()) || `#${c.id}`
428
+ onClick: () => p({ collection: l.collection, itemId: l.id }),
429
+ className: F(
430
+ "inline-flex items-center gap-1.5 rounded border border-slate-200 bg-white px-1.5 py-0.5 text-[11px] text-slate-700 transition-opacity hover:border-slate-400 dark:border-border dark:bg-card dark:text-foreground",
431
+ y && "opacity-60"
432
+ ),
433
+ children: [
434
+ ((N = l.label) == null ? void 0 : N.trim()) || `#${l.id}`,
435
+ y && /* @__PURE__ */ e(be, { mark: y, className: "text-[10.5px]" })
436
+ ]
410
437
  }
411
- ) }, `${c.collection}:${c.id}`);
438
+ ) }, `${l.collection}:${l.id}`);
412
439
  }),
413
- o > m.data.records.length && /* @__PURE__ */ r("li", { className: "px-1 py-0.5 text-[11px] text-slate-500 dark:text-muted-foreground", children: [
440
+ d > m.data.records.length && /* @__PURE__ */ a("li", { className: "px-1 py-0.5 text-[11px] text-slate-500 dark:text-muted-foreground", children: [
414
441
  "+",
415
- b(o - m.data.records.length),
442
+ b(d - m.data.records.length),
416
443
  " more"
417
444
  ] })
418
445
  ] }) : /* @__PURE__ */ e("p", { className: "text-[11.5px] text-slate-500 dark:text-muted-foreground", children: "Nothing to list." }) })
419
446
  ] });
420
447
  }
421
- function le({
422
- userId: l,
448
+ function oe({
449
+ userId: o,
423
450
  source: s,
424
- count: o,
425
- ids: N,
426
- label: y = "Hand to…",
427
- onDone: h
451
+ count: d,
452
+ ids: $,
453
+ label: R = "Hand to…",
454
+ onDone: p
428
455
  }) {
429
- var p;
430
- const d = B(), [u, k] = x(!1), [i, m] = x(""), [g, w] = x(null), [c, C] = x(!1), [q, j] = x(null), [_, E] = x(null), $ = K({
431
- queryKey: ["inactive-reassign-users", i],
432
- queryFn: () => d.request(M(`/users?search=${encodeURIComponent(i)}&limit=8`)).then((a) => a.data),
433
- enabled: u && !g && i.trim().length >= 2,
456
+ var h;
457
+ const i = B(), [u, v] = x(!1), [c, m] = x(""), [g, E] = x(null), [w, L] = x(!1), [S, j] = x(null), [l, y] = x(null), N = K({
458
+ queryKey: ["inactive-reassign-users", c],
459
+ queryFn: () => i.request(M(`/users?search=${encodeURIComponent(c)}&limit=8`)).then((r) => r.data),
460
+ enabled: u && !g && c.trim().length >= 2,
434
461
  staleTime: 3e4
435
- }), L = (a) => [a.first_name, a.last_name].filter(Boolean).join(" ") || a.email, n = async () => {
462
+ }), k = (r) => [r.first_name, r.last_name].filter(Boolean).join(" ") || r.email, n = async () => {
436
463
  if (g) {
437
- C(!0), E(null);
464
+ L(!0), y(null);
438
465
  try {
439
- const f = (await d.request(ae(`/inactive-user-links/${l}/reassign`, { source: s.key, to: g.id, ids: N }))).data;
466
+ const f = (await i.request(ae(`/inactive-user-links/${o}/reassign`, { source: s.key, to: g.id, ids: $ }))).data;
440
467
  j(
441
- `${b(f.moved)} moved to ${L(g)}` + (f.removed ? ` · ${b(f.removed)} already theirs` : "") + (f.failed.length ? ` · ${b(f.failed.length)} refused (${f.failed[0].error})` : "")
442
- ), k(!1), h();
443
- } catch (a) {
444
- const f = a.response;
445
- E((f == null ? void 0 : f.error) ?? Q(a, ""));
468
+ `${b(f.moved)} moved to ${k(g)}` + (f.removed ? ` · ${b(f.removed)} already theirs` : "") + (f.failed.length ? ` · ${b(f.failed.length)} refused (${f.failed[0].error})` : "")
469
+ ), v(!1), p();
470
+ } catch (r) {
471
+ const f = r.response;
472
+ y((f == null ? void 0 : f.error) ?? Q(r, ""));
446
473
  } finally {
447
- C(!1);
474
+ L(!1);
448
475
  }
449
476
  }
450
477
  };
451
- return q ? /* @__PURE__ */ e("span", { className: "text-[11px] text-emerald-700 dark:text-emerald-400", "data-inactive-reassigned": !0, children: q }) : /* @__PURE__ */ r("span", { className: "relative inline-block", children: [
478
+ return S ? /* @__PURE__ */ e("span", { className: "text-[11px] text-emerald-700 dark:text-emerald-400", "data-inactive-reassigned": !0, children: S }) : /* @__PURE__ */ a("span", { className: "relative inline-block", children: [
452
479
  /* @__PURE__ */ e(
453
480
  "button",
454
481
  {
455
482
  type: "button",
456
- onClick: () => k((a) => !a),
483
+ onClick: () => v((r) => !r),
457
484
  "data-inactive-reassign": s.key,
458
485
  className: "rounded-md border border-slate-200 bg-white px-2 py-0.5 text-[11px] text-slate-600 hover:border-slate-300 hover:text-slate-900 dark:border-border dark:bg-card dark:text-muted-foreground dark:hover:text-foreground",
459
- children: y
486
+ children: R
460
487
  }
461
488
  ),
462
489
  u && /* @__PURE__ */ e(
@@ -464,30 +491,30 @@ function le({
464
491
  {
465
492
  className: "absolute right-0 top-7 z-30 w-72 rounded-md border border-slate-200 bg-white p-2 text-left shadow-md dark:border-border dark:bg-card",
466
493
  "data-inactive-reassign-panel": !0,
467
- children: g ? /* @__PURE__ */ r("div", { className: "space-y-2", children: [
468
- /* @__PURE__ */ r("p", { className: "text-[12px] text-slate-700 dark:text-foreground", children: [
494
+ children: g ? /* @__PURE__ */ a("div", { className: "space-y-2", children: [
495
+ /* @__PURE__ */ a("p", { className: "text-[12px] text-slate-700 dark:text-foreground", children: [
469
496
  "Put ",
470
- /* @__PURE__ */ e("strong", { className: "font-semibold", children: L(g) }),
497
+ /* @__PURE__ */ e("strong", { className: "font-semibold", children: k(g) }),
471
498
  " on",
472
499
  " ",
473
- b(Math.min(o, 500)),
500
+ b(Math.min(d, 500)),
474
501
  " ",
475
- s.kind === "builtin" ? o === 1 ? "place" : "places" : o === 1 ? "record" : "records",
502
+ s.kind === "builtin" ? d === 1 ? "place" : "places" : d === 1 ? "record" : "records",
476
503
  " ",
477
504
  "as ",
478
505
  s.label.toLowerCase(),
479
- o > 500 ? " (500 at a time)" : "",
506
+ d > 500 ? " (500 at a time)" : "",
480
507
  "?",
481
508
  " ",
482
509
  s.kind === "builtin" ? "Places they already hold are not doubled." : "Each change is saved to the record's history."
483
510
  ] }),
484
- _ && /* @__PURE__ */ e("p", { className: "text-[11.5px] text-rose-700 dark:text-rose-300", children: _ }),
485
- /* @__PURE__ */ r("div", { className: "flex justify-end gap-1.5", children: [
511
+ l && /* @__PURE__ */ e("p", { className: "text-[11.5px] text-rose-700 dark:text-rose-300", children: l }),
512
+ /* @__PURE__ */ a("div", { className: "flex justify-end gap-1.5", children: [
486
513
  /* @__PURE__ */ e(
487
514
  "button",
488
515
  {
489
516
  type: "button",
490
- onClick: () => w(null),
517
+ onClick: () => E(null),
491
518
  className: "h-7 rounded-md px-2 text-[11.5px] text-slate-600 hover:text-slate-900 dark:text-muted-foreground",
492
519
  children: "Back"
493
520
  }
@@ -497,113 +524,113 @@ function le({
497
524
  {
498
525
  type: "button",
499
526
  onClick: n,
500
- disabled: c,
527
+ disabled: w,
501
528
  "data-inactive-reassign-confirm": !0,
502
529
  className: "h-7 rounded-md bg-nvr-cyan px-2.5 text-[11.5px] font-medium text-white disabled:opacity-60",
503
- children: c ? "Moving…" : "Move them"
530
+ children: w ? "Moving…" : "Move them"
504
531
  }
505
532
  )
506
533
  ] })
507
- ] }) : /* @__PURE__ */ r(J, { children: [
534
+ ] }) : /* @__PURE__ */ a(J, { children: [
508
535
  /* @__PURE__ */ e(
509
536
  "input",
510
537
  {
511
538
  autoFocus: !0,
512
- value: i,
513
- onChange: (a) => m(a.target.value),
539
+ value: c,
540
+ onChange: (r) => m(r.target.value),
514
541
  placeholder: "Search people",
515
542
  className: "h-8 w-full rounded-md border border-slate-200 bg-background px-2 text-[12.5px] text-slate-800 placeholder:text-slate-500 focus:border-slate-400 focus:outline-none dark:border-border dark:text-foreground"
516
543
  }
517
544
  ),
518
- /* @__PURE__ */ r("ul", { className: "mt-1 max-h-56 overflow-y-auto", children: [
519
- ($.data ?? []).filter((a) => a.id.toLowerCase() !== l.toLowerCase()).map((a) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ r(
545
+ /* @__PURE__ */ a("ul", { className: "mt-1 max-h-56 overflow-y-auto", children: [
546
+ (N.data ?? []).filter((r) => r.id.toLowerCase() !== o.toLowerCase()).map((r) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ a(
520
547
  "button",
521
548
  {
522
549
  type: "button",
523
- onClick: () => w(a),
524
- "data-inactive-candidate": a.id,
550
+ onClick: () => E(r),
551
+ "data-inactive-candidate": r.id,
525
552
  className: "flex w-full flex-col rounded px-2 py-1 text-left hover:bg-muted",
526
553
  children: [
527
- /* @__PURE__ */ e("span", { className: "text-[12px] text-slate-800 dark:text-foreground", children: L(a) }),
528
- /* @__PURE__ */ e("span", { className: "text-[10.5px] text-slate-500 dark:text-muted-foreground", children: a.email })
554
+ /* @__PURE__ */ e("span", { className: "text-[12px] text-slate-800 dark:text-foreground", children: k(r) }),
555
+ /* @__PURE__ */ e("span", { className: "text-[10.5px] text-slate-500 dark:text-muted-foreground", children: r.email })
529
556
  ]
530
557
  }
531
- ) }, a.id)),
532
- i.trim().length >= 2 && !$.isLoading && !((p = $.data) != null && p.length) && /* @__PURE__ */ e("li", { className: "px-2 py-1 text-[11.5px] text-slate-500 dark:text-muted-foreground", children: "No active person matches." })
558
+ ) }, r.id)),
559
+ c.trim().length >= 2 && !N.isLoading && !((h = N.data) != null && h.length) && /* @__PURE__ */ e("li", { className: "px-2 py-1 text-[11.5px] text-slate-500 dark:text-muted-foreground", children: "No active person matches." })
533
560
  ] })
534
561
  ] })
535
562
  }
536
563
  )
537
564
  ] });
538
565
  }
539
- function Ne({
540
- userId: l,
566
+ function we({
567
+ userId: o,
541
568
  source: s,
542
- entries: o,
543
- onChanged: N
569
+ entries: d,
570
+ onChanged: $
544
571
  }) {
545
- const y = B(), h = ee(), { open: d } = te(), [u, k] = x(/* @__PURE__ */ new Set()), [i, m] = x(!1), [g, w] = x(!1), [c, C] = x(null), q = s.key !== "builtin:tasks", j = [...u], _ = o.length > 0 && u.size === o.length, E = (n) => k((p) => {
546
- const a = new Set(p);
547
- return a.has(n) ? a.delete(n) : a.add(n), a;
548
- }), $ = async () => {
572
+ const R = B(), p = ee(), { open: i } = te(), [u, v] = x(/* @__PURE__ */ new Set()), [c, m] = x(!1), [g, E] = x(!1), [w, L] = x(null), S = s.key !== "builtin:tasks", j = [...u], l = d.length > 0 && u.size === d.length, y = (n) => v((h) => {
573
+ const r = new Set(h);
574
+ return r.has(n) ? r.delete(n) : r.add(n), r;
575
+ }), N = async () => {
549
576
  var n;
550
- w(!0);
577
+ E(!0);
551
578
  try {
552
- const p = await y.request(
553
- ae(`/inactive-user-links/${l}/remove`, { source: s.key, ids: j })
579
+ const h = await R.request(
580
+ ae(`/inactive-user-links/${o}/remove`, { source: s.key, ids: j })
554
581
  );
555
- C(
556
- `${b(p.data.removed)} removed${p.data.failed.length ? ` · ${b(p.data.failed.length)} refused` : ""}`
557
- ), k(/* @__PURE__ */ new Set()), m(!1), N();
558
- } catch (p) {
559
- C(((n = p.response) == null ? void 0 : n.error) ?? Q(p, ""));
582
+ L(
583
+ `${b(h.data.removed)} removed${h.data.failed.length ? ` · ${b(h.data.failed.length)} refused` : ""}`
584
+ ), v(/* @__PURE__ */ new Set()), m(!1), $();
585
+ } catch (h) {
586
+ L(((n = h.response) == null ? void 0 : n.error) ?? Q(h, ""));
560
587
  } finally {
561
- w(!1);
588
+ E(!1);
562
589
  }
563
590
  };
564
- if (!o.length)
591
+ if (!d.length)
565
592
  return /* @__PURE__ */ e("p", { className: "text-[11.5px] text-slate-500 dark:text-muted-foreground", children: "Nothing to list." });
566
- const L = o.filter((n) => n.sole).length;
567
- return /* @__PURE__ */ r("div", { "data-inactive-entries": s.key, children: [
568
- /* @__PURE__ */ r("div", { className: "mb-1 flex min-h-7 flex-wrap items-center gap-2 text-[11.5px] text-slate-600 dark:text-muted-foreground", children: [
569
- /* @__PURE__ */ r("label", { className: "flex cursor-pointer items-center gap-1.5", children: [
593
+ const k = d.filter((n) => n.sole).length;
594
+ return /* @__PURE__ */ a("div", { "data-inactive-entries": s.key, children: [
595
+ /* @__PURE__ */ a("div", { className: "mb-1 flex min-h-7 flex-wrap items-center gap-2 text-[11.5px] text-slate-600 dark:text-muted-foreground", children: [
596
+ /* @__PURE__ */ a("label", { className: "flex cursor-pointer items-center gap-1.5", children: [
570
597
  /* @__PURE__ */ e(
571
598
  "input",
572
599
  {
573
600
  type: "checkbox",
574
- checked: _,
575
- onChange: () => k(_ ? /* @__PURE__ */ new Set() : new Set(o.map((n) => n.id))),
601
+ checked: l,
602
+ onChange: () => v(l ? /* @__PURE__ */ new Set() : new Set(d.map((n) => n.id))),
576
603
  className: "h-3.5 w-3.5 accent-slate-700",
577
604
  "data-inactive-entries-all": !0
578
605
  }
579
606
  ),
580
607
  u.size ? `${b(u.size)} picked` : "Pick all"
581
608
  ] }),
582
- L > 0 && /* @__PURE__ */ r("span", { className: "rounded bg-[#ffe4e6] px-1.5 py-0.5 text-[10.5px] font-medium text-[#9f1239] dark:bg-[#3d1a20] dark:text-[#f4a3ad]", children: [
583
- b(L),
609
+ k > 0 && /* @__PURE__ */ a("span", { className: "rounded bg-[#ffe4e6] px-1.5 py-0.5 text-[10.5px] font-medium text-[#9f1239] dark:bg-[#3d1a20] dark:text-[#f4a3ad]", children: [
610
+ b(k),
584
611
  " with nobody else who can act"
585
612
  ] }),
586
- c && /* @__PURE__ */ e("span", { className: "text-emerald-700 dark:text-emerald-400", children: c }),
587
- u.size > 0 && /* @__PURE__ */ r("span", { className: "ml-auto flex items-center gap-1.5", children: [
613
+ w && /* @__PURE__ */ e("span", { className: "text-emerald-700 dark:text-emerald-400", children: w }),
614
+ u.size > 0 && /* @__PURE__ */ a("span", { className: "ml-auto flex items-center gap-1.5", children: [
588
615
  /* @__PURE__ */ e(
589
- le,
616
+ oe,
590
617
  {
591
- userId: l,
618
+ userId: o,
592
619
  source: s,
593
620
  count: u.size,
594
621
  ids: j,
595
622
  label: `Hand ${b(u.size)} to…`,
596
623
  onDone: () => {
597
- k(/* @__PURE__ */ new Set()), N();
624
+ v(/* @__PURE__ */ new Set()), $();
598
625
  }
599
626
  }
600
627
  ),
601
- q && (i ? /* @__PURE__ */ r(J, { children: [
628
+ S && (c ? /* @__PURE__ */ a(J, { children: [
602
629
  /* @__PURE__ */ e(
603
630
  "button",
604
631
  {
605
632
  type: "button",
606
- onClick: $,
633
+ onClick: N,
607
634
  disabled: g,
608
635
  "data-inactive-remove-confirm": !0,
609
636
  className: "h-[22px] rounded-md bg-[#be123c] px-2 text-[11px] font-medium text-white disabled:opacity-60",
@@ -631,9 +658,9 @@ function Ne({
631
658
  ))
632
659
  ] })
633
660
  ] }),
634
- /* @__PURE__ */ e("ul", { className: "divide-y divide-slate-100 rounded-md border border-slate-200 bg-white dark:divide-border dark:border-border dark:bg-card", children: o.map((n) => {
635
- const p = n.console_path ? h.consoleUrl ? h.consoleUrl(n.console_path) : n.console_path : null;
636
- return /* @__PURE__ */ r(
661
+ /* @__PURE__ */ e("ul", { className: "divide-y divide-slate-100 rounded-md border border-slate-200 bg-white dark:divide-border dark:border-border dark:bg-card", children: d.map((n) => {
662
+ const h = n.console_path ? p.consoleUrl ? p.consoleUrl(n.console_path) : n.console_path : null;
663
+ return /* @__PURE__ */ a(
637
664
  "li",
638
665
  {
639
666
  className: "flex items-start gap-2 px-2.5 py-1.5",
@@ -644,26 +671,26 @@ function Ne({
644
671
  {
645
672
  type: "checkbox",
646
673
  checked: u.has(n.id),
647
- onChange: () => E(n.id),
674
+ onChange: () => y(n.id),
648
675
  "aria-label": `Pick ${n.title}`,
649
676
  className: "mt-0.5 h-3.5 w-3.5 shrink-0 accent-slate-700"
650
677
  }
651
678
  ),
652
- /* @__PURE__ */ r("div", { className: "min-w-0 flex-1", children: [
653
- /* @__PURE__ */ r("div", { className: "flex flex-wrap items-baseline gap-x-2", children: [
679
+ /* @__PURE__ */ a("div", { className: "min-w-0 flex-1", children: [
680
+ /* @__PURE__ */ a("div", { className: "flex flex-wrap items-baseline gap-x-2", children: [
654
681
  n.record ? /* @__PURE__ */ e(
655
682
  "button",
656
683
  {
657
684
  type: "button",
658
- onClick: () => n.record && d({ collection: n.record.collection, itemId: n.record.id }),
685
+ onClick: () => n.record && i({ collection: n.record.collection, itemId: n.record.id }),
659
686
  className: "text-left text-[12px] font-medium text-slate-900 underline decoration-dotted underline-offset-2 dark:text-foreground",
660
687
  children: n.title
661
688
  }
662
- ) : p ? /* @__PURE__ */ e(
689
+ ) : h ? /* @__PURE__ */ e(
663
690
  "button",
664
691
  {
665
692
  type: "button",
666
- onClick: () => /^https?:/.test(p) ? window.open(p, "_blank") : h.navigate(p),
693
+ onClick: () => /^https?:/.test(h) ? window.open(h, "_blank") : p.navigate(h),
667
694
  className: "text-left text-[12px] font-medium text-slate-900 underline decoration-dotted underline-offset-2 dark:text-foreground",
668
695
  children: n.title
669
696
  }
@@ -674,7 +701,7 @@ function Ne({
674
701
  (s.key === "builtin:owner_seats" || s.key === "builtin:teams") && /* @__PURE__ */ e(
675
702
  "p",
676
703
  {
677
- className: A(
704
+ className: F(
678
705
  "text-[11px]",
679
706
  n.sole ? "font-medium text-[#9f1239] dark:text-[#f4a3ad]" : "text-slate-500 dark:text-muted-foreground"
680
707
  ),
@@ -690,6 +717,6 @@ function Ne({
690
717
  ] });
691
718
  }
692
719
  export {
693
- Ee as InactiveUserLinksView,
720
+ Fe as InactiveUserLinksView,
694
721
  X as reasonGroup
695
722
  };