@nivaro/react 0.3.61 → 0.3.63

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,90 +1,91 @@
1
1
  import { jsxs as c, jsx as n, Fragment as Be } from "react/jsx-runtime";
2
2
  import { useQueryClient as ya, useMutation as yt, useQuery as le, useQueries as fa } from "@tanstack/react-query";
3
- import { FileDiff as Zo, RotateCw as pr, Network as ei, Map as ti, Sparkles as mr, X as fr, Rows3 as as, ListChecks as ni, Rows2 as ai, ChevronDown as Bn, Wand2 as rs, FileText as ls, Bell as ri, BellOff as li, Loader2 as si, Check as oi, Search as $s, Pin as ii } from "lucide-react";
4
- import di, { useState as k, useRef as me, useEffect as pe, useMemo as xe, useLayoutEffect as ci } from "react";
5
- import { createPortal as qs } from "react-dom";
3
+ import { FileDiff as ti, RotateCw as pr, Network as ni, Map as ai, Sparkles as mr, X as fr, Rows3 as as, ListChecks as ri, Rows2 as li, ChevronDown as Bn, Wand2 as rs, FileText as ls, Bell as si, BellOff as oi, Loader2 as ii, Check as di, Search as qs, Pin as ci } from "lucide-react";
4
+ import ui, { useState as k, useRef as me, useEffect as pe, useMemo as xe, useLayoutEffect as pi } from "react";
5
+ import { createPortal as Ts } from "react-dom";
6
6
  import { toast as we } from "sonner";
7
- import { useNivaroClient as ut, useItemNavigation as Ts, useOverlayState as ui, useItemEditAuth as ga, useApiFetchConfig as pi } from "../context.js";
7
+ import { useNivaroClient as ut, useItemNavigation as Ls, useOverlayState as mi, useItemEditAuth as ga, useApiFetchConfig as fi } from "../context.js";
8
8
  import { useDebounced as ss } from "../hooks/useDebounced.js";
9
- import { useElapsedLoading as mi } from "../hooks/useElapsedLoading.js";
10
- import { useSlowReason as fi } from "../hooks/useSlowReason.js";
11
- import { useBulkProgressFeed as bi, newBulkProgressId as hi, startBulkProgress as gi, endBulkProgress as xi } from "../lib/bulk-progress.js";
12
- import { warmPageLookups as vi } from "../lib/cbv-page-warm.js";
9
+ import { useElapsedLoading as bi } from "../hooks/useElapsedLoading.js";
10
+ import { useSlowReason as hi } from "../hooks/useSlowReason.js";
11
+ import { useBulkProgressFeed as gi, newBulkProgressId as xi, startBulkProgress as vi, endBulkProgress as ki } from "../lib/bulk-progress.js";
12
+ import { warmPageLookups as yi } from "../lib/cbv-page-warm.js";
13
13
  import { post as _e, get as X, patch as pa, del as ba } from "../lib/commands.js";
14
- import { parseDateFilter as xa, dateFilterBounds as ki, describeDateFilter as yi, DATE_FILTER_OPS as wi, formatDateFilter as _i } from "../lib/date-filter.js";
15
- import { errorSentence as Ni } from "../lib/error-message.js";
16
- import { toastError as Si, errorToastOptions as br } from "../lib/error-toast.js";
17
- import { extractExpressionTokens as Ci, evaluateNumeric as os } from "../lib/expression.js";
18
- import { clauseFromCondition as hr, clauseFromControlValue as $i, filterSentence as qi } from "../lib/filter-sentence.js";
19
- import { deliverLive as Ti, releaseLiveOwner as Li } from "../lib/focus-mode.js";
20
- import { formatValue as xn, formatMultiValue as is, countFromResolved as Fi } from "../lib/format-value.js";
21
- import { createCursorBook as Ri, pageRequest as Ei, noteNextCursor as Pi, isCursorRefusal as Di, stopCursors as Mi } from "../lib/keyset-pager.js";
22
- import { normalizeInlineEdit as Oi, inlineM2oTarget as Ai, inlineChoices as Ii, inlineEditFor as Ki, nextInlineKey as ji } from "../lib/list-inline-edit.js";
23
- import { sanitizeCbvLinkState as Bi, readListLinkFromLocation as zi, dropListLinkParam as Qi } from "../lib/list-link.js";
24
- import { rememberedListPage as Ui, pageWhileSettling as Wi, rememberListPage as Vi, restoreWindowOutcome as Hi } from "../lib/list-page-memory.js";
25
- import { expandCoalesced as Yi, LIVE_ASPECTS as vn } from "../lib/live.js";
26
- import { useRowChanges as Ji, useRowLocks as Gi, lockLabel as Xi, viewerMatches as Zi, conditionFields as ed, mayAffectMatch as td, writerOf as nd } from "../lib/live-list.js";
27
- import { loadErrorStatus as ad, listLoadErrorText as rd } from "../lib/load-error.js";
28
- import { OPEN_IN_TABS_CAP as ld, openInTabs as sd, openInTabsMessage as ds } from "../lib/open-in-tabs.js";
29
- import { isOwnWrite as od } from "../lib/own-writes.js";
30
- import { useIdleNextPage as id, intentProps as dd, prefetchRecord as cd } from "../lib/prefetch.js";
31
- import { useRowPresence as ud, rowPresenceKey as cs } from "../lib/presence-hooks.js";
32
- import { cascadeFilter as pd, fetchCascadeRelations as md } from "../lib/quick-filter-cascade.js";
33
- import { useOptionalRealtime as fd } from "../lib/realtime.js";
34
- import { rowMenuRef as yr, friendlyIdOf as us, copyWhenReady as bd, shareableRecordId as hd } from "../lib/record-ref.js";
35
- import { rowHighlightDotClass as gd, rowHighlightClass as xd } from "../lib/row-highlight.js";
14
+ import { parseDateFilter as xa, dateFilterBounds as wi, describeDateFilter as _i, DATE_FILTER_OPS as Ni, formatDateFilter as Si } from "../lib/date-filter.js";
15
+ import { errorSentence as Ci } from "../lib/error-message.js";
16
+ import { toastError as $i, errorToastOptions as br } from "../lib/error-toast.js";
17
+ import { extractExpressionTokens as qi, evaluateNumeric as os } from "../lib/expression.js";
18
+ import { clauseFromCondition as hr, clauseFromControlValue as Ti, filterSentence as Li } from "../lib/filter-sentence.js";
19
+ import { deliverLive as Fi, releaseLiveOwner as Ri } from "../lib/focus-mode.js";
20
+ import { formatValue as xn, formatMultiValue as is, countFromResolved as Ei } from "../lib/format-value.js";
21
+ import { createCursorBook as Pi, pageRequest as Di, noteNextCursor as Mi, isCursorRefusal as Oi, stopCursors as Ai } from "../lib/keyset-pager.js";
22
+ import { normalizeInlineEdit as Ii, inlineM2oTarget as Ki, inlineChoices as ji, inlineEditFor as Bi, nextInlineKey as zi } from "../lib/list-inline-edit.js";
23
+ import { sanitizeCbvLinkState as Qi, readListLinkFromLocation as Ui, dropListLinkParam as Wi } from "../lib/list-link.js";
24
+ import { rememberedListPage as Vi, pageWhileSettling as ds, rememberListPage as Hi, restoreWindowOutcome as Yi } from "../lib/list-page-memory.js";
25
+ import { expandCoalesced as Ji, LIVE_ASPECTS as vn } from "../lib/live.js";
26
+ import { useRowChanges as Gi, useRowLocks as Xi, lockLabel as Zi, viewerMatches as ed, conditionFields as td, mayAffectMatch as nd, writerOf as ad } from "../lib/live-list.js";
27
+ import { loadErrorStatus as rd, listLoadErrorText as ld } from "../lib/load-error.js";
28
+ import { OPEN_IN_TABS_CAP as sd, openInTabs as od, openInTabsMessage as cs } from "../lib/open-in-tabs.js";
29
+ import { isOwnWrite as id } from "../lib/own-writes.js";
30
+ import { useIdleNextPage as dd, intentProps as cd, prefetchRecord as ud } from "../lib/prefetch.js";
31
+ import { useRowPresence as pd, rowPresenceKey as us } from "../lib/presence-hooks.js";
32
+ import { cascadeFilter as md, fetchCascadeRelations as fd } from "../lib/quick-filter-cascade.js";
33
+ import { useOptionalRealtime as bd } from "../lib/realtime.js";
34
+ import { rowMenuRef as yr, friendlyIdOf as ps, copyWhenReady as hd, shareableRecordId as gd } from "../lib/record-ref.js";
35
+ import { rowHighlightDotClass as xd, rowHighlightClass as vd } from "../lib/row-highlight.js";
36
36
  import { userErrorMessage as Wt } from "../lib/safe-error.js";
37
- import { logSearch as vd, logSearchOpen as kd } from "../lib/search-log.js";
38
- import { shapeForField as yd } from "../lib/skeleton-shapes.js";
39
- import { knownTotalFrom as wd } from "../lib/slow-reason.js";
40
- import { useMyScopes as _d, matchScopeDimension as ps, effectiveScopeSeedIds as Nd, translateScopeValues as Sd } from "../lib/use-my-scopes.js";
41
- import { useNewItemLayouts as Cd } from "../lib/use-new-item-layouts.js";
42
- import { loadUserCard as $d, userCardQuery as qd } from "../lib/user-cards.js";
43
- import { cn as Ut, humanHours as Td } from "../lib/utils.js";
44
- import { usePublishAskContext as Ld, useAskRecordDrag as Fd } from "./ai/ask-context.js";
45
- import { useAvailableBulkActions as Rd, mergeBulkActions as Ed, guardMatches as Pd, useBuiltinGate as Dd, BulkActionButtons as Md } from "./bulk/BulkActionButtons.js";
46
- import { BulkFieldUpdate as Od } from "./bulk/BulkFieldUpdate.js";
47
- import { BulkRowMark as Ad } from "./bulk/BulkRowMark.js";
48
- import { useRowPushActions as Id, runRowPush as Kd } from "./bulk/RowPushActions.js";
49
- import { CellCopyLayer as jd } from "./CellCopyLayer.js";
50
- import { CopyAsButton as Bd } from "./CopyAsButton.js";
51
- import { useTreeConfig as zd, CollectionTree as Qd } from "./cbv/CollectionTree.js";
52
- import { relatedMissing as Ud } from "./item-edit/related-missing.js";
37
+ import { logSearch as kd, logSearchOpen as yd } from "../lib/search-log.js";
38
+ import { shapeForField as wd } from "../lib/skeleton-shapes.js";
39
+ import { knownTotalFrom as _d } from "../lib/slow-reason.js";
40
+ import { useMyScopes as Nd, matchScopeDimension as ms, effectiveScopeSeedIds as Sd, translateScopeValues as Cd } from "../lib/use-my-scopes.js";
41
+ import { useNewItemLayouts as $d } from "../lib/use-new-item-layouts.js";
42
+ import { loadUserCard as qd, userCardQuery as Td } from "../lib/user-cards.js";
43
+ import { cn as Ut, humanHours as Ld } from "../lib/utils.js";
44
+ import { usePublishAskContext as Fd, useAskRecordDrag as Rd } from "./ai/ask-context.js";
45
+ import { useAvailableBulkActions as Ed, mergeBulkActions as Pd, guardMatches as Dd, useBuiltinGate as Md, BulkActionButtons as Od } from "./bulk/BulkActionButtons.js";
46
+ import { BulkFieldUpdate as Ad } from "./bulk/BulkFieldUpdate.js";
47
+ import { BulkRowMark as Id } from "./bulk/BulkRowMark.js";
48
+ import { useRowPushActions as Kd, runRowPush as jd } from "./bulk/RowPushActions.js";
49
+ import { CellCopyLayer as Bd } from "./CellCopyLayer.js";
50
+ import { CopyAsButton as zd } from "./CopyAsButton.js";
51
+ import { useTreeConfig as Qd, CollectionTree as Ud } from "./cbv/CollectionTree.js";
53
52
  import { readExportRows as Wd, stableSort as Vd, m2oLabelPaths as Hd, resolveAllPaths as Yd, userLabel as Jd, m2oLabel as Gd, localYmd as Xd } from "./cbv/export-rows.js";
54
53
  import { FormulaColumnAdder as Zd } from "./cbv/FormulaColumnAdder.js";
55
54
  import { useHierarchyScope as ec, HierarchyScopePicker as tc } from "./cbv/HierarchyScope.js";
56
55
  import { tabStopRowKey as nc, rowFocusTarget as ac } from "./cbv/row-focus.js";
57
- import { splitRiskFilter as ms, riskFilterEntry as rc } from "./cbv/saved-view-risk.js";
58
- import { isFilterRefusal as lc, unknownFieldsOf as fs, dropUnknownField as sc } from "./cbv/unknown-fields.js";
56
+ import { splitRiskFilter as fs, riskFilterEntry as rc } from "./cbv/saved-view-risk.js";
57
+ import { isFilterRefusal as lc, unknownFieldsOf as bs, dropUnknownField as sc } from "./cbv/unknown-fields.js";
59
58
  import { ViewDefaultMenu as oc } from "./cbv/ViewDefaultMenu.js";
60
59
  import { useRecordRoomTypes as ic, canOpenChatRoom as dc, discussRecord as cc } from "./chat/chat-core.js";
61
60
  import { FilterControl as uc } from "./DataTable.js";
62
61
  import { FocusModeToggle as pc } from "./FocusModeToggle.js";
63
- import { FULFILMENT_FILTER_OPTIONS as bs, FulfilmentPill as mc, fulfilmentFigures as fc } from "./FulfilmentPill.js";
62
+ import { FULFILMENT_FILTER_OPTIONS as hs, FulfilmentPill as mc, fulfilmentFigures as fc } from "./FulfilmentPill.js";
64
63
  import { HScrollProxy as bc } from "./HScrollProxy.js";
65
64
  import { useDocumentAutofillConfig as hc, startDocumentExtraction as gc } from "./import/DocumentAutofillButton.js";
66
- import { INTEGRATIONS_FILTER_OPTIONS as hs, IntegrationDots as xc } from "./integrations/IntegrationDots.js";
65
+ import { INTEGRATIONS_FILTER_OPTIONS as gs, IntegrationDots as xc } from "./integrations/IntegrationDots.js";
67
66
  import { useQuickPickerSteps as vc, QuickPickerDialog as kc } from "./item-edit/QuickPickerDialog.js";
68
67
  import { usePickerExclusion as yc } from "./item-edit/RecordGrantTools.js";
69
- import { invalidateRecordQueries as gs } from "./item-edit/RecordLiveSync.js";
70
- import { UserRosterCluster as xs, UserChip as vs } from "./item-edit/UserChip.js";
71
- import { LiveRowMark as wc } from "./LiveRowMark.js";
72
- import { CopyListLinkButton as _c } from "./list/CopyListLinkButton.js";
73
- import { useInlineEdit as Nc, InlineEditCell as Sc } from "./list/InlineEdit.js";
74
- import { MapView as Cc } from "./MapView.js";
75
- import { usePickerExcludedRows as $c, PICKER_EXCLUDED_ROW_CLASS as qc, PICKER_EXCLUDED_TITLE as Tc } from "./PickerExcludedRows.js";
76
- import { RealtimeStaleMark as Lc } from "./RealtimeStatusBanner.js";
77
- import { RecordCompareDialog as Fc } from "./RecordCompare.js";
78
- import { RecordDrilldownSheet as Rc } from "./RecordDrilldownSheet.js";
79
- import { RowHighlightLegend as Ec } from "./RowHighlightLegend.js";
80
- import { RowPresence as Pc } from "./RowPresence.js";
81
- import { TableSkeletonRows as Dc } from "./Skeletons.js";
82
- import { SlowNoticeView as Mc } from "./SlowNotice.js";
83
- import { TipLayer as Oc } from "./TipLayer.js";
84
- import { UnseenDot as ks } from "./UnseenDot.js";
85
- import { SimpleSelectXs as kn, SimpleSelect as Ac } from "./ui/SimpleSelect.js";
86
- import { RevisionsPanel as Ic } from "./panels/RevisionsPanel.js";
87
- import { itemActionChoiceStep as Kc, ItemActionChoiceList as jc } from "./panels/ItemActionChoices.js";
68
+ import { invalidateRecordQueries as xs } from "./item-edit/RecordLiveSync.js";
69
+ import { relatedMissing as wc } from "./item-edit/related-missing.js";
70
+ import { UserRosterCluster as vs, UserChip as ks } from "./item-edit/UserChip.js";
71
+ import { LiveRowMark as _c } from "./LiveRowMark.js";
72
+ import { CopyListLinkButton as Nc } from "./list/CopyListLinkButton.js";
73
+ import { useInlineEdit as Sc, InlineEditCell as Cc } from "./list/InlineEdit.js";
74
+ import { MapView as $c } from "./MapView.js";
75
+ import { usePickerExcludedRows as qc, PICKER_EXCLUDED_ROW_CLASS as Tc, PICKER_EXCLUDED_TITLE as Lc } from "./PickerExcludedRows.js";
76
+ import { ConfirmButton as Fs } from "./profile/primitives.js";
77
+ import { RealtimeStaleMark as Fc } from "./RealtimeStatusBanner.js";
78
+ import { RecordCompareDialog as Rc } from "./RecordCompare.js";
79
+ import { RecordDrilldownSheet as Ec } from "./RecordDrilldownSheet.js";
80
+ import { RowHighlightLegend as Pc } from "./RowHighlightLegend.js";
81
+ import { RowPresence as Dc } from "./RowPresence.js";
82
+ import { TableSkeletonRows as Mc } from "./Skeletons.js";
83
+ import { SlowNoticeView as Oc } from "./SlowNotice.js";
84
+ import { TipLayer as Ac } from "./TipLayer.js";
85
+ import { UnseenDot as ys } from "./UnseenDot.js";
86
+ import { SimpleSelectXs as kn, SimpleSelect as Ic } from "./ui/SimpleSelect.js";
87
+ import { RevisionsPanel as Kc } from "./panels/RevisionsPanel.js";
88
+ import { itemActionChoiceStep as jc, ItemActionChoiceList as Bc } from "./panels/ItemActionChoices.js";
88
89
  function zn(a, i, b) {
89
90
  const d = a.find((v) => v.one_collection === i && v.one_field === b);
90
91
  if (d != null && d.many_collection)
@@ -97,7 +98,7 @@ function jn(a) {
97
98
  for (const d of _r) if (i.has(d)) return d;
98
99
  return "id";
99
100
  }
100
- const ys = (a) => typeof a == "string" ? a : a.key, ws = {
101
+ const ws = (a) => typeof a == "string" ? a : a.key, _s = {
101
102
  red: "text-red-600 dark:text-red-400 font-semibold",
102
103
  amber: "text-amber-600 dark:text-amber-400 font-semibold",
103
104
  green: "text-emerald-600 dark:text-emerald-400 font-semibold",
@@ -134,7 +135,7 @@ function ma(a, i) {
134
135
  }
135
136
  return null;
136
137
  }
137
- const Bc = [
138
+ const zc = [
138
139
  { label: "None", cfg: null },
139
140
  { label: "Currency", cfg: { type: "number", decimals: 2, thousands: !0, prefix: "$" } },
140
141
  { label: "Number", cfg: { type: "number", thousands: !0 } },
@@ -168,7 +169,7 @@ function Nr(a, i, b) {
168
169
  (d) => d.many_collection === i && d.many_field === b && d.junction_field === null && d.one_collection !== null
169
170
  );
170
171
  }
171
- function zc(a) {
172
+ function Qc(a) {
172
173
  const i = new Date(String(a));
173
174
  if (Number.isNaN(i.getTime())) return String(a);
174
175
  const b = Date.now() - i.getTime(), d = Math.floor(b / 6e4);
@@ -179,8 +180,8 @@ function zc(a) {
179
180
  const _ = Math.floor(v / 24);
180
181
  return _ < 7 ? `${_}d ago` : i.toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" });
181
182
  }
182
- const ct = (a) => a.toLocaleString("en-US"), Ls = /* @__PURE__ */ new Set(["nivaro_users", "directus_users"]), Ct = (a) => a.startsWith("directus_") || a.startsWith("nivaro_"), gr = /* @__PURE__ */ new Map();
183
- function Fs(a, i, b) {
183
+ const ct = (a) => a.toLocaleString("en-US"), Rs = /* @__PURE__ */ new Set(["nivaro_users", "directus_users"]), Ct = (a) => a.startsWith("directus_") || a.startsWith("nivaro_"), gr = /* @__PURE__ */ new Map();
184
+ function Es(a, i, b) {
184
185
  let d = gr.get(i);
185
186
  d || (d = { ids: /* @__PURE__ */ new Set(), waiters: [], promise: null }, gr.set(i, d));
186
187
  const v = d;
@@ -210,16 +211,16 @@ function Fs(a, i, b) {
210
211
  }, 0);
211
212
  })), v.promise.then((_) => _.get(b) ?? null);
212
213
  }
213
- const Qc = {
214
+ const Uc = {
214
215
  draft: "draft",
215
216
  submitted: "submitted",
216
217
  review: "in review",
217
218
  approved: "approved",
218
219
  rejected: "rejected"
219
220
  };
220
- function Uc({ summary: a }) {
221
+ function Wc({ summary: a }) {
221
222
  if (!a || a.total === 0) return /* @__PURE__ */ n("span", { className: "text-[12px] text-slate-300", children: "—" });
222
- const i = a.latest, b = a.active > 0, d = i ? Qc[i.status] ?? i.status : "", v = i == null ? void 0 : i.cost_impact, _ = v != null && v !== 0 ? `${v > 0 ? "+" : "−"}$${Math.abs(v).toLocaleString(void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}` : null, C = i ? `${i.title ?? "Addendum"} — ${d}${a.total > 1 ? ` (${a.total} total)` : ""}` : void 0;
223
+ const i = a.latest, b = a.active > 0, d = i ? Uc[i.status] ?? i.status : "", v = i == null ? void 0 : i.cost_impact, _ = v != null && v !== 0 ? `${v > 0 ? "+" : "−"}$${Math.abs(v).toLocaleString(void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}` : null, C = i ? `${i.title ?? "Addendum"} — ${d}${a.total > 1 ? ` (${a.total} total)` : ""}` : void 0;
223
224
  return /* @__PURE__ */ c(
224
225
  "span",
225
226
  {
@@ -243,7 +244,7 @@ function Uc({ summary: a }) {
243
244
  );
244
245
  }
245
246
  function Sr({ relatedCollection: a, id: i }) {
246
- const b = ut(), d = Ls.has(a), v = i != null && i !== "", { data: _ } = le({
247
+ const b = ut(), d = Rs.has(a), v = i != null && i !== "", { data: _ } = le({
247
248
  queryKey: ["cbv-collection-meta", a],
248
249
  queryFn: () => b.request(X(`/collections/${a}`)).then((N) => N.data),
249
250
  staleTime: 10 * 6e4,
@@ -251,7 +252,7 @@ function Sr({ relatedCollection: a, id: i }) {
251
252
  retry: !1
252
253
  }), { data: C, isLoading: $ } = le({
253
254
  queryKey: ["cbv-relation-item", a, String(i)],
254
- queryFn: () => d ? b.request(X(`/users/${i}`)).then((N) => N.data) : Fs(b, a, String(i)),
255
+ queryFn: () => d ? b.request(X(`/users/${i}`)).then((N) => N.data) : Es(b, a, String(i)),
255
256
  enabled: v && (d || !Ct(a)),
256
257
  staleTime: 30 * 6e4,
257
258
  retry: !1
@@ -260,7 +261,7 @@ function Sr({ relatedCollection: a, id: i }) {
260
261
  if ($)
261
262
  return /* @__PURE__ */ n("span", { className: "inline-block h-3.5 w-24 animate-pulse rounded bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" });
262
263
  if (!C) {
263
- const N = Ud(null);
264
+ const N = wc(null);
264
265
  return /* @__PURE__ */ n(
265
266
  "span",
266
267
  {
@@ -276,10 +277,10 @@ function Sr({ relatedCollection: a, id: i }) {
276
277
  ) : va((_ == null ? void 0 : _.display_template) ?? null, C);
277
278
  return /* @__PURE__ */ n("span", { className: "text-[12px] text-slate-700 dark:text-slate-200", children: S });
278
279
  }
279
- function Rs(a, i, b, d, v, _) {
280
+ function Ps(a, i, b, d, v, _) {
280
281
  const C = i.getQueryData(["cbv-collection-meta", b]);
281
- return bd(
282
- hd(a, b, C, d, v).then(
282
+ return hd(
283
+ gd(a, b, C, d, v).then(
283
284
  ($) => window.location.origin + _({ collection: b, itemId: $ })
284
285
  )
285
286
  ).catch(() => {
@@ -297,17 +298,17 @@ function ha(a, i) {
297
298
  ])
298
299
  a.invalidateQueries({ queryKey: [b, i] });
299
300
  }
300
- function Wc(a, i) {
301
+ function Vc(a, i) {
301
302
  return a ? a.is_admin ? !0 : (a.collections ?? []).some(
302
303
  (b) => (b.collection === i || b.collection === "*") && (b.actions.includes("update") || b.actions.includes("*"))
303
304
  ) : !1;
304
305
  }
305
- function Vc(a, i) {
306
+ function Hc(a, i) {
306
307
  return a ? a.is_admin ? !0 : (a.collections ?? []).some(
307
308
  (b) => (b.collection === i || b.collection === "*") && (b.actions.includes("delete") || b.actions.includes("*"))
308
309
  ) : !1;
309
310
  }
310
- function Hc({
311
+ function Yc({
311
312
  collection: a,
312
313
  id: i,
313
314
  hasPipeline: b,
@@ -338,7 +339,7 @@ function Hc({
338
339
  queryFn: () => u.request(X("/security/my/permissions")).then((h) => h.data),
339
340
  enabled: m && !W,
340
341
  staleTime: 5 * 6e4
341
- }), ve = W || Vc(oe, a), J = yc(a, String(i), {
342
+ }), ve = W || Hc(oe, a), J = yc(a, String(i), {
342
343
  enabled: m && W,
343
344
  onDone: () => L(!1)
344
345
  }), [G, Me] = k(!1), Je = ic(m), ae = dc() && !!(Je != null && Je.some((h) => h.collection === a));
@@ -363,8 +364,8 @@ function Hc({
363
364
  }), pt = xe(
364
365
  () => ((se == null ? void 0 : se.available_transitions) ?? []).filter((h) => h.in_row_menu !== !1),
365
366
  [se]
366
- ), { data: F } = Rd(m ? [a] : []), ee = xe(
367
- () => m ? Ed(F, [a], K).filter(
367
+ ), { data: F } = Ed(m ? [a] : []), ee = xe(
368
+ () => m ? Pd(F, [a], K).filter(
368
369
  // Transition-kind registry actions (Cancel / Uncancel) are the pipeline
369
370
  // transitions already listed above — never the same move twice.
370
371
  (h) => h.kind !== "builtin" && h.kind !== "transition"
@@ -391,8 +392,8 @@ function Hc({
391
392
  return !((te = E.guard) != null && te.length);
392
393
  });
393
394
  const h = { ...ce ?? {}, ...N ?? {} };
394
- return ee.filter((E) => Pd(E.guard, h) !== !1);
395
- }, [ee, fe, ce, N]), { pushActions: U, failedPartners: ie } = Id({
395
+ return ee.filter((E) => Dd(E.guard, h) !== !1);
396
+ }, [ee, fe, ce, N]), { pushActions: U, failedPartners: ie } = Kd({
396
397
  collection: a,
397
398
  id: i,
398
399
  open: m,
@@ -440,8 +441,8 @@ function Hc({
440
441
  staleTime: 0
441
442
  }), [Kt, sn] = k(null), wn = (Ke == null ? void 0 : Ke.id) ?? null;
442
443
  pe(() => sn(null), [wn]);
443
- const Xe = Vt.data ? Kc(Vt.data) : null, ft = Xe && !Xe.ask ? Xe.value : Kt, Pt = !!Ke && (!Xe || Xe.ask && Kt == null);
444
- di.useLayoutEffect(() => {
444
+ const Xe = Vt.data ? jc(Vt.data) : null, ft = Xe && !Xe.ask ? Xe.value : Kt, Pt = !!Ke && (!Xe || Xe.ask && Kt == null);
445
+ ui.useLayoutEffect(() => {
445
446
  var Ve;
446
447
  if (!m) return;
447
448
  const h = Z.current;
@@ -462,7 +463,7 @@ function Hc({
462
463
  })
463
464
  ),
464
465
  onSuccess: () => {
465
- L(!1), we.success("Transitioned"), ha(w, a), gs(w, a, [i]), S == null || S();
466
+ L(!1), we.success("Transitioned"), ha(w, a), xs(w, a, [i]), S == null || S();
466
467
  },
467
468
  onError: (h) => we.error(
468
469
  Wt(h, "Transition failed"),
@@ -483,14 +484,14 @@ function Hc({
483
484
  we.info(`${h.label}: nothing to change`);
484
485
  return;
485
486
  }
486
- we.success(h.label), ha(w, a), gs(w, a, [i]), S == null || S();
487
+ we.success(h.label), ha(w, a), xs(w, a, [i]), S == null || S();
487
488
  },
488
489
  onError: (h) => {
489
490
  const E = h.response;
490
491
  we.error((E == null ? void 0 : E.error) ?? Wt(h, "Action failed"), br(h));
491
492
  }
492
493
  }), qt = yt({
493
- mutationFn: ({ op: h, note: E, pick: te }) => Kd(u, a, i, h, E, te).then((Se) => ({ op: h, outcome: Se })),
494
+ mutationFn: ({ op: h, note: E, pick: te }) => jd(u, a, i, h, E, te).then((Se) => ({ op: h, outcome: Se })),
494
495
  onSuccess: ({ op: h, outcome: E }) => {
495
496
  L(!1);
496
497
  const te = h.kind === "push" ? h.action.label : "Retry";
@@ -540,7 +541,7 @@ function Hc({
540
541
  ]
541
542
  }
542
543
  ),
543
- m && qs(
544
+ m && Ts(
544
545
  /* @__PURE__ */ n(
545
546
  "div",
546
547
  {
@@ -570,7 +571,7 @@ function Hc({
570
571
  }
571
572
  ),
572
573
  (Ke == null ? void 0 : Ke.choose) && (Vt.isError ? /* @__PURE__ */ n("p", { className: "mb-1.5 px-1 text-[11.5px] text-red-600 dark:text-red-400", children: "Could not load the options." }) : Vt.isLoading ? /* @__PURE__ */ n("p", { className: "mb-1.5 px-1 text-[11.5px] text-slate-500 dark:text-slate-400", children: "Loading…" }) : Xe != null && Xe.ask ? /* @__PURE__ */ n("div", { className: "mb-1.5 -mt-3 px-1", children: /* @__PURE__ */ n(
573
- jc,
574
+ Bc,
574
575
  {
575
576
  choose: Ke.choose,
576
577
  options: Vt.data ?? [],
@@ -754,7 +755,7 @@ function Hc({
754
755
  L(!1), (h = navigator.clipboard) == null || h.writeText(R.copy ?? ""), we.success("ID copied");
755
756
  }),
756
757
  wt("Copy link", () => {
757
- L(!1), Rs(u, w, a, N, i, C), we.success("Link copied");
758
+ L(!1), Ps(u, w, a, N, i, C), we.success("Link copied");
758
759
  }),
759
760
  W && /* @__PURE__ */ c(Be, { children: [
760
761
  Ze,
@@ -822,7 +823,7 @@ function Hc({
822
823
  function xr(a) {
823
824
  return a === "id" || /(^|_)id$/i.test(a) || /(^|_)uuid$/i.test(a);
824
825
  }
825
- function _s({
826
+ function Ns({
826
827
  collection: a,
827
828
  field: i,
828
829
  fieldType: b,
@@ -850,7 +851,7 @@ function _s({
850
851
  );
851
852
  return /* @__PURE__ */ n("span", { className: "text-[12px] tabular-nums text-slate-400", children: $ });
852
853
  }
853
- return /* @__PURE__ */ n("span", { className: "text-[12px] tabular-nums text-slate-400", children: zc(d) });
854
+ return /* @__PURE__ */ n("span", { className: "text-[12px] tabular-nums text-slate-400", children: Qc(d) });
854
855
  }
855
856
  return typeof d == "string" ? /* @__PURE__ */ n(
856
857
  "span",
@@ -980,7 +981,7 @@ function wa({
980
981
  ] })
981
982
  ] });
982
983
  }
983
- function Yc({
984
+ function Jc({
984
985
  target: a,
985
986
  label: i,
986
987
  selected: b,
@@ -1051,7 +1052,7 @@ function Yc({
1051
1052
  }
1052
1053
  );
1053
1054
  }
1054
- function Jc({
1055
+ function Gc({
1055
1056
  collection: a,
1056
1057
  field: i,
1057
1058
  selected: b,
@@ -1079,7 +1080,7 @@ function Jc({
1079
1080
  }
1080
1081
  );
1081
1082
  }
1082
- function Gc({
1083
+ function Xc({
1083
1084
  value: a,
1084
1085
  onChange: i
1085
1086
  }) {
@@ -1101,7 +1102,7 @@ function Gc({
1101
1102
  var w;
1102
1103
  if (!a) return "All";
1103
1104
  const u = xa(a);
1104
- return u ? yi(u) : ((w = ka.find((W) => W.value === a)) == null ? void 0 : w.label) ?? a;
1105
+ return u ? _i(u) : ((w = ka.find((W) => W.value === a)) == null ? void 0 : w.label) ?? a;
1105
1106
  })(), [K, z] = k("between");
1106
1107
  pe(() => {
1107
1108
  var u;
@@ -1109,7 +1110,7 @@ function Gc({
1109
1110
  }, [b, a]);
1110
1111
  const P = () => {
1111
1112
  const u = v || C;
1112
- u && (i(_i({ op: K, from: u, to: C || v || u })), d(!1));
1113
+ u && (i(Si({ op: K, from: u, to: C || v || u })), d(!1));
1113
1114
  };
1114
1115
  return /* @__PURE__ */ c("div", { ref: S, className: "relative w-full", children: [
1115
1116
  /* @__PURE__ */ c(
@@ -1154,7 +1155,7 @@ function Gc({
1154
1155
  )) }),
1155
1156
  /* @__PURE__ */ c("div", { className: "border-t border-slate-100 p-2 dark:border-slate-800", children: [
1156
1157
  /* @__PURE__ */ n("p", { className: "pb-1 text-[10px] font-semibold uppercase tracking-wide text-slate-400", children: "Date or range" }),
1157
- /* @__PURE__ */ n("div", { className: "grid grid-cols-3 gap-1 pb-1.5", children: wi.map((u) => /* @__PURE__ */ n(
1158
+ /* @__PURE__ */ n("div", { className: "grid grid-cols-3 gap-1 pb-1.5", children: Ni.map((u) => /* @__PURE__ */ n(
1158
1159
  "button",
1159
1160
  {
1160
1161
  type: "button",
@@ -1204,7 +1205,7 @@ function Gc({
1204
1205
  ] })
1205
1206
  ] });
1206
1207
  }
1207
- function Xc({
1208
+ function Zc({
1208
1209
  def: a,
1209
1210
  selected: i,
1210
1211
  onChange: b,
@@ -1225,9 +1226,9 @@ function Xc({
1225
1226
  i.map(String).sort().join(",")
1226
1227
  ],
1227
1228
  queryFn: async () => {
1228
- const R = z !== "[]" ? pd(
1229
+ const R = z !== "[]" ? md(
1229
1230
  a.collection,
1230
- await md(C, $, a.collection),
1231
+ await fd(C, $, a.collection),
1231
1232
  _
1232
1233
  ) : null, m = (q, Z) => C.request(
1233
1234
  X(`/items/${a.collection}`, {
@@ -1274,7 +1275,7 @@ function Xc({
1274
1275
  }
1275
1276
  );
1276
1277
  }
1277
- const Es = [
1278
+ const Ds = [
1278
1279
  { value: "_eq", label: "=" },
1279
1280
  { value: "_neq", label: "≠" },
1280
1281
  { value: "_gt", label: ">" },
@@ -1288,7 +1289,7 @@ const Es = [
1288
1289
  { value: "30d", label: "30 days" },
1289
1290
  { value: "90d", label: "90 days" },
1290
1291
  { value: "year", label: "This year" }
1291
- ], Zc = {
1292
+ ], eu = {
1292
1293
  _eq: "_neq",
1293
1294
  _neq: "_eq",
1294
1295
  _in: "_nin",
@@ -1302,7 +1303,7 @@ const Es = [
1302
1303
  _lt: "_gte",
1303
1304
  _lte: "_gt"
1304
1305
  };
1305
- function Ps(a) {
1306
+ function Ms(a) {
1306
1307
  const i = /* @__PURE__ */ new Date(), b = (v) => v.toISOString().slice(0, 10), d = b(i);
1307
1308
  if (a === "today") return { from: d, to: d };
1308
1309
  if (a === "7d" || a === "30d" || a === "90d") {
@@ -1311,7 +1312,7 @@ function Ps(a) {
1311
1312
  }
1312
1313
  return a === "year" ? { from: `${i.getFullYear()}-01-01`, to: d } : null;
1313
1314
  }
1314
- function Ns(a) {
1315
+ function Ss(a) {
1315
1316
  var b;
1316
1317
  const i = [];
1317
1318
  for (const d of a) {
@@ -1331,7 +1332,7 @@ function Ns(a) {
1331
1332
  continue;
1332
1333
  }
1333
1334
  if (d.op === "_preset") {
1334
- const $ = Ps(String(d.value));
1335
+ const $ = Ms(String(d.value));
1335
1336
  $ && (d.not ? i.push({
1336
1337
  or: [
1337
1338
  { path: d.path, op: "_lt", value: $.from },
@@ -1341,11 +1342,11 @@ function Ns(a) {
1341
1342
  continue;
1342
1343
  }
1343
1344
  let _ = d.op.includes(":") ? d.op.split(":")[0] : d.op, C = d.op.includes(":") ? d.op.split(":")[1] : d.value || null;
1344
- d.fieldType === "boolean" && (C === "true" || C === "false") && (C = C === "true"), d.not && (_ = Zc[_] ?? _), i.push({ path: d.path, op: _, value: C });
1345
+ d.fieldType === "boolean" && (C === "true" || C === "false") && (C = C === "true"), d.not && (_ = eu[_] ?? _), i.push({ path: d.path, op: _, value: C });
1345
1346
  }
1346
1347
  return i;
1347
1348
  }
1348
- const Ss = [
1349
+ const Cs = [
1349
1350
  { label: "Contains", value: "_contains" },
1350
1351
  { label: "Doesn't contain", value: "_ncontains" },
1351
1352
  { label: "Equals", value: "_eq" },
@@ -1369,9 +1370,9 @@ const Ss = [
1369
1370
  { label: "After", value: "_gt" },
1370
1371
  { label: "Is empty", value: "_null" },
1371
1372
  { label: "Is not empty", value: "_nnull" }
1372
- ], eu = {
1373
- string: Ss,
1374
- text: Ss,
1373
+ ], tu = {
1374
+ string: Cs,
1375
+ text: Cs,
1375
1376
  integer: vr,
1376
1377
  decimal: vr,
1377
1378
  float: vr,
@@ -1390,8 +1391,8 @@ const Ss = [
1390
1391
  { label: "Is not empty", value: "_nnull" }
1391
1392
  ]
1392
1393
  };
1393
- function tu(a) {
1394
- for (const i of Object.values(eu)) {
1394
+ function nu(a) {
1395
+ for (const i of Object.values(tu)) {
1395
1396
  const b = i.find((d) => d.value === a);
1396
1397
  if (b) return b.label;
1397
1398
  }
@@ -1459,7 +1460,7 @@ function Cr({
1459
1460
  }
1460
1461
  ),
1461
1462
  w && R && /* @__PURE__ */ n(
1462
- Ds,
1463
+ Os,
1463
1464
  {
1464
1465
  aliasInfo: w,
1465
1466
  depth: i + 1,
@@ -1472,7 +1473,7 @@ function Cr({
1472
1473
  ] }, P.field);
1473
1474
  }) });
1474
1475
  }
1475
- function Ds({
1476
+ function Os({
1476
1477
  aliasInfo: a,
1477
1478
  depth: i,
1478
1479
  path: b,
@@ -1508,12 +1509,12 @@ function Ds({
1508
1509
  }
1509
1510
  ) : /* @__PURE__ */ n("div", { className: "px-3 py-1.5", style: { paddingLeft: `${0.5 + i}rem` }, children: /* @__PURE__ */ n("span", { className: "inline-block h-3 w-20 animate-pulse rounded bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" }) });
1510
1511
  }
1511
- function Cs(a, i, b) {
1512
+ function $s(a, i, b) {
1512
1513
  if (i) return "relation";
1513
1514
  const d = a.type ?? "string";
1514
1515
  return d === "integer" || d === "decimal" || d === "float" ? "number" : d === "datetime" || d === "timestamp" ? "date" : d;
1515
1516
  }
1516
- function nu({
1517
+ function au({
1517
1518
  collection: a,
1518
1519
  path: i,
1519
1520
  pathLabels: b,
@@ -1587,7 +1588,7 @@ function nu({
1587
1588
  } else u(L) && w.push({
1588
1589
  key: m.field,
1589
1590
  label: L,
1590
- hint: Cs(m, void 0),
1591
+ hint: $s(m, void 0),
1591
1592
  leaf: { path: q, pathLabels: Z, fieldType: m.type ?? "string" }
1592
1593
  });
1593
1594
  }
@@ -1609,7 +1610,7 @@ function nu({
1609
1610
  key: `${m.field}.${q.field}`,
1610
1611
  label: Z,
1611
1612
  breadcrumb: O,
1612
- hint: Cs(q, oe ?? void 0),
1613
+ hint: $s(q, oe ?? void 0),
1613
1614
  leaf: {
1614
1615
  path: [...i, m.field, q.field],
1615
1616
  pathLabels: [...b, O, Z],
@@ -1658,7 +1659,7 @@ function nu({
1658
1659
  m.key
1659
1660
  )) });
1660
1661
  }
1661
- function au({
1662
+ function ru({
1662
1663
  target: a,
1663
1664
  selected: i,
1664
1665
  labels: b,
@@ -1729,7 +1730,7 @@ function au({
1729
1730
  ] })
1730
1731
  ] });
1731
1732
  }
1732
- function ru(a) {
1733
+ function lu(a) {
1733
1734
  var b, d;
1734
1735
  const i = a.pathLabels.join(" › ");
1735
1736
  if (Array.isArray(a.value)) {
@@ -1748,9 +1749,9 @@ function ru(a) {
1748
1749
  const v = ((b = ka.find((_) => _.value === a.value)) == null ? void 0 : b.label) ?? String(a.value);
1749
1750
  return { field: i, op: "in the", value: `${v} (rolling)` };
1750
1751
  }
1751
- return (d = a.path[0]) != null && d.startsWith("$has_") || a.path[0] === "$missing_required" ? { field: i, op: "", value: "" } : { field: i, op: tu(a.op).toLowerCase(), value: String(a.value ?? "") };
1752
+ return (d = a.path[0]) != null && d.startsWith("$has_") || a.path[0] === "$missing_required" ? { field: i, op: "", value: "" } : { field: i, op: nu(a.op).toLowerCase(), value: String(a.value ?? "") };
1752
1753
  }
1753
- function lu({
1754
+ function su({
1754
1755
  collection: a,
1755
1756
  meta: i,
1756
1757
  search: b,
@@ -1822,7 +1823,7 @@ function lu({
1822
1823
  if (P.relTarget !== void 0) return "relation";
1823
1824
  const y = P.fieldType;
1824
1825
  return y === "integer" || y === "decimal" || y === "float" ? "number" : y === "date" || y === "datetime" || y === "timestamp" ? "date" : y === "boolean" ? "boolean" : "string";
1825
- })(), fe = Es, ce = [
1826
+ })(), fe = Ds, ce = [
1826
1827
  { value: "_contains", label: "Contains" },
1827
1828
  { value: "_ncontains", label: "Doesn't contain" },
1828
1829
  { value: "_eq", label: "Equals" },
@@ -1840,7 +1841,7 @@ function lu({
1840
1841
  /* @__PURE__ */ c("div", { className: "flex min-w-0 max-w-[24rem] flex-1 items-center gap-2", children: [
1841
1842
  /* @__PURE__ */ c("div", { className: "relative min-w-0 flex-1", children: [
1842
1843
  /* @__PURE__ */ n(
1843
- $s,
1844
+ qs,
1844
1845
  {
1845
1846
  "aria-hidden": !0,
1846
1847
  className: "pointer-events-none absolute left-2.5 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-400"
@@ -1924,7 +1925,7 @@ function lu({
1924
1925
  y
1925
1926
  )) }),
1926
1927
  /* @__PURE__ */ n(
1927
- nu,
1928
+ au,
1928
1929
  {
1929
1930
  collection: K.collection,
1930
1931
  path: K.path,
@@ -1959,7 +1960,7 @@ function lu({
1959
1960
  ),
1960
1961
  ee === "relation" && P.relTarget ? /* @__PURE__ */ c("div", { className: "pt-2", children: [
1961
1962
  /* @__PURE__ */ n(
1962
- au,
1963
+ ru,
1963
1964
  {
1964
1965
  target: P.relTarget,
1965
1966
  selected: O,
@@ -2128,7 +2129,7 @@ function lu({
2128
2129
  ] })
2129
2130
  ] }),
2130
2131
  v.map((y) => {
2131
- const U = ru(y);
2132
+ const U = lu(y);
2132
2133
  return /* @__PURE__ */ c(
2133
2134
  "span",
2134
2135
  {
@@ -2175,7 +2176,7 @@ function lu({
2175
2176
  ] })
2176
2177
  );
2177
2178
  }
2178
- function su({
2179
+ function ou({
2179
2180
  collection: a,
2180
2181
  meta: i,
2181
2182
  onPick: b
@@ -2216,7 +2217,7 @@ function su({
2216
2217
  }
2217
2218
  ),
2218
2219
  N && S && /* @__PURE__ */ n(
2219
- Ds,
2220
+ Os,
2220
2221
  {
2221
2222
  aliasInfo: S,
2222
2223
  depth: 1,
@@ -2229,7 +2230,7 @@ function su({
2229
2230
  ] }, C.field);
2230
2231
  }) });
2231
2232
  }
2232
- function ou({
2233
+ function iu({
2233
2234
  collection: a,
2234
2235
  ids: i,
2235
2236
  onDone: b,
@@ -2309,7 +2310,7 @@ function ou({
2309
2310
  )
2310
2311
  ] });
2311
2312
  }
2312
- function iu({
2313
+ function du({
2313
2314
  collection: a,
2314
2315
  selectedIds: i,
2315
2316
  onDone: b,
@@ -2461,7 +2462,7 @@ function iu({
2461
2462
  }
2462
2463
  );
2463
2464
  }
2464
- function du({
2465
+ function cu({
2465
2466
  collection: a,
2466
2467
  selectedIds: i,
2467
2468
  transitions: b,
@@ -2471,7 +2472,7 @@ function du({
2471
2472
  onClear: C,
2472
2473
  onSuccess: $
2473
2474
  }) {
2474
- const S = ga(), N = ut(), K = ya(), z = Ts(), [P, u] = k("actions"), w = Dd([a], _), { data: W = [] } = le({
2475
+ const S = ga(), N = ut(), K = ya(), z = Ls(), [P, u] = k("actions"), w = Md([a], _), { data: W = [] } = le({
2475
2476
  queryKey: ["bulk-recipes", a],
2476
2477
  queryFn: () => N.request(X("/bulk-recipes", { collection: a })).then((F) => F.data ?? []).catch(() => []),
2477
2478
  staleTime: 6e4
@@ -2523,15 +2524,15 @@ function du({
2523
2524
  }
2524
2525
  }, [Z, oe] = k(!1), [ve, J] = k(""), [G, Me] = k(!1), [Je, ae] = k(null), se = async (F) => {
2525
2526
  Me(!0), ae(null);
2526
- const ee = hi();
2527
- gi(ee, i);
2527
+ const ee = xi();
2528
+ vi(ee, i);
2528
2529
  try {
2529
2530
  const fe = await F(ee);
2530
2531
  ae(fe), $(), C(), u("actions");
2531
2532
  } catch (fe) {
2532
- ae(Ni(fe, "Bulk action failed"));
2533
+ ae(Ci(fe, "Bulk action failed"));
2533
2534
  } finally {
2534
- xi(ee), Me(!1);
2535
+ ki(ee), Me(!1);
2535
2536
  }
2536
2537
  }, pt = (F, ee) => void se(async (fe) => {
2537
2538
  const ce = await N.request(
@@ -2570,12 +2571,12 @@ function du({
2570
2571
  " selected"
2571
2572
  ] }),
2572
2573
  Z && /* @__PURE__ */ n(
2573
- Fc,
2574
+ Rc,
2574
2575
  {
2575
2576
  collection: a,
2576
2577
  ids: i.slice(0, 3),
2577
2578
  fields: d,
2578
- renderValue: (F, ee) => uu(a, v, F, ee),
2579
+ renderValue: (F, ee) => pu(a, v, F, ee),
2579
2580
  onClose: () => oe(!1)
2580
2581
  }
2581
2582
  ),
@@ -2600,16 +2601,18 @@ function du({
2600
2601
  }
2601
2602
  ),
2602
2603
  F.mine && /* @__PURE__ */ n(
2603
- "button",
2604
+ Fs,
2604
2605
  {
2605
- type: "button",
2606
- "aria-label": `Delete recipe ${F.name}`,
2607
- onClick: () => {
2608
- window.confirm(`Delete the recipe "${F.name}"?`) && N.request(ba(`/bulk-recipes/${F.id}`)).then(
2606
+ title: `Delete recipe ${F.name}`,
2607
+ confirmLabel: "Delete?",
2608
+ confirmTitle: `Delete the recipe "${F.name}"?`,
2609
+ onConfirm: () => {
2610
+ N.request(ba(`/bulk-recipes/${F.id}`)).then(
2609
2611
  () => K.invalidateQueries({ queryKey: ["bulk-recipes", a] })
2610
2612
  );
2611
2613
  },
2612
2614
  className: "absolute -right-1.5 -top-1.5 hidden h-4 w-4 items-center justify-center rounded-full bg-slate-600 text-[9px] text-white dark:text-foreground hover:bg-red-600 group-hover/recipe:flex",
2615
+ armedClassName: "flex w-auto bg-red-600 px-1.5 font-semibold text-white dark:text-white",
2613
2616
  children: "✕"
2614
2617
  }
2615
2618
  )
@@ -2620,13 +2623,13 @@ function du({
2620
2623
  {
2621
2624
  type: "button",
2622
2625
  onClick: () => {
2623
- const F = sd(
2626
+ const F = od(
2624
2627
  i.map((ee) => z.urlFor({ collection: a, itemId: String(ee) }))
2625
2628
  );
2626
- F.blocked > 0 || F.capped > 0 ? we.warning(ds(F)) : we.success(ds(F));
2629
+ F.blocked > 0 || F.capped > 0 ? we.warning(cs(F)) : we.success(cs(F));
2627
2630
  },
2628
2631
  "data-bulk-open-tabs": !0,
2629
- title: `Open the selected records in new tabs (up to ${ld})`,
2632
+ title: `Open the selected records in new tabs (up to ${sd})`,
2630
2633
  className: "h-8 rounded-md border border-white/20 dark:border-border px-3 text-[12.5px] font-medium hover:bg-white/10 dark:hover:bg-muted",
2631
2634
  children: "Open in tabs"
2632
2635
  }
@@ -2651,7 +2654,7 @@ function du({
2651
2654
  }
2652
2655
  ),
2653
2656
  /* @__PURE__ */ n(
2654
- Md,
2657
+ Od,
2655
2658
  {
2656
2659
  targets: i.map((F) => ({ collection: a, id: F })),
2657
2660
  enabledKeys: _,
@@ -2663,7 +2666,7 @@ function du({
2663
2666
  }
2664
2667
  ),
2665
2668
  w("update-field") && /* @__PURE__ */ n(
2666
- Od,
2669
+ Ad,
2667
2670
  {
2668
2671
  collection: a,
2669
2672
  selectedIds: i,
@@ -2704,7 +2707,7 @@ function du({
2704
2707
  )
2705
2708
  ] }),
2706
2709
  P === "merge" && /* @__PURE__ */ n(
2707
- ou,
2710
+ iu,
2708
2711
  {
2709
2712
  collection: a,
2710
2713
  ids: i.slice(0, 2),
@@ -2715,7 +2718,7 @@ function du({
2715
2718
  }
2716
2719
  ),
2717
2720
  P === "message" && /* @__PURE__ */ n(
2718
- iu,
2721
+ du,
2719
2722
  {
2720
2723
  collection: a,
2721
2724
  selectedIds: i,
@@ -2742,7 +2745,7 @@ function du({
2742
2745
  },
2743
2746
  children: [
2744
2747
  /* @__PURE__ */ n(
2745
- Ac,
2748
+ Ic,
2746
2749
  {
2747
2750
  value: ve,
2748
2751
  onChange: J,
@@ -2863,7 +2866,7 @@ function du({
2863
2866
  }
2864
2867
  );
2865
2868
  }
2866
- const cu = {
2869
+ const uu = {
2867
2870
  state: "badge",
2868
2871
  entered: "date",
2869
2872
  aging: "short",
@@ -2875,7 +2878,7 @@ const cu = {
2875
2878
  tasks: "short",
2876
2879
  addendums: "short"
2877
2880
  };
2878
- function Up({
2881
+ function Vp({
2879
2882
  collection: a,
2880
2883
  quickFilters: i = [],
2881
2884
  initialColumns: b,
@@ -2891,22 +2894,22 @@ function Up({
2891
2894
  className: P
2892
2895
  }) {
2893
2896
  var Ul, Wl, Vl, Hl, Yl, Jl, Gl, Xl, Zl, es, ts;
2894
- const u = ut(), w = ya(), { open: W, urlFor: R } = Ts(), [m] = k(
2895
- () => Bi(zi(`cbv:${a}`))
2897
+ const u = ut(), w = ya(), { open: W, urlFor: R } = Ls(), [m] = k(
2898
+ () => Qi(Ui(`cbv:${a}`))
2896
2899
  ), [L] = k(
2897
- () => m ? ms(m.f ?? []) : null
2900
+ () => m ? fs(m.f ?? []) : null
2898
2901
  ), [D] = k(
2899
- () => m ? null : Ui(`cbv:${a}`)
2902
+ () => m ? null : Vi(`cbv:${a}`)
2900
2903
  ), [O, q] = k((m == null ? void 0 : m.p) ?? D ?? 1), Z = me(D);
2901
2904
  pe(() => {
2902
- const e = Wi(Z.current, O);
2905
+ const e = ds(Z.current, O);
2903
2906
  if (e !== O) {
2904
2907
  q(e);
2905
2908
  return;
2906
2909
  }
2907
- Vi(`cbv:${a}`, O);
2910
+ Hi(`cbv:${a}`, O);
2908
2911
  }, [a, O]);
2909
- const oe = me(Ri()), [ve, J] = k(m ? m.q ?? "" : _), G = ss(ve.trim(), 350), [Me, Je] = k(
2912
+ const oe = me(Pi()), [ve, J] = k(m ? m.q ?? "" : _), G = ss(ve.trim(), 350), [Me, Je] = k(
2910
2913
  L ? L.filters : C ?? []
2911
2914
  ), [ae, se] = k(m ? m.s ?? "" : d ?? ""), [pt, F] = k(b ?? null), [ee, fe] = k({}), [ce, y] = k({}), [U, ie] = k(null), [Ne, mt] = k({}), [rn, ln] = k({}), [It, Q] = k({}), [Ge, rt] = k({}), [yn, Ke] = k(null), [Vt, Kt] = k(!1), sn = me(null), [wn, Xe] = k(
2912
2915
  () => (m == null ? void 0 : m.qf) ?? {}
@@ -2914,9 +2917,9 @@ function Up({
2914
2917
  () => (m == null ? void 0 : m.qf) ?? {}
2915
2918
  ), [$t, on] = k(
2916
2919
  m ? m.lc ?? [] : $ ?? []
2917
- ), { scopes: qt, ready: wt } = _d(), [Ze, _n] = k(!1), [Nn, Qn] = k(/* @__PURE__ */ new Set()), [je, jt] = k(
2920
+ ), { scopes: qt, ready: wt } = Nd(), [Ze, _n] = k(!1), [Nn, Qn] = k(/* @__PURE__ */ new Set()), [je, jt] = k(
2918
2921
  () => (m == null ? void 0 : m.cf) ?? {}
2919
- ), bt = ui("drill.browser"), et = bt.value, [Sn, dn] = k(null), [cn, Ht] = k(!1), [Yt, Un] = k(() => {
2922
+ ), bt = mi("drill.browser"), et = bt.value, [Sn, dn] = k(null), [cn, Ht] = k(!1), [Yt, Un] = k(() => {
2920
2923
  try {
2921
2924
  return localStorage.getItem("nvr_table_density") === "comfortable" ? "comfortable" : "compact";
2922
2925
  } catch {
@@ -2957,7 +2960,7 @@ function Up({
2957
2960
  const t = e.status, r = (l = e.response) == null ? void 0 : l.error;
2958
2961
  t === 503 ? we.error("AI is not configured — add an Anthropic API key in Settings.") : we.error(r ?? "Could not answer that question");
2959
2962
  }
2960
- }), Ms = () => {
2963
+ }), As = () => {
2961
2964
  $r(null), Na("");
2962
2965
  }, qr = me(!1);
2963
2966
  pe(() => {
@@ -2972,8 +2975,8 @@ function Up({
2972
2975
  };
2973
2976
  }, [de]);
2974
2977
  const [Jt, Gt] = k([]);
2975
- bi();
2976
- const [zt, Tn] = k(null), [Os, Sa] = k(!1), [Xt, Ca] = k(""), [$a, Lr] = k(!1), [As, Fr] = k(!1), [qa, pn] = k(!1), Rr = me(null);
2978
+ gi();
2979
+ const [zt, Tn] = k(null), [Is, Sa] = k(!1), [Xt, Ca] = k(""), [$a, Lr] = k(!1), [Ks, Fr] = k(!1), [qa, pn] = k(!1), Rr = me(null);
2977
2980
  pe(() => {
2978
2981
  if (!qa) return;
2979
2982
  const e = (t) => {
@@ -3009,30 +3012,30 @@ function Up({
3009
3012
  pe(() => {
3010
3013
  Or.current || !A || (Or.current = !0, !d && !ae && Le.default_sort && se(Le.default_sort));
3011
3014
  }, [A]);
3012
- const Lt = Le.checkbox_selection !== !1, Ar = Le.show_actions !== !1, [ht, Is] = k(!1), Ks = () => {
3013
- ht && Gt([]), Is(!ht);
3014
- }, Hn = z && Le.allow_create !== !1, Ir = typeof Le.create_label == "string" && Le.create_label.trim().slice(0, 40) || "New item", Yn = Cd(Hn && !(A != null && A.singleton) ? a : null), [La, Ln] = k(!1), [Fa, Jn] = k(null), { steps: Ra } = vc(
3015
+ const Lt = Le.checkbox_selection !== !1, Ar = Le.show_actions !== !1, [ht, js] = k(!1), Bs = () => {
3016
+ ht && Gt([]), js(!ht);
3017
+ }, Hn = z && Le.allow_create !== !1, Ir = typeof Le.create_label == "string" && Le.create_label.trim().slice(0, 40) || "New item", Yn = $d(Hn && !(A != null && A.singleton) ? a : null), [La, Ln] = k(!1), [Fa, Jn] = k(null), { steps: Ra } = vc(
3015
3018
  Hn && !(A != null && A.singleton) ? a : null,
3016
3019
  null
3017
3020
  ), Kr = (e) => {
3018
3021
  e ? W({ collection: a, itemId: "new", layoutSlug: e }) : tn("new");
3019
- }, Fn = hc(Hn && !(A != null && A.singleton) ? a : null), js = pi(), jr = me(null), [Bs, zs] = k(null), [Br, zr] = k(!1), Qr = (e) => {
3022
+ }, Fn = hc(Hn && !(A != null && A.singleton) ? a : null), zs = fi(), jr = me(null), [Qs, Us] = k(null), [Br, zr] = k(!1), Qr = (e) => {
3020
3023
  var t;
3021
- zs(e), (t = jr.current) == null || t.click();
3022
- }, Qs = async (e) => {
3024
+ Us(e), (t = jr.current) == null || t.click();
3025
+ }, Ws = async (e) => {
3023
3026
  const t = Array.from(e.target.files ?? []);
3024
3027
  if (e.target.value = "", !!t.length) {
3025
3028
  zr(!0);
3026
3029
  try {
3027
- const r = await gc(js, t, a);
3028
- W({ collection: a, itemId: "new", layoutSlug: Bs, query: { autofill: r } });
3030
+ const r = await gc(zs, t, a);
3031
+ W({ collection: a, itemId: "new", layoutSlug: Qs, query: { autofill: r } });
3029
3032
  } catch (r) {
3030
- Si(r, "The document could not be read", { action: "New from document" });
3033
+ $i(r, "The document could not be read", { action: "New from document" });
3031
3034
  } finally {
3032
3035
  zr(!1);
3033
3036
  }
3034
3037
  }
3035
- }, Us = (e) => Array.isArray(e == null ? void 0 : e.quick_picker) ? e.quick_picker.filter((t) => typeof t == "string") : [], Ea = me(null), Ur = me(null);
3038
+ }, Vs = (e) => Array.isArray(e == null ? void 0 : e.quick_picker) ? e.quick_picker.filter((t) => typeof t == "string") : [], Ea = me(null), Ur = me(null);
3036
3039
  pe(() => {
3037
3040
  if (!La) return;
3038
3041
  const e = (t) => {
@@ -3052,11 +3055,11 @@ function Up({
3052
3055
  (async () => {
3053
3056
  const r = {};
3054
3057
  for (const l of Ft) {
3055
- const s = ps(e, { key: l.key, collection: l.collection });
3058
+ const s = ms(e, { key: l.key, collection: l.collection });
3056
3059
  if (!s) continue;
3057
- const o = Nd(e, s.name);
3060
+ const o = Sd(e, s.name);
3058
3061
  if (o.length === 0) continue;
3059
- const f = await Sd(u, s, o, l.value_field).catch(
3062
+ const f = await Cd(u, s, o, l.value_field).catch(
3060
3063
  () => []
3061
3064
  );
3062
3065
  f.length > 0 && (r[l.key] = f);
@@ -3075,28 +3078,28 @@ function Up({
3075
3078
  })();
3076
3079
  }, [Ze, wt, qt, A, Ft]);
3077
3080
  const Wr = (e) => {
3078
- const t = ps(qt, { key: e.key, collection: e.collection }), r = t ? (qt == null ? void 0 : qt.restricted[t.name]) ?? [] : [];
3081
+ const t = ms(qt, { key: e.key, collection: e.collection }), r = t ? (qt == null ? void 0 : qt.restricted[t.name]) ?? [] : [];
3079
3082
  return r.length > 0 ? r : void 0;
3080
- }, _t = xe(() => new Map(Tt.map((e) => [e.field, e])), [Tt]), Qe = (A == null ? void 0 : A.relations) ?? [], Vr = xe(() => Oi(Le.inline_edit), [Le.inline_edit]), { data: Ws } = le({
3083
+ }, _t = xe(() => new Map(Tt.map((e) => [e.field, e])), [Tt]), Qe = (A == null ? void 0 : A.relations) ?? [], Vr = xe(() => Ii(Le.inline_edit), [Le.inline_edit]), { data: Hs } = le({
3081
3084
  queryKey: ["my-permissions"],
3082
3085
  queryFn: () => u.request(X("/security/my/permissions")).then((e) => e.data),
3083
3086
  enabled: Vr.enabled && !Dt,
3084
3087
  staleTime: 5 * 6e4
3085
- }), Vs = Dt || Wc(Ws, a), Hr = xe(
3088
+ }), Ys = Dt || Vc(Hs, a), Hr = xe(
3086
3089
  () => new Map(((A == null ? void 0 : A.fields) ?? []).map((e) => [e.field, e])),
3087
3090
  [A]
3088
- ), Yr = Nc(), Jr = (e) => (
3091
+ ), Yr = Sc(), Jr = (e) => (
3089
3092
  // Ask-the-table answers are a one-off overlay, not the list's own rows.
3090
- Pe ? null : Ki({
3093
+ Pe ? null : Bi({
3091
3094
  config: Vr,
3092
3095
  key: e,
3093
3096
  field: Hr.get(e),
3094
3097
  collection: a,
3095
3098
  relations: Qe,
3096
- mayUpdate: Vs
3099
+ mayUpdate: Ys
3097
3100
  })
3098
- ), Hs = (e, t, r, l, s) => {
3099
- const o = e.id, f = s === 0 ? null : ji(
3101
+ ), Js = (e, t, r, l, s) => {
3102
+ const o = e.id, f = s === 0 ? null : zi(
3100
3103
  be.filter((g) => !!Jr(g)),
3101
3104
  t,
3102
3105
  s
@@ -3125,21 +3128,21 @@ function Up({
3125
3128
  // Rollups, computed columns and the row's position may follow the change.
3126
3129
  onSaved: () => void w.invalidateQueries({ queryKey: ["cbv-items", a] })
3127
3130
  });
3128
- }, Ys = (e, t, r, l) => {
3131
+ }, Gs = (e, t, r, l) => {
3129
3132
  const s = r ? null : Jr(t);
3130
3133
  if (!s) return l;
3131
3134
  const o = Hr.get(t);
3132
3135
  return /* @__PURE__ */ n(
3133
- Sc,
3136
+ Cc,
3134
3137
  {
3135
3138
  controller: Yr,
3136
3139
  cellKey: `${String(e.id)}|${t}`,
3137
3140
  kind: s,
3138
3141
  value: e[t],
3139
3142
  label: nt(t),
3140
- choices: o ? Ii(o) : void 0,
3141
- target: s === "m2o" ? Ai(Qe, a, t) : null,
3142
- onCommit: (f, g) => Hs(e, t, s, f, g),
3143
+ choices: o ? ji(o) : void 0,
3144
+ target: s === "m2o" ? Ki(Qe, a, t) : null,
3145
+ onCommit: (f, g) => Js(e, t, s, f, g),
3143
3146
  children: l
3144
3147
  }
3145
3148
  );
@@ -3148,17 +3151,17 @@ function Up({
3148
3151
  ), [pt, Tt, _t, ce]), [Pa, Gn] = k(null), Rn = xe(
3149
3152
  () => Pa ?? (be[0] ? { [be[0]]: "left" } : {}),
3150
3153
  [Pa, be]
3151
- ), Nt = (e) => Rn[e], Js = (e) => {
3154
+ ), Nt = (e) => Rn[e], Xs = (e) => {
3152
3155
  const t = { ...Rn }, r = t[e];
3153
3156
  r ? r === "left" ? t[e] = "right" : delete t[e] : t[e] = "left", Gn(t);
3154
3157
  }, nt = (e) => ee[e] ?? (e.startsWith("__f:") ? ce[e] ?? "Formula" : e.includes(".") ? e.split(".").map(De).join(" › ") : e === "id" ? "ID" : De(e)), Gr = (e, t) => {
3155
3158
  var l, s, o;
3156
3159
  const r = t.includes(".") ? (o = (s = (l = Ce == null ? void 0 : Ce.rows) == null ? void 0 : l[String(e.id)]) == null ? void 0 : s[t]) == null ? void 0 : o.value : e[t];
3157
3160
  return typeof r == "string" && /^-?\d+(\.\d+)?$/.test(r.trim()) ? Number(r) : r;
3158
- }, Gs = (e, t) => {
3161
+ }, Zs = (e, t) => {
3159
3162
  const r = ce[t];
3160
3163
  return r ? os(r, (l) => Gr(e, l)) : null;
3161
- }, Xs = (e, t) => {
3164
+ }, eo = (e, t) => {
3162
3165
  const r = ce[t];
3163
3166
  if (r)
3164
3167
  return r.replace(/\{\{\s*([^}]+?)\s*\}\}/g, (l, s) => {
@@ -3239,9 +3242,9 @@ function Up({
3239
3242
  s != null && s.one_collection && (e[t.field] = { kind: "m2m", target: s.one_collection });
3240
3243
  }
3241
3244
  return e;
3242
- }, [Qt, Zt]), Oa = ss(je, 350), [mn, Zs] = k((m == null ? void 0 : m.a) === !0), [nl, eo] = k(null), En = ec(a, nl), [St, al] = k(null), { data: Pn } = zd(a), [Rt, Xn] = k(() => (L == null ? void 0 : L.riskIds) ?? []), ke = xe(() => {
3245
+ }, [Qt, Zt]), Oa = ss(je, 350), [mn, to] = k((m == null ? void 0 : m.a) === !0), [nl, no] = k(null), En = ec(a, nl), [St, al] = k(null), { data: Pn } = Qd(a), [Rt, Xn] = k(() => (L == null ? void 0 : L.riskIds) ?? []), ke = xe(() => {
3243
3246
  var t;
3244
- const e = Ns(Me);
3247
+ const e = Ss(Me);
3245
3248
  for (const r of Ft) {
3246
3249
  const l = ft[r.key] ?? [];
3247
3250
  l.length !== 0 && ((t = r.or_paths) != null && t.length ? e.push({
@@ -3278,7 +3281,7 @@ function Up({
3278
3281
  e.push({ path: [r], op: l.op, value: Number(l.value) });
3279
3282
  else if (l.kind === "bool") e.push({ path: [r], op: "_eq", value: l.value === "true" });
3280
3283
  else if (l.kind === "date" && l.value) {
3281
- const s = xa(l.value), f = (s ? ki(s) : null) ?? Ps(l.value);
3284
+ const s = xa(l.value), f = (s ? wi(s) : null) ?? Ms(l.value);
3282
3285
  f && (f.from && e.push({ path: [r], op: "_gte", value: f.from }), f.to && e.push({ path: [r], op: "_lte", value: `${f.to}T23:59:59` }));
3283
3286
  }
3284
3287
  }
@@ -3308,9 +3311,9 @@ function Up({
3308
3311
  if (!t || !r) return null;
3309
3312
  const l = e.find((s) => ["name", "title", "label", "short_name"].includes(s.toLowerCase())) ?? null;
3310
3313
  return { latField: t, lngField: r, labelField: l };
3311
- }, [A]), [Zn, rl] = k(!1), [ll, to] = k(!1), sl = me(ke);
3314
+ }, [A]), [Zn, rl] = k(!1), [ll, ao] = k(!1), sl = me(ke);
3312
3315
  pe(() => {
3313
- sl.current !== ke && (sl.current = ke, q(1));
3316
+ sl.current !== ke && (sl.current = ke, q(ds(Z.current, 1)));
3314
3317
  }, [ke]);
3315
3318
  const Dn = Object.keys(rn).filter((e) => !e.includes(".") && !e.startsWith("__")).sort().join(","), ol = (e) => [
3316
3319
  "cbv-items",
@@ -3340,7 +3343,7 @@ function Up({
3340
3343
  ze,
3341
3344
  ke,
3342
3345
  Dn
3343
- ]), s = oe.current, o = Ei(s, l, e, ae);
3346
+ ]), s = oe.current, o = Di(s, l, e, ae);
3344
3347
  if (o.after === void 0 && o.sort === ae) return r(e);
3345
3348
  try {
3346
3349
  const f = await u.request(
@@ -3350,17 +3353,17 @@ function Up({
3350
3353
  ...o.sort ? { sort: o.sort } : {}
3351
3354
  })
3352
3355
  );
3353
- return o.after !== void 0 && Pi(s, l, e, f.next_cursor), f;
3356
+ return o.after !== void 0 && Mi(s, l, e, f.next_cursor), f;
3354
3357
  } catch (f) {
3355
- if (!Di(f)) throw f;
3356
- return Mi(s, l), r(e);
3358
+ if (!Oi(f)) throw f;
3359
+ return Ai(s, l), r(e);
3357
3360
  }
3358
3361
  }, {
3359
3362
  data: he,
3360
3363
  isLoading: ea,
3361
3364
  isFetching: gt,
3362
3365
  isPlaceholderData: Aa,
3363
- dataUpdatedAt: no,
3366
+ dataUpdatedAt: ro,
3364
3367
  refetch: Ia,
3365
3368
  error: He
3366
3369
  } = le({
@@ -3373,13 +3376,13 @@ function Up({
3373
3376
  retry: !1
3374
3377
  }), dl = me(() => {
3375
3378
  });
3376
- id({
3379
+ dd({
3377
3380
  qc: w,
3378
3381
  enabled: !!a && Ze && !ue && !G && !gt && !!he && O * ze < (he.total ?? 0),
3379
3382
  queryKey: ol(O + 1),
3380
3383
  queryFn: () => il(O + 1).then((e) => (dl.current(e.data ?? []), e))
3381
3384
  }), pe(() => {
3382
- const e = Hi({
3385
+ const e = Yi({
3383
3386
  pending: Z.current,
3384
3387
  gateOpen: Ze,
3385
3388
  fetching: gt,
@@ -3426,7 +3429,7 @@ function Up({
3426
3429
  ...Ba ? { conditions: Ba } : {}
3427
3430
  })
3428
3431
  ).then((e) => Number(e.total ?? 0))
3429
- }), ao = () => {
3432
+ }), lo = () => {
3430
3433
  const e = Mn.map((r) => r.key), t = (r) => {
3431
3434
  const l = { ...r };
3432
3435
  for (const s of e) l[s] = [];
@@ -3442,7 +3445,7 @@ function Up({
3442
3445
  const e = `${a}\0${G}`;
3443
3446
  ((t = aa.current) == null ? void 0 : t.key) !== e && (aa.current = {
3444
3447
  key: e,
3445
- id: vd(u, {
3448
+ id: kd(u, {
3446
3449
  surface: "collection",
3447
3450
  collection: a,
3448
3451
  query: G,
@@ -3450,7 +3453,7 @@ function Up({
3450
3453
  duration_ms: Date.now() - ul.current
3451
3454
  })
3452
3455
  });
3453
- }, [u, a, G, he, gt, Pe]), Ld(
3456
+ }, [u, a, G, he, gt, Pe]), Fd(
3454
3457
  a ? {
3455
3458
  list: {
3456
3459
  collection: a,
@@ -3467,18 +3470,18 @@ function Up({
3467
3470
  }
3468
3471
  } : null
3469
3472
  );
3470
- const ro = Fd(), pl = mi(gt), za = fi({
3473
+ const so = Rd(), pl = bi(gt), za = hi({
3471
3474
  pending: gt,
3472
3475
  request: a ? { method: "GET", url: `/items/${a}` } : null,
3473
3476
  noun: ((A == null ? void 0 : A.display_name) ?? a ?? "").replace(/_/g, " ").toLowerCase() || null,
3474
3477
  // Only a total this person has already been shown (never a raw table count).
3475
- knownRows: gt ? wd(w.getQueriesData({ queryKey: ["cbv-items", a] })) : null
3476
- }), Qa = fd(), { userId: Ua } = ga(), Et = Ji(), Wa = me(/* @__PURE__ */ new Set());
3478
+ knownRows: gt ? _d(w.getQueriesData({ queryKey: ["cbv-items", a] })) : null
3479
+ }), Qa = bd(), { userId: Ua } = ga(), Et = Gi(), Wa = me(/* @__PURE__ */ new Set());
3477
3480
  Wa.current = new Set(ye.map((e) => String(e.id)));
3478
- const lo = xe(
3481
+ const oo = xe(
3479
3482
  () => ye.slice(0, 100).map((e) => ({ collection: a, item: String(e.id) })),
3480
3483
  [ye, a]
3481
- ), ml = ud(lo), fl = me([]);
3484
+ ), ml = pd(oo), fl = me([]);
3482
3485
  fl.current = [
3483
3486
  "cbv-items",
3484
3487
  a,
@@ -3501,14 +3504,14 @@ function Up({
3501
3504
  page: O,
3502
3505
  grouped: !!ue
3503
3506
  };
3504
- const Va = me({}).current, [so, oo] = k(0), [Ha, Ya] = k(0);
3507
+ const Va = me({}).current, [io, co] = k(0), [Ha, Ya] = k(0);
3505
3508
  pe(() => {
3506
3509
  if (!Qa || !a) return;
3507
3510
  const e = (M = 1) => Ya((B) => B + M), t = /* @__PURE__ */ new Map();
3508
3511
  let r = null;
3509
3512
  const l = (M) => {
3510
3513
  const B = (H) => t.set(JSON.stringify(H), H);
3511
- M.includes(vn.tasks) && B(["cbv-task-counts", a]), M.includes(vn.addendums) && B(["cbv-addendum-summary", a]), M.includes(vn.integrations) && B(["cbv-integrations-summary", a]), M.includes(vn.comments) && B(["row-comment-counts", a]), M.includes(vn.state) && (B(["cbv-pipeline-instances", a]), B(["cbv-owners", a]), B(["cbv-view-count", a])), M.includes(vn.lock) && oo((H) => H + 1), !r && (r = setTimeout(() => {
3514
+ M.includes(vn.tasks) && B(["cbv-task-counts", a]), M.includes(vn.addendums) && B(["cbv-addendum-summary", a]), M.includes(vn.integrations) && B(["cbv-integrations-summary", a]), M.includes(vn.comments) && B(["row-comment-counts", a]), M.includes(vn.state) && (B(["cbv-pipeline-instances", a]), B(["cbv-owners", a]), B(["cbv-view-count", a])), M.includes(vn.lock) && co((H) => H + 1), !r && (r = setTimeout(() => {
3512
3515
  r = null;
3513
3516
  for (const H of t.values()) w.invalidateQueries({ queryKey: H });
3514
3517
  t.clear();
@@ -3541,8 +3544,8 @@ function Up({
3541
3544
  });
3542
3545
  }
3543
3546
  H && e();
3544
- const p = Wa.current, it = (V) => od(a, V.item), We = (V) => {
3545
- const ge = nd(V);
3547
+ const p = Wa.current, it = (V) => id(a, V.item), We = (V) => {
3548
+ const ge = ad(V);
3546
3549
  return ge && Ua && ge.toUpperCase() === Ua.toUpperCase() ? "self" : ge;
3547
3550
  }, vt = [];
3548
3551
  for (const [V, ge] of B)
@@ -3558,7 +3561,7 @@ function Up({
3558
3561
  const kt = bl.current;
3559
3562
  let an;
3560
3563
  try {
3561
- an = await Zi(
3564
+ an = await ed(
3562
3565
  u,
3563
3566
  a,
3564
3567
  [...B.keys()],
@@ -3582,10 +3585,10 @@ function Up({
3582
3585
  return;
3583
3586
  }
3584
3587
  if (x) return;
3585
- const Y = ed(kt.conditions), ne = kt.page === 1 && !kt.grouped, Ee = /* @__PURE__ */ new Map(), T = [], Ye = [];
3588
+ const Y = td(kt.conditions), ne = kt.page === 1 && !kt.grouped, Ee = /* @__PURE__ */ new Map(), T = [], Ye = [];
3586
3589
  for (const [V, ge] of B) {
3587
3590
  const re = an.get(V);
3588
- p.has(V) ? re ? Ee.set(V, re) : T.push(V) : re && ((ge.action === "create" || !!kt.conditions && td(ge, Y)) && ne ? Ye.push({ row: re, ev: ge }) : e());
3591
+ p.has(V) ? re ? Ee.set(V, re) : T.push(V) : re && ((ge.action === "create" || !!kt.conditions && nd(ge, Y)) && ne ? Ye.push({ row: re, ev: ge }) : e());
3589
3592
  }
3590
3593
  if (Ee.size > 0 || T.length > 0 || Ye.length > 0) {
3591
3594
  const V = new Set(T);
@@ -3610,7 +3613,7 @@ function Up({
3610
3613
  We(V) !== "self" && Et.note([re], We(V), "create");
3611
3614
  }
3612
3615
  }, I = (M) => {
3613
- for (const B of M.flatMap((H) => Yi(H))) {
3616
+ for (const B of M.flatMap((H) => Ji(H))) {
3614
3617
  const H = B.changed_fields;
3615
3618
  if (!B.action && (H != null && H.length) && H.every((p) => p.startsWith("$"))) {
3616
3619
  (String(B.item) === "*" || Wa.current.has(String(B.item))) && l(H);
@@ -3621,16 +3624,16 @@ function Up({
3621
3624
  o.length > 0 && !f && (f = setTimeout(() => void j(), 300));
3622
3625
  }, $e = Qa.subscribeCollections(
3623
3626
  [a],
3624
- (M) => Ti(Va, [M], I)
3627
+ (M) => Fi(Va, [M], I)
3625
3628
  );
3626
3629
  return () => {
3627
- x = !0, $e(), Li(Va), r && clearTimeout(r), f && clearTimeout(f), g && clearTimeout(g);
3630
+ x = !0, $e(), Ri(Va), r && clearTimeout(r), f && clearTimeout(f), g && clearTimeout(g);
3628
3631
  };
3629
3632
  }, [Qa, a, w, u, Ua, Et, Va]);
3630
- const io = Gi(
3633
+ const uo = Xi(
3631
3634
  a,
3632
3635
  ye.map((e) => String(e.id)),
3633
- so
3636
+ io
3634
3637
  ), { data: ra = [] } = le({
3635
3638
  queryKey: ["cbv-risk-rules", a],
3636
3639
  queryFn: () => u.request(
@@ -3639,10 +3642,10 @@ function Up({
3639
3642
  enabled: !!a,
3640
3643
  staleTime: 6e4,
3641
3644
  retry: !1
3642
- }), co = ye.map((e) => String(e.id)).join(","), {
3643
- data: uo = {}
3645
+ }), po = ye.map((e) => String(e.id)).join(","), {
3646
+ data: mo = {}
3644
3647
  } = le({
3645
- queryKey: ["cbv-risk", a, co],
3648
+ queryKey: ["cbv-risk", a, po],
3646
3649
  queryFn: () => u.request(
3647
3650
  _e("/at-risk/evaluate", {
3648
3651
  collection: a,
@@ -3652,10 +3655,10 @@ function Up({
3652
3655
  enabled: !!a && ra.length > 0 && ye.length > 0,
3653
3656
  staleTime: 3e4,
3654
3657
  retry: !1
3655
- }), Ae = ye.map((e) => String(e.id)).join(","), po = xe(
3658
+ }), Ae = ye.map((e) => String(e.id)).join(","), fo = xe(
3656
3659
  () => ye.map((e) => ({ collection: a, id: e.id })),
3657
3660
  [ye, a]
3658
- ), mo = $c(po, Dt), Ja = !!(A != null && A.addendums_enabled), { data: Ga } = le({
3661
+ ), bo = qc(fo, Dt), Ja = !!(A != null && A.addendums_enabled), { data: Ga } = le({
3659
3662
  queryKey: ["cbv-addendum-summary", a, Ae],
3660
3663
  queryFn: () => u.request(
3661
3664
  _e("/addendums/summary", { collection: a, ids: Ae.split(",") })
@@ -3688,12 +3691,12 @@ function Up({
3688
3691
  placeholderData: (e) => e,
3689
3692
  staleTime: 3e4,
3690
3693
  retry: !1
3691
- }), { data: fo = [] } = le({
3694
+ }), { data: ho = [] } = le({
3692
3695
  queryKey: ["cbv-integrations-collections"],
3693
3696
  queryFn: () => u.request(X("/integration-obligations/collections")).then((e) => e.data ?? []).catch(() => []),
3694
3697
  staleTime: 6e4,
3695
3698
  retry: !1
3696
- }), gl = fo.includes(a), { data: er } = le({
3699
+ }), gl = ho.includes(a), { data: er } = le({
3697
3700
  queryKey: ["cbv-integrations-summary", a, Ae],
3698
3701
  queryFn: () => u.request(
3699
3702
  _e("/integration-obligations/summary", { collection: a, ids: Ae.split(",") })
@@ -3716,21 +3719,21 @@ function Up({
3716
3719
  queryFn: () => u.request(X(Dt ? `/pipelines/${la}` : `/pipelines/${la}/outline`)).then((e) => e.data),
3717
3720
  enabled: !!la,
3718
3721
  retry: !1
3719
- }), bo = !!(Te != null && Te.binding), { data: tr } = le({
3722
+ }), go = !!(Te != null && Te.binding), { data: tr } = le({
3720
3723
  queryKey: ["cbv-owners", a, Ae],
3721
3724
  queryFn: () => u.request(
3722
3725
  _e(`/pipelines/instance/${a}/owners/batch`, {
3723
3726
  ids: Ae.split(",").filter(Boolean)
3724
3727
  })
3725
3728
  ).then((e) => e.data ?? {}),
3726
- enabled: bo && Ae.length > 0,
3729
+ enabled: go && Ae.length > 0,
3727
3730
  staleTime: 6e4,
3728
3731
  retry: !1
3729
3732
  }), xl = xe(
3730
3733
  () => be.filter((e) => e.includes(".")),
3731
3734
  [be]
3732
3735
  ), vl = xe(
3733
- () => be.filter((e) => e.startsWith("__f:")).flatMap((e) => Ci(ce[e] ?? "")).filter((e) => e.includes(".")),
3736
+ () => be.filter((e) => e.startsWith("__f:")).flatMap((e) => qi(ce[e] ?? "")).filter((e) => e.includes(".")),
3734
3737
  [be, ce]
3735
3738
  ), On = xe(
3736
3739
  () => [.../* @__PURE__ */ new Set([...xl, ...Object.values(Ue), ...vl])].slice(
@@ -3759,14 +3762,14 @@ function Up({
3759
3762
  var r;
3760
3763
  const t = e.includes(".") ? e : Ue[e];
3761
3764
  return t ? ((r = Ce == null ? void 0 : Ce.targets) == null ? void 0 : r[t]) ?? null : null;
3762
- }, ho = (e, t) => {
3765
+ }, xo = (e, t) => {
3763
3766
  var o, f, g, x;
3764
3767
  const r = t.includes(".") ? t : Ue[t];
3765
3768
  if (!r) return null;
3766
3769
  const l = (o = Ce == null ? void 0 : Ce.targets) == null ? void 0 : o[r], s = ((x = (g = (f = Ce == null ? void 0 : Ce.rows) == null ? void 0 : f[String(e)]) == null ? void 0 : g[r]) == null ? void 0 : x.ids) ?? [];
3767
3770
  return !l || Ct(l) || s.length === 0 ? null : { target: l, id: String(s[0]) };
3768
3771
  }, Ot = (e) => e.includes(".") || e in Ue;
3769
- dl.current = (e) => vi({
3772
+ dl.current = (e) => yi({
3770
3773
  qc: w,
3771
3774
  collection: a,
3772
3775
  rows: e,
@@ -3775,8 +3778,8 @@ function Up({
3775
3778
  resolveList: On,
3776
3779
  isResolvedCol: Ot,
3777
3780
  fetchResolved: yl,
3778
- fetchRelation: (t, r) => Fs(u, t, r),
3779
- userCardQuery: (t) => qd(u, t)
3781
+ fetchRelation: (t, r) => Es(u, t, r),
3782
+ userCardQuery: (t) => Td(u, t)
3780
3783
  });
3781
3784
  const bn = (e) => {
3782
3785
  if (e.includes(".")) return { kind: "text", path: e.split(".") };
@@ -3794,7 +3797,7 @@ function Up({
3794
3797
  }, Ie = (e, t) => jt((r) => {
3795
3798
  const l = { ...r };
3796
3799
  return t ? l[e] = t : delete l[e], l;
3797
- }), go = (e) => {
3800
+ }), vo = (e) => {
3798
3801
  var f, g, x, j;
3799
3802
  const { key: t, row: r, cellText: l } = e, s = r.id;
3800
3803
  if (t === "__state__") {
@@ -3839,11 +3842,11 @@ function Up({
3839
3842
  I && Ie(t, { kind: "date", value: `r:${I}..${I}` });
3840
3843
  }
3841
3844
  }
3842
- }, xo = (e, t) => {
3845
+ }, ko = (e, t) => {
3843
3846
  if (e === "__state__") return !1;
3844
3847
  const r = bn(e);
3845
3848
  return r ? r.kind === "in" ? !!at(Qe, a, e) && t[e] != null : r.kind === "enum" || r.kind === "num" ? t[e] != null && t[e] !== "" : r.kind === "text" : !1;
3846
- }, vo = (e) => {
3849
+ }, yo = (e) => {
3847
3850
  const { key: t, row: r, cellText: l } = e, s = r.id, o = bn(t);
3848
3851
  if (!o) return;
3849
3852
  let f = null;
@@ -3857,7 +3860,7 @@ function Up({
3857
3860
  x && x !== "—" && (f = { id: g, path: o.path, op: "_ncontains", value: x, label: x, field: t });
3858
3861
  }
3859
3862
  f && Tr((x) => [...x, f]);
3860
- }, ko = (e) => {
3863
+ }, wo = (e) => {
3861
3864
  var l, s, o;
3862
3865
  const t = bn(e);
3863
3866
  if (!t) return null;
@@ -3870,7 +3873,7 @@ function Up({
3870
3873
  f.add(j);
3871
3874
  else x[e] != null && x[e] !== "" && typeof x[e] != "object" && f.add(x[e]);
3872
3875
  return /* @__PURE__ */ n(
3873
- Yc,
3876
+ Jc,
3874
3877
  {
3875
3878
  target: t.target,
3876
3879
  selected: (r == null ? void 0 : r.kind) === "in" ? r.value : [],
@@ -3881,7 +3884,7 @@ function Up({
3881
3884
  }
3882
3885
  if (t.kind === "enum")
3883
3886
  return /* @__PURE__ */ n(
3884
- Jc,
3887
+ Gc,
3885
3888
  {
3886
3889
  collection: a,
3887
3890
  field: e,
@@ -3911,7 +3914,7 @@ function Up({
3911
3914
  {
3912
3915
  value: f,
3913
3916
  onChange: (x) => Ie(e, { kind: "num", op: x, value: g }),
3914
- options: Es.map((x) => ({ value: x.value, label: x.label })),
3917
+ options: Ds.map((x) => ({ value: x.value, label: x.label })),
3915
3918
  ariaLabel: `Filter operator ${e}`
3916
3919
  }
3917
3920
  ),
@@ -3941,13 +3944,13 @@ function Up({
3941
3944
  className: "w-full"
3942
3945
  }
3943
3946
  ) : t.kind === "date" ? /* @__PURE__ */ n(
3944
- Gc,
3947
+ Xc,
3945
3948
  {
3946
3949
  value: (r == null ? void 0 : r.kind) === "date" ? r.value : "",
3947
3950
  onChange: (f) => Ie(e, f ? { kind: "date", value: f } : null)
3948
3951
  }
3949
3952
  ) : null;
3950
- }, yo = be.some((e) => bn(e) != null), _l = (e) => {
3953
+ }, _o = be.some((e) => bn(e) != null), _l = (e) => {
3951
3954
  var r, l;
3952
3955
  if (((r = Ne[e]) == null ? void 0 : r.type) === "number") return !0;
3953
3956
  if (e.includes(".") || e in Ue || at(Qe, a, e)) return !1;
@@ -3957,7 +3960,7 @@ function Up({
3957
3960
  var s, o, f;
3958
3961
  const l = Ne[t];
3959
3962
  if ((l == null ? void 0 : l.type) === "count") {
3960
- const g = t.includes(".") ? t : Ue[t], x = r != null && g ? (f = (o = (s = Ce == null ? void 0 : Ce.rows) == null ? void 0 : s[String(r)]) == null ? void 0 : o[g]) == null ? void 0 : f.ids : void 0, j = Fi(e === "—" ? "" : e, x);
3963
+ const g = t.includes(".") ? t : Ue[t], x = r != null && g ? (f = (o = (s = Ce == null ? void 0 : Ce.rows) == null ? void 0 : s[String(r)]) == null ? void 0 : o[g]) == null ? void 0 : f.ids : void 0, j = Ei(e === "—" ? "" : e, x);
3961
3964
  return String(j);
3962
3965
  }
3963
3966
  return l && e && e !== "—" ? is(e, l) : e;
@@ -3968,9 +3971,9 @@ function Up({
3968
3971
  queryKey: ["cbv-views", a],
3969
3972
  queryFn: () => u.request(X("/saved-views", { collection: a })).then((e) => e.data ?? []),
3970
3973
  staleTime: 3e4
3971
- }), gn = () => w.invalidateQueries({ queryKey: ["cbv-views", a] }), wo = fa({
3974
+ }), gn = () => w.invalidateQueries({ queryKey: ["cbv-views", a] }), No = fa({
3972
3975
  queries: lt.slice(0, 12).map((e) => {
3973
- const t = Ns(e.filters ?? []);
3976
+ const t = Ss(e.filters ?? []);
3974
3977
  return {
3975
3978
  queryKey: ["cbv-view-count", a, e.id, JSON.stringify(t)],
3976
3979
  queryFn: () => u.request(
@@ -3988,18 +3991,18 @@ function Up({
3988
3991
  }), nr = /* @__PURE__ */ new Map();
3989
3992
  lt.slice(0, 12).forEach((e, t) => {
3990
3993
  var r;
3991
- nr.set(e.id, ((r = wo[t]) == null ? void 0 : r.data) ?? null);
3994
+ nr.set(e.id, ((r = No[t]) == null ? void 0 : r.data) ?? null);
3992
3995
  });
3993
- const [Sl, _o] = k(() => /* @__PURE__ */ new Set()), sa = (e) => {
3996
+ const [Sl, So] = k(() => /* @__PURE__ */ new Set()), sa = (e) => {
3994
3997
  var r, l;
3995
3998
  Tn(e.id);
3996
- const t = ms(e.filters ?? []);
3999
+ const t = fs(e.filters ?? []);
3997
4000
  if (Je(t.filters), Xn(t.riskIds), se(e.sort ?? ""), (r = e.columns) != null && r.length) {
3998
4001
  const s = new Set(
3999
- e.columns.filter((p) => typeof p != "string" && p.admin_only).map(ys)
4002
+ e.columns.filter((p) => typeof p != "string" && p.admin_only).map(ws)
4000
4003
  );
4001
- _o(s);
4002
- const o = e.columns.map(ys).filter((p) => Dt || !s.has(p)), f = {};
4004
+ So(s);
4005
+ const o = e.columns.map(ws).filter((p) => Dt || !s.has(p)), f = {};
4003
4006
  for (const p of e.columns)
4004
4007
  typeof p != "string" && p.formula && p.key.startsWith("__f:") && (f[p.key] = p.formula);
4005
4008
  y(f);
@@ -4079,10 +4082,10 @@ function Up({
4079
4082
  is_shared: !0
4080
4083
  })
4081
4084
  ), ql(""), w.invalidateQueries({ queryKey: ["cbv-export-presets", a] }));
4082
- }, No = (e) => {
4085
+ }, Co = (e) => {
4083
4086
  const t = new URLSearchParams();
4084
4087
  G && t.set("search", G), ke && t.set("conditions", ke), ae && t.set("sort", ae), window.open(`/api/export-presets/${e}/run?${t.toString()}`, "_blank");
4085
- }, So = (e, t) => {
4088
+ }, $o = (e, t) => {
4086
4089
  u.request(
4087
4090
  _e(`/export-presets/${e}/run-async`, {
4088
4091
  ...G ? { search: G } : {},
@@ -4100,9 +4103,9 @@ function Up({
4100
4103
  columns: m.c
4101
4104
  }), Tn(null), q(m.p ?? 1)));
4102
4105
  }, [Tt]), pe(() => {
4103
- m && Qi();
4106
+ m && Wi();
4104
4107
  }, []);
4105
- const Co = () => {
4108
+ const qo = () => {
4106
4109
  const e = An();
4107
4110
  return {
4108
4111
  q: G,
@@ -4134,10 +4137,10 @@ function Up({
4134
4137
  we.success(r ? `Saved "${r}" with the current columns and filters` : "View saved");
4135
4138
  },
4136
4139
  onError: (e) => we.error(`Could not save the view: ${e.message}`)
4137
- }), $o = yt({
4140
+ }), To = yt({
4138
4141
  mutationFn: ({ id: e, on: t }) => u.request(pa(`/saved-views/${e}`, { is_default: t })),
4139
4142
  onSuccess: gn
4140
- }), qo = yt({
4143
+ }), Lo = yt({
4141
4144
  mutationFn: ({ id: e, role: t }) => u.request(pa(`/saved-views/${e}`, { default_for_role: t })),
4142
4145
  onSuccess: gn,
4143
4146
  onError: (e) => we.error(`Could not set the role default: ${e.message}`)
@@ -4154,22 +4157,22 @@ function Up({
4154
4157
  }), El = yt({
4155
4158
  mutationFn: (e) => u.request(ba(`/items/${a}/${e}`)),
4156
4159
  onSuccess: () => void w.invalidateQueries({ queryKey: ["cbv-items", a] })
4157
- }), To = yt({
4160
+ }), Fo = yt({
4158
4161
  mutationFn: (e) => u.request(ba(`/saved-views/${e}`)),
4159
4162
  onSuccess: (e, t) => {
4160
4163
  zt === t && Cl(), gn();
4161
4164
  }
4162
- }), { data: Lo = [] } = le({
4165
+ }), { data: Ro = [] } = le({
4163
4166
  queryKey: ["cbv-view-subs"],
4164
4167
  queryFn: () => u.request(X("/view-subscriptions")).then((e) => e.data ?? []).catch(() => []),
4165
4168
  staleTime: 6e4
4166
- }), da = (e) => Lo.find((t) => t.view_id === e), Fo = yt({
4169
+ }), da = (e) => Ro.find((t) => t.view_id === e), Eo = yt({
4167
4170
  mutationFn: async (e) => {
4168
4171
  const t = da(e);
4169
4172
  return t ? u.request(ba(`/view-subscriptions/${t.id}`)) : u.request(_e("/view-subscriptions", { view_id: e, digest: "daily" }));
4170
4173
  },
4171
4174
  onSuccess: () => w.invalidateQueries({ queryKey: ["cbv-view-subs"] })
4172
- }), Ro = async () => {
4175
+ }), Po = async () => {
4173
4176
  var e, t;
4174
4177
  if (!$a) {
4175
4178
  Lr(!0);
@@ -4189,7 +4192,7 @@ function Up({
4189
4192
  if (Y.includes(".") || Y.startsWith("__") || Y in Ue) continue;
4190
4193
  const ne = (e = at(Qe, a, Y)) == null ? void 0 : e.one_collection;
4191
4194
  if (!ne) continue;
4192
- if (Ls.has(ne)) {
4195
+ if (Rs.has(ne)) {
4193
4196
  f.push(Y);
4194
4197
  continue;
4195
4198
  }
@@ -4225,7 +4228,7 @@ function Up({
4225
4228
  ].map(String), I = /* @__PURE__ */ new Map();
4226
4229
  await Promise.all(
4227
4230
  j.map(
4228
- (Y) => $d(u, Y).then((ne) => I.set(Y.toUpperCase(), Jd(ne, Y))).catch(() => I.set(Y.toUpperCase(), Y))
4231
+ (Y) => qd(u, Y).then((ne) => I.set(Y.toUpperCase(), Jd(ne, Y))).catch(() => I.set(Y.toUpperCase(), Y))
4229
4232
  )
4230
4233
  );
4231
4234
  const $e = new Map(o.map((Y) => [Y.column, Y])), M = new Set(f), B = (Y) => {
@@ -4280,17 +4283,17 @@ function Up({
4280
4283
  Lr(!1);
4281
4284
  }
4282
4285
  }
4283
- }, Eo = (e) => {
4286
+ }, Do = (e) => {
4284
4287
  const t = `record:${a}:${String(e)}`;
4285
- return dd(t, () => cd(w, u, a, String(e), { group: t }));
4286
- }, Po = (e) => {
4287
- const t = Eo(e);
4288
+ return cd(t, () => ud(w, u, a, String(e), { group: t }));
4289
+ }, Mo = (e) => {
4290
+ const t = Do(e);
4288
4291
  return {
4289
4292
  ...t,
4290
- tabIndex: String(e) === Uo ? 0 : -1,
4293
+ tabIndex: String(e) === Vo ? 0 : -1,
4291
4294
  "data-row-open": "",
4292
4295
  onFocus: (r) => {
4293
- t.onFocus(), r.target === r.currentTarget && Qo(String(e));
4296
+ t.onFocus(), r.target === r.currentTarget && Wo(String(e));
4294
4297
  },
4295
4298
  onClick: (r) => {
4296
4299
  if (r.metaKey || r.ctrlKey) {
@@ -4321,12 +4324,12 @@ function Up({
4321
4324
  };
4322
4325
  }, tn = (e) => {
4323
4326
  var t;
4324
- ((t = aa.current) == null ? void 0 : t.key) === `${a}\0${G}` && kd(u, aa.current.id, {
4327
+ ((t = aa.current) == null ? void 0 : t.key) === `${a}\0${G}` && yd(u, aa.current.id, {
4325
4328
  type: "record",
4326
4329
  collection: a,
4327
4330
  item: e === "new" ? null : e
4328
4331
  }), S ? S(e) : W({ collection: a, itemId: String(e) });
4329
- }, Do = (e) => {
4332
+ }, Oo = (e) => {
4330
4333
  const t = at(Qe, a, e), r = (l) => {
4331
4334
  ae === l ? se(`-${l}`) : ae === `-${l}` ? se("") : se(l), q(1);
4332
4335
  };
@@ -4346,9 +4349,9 @@ function Up({
4346
4349
  return;
4347
4350
  }
4348
4351
  r(e);
4349
- }, rr = ye.length > 0 && ye.every((e) => Jt.includes(e.id)), Mo = () => Gt(
4352
+ }, rr = ye.length > 0 && ye.every((e) => Jt.includes(e.id)), Ao = () => Gt(
4350
4353
  rr ? Jt.filter((e) => !ye.some((t) => t.id === e)) : [.../* @__PURE__ */ new Set([...Jt, ...ye.map((e) => e.id)])]
4351
- ), Oo = (e) => Gt((t) => t.includes(e) ? t.filter((r) => r !== e) : [...t, e]), ca = 2e3, [Pl, Dl] = k(!1), Ao = async () => {
4354
+ ), Io = (e) => Gt((t) => t.includes(e) ? t.filter((r) => r !== e) : [...t, e]), ca = 2e3, [Pl, Dl] = k(!1), Ko = async () => {
4352
4355
  Dl(!0);
4353
4356
  try {
4354
4357
  const e = await u.request(
@@ -4363,7 +4366,7 @@ function Up({
4363
4366
  } finally {
4364
4367
  Dl(!1);
4365
4368
  }
4366
- }, Io = Fe === 0 && !en ? 0 : (O - 1) * ze + 1, Ko = en ? (O - 1) * ze + ye.length : Math.min(O * ze, Fe), In = !!(Te != null && Te.instances), Ml = (Lt ? 1 : 0) + (In ? 2 : 0) + (Ar ? 1 : 0), lr = [
4369
+ }, jo = Fe === 0 && !en ? 0 : (O - 1) * ze + 1, Bo = en ? (O - 1) * ze + ye.length : Math.min(O * ze, Fe), In = !!(Te != null && Te.instances), Ml = (Lt ? 1 : 0) + (In ? 2 : 0) + (Ar ? 1 : 0), lr = [
4367
4370
  ...be.map(
4368
4371
  (e) => e.startsWith("__f:") ? { key: e, kind: "formula" } : { key: e, kind: "data" }
4369
4372
  ),
@@ -4384,16 +4387,16 @@ function Up({
4384
4387
  ...lr.filter((e) => Nt(e.key) === "left"),
4385
4388
  ...lr.filter((e) => !Nt(e.key)),
4386
4389
  ...lr.filter((e) => Nt(e.key) === "right")
4387
- ], jo = nn.map((e) => {
4390
+ ], zo = nn.map((e) => {
4388
4391
  if (e.kind === "data") {
4389
4392
  const t = _t.get(e.key.split(".")[0]);
4390
- return { key: e.key, shape: yd(t == null ? void 0 : t.type, t == null ? void 0 : t.interface) };
4393
+ return { key: e.key, shape: wd(t == null ? void 0 : t.type, t == null ? void 0 : t.interface) };
4391
4394
  }
4392
- return { key: e.key, shape: cu[e.kind] ?? "short" };
4395
+ return { key: e.key, shape: uu[e.kind] ?? "short" };
4393
4396
  }), Ol = [
4394
4397
  ...In ? [{ key: "__state__", label: "State" }] : [],
4395
4398
  ...be.filter((e) => Ot(e) || !at(Qe, a, e)).map((e) => ({ key: e, label: nt(e) }))
4396
- ], Bo = (e) => {
4399
+ ], Qo = (e) => {
4397
4400
  var l;
4398
4401
  if (!ue) return "";
4399
4402
  const t = e.id;
@@ -4408,7 +4411,7 @@ function Up({
4408
4411
  if (!ue) return ye.map((l) => ({ kind: "row", row: l }));
4409
4412
  const e = /* @__PURE__ */ new Map();
4410
4413
  for (const l of ye) {
4411
- const s = Bo(l), o = e.get(s) ?? [];
4414
+ const s = Qo(l), o = e.get(s) ?? [];
4412
4415
  o.push(l), e.set(s, o);
4413
4416
  }
4414
4417
  const t = [...e.keys()].sort((l, s) => l === "(empty)" ? 1 : s === "(empty)" ? -1 : l.localeCompare(s, void 0, { numeric: !0 })), r = [];
@@ -4417,21 +4420,21 @@ function Up({
4417
4420
  if (r.push({ kind: "header", gkey: l, label: l, count: s.length }), !Se.has(l)) for (const o of s) r.push({ kind: "row", row: o });
4418
4421
  }
4419
4422
  return r;
4420
- })(), [zo, Qo] = k(null), Uo = nc(Al, zo), sr = nn.filter((e) => Nt(e.key) === "left").map((e) => e.key), Il = nn.filter((e) => Nt(e.key) === "right").map((e) => e.key), or = me(/* @__PURE__ */ new Map()), [Kn, Wo] = k({});
4421
- ci(() => {
4423
+ })(), [Uo, Wo] = k(null), Vo = nc(Al, Uo), sr = nn.filter((e) => Nt(e.key) === "left").map((e) => e.key), Il = nn.filter((e) => Nt(e.key) === "right").map((e) => e.key), or = me(/* @__PURE__ */ new Map()), [Kn, Ho] = k({});
4424
+ pi(() => {
4422
4425
  const e = {};
4423
4426
  for (const [r, l] of or.current)
4424
4427
  l != null && l.isConnected && (e[r] = l.getBoundingClientRect().width);
4425
4428
  const t = /* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(Kn)]);
4426
4429
  for (const r of t)
4427
4430
  if (Math.abs((e[r] ?? -1) - (Kn[r] ?? -1)) > 0.5) {
4428
- Wo(e);
4431
+ Ho(e);
4429
4432
  return;
4430
4433
  }
4431
4434
  });
4432
- const Vo = 52, Kl = (e) => {
4435
+ const Yo = 52, Kl = (e) => {
4433
4436
  if (Nt(e) === "left") {
4434
- let l = Lt ? Kn.__checkbox__ ?? Vo : 0;
4437
+ let l = Lt ? Kn.__checkbox__ ?? Yo : 0;
4435
4438
  for (const s of sr) {
4436
4439
  if (s === e) break;
4437
4440
  l += Kn[s] ?? 0;
@@ -4473,21 +4476,21 @@ function Up({
4473
4476
  window.removeEventListener("pointermove", e), window.removeEventListener("pointerup", t);
4474
4477
  };
4475
4478
  }, []);
4476
- const Ho = (e) => {
4479
+ const Jo = (e) => {
4477
4480
  let t = nt(e).length;
4478
4481
  for (const r of ye) {
4479
4482
  const l = Ot(e) ? xt(r.id, e) ?? "" : hn(String(r[e] ?? ""), e, r.id);
4480
4483
  l.length > t && (t = Math.min(l.length, 90));
4481
4484
  }
4482
4485
  Q((r) => ({ ...r, [e]: Math.max(60, Math.round(t * 6.6) + 28) }));
4483
- }, Yo = (e) => /* @__PURE__ */ n(
4486
+ }, Go = (e) => /* @__PURE__ */ n(
4484
4487
  "span",
4485
4488
  {
4486
4489
  onPointerDown: (t) => {
4487
4490
  t.preventDefault(), t.stopPropagation(), dr.current = { key: e, startX: t.clientX, startW: It[e] ?? 140 }, document.body.style.cursor = "col-resize";
4488
4491
  },
4489
4492
  onDoubleClick: (t) => {
4490
- t.stopPropagation(), Ho(e);
4493
+ t.stopPropagation(), Jo(e);
4491
4494
  },
4492
4495
  onClick: (t) => t.stopPropagation(),
4493
4496
  title: "Drag to resize · double-click to fit content",
@@ -4500,13 +4503,13 @@ function Up({
4500
4503
  {
4501
4504
  type: "button",
4502
4505
  onClick: (r) => {
4503
- r.stopPropagation(), Js(e);
4506
+ r.stopPropagation(), Xs(e);
4504
4507
  },
4505
4508
  title: jl[t ?? "none"],
4506
4509
  "aria-label": jl[t ?? "none"],
4507
4510
  className: `ml-1 inline-flex align-middle transition-opacity ${t ? "text-[#00a5cc] opacity-100" : "text-slate-300 opacity-0 group-hover/hcell:opacity-100 dark:text-slate-600"}`,
4508
4511
  children: /* @__PURE__ */ n(
4509
- ii,
4512
+ ci,
4510
4513
  {
4511
4514
  className: "h-3 w-3",
4512
4515
  style: t === "right" ? { transform: "scaleX(-1)" } : void 0
@@ -4514,20 +4517,20 @@ function Up({
4514
4517
  )
4515
4518
  }
4516
4519
  );
4517
- }, Jo = !!(G || ke || zt != null), { data: Go } = le({
4520
+ }, Xo = !!(G || ke || zt != null), { data: Zo } = le({
4518
4521
  queryKey: ["cbv-grand-total", a],
4519
4522
  queryFn: () => u.request(
4520
4523
  X(`/items/${a}`, { limit: 1, fields: "id", count: "approx" })
4521
4524
  ).then((e) => typeof e.total == "number" ? e.total : null),
4522
- enabled: !!a && Ze && !Pe && Jo,
4525
+ enabled: !!a && Ze && !Pe && Xo,
4523
4526
  staleTime: 5 * 6e4,
4524
4527
  retry: !1
4525
- }), Ql = me(!1), [, Xo] = k(0);
4528
+ }), Ql = me(!1), [, ei] = k(0);
4526
4529
  pe(
4527
4530
  () => w.getQueryCache().subscribe((e) => {
4528
4531
  if (!Ql.current || e.type !== "updated" || e.action.type !== "success") return;
4529
4532
  const t = String(e.query.queryKey[0] ?? "");
4530
- (t === "cbv-quick-options" || t === "cbv-filter-options" || t === "cbv-filter-selected-labels") && Xo((r) => r + 1);
4533
+ (t === "cbv-quick-options" || t === "cbv-filter-options" || t === "cbv-filter-selected-labels") && ei((r) => r + 1);
4531
4534
  }),
4532
4535
  [w]
4533
4536
  );
@@ -4593,10 +4596,10 @@ function Up({
4593
4596
  )
4594
4597
  });
4595
4598
  else if (x.kind === "fulfilment" && Oe) {
4596
- const M = (s = bs.find((B) => B.value === x.value)) == null ? void 0 : s.label;
4599
+ const M = (s = hs.find((B) => B.value === x.value)) == null ? void 0 : s.label;
4597
4600
  M && r.push({ kind: "phrase", text: M.toLowerCase() });
4598
4601
  } else if (x.kind === "integrations") {
4599
- const M = (o = hs.find((B) => B.value === x.value)) == null ? void 0 : o.label;
4602
+ const M = (o = gs.find((B) => B.value === x.value)) == null ? void 0 : o.label;
4600
4603
  M && r.push({ kind: "is", field: j, values: [M.toLowerCase()] });
4601
4604
  } else if (x.kind === "tasks")
4602
4605
  r.push({
@@ -4604,7 +4607,7 @@ function Up({
4604
4607
  text: x.value === "none" ? "with no open tasks" : x.value === "overdue" ? "with overdue tasks" : "with open tasks"
4605
4608
  });
4606
4609
  else if (x.kind === "aging") {
4607
- const M = $i({ field: j, type: "range", value: x.value, rangeUnit: "h" });
4610
+ const M = Ti({ field: j, type: "range", value: x.value, rangeUnit: "h" });
4608
4611
  M && r.push(M);
4609
4612
  } else if (x.kind === "text" && x.value.trim())
4610
4613
  r.push({ kind: "text", field: j, text: x.value });
@@ -4642,13 +4645,13 @@ function Up({
4642
4645
  }).filter((x) => !!x);
4643
4646
  g.length > 0 && r.push({ kind: "phrase", text: `flagged ${g.join(" or ")}` });
4644
4647
  }
4645
- return Ql.current = e, qi({
4648
+ return Ql.current = e, Li({
4646
4649
  noun: (A == null ? void 0 : A.display_name) || De(a),
4647
4650
  viewName: ((f = lt.find((g) => g.id === zt)) == null ? void 0 : f.name) ?? null,
4648
4651
  search: G,
4649
4652
  clauses: r,
4650
4653
  shown: en ? null : Fe,
4651
- of: Go ?? null,
4654
+ of: Zo ?? null,
4652
4655
  approx: Ka
4653
4656
  });
4654
4657
  })();
@@ -4717,9 +4720,9 @@ function Up({
4717
4720
  [data-cbv] .cbv-overlay { animation: none; opacity: 1; }
4718
4721
  }
4719
4722
  ` }),
4720
- /* @__PURE__ */ n(Oc, {}),
4721
- /* @__PURE__ */ n(jd, {}),
4722
- de && qs(
4723
+ /* @__PURE__ */ n(Ac, {}),
4724
+ /* @__PURE__ */ n(Bd, {}),
4725
+ de && Ts(
4723
4726
  /* @__PURE__ */ c(
4724
4727
  "div",
4725
4728
  {
@@ -4737,7 +4740,7 @@ function Up({
4737
4740
  {
4738
4741
  type: "button",
4739
4742
  onClick: () => {
4740
- go(de), Bt(null);
4743
+ vo(de), Bt(null);
4741
4744
  },
4742
4745
  className: "block w-full truncate px-3 py-1.5 text-left text-[12px] text-slate-700 hover:bg-slate-50 dark:text-slate-200 dark:hover:bg-slate-800",
4743
4746
  children: [
@@ -4746,12 +4749,12 @@ function Up({
4746
4749
  ]
4747
4750
  }
4748
4751
  ),
4749
- xo(de.key, de.row) && de.cellText && de.cellText !== "—" && /* @__PURE__ */ c(
4752
+ ko(de.key, de.row) && de.cellText && de.cellText !== "—" && /* @__PURE__ */ c(
4750
4753
  "button",
4751
4754
  {
4752
4755
  type: "button",
4753
4756
  onClick: () => {
4754
- vo(de), Bt(null);
4757
+ yo(de), Bt(null);
4755
4758
  },
4756
4759
  className: "block w-full truncate px-3 py-1.5 text-left text-[12px] text-slate-700 hover:bg-slate-50 dark:text-slate-200 dark:hover:bg-slate-800",
4757
4760
  children: [
@@ -4812,7 +4815,7 @@ function Up({
4812
4815
  {
4813
4816
  label: "Copy link",
4814
4817
  run: () => {
4815
- Rs(
4818
+ Ps(
4816
4819
  u,
4817
4820
  w,
4818
4821
  a,
@@ -4835,13 +4838,14 @@ function Up({
4835
4838
  e.label
4836
4839
  )),
4837
4840
  /* @__PURE__ */ n(
4838
- "button",
4841
+ Fs,
4839
4842
  {
4840
- type: "button",
4841
- onClick: () => {
4842
- window.confirm("Delete this record? It moves to Trash for 30 days.") && El.mutate(de.row.id), Bt(null);
4843
+ confirmLabel: "Delete this record? It moves to Trash for 30 days.",
4844
+ onConfirm: () => {
4845
+ El.mutate(de.row.id), Bt(null);
4843
4846
  },
4844
4847
  className: "block w-full truncate px-3 py-1.5 text-left text-[12px] text-red-600 hover:bg-red-50 dark:text-red-400 dark:hover:bg-red-900/20",
4848
+ armedClassName: "whitespace-normal bg-red-50 font-semibold dark:bg-red-900/20",
4845
4849
  children: "Delete"
4846
4850
  }
4847
4851
  )
@@ -4853,7 +4857,7 @@ function Up({
4853
4857
  ),
4854
4858
  /* @__PURE__ */ c("div", { className: "flex shrink-0 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", children: [
4855
4859
  /* @__PURE__ */ n(
4856
- lu,
4860
+ su,
4857
4861
  {
4858
4862
  collection: a,
4859
4863
  meta: A,
@@ -4871,12 +4875,12 @@ function Up({
4871
4875
  "button",
4872
4876
  {
4873
4877
  type: "button",
4874
- onClick: () => Zs((e) => !e),
4878
+ onClick: () => to((e) => !e),
4875
4879
  "aria-pressed": mn,
4876
4880
  title: "Only records with an addendum still in review",
4877
4881
  className: `flex h-8 items-center gap-1.5 rounded-full border px-2.5 text-[12px] font-medium transition-colors ${mn ? "border-amber-400 bg-amber-50 text-amber-800 dark:border-amber-500/60 dark:bg-amber-500/10 dark:text-amber-300" : "border-slate-200 bg-white text-slate-600 hover:border-slate-300 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-300"}`,
4878
4882
  children: [
4879
- /* @__PURE__ */ n(Zo, { className: "h-3.5 w-3.5" }),
4883
+ /* @__PURE__ */ n(ti, { className: "h-3.5 w-3.5" }),
4880
4884
  "Active addendums"
4881
4885
  ]
4882
4886
  }
@@ -4898,7 +4902,7 @@ function Up({
4898
4902
  /* @__PURE__ */ n(
4899
4903
  "span",
4900
4904
  {
4901
- className: `h-2 w-2 rounded-full ${gd(e.highlight_color ?? "red")}`
4905
+ className: `h-2 w-2 rounded-full ${xd(e.highlight_color ?? "red")}`
4902
4906
  }
4903
4907
  ),
4904
4908
  e.name
@@ -4907,7 +4911,7 @@ function Up({
4907
4911
  e.id
4908
4912
  );
4909
4913
  }),
4910
- /* @__PURE__ */ n(Lc, { className: "h-8" }),
4914
+ /* @__PURE__ */ n(Fc, { className: "h-8" }),
4911
4915
  /* @__PURE__ */ n(pc, {}),
4912
4916
  Ha > 0 && /* @__PURE__ */ c(
4913
4917
  "button",
@@ -4938,9 +4942,9 @@ function Up({
4938
4942
  children: /* @__PURE__ */ n(pr, { className: `h-4 w-4 ${gt ? "animate-spin" : ""}` })
4939
4943
  }
4940
4944
  ),
4941
- /* @__PURE__ */ n(_c, { listKey: `cbv:${a}`, getState: Co }),
4945
+ /* @__PURE__ */ n(Nc, { listKey: `cbv:${a}`, getState: qo }),
4942
4946
  Dt && Le.copy_as !== !1 && /* @__PURE__ */ n(
4943
- Bd,
4947
+ zd,
4944
4948
  {
4945
4949
  collection: a,
4946
4950
  list: {
@@ -4959,12 +4963,12 @@ function Up({
4959
4963
  parent: En.parent,
4960
4964
  value: nl,
4961
4965
  onChange: (e) => {
4962
- eo(e), q(1);
4966
+ no(e), q(1);
4963
4967
  }
4964
4968
  }
4965
4969
  ),
4966
4970
  [
4967
- ...Pn ? [{ key: "tree", label: "Tree", icon: /* @__PURE__ */ n(ei, { className: "h-3.5 w-3.5" }) }] : [],
4971
+ ...Pn ? [{ key: "tree", label: "Tree", icon: /* @__PURE__ */ n(ni, { className: "h-3.5 w-3.5" }) }] : [],
4968
4972
  ...(K ?? []).map((e) => ({ key: e.key, label: e.label, icon: e.icon }))
4969
4973
  ].map((e) => /* @__PURE__ */ c(
4970
4974
  "button",
@@ -4995,7 +4999,7 @@ function Up({
4995
4999
  className: `flex h-8 items-center gap-1.5 rounded-md border px-2.5 text-[12px] font-medium ${Zn ? "border-nvr-cyan/40 bg-nvr-cyan/[0.08] text-[#007a99] dark:text-nvr-cyan" : "border-slate-200 text-slate-500 hover:text-slate-700 dark:border-slate-700 dark:text-slate-400"}`,
4996
5000
  "data-cbv-map-toggle": !0,
4997
5001
  children: [
4998
- /* @__PURE__ */ n(ti, { className: "h-3.5 w-3.5" }),
5002
+ /* @__PURE__ */ n(ai, { className: "h-3.5 w-3.5" }),
4999
5003
  "Map"
5000
5004
  ]
5001
5005
  }
@@ -5077,7 +5081,7 @@ function Up({
5077
5081
  "button",
5078
5082
  {
5079
5083
  type: "button",
5080
- onClick: Ms,
5084
+ onClick: As,
5081
5085
  "aria-label": "Clear AI result",
5082
5086
  className: "rounded-full p-0.5 hover:bg-nvr-cyan/[0.16]",
5083
5087
  children: /* @__PURE__ */ n(fr, { className: "h-3 w-3" })
@@ -5123,13 +5127,13 @@ function Up({
5123
5127
  "button",
5124
5128
  {
5125
5129
  type: "button",
5126
- onClick: Ks,
5130
+ onClick: Bs,
5127
5131
  "aria-pressed": ht,
5128
5132
  "data-cbv-bulk-mode": ht ? "on" : "off",
5129
5133
  "data-tip": ht ? "Leave bulk mode — clears the selection and turns row actions back on" : "Select rows to act on several at once",
5130
5134
  className: `flex h-8 items-center gap-1.5 rounded-md border px-2.5 text-[12px] font-medium ${ht ? "border-nvr-cyan bg-nvr-cyan/10 text-slate-800 dark:text-slate-100" : "border-slate-200 text-slate-500 hover:bg-slate-100 hover:text-slate-700 dark:border-slate-700 dark:text-slate-400 dark:hover:bg-slate-800"}`,
5131
5135
  children: [
5132
- /* @__PURE__ */ n(ni, { className: "h-3.5 w-3.5" }),
5136
+ /* @__PURE__ */ n(ri, { className: "h-3.5 w-3.5" }),
5133
5137
  ht ? "Done" : "Bulk select"
5134
5138
  ]
5135
5139
  }
@@ -5142,7 +5146,7 @@ function Up({
5142
5146
  "aria-label": "Row density",
5143
5147
  title: Yt === "compact" ? "Switch to comfortable rows" : "Switch to compact rows",
5144
5148
  className: "flex h-8 w-8 items-center justify-center rounded-md border border-slate-200 text-slate-500 hover:bg-slate-100 hover:text-slate-700 dark:border-slate-700 dark:text-slate-400 dark:hover:bg-slate-800",
5145
- children: Yt === "compact" ? /* @__PURE__ */ n(as, { className: "h-4 w-4" }) : /* @__PURE__ */ n(ai, { className: "h-4 w-4" })
5149
+ children: Yt === "compact" ? /* @__PURE__ */ n(as, { className: "h-4 w-4" }) : /* @__PURE__ */ n(li, { className: "h-4 w-4" })
5146
5150
  }
5147
5151
  ),
5148
5152
  /* @__PURE__ */ c("div", { className: "relative", ref: Er, children: [
@@ -5254,7 +5258,7 @@ function Up({
5254
5258
  }
5255
5259
  ),
5256
5260
  yn === e && /* @__PURE__ */ c("div", { className: "mb-1 ml-5 mr-1 rounded-md border border-slate-100 bg-slate-50 p-1.5 dark:border-slate-800 dark:bg-slate-800/60", children: [
5257
- /* @__PURE__ */ n("div", { className: "flex flex-wrap gap-1", children: Bc.map((l) => {
5261
+ /* @__PURE__ */ n("div", { className: "flex flex-wrap gap-1", children: zc.map((l) => {
5258
5262
  const s = JSON.stringify(Ne[e] ?? null) === JSON.stringify(l.cfg);
5259
5263
  return /* @__PURE__ */ n(
5260
5264
  "button",
@@ -5405,7 +5409,7 @@ function Up({
5405
5409
  A && /* @__PURE__ */ c("div", { className: "mt-1 border-t border-slate-100 pt-1.5 dark:border-slate-800", children: [
5406
5410
  /* @__PURE__ */ n("p", { className: "px-1.5 pb-1 text-[10.5px] font-semibold uppercase tracking-wide text-slate-400", children: "+ Related column" }),
5407
5411
  /* @__PURE__ */ n(
5408
- su,
5412
+ ou,
5409
5413
  {
5410
5414
  collection: a,
5411
5415
  meta: A,
@@ -5508,7 +5512,7 @@ function Up({
5508
5512
  {
5509
5513
  type: "button",
5510
5514
  onClick: () => {
5511
- pn(!1), Ro();
5515
+ pn(!1), Po();
5512
5516
  },
5513
5517
  className: "block w-full rounded-md px-2.5 py-1.5 text-left text-[12.5px] text-slate-700 hover:bg-muted dark:text-slate-200",
5514
5518
  children: "CSV — visible columns"
@@ -5534,7 +5538,7 @@ ${r}`).then(() => {
5534
5538
  });
5535
5539
  },
5536
5540
  className: "block w-full rounded-md px-2.5 py-1.5 text-left text-[12.5px] text-slate-700 hover:bg-muted dark:text-slate-200",
5537
- children: As ? "Copied ✓" : "Copy table to clipboard"
5541
+ children: Ks ? "Copied ✓" : "Copy table to clipboard"
5538
5542
  }
5539
5543
  ),
5540
5544
  $l.length > 0 && /* @__PURE__ */ n("p", { className: "border-t border-slate-100 px-2.5 pb-0.5 pt-1.5 text-[10px] font-semibold uppercase tracking-wide text-slate-400 dark:border-border/60", children: "Presets (server, current filters apply)" }),
@@ -5546,7 +5550,7 @@ ${r}`).then(() => {
5546
5550
  {
5547
5551
  type: "button",
5548
5552
  onClick: () => {
5549
- pn(!1), No(e.id);
5553
+ pn(!1), Co(e.id);
5550
5554
  },
5551
5555
  className: "block min-w-0 flex-1 rounded-md px-2.5 py-1.5 text-left text-[12.5px] text-slate-700 hover:bg-muted dark:text-slate-200",
5552
5556
  children: [
@@ -5562,7 +5566,7 @@ ${r}`).then(() => {
5562
5566
  "data-export-background": e.id,
5563
5567
  "data-tip": "Run in the background — a download appears in the Jobs tray",
5564
5568
  onClick: () => {
5565
- pn(!1), So(e.id, e.name);
5569
+ pn(!1), $o(e.id, e.name);
5566
5570
  },
5567
5571
  className: "mr-1 shrink-0 rounded px-1.5 py-1 text-[10.5px] font-medium text-slate-500 hover:bg-muted hover:text-slate-800 dark:text-slate-400 dark:hover:text-slate-100",
5568
5572
  children: "Background"
@@ -5624,7 +5628,7 @@ ${r}`).then(() => {
5624
5628
  slug: e.slug,
5625
5629
  label: e.create_label ?? e.name,
5626
5630
  isDefault: !1,
5627
- steps: Us(e)
5631
+ steps: Vs(e)
5628
5632
  }))
5629
5633
  ].map((e) => /* @__PURE__ */ c(
5630
5634
  "div",
@@ -5740,7 +5744,7 @@ ${r}`).then(() => {
5740
5744
  accept: (((es = Fn.data) == null ? void 0 : es.accept) ?? []).join(","),
5741
5745
  multiple: !0,
5742
5746
  className: "hidden",
5743
- onChange: Qs,
5747
+ onChange: Ws,
5744
5748
  "data-cbv-autofill-input": !0
5745
5749
  }
5746
5750
  )
@@ -5783,7 +5787,7 @@ ${r}`).then(() => {
5783
5787
  ] }),
5784
5788
  Ft.length > 0 && /* @__PURE__ */ c("div", { 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", children: [
5785
5789
  Ft.map((e) => /* @__PURE__ */ n(
5786
- Xc,
5790
+ Zc,
5787
5791
  {
5788
5792
  def: e,
5789
5793
  allowedIds: Wr(e),
@@ -5891,11 +5895,11 @@ ${r}`).then(() => {
5891
5895
  "button",
5892
5896
  {
5893
5897
  type: "button",
5894
- onClick: () => Fo.mutate(e.id),
5898
+ onClick: () => Eo.mutate(e.id),
5895
5899
  title: da(e.id) ? "Subscribed — a daily digest reports records that enter this view. Click to unsubscribe." : "Subscribe — get a daily digest of records that enter this view",
5896
5900
  "aria-label": `Toggle digest subscription for ${e.name}`,
5897
5901
  className: da(e.id) ? "text-[#00a5cc]" : "text-slate-400 hover:text-[#00a5cc]",
5898
- children: da(e.id) ? /* @__PURE__ */ n(ri, { className: "h-3 w-3", fill: "currentColor" }) : /* @__PURE__ */ n(li, { className: "h-3 w-3" })
5902
+ children: da(e.id) ? /* @__PURE__ */ n(si, { className: "h-3 w-3", fill: "currentColor" }) : /* @__PURE__ */ n(oi, { className: "h-3 w-3" })
5899
5903
  }
5900
5904
  ),
5901
5905
  /* @__PURE__ */ n(
@@ -5909,8 +5913,8 @@ ${r}`).then(() => {
5909
5913
  "data-view-update": e.id,
5910
5914
  "data-view-update-state": At.isPending && At.variables === e.id ? "saving" : ar === e.id ? "saved" : "idle",
5911
5915
  className: "inline-flex h-3.5 w-3.5 items-center justify-center",
5912
- children: At.isPending && At.variables === e.id ? /* @__PURE__ */ n(si, { className: "h-3 w-3 animate-spin" }) : ar === e.id ? /* @__PURE__ */ n(
5913
- oi,
5916
+ children: At.isPending && At.variables === e.id ? /* @__PURE__ */ n(ii, { className: "h-3 w-3 animate-spin" }) : ar === e.id ? /* @__PURE__ */ n(
5917
+ di,
5914
5918
  {
5915
5919
  className: "h-3 w-3 text-emerald-600 dark:text-emerald-400",
5916
5920
  strokeWidth: 3
@@ -5924,15 +5928,15 @@ ${r}`).then(() => {
5924
5928
  name: e.name,
5925
5929
  isDefault: !!e.is_default,
5926
5930
  roleId: e.default_for_role ?? null,
5927
- onCollectionDefault: (t) => $o.mutate({ id: e.id, on: t }),
5928
- onRoleDefault: (t) => qo.mutate({ id: e.id, role: t })
5931
+ onCollectionDefault: (t) => To.mutate({ id: e.id, on: t }),
5932
+ onRoleDefault: (t) => Lo.mutate({ id: e.id, role: t })
5929
5933
  }
5930
5934
  ),
5931
5935
  /* @__PURE__ */ n(
5932
5936
  "button",
5933
5937
  {
5934
5938
  type: "button",
5935
- onClick: () => To.mutate(e.id),
5939
+ onClick: () => Fo.mutate(e.id),
5936
5940
  title: "Delete view",
5937
5941
  "aria-label": `Delete ${e.name}`,
5938
5942
  className: "hover:text-red-500",
@@ -5944,7 +5948,7 @@ ${r}`).then(() => {
5944
5948
  },
5945
5949
  e.id
5946
5950
  )),
5947
- Os ? /* @__PURE__ */ c(
5951
+ Is ? /* @__PURE__ */ c(
5948
5952
  "form",
5949
5953
  {
5950
5954
  className: "flex items-center gap-1",
@@ -5994,20 +5998,20 @@ ${r}`).then(() => {
5994
5998
  )
5995
5999
  ] }),
5996
6000
  He != null && /* @__PURE__ */ c("div", { className: "mx-4 mt-3 flex flex-wrap items-center gap-3 rounded-md border border-red-200 bg-red-50 px-4 py-2.5 text-[13px] text-red-700 dark:border-red-900/40 dark:bg-red-900/10 dark:text-red-400", children: [
5997
- /* @__PURE__ */ n("span", { className: "min-w-0 flex-1", children: ad(He) === 503 ? rd(He) : Wt(He, "Failed to load records") }),
6001
+ /* @__PURE__ */ n("span", { className: "min-w-0 flex-1", children: rd(He) === 503 ? ld(He) : Wt(He, "Failed to load records") }),
5998
6002
  (He == null ? void 0 : He.status) === 403 && !lc(He) && /* @__PURE__ */ n(
5999
6003
  "button",
6000
6004
  {
6001
6005
  type: "button",
6002
6006
  disabled: ll,
6003
- onClick: () => void u.request(_e("/access-requests", { collection: a })).then(() => to(!0)).catch(() => {
6007
+ onClick: () => void u.request(_e("/access-requests", { collection: a })).then(() => ao(!0)).catch(() => {
6004
6008
  }),
6005
6009
  className: "h-7 shrink-0 rounded-md border border-red-300 px-2.5 text-[12px] font-medium hover:bg-red-100 disabled:opacity-60 dark:border-red-500/40 dark:hover:bg-red-900/20",
6006
6010
  "data-request-access": !0,
6007
6011
  children: ll ? "Requested — an admin was notified" : "Request access"
6008
6012
  }
6009
6013
  ),
6010
- fs(He).map((e) => /* @__PURE__ */ c(
6014
+ bs(He).map((e) => /* @__PURE__ */ c(
6011
6015
  "button",
6012
6016
  {
6013
6017
  type: "button",
@@ -6025,7 +6029,7 @@ ${r}`).then(() => {
6025
6029
  },
6026
6030
  e
6027
6031
  )),
6028
- (He == null ? void 0 : He.status) !== 403 && fs(He).length === 0 && /* @__PURE__ */ n(
6032
+ (He == null ? void 0 : He.status) !== 403 && bs(He).length === 0 && /* @__PURE__ */ n(
6029
6033
  "button",
6030
6034
  {
6031
6035
  type: "button",
@@ -6037,7 +6041,7 @@ ${r}`).then(() => {
6037
6041
  )
6038
6042
  ] }),
6039
6043
  St === "tree" && Pn ? /* @__PURE__ */ n("div", { className: "flex min-h-0 flex-1 flex-col p-4 pt-3", children: /* @__PURE__ */ n("div", { className: "flex min-h-0 flex-1 flex-col overflow-hidden rounded-lg border border-slate-200 bg-white dark:border-slate-700 dark:bg-slate-900", children: /* @__PURE__ */ n(
6040
- Qd,
6044
+ Ud,
6041
6045
  {
6042
6046
  collection: a,
6043
6047
  config: Pn,
@@ -6050,7 +6054,7 @@ ${r}`).then(() => {
6050
6054
  }
6051
6055
  ) }) }) : St && (K != null && K.some((e) => e.key === St)) ? /* @__PURE__ */ n("div", { className: "flex min-h-0 flex-1 flex-col p-4 pt-3", "data-cbv-extra-view": St, children: (ts = K.find((e) => e.key === St)) == null ? void 0 : ts.render() }) : null,
6052
6056
  Zn && fn ? /* @__PURE__ */ n("div", { className: "flex min-h-0 flex-1 flex-col p-4 pt-3", children: /* @__PURE__ */ n(
6053
- Cc,
6057
+ $c,
6054
6058
  {
6055
6059
  collection: a,
6056
6060
  latField: fn.latField,
@@ -6087,7 +6091,7 @@ ${r}`).then(() => {
6087
6091
  /* @__PURE__ */ n(pr, { "aria-hidden": !0, className: "h-3.5 w-3.5 animate-spin text-[#00a5cc]" }),
6088
6092
  pl != null ? `${za.text ?? "Still working"} — ${pl}s` : "Loading…"
6089
6093
  ] }) }) }),
6090
- ea && za.slow && /* @__PURE__ */ n("div", { className: "pointer-events-none absolute inset-x-0 top-12 z-[6] flex justify-center px-4", children: /* @__PURE__ */ n(Mc, { reason: za, variant: "pill" }) }),
6094
+ ea && za.slow && /* @__PURE__ */ n("div", { className: "pointer-events-none absolute inset-x-0 top-12 z-[6] flex justify-center px-4", children: /* @__PURE__ */ n(Oc, { reason: za, variant: "pill" }) }),
6091
6095
  /* @__PURE__ */ n(
6092
6096
  "div",
6093
6097
  {
@@ -6126,13 +6130,13 @@ ${r}`).then(() => {
6126
6130
  ref: ir("__checkbox__"),
6127
6131
  className: "sticky left-0 top-0 z-[4] h-8 w-11 bg-slate-50 py-0 pl-1.5 pr-3 dark:bg-slate-800",
6128
6132
  children: /* @__PURE__ */ c("span", { className: "flex items-center gap-1", children: [
6129
- /* @__PURE__ */ n(ks, { change: null }),
6133
+ /* @__PURE__ */ n(ys, { change: null }),
6130
6134
  ht && /* @__PURE__ */ n(
6131
6135
  "input",
6132
6136
  {
6133
6137
  type: "checkbox",
6134
6138
  checked: rr,
6135
- onChange: Mo,
6139
+ onChange: Ao,
6136
6140
  "aria-label": "Select all"
6137
6141
  }
6138
6142
  )
@@ -6164,7 +6168,7 @@ ${r}`).then(() => {
6164
6168
  ref: r ? ir(t) : void 0,
6165
6169
  style: { ...Bl(t), ...Re(t) },
6166
6170
  onClick: () => {
6167
- g || Do(t);
6171
+ g || Oo(t);
6168
6172
  },
6169
6173
  className: `${l} relative ${_l(t) ? "text-right" : "text-left"} ${g ? "" : "cursor-pointer hover:text-slate-600"} ${s}`,
6170
6174
  children: [
@@ -6186,14 +6190,14 @@ ${r}`).then(() => {
6186
6190
  }
6187
6191
  ),
6188
6192
  zl(t),
6189
- Yo(t)
6193
+ Go(t)
6190
6194
  ]
6191
6195
  },
6192
6196
  t
6193
6197
  );
6194
6198
  })
6195
6199
  ] }),
6196
- (yo || In) && /* @__PURE__ */ c("tr", { className: "border-b border-slate-200 dark:border-slate-700", children: [
6200
+ (_o || In) && /* @__PURE__ */ c("tr", { className: "border-b border-slate-200 dark:border-slate-700", children: [
6197
6201
  Lt && /* @__PURE__ */ n("th", { className: "sticky left-0 top-8 z-[4] w-11 bg-slate-50 py-1 pl-1.5 pr-3 dark:bg-slate-800" }),
6198
6202
  nn.map((e) => {
6199
6203
  var s;
@@ -6224,7 +6228,7 @@ ${r}`).then(() => {
6224
6228
  value: (o == null ? void 0 : o.kind) === "fulfilment" ? o.value : "",
6225
6229
  options: [
6226
6230
  { value: "", label: "All" },
6227
- ...bs.filter(
6231
+ ...hs.filter(
6228
6232
  (f) => f.value !== "complete" || !!(Oe != null && Oe.remaining_field)
6229
6233
  )
6230
6234
  ],
@@ -6285,7 +6289,7 @@ ${r}`).then(() => {
6285
6289
  value: f,
6286
6290
  options: [
6287
6291
  { value: "", label: "All" },
6288
- ...hs
6292
+ ...gs
6289
6293
  ],
6290
6294
  onChange: (g) => Ie(
6291
6295
  "__integrations__",
@@ -6336,7 +6340,7 @@ ${r}`).then(() => {
6336
6340
  className: `${l} ${e.kind === "actions" ? "w-20" : ""}`
6337
6341
  },
6338
6342
  t
6339
- ) : /* @__PURE__ */ n("th", { style: Re(t), className: l, children: ko(t) }, t);
6343
+ ) : /* @__PURE__ */ n("th", { style: Re(t), className: l, children: wo(t) }, t);
6340
6344
  })
6341
6345
  ] })
6342
6346
  ] }),
@@ -6344,9 +6348,9 @@ ${r}`).then(() => {
6344
6348
  // #3229 — one placeholder per real column, real row height (h-8, or the
6345
6349
  // table's comfortable h-11), real pins/widths: nothing moves on arrival.
6346
6350
  /* @__PURE__ */ n(
6347
- Dc,
6351
+ Mc,
6348
6352
  {
6349
- columns: jo,
6353
+ columns: zo,
6350
6354
  rows: Math.min(ze, 20),
6351
6355
  rowClassName: "h-8",
6352
6356
  cellClassName: "px-3 py-1.5",
@@ -6381,7 +6385,7 @@ ${r}`).then(() => {
6381
6385
  }
6382
6386
  return He != null ? null : /* @__PURE__ */ c("div", { className: "flex flex-col items-center gap-2 text-center", children: [
6383
6387
  /* @__PURE__ */ n("span", { className: "flex h-10 w-10 items-center justify-center rounded-full bg-slate-100 dark:bg-slate-800", children: /* @__PURE__ */ n(
6384
- $s,
6388
+ qs,
6385
6389
  {
6386
6390
  "aria-hidden": !0,
6387
6391
  className: "h-4.5 w-4.5 h-5 w-5 text-slate-400"
@@ -6407,7 +6411,7 @@ ${r}`).then(() => {
6407
6411
  "button",
6408
6412
  {
6409
6413
  type: "button",
6410
- onClick: ao,
6414
+ onClick: lo,
6411
6415
  className: "font-medium text-[#0284a8] underline-offset-2 hover:underline dark:text-nvr-cyan",
6412
6416
  children: "Show all"
6413
6417
  }
@@ -6462,17 +6466,17 @@ ${r}`).then(() => {
6462
6466
  },
6463
6467
  `__group__${e.gkey}`
6464
6468
  );
6465
- const l = e.row, s = l.id, o = Jt.includes(s), f = (B = Te == null ? void 0 : Te.instances) == null ? void 0 : B[String(s)], g = uo[String(s)], x = Za == null ? void 0 : Za[String(s)], j = io.get(String(s)) ?? null, I = mo(a, s), $e = !o && g ? xd(g.color) : void 0, M = o ? "bg-[#e6fafe] dark:bg-[#0c2a33]" : $e ?? "bg-white group-hover:bg-[#f2fcff] dark:bg-slate-900 dark:group-hover:bg-[#0e2d3a]";
6469
+ const l = e.row, s = l.id, o = Jt.includes(s), f = (B = Te == null ? void 0 : Te.instances) == null ? void 0 : B[String(s)], g = mo[String(s)], x = Za == null ? void 0 : Za[String(s)], j = uo.get(String(s)) ?? null, I = bo(a, s), $e = !o && g ? vd(g.color) : void 0, M = o ? "bg-[#e6fafe] dark:bg-[#0c2a33]" : $e ?? "bg-white group-hover:bg-[#f2fcff] dark:bg-slate-900 dark:group-hover:bg-[#0e2d3a]";
6466
6470
  return /* @__PURE__ */ c(
6467
6471
  "tr",
6468
6472
  {
6469
- ...ro({ collection: a, id: String(s) }),
6470
- ...Po(s),
6473
+ ...so({ collection: a, id: String(s) }),
6474
+ ...Mo(s),
6471
6475
  "data-row-key": String(s),
6472
- title: Et.titleFor(String(s)) ?? (j && !j.is_mine ? Xi(j) : void 0) ?? (g ? `At risk — ${g.rule}` : void 0) ?? (I ? Tc : void 0),
6476
+ title: Et.titleFor(String(s)) ?? (j && !j.is_mine ? Zi(j) : void 0) ?? (g ? `At risk — ${g.rule}` : void 0) ?? (I ? Lc : void 0),
6473
6477
  "data-picker-excluded": I ? "" : void 0,
6474
6478
  style: r,
6475
- className: `nvr-row-enter group h-8 cursor-pointer border-b border-slate-100 transition-colors duration-150 hover:bg-nvr-cyan/[0.04] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-nvr-cyan dark:border-slate-800 dark:hover:bg-nvr-cyan/[0.08] ${o ? "bg-nvr-cyan/[0.08]" : $e ?? ""} ${I ? qc : ""}`,
6479
+ className: `nvr-row-enter group h-8 cursor-pointer border-b border-slate-100 transition-colors duration-150 hover:bg-nvr-cyan/[0.04] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-nvr-cyan dark:border-slate-800 dark:hover:bg-nvr-cyan/[0.08] ${o ? "bg-nvr-cyan/[0.08]" : $e ?? ""} ${I ? Tc : ""}`,
6476
6480
  children: [
6477
6481
  Lt && /* @__PURE__ */ n(
6478
6482
  "td",
@@ -6481,26 +6485,26 @@ ${r}`).then(() => {
6481
6485
  onClick: (H) => H.stopPropagation(),
6482
6486
  children: /* @__PURE__ */ c("span", { className: "flex items-center gap-1", children: [
6483
6487
  j || Et.isNew(String(s)) ? /* @__PURE__ */ n(
6484
- wc,
6488
+ _c,
6485
6489
  {
6486
6490
  lock: j,
6487
6491
  isNew: Et.isNew(String(s)),
6488
6492
  dataAttr: "data-cbv-live-mark"
6489
6493
  }
6490
- ) : ml[cs(a, String(s))] ? /* @__PURE__ */ n(
6491
- Pc,
6494
+ ) : ml[us(a, String(s))] ? /* @__PURE__ */ n(
6495
+ Dc,
6492
6496
  {
6493
- viewers: ml[cs(a, String(s))],
6497
+ viewers: ml[us(a, String(s))],
6494
6498
  dataAttr: "data-cbv-presence"
6495
6499
  }
6496
- ) : /* @__PURE__ */ n(ks, { change: x, dataAttr: "data-cbv-unseen" }),
6497
- /* @__PURE__ */ n(Ad, { rowId: s }),
6500
+ ) : /* @__PURE__ */ n(ys, { change: x, dataAttr: "data-cbv-unseen" }),
6501
+ /* @__PURE__ */ n(Id, { rowId: s }),
6498
6502
  ht && /* @__PURE__ */ n(
6499
6503
  "input",
6500
6504
  {
6501
6505
  type: "checkbox",
6502
6506
  checked: o,
6503
- onChange: () => Oo(s),
6507
+ onChange: () => Io(s),
6504
6508
  "aria-label": `Select ${s}`
6505
6509
  }
6506
6510
  )
@@ -6579,7 +6583,7 @@ ${r}`).then(() => {
6579
6583
  style: Re(p),
6580
6584
  "data-tip": V != null && (T != null && T.entered_at) ? `In ${T.state_label ?? "this state"} since ${new Date(T.entered_at).toLocaleString()}` : void 0,
6581
6585
  className: `whitespace-nowrap px-3 py-1.5 text-[12px] tabular-nums text-slate-600 dark:text-slate-300 ${st(p, "z-[1]", M)}`,
6582
- children: V == null ? /* @__PURE__ */ n("span", { className: "text-slate-300 dark:text-slate-600", children: "—" }) : Td(V)
6586
+ children: V == null ? /* @__PURE__ */ n("span", { className: "text-slate-300 dark:text-slate-600", children: "—" }) : Ld(V)
6583
6587
  },
6584
6588
  p
6585
6589
  );
@@ -6592,7 +6596,7 @@ ${r}`).then(() => {
6592
6596
  className: `whitespace-nowrap px-3 py-1 ${st(p, "z-[1]", M)}`,
6593
6597
  onClick: (T) => T.stopPropagation(),
6594
6598
  children: /* @__PURE__ */ n(
6595
- xs,
6599
+ vs,
6596
6600
  {
6597
6601
  users: (tr == null ? void 0 : tr[String(s)]) ?? [],
6598
6602
  showSingleName: !1
@@ -6608,7 +6612,7 @@ ${r}`).then(() => {
6608
6612
  {
6609
6613
  style: Re(p),
6610
6614
  className: `whitespace-nowrap px-3 py-1.5 ${st(p, "z-[1]", M)}`,
6611
- children: /* @__PURE__ */ n(Uc, { summary: T })
6615
+ children: /* @__PURE__ */ n(Wc, { summary: T })
6612
6616
  },
6613
6617
  p
6614
6618
  );
@@ -6669,13 +6673,13 @@ ${r}`).then(() => {
6669
6673
  );
6670
6674
  }
6671
6675
  if (H.kind === "formula") {
6672
- const T = Gs(l, p);
6676
+ const T = Zs(l, p);
6673
6677
  return /* @__PURE__ */ n(
6674
6678
  "td",
6675
6679
  {
6676
6680
  style: Re(p),
6677
6681
  "data-cbv-formula-cell": p,
6678
- "data-tip": Xs(l, p),
6682
+ "data-tip": eo(l, p),
6679
6683
  className: `whitespace-nowrap px-3 py-1.5 text-right tabular-nums text-slate-700 dark:text-slate-200 ${st(p, "z-[1]", M)}`,
6680
6684
  children: T == null ? /* @__PURE__ */ n("span", { className: "text-slate-300 dark:text-slate-600", children: "—" }) : Ne[p] ? xn(String(T), Ne[p]) : ct(Math.round(T * 100) / 100)
6681
6685
  },
@@ -6690,7 +6694,7 @@ ${r}`).then(() => {
6690
6694
  className: `w-20 whitespace-nowrap px-2 py-1 text-right ${st(p, "z-[1]", M)}`,
6691
6695
  onClick: (T) => T.stopPropagation(),
6692
6696
  children: /* @__PURE__ */ n(
6693
- Hc,
6697
+ Yc,
6694
6698
  {
6695
6699
  collection: a,
6696
6700
  id: s,
@@ -6708,7 +6712,7 @@ ${r}`).then(() => {
6708
6712
  },
6709
6713
  p
6710
6714
  );
6711
- const it = Ot(p) ? ho(s, p) : null, We = Ot(p) ? null : at(Qe, a, p);
6715
+ const it = Ot(p) ? xo(s, p) : null, We = Ot(p) ? null : at(Qe, a, p);
6712
6716
  return /* @__PURE__ */ n(
6713
6717
  "td",
6714
6718
  {
@@ -6723,7 +6727,7 @@ ${r}`).then(() => {
6723
6727
  });
6724
6728
  },
6725
6729
  className: `whitespace-nowrap px-3 py-1.5 ${_l(p) ? "text-right" : ""} ${st(p, "z-[1]", M)}`,
6726
- children: Ys(
6730
+ children: Gs(
6727
6731
  l,
6728
6732
  p,
6729
6733
  !!j && !j.is_mine,
@@ -6733,10 +6737,10 @@ ${r}`).then(() => {
6733
6737
  if (Ye.length === 0 || !V || V === "—")
6734
6738
  return /* @__PURE__ */ n("span", { className: "text-[12px] text-slate-300", children: "—" });
6735
6739
  if (Ye.length === 1)
6736
- return /* @__PURE__ */ n("span", { onClick: (dt) => dt.stopPropagation(), children: /* @__PURE__ */ n(vs, { userId: String(Ye[0]), size: "compact" }) });
6740
+ return /* @__PURE__ */ n("span", { onClick: (dt) => dt.stopPropagation(), children: /* @__PURE__ */ n(ks, { userId: String(Ye[0]), size: "compact" }) });
6737
6741
  const ge = V.split(", ");
6738
6742
  return /* @__PURE__ */ n(
6739
- xs,
6743
+ vs,
6740
6744
  {
6741
6745
  users: Ye.map((dt, ua) => ({
6742
6746
  id: String(dt),
@@ -6768,7 +6772,7 @@ ${r}`).then(() => {
6768
6772
  "data-tip": xt(s, p) ?? void 0,
6769
6773
  children: xt(s, p) != null ? `${((Y = Ne[p]) == null ? void 0 : Y.type) === "count" && Nl(p) ? "📎 " : ""}${hn(xt(s, p) ?? "", p, s)}` : /* @__PURE__ */ n("span", { className: "inline-block h-3.5 w-16 animate-pulse rounded bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" })
6770
6774
  }
6771
- ) : (We == null ? void 0 : We.one_collection) === "nivaro_users" && l[p] != null ? /* @__PURE__ */ n("span", { onClick: (T) => T.stopPropagation(), children: /* @__PURE__ */ n(vs, { userId: String(l[p]), size: "compact" }) }) : We != null && We.one_collection && l[p] != null && !Ct(We.one_collection) ? /* @__PURE__ */ n(
6775
+ ) : (We == null ? void 0 : We.one_collection) === "nivaro_users" && l[p] != null ? /* @__PURE__ */ n("span", { onClick: (T) => T.stopPropagation(), children: /* @__PURE__ */ n(ks, { userId: String(l[p]), size: "compact" }) }) : We != null && We.one_collection && l[p] != null && !Ct(We.one_collection) ? /* @__PURE__ */ n(
6772
6776
  "button",
6773
6777
  {
6774
6778
  type: "button",
@@ -6789,7 +6793,7 @@ ${r}`).then(() => {
6789
6793
  }
6790
6794
  )
6791
6795
  }
6792
- ) : p === "id" && us(A, l) ? (
6796
+ ) : p === "id" && ps(A, l) ? (
6793
6797
  // #776 — the readable id; the internal one on hover.
6794
6798
  /* @__PURE__ */ n(
6795
6799
  "span",
@@ -6797,7 +6801,7 @@ ${r}`).then(() => {
6797
6801
  "data-record-ref": !0,
6798
6802
  "data-tip": `#${String(l.id)}`,
6799
6803
  className: "font-mono text-[12px] text-slate-700 dark:text-slate-200",
6800
- children: us(A, l)
6804
+ children: ps(A, l)
6801
6805
  }
6802
6806
  )
6803
6807
  ) : Ne[p] && l[p] != null ? /* @__PURE__ */ n(
@@ -6805,7 +6809,7 @@ ${r}`).then(() => {
6805
6809
  {
6806
6810
  className: Ut(
6807
6811
  "text-[12px] tabular-nums text-slate-700 dark:text-slate-200",
6808
- ma(l[p], Ge[p]) && ws[ma(l[p], Ge[p])]
6812
+ ma(l[p], Ge[p]) && _s[ma(l[p], Ge[p])]
6809
6813
  ),
6810
6814
  children: xn(String(l[p]), Ne[p])
6811
6815
  }
@@ -6814,10 +6818,10 @@ ${r}`).then(() => {
6814
6818
  {
6815
6819
  className: Ut(
6816
6820
  "text-[12px]",
6817
- ws[ma(l[p], Ge[p])]
6821
+ _s[ma(l[p], Ge[p])]
6818
6822
  ),
6819
6823
  children: /* @__PURE__ */ n(
6820
- _s,
6824
+ Ns,
6821
6825
  {
6822
6826
  collection: a,
6823
6827
  field: p,
@@ -6828,7 +6832,7 @@ ${r}`).then(() => {
6828
6832
  )
6829
6833
  }
6830
6834
  ) : /* @__PURE__ */ n(
6831
- _s,
6835
+ Ns,
6832
6836
  {
6833
6837
  collection: a,
6834
6838
  field: p,
@@ -6846,7 +6850,7 @@ ${r}`).then(() => {
6846
6850
  },
6847
6851
  String(s)
6848
6852
  );
6849
- }) }, no),
6853
+ }) }, ro),
6850
6854
  ja && Object.keys(ja).length > 0 && !ue && /* @__PURE__ */ n("tfoot", { className: "text-[12px] tabular-nums", children: /* @__PURE__ */ c("tr", { className: "sticky bottom-0 z-[2] border-t-2 border-slate-200 bg-slate-50 font-medium dark:border-slate-700 dark:bg-slate-800", children: [
6851
6855
  Lt && /* @__PURE__ */ n("td", { className: "sticky left-0 z-[3] w-11 bg-slate-50 py-1.5 pl-1.5 pr-3 dark:bg-slate-800" }),
6852
6856
  nn.map((e, t) => {
@@ -6870,7 +6874,7 @@ ${r}`).then(() => {
6870
6874
  ),
6871
6875
  /* @__PURE__ */ n(bc, { scrollerRef: Pr }),
6872
6876
  /* @__PURE__ */ n(
6873
- Ec,
6877
+ Pc,
6874
6878
  {
6875
6879
  collections: a ? [a] : [],
6876
6880
  selectedIds: Rt,
@@ -6892,9 +6896,9 @@ ${r}`).then(() => {
6892
6896
  !ue && !Pe && (en ? O > 1 || ye.length >= ze : Fe > ze) && /* @__PURE__ */ c("div", { className: "flex shrink-0 items-center justify-between border-t border-slate-100 bg-white px-3 py-2 dark:border-slate-800 dark:bg-slate-900", children: [
6893
6897
  /* @__PURE__ */ c("p", { className: "text-[12px] tabular-nums text-slate-500 dark:text-slate-400", children: [
6894
6898
  /* @__PURE__ */ c("span", { className: "font-semibold text-slate-700 dark:text-slate-200", children: [
6895
- ct(Io),
6899
+ ct(jo),
6896
6900
  "–",
6897
- ct(Ko)
6901
+ ct(Bo)
6898
6902
  ] }),
6899
6903
  " ",
6900
6904
  "of",
@@ -6971,7 +6975,7 @@ ${r}`).then(() => {
6971
6975
  }
6972
6976
  ),
6973
6977
  et != null && et.length ? /* @__PURE__ */ n(
6974
- Rc,
6978
+ Ec,
6975
6979
  {
6976
6980
  collection: et[0].collection,
6977
6981
  itemId: et[0].itemId,
@@ -6983,7 +6987,7 @@ ${r}`).then(() => {
6983
6987
  }
6984
6988
  ) : null,
6985
6989
  Sn && /* @__PURE__ */ n(
6986
- Ic,
6990
+ Kc,
6987
6991
  {
6988
6992
  collection: a,
6989
6993
  item: Sn,
@@ -7005,14 +7009,14 @@ ${r}`).then(() => {
7005
7009
  {
7006
7010
  type: "button",
7007
7011
  disabled: Pl,
7008
- onClick: () => void Ao(),
7012
+ onClick: () => void Ko(),
7009
7013
  className: "font-semibold text-nvr-navy underline decoration-dotted hover:text-nvr-cyan dark:text-nvr-cyan",
7010
7014
  children: Pl ? "Selecting…" : Fe > ca ? `Select the first ${ca.toLocaleString()} of ${Fe.toLocaleString()} matching` : `Select all ${Fe.toLocaleString()} matching rows`
7011
7015
  }
7012
7016
  )
7013
7017
  ] }),
7014
7018
  Lt && ht && Jt.length > 0 && /* @__PURE__ */ n(
7015
- du,
7019
+ cu,
7016
7020
  {
7017
7021
  collection: a,
7018
7022
  selectedIds: Jt,
@@ -7028,7 +7032,7 @@ ${r}`).then(() => {
7028
7032
  }
7029
7033
  );
7030
7034
  }
7031
- function uu(a, i, b, d) {
7035
+ function pu(a, i, b, d) {
7032
7036
  const v = Nr(i, a, b);
7033
7037
  if (v != null && v.one_collection) return /* @__PURE__ */ n(Sr, { relatedCollection: v.one_collection, id: d });
7034
7038
  if (typeof d == "boolean") return d ? "Yes" : "No";
@@ -7037,12 +7041,12 @@ function uu(a, i, b, d) {
7037
7041
  return /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}/.test(_) ? new Date(_).toLocaleString() : _.length > 160 ? `${_.slice(0, 160)}…` : _;
7038
7042
  }
7039
7043
  export {
7040
- Up as CollectionBrowserView,
7044
+ Vp as CollectionBrowserView,
7041
7045
  wa as MultiPick,
7042
- Hc as RowActionsMenu,
7043
- ws as TINT_TEXT,
7046
+ Yc as RowActionsMenu,
7047
+ _s as TINT_TEXT,
7044
7048
  ha as invalidateCbvRowQueries,
7045
- Vc as roleMayDelete,
7046
- Wc as roleMayUpdate,
7049
+ Hc as roleMayDelete,
7050
+ Vc as roleMayUpdate,
7047
7051
  ma as tintFor
7048
7052
  };