@nivaro/react 0.3.110 → 0.3.112

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +1 -1
  3. package/dist/index.d.ts +170 -2
  4. package/dist/index.js +745 -728
  5. package/dist/shared/components/CollectionBrowserView.js +3097 -2972
  6. package/dist/shared/components/CollectionImportBanner.js +135 -0
  7. package/dist/shared/components/ItemEditForm.js +2235 -2218
  8. package/dist/shared/components/JobsTray.js +54 -47
  9. package/dist/shared/components/TipLayer.js +61 -54
  10. package/dist/shared/components/ViewAsPersonButton.js +109 -0
  11. package/dist/shared/components/bulk/BulkFieldUpdate.js +228 -150
  12. package/dist/shared/components/bulk/BulkFieldUpdateButton.js +35 -41
  13. package/dist/shared/components/bulk/BulkLinksValue.js +91 -0
  14. package/dist/shared/components/bulk/bulk-field-options.js +20 -19
  15. package/dist/shared/components/bulk/bulk-update-preview.js +39 -0
  16. package/dist/shared/components/cbv/ColumnHeaderMenu.js +113 -0
  17. package/dist/shared/components/cbv/column-totals.js +66 -0
  18. package/dist/shared/components/collections-directory/CollectionHoverCard.js +108 -81
  19. package/dist/shared/components/collections-directory/CollectionRow.js +164 -148
  20. package/dist/shared/components/collections-directory/CollectionsDirectory.js +167 -166
  21. package/dist/shared/components/collections-directory/directory-data.js +70 -58
  22. package/dist/shared/components/imports/CollectionImportPanel.js +120 -118
  23. package/dist/shared/components/imports/DefinitionsPanel.js +24 -24
  24. package/dist/shared/components/imports/ImportDuplicatesNotice.js +65 -0
  25. package/dist/shared/components/item-edit/CatalogPickerField.js +631 -639
  26. package/dist/shared/components/item-edit/DuplicateNotice.js +168 -0
  27. package/dist/shared/components/item-edit/FieldRow.js +248 -246
  28. package/dist/shared/components/item-edit/InlineGridField.js +34 -33
  29. package/dist/shared/components/item-edit/InlineTableField.js +3064 -2882
  30. package/dist/shared/components/item-edit/MembershipSetField.js +165 -169
  31. package/dist/shared/components/item-edit/NestedRelationEditor.js +184 -189
  32. package/dist/shared/components/item-edit/PlanGrid.js +2 -1
  33. package/dist/shared/components/item-edit/QuickPickerDialog.js +35 -34
  34. package/dist/shared/components/item-edit/RecordLiveSync.js +32 -30
  35. package/dist/shared/components/item-edit/RelationCombobox.js +101 -100
  36. package/dist/shared/components/item-edit/RowHistorySheet.js +28 -27
  37. package/dist/shared/components/item-edit/SummaryPanel.js +133 -135
  38. package/dist/shared/components/item-edit/ViewAsRole.js +129 -52
  39. package/dist/shared/components/item-edit/grid-search.js +345 -0
  40. package/dist/shared/components/item-edit/render-stability.js +61 -54
  41. package/dist/shared/components/notifications/NotificationRulesEditor.js +25 -20
  42. package/dist/shared/components/ops-report/DigestSections.js +163 -144
  43. package/dist/shared/components/ops-report/drill.js +97 -97
  44. package/dist/shared/components/panels/AddendumLinesDiff.js +52 -51
  45. package/dist/shared/components/panels/AddendumPanel.js +92 -91
  46. package/dist/shared/components/panels/AsyncUserPicker.js +108 -0
  47. package/dist/shared/components/panels/BlockedMove.js +73 -0
  48. package/dist/shared/components/panels/CommentPanel.js +265 -252
  49. package/dist/shared/components/panels/OwnersSlot.js +47 -35
  50. package/dist/shared/components/panels/PipelineInsight.js +186 -0
  51. package/dist/shared/components/panels/PipelinePanel.js +1573 -1475
  52. package/dist/shared/components/panels/RecordIntegrityBanner.js +39 -38
  53. package/dist/shared/components/panels/RevisionsPanel.js +261 -260
  54. package/dist/shared/components/pipeline/FieldPicker.js +41 -40
  55. package/dist/shared/components/pipeline/OwnerMatrix.js +829 -700
  56. package/dist/shared/components/pipeline/OwnerRecordTrial.js +362 -0
  57. package/dist/shared/components/pipeline/PipelineEditorView.js +483 -467
  58. package/dist/shared/components/pipeline/PipelineStateOwners.js +65 -64
  59. package/dist/shared/components/pipeline/owner-matrix-draft.js +178 -0
  60. package/dist/shared/components/profile/MyDefaultsCard.js +36 -35
  61. package/dist/shared/components/profile/PersonHeader.js +29 -29
  62. package/dist/shared/components/profile/PersonProfile.js +30 -28
  63. package/dist/shared/components/profile/SlowScreensCard.js +286 -0
  64. package/dist/shared/components/queue/QueueWorklist.js +1090 -1071
  65. package/dist/shared/components/quick-filters/useQuickFilterEditing.js +45 -44
  66. package/dist/shared/components/support/TicketDetailSheet.js +25 -16
  67. package/dist/shared/components/support/TicketSlowScreens.js +32 -0
  68. package/dist/shared/lib/activity-sentence.js +224 -178
  69. package/dist/shared/lib/collection-import-banner.js +27 -0
  70. package/dist/shared/lib/crash-report.js +112 -0
  71. package/dist/shared/lib/export-runs.js +99 -0
  72. package/dist/shared/lib/jobs-tray.js +89 -67
  73. package/dist/shared/lib/list-link.js +76 -69
  74. package/dist/shared/lib/nav-trail.js +180 -76
  75. package/dist/shared/lib/query-keys.js +26 -0
  76. package/dist/shared/lib/view-as.js +16 -11
  77. package/package.json +1 -1
@@ -1,11 +1,11 @@
1
- function q(e) {
1
+ function M(e) {
2
2
  const n = i(e.collection_label) || "related rows", t = i(e.row_label), r = t ? `${n} · ${t}` : n;
3
3
  if (e.verb === "added") return `added ${r}`;
4
4
  if (e.verb === "removed") return `removed ${r}`;
5
5
  const o = (e.changes ?? []).filter((s) => s && i(s.label)).map((s) => `${i(s.label)} ${i(s.from) || "—"} → ${i(s.to) || "—"}`);
6
6
  return o.length ? `changed ${r}: ${o.join(", ")}` : `changed ${r}`;
7
7
  }
8
- const w = "a record you can't see", J = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i, U = {
8
+ const w = "a record you can't see", U = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i, W = {
9
9
  ai: "AI",
10
10
  api: "API",
11
11
  csv: "CSV",
@@ -29,91 +29,137 @@ const w = "a record you can't see", J = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0
29
29
  function i(e) {
30
30
  return e == null ? "" : String(e).trim();
31
31
  }
32
- function oe(e) {
32
+ function ie(e) {
33
33
  return i(e).toUpperCase();
34
34
  }
35
- function E(e) {
35
+ function F(e) {
36
36
  return e.split(/[\s_.:-]+/).map((n) => n.trim()).filter(Boolean);
37
37
  }
38
38
  function z(e) {
39
39
  const n = e.toLowerCase();
40
- return U[n] ?? n;
40
+ return W[n] ?? n;
41
41
  }
42
42
  function V(e) {
43
- const n = E(e).map(z).join(" ");
43
+ const n = F(e).map(z).join(" ");
44
44
  return n ? n.charAt(0).toUpperCase() + n.slice(1) : "";
45
45
  }
46
46
  function O(e) {
47
- return E(e).map((n) => U[n.toLowerCase()] ?? n.charAt(0).toUpperCase() + n.slice(1).toLowerCase()).join(" ");
47
+ return F(e).map((n) => W[n.toLowerCase()] ?? n.charAt(0).toUpperCase() + n.slice(1).toLowerCase()).join(" ");
48
48
  }
49
- function K(e) {
49
+ function J(e) {
50
50
  return /ies$/i.test(e) ? e.replace(/ies$/i, (n) => n === "IES" ? "Y" : "y") : /(ss|us|is)$/i.test(e) ? e : /(x|ch|sh|ss|us)es$/i.test(e) ? e.replace(/es$/i, "") : /s$/i.test(e) && e.length > 1 ? e.slice(0, -1) : e;
51
51
  }
52
- function M(e) {
52
+ function D(e) {
53
53
  return /[^aeiou]y$/i.test(e) ? e.replace(/y$/i, (n) => n === "Y" ? "IES" : "ies") : /(s|x|z|ch|sh)$/i.test(e) && !/^[A-Z0-9]+$/.test(e) ? `${e}es` : `${e}s`;
54
54
  }
55
- function _(e) {
55
+ function g(e) {
56
56
  return e.split(" ").map((n) => /[A-Z][^ ]*[A-Z]/.test(n) ? n : n.toLowerCase()).join(" ");
57
57
  }
58
- const ie = {
58
+ const se = {
59
59
  nivaro_activity: "Activity entry",
60
+ nivaro_activity_views: "Activity view",
61
+ nivaro_addendums: "Addendum",
62
+ nivaro_agent_questions: "Agent question",
63
+ nivaro_agent_triggers: "Agent trigger",
64
+ nivaro_ai_conversations: "AI conversation",
65
+ nivaro_ai_proposals: "AI proposal",
66
+ nivaro_alert_definitions: "Alert",
60
67
  nivaro_api_keys: "API key",
61
68
  nivaro_approval_chains: "Approval chain",
62
69
  nivaro_approval_instances: "Approval",
70
+ nivaro_chat_channels: "Channel",
71
+ nivaro_collection_layouts: "Layout",
72
+ nivaro_collection_presets: "Column preset",
63
73
  nivaro_collections: "Collection",
64
74
  nivaro_comments: "Comment",
65
75
  nivaro_custom_queries: "Custom query",
76
+ nivaro_dashboard_widgets: "Widget",
66
77
  nivaro_dashboards: "Dashboard",
78
+ nivaro_drafts: "Draft",
79
+ nivaro_erp_submissions: "ERP submission",
80
+ nivaro_external_api_endpoints: "Endpoint",
67
81
  nivaro_external_apis: "External API",
82
+ nivaro_field_groups: "Field group",
83
+ nivaro_field_rules: "Field rule",
84
+ nivaro_field_watches: "Field watch",
68
85
  nivaro_fields: "Field",
69
86
  nivaro_files: "File",
87
+ nivaro_flow_operations: "Flow step",
70
88
  nivaro_flows: "Flow",
89
+ nivaro_help_videos: "Help video",
71
90
  nivaro_import_definitions: "Import definition",
72
91
  nivaro_import_queue: "Import run",
92
+ nivaro_inbound_mappings: "Inbound mapping",
93
+ nivaro_issues: "Issue",
94
+ nivaro_notification_subscriptions: "Notification subscription",
95
+ nivaro_notifications: "Notification",
96
+ nivaro_payload_templates: "Payload template",
73
97
  nivaro_permissions: "Permission",
98
+ nivaro_pipeline_owner_groups: "Owner group",
74
99
  nivaro_policies: "Policy",
100
+ nivaro_queue_claims: "Queue claim",
101
+ nivaro_queue_views: "Queue view",
102
+ nivaro_queues: "Queue",
103
+ nivaro_record_templates: "Record template",
75
104
  nivaro_relations: "Relation",
105
+ nivaro_replay_clips: "Replay clip",
106
+ nivaro_replay_shares: "Replay share",
107
+ nivaro_report_defs: "Report",
108
+ nivaro_report_filter_presets: "Report filter preset",
76
109
  nivaro_roles: "Role",
110
+ nivaro_saved_views: "Saved view",
111
+ nivaro_session_recordings: "Session recording",
77
112
  nivaro_settings: "Settings",
113
+ nivaro_share_links: "Share link",
114
+ nivaro_sla_rules: "SLA rule",
78
115
  nivaro_tasks: "Task",
116
+ nivaro_user_groups: "Team",
117
+ nivaro_user_scopes: "User scope",
79
118
  nivaro_users: "User",
80
119
  nivaro_webhooks: "Webhook",
81
- nivaro_workflow_templates: "Pipeline"
82
- };
83
- function b(e, n) {
120
+ nivaro_workflow_instances: "Pipeline run",
121
+ nivaro_workflow_states: "Pipeline state",
122
+ nivaro_workflow_templates: "Pipeline",
123
+ nivaro_workflow_transitions: "Pipeline move"
124
+ }, ae = /^(nivaro|directus)_/i;
125
+ function N(e) {
126
+ const n = g(e);
127
+ return `${/^[aeiou]/i.test(n) ? "an" : "a"} ${n}`;
128
+ }
129
+ function C(e, n) {
84
130
  var l;
85
131
  const t = i(e);
86
132
  if (!t) return { singular: "Record", plural: "Records" };
87
133
  const r = (l = n == null ? void 0 : n.collections) == null ? void 0 : l[t], o = typeof r == "string" ? { plural: r } : r ?? {}, s = i(o.plural), a = i(o.singular);
88
134
  if (a || s) {
89
- const p = a || A(s, K), $ = s && s !== p ? s : A(p, M);
135
+ const p = a || x(s, J), $ = s && s !== p ? s : x(p, D);
90
136
  return { singular: p, plural: $ };
91
137
  }
92
- const c = ie[t];
93
- if (c) return { singular: c, plural: c === "Settings" ? c : A(c, M) };
94
- const u = O(t.replace(/^(nivaro|directus)_/, "")) || "Record", d = A(u, K);
95
- return { singular: d, plural: A(d, M) };
138
+ const c = se[t];
139
+ if (c) return { singular: c, plural: c === "Settings" ? c : x(c, D) };
140
+ const u = O(t.replace(/^(nivaro|directus)_/, "")) || "Record", d = x(u, J);
141
+ return { singular: d, plural: x(d, D) };
96
142
  }
97
- function A(e, n) {
143
+ function x(e, n) {
98
144
  const t = e.split(" ");
99
145
  return t[t.length - 1] = n(t[t.length - 1] ?? ""), t.join(" ");
100
146
  }
101
- function R(e, n, t) {
102
- const { singular: r, plural: o } = b(n, t);
103
- return `${e} ${_(e === 1 ? r : o)}`;
147
+ function L(e, n, t) {
148
+ const { singular: r, plural: o } = C(n, t);
149
+ return `${e} ${g(e === 1 ? r : o)}`;
104
150
  }
105
- function se(e, n) {
106
- const t = e.user ?? e.user_id ?? null, r = t ? L(t, n) : null;
151
+ function ce(e, n) {
152
+ const t = e.user ?? e.user_id ?? null, r = t ? P(t, n) : null;
107
153
  if (r) return r;
108
154
  const o = [i(e.first_name), i(e.last_name)].filter(Boolean).join(" ");
109
155
  return o || (i(e.user_email) ? i(e.user_email) : null);
110
156
  }
111
- function L(e, n) {
157
+ function P(e, n) {
112
158
  if (!e || !(n != null && n.users)) return null;
113
159
  const t = n.users;
114
- return i(t[e] ?? t[oe(e)] ?? t[i(e).toLowerCase()]) || null;
160
+ return i(t[e] ?? t[ie(e)] ?? t[i(e).toLowerCase()]) || null;
115
161
  }
116
- const ae = /* @__PURE__ */ new Set([
162
+ const ue = /* @__PURE__ */ new Set([
117
163
  "person",
118
164
  "view_as",
119
165
  "api_key",
@@ -123,7 +169,7 @@ const ae = /* @__PURE__ */ new Set([
123
169
  "cron",
124
170
  "system"
125
171
  ]);
126
- function ce(e) {
172
+ function de(e) {
127
173
  if (e == null || e === "") return null;
128
174
  let n = e;
129
175
  if (typeof e == "string")
@@ -134,15 +180,15 @@ function ce(e) {
134
180
  }
135
181
  if (!n || typeof n != "object") return null;
136
182
  const t = n, r = i(t.kind);
137
- return ae.has(r) ? {
183
+ return ue.has(r) ? {
138
184
  kind: r,
139
185
  id: t.id == null ? null : String(t.id),
140
186
  name: t.name == null ? null : String(t.name),
141
187
  on_behalf_of: t.on_behalf_of == null ? null : String(t.on_behalf_of)
142
188
  } : null;
143
189
  }
144
- function W(e) {
145
- const n = ce(e.actor);
190
+ function Y(e) {
191
+ const n = de(e.actor);
146
192
  if (n) return n;
147
193
  const t = e.user ?? e.user_id ?? null;
148
194
  if (i(e.mcp_conn) || i(e.via_app) || i(e.via_agent))
@@ -174,12 +220,12 @@ function W(e) {
174
220
  };
175
221
  }
176
222
  function G(e, n) {
177
- const t = W(e), r = se(e, n), o = L(t.on_behalf_of, n) ?? r;
223
+ const t = Y(e), r = ce(e, n), o = P(t.on_behalf_of, n) ?? r;
178
224
  switch (t.kind) {
179
225
  case "person":
180
226
  return r ?? "Someone";
181
227
  case "view_as":
182
- return `${(L(t.id, n) ?? i(t.name) ?? "") || "An administrator"} as ${o ?? "someone"}`;
228
+ return `${(P(t.id, n) ?? i(t.name) ?? "") || "An administrator"} as ${o ?? "someone"}`;
183
229
  case "api_key":
184
230
  return `API key “${i(t.name) || (t.id ? `#${t.id}` : "unnamed")}”`;
185
231
  case "mcp": {
@@ -199,29 +245,29 @@ function G(e, n) {
199
245
  function I(e, n, t) {
200
246
  const r = i(n);
201
247
  if (!r || !i(e)) return null;
202
- const o = `${e}:${r}`, s = t == null ? void 0 : t.records, { singular: a } = b(e, t);
248
+ const o = `${e}:${r}`, s = t == null ? void 0 : t.records, { singular: a } = C(e, t), c = ae.test(i(e));
203
249
  if (s && o in s) {
204
- const c = s[o];
205
- if (c == null) return w;
206
- const u = i(c);
207
- return u ? u.toLowerCase().startsWith(a.toLowerCase()) ? u : `${a} ${u}` : a;
250
+ const u = s[o];
251
+ if (u == null) return c ? N(a) : w;
252
+ const d = i(u);
253
+ return d ? c && (d === r || U.test(d)) ? N(a) : d.toLowerCase().startsWith(a.toLowerCase()) ? d : `${a} ${d}` : c ? N(a) : a;
208
254
  }
209
- return J.test(r) ? `a ${_(a)}` : `${a} ${r}`;
255
+ return c || U.test(r) ? N(a) : `${a} ${r}`;
210
256
  }
211
- function F(e, n, t) {
257
+ function Z(e, n, t) {
212
258
  var o;
213
259
  const r = (o = t == null ? void 0 : t.fields) == null ? void 0 : o[`${e ?? ""}.${n}`];
214
260
  return i(r) || O(n);
215
261
  }
216
- function P(e, n, t) {
217
- const r = [...new Set(n)].map((o) => F(e, o, t));
262
+ function q(e, n, t) {
263
+ const r = [...new Set(n)].map((o) => Z(e, o, t));
218
264
  return r.length === 0 ? "" : r.length === 1 ? r[0] : r.length <= 3 ? `${r.slice(0, -1).join(", ")} and ${r[r.length - 1]}` : `${r.slice(0, 2).join(", ")} and ${r.length - 2} other fields`;
219
265
  }
220
- function ue(e) {
266
+ function le(e) {
221
267
  const n = String(e ?? "");
222
268
  return n.startsWith("$t:") ? O(n.slice(3).replace(/-/g, "_")) : n;
223
269
  }
224
- const de = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}/, le = /^\d{4}-\d{2}-\d{2}$/;
270
+ const pe = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}/, fe = /^\d{4}-\d{2}-\d{2}$/;
225
271
  function H(e, n, t, r) {
226
272
  var a, c;
227
273
  if (t == null || t === "") return "empty";
@@ -229,9 +275,9 @@ function H(e, n, t, r) {
229
275
  if (typeof t == "object")
230
276
  return Array.isArray(t) ? `${t.length} items` : "a new value";
231
277
  const o = String(t), s = (c = (a = r == null ? void 0 : r.choices) == null ? void 0 : a[`${e ?? ""}.${n}`]) == null ? void 0 : c[o];
232
- if (s) return ue(s);
233
- if (le.test(o)) return o;
234
- if (de.test(o)) {
278
+ if (s) return le(s);
279
+ if (fe.test(o)) return o;
280
+ if (pe.test(o)) {
235
281
  const u = new Date(o);
236
282
  if (!Number.isNaN(u.getTime()))
237
283
  try {
@@ -246,16 +292,16 @@ function H(e, n, t, r) {
246
292
  }
247
293
  return o.length > 60 ? `${o.slice(0, 57)}…` : o;
248
294
  }
249
- function Q(e, n, t, r) {
295
+ function X(e, n, t, r) {
250
296
  var s;
251
297
  const o = `${e ?? ""}.${n}`;
252
298
  return !(!(r != null && r.fields) || !(o in r.fields) || (s = r.links) != null && s[o] || t != null && typeof t == "object");
253
299
  }
254
- function Z(e) {
300
+ function B(e) {
255
301
  var n, t;
256
302
  return (n = e.changes) != null && n.length ? e.changes.map((r) => r.field) : (t = e.changed_fields) != null && t.length ? e.changed_fields : e.delta && typeof e.delta == "object" ? Object.keys(e.delta) : [];
257
303
  }
258
- function B(e) {
304
+ function K(e) {
259
305
  const n = { from: null, to: null, via: null, note: null, auto: !1 };
260
306
  let t = i(e);
261
307
  if (!t) return n;
@@ -274,7 +320,7 @@ function B(e) {
274
320
  }
275
321
  return n;
276
322
  }
277
- const y = {
323
+ const b = {
278
324
  ack: "acknowledged",
279
325
  acknowledge: "acknowledged",
280
326
  acquire: "took",
@@ -395,7 +441,7 @@ const y = {
395
441
  updated: "updated",
396
442
  upload: "uploaded",
397
443
  view: "viewed"
398
- }, pe = /* @__PURE__ */ new Set([
444
+ }, me = /* @__PURE__ */ new Set([
399
445
  "add",
400
446
  "build",
401
447
  "create",
@@ -410,26 +456,26 @@ const y = {
410
456
  "schedule",
411
457
  "upload"
412
458
  ]);
413
- function X(e) {
414
- const n = E(e).map((a) => a.toLowerCase());
459
+ function ee(e) {
460
+ const n = F(e).map((a) => a.toLowerCase());
415
461
  if (n.length === 0) return { verb: null, past: null, noun: "" };
416
462
  const t = n[n.length - 1];
417
463
  let r = -1;
418
- if (y[t]) r = n.length - 1;
419
- else if (y[n[0]]) r = 0;
420
- else for (let a = n.length - 1; a >= 0; a--) y[n[a]] && (r = a);
464
+ if (b[t]) r = n.length - 1;
465
+ else if (b[n[0]]) r = 0;
466
+ else for (let a = n.length - 1; a >= 0; a--) b[n[a]] && (r = a);
421
467
  if (r < 0) return { verb: null, past: null, noun: n.map(z).join(" ") };
422
468
  const o = n[r], s = [...n.slice(0, r), ...n.slice(r + 1)];
423
- return { verb: o, past: y[o], noun: s.map(z).join(" ") };
469
+ return { verb: o, past: b[o], noun: s.map(z).join(" ") };
424
470
  }
425
- function fe(e, n) {
426
- return n ? /s$/.test(n) && !/ss$/.test(n) ? n : e && pe.has(e) ? `${/^[aeiou]/i.test(n) ? "an" : "a"} ${n}` : `the ${n}` : "";
471
+ function $e(e, n) {
472
+ return n ? /s$/.test(n) && !/ss$/.test(n) ? n : e && me.has(e) ? `${/^[aeiou]/i.test(n) ? "an" : "a"} ${n}` : `the ${n}` : "";
427
473
  }
428
- function me(e) {
474
+ function _e(e) {
429
475
  const n = /(\d[\d,]*)\s+rows?/i.exec(e), t = /^\s*(csv|xlsx|json|pdf|xml)\b/i.exec(e);
430
476
  return {
431
477
  rows: n ? Number(n[1].replace(/,/g, "")) : null,
432
- format: t ? U[t[1].toLowerCase()] ?? t[1].toUpperCase() : null
478
+ format: t ? W[t[1].toLowerCase()] ?? t[1].toUpperCase() : null
433
479
  };
434
480
  }
435
481
  function S(e, n) {
@@ -437,24 +483,24 @@ function S(e, n) {
437
483
  const t = `${i(e.collection)}:${i(e.item)}`;
438
484
  return ((r = n == null ? void 0 : n.junctions) == null ? void 0 : r[t]) ?? null;
439
485
  }
440
- function ee(e) {
486
+ function ne(e) {
441
487
  return `${/^[aeiou]/i.test(e) ? "an" : "a"} ${e}`;
442
488
  }
443
- function ne(e, n) {
444
- const t = _(b(e.parent_collection, n).singular), r = `${/^[aeiou]/i.test(t) ? "an" : "a"} ${t} record`;
489
+ function te(e, n) {
490
+ const t = g(C(e.parent_collection, n).singular), r = `${/^[aeiou]/i.test(t) ? "an" : "a"} ${t} record`;
445
491
  if (!i(e.parent_id)) return r;
446
492
  const o = I(e.parent_collection, e.parent_id, n);
447
493
  return !o || o === w ? r : o;
448
494
  }
449
- function D(e) {
495
+ function E(e) {
450
496
  const n = i(e.value);
451
- return n ? `${e.noun} ${n}` : ee(e.noun);
497
+ return n ? `${e.noun} ${n}` : ne(e.noun);
452
498
  }
453
- function te(e, n, t) {
454
- const r = ne(n, t);
455
- return e === "create" ? `added ${D(n)} to ${r}` : e === "delete" ? `removed ${D(n)} from ${r}` : `updated ${D(n)} on ${r}`;
499
+ function re(e, n, t) {
500
+ const r = te(n, t);
501
+ return e === "create" ? `added ${E(n)} to ${r}` : e === "delete" ? `removed ${E(n)} from ${r}` : `updated ${E(n)} on ${r}`;
456
502
  }
457
- function $e(e, n) {
503
+ function ve(e, n) {
458
504
  var l;
459
505
  const t = e.map((p) => ({ e: p, j: S(p, n) }));
460
506
  if (t.length === 0 || t.some((p) => !p.j)) return null;
@@ -462,26 +508,26 @@ function $e(e, n) {
462
508
  if (r.size > 1 || o.size > 1) return null;
463
509
  const s = ((l = t.find((p) => i(p.j.parent_id))) == null ? void 0 : l.j) ?? t[0].j, a = /* @__PURE__ */ new Map();
464
510
  for (const { e: p, j: $ } of [...t].reverse()) {
465
- const h = a.get($.noun) ?? { removed: [], added: [], updated: [] }, v = i($.value), g = i(p.action);
466
- g === "delete" ? h.removed.push(v) : g === "create" ? h.added.push(v) : h.updated.push(v), a.set($.noun, h);
511
+ const _ = a.get($.noun) ?? { removed: [], added: [], updated: [] }, h = i($.value), v = i(p.action);
512
+ v === "delete" ? _.removed.push(h) : v === "create" ? _.added.push(h) : _.updated.push(h), a.set($.noun, _);
467
513
  }
468
- const c = (p, $) => $ ? `${p} ${$}` : ee(p), u = [], d = [];
514
+ const c = (p, $) => $ ? `${p} ${$}` : ne(p), u = [], d = [];
469
515
  for (const [p, $] of a) {
470
516
  if ($.removed.length === 1 && $.added.length === 1 && $.updated.length === 0) {
471
517
  u.push({ noun: p, from: $.removed[0], to: $.added[0] });
472
518
  continue;
473
519
  }
474
- for (const h of $.removed) d.push(`removed ${c(p, h)}`);
475
- for (const h of $.added) d.push(`added ${c(p, h)}`);
476
- for (const h of $.updated) d.push(`updated ${c(p, h)}`);
520
+ for (const _ of $.removed) d.push(`removed ${c(p, _)}`);
521
+ for (const _ of $.added) d.push(`added ${c(p, _)}`);
522
+ for (const _ of $.updated) d.push(`updated ${c(p, _)}`);
477
523
  }
478
- return { parent: ne(s, n), pairs: u, rest: d };
524
+ return { parent: te(s, n), pairs: u, rest: d };
479
525
  }
480
526
  function he(e) {
481
527
  return e.from && e.to ? `${e.noun} ${e.from} → ${e.to}` : e.to ? `${e.noun} set to ${e.to}` : `changed ${e.noun}`;
482
528
  }
483
529
  function ge(e, n) {
484
- const t = $e(e, n);
530
+ const t = ve(e, n);
485
531
  if (!t) return null;
486
532
  const { parent: r, pairs: o, rest: s } = t;
487
533
  if (s.length === 0 && o.length === 1) {
@@ -490,56 +536,56 @@ function ge(e, n) {
490
536
  }
491
537
  if (o.length === 0 && s.length === 1) {
492
538
  const a = e[0];
493
- return te(i(a.action), S(a, n), n);
539
+ return re(i(a.action), S(a, n), n);
494
540
  }
495
541
  return `changed ${r}: ${[...o.map(he), ...s].join("; ")}`;
496
542
  }
497
- const Y = /* @__PURE__ */ new Set(["transition", "pipeline-transition"]);
498
- function Ae(e) {
543
+ const Q = /* @__PURE__ */ new Set(["transition", "pipeline-transition"]);
544
+ function be(e) {
499
545
  const n = i(e).toLowerCase();
500
546
  return /approv/.test(n) ? "Approved" : /reject/.test(n) ? "Rejected" : /declin/.test(n) ? "Declined" : /send.?back|return/.test(n) ? "Sent back" : /submit/.test(n) ? "Submitted" : /cancel/.test(n) ? "Cancelled" : "Moved";
501
547
  }
502
- function ve(e, n) {
503
- var $, h, v, g, x;
504
- const t = i(e.action), r = e.collection ?? null, o = I(r, e.item, n), s = b(r, n), a = `${/^[aeiou]/i.test(s.singular) ? "an" : "a"} ${_(s.singular)}`, c = i(e.comment), u = o ? ` on ${o}` : "", d = S(e, n);
548
+ function ke(e, n) {
549
+ var $, _, h, v, A;
550
+ const t = i(e.action), r = e.collection ?? null, o = I(r, e.item, n), s = C(r, n), a = `${/^[aeiou]/i.test(s.singular) ? "an" : "a"} ${g(s.singular)}`, c = i(e.comment), u = o ? ` on ${o}` : "", d = S(e, n);
505
551
  if (d && (t === "create" || t === "delete" || t === "update"))
506
- return te(t, d, n);
552
+ return re(t, d, n);
507
553
  if ((($ = e.event) == null ? void 0 : $.kind) === "start") {
508
554
  const f = i(e.event.to_label);
509
555
  return `started ${o ?? "the pipeline"}${f ? ` in ${f}` : ""}`;
510
556
  }
511
- if (((h = e.event) == null ? void 0 : h.kind) === "transition" || Y.has(t)) {
557
+ if (((_ = e.event) == null ? void 0 : _.kind) === "transition" || Q.has(t)) {
512
558
  const f = e.event ? {
513
559
  from: i(e.event.from_label) || null,
514
560
  to: i(e.event.to_label) || null,
515
561
  via: i(e.event.transition_label) || null
516
- } : B(c), m = (v = e.event) != null && v.addendum ? `Addendum “${i(e.event.addendum.title) || "Untitled"}”` : o ?? "a record";
562
+ } : K(c), m = (h = e.event) != null && h.addendum ? `Addendum “${i(e.event.addendum.title) || "Untitled"}”` : o ?? "a record";
517
563
  return f.from && f.to ? `moved ${m} from ${f.from} to ${f.to}` : f.to ? `moved ${m} to ${f.to}` : f.via ? `ran “${f.via}” on ${m}` : `moved ${m}`;
518
564
  }
519
565
  switch (t) {
520
566
  case "create":
521
567
  case "o2m-create":
522
- return t === "o2m-create" ? e.o2m ? `${q(e.o2m)}${u}` : `added related rows${u}` : r === "nivaro_settings" ? "saved the settings" : `created ${o ?? a}`;
568
+ return t === "o2m-create" ? e.o2m ? `${M(e.o2m)}${u}` : `added related rows${u}` : r === "nivaro_settings" ? "saved the settings" : `created ${o ?? a}`;
523
569
  case "update":
524
570
  case "o2m-update": {
525
571
  if (t === "o2m-update")
526
- return e.o2m ? `${q(e.o2m)}${u}` : `changed related rows${u}`;
527
- const f = Z(e);
572
+ return e.o2m ? `${M(e.o2m)}${u}` : `changed related rows${u}`;
573
+ const f = B(e);
528
574
  if (r === "nivaro_settings")
529
- return f.length ? `changed the ${P(r, f, n)} setting${f.length === 1 ? "" : "s"}` : "changed the settings";
530
- if (r === "nivaro_approval_instances" && ((g = e.why) != null && g.approval)) {
575
+ return f.length ? `changed the ${q(r, f, n)} setting${f.length === 1 ? "" : "s"}` : "changed the settings";
576
+ if (r === "nivaro_approval_instances" && ((v = e.why) != null && v.approval)) {
531
577
  const m = e.why.approval, k = I(m.collection, m.item, n);
532
- return `${(y[i(m.decision).toLowerCase()] ?? i(m.decision).toLowerCase()) || "decided on"} ${k ?? o ?? "an approval"}${m.chain ? ` (${m.chain})` : ""}`;
578
+ return `${(b[i(m.decision).toLowerCase()] ?? i(m.decision).toLowerCase()) || "decided on"} ${k ?? o ?? "an approval"}${m.chain ? ` (${m.chain})` : ""}`;
533
579
  }
534
580
  if (f.length) {
535
- const m = ((x = e.changes) == null ? void 0 : x.length) === 1 ? e.changes[0] : null;
536
- return m && "value" in m && Q(r, m.field, m.value, n) ? `set ${F(r, m.field, n)} to ${H(r, m.field, m.value, n)}${u}` : `changed ${P(r, f, n)}${u}`;
581
+ const m = ((A = e.changes) == null ? void 0 : A.length) === 1 ? e.changes[0] : null;
582
+ return m && "value" in m && X(r, m.field, m.value, n) ? `set ${Z(r, m.field, n)} to ${H(r, m.field, m.value, n)}${u}` : `changed ${q(r, f, n)}${u}`;
537
583
  }
538
584
  return `updated ${o ?? a}`;
539
585
  }
540
586
  case "delete":
541
587
  case "o2m-delete":
542
- return t === "o2m-delete" ? e.o2m ? `${q(e.o2m)}${u}` : `removed related rows${u}` : `deleted ${o ?? a}`;
588
+ return t === "o2m-delete" ? e.o2m ? `${M(e.o2m)}${u}` : `removed related rows${u}` : `deleted ${o ?? a}`;
543
589
  case "restore":
544
590
  return `restored ${o ?? a}`;
545
591
  case "pipeline-start": {
@@ -553,17 +599,17 @@ function ve(e, n) {
553
599
  case "login-refused":
554
600
  return "was refused sign-in";
555
601
  case "export": {
556
- const f = me(c);
557
- return `exported ${f.rows != null ? R(f.rows, r, n) : _(s.plural)}${f.format ? ` to ${f.format}` : ""}`;
602
+ const f = _e(c);
603
+ return `exported ${f.rows != null ? L(f.rows, r, n) : g(s.plural)}${f.format ? ` to ${f.format}` : ""}`;
558
604
  }
559
605
  case "masquerade-start":
560
- return `started viewing as ${C(e, n, c)}`;
606
+ return `started viewing as ${y(e, n, c)}`;
561
607
  case "masquerade-stop":
562
- return `stopped viewing as ${C(e, n, c)}`;
608
+ return `stopped viewing as ${y(e, n, c)}`;
563
609
  case "token.generate":
564
- return `generated a static token for ${C(e, n, "")}`;
610
+ return `generated a static token for ${y(e, n, "")}`;
565
611
  case "token.revoke":
566
- return `revoked the static token of ${C(e, n, "")}`;
612
+ return `revoked the static token of ${y(e, n, "")}`;
567
613
  case "api_key_created":
568
614
  return `created ${o && o !== w ? o : "an API key"}`;
569
615
  case "api_key_revoked":
@@ -573,19 +619,19 @@ function ve(e, n) {
573
619
  case "api_key_simulate":
574
620
  return `tested requests as ${o && o !== w ? o : "an API key"}`;
575
621
  case "set_role":
576
- return `changed the role of ${C(e, n, "")}`;
622
+ return `changed the role of ${y(e, n, "")}`;
577
623
  case "bulk-write":
578
624
  case "bulk-action-execute": {
579
- const f = /(\d+)\s+(?:item|row)/i.exec(c), m = f ? R(Number(f[1]), r, n) : _(s.plural), k = t === "bulk-action-execute" ? /^(.+?)\s*\([^)]*\)\s+on\s/.exec(c) : null;
625
+ const f = /(\d+)\s+(?:item|row)/i.exec(c), m = f ? L(Number(f[1]), r, n) : g(s.plural), k = t === "bulk-action-execute" ? /^(.+?)\s*\([^)]*\)\s+on\s/.exec(c) : null;
580
626
  return k ? `ran “${k[1]}” on ${m}` : `changed ${m} in bulk`;
581
627
  }
582
628
  case "import-create":
583
629
  case "import-queue":
584
- return `started an import into ${_(s.plural)}`;
630
+ return `started an import into ${g(s.plural)}`;
585
631
  case "import-complete":
586
- return `finished an import into ${_(s.plural)}${c ? ` (${c})` : ""}`;
632
+ return `finished an import into ${g(s.plural)}${c ? ` (${c})` : ""}`;
587
633
  case "import-failed":
588
- return `had an import into ${_(s.plural)} fail`;
634
+ return `had an import into ${g(s.plural)} fail`;
589
635
  case "comment":
590
636
  return `commented${u}`;
591
637
  case "file-download": {
@@ -612,45 +658,45 @@ function ve(e, n) {
612
658
  return "downloaded a configuration snapshot";
613
659
  }
614
660
  if (!t) return `did something${u}`;
615
- const l = X(t);
616
- return /settings$/.test(l.noun) && !l.verb ? `changed the ${l.noun}` : l.past ? o && l.noun && _(s.singular).toLowerCase().includes(l.noun.toLowerCase()) ? `${l.past} ${o}` : l.noun ? `${l.past} ${fe(l.verb, l.noun)}${u}` : `${l.past} ${o ?? "something"}` : `recorded “${V(t)}”${u}`;
661
+ const l = ee(t);
662
+ return /settings$/.test(l.noun) && !l.verb ? `changed the ${l.noun}` : l.past ? o && l.noun && g(s.singular).toLowerCase().includes(l.noun.toLowerCase()) ? `${l.past} ${o}` : l.noun ? `${l.past} ${$e(l.verb, l.noun)}${u}` : `${l.past} ${o ?? "something"}` : `recorded “${V(t)}”${u}`;
617
663
  }
618
- function C(e, n, t) {
619
- const r = i(e.item), o = L(r, n) ?? (t || null);
664
+ function y(e, n, t) {
665
+ const r = i(e.item), o = P(r, n) ?? (t || null);
620
666
  if (o) return o;
621
667
  const s = e.collection === "nivaro_users" ? I(e.collection, e.item, n) : null;
622
- return s && !J.test(r) ? s : "someone";
668
+ return s && !U.test(r) ? s : "someone";
623
669
  }
624
- function _e(e, n) {
625
- return `${G(e, n)} ${ve(e, n)}`;
670
+ function we(e, n) {
671
+ return `${G(e, n)} ${ke(e, n)}`;
626
672
  }
627
- function Ce(e) {
673
+ function Ie(e) {
628
674
  var c, u, d, l;
629
675
  const n = i(e.action), t = i(e.comment);
630
676
  let r = i((c = e.why) == null ? void 0 : c.reason) || null, o = i((u = e.why) == null ? void 0 : u.note) || null;
631
- !o && Y.has(n) && !e.event && (o = B(t).note), !o && ((d = e.event) == null ? void 0 : d.kind) === "transition" && t && (o = t), !r && (n === "create" || n === "update" || n === "delete") && t && !/^import:/i.test(t) && (r = t);
677
+ !o && Q.has(n) && !e.event && (o = K(t).note), !o && ((d = e.event) == null ? void 0 : d.kind) === "transition" && t && (o = t), !r && (n === "create" || n === "update" || n === "delete") && t && !/^import:/i.test(t) && (r = t);
632
678
  const s = (l = e.why) == null ? void 0 : l.approval, a = s ? `${O(i(s.decision)) || "Decided"}${s.chain ? ` · ${s.chain}` : ""}${s.step != null && s.step !== "" ? ` · step ${s.step}` : ""}${i(s.comment) ? ` — “${i(s.comment)}”` : ""}` : null;
633
679
  return { reason: r, note: o, approval: a };
634
680
  }
635
- const ke = 6e4, we = 5e3;
636
- function j(e) {
681
+ const Se = 6e4, Ae = 5e3;
682
+ function R(e) {
637
683
  return e.timestamp ? new Date(e.timestamp).getTime() : Number.NaN;
638
684
  }
639
- function N(e) {
640
- const n = W(e);
685
+ function j(e) {
686
+ const n = Y(e);
641
687
  return `${n.kind}|${i(n.id)}|${i(e.user ?? e.user_id).toUpperCase()}`;
642
688
  }
643
- function Se(e) {
689
+ function xe(e) {
644
690
  const n = i(e.action);
645
691
  return !i(e.item) && (n.startsWith("bulk-") || n === "import-complete");
646
692
  }
647
- function ye(e, n = {}) {
648
- const t = n.windowMs ?? ke, r = [], o = (s, a) => s.parent_collection === a.parent_collection && (!i(s.parent_id) || !i(a.parent_id) || i(s.parent_id) === i(a.parent_id));
693
+ function Ce(e, n = {}) {
694
+ const t = n.windowMs ?? Se, r = [], o = (s, a) => s.parent_collection === a.parent_collection && (!i(s.parent_id) || !i(a.parent_id) || i(s.parent_id) === i(a.parent_id));
649
695
  for (const s of e) {
650
696
  const a = r[r.length - 1], c = a == null ? void 0 : a.entries[a.entries.length - 1], u = i(s.group_key);
651
697
  if (a && c && n.labels) {
652
698
  const d = S(s, n.labels), l = S(c, n.labels);
653
- if (d && l && a.entries.every((p) => S(p, n.labels)) && o(d, l) && N(s) === N(c) && Math.abs(j(c) - j(s)) <= we) {
699
+ if (d && l && a.entries.every((p) => S(p, n.labels)) && o(d, l) && j(s) === j(c) && Math.abs(R(c) - R(s)) <= Ae) {
654
700
  a.entries.push(s), a.by !== "group_key" && (a.by = "time");
655
701
  continue;
656
702
  }
@@ -661,7 +707,7 @@ function ye(e, n = {}) {
661
707
  a.entries.push(s), a.by = "group_key";
662
708
  continue;
663
709
  }
664
- if (!u && !d && a.by !== "group_key" && i(s.action) === i(c.action) && i(s.collection) === i(c.collection) && i(s.collection) !== "" && N(s) === N(c) && Math.abs(j(c) - j(s)) <= t) {
710
+ if (!u && !d && a.by !== "group_key" && i(s.action) === i(c.action) && i(s.collection) === i(c.collection) && i(s.collection) !== "" && j(s) === j(c) && Math.abs(R(c) - R(s)) <= t) {
665
711
  a.entries.push(s), a.by = "time";
666
712
  continue;
667
713
  }
@@ -670,53 +716,53 @@ function ye(e, n = {}) {
670
716
  }
671
717
  return r;
672
718
  }
673
- function Ie(e, n) {
719
+ function Ne(e, n) {
674
720
  if (e.length === 0) return "";
675
- const t = e.filter((g) => !Se(g)), r = t[0] ?? e[0];
676
- if (t.length <= 1) return _e(r, n);
721
+ const t = e.filter((v) => !xe(v)), r = t[0] ?? e[0];
722
+ if (t.length <= 1) return we(r, n);
677
723
  const o = G(r, n), s = ge(t, n);
678
724
  if (s) return `${o} ${s}`;
679
- const c = new Set(t.map((g) => i(g.collection))).size === 1 ? r.collection ?? null : null, u = new Set(t.map((g) => i(g.item))), d = u.size > 1 ? u.size : t.length, l = c ? u.size === 1 && i(r.item) ? I(c, r.item, n) ?? R(d, c, n) : R(d, c, n) : `${d} records`, p = u.size === 1 && t.length > 1 ? ` ${t.length} times` : "", $ = new Set(
680
- t.map((g) => Y.has(i(g.action)) ? "transition" : i(g.action))
725
+ const c = new Set(t.map((v) => i(v.collection))).size === 1 ? r.collection ?? null : null, u = new Set(t.map((v) => i(v.item))), d = u.size > 1 ? u.size : t.length, l = c ? u.size === 1 && i(r.item) ? I(c, r.item, n) ?? L(d, c, n) : L(d, c, n) : `${d} records`, p = u.size === 1 && t.length > 1 ? ` ${t.length} times` : "", $ = new Set(
726
+ t.map((v) => Q.has(i(v.action)) ? "transition" : i(v.action))
681
727
  );
682
728
  if ($.size !== 1) return `${o} made ${t.length} changes to ${l}`;
683
- const h = [...$][0];
684
- if (h === "transition") {
685
- const g = new Set(
729
+ const _ = [...$][0];
730
+ if (_ === "transition") {
731
+ const v = new Set(
686
732
  t.map((f) => {
687
733
  var m;
688
- return i(((m = f.event) == null ? void 0 : m.to_label) ?? B(f.comment).to);
734
+ return i(((m = f.event) == null ? void 0 : m.to_label) ?? K(f.comment).to);
689
735
  })
690
- ), x = g.size === 1 ? [...g][0] : "";
691
- return `${o} moved ${l}${x ? ` to ${x}` : ""}${p}`;
736
+ ), A = v.size === 1 ? [...v][0] : "";
737
+ return `${o} moved ${l}${A ? ` to ${A}` : ""}${p}`;
692
738
  }
693
- if (h === "update") {
694
- const g = xe(t, c, n);
695
- return `${o} updated ${l}${p}${g ? `: ${g}` : ""}`;
739
+ if (_ === "update") {
740
+ const v = ye(t, c, n);
741
+ return `${o} updated ${l}${p}${v ? `: ${v}` : ""}`;
696
742
  }
697
- if (h === "create") return `${o} created ${l}`;
698
- if (h === "delete") return `${o} deleted ${l}`;
699
- if (h === "picker-exclude") return `${o} hid ${l} from pickers${p}`;
700
- if (h === "picker-include") return `${o} showed ${l} in pickers again${p}`;
701
- const v = X(h);
702
- return v.past ? `${o} ${v.past} ${l}${v.noun && !_(b(c, n).plural).toLowerCase().includes(v.noun) ? ` (${v.noun})` : ""}${p}` : `${o} recorded “${V(h)}” on ${l}`;
703
- }
704
- function xe(e, n, t) {
743
+ if (_ === "create") return `${o} created ${l}`;
744
+ if (_ === "delete") return `${o} deleted ${l}`;
745
+ if (_ === "picker-exclude") return `${o} hid ${l} from pickers${p}`;
746
+ if (_ === "picker-include") return `${o} showed ${l} in pickers again${p}`;
747
+ const h = ee(_);
748
+ return h.past ? `${o} ${h.past} ${l}${h.noun && !g(C(c, n).plural).toLowerCase().includes(h.noun) ? ` (${h.noun})` : ""}${p}` : `${o} recorded “${V(_)}” on ${l}`;
749
+ }
750
+ function ye(e, n, t) {
705
751
  var c;
706
752
  const r = ((c = e[0]) == null ? void 0 : c.changes) ?? null;
707
753
  if (!(r != null && r.length)) {
708
- const u = e.map((d) => Z(d).sort().join(","));
709
- return u[0] && u.every((d) => d === u[0]) ? P(n, u[0].split(","), t) : "";
754
+ const u = e.map((d) => B(d).sort().join(","));
755
+ return u[0] && u.every((d) => d === u[0]) ? q(n, u[0].split(","), t) : "";
710
756
  }
711
757
  const o = (u) => JSON.stringify((u.changes ?? []).map((d) => [d.field, d.value ?? null]).sort());
712
- if (e.every((u) => o(u) === o(e[0])) && r.length <= 2 && r.every((u) => Q(n, u.field, u.value, t)))
758
+ if (e.every((u) => o(u) === o(e[0])) && r.length <= 2 && r.every((u) => X(n, u.field, u.value, t)))
713
759
  return r.map(
714
- (u) => `${F(n, u.field, t)} → ${H(n, u.field, u.value, t)}`
760
+ (u) => `${Z(n, u.field, t)} → ${H(n, u.field, u.value, t)}`
715
761
  ).join(", ");
716
762
  const a = new Set(e.flatMap((u) => (u.changes ?? []).map((d) => d.field)));
717
- return P(n, [...a], t);
763
+ return q(n, [...a], t);
718
764
  }
719
- function be(e) {
765
+ function Re(e) {
720
766
  var a;
721
767
  const n = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Set(), s = (c, u) => {
722
768
  const d = i(c), l = i(u);
@@ -725,9 +771,9 @@ function be(e) {
725
771
  for (const c of e) {
726
772
  const u = i(c.user ?? c.user_id);
727
773
  u && t.add(u);
728
- const d = W(c);
774
+ const d = Y(c);
729
775
  d.kind === "view_as" && d.id && t.add(d.id), d.on_behalf_of && t.add(d.on_behalf_of), i(c.collection) && o.add(i(c.collection)), s(c.collection, c.item), (a = c.why) != null && a.approval && s(c.why.approval.collection, c.why.approval.item);
730
- for (const l of Z(c)) {
776
+ for (const l of B(c)) {
731
777
  const p = i(c.collection);
732
778
  p && r.set(`${p}.${l}`, { collection: p, field: l });
733
779
  }
@@ -740,33 +786,33 @@ function be(e) {
740
786
  };
741
787
  }
742
788
  export {
743
- ke as BURST_WINDOW_MS,
789
+ Se as BURST_WINDOW_MS,
744
790
  w as HIDDEN_RECORD,
745
- we as LINK_WRITE_WINDOW_MS,
746
- X as actionParts,
747
- be as activityLabelRefs,
748
- ve as activityPredicate,
749
- Ce as activityWhy,
791
+ Ae as LINK_WRITE_WINDOW_MS,
792
+ ee as actionParts,
793
+ Re as activityLabelRefs,
794
+ ke as activityPredicate,
795
+ Ie as activityWhy,
750
796
  G as actorName,
751
- W as actorOf,
752
- ue as choiceText,
753
- b as collectionNouns,
754
- R as countNoun,
755
- F as fieldLabel,
756
- P as fieldList,
757
- ye as groupActivity,
797
+ Y as actorOf,
798
+ le as choiceText,
799
+ C as collectionNouns,
800
+ L as countNoun,
801
+ Z as fieldLabel,
802
+ q as fieldList,
803
+ Ce as groupActivity,
758
804
  S as junctionOf,
759
- $e as linkChanges,
805
+ ve as linkChanges,
760
806
  ge as linkGroupPredicate,
761
807
  he as linkPairText,
762
- q as o2mSentence,
763
- ce as parseActor,
764
- B as parseTransitionComment,
808
+ M as o2mSentence,
809
+ de as parseActor,
810
+ K as parseTransitionComment,
765
811
  V as readableTitle,
766
812
  I as recordPhrase,
767
- Ie as renderActivityGroupSentence,
768
- _e as renderActivitySentence,
769
- Ae as transitionVerb,
770
- Q as valueShowable,
813
+ Ne as renderActivityGroupSentence,
814
+ we as renderActivitySentence,
815
+ be as transitionVerb,
816
+ X as valueShowable,
771
817
  H as valueText
772
818
  };