@nivaro/react 0.3.55 → 0.3.57

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.
@@ -1,91 +1,92 @@
1
- import { jsxs as d, Fragment as Ce, jsx as a } from "react/jsx-runtime";
1
+ import { jsxs as d, Fragment as qe, jsx as a } from "react/jsx-runtime";
2
2
  import { useSensors as no, useSensor as ro, PointerSensor as ao, DndContext as lo, closestCenter as oo } from "@dnd-kit/core";
3
3
  import { SortableContext as so, verticalListSortingStrategy as io, arrayMove as co, useSortable as uo } from "@dnd-kit/sortable";
4
4
  import { CSS as mo } from "@dnd-kit/utilities";
5
- import { useQueryClient as po, useQuery as W, useMutation as Se, useQueries as Be } from "@tanstack/react-query";
6
- import { AlertTriangle as bo, FileDiff as ho, RefreshCw as fo, Rows3 as wa, Flame as go, Sparkles as xo, BarChart3 as yo, SlidersHorizontal as ko, ListChecks as vo, Rows4 as wo, Rows2 as _o, Play as No, Plus as Zt, ChevronDown as _a, Star as So, Pin as Co, Loader2 as $o, Check as qo, Save as Fo, Bell as To, Inbox as Ro, GripVertical as Eo } from "lucide-react";
7
- import { useState as w, useRef as U, useEffect as M, useMemo as V } from "react";
8
- import { createPortal as Na } from "react-dom";
9
- import { toast as D } from "sonner";
10
- import { useNivaroClient as Ea, useItemEditAuth as Sa, useItemNavigation as Ao, useNavigation as Lo, useOverlayState as Oo } from "../../context.js";
5
+ import { useQueryClient as po, useQuery as W, useMutation as $e, useQueries as Be } from "@tanstack/react-query";
6
+ import { AlertTriangle as bo, FileDiff as ho, RefreshCw as fo, Rows3 as _a, Flame as go, Sparkles as xo, BarChart3 as yo, SlidersHorizontal as ko, ListChecks as vo, Rows4 as wo, Rows2 as _o, Play as No, Plus as en, ChevronDown as Na, Star as So, Pin as Co, Loader2 as $o, Check as qo, Save as Fo, Bell as To, Inbox as Ro, GripVertical as Eo } from "lucide-react";
7
+ import { useState as v, useRef as U, useEffect as P, useMemo as V } from "react";
8
+ import { createPortal as Sa } from "react-dom";
9
+ import { toast as O } from "sonner";
10
+ import { useNivaroClient as La, useItemEditAuth as Ca, useItemNavigation as Lo, useNavigation as Ao, useOverlayState as Oo } from "../../context.js";
11
11
  import { useDebounced as Do } from "../../hooks/useDebounced.js";
12
12
  import { useElapsedLoading as Ko } from "../../hooks/useElapsedLoading.js";
13
13
  import { useSlowReason as Po } from "../../hooks/useSlowReason.js";
14
14
  import { useBulkProgressFeed as Mo } from "../../lib/bulk-progress.js";
15
- import { get as A, post as se, patch as Ca, del as jn, put as Qo } from "../../lib/commands.js";
15
+ import { get as L, post as se, patch as $a, del as In, put as Qo } from "../../lib/commands.js";
16
16
  import { evaluateExpression as Bo } from "../../lib/expression.js";
17
17
  import { clauseFromControlValue as jo, filterSentence as Uo } from "../../lib/filter-sentence.js";
18
18
  import { deliverLive as Io, releaseLiveOwner as Vo } from "../../lib/focus-mode.js";
19
- import { formatMultiValue as tt, formatValue as Go } from "../../lib/format-value.js";
19
+ import { formatMultiValue as nt, formatValue as Go } from "../../lib/format-value.js";
20
20
  import { createCursorBook as Wo, pageRequest as Ho, noteNextCursor as Yo } from "../../lib/keyset-pager.js";
21
21
  import { normalizeInlineEdit as Jo, inlineM2oTarget as zo, inlineChoices as Xo, inlineEditFor as Zo, nextInlineKey as es } from "../../lib/list-inline-edit.js";
22
22
  import { sanitizeQueueLinkState as ts, readListLinkFromLocation as ns, dropListLinkParam as rs } from "../../lib/list-link.js";
23
23
  import { expandCoalesced as as, LIVE_ASPECTS as $t } from "../../lib/live.js";
24
24
  import { useRowChanges as ls, useRowLocksByCollection as os, lockLabel as ss } from "../../lib/live-list.js";
25
- import { OPEN_IN_TABS_CAP as is, openInTabs as cs, openInTabsMessage as $a } from "../../lib/open-in-tabs.js";
25
+ import { OPEN_IN_TABS_CAP as is, openInTabs as cs, openInTabsMessage as qa } from "../../lib/open-in-tabs.js";
26
26
  import { isOwnWrite as ds } from "../../lib/own-writes.js";
27
27
  import { usePrefetchIntent as us } from "../../lib/prefetch.js";
28
28
  import { useRowPresence as ms, rowPresenceKey as ps } from "../../lib/presence-hooks.js";
29
29
  import { buildGroups as bs } from "../../lib/queue-grouping.js";
30
30
  import { cascadeFilter as hs, fetchCascadeRelations as fs } from "../../lib/quick-filter-cascade.js";
31
31
  import { useOptionalRealtime as gs } from "../../lib/realtime.js";
32
- import { copyIdText as qa } from "../../lib/record-ref.js";
32
+ import { copyIdText as Fa } from "../../lib/record-ref.js";
33
33
  import { rowHighlightTextClass as xs, rowHighlightClass as ys } from "../../lib/row-highlight.js";
34
34
  import { userErrorMessage as qt } from "../../lib/safe-error.js";
35
- import { useMyScopes as ks, matchScopeDimension as vs, effectiveScopeSeedIds as ws } from "../../lib/use-my-scopes.js";
36
- import { useNewItemLayouts as _s } from "../../lib/use-new-item-layouts.js";
37
- import { formatNumber as ie, cn as R, titleCase as Un, humanHours as Ns, formatRelative as Ss, formatDateTime as Cs, formatDate as $s } from "../../lib/utils.js";
38
- import { usePublishAskContext as qs, useAskRecordDrag as Fs } from "../ai/ask-context.js";
39
- import { useBuiltinGate as Ts, BulkActionButtons as Rs } from "../bulk/BulkActionButtons.js";
40
- import { BulkRowMark as Es } from "../bulk/BulkRowMark.js";
41
- import { RowActionsMenu as As, roleMayUpdate as Ls } from "../CollectionBrowserView.js";
42
- import { DataTable as Os } from "../DataTable.js";
43
- import { EmptyState as Ds } from "../EmptyState.js";
44
- import { FocusModeToggle as Ks } from "../FocusModeToggle.js";
45
- import { FulfilmentPill as Ps, FULFILMENT_FILTER_OPTIONS as Ms } from "../FulfilmentPill.js";
46
- import { ImportFromFileButton as Qs } from "../import/ImportFromFileButton.js";
47
- import { IntegrationDots as Bs, INTEGRATIONS_FILTER_OPTIONS as js } from "../integrations/IntegrationDots.js";
48
- import { IntegrationsFilterPill as Us } from "../integrations/IntegrationsFilterPill.js";
49
- import { readQueueReturn as Is, writeQueueReturn as Fa } from "../item-edit/QueueReturnChip.js";
50
- import { ListLoadError as Vs } from "../ListLoadError.js";
51
- import { LiveRowMark as Gs } from "../LiveRowMark.js";
52
- import { CopyListLinkButton as Ws } from "../list/CopyListLinkButton.js";
53
- import { useInlineEdit as Hs, InlineEditCell as Ys } from "../list/InlineEdit.js";
54
- import { usePickerExcludedRows as Js, PICKER_EXCLUDED_ROW_CLASS as zs, PICKER_EXCLUDED_TITLE as Xs } from "../PickerExcludedRows.js";
55
- import { RealtimeStaleMark as Zs } from "../RealtimeStatusBanner.js";
56
- import { RecordDrilldownSheet as ei } from "../RecordDrilldownSheet.js";
57
- import { RowHighlightLegend as ti } from "../RowHighlightLegend.js";
58
- import { RowPresence as ni } from "../RowPresence.js";
59
- import { TickerNumber as In } from "../TickerNumber.js";
60
- import { UnseenDot as ri } from "../UnseenDot.js";
61
- import { Badge as ai } from "../ui/badge.js";
62
- import { Checkbox as Vn } from "../ui/checkbox.js";
63
- import { Command as Ta, CommandInput as li, CommandList as Ra, CommandEmpty as oi, CommandItem as Ft } from "../ui/command.js";
64
- import { Label as si } from "../ui/label.js";
65
- import { Popover as nt, PopoverTrigger as rt, PopoverContent as at } from "../ui/popover.js";
66
- import { Skeleton as ii } from "../ui/skeleton.js";
67
- import { dedupeChooserKeys as ci } from "./column-chooser.js";
68
- import { stateAspectEffect as di } from "./live-state-aspect.js";
69
- import { OwnerAvatars as ui } from "./OwnerAvatars.js";
70
- import { QueueBulkBar as mi } from "./QueueBulkBar.js";
71
- import { QueueItemSheet as pi } from "./QueueItemSheet.js";
72
- import { QueueKanbanBoard as bi } from "./QueueKanbanBoard.js";
73
- import { QueueQuickFilters as hi } from "./QueueQuickFilters.js";
74
- import { QueueWorkloadView as fi } from "./QueueWorkloadView.js";
75
- import { useTransitionNote as gi, needsTransitionNote as xi } from "./transition-note.js";
76
- function yi({ summary: l }) {
35
+ import { useMyScopes as ks, matchScopeDimension as vs } from "../../lib/use-my-scopes.js";
36
+ import { useNewItemLayouts as ws } from "../../lib/use-new-item-layouts.js";
37
+ import { formatNumber as ie, cn as E, titleCase as Vn, humanHours as _s, formatRelative as Ns, formatDateTime as Ss, formatDate as Cs } from "../../lib/utils.js";
38
+ import { usePublishAskContext as $s, useAskRecordDrag as qs } from "../ai/ask-context.js";
39
+ import { useBuiltinGate as Fs, BulkActionButtons as Ts } from "../bulk/BulkActionButtons.js";
40
+ import { BulkRowMark as Rs } from "../bulk/BulkRowMark.js";
41
+ import { RowActionsMenu as Es, roleMayUpdate as Ls } from "../CollectionBrowserView.js";
42
+ import { DataTable as As } from "../DataTable.js";
43
+ import { EmptyState as Os } from "../EmptyState.js";
44
+ import { FocusModeToggle as Ds } from "../FocusModeToggle.js";
45
+ import { FulfilmentPill as Ks, FULFILMENT_FILTER_OPTIONS as Ps } from "../FulfilmentPill.js";
46
+ import { ImportFromFileButton as Ms } from "../import/ImportFromFileButton.js";
47
+ import { IntegrationDots as Qs, INTEGRATIONS_FILTER_OPTIONS as Bs } from "../integrations/IntegrationDots.js";
48
+ import { IntegrationsFilterPill as js } from "../integrations/IntegrationsFilterPill.js";
49
+ import { readQueueReturn as Us, writeQueueReturn as Ta } from "../item-edit/QueueReturnChip.js";
50
+ import { ListLoadError as Is } from "../ListLoadError.js";
51
+ import { LiveRowMark as Vs } from "../LiveRowMark.js";
52
+ import { CopyListLinkButton as Gs } from "../list/CopyListLinkButton.js";
53
+ import { useInlineEdit as Ws, InlineEditCell as Hs } from "../list/InlineEdit.js";
54
+ import { usePickerExcludedRows as Ys, PICKER_EXCLUDED_ROW_CLASS as Js, PICKER_EXCLUDED_TITLE as zs } from "../PickerExcludedRows.js";
55
+ import { RealtimeStaleMark as Xs } from "../RealtimeStatusBanner.js";
56
+ import { RecordDrilldownSheet as Zs } from "../RecordDrilldownSheet.js";
57
+ import { RowHighlightLegend as ei } from "../RowHighlightLegend.js";
58
+ import { RowPresence as ti } from "../RowPresence.js";
59
+ import { TickerNumber as Gn } from "../TickerNumber.js";
60
+ import { UnseenDot as ni } from "../UnseenDot.js";
61
+ import { Badge as ri } from "../ui/badge.js";
62
+ import { Checkbox as Wn } from "../ui/checkbox.js";
63
+ import { Command as Ra, CommandInput as ai, CommandList as Ea, CommandEmpty as li, CommandItem as Ft } from "../ui/command.js";
64
+ import { Label as oi } from "../ui/label.js";
65
+ import { Popover as rt, PopoverTrigger as at, PopoverContent as lt } from "../ui/popover.js";
66
+ import { Skeleton as si } from "../ui/skeleton.js";
67
+ import { dedupeChooserKeys as ii } from "./column-chooser.js";
68
+ import { statsOutrunRows as ci, stateAspectEffect as di } from "./live-state-aspect.js";
69
+ import { pathHeader as ui } from "./path-label.js";
70
+ import { OwnerAvatars as mi } from "./OwnerAvatars.js";
71
+ import { QueueBulkBar as pi } from "./QueueBulkBar.js";
72
+ import { QueueItemSheet as bi } from "./QueueItemSheet.js";
73
+ import { QueueKanbanBoard as hi } from "./QueueKanbanBoard.js";
74
+ import { QueueQuickFilters as fi } from "./QueueQuickFilters.js";
75
+ import { QueueWorkloadView as gi } from "./QueueWorkloadView.js";
76
+ import { useTransitionNote as xi, needsTransitionNote as yi } from "./transition-note.js";
77
+ function ki({ summary: l }) {
77
78
  if (!l || l.count === 0)
78
79
  return /* @__PURE__ */ a("span", { className: "text-slate-300 dark:text-muted-foreground", children: "—" });
79
- const y = [l.last_from, l.last_to].filter(Boolean).join(" → "), L = [
80
- y ? `Last: ${y}` : null,
81
- l.last_at ? Ss(l.last_at) : null,
80
+ const k = [l.last_from, l.last_to].filter(Boolean).join(" → "), K = [
81
+ k ? `Last: ${k}` : null,
82
+ l.last_at ? Ns(l.last_at) : null,
82
83
  l.last_reason ? `“${l.last_reason}”` : "no reason given"
83
84
  ].filter(Boolean).join(" · ");
84
85
  return /* @__PURE__ */ d(
85
86
  "span",
86
87
  {
87
88
  className: "inline-flex max-w-[260px] items-center gap-1.5 truncate rounded-full border border-rose-200 bg-rose-50 px-2 py-0.5 text-[11px] font-medium text-rose-700 dark:border-rose-900/40 dark:bg-rose-900/10 dark:text-rose-300",
88
- "data-tip": L,
89
+ "data-tip": K,
89
90
  "data-send-backs": l.count,
90
91
  children: [
91
92
  /* @__PURE__ */ d("span", { className: "tabular-nums", children: [
@@ -100,35 +101,35 @@ function yi({ summary: l }) {
100
101
  }
101
102
  );
102
103
  }
103
- const ki = 50, en = "nivaro_addendums", vi = [
104
+ const vi = 50, tn = "nivaro_addendums", wi = [
104
105
  { value: "mine", label: "My Items" },
105
106
  { value: "unowned", label: "No Owners" },
106
107
  { value: "claimed", label: "Claimed by me" },
107
108
  { value: "all", label: "All Items" }
108
109
  ];
109
- function wi({ summary: l }) {
110
+ function _i({ summary: l }) {
110
111
  if (!l || l.total === 0) return /* @__PURE__ */ a("span", { className: "text-slate-300", children: "—" });
111
- const y = l.active > 0, L = l.latest_status === "review" ? "in review" : l.latest_status ?? "active", P = l.cost_impact, G = P != null && P !== 0 ? `${P > 0 ? "+" : "−"}$${Math.abs(P).toLocaleString(void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}` : null;
112
+ const k = l.active > 0, K = l.latest_status === "review" ? "in review" : l.latest_status ?? "active", M = l.cost_impact, G = M != null && M !== 0 ? `${M > 0 ? "+" : "−"}$${Math.abs(M).toLocaleString(void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}` : null;
112
113
  return /* @__PURE__ */ d(
113
114
  "span",
114
115
  {
115
116
  title: l.latest_title ?? void 0,
116
- className: R(
117
+ className: E(
117
118
  "inline-flex max-w-[220px] items-center gap-1.5 truncate rounded-full border px-2 py-0.5 text-[11px] font-medium",
118
- y ? "border-amber-300 bg-amber-50 text-amber-800 dark:border-amber-500/50 dark:bg-amber-500/10 dark:text-amber-300" : "border-slate-200 bg-slate-50 text-slate-600 dark:border-border dark:bg-muted dark:text-slate-300"
119
+ k ? "border-amber-300 bg-amber-50 text-amber-800 dark:border-amber-500/50 dark:bg-amber-500/10 dark:text-amber-300" : "border-slate-200 bg-slate-50 text-slate-600 dark:border-border dark:bg-muted dark:text-slate-300"
119
120
  ),
120
121
  children: [
121
122
  /* @__PURE__ */ a(
122
123
  "span",
123
124
  {
124
125
  "aria-hidden": !0,
125
- className: R(
126
+ className: E(
126
127
  "h-1.5 w-1.5 shrink-0 rounded-full",
127
- y ? "bg-amber-500" : "bg-slate-400"
128
+ k ? "bg-amber-500" : "bg-slate-400"
128
129
  )
129
130
  }
130
131
  ),
131
- y ? `${l.active} ${l.active === 1 ? "addendum" : "addendums"} ${L}` : `${l.total} ${L}`,
132
+ k ? `${l.active} ${l.active === 1 ? "addendum" : "addendums"} ${K}` : `${l.total} ${K}`,
132
133
  G && /* @__PURE__ */ d("span", { className: "tabular-nums opacity-80", children: [
133
134
  "· ",
134
135
  G
@@ -137,23 +138,23 @@ function wi({ summary: l }) {
137
138
  }
138
139
  );
139
140
  }
140
- function _i(l) {
141
- return Ns(l);
141
+ function Ni(l) {
142
+ return _s(l);
142
143
  }
143
- function Ni({ status: l }) {
144
- return l ? /* @__PURE__ */ a("span", { className: R("rounded px-1.5 py-0.5 text-[11px] font-medium", l === "breached" ? "bg-red-50 text-red-600 dark:bg-red-500/10 dark:text-red-400" : l === "warning" ? "bg-amber-50 text-amber-600 dark:bg-amber-500/10 dark:text-amber-400" : "bg-emerald-50 text-emerald-600 dark:bg-emerald-500/10 dark:text-emerald-400"), children: l }) : /* @__PURE__ */ a("span", { className: "text-slate-300", children: "—" });
144
+ function Si({ status: l }) {
145
+ return l ? /* @__PURE__ */ a("span", { className: E("rounded px-1.5 py-0.5 text-[11px] font-medium", l === "breached" ? "bg-red-50 text-red-600 dark:bg-red-500/10 dark:text-red-400" : l === "warning" ? "bg-amber-50 text-amber-600 dark:bg-amber-500/10 dark:text-amber-400" : "bg-emerald-50 text-emerald-600 dark:bg-emerald-500/10 dark:text-emerald-400"), children: l }) : /* @__PURE__ */ a("span", { className: "text-slate-300", children: "—" });
145
146
  }
146
- function Si({ points: l, inline: y = !1 }) {
147
+ function Ci({ points: l, inline: k = !1 }) {
147
148
  if (l.length < 2) return null;
148
- const L = y ? 40 : 64, P = y ? 14 : 18, G = Math.max(...l), f = Math.min(...l), h = G - f || 1, S = L / (l.length - 1), H = l.map(
149
- (xe, g) => `${g === 0 ? "M" : "L"}${(g * S).toFixed(1)},${(P - 2 - (xe - f) / h * (P - 4)).toFixed(1)}`
149
+ const K = k ? 40 : 64, M = k ? 14 : 18, G = Math.max(...l), f = Math.min(...l), h = G - f || 1, N = K / (l.length - 1), H = l.map(
150
+ (ye, g) => `${g === 0 ? "M" : "L"}${(g * N).toFixed(1)},${(M - 2 - (ye - f) / h * (M - 4)).toFixed(1)}`
150
151
  ).join(" ");
151
152
  return /* @__PURE__ */ a(
152
153
  "svg",
153
154
  {
154
- width: L,
155
- height: P,
156
- className: y ? "opacity-40" : "mt-1.5 opacity-40",
155
+ width: K,
156
+ height: M,
157
+ className: k ? "opacity-40" : "mt-1.5 opacity-40",
157
158
  "aria-hidden": "true",
158
159
  children: /* @__PURE__ */ a("path", { d: H, fill: "none", stroke: "currentColor", strokeWidth: "1.5" })
159
160
  }
@@ -161,67 +162,67 @@ function Si({ points: l, inline: y = !1 }) {
161
162
  }
162
163
  function Tt({
163
164
  label: l,
164
- count: y,
165
- filteredCount: L,
166
- active: P,
165
+ count: k,
166
+ filteredCount: K,
167
+ active: M,
167
168
  isLoading: G,
168
169
  tone: f,
169
170
  trend: h,
170
- delta: S,
171
+ delta: N,
171
172
  deltaBadIsUp: H,
172
- onClick: xe
173
+ onClick: ye
173
174
  }) {
174
175
  return /* @__PURE__ */ a(
175
176
  "button",
176
177
  {
177
178
  type: "button",
178
- onClick: xe,
179
- className: R(
179
+ onClick: ye,
180
+ className: E(
180
181
  "nvr-section-enter flex items-center gap-1.5 bg-white px-3 py-2 text-left transition-colors hover:bg-slate-50 dark:bg-card dark:hover:bg-card/80",
181
- P && "bg-nvr-cyan/5 ring-1 ring-inset ring-nvr-cyan dark:bg-nvr-cyan/10",
182
- !P && !G && y === 0 && "opacity-50"
182
+ M && "bg-nvr-cyan/5 ring-1 ring-inset ring-nvr-cyan dark:bg-nvr-cyan/10",
183
+ !M && !G && k === 0 && "opacity-50"
183
184
  ),
184
- children: G ? /* @__PURE__ */ a(ii, { className: "h-5 w-16 rounded" }) : /* @__PURE__ */ d(Ce, { children: [
185
- /* @__PURE__ */ a("span", { className: "flex items-baseline gap-1 text-[15px] font-semibold leading-none tabular-nums text-slate-900 dark:text-foreground", children: L != null ? /* @__PURE__ */ d(Ce, { children: [
186
- /* @__PURE__ */ a("span", { className: "text-nvr-navy dark:text-nvr-cyan", children: /* @__PURE__ */ a(In, { value: L, format: ie }) }),
185
+ children: G ? /* @__PURE__ */ a(si, { className: "h-5 w-16 rounded" }) : /* @__PURE__ */ d(qe, { children: [
186
+ /* @__PURE__ */ a("span", { className: "flex items-baseline gap-1 text-[15px] font-semibold leading-none tabular-nums text-slate-900 dark:text-foreground", children: K != null ? /* @__PURE__ */ d(qe, { children: [
187
+ /* @__PURE__ */ a("span", { className: "text-nvr-navy dark:text-nvr-cyan", children: /* @__PURE__ */ a(Gn, { value: K, format: ie }) }),
187
188
  /* @__PURE__ */ d("span", { className: "text-[11px] font-medium text-slate-400", children: [
188
189
  "/ ",
189
- /* @__PURE__ */ a(In, { value: y, format: ie })
190
+ /* @__PURE__ */ a(Gn, { value: k, format: ie })
190
191
  ] })
191
- ] }) : /* @__PURE__ */ a(In, { value: y, format: ie }) }),
192
+ ] }) : /* @__PURE__ */ a(Gn, { value: k, format: ie }) }),
192
193
  /* @__PURE__ */ a(
193
194
  "span",
194
195
  {
195
- className: R(
196
+ className: E(
196
197
  "text-[11px] font-medium leading-none",
197
198
  f === "red" ? "text-red-500 dark:text-red-400" : f === "amber" ? "text-amber-600 dark:text-amber-400" : "text-slate-400 dark:text-muted-foreground"
198
199
  ),
199
200
  children: l
200
201
  }
201
202
  ),
202
- S != null && S !== 0 && /* @__PURE__ */ d(
203
+ N != null && N !== 0 && /* @__PURE__ */ d(
203
204
  "span",
204
205
  {
205
- className: R(
206
+ className: E(
206
207
  "text-[10px] font-medium leading-none",
207
- H ? S > 0 ? "text-red-500" : "text-emerald-600" : "text-slate-400"
208
+ H ? N > 0 ? "text-red-500" : "text-emerald-600" : "text-slate-400"
208
209
  ),
209
210
  children: [
210
- S > 0 ? "↑" : "↓",
211
- ie(Math.abs(S))
211
+ N > 0 ? "↑" : "↓",
212
+ ie(Math.abs(N))
212
213
  ]
213
214
  }
214
215
  ),
215
- h && y > 0 && /* @__PURE__ */ a(Si, { points: h, inline: !0 })
216
+ h && k > 0 && /* @__PURE__ */ a(Ci, { points: h, inline: !0 })
216
217
  ] })
217
218
  }
218
219
  );
219
220
  }
220
- function Ci({
221
+ function $i({
221
222
  label: l,
222
- count: y,
223
- filteredCount: L,
224
- color: P,
223
+ count: k,
224
+ filteredCount: K,
225
+ color: M,
225
226
  active: G,
226
227
  onClick: f
227
228
  }) {
@@ -230,7 +231,7 @@ function Ci({
230
231
  {
231
232
  type: "button",
232
233
  onClick: f,
233
- className: R(
234
+ className: E(
234
235
  "flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-[12px] font-medium transition-colors",
235
236
  G ? "border-nvr-cyan bg-nvr-cyan/10 text-nvr-navy dark:text-nvr-cyan" : "border-slate-200 bg-white text-slate-600 hover:border-slate-300 hover:bg-slate-50 dark:border-border dark:bg-card dark:text-slate-300"
236
237
  ),
@@ -239,36 +240,34 @@ function Ci({
239
240
  "span",
240
241
  {
241
242
  className: "h-2 w-2 shrink-0 rounded-full",
242
- style: { backgroundColor: P ?? "#94a3b8" }
243
+ style: { backgroundColor: M ?? "#94a3b8" }
243
244
  }
244
245
  ),
245
246
  l,
246
- /* @__PURE__ */ a("span", { className: "font-semibold tabular-nums text-slate-900 dark:text-foreground", children: L != null ? /* @__PURE__ */ d(Ce, { children: [
247
- /* @__PURE__ */ a("span", { className: "text-nvr-navy dark:text-nvr-cyan", children: ie(L) }),
247
+ /* @__PURE__ */ a("span", { className: "font-semibold tabular-nums text-slate-900 dark:text-foreground", children: K != null ? /* @__PURE__ */ d(qe, { children: [
248
+ /* @__PURE__ */ a("span", { className: "text-nvr-navy dark:text-nvr-cyan", children: ie(K) }),
248
249
  /* @__PURE__ */ d("span", { className: "font-normal text-slate-400", children: [
249
250
  " / ",
250
- ie(y)
251
+ ie(k)
251
252
  ] })
252
- ] }) : ie(y) })
253
+ ] }) : ie(k) })
253
254
  ]
254
255
  }
255
256
  );
256
257
  }
257
- function lt(l) {
258
- return l.split(".").map((y) => y.replace(/_/g, " ").replace(/\b\w/g, (L) => L.toUpperCase())).join(" → ");
259
- }
260
- function $i({
258
+ const je = ui;
259
+ function qi({
261
260
  id: l,
262
- label: y,
263
- checked: L,
264
- onCheckedChange: P
261
+ label: k,
262
+ checked: K,
263
+ onCheckedChange: M
265
264
  }) {
266
- const { attributes: G, listeners: f, setNodeRef: h, transform: S, transition: H, isDragging: xe } = uo({
265
+ const { attributes: G, listeners: f, setNodeRef: h, transform: N, transition: H, isDragging: ye } = uo({
267
266
  id: l
268
267
  }), g = {
269
- transform: mo.Transform.toString(S),
268
+ transform: mo.Transform.toString(N),
270
269
  transition: H,
271
- opacity: xe ? 0.4 : 1
270
+ opacity: ye ? 0.4 : 1
272
271
  }, Y = `col-toggle-${l}`;
273
272
  return /* @__PURE__ */ d("div", { ref: h, style: g, className: "flex items-center gap-2 text-[12px]", children: [
274
273
  /* @__PURE__ */ a(
@@ -280,45 +279,45 @@ function $i({
280
279
  children: /* @__PURE__ */ a(Eo, { className: "h-3.5 w-3.5" })
281
280
  }
282
281
  ),
283
- /* @__PURE__ */ a(Vn, { id: Y, checked: L, onCheckedChange: P }),
284
- /* @__PURE__ */ a(si, { htmlFor: Y, className: "cursor-pointer text-[12px] font-normal", children: y })
282
+ /* @__PURE__ */ a(Wn, { id: Y, checked: K, onCheckedChange: M }),
283
+ /* @__PURE__ */ a(oi, { htmlFor: Y, className: "cursor-pointer text-[12px] font-normal", children: k })
285
284
  ] });
286
285
  }
287
- function Zc({
286
+ function td({
288
287
  queueId: l,
289
- realtime: y,
290
- renderError: L,
291
- hideCreateActions: P = !1,
288
+ realtime: k,
289
+ renderError: K,
290
+ hideCreateActions: M = !1,
292
291
  onAsk: G
293
292
  }) {
294
- var aa, la, oa, sa, ia, ca, da, ua, ma, pa, ba, ha, fa, ga, xa, ya, ka;
295
- const f = po(), h = Ea(), { userId: S } = Sa(), H = Ao(), { navigate: xe } = Lo(), [g, Y] = w("all"), [de, O] = w(1), Gn = U(Wo()), [Rt, Aa] = w(() => {
293
+ var la, oa, sa, ia, ca, da, ua, ma, pa, ba, ha, fa, ga, xa, ya, ka, va;
294
+ const f = po(), h = La(), { userId: N } = Ca(), H = Lo(), { navigate: ye } = Ao(), [g, Y] = v("all"), [de, A] = v(1), Hn = U(Wo()), [Rt, Aa] = v(() => {
296
295
  try {
297
296
  return localStorage.getItem("nvr_table_density") === "comfortable" ? "comfortable" : "compact";
298
297
  } catch {
299
298
  return "compact";
300
299
  }
301
- }), [q, je] = w("table"), [I, Ue] = w(""), [_, Q] = w({}), [Et, Wn] = w(() => /* @__PURE__ */ new Set()), [$, ot] = w(null), [ye, tn] = w(/* @__PURE__ */ new Set()), [st, nn] = w(null), [it, rn] = w(null), [an, At] = w(0), $e = ls(), ln = gs(), on = U({}).current, Hn = U(/* @__PURE__ */ new Set()), [La, Oa] = w(0), [Yn, Da] = w(0), qe = U(!1), Lt = U([]), Jn = U(null), zn = U(!1), Xn = U(0), sn = U("table");
302
- sn.current = q;
303
- const cn = 25, { data: i, error: Ot } = W({
300
+ }), [C, Ue] = v("table"), [I, Ie] = v(""), [_, Q] = v({}), [Et, Yn] = v(() => /* @__PURE__ */ new Set()), [$, ot] = v(null), [ke, nn] = v(/* @__PURE__ */ new Set()), [st, rn] = v(null), [it, an] = v(null), [ln, Lt] = v(0), Fe = ls(), on = gs(), sn = U({}).current, Jn = U(/* @__PURE__ */ new Set()), [Oa, Da] = v(0), [zn, Ka] = v(0), ue = U(!1), At = U([]), Xn = U(null), cn = U(!1), dn = U(0), un = U("table");
301
+ un.current = C;
302
+ const mn = 25, { data: c, error: Ot } = W({
304
303
  queryKey: ["queue-meta", l],
305
- queryFn: () => h.request(A(`/queues/${l}`)).then((e) => e.data),
304
+ queryFn: () => h.request(L(`/queues/${l}`)).then((e) => e.data),
306
305
  enabled: !!l
307
- }), { scopes: ct, ready: Zn } = ks(), er = U(!1), [tr, nr] = w(!1), [Fe, Ka] = w({}), ue = U({});
308
- M(() => {
309
- if (er.current || !Zn || !i) return;
306
+ }), { scopes: Dt, ready: Zn } = ks(), er = U(!1), [tr, nr] = v(!1), [Te, Pa] = v({}), me = U({});
307
+ P(() => {
308
+ if (er.current || !Zn || !c) return;
310
309
  er.current = !0;
311
- const e = (i.extra_field_meta ?? []).filter(
310
+ const e = (c.extra_field_meta ?? []).filter(
312
311
  (t) => t.kind === "relation" && t.target_collection && t.display_field
313
312
  );
314
- if (e.length === 0 || !ct) {
313
+ if (e.length === 0 || !Dt) {
315
314
  nr(!0);
316
315
  return;
317
316
  }
318
317
  (async () => {
319
318
  const t = {}, n = {}, r = async (o, s) => {
320
319
  const m = await h.request(
321
- A(`/items/${o.target_collection}`, {
320
+ L(`/items/${o.target_collection}`, {
322
321
  filter: JSON.stringify({ id: { _in: s } }),
323
322
  fields: `id,${o.display_field}`,
324
323
  limit: "200"
@@ -331,67 +330,60 @@ function Zc({
331
330
  ];
332
331
  };
333
332
  for (const o of e) {
334
- const s = vs(ct, { collection: o.target_collection });
333
+ const s = vs(Dt, { collection: o.target_collection });
335
334
  if (!s) continue;
336
335
  const m = `extra.${o.path}`;
337
336
  try {
338
- const p = ct.restricted[s.name] ?? [];
337
+ const p = Dt.restricted[s.name] ?? [];
339
338
  if (p.length > 0) {
340
- const C = await r(o, p);
341
- C.length > 0 && (n[m.slice(6)] = C);
339
+ const S = await r(o, p);
340
+ S.length > 0 && (n[m.slice(6)] = S);
342
341
  }
343
- const N = ws(ct, s.name);
344
- if (N.length === 0) continue;
345
- const k = _[m];
346
- if (k && (Array.isArray(k) ? k.length > 0 : k !== ""))
347
- continue;
348
- const b = N.length ? await r(o, N) : [];
349
- b.length > 0 && (t[m] = b);
350
342
  } catch {
351
343
  }
352
344
  }
353
- Object.keys(n).length > 0 && Ka(n), Object.keys(t).length > 0 && (ue.current = t, Q((o) => ({ ...o, ...t }))), nr(!0);
345
+ Object.keys(n).length > 0 && Pa(n), Object.keys(t).length > 0 && (me.current = t, Q((o) => ({ ...o, ...t }))), nr(!0);
354
346
  })();
355
- }, [Zn, ct, i]);
356
- const Ie = ((la = (aa = i == null ? void 0 : i.sources) == null ? void 0 : aa.find((e) => e.type === "collection")) == null ? void 0 : la.collection) ?? null, { data: rr = [] } = W({
357
- queryKey: ["queue-browser-quick-filters", Ie],
358
- queryFn: () => h.request(A(`/collections/${Ie}`)).then((e) => {
347
+ }, [Zn, Dt, c]);
348
+ const Ve = ((oa = (la = c == null ? void 0 : c.sources) == null ? void 0 : la.find((e) => e.type === "collection")) == null ? void 0 : oa.collection) ?? null, { data: rr = [] } = W({
349
+ queryKey: ["queue-browser-quick-filters", Ve],
350
+ queryFn: () => h.request(L(`/collections/${Ve}`)).then((e) => {
359
351
  var t, n;
360
352
  return ((n = (t = e.data) == null ? void 0 : t.browser_config) == null ? void 0 : n.quick_filters) ?? [];
361
353
  }).catch(() => []),
362
- enabled: !!Ie,
354
+ enabled: !!Ve,
363
355
  staleTime: 3e5
364
356
  }), re = V(() => {
365
357
  const e = /* @__PURE__ */ new Set(), t = [];
366
- for (const n of (i == null ? void 0 : i.sources) ?? [])
358
+ for (const n of (c == null ? void 0 : c.sources) ?? [])
367
359
  n.type !== "collection" || !n.collection || e.has(n.collection) || (e.add(n.collection), t.push(n.collection));
368
360
  return t;
369
- }, [i == null ? void 0 : i.sources]), Dt = _s(
361
+ }, [c == null ? void 0 : c.sources]), Kt = ws(
370
362
  re.length === 1 ? re[0] : null
371
- ), dn = P === !0 || Array.isArray(P) && re.length > 0 && re.every((e) => P.includes(e)), me = (i == null ? void 0 : i.claims_enabled) !== !1, u = i == null ? void 0 : i.display_config, Te = (u == null ? void 0 : u.views) ?? ["table", "kanban", "workload"], Pa = (u == null ? void 0 : u.work_next) !== !1, Kt = (u == null ? void 0 : u.bulk_actions) !== !1, un = Ts(
363
+ ), pn = M === !0 || Array.isArray(M) && re.length > 0 && re.every((e) => M.includes(e)), pe = (c == null ? void 0 : c.claims_enabled) !== !1, u = c == null ? void 0 : c.display_config, Re = (u == null ? void 0 : u.views) ?? ["table", "kanban", "workload"], Ma = (u == null ? void 0 : u.work_next) !== !1, Pt = (u == null ? void 0 : u.bulk_actions) !== !1, bn = Fs(
372
364
  [
373
365
  ...new Set(
374
- ((i == null ? void 0 : i.sources) ?? []).filter((e) => e.type === "collection" && e.collection).map((e) => e.collection)
366
+ ((c == null ? void 0 : c.sources) ?? []).filter((e) => e.type === "collection" && e.collection).map((e) => e.collection)
375
367
  )
376
368
  ],
377
369
  (u == null ? void 0 : u.bulk_action_keys) ?? null
378
- ), E = (e, t) => {
370
+ ), T = (e, t) => {
379
371
  var n, r;
380
- return ((r = (n = i == null ? void 0 : i.column_aliases) == null ? void 0 : n[e]) == null ? void 0 : r.trim()) || t;
372
+ return ((r = (n = c == null ? void 0 : c.column_aliases) == null ? void 0 : n[e]) == null ? void 0 : r.trim()) || t;
381
373
  }, ar = U(!1);
382
- M(() => {
383
- !i || ar.current || (ar.current = !0, Ue("-priority"));
384
- }, [i]);
385
- const [J, Ma] = w(!1);
386
- M(() => {
387
- i != null && i.display_config && !Te.includes(q) && je(Te[0]);
388
- }, [i, q, Te]), M(() => {
389
- if (!(i != null && i.sources)) return;
390
- const e = ln ? (b, C) => ln.subscribeCollections(b, C) : y == null ? void 0 : y.subscribe;
374
+ P(() => {
375
+ !c || ar.current || (ar.current = !0, Ie("-priority"));
376
+ }, [c]);
377
+ const [J, Qa] = v(!1);
378
+ P(() => {
379
+ c != null && c.display_config && !Re.includes(C) && Ue(Re[0]);
380
+ }, [c, C, Re]), P(() => {
381
+ if (!(c != null && c.sources)) return;
382
+ const e = on ? (b, R) => on.subscribeCollections(b, R) : k == null ? void 0 : k.subscribe;
391
383
  if (!e) return;
392
384
  const t = [
393
385
  ...new Set(
394
- i.sources.filter((b) => b.type === "collection" && b.collection).map((b) => b.collection)
386
+ c.sources.filter((b) => b.type === "collection" && b.collection).map((b) => b.collection)
395
387
  )
396
388
  ];
397
389
  if (t.length === 0) return;
@@ -399,58 +391,58 @@ function Zc({
399
391
  let r = null, o = null, s = null;
400
392
  const m = () => {
401
393
  s || (s = setTimeout(() => {
402
- s = null, Da((b) => b + 1);
394
+ s = null, Ka((b) => b + 1);
403
395
  }, 1500));
404
396
  }, p = () => {
405
397
  o || (o = setTimeout(() => {
406
- if (o = null, Xn.current > 0 || zn.current) {
407
- Lt.current = [], At((b) => b + 1);
398
+ if (o = null, dn.current > 0 || cn.current) {
399
+ At.current = [], Lt((b) => b + 1);
408
400
  return;
409
401
  }
410
- qe.current = !0, f.invalidateQueries({ queryKey: ["queue-items", l] }), f.invalidateQueries({ queryKey: ["queue-workload", l] });
402
+ ue.current = !0, f.invalidateQueries({ queryKey: ["queue-items", l] }), f.invalidateQueries({ queryKey: ["queue-workload", l] });
411
403
  }, 900));
412
- }, N = (b) => {
413
- let C = !1, v = 0, X = !1;
404
+ }, S = (b) => {
405
+ let R = !1, y = 0, X = !1;
414
406
  const Z = b.flatMap(
415
- (T) => T ? as(T) : [T]
407
+ (F) => F ? as(F) : [F]
416
408
  );
417
- for (const T of Z) {
418
- const ne = T == null ? void 0 : T.changed_fields, Xt = (T == null ? void 0 : T.collection) != null ? `${T.collection}:${String(T.item)}` : null, va = Xt != null && Hn.current.has(Xt);
419
- if (T && !T.action && (ne != null && ne.length) && ne.every((Ne) => Ne.startsWith("$"))) {
420
- if (ne.includes($t.tasks) && n.add("queue-task-counts"), ne.includes($t.integrations) && n.add("queue-integrations-summary"), ne.includes($t.addendums) && n.add("queue-collection-addendums"), ne.includes($t.lock) && Oa((Ne) => Ne + 1), ne.includes($t.state)) {
421
- const Ne = di(va, sn.current === "kanban");
422
- X = !0, Ne.refresh && (C = !0), v += Ne.pill;
409
+ for (const F of Z) {
410
+ const ne = F == null ? void 0 : F.changed_fields, Zt = (F == null ? void 0 : F.collection) != null ? `${F.collection}:${String(F.item)}` : null, wa = Zt != null && Jn.current.has(Zt);
411
+ if (F && !F.action && (ne != null && ne.length) && ne.every((Ce) => Ce.startsWith("$"))) {
412
+ if (ne.includes($t.tasks) && n.add("queue-task-counts"), ne.includes($t.integrations) && n.add("queue-integrations-summary"), ne.includes($t.addendums) && n.add("queue-collection-addendums"), ne.includes($t.lock) && Da((Ce) => Ce + 1), ne.includes($t.state)) {
413
+ const Ce = di(wa, un.current === "kanban");
414
+ X = !0, Ce.refresh && (R = !0), y += Ce.pill;
423
415
  }
424
416
  r || (r = setTimeout(() => {
425
417
  r = null;
426
- for (const Ne of n) f.invalidateQueries({ queryKey: [Ne] });
418
+ for (const Ce of n) f.invalidateQueries({ queryKey: [Ce] });
427
419
  n.clear();
428
420
  }, 300));
429
421
  continue;
430
422
  }
431
423
  X = !0;
432
- const to = (T == null ? void 0 : T.collection) != null && ds(T.collection, T.item);
433
- Xt && (va || (T == null ? void 0 : T.action) === "create" || sn.current === "kanban") ? (C = !0, to || Lt.current.push({ key: Xt, by: null })) : v += 1;
424
+ const to = (F == null ? void 0 : F.collection) != null && ds(F.collection, F.item);
425
+ Zt && (wa || (F == null ? void 0 : F.action) === "create" || un.current === "kanban") ? (R = !0, to || At.current.push({ key: Zt, by: null })) : y += 1;
434
426
  }
435
- v > 0 && At((T) => T + v), C && p(), X && m();
436
- }, k = e(t, (b) => Io(on, [b ?? {}], N));
427
+ y > 0 && Lt((F) => F + y), R && p(), X && m();
428
+ }, w = e(t, (b) => Io(sn, [b ?? {}], S));
437
429
  return () => {
438
- k(), Vo(on), r && clearTimeout(r), o && clearTimeout(o), s && clearTimeout(s);
430
+ w(), Vo(sn), r && clearTimeout(r), o && clearTimeout(o), s && clearTimeout(s);
439
431
  };
440
- }, [ln, y, i == null ? void 0 : i.sources, f, l, S, on]);
441
- const Re = Do(_, 350), Qa = JSON.stringify(Re) === JSON.stringify(_), mn = U(!1), Ee = q === "table" && !!$, lr = (() => {
432
+ }, [on, k, c == null ? void 0 : c.sources, f, l, N, sn]);
433
+ const Ee = Do(_, 350), Ba = JSON.stringify(Ee) === JSON.stringify(_), hn = U(!1), ve = C === "table" && !!$, lr = (() => {
442
434
  const e = /* @__PURE__ */ new Set();
443
- for (const t of (i == null ? void 0 : i.extra_field_meta) ?? [])
435
+ for (const t of (c == null ? void 0 : c.extra_field_meta) ?? [])
444
436
  t.aggregate && t.aggregate !== "count" && e.add(t.path);
445
- for (const t of (i == null ? void 0 : i.sources) ?? []) {
437
+ for (const t of (c == null ? void 0 : c.sources) ?? []) {
446
438
  for (const [n, r] of Object.entries(t.column_formats ?? {}))
447
439
  (r == null ? void 0 : r.type) === "number" && e.add(n);
448
440
  t.type === "addendums" && e.add("cost_impact");
449
441
  }
450
442
  return [...e].slice(0, 12);
451
- })(), ke = (() => {
443
+ })(), we = (() => {
452
444
  const e = {};
453
- for (const [t, n] of Object.entries(Re))
445
+ for (const [t, n] of Object.entries(Ee))
454
446
  if (n) {
455
447
  if (Array.isArray(n)) {
456
448
  n.length > 0 && (e[t] = n);
@@ -465,61 +457,61 @@ function Zc({
465
457
  }
466
458
  return e;
467
459
  })();
468
- function Ve(e, t) {
469
- Q((n) => ({ ...n, [e]: n[e] === t ? "" : t })), O(1);
460
+ function Ge(e, t) {
461
+ Q((n) => ({ ...n, [e]: n[e] === t ? "" : t })), A(1);
470
462
  }
471
- function Ba(e) {
463
+ function ja(e) {
472
464
  Q((t) => {
473
465
  const n = t.state, r = Array.isArray(n) ? n : n ? [n] : [], o = r.includes(e) ? r.filter((s) => s !== e) : [...r, e];
474
466
  return { ...t, state: o };
475
- }), O(1);
467
+ }), A(1);
476
468
  }
477
- const ja = Array.isArray(_.state) ? _.state : _.state ? [_.state] : [], Ua = (e) => !e || Array.isArray(e) && e.length === 0;
478
- function Ia() {
479
- Q({ ...ue.current }), Y("all"), O(1);
469
+ const Ua = Array.isArray(_.state) ? _.state : _.state ? [_.state] : [], Ia = (e) => !e || Array.isArray(e) && e.length === 0;
470
+ function Va() {
471
+ Q({ ...me.current }), Y("all"), A(1);
480
472
  }
481
- const [dt, Va] = w(() => {
473
+ const [ct, Ga] = v(() => {
482
474
  try {
483
475
  return localStorage.getItem("nvr_queue_insights_open") === "1";
484
476
  } catch {
485
477
  return !1;
486
478
  }
487
479
  });
488
- M(() => {
480
+ P(() => {
489
481
  try {
490
- localStorage.setItem("nvr_queue_insights_open", dt ? "1" : "0");
482
+ localStorage.setItem("nvr_queue_insights_open", ct ? "1" : "0");
491
483
  } catch {
492
484
  }
493
- }, [dt]);
494
- const { data: Ga = [] } = W({
485
+ }, [ct]);
486
+ const { data: Wa = [] } = W({
495
487
  queryKey: ["queue-view-subs", l],
496
- queryFn: () => h.request(A("/notification-subscriptions")).then((e) => (e.data ?? []).filter((t) => t.queue_id === l)).catch(() => []),
488
+ queryFn: () => h.request(L("/notification-subscriptions")).then((e) => (e.data ?? []).filter((t) => t.queue_id === l)).catch(() => []),
497
489
  staleTime: 3e4
498
- }), Pt = (e) => Ga.find((t) => t.queue_view_id === e), Wa = (e) => {
499
- const t = Pt(e);
500
- (t ? h.request(jn(`/notification-subscriptions/${t.id}`)) : h.request(
490
+ }), Mt = (e) => Wa.find((t) => t.queue_view_id === e), Ha = (e) => {
491
+ const t = Mt(e);
492
+ (t ? h.request(In(`/notification-subscriptions/${t.id}`)) : h.request(
501
493
  se("/notification-subscriptions", {
502
494
  queue_id: l,
503
495
  queue_view_id: e,
504
496
  digest_frequency: "instant"
505
497
  })
506
498
  )).then(() => {
507
- D.success(
499
+ O.success(
508
500
  t ? "Unsubscribed" : "Subscribed — new arrivals in this view notify you"
509
501
  ), f.invalidateQueries({ queryKey: ["queue-view-subs", l] });
510
- }).catch((r) => D.error(qt(r, "Failed")));
511
- }, [or, pn] = w(null), bn = [
502
+ }).catch((r) => O.error(qt(r, "Failed")));
503
+ }, [or, fn] = v(null), gn = [
512
504
  ...new Set(
513
- ((i == null ? void 0 : i.sources) ?? []).filter((e) => e.type === "collection" && e.collection).map((e) => e.collection)
505
+ ((c == null ? void 0 : c.sources) ?? []).filter((e) => e.type === "collection" && e.collection).map((e) => e.collection)
514
506
  )
515
- ], { data: Ha = {} } = W({
516
- queryKey: ["queue-custom-actions", l, bn.join(",")],
507
+ ], { data: Ya = {} } = W({
508
+ queryKey: ["queue-custom-actions", l, gn.join(",")],
517
509
  queryFn: async () => {
518
510
  const e = {};
519
- for (const t of bn.slice(0, 6))
511
+ for (const t of gn.slice(0, 6))
520
512
  try {
521
513
  const n = await h.request(
522
- A("/custom-actions", { collection: t })
514
+ L("/custom-actions", { collection: t })
523
515
  );
524
516
  e[t] = n.data ?? [];
525
517
  } catch {
@@ -527,18 +519,18 @@ function Zc({
527
519
  }
528
520
  return e;
529
521
  },
530
- enabled: bn.length > 0,
522
+ enabled: gn.length > 0,
531
523
  staleTime: 6e4
532
- }), Ya = (e) => Ha[e] ?? [], Ja = (e, t) => {
524
+ }), Ja = (e) => Ya[e] ?? [], za = (e, t) => {
533
525
  h.request(se(`/custom-actions/${e.id}/execute`, { item: t.item_id })).then(() => {
534
- D.success(`${e.label} ran`), f.invalidateQueries({ queryKey: ["queue-items", l] });
526
+ O.success(`${e.label} ran`), f.invalidateQueries({ queryKey: ["queue-items", l] });
535
527
  }).catch((n) => {
536
528
  const r = n.response;
537
- D.error((r == null ? void 0 : r.error) ?? qt(n, `${e.label} failed`));
529
+ O.error((r == null ? void 0 : r.error) ?? qt(n, `${e.label} failed`));
538
530
  });
539
- }, { data: hn = [] } = W({
531
+ }, { data: xn = [] } = W({
540
532
  queryKey: ["queue-triage-labels", l],
541
- queryFn: () => h.request(A(`/queues/${l}/triage-labels`)).then((e) => e.data ?? []).catch(() => []),
533
+ queryFn: () => h.request(L(`/queues/${l}/triage-labels`)).then((e) => e.data ?? []).catch(() => []),
542
534
  staleTime: 3e4
543
535
  }), sr = (e, t) => {
544
536
  h.request(
@@ -549,43 +541,43 @@ function Zc({
549
541
  })
550
542
  ).then(() => {
551
543
  f.invalidateQueries({ queryKey: ["queue-items", l] }), f.invalidateQueries({ queryKey: ["queue-triage-labels", l] });
552
- }).catch((n) => D.error(qt(n, "Label failed")));
544
+ }).catch((n) => O.error(qt(n, "Label failed")));
553
545
  }, {
554
- data: c,
546
+ data: i,
555
547
  isLoading: ir,
556
- isFetching: ut,
557
- isPlaceholderData: za,
548
+ isFetching: dt,
549
+ isPlaceholderData: Xa,
558
550
  dataUpdatedAt: ce,
559
551
  isError: cr,
560
- error: Xa,
561
- refetch: Za
552
+ error: Za,
553
+ refetch: el
562
554
  } = W({
563
555
  queryKey: [
564
556
  "queue-items",
565
557
  l,
566
558
  g,
567
559
  I,
568
- Re,
569
- q === "table" && !$ ? de : "all",
560
+ Ee,
561
+ C === "table" && !$ ? de : "all",
570
562
  $
571
563
  ],
572
564
  queryFn: async () => {
573
- const e = !Ee && q === "table", t = JSON.stringify([l, g, I, ke, cn]), n = e ? Ho(Gn.current, t, de, "").after : void 0, r = await h.request(
574
- A(`/queues/${l}/items`, {
565
+ const e = !ve && C === "table", t = JSON.stringify([l, g, I, we, mn]), n = e ? Ho(Hn.current, t, de, "").after : void 0, r = await h.request(
566
+ L(`/queues/${l}/items`, {
575
567
  scope: g,
576
568
  // Last State Change is Aging read the other way round: the newest
577
569
  // move is the least aged.
578
570
  sort: I === "state_entered" ? "-aging_hours" : I === "-state_entered" ? "aging_hours" : I,
579
- filters: JSON.stringify(ke),
571
+ filters: JSON.stringify(we),
580
572
  // Table + group: headers only (rows load per group on expand, #741).
581
573
  // Kanban renders the full matching set, grouped client-side.
582
- ...Ee ? {
574
+ ...ve ? {
583
575
  group_by: $,
584
576
  ...lr.length ? { group_sums: lr.join(",") } : {}
585
- } : q === "table" ? { page: de, limit: cn, ...n ? { after: n } : {} } : {}
577
+ } : C === "table" ? { page: de, limit: mn, ...n ? { after: n } : {} } : {}
586
578
  })
587
579
  );
588
- return n && Yo(Gn.current, t, de, r.next_cursor), r;
580
+ return n && Yo(Hn.current, t, de, r.next_cursor), r;
589
581
  },
590
582
  // Wait for display_config AND scope seeding so the first fetch uses the
591
583
  // configured defaults and already carries the viewer's restricted filters.
@@ -594,40 +586,40 @@ function Zc({
594
586
  // first fetch went out WITHOUT the seeded scope and refired ~350ms later
595
587
  // with it (3.3s + 8.7s of work for one page). The first fetch now also
596
588
  // waits for the debounced copy to settle; later typing still debounces.
597
- enabled: !!l && J && tr && (mn.current || Qa),
589
+ enabled: !!l && J && tr && (hn.current || Ba),
598
590
  // Keep the previous page rendered while a sort/filter/page change refetches —
599
591
  // swapping to skeletons collapsed the table height and jittered the page.
600
592
  placeholderData: (e) => e
601
593
  });
602
- c && !mn.current && (mn.current = !0);
603
- const Ge = Object.entries(ue.current).filter(
594
+ i && !hn.current && (hn.current = !0);
595
+ const We = Object.entries(me.current).filter(
604
596
  ([e, t]) => {
605
597
  var n;
606
- return !((n = Fe[e.slice(6)]) != null && n.length) && JSON.stringify(ke[e] ?? null) === JSON.stringify(t);
598
+ return !((n = Te[e.slice(6)]) != null && n.length) && JSON.stringify(we[e] ?? null) === JSON.stringify(t);
607
599
  }
608
- ).map(([e]) => e), dr = Ge.length > 0 && Object.keys(ke).every((e) => Ge.includes(e)), ur = Object.fromEntries(
609
- Object.entries(ke).filter(([e]) => !Ge.includes(e))
610
- ), { data: el } = W({
600
+ ).map(([e]) => e), dr = We.length > 0 && Object.keys(we).every((e) => We.includes(e)), ur = Object.fromEntries(
601
+ Object.entries(we).filter(([e]) => !We.includes(e))
602
+ ), { data: tl } = W({
611
603
  queryKey: ["queue-default-hidden", l, g, ur],
612
- enabled: !!l && !!c && !ut && c.total === 0 && ((oa = c.empty) == null ? void 0 : oa.reason) === "filters" && Ge.length > 0 && !dr,
604
+ enabled: !!l && !!i && !dt && i.total === 0 && ((sa = i.empty) == null ? void 0 : sa.reason) === "filters" && We.length > 0 && !dr,
613
605
  staleTime: 3e4,
614
606
  retry: !1,
615
607
  queryFn: () => h.request(
616
- A(`/queues/${l}/items`, {
608
+ L(`/queues/${l}/items`, {
617
609
  scope: g,
618
610
  filters: JSON.stringify(ur),
619
611
  page: 1,
620
612
  limit: 1
621
613
  })
622
614
  ).then((e) => Number(e.total ?? 0))
623
- }), pe = dr ? Math.max(0, (((sa = c == null ? void 0 : c.stats) == null ? void 0 : sa.total) ?? 0) - ((c == null ? void 0 : c.total) ?? 0)) : el ?? 0, mr = (e) => Ge.map(e).join(" and "), pr = () => {
615
+ }), be = dr ? Math.max(0, (((ia = i == null ? void 0 : i.stats) == null ? void 0 : ia.total) ?? 0) - ((i == null ? void 0 : i.total) ?? 0)) : tl ?? 0, mr = (e) => We.map(e).join(" and "), pr = () => {
624
616
  Q((e) => {
625
617
  const t = { ...e };
626
- for (const n of Ge) delete t[n];
618
+ for (const n of We) delete t[n];
627
619
  return t;
628
- }), O(1);
620
+ }), A(1);
629
621
  };
630
- M(() => {
622
+ P(() => {
631
623
  if (typeof window > "u" || !ce) return;
632
624
  const e = window;
633
625
  e.__nvrQueueTrace || (e.__nvrQueueTrace = []);
@@ -636,32 +628,32 @@ function Zc({
636
628
  at: ce,
637
629
  scope: g,
638
630
  sort: I,
639
- filters: JSON.stringify(Re),
631
+ filters: JSON.stringify(Ee),
640
632
  page: de
641
633
  }, r = t.find((o) => o.queue === l);
642
634
  t.push(n), t.length > 50 && t.shift(), r && r !== n && ce - Number(r.at) < 2e3 && t.filter((o) => o.queue === l).length === 2 && console.warn("[queue] duplicate first fetch", { first: r, second: n });
643
635
  }, [ce]);
644
- const We = ir && !c || !J || !tr && !c, br = (ut && !ir || za && ut) && !qe.current, tl = V(
645
- () => (Ee ? [] : (c == null ? void 0 : c.data) ?? []).slice(0, 100).map((e) => ({ collection: e.collection, item: e.item_id })),
646
- [Ee, c == null ? void 0 : c.data]
647
- ), nl = ms(tl), Mt = gi(), hr = Ko(ut && !qe.current), rl = Po({
648
- pending: ut && !qe.current,
636
+ const He = ir && !i || !J || !tr && !i, br = (dt && !ir || Xa && dt) && !ue.current, nl = V(
637
+ () => (ve ? [] : (i == null ? void 0 : i.data) ?? []).slice(0, 100).map((e) => ({ collection: e.collection, item: e.item_id })),
638
+ [ve, i == null ? void 0 : i.data]
639
+ ), rl = ms(nl), Qt = xi(), hr = Ko(dt && !ue.current), al = Po({
640
+ pending: dt && !ue.current,
649
641
  request: l != null ? { method: "GET", url: `/queues/${l}/items` } : null,
650
642
  noun: "items"
651
- }), al = us();
643
+ }), ll = us();
652
644
  async function fr(e, t) {
653
645
  var p;
654
- const r = (await h.request(A(`/pipelines/instance/${e.collection}/${e.item_id}`))).data;
646
+ const r = (await h.request(L(`/pipelines/instance/${e.collection}/${e.item_id}`))).data;
655
647
  if (!r || r.states.length === 0)
656
648
  throw new Error("This item has no workflow instance");
657
- const o = r.states.find((N) => N.key === t);
649
+ const o = r.states.find((S) => S.key === t);
658
650
  if (!o) throw new Error("Target state not found");
659
651
  const s = r.available_transitions.find(
660
- (N) => N.to_state === o.id
652
+ (S) => S.to_state === o.id
661
653
  );
662
654
  if (!s) throw new Error("No transition available to move this item here");
663
655
  let m = null;
664
- if (xi(s) && (m = await Mt.ask(((p = s.label) == null ? void 0 : p.trim()) || "Move"), !m))
656
+ if (yi(s) && (m = await Qt.ask(((p = s.label) == null ? void 0 : p.trim()) || "Move"), !m))
665
657
  throw new Error("Not moved — this move needs a note");
666
658
  await h.request(
667
659
  se(`/pipelines/instance/${e.collection}/${e.item_id}/transition`, {
@@ -670,7 +662,7 @@ function Zc({
670
662
  })
671
663
  );
672
664
  }
673
- const ll = Se({
665
+ const ol = $e({
674
666
  mutationFn: async ({ item: e, targetState: t }) => {
675
667
  await fr(e, t);
676
668
  },
@@ -678,9 +670,9 @@ function Zc({
678
670
  f.invalidateQueries({ queryKey: ["queue-items", l, g] });
679
671
  },
680
672
  onError: (e) => {
681
- D.error(qt(e, "Failed to move item")), f.invalidateQueries({ queryKey: ["queue-items", l, g] });
673
+ O.error(qt(e, "Failed to move item")), f.invalidateQueries({ queryKey: ["queue-items", l, g] });
682
674
  }
683
- }), Ae = Se({
675
+ }), Le = $e({
684
676
  mutationFn: (e) => h.request(
685
677
  se(`/queues/${l}/claim`, {
686
678
  source_collection: e.collection,
@@ -688,8 +680,8 @@ function Zc({
688
680
  })
689
681
  ),
690
682
  onSuccess: () => f.invalidateQueries({ queryKey: ["queue-items", l, g] }),
691
- onError: () => D.error("Failed to claim item")
692
- }), He = Se({
683
+ onError: () => O.error("Failed to claim item")
684
+ }), Ye = $e({
693
685
  mutationFn: (e) => h.request(
694
686
  se(`/queues/${l}/release`, {
695
687
  source_collection: e.collection,
@@ -697,221 +689,232 @@ function Zc({
697
689
  })
698
690
  ),
699
691
  onSuccess: () => f.invalidateQueries({ queryKey: ["queue-items", l, g] }),
700
- onError: () => D.error("Failed to release item")
701
- }), { data: Ye } = W({
692
+ onError: () => O.error("Failed to release item")
693
+ }), { data: Je } = W({
702
694
  queryKey: ["queue-column-prefs", l],
703
- queryFn: () => h.request(A(`/queues/${l}/column-prefs`)),
695
+ queryFn: () => h.request(L(`/queues/${l}/column-prefs`)),
704
696
  enabled: !!l
705
- }), [Qt, Bt] = w(null), [Je, fn] = w(null);
706
- M(() => {
707
- Ye && fn(Ye.data.default_view_id);
708
- }, [Ye]);
709
- const [ol, gr] = w({}), be = Ee ? (c == null ? void 0 : c.groups) ?? null : null, jt = (be ?? []).filter((e) => !ye.has(e.key)).map((e) => e.key).flatMap(
710
- (e) => Array.from({ length: ol[e] ?? 1 }, (t, n) => ({ key: e, page: n + 1 }))
711
- ), gn = Be({
712
- queries: jt.map(({ key: e, page: t }) => ({
697
+ }), [Bt, jt] = v(null), [ze, yn] = v(null);
698
+ P(() => {
699
+ Je && yn(Je.data.default_view_id);
700
+ }, [Je]);
701
+ const [sl, gr] = v({}), he = ve ? (i == null ? void 0 : i.groups) ?? null : null, Ut = (he ?? []).filter((e) => !ke.has(e.key)).map((e) => e.key).flatMap(
702
+ (e) => Array.from({ length: sl[e] ?? 1 }, (t, n) => ({ key: e, page: n + 1 }))
703
+ ), kn = Be({
704
+ queries: Ut.map(({ key: e, page: t }) => ({
713
705
  queryKey: [
714
706
  "queue-items",
715
707
  l,
716
708
  "group-rows",
717
709
  g,
718
710
  I,
719
- Re,
711
+ Ee,
720
712
  $,
721
713
  e,
722
714
  t
723
715
  ],
724
716
  queryFn: () => h.request(
725
- A(`/queues/${l}/items`, {
717
+ L(`/queues/${l}/items`, {
726
718
  scope: g,
727
719
  sort: I === "state_entered" ? "-aging_hours" : I === "-state_entered" ? "aging_hours" : I,
728
- filters: JSON.stringify(ke),
720
+ filters: JSON.stringify(we),
729
721
  group_by: $,
730
722
  group_key: e,
731
723
  page: t,
732
- limit: ki
724
+ limit: vi
733
725
  })
734
726
  ).then((n) => ({ key: e, rows: n.data })),
735
- enabled: !!c && Ee,
727
+ enabled: !!i && ve,
736
728
  placeholderData: (n) => n
737
729
  }))
738
- }), sl = gn.map((e) => e.dataUpdatedAt).join(","), xn = V(() => {
730
+ }), il = kn.map((e) => e.dataUpdatedAt).join(","), vn = V(() => {
739
731
  const e = /* @__PURE__ */ new Map();
740
- return gn.forEach((t, n) => {
732
+ return kn.forEach((t, n) => {
741
733
  if (!t.data) return;
742
- const r = jt[n].key;
734
+ const r = Ut[n].key;
743
735
  e.set(r, [...e.get(r) ?? [], ...t.data.rows]);
744
736
  }), e;
745
- }, [sl, jt.map((e) => `${e.key}\0${e.page}`).join("")]), il = new Set(
746
- gn.flatMap((e, t) => e.isFetching ? [jt[t].key] : [])
747
- ), F = be ? [...xn.values()].flat() : (c == null ? void 0 : c.data) ?? [];
748
- qs(
737
+ }, [il, Ut.map((e) => `${e.key}\0${e.page}`).join("")]), cl = new Set(
738
+ kn.flatMap((e, t) => e.isFetching ? [Ut[t].key] : [])
739
+ ), q = he ? [...vn.values()].flat() : (i == null ? void 0 : i.data) ?? [];
740
+ $s(
749
741
  l ? {
750
742
  queue: {
751
743
  id: l,
752
- label: i == null ? void 0 : i.name,
744
+ label: c == null ? void 0 : c.name,
753
745
  scope: g,
754
- filters: JSON.stringify(ke),
755
- items: F.slice(0, 100).map((e) => ({ collection: e.collection, id: e.item_id }))
746
+ filters: JSON.stringify(we),
747
+ items: q.slice(0, 100).map((e) => ({ collection: e.collection, id: e.item_id }))
756
748
  }
757
749
  } : null
758
750
  );
759
- const cl = Fs(), mt = F.some((e) => e.fulfilment !== void 0), pt = F.some((e) => e.send_backs !== void 0), { data: Ut, dataUpdatedAt: dl } = W({
760
- queryKey: ["queue-live-stats", l, g, Re, Yn],
751
+ const dl = qs(), ut = q.some((e) => e.fulfilment !== void 0), mt = q.some((e) => e.send_backs !== void 0), { data: pt, dataUpdatedAt: xr } = W({
752
+ queryKey: ["queue-live-stats", l, g, Ee, zn],
761
753
  queryFn: () => h.request(
762
- A(`/queues/${l}/items`, {
754
+ L(`/queues/${l}/items`, {
763
755
  scope: g,
764
- filters: JSON.stringify(ke),
756
+ filters: JSON.stringify(we),
765
757
  page: 1,
766
758
  limit: 1
767
759
  })
768
760
  ),
769
- enabled: Yn > 0 && !!c,
761
+ enabled: zn > 0 && !!i,
770
762
  staleTime: Number.POSITIVE_INFINITY,
771
763
  placeholderData: (e) => e,
772
764
  retry: !1
773
- }), yn = !!Ut && dl > ce, x = yn ? Ut.stats : c == null ? void 0 : c.stats, z = yn ? Ut.filtered_stats ?? null : (c == null ? void 0 : c.filtered_stats) ?? null, xr = yn ? Ut.state_counts : c == null ? void 0 : c.state_counts, kn = (ia = z ?? x) == null ? void 0 : ia.aging, yr = U(void 0);
774
- !_.aging_hours && kn && (yr.current = kn);
775
- const bt = _.aging_hours ? yr.current ?? (x == null ? void 0 : x.aging) : kn ?? (x == null ? void 0 : x.aging);
776
- Hn.current = new Set(F.map((e) => `${e.collection}:${e.item_id}`));
765
+ }), It = !!pt && xr > ce, x = It ? pt.stats : i == null ? void 0 : i.stats, z = It ? pt.filtered_stats ?? null : (i == null ? void 0 : i.filtered_stats) ?? null, yr = It ? pt.state_counts : i == null ? void 0 : i.state_counts;
766
+ P(() => {
767
+ !It || !ci({
768
+ liveTotal: pt.total,
769
+ rowsTotal: i == null ? void 0 : i.total,
770
+ table: C === "table" && !ve,
771
+ busy: dn.current > 0 || cn.current
772
+ }) || (ue.current = !0, f.invalidateQueries({ queryKey: ["queue-items", l, g] }).finally(() => {
773
+ ue.current = !1;
774
+ }));
775
+ }, [xr]);
776
+ const wn = (ca = z ?? x) == null ? void 0 : ca.aging, kr = U(void 0);
777
+ !_.aging_hours && wn && (kr.current = wn);
778
+ const bt = _.aging_hours ? kr.current ?? (x == null ? void 0 : x.aging) : wn ?? (x == null ? void 0 : x.aging);
779
+ Jn.current = new Set(q.map((e) => `${e.collection}:${e.item_id}`));
777
780
  const ht = os(
778
- F.map((e) => ({ collection: e.collection, id: e.item_id })),
779
- La
780
- ), kr = U(ce), vr = U(0);
781
- !qe.current && ce !== vr.current && (kr.current = ce), M(() => {
782
- const e = new Set(F.map((t) => `${t.collection}:${t.item_id}`));
783
- if (qe.current) {
784
- qe.current = !1, vr.current = ce;
785
- const t = Lt.current;
786
- Lt.current = [];
787
- const n = Jn.current, r = /* @__PURE__ */ new Set();
781
+ q.map((e) => ({ collection: e.collection, id: e.item_id })),
782
+ Oa
783
+ ), vr = U(ce), wr = U(0);
784
+ !ue.current && ce !== wr.current && (vr.current = ce), P(() => {
785
+ const e = new Set(q.map((t) => `${t.collection}:${t.item_id}`));
786
+ if (ue.current) {
787
+ ue.current = !1, wr.current = ce;
788
+ const t = At.current;
789
+ At.current = [];
790
+ const n = Xn.current, r = /* @__PURE__ */ new Set();
788
791
  for (const o of t)
789
- !e.has(o.key) || r.has(o.key) || (r.add(o.key), $e.note([o.key], o.by, n && !n.has(o.key) ? "create" : "update"));
792
+ !e.has(o.key) || r.has(o.key) || (r.add(o.key), Fe.note([o.key], o.by, n && !n.has(o.key) ? "create" : "update"));
790
793
  if (n) {
791
794
  const o = [...e].filter((s) => !n.has(s) && !r.has(s));
792
- o.length > 0 && o.length <= 20 && $e.note(o, null, "create");
795
+ o.length > 0 && o.length <= 20 && Fe.note(o, null, "create");
793
796
  }
794
797
  }
795
- Jn.current = e;
796
- }, [ce]), M(() => {
797
- At(0);
798
- }, [c]);
798
+ Xn.current = e;
799
+ }, [ce]), P(() => {
800
+ Lt(0);
801
+ }, [i]);
799
802
  function ul() {
800
- f.invalidateQueries({ queryKey: ["queue-items", l] }), f.invalidateQueries({ queryKey: ["queue-workload", l] }), At(0);
803
+ f.invalidateQueries({ queryKey: ["queue-items", l] }), f.invalidateQueries({ queryKey: ["queue-workload", l] }), Lt(0);
801
804
  }
802
- const { data: he } = W({
805
+ const { data: fe } = W({
803
806
  queryKey: ["queue-trends", l],
804
- queryFn: () => h.request(A(`/queues/${l}/trends`, { days: 14 })),
807
+ queryFn: () => h.request(L(`/queues/${l}/trends`, { days: 14 })),
805
808
  enabled: !!l,
806
809
  staleTime: 300 * 1e3
807
- }), { data: fe } = W({
810
+ }), { data: ge } = W({
808
811
  queryKey: ["queue-trends", l, "mine"],
809
- queryFn: () => h.request(A(`/queues/${l}/trends`, { days: 14, scope: "mine" })),
812
+ queryFn: () => h.request(L(`/queues/${l}/trends`, { days: 14, scope: "mine" })),
810
813
  enabled: !!l && g === "mine",
811
814
  staleTime: 300 * 1e3
812
815
  });
813
816
  function ft(e) {
814
- const n = (g === "all" ? he == null ? void 0 : he.data : g === "mine" ? fe == null ? void 0 : fe.data : void 0) ?? [];
817
+ const n = (g === "all" ? fe == null ? void 0 : fe.data : g === "mine" ? ge == null ? void 0 : ge.data : void 0) ?? [];
815
818
  if (n.length === 0) return {};
816
819
  const r = n.map((s) => s[e]), o = n[n.length - 1];
817
820
  return { trend: r, delta: ((x == null ? void 0 : x[e]) ?? 0) - o[e] };
818
821
  }
819
- const ge = V(() => {
820
- const t = (g === "all" ? he == null ? void 0 : he.data : g === "mine" ? fe == null ? void 0 : fe.data : void 0) ?? [];
822
+ const xe = V(() => {
823
+ const t = (g === "all" ? fe == null ? void 0 : fe.data : g === "mine" ? ge == null ? void 0 : ge.data : void 0) ?? [];
821
824
  if (t.length < 3 || !x) return null;
822
825
  const n = t.map(
823
826
  (m) => g === "mine" ? m.owned ?? m.total : m.total
824
827
  ), r = n.slice(1).map((m, p) => m - n[p]), o = r.reduce((m, p) => m + p, 0) / r.length, s = x.total;
825
828
  return Math.abs(o) < 0.05 ? { dir: "flat", pace: o, days: null } : o < 0 ? { dir: "down", pace: o, days: Math.max(1, Math.ceil(s / -o)) } : { dir: "up", pace: o, days: null };
826
- }, [he == null ? void 0 : he.data, fe == null ? void 0 : fe.data, g, x]), gt = V(
829
+ }, [fe == null ? void 0 : fe.data, ge == null ? void 0 : ge.data, g, x]), gt = V(
827
830
  () => [
828
831
  ...new Set(
829
- ((i == null ? void 0 : i.sources) ?? []).filter((e) => e.type === "collection" && e.collection).map((e) => e.collection)
832
+ ((c == null ? void 0 : c.sources) ?? []).filter((e) => e.type === "collection" && e.collection).map((e) => e.collection)
830
833
  )
831
834
  ],
832
- [i == null ? void 0 : i.sources]
835
+ [c == null ? void 0 : c.sources]
833
836
  ), { data: ml } = W({
834
837
  queryKey: ["collections"],
835
- queryFn: () => h.request(A("/collections")).then((e) => e.data),
838
+ queryFn: () => h.request(L("/collections")).then((e) => e.data),
836
839
  staleTime: 300 * 1e3
837
- }), ze = Be({
840
+ }), Xe = Be({
838
841
  queries: gt.map((e) => ({
839
842
  queryKey: ["queue-collection-addendums", e],
840
843
  queryFn: () => h.request(
841
- A(`/collections/${e}`)
844
+ L(`/collections/${e}`)
842
845
  ).then((t) => {
843
846
  var n;
844
847
  return !!((n = t.data) != null && n.addendums_enabled);
845
848
  }).catch(() => !1),
846
849
  staleTime: 300 * 1e3
847
850
  }))
848
- }).some((e) => e.data === !0), { data: vn = [] } = W({
851
+ }).some((e) => e.data === !0), { data: _n = [] } = W({
849
852
  queryKey: ["queue-integrations-collections"],
850
- queryFn: () => h.request(A("/integration-obligations/collections")).then((e) => e.data ?? []).catch(() => []),
853
+ queryFn: () => h.request(L("/integration-obligations/collections")).then((e) => e.data ?? []).catch(() => []),
851
854
  staleTime: 300 * 1e3
852
- }), ve = gt.some((e) => vn.includes(e)), wn = V(() => {
855
+ }), _e = gt.some((e) => _n.includes(e)), Nn = V(() => {
853
856
  var t;
854
857
  const e = {};
855
- if (!ve) return e;
856
- for (const n of F) {
857
- if (!vn.includes(n.collection)) continue;
858
+ if (!_e) return e;
859
+ for (const n of q) {
860
+ if (!_n.includes(n.collection)) continue;
858
861
  const r = e[t = n.collection] ?? (e[t] = []);
859
862
  r.length < 500 && r.push(n.item_id);
860
863
  }
861
864
  return e;
862
- }, [F, vn, ve]), wr = Object.keys(wn), _r = Be({
863
- queries: wr.map((e) => ({
864
- queryKey: ["queue-integrations-summary", e, wn[e].join(",")],
865
+ }, [q, _n, _e]), _r = Object.keys(Nn), Nr = Be({
866
+ queries: _r.map((e) => ({
867
+ queryKey: ["queue-integrations-summary", e, Nn[e].join(",")],
865
868
  queryFn: () => h.request(
866
869
  se("/integration-obligations/summary", {
867
870
  collection: e,
868
- ids: wn[e]
871
+ ids: Nn[e]
869
872
  })
870
873
  ).then((t) => t.data ?? {}).catch(() => ({})),
871
874
  staleTime: 3e4
872
875
  }))
873
- }), pl = _r.map((e) => e.dataUpdatedAt).join(","), bl = V(() => {
876
+ }), pl = Nr.map((e) => e.dataUpdatedAt).join(","), bl = V(() => {
874
877
  const e = {};
875
- return wr.forEach((t, n) => {
878
+ return _r.forEach((t, n) => {
876
879
  var o;
877
- const r = ((o = _r[n]) == null ? void 0 : o.data) ?? {};
880
+ const r = ((o = Nr[n]) == null ? void 0 : o.data) ?? {};
878
881
  for (const [s, m] of Object.entries(r)) e[`${t}:${s}`] = m;
879
882
  }), e;
880
- }, [pl]), _n = V(() => {
883
+ }, [pl]), Sn = V(() => {
881
884
  var t;
882
885
  const e = {};
883
- for (const n of F) {
886
+ for (const n of q) {
884
887
  if (!n.collection || n.collection === "tasks" || n.collection.startsWith("nivaro_"))
885
888
  continue;
886
889
  const r = e[t = n.collection] ?? (e[t] = []);
887
890
  r.length < 500 && r.push(n.item_id);
888
891
  }
889
892
  return e;
890
- }, [F]), Nn = Object.keys(_n), Nr = Be({
891
- queries: Nn.map((e) => ({
892
- queryKey: ["queue-task-counts", e, _n[e].join(",")],
893
+ }, [q]), Cn = Object.keys(Sn), Sr = Be({
894
+ queries: Cn.map((e) => ({
895
+ queryKey: ["queue-task-counts", e, Sn[e].join(",")],
893
896
  queryFn: () => h.request(
894
- se("/tasks/counts", { collection: e, ids: _n[e] })
897
+ se("/tasks/counts", { collection: e, ids: Sn[e] })
895
898
  ).then((t) => t.data ?? {}).catch(() => ({})),
896
899
  staleTime: 3e4
897
900
  }))
898
- }), hl = Nr.map((e) => e.dataUpdatedAt).join(","), fl = V(() => {
901
+ }), hl = Sr.map((e) => e.dataUpdatedAt).join(","), fl = V(() => {
899
902
  const e = {};
900
- return Nn.forEach((t, n) => {
903
+ return Cn.forEach((t, n) => {
901
904
  var r;
902
- for (const [o, s] of Object.entries(((r = Nr[n]) == null ? void 0 : r.data) ?? {})) e[`${t}:${o}`] = s;
905
+ for (const [o, s] of Object.entries(((r = Sr[n]) == null ? void 0 : r.data) ?? {})) e[`${t}:${o}`] = s;
903
906
  }), e;
904
- }, [hl]), Sr = Nn.length > 0, Cr = Be({
907
+ }, [hl]), Cr = Cn.length > 0, $r = Be({
905
908
  queries: gt.map((e) => ({
906
909
  queryKey: ["queue-collection-risk-rules", e],
907
910
  queryFn: () => h.request(
908
- A("/at-risk/rules/active", { collection: e })
911
+ L("/at-risk/rules/active", { collection: e })
909
912
  ).then((t) => t.data ?? []).catch(() => []),
910
913
  staleTime: 300 * 1e3
911
914
  }))
912
- }), gl = Cr.map((e) => e.dataUpdatedAt).join(","), $r = V(() => {
915
+ }), gl = $r.map((e) => e.dataUpdatedAt).join(","), qr = V(() => {
913
916
  const e = /* @__PURE__ */ new Map();
914
- for (const t of Cr)
917
+ for (const t of $r)
915
918
  for (const n of t.data ?? []) {
916
919
  const r = e.get(n.name);
917
920
  e.set(n.name, {
@@ -920,65 +923,65 @@ function Zc({
920
923
  });
921
924
  }
922
925
  return [...e.values()];
923
- }, [gl]), qr = Be({
926
+ }, [gl]), Fr = Be({
924
927
  queries: gt.map((e) => ({
925
928
  queryKey: ["queue-collection-states", e],
926
929
  queryFn: () => h.request(
927
- A(`/queues/collection-states/${e}`)
930
+ L(`/queues/collection-states/${e}`)
928
931
  ).then((t) => t.data),
929
932
  staleTime: 300 * 1e3
930
933
  }))
931
- }), Fr = (e) => e.replace(/_/g, " ").replace(/\b\w/g, (t) => t.toUpperCase()), we = V(() => {
934
+ }), Tr = (e) => e.replace(/_/g, " ").replace(/\b\w/g, (t) => t.toUpperCase()), Ne = V(() => {
932
935
  const e = {};
933
- for (const t of qr)
936
+ for (const t of Fr)
934
937
  (t.data ?? []).forEach((n, r) => {
935
938
  e[n.key] = { label: n.label, color: n.color, sort: r };
936
939
  });
937
940
  return e;
938
- }, [qr.map((e) => e.data)]), Tr = x ? Object.entries(x.by_state).sort(
941
+ }, [Fr.map((e) => e.data)]), Rr = x ? Object.entries(x.by_state).sort(
939
942
  (e, t) => {
940
943
  var n, r;
941
- return (((n = we[e[0]]) == null ? void 0 : n.sort) ?? Number.MAX_SAFE_INTEGER) - (((r = we[t[0]]) == null ? void 0 : r.sort) ?? Number.MAX_SAFE_INTEGER);
944
+ return (((n = Ne[e[0]]) == null ? void 0 : n.sort) ?? Number.MAX_SAFE_INTEGER) - (((r = Ne[t[0]]) == null ? void 0 : r.sort) ?? Number.MAX_SAFE_INTEGER);
942
945
  }
943
- ) : [], Rr = (e) => [...e].sort(
946
+ ) : [], Er = (e) => [...e].sort(
944
947
  (t, n) => {
945
948
  var r, o;
946
- return (((r = we[t]) == null ? void 0 : r.sort) ?? Number.MAX_SAFE_INTEGER) - (((o = we[n]) == null ? void 0 : o.sort) ?? Number.MAX_SAFE_INTEGER);
949
+ return (((r = Ne[t]) == null ? void 0 : r.sort) ?? Number.MAX_SAFE_INTEGER) - (((o = Ne[n]) == null ? void 0 : o.sort) ?? Number.MAX_SAFE_INTEGER);
947
950
  }
948
- ), Sn = V(() => {
951
+ ), $n = V(() => {
949
952
  const e = {};
950
- for (const [t, n] of Object.entries(we)) e[t] = n.label;
953
+ for (const [t, n] of Object.entries(Ne)) e[t] = n.label;
951
954
  return e;
952
- }, [we]), Le = (e) => e ? e === "none" ? "No State" : Sn[e] ?? Fr(e) : "—", xt = (e) => {
953
- if (e === en) return "Addendums";
955
+ }, [Ne]), Ae = (e) => e ? e === "none" ? "No State" : $n[e] ?? Tr(e) : "—", xt = (e) => {
956
+ if (e === tn) return "Addendums";
954
957
  const t = (ml ?? []).find((n) => n.collection === e);
955
- return (t == null ? void 0 : t.display_name) || (t == null ? void 0 : t.plural) || Fr(e);
956
- }, le = V(() => $ ? be ? be.map((e) => ({
958
+ return (t == null ? void 0 : t.display_name) || (t == null ? void 0 : t.plural) || Tr(e);
959
+ }, le = V(() => $ ? he ? he.map((e) => ({
957
960
  key: e.key,
958
- rows: xn.get(e.key) ?? [],
961
+ rows: vn.get(e.key) ?? [],
959
962
  breached: e.breached,
960
963
  atRisk: e.at_risk,
961
964
  count: e.count,
962
965
  sums: e.sums ?? {}
963
- })) : bs(F, $).map((e) => ({ ...e, count: e.rows.length, sums: {} })) : null, [F, $, be, xn]), Cn = U(null);
964
- M(() => {
966
+ })) : bs(q, $).map((e) => ({ ...e, count: e.rows.length, sums: {} })) : null, [q, $, he, vn]), qn = U(null);
967
+ P(() => {
965
968
  if (!$ || !le) {
966
- Cn.current = null;
969
+ qn.current = null;
967
970
  return;
968
971
  }
969
- if (Ee && !be || Cn.current === $) return;
970
- Cn.current = $;
972
+ if (ve && !he || qn.current === $) return;
973
+ qn.current = $;
971
974
  const e = le.reduce((t, n) => t + n.count, 0);
972
- tn(e > 200 ? new Set(le.map((t) => t.key)) : /* @__PURE__ */ new Set()), gr({});
973
- }, [$, be]);
975
+ nn(e > 200 ? new Set(le.map((t) => t.key)) : /* @__PURE__ */ new Set()), gr({});
976
+ }, [$, he]);
974
977
  function xl(e) {
975
- tn((t) => {
978
+ nn((t) => {
976
979
  const n = new Set(t);
977
980
  return n.has(e) ? n.delete(e) : n.add(e), n;
978
981
  });
979
982
  }
980
- const oe = V(() => le ? le.filter((e) => !ye.has(e.key)).flatMap((e) => e.rows) : F, [le, F, ye]), K = (e) => `${e.collection}:${e.item_id}`, [_e, Oe] = w(null), [yl, $n] = w(!1), [It, Vt] = w(null), qn = (e) => {
981
- if (e.collection === en && e.url) {
983
+ const oe = V(() => le ? le.filter((e) => !ke.has(e.key)).flatMap((e) => e.rows) : q, [le, q, ke]), D = (e) => `${e.collection}:${e.item_id}`, [Se, Oe] = v(null), [yl, Fn] = v(!1), [Vt, Gt] = v(null), Tn = (e) => {
984
+ if (e.collection === tn && e.url) {
982
985
  const t = e.url.match(/^\/collections\/([^/?]+)\/([^/?]+)(?:\?(.*))?$/);
983
986
  if (t) {
984
987
  const n = {};
@@ -998,33 +1001,33 @@ function Zc({
998
1001
  };
999
1002
  }, yt = (e) => {
1000
1003
  var t;
1001
- i && Fa({
1004
+ c && Ta({
1002
1005
  queue_id: l,
1003
- name: i.name,
1006
+ name: c.name,
1004
1007
  path: `${window.location.pathname}${window.location.search}`,
1005
1008
  at: Date.now(),
1006
- scroll: ((t = Wt.current) == null ? void 0 : t.scrollTop) ?? 0,
1007
- state: { scope: g, page: de, sort: I, filters: _, group_by: $, view: q }
1008
- }), H.open(qn(e));
1009
- }, [B, kt] = w(
1009
+ scroll: ((t = Ht.current) == null ? void 0 : t.scrollTop) ?? 0,
1010
+ state: { scope: g, page: de, sort: I, filters: _, group_by: $, view: C }
1011
+ }), H.open(Tn(e));
1012
+ }, [B, kt] = v(
1010
1013
  null
1011
1014
  );
1012
- M(() => {
1015
+ P(() => {
1013
1016
  if (!B) return;
1014
1017
  const e = () => kt(null);
1015
1018
  return window.addEventListener("mousedown", e), window.addEventListener("scroll", e, !0), () => {
1016
1019
  window.removeEventListener("mousedown", e), window.removeEventListener("scroll", e, !0);
1017
1020
  };
1018
1021
  }, [B]);
1019
- const Gt = (e) => {
1020
- Vt(K(e));
1022
+ const Wt = (e) => {
1023
+ Gt(D(e));
1021
1024
  const t = (u == null ? void 0 : u.row_click) ?? "preview";
1022
- if (t === "full" || e.collection === en) {
1025
+ if (t === "full" || e.collection === tn) {
1023
1026
  yt(e);
1024
1027
  return;
1025
1028
  }
1026
1029
  if (t === "layout") {
1027
- Wr({
1030
+ Hr({
1028
1031
  collection: e.collection,
1029
1032
  itemId: e.item_id,
1030
1033
  rootLayoutSlug: (u == null ? void 0 : u.item_layout) ?? null,
@@ -1035,58 +1038,58 @@ function Zc({
1035
1038
  }
1036
1039
  Oe(e);
1037
1040
  };
1038
- M(() => {
1039
- if (!_e) return;
1040
- const e = F.find((t) => K(t) === K(_e));
1041
- e && e !== _e && Oe(e);
1042
- }, [F]);
1043
- const kl = (e) => !e.claimed_by || e.claimed_by.id === S;
1044
- function Er(e) {
1045
- const t = e ? oe.findIndex((r) => K(r) === K(e)) + 1 : 0, n = oe.slice(t).find(kl);
1041
+ P(() => {
1042
+ if (!Se) return;
1043
+ const e = q.find((t) => D(t) === D(Se));
1044
+ e && e !== Se && Oe(e);
1045
+ }, [q]);
1046
+ const kl = (e) => !e.claimed_by || e.claimed_by.id === N;
1047
+ function Lr(e) {
1048
+ const t = e ? oe.findIndex((r) => D(r) === D(e)) + 1 : 0, n = oe.slice(t).find(kl);
1046
1049
  if (!n) {
1047
- $n(!1), Oe(null), D.info("Nothing left to work on — queue clear!");
1050
+ Fn(!1), Oe(null), O.info("Nothing left to work on — queue clear!");
1048
1051
  return;
1049
1052
  }
1050
- if (Vt(K(n)), me && !n.claimed_by && Ae.mutate(n), (u == null ? void 0 : u.row_click) === "full") {
1053
+ if (Gt(D(n)), pe && !n.claimed_by && Le.mutate(n), (u == null ? void 0 : u.row_click) === "full") {
1051
1054
  yt(n);
1052
1055
  return;
1053
1056
  }
1054
- $n(!0), Oe(n);
1057
+ Fn(!0), Oe(n);
1055
1058
  }
1056
- M(() => {
1057
- if (q !== "table") return;
1059
+ P(() => {
1060
+ if (C !== "table") return;
1058
1061
  function e(t) {
1059
1062
  var o;
1060
1063
  const n = t.target;
1061
1064
  if (n && (n.tagName === "INPUT" || n.tagName === "TEXTAREA" || n.tagName === "SELECT" || n.isContentEditable))
1062
1065
  return;
1063
- const r = It ? oe.findIndex((s) => K(s) === It) : -1;
1066
+ const r = Vt ? oe.findIndex((s) => D(s) === Vt) : -1;
1064
1067
  if (t.key === "j" || t.key === "ArrowDown") {
1065
1068
  t.preventDefault();
1066
1069
  const s = oe[Math.min(r + 1, oe.length - 1)];
1067
- s && Vt(K(s));
1070
+ s && Gt(D(s));
1068
1071
  } else if (t.key === "k" || t.key === "ArrowUp") {
1069
1072
  t.preventDefault();
1070
1073
  const s = oe[Math.max(r - 1, 0)];
1071
- s && Vt(K(s));
1072
- } else if (t.key === "Enter" && r >= 0 && !_e)
1073
- t.preventDefault(), Gt(oe[r]);
1074
- else if (t.key === "c" && r >= 0 && me) {
1074
+ s && Gt(D(s));
1075
+ } else if (t.key === "Enter" && r >= 0 && !Se)
1076
+ t.preventDefault(), Wt(oe[r]);
1077
+ else if (t.key === "c" && r >= 0 && pe) {
1075
1078
  t.preventDefault();
1076
1079
  const s = oe[r];
1077
- ((o = s.claimed_by) == null ? void 0 : o.id) === S ? He.mutate(s) : Ae.mutate(s);
1080
+ ((o = s.claimed_by) == null ? void 0 : o.id) === N ? Ye.mutate(s) : Le.mutate(s);
1078
1081
  } else t.key === "o" && r >= 0 && (t.preventDefault(), yt(oe[r]));
1079
1082
  }
1080
1083
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
1081
- }, [q, oe, It, _e, S, Ae, He, me]);
1084
+ }, [C, oe, Vt, Se, N, Le, Ye, pe]);
1082
1085
  const { data: j } = W({
1083
1086
  queryKey: ["queue-views", l],
1084
- queryFn: () => h.request(A(`/queues/${l}/views`)),
1087
+ queryFn: () => h.request(L(`/queues/${l}/views`)),
1085
1088
  enabled: !!l
1086
- }), [Xe, Ze] = w(null), [vl, Fn] = w(!1), [Tn, Ar] = w(""), [Lr, Or] = w(!1), [vt, Dr] = w(!1);
1089
+ }), [Ze, et] = v(null), [vl, Rn] = v(!1), [En, Ar] = v(""), [Or, Dr] = v(!1), [vt, Kr] = v(!1);
1087
1090
  function wt(e) {
1088
1091
  const t = e.state ?? {};
1089
- Y(t.scope ?? "all"), Q({ ...ue.current, ...t.filters ?? {} }), Ue(t.sort ?? ""), ot(t.group_by ?? null), Bt(t.columns ?? null), rn(t.pins ?? null), t.view && je(Te.includes(t.view) ? t.view : Te[0]), O(1), Ze(e.id);
1092
+ Y(t.scope ?? "all"), Q({ ...me.current, ...t.filters ?? {} }), Ie(t.sort ?? ""), ot(t.group_by ?? null), jt(t.columns ?? null), an(t.pins ?? null), t.view && Ue(Re.includes(t.view) ? t.view : Re[0]), A(1), et(e.id);
1090
1093
  }
1091
1094
  function wl() {
1092
1095
  var t, n;
@@ -1095,22 +1098,22 @@ function Zc({
1095
1098
  wt(e);
1096
1099
  return;
1097
1100
  }
1098
- Y(((t = i == null ? void 0 : i.display_config) == null ? void 0 : t.default_scope) ?? "all"), Q({ ...ue.current }), Ue(""), ot(null), Bt(null), rn(null), (n = i == null ? void 0 : i.display_config) != null && n.default_view && je(i.display_config.default_view), O(1), Ze(null);
1101
+ Y(((t = c == null ? void 0 : c.display_config) == null ? void 0 : t.default_scope) ?? "all"), Q({ ...me.current }), Ie(""), ot(null), jt(null), an(null), (n = c == null ? void 0 : c.display_config) != null && n.default_view && Ue(c.display_config.default_view), A(1), et(null);
1099
1102
  }
1100
- M(() => {
1101
- if (J || !(i != null && i.display_config) || Ye === void 0 || j === void 0) return;
1102
- const e = Ye.data.default_view_id, t = e != null ? j.data.find((r) => r.id === e) : void 0, n = j.data.find((r) => r.is_default);
1103
- t ? wt(t) : n ? wt(n) : (je(i.display_config.default_view), Y(i.display_config.default_scope)), Ma(!0);
1104
- }, [i, Ye, j, J]);
1105
- const Wt = U(null), Ht = U(null);
1106
- M(() => {
1103
+ P(() => {
1104
+ if (J || !(c != null && c.display_config) || Je === void 0 || j === void 0) return;
1105
+ const e = Je.data.default_view_id, t = e != null ? j.data.find((r) => r.id === e) : void 0, n = j.data.find((r) => r.is_default);
1106
+ t ? wt(t) : n ? wt(n) : (Ue(c.display_config.default_view), Y(c.display_config.default_scope)), Qa(!0);
1107
+ }, [c, Je, j, J]);
1108
+ const Ht = U(null), Yt = U(null);
1109
+ P(() => {
1107
1110
  if (!J) return;
1108
- const e = Is();
1111
+ const e = Us();
1109
1112
  if (!(e != null && e.restore) || e.queue_id !== l) return;
1110
- Fa({ ...e, restore: !1 });
1113
+ Ta({ ...e, restore: !1 });
1111
1114
  const t = e.state ?? {};
1112
- t.scope && Y(t.scope), t.filters && Q({ ...ue.current, ...t.filters }), t.sort != null && Ue(t.sort), ot(t.group_by ?? null), t.view && je(t.view), t.page && O(t.page), Ht.current = e.scroll ?? 0;
1113
- }, [J, l]), M(() => {
1115
+ t.scope && Y(t.scope), t.filters && Q({ ...me.current, ...t.filters }), t.sort != null && Ie(t.sort), ot(t.group_by ?? null), t.view && Ue(t.view), t.page && A(t.page), Yt.current = e.scroll ?? 0;
1116
+ }, [J, l]), P(() => {
1114
1117
  var s;
1115
1118
  if (!J || typeof window > "u") return;
1116
1119
  const e = new URLSearchParams(window.location.search), t = e.get("scope"), n = ((s = e.get("state")) == null ? void 0 : s.trim()) || null, r = t === "all" || t === "mine";
@@ -1121,8 +1124,8 @@ function Zc({
1121
1124
  window.history.state,
1122
1125
  "",
1123
1126
  `${window.location.pathname}${o ? `?${o}` : ""}${window.location.hash}`
1124
- ), r && Y(t), n && Q((m) => ({ ...m, state: [n] })), O(1);
1125
- }, [J]), M(() => {
1127
+ ), r && Y(t), n && Q((m) => ({ ...m, state: [n] })), A(1);
1128
+ }, [J]), P(() => {
1126
1129
  if (!J || typeof window > "u") return;
1127
1130
  const e = new URLSearchParams(window.location.search), t = e.get("owner");
1128
1131
  if (!t) return;
@@ -1132,140 +1135,140 @@ function Zc({
1132
1135
  window.history.state,
1133
1136
  "",
1134
1137
  `${window.location.pathname}${n ? `?${n}` : ""}${window.location.hash}`
1135
- ), Y("all"), Q((r) => ({ ...r, owners: [t] })), Ze(null), O(1);
1136
- }, [J]), M(() => {
1138
+ ), Y("all"), Q((r) => ({ ...r, owners: [t] })), et(null), A(1);
1139
+ }, [J]), P(() => {
1137
1140
  if (!J) return;
1138
1141
  const e = ts(ns(`queue:${l}`));
1139
1142
  e && (rs(), wt({
1140
1143
  id: -1,
1141
1144
  // Saved views type filters loosely as strings; multi-selects ride as arrays there too.
1142
1145
  state: e
1143
- }), Ze(null), e.page && O(e.page));
1146
+ }), et(null), e.page && A(e.page));
1144
1147
  }, [J]);
1145
1148
  const _l = () => ({
1146
1149
  scope: g,
1147
1150
  filters: _,
1148
1151
  sort: I,
1149
1152
  group_by: $,
1150
- view: q,
1151
- columns: Qt,
1153
+ view: C,
1154
+ columns: Bt,
1152
1155
  pins: it,
1153
1156
  ...de > 1 ? { page: de } : {}
1154
1157
  });
1155
- M(() => {
1156
- Ht.current == null || F.length === 0 || !Wt.current || (Wt.current.scrollTop = Ht.current, Ht.current = null);
1157
- }, [F]);
1158
- const { isAdmin: De } = Sa(), Nl = F.map((e) => `${e.collection}|${e.item_id}`).join(","), Sl = V(
1159
- () => F.map((e) => ({ collection: e.collection, id: e.item_id })),
1158
+ P(() => {
1159
+ Yt.current == null || q.length === 0 || !Ht.current || (Ht.current.scrollTop = Yt.current, Yt.current = null);
1160
+ }, [q]);
1161
+ const { isAdmin: De } = Ca(), Nl = q.map((e) => `${e.collection}|${e.item_id}`).join(","), Sl = V(
1162
+ () => q.map((e) => ({ collection: e.collection, id: e.item_id })),
1160
1163
  [Nl]
1161
- ), Kr = Js(Sl, De), Cl = (e) => It === K(e) ? (
1164
+ ), Pr = Ys(Sl, De), Cl = (e) => Vt === D(e) ? (
1162
1165
  // Pinned sticky cells use bg-inherit — the highlight must be
1163
1166
  // OPAQUE (nvr-cyan/5-over-white equivalents) or horizontally
1164
1167
  // scrolled content bleeds through the pinned columns. Same
1165
1168
  // pair DataTable uses for selected rows when pins are active.
1166
1169
  "bg-[#f2fdff] dark:bg-[#20303a]"
1167
- ) : e.at_risk ? ys(e.at_risk_color ?? "red") : void 0, Yt = De || (i == null ? void 0 : i.owner) != null && i.owner === S, $l = Se({
1168
- mutationFn: ({ viewId: e, on: t }) => h.request(Ca(`/queues/views/${e}`, { is_default: t })),
1170
+ ) : e.at_risk ? ys(e.at_risk_color ?? "red") : void 0, Jt = De || (c == null ? void 0 : c.owner) != null && c.owner === N, $l = $e({
1171
+ mutationFn: ({ viewId: e, on: t }) => h.request($a(`/queues/views/${e}`, { is_default: t })),
1169
1172
  onSuccess: () => {
1170
- f.invalidateQueries({ queryKey: ["queue-views", l] }), D.success("Queue default view updated");
1173
+ f.invalidateQueries({ queryKey: ["queue-views", l] }), O.success("Queue default view updated");
1171
1174
  },
1172
- onError: () => D.error("Could not update the queue default view")
1173
- }), Pr = Se({
1175
+ onError: () => O.error("Could not update the queue default view")
1176
+ }), Mr = $e({
1174
1177
  mutationFn: () => h.request(
1175
1178
  se(`/queues/${l}/views`, {
1176
- name: Tn.trim(),
1177
- is_shared: Yt && (Lr || vt),
1179
+ name: En.trim(),
1180
+ is_shared: Jt && (Or || vt),
1178
1181
  is_default: vt,
1179
1182
  state: {
1180
1183
  scope: g,
1181
1184
  filters: _,
1182
1185
  sort: I,
1183
1186
  group_by: $,
1184
- view: q,
1185
- columns: Qt,
1187
+ view: C,
1188
+ columns: Bt,
1186
1189
  pins: it
1187
1190
  }
1188
1191
  })
1189
1192
  ),
1190
1193
  onSuccess: (e) => {
1191
- Fn(!1), Ar(""), Or(!1), Dr(!1), Ze(e.data.id), f.invalidateQueries({ queryKey: ["queue-views", l] }), D.success("View saved");
1194
+ Rn(!1), Ar(""), Dr(!1), Kr(!1), et(e.data.id), f.invalidateQueries({ queryKey: ["queue-views", l] }), O.success("View saved");
1192
1195
  },
1193
- onError: () => D.error("Failed to save view")
1194
- }), [Mr, Qr] = w(null), Ke = Se({
1196
+ onError: () => O.error("Failed to save view")
1197
+ }), [Qr, Br] = v(null), Ke = $e({
1195
1198
  mutationFn: (e) => h.request(
1196
- Ca(`/queues/views/${e.id}`, {
1199
+ $a(`/queues/views/${e.id}`, {
1197
1200
  state: {
1198
1201
  scope: g,
1199
1202
  filters: _,
1200
1203
  sort: I,
1201
1204
  group_by: $,
1202
- view: q,
1203
- columns: Qt,
1205
+ view: C,
1206
+ columns: Bt,
1204
1207
  pins: it
1205
1208
  }
1206
1209
  })
1207
1210
  ),
1208
1211
  onSuccess: (e, t) => {
1209
- f.invalidateQueries({ queryKey: ["queue-views", l] }), Qr(t.id), setTimeout(() => Qr((n) => n === t.id ? null : n), 2e3), D.success(`Saved "${t.name}" with the current filters, scope and sort`);
1212
+ f.invalidateQueries({ queryKey: ["queue-views", l] }), Br(t.id), setTimeout(() => Br((n) => n === t.id ? null : n), 2e3), O.success(`Saved "${t.name}" with the current filters, scope and sort`);
1210
1213
  },
1211
- onError: () => D.error("Failed to update view")
1212
- }), [Rn, Jt] = w(null);
1213
- M(() => {
1214
- if (Rn == null) return;
1215
- const e = setTimeout(() => Jt(null), 5e3);
1214
+ onError: () => O.error("Failed to update view")
1215
+ }), [Ln, zt] = v(null);
1216
+ P(() => {
1217
+ if (Ln == null) return;
1218
+ const e = setTimeout(() => zt(null), 5e3);
1216
1219
  return () => clearTimeout(e);
1217
- }, [Rn]);
1218
- const Br = Se({
1219
- mutationFn: (e) => h.request(jn(`/queues/views/${e}`)),
1220
+ }, [Ln]);
1221
+ const jr = $e({
1222
+ mutationFn: (e) => h.request(In(`/queues/views/${e}`)),
1220
1223
  onSuccess: (e, t) => {
1221
- Jt(null), f.invalidateQueries({ queryKey: ["queue-views", l] }), Ze(null), Je === t && fn(null);
1224
+ zt(null), f.invalidateQueries({ queryKey: ["queue-views", l] }), et(null), ze === t && yn(null);
1222
1225
  },
1223
- onError: () => D.error("Failed to delete view")
1224
- }), ql = Se({
1226
+ onError: () => O.error("Failed to delete view")
1227
+ }), ql = $e({
1225
1228
  mutationFn: (e) => h.request(Qo(`/queues/${l}/default-view`, { view_id: e })),
1226
- onMutate: (e) => fn(e),
1229
+ onMutate: (e) => yn(e),
1227
1230
  onSuccess: (e, t) => {
1228
- f.invalidateQueries({ queryKey: ["queue-column-prefs", l] }), D.success(
1231
+ f.invalidateQueries({ queryKey: ["queue-column-prefs", l] }), O.success(
1229
1232
  t === null ? "Reverted to the general default" : "Set as your default view"
1230
1233
  );
1231
1234
  },
1232
1235
  onError: () => {
1233
- f.invalidateQueries({ queryKey: ["queue-column-prefs", l] }), D.error("Failed to update default view");
1236
+ f.invalidateQueries({ queryKey: ["queue-column-prefs", l] }), O.error("Failed to update default view");
1234
1237
  }
1235
- }), [Pe, et] = w([]), [ee, jr] = w(!1), Fl = () => {
1236
- ee && et([]), jr(!ee);
1238
+ }), [Pe, tt] = v([]), [ee, Ur] = v(!1), Fl = () => {
1239
+ ee && tt([]), Ur(!ee);
1237
1240
  };
1238
- M(() => {
1239
- q !== "table" && ee && (jr(!1), et([]));
1240
- }, [q, ee]), Mo(), Xn.current = Pe.length;
1241
- const [Ur, Ir] = w(!1);
1242
- async function En(e, t) {
1243
- const n = F.filter((m) => Pe.includes(K(m)));
1244
- Ir(!0), Mt.beginBatch();
1241
+ P(() => {
1242
+ C !== "table" && ee && (Ur(!1), tt([]));
1243
+ }, [C, ee]), Mo(), dn.current = Pe.length;
1244
+ const [Ir, Vr] = v(!1);
1245
+ async function An(e, t) {
1246
+ const n = q.filter((m) => Pe.includes(D(m)));
1247
+ Vr(!0), Qt.beginBatch();
1245
1248
  const r = await Promise.allSettled(n.map(t));
1246
- Mt.endBatch();
1249
+ Qt.endBatch();
1247
1250
  const o = r.filter((m) => m.status === "fulfilled").length, s = r.length - o;
1248
- Ir(!1), et([]), f.invalidateQueries({ queryKey: ["queue-items", l] }), s ? D.warning(`${e}: ${o} succeeded, ${s} failed`) : D.success(`${e}: ${o} succeeded`);
1251
+ Vr(!1), tt([]), f.invalidateQueries({ queryKey: ["queue-items", l] }), s ? O.warning(`${e}: ${o} succeeded, ${s} failed`) : O.success(`${e}: ${o} succeeded`);
1249
1252
  }
1250
1253
  const Me = (e) => {
1251
1254
  var t;
1252
- for (const n of (i == null ? void 0 : i.sources) ?? []) {
1255
+ for (const n of (c == null ? void 0 : c.sources) ?? []) {
1253
1256
  const r = (t = n.column_formats) == null ? void 0 : t[e];
1254
1257
  if (r) return r;
1255
1258
  }
1256
1259
  return null;
1257
1260
  }, Tl = (e) => {
1258
- if ($ === "state") return e === "No state" ? e : Le(e);
1261
+ if ($ === "state") return e === "No state" ? e : Ae(e);
1259
1262
  if ($ === "collection") return xt(e);
1260
1263
  if ($ != null && $.startsWith("extra.") && e !== "—") {
1261
1264
  const t = Me($.slice(6));
1262
- if (t) return tt(e, t);
1265
+ if (t) return nt(e, t);
1263
1266
  }
1264
1267
  return e;
1265
1268
  }, Rl = le == null ? void 0 : le.map((e) => ({
1266
1269
  key: e.key,
1267
1270
  rows: e.rows,
1268
- header: /* @__PURE__ */ d(Ce, { children: [
1271
+ header: /* @__PURE__ */ d(qe, { children: [
1269
1272
  /* @__PURE__ */ a("span", { children: Tl(e.key) }),
1270
1273
  /* @__PURE__ */ d("span", { className: "font-normal text-slate-400", children: [
1271
1274
  "(",
@@ -1280,17 +1283,17 @@ function Zc({
1280
1283
  className: "font-normal tabular-nums text-slate-500 dark:text-slate-400",
1281
1284
  "data-queue-group-sum": t,
1282
1285
  children: [
1283
- E(`extra.${t}`, lt(t)),
1286
+ T(`extra.${t}`, je(t)),
1284
1287
  ":",
1285
1288
  " ",
1286
- r ? tt(String(n), r) : ie(n)
1289
+ r ? nt(String(n), r) : ie(n)
1287
1290
  ]
1288
1291
  },
1289
1292
  t
1290
1293
  );
1291
1294
  }),
1292
- be && !ye.has(e.key) && il.has(e.key) && /* @__PURE__ */ a("span", { className: "font-normal text-slate-400", children: "loading…" }),
1293
- be && !ye.has(e.key) && e.rows.length > 0 && e.rows.length < e.count && /* @__PURE__ */ d(
1295
+ he && !ke.has(e.key) && cl.has(e.key) && /* @__PURE__ */ a("span", { className: "font-normal text-slate-400", children: "loading…" }),
1296
+ he && !ke.has(e.key) && e.rows.length > 0 && e.rows.length < e.count && /* @__PURE__ */ d(
1294
1297
  "button",
1295
1298
  {
1296
1299
  type: "button",
@@ -1317,36 +1320,36 @@ function Zc({
1317
1320
  " at risk"
1318
1321
  ] })
1319
1322
  ] })
1320
- })), An = (((ca = c == null ? void 0 : c.available_values.collection) == null ? void 0 : ca.length) ?? 0) > 1, Vr = F.some((e) => !!e.unseen) || ht.size > 0 || F.some((e) => $e.isNew(K(e))), Gr = [
1321
- ...An ? [
1323
+ })), On = (((da = i == null ? void 0 : i.available_values.collection) == null ? void 0 : da.length) ?? 0) > 1, Gr = q.some((e) => !!e.unseen) || ht.size > 0 || q.some((e) => Fe.isNew(D(e))), Wr = [
1324
+ ...On ? [
1322
1325
  {
1323
1326
  key: "collection",
1324
- header: E("collection", "Collection"),
1327
+ header: T("collection", "Collection"),
1325
1328
  sortable: !0,
1326
- render: (e) => /* @__PURE__ */ a(ai, { variant: "outline", children: xt(e.collection) })
1329
+ render: (e) => /* @__PURE__ */ a(ri, { variant: "outline", children: xt(e.collection) })
1327
1330
  }
1328
1331
  ] : [],
1329
1332
  {
1330
1333
  key: "label",
1331
- header: E("label", "Item"),
1334
+ header: T("label", "Item"),
1332
1335
  sortable: !0,
1333
1336
  // Room in the left padding for the hanging unseen mark (#643).
1334
- className: Vr ? "pl-[30px]" : void 0,
1335
- headerClassName: Vr ? "pl-[30px]" : void 0,
1337
+ className: Gr ? "pl-[30px]" : void 0,
1338
+ headerClassName: Gr ? "pl-[30px]" : void 0,
1336
1339
  render: (e) => (
1337
1340
  // Underlined because clicking opens the item. The row is clickable as
1338
1341
  // a whole, but nothing on it said so — an underline is the one
1339
1342
  // convention people already read as "this goes somewhere".
1340
1343
  /* @__PURE__ */ d("span", { className: "flex items-center gap-1.5", children: [
1341
- ht.get(K(e)) || $e.isNew(K(e)) ? /* @__PURE__ */ a(
1342
- Gs,
1344
+ ht.get(D(e)) || Fe.isNew(D(e)) ? /* @__PURE__ */ a(
1345
+ Vs,
1343
1346
  {
1344
- lock: ht.get(K(e)),
1345
- isNew: $e.isNew(K(e)),
1347
+ lock: ht.get(D(e)),
1348
+ isNew: Fe.isNew(D(e)),
1346
1349
  dataAttr: "data-queue-live-mark",
1347
1350
  hang: !0
1348
1351
  }
1349
- ) : /* @__PURE__ */ a(ri, { change: e.unseen, dataAttr: "data-queue-unseen", hang: !0 }),
1352
+ ) : /* @__PURE__ */ a(ni, { change: e.unseen, dataAttr: "data-queue-unseen", hang: !0 }),
1350
1353
  /* @__PURE__ */ a(
1351
1354
  "span",
1352
1355
  {
@@ -1365,9 +1368,9 @@ function Zc({
1365
1368
  t
1366
1369
  )),
1367
1370
  /* @__PURE__ */ a(
1368
- ni,
1371
+ ti,
1369
1372
  {
1370
- viewers: nl[ps(e.collection, e.item_id)],
1373
+ viewers: rl[ps(e.collection, e.item_id)],
1371
1374
  dataAttr: "data-queue-presence"
1372
1375
  }
1373
1376
  )
@@ -1376,7 +1379,7 @@ function Zc({
1376
1379
  },
1377
1380
  {
1378
1381
  key: "state",
1379
- header: E("state", "State"),
1382
+ header: T("state", "State"),
1380
1383
  sortable: !0,
1381
1384
  render: (e) => e.state ? /* @__PURE__ */ d(
1382
1385
  "span",
@@ -1386,9 +1389,9 @@ function Zc({
1386
1389
  backgroundColor: e.state_color ? `${e.state_color}1a` : void 0,
1387
1390
  color: e.state_color ?? void 0
1388
1391
  },
1389
- title: e.via_addendum ? `Addendum "${e.via_addendum.title ?? ""}" — ${Le(e.state)}` : Le(e.state),
1392
+ title: e.via_addendum ? `Addendum "${e.via_addendum.title ?? ""}" — ${Ae(e.state)}` : Ae(e.state),
1390
1393
  children: [
1391
- Le(e.state),
1394
+ Ae(e.state),
1392
1395
  e.via_addendum && /* @__PURE__ */ a("span", { className: "ml-1 rounded-sm bg-amber-500/15 px-1 text-[9px] font-bold uppercase tracking-wide text-amber-700 dark:text-amber-300", children: "Addendum" })
1393
1396
  ]
1394
1397
  }
@@ -1396,33 +1399,33 @@ function Zc({
1396
1399
  },
1397
1400
  {
1398
1401
  key: "owners",
1399
- header: E("owners", "Owners"),
1402
+ header: T("owners", "Owners"),
1400
1403
  sortable: !0,
1401
- render: (e) => /* @__PURE__ */ a(ui, { owners: e.owners })
1404
+ render: (e) => /* @__PURE__ */ a(mi, { owners: e.owners })
1402
1405
  },
1403
1406
  {
1404
1407
  key: "aging_hours",
1405
- header: E("aging_hours", "Aging"),
1408
+ header: T("aging_hours", "Aging"),
1406
1409
  sortable: !0,
1407
- render: (e) => _i(e.aging_hours)
1410
+ render: (e) => Ni(e.aging_hours)
1408
1411
  },
1409
1412
  {
1410
1413
  // When the record entered its current state — the same moment Aging
1411
1414
  // counts from (the pipeline history, not the legacy column).
1412
1415
  key: "state_entered",
1413
- header: E("state_entered", "Last State Change"),
1416
+ header: T("state_entered", "Last State Change"),
1414
1417
  sortable: !0,
1415
1418
  render: (e) => e.state_entered_at ? Go(e.state_entered_at, { type: "datetime", template: "MM/DD/YYYY - h:mmA" }) : /* @__PURE__ */ a("span", { className: "text-slate-300 dark:text-slate-600", children: "—" })
1416
1419
  },
1417
1420
  {
1418
1421
  key: "sla_status",
1419
- header: E("sla_status", "SLA"),
1422
+ header: T("sla_status", "SLA"),
1420
1423
  sortable: !0,
1421
- render: (e) => /* @__PURE__ */ a(Ni, { status: e.sla_status })
1424
+ render: (e) => /* @__PURE__ */ a(Si, { status: e.sla_status })
1422
1425
  },
1423
1426
  {
1424
1427
  key: "at_risk",
1425
- header: E("at_risk", "Risk"),
1428
+ header: T("at_risk", "Risk"),
1426
1429
  sortable: !0,
1427
1430
  render: (e) => {
1428
1431
  var t;
@@ -1432,21 +1435,21 @@ function Zc({
1432
1435
  ] }) : e.predicted_risk ? /* @__PURE__ */ a("span", { className: "text-amber-500", title: e.predicted_note ?? void 0, children: "⚑ Predicted" }) : null;
1433
1436
  }
1434
1437
  },
1435
- ...ze ? [
1438
+ ...Xe ? [
1436
1439
  {
1437
1440
  key: "addendums",
1438
- header: E("addendums", "Addendums"),
1441
+ header: T("addendums", "Addendums"),
1439
1442
  sortable: !1,
1440
- render: (e) => /* @__PURE__ */ a(wi, { summary: e.addendums })
1443
+ render: (e) => /* @__PURE__ */ a(_i, { summary: e.addendums })
1441
1444
  }
1442
1445
  ] : [],
1443
- ...mt ? [
1446
+ ...ut ? [
1444
1447
  {
1445
1448
  key: "fulfilment",
1446
- header: E("fulfilment", "Shipped"),
1449
+ header: T("fulfilment", "Shipped"),
1447
1450
  sortable: !0,
1448
1451
  render: (e) => /* @__PURE__ */ a(
1449
- Ps,
1452
+ Ks,
1450
1453
  {
1451
1454
  collection: e.collection,
1452
1455
  itemId: e.item_id,
@@ -1455,18 +1458,18 @@ function Zc({
1455
1458
  )
1456
1459
  }
1457
1460
  ] : [],
1458
- ...ve ? [
1461
+ ..._e ? [
1459
1462
  {
1460
1463
  key: "integrations",
1461
- header: E("integrations", "Integrations"),
1464
+ header: T("integrations", "Integrations"),
1462
1465
  sortable: !1,
1463
- render: (e) => /* @__PURE__ */ a(Bs, { rows: bl[`${e.collection}:${e.item_id}`] })
1466
+ render: (e) => /* @__PURE__ */ a(Qs, { rows: bl[`${e.collection}:${e.item_id}`] })
1464
1467
  }
1465
1468
  ] : [],
1466
- ...Sr ? [
1469
+ ...Cr ? [
1467
1470
  {
1468
1471
  key: "tasks",
1469
- header: E("tasks", "Tasks"),
1472
+ header: T("tasks", "Tasks"),
1470
1473
  sortable: !1,
1471
1474
  render: (e) => {
1472
1475
  const t = fl[`${e.collection}:${e.item_id}`];
@@ -1484,12 +1487,12 @@ function Zc({
1484
1487
  }
1485
1488
  }
1486
1489
  ] : [],
1487
- ...pt ? [
1490
+ ...mt ? [
1488
1491
  {
1489
1492
  key: "send_backs",
1490
- header: E("send_backs", "Sent back"),
1493
+ header: T("send_backs", "Sent back"),
1491
1494
  sortable: !0,
1492
- render: (e) => /* @__PURE__ */ a(yi, { summary: e.send_backs })
1495
+ render: (e) => /* @__PURE__ */ a(ki, { summary: e.send_backs })
1493
1496
  }
1494
1497
  ] : []
1495
1498
  ], El = {
@@ -1500,7 +1503,7 @@ function Zc({
1500
1503
  {
1501
1504
  type: "button",
1502
1505
  onClick: (t) => {
1503
- t.stopPropagation(), He.mutate(e);
1506
+ t.stopPropagation(), Ye.mutate(e);
1504
1507
  },
1505
1508
  className: "text-[11px] text-slate-400 underline hover:text-slate-600",
1506
1509
  children: "Release"
@@ -1510,15 +1513,15 @@ function Zc({
1510
1513
  {
1511
1514
  type: "button",
1512
1515
  onClick: (t) => {
1513
- t.stopPropagation(), Ae.mutate(e);
1516
+ t.stopPropagation(), Le.mutate(e);
1514
1517
  },
1515
1518
  className: "text-[11px] font-medium text-nvr-navy underline dark:text-nvr-cyan",
1516
1519
  children: "Claim"
1517
1520
  }
1518
1521
  )
1519
- }, _t = (i == null ? void 0 : i.available_extra_fields) ?? [], Nt = Oo("drill.queue"), ae = Nt.value, Wr = (e) => Nt.push([e]), Al = (e) => {
1522
+ }, _t = (c == null ? void 0 : c.available_extra_fields) ?? [], Nt = Oo("drill.queue"), ae = Nt.value, Hr = (e) => Nt.push([e]), Ll = (e) => {
1520
1523
  var t;
1521
- for (const n of (i == null ? void 0 : i.sources) ?? []) {
1524
+ for (const n of (c == null ? void 0 : c.sources) ?? []) {
1522
1525
  const r = (t = n.drilldown) == null ? void 0 : t[e];
1523
1526
  if (r)
1524
1527
  return {
@@ -1528,104 +1531,104 @@ function Zc({
1528
1531
  };
1529
1532
  }
1530
1533
  return { enabled: !0, layout_id: null, width: null };
1531
- }, Ll = V(() => {
1534
+ }, Al = V(() => {
1532
1535
  const e = {};
1533
- for (const t of (i == null ? void 0 : i.sources) ?? [])
1536
+ for (const t of (c == null ? void 0 : c.sources) ?? [])
1534
1537
  for (const [n, r] of Object.entries(t.column_formats ?? {}))
1535
1538
  n in e || (e[n] = r);
1536
1539
  return e;
1537
- }, [i == null ? void 0 : i.sources]), Ol = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Dl = /^\d{4}-\d{2}-\d{2}T\d{2}:/;
1540
+ }, [c == null ? void 0 : c.sources]), Ol = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Dl = /^\d{4}-\d{2}-\d{2}T\d{2}:/;
1538
1541
  function Kl(e) {
1539
1542
  if (Ol.test(e)) return { text: e.split("@")[0], title: e };
1540
1543
  if (Dl.test(e)) {
1541
1544
  const t = new Date(e);
1542
1545
  if (!Number.isNaN(t.getTime()))
1543
1546
  return {
1544
- text: $s(t, { month: "2-digit", day: "2-digit", year: "2-digit" }),
1545
- title: Cs(t)
1547
+ text: Cs(t, { month: "2-digit", day: "2-digit", year: "2-digit" }),
1548
+ title: Ss(t)
1546
1549
  };
1547
1550
  }
1548
1551
  return { text: e, title: e };
1549
1552
  }
1550
- const Ln = Jo(u == null ? void 0 : u.inline_edit), Hr = Ln.enabled ? [
1553
+ const Dn = Jo(u == null ? void 0 : u.inline_edit), Yr = Dn.enabled ? [
1551
1554
  ...new Set(
1552
- ((i == null ? void 0 : i.sources) ?? []).filter((e) => e.type === "collection" && e.collection).map((e) => e.collection)
1555
+ ((c == null ? void 0 : c.sources) ?? []).filter((e) => e.type === "collection" && e.collection).map((e) => e.collection)
1553
1556
  )
1554
1557
  ] : [], Pl = Be({
1555
- queries: Hr.map((e) => ({
1558
+ queries: Yr.map((e) => ({
1556
1559
  queryKey: ["cbv-collection-meta", e],
1557
- queryFn: () => h.request(A(`/collections/${e}`)).then((t) => t.data),
1560
+ queryFn: () => h.request(L(`/collections/${e}`)).then((t) => t.data),
1558
1561
  staleTime: 10 * 6e4,
1559
1562
  retry: !1
1560
1563
  }))
1561
- }), On = /* @__PURE__ */ new Map();
1562
- Hr.forEach((e, t) => {
1564
+ }), Kn = /* @__PURE__ */ new Map();
1565
+ Yr.forEach((e, t) => {
1563
1566
  var r;
1564
1567
  const n = (r = Pl[t]) == null ? void 0 : r.data;
1565
- n && On.set(e, {
1568
+ n && Kn.set(e, {
1566
1569
  fields: new Map((n.fields ?? []).map((o) => [o.field, o])),
1567
1570
  relations: n.relations ?? []
1568
1571
  });
1569
1572
  });
1570
1573
  const { data: Ml } = W({
1571
1574
  queryKey: ["my-permissions"],
1572
- queryFn: () => h.request(A("/security/my/permissions")).then((e) => e.data),
1573
- enabled: Ln.enabled && !De,
1575
+ queryFn: () => h.request(L("/security/my/permissions")).then((e) => e.data),
1576
+ enabled: Dn.enabled && !De,
1574
1577
  staleTime: 5 * 6e4
1575
- }), Yr = Hs(), Jr = (e, t) => {
1578
+ }), Jr = Ws(), zr = (e, t) => {
1576
1579
  if (t.includes(".")) return null;
1577
- const n = On.get(e.collection);
1580
+ const n = Kn.get(e.collection);
1578
1581
  if (!n) return null;
1579
- const r = ht.get(K(e));
1582
+ const r = ht.get(D(e));
1580
1583
  return r && !r.is_mine ? null : Zo({
1581
- config: Ln,
1584
+ config: Dn,
1582
1585
  key: t,
1583
1586
  field: n.fields.get(t),
1584
1587
  collection: e.collection,
1585
1588
  relations: n.relations,
1586
1589
  mayUpdate: De || Ls(Ml, e.collection)
1587
1590
  });
1588
- }, zr = (e, t, n) => {
1591
+ }, Xr = (e, t, n) => {
1589
1592
  var r, o, s;
1590
1593
  return n === "m2o" ? ((o = (r = e.extra_ids) == null ? void 0 : r[t]) == null ? void 0 : o[0]) ?? null : ((s = e.extra) == null ? void 0 : s[t]) ?? null;
1591
1594
  }, Ql = (e, t, n, r, o) => {
1592
- const s = (b) => `${K(e)}|${b}`, m = [...te].filter((b) => b.startsWith("extra.")).map((b) => b.slice(6)).filter((b) => !!Jr(e, b)), p = o === 0 ? null : es(m, t, o), N = (b) => b.collection === e.collection && b.item_id === e.item_id, k = (b) => N(b) ? n === "m2o" ? {
1595
+ const s = (b) => `${D(e)}|${b}`, m = [...te].filter((b) => b.startsWith("extra.")).map((b) => b.slice(6)).filter((b) => !!zr(e, b)), p = o === 0 ? null : es(m, t, o), S = (b) => b.collection === e.collection && b.item_id === e.item_id, w = (b) => S(b) ? n === "m2o" ? {
1593
1596
  ...b,
1594
1597
  extra_ids: { ...b.extra_ids ?? {}, [t]: r == null ? [] : [String(r)] }
1595
1598
  } : { ...b, extra: { ...b.extra ?? {}, [t]: r } } : b;
1596
- Yr.commit({
1599
+ Jr.commit({
1597
1600
  cellKey: s(t),
1598
1601
  collection: e.collection,
1599
1602
  id: e.item_id,
1600
1603
  field: t,
1601
1604
  kind: n,
1602
- before: zr(e, t, n),
1605
+ before: Xr(e, t, n),
1603
1606
  value: r,
1604
1607
  next: p ? s(p) : null,
1605
1608
  optimistic: () => {
1606
1609
  const b = f.getQueriesData({ queryKey: ["queue-items", l] });
1607
- return f.setQueriesData({ queryKey: ["queue-items", l] }, (C) => {
1608
- const v = C;
1609
- return Array.isArray(v == null ? void 0 : v.data) ? { ...v, data: v.data.map(k) } : Array.isArray(v == null ? void 0 : v.rows) ? { ...v, rows: v.rows.map(k) } : C;
1610
+ return f.setQueriesData({ queryKey: ["queue-items", l] }, (R) => {
1611
+ const y = R;
1612
+ return Array.isArray(y == null ? void 0 : y.data) ? { ...y, data: y.data.map(w) } : Array.isArray(y == null ? void 0 : y.rows) ? { ...y, rows: y.rows.map(w) } : R;
1610
1613
  }), () => {
1611
- for (const [C, v] of b) f.setQueryData(C, v);
1614
+ for (const [R, y] of b) f.setQueryData(R, y);
1612
1615
  };
1613
1616
  },
1614
1617
  // Labels, rollups and the row's place in the queue follow the server.
1615
1618
  onSaved: () => void f.invalidateQueries({ queryKey: ["queue-items", l] })
1616
1619
  });
1617
1620
  }, Bl = (e, t, n) => {
1618
- const r = Jr(e, t);
1621
+ const r = zr(e, t);
1619
1622
  if (!r) return n;
1620
- const o = On.get(e.collection), s = o == null ? void 0 : o.fields.get(t);
1623
+ const o = Kn.get(e.collection), s = o == null ? void 0 : o.fields.get(t);
1621
1624
  return /* @__PURE__ */ a(
1622
- Ys,
1625
+ Hs,
1623
1626
  {
1624
- controller: Yr,
1625
- cellKey: `${K(e)}|${t}`,
1627
+ controller: Jr,
1628
+ cellKey: `${D(e)}|${t}`,
1626
1629
  kind: r,
1627
- value: zr(e, t, r),
1628
- label: E(`extra.${t}`, lt(t)),
1630
+ value: Xr(e, t, r),
1631
+ label: T(`extra.${t}`, je(t)),
1629
1632
  choices: s ? Xo(s) : void 0,
1630
1633
  target: r === "m2o" && o ? zo(o.relations, e.collection, t) : null,
1631
1634
  onCommit: (m, p) => Ql(e, t, r, m, p),
@@ -1634,7 +1637,7 @@ function Zc({
1634
1637
  );
1635
1638
  }, jl = _t.map((e) => ({
1636
1639
  key: `extra.${e}`,
1637
- header: E(`extra.${e}`, lt(e)),
1640
+ header: T(`extra.${e}`, je(e)),
1638
1641
  sortable: !0,
1639
1642
  render: (t) => Bl(t, e, Ul(t, e))
1640
1643
  }));
@@ -1643,85 +1646,85 @@ function Zc({
1643
1646
  {
1644
1647
  const o = (n = e.extra) == null ? void 0 : n[t];
1645
1648
  if (o == null || o === "") return /* @__PURE__ */ a("span", { className: "text-slate-300", children: "—" });
1646
- const s = Me(t), m = s ? tt(String(o), s) : String(o), { text: p, title: N } = Kl(m), k = ((i == null ? void 0 : i.extra_field_meta) ?? []).find((v) => v.path === t), b = ((r = e.extra_ids) == null ? void 0 : r[t]) ?? [], C = Al(t);
1647
- return (k == null ? void 0 : k.kind) === "relation" && k.target_collection && b.length > 0 && C.enabled && !k.aggregate ? /* @__PURE__ */ a(
1649
+ const s = Me(t), m = s ? nt(String(o), s) : String(o), { text: p, title: S } = Kl(m), w = ((c == null ? void 0 : c.extra_field_meta) ?? []).find((y) => y.path === t), b = ((r = e.extra_ids) == null ? void 0 : r[t]) ?? [], R = Ll(t);
1650
+ return (w == null ? void 0 : w.kind) === "relation" && w.target_collection && b.length > 0 && R.enabled && !w.aggregate ? /* @__PURE__ */ a(
1648
1651
  "button",
1649
1652
  {
1650
1653
  type: "button",
1651
- onClick: (v) => {
1652
- v.stopPropagation(), Wr({
1653
- collection: k.target_collection,
1654
+ onClick: (y) => {
1655
+ y.stopPropagation(), Hr({
1656
+ collection: w.target_collection,
1654
1657
  itemId: b[0],
1655
- layoutId: C.layout_id,
1656
- width: C.width,
1658
+ layoutId: R.layout_id,
1659
+ width: R.width,
1657
1660
  title: m
1658
1661
  });
1659
1662
  },
1660
- title: N,
1663
+ title: S,
1661
1664
  className: "block max-w-[200px] truncate text-left text-[12px] text-slate-700 underline decoration-slate-300 decoration-dotted underline-offset-2 hover:text-nvr-navy hover:decoration-nvr-cyan dark:text-slate-200 dark:hover:text-nvr-cyan",
1662
1665
  children: p
1663
1666
  }
1664
- ) : (k == null ? void 0 : k.kind) === "relation" && k.aggregate ? /* @__PURE__ */ a(
1667
+ ) : (w == null ? void 0 : w.kind) === "relation" && w.aggregate ? /* @__PURE__ */ a(
1665
1668
  "button",
1666
1669
  {
1667
1670
  type: "button",
1668
- onClick: (v) => {
1669
- v.stopPropagation(), pn({ row: e, path: t, value: m });
1671
+ onClick: (y) => {
1672
+ y.stopPropagation(), fn({ row: e, path: t, value: m });
1670
1673
  },
1671
1674
  title: "Show the rows behind this number",
1672
1675
  className: "block max-w-[200px] truncate text-left text-[12px] tabular-nums underline decoration-slate-300 decoration-dotted underline-offset-2 hover:text-nvr-navy hover:decoration-nvr-cyan dark:hover:text-nvr-cyan",
1673
1676
  children: p
1674
1677
  }
1675
- ) : /* @__PURE__ */ a("span", { className: "block max-w-[200px] truncate text-[12px]", title: N, children: p });
1678
+ ) : /* @__PURE__ */ a("span", { className: "block max-w-[200px] truncate text-[12px]", title: S, children: p });
1676
1679
  }
1677
1680
  }
1678
- const Xr = [
1679
- ...An ? ["collection"] : [],
1681
+ const Zr = [
1682
+ ...On ? ["collection"] : [],
1680
1683
  "state",
1681
1684
  "owners",
1682
1685
  "aging_hours",
1683
1686
  "state_entered",
1684
1687
  "sla_status",
1685
1688
  "at_risk",
1686
- ...ze ? ["addendums"] : [],
1687
- ...mt ? ["fulfilment"] : [],
1688
- ...ve ? ["integrations"] : [],
1689
- ...pt ? ["send_backs"] : [],
1690
- ...Sr ? ["tasks"] : [],
1689
+ ...Xe ? ["addendums"] : [],
1690
+ ...ut ? ["fulfilment"] : [],
1691
+ ..._e ? ["integrations"] : [],
1692
+ ...mt ? ["send_backs"] : [],
1693
+ ...Cr ? ["tasks"] : [],
1691
1694
  ..._t.map((e) => `extra.${e}`)
1692
1695
  ], Il = [
1693
- ...An ? ["collection"] : [],
1696
+ ...On ? ["collection"] : [],
1694
1697
  "state",
1695
1698
  "owners",
1696
- ...ze ? ["addendums"] : [],
1697
- ...mt ? ["fulfilment"] : [],
1698
- ...ve ? ["integrations"] : [],
1699
- ...pt ? ["send_backs"] : [],
1699
+ ...Xe ? ["addendums"] : [],
1700
+ ...ut ? ["fulfilment"] : [],
1701
+ ..._e ? ["integrations"] : [],
1702
+ ...mt ? ["send_backs"] : [],
1700
1703
  "aging_hours",
1701
1704
  "sla_status",
1702
1705
  "at_risk",
1703
1706
  ..._t.slice(0, 2).map((e) => `extra.${e}`)
1704
- ], Vl = (u == null ? void 0 : u.default_columns) ?? null, Dn = Qt ?? Vl, te = new Set(Dn ?? Il);
1705
- ze && !Et.has("addendums") && te.add("addendums"), mt && !Et.has("fulfilment") && te.add("fulfilment"), ve && !Et.has("integrations") && te.add("integrations"), pt && !Et.has("send_backs") && te.add("send_backs");
1707
+ ], Vl = (u == null ? void 0 : u.default_columns) ?? null, Pn = Bt ?? Vl, te = new Set(Pn ?? Il);
1708
+ Xe && !Et.has("addendums") && te.add("addendums"), ut && !Et.has("fulfilment") && te.add("fulfilment"), _e && !Et.has("integrations") && te.add("integrations"), mt && !Et.has("send_backs") && te.add("send_backs");
1706
1709
  const Gl = new Set(De ? [] : (u == null ? void 0 : u.admin_only_columns) ?? []);
1707
1710
  for (const e of Gl) te.delete(e);
1708
1711
  const St = [
1709
- ...(Dn ?? []).filter((e) => Xr.includes(e)),
1710
- ...Xr.filter((e) => !(Dn ?? []).includes(e))
1712
+ ...(Pn ?? []).filter((e) => Zr.includes(e)),
1713
+ ...Zr.filter((e) => !(Pn ?? []).includes(e))
1711
1714
  ], Wl = no(ro(ao, { activationConstraint: { distance: 4 } }));
1712
1715
  function Hl(e) {
1713
1716
  const { active: t, over: n } = e;
1714
1717
  if (!n || t.id === n.id) return;
1715
1718
  const r = St.indexOf(String(t.id)), o = St.indexOf(String(n.id));
1716
- r === -1 || o === -1 || Bt(
1719
+ r === -1 || o === -1 || jt(
1717
1720
  co(St, r, o).filter((s) => te.has(s))
1718
1721
  );
1719
1722
  }
1720
- const Zr = Gr.find((e) => e.key === "label"), Yl = {
1721
- ...Zr,
1723
+ const ea = Wr.find((e) => e.key === "label"), Yl = {
1724
+ ...ea,
1722
1725
  render: (e, ...t) => /* @__PURE__ */ d("span", { className: "inline-flex min-w-0 items-center gap-1.5", children: [
1723
- /* @__PURE__ */ a(Es, { rowId: e.item_id }),
1724
- Zr.render(e, ...t)
1726
+ /* @__PURE__ */ a(Rs, { rowId: e.item_id }),
1727
+ ea.render(e, ...t)
1725
1728
  ] })
1726
1729
  }, Jl = ((u == null ? void 0 : u.formula_columns) ?? []).map(
1727
1730
  (e) => ({
@@ -1740,54 +1743,55 @@ function Zc({
1740
1743
  return Number.isFinite(o) ? /* @__PURE__ */ a("span", { className: "tabular-nums", children: e.format === "currency" ? o.toLocaleString(void 0, { style: "currency", currency: "USD" }) : o.toLocaleString() }) : /* @__PURE__ */ a("span", { children: String(r) });
1741
1744
  }
1742
1745
  })
1743
- ), Kn = [...Gr, ...jl, ...Jl], ea = ci(
1746
+ ), Mn = [...Wr, ...jl, ...Jl], ta = ii(
1744
1747
  St,
1745
1748
  (e) => {
1746
1749
  var n;
1747
- const t = (n = Kn.find((r) => r.key === e)) == null ? void 0 : n.header;
1750
+ const t = (n = Mn.find((r) => r.key === e)) == null ? void 0 : n.header;
1748
1751
  return typeof t == "string" ? t : e;
1749
1752
  },
1750
1753
  te
1751
1754
  ), zl = {
1752
1755
  key: "__actions__",
1753
1756
  header: "",
1754
- render: (e) => e.collection === "tasks" || e.collection === en ? null : /* @__PURE__ */ a("span", { onClick: (t) => t.stopPropagation(), children: /* @__PURE__ */ a(
1755
- As,
1757
+ render: (e) => e.collection === "tasks" || e.collection === tn ? null : /* @__PURE__ */ a("span", { onClick: (t) => t.stopPropagation(), children: /* @__PURE__ */ a(
1758
+ Es,
1756
1759
  {
1757
1760
  collection: e.collection,
1758
1761
  id: e.item_id,
1762
+ label: e.label,
1759
1763
  hasPipeline: e.state != null,
1760
1764
  onOpen: () => yt(e),
1761
1765
  onPeek: () => Oe(e),
1762
1766
  urlFor: H.urlFor,
1763
1767
  onDeleted: () => {
1764
- h.request(jn(`/items/${e.collection}/${e.item_id}`)).then(() => {
1765
- D.success("Moved to trash"), f.invalidateQueries({ queryKey: ["queue-items", l] });
1766
- }).catch((t) => D.error(qt(t, "Delete failed")));
1768
+ h.request(In(`/items/${e.collection}/${e.item_id}`)).then(() => {
1769
+ O.success("Moved to trash"), f.invalidateQueries({ queryKey: ["queue-items", l] });
1770
+ }).catch((t) => O.error(qt(t, "Delete failed")));
1767
1771
  },
1768
1772
  onAfterTransition: () => void f.invalidateQueries({ queryKey: ["queue-items", l] }),
1769
1773
  bulkEnabledKeys: (u == null ? void 0 : u.bulk_action_keys) ?? null,
1770
1774
  disabled: ee
1771
1775
  }
1772
1776
  ) })
1773
- }, zt = [
1777
+ }, Xt = [
1774
1778
  Yl,
1775
- ...St.filter((e) => te.has(e)).map((e) => Kn.find((t) => t.key === e)).filter((e) => e !== void 0),
1776
- ...me ? [El] : [],
1779
+ ...St.filter((e) => te.has(e)).map((e) => Mn.find((t) => t.key === e)).filter((e) => e !== void 0),
1780
+ ...pe ? [El] : [],
1777
1781
  zl
1778
- ], ta = V(() => {
1782
+ ], na = V(() => {
1779
1783
  var r;
1780
- const e = u == null ? void 0 : u.default_pins, t = it ?? (e && Object.keys(e).length > 0 ? e : { [((r = zt[0]) == null ? void 0 : r.key) ?? "label"]: "left" }), n = new Set(zt.map((o) => o.key));
1784
+ const e = u == null ? void 0 : u.default_pins, t = it ?? (e && Object.keys(e).length > 0 ? e : { [((r = Xt[0]) == null ? void 0 : r.key) ?? "label"]: "left" }), n = new Set(Xt.map((o) => o.key));
1781
1785
  return Object.fromEntries(Object.entries(t).filter(([o]) => n.has(o)));
1782
- }, [it, u == null ? void 0 : u.default_pins, zt.map((e) => e.key).join("|")]), na = [
1786
+ }, [it, u == null ? void 0 : u.default_pins, Xt.map((e) => e.key).join("|")]), ra = [
1783
1787
  { value: "state", label: "State" },
1784
1788
  { value: "collection", label: "Collection" },
1785
1789
  { value: "sla_status", label: "SLA status" },
1786
1790
  { value: "at_risk", label: "At risk" },
1787
1791
  { value: "owners", label: "Owner" },
1788
1792
  { value: "aging", label: "Aging" },
1789
- ..._t.filter((e) => te.has(`extra.${e}`)).map((e) => ({ value: `extra.${e}`, label: E(`extra.${e}`, lt(e)) }))
1790
- ], ra = (e) => async (t, n) => {
1793
+ ..._t.filter((e) => te.has(`extra.${e}`)).map((e) => ({ value: `extra.${e}`, label: T(`extra.${e}`, je(e)) }))
1794
+ ], aa = (e) => async (t, n) => {
1791
1795
  if (!e.target_collection || !e.display_field) return [];
1792
1796
  const r = {
1793
1797
  limit: 25,
@@ -1804,43 +1808,43 @@ function Zc({
1804
1808
  ];
1805
1809
  s.length > 0 && (r.filter = JSON.stringify(s.length === 1 ? s[0] : { _and: s }));
1806
1810
  const p = (await h.request(
1807
- A(`/items/${e.target_collection}`, r)
1808
- )).data ?? [], N = Me(e.path), k = Fe[e.path] ? new Set(Fe[e.path]) : null, b = /* @__PURE__ */ new Set(), C = [];
1809
- for (const v of p) {
1810
- const X = v[e.display_field];
1811
+ L(`/items/${e.target_collection}`, r)
1812
+ )).data ?? [], S = Me(e.path), w = Te[e.path] ? new Set(Te[e.path]) : null, b = /* @__PURE__ */ new Set(), R = [];
1813
+ for (const y of p) {
1814
+ const X = y[e.display_field];
1811
1815
  if (X == null || X === "") continue;
1812
1816
  const Z = String(X);
1813
- b.has(Z) || k && !k.has(Z) || (b.add(Z), C.push({ label: N ? tt(Z, N) : Z, value: Z }));
1817
+ b.has(Z) || w && !w.has(Z) || (b.add(Z), R.push({ label: S ? nt(Z, S) : Z, value: Z }));
1814
1818
  }
1815
- return C;
1816
- }, Pn = new Map(((i == null ? void 0 : i.extra_field_meta) ?? []).map((e) => [e.path, e])), Qe = [
1819
+ return R;
1820
+ }, Qn = new Map(((c == null ? void 0 : c.extra_field_meta) ?? []).map((e) => [e.path, e])), Qe = [
1817
1821
  {
1818
1822
  key: "collection",
1819
- placeholder: E("collection", "Collection"),
1823
+ placeholder: T("collection", "Collection"),
1820
1824
  type: "combobox",
1821
1825
  multi: !0,
1822
- options: ((c == null ? void 0 : c.available_values.collection) ?? []).map((e) => ({
1826
+ options: ((i == null ? void 0 : i.available_values.collection) ?? []).map((e) => ({
1823
1827
  label: xt(e),
1824
1828
  value: e
1825
1829
  }))
1826
1830
  },
1827
1831
  {
1828
1832
  key: "state",
1829
- placeholder: E("state", "State"),
1833
+ placeholder: T("state", "State"),
1830
1834
  type: "combobox",
1831
1835
  multi: !0,
1832
1836
  // Until the rows land, the pipeline's own states (no counts yet) rather
1833
1837
  // than an empty list.
1834
- options: Rr(
1835
- c ? c.available_values.state ?? [] : Object.keys(we)
1838
+ options: Er(
1839
+ i ? i.available_values.state ?? [] : Object.keys(Ne)
1836
1840
  ).map((e) => {
1837
1841
  var t;
1838
1842
  return {
1839
- label: Le(e),
1843
+ label: Ae(e),
1840
1844
  value: e,
1841
1845
  // How many rows sit in it under the other active filters (the State
1842
1846
  // filter itself left out, or every other state would read 0).
1843
- count: xr ? xr[e] ?? 0 : (t = x == null ? void 0 : x.by_state) == null ? void 0 : t[e]
1847
+ count: yr ? yr[e] ?? 0 : (t = x == null ? void 0 : x.by_state) == null ? void 0 : t[e]
1844
1848
  };
1845
1849
  })
1846
1850
  },
@@ -1863,21 +1867,21 @@ function Zc({
1863
1867
  { label: "No", value: "no" }
1864
1868
  ]
1865
1869
  },
1866
- ...$r.length > 0 ? [
1870
+ ...qr.length > 0 ? [
1867
1871
  {
1868
1872
  key: "at_risk_rule",
1869
1873
  placeholder: "Highlight rule",
1870
1874
  type: "select",
1871
- options: $r
1875
+ options: qr
1872
1876
  }
1873
1877
  ] : [],
1874
1878
  {
1875
1879
  key: "aging_hours",
1876
- placeholder: E("aging_hours", "Aging (hours)"),
1880
+ placeholder: T("aging_hours", "Aging (hours)"),
1877
1881
  type: "range",
1878
1882
  range_unit: "h"
1879
1883
  },
1880
- ...ze ? [
1884
+ ...Xe ? [
1881
1885
  {
1882
1886
  key: "addendums",
1883
1887
  placeholder: "Addendums",
@@ -1890,23 +1894,23 @@ function Zc({
1890
1894
  ] : [],
1891
1895
  // #630 — integration partners; the queue read model filters on it
1892
1896
  // (live path in memory, materialized cache in SQL).
1893
- ...ve ? [
1897
+ ..._e ? [
1894
1898
  {
1895
1899
  key: "integrations",
1896
- placeholder: E("integrations", "Integrations"),
1900
+ placeholder: T("integrations", "Integrations"),
1897
1901
  type: "select",
1898
- options: js.map((e) => ({ label: e.label, value: e.value }))
1902
+ options: Bs.map((e) => ({ label: e.label, value: e.value }))
1899
1903
  }
1900
1904
  ] : [],
1901
- ...mt ? [
1905
+ ...ut ? [
1902
1906
  {
1903
1907
  key: "fulfilment",
1904
1908
  placeholder: "Shipped",
1905
1909
  type: "select",
1906
- options: Ms
1910
+ options: Ps
1907
1911
  }
1908
1912
  ] : [],
1909
- ...pt ? [
1913
+ ...mt ? [
1910
1914
  {
1911
1915
  key: "send_backs",
1912
1916
  placeholder: "Sent back",
@@ -1918,37 +1922,37 @@ function Zc({
1918
1922
  ]
1919
1923
  }
1920
1924
  ] : [],
1921
- ...hn.length > 0 ? [
1925
+ ...xn.length > 0 ? [
1922
1926
  {
1923
1927
  key: "labels",
1924
1928
  placeholder: "Triage label",
1925
1929
  type: "combobox",
1926
1930
  multi: !0,
1927
- options: hn.map((e) => ({ label: e, value: e }))
1931
+ options: xn.map((e) => ({ label: e, value: e }))
1928
1932
  }
1929
1933
  ] : [],
1930
1934
  {
1931
1935
  key: "label",
1932
- placeholder: E("label", "Item"),
1936
+ placeholder: T("label", "Item"),
1933
1937
  type: "combobox",
1934
1938
  multi: !0,
1935
1939
  loadOptions: async (e) => ((await h.request(
1936
- A(`/queues/${l}/label-suggest`, e.trim() ? { q: e.trim() } : {})
1940
+ L(`/queues/${l}/label-suggest`, e.trim() ? { q: e.trim() } : {})
1937
1941
  )).data ?? []).map((n) => ({ label: n, value: n }))
1938
1942
  },
1939
1943
  {
1940
1944
  key: "owners",
1941
- placeholder: E("owners", "Owners"),
1945
+ placeholder: T("owners", "Owners"),
1942
1946
  type: "combobox",
1943
1947
  multi: !0,
1944
- options: ((c == null ? void 0 : c.available_values.owners) ?? []).map((e) => ({
1948
+ options: ((i == null ? void 0 : i.available_values.owners) ?? []).map((e) => ({
1945
1949
  label: e.name,
1946
1950
  value: e.id
1947
1951
  }))
1948
1952
  },
1949
1953
  ..._t.map((e) => {
1950
1954
  var m, p;
1951
- const t = Pn.get(e), n = E(`extra.${e}`, lt(e)), r = { key: `extra.${e}`, placeholder: n }, o = Me(e);
1955
+ const t = Qn.get(e), n = T(`extra.${e}`, je(e)), r = { key: `extra.${e}`, placeholder: n }, o = Me(e);
1952
1956
  if ((o == null ? void 0 : o.type) === "datetime") return { ...r, type: "date" };
1953
1957
  if ((o == null ? void 0 : o.type) === "number") return { ...r, type: "number" };
1954
1958
  if ((o == null ? void 0 : o.type) === "boolean")
@@ -1960,115 +1964,115 @@ function Zc({
1960
1964
  { label: o.false_label ?? "No", value: "bool:false" }
1961
1965
  ]
1962
1966
  };
1963
- const s = (m = c == null ? void 0 : c.available_values.extra) == null ? void 0 : m[e];
1967
+ const s = (m = i == null ? void 0 : i.available_values.extra) == null ? void 0 : m[e];
1964
1968
  return s != null && s.length ? {
1965
1969
  ...r,
1966
1970
  type: "combobox",
1967
1971
  multi: !0,
1968
- options: s.map((N) => ({ label: o ? tt(N, o) : N, value: N }))
1972
+ options: s.map((S) => ({ label: o ? nt(S, o) : S, value: S }))
1969
1973
  } : (t == null ? void 0 : t.kind) === "relation" ? {
1970
1974
  ...r,
1971
1975
  type: "combobox",
1972
1976
  multi: !0,
1973
- restricted: !!((p = Fe[e]) != null && p.length),
1974
- loadOptions: ra(t)
1977
+ restricted: !!((p = Te[e]) != null && p.length),
1978
+ loadOptions: aa(t)
1975
1979
  } : { ...r, placeholder: `Search ${n}…`, type: "text" };
1976
1980
  })
1977
- ], Mn = Qe.filter(
1981
+ ], Bn = Qe.filter(
1978
1982
  (e) => te.has(e.key) || e.key === "label" || e.key === "owners"
1979
- ), Qn = (e) => {
1983
+ ), jn = (e) => {
1980
1984
  var t;
1981
1985
  return (((t = Qe.find((n) => n.key === e)) == null ? void 0 : t.placeholder) ?? e).replace(/^Search\s+/, "").replace(/…$/, "");
1982
- }, Bn = (() => {
1986
+ }, Un = (() => {
1983
1987
  var n, r;
1984
1988
  const e = [];
1985
- for (const [o, s] of Object.entries(Re)) {
1989
+ for (const [o, s] of Object.entries(Ee)) {
1986
1990
  if (!s || Array.isArray(s) && s.length === 0) continue;
1987
- const m = Qe.find((b) => b.key === o), p = o.startsWith("extra.") ? o.slice(6) : null, N = p ? Me(p) : null, k = jo({
1988
- field: Qn(o),
1991
+ const m = Qe.find((b) => b.key === o), p = o.startsWith("extra.") ? o.slice(6) : null, S = p ? Me(p) : null, w = jo({
1992
+ field: jn(o),
1989
1993
  type: (m == null ? void 0 : m.type) ?? "select",
1990
1994
  value: s,
1991
1995
  optionLabel: (b) => {
1992
- var C, v;
1993
- return (v = (C = m == null ? void 0 : m.options) == null ? void 0 : C.find((X) => X.value === b)) == null ? void 0 : v.label;
1996
+ var R, y;
1997
+ return (y = (R = m == null ? void 0 : m.options) == null ? void 0 : R.find((X) => X.value === b)) == null ? void 0 : y.label;
1994
1998
  },
1995
- currency: (N == null ? void 0 : N.type) === "number" && N.prefix === "$",
1999
+ currency: (S == null ? void 0 : S.type) === "number" && S.prefix === "$",
1996
2000
  rangeUnit: m == null ? void 0 : m.range_unit
1997
2001
  });
1998
- k && e.push(k);
2002
+ w && e.push(w);
1999
2003
  }
2000
- const t = c == null ? void 0 : c.total;
2004
+ const t = i == null ? void 0 : i.total;
2001
2005
  return Uo({
2002
2006
  noun: "items",
2003
2007
  scope: g === "mine" ? "you own" : g === "unowned" ? "with no owners" : g === "claimed" ? "you claimed" : null,
2004
- viewName: ((r = (n = j == null ? void 0 : j.data) == null ? void 0 : n.find((o) => o.id === Xe)) == null ? void 0 : r.name) ?? null,
2008
+ viewName: ((r = (n = j == null ? void 0 : j.data) == null ? void 0 : n.find((o) => o.id === Ze)) == null ? void 0 : r.name) ?? null,
2005
2009
  clauses: e,
2006
2010
  shown: typeof t == "number" ? t : null,
2007
2011
  of: (x == null ? void 0 : x.total) ?? null
2008
2012
  });
2009
- })(), Ct = new Set(Object.keys(ue.current)), Xl = ((e) => {
2013
+ })(), Ct = new Set(Object.keys(me.current)), Xl = ((e) => {
2010
2014
  var n;
2011
2015
  if (e.some((r) => r.key === "state")) return e;
2012
2016
  const t = Qe.find((r) => r.key === "state");
2013
- return !t || c && !((n = c.available_values.state) != null && n.length) ? e : [...e, t];
2017
+ return !t || i && !((n = i.available_values.state) != null && n.length) ? e : [...e, t];
2014
2018
  })(
2015
2019
  (() => {
2016
2020
  var o;
2017
2021
  const e = (s) => {
2018
- var X, Z, T;
2022
+ var X, Z, F;
2019
2023
  if (!s.key.startsWith("extra.")) return null;
2020
2024
  if (s.type === "combobox") return s;
2021
- const m = s.key.slice(6), p = Pn.get(m), N = Ct.has(s.key);
2022
- if ((p == null ? void 0 : p.kind) !== "relation" && !N) return null;
2023
- const k = Me(m), b = (X = c == null ? void 0 : c.available_values.extra) == null ? void 0 : X[m], C = s.placeholder.replace(/^Search (.*)…$/, "$1"), v = (p == null ? void 0 : p.kind) === "relation" && p.target_collection && p.display_field ? { collection: p.target_collection, field: p.display_field } : void 0;
2025
+ const m = s.key.slice(6), p = Qn.get(m), S = Ct.has(s.key);
2026
+ if ((p == null ? void 0 : p.kind) !== "relation" && !S) return null;
2027
+ const w = Me(m), b = (X = i == null ? void 0 : i.available_values.extra) == null ? void 0 : X[m], R = s.placeholder.replace(/^Search (.*)…$/, "$1"), y = (p == null ? void 0 : p.kind) === "relation" && p.target_collection && p.display_field ? { collection: p.target_collection, field: p.display_field } : void 0;
2024
2028
  return b != null && b.length ? {
2025
2029
  key: s.key,
2026
- placeholder: C,
2030
+ placeholder: R,
2027
2031
  type: "combobox",
2028
2032
  multi: !0,
2029
- cascade: v,
2030
- restricted: !!((Z = Fe[m]) != null && Z.length),
2033
+ cascade: y,
2034
+ restricted: !!((Z = Te[m]) != null && Z.length),
2031
2035
  options: b.map((ne) => ({
2032
- label: k && k.type !== "number" ? tt(ne, k) : ne,
2036
+ label: w && w.type !== "number" ? nt(ne, w) : ne,
2033
2037
  value: ne
2034
2038
  }))
2035
2039
  } : (p == null ? void 0 : p.kind) === "relation" ? {
2036
2040
  key: s.key,
2037
- placeholder: C,
2041
+ placeholder: R,
2038
2042
  type: "combobox",
2039
2043
  multi: !0,
2040
- cascade: v,
2041
- restricted: !!((T = Fe[m]) != null && T.length),
2042
- loadOptions: ra(p)
2044
+ cascade: y,
2045
+ restricted: !!((F = Te[m]) != null && F.length),
2046
+ loadOptions: aa(p)
2043
2047
  } : null;
2044
2048
  };
2045
2049
  if (rr.length > 0) {
2046
2050
  const s = [], m = /* @__PURE__ */ new Set();
2047
2051
  for (const p of rr) {
2048
- const N = (p.path ?? []).join(".");
2049
- let k;
2052
+ const S = (p.path ?? []).join(".");
2053
+ let w;
2050
2054
  if (p.key === "state" || /(^|_)state$/.test(((o = p.path) == null ? void 0 : o[0]) ?? ""))
2051
- k = Qe.find((b) => b.key === "state");
2055
+ w = Qe.find((b) => b.key === "state");
2052
2056
  else {
2053
- const b = Qe.filter((v) => {
2057
+ const b = Qe.filter((y) => {
2054
2058
  var Z;
2055
- if (!v.key.startsWith("extra.") || m.has(v.key)) return !1;
2056
- const X = v.key.slice(6);
2057
- return ((Z = Pn.get(X)) == null ? void 0 : Z.target_collection) === p.collection;
2058
- }), C = b.find((v) => v.key.slice(6).startsWith(`${N}.`)) ?? b[0];
2059
- k = C ? e(C) : null;
2059
+ if (!y.key.startsWith("extra.") || m.has(y.key)) return !1;
2060
+ const X = y.key.slice(6);
2061
+ return ((Z = Qn.get(X)) == null ? void 0 : Z.target_collection) === p.collection;
2062
+ }), R = b.find((y) => y.key.slice(6).startsWith(`${S}.`)) ?? b[0];
2063
+ w = R ? e(R) : null;
2060
2064
  }
2061
- !k || m.has(k.key) || (m.add(k.key), s.push(p.label ? { ...k, placeholder: p.label } : k));
2065
+ !w || m.has(w.key) || (m.add(w.key), s.push(p.label ? { ...w, placeholder: p.label } : w));
2062
2066
  }
2063
2067
  for (const p of Qe.map(e))
2064
2068
  p && !m.has(p.key) && (Ct.has(p.key) || p.restricted) && s.push(p);
2065
2069
  if (s.length > 0) return s;
2066
2070
  }
2067
- const t = Mn.map(e).filter((s) => s !== null), r = [
2071
+ const t = Bn.map(e).filter((s) => s !== null), r = [
2068
2072
  ...t.filter((s) => Ct.has(s.key) || s.restricted),
2069
2073
  ...t.filter((s) => !Ct.has(s.key) && !s.restricted)
2070
2074
  ].slice(0, 6);
2071
- return r.length > 0 ? r : Mn.filter((s) => s.key === "state" || s.key === "owners");
2075
+ return r.length > 0 ? r : Bn.filter((s) => s.key === "state" || s.key === "owners");
2072
2076
  })()
2073
2077
  ), Zl = (() => {
2074
2078
  if (!x) return null;
@@ -2079,7 +2083,7 @@ function Zc({
2079
2083
  label: "past SLA",
2080
2084
  tone: "text-red-600 dark:text-red-400",
2081
2085
  on: _.sla_status === "breached",
2082
- toggle: () => Ve("sla_status", "breached")
2086
+ toggle: () => Ge("sla_status", "breached")
2083
2087
  },
2084
2088
  {
2085
2089
  key: "warning",
@@ -2087,7 +2091,7 @@ function Zc({
2087
2091
  label: "SLA soon",
2088
2092
  tone: "text-amber-700 dark:text-amber-400",
2089
2093
  on: _.sla_status === "warning",
2090
- toggle: () => Ve("sla_status", "warning")
2094
+ toggle: () => Ge("sla_status", "warning")
2091
2095
  },
2092
2096
  {
2093
2097
  key: "at_risk",
@@ -2095,7 +2099,7 @@ function Zc({
2095
2099
  label: "at risk",
2096
2100
  tone: "text-red-600 dark:text-red-400",
2097
2101
  on: _.at_risk === "yes",
2098
- toggle: () => Ve("at_risk", "yes")
2102
+ toggle: () => Ge("at_risk", "yes")
2099
2103
  },
2100
2104
  {
2101
2105
  key: "unowned",
@@ -2104,7 +2108,7 @@ function Zc({
2104
2108
  tone: "text-slate-600 dark:text-slate-300",
2105
2109
  on: g === "unowned",
2106
2110
  toggle: () => {
2107
- Y(g === "unowned" ? "all" : "unowned"), O(1);
2111
+ Y(g === "unowned" ? "all" : "unowned"), A(1);
2108
2112
  }
2109
2113
  }
2110
2114
  ].filter((n) => n.n > 0 || n.on);
@@ -2120,13 +2124,13 @@ function Zc({
2120
2124
  type: "button",
2121
2125
  onClick: n.toggle,
2122
2126
  "aria-pressed": n.on,
2123
- className: R(
2127
+ className: E(
2124
2128
  "rounded px-1 tabular-nums hover:bg-slate-100 dark:hover:bg-slate-800",
2125
2129
  n.on && "bg-slate-100 dark:bg-slate-800"
2126
2130
  ),
2127
2131
  "data-queue-summary-item": n.key,
2128
2132
  children: [
2129
- /* @__PURE__ */ a("span", { className: R("font-semibold", n.tone), children: n.n.toLocaleString() }),
2133
+ /* @__PURE__ */ a("span", { className: E("font-semibold", n.tone), children: n.n.toLocaleString() }),
2130
2134
  " ",
2131
2135
  n.label
2132
2136
  ]
@@ -2134,9 +2138,9 @@ function Zc({
2134
2138
  n.key
2135
2139
  )),
2136
2140
  /* @__PURE__ */ d("span", { className: "tabular-nums", "data-queue-summary-total": !0, children: [
2137
- ((c == null ? void 0 : c.total) ?? e.total).toLocaleString(),
2141
+ ((i == null ? void 0 : i.total) ?? e.total).toLocaleString(),
2138
2142
  " item",
2139
- ((c == null ? void 0 : c.total) ?? e.total) === 1 ? "" : "s"
2143
+ ((i == null ? void 0 : i.total) ?? e.total) === 1 ? "" : "s"
2140
2144
  ] })
2141
2145
  ]
2142
2146
  }
@@ -2144,14 +2148,14 @@ function Zc({
2144
2148
  })();
2145
2149
  function eo(e) {
2146
2150
  const t = new Set(te);
2147
- t.has(e) ? (t.delete(e), (e === "addendums" || e === "integrations") && Wn((n) => new Set(n).add(e))) : (t.add(e), (e === "addendums" || e === "integrations") && Wn((n) => {
2151
+ t.has(e) ? (t.delete(e), (e === "addendums" || e === "integrations") && Yn((n) => new Set(n).add(e))) : (t.add(e), (e === "addendums" || e === "integrations") && Yn((n) => {
2148
2152
  const r = new Set(n);
2149
2153
  return r.delete(e), r;
2150
- })), Bt([...t]);
2154
+ })), jt([...t]);
2151
2155
  }
2152
- return Ot ? (L == null ? void 0 : L((Ot == null ? void 0 : Ot.status) ?? 500)) ?? null : /* @__PURE__ */ d("div", { className: "flex flex-1 min-h-0 flex-col", children: [
2156
+ return Ot ? (K == null ? void 0 : K((Ot == null ? void 0 : Ot.status) ?? 500)) ?? null : /* @__PURE__ */ d("div", { className: "flex flex-1 min-h-0 flex-col", children: [
2153
2157
  /* @__PURE__ */ d("div", { className: "shrink-0", children: [
2154
- (c == null ? void 0 : c.truncated) && /* @__PURE__ */ d("div", { className: "mx-4 mt-3 flex items-center gap-2 rounded-lg border border-amber-200 bg-amber-50 px-4 py-3 text-[12px] text-amber-800 dark:border-amber-900 dark:bg-amber-950/40 dark:text-amber-300", children: [
2158
+ (i == null ? void 0 : i.truncated) && /* @__PURE__ */ d("div", { className: "mx-4 mt-3 flex items-center gap-2 rounded-lg border border-amber-200 bg-amber-50 px-4 py-3 text-[12px] text-amber-800 dark:border-amber-900 dark:bg-amber-950/40 dark:text-amber-300", children: [
2155
2159
  /* @__PURE__ */ a(bo, { className: "h-4 w-4 shrink-0" }),
2156
2160
  /* @__PURE__ */ a("span", { children: "This view hit the row safety limit — the table below may not include every matching item, but the totals above are exact. Narrow the filters (or clear the priority sort on a large queue) to browse everything." })
2157
2161
  ] }),
@@ -2161,15 +2165,15 @@ function Zc({
2161
2165
  className: "flex flex-wrap items-center gap-2 border-b border-slate-200 bg-white px-4 py-2.5 dark:border-slate-700 dark:bg-slate-900",
2162
2166
  "data-queue-toolbar": !0,
2163
2167
  children: [
2164
- J ? /* @__PURE__ */ a("div", { className: "flex overflow-hidden rounded-md border border-slate-200 dark:border-border", children: vi.filter((e) => me || e.value !== "claimed").map(
2168
+ J ? /* @__PURE__ */ a("div", { className: "flex overflow-hidden rounded-md border border-slate-200 dark:border-border", children: wi.filter((e) => pe || e.value !== "claimed").map(
2165
2169
  (e, t) => /* @__PURE__ */ a(
2166
2170
  "button",
2167
2171
  {
2168
2172
  type: "button",
2169
2173
  onClick: () => {
2170
- Y(e.value), O(1);
2174
+ Y(e.value), A(1);
2171
2175
  },
2172
- className: R(
2176
+ className: E(
2173
2177
  "flex h-8 items-center px-3 text-[12px] font-medium transition-colors",
2174
2178
  t > 0 && "border-l border-slate-200 dark:border-border",
2175
2179
  g === e.value ? "bg-nvr-cyan/10 text-slate-900 dark:text-white" : "bg-white text-slate-500 hover:text-slate-700 dark:bg-slate-900 dark:text-slate-400 dark:hover:text-slate-200"
@@ -2179,21 +2183,21 @@ function Zc({
2179
2183
  e.value
2180
2184
  )
2181
2185
  ) }) : /* @__PURE__ */ a("div", { className: "h-8 w-64 animate-pulse rounded-md bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" }),
2182
- J ? Te.length <= 1 ? null : (
2186
+ J ? Re.length <= 1 ? null : (
2183
2187
  // One allowed view means nothing to switch to — no button.
2184
2188
  /* @__PURE__ */ a("div", { className: "flex overflow-hidden rounded-md border border-slate-200 dark:border-border", children: [
2185
2189
  { value: "table", label: "Table" },
2186
2190
  { value: "kanban", label: "Kanban" },
2187
2191
  { value: "workload", label: "Workload" }
2188
- ].filter((e) => Te.includes(e.value)).map((e, t) => /* @__PURE__ */ a(
2192
+ ].filter((e) => Re.includes(e.value)).map((e, t) => /* @__PURE__ */ a(
2189
2193
  "button",
2190
2194
  {
2191
2195
  type: "button",
2192
- onClick: () => je(e.value),
2193
- className: R(
2196
+ onClick: () => Ue(e.value),
2197
+ className: E(
2194
2198
  "flex h-8 items-center px-3 text-[12px] font-medium transition-colors",
2195
2199
  t > 0 && "border-l border-slate-200 dark:border-border",
2196
- q === e.value ? "bg-nvr-cyan/10 text-slate-900 dark:text-white" : "bg-white text-slate-500 hover:text-slate-700 dark:bg-slate-900 dark:text-slate-400 dark:hover:text-slate-200"
2200
+ C === e.value ? "bg-nvr-cyan/10 text-slate-900 dark:text-white" : "bg-white text-slate-500 hover:text-slate-700 dark:bg-slate-900 dark:text-slate-400 dark:hover:text-slate-200"
2197
2201
  ),
2198
2202
  children: e.label
2199
2203
  },
@@ -2218,7 +2222,7 @@ function Zc({
2218
2222
  ]
2219
2223
  }
2220
2224
  ),
2221
- ze && /* @__PURE__ */ d(
2225
+ Xe && /* @__PURE__ */ d(
2222
2226
  "button",
2223
2227
  {
2224
2228
  type: "button",
@@ -2235,10 +2239,10 @@ function Zc({
2235
2239
  ]
2236
2240
  }
2237
2241
  ),
2238
- ve && /* @__PURE__ */ a(
2239
- Us,
2242
+ _e && /* @__PURE__ */ a(
2243
+ js,
2240
2244
  {
2241
- label: E("integrations", "Integrations"),
2245
+ label: T("integrations", "Integrations"),
2242
2246
  value: _.integrations,
2243
2247
  onChange: (e) => Q((t) => {
2244
2248
  const n = { ...t };
@@ -2246,9 +2250,9 @@ function Zc({
2246
2250
  })
2247
2251
  }
2248
2252
  ),
2249
- /* @__PURE__ */ a(Zs, { className: "h-8" }),
2250
- /* @__PURE__ */ a(Ks, {}),
2251
- an > 0 && /* @__PURE__ */ d(
2253
+ /* @__PURE__ */ a(Xs, { className: "h-8" }),
2254
+ /* @__PURE__ */ a(Ds, {}),
2255
+ ln > 0 && /* @__PURE__ */ d(
2252
2256
  "button",
2253
2257
  {
2254
2258
  type: "button",
@@ -2256,35 +2260,35 @@ function Zc({
2256
2260
  className: "nvr-pop-in flex h-8 items-center gap-1 rounded-full border border-nvr-cyan/40 bg-nvr-cyan/[0.08] px-2.5 text-[12px] font-medium transition-colors text-nvr-navy hover:bg-nvr-cyan/20 dark:text-nvr-cyan",
2257
2261
  children: [
2258
2262
  /* @__PURE__ */ a(fo, { className: "h-3 w-3" }),
2259
- an,
2263
+ ln,
2260
2264
  " update",
2261
- an === 1 ? "" : "s",
2265
+ ln === 1 ? "" : "s",
2262
2266
  " · Refresh"
2263
2267
  ]
2264
2268
  }
2265
2269
  ),
2266
2270
  /* @__PURE__ */ d("div", { className: "ml-auto flex flex-wrap items-center gap-2", children: [
2267
- q === "table" && /* @__PURE__ */ d(nt, { children: [
2268
- /* @__PURE__ */ a(rt, { asChild: !0, children: /* @__PURE__ */ d(
2271
+ C === "table" && /* @__PURE__ */ d(rt, { children: [
2272
+ /* @__PURE__ */ a(at, { asChild: !0, children: /* @__PURE__ */ d(
2269
2273
  "button",
2270
2274
  {
2271
2275
  type: "button",
2272
- className: R(
2276
+ className: E(
2273
2277
  "flex h-8 items-center gap-1 rounded-md border px-2.5 text-[12px] font-medium",
2274
2278
  $ ? "border-nvr-cyan/40 bg-nvr-cyan/10 text-slate-900 dark:text-white" : "border-slate-200 text-slate-600 hover:bg-slate-50 dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-800"
2275
2279
  ),
2276
2280
  children: [
2277
- /* @__PURE__ */ a(wa, { className: "h-3.5 w-3.5" }),
2278
- $ ? `Group: ${((da = na.find((e) => e.value === $)) == null ? void 0 : da.label) ?? $}` : "Group"
2281
+ /* @__PURE__ */ a(_a, { className: "h-3.5 w-3.5" }),
2282
+ $ ? `Group: ${((ua = ra.find((e) => e.value === $)) == null ? void 0 : ua.label) ?? $}` : "Group"
2279
2283
  ]
2280
2284
  }
2281
2285
  ) }),
2282
- /* @__PURE__ */ a(at, { className: "w-[200px] p-0", align: "start", children: /* @__PURE__ */ d(Ta, { children: [
2283
- /* @__PURE__ */ a(li, { placeholder: "Group by…", className: "h-8 text-[12px]" }),
2284
- /* @__PURE__ */ d(Ra, { children: [
2285
- /* @__PURE__ */ a(oi, { children: "No attribute found." }),
2286
+ /* @__PURE__ */ a(lt, { className: "w-[200px] p-0", align: "start", children: /* @__PURE__ */ d(Ra, { children: [
2287
+ /* @__PURE__ */ a(ai, { placeholder: "Group by…", className: "h-8 text-[12px]" }),
2288
+ /* @__PURE__ */ d(Ea, { children: [
2289
+ /* @__PURE__ */ a(li, { children: "No attribute found." }),
2286
2290
  /* @__PURE__ */ a(Ft, { value: "__none__", onSelect: () => ot(null), children: "None" }),
2287
- na.map((e) => /* @__PURE__ */ a(
2291
+ ra.map((e) => /* @__PURE__ */ a(
2288
2292
  Ft,
2289
2293
  {
2290
2294
  value: e.label,
@@ -2296,14 +2300,14 @@ function Zc({
2296
2300
  ] })
2297
2301
  ] }) })
2298
2302
  ] }),
2299
- q === "table" && /* @__PURE__ */ d(
2303
+ C === "table" && /* @__PURE__ */ d(
2300
2304
  "button",
2301
2305
  {
2302
2306
  type: "button",
2303
2307
  onClick: () => {
2304
- Ue(I === "-priority" ? "" : "-priority"), O(1);
2308
+ Ie(I === "-priority" ? "" : "-priority"), A(1);
2305
2309
  },
2306
- className: R(
2310
+ className: E(
2307
2311
  "flex h-8 items-center gap-1 rounded-md border px-2.5 text-[12px] font-medium",
2308
2312
  I === "-priority" ? "border-nvr-cyan/40 bg-nvr-cyan/10 text-slate-900 dark:text-white" : "border-slate-200 text-slate-600 hover:bg-slate-50 dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-800"
2309
2313
  ),
@@ -2313,43 +2317,43 @@ function Zc({
2313
2317
  ]
2314
2318
  }
2315
2319
  ),
2316
- q === "table" && $ && le && /* @__PURE__ */ a(
2320
+ C === "table" && $ && le && /* @__PURE__ */ a(
2317
2321
  "button",
2318
2322
  {
2319
2323
  type: "button",
2320
- onClick: () => tn(
2321
- ye.size > 0 ? /* @__PURE__ */ new Set() : new Set(le.map((e) => e.key))
2324
+ onClick: () => nn(
2325
+ ke.size > 0 ? /* @__PURE__ */ new Set() : new Set(le.map((e) => e.key))
2322
2326
  ),
2323
2327
  className: "flex h-8 items-center rounded-md px-2 text-[12px] text-slate-500 hover:text-slate-700 dark:text-slate-400 dark:hover:text-slate-200",
2324
- children: ye.size > 0 ? "Expand all" : "Collapse all"
2328
+ children: ke.size > 0 ? "Expand all" : "Collapse all"
2325
2329
  }
2326
2330
  ),
2327
- q === "kanban" && /* @__PURE__ */ d(nt, { children: [
2328
- /* @__PURE__ */ a(rt, { asChild: !0, children: /* @__PURE__ */ d(
2331
+ C === "kanban" && /* @__PURE__ */ d(rt, { children: [
2332
+ /* @__PURE__ */ a(at, { asChild: !0, children: /* @__PURE__ */ d(
2329
2333
  "button",
2330
2334
  {
2331
2335
  type: "button",
2332
- className: R(
2336
+ className: E(
2333
2337
  "flex h-8 items-center gap-1 rounded-md border px-2.5 text-[12px] font-medium",
2334
2338
  st ? "border-nvr-cyan/40 bg-nvr-cyan/10 text-slate-900 dark:text-white" : "border-slate-200 text-slate-600 hover:bg-slate-50 dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-800"
2335
2339
  ),
2336
2340
  children: [
2337
- /* @__PURE__ */ a(wa, { className: "h-3.5 w-3.5" }),
2341
+ /* @__PURE__ */ a(_a, { className: "h-3.5 w-3.5" }),
2338
2342
  st ? `Lanes: ${st === "collection" ? "Collection" : "Owner"}` : "Lanes"
2339
2343
  ]
2340
2344
  }
2341
2345
  ) }),
2342
- /* @__PURE__ */ a(at, { className: "w-[180px] p-0", align: "start", children: /* @__PURE__ */ a(Ta, { children: /* @__PURE__ */ d(Ra, { children: [
2343
- /* @__PURE__ */ a(Ft, { value: "none", onSelect: () => nn(null), children: "None" }),
2344
- /* @__PURE__ */ a(Ft, { value: "collection", onSelect: () => nn("collection"), children: "Collection" }),
2345
- /* @__PURE__ */ a(Ft, { value: "owner", onSelect: () => nn("owners"), children: "Owner" })
2346
+ /* @__PURE__ */ a(lt, { className: "w-[180px] p-0", align: "start", children: /* @__PURE__ */ a(Ra, { children: /* @__PURE__ */ d(Ea, { children: [
2347
+ /* @__PURE__ */ a(Ft, { value: "none", onSelect: () => rn(null), children: "None" }),
2348
+ /* @__PURE__ */ a(Ft, { value: "collection", onSelect: () => rn("collection"), children: "Collection" }),
2349
+ /* @__PURE__ */ a(Ft, { value: "owner", onSelect: () => rn("owners"), children: "Owner" })
2346
2350
  ] }) }) })
2347
2351
  ] }),
2348
- G && i && /* @__PURE__ */ d(
2352
+ G && c && /* @__PURE__ */ d(
2349
2353
  "button",
2350
2354
  {
2351
2355
  type: "button",
2352
- onClick: () => G({ id: i.id, name: i.name }),
2356
+ onClick: () => G({ id: c.id, name: c.name }),
2353
2357
  "data-tip": "Open Ask AI with a question about this queue",
2354
2358
  className: "flex h-8 items-center gap-1 rounded-md border border-slate-200 px-2.5 text-[12px] font-medium text-slate-600 hover:bg-slate-50 dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-800",
2355
2359
  "data-queue-ask": !0,
@@ -2359,17 +2363,17 @@ function Zc({
2359
2363
  ]
2360
2364
  }
2361
2365
  ),
2362
- /* @__PURE__ */ a(Ws, { listKey: `queue:${l}`, getState: _l }),
2366
+ /* @__PURE__ */ a(Gs, { listKey: `queue:${l}`, getState: _l }),
2363
2367
  /* @__PURE__ */ d(
2364
2368
  "button",
2365
2369
  {
2366
2370
  type: "button",
2367
- onClick: () => Va((e) => !e),
2368
- "aria-expanded": dt,
2371
+ onClick: () => Ga((e) => !e),
2372
+ "aria-expanded": ct,
2369
2373
  title: "Trends, aging, pace and states",
2370
- className: R(
2374
+ className: E(
2371
2375
  "flex h-8 items-center gap-1 rounded-md border px-2.5 text-[12px] font-medium",
2372
- dt ? "border-nvr-cyan/40 bg-nvr-cyan/10 text-slate-900 dark:text-white" : "border-slate-200 text-slate-600 hover:bg-slate-50 dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-800"
2376
+ ct ? "border-nvr-cyan/40 bg-nvr-cyan/10 text-slate-900 dark:text-white" : "border-slate-200 text-slate-600 hover:bg-slate-50 dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-800"
2373
2377
  ),
2374
2378
  "data-queue-insights-toggle": !0,
2375
2379
  children: [
@@ -2378,8 +2382,8 @@ function Zc({
2378
2382
  ]
2379
2383
  }
2380
2384
  ),
2381
- q === "table" && /* @__PURE__ */ d(nt, { children: [
2382
- /* @__PURE__ */ a(rt, { asChild: !0, children: /* @__PURE__ */ d(
2385
+ C === "table" && /* @__PURE__ */ d(rt, { children: [
2386
+ /* @__PURE__ */ a(at, { asChild: !0, children: /* @__PURE__ */ d(
2383
2387
  "button",
2384
2388
  {
2385
2389
  type: "button",
@@ -2390,16 +2394,16 @@ function Zc({
2390
2394
  ]
2391
2395
  }
2392
2396
  ) }),
2393
- /* @__PURE__ */ a(at, { className: "w-[220px] p-2", align: "end", children: /* @__PURE__ */ a(
2397
+ /* @__PURE__ */ a(lt, { className: "w-[220px] p-2", align: "end", children: /* @__PURE__ */ a(
2394
2398
  lo,
2395
2399
  {
2396
2400
  sensors: Wl,
2397
2401
  collisionDetection: oo,
2398
2402
  onDragEnd: Hl,
2399
- children: /* @__PURE__ */ a(so, { items: ea, strategy: io, children: /* @__PURE__ */ a("div", { className: "space-y-1.5", children: ea.map((e) => {
2400
- const t = Kn.find((n) => n.key === e);
2403
+ children: /* @__PURE__ */ a(so, { items: ta, strategy: io, children: /* @__PURE__ */ a("div", { className: "space-y-1.5", children: ta.map((e) => {
2404
+ const t = Mn.find((n) => n.key === e);
2401
2405
  return /* @__PURE__ */ a(
2402
- $i,
2406
+ qi,
2403
2407
  {
2404
2408
  id: e,
2405
2409
  label: typeof (t == null ? void 0 : t.header) == "string" ? t.header : e,
@@ -2412,7 +2416,7 @@ function Zc({
2412
2416
  }
2413
2417
  ) })
2414
2418
  ] }),
2415
- q === "table" && Kt && /* @__PURE__ */ d(
2419
+ C === "table" && Pt && /* @__PURE__ */ d(
2416
2420
  "button",
2417
2421
  {
2418
2422
  type: "button",
@@ -2427,7 +2431,7 @@ function Zc({
2427
2431
  ]
2428
2432
  }
2429
2433
  ),
2430
- q === "table" && /* @__PURE__ */ a(
2434
+ C === "table" && /* @__PURE__ */ a(
2431
2435
  "button",
2432
2436
  {
2433
2437
  type: "button",
@@ -2445,11 +2449,11 @@ function Zc({
2445
2449
  children: Rt === "compact" ? /* @__PURE__ */ a(wo, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ a(_o, { className: "h-3.5 w-3.5" })
2446
2450
  }
2447
2451
  ),
2448
- q === "table" && Pa && oe.length > 0 && /* @__PURE__ */ d(
2452
+ C === "table" && Ma && oe.length > 0 && /* @__PURE__ */ d(
2449
2453
  "button",
2450
2454
  {
2451
2455
  type: "button",
2452
- onClick: () => Er(),
2456
+ onClick: () => Lr(),
2453
2457
  className: "flex h-8 items-center gap-1.5 rounded-md bg-nvr-cyan px-3 text-[12px] font-semibold text-white hover:brightness-110",
2454
2458
  children: [
2455
2459
  /* @__PURE__ */ a(No, { className: "h-3 w-3 fill-current" }),
@@ -2457,21 +2461,21 @@ function Zc({
2457
2461
  ]
2458
2462
  }
2459
2463
  ),
2460
- !dn && re.length === 1 && (Dt ? /* @__PURE__ */ d(nt, { children: [
2461
- /* @__PURE__ */ a(rt, { asChild: !0, children: /* @__PURE__ */ d(
2464
+ !pn && re.length === 1 && (Kt ? /* @__PURE__ */ d(rt, { children: [
2465
+ /* @__PURE__ */ a(at, { asChild: !0, children: /* @__PURE__ */ d(
2462
2466
  "button",
2463
2467
  {
2464
2468
  type: "button",
2465
2469
  className: "flex h-8 items-center gap-1.5 rounded-md border border-slate-200 bg-white px-2.5 text-[12px] font-medium text-slate-700 hover:bg-slate-50 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-200 dark:hover:bg-slate-800",
2466
2470
  children: [
2467
- /* @__PURE__ */ a(Zt, { className: "h-3.5 w-3.5" }),
2471
+ /* @__PURE__ */ a(en, { className: "h-3.5 w-3.5" }),
2468
2472
  "New ",
2469
- Un(re[0]),
2470
- /* @__PURE__ */ a(_a, { className: "h-3 w-3 opacity-60" })
2473
+ Vn(re[0]),
2474
+ /* @__PURE__ */ a(Na, { className: "h-3 w-3 opacity-60" })
2471
2475
  ]
2472
2476
  }
2473
2477
  ) }),
2474
- /* @__PURE__ */ d(at, { align: "end", className: "w-60 p-1", children: [
2478
+ /* @__PURE__ */ d(lt, { align: "end", className: "w-60 p-1", children: [
2475
2479
  /* @__PURE__ */ d(
2476
2480
  "button",
2477
2481
  {
@@ -2484,12 +2488,12 @@ function Zc({
2484
2488
  }),
2485
2489
  className: "flex w-full items-center rounded px-2 py-1.5 text-left text-[12px] text-slate-700 hover:bg-slate-100 dark:text-slate-200 dark:hover:bg-muted",
2486
2490
  children: [
2487
- ((ua = Dt.active) == null ? void 0 : ua.create_label) ?? ((ma = Dt.active) == null ? void 0 : ma.name) ?? "Default layout",
2491
+ ((ma = Kt.active) == null ? void 0 : ma.create_label) ?? ((pa = Kt.active) == null ? void 0 : pa.name) ?? "Default layout",
2488
2492
  /* @__PURE__ */ a("span", { className: "ml-auto pl-3 text-[10px] text-slate-400 dark:text-slate-500", children: "default" })
2489
2493
  ]
2490
2494
  }
2491
2495
  ),
2492
- Dt.options.map((e) => /* @__PURE__ */ a(
2496
+ Kt.options.map((e) => /* @__PURE__ */ a(
2493
2497
  "button",
2494
2498
  {
2495
2499
  type: "button",
@@ -2517,26 +2521,26 @@ function Zc({
2517
2521
  }),
2518
2522
  className: "flex h-8 items-center gap-1.5 rounded-md border border-slate-200 bg-white px-2.5 text-[12px] font-medium text-slate-700 hover:bg-slate-50 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-200 dark:hover:bg-slate-800",
2519
2523
  children: [
2520
- /* @__PURE__ */ a(Zt, { className: "h-3.5 w-3.5" }),
2524
+ /* @__PURE__ */ a(en, { className: "h-3.5 w-3.5" }),
2521
2525
  "New ",
2522
- Un(re[0])
2526
+ Vn(re[0])
2523
2527
  ]
2524
2528
  }
2525
2529
  )),
2526
- !dn && re.length > 1 && /* @__PURE__ */ d(nt, { children: [
2527
- /* @__PURE__ */ a(rt, { asChild: !0, children: /* @__PURE__ */ d(
2530
+ !pn && re.length > 1 && /* @__PURE__ */ d(rt, { children: [
2531
+ /* @__PURE__ */ a(at, { asChild: !0, children: /* @__PURE__ */ d(
2528
2532
  "button",
2529
2533
  {
2530
2534
  type: "button",
2531
2535
  className: "flex h-8 items-center gap-1.5 rounded-md border border-slate-200 bg-white px-2.5 text-[12px] font-medium text-slate-700 hover:bg-slate-50 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-200 dark:hover:bg-slate-800",
2532
2536
  children: [
2533
- /* @__PURE__ */ a(Zt, { className: "h-3.5 w-3.5" }),
2537
+ /* @__PURE__ */ a(en, { className: "h-3.5 w-3.5" }),
2534
2538
  "New",
2535
- /* @__PURE__ */ a(_a, { className: "h-3 w-3 opacity-60" })
2539
+ /* @__PURE__ */ a(Na, { className: "h-3 w-3 opacity-60" })
2536
2540
  ]
2537
2541
  }
2538
2542
  ) }),
2539
- /* @__PURE__ */ a(at, { align: "end", className: "w-56 p-1", children: re.map((e) => /* @__PURE__ */ d(
2543
+ /* @__PURE__ */ a(lt, { align: "end", className: "w-56 p-1", children: re.map((e) => /* @__PURE__ */ d(
2540
2544
  "button",
2541
2545
  {
2542
2546
  type: "button",
@@ -2547,18 +2551,18 @@ function Zc({
2547
2551
  }),
2548
2552
  className: "flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-[12px] text-slate-700 hover:bg-slate-100 dark:text-slate-200 dark:hover:bg-muted",
2549
2553
  children: [
2550
- /* @__PURE__ */ a(Zt, { className: "h-3 w-3 opacity-60" }),
2551
- Un(e)
2554
+ /* @__PURE__ */ a(en, { className: "h-3 w-3 opacity-60" }),
2555
+ Vn(e)
2552
2556
  ]
2553
2557
  },
2554
2558
  e
2555
2559
  )) })
2556
2560
  ] }),
2557
- !dn && Ie && xe && /* @__PURE__ */ a(
2558
- Qs,
2561
+ !pn && Ve && ye && /* @__PURE__ */ a(
2562
+ Ms,
2559
2563
  {
2560
- collection: Ie,
2561
- onParsed: (e, t) => xe(`/collections/${Ie}/new`, {
2564
+ collection: Ve,
2565
+ onParsed: (e, t) => ye(`/collections/${Ve}/new`, {
2562
2566
  state: { importResult: e, importTemplateId: t.id }
2563
2567
  })
2564
2568
  }
@@ -2567,7 +2571,7 @@ function Zc({
2567
2571
  ]
2568
2572
  }
2569
2573
  ),
2570
- dt && /* @__PURE__ */ d(
2574
+ ct && /* @__PURE__ */ d(
2571
2575
  "div",
2572
2576
  {
2573
2577
  className: "flex flex-wrap items-center gap-x-4 gap-y-2 border-b border-slate-100 bg-white px-4 py-2.5 dark:border-slate-800 dark:bg-slate-900",
@@ -2580,10 +2584,10 @@ function Zc({
2580
2584
  label: "Total",
2581
2585
  count: (x == null ? void 0 : x.total) ?? 0,
2582
2586
  filteredCount: z ? z.total : null,
2583
- active: Object.values(_).every(Ua) && g === "all",
2584
- isLoading: We,
2587
+ active: Object.values(_).every(Ia) && g === "all",
2588
+ isLoading: He,
2585
2589
  ...ft("total"),
2586
- onClick: Ia
2590
+ onClick: Va
2587
2591
  }
2588
2592
  ),
2589
2593
  /* @__PURE__ */ a(
@@ -2594,10 +2598,10 @@ function Zc({
2594
2598
  filteredCount: z ? z.sla_warning : null,
2595
2599
  tone: "amber",
2596
2600
  active: _.sla_status === "warning",
2597
- isLoading: We,
2601
+ isLoading: He,
2598
2602
  deltaBadIsUp: !0,
2599
2603
  ...ft("sla_warning"),
2600
- onClick: () => Ve("sla_status", "warning")
2604
+ onClick: () => Ge("sla_status", "warning")
2601
2605
  }
2602
2606
  ),
2603
2607
  /* @__PURE__ */ a(
@@ -2608,10 +2612,10 @@ function Zc({
2608
2612
  filteredCount: z ? z.sla_breached : null,
2609
2613
  tone: "red",
2610
2614
  active: _.sla_status === "breached",
2611
- isLoading: We,
2615
+ isLoading: He,
2612
2616
  deltaBadIsUp: !0,
2613
2617
  ...ft("sla_breached"),
2614
- onClick: () => Ve("sla_status", "breached")
2618
+ onClick: () => Ge("sla_status", "breached")
2615
2619
  }
2616
2620
  ),
2617
2621
  /* @__PURE__ */ a(
@@ -2622,10 +2626,10 @@ function Zc({
2622
2626
  filteredCount: z ? z.at_risk : null,
2623
2627
  tone: "red",
2624
2628
  active: _.at_risk === "yes",
2625
- isLoading: We,
2629
+ isLoading: He,
2626
2630
  deltaBadIsUp: !0,
2627
2631
  ...ft("at_risk"),
2628
- onClick: () => Ve("at_risk", "yes")
2632
+ onClick: () => Ge("at_risk", "yes")
2629
2633
  }
2630
2634
  ),
2631
2635
  /* @__PURE__ */ a(
@@ -2635,11 +2639,11 @@ function Zc({
2635
2639
  count: (x == null ? void 0 : x.unowned) ?? 0,
2636
2640
  filteredCount: z ? z.unowned : null,
2637
2641
  active: g === "unowned",
2638
- isLoading: We,
2642
+ isLoading: He,
2639
2643
  deltaBadIsUp: !0,
2640
2644
  ...ft("unowned"),
2641
2645
  onClick: () => {
2642
- Y(g === "unowned" ? "all" : "unowned"), O(1);
2646
+ Y(g === "unowned" ? "all" : "unowned"), A(1);
2643
2647
  }
2644
2648
  }
2645
2649
  )
@@ -2657,9 +2661,9 @@ function Zc({
2657
2661
  Q((r) => ({
2658
2662
  ...r,
2659
2663
  aging_hours: r.aging_hours === t ? "" : t
2660
- })), O(1);
2664
+ })), A(1);
2661
2665
  },
2662
- className: R(
2666
+ className: E(
2663
2667
  "rounded-md border px-2 py-1 tabular-nums transition-colors",
2664
2668
  _.aging_hours === t ? "border-nvr-cyan bg-nvr-cyan/10 font-medium text-[#0e7490] dark:text-[#67e8f9]" : "border-slate-200 text-slate-500 hover:bg-muted dark:border-border dark:text-muted-foreground",
2665
2669
  n === 0 && "opacity-45"
@@ -2672,38 +2676,38 @@ function Zc({
2672
2676
  },
2673
2677
  e
2674
2678
  )) }),
2675
- ge && /* @__PURE__ */ a(
2679
+ xe && /* @__PURE__ */ a(
2676
2680
  "span",
2677
2681
  {
2678
2682
  "data-queue-burndown": !0,
2679
- className: `inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-[11.5px] font-medium ${ge.dir === "down" ? "border-emerald-200 bg-emerald-50 text-emerald-700 dark:border-emerald-500/30 dark:bg-emerald-500/10 dark:text-emerald-400" : ge.dir === "up" ? "border-amber-200 bg-amber-50 text-amber-700 dark:border-amber-500/30 dark:bg-amber-500/10 dark:text-amber-400" : "border-slate-200 bg-slate-50 text-slate-500 dark:border-border dark:bg-muted dark:text-muted-foreground"}`,
2683
+ className: `inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-[11.5px] font-medium ${xe.dir === "down" ? "border-emerald-200 bg-emerald-50 text-emerald-700 dark:border-emerald-500/30 dark:bg-emerald-500/10 dark:text-emerald-400" : xe.dir === "up" ? "border-amber-200 bg-amber-50 text-amber-700 dark:border-amber-500/30 dark:bg-amber-500/10 dark:text-amber-400" : "border-slate-200 bg-slate-50 text-slate-500 dark:border-border dark:bg-muted dark:text-muted-foreground"}`,
2680
2684
  "data-tip": "Average net change per day over the last 14 days of snapshots",
2681
- children: ge.dir === "down" ? /* @__PURE__ */ d(Ce, { children: [
2685
+ children: xe.dir === "down" ? /* @__PURE__ */ d(qe, { children: [
2682
2686
  "▼ ",
2683
- Math.abs(ge.pace).toFixed(1),
2687
+ Math.abs(xe.pace).toFixed(1),
2684
2688
  "/day — clears in ~",
2685
- ge.days,
2689
+ xe.days,
2686
2690
  " day",
2687
- ge.days === 1 ? "" : "s",
2691
+ xe.days === 1 ? "" : "s",
2688
2692
  " at this pace"
2689
- ] }) : ge.dir === "up" ? /* @__PURE__ */ d(Ce, { children: [
2693
+ ] }) : xe.dir === "up" ? /* @__PURE__ */ d(qe, { children: [
2690
2694
  "▲ Growing ",
2691
- ge.pace.toFixed(1),
2695
+ xe.pace.toFixed(1),
2692
2696
  "/day"
2693
- ] }) : /* @__PURE__ */ a(Ce, { children: "→ Holding steady" })
2697
+ ] }) : /* @__PURE__ */ a(qe, { children: "→ Holding steady" })
2694
2698
  }
2695
2699
  ),
2696
- Tr.length > 0 && /* @__PURE__ */ a("div", { className: "flex min-w-0 flex-wrap items-center gap-1.5", children: Tr.map(([e, t]) => {
2700
+ Rr.length > 0 && /* @__PURE__ */ a("div", { className: "flex min-w-0 flex-wrap items-center gap-1.5", children: Rr.map(([e, t]) => {
2697
2701
  var n;
2698
2702
  return /* @__PURE__ */ a(
2699
- Ci,
2703
+ $i,
2700
2704
  {
2701
- label: Le(e),
2705
+ label: Ae(e),
2702
2706
  count: t,
2703
2707
  filteredCount: z ? z.by_state[e] ?? 0 : null,
2704
- color: ((n = we[e]) == null ? void 0 : n.color) ?? null,
2705
- active: ja.includes(e),
2706
- onClick: () => Ba(e)
2708
+ color: ((n = Ne[e]) == null ? void 0 : n.color) ?? null,
2709
+ active: Ua.includes(e),
2710
+ onClick: () => ja(e)
2707
2711
  },
2708
2712
  e
2709
2713
  );
@@ -2711,17 +2715,17 @@ function Zc({
2711
2715
  ]
2712
2716
  }
2713
2717
  ),
2714
- q !== "workload" && /* @__PURE__ */ a(
2715
- hi,
2718
+ C !== "workload" && /* @__PURE__ */ a(
2719
+ fi,
2716
2720
  {
2717
2721
  defs: Xl,
2718
2722
  values: _,
2719
2723
  seededKeys: Ct,
2720
2724
  onApply: (e) => {
2721
- Q((t) => ({ ...t, ...e })), O(1);
2725
+ Q((t) => ({ ...t, ...e })), A(1);
2722
2726
  },
2723
2727
  onClear: () => {
2724
- Q({ ...ue.current }), O(1);
2728
+ Q({ ...me.current }), A(1);
2725
2729
  },
2726
2730
  right: Zl
2727
2731
  }
@@ -2732,19 +2736,19 @@ function Zc({
2732
2736
  className: "flex shrink-0 flex-wrap items-center gap-1.5 border-b border-slate-100 bg-white px-4 py-1.5 dark:border-slate-800 dark:bg-slate-900",
2733
2737
  "data-queue-saved-views": !0,
2734
2738
  children: [
2735
- ((c == null ? void 0 : c.total) ?? 0) > 0 && pe > 0 && /* @__PURE__ */ d(
2739
+ ((i == null ? void 0 : i.total) ?? 0) > 0 && be > 0 && /* @__PURE__ */ d(
2736
2740
  "span",
2737
2741
  {
2738
- "data-queue-default-hiding": pe,
2742
+ "data-queue-default-hiding": be,
2739
2743
  className: "inline-flex h-6 items-center gap-1 rounded-full border border-nvr-cyan/40 bg-nvr-cyan/[0.06] px-2.5 text-[12px] text-slate-700 dark:text-slate-200",
2740
2744
  children: [
2741
2745
  "Your default ",
2742
- mr(Qn),
2746
+ mr(jn),
2743
2747
  " filter is hiding",
2744
2748
  " ",
2745
- pe.toLocaleString("en-US"),
2749
+ be.toLocaleString("en-US"),
2746
2750
  " item",
2747
- pe === 1 ? "" : "s",
2751
+ be === 1 ? "" : "s",
2748
2752
  " ·",
2749
2753
  /* @__PURE__ */ a(
2750
2754
  "button",
@@ -2769,7 +2773,7 @@ function Zc({
2769
2773
  _.owners.map(
2770
2774
  (e) => {
2771
2775
  var t, n;
2772
- return ((n = (t = c == null ? void 0 : c.available_values.owners) == null ? void 0 : t.find(
2776
+ return ((n = (t = i == null ? void 0 : i.available_values.owners) == null ? void 0 : t.find(
2773
2777
  (r) => String(r.id).toUpperCase() === String(e).toUpperCase()
2774
2778
  )) == null ? void 0 : n.name) ?? "someone";
2775
2779
  }
@@ -2784,7 +2788,7 @@ function Zc({
2784
2788
  Q((e) => {
2785
2789
  const { owners: t, ...n } = e;
2786
2790
  return n;
2787
- }), O(1);
2791
+ }), A(1);
2788
2792
  },
2789
2793
  className: "flex h-4 w-4 items-center justify-center rounded-full text-[10px] hover:bg-black/10 dark:hover:bg-white/10",
2790
2794
  children: "✕"
@@ -2799,9 +2803,9 @@ function Zc({
2799
2803
  type: "button",
2800
2804
  onClick: wl,
2801
2805
  title: "Revert to the queue default (filters, columns and sort cleared)",
2802
- className: R(
2806
+ className: E(
2803
2807
  "inline-flex h-6 items-center rounded-full border px-2.5 text-[12px] transition-colors",
2804
- Xe == null ? "border-nvr-cyan/40 bg-nvr-cyan/10 text-slate-900 dark:text-white" : "border-slate-200 bg-white text-slate-600 hover:bg-slate-50 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-300"
2808
+ Ze == null ? "border-nvr-cyan/40 bg-nvr-cyan/10 text-slate-900 dark:text-white" : "border-slate-200 bg-white text-slate-600 hover:bg-slate-50 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-300"
2805
2809
  ),
2806
2810
  children: "Default"
2807
2811
  }
@@ -2811,26 +2815,26 @@ function Zc({
2811
2815
  return /* @__PURE__ */ d(
2812
2816
  "span",
2813
2817
  {
2814
- className: R(
2818
+ className: E(
2815
2819
  "group inline-flex h-6 items-center gap-1 rounded-full border px-2.5 text-[12px] transition-colors",
2816
- Xe === e.id ? "border-nvr-cyan/40 bg-nvr-cyan/10 text-slate-900 dark:text-white" : "border-slate-200 bg-white text-slate-600 hover:bg-slate-50 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-300"
2820
+ Ze === e.id ? "border-nvr-cyan/40 bg-nvr-cyan/10 text-slate-900 dark:text-white" : "border-slate-200 bg-white text-slate-600 hover:bg-slate-50 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-300"
2817
2821
  ),
2818
2822
  children: [
2819
2823
  /* @__PURE__ */ a(
2820
2824
  "button",
2821
2825
  {
2822
2826
  type: "button",
2823
- title: Je === e.id ? "Your default view — click to revert to the general default" : "Set as your default view",
2824
- onClick: () => ql.mutate(Je === e.id ? null : e.id),
2825
- className: R(
2827
+ title: ze === e.id ? "Your default view — click to revert to the general default" : "Set as your default view",
2828
+ onClick: () => ql.mutate(ze === e.id ? null : e.id),
2829
+ className: E(
2826
2830
  "shrink-0",
2827
- Je === e.id ? "text-amber-400" : "text-slate-300 hover:text-amber-400 dark:text-slate-600"
2831
+ ze === e.id ? "text-amber-400" : "text-slate-300 hover:text-amber-400 dark:text-slate-600"
2828
2832
  ),
2829
2833
  children: /* @__PURE__ */ a(
2830
2834
  So,
2831
2835
  {
2832
- className: R("h-3 w-3", Je === e.id && "fill-current"),
2833
- "aria-label": Je === e.id ? "Default view" : "Set as default"
2836
+ className: E("h-3 w-3", ze === e.id && "fill-current"),
2837
+ "aria-label": ze === e.id ? "Default view" : "Set as default"
2834
2838
  }
2835
2839
  )
2836
2840
  }
@@ -2839,21 +2843,21 @@ function Zc({
2839
2843
  e.name,
2840
2844
  e.is_default ? /* @__PURE__ */ a("span", { className: "ml-1 text-nvr-navy/60 dark:text-nvr-cyan/70", children: "· default" }) : e.is_shared && /* @__PURE__ */ a("span", { className: "ml-1 text-slate-400", children: "· shared" })
2841
2845
  ] }),
2842
- Yt && /* @__PURE__ */ a(
2846
+ Jt && /* @__PURE__ */ a(
2843
2847
  "button",
2844
2848
  {
2845
2849
  type: "button",
2846
2850
  onClick: () => $l.mutate({ viewId: e.id, on: !e.is_default }),
2847
2851
  title: e.is_default ? "Queue default — click to unset" : "Set as the default view for everyone on this queue",
2848
- className: R(
2852
+ className: E(
2849
2853
  "shrink-0",
2850
2854
  e.is_default ? "text-nvr-cyan" : "invisible text-slate-300 hover:text-nvr-cyan group-hover:visible dark:text-slate-600"
2851
2855
  ),
2852
2856
  "aria-label": e.is_default ? "Unset queue default" : "Set queue default",
2853
- children: /* @__PURE__ */ a(Co, { className: R("h-3 w-3", e.is_default && "fill-current") })
2857
+ children: /* @__PURE__ */ a(Co, { className: E("h-3 w-3", e.is_default && "fill-current") })
2854
2858
  }
2855
2859
  ),
2856
- (e.user === S || De) && Xe === e.id && /* @__PURE__ */ a(
2860
+ (e.user === N || De) && Ze === e.id && /* @__PURE__ */ a(
2857
2861
  "button",
2858
2862
  {
2859
2863
  type: "button",
@@ -2862,8 +2866,8 @@ function Zc({
2862
2866
  title: "Update this view with the current filters, scope and sort",
2863
2867
  className: "shrink-0 text-slate-400 hover:text-nvr-navy disabled:opacity-50 dark:hover:text-nvr-cyan",
2864
2868
  "aria-label": `Update view ${e.name}`,
2865
- "data-view-update-state": Ke.isPending ? "saving" : Mr === e.id ? "saved" : "idle",
2866
- children: Ke.isPending && ((t = Ke.variables) == null ? void 0 : t.id) === e.id ? /* @__PURE__ */ a($o, { className: "h-3 w-3 animate-spin" }) : Mr === e.id ? /* @__PURE__ */ a(
2869
+ "data-view-update-state": Ke.isPending ? "saving" : Qr === e.id ? "saved" : "idle",
2870
+ children: Ke.isPending && ((t = Ke.variables) == null ? void 0 : t.id) === e.id ? /* @__PURE__ */ a($o, { className: "h-3 w-3 animate-spin" }) : Qr === e.id ? /* @__PURE__ */ a(
2867
2871
  qo,
2868
2872
  {
2869
2873
  className: "h-3 w-3 text-emerald-600 dark:text-emerald-400",
@@ -2872,21 +2876,21 @@ function Zc({
2872
2876
  ) : /* @__PURE__ */ a(Fo, { className: "h-3 w-3" })
2873
2877
  }
2874
2878
  ),
2875
- Xe === e.id && /* @__PURE__ */ a(
2879
+ Ze === e.id && /* @__PURE__ */ a(
2876
2880
  "button",
2877
2881
  {
2878
2882
  type: "button",
2879
- onClick: () => Wa(e.id),
2880
- title: Pt(e.id) ? "Subscribed to new arrivals in this view — click to unsubscribe" : "Notify me when items enter this view (checked every 5 min)",
2881
- className: R(
2883
+ onClick: () => Ha(e.id),
2884
+ title: Mt(e.id) ? "Subscribed to new arrivals in this view — click to unsubscribe" : "Notify me when items enter this view (checked every 5 min)",
2885
+ className: E(
2882
2886
  "shrink-0",
2883
- Pt(e.id) ? "text-nvr-cyan" : "invisible text-slate-300 hover:text-nvr-cyan group-hover:visible dark:text-slate-600"
2887
+ Mt(e.id) ? "text-nvr-cyan" : "invisible text-slate-300 hover:text-nvr-cyan group-hover:visible dark:text-slate-600"
2884
2888
  ),
2885
2889
  "aria-label": `Subscribe to view ${e.name}`,
2886
- children: /* @__PURE__ */ a(To, { className: R("h-3 w-3", Pt(e.id) && "fill-current") })
2890
+ children: /* @__PURE__ */ a(To, { className: E("h-3 w-3", Mt(e.id) && "fill-current") })
2887
2891
  }
2888
2892
  ),
2889
- e.user === S && (Rn === e.id ? /* @__PURE__ */ d(
2893
+ e.user === N && (Ln === e.id ? /* @__PURE__ */ d(
2890
2894
  "span",
2891
2895
  {
2892
2896
  className: "flex shrink-0 items-center gap-1",
@@ -2897,8 +2901,8 @@ function Zc({
2897
2901
  "button",
2898
2902
  {
2899
2903
  type: "button",
2900
- onClick: () => Br.mutate(e.id),
2901
- disabled: Br.isPending,
2904
+ onClick: () => jr.mutate(e.id),
2905
+ disabled: jr.isPending,
2902
2906
  className: "font-semibold text-red-600 hover:underline disabled:opacity-50 dark:text-red-400",
2903
2907
  "aria-label": `Yes, delete view ${e.name}`,
2904
2908
  children: "Yes"
@@ -2908,7 +2912,7 @@ function Zc({
2908
2912
  "button",
2909
2913
  {
2910
2914
  type: "button",
2911
- onClick: () => Jt(null),
2915
+ onClick: () => zt(null),
2912
2916
  className: "text-slate-500 hover:underline dark:text-slate-400",
2913
2917
  "aria-label": `Keep view ${e.name}`,
2914
2918
  children: "No"
@@ -2920,7 +2924,7 @@ function Zc({
2920
2924
  "button",
2921
2925
  {
2922
2926
  type: "button",
2923
- onClick: () => Jt(e.id),
2927
+ onClick: () => zt(e.id),
2924
2928
  className: "invisible text-slate-400 hover:text-red-500 group-hover:visible",
2925
2929
  "aria-label": `Delete view ${e.name}`,
2926
2930
  children: "×"
@@ -2931,8 +2935,8 @@ function Zc({
2931
2935
  e.id
2932
2936
  );
2933
2937
  }),
2934
- /* @__PURE__ */ d(nt, { open: vl, onOpenChange: Fn, children: [
2935
- /* @__PURE__ */ a(rt, { asChild: !0, children: /* @__PURE__ */ a(
2938
+ /* @__PURE__ */ d(rt, { open: vl, onOpenChange: Rn, children: [
2939
+ /* @__PURE__ */ a(at, { asChild: !0, children: /* @__PURE__ */ a(
2936
2940
  "button",
2937
2941
  {
2938
2942
  type: "button",
@@ -2941,16 +2945,16 @@ function Zc({
2941
2945
  children: "☆ Save view"
2942
2946
  }
2943
2947
  ) }),
2944
- /* @__PURE__ */ d(at, { className: "w-[240px] p-3", align: "end", children: [
2948
+ /* @__PURE__ */ d(lt, { className: "w-[240px] p-3", align: "end", children: [
2945
2949
  (() => {
2946
- const e = j == null ? void 0 : j.data.find((t) => t.id === Xe);
2947
- return !e || e.user !== S && !De ? null : /* @__PURE__ */ d(
2950
+ const e = j == null ? void 0 : j.data.find((t) => t.id === Ze);
2951
+ return !e || e.user !== N && !De ? null : /* @__PURE__ */ d(
2948
2952
  "button",
2949
2953
  {
2950
2954
  type: "button",
2951
2955
  disabled: Ke.isPending,
2952
2956
  onClick: () => {
2953
- Ke.mutate(e), Fn(!1);
2957
+ Ke.mutate(e), Rn(!1);
2954
2958
  },
2955
2959
  className: "mb-2 w-full rounded-md border border-nvr-cyan/40 bg-nvr-cyan/5 px-2 py-1.5 text-[12px] font-medium text-nvr-navy hover:bg-nvr-cyan/10 disabled:opacity-50 dark:text-nvr-cyan",
2956
2960
  children: [
@@ -2964,29 +2968,29 @@ function Zc({
2964
2968
  /* @__PURE__ */ a(
2965
2969
  "input",
2966
2970
  {
2967
- value: Tn,
2971
+ value: En,
2968
2972
  onChange: (e) => Ar(e.target.value),
2969
2973
  placeholder: "View name",
2970
2974
  className: "mb-2 w-full rounded-md border border-slate-200 px-2 py-1.5 text-[12px] focus:border-nvr-cyan focus:outline-none dark:border-border dark:bg-card"
2971
2975
  }
2972
2976
  ),
2973
- Yt && /* @__PURE__ */ d("label", { className: "mb-2 flex items-center gap-2 text-[12px] text-slate-600 dark:text-slate-300", children: [
2977
+ Jt && /* @__PURE__ */ d("label", { className: "mb-2 flex items-center gap-2 text-[12px] text-slate-600 dark:text-slate-300", children: [
2974
2978
  /* @__PURE__ */ a(
2975
- Vn,
2979
+ Wn,
2976
2980
  {
2977
- checked: Lr || vt,
2981
+ checked: Or || vt,
2978
2982
  disabled: vt,
2979
- onCheckedChange: (e) => Or(e === !0)
2983
+ onCheckedChange: (e) => Dr(e === !0)
2980
2984
  }
2981
2985
  ),
2982
2986
  "Share with everyone"
2983
2987
  ] }),
2984
- Yt && /* @__PURE__ */ d("label", { className: "mb-2 flex items-center gap-2 text-[12px] text-slate-600 dark:text-slate-300", children: [
2988
+ Jt && /* @__PURE__ */ d("label", { className: "mb-2 flex items-center gap-2 text-[12px] text-slate-600 dark:text-slate-300", children: [
2985
2989
  /* @__PURE__ */ a(
2986
- Vn,
2990
+ Wn,
2987
2991
  {
2988
2992
  checked: vt,
2989
- onCheckedChange: (e) => Dr(e === !0)
2993
+ onCheckedChange: (e) => Kr(e === !0)
2990
2994
  }
2991
2995
  ),
2992
2996
  "Set as queue default (everyone starts here)"
@@ -2995,8 +2999,8 @@ function Zc({
2995
2999
  "button",
2996
3000
  {
2997
3001
  type: "button",
2998
- disabled: !Tn.trim() || Pr.isPending,
2999
- onClick: () => Pr.mutate(),
3002
+ disabled: !En.trim() || Mr.isPending,
3003
+ onClick: () => Mr.mutate(),
3000
3004
  className: "w-full rounded-md bg-nvr-cyan px-2 py-1.5 text-[12px] font-semibold text-white hover:bg-nvr-cyan/90 disabled:opacity-50",
3001
3005
  children: "Save current view"
3002
3006
  }
@@ -3007,73 +3011,73 @@ function Zc({
3007
3011
  }
3008
3012
  )
3009
3013
  ] }),
3010
- /* @__PURE__ */ d("div", { ref: Wt, className: "flex min-h-0 flex-1 flex-col overflow-y-auto px-4 pb-4 pt-3", children: [
3011
- cr && /* @__PURE__ */ a(Vs, { error: Xa, onRetry: () => void Za(), className: "mb-3" }),
3012
- Bn && /* @__PURE__ */ a(
3014
+ /* @__PURE__ */ d("div", { ref: Ht, className: "flex min-h-0 flex-1 flex-col overflow-y-auto px-4 pb-4 pt-3", children: [
3015
+ cr && /* @__PURE__ */ a(Is, { error: Za, onRetry: () => void el(), className: "mb-3" }),
3016
+ Un && /* @__PURE__ */ a(
3013
3017
  "p",
3014
3018
  {
3015
3019
  "data-filter-sentence": !0,
3016
- "data-tip": Bn,
3020
+ "data-tip": Un,
3017
3021
  "aria-live": "polite",
3018
3022
  className: "mb-1.5 shrink-0 truncate px-0.5 text-[11.5px] text-slate-500 dark:text-slate-400",
3019
- children: Bn
3023
+ children: Un
3020
3024
  }
3021
3025
  ),
3022
- q === "table" ? /* @__PURE__ */ a(Ce, { children: /* @__PURE__ */ a("div", { className: "flex min-h-0 flex-1", children: /* @__PURE__ */ d(
3026
+ C === "table" ? /* @__PURE__ */ a(qe, { children: /* @__PURE__ */ a("div", { className: "flex min-h-0 flex-1", children: /* @__PURE__ */ d(
3023
3027
  "div",
3024
3028
  {
3025
- ref: $e.rootRef,
3026
- className: R(
3029
+ ref: Fe.rootRef,
3030
+ className: E(
3027
3031
  "relative min-w-0 flex-1 transition-opacity duration-200",
3028
3032
  br && "pointer-events-none opacity-60"
3029
3033
  ),
3030
3034
  "aria-busy": br || void 0,
3031
3035
  children: [
3032
3036
  hr != null && /* @__PURE__ */ d("span", { className: "nvr-slide-up-centered absolute left-1/2 top-6 z-[6] -translate-x-1/2 rounded-full border border-slate-200 bg-white px-3 py-1.5 text-[12px] font-medium text-slate-600 shadow-lg dark:border-border dark:bg-card dark:text-slate-300", children: [
3033
- rl.text ?? "Still working",
3037
+ al.text ?? "Still working",
3034
3038
  " — ",
3035
3039
  hr,
3036
3040
  "s"
3037
3041
  ] }),
3038
3042
  /* @__PURE__ */ a(
3039
- Os,
3043
+ As,
3040
3044
  {
3041
3045
  fillHeight: !0,
3042
- enterKey: kr.current,
3046
+ enterKey: vr.current,
3043
3047
  density: Rt,
3044
3048
  minBodyHeight: 360,
3045
- columns: zt,
3046
- rows: F,
3049
+ columns: Xt,
3050
+ rows: q,
3047
3051
  rowKey: (e) => `${e.collection}:${e.item_id}`,
3048
- total: (c == null ? void 0 : c.total) ?? 0,
3052
+ total: (i == null ? void 0 : i.total) ?? 0,
3049
3053
  page: de,
3050
- limit: cn,
3051
- isLoading: We,
3052
- onPageChange: O,
3053
- onRowClick: (e) => Gt(e),
3054
+ limit: mn,
3055
+ isLoading: He,
3056
+ onPageChange: A,
3057
+ onRowClick: (e) => Wt(e),
3054
3058
  rowDragProps: (e) => ({
3055
- ...cl({ collection: e.collection, id: e.item_id }),
3056
- ...al.record(e.collection, e.item_id)
3059
+ ...dl({ collection: e.collection, id: e.item_id }),
3060
+ ...ll.record(e.collection, e.item_id)
3057
3061
  }),
3058
3062
  onRowContextMenu: (e, t) => {
3059
3063
  t.preventDefault(), kt({ x: t.clientX, y: t.clientY, row: e });
3060
3064
  },
3061
3065
  rowTitle: (e) => {
3062
- const t = ht.get(K(e));
3063
- return $e.titleFor(K(e)) ?? (t && !t.is_mine ? ss(t) : void 0) ?? (Kr(e.collection, e.item_id) ? Xs : void 0);
3066
+ const t = ht.get(D(e));
3067
+ return Fe.titleFor(D(e)) ?? (t && !t.is_mine ? ss(t) : void 0) ?? (Pr(e.collection, e.item_id) ? zs : void 0);
3064
3068
  },
3065
- rowClassName: (e) => R(
3069
+ rowClassName: (e) => E(
3066
3070
  Cl(e),
3067
- Kr(e.collection, e.item_id) && zs
3071
+ Pr(e.collection, e.item_id) && Js
3068
3072
  ),
3069
3073
  emptyMessage: cr ? /* @__PURE__ */ a("span", { className: "sr-only", children: "The list did not load." }) : /* @__PURE__ */ a(
3070
- Ds,
3074
+ Os,
3071
3075
  {
3072
3076
  icon: Ro,
3073
- title: ((pa = c == null ? void 0 : c.empty) == null ? void 0 : pa.reason) === "not_permitted" ? "You cannot read this queue’s records" : ((ba = c == null ? void 0 : c.empty) == null ? void 0 : ba.reason) === "scope_mine" ? "Nothing waiting on you" : ((ha = c == null ? void 0 : c.empty) == null ? void 0 : ha.reason) === "filters" ? "No records match these filters" : "Nothing in this queue",
3074
- detail: ((fa = c == null ? void 0 : c.empty) == null ? void 0 : fa.reason) === "filters" && pe > 0 ? `Your default ${mr(Qn)} filter is hiding ${pe.toLocaleString("en-US")} item${pe === 1 ? "" : "s"} here.` : ((ga = c == null ? void 0 : c.empty) == null ? void 0 : ga.reason) === "filters" ? g !== "all" ? "Your filters and the current tab leave nothing to show. Widen a filter or look across all items." : "Widen or clear a filter to see more of the queue." : ((xa = c == null ? void 0 : c.empty) == null ? void 0 : xa.message) ?? "Records land here when they match the queue sources — a state change or new record can appear at any moment.",
3075
- action: ((ya = c == null ? void 0 : c.empty) == null ? void 0 : ya.reason) === "filters" ? /* @__PURE__ */ d("div", { className: "flex items-center justify-center gap-2", children: [
3076
- pe > 0 && /* @__PURE__ */ d(
3077
+ title: ((ba = i == null ? void 0 : i.empty) == null ? void 0 : ba.reason) === "not_permitted" ? "You cannot read this queue’s records" : ((ha = i == null ? void 0 : i.empty) == null ? void 0 : ha.reason) === "scope_mine" ? "Nothing waiting on you" : ((fa = i == null ? void 0 : i.empty) == null ? void 0 : fa.reason) === "filters" ? "No records match these filters" : "Nothing in this queue",
3078
+ detail: ((ga = i == null ? void 0 : i.empty) == null ? void 0 : ga.reason) === "filters" && be > 0 ? `Your default ${mr(jn)} filter is hiding ${be.toLocaleString("en-US")} item${be === 1 ? "" : "s"} here.` : ((xa = i == null ? void 0 : i.empty) == null ? void 0 : xa.reason) === "filters" ? g !== "all" ? "Your filters and the current tab leave nothing to show. Widen a filter or look across all items." : "Widen or clear a filter to see more of the queue." : ((ya = i == null ? void 0 : i.empty) == null ? void 0 : ya.message) ?? "Records land here when they match the queue sources — a state change or new record can appear at any moment.",
3079
+ action: ((ka = i == null ? void 0 : i.empty) == null ? void 0 : ka.reason) === "filters" ? /* @__PURE__ */ d("div", { className: "flex items-center justify-center gap-2", children: [
3080
+ be > 0 && /* @__PURE__ */ d(
3077
3081
  "button",
3078
3082
  {
3079
3083
  type: "button",
@@ -3082,7 +3086,7 @@ function Zc({
3082
3086
  "data-queue-empty-defaults": !0,
3083
3087
  children: [
3084
3088
  "Show all ",
3085
- pe.toLocaleString("en-US")
3089
+ be.toLocaleString("en-US")
3086
3090
  ]
3087
3091
  }
3088
3092
  ),
@@ -3093,9 +3097,9 @@ function Zc({
3093
3097
  onClick: () => {
3094
3098
  var t;
3095
3099
  const e = {};
3096
- for (const [n, r] of Object.entries(ue.current))
3097
- (t = Fe[n.slice(6)]) != null && t.length && (e[n] = r);
3098
- Q(e), O(1);
3100
+ for (const [n, r] of Object.entries(me.current))
3101
+ (t = Te[n.slice(6)]) != null && t.length && (e[n] = r);
3102
+ Q(e), A(1);
3099
3103
  },
3100
3104
  className: "h-7 rounded-md border border-slate-200 bg-white px-2.5 text-[12px] font-medium text-slate-700 hover:bg-slate-50 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-200 dark:hover:bg-slate-800",
3101
3105
  "data-queue-empty-clear": !0,
@@ -3107,7 +3111,7 @@ function Zc({
3107
3111
  {
3108
3112
  type: "button",
3109
3113
  onClick: () => {
3110
- Y("all"), O(1);
3114
+ Y("all"), A(1);
3111
3115
  },
3112
3116
  className: "h-7 rounded-md border border-slate-200 bg-white px-2.5 text-[12px] font-medium text-slate-700 hover:bg-slate-50 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-200 dark:hover:bg-slate-800",
3113
3117
  "data-queue-empty-all": !0,
@@ -3119,31 +3123,31 @@ function Zc({
3119
3123
  ),
3120
3124
  sort: I,
3121
3125
  onSortChange: (e) => {
3122
- Ue(e), O(1);
3126
+ Ie(e), A(1);
3123
3127
  },
3124
- filterDefs: Mn,
3128
+ filterDefs: Bn,
3125
3129
  filterValues: _,
3126
3130
  onFilterChange: (e, t) => {
3127
- Q((n) => ({ ...n, [e]: t })), O(1);
3131
+ Q((n) => ({ ...n, [e]: t })), A(1);
3128
3132
  },
3129
3133
  rowGroups: Rl ?? void 0,
3130
- collapsedGroups: ye,
3134
+ collapsedGroups: ke,
3131
3135
  onToggleGroup: xl,
3132
- selectedIds: Kt && ee ? Pe : void 0,
3133
- onSelectionChange: Kt && ee ? et : void 0,
3136
+ selectedIds: Pt && ee ? Pe : void 0,
3137
+ onSelectionChange: Pt && ee ? tt : void 0,
3134
3138
  hideFilterRow: !0,
3135
3139
  nowrapCells: !0,
3136
- columnPins: ta,
3140
+ columnPins: na,
3137
3141
  onColumnPinChange: (e, t) => {
3138
- rn((n) => {
3139
- const r = { ...n ?? ta };
3142
+ an((n) => {
3143
+ const r = { ...n ?? na };
3140
3144
  return t ? r[e] = t : delete r[e], r;
3141
3145
  });
3142
3146
  },
3143
3147
  columnFilterRow: !0,
3144
3148
  hScrollProxy: !0,
3145
3149
  footer: /* @__PURE__ */ a(
3146
- ti,
3150
+ ei,
3147
3151
  {
3148
3152
  collections: gt,
3149
3153
  selectedIds: String(_.at_risk_rule ?? "").split(",").map((e) => Number(e)).filter((e) => Number.isFinite(e) && e > 0),
@@ -3152,7 +3156,7 @@ function Zc({
3152
3156
  Q((n) => ({
3153
3157
  ...n,
3154
3158
  at_risk_rule: n.at_risk_rule === t ? "" : t
3155
- })), O(1);
3159
+ })), A(1);
3156
3160
  },
3157
3161
  className: "shrink-0 border-t border-slate-100 bg-white px-3 py-1.5 dark:border-slate-800 dark:bg-slate-900"
3158
3162
  }
@@ -3161,38 +3165,38 @@ function Zc({
3161
3165
  )
3162
3166
  ]
3163
3167
  }
3164
- ) }) }) : q === "kanban" ? /* @__PURE__ */ a(
3165
- bi,
3168
+ ) }) }) : C === "kanban" ? /* @__PURE__ */ a(
3169
+ hi,
3166
3170
  {
3167
- items: F,
3168
- onCardClick: (e) => Gt(e),
3169
- onDrop: (e, t) => ll.mutate({ item: e, targetState: t }),
3170
- onClaim: (e) => Ae.mutate(e),
3171
- onRelease: (e) => He.mutate(e),
3171
+ items: q,
3172
+ onCardClick: (e) => Wt(e),
3173
+ onDrop: (e, t) => ol.mutate({ item: e, targetState: t }),
3174
+ onClaim: (e) => Le.mutate(e),
3175
+ onRelease: (e) => Ye.mutate(e),
3172
3176
  swimlaneBy: st,
3173
- stateLabels: Sn,
3177
+ stateLabels: $n,
3174
3178
  laneLabel: st === "collection" ? xt : void 0,
3175
- claimsEnabled: me,
3179
+ claimsEnabled: pe,
3176
3180
  onDraggingChange: (e) => {
3177
- zn.current = e;
3181
+ cn.current = e;
3178
3182
  }
3179
3183
  }
3180
- ) : /* @__PURE__ */ a(fi, { queueId: l })
3184
+ ) : /* @__PURE__ */ a(gi, { queueId: l })
3181
3185
  ] }),
3182
- Kt && ee && /* @__PURE__ */ d(
3183
- mi,
3186
+ Pt && ee && /* @__PURE__ */ d(
3187
+ pi,
3184
3188
  {
3185
3189
  count: Pe.length,
3186
- claimsEnabled: me,
3187
- showClaim: un("claim"),
3188
- showRelease: un("release"),
3189
- showTransition: un("transition"),
3190
- states: Rr((c == null ? void 0 : c.available_values.state) ?? []).map((e) => ({
3190
+ claimsEnabled: pe,
3191
+ showClaim: bn("claim"),
3192
+ showRelease: bn("release"),
3193
+ showTransition: bn("transition"),
3194
+ states: Er((i == null ? void 0 : i.available_values.state) ?? []).map((e) => ({
3191
3195
  value: e,
3192
- label: Le(e)
3196
+ label: Ae(e)
3193
3197
  })),
3194
- busy: Ur,
3195
- onClaim: () => En(
3198
+ busy: Ir,
3199
+ onClaim: () => An(
3196
3200
  "Claim",
3197
3201
  (e) => h.request(
3198
3202
  se(`/queues/${l}/claim`, {
@@ -3201,7 +3205,7 @@ function Zc({
3201
3205
  })
3202
3206
  )
3203
3207
  ),
3204
- onRelease: () => En(
3208
+ onRelease: () => An(
3205
3209
  "Release",
3206
3210
  (e) => h.request(
3207
3211
  se(`/queues/${l}/release`, {
@@ -3210,8 +3214,8 @@ function Zc({
3210
3214
  })
3211
3215
  )
3212
3216
  ),
3213
- onTransition: (e) => En("Transition", (t) => fr(t, e)),
3214
- onClear: () => et([]),
3217
+ onTransition: (e) => An("Transition", (t) => fr(t, e)),
3218
+ onClear: () => tt([]),
3215
3219
  children: [
3216
3220
  Pe.length >= 2 && /* @__PURE__ */ a(
3217
3221
  "button",
@@ -3219,9 +3223,9 @@ function Zc({
3219
3223
  type: "button",
3220
3224
  onClick: () => {
3221
3225
  const e = cs(
3222
- F.filter((t) => Pe.includes(K(t)) && t.collection !== "tasks").map((t) => H.urlFor(qn(t)))
3226
+ q.filter((t) => Pe.includes(D(t)) && t.collection !== "tasks").map((t) => H.urlFor(Tn(t)))
3223
3227
  );
3224
- e.blocked > 0 || e.capped > 0 ? D.warning($a(e)) : D.success($a(e));
3228
+ e.blocked > 0 || e.capped > 0 ? O.warning(qa(e)) : O.success(qa(e));
3225
3229
  },
3226
3230
  "data-bulk-open-tabs": !0,
3227
3231
  title: `Open the selected records in new tabs (up to ${is})`,
@@ -3230,14 +3234,14 @@ function Zc({
3230
3234
  }
3231
3235
  ),
3232
3236
  /* @__PURE__ */ a(
3233
- Rs,
3237
+ Ts,
3234
3238
  {
3235
- targets: F.filter((e) => Pe.includes(K(e)) && e.collection !== "tasks").map((e) => ({ collection: e.collection, id: e.item_id, label: e.label })),
3239
+ targets: q.filter((e) => Pe.includes(D(e)) && e.collection !== "tasks").map((e) => ({ collection: e.collection, id: e.item_id, label: e.label })),
3236
3240
  enabledKeys: (u == null ? void 0 : u.bulk_action_keys) ?? null,
3237
3241
  tone: "light",
3238
- disabled: Ur,
3242
+ disabled: Ir,
3239
3243
  onDone: (e) => {
3240
- e.failed === 0 && et([]), f.invalidateQueries({ queryKey: ["queue-items", l] });
3244
+ e.failed === 0 && tt([]), f.invalidateQueries({ queryKey: ["queue-items", l] });
3241
3245
  }
3242
3246
  }
3243
3247
  )
@@ -3245,7 +3249,7 @@ function Zc({
3245
3249
  }
3246
3250
  ),
3247
3251
  ae != null && ae.length ? /* @__PURE__ */ a(
3248
- ei,
3252
+ Zs,
3249
3253
  {
3250
3254
  collection: ae[0].collection,
3251
3255
  itemId: ae[0].itemId,
@@ -3259,7 +3263,7 @@ function Zc({
3259
3263
  onClose: () => Nt.back(ae.length)
3260
3264
  }
3261
3265
  ) : null,
3262
- B && Na(
3266
+ B && Sa(
3263
3267
  /* @__PURE__ */ d(
3264
3268
  "div",
3265
3269
  {
@@ -3274,23 +3278,23 @@ function Zc({
3274
3278
  "data-queue-row-menu": !0,
3275
3279
  children: [
3276
3280
  [
3277
- { label: "Open", run: () => Gt(B.row) },
3281
+ { label: "Open", run: () => Wt(B.row) },
3278
3282
  {
3279
3283
  label: "Open full record",
3280
3284
  run: () => yt(B.row)
3281
3285
  },
3282
3286
  { label: "Peek", run: () => Oe(B.row) },
3283
- ...me ? [
3284
- ((ka = B.row.claimed_by) == null ? void 0 : ka.id) === S ? { label: "Release claim", run: () => He.mutate(B.row) } : { label: "Claim", run: () => Ae.mutate(B.row) }
3287
+ ...pe ? [
3288
+ ((va = B.row.claimed_by) == null ? void 0 : va.id) === N ? { label: "Release claim", run: () => Ye.mutate(B.row) } : { label: "Claim", run: () => Le.mutate(B.row) }
3285
3289
  ] : [],
3286
3290
  // The friendly id (PW26-76166), never the row id (army 6 M52);
3287
3291
  // a record with no number has nothing to copy.
3288
- ...qa(B.row) ? [
3292
+ ...Fa(B.row) ? [
3289
3293
  {
3290
3294
  label: "Copy ID",
3291
3295
  run: () => {
3292
3296
  var e;
3293
- return void ((e = navigator.clipboard) == null ? void 0 : e.writeText(qa(B.row) ?? ""));
3297
+ return void ((e = navigator.clipboard) == null ? void 0 : e.writeText(Fa(B.row) ?? ""));
3294
3298
  }
3295
3299
  }
3296
3300
  ] : [],
@@ -3299,14 +3303,14 @@ function Zc({
3299
3303
  run: () => {
3300
3304
  var e;
3301
3305
  return void ((e = navigator.clipboard) == null ? void 0 : e.writeText(
3302
- `${window.location.origin}${H.urlFor(qn(B.row))}`
3306
+ `${window.location.origin}${H.urlFor(Tn(B.row))}`
3303
3307
  ));
3304
3308
  }
3305
3309
  },
3306
3310
  // Custom actions (#125): the record's registered actions, right here.
3307
- ...Ya(B.row.collection).map((e) => ({
3311
+ ...Ja(B.row.collection).map((e) => ({
3308
3312
  label: e.label,
3309
- run: () => Ja(e, B.row)
3313
+ run: () => za(e, B.row)
3310
3314
  }))
3311
3315
  ].map((e) => /* @__PURE__ */ a(
3312
3316
  "button",
@@ -3322,7 +3326,7 @@ function Zc({
3322
3326
  )),
3323
3327
  B.row.collection !== "tasks" && /* @__PURE__ */ d("div", { className: "mt-1 border-t border-slate-100 pt-1 dark:border-border/60", children: [
3324
3328
  /* @__PURE__ */ a("p", { className: "px-3 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-slate-400", children: "Triage labels" }),
3325
- hn.slice(0, 8).map((e) => {
3329
+ xn.slice(0, 8).map((e) => {
3326
3330
  const t = (B.row.labels ?? []).includes(e);
3327
3331
  return /* @__PURE__ */ d(
3328
3332
  "button",
@@ -3374,77 +3378,78 @@ function Zc({
3374
3378
  ),
3375
3379
  document.body
3376
3380
  ),
3377
- or && Na(
3381
+ or && Sa(
3378
3382
  /* @__PURE__ */ a(
3379
- qi,
3383
+ Fi,
3380
3384
  {
3381
3385
  queueId: l,
3382
3386
  drill: or,
3383
- onClose: () => pn(null),
3387
+ onClose: () => fn(null),
3384
3388
  onOpenRecord: (e, t) => {
3385
- pn(null), H.open({ collection: e, itemId: t, layoutSlug: null });
3389
+ fn(null), H.open({ collection: e, itemId: t, layoutSlug: null });
3386
3390
  }
3387
3391
  }
3388
3392
  ),
3389
3393
  document.body
3390
3394
  ),
3391
3395
  /* @__PURE__ */ a(
3392
- pi,
3396
+ bi,
3393
3397
  {
3394
- item: _e,
3395
- stateLabels: Sn,
3398
+ item: Se,
3399
+ stateLabels: $n,
3396
3400
  collectionLabel: xt,
3397
- claimsEnabled: me,
3398
- columnFormats: Ll,
3401
+ claimsEnabled: pe,
3402
+ columnFormats: Al,
3403
+ fieldLabel: (e) => T(`extra.${e}`, je(e)),
3399
3404
  width: u == null ? void 0 : u.sheet_width,
3400
3405
  itemLayout: u == null ? void 0 : u.item_layout,
3401
3406
  onOpenChange: (e) => {
3402
- e || (Oe(null), $n(!1));
3407
+ e || (Oe(null), Fn(!1));
3403
3408
  },
3404
- onClaim: (e) => Ae.mutate(e),
3405
- onRelease: (e) => He.mutate(e),
3409
+ onClaim: (e) => Le.mutate(e),
3410
+ onRelease: (e) => Ye.mutate(e),
3406
3411
  workNextActive: yl,
3407
- onNext: () => _e && Er(_e),
3412
+ onNext: () => Se && Lr(Se),
3408
3413
  refetchItems: () => f.invalidateQueries({ queryKey: ["queue-items", l] })
3409
3414
  }
3410
3415
  ),
3411
- Mt.dialog
3416
+ Qt.dialog
3412
3417
  ] });
3413
3418
  }
3414
- function qi({
3419
+ function Fi({
3415
3420
  queueId: l,
3416
- drill: y,
3417
- onClose: L,
3418
- onOpenRecord: P
3421
+ drill: k,
3422
+ onClose: K,
3423
+ onOpenRecord: M
3419
3424
  }) {
3420
- const G = Ea(), { data: f, isLoading: h } = W({
3421
- queryKey: ["queue-agg-rows", l, y.row.collection, y.row.item_id, y.path],
3425
+ const G = La(), { data: f, isLoading: h } = W({
3426
+ queryKey: ["queue-agg-rows", l, k.row.collection, k.row.item_id, k.path],
3422
3427
  queryFn: () => G.request(
3423
- A(`/queues/${l}/aggregate-rows`, {
3424
- collection: y.row.collection,
3425
- item_id: y.row.item_id,
3426
- path: y.path
3428
+ L(`/queues/${l}/aggregate-rows`, {
3429
+ collection: k.row.collection,
3430
+ item_id: k.row.item_id,
3431
+ path: k.path
3427
3432
  })
3428
- ).then((S) => S.data)
3433
+ ).then((N) => N.data)
3429
3434
  });
3430
3435
  return /* @__PURE__ */ a(
3431
3436
  "div",
3432
3437
  {
3433
3438
  className: "fixed inset-0 z-[130] flex items-center justify-center bg-black/30 p-6",
3434
- onClick: L,
3439
+ onClick: K,
3435
3440
  children: /* @__PURE__ */ d(
3436
3441
  "div",
3437
3442
  {
3438
3443
  className: "max-h-[70vh] w-[480px] overflow-y-auto rounded-xl border border-slate-200 bg-white p-4 shadow-2xl dark:border-border dark:bg-card",
3439
- onClick: (S) => S.stopPropagation(),
3444
+ onClick: (N) => N.stopPropagation(),
3440
3445
  children: [
3441
3446
  /* @__PURE__ */ d("div", { className: "mb-2 flex items-start justify-between gap-3", children: [
3442
3447
  /* @__PURE__ */ d("div", { children: [
3443
- /* @__PURE__ */ a("p", { className: "text-[13px] font-semibold", children: y.row.label }),
3448
+ /* @__PURE__ */ a("p", { className: "text-[13px] font-semibold", children: k.row.label }),
3444
3449
  /* @__PURE__ */ d("p", { className: "text-[11.5px] text-muted-foreground", children: [
3445
- lt(y.path),
3450
+ je(k.path),
3446
3451
  " = ",
3447
- /* @__PURE__ */ a("span", { className: "tabular-nums", children: y.value }),
3452
+ /* @__PURE__ */ a("span", { className: "tabular-nums", children: k.value }),
3448
3453
  " ",
3449
3454
  "— the rows behind this number"
3450
3455
  ] })
@@ -3453,24 +3458,24 @@ function qi({
3453
3458
  "button",
3454
3459
  {
3455
3460
  type: "button",
3456
- onClick: L,
3461
+ onClick: K,
3457
3462
  className: "rounded-md px-2 py-1 text-[12px] text-slate-400 hover:bg-muted",
3458
3463
  children: "✕"
3459
3464
  }
3460
3465
  )
3461
3466
  ] }),
3462
- h ? /* @__PURE__ */ a("p", { className: "py-6 text-center text-[12.5px] text-slate-400", children: "Loading…" }) : ((f == null ? void 0 : f.rows) ?? []).length === 0 ? /* @__PURE__ */ a("p", { className: "py-6 text-center text-[12.5px] text-slate-400", children: "No contributing rows resolved." }) : /* @__PURE__ */ a("ul", { className: "divide-y divide-slate-100 dark:divide-border/60", children: f == null ? void 0 : f.rows.map((S) => /* @__PURE__ */ d("li", { className: "flex items-center justify-between gap-3 py-1.5", children: [
3467
+ h ? /* @__PURE__ */ a("p", { className: "py-6 text-center text-[12.5px] text-slate-400", children: "Loading…" }) : ((f == null ? void 0 : f.rows) ?? []).length === 0 ? /* @__PURE__ */ a("p", { className: "py-6 text-center text-[12.5px] text-slate-400", children: "No contributing rows resolved." }) : /* @__PURE__ */ a("ul", { className: "divide-y divide-slate-100 dark:divide-border/60", children: f == null ? void 0 : f.rows.map((N) => /* @__PURE__ */ d("li", { className: "flex items-center justify-between gap-3 py-1.5", children: [
3463
3468
  /* @__PURE__ */ a(
3464
3469
  "button",
3465
3470
  {
3466
3471
  type: "button",
3467
- onClick: () => f.target && P(f.target, String(S.id)),
3472
+ onClick: () => f.target && M(f.target, String(N.id)),
3468
3473
  className: "min-w-0 truncate text-left text-[12.5px] underline decoration-dotted underline-offset-2 hover:text-nvr-navy dark:hover:text-nvr-cyan",
3469
- children: S.label
3474
+ children: N.label
3470
3475
  }
3471
3476
  ),
3472
- /* @__PURE__ */ a("span", { className: "shrink-0 tabular-nums text-[12px] text-slate-600 dark:text-slate-300", children: S.leaf_value == null ? "—" : String(S.leaf_value) })
3473
- ] }, String(S.id))) })
3477
+ /* @__PURE__ */ a("span", { className: "shrink-0 tabular-nums text-[12px] text-slate-600 dark:text-slate-300", children: N.leaf_value == null ? "—" : String(N.leaf_value) })
3478
+ ] }, String(N.id))) })
3474
3479
  ]
3475
3480
  }
3476
3481
  )
@@ -3478,5 +3483,5 @@ function qi({
3478
3483
  );
3479
3484
  }
3480
3485
  export {
3481
- Zc as QueueWorklist
3486
+ td as QueueWorklist
3482
3487
  };