@burdenoff/microfe-subscriberbot 2026.827.1 → 2026.829.1

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 (56) hide show
  1. package/dist/subscriberbot/admin/AdminDashboardPage.d.ts.map +1 -1
  2. package/dist/subscriberbot/admin/AdminDashboardPage.js +80 -83
  3. package/dist/subscriberbot/admin/AdminDashboardPage.js.map +1 -1
  4. package/dist/subscriberbot/hooks/index.d.ts +1 -0
  5. package/dist/subscriberbot/hooks/index.d.ts.map +1 -1
  6. package/dist/subscriberbot/hooks/index.js +1 -0
  7. package/dist/subscriberbot/hooks/useTr.d.ts +17 -0
  8. package/dist/subscriberbot/hooks/useTr.d.ts.map +1 -0
  9. package/dist/subscriberbot/hooks/useTr.js +14 -0
  10. package/dist/subscriberbot/hooks/useTr.js.map +1 -0
  11. package/dist/subscriberbot/pages/AssetVaultPage.d.ts.map +1 -1
  12. package/dist/subscriberbot/pages/AssetVaultPage.js +111 -109
  13. package/dist/subscriberbot/pages/AssetVaultPage.js.map +1 -1
  14. package/dist/subscriberbot/pages/DashboardPage.d.ts.map +1 -1
  15. package/dist/subscriberbot/pages/DashboardPage.js +113 -105
  16. package/dist/subscriberbot/pages/DashboardPage.js.map +1 -1
  17. package/dist/subscriberbot/pages/InboxPage.d.ts.map +1 -1
  18. package/dist/subscriberbot/pages/InboxPage.js +404 -369
  19. package/dist/subscriberbot/pages/InboxPage.js.map +1 -1
  20. package/dist/subscriberbot/pages/InsightsPage.d.ts.map +1 -1
  21. package/dist/subscriberbot/pages/InsightsPage.js +94 -93
  22. package/dist/subscriberbot/pages/InsightsPage.js.map +1 -1
  23. package/dist/subscriberbot/pages/InvoicesPage.d.ts.map +1 -1
  24. package/dist/subscriberbot/pages/InvoicesPage.js +360 -366
  25. package/dist/subscriberbot/pages/InvoicesPage.js.map +1 -1
  26. package/dist/subscriberbot/pages/WorkflowsPage.d.ts.map +1 -1
  27. package/dist/subscriberbot/pages/WorkflowsPage.js +209 -193
  28. package/dist/subscriberbot/pages/WorkflowsPage.js.map +1 -1
  29. package/dist/subscriberbot/pages/agents/AgentDetailPage.d.ts.map +1 -1
  30. package/dist/subscriberbot/pages/agents/AgentDetailPage.js +268 -236
  31. package/dist/subscriberbot/pages/agents/AgentDetailPage.js.map +1 -1
  32. package/dist/subscriberbot/pages/agents/AgentNewPage.d.ts.map +1 -1
  33. package/dist/subscriberbot/pages/agents/AgentNewPage.js +96 -76
  34. package/dist/subscriberbot/pages/agents/AgentNewPage.js.map +1 -1
  35. package/dist/subscriberbot/pages/agents/AgentsListPage.d.ts.map +1 -1
  36. package/dist/subscriberbot/pages/agents/AgentsListPage.js +145 -161
  37. package/dist/subscriberbot/pages/agents/AgentsListPage.js.map +1 -1
  38. package/dist/subscriberbot/pages/providers/ProviderDetailPage.d.ts.map +1 -1
  39. package/dist/subscriberbot/pages/providers/ProviderDetailPage.js +514 -441
  40. package/dist/subscriberbot/pages/providers/ProviderDetailPage.js.map +1 -1
  41. package/dist/subscriberbot/pages/providers/ProviderNewPage.d.ts.map +1 -1
  42. package/dist/subscriberbot/pages/providers/ProviderNewPage.js +167 -129
  43. package/dist/subscriberbot/pages/providers/ProviderNewPage.js.map +1 -1
  44. package/dist/subscriberbot/pages/providers/ProvidersListPage.d.ts.map +1 -1
  45. package/dist/subscriberbot/pages/providers/ProvidersListPage.js +171 -218
  46. package/dist/subscriberbot/pages/providers/ProvidersListPage.js.map +1 -1
  47. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.d.ts.map +1 -1
  48. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js +340 -279
  49. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js.map +1 -1
  50. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.d.ts.map +1 -1
  51. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js +185 -166
  52. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js.map +1 -1
  53. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.d.ts.map +1 -1
  54. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js +153 -182
  55. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js.map +1 -1
  56. package/package.json +1 -1
@@ -7,62 +7,79 @@ import { EmptyState as s } from "../components/EmptyState.js";
7
7
  import { Modal as c } from "../components/Modal.js";
8
8
  import { ErrorView as l, LoadingView as u, Section as d } from "../components/StateViews.js";
9
9
  import { MiniProgress as f } from "../components/viz.js";
10
- import { useChannels as p, useCreateChannel as m, useInboxMessages as h, useIngestMessage as g, useMarkMessageRead as ee, useVerifyChannel as _ } from "../hooks/useSubscriberBotApi.js";
11
- import { useState as v } from "react";
12
- import { AlertTriangle as y, BadgeCheck as b, Bell as x, ChevronRight as S, Hash as C, Inbox as w, Mail as T, MailOpen as E, MessageSquare as D, MessagesSquare as O, MousePointerClick as k, Phone as A, Plus as j, Radio as M, Send as N, ShieldAlert as P, Sparkles as F, Webhook as I } from "lucide-react";
13
- import { Fragment as L, jsx as R, jsxs as z } from "react/jsx-runtime";
14
- import { GlassCard as B, PagePurpose as V } from "@burdenoff/fe-libs/ui";
10
+ import { useChannels as p, useCreateChannel as m, useInboxMessages as h, useIngestMessage as g, useMarkMessageRead as _, useVerifyChannel as v } from "../hooks/useSubscriberBotApi.js";
11
+ import { useTr as y } from "../hooks/useTr.js";
12
+ import { useState as b } from "react";
13
+ import { AlertTriangle as x, BadgeCheck as S, Bell as C, ChevronRight as w, Hash as T, Inbox as E, Mail as D, MailOpen as O, MessageSquare as k, MessagesSquare as A, MousePointerClick as j, Phone as M, Plus as N, Radio as P, Send as F, ShieldAlert as I, Sparkles as L, Webhook as R } from "lucide-react";
14
+ import { Fragment as z, jsx as B, jsxs as V } from "react/jsx-runtime";
15
+ import { GlassCard as H, PagePurpose as U } from "@burdenoff/fe-libs/ui";
15
16
  //#region src/subscriberbot/pages/InboxPage.tsx
16
- var H = 25, U = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", W = "mb-1 block text-xs font-medium text-text-secondary", G = [
17
+ var W = 25, G = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", K = "mb-1 block text-xs font-medium text-text-secondary", q = [
18
+ "BILLING",
19
+ "RENEWAL",
20
+ "REQUIRED_ACTION",
21
+ "SECURITY_ALERT",
22
+ "PRODUCT_UPDATE",
23
+ "MARKETING",
24
+ "OTHER"
25
+ ], J = [
26
+ "EMAIL",
27
+ "SMS",
28
+ "SLACK",
29
+ "DISCORD",
30
+ "WHATSAPP",
31
+ "PUSH",
32
+ "WEBHOOK"
33
+ ], Y = {
34
+ BILLING: "inbox.categories.billing",
35
+ RENEWAL: "inbox.categories.renewal",
36
+ REQUIRED_ACTION: "inbox.categories.requiredAction",
37
+ SECURITY_ALERT: "inbox.categories.securityAlert",
38
+ PRODUCT_UPDATE: "inbox.categories.productUpdate",
39
+ MARKETING: "inbox.categories.marketing",
40
+ OTHER: "inbox.categories.other"
41
+ }, ee = [
17
42
  {
18
43
  value: "",
19
- label: "All"
44
+ key: "inbox.categories.all",
45
+ fallback: "All"
20
46
  },
21
47
  {
22
48
  value: "BILLING",
23
- label: "Billing"
49
+ key: Y.BILLING,
50
+ fallback: "Billing"
24
51
  },
25
52
  {
26
53
  value: "RENEWAL",
27
- label: "Renewals"
54
+ key: Y.RENEWAL,
55
+ fallback: "Renewals"
28
56
  },
29
57
  {
30
58
  value: "REQUIRED_ACTION",
31
- label: "Required actions"
59
+ key: Y.REQUIRED_ACTION,
60
+ fallback: "Required actions"
32
61
  },
33
62
  {
34
63
  value: "SECURITY_ALERT",
35
- label: "Security"
64
+ key: Y.SECURITY_ALERT,
65
+ fallback: "Security"
36
66
  },
37
67
  {
38
68
  value: "PRODUCT_UPDATE",
39
- label: "Product updates"
69
+ key: Y.PRODUCT_UPDATE,
70
+ fallback: "Product updates"
40
71
  },
41
72
  {
42
73
  value: "MARKETING",
43
- label: "Marketing"
74
+ key: Y.MARKETING,
75
+ fallback: "Marketing"
44
76
  },
45
77
  {
46
78
  value: "OTHER",
47
- label: "Other"
79
+ key: Y.OTHER,
80
+ fallback: "Other"
48
81
  }
49
- ], K = [
50
- "BILLING",
51
- "RENEWAL",
52
- "REQUIRED_ACTION",
53
- "SECURITY_ALERT",
54
- "PRODUCT_UPDATE",
55
- "MARKETING",
56
- "OTHER"
57
- ], q = [
58
- "EMAIL",
59
- "SMS",
60
- "SLACK",
61
- "DISCORD",
62
- "WHATSAPP",
63
- "PUSH",
64
- "WEBHOOK"
65
- ], J = {
82
+ ], te = {
66
83
  BILLING: "bg-[var(--color-accent-soft)] text-text-primary",
67
84
  RENEWAL: "bg-status-success-bg-subtle text-status-success-text",
68
85
  REQUIRED_ACTION: "bg-status-warning-bg-subtle text-status-warning-text",
@@ -70,341 +87,354 @@ var H = 25, U = "w-full rounded-lg border border-border-subtle bg-bg-surface px-
70
87
  PRODUCT_UPDATE: "bg-[var(--color-accent-soft)] text-text-primary",
71
88
  MARKETING: "bg-bg-sunken text-text-secondary",
72
89
  OTHER: "bg-bg-sunken text-text-secondary"
73
- }, Y = {
74
- EMAIL: T,
75
- SMS: D,
76
- SLACK: C,
77
- DISCORD: O,
78
- WHATSAPP: A,
79
- PUSH: x,
80
- WEBHOOK: I
90
+ }, X = {
91
+ EMAIL: D,
92
+ SMS: k,
93
+ SLACK: T,
94
+ DISCORD: A,
95
+ WHATSAPP: M,
96
+ PUSH: C,
97
+ WEBHOOK: R
81
98
  };
82
- function X({ category: e }) {
83
- return /* @__PURE__ */ R("span", {
84
- className: t("inline-flex items-center rounded-full px-2 py-0.5 text-[11px] font-medium", J[e]),
99
+ function Z({ category: e }) {
100
+ return /* @__PURE__ */ B("span", {
101
+ className: t("inline-flex items-center rounded-full px-2 py-0.5 text-[11px] font-medium", te[e]),
85
102
  children: i(e)
86
103
  });
87
104
  }
88
- function Z({ className: e }) {
89
- return /* @__PURE__ */ z("span", {
90
- title: "Action required",
105
+ function Q({ className: e }) {
106
+ let n = y();
107
+ return /* @__PURE__ */ V("span", {
108
+ title: n("inbox.message.actionRequiredTitle", "Action required"),
91
109
  className: t("inline-flex items-center gap-1 rounded-full bg-status-warning-bg-subtle px-2 py-0.5 text-[10px] font-medium text-status-warning-text", e),
92
- children: [/* @__PURE__ */ R(y, { className: "h-3 w-3" }), " Action"]
110
+ children: [
111
+ /* @__PURE__ */ B(x, { className: "h-3 w-3" }),
112
+ " ",
113
+ n("inbox.message.actionFlag", "Action")
114
+ ]
93
115
  });
94
116
  }
95
- function Q({ onClose: e }) {
96
- let t = m(), [n, r] = v("EMAIL"), [i, a] = v(""), [o, s] = v(""), [l, u] = v(!0), [d, f] = v(null);
97
- return /* @__PURE__ */ R(c, {
98
- title: "Add channel",
117
+ function ne({ onClose: e }) {
118
+ let t = y(), n = m(), [r, a] = b("EMAIL"), [o, s] = b(""), [l, u] = b(""), [d, f] = b(!0), [p, h] = b(null);
119
+ return /* @__PURE__ */ B(c, {
120
+ title: t("inbox.addChannelModal.title", "Add channel"),
99
121
  onClose: e,
100
122
  maxWidthClassName: "max-w-xl",
101
- children: /* @__PURE__ */ z("form", {
102
- onSubmit: (r) => {
103
- if (r.preventDefault(), f(null), !i.trim()) {
104
- f("An address is required.");
123
+ children: /* @__PURE__ */ V("form", {
124
+ onSubmit: (i) => {
125
+ if (i.preventDefault(), h(null), !o.trim()) {
126
+ h(t("inbox.addChannelModal.addressRequired", "An address is required."));
105
127
  return;
106
128
  }
107
- t.mutate({
108
- type: n,
109
- address: i.trim(),
110
- ingestEnabled: l,
111
- ...o.trim() ? { label: o.trim() } : {}
129
+ n.mutate({
130
+ type: r,
131
+ address: o.trim(),
132
+ ingestEnabled: d,
133
+ ...l.trim() ? { label: l.trim() } : {}
112
134
  }, {
113
135
  onSuccess: () => e(),
114
- onError: (e) => f(e instanceof Error ? e.message : "Could not add channel.")
136
+ onError: (e) => h(e instanceof Error ? e.message : t("inbox.addChannelModal.error", "Could not add channel."))
115
137
  });
116
138
  },
117
139
  className: "space-y-4",
118
140
  children: [
119
- d && /* @__PURE__ */ R("div", {
141
+ p && /* @__PURE__ */ B("div", {
120
142
  className: "rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle px-4 py-2 text-sm text-status-error-text",
121
- children: d
143
+ children: p
122
144
  }),
123
- /* @__PURE__ */ z("div", {
145
+ /* @__PURE__ */ V("div", {
124
146
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
125
- children: [/* @__PURE__ */ z("div", { children: [/* @__PURE__ */ R("label", {
147
+ children: [/* @__PURE__ */ V("div", { children: [/* @__PURE__ */ B("label", {
126
148
  htmlFor: "ch-type",
127
- className: W,
128
- children: "Type"
129
- }), /* @__PURE__ */ R("select", {
149
+ className: K,
150
+ children: t("inbox.addChannelModal.typeLabel", "Type")
151
+ }), /* @__PURE__ */ B("select", {
130
152
  id: "ch-type",
131
- value: n,
132
- onChange: (e) => r(e.target.value),
133
- className: U,
134
- children: q.map((e) => /* @__PURE__ */ R("option", {
153
+ value: r,
154
+ onChange: (e) => a(e.target.value),
155
+ className: G,
156
+ children: J.map((e) => /* @__PURE__ */ B("option", {
135
157
  value: e,
136
- children: e.replace(/_/g, " ")
158
+ children: i(e)
137
159
  }, e))
138
- })] }), /* @__PURE__ */ z("div", { children: [/* @__PURE__ */ R("label", {
160
+ })] }), /* @__PURE__ */ V("div", { children: [/* @__PURE__ */ B("label", {
139
161
  htmlFor: "ch-label",
140
- className: W,
141
- children: "Label"
142
- }), /* @__PURE__ */ R("input", {
162
+ className: K,
163
+ children: t("inbox.addChannelModal.labelLabel", "Label")
164
+ }), /* @__PURE__ */ B("input", {
143
165
  id: "ch-label",
144
166
  type: "text",
145
- value: o,
146
- onChange: (e) => s(e.target.value),
147
- placeholder: "e.g. Billing inbox",
148
- className: U
167
+ value: l,
168
+ onChange: (e) => u(e.target.value),
169
+ placeholder: t("inbox.addChannelModal.labelPlaceholder", "e.g. Billing inbox"),
170
+ className: G
149
171
  })] })]
150
172
  }),
151
- /* @__PURE__ */ z("div", { children: [/* @__PURE__ */ z("label", {
173
+ /* @__PURE__ */ V("div", { children: [/* @__PURE__ */ V("label", {
152
174
  htmlFor: "ch-address",
153
- className: W,
154
- children: ["Address ", /* @__PURE__ */ R("span", {
155
- className: "text-status-error-text",
156
- children: "*"
157
- })]
158
- }), /* @__PURE__ */ R("input", {
175
+ className: K,
176
+ children: [
177
+ t("inbox.addChannelModal.addressLabel", "Address"),
178
+ " ",
179
+ /* @__PURE__ */ B("span", {
180
+ className: "text-status-error-text",
181
+ children: "*"
182
+ })
183
+ ]
184
+ }), /* @__PURE__ */ B("input", {
159
185
  id: "ch-address",
160
186
  type: "text",
161
- value: i,
162
- onChange: (e) => a(e.target.value),
163
- placeholder: "e.g. billing@acme.com, +1…, a webhook URL",
164
- className: U,
187
+ value: o,
188
+ onChange: (e) => s(e.target.value),
189
+ placeholder: t("inbox.addChannelModal.addressPlaceholder", "e.g. billing@acme.com, +1…, a webhook URL"),
190
+ className: G,
165
191
  required: !0
166
192
  })] }),
167
- /* @__PURE__ */ z("label", {
193
+ /* @__PURE__ */ V("label", {
168
194
  className: "flex items-center gap-2 text-sm text-text-primary",
169
- children: [/* @__PURE__ */ R("input", {
195
+ children: [/* @__PURE__ */ B("input", {
170
196
  type: "checkbox",
171
- checked: l,
172
- onChange: (e) => u(e.target.checked),
197
+ checked: d,
198
+ onChange: (e) => f(e.target.checked),
173
199
  className: "size-4 rounded border-border-subtle"
174
- }), "Ingest messages from this channel"]
200
+ }), t("inbox.addChannelModal.ingestLabel", "Ingest messages from this channel")]
175
201
  }),
176
- /* @__PURE__ */ z("div", {
202
+ /* @__PURE__ */ V("div", {
177
203
  className: "flex justify-end gap-3",
178
- children: [/* @__PURE__ */ R("button", {
204
+ children: [/* @__PURE__ */ B("button", {
179
205
  type: "button",
180
206
  onClick: e,
181
207
  className: "rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
182
- children: "Cancel"
183
- }), /* @__PURE__ */ R("button", {
208
+ children: t("inbox.addChannelModal.cancel", "Cancel")
209
+ }), /* @__PURE__ */ B("button", {
184
210
  type: "submit",
185
- disabled: t.isPending,
211
+ disabled: n.isPending,
186
212
  className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50",
187
- children: t.isPending ? "Adding…" : "Add channel"
213
+ children: n.isPending ? t("inbox.addChannelModal.adding", "Adding…") : t("inbox.addChannelModal.submit", "Add channel")
188
214
  })]
189
215
  })
190
216
  ]
191
217
  })
192
218
  });
193
219
  }
194
- function te({ channel: e, onClose: t }) {
195
- let n = g(), [r, i] = v(""), [a, o] = v(""), [s, l] = v("OTHER"), [u, d] = v(!1), [f, p] = v(null);
196
- return /* @__PURE__ */ R(c, {
197
- title: "Log test message",
198
- description: `Simulate an ingested message from ${e.label || e.address}.`,
220
+ function re({ channel: e, onClose: t }) {
221
+ let n = y(), r = g(), [a, o] = b(""), [s, l] = b(""), [u, d] = b("OTHER"), [f, p] = b(!1), [m, h] = b(null);
222
+ return /* @__PURE__ */ B(c, {
223
+ title: n("inbox.logMessageModal.title", "Log test message"),
224
+ description: n("inbox.logMessageModal.description", "Simulate an ingested message from {channel}.", { channel: e.label || e.address }),
199
225
  onClose: t,
200
- children: /* @__PURE__ */ z("form", {
226
+ children: /* @__PURE__ */ V("form", {
201
227
  onSubmit: (i) => {
202
- i.preventDefault(), p(null), n.mutate({
228
+ i.preventDefault(), h(null), r.mutate({
203
229
  channelId: e.id,
204
230
  receivedAt: (/* @__PURE__ */ new Date()).toISOString(),
205
- category: s,
206
- actionRequired: u,
207
- ...r.trim() ? { subject: r.trim() } : {},
208
- ...a.trim() ? { preview: a.trim() } : {}
231
+ category: u,
232
+ actionRequired: f,
233
+ ...a.trim() ? { subject: a.trim() } : {},
234
+ ...s.trim() ? { preview: s.trim() } : {}
209
235
  }, {
210
236
  onSuccess: () => t(),
211
- onError: (e) => p(e instanceof Error ? e.message : "Could not log the message.")
237
+ onError: (e) => h(e instanceof Error ? e.message : n("inbox.logMessageModal.error", "Could not log the message."))
212
238
  });
213
239
  },
214
240
  className: "space-y-4",
215
241
  children: [
216
- f && /* @__PURE__ */ R("div", {
242
+ m && /* @__PURE__ */ B("div", {
217
243
  className: "rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle px-4 py-2 text-sm text-status-error-text",
218
- children: f
244
+ children: m
219
245
  }),
220
- /* @__PURE__ */ z("div", { children: [/* @__PURE__ */ R("label", {
246
+ /* @__PURE__ */ V("div", { children: [/* @__PURE__ */ B("label", {
221
247
  htmlFor: "msg-subject",
222
- className: W,
223
- children: "Subject"
224
- }), /* @__PURE__ */ R("input", {
248
+ className: K,
249
+ children: n("inbox.logMessageModal.subjectLabel", "Subject")
250
+ }), /* @__PURE__ */ B("input", {
225
251
  id: "msg-subject",
226
252
  type: "text",
227
- value: r,
228
- onChange: (e) => i(e.target.value),
229
- placeholder: "e.g. Your plan renews in 3 days",
230
- className: U
253
+ value: a,
254
+ onChange: (e) => o(e.target.value),
255
+ placeholder: n("inbox.logMessageModal.subjectPlaceholder", "e.g. Your plan renews in 3 days"),
256
+ className: G
231
257
  })] }),
232
- /* @__PURE__ */ z("div", { children: [/* @__PURE__ */ R("label", {
258
+ /* @__PURE__ */ V("div", { children: [/* @__PURE__ */ B("label", {
233
259
  htmlFor: "msg-preview",
234
- className: W,
235
- children: "Preview"
236
- }), /* @__PURE__ */ R("textarea", {
260
+ className: K,
261
+ children: n("inbox.logMessageModal.previewLabel", "Preview")
262
+ }), /* @__PURE__ */ B("textarea", {
237
263
  id: "msg-preview",
238
- value: a,
239
- onChange: (e) => o(e.target.value),
264
+ value: s,
265
+ onChange: (e) => l(e.target.value),
240
266
  rows: 2,
241
- className: U
267
+ className: G
242
268
  })] }),
243
- /* @__PURE__ */ z("div", { children: [/* @__PURE__ */ R("label", {
269
+ /* @__PURE__ */ V("div", { children: [/* @__PURE__ */ B("label", {
244
270
  htmlFor: "msg-category",
245
- className: W,
246
- children: "Category"
247
- }), /* @__PURE__ */ R("select", {
271
+ className: K,
272
+ children: n("inbox.logMessageModal.categoryLabel", "Category")
273
+ }), /* @__PURE__ */ B("select", {
248
274
  id: "msg-category",
249
- value: s,
250
- onChange: (e) => l(e.target.value),
251
- className: U,
252
- children: K.map((e) => /* @__PURE__ */ R("option", {
275
+ value: u,
276
+ onChange: (e) => d(e.target.value),
277
+ className: G,
278
+ children: q.map((e) => /* @__PURE__ */ B("option", {
253
279
  value: e,
254
- children: e.replace(/_/g, " ")
280
+ children: n(Y[e], i(e))
255
281
  }, e))
256
282
  })] }),
257
- /* @__PURE__ */ z("label", {
283
+ /* @__PURE__ */ V("label", {
258
284
  className: "flex items-center gap-2 text-sm text-text-primary",
259
- children: [/* @__PURE__ */ R("input", {
285
+ children: [/* @__PURE__ */ B("input", {
260
286
  type: "checkbox",
261
- checked: u,
262
- onChange: (e) => d(e.target.checked),
287
+ checked: f,
288
+ onChange: (e) => p(e.target.checked),
263
289
  className: "size-4 rounded border-border-subtle"
264
- }), "Requires action"]
290
+ }), n("inbox.logMessageModal.actionRequired", "Requires action")]
265
291
  }),
266
- /* @__PURE__ */ z("div", {
292
+ /* @__PURE__ */ V("div", {
267
293
  className: "flex justify-end gap-3",
268
- children: [/* @__PURE__ */ R("button", {
294
+ children: [/* @__PURE__ */ B("button", {
269
295
  type: "button",
270
296
  onClick: t,
271
297
  className: "rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
272
- children: "Cancel"
273
- }), /* @__PURE__ */ R("button", {
298
+ children: n("inbox.logMessageModal.cancel", "Cancel")
299
+ }), /* @__PURE__ */ B("button", {
274
300
  type: "submit",
275
- disabled: n.isPending,
301
+ disabled: r.isPending,
276
302
  className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50",
277
- children: n.isPending ? "Logging…" : "Log message"
303
+ children: r.isPending ? n("inbox.logMessageModal.logging", "Logging…") : n("inbox.logMessageModal.submit", "Log message")
278
304
  })]
279
305
  })
280
306
  ]
281
307
  })
282
308
  });
283
309
  }
284
- function ne({ channel: e, onVerify: t, verifying: n, onLog: r }) {
285
- let a = Y[e.type] ?? M, s = e.status === "VERIFIED";
286
- return /* @__PURE__ */ z(B, {
310
+ function ie({ channel: e, onVerify: t, verifying: n, onLog: r }) {
311
+ let a = y(), s = X[e.type] ?? P, c = e.status === "VERIFIED";
312
+ return /* @__PURE__ */ V(H, {
287
313
  treatment: "metric",
288
314
  className: "flex flex-col p-4",
289
315
  children: [
290
- /* @__PURE__ */ z("div", {
316
+ /* @__PURE__ */ V("div", {
291
317
  className: "flex items-start justify-between gap-2",
292
- children: [/* @__PURE__ */ z("div", {
318
+ children: [/* @__PURE__ */ V("div", {
293
319
  className: "flex min-w-0 items-center gap-2.5",
294
- children: [/* @__PURE__ */ R("span", {
320
+ children: [/* @__PURE__ */ B("span", {
295
321
  className: "flex size-9 shrink-0 items-center justify-center rounded-lg bg-[var(--color-accent-soft)] text-text-primary",
296
- children: /* @__PURE__ */ R(a, { className: "h-4 w-4" })
297
- }), /* @__PURE__ */ z("div", {
322
+ children: /* @__PURE__ */ B(s, { className: "h-4 w-4" })
323
+ }), /* @__PURE__ */ V("div", {
298
324
  className: "min-w-0",
299
- children: [/* @__PURE__ */ R("p", {
325
+ children: [/* @__PURE__ */ B("p", {
300
326
  className: "truncate text-sm font-semibold text-text-primary",
301
327
  children: i(e.type)
302
- }), e.label && /* @__PURE__ */ R("p", {
328
+ }), e.label && /* @__PURE__ */ B("p", {
303
329
  className: "truncate text-xs text-text-secondary",
304
330
  children: e.label
305
331
  })]
306
332
  })]
307
- }), /* @__PURE__ */ R(o, { status: e.status })]
333
+ }), /* @__PURE__ */ B(o, { status: e.status })]
308
334
  }),
309
- /* @__PURE__ */ z("div", {
335
+ /* @__PURE__ */ V("div", {
310
336
  className: "mt-3 border-t border-border-subtle pt-3",
311
- children: [/* @__PURE__ */ R("p", {
337
+ children: [/* @__PURE__ */ B("p", {
312
338
  className: "text-[11px] uppercase tracking-wide text-text-secondary",
313
- children: e.ingestEnabled ? "Ingesting from" : "Ingest paused"
314
- }), /* @__PURE__ */ R("p", {
339
+ children: e.ingestEnabled ? a("inbox.channels.ingestingFrom", "Ingesting from") : a("inbox.channels.ingestPaused", "Ingest paused")
340
+ }), /* @__PURE__ */ B("p", {
315
341
  className: "mt-0.5 truncate text-sm text-text-primary",
316
342
  title: e.address,
317
343
  children: e.address
318
344
  })]
319
345
  }),
320
- /* @__PURE__ */ z("div", {
346
+ /* @__PURE__ */ V("div", {
321
347
  className: "mt-auto flex flex-wrap items-center gap-2 pt-3",
322
348
  children: [
323
- e.status === "PENDING" && /* @__PURE__ */ z("button", {
349
+ e.status === "PENDING" && /* @__PURE__ */ V("button", {
324
350
  type: "button",
325
351
  disabled: n,
326
352
  onClick: () => t(e.id),
327
353
  className: "inline-flex items-center gap-1 rounded-lg bg-action-primary-bg px-3 py-1.5 text-xs font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50",
328
- children: [/* @__PURE__ */ R(b, { className: "h-3.5 w-3.5" }), " Verify"]
354
+ children: [
355
+ /* @__PURE__ */ B(S, { className: "h-3.5 w-3.5" }),
356
+ " ",
357
+ a("inbox.channels.verify", "Verify")
358
+ ]
329
359
  }),
330
- s && e.ingestEnabled && /* @__PURE__ */ z("button", {
360
+ c && e.ingestEnabled && /* @__PURE__ */ V("button", {
331
361
  type: "button",
332
362
  onClick: () => r(e),
333
363
  className: "inline-flex items-center gap-1 rounded-lg border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken",
334
- children: [/* @__PURE__ */ R(N, { className: "h-3.5 w-3.5" }), " Log test message"]
364
+ children: [
365
+ /* @__PURE__ */ B(F, { className: "h-3.5 w-3.5" }),
366
+ " ",
367
+ a("inbox.channels.logTestMessage", "Log test message")
368
+ ]
335
369
  }),
336
- e.status === "DISABLED" && /* @__PURE__ */ R("span", {
370
+ e.status === "DISABLED" && /* @__PURE__ */ B("span", {
337
371
  className: "text-xs text-text-secondary",
338
- children: "Channel disabled"
372
+ children: a("inbox.channels.disabled", "Channel disabled")
339
373
  })
340
374
  ]
341
375
  })
342
376
  ]
343
377
  });
344
378
  }
345
- function re() {
346
- let { data: e, isLoading: t, isError: n, refetch: r } = p(), i = _(), [a, o] = v(!1), [c, f] = v(null), m = e ?? [], h = m.filter((e) => e.status === "VERIFIED").length, g = m.filter((e) => e.status === "PENDING").length;
347
- return /* @__PURE__ */ z(d, {
348
- title: "Ingest channels",
349
- description: "The sources the Universal Inbox pulls subscription communication from",
350
- action: /* @__PURE__ */ z("button", {
379
+ function ae() {
380
+ let e = y(), { data: t, isLoading: n, isError: r, refetch: i } = p(), a = v(), [o, c] = b(!1), [f, m] = b(null), h = t ?? [], g = h.filter((e) => e.status === "VERIFIED").length, _ = h.filter((e) => e.status === "PENDING").length;
381
+ return /* @__PURE__ */ V(d, {
382
+ title: e("inbox.channels.title", "Ingest channels"),
383
+ description: e("inbox.channels.description", "The sources the Universal Inbox pulls subscription communication from"),
384
+ action: /* @__PURE__ */ V("button", {
351
385
  type: "button",
352
- onClick: () => o(!0),
386
+ onClick: () => c(!0),
353
387
  className: "inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-3 py-1.5 text-xs font-medium text-action-primary-text hover:opacity-90",
354
- children: [/* @__PURE__ */ R(j, { className: "h-3.5 w-3.5" }), " Add channel"]
388
+ children: [
389
+ /* @__PURE__ */ B(N, { className: "h-3.5 w-3.5" }),
390
+ " ",
391
+ e("inbox.channels.add", "Add channel")
392
+ ]
355
393
  }),
356
394
  children: [
357
- t ? /* @__PURE__ */ R(u, { label: "Loading channels…" }) : n ? /* @__PURE__ */ R(l, {
358
- message: "Could not load channels.",
359
- onRetry: () => void r()
360
- }) : m.length === 0 ? /* @__PURE__ */ R(s, {
395
+ n ? /* @__PURE__ */ B(u, { label: e("inbox.channels.loading", "Loading channels…") }) : r ? /* @__PURE__ */ B(l, {
396
+ message: e("inbox.channels.error", "Could not load channels."),
397
+ onRetry: () => void i()
398
+ }) : h.length === 0 ? /* @__PURE__ */ B(s, {
361
399
  illustration: "empty-data",
362
- icon: /* @__PURE__ */ R(M, { className: "h-12 w-12" }),
363
- title: "No channels yet",
364
- description: "Add an email, SMS, Slack or webhook channel to start ingesting subscription communication."
365
- }) : /* @__PURE__ */ z(L, { children: [(h > 0 || g > 0) && /* @__PURE__ */ z("div", {
400
+ icon: /* @__PURE__ */ B(P, { className: "h-12 w-12" }),
401
+ title: e("inbox.channels.emptyTitle", "No channels yet"),
402
+ description: e("inbox.channels.emptyDescription", "Add an email, SMS, Slack or webhook channel to start ingesting subscription communication.")
403
+ }) : /* @__PURE__ */ V(z, { children: [(g > 0 || _ > 0) && /* @__PURE__ */ V("div", {
366
404
  className: "mb-3 flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-text-secondary",
367
- children: [/* @__PURE__ */ z("span", {
405
+ children: [/* @__PURE__ */ V("span", {
368
406
  className: "inline-flex items-center gap-1.5",
369
- children: [
370
- /* @__PURE__ */ R("span", {
371
- className: "size-1.5 rounded-full bg-status-success-text",
372
- "aria-hidden": !0
373
- }),
374
- h,
375
- " verified"
376
- ]
377
- }), g > 0 && /* @__PURE__ */ z("span", {
407
+ children: [/* @__PURE__ */ B("span", {
408
+ className: "size-1.5 rounded-full bg-status-success-text",
409
+ "aria-hidden": !0
410
+ }), e("inbox.channels.verified", "{{count}} verified", { count: g })]
411
+ }), _ > 0 && /* @__PURE__ */ V("span", {
378
412
  className: "inline-flex items-center gap-1.5",
379
- children: [
380
- /* @__PURE__ */ R("span", {
381
- className: "size-1.5 rounded-full bg-status-warning-text",
382
- "aria-hidden": !0
383
- }),
384
- g,
385
- " pending verification"
386
- ]
413
+ children: [/* @__PURE__ */ B("span", {
414
+ className: "size-1.5 rounded-full bg-status-warning-text",
415
+ "aria-hidden": !0
416
+ }), e("inbox.channels.pending", "{{count}} pending verification", { count: _ })]
387
417
  })]
388
- }), /* @__PURE__ */ R("div", {
418
+ }), /* @__PURE__ */ B("div", {
389
419
  className: "grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",
390
- children: m.map((e) => /* @__PURE__ */ R(ne, {
420
+ children: h.map((e) => /* @__PURE__ */ B(ie, {
391
421
  channel: e,
392
- verifying: i.isPending,
393
- onVerify: (e) => i.mutate(e),
394
- onLog: (e) => f(e)
422
+ verifying: a.isPending,
423
+ onVerify: (e) => a.mutate(e),
424
+ onLog: (e) => m(e)
395
425
  }, e.id))
396
426
  })] }),
397
- a && /* @__PURE__ */ R(Q, { onClose: () => o(!1) }),
398
- c && /* @__PURE__ */ R(te, {
399
- channel: c,
400
- onClose: () => f(null)
427
+ o && /* @__PURE__ */ B(ne, { onClose: () => c(!1) }),
428
+ f && /* @__PURE__ */ B(re, {
429
+ channel: f,
430
+ onClose: () => m(null)
401
431
  })
402
432
  ]
403
433
  });
404
434
  }
405
- function ie({ message: e, active: n, onSelect: r, onMarkRead: i, markPending: o, onViewRelationship: s }) {
406
- let c = !e.isRead;
407
- return /* @__PURE__ */ z("div", {
435
+ function oe({ message: e, active: n, onSelect: r, onMarkRead: i, markPending: o, onViewRelationship: s }) {
436
+ let c = y(), l = !e.isRead;
437
+ return /* @__PURE__ */ V("div", {
408
438
  role: "button",
409
439
  tabIndex: 0,
410
440
  "aria-pressed": n,
@@ -412,61 +442,61 @@ function ie({ message: e, active: n, onSelect: r, onMarkRead: i, markPending: o,
412
442
  onKeyDown: (e) => {
413
443
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), r());
414
444
  },
415
- className: t("relative flex cursor-pointer items-start gap-3 p-4 transition-colors", "focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] focus-visible:ring-inset", n ? "bg-bg-sunken" : c ? "bg-accent-wash" : "hover:bg-bg-sunken/60"),
445
+ className: t("relative flex cursor-pointer items-start gap-3 p-4 transition-colors", "focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] focus-visible:ring-inset", n ? "bg-bg-sunken" : l ? "bg-accent-wash" : "hover:bg-bg-sunken/60"),
416
446
  children: [
417
- c && /* @__PURE__ */ R("span", {
447
+ l && /* @__PURE__ */ B("span", {
418
448
  "aria-hidden": !0,
419
449
  className: "absolute inset-y-0 left-0 w-0.5 bg-text-link"
420
450
  }),
421
- /* @__PURE__ */ R("span", {
451
+ /* @__PURE__ */ B("span", {
422
452
  className: "mt-0.5 shrink-0 text-text-secondary",
423
- children: c ? /* @__PURE__ */ R(T, { className: "h-4 w-4 text-text-link" }) : /* @__PURE__ */ R(E, { className: "h-4 w-4" })
453
+ children: l ? /* @__PURE__ */ B(D, { className: "h-4 w-4 text-text-link" }) : /* @__PURE__ */ B(O, { className: "h-4 w-4" })
424
454
  }),
425
- /* @__PURE__ */ z("div", {
455
+ /* @__PURE__ */ V("div", {
426
456
  className: "min-w-0 flex-1",
427
457
  children: [
428
- /* @__PURE__ */ z("div", {
458
+ /* @__PURE__ */ V("div", {
429
459
  className: "flex items-center gap-2",
430
460
  children: [
431
- c && /* @__PURE__ */ R("span", {
432
- "aria-label": "Unread",
461
+ l && /* @__PURE__ */ B("span", {
462
+ "aria-label": c("inbox.message.unreadAria", "Unread"),
433
463
  className: "size-1.5 shrink-0 rounded-full bg-text-link"
434
464
  }),
435
- /* @__PURE__ */ R("p", {
436
- className: t("min-w-0 flex-1 truncate text-sm", c ? "font-semibold text-text-primary" : "font-normal text-text-primary"),
437
- children: e.subject || "(no subject)"
465
+ /* @__PURE__ */ B("p", {
466
+ className: t("min-w-0 flex-1 truncate text-sm", l ? "font-semibold text-text-primary" : "font-normal text-text-primary"),
467
+ children: e.subject || c("inbox.message.noSubject", "(no subject)")
438
468
  }),
439
- /* @__PURE__ */ R("span", {
469
+ /* @__PURE__ */ B("span", {
440
470
  className: "shrink-0 text-xs tabular-nums text-text-secondary",
441
471
  children: a(e.receivedAt)
442
472
  })
443
473
  ]
444
474
  }),
445
- e.preview && /* @__PURE__ */ R("p", {
475
+ e.preview && /* @__PURE__ */ B("p", {
446
476
  className: "mt-0.5 line-clamp-2 text-xs text-text-secondary",
447
477
  children: e.preview
448
478
  }),
449
- /* @__PURE__ */ z("div", {
479
+ /* @__PURE__ */ V("div", {
450
480
  className: "mt-1.5 flex flex-wrap items-center gap-2",
451
481
  children: [
452
- /* @__PURE__ */ R(X, { category: e.category }),
453
- e.actionRequired && /* @__PURE__ */ R(Z, {}),
454
- s && /* @__PURE__ */ R("button", {
482
+ /* @__PURE__ */ B(Z, { category: e.category }),
483
+ e.actionRequired && /* @__PURE__ */ B(Q, {}),
484
+ s && /* @__PURE__ */ B("button", {
455
485
  type: "button",
456
486
  onClick: (e) => {
457
487
  e.stopPropagation(), s();
458
488
  },
459
489
  className: "text-xs font-medium text-text-link hover:underline",
460
- children: "View relationship"
490
+ children: c("inbox.message.viewRelationship", "View relationship")
461
491
  }),
462
- c && /* @__PURE__ */ R("button", {
492
+ l && /* @__PURE__ */ B("button", {
463
493
  type: "button",
464
494
  disabled: o,
465
495
  onClick: (e) => {
466
496
  e.stopPropagation(), i();
467
497
  },
468
498
  className: "ml-auto shrink-0 rounded-lg border border-border-subtle px-2.5 py-1 text-xs font-medium text-text-primary hover:bg-bg-sunken disabled:opacity-50",
469
- children: "Mark read"
499
+ children: c("inbox.message.markRead", "Mark read")
470
500
  })
471
501
  ]
472
502
  })
@@ -475,105 +505,114 @@ function ie({ message: e, active: n, onSelect: r, onMarkRead: i, markPending: o,
475
505
  ]
476
506
  });
477
507
  }
478
- function ae({ message: e, channel: t, onMarkRead: n, markPending: i, onViewRelationship: a }) {
479
- if (!e) return /* @__PURE__ */ z(B, {
508
+ function se({ message: e, channel: t, onMarkRead: n, markPending: i, onViewRelationship: a }) {
509
+ let o = y();
510
+ if (!e) return /* @__PURE__ */ V(H, {
480
511
  treatment: "metric",
481
512
  className: "flex min-h-[20rem] flex-col items-center justify-center p-8 text-center",
482
513
  children: [
483
- /* @__PURE__ */ R(k, { className: "h-10 w-10 text-text-secondary" }),
484
- /* @__PURE__ */ R("p", {
514
+ /* @__PURE__ */ B(j, { className: "h-10 w-10 text-text-secondary" }),
515
+ /* @__PURE__ */ B("p", {
485
516
  className: "mt-3 text-sm font-medium text-text-primary",
486
- children: "Select a message"
517
+ children: o("inbox.readingPane.selectTitle", "Select a message")
487
518
  }),
488
- /* @__PURE__ */ R("p", {
519
+ /* @__PURE__ */ B("p", {
489
520
  className: "mt-1 max-w-[16rem] text-xs text-text-secondary",
490
- children: "Pick any message from the list to read the full details here."
521
+ children: o("inbox.readingPane.selectDescription", "Pick any message from the list to read the full details here.")
491
522
  })
492
523
  ]
493
524
  });
494
- let o = t ? Y[t.type] ?? M : M, s = e.categoryConfidence == null ? null : Math.round(Math.max(0, Math.min(1, e.categoryConfidence)) * 100);
495
- return /* @__PURE__ */ z(B, {
525
+ let s = t ? X[t.type] ?? P : P, c = e.categoryConfidence == null ? null : Math.round(Math.max(0, Math.min(1, e.categoryConfidence)) * 100);
526
+ return /* @__PURE__ */ V(H, {
496
527
  treatment: "metric",
497
528
  className: "flex flex-col p-5",
498
529
  children: [
499
- /* @__PURE__ */ z("div", {
530
+ /* @__PURE__ */ V("div", {
500
531
  className: "flex items-start justify-between gap-3",
501
- children: [/* @__PURE__ */ R("h3", {
532
+ children: [/* @__PURE__ */ B("h3", {
502
533
  className: "text-base font-semibold text-text-primary",
503
- children: e.subject || "(no subject)"
504
- }), !e.isRead && /* @__PURE__ */ R("button", {
534
+ children: e.subject || o("inbox.message.noSubject", "(no subject)")
535
+ }), !e.isRead && /* @__PURE__ */ B("button", {
505
536
  type: "button",
506
537
  disabled: i,
507
538
  onClick: n,
508
539
  className: "shrink-0 rounded-lg border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken disabled:opacity-50",
509
- children: "Mark read"
540
+ children: o("inbox.message.markRead", "Mark read")
510
541
  })]
511
542
  }),
512
- t && /* @__PURE__ */ z("div", {
543
+ t && /* @__PURE__ */ V("div", {
513
544
  className: "mt-2 flex items-center gap-2 text-sm",
514
- children: [/* @__PURE__ */ R(o, { className: "h-4 w-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ R("span", {
545
+ children: [/* @__PURE__ */ B(s, { className: "h-4 w-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ B("span", {
515
546
  className: "truncate text-text-secondary",
516
547
  title: t.address,
517
548
  children: t.address
518
549
  })]
519
550
  }),
520
- /* @__PURE__ */ z("div", {
551
+ /* @__PURE__ */ V("div", {
521
552
  className: "mt-3 flex flex-wrap items-center gap-2",
522
553
  children: [
523
- /* @__PURE__ */ R(X, { category: e.category }),
524
- e.actionRequired && /* @__PURE__ */ R(Z, {}),
525
- /* @__PURE__ */ R("span", {
554
+ /* @__PURE__ */ B(Z, { category: e.category }),
555
+ e.actionRequired && /* @__PURE__ */ B(Q, {}),
556
+ /* @__PURE__ */ B("span", {
526
557
  className: "text-xs text-text-secondary",
527
558
  children: r(e.receivedAt)
528
559
  })
529
560
  ]
530
561
  }),
531
- s != null && /* @__PURE__ */ z("div", {
562
+ c != null && /* @__PURE__ */ V("div", {
532
563
  className: "mt-4 rounded-lg border border-border-subtle bg-bg-surface p-3",
533
- children: [/* @__PURE__ */ z("div", {
564
+ children: [/* @__PURE__ */ V("div", {
534
565
  className: "flex items-center justify-between text-xs",
535
- children: [/* @__PURE__ */ z("span", {
566
+ children: [/* @__PURE__ */ V("span", {
536
567
  className: "inline-flex items-center gap-1.5 font-medium text-text-primary",
537
- children: [/* @__PURE__ */ R(F, { className: "h-3.5 w-3.5 text-text-link" }), " AI categorization"]
538
- }), /* @__PURE__ */ z("span", {
568
+ children: [
569
+ /* @__PURE__ */ B(L, { className: "h-3.5 w-3.5 text-text-link" }),
570
+ " ",
571
+ o("inbox.readingPane.aiCategorization", "AI categorization")
572
+ ]
573
+ }), /* @__PURE__ */ B("span", {
539
574
  className: "tabular-nums text-text-secondary",
540
- children: [s, "% confidence"]
575
+ children: o("inbox.readingPane.confidence", "{{pct}}% confidence", { pct: c })
541
576
  })]
542
- }), /* @__PURE__ */ R(f, {
543
- value: s,
577
+ }), /* @__PURE__ */ B(f, {
578
+ value: c,
544
579
  max: 100,
545
- tone: s >= 66 ? "positive" : s >= 33 ? "accent" : "warning",
580
+ tone: c >= 66 ? "positive" : c >= 33 ? "accent" : "warning",
546
581
  className: "mt-2"
547
582
  })]
548
583
  }),
549
- /* @__PURE__ */ R("div", {
584
+ /* @__PURE__ */ B("div", {
550
585
  className: "mt-4 border-t border-border-subtle pt-4",
551
- children: e.preview ? /* @__PURE__ */ R("p", {
586
+ children: e.preview ? /* @__PURE__ */ B("p", {
552
587
  className: "whitespace-pre-wrap text-sm leading-relaxed text-text-primary",
553
588
  children: e.preview
554
- }) : /* @__PURE__ */ R("p", {
589
+ }) : /* @__PURE__ */ B("p", {
555
590
  className: "text-sm italic text-text-secondary",
556
- children: "No preview available for this message."
591
+ children: o("inbox.readingPane.noPreview", "No preview available for this message.")
557
592
  })
558
593
  }),
559
- e.actionRequired && /* @__PURE__ */ z("div", {
594
+ e.actionRequired && /* @__PURE__ */ V("div", {
560
595
  className: "mt-4 flex items-start gap-2 rounded-lg border border-status-warning-text/30 bg-status-warning-bg-subtle p-3",
561
- children: [/* @__PURE__ */ R(P, { className: "mt-0.5 h-4 w-4 shrink-0 text-status-warning-text" }), /* @__PURE__ */ R("p", {
596
+ children: [/* @__PURE__ */ B(I, { className: "mt-0.5 h-4 w-4 shrink-0 text-status-warning-text" }), /* @__PURE__ */ B("p", {
562
597
  className: "text-xs text-status-warning-text",
563
- children: "This message needs your attention — review it before its provider deadline."
598
+ children: o("inbox.readingPane.attention", "This message needs your attention — review it before its provider deadline.")
564
599
  })]
565
600
  }),
566
- a && /* @__PURE__ */ z("button", {
601
+ a && /* @__PURE__ */ V("button", {
567
602
  type: "button",
568
603
  onClick: a,
569
604
  className: "mt-4 inline-flex items-center gap-1 self-start text-sm font-medium text-text-link hover:underline",
570
- children: ["View relationship ", /* @__PURE__ */ R(S, { className: "h-4 w-4" })]
605
+ children: [
606
+ o("inbox.message.viewRelationship", "View relationship"),
607
+ " ",
608
+ /* @__PURE__ */ B(w, { className: "h-4 w-4" })
609
+ ]
571
610
  })
572
611
  ]
573
612
  });
574
613
  }
575
614
  function $({ active: e, onClick: n, children: r, tone: i = "default" }) {
576
- return /* @__PURE__ */ R("button", {
615
+ return /* @__PURE__ */ B("button", {
577
616
  type: "button",
578
617
  onClick: n,
579
618
  "aria-pressed": e,
@@ -581,162 +620,158 @@ function $({ active: e, onClick: n, children: r, tone: i = "default" }) {
581
620
  children: r
582
621
  });
583
622
  }
584
- function oe() {
585
- let { navigateTo: r } = e(), [i, a] = v(0), [o, c] = v(""), [d, f] = v(!1), [m, g] = v(!1), [_, b] = v(null), { data: x, isLoading: S, isError: C, refetch: E, isFetching: D } = h({
586
- category: o || void 0,
587
- unreadOnly: d || void 0,
623
+ function ce() {
624
+ let r = y(), { navigateTo: i } = e(), [a, o] = b(0), [c, d] = b(""), [f, m] = b(!1), [g, v] = b(!1), [S, C] = b(null), { data: w, isLoading: T, isError: O, refetch: k, isFetching: A } = h({
625
+ category: c || void 0,
626
+ unreadOnly: f || void 0,
588
627
  pagination: {
589
- limit: H,
590
- offset: i * H
628
+ limit: W,
629
+ offset: a * W
591
630
  }
592
- }), { data: O } = p(), k = ee(), A = x?.items ?? [], j = x?.pageInfo.hasMore ?? !1, M = m ? A.filter((e) => e.actionRequired) : A, N = A.filter((e) => !e.isRead).length, P = A.filter((e) => e.actionRequired).length, F = new Map((O ?? []).map((e) => [e.id, e])), I = M.find((e) => e.id === _) ?? null, L = I ? F.get(I.channelId) : void 0, B = () => {
593
- a(0), b(null);
631
+ }), { data: j } = p(), M = _(), N = w?.items ?? [], P = w?.pageInfo.hasMore ?? !1, F = g ? N.filter((e) => e.actionRequired) : N, I = N.filter((e) => !e.isRead).length, L = N.filter((e) => e.actionRequired).length, R = new Map((j ?? []).map((e) => [e.id, e])), z = F.find((e) => e.id === S) ?? null, H = z ? R.get(z.channelId) : void 0, G = () => {
632
+ o(0), C(null);
594
633
  };
595
- return /* @__PURE__ */ z(n, {
596
- title: "Universal Inbox",
597
- description: "Every subscription communication, merged and categorized",
634
+ return /* @__PURE__ */ V(n, {
635
+ title: r("inbox.title", "Universal Inbox"),
636
+ description: r("inbox.description", "Every subscription communication, merged and categorized"),
598
637
  children: [
599
- /* @__PURE__ */ R(V, {
638
+ /* @__PURE__ */ B(U, {
600
639
  className: "mb-4",
601
- children: "Subscription communication is noisy and scattered. The Universal Inbox merges every channel a provider uses and uses AI to categorize each message so you never miss a renewal, required action or security notice."
640
+ children: r("inbox.purpose", "Subscription communication is noisy and scattered. The Universal Inbox merges every channel a provider uses and uses AI to categorize each message so you never miss a renewal, required action or security notice.")
602
641
  }),
603
- /* @__PURE__ */ R("div", {
642
+ /* @__PURE__ */ B("div", {
604
643
  className: "-mx-1 flex gap-2 overflow-x-auto px-1 pb-1",
605
- children: G.map((e) => /* @__PURE__ */ R("span", {
644
+ children: ee.map((e) => /* @__PURE__ */ B("span", {
606
645
  className: "shrink-0",
607
- children: /* @__PURE__ */ R($, {
608
- active: o === e.value,
646
+ children: /* @__PURE__ */ B($, {
647
+ active: c === e.value,
609
648
  onClick: () => {
610
- c(e.value), B();
649
+ d(e.value), G();
611
650
  },
612
- children: e.label
651
+ children: r(e.key, e.fallback)
613
652
  })
614
653
  }, e.value))
615
654
  }),
616
- /* @__PURE__ */ z("div", {
655
+ /* @__PURE__ */ V("div", {
617
656
  className: "mt-3 flex flex-wrap items-center gap-2",
618
657
  children: [
619
- /* @__PURE__ */ z($, {
620
- active: m,
658
+ /* @__PURE__ */ V($, {
659
+ active: g,
621
660
  tone: "warning",
622
661
  onClick: () => {
623
- g((e) => !e), b(null);
662
+ v((e) => !e), C(null);
624
663
  },
625
- children: [/* @__PURE__ */ R(y, { className: "h-3.5 w-3.5" }), " Action required"]
664
+ children: [
665
+ /* @__PURE__ */ B(x, { className: "h-3.5 w-3.5" }),
666
+ " ",
667
+ r("inbox.filters.actionRequired", "Action required")
668
+ ]
626
669
  }),
627
- /* @__PURE__ */ z($, {
628
- active: d,
670
+ /* @__PURE__ */ V($, {
671
+ active: f,
629
672
  onClick: () => {
630
- f((e) => !e), B();
673
+ m((e) => !e), G();
631
674
  },
632
- children: [/* @__PURE__ */ R(T, { className: "h-3.5 w-3.5" }), " Unread only"]
675
+ children: [
676
+ /* @__PURE__ */ B(D, { className: "h-3.5 w-3.5" }),
677
+ " ",
678
+ r("inbox.filters.unreadOnly", "Unread only")
679
+ ]
633
680
  }),
634
- !S && !C && A.length > 0 && /* @__PURE__ */ z("p", {
681
+ !T && !O && N.length > 0 && /* @__PURE__ */ V("p", {
635
682
  className: "ml-auto text-xs text-text-secondary",
636
683
  children: [
637
- /* @__PURE__ */ R("span", {
638
- className: "font-medium text-text-primary tabular-nums",
639
- children: N
640
- }),
641
- " unread",
684
+ r("inbox.filters.unreadCount", "{{count}} unread", { count: I }),
642
685
  " · ",
643
- /* @__PURE__ */ R("span", {
644
- className: "font-medium text-text-primary tabular-nums",
645
- children: P
646
- }),
647
- " need action",
648
- D ? " · refreshing…" : ""
686
+ r("inbox.filters.actionCount", "{{count}} need action", { count: L }),
687
+ A ? ` · ${r("inbox.filters.refreshing", "refreshing…")}` : ""
649
688
  ]
650
689
  })
651
690
  ]
652
691
  }),
653
- S ? /* @__PURE__ */ R(u, { label: "Loading inbox…" }) : C ? /* @__PURE__ */ R(l, {
654
- message: "Could not load the inbox.",
655
- onRetry: () => void E()
656
- }) : A.length === 0 ? /* @__PURE__ */ R("div", {
692
+ T ? /* @__PURE__ */ B(u, { label: r("inbox.loading", "Loading inbox…") }) : O ? /* @__PURE__ */ B(l, {
693
+ message: r("inbox.error", "Could not load the inbox."),
694
+ onRetry: () => void k()
695
+ }) : N.length === 0 ? /* @__PURE__ */ B("div", {
657
696
  className: "mt-6",
658
- children: /* @__PURE__ */ R(s, {
697
+ children: /* @__PURE__ */ B(s, {
659
698
  illustration: "empty-inbox",
660
- icon: /* @__PURE__ */ R(w, { className: "h-12 w-12" }),
661
- title: "Inbox is empty",
662
- description: d || o ? "No messages match these filters." : "Merged subscription communications will appear here once channels start ingesting."
699
+ icon: /* @__PURE__ */ B(E, { className: "h-12 w-12" }),
700
+ title: r("inbox.emptyTitle", "Inbox is empty"),
701
+ description: f || c ? r("inbox.emptyDescriptionFiltered", "No messages match these filters.") : r("inbox.emptyDescription", "Merged subscription communications will appear here once channels start ingesting.")
663
702
  })
664
- }) : /* @__PURE__ */ z("div", {
703
+ }) : /* @__PURE__ */ V("div", {
665
704
  className: "mt-5 grid grid-cols-1 gap-5 lg:grid-cols-[minmax(0,1fr)_380px]",
666
- children: [/* @__PURE__ */ z("div", {
705
+ children: [/* @__PURE__ */ V("div", {
667
706
  className: "min-w-0",
668
- children: [M.length === 0 ? /* @__PURE__ */ z("div", {
707
+ children: [F.length === 0 ? /* @__PURE__ */ V("div", {
669
708
  className: "rounded-xl border border-border-subtle bg-bg-surface p-8 text-center",
670
709
  children: [
671
- /* @__PURE__ */ R(y, { className: "mx-auto h-8 w-8 text-text-secondary" }),
672
- /* @__PURE__ */ R("p", {
710
+ /* @__PURE__ */ B(x, { className: "mx-auto h-8 w-8 text-text-secondary" }),
711
+ /* @__PURE__ */ B("p", {
673
712
  className: "mt-2 text-sm font-medium text-text-primary",
674
- children: "No action-required messages on this page"
713
+ children: r("inbox.noActionTitle", "No action-required messages on this page")
675
714
  }),
676
- /* @__PURE__ */ R("p", {
715
+ /* @__PURE__ */ B("p", {
677
716
  className: "mt-1 text-xs text-text-secondary",
678
- children: "Turn off the “Action required” lens or move to another page."
717
+ children: r("inbox.noActionDescription", "Turn off the “Action required” lens or move to another page.")
679
718
  })
680
719
  ]
681
- }) : /* @__PURE__ */ R("div", {
720
+ }) : /* @__PURE__ */ B("div", {
682
721
  className: "divide-y divide-border-subtle overflow-hidden rounded-xl border border-border-subtle bg-bg-surface",
683
- children: M.map((e) => /* @__PURE__ */ R(ie, {
722
+ children: F.map((e) => /* @__PURE__ */ B(oe, {
684
723
  message: e,
685
- active: e.id === _,
686
- onSelect: () => b(e.id),
687
- onMarkRead: () => k.mutate(e.id),
688
- markPending: k.isPending,
689
- onViewRelationship: e.relationshipId ? () => r(`/relationships/${e.relationshipId}`) : null
724
+ active: e.id === S,
725
+ onSelect: () => C(e.id),
726
+ onMarkRead: () => M.mutate(e.id),
727
+ markPending: M.isPending,
728
+ onViewRelationship: e.relationshipId ? () => i(`/relationships/${e.relationshipId}`) : null
690
729
  }, e.id))
691
- }), /* @__PURE__ */ z("div", {
730
+ }), /* @__PURE__ */ V("div", {
692
731
  className: "mt-4 flex items-center justify-between",
693
- children: [/* @__PURE__ */ z("p", {
732
+ children: [/* @__PURE__ */ V("p", {
694
733
  className: "text-xs text-text-secondary",
695
- children: [
696
- "Page ",
697
- i + 1,
698
- D ? " · refreshing…" : ""
699
- ]
700
- }), /* @__PURE__ */ z("div", {
734
+ children: [r("inbox.pagination.page", "Page {{page}}", { page: a + 1 }), A ? ` · ${r("inbox.filters.refreshing", "refreshing…")}` : ""]
735
+ }), /* @__PURE__ */ V("div", {
701
736
  className: "flex gap-2",
702
- children: [/* @__PURE__ */ R("button", {
737
+ children: [/* @__PURE__ */ B("button", {
703
738
  type: "button",
704
- disabled: i === 0,
739
+ disabled: a === 0,
705
740
  onClick: () => {
706
- a((e) => Math.max(0, e - 1)), b(null);
741
+ o((e) => Math.max(0, e - 1)), C(null);
707
742
  },
708
- className: t("rounded-lg border border-border-subtle px-3 py-1.5 text-xs font-medium", i === 0 ? "cursor-not-allowed text-text-secondary opacity-50" : "text-text-primary hover:bg-bg-sunken"),
709
- children: "Previous"
710
- }), /* @__PURE__ */ R("button", {
743
+ className: t("rounded-lg border border-border-subtle px-3 py-1.5 text-xs font-medium", a === 0 ? "cursor-not-allowed text-text-secondary opacity-50" : "text-text-primary hover:bg-bg-sunken"),
744
+ children: r("inbox.pagination.previous", "Previous")
745
+ }), /* @__PURE__ */ B("button", {
711
746
  type: "button",
712
- disabled: !j,
747
+ disabled: !P,
713
748
  onClick: () => {
714
- a((e) => e + 1), b(null);
749
+ o((e) => e + 1), C(null);
715
750
  },
716
- className: t("rounded-lg border border-border-subtle px-3 py-1.5 text-xs font-medium", j ? "text-text-primary hover:bg-bg-sunken" : "cursor-not-allowed text-text-secondary opacity-50"),
717
- children: "Next"
751
+ className: t("rounded-lg border border-border-subtle px-3 py-1.5 text-xs font-medium", P ? "text-text-primary hover:bg-bg-sunken" : "cursor-not-allowed text-text-secondary opacity-50"),
752
+ children: r("inbox.pagination.next", "Next")
718
753
  })]
719
754
  })]
720
755
  })]
721
- }), /* @__PURE__ */ R("aside", {
756
+ }), /* @__PURE__ */ B("aside", {
722
757
  className: "hidden lg:block",
723
- children: /* @__PURE__ */ R("div", {
758
+ children: /* @__PURE__ */ B("div", {
724
759
  className: "lg:sticky lg:top-4",
725
- children: /* @__PURE__ */ R(ae, {
726
- message: I,
727
- channel: L,
728
- onMarkRead: () => I && k.mutate(I.id),
729
- markPending: k.isPending,
730
- onViewRelationship: I?.relationshipId ? () => r(`/relationships/${I.relationshipId}`) : null
760
+ children: /* @__PURE__ */ B(se, {
761
+ message: z,
762
+ channel: H,
763
+ onMarkRead: () => z && M.mutate(z.id),
764
+ markPending: M.isPending,
765
+ onViewRelationship: z?.relationshipId ? () => i(`/relationships/${z.relationshipId}`) : null
731
766
  })
732
767
  })
733
768
  })]
734
769
  }),
735
- /* @__PURE__ */ R(re, {})
770
+ /* @__PURE__ */ B(ae, {})
736
771
  ]
737
772
  });
738
773
  }
739
774
  //#endregion
740
- export { oe as InboxPage };
775
+ export { ce as InboxPage };
741
776
 
742
777
  //# sourceMappingURL=InboxPage.js.map