@nivaro/react 0.3.66 → 0.3.67

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +1 -1
  3. package/dist/index.d.ts +8 -1
  4. package/dist/shared/components/ActivityEntry.js +28 -28
  5. package/dist/shared/components/CollectionBrowserView.js +584 -585
  6. package/dist/shared/components/ItemEditForm.js +1758 -1758
  7. package/dist/shared/components/RecordCompare.js +149 -129
  8. package/dist/shared/components/bulk/BulkCompareButton.js +16 -16
  9. package/dist/shared/components/integrations/IntegrationObligationsView.js +199 -187
  10. package/dist/shared/components/integrations/console/EventsView.js +22 -24
  11. package/dist/shared/components/integrations/console/SubmissionRow.js +6 -13
  12. package/dist/shared/components/integrations/console/drill/SubmissionDrill.js +29 -28
  13. package/dist/shared/components/integrations/console/tone.js +22 -21
  14. package/dist/shared/components/item-edit/FieldRow.js +193 -193
  15. package/dist/shared/components/item-edit/GroupSection.js +209 -209
  16. package/dist/shared/components/item-edit/RecordInsights.js +46 -45
  17. package/dist/shared/components/panels/BranchLanes.js +7 -7
  18. package/dist/shared/components/panels/CommentPanel.js +72 -72
  19. package/dist/shared/components/panels/PipelinePanel.js +261 -261
  20. package/dist/shared/components/panels/RecordIntegrityBanner.js +78 -78
  21. package/dist/shared/components/panels/RevisionsPanel.js +220 -220
  22. package/dist/shared/components/panels/TaskPanel.js +75 -75
  23. package/dist/shared/components/queue/QueueWorklist.js +499 -498
  24. package/dist/shared/lib/compare-value.js +73 -0
  25. package/dist/shared/lib/format-value.js +19 -18
  26. package/dist/shared/lib/utils.js +59 -57
  27. package/package.json +1 -1
@@ -1,36 +1,36 @@
1
- var pn = Object.defineProperty;
2
- var fn = (t, e, r) => e in t ? pn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
- var We = (t, e, r) => fn(t, typeof e != "symbol" ? e + "" : e, r);
1
+ var fn = Object.defineProperty;
2
+ var hn = (t, e, r) => e in t ? fn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
+ var We = (t, e, r) => hn(t, typeof e != "symbol" ? e + "" : e, r);
4
4
  import { jsx as n, jsxs as i, Fragment as be } from "react/jsx-runtime";
5
5
  import { useQueryClient as Re, useQuery as le, useMutation as qe } from "@tanstack/react-query";
6
- import { ArrowRight as rt, Loader2 as pe, Check as je, GitBranch as ze, AlertTriangle as hn, ChevronDown as _e, Send as Tt, Users as qt, Minus as bn, UserPlus as gn, X as Rt, Zap as Mt, Search as xn } from "lucide-react";
7
- import { useState as j, useRef as ae, useEffect as he, useMemo as Le, Suspense as Pt, useCallback as Dt, lazy as yn } from "react";
6
+ import { ArrowRight as rt, Loader2 as pe, Check as je, GitBranch as ze, AlertTriangle as bn, ChevronDown as _e, Send as qt, Users as Rt, Minus as gn, UserPlus as xn, X as Mt, Zap as Pt, Search as yn } from "lucide-react";
7
+ import { useState as j, useRef as ae, useEffect as he, useMemo as Be, Suspense as Dt, useCallback as Ft, lazy as wn } from "react";
8
8
  import { toast as X } from "sonner";
9
- import { useNivaroClient as xe, useItemEditAuth as wn } from "../../context.js";
10
- import { get as ce, post as Se, del as vn } from "../../lib/commands.js";
11
- import { errorToastOptions as Ft, toastError as kn } from "../../lib/error-toast.js";
12
- import { useRecordSignalWhile as At, useRecordSignalPeers as Nn, signalSentence as _n } from "../../lib/presence-signals.js";
13
- import { RUN_TRANSITION_EVENT as Be } from "../../lib/run-transition.js";
9
+ import { useNivaroClient as xe, useItemEditAuth as vn } from "../../context.js";
10
+ import { get as ce, post as Se, del as kn } from "../../lib/commands.js";
11
+ import { errorToastOptions as At, toastError as Nn } from "../../lib/error-toast.js";
12
+ import { useRecordSignalWhile as Ot, useRecordSignalPeers as _n, signalSentence as Sn } from "../../lib/presence-signals.js";
13
+ import { RUN_TRANSITION_EVENT as Le } from "../../lib/run-transition.js";
14
14
  import { userErrorMessage as Me } from "../../lib/safe-error.js";
15
- import { serverNow as Sn } from "../../lib/server-clock.js";
16
- import { userCardQuery as Cn } from "../../lib/user-cards.js";
17
- import { cn as ge, titleCase as $n, formatRelative as at, humanHours as Tn } from "../../lib/utils.js";
18
- import { PushReadinessChip as qn } from "../integrations/RecordIntegrationPreview.js";
19
- import { useHeaderFold as Rn } from "../item-edit/HeaderTools.js";
15
+ import { serverNow as Cn } from "../../lib/server-clock.js";
16
+ import { userCardQuery as $n } from "../../lib/user-cards.js";
17
+ import { cn as ge, titleCase as Tn, formatRelative as at, formatDateTime as yt, humanHours as qn } from "../../lib/utils.js";
18
+ import { PushReadinessChip as Rn } from "../integrations/RecordIntegrationPreview.js";
19
+ import { useHeaderFold as Mn } from "../item-edit/HeaderTools.js";
20
20
  import { invalidateRecordInsights as Ee, invalidateRecordData as Pe } from "../item-edit/RecordInsights.js";
21
- import { UserChip as Ot } from "../item-edit/UserChip.js";
22
- import { OwnerAvatars as Mn } from "../queue/OwnerAvatars.js";
23
- import { UserAvatar as Pn } from "../UserAvatar.js";
21
+ import { UserChip as Ut } from "../item-edit/UserChip.js";
22
+ import { OwnerAvatars as Pn } from "../queue/OwnerAvatars.js";
23
+ import { UserAvatar as Dn } from "../UserAvatar.js";
24
24
  import { Button as re } from "../ui/button.js";
25
- import { DropdownMenu as Ve, DropdownMenuTrigger as Xe, DropdownMenuContent as Ye, DropdownMenuGroup as yt, DropdownMenuSeparator as wt, DropdownMenuItem as Oe, DropdownMenuLabel as Dn } from "../ui/dropdown-menu.js";
25
+ import { DropdownMenu as Ve, DropdownMenuTrigger as Xe, DropdownMenuContent as Ye, DropdownMenuGroup as wt, DropdownMenuSeparator as vt, DropdownMenuItem as Oe, DropdownMenuLabel as Fn } from "../ui/dropdown-menu.js";
26
26
  import { Popover as st, PopoverTrigger as it, PopoverContent as lt } from "../ui/popover.js";
27
27
  import { Skeleton as we } from "../ui/skeleton.js";
28
- import { TooltipProvider as Ut, Tooltip as Je, TooltipTrigger as Ze, TooltipContent as et } from "../ui/tooltip.js";
29
- import { isAccessRefusal as Lt, deniedToastAction as Bt, WhyOwnersButton as Fn } from "./AccessInsights.js";
30
- import { BranchLanes as An } from "./BranchLanes.js";
31
- import { landingState as On, landingSkipGroups as Un, joinLabels as vt } from "./landing-state.js";
28
+ import { TooltipProvider as Bt, Tooltip as Je, TooltipTrigger as Ze, TooltipContent as et } from "../ui/tooltip.js";
29
+ import { isAccessRefusal as Lt, deniedToastAction as Et, WhyOwnersButton as An } from "./AccessInsights.js";
30
+ import { BranchLanes as On } from "./BranchLanes.js";
31
+ import { landingState as Un, landingSkipGroups as Bn, joinLabels as kt } from "./landing-state.js";
32
32
  import { SlaClockLine as Ln } from "./SlaClock.js";
33
- const Et = yn(
33
+ const jt = wn(
34
34
  () => import("./TransitionRequirementsDialog.js").then((t) => ({
35
35
  default: t.TransitionRequirementsDialog
36
36
  }))
@@ -39,7 +39,7 @@ function ot(t, e) {
39
39
  const r = t || "System";
40
40
  return e.on_behalf_of_name ? `${r}, for ${e.on_behalf_of_name}` : r;
41
41
  }
42
- function Bn(t) {
42
+ function En(t) {
43
43
  if (t.transition) return null;
44
44
  const e = (t.comment ?? "").trim();
45
45
  if (!e.startsWith("{")) return null;
@@ -66,7 +66,7 @@ function nt(t) {
66
66
  const e = (t.comment ?? "").trim(), r = /^auto: (.+)$/i.exec(e);
67
67
  return r ? `Rule: ${r[1]}` : /-state-sync$/i.test(e) ? "The state was copied in from the system that owned this record" : /^instance-migration/i.test(e) ? "Moved when the pipeline was reshaped" : /^state-merge/i.test(e) ? "Moved when two states were merged" : null;
68
68
  }
69
- const kt = {
69
+ const Nt = {
70
70
  validation: "the partner refused what we sent",
71
71
  not_found: "the partner could not find what we referred to",
72
72
  auth: "the partner refused our credentials",
@@ -74,18 +74,18 @@ const kt = {
74
74
  rate_limited: "the partner asked us to slow down",
75
75
  unknown: "the partner refused it"
76
76
  };
77
- function En(t) {
78
- const e = Math.ceil((new Date(t).getTime() - Sn()) / 6e4);
77
+ function jn(t) {
78
+ const e = Math.ceil((new Date(t).getTime() - Cn()) / 6e4);
79
79
  return !Number.isFinite(e) || e <= 0 ? "on the next check" : e < 60 ? `in ${e} min` : `in ${Math.round(e / 60)}h`;
80
80
  }
81
- function jn({ held: t }) {
81
+ function In({ held: t }) {
82
82
  return t.length === 0 ? null : /* @__PURE__ */ n(
83
83
  "div",
84
84
  {
85
85
  className: "space-y-2 border-b border-amber-100 bg-amber-50 px-5 py-3 dark:border-amber-500/20 dark:bg-amber-500/10",
86
86
  "data-pipeline-auto-held": !0,
87
87
  children: t.map((e) => {
88
- const r = e.transition_label ?? "An automatic move", a = kt[e.error_class ?? "unknown"] ?? kt.unknown;
88
+ const r = e.transition_label ?? "An automatic move", a = Nt[e.error_class ?? "unknown"] ?? Nt.unknown;
89
89
  return /* @__PURE__ */ i("div", { className: "text-[12px] text-amber-800 dark:text-amber-300", children: [
90
90
  /* @__PURE__ */ i("p", { className: "font-medium", children: [
91
91
  "Needs a person: ",
@@ -103,7 +103,7 @@ function jn({ held: t }) {
103
103
  }
104
104
  ),
105
105
  /* @__PURE__ */ i("p", { className: "mt-1 text-[11px] text-amber-700 dark:text-amber-400", children: [
106
- e.retry_at ? `It tries the same push again ${En(e.retry_at)}. ` : "It will not send the same push again on its own. ",
106
+ e.retry_at ? `It tries the same push again ${jn(e.retry_at)}. ` : "It will not send the same push again on its own. ",
107
107
  "Fix the record so what it sends changes, retry the push, or move the record by hand.",
108
108
  e.attempts > 1 ? ` ${e.attempts} attempts so far.` : ""
109
109
  ] })
@@ -112,58 +112,58 @@ function jn({ held: t }) {
112
112
  }
113
113
  );
114
114
  }
115
- function jt(t) {
115
+ function It(t) {
116
116
  var r;
117
117
  const e = t == null ? void 0 : t.response;
118
118
  return ((e == null ? void 0 : e.code) ?? ((r = e == null ? void 0 : e.data) == null ? void 0 : r.code)) === "TRANSITION_DUPLICATE";
119
119
  }
120
- function It(t) {
120
+ function Kt(t) {
121
121
  var r;
122
122
  const e = t;
123
123
  return (e == null ? void 0 : e.status) === 422 && ((r = e.response) == null ? void 0 : r.error) === "TRANSITION_REQUIREMENTS" ? e.response.requirements ?? [] : null;
124
124
  }
125
- function Kt(t) {
125
+ function Qt(t) {
126
126
  var a;
127
127
  const e = t == null ? void 0 : t.response, r = (e == null ? void 0 : e.code) ?? ((a = e == null ? void 0 : e.data) == null ? void 0 : a.code);
128
128
  return typeof r == "string" ? r : null;
129
129
  }
130
- function Qt(t) {
131
- if (Kt(t) !== "RECORD_LOCKED") return null;
130
+ function Wt(t) {
131
+ if (Qt(t) !== "RECORD_LOCKED") return null;
132
132
  const e = t == null ? void 0 : t.response, r = e != null && e.data && typeof e.data == "object" ? e.data : e;
133
133
  if ((r == null ? void 0 : r.move_anyway) !== !0) return null;
134
134
  const a = typeof r.locked_by_name == "string" ? r.locked_by_name : null;
135
135
  return { message: typeof r.error == "string" && r.error.trim() ? r.error : `${a ?? "Someone else"} is editing this record right now.`, holder: a };
136
136
  }
137
- const In = {
137
+ const Kn = {
138
138
  PRIORITY_REQUIRED: "priority",
139
139
  // A held record does not move forward (efp-ops hold-gate, army 11): taking
140
140
  // the hold off is one deliberate, noted step, then the move is tried again.
141
141
  ON_HOLD: "remove-hold"
142
142
  };
143
- function Wt(t, e) {
144
- const r = Kt(t), a = r ? In[r] : void 0;
143
+ function zt(t, e) {
144
+ const r = Qt(t), a = r ? Kn[r] : void 0;
145
145
  return !r || !a ? null : { code: r, actionKey: a, transitionId: e.transition_id, comment: e.comment };
146
146
  }
147
- const Kn = 600;
148
- function zt(t) {
147
+ const Qn = 600;
148
+ function Ht(t) {
149
149
  const e = Re(), [r, a] = j(!1), l = ae(!0);
150
150
  he(() => (l.current = !0, () => {
151
151
  l.current = !1;
152
152
  }), []);
153
153
  const c = ae(t);
154
154
  c.current = t;
155
- const m = Dt(async () => {
155
+ const m = Ft(async () => {
156
156
  a(!0);
157
157
  try {
158
158
  await e.refetchQueries({ queryKey: [...c.current], type: "active" });
159
159
  } catch {
160
160
  }
161
- await new Promise((b) => setTimeout(b, Kn)), l.current && a(!1);
161
+ await new Promise((b) => setTimeout(b, Qn)), l.current && a(!1);
162
162
  }, [e]);
163
163
  return { settling: r, settle: m };
164
164
  }
165
- const $e = 1500, Nt = 4e3;
166
- class Qn {
165
+ const $e = 1500, _t = 4e3;
166
+ class Wn {
167
167
  constructor() {
168
168
  We(this, "seen", null);
169
169
  We(this, "fresh", /* @__PURE__ */ new Map());
@@ -190,12 +190,12 @@ class Qn {
190
190
  /** Still inert (no state change)? */
191
191
  inert(e, r) {
192
192
  const a = this.fresh.get(String(e).toUpperCase());
193
- return !a || r - a.at >= Nt ? !1 : r - a.at < $e || a.hovered && !a.left;
193
+ return !a || r - a.at >= _t ? !1 : r - a.at < $e || a.hovered && !a.left;
194
194
  }
195
195
  /** A press: true = let it through. A press inside the window counts as the pointer being there. */
196
196
  press(e, r) {
197
197
  const a = String(e).toUpperCase(), l = this.fresh.get(a);
198
- return l ? r - l.at < $e ? (l.hovered = !0, l.left = !1, !1) : l.hovered && !l.left && r - l.at < Nt ? !1 : (this.fresh.delete(a), !0) : !0;
198
+ return l ? r - l.at < $e ? (l.hovered = !0, l.left = !1, !1) : l.hovered && !l.left && r - l.at < _t ? !1 : (this.fresh.delete(a), !0) : !0;
199
199
  }
200
200
  /** Inside its time window (drawn dimmed)? */
201
201
  timed(e, r) {
@@ -211,13 +211,13 @@ class Qn {
211
211
  this.seen = null, this.fresh.clear();
212
212
  }
213
213
  }
214
- function Ht(t, e) {
214
+ function Gt(t, e) {
215
215
  const r = ae(null);
216
- r.current || (r.current = new Qn());
216
+ r.current || (r.current = new Wn());
217
217
  const a = r.current, l = ae(e);
218
218
  l.current !== e && (l.current = e, a.reset());
219
219
  const [, c] = j(0), m = t ? t.join(",") : null;
220
- return Le(() => {
220
+ return Be(() => {
221
221
  t && a.observe(t, Date.now());
222
222
  }, [a, m]), he(() => {
223
223
  if (!a.hasTimed(Date.now())) return;
@@ -233,25 +233,25 @@ function Ht(t, e) {
233
233
  })
234
234
  };
235
235
  }
236
- function Gt(t, e) {
236
+ function Vt(t, e) {
237
237
  return ["approval-brief", t, String(e)];
238
238
  }
239
- function Vt(t, e, r) {
239
+ function Xt(t, e, r) {
240
240
  return t.request(
241
241
  ce(`/pipelines/instance/${e}/${r}/approval-brief`)
242
242
  ).then((a) => a.data);
243
243
  }
244
- function Wn(t) {
244
+ function zn(t) {
245
245
  return (t ?? []).filter((e) => e.tone === "warn" || e.tone === "danger");
246
246
  }
247
- function _t(t) {
247
+ function St(t) {
248
248
  return `${(t.label ?? "").trim().toLowerCase()}|${(t.text ?? "").trim().toLowerCase()}`;
249
249
  }
250
- function zn(t) {
250
+ function Hn(t) {
251
251
  const e = Math.max(0, Math.floor(Number(t) || 0));
252
252
  return e === 0 ? "today" : e === 1 ? "1 day ago" : `${e} days ago`;
253
253
  }
254
- function Hn(t, e, r = 40) {
254
+ function Gn(t, e, r = 40) {
255
255
  const a = (_) => _ == null || _ === "" ? "" : String(_), l = a(t), c = a(e), m = (_) => _ === "" ? "(empty)" : _;
256
256
  if (t === void 0) return { old: null, new: He(m(c), 0, r) };
257
257
  if (l.length <= r && c.length <= r) return { old: m(l), new: m(c) };
@@ -264,27 +264,27 @@ function He(t, e, r) {
264
264
  const a = Math.min(e, Math.max(0, t.length - r)), l = t.slice(a, a + r);
265
265
  return `${a > 0 ? "…" : ""}${l}${a + r < t.length ? "…" : ""}`;
266
266
  }
267
- const Gn = 4e3;
268
- function Xt(t, e) {
267
+ const Vn = 4e3;
268
+ function Yt(t, e) {
269
269
  const r = xe(), a = Re();
270
- return Dt(async () => {
270
+ return Ft(async () => {
271
271
  try {
272
272
  const l = await Promise.race([
273
273
  a.fetchQuery({
274
- queryKey: Gt(t, e),
275
- queryFn: () => Vt(r, t, e),
274
+ queryKey: Vt(t, e),
275
+ queryFn: () => Xt(r, t, e),
276
276
  staleTime: 0,
277
277
  retry: !1
278
278
  }),
279
- new Promise((c) => setTimeout(() => c(null), Gn))
279
+ new Promise((c) => setTimeout(() => c(null), Vn))
280
280
  ]);
281
- return Wn(l == null ? void 0 : l.lines);
281
+ return zn(l == null ? void 0 : l.lines);
282
282
  } catch {
283
283
  return [];
284
284
  }
285
285
  }, [r, a, t, e]);
286
286
  }
287
- function Yt({ lines: t }) {
287
+ function Jt({ lines: t }) {
288
288
  return t.length === 0 ? null : /* @__PURE__ */ i(
289
289
  "div",
290
290
  {
@@ -307,7 +307,7 @@ function De(t, e, r) {
307
307
  ), l = e.find((c) => String(c.id).toUpperCase() === String(t.to_state).toUpperCase());
308
308
  return !!a && !!l && l.sort < a.sort;
309
309
  }
310
- function Jt(t, e, r) {
310
+ function Zt(t, e, r) {
311
311
  var l;
312
312
  if (!t) return !1;
313
313
  if ((((l = t.order_partners) == null ? void 0 : l.length) ?? 0) > 0) return !0;
@@ -315,7 +315,7 @@ function Jt(t, e, r) {
315
315
  const a = e.find((c) => String(c.id).toUpperCase() === String(t.to_state).toUpperCase());
316
316
  return !!(a != null && a.is_terminal) && !/(^|_)cancel/i.test(String(a.key ?? ""));
317
317
  }
318
- const St = {
318
+ const Ct = {
319
319
  red: "border-red-200 bg-red-50 text-red-800 dark:border-red-500/30 dark:bg-red-500/10 dark:text-red-300",
320
320
  amber: "border-amber-200 bg-amber-50 text-amber-800 dark:border-amber-500/30 dark:bg-amber-500/10 dark:text-amber-300",
321
321
  yellow: "border-yellow-200 bg-yellow-50 text-yellow-800 dark:border-yellow-500/30 dark:bg-yellow-500/10 dark:text-yellow-300",
@@ -323,14 +323,14 @@ const St = {
323
323
  blue: "border-sky-200 bg-sky-50 text-sky-800 dark:border-sky-500/30 dark:bg-sky-500/10 dark:text-sky-300",
324
324
  purple: "border-violet-200 bg-violet-50 text-violet-800 dark:border-violet-500/30 dark:bg-violet-500/10 dark:text-violet-300"
325
325
  };
326
- function Zt({ flags: t }) {
326
+ function en({ flags: t }) {
327
327
  return !t || t.length === 0 ? null : /* @__PURE__ */ n(be, { children: t.map((e) => /* @__PURE__ */ i(
328
328
  "span",
329
329
  {
330
330
  "data-record-flag": e.name,
331
331
  className: ge(
332
332
  "inline-flex shrink-0 items-center gap-1 self-center rounded-full border px-2 py-0.5 text-[11px] font-semibold",
333
- St[e.color] ?? St.amber
333
+ Ct[e.color] ?? Ct.amber
334
334
  ),
335
335
  children: [
336
336
  /* @__PURE__ */ n("span", { className: "h-1.5 w-1.5 rounded-full bg-current", "aria-hidden": !0 }),
@@ -340,10 +340,10 @@ function Zt({ flags: t }) {
340
340
  e.name
341
341
  )) });
342
342
  }
343
- function Ct(t) {
343
+ function $t(t) {
344
344
  return t.replace(/\s+IIP$/i, "");
345
345
  }
346
- function en({
346
+ function tn({
347
347
  collection: t,
348
348
  item: e,
349
349
  tx: r
@@ -359,20 +359,20 @@ function en({
359
359
  staleTime: 2e4
360
360
  });
361
361
  if (l.length === 0) return null;
362
- const m = c != null && c.pushes ? c.pushes.filter((h) => h.status === "would_push" && l.includes(h.api_name)).map((h) => Ct(h.api_name)) : null, b = [...new Set(m ?? l.map(Ct))];
362
+ const m = c != null && c.pushes ? c.pushes.filter((h) => h.status === "would_push" && l.includes(h.api_name)).map((h) => $t(h.api_name)) : null, b = [...new Set(m ?? l.map($t))];
363
363
  return /* @__PURE__ */ i(
364
364
  "p",
365
365
  {
366
366
  "data-order-send-note": !0,
367
367
  className: "flex items-start gap-1.5 rounded-md border border-sky-200 bg-sky-50 px-2.5 py-1.5 text-[12px] text-sky-900 dark:border-sky-500/30 dark:bg-sky-500/10 dark:text-sky-200",
368
368
  children: [
369
- /* @__PURE__ */ n(Tt, { className: "mt-0.5 h-3.5 w-3.5 shrink-0", "aria-hidden": !0 }),
369
+ /* @__PURE__ */ n(qt, { className: "mt-0.5 h-3.5 w-3.5 shrink-0", "aria-hidden": !0 }),
370
370
  m && m.length === 0 ? "Nothing is sent to a partner for this record — it only moves the record on." : `This places an order with ${b.join(" or ")}. It cannot be called back from here.`
371
371
  ]
372
372
  }
373
373
  );
374
374
  }
375
- function tn(t) {
375
+ function nn(t) {
376
376
  return t != null && t.instance ? (t.available_transitions ?? []).some(
377
377
  (e) => {
378
378
  var r;
@@ -380,27 +380,27 @@ function tn(t) {
380
380
  }
381
381
  ) : !1;
382
382
  }
383
- function nn(t, e, r, a) {
383
+ function rn(t, e, r, a) {
384
384
  if (!a || a.size === 0) return t;
385
385
  const l = new Set([...a.keys()].map((c) => String(c).toUpperCase()));
386
386
  return t.filter(
387
387
  (c) => !(!c.to_previous && l.has(String(c.to_state).toUpperCase()) && De(c, e, r))
388
388
  );
389
389
  }
390
- function rn(t, e, r) {
390
+ function an(t, e, r) {
391
391
  var h, _, k, w, q, F;
392
392
  const a = [...(t == null ? void 0 : t.available_transitions) ?? [], ...(t == null ? void 0 : t.all_transitions) ?? []].find(
393
- (L) => L.id === e
394
- ), l = r == null ? void 0 : r.data, c = ((h = l == null ? void 0 : l.new_state) == null ? void 0 : h.id) ?? ((_ = l == null ? void 0 : l.instance) == null ? void 0 : _.current_state) ?? null, m = ((k = l == null ? void 0 : l.new_state) == null ? void 0 : k.label) ?? (a ? (q = (w = t == null ? void 0 : t.states) == null ? void 0 : w.find((L) => L.id === a.to_state)) == null ? void 0 : q.label : void 0) ?? null, b = ((F = t == null ? void 0 : t.instance) == null ? void 0 : F.current_state) ?? null;
393
+ (B) => B.id === e
394
+ ), l = r == null ? void 0 : r.data, c = ((h = l == null ? void 0 : l.new_state) == null ? void 0 : h.id) ?? ((_ = l == null ? void 0 : l.instance) == null ? void 0 : _.current_state) ?? null, m = ((k = l == null ? void 0 : l.new_state) == null ? void 0 : k.label) ?? (a ? (q = (w = t == null ? void 0 : t.states) == null ? void 0 : w.find((B) => B.id === a.to_state)) == null ? void 0 : q.label : void 0) ?? null, b = ((F = t == null ? void 0 : t.instance) == null ? void 0 : F.current_state) ?? null;
395
395
  return b && c && String(b) === String(c) ? "Nothing moved" : a != null && a.label && m ? `${a.label} — now ${m}` : m ? `Moved to ${m}` : a != null && a.label ? `${a.label} done` : "Transition executed";
396
396
  }
397
- const Vn = 1200;
398
- function an(t) {
397
+ const Xn = 1200;
398
+ function sn(t) {
399
399
  const e = `nvr-move-${Math.random().toString(36).slice(2)}`;
400
400
  let r = !1;
401
401
  const a = setTimeout(() => {
402
402
  r = !0, X.loading(`${(t == null ? void 0 : t.trim()) || "Moving"}…`, { id: e });
403
- }, Vn);
403
+ }, Xn);
404
404
  return {
405
405
  /** Options for the result toast: replaces the loading one when shown. */
406
406
  done: () => (clearTimeout(a), r ? { id: e, duration: 7e3 } : {}),
@@ -410,7 +410,7 @@ function an(t) {
410
410
  }
411
411
  };
412
412
  }
413
- function sn(t, e, r) {
413
+ function ln(t, e, r) {
414
414
  for (const a of [
415
415
  "pipeline-owners-resolved",
416
416
  "pipeline-instance-owners",
@@ -418,7 +418,7 @@ function sn(t, e, r) {
418
418
  ])
419
419
  t.invalidateQueries({ queryKey: [a, e, r] });
420
420
  }
421
- function Xn(t, e, r) {
421
+ function Yn(t, e, r) {
422
422
  var b;
423
423
  if (!e) return null;
424
424
  const a = new Map(r.map((h) => [String(h.id).toUpperCase(), h.sort])), l = [...t].sort(
@@ -428,7 +428,7 @@ function Xn(t, e, r) {
428
428
  const c = a.get(String(l.from_state).toUpperCase()), m = a.get(String(l.to_state).toUpperCase());
429
429
  return c == null || m == null || m >= c ? null : l;
430
430
  }
431
- function Yn({ entry: t }) {
431
+ function Jn({ entry: t }) {
432
432
  const e = [t.first_name, t.last_name].filter(Boolean).join(" ") || t.user_email || "Someone";
433
433
  return /* @__PURE__ */ i(
434
434
  "div",
@@ -447,7 +447,7 @@ function Yn({ entry: t }) {
447
447
  }
448
448
  );
449
449
  }
450
- function ln({
450
+ function on({
451
451
  collection: t,
452
452
  item: e,
453
453
  offer: r,
@@ -458,7 +458,7 @@ function ln({
458
458
  }) {
459
459
  const b = xe(), h = Re(), [_, k] = j(""), { data: w, isLoading: q } = le({
460
460
  queryKey: ["bulk-actions-available-one", t, r.actionKey],
461
- queryFn: async () => ((await b.request(ce("/bulk-actions/available", { collection: t }))).data ?? []).find((B) => B.key === r.actionKey) ?? null,
461
+ queryFn: async () => ((await b.request(ce("/bulk-actions/available", { collection: t }))).data ?? []).find((L) => L.key === r.actionKey) ?? null,
462
462
  staleTime: 6e4
463
463
  }), F = qe({
464
464
  mutationFn: async () => {
@@ -472,10 +472,10 @@ function ln({
472
472
  onSuccess: () => {
473
473
  Pe(h, t, e), X.success(`${(w == null ? void 0 : w.label) ?? "Done"} — trying again`), a();
474
474
  },
475
- onError: (A) => kn(A, `${(w == null ? void 0 : w.label) ?? "The fix"} failed`)
475
+ onError: (A) => Nn(A, `${(w == null ? void 0 : w.label) ?? "The fix"} failed`)
476
476
  });
477
477
  if (q || !w) return null;
478
- const L = !F.isPending && (!w.require_reason || _.trim().length > 0);
478
+ const B = !F.isPending && (!w.require_reason || _.trim().length > 0);
479
479
  return /* @__PURE__ */ i(
480
480
  "div",
481
481
  {
@@ -520,7 +520,7 @@ function ln({
520
520
  type: "button",
521
521
  size: "sm",
522
522
  className: "h-7 gap-1.5 text-[12px]",
523
- disabled: !L,
523
+ disabled: !B,
524
524
  onClick: () => F.mutate(),
525
525
  children: [
526
526
  F.isPending && /* @__PURE__ */ n(pe, { className: "h-3 w-3 animate-spin" }),
@@ -555,9 +555,9 @@ function ve({
555
555
  }
556
556
  function Ge(t) {
557
557
  const e = Math.floor(t / 6e4);
558
- return e < 60 ? `${Math.max(1, e)}m` : Tn(t / 36e5);
558
+ return e < 60 ? `${Math.max(1, e)}m` : qn(t / 36e5);
559
559
  }
560
- function Jn({
560
+ function Zn({
561
561
  history: t,
562
562
  completedAt: e
563
563
  }) {
@@ -617,7 +617,7 @@ function Jn({
617
617
  }) })
618
618
  ] });
619
619
  }
620
- function Zn({
620
+ function er({
621
621
  states: t,
622
622
  allTransitions: e,
623
623
  availableTransitions: r,
@@ -680,7 +680,7 @@ function Zn({
680
680
  }).sort((y, S) => y.sort - S.sort);
681
681
  })();
682
682
  if (w.length < 2) return null;
683
- const q = w.findIndex((u) => u.id === a), F = new Map(w.map((u, g) => [u.id, g])), L = new Map(t.map((u) => [u.id, u.label]));
683
+ const q = w.findIndex((u) => u.id === a), F = new Map(w.map((u, g) => [u.id, g])), B = new Map(t.map((u) => [u.id, u.label]));
684
684
  function A(u, g) {
685
685
  const N = F.get(u);
686
686
  return N == null ? [] : [...l].filter((T) => {
@@ -689,9 +689,9 @@ function Zn({
689
689
  return d == null || K == null ? !1 : d === N && K > N || K < d && d - 1 === N;
690
690
  }).sort((T, d) => new Date(T.timestamp).getTime() - new Date(d.timestamp).getTime());
691
691
  }
692
- function B(u) {
692
+ function L(u) {
693
693
  var g, N, T, d;
694
- return Ue(u) ? /* @__PURE__ */ n(Mt, { className: "inline h-2.5 w-2.5", "aria-label": tt(u) }) : ((((g = u.first_name) == null ? void 0 : g[0]) ?? "") + (((N = u.last_name) == null ? void 0 : N[0]) ?? "")).toUpperCase() || ((d = (T = u.user_email) == null ? void 0 : T[0]) == null ? void 0 : d.toUpperCase()) || "?";
694
+ return Ue(u) ? /* @__PURE__ */ n(Pt, { className: "inline h-2.5 w-2.5", "aria-label": tt(u) }) : ((((g = u.first_name) == null ? void 0 : g[0]) ?? "") + (((N = u.last_name) == null ? void 0 : N[0]) ?? "")).toUpperCase() || ((d = (T = u.user_email) == null ? void 0 : T[0]) == null ? void 0 : d.toUpperCase()) || "?";
695
695
  }
696
696
  function I(u) {
697
697
  return ot([u.first_name, u.last_name].filter(Boolean).join(" ") || u.user_email, u);
@@ -709,10 +709,10 @@ function Zn({
709
709
  }
710
710
  }
711
711
  function D(u) {
712
- const g = L.get(u.from_state ?? "") ?? "the previous step", N = L.get(u.to_state) ?? "the next step", T = Ue(u) ? "it moved automatically" : `${I(u)} moved it`;
713
- return `Passed over on ${new Date(u.timestamp).toLocaleString()} — ${T} straight from ${g} to ${N}`;
712
+ const g = B.get(u.from_state ?? "") ?? "the previous step", N = B.get(u.to_state) ?? "the next step", T = Ue(u) ? "it moved automatically" : `${I(u)} moved it`;
713
+ return `Passed over on ${yt(u.timestamp)} — ${T} straight from ${g} to ${N}`;
714
714
  }
715
- return /* @__PURE__ */ n(Ut, { delayDuration: 200, children: /* @__PURE__ */ n("div", { ref: b, className: "overflow-x-auto pt-1.5 pb-1", "data-state-track": !0, children: /* @__PURE__ */ n("div", { className: "flex w-full items-start", children: w.map((u, g) => {
715
+ return /* @__PURE__ */ n(Bt, { delayDuration: 200, children: /* @__PURE__ */ n("div", { ref: b, className: "overflow-x-auto pt-1.5 pb-1", "data-state-track": !0, children: /* @__PURE__ */ n("div", { className: "flex w-full items-start", children: w.map((u, g) => {
716
716
  const N = u.id === a, T = h.has(u.id), d = T && !N && (q < 0 || g < q), K = T && !N && !d, te = !T && !N ? R.get(u.id) : void 0, y = !T && !N ? m == null ? void 0 : m.get(u.id) : void 0, S = te || y ? [...te ? [D(te)] : [], ...y ?? []] : void 0, E = S !== void 0, Y = u.color ?? "#94a3b8", G = g === w.length - 1, z = G ? null : w[g + 1], oe = z ? A(u.id, z.id) : [];
717
717
  return /* @__PURE__ */ i("div", { className: "flex flex-1 items-start", children: [
718
718
  /* @__PURE__ */ i("div", { className: "flex min-w-[76px] flex-1 flex-col items-center gap-1.5 px-1", children: [
@@ -728,7 +728,7 @@ function Zn({
728
728
  border: N || d ? "none" : E ? "1.5px dashed #cbd5e1" : "1.5px solid #e2e8f0",
729
729
  boxShadow: N ? `0 0 0 3px white, 0 0 0 5px ${Y}` : void 0
730
730
  },
731
- children: d ? /* @__PURE__ */ n(je, { className: "h-3.5 w-3.5 text-white", strokeWidth: 2.5 }) : N ? /* @__PURE__ */ n("div", { className: "h-2.5 w-2.5 rounded-full bg-white/80" }) : E ? /* @__PURE__ */ n(bn, { className: "h-3 w-3 text-slate-400", strokeWidth: 2.5 }) : /* @__PURE__ */ n("div", { className: "h-2 w-2 rounded-full bg-slate-300" })
731
+ children: d ? /* @__PURE__ */ n(je, { className: "h-3.5 w-3.5 text-white", strokeWidth: 2.5 }) : N ? /* @__PURE__ */ n("div", { className: "h-2.5 w-2.5 rounded-full bg-white/80" }) : E ? /* @__PURE__ */ n(gn, { className: "h-3 w-3 text-slate-400", strokeWidth: 2.5 }) : /* @__PURE__ */ n("div", { className: "h-2 w-2 rounded-full bg-slate-300" })
732
732
  },
733
733
  N ? "cur" : d ? "done" : E ? "skip" : "todo"
734
734
  ),
@@ -797,7 +797,7 @@ function Zn({
797
797
  oe.map(($) => {
798
798
  const o = $.from_state !== u.id, ue = Math.abs(
799
799
  (F.get($.to_state) ?? 0) - (F.get($.from_state ?? "") ?? 0)
800
- ) > 1 ? L.get($.to_state) ?? "" : null;
800
+ ) > 1 ? B.get($.to_state) ?? "" : null;
801
801
  return /* @__PURE__ */ i(Je, { children: [
802
802
  /* @__PURE__ */ n(Ze, { asChild: !0, children: /* @__PURE__ */ i("div", { className: "flex w-full cursor-default flex-col items-center gap-0.5", children: [
803
803
  /* @__PURE__ */ i(
@@ -807,7 +807,7 @@ function Zn({
807
807
  style: { color: o ? "#d97706" : "#475569" },
808
808
  children: [
809
809
  o && "↩ ",
810
- B($)
810
+ L($)
811
811
  ]
812
812
  }
813
813
  ),
@@ -829,7 +829,7 @@ function Zn({
829
829
  "→ straight to ",
830
830
  ue
831
831
  ] }),
832
- /* @__PURE__ */ n("p", { className: "text-muted-foreground", children: new Date($.timestamp).toLocaleString() })
832
+ /* @__PURE__ */ n("p", { className: "text-muted-foreground", children: yt($.timestamp) })
833
833
  ] })
834
834
  ] }, $.id);
835
835
  })
@@ -837,9 +837,9 @@ function Zn({
837
837
  ] }, u.id);
838
838
  }) }) }) });
839
839
  }
840
- function er({ history: t }) {
840
+ function tr({ history: t }) {
841
841
  return t.length === 0 ? /* @__PURE__ */ n("p", { className: "text-[12px] text-slate-400 italic", children: "No transitions yet." }) : /* @__PURE__ */ n("div", { className: "space-y-3", children: t.map((e) => {
842
- const r = Ue(e), a = r ? tt(e) : ot([e.first_name, e.last_name].filter(Boolean).join(" ") || e.user_email, e), l = Bn(e), c = e.comment && !r && !l ? e.comment : null, m = l ?? (r ? nt(e) : null);
842
+ const r = Ue(e), a = r ? tt(e) : ot([e.first_name, e.last_name].filter(Boolean).join(" ") || e.user_email, e), l = En(e), c = e.comment && !r && !l ? e.comment : null, m = l ?? (r ? nt(e) : null);
843
843
  return /* @__PURE__ */ i("div", { className: "flex items-start gap-2.5 text-[12px]", children: [
844
844
  /* @__PURE__ */ n("div", { className: "mt-1.5 h-1.5 w-1.5 shrink-0 rounded-full bg-slate-200" }),
845
845
  /* @__PURE__ */ i("div", { className: "flex-1 min-w-0", children: [
@@ -859,7 +859,7 @@ function er({ history: t }) {
859
859
  className: "mt-0.5 text-slate-400",
860
860
  "data-history-on-behalf": e.on_behalf_of_name ? e.on_behalf_of ?? "" : void 0,
861
861
  children: [
862
- r && /* @__PURE__ */ n(Mt, { className: "mr-1 inline h-3 w-3", "aria-hidden": !0 }),
862
+ r && /* @__PURE__ */ n(Pt, { className: "mr-1 inline h-3 w-3", "aria-hidden": !0 }),
863
863
  a,
864
864
  m ? ` · ${m}` : "",
865
865
  " · ",
@@ -871,7 +871,7 @@ function er({ history: t }) {
871
871
  ] }, e.id);
872
872
  }) });
873
873
  }
874
- function tr({ value: t, onChange: e }) {
874
+ function nr({ value: t, onChange: e }) {
875
875
  const r = xe(), [a, l] = j(!1), [c, m] = j(""), [b, h] = j(""), _ = ae(null), k = ae(null);
876
876
  he(() => {
877
877
  a ? setTimeout(() => {
@@ -893,10 +893,10 @@ function tr({ value: t, onChange: e }) {
893
893
  enabled: a,
894
894
  staleTime: 3e4
895
895
  }), { data: F } = le({
896
- ...Cn(r, t),
896
+ ...$n(r, t),
897
897
  enabled: !!t,
898
898
  staleTime: 5 * 6e4
899
- }), L = w ?? [], A = F ?? L.find((R) => R.id === t) ?? null, B = A ? [A.first_name, A.last_name].filter(Boolean).join(" ").trim() || A.email : t ? "Selected person" : null, I = (R) => [R.first_name, R.last_name].filter(Boolean).join(" ").trim();
899
+ }), B = w ?? [], A = F ?? B.find((R) => R.id === t) ?? null, L = A ? [A.first_name, A.last_name].filter(Boolean).join(" ").trim() || A.email : t ? "Selected person" : null, I = (R) => [R.first_name, R.last_name].filter(Boolean).join(" ").trim();
900
900
  return /* @__PURE__ */ i(st, { open: a, onOpenChange: l, children: [
901
901
  /* @__PURE__ */ i("div", { className: "relative flex h-8 w-full", children: [
902
902
  /* @__PURE__ */ n(it, { asChild: !0, children: /* @__PURE__ */ i(
@@ -905,7 +905,7 @@ function tr({ value: t, onChange: e }) {
905
905
  type: "button",
906
906
  className: "flex h-full w-full items-center justify-between gap-1.5 rounded-md border border-slate-200 bg-white px-2.5 text-left text-[13px] text-slate-700 hover:border-slate-300",
907
907
  children: [
908
- /* @__PURE__ */ n("span", { className: `flex-1 truncate ${B ? "" : "text-slate-400"}`, children: B ?? "Select a user…" }),
908
+ /* @__PURE__ */ n("span", { className: `flex-1 truncate ${L ? "" : "text-slate-400"}`, children: L ?? "Select a user…" }),
909
909
  /* @__PURE__ */ n(_e, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" })
910
910
  ]
911
911
  }
@@ -918,13 +918,13 @@ function tr({ value: t, onChange: e }) {
918
918
  R.stopPropagation(), e("");
919
919
  },
920
920
  className: "absolute right-6 top-1/2 -translate-y-1/2 flex h-5 w-5 items-center justify-center rounded text-slate-400 hover:bg-slate-100 hover:text-slate-600 dark:hover:bg-muted dark:hover:text-slate-300",
921
- children: /* @__PURE__ */ n(Rt, { className: "h-3 w-3" })
921
+ children: /* @__PURE__ */ n(Mt, { className: "h-3 w-3" })
922
922
  }
923
923
  )
924
924
  ] }),
925
925
  /* @__PURE__ */ i(lt, { align: "start", className: "w-72 p-0", sideOffset: 4, children: [
926
926
  /* @__PURE__ */ n("div", { className: "border-b border-slate-100 px-2 py-1.5", children: /* @__PURE__ */ i("div", { className: "relative", children: [
927
- /* @__PURE__ */ n(xn, { className: "absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-slate-400" }),
927
+ /* @__PURE__ */ n(yn, { className: "absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-slate-400" }),
928
928
  /* @__PURE__ */ n(
929
929
  "input",
930
930
  {
@@ -939,7 +939,7 @@ function tr({ value: t, onChange: e }) {
939
939
  /* @__PURE__ */ n("div", { className: "max-h-56 overflow-y-auto py-1", children: q ? /* @__PURE__ */ i("div", { className: "flex items-center gap-2 px-3 py-2 text-[12px] text-slate-400", children: [
940
940
  /* @__PURE__ */ n(pe, { className: "h-3.5 w-3.5 animate-spin" }),
941
941
  "Loading…"
942
- ] }) : L.length === 0 ? /* @__PURE__ */ n("div", { className: "px-3 py-2 text-[12px] text-slate-400", children: "No results" }) : L.map((R) => {
942
+ ] }) : B.length === 0 ? /* @__PURE__ */ n("div", { className: "px-3 py-2 text-[12px] text-slate-400", children: "No results" }) : B.map((R) => {
943
943
  const D = I(R), Q = D ? `${D} (${R.email})` : R.email, u = R.id === t;
944
944
  return /* @__PURE__ */ i(
945
945
  "button",
@@ -965,13 +965,13 @@ function tr({ value: t, onChange: e }) {
965
965
  ] })
966
966
  ] });
967
967
  }
968
- function $t({
968
+ function Tt({
969
969
  userId: t,
970
970
  name: e,
971
971
  email: r,
972
972
  initials: a
973
973
  }) {
974
- return /* @__PURE__ */ n(Ot, { userId: t, children: /* @__PURE__ */ i(
974
+ return /* @__PURE__ */ n(Ut, { userId: t, children: /* @__PURE__ */ i(
975
975
  "button",
976
976
  {
977
977
  type: "button",
@@ -979,7 +979,7 @@ function $t({
979
979
  className: "group/owner flex min-w-0 flex-1 items-center gap-2.5 rounded-md text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan",
980
980
  children: [
981
981
  /* @__PURE__ */ n(
982
- Pn,
982
+ Dn,
983
983
  {
984
984
  userId: t,
985
985
  alt: e,
@@ -995,7 +995,7 @@ function $t({
995
995
  }
996
996
  ) });
997
997
  }
998
- function nr({
998
+ function rr({
999
999
  collection: t,
1000
1000
  item: e,
1001
1001
  states: r,
@@ -1003,13 +1003,13 @@ function nr({
1003
1003
  returned: l = !1
1004
1004
  }) {
1005
1005
  var me, ne, ke, Ne;
1006
- const c = xe(), m = Re(), { isAdmin: b } = wn(), [h, _] = j(!1), [k, w] = j(""), [q, F] = j(""), [L, A] = j(!1), B = ["pipeline-instance-owners", t, e], I = ["pipeline-owners-can-add", t, e], R = () => c.request(
1006
+ const c = xe(), m = Re(), { isAdmin: b } = vn(), [h, _] = j(!1), [k, w] = j(""), [q, F] = j(""), [B, A] = j(!1), L = ["pipeline-instance-owners", t, e], I = ["pipeline-owners-can-add", t, e], R = () => c.request(
1007
1007
  ce(`/pipelines/instance/${t}/${e}/owners`)
1008
1008
  ).then((s) => {
1009
1009
  var p;
1010
1010
  return m.setQueryData(I, ((p = s.meta) == null ? void 0 : p.can_add) ?? null), s;
1011
1011
  }), { data: D, isLoading: Q } = le({
1012
- queryKey: B,
1012
+ queryKey: L,
1013
1013
  queryFn: () => R().then((s) => s.data)
1014
1014
  }), { data: u } = le({
1015
1015
  queryKey: I,
@@ -1039,7 +1039,7 @@ function nr({
1039
1039
  enabled: S && E && y === 0,
1040
1040
  staleTime: 6e4
1041
1041
  }), G = S && y === 0 && (Y != null && Y.name) ? Y : null, z = () => {
1042
- m.invalidateQueries({ queryKey: B }), m.invalidateQueries({ queryKey: ["pipeline-instance", t, e] });
1042
+ m.invalidateQueries({ queryKey: L }), m.invalidateQueries({ queryKey: ["pipeline-instance", t, e] });
1043
1043
  }, oe = qe({
1044
1044
  mutationFn: () => c.request(
1045
1045
  Se(`/pipelines/instance/${t}/${e}/owners`, {
@@ -1053,7 +1053,7 @@ function nr({
1053
1053
  // The server's reason (a 403 says why), not a bare status phrase.
1054
1054
  onError: (s) => X.error(Me(s, "Failed to add owner"))
1055
1055
  }), $ = qe({
1056
- mutationFn: (s) => c.request(vn(`/pipelines/instance-owners/${s.id}`)),
1056
+ mutationFn: (s) => c.request(kn(`/pipelines/instance-owners/${s.id}`)),
1057
1057
  onSuccess: (s, p) => {
1058
1058
  z();
1059
1059
  const x = [p.first_name, p.last_name].filter(Boolean).join(" ") || p.email;
@@ -1081,7 +1081,7 @@ function nr({
1081
1081
  return /* @__PURE__ */ i("div", { children: [
1082
1082
  /* @__PURE__ */ i("div", { className: "mb-3 flex items-center justify-between", children: [
1083
1083
  /* @__PURE__ */ i("span", { className: "flex items-center gap-1.5 text-[11px] font-medium text-slate-400", children: [
1084
- /* @__PURE__ */ n(qt, { className: "h-3.5 w-3.5" }),
1084
+ /* @__PURE__ */ n(Rt, { className: "h-3.5 w-3.5" }),
1085
1085
  "Owners",
1086
1086
  Q || T ? /* @__PURE__ */ n("span", { className: "inline-block h-3 w-4 animate-pulse rounded bg-slate-200 dark:bg-[hsl(var(--nvr-skeleton))]" }) : G ? null : /* @__PURE__ */ i("span", { className: "text-slate-300", children: [
1087
1087
  "(",
@@ -1090,7 +1090,7 @@ function nr({
1090
1090
  ] })
1091
1091
  ] }),
1092
1092
  /* @__PURE__ */ i("span", { className: "flex items-center gap-3", children: [
1093
- a && /* @__PURE__ */ n(Fn, { collection: t, itemId: String(e) }),
1093
+ a && /* @__PURE__ */ n(An, { collection: t, itemId: String(e) }),
1094
1094
  !h && g && /* @__PURE__ */ i(
1095
1095
  "button",
1096
1096
  {
@@ -1098,7 +1098,7 @@ function nr({
1098
1098
  onClick: () => _(!0),
1099
1099
  className: "flex items-center gap-1 text-[11px] text-slate-400 transition-colors hover:text-nvr-cyan",
1100
1100
  children: [
1101
- /* @__PURE__ */ n(gn, { className: "h-3 w-3" }),
1101
+ /* @__PURE__ */ n(xn, { className: "h-3 w-3" }),
1102
1102
  "Add"
1103
1103
  ]
1104
1104
  }
@@ -1111,7 +1111,7 @@ function nr({
1111
1111
  ] }) : G ? /* @__PURE__ */ i("p", { className: "text-[12px] text-slate-500 dark:text-muted-foreground", children: [
1112
1112
  l ? "Back with" : "With",
1113
1113
  " ",
1114
- /* @__PURE__ */ n(Ot, { userId: G.id, children: /* @__PURE__ */ n(
1114
+ /* @__PURE__ */ n(Ut, { userId: G.id, children: /* @__PURE__ */ n(
1115
1115
  "button",
1116
1116
  {
1117
1117
  type: "button",
@@ -1129,7 +1129,7 @@ function nr({
1129
1129
  {
1130
1130
  className: "-mx-2 flex items-center gap-2.5 rounded-md px-2 py-1.5 transition-colors hover:bg-slate-50 dark:hover:bg-white/5",
1131
1131
  children: [
1132
- /* @__PURE__ */ n($t, { userId: s.id, name: p, email: s.email, initials: x }),
1132
+ /* @__PURE__ */ n(Tt, { userId: s.id, name: p, email: s.email, initials: x }),
1133
1133
  (() => {
1134
1134
  const v = te.get(String(s.id).toUpperCase());
1135
1135
  return v ? /* @__PURE__ */ n(
@@ -1164,7 +1164,7 @@ function nr({
1164
1164
  className: "group -mx-2 flex items-center gap-2.5 rounded-md px-2 py-1.5 transition-colors hover:bg-slate-50 dark:hover:bg-white/5",
1165
1165
  children: [
1166
1166
  /* @__PURE__ */ n(
1167
- $t,
1167
+ Tt,
1168
1168
  {
1169
1169
  userId: s.user,
1170
1170
  name: [s.first_name, s.last_name].filter(Boolean).join(" ") || s.email,
@@ -1182,7 +1182,7 @@ function nr({
1182
1182
  disabled: $.isPending,
1183
1183
  onClick: () => $.mutate(s),
1184
1184
  className: "shrink-0 rounded p-0.5 text-slate-300 opacity-0 transition-all hover:text-red-500 focus-visible:opacity-100 group-hover:opacity-100",
1185
- children: /* @__PURE__ */ n(Rt, { className: "h-3 w-3" })
1185
+ children: /* @__PURE__ */ n(Mt, { className: "h-3 w-3" })
1186
1186
  }
1187
1187
  )
1188
1188
  ]
@@ -1192,8 +1192,8 @@ function nr({
1192
1192
  ] }),
1193
1193
  h && /* @__PURE__ */ i("div", { className: "mt-3 space-y-2 rounded-lg border border-slate-200 bg-slate-50 dark:bg-slate-900/30 dark:border-border p-3", children: [
1194
1194
  /* @__PURE__ */ n("p", { className: "text-[11px] font-semibold text-slate-500", children: "Add owner" }),
1195
- /* @__PURE__ */ n(tr, { value: k, onChange: w }),
1196
- b ? /* @__PURE__ */ i(st, { open: L, onOpenChange: A, children: [
1195
+ /* @__PURE__ */ n(nr, { value: k, onChange: w }),
1196
+ b ? /* @__PURE__ */ i(st, { open: B, onOpenChange: A, children: [
1197
1197
  /* @__PURE__ */ n(it, { asChild: !0, children: /* @__PURE__ */ i(
1198
1198
  "button",
1199
1199
  {
@@ -1254,16 +1254,16 @@ function nr({
1254
1254
  ] })
1255
1255
  ] });
1256
1256
  }
1257
- function on(t, e, r, a) {
1257
+ function dn(t, e, r, a) {
1258
1258
  if (!t || !(r != null && r.length)) return null;
1259
1259
  const c = new Map(r.map((h) => [String(h.id).toUpperCase(), h])).get(String(t.to_state).toUpperCase()), m = Number(e == null ? void 0 : e.sort);
1260
1260
  if (!c || !Number.isFinite(m) || !(Number(c.sort) > m)) return null;
1261
- const b = On(String(t.to_state), r, a);
1261
+ const b = Un(String(t.to_state), r, a);
1262
1262
  return b && b.skipped.length > 0 ? b : null;
1263
1263
  }
1264
- function dn({ landing: t }) {
1264
+ function cn({ landing: t }) {
1265
1265
  if (!t || t.skipped.length === 0) return null;
1266
- const e = Un(t);
1266
+ const e = Bn(t);
1267
1267
  if (e.length === 1) {
1268
1268
  const r = e[0];
1269
1269
  return /* @__PURE__ */ i(
@@ -1276,7 +1276,7 @@ function dn({ landing: t }) {
1276
1276
  /* @__PURE__ */ n("span", { className: "font-medium", children: t.state.label }),
1277
1277
  " —",
1278
1278
  " ",
1279
- vt(r.labels),
1279
+ kt(r.labels),
1280
1280
  " ",
1281
1281
  r.labels.length === 1 ? "is" : "are",
1282
1282
  " skipped",
@@ -1298,7 +1298,7 @@ function dn({ landing: t }) {
1298
1298
  ". Skipped on the way:"
1299
1299
  ] }),
1300
1300
  /* @__PURE__ */ n("ul", { className: "mt-0.5 list-disc space-y-0.5 pl-4", children: e.map((r) => /* @__PURE__ */ i("li", { children: [
1301
- /* @__PURE__ */ n("span", { className: "font-medium", children: vt(r.labels) }),
1301
+ /* @__PURE__ */ n("span", { className: "font-medium", children: kt(r.labels) }),
1302
1302
  r.reason ? ` — ${r.reason}` : ""
1303
1303
  ] }, r.labels.join("|"))) })
1304
1304
  ]
@@ -1310,7 +1310,7 @@ const Te = {
1310
1310
  suspended: "suspended",
1311
1311
  redacted: "redacted"
1312
1312
  };
1313
- function rr({
1313
+ function ar({
1314
1314
  collection: t,
1315
1315
  item: e,
1316
1316
  states: r,
@@ -1335,7 +1335,7 @@ function rr({
1335
1335
  title: "View approval chain",
1336
1336
  className: "flex h-6 w-6 items-center justify-center rounded text-slate-400 transition-colors hover:bg-slate-100 hover:text-slate-600 dark:hover:bg-muted dark:hover:text-slate-300",
1337
1337
  onClick: (k) => k.stopPropagation(),
1338
- children: /* @__PURE__ */ n(qt, { className: "h-3.5 w-3.5" })
1338
+ children: /* @__PURE__ */ n(Rt, { className: "h-3.5 w-3.5" })
1339
1339
  }
1340
1340
  ) }),
1341
1341
  /* @__PURE__ */ i(lt, { align: "end", sideOffset: 6, className: "w-[576px] p-0 overflow-hidden", children: [
@@ -1348,7 +1348,7 @@ function rr({
1348
1348
  const w = (((I = b[k.id]) == null ? void 0 : I.owners) ?? []).map((g) => ({
1349
1349
  id: g.id,
1350
1350
  name: [g.first_name, g.last_name].filter(Boolean).join(" ") || g.email
1351
- })), q = k.id === a, F = ((R = b[k.id]) == null ? void 0 : R.skipped) === !0 && !q, L = (((D = b[k.id]) == null ? void 0 : D.skip_reasons) ?? []).filter(Boolean), A = ((Q = b[k.id]) == null ? void 0 : Q.unavailable) ?? [], B = ((u = b[k.id]) == null ? void 0 : u.blocked) === !0 && !F;
1351
+ })), q = k.id === a, F = ((R = b[k.id]) == null ? void 0 : R.skipped) === !0 && !q, B = (((D = b[k.id]) == null ? void 0 : D.skip_reasons) ?? []).filter(Boolean), A = ((Q = b[k.id]) == null ? void 0 : Q.unavailable) ?? [], L = ((u = b[k.id]) == null ? void 0 : u.blocked) === !0 && !F;
1352
1352
  return /* @__PURE__ */ i(
1353
1353
  "div",
1354
1354
  {
@@ -1360,19 +1360,19 @@ function rr({
1360
1360
  // tint doesn't clash with the state badge's own color.
1361
1361
  q && "bg-nvr-cyan/[0.06] dark:bg-nvr-cyan/[0.11]",
1362
1362
  F && "opacity-60",
1363
- B && "bg-red-50 dark:bg-red-500/10"
1363
+ L && "bg-red-50 dark:bg-red-500/10"
1364
1364
  ),
1365
- "data-chain-blocked": B ? "" : void 0,
1365
+ "data-chain-blocked": L ? "" : void 0,
1366
1366
  children: [
1367
1367
  /* @__PURE__ */ n(ve, { label: k.label, color: k.color, small: !0 }),
1368
1368
  /* @__PURE__ */ n("div", { className: "flex min-w-0 flex-1 flex-wrap items-center gap-x-2 gap-y-0.5", children: F ? (
1369
1369
  // Radix tooltip with zero delay — native `title` waits on
1370
1370
  // the OS hover timer, and a truncated reason needs its
1371
1371
  // full text the moment the cursor lands on it.
1372
- /* @__PURE__ */ n(Ut, { delayDuration: 0, children: /* @__PURE__ */ i(Je, { children: [
1372
+ /* @__PURE__ */ n(Bt, { delayDuration: 0, children: /* @__PURE__ */ i(Je, { children: [
1373
1373
  /* @__PURE__ */ n(Ze, { asChild: !0, children: /* @__PURE__ */ i("div", { className: "flex min-w-0 flex-1 cursor-default items-center gap-2", children: [
1374
1374
  /* @__PURE__ */ n("span", { className: "inline-flex shrink-0 items-center gap-1 rounded-full border border-dashed border-slate-300 px-2 py-0.5 text-[10.5px] font-medium text-slate-400 dark:border-slate-600 dark:text-slate-500", children: "Skipped" }),
1375
- L.length > 0 && /* @__PURE__ */ n("span", { className: "min-w-0 flex-1 truncate text-[11px] text-slate-400 dark:text-slate-500", children: L.join(" · ") })
1375
+ B.length > 0 && /* @__PURE__ */ n("span", { className: "min-w-0 flex-1 truncate text-[11px] text-slate-400 dark:text-slate-500", children: B.join(" · ") })
1376
1376
  ] }) }),
1377
1377
  /* @__PURE__ */ i(
1378
1378
  et,
@@ -1382,13 +1382,13 @@ function rr({
1382
1382
  className: "max-w-[420px] space-y-0.5 text-[11.5px] leading-snug",
1383
1383
  children: [
1384
1384
  /* @__PURE__ */ n("p", { className: "text-slate-500 dark:text-slate-400", children: "The pipeline will pass through this state without stopping:" }),
1385
- L.length > 0 ? L.map((g) => /* @__PURE__ */ n("p", { children: g }, g)) : /* @__PURE__ */ n("p", { children: "Skip criteria currently match" })
1385
+ B.length > 0 ? B.map((g) => /* @__PURE__ */ n("p", { children: g }, g)) : /* @__PURE__ */ n("p", { children: "Skip criteria currently match" })
1386
1386
  ]
1387
1387
  }
1388
1388
  )
1389
1389
  ] }) })
1390
1390
  ) : /* @__PURE__ */ i(be, { children: [
1391
- /* @__PURE__ */ n(Mn, { owners: w, max: 10, emptyLabel: "—" }),
1391
+ /* @__PURE__ */ n(Pn, { owners: w, max: 10, emptyLabel: "—" }),
1392
1392
  A.map((g) => /* @__PURE__ */ i(
1393
1393
  "span",
1394
1394
  {
@@ -1422,7 +1422,7 @@ function rr({
1422
1422
  },
1423
1423
  g.id
1424
1424
  )),
1425
- B && /* @__PURE__ */ n("span", { className: "inline-flex items-center gap-1 rounded-full bg-red-600 px-2 py-0.5 text-[10.5px] font-semibold text-white", children: "No one can act here" })
1425
+ L && /* @__PURE__ */ n("span", { className: "inline-flex items-center gap-1 rounded-full bg-red-600 px-2 py-0.5 text-[10.5px] font-semibold text-white", children: "No one can act here" })
1426
1426
  ] }) })
1427
1427
  ]
1428
1428
  },
@@ -1432,7 +1432,7 @@ function rr({
1432
1432
  ] })
1433
1433
  ] });
1434
1434
  }
1435
- function Or({
1435
+ function Ur({
1436
1436
  collection: t,
1437
1437
  item: e,
1438
1438
  defaultExpanded: r,
@@ -1446,7 +1446,7 @@ function Or({
1446
1446
  asRole: k
1447
1447
  }) {
1448
1448
  return e === "new" ? null : /* @__PURE__ */ n(
1449
- ar,
1449
+ sr,
1450
1450
  {
1451
1451
  collection: t,
1452
1452
  item: e,
@@ -1463,25 +1463,25 @@ function Or({
1463
1463
  `${t}:${e}`
1464
1464
  );
1465
1465
  }
1466
- function cn({
1466
+ function un({
1467
1467
  collection: t,
1468
1468
  item: e,
1469
1469
  omitLines: r
1470
1470
  }) {
1471
1471
  const a = xe(), { data: l } = le({
1472
- queryKey: Gt(t, e),
1473
- queryFn: () => Vt(a, t, e),
1472
+ queryKey: Vt(t, e),
1473
+ queryFn: () => Xt(a, t, e),
1474
1474
  staleTime: 3e4,
1475
1475
  retry: !1
1476
1476
  });
1477
1477
  if (!l) return null;
1478
- const c = l.changed_by_people ?? l.changed_total, m = new Set((r ?? []).map(_t)), b = (l.lines ?? []).filter((h) => !m.has(_t(h)));
1478
+ const c = l.changed_by_people ?? l.changed_total, m = new Set((r ?? []).map(St)), b = (l.lines ?? []).filter((h) => !m.has(St(h)));
1479
1479
  return /* @__PURE__ */ i("div", { className: "rounded-md border border-slate-200 bg-white px-3 py-2 text-[11.5px] dark:border-border dark:bg-card", children: [
1480
1480
  /* @__PURE__ */ i("p", { className: "text-slate-500 dark:text-muted-foreground", children: [
1481
1481
  /* @__PURE__ */ n("span", { className: "font-medium text-slate-700 dark:text-foreground", children: "Since entering this state" }),
1482
1482
  " ",
1483
1483
  "(",
1484
- zn(l.days_in_state),
1484
+ Hn(l.days_in_state),
1485
1485
  "):",
1486
1486
  " ",
1487
1487
  l.changed_total === 0 && l.comments === 0 && l.addendums.count === 0 ? /* @__PURE__ */ n("span", { children: "no changes to this record." }) : /* @__PURE__ */ i(be, { children: [
@@ -1510,14 +1510,14 @@ function cn({
1510
1510
  ] }),
1511
1511
  l.field_changes.length > 0 && /* @__PURE__ */ i("div", { className: "mt-1 space-y-0.5", children: [
1512
1512
  l.field_changes.slice(0, 5).map((h) => {
1513
- const _ = Hn(h.old, h.new);
1513
+ const _ = Gn(h.old, h.new);
1514
1514
  return /* @__PURE__ */ i(
1515
1515
  "p",
1516
1516
  {
1517
1517
  "data-brief-change": h.field,
1518
1518
  className: "text-[11px] text-slate-500 dark:text-muted-foreground",
1519
1519
  children: [
1520
- /* @__PURE__ */ n("span", { className: "font-medium text-slate-700 dark:text-foreground", children: h.label || $n(h.field) }),
1520
+ /* @__PURE__ */ n("span", { className: "font-medium text-slate-700 dark:text-foreground", children: h.label || Tn(h.field) }),
1521
1521
  h.auto ? /* @__PURE__ */ n("span", { children: " (updated automatically)" }) : null,
1522
1522
  ":",
1523
1523
  " ",
@@ -1559,7 +1559,7 @@ function cn({
1559
1559
  ))
1560
1560
  ] });
1561
1561
  }
1562
- function ar({
1562
+ function sr({
1563
1563
  collection: t,
1564
1564
  item: e,
1565
1565
  defaultExpanded: r,
@@ -1573,9 +1573,9 @@ function ar({
1573
1573
  asRole: k
1574
1574
  }) {
1575
1575
  var pt, ft, ht;
1576
- const w = xe(), q = Re(), [F, L] = j(""), [A, B] = j(null), [I, R] = j(!1), [D, Q] = j(!1), [u, g] = j(null), [N, T] = j(null), [d, K] = j([]), te = Xt(t, String(e));
1577
- At(t, e, "transition", !!A || !!u);
1578
- const y = Nn(t, e, "transition"), S = ae(!1);
1576
+ const w = xe(), q = Re(), [F, B] = j(""), [A, L] = j(null), [I, R] = j(!1), [D, Q] = j(!1), [u, g] = j(null), [N, T] = j(null), [d, K] = j([]), te = Yt(t, String(e));
1577
+ Ot(t, e, "transition", !!A || !!u);
1578
+ const y = _n(t, e, "transition"), S = ae(!1);
1579
1579
  he(() => {
1580
1580
  !S.current && r !== void 0 && (S.current = !0, Q(r));
1581
1581
  }, [r]);
@@ -1595,7 +1595,7 @@ function ar({
1595
1595
  var J, ie;
1596
1596
  if (E.current) return;
1597
1597
  if (A === f) {
1598
- B(null);
1598
+ L(null);
1599
1599
  return;
1600
1600
  }
1601
1601
  if (b) {
@@ -1608,7 +1608,7 @@ function ar({
1608
1608
  }
1609
1609
  if (!ee) return;
1610
1610
  }
1611
- const C = (W ?? []).find((ee) => ee.id === f), U = String((C == null ? void 0 : C.comment_mode) ?? "none"), V = Jt(C, (o == null ? void 0 : o.states) ?? [], (J = o == null ? void 0 : o.instance) == null ? void 0 : J.current_state);
1611
+ const C = (W ?? []).find((ee) => ee.id === f), U = String((C == null ? void 0 : C.comment_mode) ?? "none"), V = Zt(C, (o == null ? void 0 : o.states) ?? [], (J = o == null ? void 0 : o.instance) == null ? void 0 : J.current_state);
1612
1612
  if (U !== "optional" && U !== "required") {
1613
1613
  if (C && !De(C, (o == null ? void 0 : o.states) ?? [], (ie = o == null ? void 0 : o.instance) == null ? void 0 : ie.current_state)) {
1614
1614
  E.current = !0;
@@ -1619,19 +1619,19 @@ function ar({
1619
1619
  E.current = !1;
1620
1620
  }
1621
1621
  if (ee.length > 0 || V) {
1622
- K(ee), B(f);
1622
+ K(ee), L(f);
1623
1623
  return;
1624
1624
  }
1625
1625
  }
1626
1626
  if (V) {
1627
- K([]), B(f);
1627
+ K([]), L(f);
1628
1628
  return;
1629
1629
  }
1630
1630
  Y({ transition_id: f });
1631
1631
  return;
1632
1632
  }
1633
- K([]), B(f);
1634
- }, z = k ? ["pipeline-instance", t, e, k] : ["pipeline-instance", t, e], { settling: oe, settle: $ } = zt(z), { data: o, isLoading: ue } = le({
1633
+ K([]), L(f);
1634
+ }, z = k ? ["pipeline-instance", t, e, k] : ["pipeline-instance", t, e], { settling: oe, settle: $ } = Ht(z), { data: o, isLoading: ue } = le({
1635
1635
  queryKey: z,
1636
1636
  queryFn: () => w.request(
1637
1637
  ce(
@@ -1648,7 +1648,7 @@ function ar({
1648
1648
  }
1649
1649
  ),
1650
1650
  staleTime: 1e4
1651
- }), me = Ht(
1651
+ }), me = Gt(
1652
1652
  o ? (o.available_transitions ?? []).map((f) => String(f.id)) : null,
1653
1653
  `${t}:${e}`
1654
1654
  );
@@ -1667,13 +1667,13 @@ function ar({
1667
1667
  ).then((f) => f.data ?? null),
1668
1668
  // Also when a send back is on offer: its target may be a chain step this record skipped.
1669
1669
  // And while a move is being confirmed: the panel names where it really lands.
1670
- enabled: (D || tn(o) || !!A) && !!(o != null && o.instance),
1670
+ enabled: (D || nn(o) || !!A) && !!(o != null && o.instance),
1671
1671
  staleTime: 3e4
1672
- }), Ne = Le(() => {
1672
+ }), Ne = Be(() => {
1673
1673
  if (!ne) return null;
1674
1674
  const f = Object.entries(ne);
1675
1675
  return f.length === 0 || f.every(([, C]) => C.on_path === void 0) ? null : new Set(f.filter(([, C]) => C.on_path !== !1).map(([C]) => C));
1676
- }, [ne]), s = Le(() => {
1676
+ }, [ne]), s = Be(() => {
1677
1677
  if (!ne) return null;
1678
1678
  const f = /* @__PURE__ */ new Map();
1679
1679
  for (const [C, U] of Object.entries(ne))
@@ -1702,7 +1702,7 @@ function ar({
1702
1702
  onMutate: (f) => {
1703
1703
  var C;
1704
1704
  return {
1705
- slow: an(
1705
+ slow: sn(
1706
1706
  (C = [...(o == null ? void 0 : o.available_transitions) ?? [], ...(o == null ? void 0 : o.all_transitions) ?? []].find(
1707
1707
  (U) => U.id === f.transition_id
1708
1708
  )) == null ? void 0 : C.label
@@ -1710,17 +1710,17 @@ function ar({
1710
1710
  };
1711
1711
  },
1712
1712
  onSuccess: (f, C, U) => {
1713
- q.invalidateQueries({ queryKey: z }), t === "nivaro_addendums" && q.invalidateQueries({ queryKey: ["addendums"] }), Ee(q, t, String(e)), Pe(q, t, String(e)), sn(q, t, String(e)), T(null), L(""), B(null), g(null), X.success(rn(o, C.transition_id, f), U == null ? void 0 : U.slow.done());
1713
+ q.invalidateQueries({ queryKey: z }), t === "nivaro_addendums" && q.invalidateQueries({ queryKey: ["addendums"] }), Ee(q, t, String(e)), Pe(q, t, String(e)), ln(q, t, String(e)), T(null), B(""), L(null), g(null), X.success(an(o, C.transition_id, f), U == null ? void 0 : U.slow.done());
1714
1714
  },
1715
1715
  onError: (f, C, U) => {
1716
1716
  var ee;
1717
- if (U == null || U.slow.fail(), jt(f)) {
1717
+ if (U == null || U.slow.fail(), It(f)) {
1718
1718
  q.invalidateQueries({ queryKey: z });
1719
1719
  return;
1720
1720
  }
1721
- const V = Qt(f);
1721
+ const V = Wt(f);
1722
1722
  if (V) {
1723
- B(null);
1723
+ L(null);
1724
1724
  const ye = ((ee = [...(o == null ? void 0 : o.available_transitions) ?? [], ...(o == null ? void 0 : o.all_transitions) ?? []].find(
1725
1725
  (Ae) => Ae.id === C.transition_id
1726
1726
  )) == null ? void 0 : ee.label) ?? "Move";
@@ -1736,7 +1736,7 @@ function ar({
1736
1736
  });
1737
1737
  return;
1738
1738
  }
1739
- const J = It(f);
1739
+ const J = Kt(f);
1740
1740
  if (J) {
1741
1741
  g((ye) => ({
1742
1742
  payload: J,
@@ -1747,21 +1747,21 @@ function ar({
1747
1747
  return;
1748
1748
  }
1749
1749
  const ie = f == null ? void 0 : f.response;
1750
- T(Wt(f, C)), X.error(Me(f, "Failed to execute transition"), {
1750
+ T(zt(f, C)), X.error(Me(f, "Failed to execute transition"), {
1751
1751
  duration: 12e3,
1752
1752
  // What to do next + Copy details (lib/error-toast.ts); "Why?" below wins the action slot.
1753
- ...Ft(f, { action: "Transition" }),
1753
+ ...At(f, { action: "Transition" }),
1754
1754
  // #1867: a refusal carries "Why?" — the role, owner or access rule
1755
1755
  // that stopped it, and who can change it.
1756
1756
  ...Lt(f) ? {
1757
- action: Bt(w, {
1757
+ action: Et(w, {
1758
1758
  collection: t,
1759
1759
  itemId: String(e),
1760
1760
  action: "transition",
1761
1761
  transitionId: C.transition_id
1762
1762
  })
1763
1763
  } : {}
1764
- }), g(null), B(null), Ee(q, t, String(e)), Pe(q, t, String(e)), (ie == null ? void 0 : ie.status) === 409 && q.invalidateQueries({ queryKey: z });
1764
+ }), g(null), L(null), Ee(q, t, String(e)), Pe(q, t, String(e)), (ie == null ? void 0 : ie.status) === 409 && q.invalidateQueries({ queryKey: z });
1765
1765
  }
1766
1766
  }), M = ae(G);
1767
1767
  M.current = G;
@@ -1778,7 +1778,7 @@ function ar({
1778
1778
  }
1779
1779
  M.current(J.id);
1780
1780
  };
1781
- return window.addEventListener(Be, f), () => window.removeEventListener(Be, f);
1781
+ return window.addEventListener(Le, f), () => window.removeEventListener(Le, f);
1782
1782
  }, [t, e]), ue)
1783
1783
  return /* @__PURE__ */ n("div", { className: "overflow-hidden rounded-xl border border-slate-200 bg-white dark:border-border dark:bg-card", children: /* @__PURE__ */ i("div", { className: "flex w-full items-center gap-2.5 px-5 py-3.5", children: [
1784
1784
  /* @__PURE__ */ n(we, { className: "h-3.5 w-3.5 shrink-0 rounded" }),
@@ -1787,9 +1787,9 @@ function ar({
1787
1787
  /* @__PURE__ */ n(we, { className: "ml-auto h-3.5 w-3.5 rounded" })
1788
1788
  ] }) });
1789
1789
  if (!(o != null && o.binding)) return null;
1790
- const { instance: v, available_transitions: W, history: Z, states: O } = o, de = new Map((O ?? []).map((f) => [f.id, f])), fe = (v == null ? void 0 : v.current_state_obj) ?? null, se = A ? (W ?? []).find((f) => f.id === A) : null, un = se ? de.get(se.to_state) : null, Fe = on(se, fe, O, ne), Ie = (Fe == null ? void 0 : Fe.state) ?? un, mn = v != null && v.completed_at && W ? W.filter(
1790
+ const { instance: v, available_transitions: W, history: Z, states: O } = o, de = new Map((O ?? []).map((f) => [f.id, f])), fe = (v == null ? void 0 : v.current_state_obj) ?? null, se = A ? (W ?? []).find((f) => f.id === A) : null, mn = se ? de.get(se.to_state) : null, Fe = dn(se, fe, O, ne), Ie = (Fe == null ? void 0 : Fe.state) ?? mn, pn = v != null && v.completed_at && W ? W.filter(
1791
1791
  (f) => f.from_state && String(f.from_state).toUpperCase() === String(v.current_state).toUpperCase()
1792
- ) : null, Ke = v != null && v.completed_at ? mn ?? [] : nn(
1792
+ ) : null, Ke = v != null && v.completed_at ? pn ?? [] : rn(
1793
1793
  W ?? [],
1794
1794
  O ?? [],
1795
1795
  v == null ? void 0 : v.current_state,
@@ -1863,7 +1863,7 @@ function ar({
1863
1863
  ] }, V);
1864
1864
  });
1865
1865
  }, Qe = N ? /* @__PURE__ */ n(
1866
- ln,
1866
+ on,
1867
1867
  {
1868
1868
  collection: t,
1869
1869
  item: String(e),
@@ -1871,7 +1871,7 @@ function ar({
1871
1871
  onDismiss: () => T(null),
1872
1872
  onFixed: () => Y({ transition_id: N.transitionId, comment: N.comment })
1873
1873
  }
1874
- ) : null, ut = Xn(Z ?? [], v == null ? void 0 : v.current_state, O ?? []), mt = /* @__PURE__ */ i("div", { className: "space-y-3 rounded-lg border border-slate-200 bg-slate-50 dark:bg-slate-900/30 dark:border-border p-3.5", children: [
1874
+ ) : null, ut = Yn(Z ?? [], v == null ? void 0 : v.current_state, O ?? []), mt = /* @__PURE__ */ i("div", { className: "space-y-3 rounded-lg border border-slate-200 bg-slate-50 dark:bg-slate-900/30 dark:border-border p-3.5", children: [
1875
1875
  /* @__PURE__ */ i("div", { className: "flex flex-wrap items-center gap-2", children: [
1876
1876
  /* @__PURE__ */ n("span", { className: "text-[11px] font-semibold text-slate-400", children: "Confirming" }),
1877
1877
  se && /* @__PURE__ */ n("span", { className: "text-[12px] font-medium text-slate-700", children: se.label }),
@@ -1881,16 +1881,16 @@ function ar({
1881
1881
  /* @__PURE__ */ n(ve, { label: Ie.label, color: Ie.color, small: !0 })
1882
1882
  ] })
1883
1883
  ] }),
1884
- /* @__PURE__ */ n(dn, { landing: Fe }),
1885
- /* @__PURE__ */ n(en, { collection: t, item: String(e), tx: se }),
1886
- /* @__PURE__ */ n(cn, { collection: t, item: e, omitLines: d }),
1887
- /* @__PURE__ */ n(Yt, { lines: d }),
1884
+ /* @__PURE__ */ n(cn, { landing: Fe }),
1885
+ /* @__PURE__ */ n(tn, { collection: t, item: String(e), tx: se }),
1886
+ /* @__PURE__ */ n(un, { collection: t, item: e, omitLines: d }),
1887
+ /* @__PURE__ */ n(Jt, { lines: d }),
1888
1888
  /* @__PURE__ */ n(
1889
1889
  "input",
1890
1890
  {
1891
1891
  type: "text",
1892
1892
  value: F,
1893
- onChange: (f) => L(f.target.value),
1893
+ onChange: (f) => B(f.target.value),
1894
1894
  placeholder: String((se == null ? void 0 : se.comment_mode) ?? "") === "required" ? "Add a note (required)" : "Add a comment (optional)",
1895
1895
  className: "w-full rounded-md border border-slate-200 bg-white px-3 py-1.5 text-[13px] placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-nvr-cyan/30"
1896
1896
  }
@@ -1903,7 +1903,7 @@ function ar({
1903
1903
  size: "sm",
1904
1904
  variant: "ghost",
1905
1905
  className: "h-7 text-[12px]",
1906
- onClick: () => B(null),
1906
+ onClick: () => L(null),
1907
1907
  children: "Cancel"
1908
1908
  }
1909
1909
  ),
@@ -1946,7 +1946,7 @@ function ar({
1946
1946
  /* @__PURE__ */ i("div", { className: "flex items-center gap-1.5", children: [
1947
1947
  _ && /* @__PURE__ */ n("span", { className: "flex items-center gap-1 rounded-full border border-amber-200 bg-amber-50 px-2 py-0.5 text-[11px] font-medium text-amber-700 dark:border-amber-500/20 dark:bg-amber-500/10 dark:text-amber-400", children: "Addendum workflow" }),
1948
1948
  fe && /* @__PURE__ */ n(ve, { label: fe.label, color: fe.color }),
1949
- /* @__PURE__ */ n(Zt, { flags: o == null ? void 0 : o.flags }),
1949
+ /* @__PURE__ */ n(en, { flags: o == null ? void 0 : o.flags }),
1950
1950
  (((pt = o == null ? void 0 : o.auto_held) == null ? void 0 : pt.length) ?? 0) > 0 && /* @__PURE__ */ i(
1951
1951
  "span",
1952
1952
  {
@@ -1955,7 +1955,7 @@ function ar({
1955
1955
  `),
1956
1956
  "data-pipeline-auto-held-pill": !0,
1957
1957
  children: [
1958
- /* @__PURE__ */ n(hn, { className: "h-3 w-3 shrink-0" }),
1958
+ /* @__PURE__ */ n(bn, { className: "h-3 w-3 shrink-0" }),
1959
1959
  "Needs a person"
1960
1960
  ]
1961
1961
  }
@@ -1971,7 +1971,7 @@ function ar({
1971
1971
  "data-pipeline-approving": !0,
1972
1972
  children: [
1973
1973
  /* @__PURE__ */ n("span", { className: "h-1.5 w-1.5 shrink-0 animate-pulse rounded-full bg-sky-400" }),
1974
- _n(y, "approving")
1974
+ Sn(y, "approving")
1975
1975
  ]
1976
1976
  }
1977
1977
  )
@@ -1995,7 +1995,7 @@ function ar({
1995
1995
  }
1996
1996
  ),
1997
1997
  l && ((o == null ? void 0 : o.binding) || (o == null ? void 0 : o.instance)) && /* @__PURE__ */ n(
1998
- rr,
1998
+ ar,
1999
1999
  {
2000
2000
  collection: t,
2001
2001
  item: e,
@@ -2018,9 +2018,9 @@ function ar({
2018
2018
  ),
2019
2019
  !D && A && /* @__PURE__ */ n("div", { className: "border-t border-slate-100 dark:border-border/60 px-4 py-3", children: mt }),
2020
2020
  !D && Qe && /* @__PURE__ */ n("div", { className: "border-t border-slate-100 dark:border-border/60 px-4 py-3", children: Qe }),
2021
- ut && !(v != null && v.completed_at) && /* @__PURE__ */ n(Yn, { entry: ut }),
2021
+ ut && !(v != null && v.completed_at) && /* @__PURE__ */ n(Jn, { entry: ut }),
2022
2022
  D && /* @__PURE__ */ i("div", { className: "border-t border-slate-100 dark:border-border/60", children: [
2023
- /* @__PURE__ */ n(jn, { held: (o == null ? void 0 : o.auto_held) ?? [] }),
2023
+ /* @__PURE__ */ n(In, { held: (o == null ? void 0 : o.auto_held) ?? [] }),
2024
2024
  h && /* @__PURE__ */ i("div", { className: "flex items-center gap-2 border-b border-amber-100 bg-amber-50 px-5 py-2.5 dark:border-amber-500/20 dark:bg-amber-500/10", children: [
2025
2025
  /* @__PURE__ */ n("span", { className: "h-1.5 w-1.5 rounded-full bg-amber-400 shrink-0" }),
2026
2026
  /* @__PURE__ */ n("p", { className: "text-[12px] text-amber-700 dark:text-amber-400", children: "An addendum is in review — coordinate transitions carefully." })
@@ -2040,7 +2040,7 @@ function ar({
2040
2040
  /* @__PURE__ */ n(we, { className: "ml-2 h-3 w-24" })
2041
2041
  ] })
2042
2042
  ) : /* @__PURE__ */ n(
2043
- Zn,
2043
+ er,
2044
2044
  {
2045
2045
  states: O,
2046
2046
  allTransitions: (o == null ? void 0 : o.all_transitions) ?? [],
@@ -2051,9 +2051,9 @@ function ar({
2051
2051
  skippedStates: s
2052
2052
  }
2053
2053
  ),
2054
- (o == null ? void 0 : o.branches) && /* @__PURE__ */ n(An, { data: o.branches }),
2054
+ (o == null ? void 0 : o.branches) && /* @__PURE__ */ n(On, { data: o.branches }),
2055
2055
  /* @__PURE__ */ n(
2056
- Jn,
2056
+ Zn,
2057
2057
  {
2058
2058
  history: Z ?? [],
2059
2059
  completedAt: v.completed_at
@@ -2063,7 +2063,7 @@ function ar({
2063
2063
  /* @__PURE__ */ i("div", { className: "space-y-3 px-5 py-4", children: [
2064
2064
  !v.completed_at && /* @__PURE__ */ n(Ln, { collection: t, itemId: String(e) }),
2065
2065
  /* @__PURE__ */ n(
2066
- nr,
2066
+ rr,
2067
2067
  {
2068
2068
  collection: t,
2069
2069
  item: e,
@@ -2110,7 +2110,7 @@ function ar({
2110
2110
  ]
2111
2111
  }
2112
2112
  ),
2113
- I && /* @__PURE__ */ n("div", { className: "mt-3", children: /* @__PURE__ */ n(er, { history: Z ?? [] }) })
2113
+ I && /* @__PURE__ */ n("div", { className: "mt-3", children: /* @__PURE__ */ n(tr, { history: Z ?? [] }) })
2114
2114
  ] })
2115
2115
  ] }) : /* @__PURE__ */ i("div", { className: "flex items-center justify-between gap-4 px-5 py-4", children: [
2116
2116
  /* @__PURE__ */ n("p", { className: "text-[13px] text-slate-500", children: "Pipeline not started for this record." }),
@@ -2133,8 +2133,8 @@ function ar({
2133
2133
  ]
2134
2134
  }
2135
2135
  ),
2136
- u && /* @__PURE__ */ n(Pt, { fallback: null, children: /* @__PURE__ */ n(
2137
- Et,
2136
+ u && /* @__PURE__ */ n(Dt, { fallback: null, children: /* @__PURE__ */ n(
2137
+ jt,
2138
2138
  {
2139
2139
  payload: u.payload,
2140
2140
  transitionId: u.transitionId,
@@ -2156,14 +2156,14 @@ function ar({
2156
2156
  ) })
2157
2157
  ] });
2158
2158
  }
2159
- function Ur({
2159
+ function Br({
2160
2160
  collection: t,
2161
2161
  item: e,
2162
2162
  onBeforeTransition: r,
2163
2163
  wrap: a = !0
2164
2164
  }) {
2165
2165
  return e === "new" ? null : /* @__PURE__ */ n(
2166
- sr,
2166
+ ir,
2167
2167
  {
2168
2168
  collection: t,
2169
2169
  item: e,
@@ -2172,15 +2172,15 @@ function Ur({
2172
2172
  }
2173
2173
  );
2174
2174
  }
2175
- function sr({
2175
+ function ir({
2176
2176
  collection: t,
2177
2177
  item: e,
2178
2178
  onBeforeTransition: r,
2179
2179
  wrap: a = !0
2180
2180
  }) {
2181
- const l = xe(), c = Re(), [m, b] = j(""), [h, _] = j(null), [k, w] = j(null), [q, F] = j(null), [L, A] = j([]), B = Xt(t, String(e));
2182
- At(t, e, "transition", !!h || !!k);
2183
- const I = ae(null), R = Rn(I, !a), D = ae(!1), Q = (s) => {
2181
+ const l = xe(), c = Re(), [m, b] = j(""), [h, _] = j(null), [k, w] = j(null), [q, F] = j(null), [B, A] = j([]), L = Yt(t, String(e));
2182
+ Ot(t, e, "transition", !!h || !!k);
2183
+ const I = ae(null), R = Mn(I, !a), D = ae(!1), Q = (s) => {
2184
2184
  D.current || (D.current = !0, F(null), S.mutate(s, {
2185
2185
  onSettled: (p, x) => {
2186
2186
  if (x) {
@@ -2209,13 +2209,13 @@ function sr({
2209
2209
  }
2210
2210
  if (!W) return;
2211
2211
  }
2212
- const p = (G ?? []).find((W) => W.id === s), x = String((p == null ? void 0 : p.comment_mode) ?? "none"), M = Jt(p, (d == null ? void 0 : d.states) ?? [], (P = d == null ? void 0 : d.instance) == null ? void 0 : P.current_state);
2212
+ const p = (G ?? []).find((W) => W.id === s), x = String((p == null ? void 0 : p.comment_mode) ?? "none"), M = Zt(p, (d == null ? void 0 : d.states) ?? [], (P = d == null ? void 0 : d.instance) == null ? void 0 : P.current_state);
2213
2213
  if (x !== "optional" && x !== "required") {
2214
2214
  if (p && !De(p, (d == null ? void 0 : d.states) ?? [], (v = d == null ? void 0 : d.instance) == null ? void 0 : v.current_state)) {
2215
2215
  D.current = !0;
2216
2216
  let W = [];
2217
2217
  try {
2218
- W = await B();
2218
+ W = await L();
2219
2219
  } finally {
2220
2220
  D.current = !1;
2221
2221
  }
@@ -2232,7 +2232,7 @@ function sr({
2232
2232
  return;
2233
2233
  }
2234
2234
  A([]), _(s);
2235
- }, g = ["pipeline-instance", t, e], { settling: N, settle: T } = zt(g), { data: d } = le({
2235
+ }, g = ["pipeline-instance", t, e], { settling: N, settle: T } = Ht(g), { data: d } = le({
2236
2236
  queryKey: g,
2237
2237
  queryFn: () => l.request(
2238
2238
  ce(`/pipelines/instance/${t}/${e}`)
@@ -2247,7 +2247,7 @@ function sr({
2247
2247
  }
2248
2248
  ),
2249
2249
  staleTime: 1e4
2250
- }), K = Ht(
2250
+ }), K = Gt(
2251
2251
  d ? (d.available_transitions ?? []).map((s) => String(s.id)) : null,
2252
2252
  `${t}:${e}`
2253
2253
  ), { data: te } = le({
@@ -2256,9 +2256,9 @@ function sr({
2256
2256
  ce(`/pipelines/instance/${t}/${e}/owners/all`)
2257
2257
  ).then((s) => s.data ?? null),
2258
2258
  // Also while a move is being confirmed: the panel names where it really lands.
2259
- enabled: tn(d) || !!h,
2259
+ enabled: nn(d) || !!h,
2260
2260
  staleTime: 3e4
2261
- }), y = Le(() => {
2261
+ }), y = Be(() => {
2262
2262
  if (!te) return null;
2263
2263
  const s = /* @__PURE__ */ new Map();
2264
2264
  for (const [p, x] of Object.entries(te))
@@ -2281,7 +2281,7 @@ function sr({
2281
2281
  onMutate: (s) => {
2282
2282
  var p;
2283
2283
  return {
2284
- slow: an(
2284
+ slow: sn(
2285
2285
  (p = [...(d == null ? void 0 : d.available_transitions) ?? [], ...(d == null ? void 0 : d.all_transitions) ?? []].find(
2286
2286
  (x) => x.id === s.transition_id
2287
2287
  )) == null ? void 0 : p.label
@@ -2289,15 +2289,15 @@ function sr({
2289
2289
  };
2290
2290
  },
2291
2291
  onSuccess: (s, p, x) => {
2292
- c.invalidateQueries({ queryKey: g }), t === "nivaro_addendums" && c.invalidateQueries({ queryKey: ["addendums"] }), Ee(c, t, String(e)), Pe(c, t, String(e)), sn(c, t, String(e)), F(null), b(""), _(null), w(null), X.success(rn(d, p.transition_id, s), x == null ? void 0 : x.slow.done());
2292
+ c.invalidateQueries({ queryKey: g }), t === "nivaro_addendums" && c.invalidateQueries({ queryKey: ["addendums"] }), Ee(c, t, String(e)), Pe(c, t, String(e)), ln(c, t, String(e)), F(null), b(""), _(null), w(null), X.success(an(d, p.transition_id, s), x == null ? void 0 : x.slow.done());
2293
2293
  },
2294
2294
  onError: (s, p, x) => {
2295
2295
  var W;
2296
- if (x == null || x.slow.fail(), jt(s)) {
2296
+ if (x == null || x.slow.fail(), It(s)) {
2297
2297
  c.invalidateQueries({ queryKey: g });
2298
2298
  return;
2299
2299
  }
2300
- const M = Qt(s);
2300
+ const M = Wt(s);
2301
2301
  if (M) {
2302
2302
  _(null);
2303
2303
  const Z = ((W = [...(d == null ? void 0 : d.available_transitions) ?? [], ...(d == null ? void 0 : d.all_transitions) ?? []].find(
@@ -2315,7 +2315,7 @@ function sr({
2315
2315
  });
2316
2316
  return;
2317
2317
  }
2318
- const P = It(s);
2318
+ const P = Kt(s);
2319
2319
  if (P) {
2320
2320
  w((Z) => ({
2321
2321
  payload: P,
@@ -2326,14 +2326,14 @@ function sr({
2326
2326
  return;
2327
2327
  }
2328
2328
  const v = s == null ? void 0 : s.response;
2329
- F(Wt(s, p)), X.error(Me(s, "Failed to execute transition"), {
2329
+ F(zt(s, p)), X.error(Me(s, "Failed to execute transition"), {
2330
2330
  duration: 12e3,
2331
2331
  // What to do next + Copy details (lib/error-toast.ts); "Why?" below wins the action slot.
2332
- ...Ft(s, { action: "Transition" }),
2332
+ ...At(s, { action: "Transition" }),
2333
2333
  // #1867: a refusal carries "Why?" — the role, owner or access rule
2334
2334
  // that stopped it, and who can change it.
2335
2335
  ...Lt(s) ? {
2336
- action: Bt(l, {
2336
+ action: Et(l, {
2337
2337
  collection: t,
2338
2338
  itemId: String(e),
2339
2339
  action: "transition",
@@ -2357,9 +2357,9 @@ function sr({
2357
2357
  }
2358
2358
  E.current(P.id);
2359
2359
  };
2360
- return window.addEventListener(Be, s), () => window.removeEventListener(Be, s);
2360
+ return window.addEventListener(Le, s), () => window.removeEventListener(Le, s);
2361
2361
  }, [t, e]), !(d != null && d.binding) || !(d != null && d.instance)) return null;
2362
- const G = nn(
2362
+ const G = rn(
2363
2363
  (d.available_transitions ?? []).filter(
2364
2364
  (s) => !d.instance.completed_at || s.from_state && String(s.from_state).toUpperCase() === String(d.instance.current_state).toUpperCase()
2365
2365
  ),
@@ -2368,7 +2368,7 @@ function sr({
2368
2368
  d.instance.completed_at ? null : y
2369
2369
  );
2370
2370
  if (G.length === 0) return null;
2371
- const z = new Map((d.states ?? []).map((s) => [s.id, s])), oe = d.instance.current_state_obj ?? null, $ = h ? G.find((s) => s.id === h) : null, o = $ ? z.get($.to_state) : null, ue = on($, oe, d.states ?? [], te), me = (ue == null ? void 0 : ue.state) ?? o, ne = /* @__PURE__ */ new Map();
2371
+ const z = new Map((d.states ?? []).map((s) => [s.id, s])), oe = d.instance.current_state_obj ?? null, $ = h ? G.find((s) => s.id === h) : null, o = $ ? z.get($.to_state) : null, ue = dn($, oe, d.states ?? [], te), me = (ue == null ? void 0 : ue.state) ?? o, ne = /* @__PURE__ */ new Map();
2372
2372
  for (const s of G) {
2373
2373
  const p = ne.get(s.label) ?? [];
2374
2374
  p.push(s), ne.set(s.label, p);
@@ -2403,8 +2403,8 @@ function sr({
2403
2403
  }
2404
2404
  ) }),
2405
2405
  /* @__PURE__ */ n(Ye, { align: "end", className: "min-w-[200px]", children: Array.from(ne.entries()).map(
2406
- ([s, p], x, M) => p.length === 1 ? /* @__PURE__ */ i(yt, { children: [
2407
- x > 0 && M[x - 1][1].length > 1 && /* @__PURE__ */ n(wt, {}),
2406
+ ([s, p], x, M) => p.length === 1 ? /* @__PURE__ */ i(wt, { children: [
2407
+ x > 0 && M[x - 1][1].length > 1 && /* @__PURE__ */ n(vt, {}),
2408
2408
  /* @__PURE__ */ i(Oe, { onSelect: () => u(p[0].id), children: [
2409
2409
  p[0].color && /* @__PURE__ */ n(
2410
2410
  "span",
@@ -2415,9 +2415,9 @@ function sr({
2415
2415
  ),
2416
2416
  s
2417
2417
  ] })
2418
- ] }, s) : /* @__PURE__ */ i(yt, { children: [
2419
- x > 0 && /* @__PURE__ */ n(wt, {}),
2420
- /* @__PURE__ */ n(Dn, { className: "text-[11px] text-muted-foreground", children: s }),
2418
+ ] }, s) : /* @__PURE__ */ i(wt, { children: [
2419
+ x > 0 && /* @__PURE__ */ n(vt, {}),
2420
+ /* @__PURE__ */ n(Fn, { className: "text-[11px] text-muted-foreground", children: s }),
2421
2421
  ke(p).map((P) => {
2422
2422
  var v;
2423
2423
  return /* @__PURE__ */ i(Oe, { onSelect: () => u(P.id), children: [
@@ -2438,7 +2438,7 @@ function sr({
2438
2438
  {
2439
2439
  className: a ? "flex flex-wrap justify-end gap-2" : "flex shrink-0 items-center justify-end gap-2",
2440
2440
  children: [
2441
- /* @__PURE__ */ n(Zt, { flags: d == null ? void 0 : d.flags }),
2441
+ /* @__PURE__ */ n(en, { flags: d == null ? void 0 : d.flags }),
2442
2442
  Array.from(ne.entries()).map(([s, p]) => {
2443
2443
  var W, Z;
2444
2444
  const x = p.some((O) => {
@@ -2461,7 +2461,7 @@ function sr({
2461
2461
  K.press(O.id) && u(O.id);
2462
2462
  },
2463
2463
  children: [
2464
- de ? /* @__PURE__ */ n(pe, { className: "h-3 w-3 animate-spin" }) : x && /* @__PURE__ */ n(Tt, { className: "h-3 w-3", "aria-hidden": !0 }),
2464
+ de ? /* @__PURE__ */ n(pe, { className: "h-3 w-3 animate-spin" }) : x && /* @__PURE__ */ n(qt, { className: "h-3 w-3", "aria-hidden": !0 }),
2465
2465
  s
2466
2466
  ]
2467
2467
  },
@@ -2470,7 +2470,7 @@ function sr({
2470
2470
  return O.pushes && O.pushes > 0 ? /* @__PURE__ */ i("span", { className: "relative inline-flex", children: [
2471
2471
  fe,
2472
2472
  /* @__PURE__ */ n(
2473
- qn,
2473
+ Rn,
2474
2474
  {
2475
2475
  collection: t,
2476
2476
  itemId: e,
@@ -2529,10 +2529,10 @@ function sr({
2529
2529
  /* @__PURE__ */ n(ve, { label: me.label, color: me.color, small: !0 })
2530
2530
  ] })
2531
2531
  ] }),
2532
- /* @__PURE__ */ n(dn, { landing: ue }),
2533
- /* @__PURE__ */ n(en, { collection: t, item: String(e), tx: $ }),
2534
- /* @__PURE__ */ n(cn, { collection: t, item: e, omitLines: L }),
2535
- /* @__PURE__ */ n(Yt, { lines: L }),
2532
+ /* @__PURE__ */ n(cn, { landing: ue }),
2533
+ /* @__PURE__ */ n(tn, { collection: t, item: String(e), tx: $ }),
2534
+ /* @__PURE__ */ n(un, { collection: t, item: e, omitLines: B }),
2535
+ /* @__PURE__ */ n(Jt, { lines: B }),
2536
2536
  /* @__PURE__ */ n(
2537
2537
  "input",
2538
2538
  {
@@ -2567,7 +2567,7 @@ function sr({
2567
2567
  comment: m.trim() || void 0
2568
2568
  }),
2569
2569
  children: S.isPending ? /* @__PURE__ */ n(pe, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ i(be, { children: [
2570
- /* @__PURE__ */ n("span", { children: L.length > 0 && $ ? `${$.label} anyway` : "Confirm" }),
2570
+ /* @__PURE__ */ n("span", { children: B.length > 0 && $ ? `${$.label} anyway` : "Confirm" }),
2571
2571
  /* @__PURE__ */ n(je, { className: "h-3 w-3" })
2572
2572
  ] })
2573
2573
  }
@@ -2577,7 +2577,7 @@ function sr({
2577
2577
  }
2578
2578
  ),
2579
2579
  q && !h && /* @__PURE__ */ n(
2580
- ln,
2580
+ on,
2581
2581
  {
2582
2582
  collection: t,
2583
2583
  item: String(e),
@@ -2588,8 +2588,8 @@ function sr({
2588
2588
  onFixed: () => Q({ transition_id: q.transitionId, comment: q.comment })
2589
2589
  }
2590
2590
  ),
2591
- k && /* @__PURE__ */ n(Pt, { fallback: null, children: /* @__PURE__ */ n(
2592
- Et,
2591
+ k && /* @__PURE__ */ n(Dt, { fallback: null, children: /* @__PURE__ */ n(
2592
+ jt,
2593
2593
  {
2594
2594
  payload: k.payload,
2595
2595
  transitionId: k.transitionId,
@@ -2613,25 +2613,25 @@ function sr({
2613
2613
  }
2614
2614
  export {
2615
2615
  $e as FRESH_BUTTON_MS,
2616
- Nt as FRESH_HOVER_MAX_MS,
2617
- Qn as FreshButtonGuard,
2618
- Or as PipelinePanel,
2619
- Ur as PipelineTransitionButtons,
2620
- In as REFUSAL_FIX_ACTIONS,
2621
- Zt as RecordFlagChips,
2622
- Vn as SLOW_MOVE_MS,
2623
- Jt as asksFirst,
2624
- zn as briefAgeText,
2625
- Hn as briefDiffPair,
2626
- _t as briefLineKey,
2627
- Wn as briefWarnings,
2628
- jt as isDuplicateTransition,
2629
- Xn as latestSendBack,
2630
- Qt as lockedMoveOffer,
2631
- Kt as refusalCode,
2632
- Wt as refusalFixFor,
2633
- an as slowMoveToast,
2634
- It as transitionRequirementsFromError,
2635
- rn as transitionToastText,
2636
- nn as withoutSkippedSendBacks
2616
+ _t as FRESH_HOVER_MAX_MS,
2617
+ Wn as FreshButtonGuard,
2618
+ Ur as PipelinePanel,
2619
+ Br as PipelineTransitionButtons,
2620
+ Kn as REFUSAL_FIX_ACTIONS,
2621
+ en as RecordFlagChips,
2622
+ Xn as SLOW_MOVE_MS,
2623
+ Zt as asksFirst,
2624
+ Hn as briefAgeText,
2625
+ Gn as briefDiffPair,
2626
+ St as briefLineKey,
2627
+ zn as briefWarnings,
2628
+ It as isDuplicateTransition,
2629
+ Yn as latestSendBack,
2630
+ Wt as lockedMoveOffer,
2631
+ Qt as refusalCode,
2632
+ zt as refusalFixFor,
2633
+ sn as slowMoveToast,
2634
+ Kt as transitionRequirementsFromError,
2635
+ an as transitionToastText,
2636
+ rn as withoutSkippedSendBacks
2637
2637
  };