@nivaro/react 0.3.11 → 0.3.13

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,49 +1,33 @@
1
- import { jsxs as o, jsx as e, Fragment as E } from "react/jsx-runtime";
2
- import { useMutation as v, useQuery as M } from "@tanstack/react-query";
3
- import { RefreshCw as P, GitMerge as U, UserMinus as B } from "lucide-react";
4
- import { useState as m } from "react";
1
+ import { jsxs as a, jsx as e, Fragment as I } from "react/jsx-runtime";
2
+ import { useMutation as y, useQuery as T } from "@tanstack/react-query";
3
+ import { RefreshCw as F, LogOut as R, GitMerge as U, UserMinus as H } from "lucide-react";
4
+ import { useState as m, useEffect as K } from "react";
5
5
  import { toast as x } from "sonner";
6
- import { useNivaroClient as k } from "../../context.js";
7
- import { post as w, get as $ } from "../../lib/commands.js";
8
- import { cn as I } from "../../lib/utils.js";
9
- import { SectionCard as C, EmptyLine as S } from "./primitives.js";
10
- import { errorText as y, useInvalidatePerson as j } from "./types.js";
11
- function te({ profile: d }) {
12
- const u = k(), [h, t] = m("15"), [p, i] = m(""), l = v({
13
- mutationFn: () => u.request(
14
- w("/realtime/force-refresh", {
15
- user_ids: [d.id],
16
- seconds: Number(h) || 15,
17
- message: p
18
- })
19
- ).then((a) => a.data),
20
- // The reload rides the person's room on every server; only the tab count can fall short.
21
- // A server without `nodes` counts only the tabs on the server that took this request.
22
- onSuccess: ({ sockets: a, nodes: s, partial: c, remembered: b, remember_hours: r }) => {
23
- const f = b ? ` Tabs that connect in the next ${r ?? 24} h reload too.` : "";
24
- x.success(
25
- (a > 0 ? `Reload pushed to ${a} open tab${a === 1 ? "" : "s"}${c ? " (another server did not answer — there may be more)" : ""}.` : c ? "Reload sent — another server did not answer, so their open tabs could not be counted." : s != null ? "Reload sent — they have no tab open right now." : "Reload sent to every tab they have open (tabs on other servers are not counted).") + f
26
- );
27
- },
28
- onError: (a) => x.error(y(a, "Failed to push the reload"))
29
- });
30
- return /* @__PURE__ */ o(
31
- C,
6
+ import { useNivaroClient as C } from "../../context.js";
7
+ import { post as N, get as j } from "../../lib/commands.js";
8
+ import { cn as O } from "../../lib/utils.js";
9
+ import { SectionCard as f, EmptyLine as M } from "./primitives.js";
10
+ import { useReloadTheirTabs as Q, useSignOutEverywhere as z } from "./session-actions.js";
11
+ import { useInvalidatePerson as $, errorText as _ } from "./types.js";
12
+ function oe({ profile: s }) {
13
+ const [d, l] = m("15"), [t, u] = m(""), o = Q(s.id);
14
+ return /* @__PURE__ */ a(
15
+ f,
32
16
  {
33
- icon: /* @__PURE__ */ e(P, { className: "h-4 w-4" }),
17
+ icon: /* @__PURE__ */ e(F, { className: "h-4 w-4" }),
34
18
  title: "Force a reload",
35
19
  hint: "Every tab they have open shows a countdown, then reloads onto the current build",
36
20
  tone: "danger",
37
21
  testId: "force-reload",
38
22
  children: [
39
- /* @__PURE__ */ o("div", { className: "flex flex-wrap items-center gap-2", "data-user-force-reload": !0, children: [
40
- /* @__PURE__ */ o("label", { className: "flex items-center gap-1.5 text-[12px] text-slate-600 dark:text-slate-300", children: [
23
+ /* @__PURE__ */ a("div", { className: "flex flex-wrap items-center gap-2", "data-user-force-reload": !0, children: [
24
+ /* @__PURE__ */ a("label", { className: "flex items-center gap-1.5 text-[12px] text-slate-600 dark:text-slate-300", children: [
41
25
  "Countdown",
42
26
  /* @__PURE__ */ e(
43
27
  "input",
44
28
  {
45
- value: h,
46
- onChange: (a) => t(a.target.value),
29
+ value: d,
30
+ onChange: (c) => l(c.target.value),
47
31
  inputMode: "numeric",
48
32
  className: "h-7 w-14 rounded-md border border-slate-200 bg-white px-2 text-right text-[12px] dark:border-border dark:bg-background"
49
33
  }
@@ -53,22 +37,22 @@ function te({ profile: d }) {
53
37
  /* @__PURE__ */ e(
54
38
  "input",
55
39
  {
56
- value: p,
57
- onChange: (a) => i(a.target.value),
40
+ value: t,
41
+ onChange: (c) => u(c.target.value),
58
42
  placeholder: "Optional message in their banner",
59
43
  className: "h-7 min-w-[200px] flex-1 rounded-md border border-slate-200 bg-white px-2.5 text-[12px] dark:border-border dark:bg-background"
60
44
  }
61
45
  ),
62
- /* @__PURE__ */ o(
46
+ /* @__PURE__ */ a(
63
47
  "button",
64
48
  {
65
49
  type: "button",
66
- disabled: l.isPending,
67
- onClick: () => l.mutate(),
50
+ disabled: o.isPending,
51
+ onClick: () => o.mutate({ seconds: Number(d) || 15, message: t }),
68
52
  className: "inline-flex h-7 items-center gap-1.5 rounded-md border border-amber-300 px-2.5 text-[11.5px] font-medium text-amber-800 transition-colors hover:bg-amber-50 disabled:opacity-50 dark:border-amber-500/40 dark:text-amber-300 dark:hover:bg-amber-500/10",
69
53
  children: [
70
- /* @__PURE__ */ e(P, { className: I("h-3 w-3", l.isPending && "animate-spin") }),
71
- l.isPending ? "Sending…" : "Reload their tabs"
54
+ /* @__PURE__ */ e(F, { className: O("h-3 w-3", o.isPending && "animate-spin") }),
55
+ o.isPending ? "Sending…" : "Reload their tabs"
72
56
  ]
73
57
  }
74
58
  )
@@ -78,19 +62,58 @@ function te({ profile: d }) {
78
62
  }
79
63
  );
80
64
  }
81
- function D({
82
- excludeId: d,
83
- value: u,
84
- label: h,
65
+ function ie({ profile: s }) {
66
+ const d = [s.first_name, s.last_name].filter(Boolean).join(" ") || s.email || "They", [l, t] = m(!1);
67
+ K(() => {
68
+ if (!l) return;
69
+ const o = setTimeout(() => t(!1), 4e3);
70
+ return () => clearTimeout(o);
71
+ }, [l]);
72
+ const u = z(s.id, d, { onDone: () => t(!1) });
73
+ return /* @__PURE__ */ a(
74
+ f,
75
+ {
76
+ icon: /* @__PURE__ */ e(R, { className: "h-4 w-4" }),
77
+ title: "Sign out everywhere",
78
+ hint: "Ends every session they have, on every app — each open tab goes back to sign-in",
79
+ tone: "danger",
80
+ testId: "sign-out-everywhere",
81
+ children: [
82
+ /* @__PURE__ */ e("div", { className: "flex flex-wrap items-center gap-2", "data-user-sign-out": !0, children: /* @__PURE__ */ a(
83
+ "button",
84
+ {
85
+ type: "button",
86
+ disabled: u.isPending,
87
+ onClick: () => l ? u.mutate() : t(!0),
88
+ onBlur: () => t(!1),
89
+ className: O(
90
+ "inline-flex h-7 items-center gap-1.5 rounded-md border px-2.5 text-[11.5px] font-medium transition-colors disabled:opacity-50",
91
+ l ? "border-red-600 bg-red-600 text-white hover:bg-red-700" : "border-amber-300 text-amber-800 hover:bg-amber-50 dark:border-amber-500/40 dark:text-amber-300 dark:hover:bg-amber-500/10"
92
+ ),
93
+ children: [
94
+ /* @__PURE__ */ e(R, { className: "h-3 w-3" }),
95
+ u.isPending ? "Signing out…" : l ? "Confirm sign out" : "Sign them out"
96
+ ]
97
+ }
98
+ ) }),
99
+ /* @__PURE__ */ e("p", { className: "mt-2 text-[11.5px] text-slate-500 dark:text-slate-400", children: "They can sign in again straight away — suspend the account to keep them out. API keys and static tokens keep working." })
100
+ ]
101
+ }
102
+ );
103
+ }
104
+ function A({
105
+ excludeId: s,
106
+ value: d,
107
+ label: l,
85
108
  onPick: t
86
109
  }) {
87
- const p = k(), [i, l] = m(""), { data: a = [] } = M({
88
- queryKey: ["nvr-offboard-user-search", i],
89
- queryFn: () => p.request($("/users", { search: i, limit: 8 })).then((s) => s.data),
90
- enabled: i.length > 1
110
+ const u = C(), [o, c] = m(""), { data: h = [] } = T({
111
+ queryKey: ["nvr-offboard-user-search", o],
112
+ queryFn: () => u.request(j("/users", { search: o, limit: 8 })).then((i) => i.data),
113
+ enabled: o.length > 1
91
114
  });
92
- return u ? /* @__PURE__ */ o("span", { className: "inline-flex items-center gap-1.5 rounded-full bg-nvr-cyan/10 px-2.5 py-1 text-[12px] font-medium text-nvr-navy dark:text-nvr-cyan", children: [
93
- u.name,
115
+ return d ? /* @__PURE__ */ a("span", { className: "inline-flex items-center gap-1.5 rounded-full bg-nvr-cyan/10 px-2.5 py-1 text-[12px] font-medium text-nvr-navy dark:text-nvr-cyan", children: [
116
+ d.name,
94
117
  /* @__PURE__ */ e(
95
118
  "button",
96
119
  {
@@ -101,32 +124,32 @@ function D({
101
124
  children: "✕"
102
125
  }
103
126
  )
104
- ] }) : /* @__PURE__ */ o("div", { className: "relative", children: [
127
+ ] }) : /* @__PURE__ */ a("div", { className: "relative", children: [
105
128
  /* @__PURE__ */ e(
106
129
  "input",
107
130
  {
108
- value: i,
109
- onChange: (s) => l(s.target.value),
110
- placeholder: h,
131
+ value: o,
132
+ onChange: (i) => c(i.target.value),
133
+ placeholder: l,
111
134
  className: "h-8 w-[260px] rounded-md border border-slate-200 bg-white px-2.5 text-[12.5px] dark:border-border dark:bg-background"
112
135
  }
113
136
  ),
114
- i.length > 1 && a.length > 0 && /* @__PURE__ */ e("div", { className: "absolute z-10 mt-1 w-[260px] rounded-md border border-slate-200 bg-white shadow-lg dark:border-border dark:bg-card", children: a.filter((s) => s.id.toUpperCase() !== d.toUpperCase()).map((s) => {
115
- const c = `${s.first_name ?? ""} ${s.last_name ?? ""}`.trim() || s.email;
116
- return /* @__PURE__ */ o(
137
+ o.length > 1 && h.length > 0 && /* @__PURE__ */ e("div", { className: "absolute z-10 mt-1 w-[260px] rounded-md border border-slate-200 bg-white shadow-lg dark:border-border dark:bg-card", children: h.filter((i) => i.id.toUpperCase() !== s.toUpperCase()).map((i) => {
138
+ const p = `${i.first_name ?? ""} ${i.last_name ?? ""}`.trim() || i.email;
139
+ return /* @__PURE__ */ a(
117
140
  "button",
118
141
  {
119
142
  type: "button",
120
143
  onClick: () => {
121
- t({ id: s.id, name: c }), l("");
144
+ t({ id: i.id, name: p }), c("");
122
145
  },
123
146
  className: "block w-full px-2.5 py-1.5 text-left text-[12.5px] text-slate-700 hover:bg-muted dark:text-foreground",
124
147
  children: [
125
- c,
126
- /* @__PURE__ */ e("span", { className: "ml-1.5 text-[11px] text-slate-400", children: s.email })
148
+ p,
149
+ /* @__PURE__ */ e("span", { className: "ml-1.5 text-[11px] text-slate-400", children: i.email })
127
150
  ]
128
151
  },
129
- s.id
152
+ i.id
130
153
  );
131
154
  }) })
132
155
  ] });
@@ -140,7 +163,7 @@ const q = {
140
163
  direct_reports: "Direct reports",
141
164
  notification_subscriptions: "Notification subscriptions",
142
165
  field_watches: "Field watches"
143
- }, H = {
166
+ }, J = {
144
167
  queue_claims: "queue_claims",
145
168
  instance_ownerships: "instance_ownerships",
146
169
  open_tasks: "open_tasks",
@@ -150,70 +173,70 @@ const q = {
150
173
  notification_subscriptions: "notification_subscriptions",
151
174
  field_watches: "notification_subscriptions"
152
175
  };
153
- function re({ profile: d }) {
154
- const u = k(), h = j(d.id), [t, p] = m(null), [i, l] = m({}), [a, s] = m(!0), [c, b] = m(null), { data: r, refetch: f } = M({
155
- queryKey: ["nvr-offboarding", d.id],
156
- queryFn: () => u.request($(`/offboarding/${d.id}`)).then((n) => n.data)
157
- }), N = v({
158
- mutationFn: () => u.request(
159
- w(`/offboarding/${d.id}/run`, { successor: t == null ? void 0 : t.id, include: i, suspend: a })
160
- ).then((n) => n.data),
161
- onSuccess: (n) => {
162
- b(n), x.success("Offboarding complete"), f(), h();
176
+ function de({ profile: s }) {
177
+ const d = C(), l = $(s.id), [t, u] = m(null), [o, c] = m({}), [h, i] = m(!0), [p, g] = m(null), { data: n, refetch: k } = T({
178
+ queryKey: ["nvr-offboarding", s.id],
179
+ queryFn: () => d.request(j(`/offboarding/${s.id}`)).then((r) => r.data)
180
+ }), v = y({
181
+ mutationFn: () => d.request(
182
+ N(`/offboarding/${s.id}/run`, { successor: t == null ? void 0 : t.id, include: o, suspend: h })
183
+ ).then((r) => r.data),
184
+ onSuccess: (r) => {
185
+ g(r), x.success("Offboarding complete"), k(), l();
163
186
  },
164
- onError: (n) => x.error(y(n, "Offboarding failed"))
165
- }), L = Object.values((r == null ? void 0 : r.holdings) ?? {}).reduce((n, g) => n + g, 0), [O, T] = m("");
187
+ onError: (r) => x.error(_(r, "Offboarding failed"))
188
+ }), D = Object.values((n == null ? void 0 : n.holdings) ?? {}).reduce((r, b) => r + b, 0), [S, L] = m("");
166
189
  return /* @__PURE__ */ e(
167
- C,
190
+ f,
168
191
  {
169
- icon: /* @__PURE__ */ e(B, { className: "h-4 w-4" }),
192
+ icon: /* @__PURE__ */ e(H, { className: "h-4 w-4" }),
170
193
  title: "Offboarding",
171
194
  hint: "Hand everything they hold to a successor in one pass",
172
195
  tone: "danger",
173
196
  testId: "offboarding",
174
- children: r ? /* @__PURE__ */ o("div", { className: "space-y-3", children: [
175
- /* @__PURE__ */ e("div", { className: "grid gap-x-6 gap-y-1 sm:grid-cols-2", children: Object.entries(r.holdings).map(([n, g]) => {
176
- const _ = H[n], F = I(
197
+ children: n ? /* @__PURE__ */ a("div", { className: "space-y-3", children: [
198
+ /* @__PURE__ */ e("div", { className: "grid gap-x-6 gap-y-1 sm:grid-cols-2", children: Object.entries(n.holdings).map(([r, b]) => {
199
+ const w = J[r], P = O(
177
200
  "flex items-center gap-2 text-[12.5px]",
178
- g === 0 ? "text-slate-300 dark:text-slate-600" : "text-slate-700 dark:text-slate-200"
179
- ), R = /* @__PURE__ */ o(E, { children: [
180
- /* @__PURE__ */ e("span", { className: "flex-1", children: q[n] ?? n }),
181
- /* @__PURE__ */ e("span", { className: "font-semibold tabular-nums", children: g })
201
+ b === 0 ? "text-slate-300 dark:text-slate-600" : "text-slate-700 dark:text-slate-200"
202
+ ), E = /* @__PURE__ */ a(I, { children: [
203
+ /* @__PURE__ */ e("span", { className: "flex-1", children: q[r] ?? r }),
204
+ /* @__PURE__ */ e("span", { className: "font-semibold tabular-nums", children: b })
182
205
  ] });
183
- return _ ? /* @__PURE__ */ o("label", { className: F, children: [
206
+ return w ? /* @__PURE__ */ a("label", { className: P, children: [
184
207
  /* @__PURE__ */ e(
185
208
  "input",
186
209
  {
187
210
  type: "checkbox",
188
- checked: i[_] !== !1,
189
- disabled: g === 0,
190
- onChange: (A) => l((G) => ({ ...G, [_]: A.target.checked })),
211
+ checked: o[w] !== !1,
212
+ disabled: b === 0,
213
+ onChange: (B) => c((G) => ({ ...G, [w]: B.target.checked })),
191
214
  className: "h-3.5 w-3.5"
192
215
  }
193
216
  ),
194
- R
195
- ] }, n) : /* @__PURE__ */ o("div", { className: F, children: [
217
+ E
218
+ ] }, r) : /* @__PURE__ */ a("div", { className: P, children: [
196
219
  /* @__PURE__ */ e("span", { className: "w-3.5" }),
197
- R
198
- ] }, n);
220
+ E
221
+ ] }, r);
199
222
  }) }),
200
- L === 0 ? /* @__PURE__ */ e(S, { children: "Nothing to hand over — this account holds no work." }) : /* @__PURE__ */ o("div", { className: "flex flex-wrap items-center gap-2.5", children: [
223
+ D === 0 ? /* @__PURE__ */ e(M, { children: "Nothing to hand over — this account holds no work." }) : /* @__PURE__ */ a("div", { className: "flex flex-wrap items-center gap-2.5", children: [
201
224
  /* @__PURE__ */ e(
202
- D,
225
+ A,
203
226
  {
204
- excludeId: d.id,
227
+ excludeId: s.id,
205
228
  value: t,
206
229
  label: "Successor (who takes it over)…",
207
- onPick: p
230
+ onPick: u
208
231
  }
209
232
  ),
210
- /* @__PURE__ */ o("label", { className: "flex items-center gap-1.5 text-[12px] text-slate-600 dark:text-slate-300", children: [
233
+ /* @__PURE__ */ a("label", { className: "flex items-center gap-1.5 text-[12px] text-slate-600 dark:text-slate-300", children: [
211
234
  /* @__PURE__ */ e(
212
235
  "input",
213
236
  {
214
237
  type: "checkbox",
215
- checked: a,
216
- onChange: (n) => s(n.target.checked),
238
+ checked: h,
239
+ onChange: (r) => i(r.target.checked),
217
240
  className: "h-3.5 w-3.5"
218
241
  }
219
242
  ),
@@ -223,8 +246,8 @@ function re({ profile: d }) {
223
246
  t && /* @__PURE__ */ e(
224
247
  "input",
225
248
  {
226
- value: O,
227
- onChange: (n) => T(n.target.value),
249
+ value: S,
250
+ onChange: (r) => L(r.target.value),
228
251
  placeholder: "Type OFFBOARD",
229
252
  "aria-label": "Type OFFBOARD to confirm",
230
253
  className: "h-8 w-[150px] rounded-md border border-amber-300 bg-white px-2.5 text-[12.5px] dark:border-amber-500/40 dark:bg-background"
@@ -234,54 +257,54 @@ function re({ profile: d }) {
234
257
  "button",
235
258
  {
236
259
  type: "button",
237
- disabled: !t || O !== "OFFBOARD" || N.isPending,
238
- onClick: () => N.mutate(),
260
+ disabled: !t || S !== "OFFBOARD" || v.isPending,
261
+ onClick: () => v.mutate(),
239
262
  className: "h-8 rounded-md bg-amber-500 px-4 text-[12.5px] font-semibold text-white hover:bg-amber-600 disabled:opacity-50",
240
- children: N.isPending ? "Reassigning…" : "Run offboarding"
263
+ children: v.isPending ? "Reassigning…" : "Run offboarding"
241
264
  }
242
265
  )
243
266
  ] }),
244
- c && /* @__PURE__ */ o("p", { className: "rounded-md bg-emerald-50 px-3 py-2 text-[12px] text-emerald-700 dark:bg-emerald-500/10 dark:text-emerald-400", children: [
267
+ p && /* @__PURE__ */ a("p", { className: "rounded-md bg-emerald-50 px-3 py-2 text-[12px] text-emerald-700 dark:bg-emerald-500/10 dark:text-emerald-400", children: [
245
268
  "Done:",
246
269
  " ",
247
- Object.entries(c).map(([n, g]) => `${(q[n] ?? n).toLowerCase()} ${g}`).join(" · ")
270
+ Object.entries(p).map(([r, b]) => `${(q[r] ?? r).toLowerCase()} ${b}`).join(" · ")
248
271
  ] })
249
- ] }) : /* @__PURE__ */ e(S, { children: "Loading what they hold…" })
272
+ ] }) : /* @__PURE__ */ e(M, { children: "Loading what they hold…" })
250
273
  }
251
274
  );
252
275
  }
253
- function ne({ profile: d }) {
254
- const u = k(), h = j(d.id), [t, p] = m(null), [i, l] = m(null), [a, s] = m(""), c = v({
255
- mutationFn: () => u.request(
256
- w(`/offboarding/${d.id}/merge`, { into: t == null ? void 0 : t.id, dry_run: !0 })
257
- ).then((r) => r.data),
258
- onSuccess: (r) => l(r.references),
259
- onError: (r) => x.error(y(r, "Preview failed"))
260
- }), b = v({
261
- mutationFn: () => u.request(w(`/offboarding/${d.id}/merge`, { into: t == null ? void 0 : t.id })),
276
+ function le({ profile: s }) {
277
+ const d = C(), l = $(s.id), [t, u] = m(null), [o, c] = m(null), [h, i] = m(""), p = y({
278
+ mutationFn: () => d.request(
279
+ N(`/offboarding/${s.id}/merge`, { into: t == null ? void 0 : t.id, dry_run: !0 })
280
+ ).then((n) => n.data),
281
+ onSuccess: (n) => c(n.references),
282
+ onError: (n) => x.error(_(n, "Preview failed"))
283
+ }), g = y({
284
+ mutationFn: () => d.request(N(`/offboarding/${s.id}/merge`, { into: t == null ? void 0 : t.id })),
262
285
  onSuccess: () => {
263
- x.success("Accounts merged — the duplicate is suspended"), l(null), s(""), h();
286
+ x.success("Accounts merged — the duplicate is suspended"), c(null), i(""), l();
264
287
  },
265
- onError: (r) => x.error(y(r, "Merge failed"))
288
+ onError: (n) => x.error(_(n, "Merge failed"))
266
289
  });
267
290
  return /* @__PURE__ */ e(
268
- C,
291
+ f,
269
292
  {
270
293
  icon: /* @__PURE__ */ e(U, { className: "h-4 w-4" }),
271
294
  title: "Merge into another account",
272
295
  hint: "For duplicate or legacy twins: every reference moves to the survivor, then this account is suspended",
273
296
  tone: "danger",
274
297
  testId: "merge",
275
- children: /* @__PURE__ */ o("div", { className: "space-y-3", children: [
276
- /* @__PURE__ */ o("div", { className: "flex flex-wrap items-center gap-2.5", children: [
298
+ children: /* @__PURE__ */ a("div", { className: "space-y-3", children: [
299
+ /* @__PURE__ */ a("div", { className: "flex flex-wrap items-center gap-2.5", children: [
277
300
  /* @__PURE__ */ e(
278
- D,
301
+ A,
279
302
  {
280
- excludeId: d.id,
303
+ excludeId: s.id,
281
304
  value: t,
282
305
  label: "Survivor account (keeps everything)…",
283
- onPick: (r) => {
284
- p(r), l(null);
306
+ onPick: (n) => {
307
+ u(n), c(null);
285
308
  }
286
309
  }
287
310
  ),
@@ -289,31 +312,31 @@ function ne({ profile: d }) {
289
312
  "button",
290
313
  {
291
314
  type: "button",
292
- disabled: !t || c.isPending,
293
- onClick: () => c.mutate(),
315
+ disabled: !t || p.isPending,
316
+ onClick: () => p.mutate(),
294
317
  className: "h-8 rounded-md border border-slate-200 px-3 text-[12.5px] font-medium text-slate-600 hover:bg-slate-50 disabled:opacity-50 dark:border-border dark:text-slate-300 dark:hover:bg-muted",
295
- children: c.isPending ? "Scanning…" : "Preview references"
318
+ children: p.isPending ? "Scanning…" : "Preview references"
296
319
  }
297
320
  )
298
321
  ] }),
299
- i && /* @__PURE__ */ o(E, { children: [
300
- /* @__PURE__ */ e("div", { className: "max-h-[220px] overflow-y-auto rounded-md border border-slate-100 dark:border-border/60", children: Object.keys(i).length === 0 ? /* @__PURE__ */ e("p", { className: "px-3 py-2 text-[12px] text-slate-400", children: "Nothing references this account." }) : Object.entries(i).map(([r, f]) => /* @__PURE__ */ o(
322
+ o && /* @__PURE__ */ a(I, { children: [
323
+ /* @__PURE__ */ e("div", { className: "max-h-[220px] overflow-y-auto rounded-md border border-slate-100 dark:border-border/60", children: Object.keys(o).length === 0 ? /* @__PURE__ */ e("p", { className: "px-3 py-2 text-[12px] text-slate-400", children: "Nothing references this account." }) : Object.entries(o).map(([n, k]) => /* @__PURE__ */ a(
301
324
  "div",
302
325
  {
303
326
  className: "flex items-center justify-between border-b border-slate-50 px-3 py-1 text-[12px] last:border-0 dark:border-border/40",
304
327
  children: [
305
- /* @__PURE__ */ e("span", { className: "font-mono text-slate-600 dark:text-slate-300", children: r }),
306
- /* @__PURE__ */ e("span", { className: "font-semibold tabular-nums text-slate-700 dark:text-slate-200", children: f })
328
+ /* @__PURE__ */ e("span", { className: "font-mono text-slate-600 dark:text-slate-300", children: n }),
329
+ /* @__PURE__ */ e("span", { className: "font-semibold tabular-nums text-slate-700 dark:text-slate-200", children: k })
307
330
  ]
308
331
  },
309
- r
332
+ n
310
333
  )) }),
311
- /* @__PURE__ */ o("div", { className: "flex flex-wrap items-center gap-2", children: [
334
+ /* @__PURE__ */ a("div", { className: "flex flex-wrap items-center gap-2", children: [
312
335
  /* @__PURE__ */ e(
313
336
  "input",
314
337
  {
315
- value: a,
316
- onChange: (r) => s(r.target.value),
338
+ value: h,
339
+ onChange: (n) => i(n.target.value),
317
340
  placeholder: "Type MERGE to confirm",
318
341
  "aria-label": "Type MERGE to confirm",
319
342
  className: "h-8 w-[180px] rounded-md border border-amber-300 bg-white px-2.5 text-[12.5px] dark:border-amber-500/40 dark:bg-background"
@@ -323,10 +346,10 @@ function ne({ profile: d }) {
323
346
  "button",
324
347
  {
325
348
  type: "button",
326
- disabled: a !== "MERGE" || b.isPending,
327
- onClick: () => b.mutate(),
349
+ disabled: h !== "MERGE" || g.isPending,
350
+ onClick: () => g.mutate(),
328
351
  className: "h-8 rounded-md bg-amber-500 px-4 text-[12.5px] font-semibold text-white hover:bg-amber-600 disabled:opacity-50",
329
- children: b.isPending ? "Merging…" : `Merge into ${(t == null ? void 0 : t.name) ?? ""}`
352
+ children: g.isPending ? "Merging…" : `Merge into ${(t == null ? void 0 : t.name) ?? ""}`
330
353
  }
331
354
  )
332
355
  ] })
@@ -336,8 +359,9 @@ function ne({ profile: d }) {
336
359
  );
337
360
  }
338
361
  export {
339
- te as ForceReloadCard,
340
- ne as MergeCard,
341
- re as OffboardingCard,
342
- D as UserPicker
362
+ oe as ForceReloadCard,
363
+ le as MergeCard,
364
+ de as OffboardingCard,
365
+ ie as SignOutEverywhereCard,
366
+ A as UserPicker
343
367
  };