@nivaro/react 0.3.48 → 0.3.50

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 (52) hide show
  1. package/dist/components/InlineGridField.js +166 -105
  2. package/dist/full.css +1 -1
  3. package/dist/hooks/useSessionRecorder.js +1 -1
  4. package/dist/index.d.ts +25 -1
  5. package/dist/shared/components/CellCopyLayer.js +81 -44
  6. package/dist/shared/components/CollectionBrowserView.js +306 -297
  7. package/dist/shared/components/DataTable.js +3 -3
  8. package/dist/shared/components/FulfilmentPill.js +98 -78
  9. package/dist/shared/components/ItemEditForm.js +4682 -4570
  10. package/dist/shared/components/NotificationSourcesCard.js +151 -147
  11. package/dist/shared/components/ProfileView.js +72 -70
  12. package/dist/shared/components/QueryTable.js +462 -333
  13. package/dist/shared/components/imports/ImportConsole.js +4 -4
  14. package/dist/shared/components/integrations/console/IntegrationsConsole.js +58 -50
  15. package/dist/shared/components/item-edit/CatalogPickerField.js +1144 -1127
  16. package/dist/shared/components/item-edit/CloneDialog.js +192 -142
  17. package/dist/shared/components/item-edit/FieldRenderer.js +127 -126
  18. package/dist/shared/components/item-edit/FieldRow.js +236 -226
  19. package/dist/shared/components/item-edit/HeaderTools.js +118 -113
  20. package/dist/shared/components/item-edit/InlineGridField.js +92 -90
  21. package/dist/shared/components/item-edit/InlineTableField.js +3091 -2942
  22. package/dist/shared/components/item-edit/MidairCollisionDialog.js +175 -0
  23. package/dist/shared/components/item-edit/PlanGrid.js +162 -162
  24. package/dist/shared/components/item-edit/PolishFields.js +169 -162
  25. package/dist/shared/components/item-edit/RelationCombobox.js +186 -181
  26. package/dist/shared/components/item-edit/SummaryPanel.js +148 -135
  27. package/dist/shared/components/item-edit/ValidationSummary.js +64 -47
  28. package/dist/shared/components/item-edit/helpers.js +181 -155
  29. package/dist/shared/components/item-edit/line-midair.js +201 -0
  30. package/dist/shared/components/item-edit/soft-rules.js +27 -0
  31. package/dist/shared/components/layout-editor/parity-keys.json.js +1 -1
  32. package/dist/shared/components/layout-editor/settings/ResolveSettings.js +65 -65
  33. package/dist/shared/components/layout-editor/settings/settings-registry.js +4 -4
  34. package/dist/shared/components/notifications/DeliveryChips.js +9 -9
  35. package/dist/shared/components/panels/ItemLockBanner.js +414 -358
  36. package/dist/shared/components/panels/PipelinePanel.js +1171 -975
  37. package/dist/shared/components/panels/RecordIntegrityBanner.js +1 -1
  38. package/dist/shared/components/panels/SlaBreachBanner.js +2 -2
  39. package/dist/shared/components/panels/TransitionRequirementsDialog.js +384 -380
  40. package/dist/shared/components/profile/PersonProfile.js +23 -21
  41. package/dist/shared/components/profile/SignedInDevices.js +126 -0
  42. package/dist/shared/components/queue/QueueItemSheet.js +38 -37
  43. package/dist/shared/components/queue/QueueWorklist.js +870 -827
  44. package/dist/shared/components/queue/column-chooser.js +21 -0
  45. package/dist/shared/components/queue/live-state-aspect.js +6 -0
  46. package/dist/shared/components/support/SupportView.js +1 -1
  47. package/dist/shared/components/ui/number-draft-input.js +93 -0
  48. package/dist/shared/components/widgets/ReviewListWidget.js +191 -166
  49. package/dist/shared/lib/edit-lock-fields.js +7 -0
  50. package/dist/shared/lib/error-hints.js +1 -0
  51. package/dist/shared/lib/reimport-visibility.js +10 -0
  52. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import { jsxs as a, jsx as t, Fragment as T } from "react/jsx-runtime";
2
2
  import { useQueryClient as ye, useQuery as W, useMutation as H } from "@tanstack/react-query";
3
- import { BellRing as z, History as fe, Inbox as re, FileBarChart as ve, Gauge as ke, Activity as _e, CalendarClock as pe, Pencil as Ne, ExternalLink as we, Plus as $e, Zap as Se, X as Ce } from "lucide-react";
3
+ import { BellRing as z, History as fe, Inbox as le, FileBarChart as ve, Gauge as ke, Activity as _e, CalendarClock as pe, Pencil as Ne, ExternalLink as we, Plus as $e, Zap as Se, X as Ce } from "lucide-react";
4
4
  import { useState as f } from "react";
5
5
  import { useNivaroClient as qe, useNavigation as Re, useItemNavigation as Be } from "../context.js";
6
6
  import { get as Q, del as Fe, patch as De, put as Me } from "../lib/commands.js";
@@ -10,21 +10,21 @@ import { SimpleSelectXs as ue } from "./ui/SimpleSelect.js";
10
10
  import { Switch as Le } from "./ui/switch.js";
11
11
  function Ee({
12
12
  sub: n,
13
- onPatch: l
13
+ onPatch: s
14
14
  }) {
15
- const i = n.notify_inapp !== !1, r = n.notify_email !== !1, o = (d, m, b) => /* @__PURE__ */ t(
15
+ const i = n.notify_inapp !== !1, l = n.notify_email !== !1, c = (d, m, b) => /* @__PURE__ */ t(
16
16
  "button",
17
17
  {
18
18
  type: "button",
19
19
  "data-tip": d ? `${m} on — click to turn off` : `${m} off — click to turn on`,
20
- onClick: () => l(b),
20
+ onClick: () => s(b),
21
21
  className: `rounded-full border px-1.5 py-0.5 text-[10px] leading-none transition-colors ${d ? "border-nvr-cyan/40 bg-nvr-cyan/10 font-medium text-nvr-navy dark:text-nvr-cyan" : "border-slate-200 text-slate-400 line-through dark:border-border"}`,
22
22
  children: m
23
23
  }
24
24
  );
25
25
  return /* @__PURE__ */ a("span", { className: "flex items-center gap-1", children: [
26
- o(i, "In-app", { notify_inapp: !i }),
27
- o(r, "Email", { notify_email: !r })
26
+ c(i, "In-app", { notify_inapp: !i }),
27
+ c(l, "Email", { notify_email: !l })
28
28
  ] });
29
29
  }
30
30
  const oe = [
@@ -33,27 +33,27 @@ const oe = [
33
33
  ], je = (n) => n === "weekly" ? [...oe, { value: "weekly", label: "Weekly summary" }] : oe;
34
34
  function ce({
35
35
  sub: n,
36
- onPatch: l,
36
+ onPatch: s,
37
37
  onEdit: i
38
38
  }) {
39
- const r = n.is_active !== !1 && n.is_active !== 0;
39
+ const l = n.is_active !== !1 && n.is_active !== 0;
40
40
  return /* @__PURE__ */ a("span", { className: "flex shrink-0 items-center gap-1.5", children: [
41
- /* @__PURE__ */ t(Ee, { sub: n, onPatch: l }),
41
+ /* @__PURE__ */ t(Ee, { sub: n, onPatch: s }),
42
42
  /* @__PURE__ */ t(
43
43
  ue,
44
44
  {
45
45
  value: n.digest_frequency ?? "instant",
46
46
  options: je(n.digest_frequency),
47
- onChange: (o) => l({ digest_frequency: o })
47
+ onChange: (c) => s({ digest_frequency: c })
48
48
  }
49
49
  ),
50
50
  /* @__PURE__ */ t(
51
51
  Le,
52
52
  {
53
- checked: r,
54
- onCheckedChange: (o) => l({ is_active: o }),
55
- "aria-label": r ? "Pause this subscription" : "Resume this subscription",
56
- "data-tip": r ? "Active — click to pause" : "Paused — click to resume",
53
+ checked: l,
54
+ onCheckedChange: (c) => s({ is_active: c }),
55
+ "aria-label": l ? "Pause this subscription" : "Resume this subscription",
56
+ "data-tip": l ? "Active — click to pause" : "Paused — click to resume",
57
57
  className: "scale-[0.8]"
58
58
  }
59
59
  ),
@@ -80,28 +80,28 @@ const Ae = {
80
80
  };
81
81
  function Oe(n) {
82
82
  if (!n) return "Metric";
83
- const [l, ...i] = n.split("."), r = i.join(" ").replace(/_/g, " ");
84
- return r ? `${v(l)} · ${r}` : v(l.replace(/_/g, " "));
83
+ const [s, ...i] = n.split("."), l = i.join(" ").replace(/_/g, " ");
84
+ return l ? `${v(s)} · ${l}` : v(s.replace(/_/g, " "));
85
85
  }
86
- function k(n, l, i) {
87
- return `${n && l ? "Email + in-app" : n ? "Email" : l ? "In-app" : "No channels"}, ${!i || i === "instant" || i === "immediate" ? "instantly" : i === "daily" ? "in your daily summary" : i === "weekly" ? "in Monday's summary" : i}`;
86
+ function k(n, s, i) {
87
+ return `${n && s ? "Email + in-app" : n ? "Email" : s ? "In-app" : "No channels"}, ${!i || i === "instant" || i === "immediate" ? "instantly" : i === "daily" ? "in your daily summary" : i === "weekly" ? "in Monday's summary" : i}`;
88
88
  }
89
89
  function de(n) {
90
90
  return n ? `last fired ${X(n)}` : null;
91
91
  }
92
92
  function Ie({
93
93
  label: n,
94
- onRemove: l,
94
+ onRemove: s,
95
95
  busy: i
96
96
  }) {
97
- const [r, o] = f(!1);
98
- return r ? /* @__PURE__ */ a("span", { className: "flex shrink-0 items-center gap-1 text-[11px]", children: [
97
+ const [l, c] = f(!1);
98
+ return l ? /* @__PURE__ */ a("span", { className: "flex shrink-0 items-center gap-1 text-[11px]", children: [
99
99
  /* @__PURE__ */ t(
100
100
  "button",
101
101
  {
102
102
  type: "button",
103
103
  disabled: i,
104
- onClick: l,
104
+ onClick: s,
105
105
  className: "rounded bg-red-500/10 px-1.5 py-0.5 font-medium text-red-600 hover:bg-red-500/20 disabled:opacity-50 dark:text-red-400",
106
106
  children: "Remove"
107
107
  }
@@ -110,7 +110,7 @@ function Ie({
110
110
  "button",
111
111
  {
112
112
  type: "button",
113
- onClick: () => o(!1),
113
+ onClick: () => c(!1),
114
114
  className: "rounded px-1 py-0.5 text-slate-500 hover:bg-slate-100 dark:text-slate-400 dark:hover:bg-muted",
115
115
  children: "Keep"
116
116
  }
@@ -119,7 +119,7 @@ function Ie({
119
119
  "button",
120
120
  {
121
121
  type: "button",
122
- onClick: () => o(!0),
122
+ onClick: () => c(!0),
123
123
  "aria-label": `Remove ${n}`,
124
124
  title: "Remove",
125
125
  className: "shrink-0 rounded p-1 text-slate-500 opacity-0 transition-opacity duration-150 hover:bg-red-500/10 hover:text-red-500 focus-visible:opacity-100 group-hover:opacity-100 dark:text-slate-400",
@@ -129,18 +129,18 @@ function Ie({
129
129
  }
130
130
  function L({
131
131
  label: n,
132
- on: l,
132
+ on: s,
133
133
  onToggle: i,
134
- disabled: r
134
+ disabled: l
135
135
  }) {
136
136
  return /* @__PURE__ */ t(
137
137
  i ? "button" : "span",
138
138
  {
139
- ...i ? { type: "button", onClick: i, disabled: r } : {},
140
- title: i ? `Turn ${n} ${l ? "off" : "on"}` : void 0,
139
+ ...i ? { type: "button", onClick: i, disabled: l } : {},
140
+ title: i ? `Turn ${n} ${s ? "off" : "on"}` : void 0,
141
141
  className: [
142
142
  "rounded px-1.5 py-0.5 text-[10px] font-medium transition-colors duration-150",
143
- l ? "bg-nvr-cyan/10 text-nvr-navy dark:bg-nvr-cyan/15 dark:text-nvr-cyan" : "bg-slate-100 text-slate-500 line-through dark:bg-muted dark:text-slate-400",
143
+ s ? "bg-nvr-cyan/10 text-nvr-navy dark:bg-nvr-cyan/15 dark:text-nvr-cyan" : "bg-slate-100 text-slate-500 line-through dark:bg-muted dark:text-slate-400",
144
144
  i ? "cursor-pointer hover:ring-1 hover:ring-nvr-cyan/40" : ""
145
145
  ].join(" "),
146
146
  children: n
@@ -149,10 +149,10 @@ function L({
149
149
  }
150
150
  function h({
151
151
  title: n,
152
- description: l,
152
+ description: s,
153
153
  meta: i,
154
- trigger: r,
155
- paused: o,
154
+ trigger: l,
155
+ paused: c,
156
156
  controls: d,
157
157
  onRemove: m,
158
158
  removing: b
@@ -160,36 +160,36 @@ function h({
160
160
  return /* @__PURE__ */ a(
161
161
  "div",
162
162
  {
163
- className: `group flex items-center gap-3 rounded-md px-2 py-1.5 transition-colors duration-150 ${o ? "bg-amber-500/[0.07] hover:bg-amber-500/10 dark:bg-amber-400/10 dark:hover:bg-amber-400/15" : "hover:bg-slate-50 dark:hover:bg-muted/40"}`,
164
- "data-paused": o ? "true" : void 0,
163
+ className: `group flex items-center gap-3 rounded-md px-2 py-1.5 transition-colors duration-150 ${c ? "bg-amber-500/[0.07] hover:bg-amber-500/10 dark:bg-amber-400/10 dark:hover:bg-amber-400/15" : "hover:bg-slate-50 dark:hover:bg-muted/40"}`,
164
+ "data-paused": c ? "true" : void 0,
165
165
  children: [
166
166
  /* @__PURE__ */ a("div", { className: "min-w-0 flex-1", children: [
167
167
  /* @__PURE__ */ a("p", { className: "flex items-center gap-1.5 truncate text-[12.5px] text-slate-800 dark:text-slate-100", children: [
168
- /* @__PURE__ */ t("span", { className: `truncate ${o ? "text-slate-500 dark:text-slate-400" : ""}`, children: n }),
169
- o && /* @__PURE__ */ t(
168
+ /* @__PURE__ */ t("span", { className: `truncate ${c ? "text-slate-500 dark:text-slate-400" : ""}`, children: n }),
169
+ c && /* @__PURE__ */ t(
170
170
  "span",
171
171
  {
172
172
  className: "shrink-0 rounded bg-amber-500/15 px-1.5 py-px text-[9.5px] font-semibold uppercase tracking-wide text-amber-700 dark:bg-amber-400/20 dark:text-amber-300",
173
173
  "data-tip": "Not firing — nothing is sent while this source is paused",
174
- children: o
174
+ children: c
175
175
  }
176
176
  )
177
177
  ] }),
178
178
  /* @__PURE__ */ a("p", { className: "truncate text-[11px] text-slate-500 dark:text-slate-400", children: [
179
- l,
179
+ s,
180
180
  i && /* @__PURE__ */ a("span", { className: "text-slate-400 dark:text-slate-500", children: [
181
181
  " · ",
182
182
  i
183
183
  ] })
184
184
  ] }),
185
- r && (o ? /* @__PURE__ */ a("p", { className: "mt-0.5 flex items-center gap-1 truncate text-[10.5px] text-amber-700/80 dark:text-amber-300/80", children: [
185
+ l && (c ? /* @__PURE__ */ a("p", { className: "mt-0.5 flex items-center gap-1 truncate text-[10.5px] text-amber-700/80 dark:text-amber-300/80", children: [
186
186
  /* @__PURE__ */ t(pe, { className: "h-3 w-3 shrink-0" }),
187
187
  /* @__PURE__ */ t("span", { className: "font-medium", children: "Not running" }),
188
188
  /* @__PURE__ */ a("span", { className: "truncate", children: [
189
189
  "· would be ",
190
- r.text.charAt(0).toLowerCase() + r.text.slice(1)
190
+ l.text.charAt(0).toLowerCase() + l.text.slice(1)
191
191
  ] })
192
- ] }) : /* @__PURE__ */ t(Ke, { trigger: r }))
192
+ ] }) : /* @__PURE__ */ t(Ke, { trigger: l }))
193
193
  ] }),
194
194
  d,
195
195
  m && /* @__PURE__ */ t(
@@ -205,14 +205,14 @@ function h({
205
205
  );
206
206
  }
207
207
  function Ke({ trigger: n }) {
208
- const l = n.kind !== "event";
208
+ const s = n.kind !== "event";
209
209
  return /* @__PURE__ */ a(
210
210
  "p",
211
211
  {
212
212
  className: "mt-0.5 flex items-center gap-1 truncate text-[10.5px] text-slate-400 dark:text-slate-500",
213
- "data-tip": l ? "Runs on the server schedule shown" : "Fires the moment it happens",
213
+ "data-tip": s ? "Runs on the server schedule shown" : "Fires the moment it happens",
214
214
  children: [
215
- l ? /* @__PURE__ */ t(pe, { className: "h-3 w-3 shrink-0 text-nvr-cyan" }) : /* @__PURE__ */ t(Se, { className: "h-3 w-3 shrink-0 text-amber-500" }),
215
+ s ? /* @__PURE__ */ t(pe, { className: "h-3 w-3 shrink-0 text-nvr-cyan" }) : /* @__PURE__ */ t(Se, { className: "h-3 w-3 shrink-0 text-amber-500" }),
216
216
  /* @__PURE__ */ t("span", { className: "font-medium text-slate-500 dark:text-slate-400", children: n.kind === "event" ? "On event" : n.kind === "both" ? "Event + schedule" : "Scheduled" }),
217
217
  /* @__PURE__ */ a("span", { className: "truncate", children: [
218
218
  "· ",
@@ -224,16 +224,16 @@ function Ke({ trigger: n }) {
224
224
  }
225
225
  function Ue({
226
226
  collection: n,
227
- itemId: l,
227
+ itemId: s,
228
228
  label: i
229
229
  }) {
230
- const r = Be(), o = { collection: n, itemId: l };
230
+ const l = Be(), c = { collection: n, itemId: s };
231
231
  return /* @__PURE__ */ t(
232
232
  "a",
233
233
  {
234
- href: r.urlFor(o),
234
+ href: l.urlFor(c),
235
235
  onClick: (d) => {
236
- d.metaKey || d.ctrlKey || (d.preventDefault(), r.open(o));
236
+ d.metaKey || d.ctrlKey || (d.preventDefault(), l.open(c));
237
237
  },
238
238
  className: "font-medium text-nvr-navy hover:underline dark:text-nvr-cyan",
239
239
  "data-record-link": !0,
@@ -241,22 +241,22 @@ function Ue({
241
241
  }
242
242
  );
243
243
  }
244
- function y({ path: n, label: l }) {
245
- const i = Re(), r = i.consoleUrl ? i.consoleUrl(n) : n;
246
- if (!r) return null;
247
- const o = /^https?:\/\//.test(r);
244
+ function y({ path: n, label: s }) {
245
+ const i = Re(), l = i.consoleUrl ? i.consoleUrl(n) : n;
246
+ if (!l) return null;
247
+ const c = /^https?:\/\//.test(l);
248
248
  return /* @__PURE__ */ a(
249
249
  "a",
250
250
  {
251
- href: r,
252
- ...o ? { target: "_blank", rel: "noreferrer" } : {},
251
+ href: l,
252
+ ...c ? { target: "_blank", rel: "noreferrer" } : {},
253
253
  onClick: (d) => {
254
- o || d.metaKey || d.ctrlKey || (d.preventDefault(), i.navigate(r));
254
+ c || d.metaKey || d.ctrlKey || (d.preventDefault(), i.navigate(l));
255
255
  },
256
256
  className: "inline-flex items-center gap-1 text-[10.5px] font-medium text-nvr-navy hover:underline dark:text-nvr-cyan",
257
257
  "data-manage-link": !0,
258
258
  children: [
259
- l,
259
+ s,
260
260
  /* @__PURE__ */ t(we, { className: "h-2.5 w-2.5" })
261
261
  ]
262
262
  }
@@ -264,32 +264,32 @@ function y({ path: n, label: l }) {
264
264
  }
265
265
  function x({
266
266
  title: n,
267
- hint: l,
267
+ hint: s,
268
268
  action: i,
269
- children: r
269
+ children: l
270
270
  }) {
271
271
  return /* @__PURE__ */ a("section", { children: [
272
272
  /* @__PURE__ */ a("div", { className: "mb-1.5 flex items-baseline gap-2 border-b border-slate-100 pb-1 dark:border-border/60", children: [
273
273
  /* @__PURE__ */ t("h3", { className: "text-[12px] font-semibold text-slate-700 dark:text-slate-200", children: n }),
274
- l && /* @__PURE__ */ t("span", { className: "min-w-0 truncate text-[10.5px] text-slate-400", children: l }),
274
+ s && /* @__PURE__ */ t("span", { className: "min-w-0 truncate text-[10.5px] text-slate-400", children: s }),
275
275
  i && /* @__PURE__ */ t("span", { className: "ml-auto flex shrink-0 items-center gap-3", children: i })
276
276
  ] }),
277
- /* @__PURE__ */ t("div", { className: "space-y-0.5", children: r })
277
+ /* @__PURE__ */ t("div", { className: "space-y-0.5", children: l })
278
278
  ] });
279
279
  }
280
280
  const We = {
281
- notification: { icon: re, tint: "text-nvr-cyan bg-nvr-cyan/10" },
281
+ notification: { icon: le, tint: "text-nvr-cyan bg-nvr-cyan/10" },
282
282
  metric_alert: { icon: ke, tint: "text-amber-600 bg-amber-500/10 dark:text-amber-400" },
283
283
  record_alert: { icon: z, tint: "text-red-600 bg-red-500/10 dark:text-red-400" },
284
284
  report_alert: {
285
285
  icon: ve,
286
286
  tint: "text-purple-600 bg-purple-500/10 dark:text-purple-400"
287
287
  },
288
- digest_email: { icon: re, tint: "text-emerald-600 bg-emerald-500/10 dark:text-emerald-400" }
288
+ digest_email: { icon: le, tint: "text-emerald-600 bg-emerald-500/10 dark:text-emerald-400" }
289
289
  };
290
- function tt({ only: n, bare: l } = {}) {
290
+ function tt({ only: n, bare: s } = {}) {
291
291
  var ie;
292
- const i = qe(), r = ye(), [o, d] = f("sources"), m = Pe(), [b, E] = f(null), [S, Y] = f(null), p = n === "subscriptions", [R, G] = f(/* @__PURE__ */ new Set()), [B, V] = f(/* @__PURE__ */ new Set()), [F, Z] = f(""), [D, J] = f(""), [j, N] = f(25), { data: ee, isLoading: he } = W({
292
+ const i = qe(), l = ye(), [c, d] = f("sources"), m = Pe(), [b, E] = f(null), [S, Y] = f(null), u = n === "subscriptions", [R, G] = f(/* @__PURE__ */ new Set()), [B, V] = f(/* @__PURE__ */ new Set()), [F, Z] = f(""), [D, J] = f(""), [j, N] = f(25), { data: ee, isLoading: he } = W({
293
293
  queryKey: ["me-notification-sources"],
294
294
  queryFn: () => i.request(Q("/users/me/notification-sources")).then((e) => e.data),
295
295
  staleTime: 3e4
@@ -300,39 +300,39 @@ function tt({ only: n, bare: l } = {}) {
300
300
  }), ae = W({
301
301
  queryKey: ["me-notification-history"],
302
302
  queryFn: () => i.request(Q("/users/me/notification-history", { limit: 200 })).then((e) => e.data),
303
- enabled: o === "history",
303
+ enabled: c === "history",
304
304
  staleTime: 6e4
305
- }), A = () => void r.invalidateQueries({ queryKey: ["me-notification-sources"] }), w = H({
305
+ }), A = () => void l.invalidateQueries({ queryKey: ["me-notification-sources"] }), w = H({
306
306
  mutationFn: (e) => i.request(Fe(e)),
307
307
  onSuccess: A
308
308
  }), C = H({
309
- mutationFn: ({ path: e, body: c }) => i.request(De(e, c)),
309
+ mutationFn: ({ path: e, body: r }) => i.request(De(e, r)),
310
310
  onSuccess: A
311
311
  }), O = H({
312
- mutationFn: ({ reportId: e, body: c }) => i.request(Me(`/report-studio/${e}/subscription`, c)),
312
+ mutationFn: ({ reportId: e, body: r }) => i.request(Me(`/report-studio/${e}/subscription`, r)),
313
313
  onSuccess: A
314
314
  });
315
315
  if (he || !ee) return null;
316
- const s = ee, g = w.isPending || C.isPending || O.isPending, _ = s.subscriptions.filter(
316
+ const o = ee, g = w.isPending || C.isPending || O.isPending, _ = o.subscriptions.filter(
317
317
  (e) => e.event_type === "workflow_transition" && e.filter_field === "to_state"
318
- ), I = s.subscriptions.filter((e) => !_.includes(e)), ne = s.subscriptions.length + s.field_watches.length + s.record_alerts.length + s.metric_alerts.length + s.anomaly_rules.length + s.report_subscriptions.length + s.report_alerts.length + s.view_subscriptions.length, $ = ae.data ?? [], M = /* @__PURE__ */ new Map(), P = /* @__PURE__ */ new Map();
318
+ ), I = o.subscriptions.filter((e) => !_.includes(e)), ne = o.subscriptions.length + o.field_watches.length + o.record_alerts.length + o.metric_alerts.length + o.anomaly_rules.length + o.report_subscriptions.length + o.report_alerts.length + o.view_subscriptions.length, $ = ae.data ?? [], M = /* @__PURE__ */ new Map(), P = /* @__PURE__ */ new Map();
319
319
  for (const e of $) {
320
320
  M.set(e.kind, (M.get(e.kind) ?? 0) + 1);
321
- for (const c of e.channels ?? []) P.set(c, (P.get(c) ?? 0) + 1);
321
+ for (const r of e.channels ?? []) P.set(r, (P.get(r) ?? 0) + 1);
322
322
  }
323
323
  const q = $.filter((e) => {
324
- if (R.size > 0 && !R.has(e.kind) || B.size > 0 && !(e.channels ?? []).some((u) => B.has(u)))
324
+ if (R.size > 0 && !R.has(e.kind) || B.size > 0 && !(e.channels ?? []).some((p) => B.has(p)))
325
325
  return !1;
326
- const c = new Date(e.at).toLocaleDateString("sv-SE");
327
- return !(F && c < F || D && c > D);
326
+ const r = new Date(e.at).toLocaleDateString("sv-SE");
327
+ return !(F && r < F || D && r > D);
328
328
  }), ge = q.slice(0, j), K = /* @__PURE__ */ new Map();
329
329
  for (const e of ge) {
330
- const c = new Date(e.at).toLocaleDateString("en-US", {
330
+ const r = new Date(e.at).toLocaleDateString("en-US", {
331
331
  month: "short",
332
332
  day: "numeric",
333
333
  year: "numeric"
334
- }), u = K.get(c);
335
- u ? u.push(e) : K.set(c, [e]);
334
+ }), p = K.get(r);
335
+ p ? p.push(e) : K.set(r, [e]);
336
336
  }
337
337
  const U = (e) => /* @__PURE__ */ a(
338
338
  "button",
@@ -350,7 +350,7 @@ function tt({ only: n, bare: l } = {}) {
350
350
  return /* @__PURE__ */ a(
351
351
  "div",
352
352
  {
353
- className: l ? "" : "rounded-xl border border-slate-200 bg-white dark:border-border dark:bg-card",
353
+ className: s ? "" : "rounded-xl border border-slate-200 bg-white dark:border-border dark:bg-card",
354
354
  "data-notification-sources": !0,
355
355
  children: [
356
356
  /* @__PURE__ */ t(
@@ -367,7 +367,7 @@ function tt({ only: n, bare: l } = {}) {
367
367
  } : void 0
368
368
  }
369
369
  ),
370
- !l && /* @__PURE__ */ a("div", { className: "flex flex-wrap items-center gap-x-3 gap-y-2 border-b border-slate-100 px-5 py-3.5 dark:border-border/60", children: [
370
+ !s && /* @__PURE__ */ a("div", { className: "flex flex-wrap items-center gap-x-3 gap-y-2 border-b border-slate-100 px-5 py-3.5 dark:border-border/60", children: [
371
371
  /* @__PURE__ */ t(z, { className: "h-4 w-4 shrink-0 text-nvr-cyan" }),
372
372
  /* @__PURE__ */ a("div", { className: "min-w-0 flex-1", children: [
373
373
  /* @__PURE__ */ t("h2", { className: "text-[14px] font-semibold text-slate-900 dark:text-foreground", children: "Notifications & alerts" }),
@@ -375,7 +375,7 @@ function tt({ only: n, bare: l } = {}) {
375
375
  ne,
376
376
  " sources · email delivered",
377
377
  " ",
378
- s.preferences.email_digest === "daily" ? "in your daily summary" : "instantly"
378
+ o.preferences.email_digest === "daily" ? "in your daily summary" : "instantly"
379
379
  ] })
380
380
  ] }),
381
381
  /* @__PURE__ */ t("div", { className: "flex items-center gap-1 rounded-lg bg-slate-100 p-1 dark:bg-muted", children: [
@@ -386,18 +386,18 @@ function tt({ only: n, bare: l } = {}) {
386
386
  {
387
387
  type: "button",
388
388
  onClick: () => d(e.key),
389
- "aria-pressed": o === e.key,
389
+ "aria-pressed": c === e.key,
390
390
  className: [
391
391
  "rounded-md px-2.5 py-1 text-[12px] font-medium transition-colors duration-150",
392
- o === e.key ? "bg-white text-slate-900 shadow-sm dark:bg-card dark:text-foreground" : "text-slate-500 hover:text-slate-700 dark:text-slate-400 dark:hover:text-slate-200"
392
+ c === e.key ? "bg-white text-slate-900 shadow-sm dark:bg-card dark:text-foreground" : "text-slate-500 hover:text-slate-700 dark:text-slate-400 dark:hover:text-slate-200"
393
393
  ].join(" "),
394
394
  children: e.label
395
395
  },
396
396
  e.key
397
397
  )) })
398
398
  ] }),
399
- o === "sources" && /* @__PURE__ */ a(T, { children: [
400
- !p && te.some((e) => e.unread >= 25) && /* @__PURE__ */ a("div", { className: "mb-3 space-y-1.5 rounded-md border border-amber-200 bg-amber-50 px-3 py-2 dark:border-amber-500/30 dark:bg-amber-400/10", children: [
399
+ c === "sources" && /* @__PURE__ */ a(T, { children: [
400
+ !u && te.some((e) => e.unread >= 25) && /* @__PURE__ */ a("div", { className: "mb-3 space-y-1.5 rounded-md border border-amber-200 bg-amber-50 px-3 py-2 dark:border-amber-500/30 dark:bg-amber-400/10", children: [
401
401
  /* @__PURE__ */ t("p", { className: "text-[11.5px] font-medium text-amber-800 dark:text-amber-300", children: "Unread piles — the important ones drown under these:" }),
402
402
  te.filter((e) => e.unread >= 25).slice(0, 4).map((e) => /* @__PURE__ */ a(
403
403
  "p",
@@ -426,15 +426,15 @@ function tt({ only: n, bare: l } = {}) {
426
426
  ...new Map(
427
427
  _.filter((e) => e.template_id).map((e) => [e.template_id, e.template_name])
428
428
  ).entries()
429
- ].map(([e, c]) => /* @__PURE__ */ t(
429
+ ].map(([e, r]) => /* @__PURE__ */ t(
430
430
  y,
431
431
  {
432
432
  path: `/pipelines/${e}`,
433
- label: `${c ?? "Pipeline"} states`
433
+ label: `${r ?? "Pipeline"} states`
434
434
  },
435
435
  String(e)
436
436
  )),
437
- !p && /* @__PURE__ */ t(y, { path: "/notification-subscriptions", label: "All subscriptions" }),
437
+ !u && /* @__PURE__ */ t(y, { path: "/notification-subscriptions", label: "All subscriptions" }),
438
438
  U({
439
439
  collection: ((ie = _[0]) == null ? void 0 : ie.collection) ?? void 0,
440
440
  event_type: "workflow_transition"
@@ -451,7 +451,7 @@ function tt({ only: n, bare: l } = {}) {
451
451
  ce,
452
452
  {
453
453
  sub: e,
454
- onPatch: (c) => m.patchFields.mutate({ id: e.id, body: c }),
454
+ onPatch: (r) => m.patchFields.mutate({ id: e.id, body: r }),
455
455
  onEdit: () => E(e)
456
456
  }
457
457
  ),
@@ -467,7 +467,7 @@ function tt({ only: n, bare: l } = {}) {
467
467
  {
468
468
  title: "Record & collection subscriptions",
469
469
  action: /* @__PURE__ */ a(T, { children: [
470
- !p && /* @__PURE__ */ t(y, { path: "/notification-subscriptions", label: "All subscriptions" }),
470
+ !u && /* @__PURE__ */ t(y, { path: "/notification-subscriptions", label: "All subscriptions" }),
471
471
  U()
472
472
  ] }),
473
473
  children: I.map((e) => /* @__PURE__ */ t(
@@ -501,7 +501,7 @@ function tt({ only: n, bare: l } = {}) {
501
501
  ce,
502
502
  {
503
503
  sub: e,
504
- onPatch: (c) => m.patchFields.mutate({ id: e.id, body: c }),
504
+ onPatch: (r) => m.patchFields.mutate({ id: e.id, body: r }),
505
505
  onEdit: () => E(e)
506
506
  }
507
507
  ),
@@ -512,18 +512,18 @@ function tt({ only: n, bare: l } = {}) {
512
512
  ))
513
513
  }
514
514
  ),
515
- p && _.length === 0 && I.length === 0 && /* @__PURE__ */ a("div", { className: "flex flex-col items-center gap-2 py-12 text-center", children: [
515
+ u && _.length === 0 && I.length === 0 && /* @__PURE__ */ a("div", { className: "flex flex-col items-center gap-2 py-12 text-center", children: [
516
516
  /* @__PURE__ */ t(z, { className: "h-7 w-7 text-slate-300 dark:text-slate-600" }),
517
517
  /* @__PURE__ */ t("p", { className: "text-[13px] font-medium text-slate-700 dark:text-slate-200", children: "No subscriptions yet" }),
518
518
  /* @__PURE__ */ t("p", { className: "max-w-[38ch] text-[12px] text-slate-500 dark:text-slate-400", children: "Subscribe to a collection or a workflow state to get told when it changes — instantly, or folded into your daily summary." }),
519
519
  /* @__PURE__ */ t("div", { className: "mt-1", children: U() })
520
520
  ] }),
521
- !p && s.field_watches.length > 0 && /* @__PURE__ */ t(
521
+ !u && o.field_watches.length > 0 && /* @__PURE__ */ t(
522
522
  x,
523
523
  {
524
524
  title: "Field watches",
525
525
  action: /* @__PURE__ */ t(y, { path: "/field-watches", label: "Manage watches" }),
526
- children: s.field_watches.map((e) => /* @__PURE__ */ t(
526
+ children: o.field_watches.map((e) => /* @__PURE__ */ t(
527
527
  h,
528
528
  {
529
529
  trigger: e.trigger,
@@ -536,12 +536,12 @@ function tt({ only: n, bare: l } = {}) {
536
536
  ))
537
537
  }
538
538
  ),
539
- !p && s.record_alerts.length > 0 && /* @__PURE__ */ t(
539
+ !u && o.record_alerts.length > 0 && /* @__PURE__ */ t(
540
540
  x,
541
541
  {
542
542
  title: "Record alerts",
543
543
  action: /* @__PURE__ */ t(y, { path: "/alerts", label: "Manage alert definitions" }),
544
- children: s.record_alerts.map((e) => /* @__PURE__ */ t(
544
+ children: o.record_alerts.map((e) => /* @__PURE__ */ t(
545
545
  h,
546
546
  {
547
547
  trigger: e.trigger,
@@ -556,12 +556,12 @@ function tt({ only: n, bare: l } = {}) {
556
556
  ))
557
557
  }
558
558
  ),
559
- !p && s.metric_alerts.length > 0 && /* @__PURE__ */ t(
559
+ !u && o.metric_alerts.length > 0 && /* @__PURE__ */ t(
560
560
  x,
561
561
  {
562
562
  title: "Metric alerts",
563
563
  action: /* @__PURE__ */ t(y, { path: "/alert-manager", label: "Alert Manager" }),
564
- children: s.metric_alerts.map((e) => /* @__PURE__ */ t(
564
+ children: o.metric_alerts.map((e) => /* @__PURE__ */ t(
565
565
  h,
566
566
  {
567
567
  trigger: e.trigger,
@@ -606,13 +606,13 @@ function tt({ only: n, bare: l } = {}) {
606
606
  ))
607
607
  }
608
608
  ),
609
- !p && s.anomaly_rules.length > 0 && /* @__PURE__ */ t(
609
+ !u && o.anomaly_rules.length > 0 && /* @__PURE__ */ t(
610
610
  x,
611
611
  {
612
612
  title: "Anomaly detection",
613
613
  hint: "rules you created — detections come to you",
614
614
  action: /* @__PURE__ */ t(y, { path: "/alert-manager", label: "Alert Manager" }),
615
- children: s.anomaly_rules.map((e) => /* @__PURE__ */ t(
615
+ children: o.anomaly_rules.map((e) => /* @__PURE__ */ t(
616
616
  h,
617
617
  {
618
618
  trigger: e.trigger,
@@ -650,12 +650,12 @@ function tt({ only: n, bare: l } = {}) {
650
650
  ))
651
651
  }
652
652
  ),
653
- !p && s.report_subscriptions.length > 0 && /* @__PURE__ */ t(
653
+ !u && o.report_subscriptions.length > 0 && /* @__PURE__ */ t(
654
654
  x,
655
655
  {
656
656
  title: "Report digests",
657
657
  action: /* @__PURE__ */ t(y, { path: "/reports", label: "Reports" }),
658
- children: s.report_subscriptions.map((e) => /* @__PURE__ */ t(
658
+ children: o.report_subscriptions.map((e) => /* @__PURE__ */ t(
659
659
  h,
660
660
  {
661
661
  trigger: e.trigger,
@@ -678,7 +678,7 @@ function tt({ only: n, bare: l } = {}) {
678
678
  { value: "daily", label: "Daily" },
679
679
  { value: "weekly", label: "Weekly" }
680
680
  ],
681
- onChange: (c) => O.mutate({ reportId: e.report_id, body: { cadence: c } })
681
+ onChange: (r) => O.mutate({ reportId: e.report_id, body: { cadence: r } })
682
682
  }
683
683
  ),
684
684
  onRemove: () => O.mutate({ reportId: e.report_id, body: null }),
@@ -688,13 +688,13 @@ function tt({ only: n, bare: l } = {}) {
688
688
  ))
689
689
  }
690
690
  ),
691
- !p && s.report_alerts.length > 0 && /* @__PURE__ */ t(
691
+ !u && o.report_alerts.length > 0 && /* @__PURE__ */ t(
692
692
  x,
693
693
  {
694
694
  title: "Report alerts",
695
695
  hint: "you created these",
696
696
  action: /* @__PURE__ */ t(y, { path: "/reports", label: "Reports" }),
697
- children: s.report_alerts.map((e) => /* @__PURE__ */ t(
697
+ children: o.report_alerts.map((e) => /* @__PURE__ */ t(
698
698
  h,
699
699
  {
700
700
  trigger: e.trigger,
@@ -707,12 +707,12 @@ function tt({ only: n, bare: l } = {}) {
707
707
  ))
708
708
  }
709
709
  ),
710
- !p && s.view_subscriptions.length > 0 && /* @__PURE__ */ t(
710
+ !u && o.view_subscriptions.length > 0 && /* @__PURE__ */ t(
711
711
  x,
712
712
  {
713
713
  title: "Saved-view digests",
714
714
  hint: "which records entered the view since last time",
715
- children: s.view_subscriptions.map((e) => /* @__PURE__ */ t(
715
+ children: o.view_subscriptions.map((e) => /* @__PURE__ */ t(
716
716
  h,
717
717
  {
718
718
  trigger: e.trigger,
@@ -727,8 +727,8 @@ function tt({ only: n, bare: l } = {}) {
727
727
  ))
728
728
  }
729
729
  ),
730
- !p && (s.chat_rooms.length > 0 || s.push_devices.length > 0) && /* @__PURE__ */ a(x, { title: "Chat & devices", children: [
731
- s.chat_rooms.map((e) => /* @__PURE__ */ t(
730
+ !u && (o.chat_rooms.length > 0 || o.push_devices.length > 0) && /* @__PURE__ */ a(x, { title: "Chat & devices", children: [
731
+ o.chat_rooms.map((e) => /* @__PURE__ */ t(
732
732
  h,
733
733
  {
734
734
  title: e.room.replace(/^ch:/, "#"),
@@ -736,23 +736,27 @@ function tt({ only: n, bare: l } = {}) {
736
736
  },
737
737
  e.room
738
738
  )),
739
- s.push_devices.length > 0 && /* @__PURE__ */ t(
740
- h,
741
- {
742
- title: `Browser push — ${s.push_devices.length} device${s.push_devices.length === 1 ? "" : "s"}`,
743
- description: "Push notifications mirror your in-app notifications"
744
- }
745
- )
739
+ ["browser", "phone"].map((e) => {
740
+ const r = o.push_devices.filter((p) => (p.kind ?? "browser") === e).length;
741
+ return r === 0 ? null : /* @__PURE__ */ t(
742
+ h,
743
+ {
744
+ title: e === "phone" ? `Phone alerts — ${r} phone${r === 1 ? "" : "s"}` : `Browser push — ${r} device${r === 1 ? "" : "s"}`,
745
+ description: "Push notifications mirror your in-app notifications"
746
+ },
747
+ e
748
+ );
749
+ })
746
750
  ] }),
747
- !p && (s.external ?? []).map((e) => /* @__PURE__ */ a(x, { title: e.title, hint: e.description, children: [
748
- e.items.map((c) => /* @__PURE__ */ t(
751
+ !u && (o.external ?? []).map((e) => /* @__PURE__ */ a(x, { title: e.title, hint: e.description, children: [
752
+ e.items.map((r) => /* @__PURE__ */ t(
749
753
  h,
750
754
  {
751
- title: c.label,
752
- description: c.detail ?? void 0,
753
- paused: c.is_active === !1 ? "inactive" : null
755
+ title: r.label,
756
+ description: r.detail ?? void 0,
757
+ paused: r.is_active === !1 ? "inactive" : null
754
758
  },
755
- String(c.id)
759
+ String(r.id)
756
760
  )),
757
761
  e.items.length === 0 && /* @__PURE__ */ t("p", { className: "px-2 py-1.5 text-[11.5px] text-slate-400", children: "Nothing watched yet." }),
758
762
  e.manage_url && /* @__PURE__ */ t(
@@ -764,13 +768,13 @@ function tt({ only: n, bare: l } = {}) {
764
768
  }
765
769
  )
766
770
  ] }, e.key)),
767
- !p && (s.implicit.owner_group_memberships.length > 0 || s.implicit.sla_escalations.length > 0) && /* @__PURE__ */ a(
771
+ !u && (o.implicit.owner_group_memberships.length > 0 || o.implicit.sla_escalations.length > 0) && /* @__PURE__ */ a(
768
772
  x,
769
773
  {
770
774
  title: "Because of your role",
771
775
  hint: "these follow from assignments, not subscriptions — an admin manages them",
772
776
  children: [
773
- s.implicit.owner_group_memberships.map((e) => /* @__PURE__ */ t(
777
+ o.implicit.owner_group_memberships.map((e) => /* @__PURE__ */ t(
774
778
  h,
775
779
  {
776
780
  trigger: e.trigger,
@@ -779,7 +783,7 @@ function tt({ only: n, bare: l } = {}) {
779
783
  },
780
784
  e.template
781
785
  )),
782
- s.implicit.sla_escalations.map((e) => /* @__PURE__ */ t(
786
+ o.implicit.sla_escalations.map((e) => /* @__PURE__ */ t(
783
787
  h,
784
788
  {
785
789
  trigger: e.trigger,
@@ -797,7 +801,7 @@ function tt({ only: n, bare: l } = {}) {
797
801
  ] })
798
802
  ] })
799
803
  ] }),
800
- o === "history" && /* @__PURE__ */ a("div", { className: "px-5 py-4", children: [
804
+ c === "history" && /* @__PURE__ */ a("div", { className: "px-5 py-4", children: [
801
805
  $.length > 0 && /* @__PURE__ */ a("div", { className: "mb-3 flex flex-wrap items-center gap-x-4 gap-y-2", children: [
802
806
  /* @__PURE__ */ t(
803
807
  me,
@@ -875,7 +879,7 @@ function tt({ only: n, bare: l } = {}) {
875
879
  }
876
880
  )
877
881
  ] }),
878
- ae.isLoading ? /* @__PURE__ */ t("div", { className: "space-y-2 py-2", children: Array.from({ length: 6 }, (e, c) => /* @__PURE__ */ t("div", { className: "h-9 animate-pulse rounded-md bg-slate-100 dark:bg-muted" }, c)) }) : $.length === 0 ? /* @__PURE__ */ a("div", { className: "px-2 py-6 text-center", children: [
882
+ ae.isLoading ? /* @__PURE__ */ t("div", { className: "space-y-2 py-2", children: Array.from({ length: 6 }, (e, r) => /* @__PURE__ */ t("div", { className: "h-9 animate-pulse rounded-md bg-slate-100 dark:bg-muted" }, r)) }) : $.length === 0 ? /* @__PURE__ */ a("div", { className: "px-2 py-6 text-center", children: [
879
883
  /* @__PURE__ */ t(fe, { className: "mx-auto mb-2 h-5 w-5 text-slate-300 dark:text-slate-600" }),
880
884
  /* @__PURE__ */ t("p", { className: "text-[13px] font-medium text-slate-700 dark:text-slate-200", children: "Nothing delivered yet" }),
881
885
  /* @__PURE__ */ t("p", { className: "mt-1 text-[11.5px] text-slate-500 dark:text-slate-400", children: "When a subscription or alert fires, it shows up here with the time it was sent." })
@@ -884,13 +888,13 @@ function tt({ only: n, bare: l } = {}) {
884
888
  $.length,
885
889
  " entries."
886
890
  ] }) : /* @__PURE__ */ a("div", { className: "space-y-4", children: [
887
- [...K.entries()].map(([e, c]) => /* @__PURE__ */ a("div", { children: [
891
+ [...K.entries()].map(([e, r]) => /* @__PURE__ */ a("div", { children: [
888
892
  /* @__PURE__ */ t("p", { className: "mb-1 text-[10.5px] font-semibold text-slate-400", children: e }),
889
- /* @__PURE__ */ t("div", { className: "space-y-0.5", children: c.map((u, xe) => {
890
- const se = We[u.kind] ?? {
893
+ /* @__PURE__ */ t("div", { className: "space-y-0.5", children: r.map((p, xe) => {
894
+ const re = We[p.kind] ?? {
891
895
  icon: _e,
892
896
  tint: "text-slate-500 bg-slate-100 dark:bg-muted"
893
- }, be = se.icon;
897
+ }, be = re.icon;
894
898
  return /* @__PURE__ */ a(
895
899
  "div",
896
900
  {
@@ -899,29 +903,29 @@ function tt({ only: n, bare: l } = {}) {
899
903
  /* @__PURE__ */ t(
900
904
  "span",
901
905
  {
902
- className: `mt-0.5 flex h-6 w-6 shrink-0 items-center justify-center rounded-full ${se.tint}`,
906
+ className: `mt-0.5 flex h-6 w-6 shrink-0 items-center justify-center rounded-full ${re.tint}`,
903
907
  children: /* @__PURE__ */ t(be, { className: "h-3 w-3" })
904
908
  }
905
909
  ),
906
910
  /* @__PURE__ */ a("div", { className: "min-w-0 flex-1", children: [
907
- /* @__PURE__ */ t("p", { className: "text-[12.5px] text-slate-800 dark:text-slate-100", children: u.title }),
908
- u.detail && /* @__PURE__ */ t("p", { className: "truncate text-[11px] text-slate-500 dark:text-slate-400", children: u.detail })
911
+ /* @__PURE__ */ t("p", { className: "text-[12.5px] text-slate-800 dark:text-slate-100", children: p.title }),
912
+ p.detail && /* @__PURE__ */ t("p", { className: "truncate text-[11px] text-slate-500 dark:text-slate-400", children: p.detail })
909
913
  ] }),
910
914
  /* @__PURE__ */ a("span", { className: "flex shrink-0 items-center gap-1.5", children: [
911
- (u.channels ?? []).map((le) => /* @__PURE__ */ t(
915
+ (p.channels ?? []).map((se) => /* @__PURE__ */ t(
912
916
  "span",
913
917
  {
914
918
  className: "rounded bg-slate-100 px-1 py-0.5 text-[9.5px] font-medium uppercase tracking-wide text-slate-600 dark:bg-muted dark:text-slate-300",
915
- children: le
919
+ children: se
916
920
  },
917
- le
921
+ se
918
922
  )),
919
923
  /* @__PURE__ */ t(
920
924
  "span",
921
925
  {
922
926
  className: "text-[10.5px] tabular-nums text-slate-400",
923
- title: new Date(u.at).toLocaleString(),
924
- children: new Date(u.at).toLocaleTimeString("en-US", {
927
+ title: new Date(p.at).toLocaleString(),
928
+ children: new Date(p.at).toLocaleTimeString("en-US", {
925
929
  hour: "numeric",
926
930
  minute: "2-digit"
927
931
  })
@@ -930,7 +934,7 @@ function tt({ only: n, bare: l } = {}) {
930
934
  ] })
931
935
  ]
932
936
  },
933
- `${u.kind}-${u.at}-${xe}`
937
+ `${p.kind}-${p.at}-${xe}`
934
938
  );
935
939
  }) })
936
940
  ] }, e)),
@@ -955,23 +959,23 @@ function tt({ only: n, bare: l } = {}) {
955
959
  }
956
960
  function me({
957
961
  label: n,
958
- options: l,
962
+ options: s,
959
963
  counts: i,
960
- selected: r,
961
- onChange: o
964
+ selected: l,
965
+ onChange: c
962
966
  }) {
963
- return l.length === 0 ? null : /* @__PURE__ */ a("span", { className: "flex flex-wrap items-center gap-1.5", children: [
967
+ return s.length === 0 ? null : /* @__PURE__ */ a("span", { className: "flex flex-wrap items-center gap-1.5", children: [
964
968
  /* @__PURE__ */ t("span", { className: "text-[10.5px] font-semibold text-slate-500 dark:text-slate-400", children: n }),
965
- l.map((d) => {
966
- const m = r.has(d.key);
969
+ s.map((d) => {
970
+ const m = l.has(d.key);
967
971
  return /* @__PURE__ */ a(
968
972
  "button",
969
973
  {
970
974
  type: "button",
971
975
  "aria-pressed": m,
972
976
  onClick: () => {
973
- const b = new Set(r);
974
- m ? b.delete(d.key) : b.add(d.key), o(b);
977
+ const b = new Set(l);
978
+ m ? b.delete(d.key) : b.add(d.key), c(b);
975
979
  },
976
980
  className: [
977
981
  "rounded-full border px-2 py-0.5 text-[11px] transition-colors duration-150",