@burdenoff/microfe-subscriberbot 2026.1113.1 → 2026.1123.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 (41) hide show
  1. package/dist/subscriberbot/components/InfiniteScrollSentinel.d.ts +24 -0
  2. package/dist/subscriberbot/components/InfiniteScrollSentinel.js +44 -0
  3. package/dist/subscriberbot/components/InfiniteScrollSentinel.js.map +1 -0
  4. package/dist/subscriberbot/components/index.d.ts +4 -0
  5. package/dist/subscriberbot/components/index.js +5 -2
  6. package/dist/subscriberbot/components/tags/EntityTagPicker.d.ts +25 -0
  7. package/dist/subscriberbot/components/tags/EntityTagPicker.js +205 -0
  8. package/dist/subscriberbot/components/tags/EntityTagPicker.js.map +1 -0
  9. package/dist/subscriberbot/components/tags/index.d.ts +2 -0
  10. package/dist/subscriberbot/components/tags/index.js +1 -0
  11. package/dist/subscriberbot/hooks/index.d.ts +2 -2
  12. package/dist/subscriberbot/hooks/useSubscriberBotApi.d.ts +53 -1
  13. package/dist/subscriberbot/hooks/useSubscriberBotApi.js +664 -373
  14. package/dist/subscriberbot/hooks/useSubscriberBotApi.js.map +1 -1
  15. package/dist/subscriberbot/pages/AssetVaultPage.js +192 -147
  16. package/dist/subscriberbot/pages/AssetVaultPage.js.map +1 -1
  17. package/dist/subscriberbot/pages/DashboardPage.js +9 -9
  18. package/dist/subscriberbot/pages/DashboardPage.js.map +1 -1
  19. package/dist/subscriberbot/pages/InboxPage.js +264 -281
  20. package/dist/subscriberbot/pages/InboxPage.js.map +1 -1
  21. package/dist/subscriberbot/pages/InsightsPage.js +8 -8
  22. package/dist/subscriberbot/pages/InvoicesPage.js +62 -78
  23. package/dist/subscriberbot/pages/InvoicesPage.js.map +1 -1
  24. package/dist/subscriberbot/pages/agents/AgentDetailPage.js +1 -1
  25. package/dist/subscriberbot/pages/agents/AgentsListPage.js +5 -5
  26. package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.js +81 -81
  27. package/dist/subscriberbot/pages/providers/ProviderDetailPage.js +326 -314
  28. package/dist/subscriberbot/pages/providers/ProviderDetailPage.js.map +1 -1
  29. package/dist/subscriberbot/pages/providers/ProviderInsights.js +17 -17
  30. package/dist/subscriberbot/pages/providers/ProviderNewPage.js +153 -140
  31. package/dist/subscriberbot/pages/providers/ProviderNewPage.js.map +1 -1
  32. package/dist/subscriberbot/pages/providers/ProvidersListPage.js +135 -146
  33. package/dist/subscriberbot/pages/providers/ProvidersListPage.js.map +1 -1
  34. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js +482 -437
  35. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js.map +1 -1
  36. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js +59 -46
  37. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js.map +1 -1
  38. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js +104 -111
  39. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js.map +1 -1
  40. package/dist/subscriberbot/types/index.d.ts +40 -1
  41. package/package.json +12 -9
@@ -7,18 +7,19 @@ import { Modal as a } from "../../components/Modal.js";
7
7
  import { ErrorView as o, LoadingView as s, Section as c } from "../../components/StateViews.js";
8
8
  import { ProviderAlternatives as l, ProviderPaidPriceHistory as u } from "./ProviderInsights.js";
9
9
  import "../../components/index.js";
10
- import { Gauge as d, MiniProgress as f, Sparkline as p } from "../../components/viz.js";
11
- import { useSubscriberBot as m } from "../../context/SubscriberBotContext.js";
12
- import { useArchiveProvider as h, useBenchmarkDataPoints as g, useCreatePlan as _, useProvider as v, useUpdateProvider as y } from "../../hooks/useSubscriberBotApi.js";
13
- import { useTr as b } from "../../hooks/useTr.js";
14
- import { cn as x } from "../../utils/cn.js";
15
- import { useMemo as S, useState as C } from "react";
16
- import { Archive as w, ArrowLeft as T, Building2 as E, Check as D, Globe as O, Layers as k, LineChart as A, Pencil as j, Plus as M, ShieldCheck as N, Sparkles as P, Tag as F, TrendingDown as I } from "lucide-react";
10
+ import { useSubscriberBot as d } from "../../context/SubscriberBotContext.js";
11
+ import { EntityTagPicker as f } from "../../components/tags/EntityTagPicker.js";
12
+ import { Gauge as p, MiniProgress as m, Sparkline as h } from "../../components/viz.js";
13
+ import { useArchiveProvider as g, useBenchmarkDataPoints as _, useCreatePlan as v, useProvider as y, useUpdateProvider as b } from "../../hooks/useSubscriberBotApi.js";
14
+ import { useTr as x } from "../../hooks/useTr.js";
15
+ import { cn as S } from "../../utils/cn.js";
16
+ import { useMemo as C, useState as w } from "react";
17
+ import { Archive as T, ArrowLeft as E, Building2 as D, Check as O, Globe as k, Layers as A, LineChart as j, Pencil as M, Plus as N, ShieldCheck as P, Sparkles as F, Tag as I, TrendingDown as L } from "lucide-react";
17
18
  import { useParams as ee } from "react-router";
18
- import { Fragment as L, jsx as R, jsxs as z } from "react/jsx-runtime";
19
- import { GlassCard as B } from "@burdenoff/fe-libs/ui";
19
+ import { Fragment as R, jsx as z, jsxs as B } from "react/jsx-runtime";
20
+ import { GlassCard as V } from "@burdenoff/fe-libs/ui";
20
21
  // src/subscriberbot/pages/providers/ProviderDetailPage.tsx
21
- var V = "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)]", H = "mb-1 block text-xs font-medium text-text-secondary", U = [
22
+ var H = "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)]", U = "mb-1 block text-xs font-medium text-text-secondary", W = [
22
23
  "SAAS",
23
24
  "AI_SERVICE",
24
25
  "STREAMING",
@@ -35,7 +36,7 @@ var V = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 t
35
36
  "LICENSE",
36
37
  "CONTRACT",
37
38
  "OTHER"
38
- ], W = {
39
+ ], G = {
39
40
  SAAS: "providers.categories.saas",
40
41
  AI_SERVICE: "providers.categories.aiService",
41
42
  STREAMING: "providers.categories.streaming",
@@ -52,12 +53,12 @@ var V = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 t
52
53
  LICENSE: "providers.categories.license",
53
54
  CONTRACT: "providers.categories.contract",
54
55
  OTHER: "providers.categories.other"
55
- }, G = [
56
+ }, K = [
56
57
  "UNVERIFIED",
57
58
  "VERIFIED",
58
59
  "CLAIMED",
59
60
  "DEPRECATED"
60
- ], K = [
61
+ ], q = [
61
62
  "MONTHLY",
62
63
  "YEARLY",
63
64
  "QUARTERLY",
@@ -67,7 +68,7 @@ var V = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 t
67
68
  "LIFETIME",
68
69
  "FREE"
69
70
  ];
70
- function q(e, t) {
71
+ function J(e, t) {
71
72
  return e >= 70 ? {
72
73
  label: t("providers.detail.healthy", "Healthy"),
73
74
  cls: "bg-status-success-bg-subtle text-status-success-text"
@@ -79,7 +80,7 @@ function q(e, t) {
79
80
  cls: "bg-status-error-bg-subtle text-status-error-text"
80
81
  };
81
82
  }
82
- function J(e, t) {
83
+ function Y(e, t) {
83
84
  return e >= 67 ? {
84
85
  label: t("providers.detail.churnHigh", "High"),
85
86
  chip: "bg-status-error-bg-subtle text-status-error-text",
@@ -94,203 +95,207 @@ function J(e, t) {
94
95
  tone: "positive"
95
96
  };
96
97
  }
97
- function Y({ provider: n, onClose: r }) {
98
- let { formatEnumLabel: i } = e(), o = b(), s = y(), [c, l] = C(n.name), [u, d] = C(n.category), [f, p] = C(n.status), [m, h] = C(n.description ?? ""), [g, _] = C(n.industry ?? ""), [v, x] = C(n.region ?? ""), [S, w] = C(n.language ?? ""), [T, E] = C(n.websiteUrl ?? ""), [D, O] = C(n.churnRiskScore == null ? "" : String(n.churnRiskScore)), [k, A] = C(n.vendorHealthScore == null ? "" : String(n.vendorHealthScore)), [j, M] = C(n.tags.join(", ")), [N, P, F, I] = t();
99
- return /* @__PURE__ */ R(a, {
98
+ function te({ provider: n, onClose: r }) {
99
+ let { formatEnumLabel: i } = e(), o = x(), s = b(), [c, l] = w(n.name), [u, d] = w(n.category), [p, m] = w(n.status), [h, g] = w(n.description ?? ""), [_, v] = w(n.industry ?? ""), [y, S] = w(n.region ?? ""), [C, T] = w(n.language ?? ""), [E, D] = w(n.websiteUrl ?? ""), [O, k] = w(n.churnRiskScore == null ? "" : String(n.churnRiskScore)), [A, j] = w(n.vendorHealthScore == null ? "" : String(n.vendorHealthScore)), [M, N] = w(n.tags.join(", ")), [P, F, I, L] = t();
100
+ return /* @__PURE__ */ z(a, {
100
101
  title: o("providers.detail.editModal.title", "Edit provider"),
101
102
  onClose: r,
102
103
  maxWidthClassName: "max-w-2xl",
103
- children: /* @__PURE__ */ z("form", {
104
+ children: /* @__PURE__ */ B("form", {
104
105
  onSubmit: (e) => {
105
- if (e.preventDefault(), P(null), !c.trim()) {
106
- P(o("providers.new.nameRequired", "A provider name is required."), "prov-edit-name");
106
+ if (e.preventDefault(), F(null), !c.trim()) {
107
+ F(o("providers.new.nameRequired", "A provider name is required."), "prov-edit-name");
107
108
  return;
108
109
  }
109
- let t = j.split(",").map((e) => e.trim()).filter(Boolean), i = {
110
+ let t = M.split(",").map((e) => e.trim()).filter(Boolean), i = {
110
111
  name: c.trim(),
111
112
  category: u,
112
- status: f,
113
- description: m.trim(),
113
+ status: p,
114
+ description: h.trim(),
114
115
  tags: t,
115
- ...g.trim() ? { industry: g.trim() } : {},
116
- ...v.trim() ? { region: v.trim() } : {},
117
- ...S.trim() ? { language: S.trim() } : {},
118
- ...T.trim() ? { websiteUrl: T.trim() } : {},
119
- ...D.trim() ? { churnRiskScore: Number(D) } : {},
120
- ...k.trim() ? { vendorHealthScore: Number(k) } : {}
116
+ ..._.trim() ? { industry: _.trim() } : {},
117
+ ...y.trim() ? { region: y.trim() } : {},
118
+ ...C.trim() ? { language: C.trim() } : {},
119
+ ...E.trim() ? { websiteUrl: E.trim() } : {},
120
+ ...O.trim() ? { churnRiskScore: Number(O) } : {},
121
+ ...A.trim() ? { vendorHealthScore: Number(A) } : {}
121
122
  };
122
123
  s.mutate({
123
124
  id: n.id,
124
125
  input: i
125
126
  }, {
126
127
  onSuccess: () => r(),
127
- onError: (e) => P(e instanceof Error ? e.message : o("providers.detail.editModal.error", "Could not update provider."))
128
+ onError: (e) => F(e instanceof Error ? e.message : o("providers.detail.editModal.error", "Could not update provider."))
128
129
  });
129
130
  },
130
131
  className: "space-y-4",
131
132
  children: [
132
- N && /* @__PURE__ */ R("div", {
133
- id: I,
133
+ P && /* @__PURE__ */ z("div", {
134
+ id: L,
134
135
  tabIndex: -1,
135
136
  role: "alert",
136
137
  className: "rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle px-4 py-2 text-sm text-status-error-text",
137
- children: N
138
+ children: P
138
139
  }),
139
- /* @__PURE__ */ z("div", { children: [/* @__PURE__ */ z("label", {
140
+ /* @__PURE__ */ B("div", { children: [/* @__PURE__ */ B("label", {
140
141
  htmlFor: "prov-edit-name",
141
- className: H,
142
+ className: U,
142
143
  children: [
143
144
  o("providers.detail.editModal.nameLabel", "Name"),
144
145
  " ",
145
- /* @__PURE__ */ R("span", {
146
+ /* @__PURE__ */ z("span", {
146
147
  className: "text-status-error-text",
147
148
  children: "*"
148
149
  })
149
150
  ]
150
- }), /* @__PURE__ */ R("input", {
151
- ...F("prov-edit-name"),
151
+ }), /* @__PURE__ */ z("input", {
152
+ ...I("prov-edit-name"),
152
153
  id: "prov-edit-name",
153
154
  type: "text",
154
155
  value: c,
155
156
  onChange: (e) => l(e.target.value),
156
- className: V,
157
+ className: H,
157
158
  required: !0
158
159
  })] }),
159
- /* @__PURE__ */ z("div", {
160
+ /* @__PURE__ */ B("div", {
160
161
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
161
- children: [/* @__PURE__ */ z("div", { children: [/* @__PURE__ */ R("label", {
162
+ children: [/* @__PURE__ */ B("div", { children: [/* @__PURE__ */ z("label", {
162
163
  htmlFor: "prov-edit-category",
163
- className: H,
164
+ className: U,
164
165
  children: o("providers.detail.editModal.categoryLabel", "Category")
165
- }), /* @__PURE__ */ R("select", {
166
- ...F("prov-edit-category"),
166
+ }), /* @__PURE__ */ z("select", {
167
+ ...I("prov-edit-category"),
167
168
  id: "prov-edit-category",
168
169
  value: u,
169
170
  onChange: (e) => d(e.target.value),
170
- className: V,
171
- children: U.map((e) => /* @__PURE__ */ R("option", {
171
+ className: H,
172
+ children: W.map((e) => /* @__PURE__ */ z("option", {
172
173
  value: e,
173
- children: o(W[e], i(e))
174
+ children: o(G[e], i(e))
174
175
  }, e))
175
- })] }), /* @__PURE__ */ z("div", { children: [/* @__PURE__ */ R("label", {
176
+ })] }), /* @__PURE__ */ B("div", { children: [/* @__PURE__ */ z("label", {
176
177
  htmlFor: "prov-edit-status",
177
- className: H,
178
+ className: U,
178
179
  children: o("providers.detail.editModal.statusLabel", "Status")
179
- }), /* @__PURE__ */ R("select", {
180
- ...F("prov-edit-status"),
180
+ }), /* @__PURE__ */ z("select", {
181
+ ...I("prov-edit-status"),
181
182
  id: "prov-edit-status",
182
- value: f,
183
- onChange: (e) => p(e.target.value),
184
- className: V,
185
- children: G.map((e) => /* @__PURE__ */ R("option", {
183
+ value: p,
184
+ onChange: (e) => m(e.target.value),
185
+ className: H,
186
+ children: K.map((e) => /* @__PURE__ */ z("option", {
186
187
  value: e,
187
188
  children: i(e)
188
189
  }, e))
189
190
  })] })]
190
191
  }),
191
- /* @__PURE__ */ z("div", {
192
+ /* @__PURE__ */ B("div", {
192
193
  className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
193
194
  children: [
194
- /* @__PURE__ */ z("div", { children: [/* @__PURE__ */ R("label", {
195
+ /* @__PURE__ */ B("div", { children: [/* @__PURE__ */ z("label", {
195
196
  htmlFor: "prov-edit-industry",
196
- className: H,
197
+ className: U,
197
198
  children: o("providers.detail.editModal.industryLabel", "Industry")
198
- }), /* @__PURE__ */ R("input", {
199
- ...F("prov-edit-industry"),
199
+ }), /* @__PURE__ */ z("input", {
200
+ ...I("prov-edit-industry"),
200
201
  id: "prov-edit-industry",
201
202
  type: "text",
202
- value: g,
203
- onChange: (e) => _(e.target.value),
204
- className: V
203
+ value: _,
204
+ onChange: (e) => v(e.target.value),
205
+ className: H
205
206
  })] }),
206
- /* @__PURE__ */ z("div", { children: [/* @__PURE__ */ R("label", {
207
+ /* @__PURE__ */ B("div", { children: [/* @__PURE__ */ z("label", {
207
208
  htmlFor: "prov-edit-region",
208
- className: H,
209
+ className: U,
209
210
  children: o("providers.detail.editModal.regionLabel", "Region")
210
- }), /* @__PURE__ */ R("input", {
211
- ...F("prov-edit-region"),
211
+ }), /* @__PURE__ */ z("input", {
212
+ ...I("prov-edit-region"),
212
213
  id: "prov-edit-region",
213
214
  type: "text",
214
- value: v,
215
- onChange: (e) => x(e.target.value),
216
- className: V
215
+ value: y,
216
+ onChange: (e) => S(e.target.value),
217
+ className: H
217
218
  })] }),
218
- /* @__PURE__ */ z("div", { children: [/* @__PURE__ */ R("label", {
219
+ /* @__PURE__ */ B("div", { children: [/* @__PURE__ */ z("label", {
219
220
  htmlFor: "prov-edit-language",
220
- className: H,
221
+ className: U,
221
222
  children: o("providers.detail.editModal.languageLabel", "Language")
222
- }), /* @__PURE__ */ R("input", {
223
- ...F("prov-edit-language"),
223
+ }), /* @__PURE__ */ z("input", {
224
+ ...I("prov-edit-language"),
224
225
  id: "prov-edit-language",
225
226
  type: "text",
226
- value: S,
227
- onChange: (e) => w(e.target.value),
228
- className: V
227
+ value: C,
228
+ onChange: (e) => T(e.target.value),
229
+ className: H
229
230
  })] })
230
231
  ]
231
232
  }),
232
- /* @__PURE__ */ z("div", { children: [/* @__PURE__ */ R("label", {
233
+ /* @__PURE__ */ B("div", { children: [/* @__PURE__ */ z("label", {
233
234
  htmlFor: "prov-edit-website",
234
- className: H,
235
+ className: U,
235
236
  children: o("providers.detail.editModal.websiteLabel", "Website")
236
- }), /* @__PURE__ */ R("input", {
237
- ...F("prov-edit-website"),
237
+ }), /* @__PURE__ */ z("input", {
238
+ ...I("prov-edit-website"),
238
239
  id: "prov-edit-website",
239
240
  type: "url",
240
- value: T,
241
- onChange: (e) => E(e.target.value),
241
+ value: E,
242
+ onChange: (e) => D(e.target.value),
242
243
  placeholder: o("providers.detail.editModal.websitePlaceholder", "https://…"),
243
- className: V
244
+ className: H
244
245
  })] }),
245
- /* @__PURE__ */ z("div", { children: [/* @__PURE__ */ R("label", {
246
+ /* @__PURE__ */ B("div", { children: [/* @__PURE__ */ z("label", {
246
247
  htmlFor: "prov-edit-desc",
247
- className: H,
248
+ className: U,
248
249
  children: o("providers.detail.editModal.descriptionLabel", "Description")
249
- }), /* @__PURE__ */ R("textarea", {
250
- ...F("prov-edit-desc"),
250
+ }), /* @__PURE__ */ z("textarea", {
251
+ ...I("prov-edit-desc"),
251
252
  id: "prov-edit-desc",
252
- value: m,
253
- onChange: (e) => h(e.target.value),
253
+ value: h,
254
+ onChange: (e) => g(e.target.value),
254
255
  rows: 3,
255
- className: V
256
+ className: H
256
257
  })] }),
257
- /* @__PURE__ */ z("div", {
258
+ /* @__PURE__ */ B("div", {
258
259
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
259
- children: [/* @__PURE__ */ z("div", { children: [/* @__PURE__ */ R("label", {
260
+ children: [/* @__PURE__ */ B("div", { children: [/* @__PURE__ */ z("label", {
260
261
  htmlFor: "prov-edit-churn",
261
- className: H,
262
+ className: U,
262
263
  children: o("providers.detail.editModal.churnRiskLabel", "Churn risk (0–100)")
263
- }), /* @__PURE__ */ R("input", {
264
- ...F("prov-edit-churn"),
264
+ }), /* @__PURE__ */ z("input", {
265
+ ...I("prov-edit-churn"),
265
266
  id: "prov-edit-churn",
266
267
  type: "number",
267
268
  min: "0",
268
269
  max: "100",
269
- value: D,
270
- onChange: (e) => O(e.target.value),
271
- className: V
272
- })] }), /* @__PURE__ */ z("div", { children: [/* @__PURE__ */ R("label", {
270
+ value: O,
271
+ onChange: (e) => k(e.target.value),
272
+ className: H
273
+ })] }), /* @__PURE__ */ B("div", { children: [/* @__PURE__ */ z("label", {
273
274
  htmlFor: "prov-edit-health",
274
- className: H,
275
+ className: U,
275
276
  children: o("providers.detail.editModal.vendorHealthLabel", "Vendor health (0–100)")
276
- }), /* @__PURE__ */ R("input", {
277
- ...F("prov-edit-health"),
277
+ }), /* @__PURE__ */ z("input", {
278
+ ...I("prov-edit-health"),
278
279
  id: "prov-edit-health",
279
280
  type: "number",
280
281
  min: "0",
281
282
  max: "100",
282
- value: k,
283
- onChange: (e) => A(e.target.value),
284
- className: V
283
+ value: A,
284
+ onChange: (e) => j(e.target.value),
285
+ className: H
285
286
  })] })]
286
287
  }),
287
- /* @__PURE__ */ z("div", { children: [/* @__PURE__ */ z("label", {
288
+ /* @__PURE__ */ z(f, {
289
+ entityType: "SUBSCRIBERBOT_PROVIDER",
290
+ entityId: n.id
291
+ }),
292
+ /* @__PURE__ */ B("div", { children: [/* @__PURE__ */ B("label", {
288
293
  htmlFor: "prov-edit-tags",
289
- className: H,
294
+ className: U,
290
295
  children: [
291
- o("providers.detail.editModal.tagsLabel", "Tags"),
296
+ o("providers.detail.editModal.tagsLabel", "Legacy keyword tags"),
292
297
  " ",
293
- /* @__PURE__ */ z("span", {
298
+ /* @__PURE__ */ B("span", {
294
299
  className: "text-text-secondary",
295
300
  children: [
296
301
  "(",
@@ -299,22 +304,22 @@ function Y({ provider: n, onClose: r }) {
299
304
  ]
300
305
  })
301
306
  ]
302
- }), /* @__PURE__ */ R("input", {
303
- ...F("prov-edit-tags"),
307
+ }), /* @__PURE__ */ z("input", {
308
+ ...I("prov-edit-tags"),
304
309
  id: "prov-edit-tags",
305
310
  type: "text",
306
- value: j,
307
- onChange: (e) => M(e.target.value),
308
- className: V
311
+ value: M,
312
+ onChange: (e) => N(e.target.value),
313
+ className: H
309
314
  })] }),
310
- /* @__PURE__ */ z("div", {
315
+ /* @__PURE__ */ B("div", {
311
316
  className: "flex justify-end gap-3",
312
- children: [/* @__PURE__ */ R("button", {
317
+ children: [/* @__PURE__ */ z("button", {
313
318
  type: "button",
314
319
  onClick: r,
315
320
  className: "rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
316
321
  children: o("providers.detail.editModal.cancel", "Cancel")
317
- }), /* @__PURE__ */ R("button", {
322
+ }), /* @__PURE__ */ z("button", {
318
323
  type: "submit",
319
324
  disabled: s.isPending,
320
325
  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",
@@ -325,13 +330,13 @@ function Y({ provider: n, onClose: r }) {
325
330
  })
326
331
  });
327
332
  }
328
- function te({ providerId: n, onClose: r }) {
329
- let { formatEnumLabel: i } = e(), o = b(), s = _(), [c, l] = C(""), [u, d] = C(""), [f, p] = C("USD"), [m, h] = C("MONTHLY"), [g, v] = C(""), [y, x] = C(""), [S, w] = C(!0), [T, E, D, O] = t();
330
- return /* @__PURE__ */ R(a, {
333
+ function ne({ providerId: n, onClose: r }) {
334
+ let { formatEnumLabel: i } = e(), o = x(), s = v(), [c, l] = w(""), [u, d] = w(""), [f, p] = w("USD"), [m, h] = w("MONTHLY"), [g, _] = w(""), [y, b] = w(""), [S, C] = w(!0), [T, E, D, O] = t();
335
+ return /* @__PURE__ */ z(a, {
331
336
  title: o("providers.detail.addPlanModal.title", "Add plan"),
332
337
  onClose: r,
333
338
  maxWidthClassName: "max-w-xl",
334
- children: /* @__PURE__ */ z("form", {
339
+ children: /* @__PURE__ */ B("form", {
335
340
  onSubmit: (e) => {
336
341
  if (e.preventDefault(), E(null), !c.trim()) {
337
342
  E(o("providers.detail.addPlanModal.nameRequired", "A plan name is required."), "plan-name");
@@ -353,42 +358,42 @@ function te({ providerId: n, onClose: r }) {
353
358
  },
354
359
  className: "space-y-4",
355
360
  children: [
356
- T && /* @__PURE__ */ R("div", {
361
+ T && /* @__PURE__ */ z("div", {
357
362
  id: O,
358
363
  tabIndex: -1,
359
364
  role: "alert",
360
365
  className: "rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle px-4 py-2 text-sm text-status-error-text",
361
366
  children: T
362
367
  }),
363
- /* @__PURE__ */ z("div", { children: [/* @__PURE__ */ z("label", {
368
+ /* @__PURE__ */ B("div", { children: [/* @__PURE__ */ B("label", {
364
369
  htmlFor: "plan-name",
365
- className: H,
370
+ className: U,
366
371
  children: [
367
372
  o("providers.detail.addPlanModal.nameLabel", "Name"),
368
373
  " ",
369
- /* @__PURE__ */ R("span", {
374
+ /* @__PURE__ */ z("span", {
370
375
  className: "text-status-error-text",
371
376
  children: "*"
372
377
  })
373
378
  ]
374
- }), /* @__PURE__ */ R("input", {
379
+ }), /* @__PURE__ */ z("input", {
375
380
  ...D("plan-name"),
376
381
  id: "plan-name",
377
382
  type: "text",
378
383
  value: c,
379
384
  onChange: (e) => l(e.target.value),
380
385
  placeholder: o("providers.detail.addPlanModal.namePlaceholder", "e.g. Pro, Team, Enterprise"),
381
- className: V,
386
+ className: H,
382
387
  required: !0
383
388
  })] }),
384
- /* @__PURE__ */ z("div", {
389
+ /* @__PURE__ */ B("div", {
385
390
  className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
386
391
  children: [
387
- /* @__PURE__ */ z("div", { children: [/* @__PURE__ */ R("label", {
392
+ /* @__PURE__ */ B("div", { children: [/* @__PURE__ */ z("label", {
388
393
  htmlFor: "plan-amount",
389
- className: H,
394
+ className: U,
390
395
  children: o("providers.detail.addPlanModal.amountLabel", "Amount")
391
- }), /* @__PURE__ */ R("input", {
396
+ }), /* @__PURE__ */ z("input", {
392
397
  ...D("plan-amount"),
393
398
  id: "plan-amount",
394
399
  type: "number",
@@ -397,57 +402,57 @@ function te({ providerId: n, onClose: r }) {
397
402
  value: u,
398
403
  onChange: (e) => d(e.target.value),
399
404
  placeholder: o("providers.detail.addPlanModal.amountPlaceholder", "0.00"),
400
- className: V
405
+ className: H
401
406
  })] }),
402
- /* @__PURE__ */ z("div", { children: [/* @__PURE__ */ R("label", {
407
+ /* @__PURE__ */ B("div", { children: [/* @__PURE__ */ z("label", {
403
408
  htmlFor: "plan-currency",
404
- className: H,
409
+ className: U,
405
410
  children: o("providers.detail.addPlanModal.currencyLabel", "Currency")
406
- }), /* @__PURE__ */ R("input", {
411
+ }), /* @__PURE__ */ z("input", {
407
412
  ...D("plan-currency"),
408
413
  id: "plan-currency",
409
414
  type: "text",
410
415
  value: f,
411
416
  onChange: (e) => p(e.target.value.toUpperCase()),
412
417
  maxLength: 3,
413
- className: V
418
+ className: H
414
419
  })] }),
415
- /* @__PURE__ */ z("div", { children: [/* @__PURE__ */ R("label", {
420
+ /* @__PURE__ */ B("div", { children: [/* @__PURE__ */ z("label", {
416
421
  htmlFor: "plan-interval",
417
- className: H,
422
+ className: U,
418
423
  children: o("providers.detail.addPlanModal.intervalLabel", "Interval")
419
- }), /* @__PURE__ */ R("select", {
424
+ }), /* @__PURE__ */ z("select", {
420
425
  ...D("plan-interval"),
421
426
  id: "plan-interval",
422
427
  value: m,
423
428
  onChange: (e) => h(e.target.value),
424
- className: V,
425
- children: K.map((e) => /* @__PURE__ */ R("option", {
429
+ className: H,
430
+ children: q.map((e) => /* @__PURE__ */ z("option", {
426
431
  value: e,
427
432
  children: i(e)
428
433
  }, e))
429
434
  })] })
430
435
  ]
431
436
  }),
432
- /* @__PURE__ */ z("div", { children: [/* @__PURE__ */ R("label", {
437
+ /* @__PURE__ */ B("div", { children: [/* @__PURE__ */ z("label", {
433
438
  htmlFor: "plan-desc",
434
- className: H,
439
+ className: U,
435
440
  children: o("providers.detail.addPlanModal.descriptionLabel", "Description")
436
- }), /* @__PURE__ */ R("textarea", {
441
+ }), /* @__PURE__ */ z("textarea", {
437
442
  ...D("plan-desc"),
438
443
  id: "plan-desc",
439
444
  value: g,
440
- onChange: (e) => v(e.target.value),
445
+ onChange: (e) => _(e.target.value),
441
446
  rows: 2,
442
- className: V
447
+ className: H
443
448
  })] }),
444
- /* @__PURE__ */ z("div", { children: [/* @__PURE__ */ z("label", {
449
+ /* @__PURE__ */ B("div", { children: [/* @__PURE__ */ B("label", {
445
450
  htmlFor: "plan-features",
446
- className: H,
451
+ className: U,
447
452
  children: [
448
453
  o("providers.detail.addPlanModal.featuresLabel", "Features"),
449
454
  " ",
450
- /* @__PURE__ */ z("span", {
455
+ /* @__PURE__ */ B("span", {
451
456
  className: "text-text-secondary",
452
457
  children: [
453
458
  "(",
@@ -456,32 +461,32 @@ function te({ providerId: n, onClose: r }) {
456
461
  ]
457
462
  })
458
463
  ]
459
- }), /* @__PURE__ */ R("textarea", {
464
+ }), /* @__PURE__ */ z("textarea", {
460
465
  ...D("plan-features"),
461
466
  id: "plan-features",
462
467
  value: y,
463
- onChange: (e) => x(e.target.value),
468
+ onChange: (e) => b(e.target.value),
464
469
  rows: 3,
465
470
  placeholder: o("providers.detail.addPlanModal.featuresPlaceholder", "Unlimited projects\nPriority support\nSSO"),
466
- className: V
471
+ className: H
467
472
  })] }),
468
- /* @__PURE__ */ z("label", {
473
+ /* @__PURE__ */ B("label", {
469
474
  className: "flex items-center gap-2 text-sm text-text-primary",
470
- children: [/* @__PURE__ */ R("input", {
475
+ children: [/* @__PURE__ */ z("input", {
471
476
  type: "checkbox",
472
477
  checked: S,
473
- onChange: (e) => w(e.target.checked),
478
+ onChange: (e) => C(e.target.checked),
474
479
  className: "size-4 rounded border-border-subtle"
475
480
  }), o("providers.detail.addPlanModal.active", "Active")]
476
481
  }),
477
- /* @__PURE__ */ z("div", {
482
+ /* @__PURE__ */ B("div", {
478
483
  className: "flex justify-end gap-3",
479
- children: [/* @__PURE__ */ R("button", {
484
+ children: [/* @__PURE__ */ z("button", {
480
485
  type: "button",
481
486
  onClick: r,
482
487
  className: "rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
483
488
  children: o("providers.detail.addPlanModal.cancel", "Cancel")
484
- }), /* @__PURE__ */ R("button", {
489
+ }), /* @__PURE__ */ z("button", {
485
490
  type: "submit",
486
491
  disabled: s.isPending,
487
492
  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",
@@ -492,31 +497,31 @@ function te({ providerId: n, onClose: r }) {
492
497
  })
493
498
  });
494
499
  }
495
- function ne({ provider: e, onClose: t }) {
496
- let n = b(), { navigateTo: r } = m(), i = h(), [o, s] = C(null);
497
- return /* @__PURE__ */ R(a, {
500
+ function re({ provider: e, onClose: t }) {
501
+ let n = x(), { navigateTo: r } = d(), i = g(), [o, s] = w(null);
502
+ return /* @__PURE__ */ z(a, {
498
503
  title: n("providers.detail.archiveModal.title", "Archive provider"),
499
504
  onClose: t,
500
- children: /* @__PURE__ */ z("div", {
505
+ children: /* @__PURE__ */ B("div", {
501
506
  className: "space-y-4",
502
507
  children: [
503
- o && /* @__PURE__ */ R("div", {
508
+ o && /* @__PURE__ */ z("div", {
504
509
  role: "alert",
505
510
  className: "rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle px-4 py-2 text-sm text-status-error-text",
506
511
  children: o
507
512
  }),
508
- /* @__PURE__ */ R("p", {
513
+ /* @__PURE__ */ z("p", {
509
514
  className: "text-sm text-text-secondary",
510
515
  children: n("providers.detail.archiveModal.description", "Archive {{name}}? It will be removed from the active registry. This can be reversed by an administrator.", { name: e.name })
511
516
  }),
512
- /* @__PURE__ */ z("div", {
517
+ /* @__PURE__ */ B("div", {
513
518
  className: "flex justify-end gap-3",
514
- children: [/* @__PURE__ */ R("button", {
519
+ children: [/* @__PURE__ */ z("button", {
515
520
  type: "button",
516
521
  onClick: t,
517
522
  className: "rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
518
523
  children: n("providers.detail.archiveModal.cancel", "Cancel")
519
- }), /* @__PURE__ */ R("button", {
524
+ }), /* @__PURE__ */ z("button", {
520
525
  type: "button",
521
526
  onClick: () => {
522
527
  s(null), i.mutate(e.id, {
@@ -533,8 +538,8 @@ function ne({ provider: e, onClose: t }) {
533
538
  })
534
539
  });
535
540
  }
536
- function re({ slug: t }) {
537
- let { formatCurrency: n, formatDate: r, formatEnumLabel: i, formatIntervalSuffix: a } = e(), c = b(), { data: l, isLoading: u, isError: d, refetch: f } = g(t), m = S(() => {
541
+ function ie({ slug: t }) {
542
+ let { formatCurrency: n, formatDate: r, formatEnumLabel: i, formatIntervalSuffix: a } = e(), c = x(), { data: l, isLoading: u, isError: d, refetch: f } = _(t), p = C(() => {
538
543
  let e = [...l ?? []].filter((e) => Number.isFinite(e.amount)).sort((e, t) => new Date(e.observedAt).getTime() - new Date(t.observedAt).getTime()), t = e[e.length - 1];
539
544
  if (!t) return null;
540
545
  let n = e.filter((e) => e.planName === t.planName && e.region === t.region && e.currency === t.currency && e.interval === t.interval), r = n.map((e) => e.amount);
@@ -547,159 +552,159 @@ function re({ slug: t }) {
547
552
  first: r[0] ?? t.amount
548
553
  };
549
554
  }, [l]);
550
- return /* @__PURE__ */ z(B, {
555
+ return /* @__PURE__ */ B(V, {
551
556
  treatment: "metric",
552
557
  className: "p-5",
553
- children: [/* @__PURE__ */ z("span", {
558
+ children: [/* @__PURE__ */ B("span", {
554
559
  className: "inline-flex items-center gap-2 text-sm font-medium text-text-primary",
555
560
  children: [
556
- /* @__PURE__ */ R(A, { className: "h-4 w-4 text-text-secondary" }),
561
+ /* @__PURE__ */ z(j, { className: "h-4 w-4 text-text-secondary" }),
557
562
  " ",
558
563
  c("providers.detail.marketBenchmark", "Market benchmark")
559
564
  ]
560
- }), t ? u ? /* @__PURE__ */ R(s, {
565
+ }), t ? u ? /* @__PURE__ */ z(s, {
561
566
  className: "min-h-[8rem]",
562
567
  label: c("providers.detail.priceHistoryLoading", "Loading price history…")
563
- }) : d ? /* @__PURE__ */ R(o, {
568
+ }) : d ? /* @__PURE__ */ z(o, {
564
569
  className: "min-h-[8rem]",
565
570
  title: c("providers.detail.priceHistoryErrorTitle", "Price history unavailable"),
566
571
  message: c("providers.detail.priceHistoryError", "Could not load observed prices for this provider."),
567
572
  onRetry: () => void f()
568
- }) : m ? /* @__PURE__ */ z(L, { children: [
569
- /* @__PURE__ */ z("p", {
573
+ }) : p ? /* @__PURE__ */ B(R, { children: [
574
+ /* @__PURE__ */ B("p", {
570
575
  className: "mt-3 text-2xl font-bold tabular-nums text-text-primary",
571
- children: [n(m.latest.amount, m.latest.currency), /* @__PURE__ */ R("span", {
576
+ children: [n(p.latest.amount, p.latest.currency), /* @__PURE__ */ z("span", {
572
577
  className: "text-sm font-normal text-text-secondary",
573
- children: a(m.latest.interval)
578
+ children: a(p.latest.interval)
574
579
  })]
575
580
  }),
576
- /* @__PURE__ */ z("p", {
581
+ /* @__PURE__ */ B("p", {
577
582
  className: "text-xs text-text-secondary",
578
583
  children: [
579
- m.latest.planName,
584
+ p.latest.planName,
580
585
  " · ",
581
- m.latest.region,
586
+ p.latest.region,
582
587
  " ·",
583
588
  " ",
584
589
  c("providers.detail.observed", "observed"),
585
590
  " ",
586
- r(m.latest.observedAt)
591
+ r(p.latest.observedAt)
587
592
  ]
588
593
  }),
589
- /* @__PURE__ */ R(p, {
594
+ /* @__PURE__ */ z(h, {
590
595
  className: "mt-3 w-full",
591
- points: m.amounts,
592
- positive: m.latest.amount <= m.first
596
+ points: p.amounts,
597
+ positive: p.latest.amount <= p.first
593
598
  }),
594
- /* @__PURE__ */ z("dl", {
599
+ /* @__PURE__ */ B("dl", {
595
600
  className: "mt-3 space-y-2 border-t border-border-subtle pt-3 text-xs",
596
601
  children: [
597
- /* @__PURE__ */ z("div", {
602
+ /* @__PURE__ */ B("div", {
598
603
  className: "flex items-center justify-between gap-2",
599
- children: [/* @__PURE__ */ R("dt", {
604
+ children: [/* @__PURE__ */ z("dt", {
600
605
  className: "text-text-secondary",
601
606
  children: c("providers.detail.observedRange", "Observed range")
602
- }), /* @__PURE__ */ z("dd", {
607
+ }), /* @__PURE__ */ B("dd", {
603
608
  className: "font-medium tabular-nums text-text-primary",
604
609
  children: [
605
- n(m.min, m.latest.currency),
610
+ n(p.min, p.latest.currency),
606
611
  " –",
607
612
  " ",
608
- n(m.max, m.latest.currency)
613
+ n(p.max, p.latest.currency)
609
614
  ]
610
615
  })]
611
616
  }),
612
- /* @__PURE__ */ z("div", {
617
+ /* @__PURE__ */ B("div", {
613
618
  className: "flex items-center justify-between gap-2",
614
- children: [/* @__PURE__ */ R("dt", {
619
+ children: [/* @__PURE__ */ z("dt", {
615
620
  className: "text-text-secondary",
616
621
  children: c("providers.detail.observations", "Observations")
617
- }), /* @__PURE__ */ R("dd", {
622
+ }), /* @__PURE__ */ z("dd", {
618
623
  className: "font-medium tabular-nums text-text-primary",
619
- children: m.points.length
624
+ children: p.points.length
620
625
  })]
621
626
  }),
622
- /* @__PURE__ */ z("div", {
627
+ /* @__PURE__ */ B("div", {
623
628
  className: "flex items-center justify-between gap-2",
624
- children: [/* @__PURE__ */ R("dt", {
629
+ children: [/* @__PURE__ */ z("dt", {
625
630
  className: "text-text-secondary",
626
631
  children: c("providers.detail.latestSource", "Latest source")
627
- }), /* @__PURE__ */ R("dd", {
632
+ }), /* @__PURE__ */ z("dd", {
628
633
  className: "font-medium text-text-primary",
629
- children: m.latest.sourceLabel ?? i(m.latest.sourceKind)
634
+ children: p.latest.sourceLabel ?? i(p.latest.sourceKind)
630
635
  })]
631
636
  })
632
637
  ]
633
638
  })
634
- ] }) : /* @__PURE__ */ R("p", {
639
+ ] }) : /* @__PURE__ */ z("p", {
635
640
  className: "mt-4 text-sm text-text-secondary",
636
641
  children: c("providers.detail.priceHistoryEmpty", "No price observations recorded for this provider yet.")
637
- }) : /* @__PURE__ */ R("p", {
642
+ }) : /* @__PURE__ */ z("p", {
638
643
  className: "mt-4 text-sm text-text-secondary",
639
644
  children: c("providers.detail.priceHistoryNoSlug", "Add a slug to this provider to match it against the shared price benchmark dataset.")
640
645
  })]
641
646
  });
642
647
  }
643
648
  function X() {
644
- let { formatCurrency: t, formatEnumLabel: a, formatIntervalSuffix: p } = e(), { id: h } = ee(), { navigateTo: g } = m(), { data: _, isLoading: y, isError: S, refetch: A } = v(h), [V, H] = C(!1), [U, G] = C(!1), [K, X] = C(!1), Z = b();
645
- if (y) return /* @__PURE__ */ R(n, {
649
+ let { formatCurrency: t, formatEnumLabel: a, formatIntervalSuffix: h } = e(), { id: g } = ee(), { navigateTo: _ } = d(), { data: v, isLoading: b, isError: C, refetch: j } = y(g), [H, U] = w(!1), [W, K] = w(!1), [q, X] = w(!1), Z = x();
650
+ if (b) return /* @__PURE__ */ z(n, {
646
651
  title: Z("providers.detail.loadingTitle", "Provider"),
647
- children: /* @__PURE__ */ R(s, { label: Z("providers.detail.loading", "Loading provider…") })
652
+ children: /* @__PURE__ */ z(s, { label: Z("providers.detail.loading", "Loading provider…") })
648
653
  });
649
- if (S) return /* @__PURE__ */ R(n, {
654
+ if (C) return /* @__PURE__ */ z(n, {
650
655
  title: Z("providers.detail.loadingTitle", "Provider"),
651
- children: /* @__PURE__ */ R(o, {
656
+ children: /* @__PURE__ */ z(o, {
652
657
  message: Z("providers.detail.error", "Could not load this provider."),
653
- onRetry: () => void A()
658
+ onRetry: () => void j()
654
659
  })
655
660
  });
656
- if (!_) return /* @__PURE__ */ R(n, {
661
+ if (!v) return /* @__PURE__ */ z(n, {
657
662
  title: Z("providers.detail.loadingTitle", "Provider"),
658
- children: /* @__PURE__ */ R(i, {
663
+ children: /* @__PURE__ */ z(i, {
659
664
  illustration: "empty-data",
660
665
  title: Z("providers.detail.notFoundTitle", "Provider not found"),
661
666
  description: Z("providers.detail.notFoundDescription", "It may have been removed, or you may not have access to it."),
662
- action: /* @__PURE__ */ R("button", {
667
+ action: /* @__PURE__ */ z("button", {
663
668
  type: "button",
664
- onClick: () => g("/providers"),
669
+ onClick: () => _("/providers"),
665
670
  className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90",
666
671
  children: Z("providers.detail.backToProviders", "Back to providers")
667
672
  })
668
673
  })
669
674
  });
670
- let Q = _, $ = Q.websiteUrl && /^https?:\/\//i.test(Q.websiteUrl) ? Q.websiteUrl : null, ie = Q.plans && Q.plans.length > 1 ? Q.plans.filter((e) => e.isActive && e.amount > 0).reduce((e, t) => e === null || t.amount < e.amount ? t : e, null)?.id ?? null : null;
671
- return /* @__PURE__ */ z(n, {
675
+ let Q = v, $ = Q.websiteUrl && /^https?:\/\//i.test(Q.websiteUrl) ? Q.websiteUrl : null, ae = Q.plans && Q.plans.length > 1 ? Q.plans.filter((e) => e.isActive && e.amount > 0).reduce((e, t) => e === null || t.amount < e.amount ? t : e, null)?.id ?? null : null;
676
+ return /* @__PURE__ */ B(n, {
672
677
  title: Q.name,
673
- description: Z(W[Q.category], a(Q.category)),
674
- actions: /* @__PURE__ */ z("div", {
678
+ description: Z(G[Q.category], a(Q.category)),
679
+ actions: /* @__PURE__ */ B("div", {
675
680
  className: "flex items-center gap-2",
676
681
  children: [
677
- /* @__PURE__ */ z("button", {
682
+ /* @__PURE__ */ B("button", {
678
683
  type: "button",
679
- onClick: () => H(!0),
684
+ onClick: () => U(!0),
680
685
  className: "inline-flex items-center gap-2 rounded-lg border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
681
686
  children: [
682
- /* @__PURE__ */ R(j, { className: "h-4 w-4" }),
687
+ /* @__PURE__ */ z(M, { className: "h-4 w-4" }),
683
688
  " ",
684
689
  Z("providers.detail.edit", "Edit")
685
690
  ]
686
691
  }),
687
- /* @__PURE__ */ z("button", {
692
+ /* @__PURE__ */ B("button", {
688
693
  type: "button",
689
694
  onClick: () => X(!0),
690
695
  className: "inline-flex items-center gap-2 rounded-lg border border-status-error-text/30 px-3 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg-subtle",
691
696
  children: [
692
- /* @__PURE__ */ R(w, { className: "h-4 w-4" }),
697
+ /* @__PURE__ */ z(T, { className: "h-4 w-4" }),
693
698
  " ",
694
699
  Z("providers.detail.archive", "Archive")
695
700
  ]
696
701
  }),
697
- /* @__PURE__ */ z("button", {
702
+ /* @__PURE__ */ B("button", {
698
703
  type: "button",
699
- onClick: () => g("/providers"),
704
+ onClick: () => _("/providers"),
700
705
  className: "inline-flex items-center gap-2 rounded-lg border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
701
706
  children: [
702
- /* @__PURE__ */ R(T, { className: "rtl:rotate-180 h-4 w-4" }),
707
+ /* @__PURE__ */ z(E, { className: "rtl:rotate-180 h-4 w-4" }),
703
708
  " ",
704
709
  Z("providers.detail.back", "Back")
705
710
  ]
@@ -707,114 +712,121 @@ function X() {
707
712
  ]
708
713
  }),
709
714
  children: [
710
- /* @__PURE__ */ z("div", {
715
+ /* @__PURE__ */ B("div", {
711
716
  className: "flex flex-wrap items-center gap-3",
712
717
  children: [
713
- /* @__PURE__ */ R("span", {
718
+ /* @__PURE__ */ z("span", {
714
719
  className: "flex size-11 items-center justify-center rounded-xl bg-[var(--color-accent-soft)] text-text-primary",
715
- children: /* @__PURE__ */ R(E, { className: "h-5 w-5" })
720
+ children: /* @__PURE__ */ z(D, { className: "h-5 w-5" })
716
721
  }),
717
- /* @__PURE__ */ R(r, { status: Q.status }),
718
- Q.industry && /* @__PURE__ */ R("span", {
722
+ /* @__PURE__ */ z(r, { status: Q.status }),
723
+ Q.industry && /* @__PURE__ */ z("span", {
719
724
  className: "text-sm text-text-secondary",
720
725
  children: Q.industry
721
726
  }),
722
- Q.region && /* @__PURE__ */ z("span", {
727
+ Q.region && /* @__PURE__ */ B("span", {
723
728
  className: "text-sm text-text-secondary",
724
729
  children: ["· ", Q.region]
725
730
  }),
726
- $ && /* @__PURE__ */ z("a", {
731
+ $ && /* @__PURE__ */ B("a", {
727
732
  href: $,
728
733
  target: "_blank",
729
734
  rel: "noopener noreferrer",
730
735
  className: "inline-flex items-center gap-1 text-sm text-text-link hover:underline",
731
736
  children: [
732
- /* @__PURE__ */ R(O, { className: "h-3.5 w-3.5" }),
737
+ /* @__PURE__ */ z(k, { className: "h-3.5 w-3.5" }),
733
738
  " ",
734
739
  Z("providers.detail.website", "Website")
735
740
  ]
736
741
  })
737
742
  ]
738
743
  }),
739
- Q.description && /* @__PURE__ */ R("p", {
744
+ Q.description && /* @__PURE__ */ z("p", {
740
745
  className: "mt-4 max-w-3xl text-sm leading-relaxed text-text-secondary",
741
746
  children: Q.description
742
747
  }),
743
- Q.tags.length > 0 && /* @__PURE__ */ z("div", {
744
- className: "mt-4 flex flex-wrap items-center gap-2",
745
- children: [/* @__PURE__ */ R(F, { className: "h-3.5 w-3.5 text-text-secondary" }), Q.tags.map((e) => /* @__PURE__ */ R("span", {
748
+ /* @__PURE__ */ z("div", {
749
+ className: "mt-4",
750
+ children: /* @__PURE__ */ z(f, {
751
+ entityType: "SUBSCRIBERBOT_PROVIDER",
752
+ entityId: Q.id
753
+ })
754
+ }),
755
+ Q.tags.length > 0 && /* @__PURE__ */ B("div", {
756
+ className: "mt-3 flex flex-wrap items-center gap-2",
757
+ children: [/* @__PURE__ */ z(I, { className: "h-3.5 w-3.5 text-text-secondary" }), Q.tags.map((e) => /* @__PURE__ */ z("span", {
746
758
  className: "rounded-full bg-bg-sunken px-2.5 py-0.5 text-xs text-text-secondary",
747
759
  children: e
748
760
  }, e))]
749
761
  }),
750
- /* @__PURE__ */ z("div", {
762
+ /* @__PURE__ */ B("div", {
751
763
  className: "mt-6 grid grid-cols-1 gap-6 lg:grid-cols-3",
752
- children: [/* @__PURE__ */ z("div", {
764
+ children: [/* @__PURE__ */ B("div", {
753
765
  className: "lg:col-span-2",
754
766
  children: [
755
- /* @__PURE__ */ R(c, {
767
+ /* @__PURE__ */ z(c, {
756
768
  title: Z("providers.detail.plans", "Plans"),
757
769
  description: Z("providers.detail.plansDescription", "Pricing this provider publishes"),
758
- action: /* @__PURE__ */ z("button", {
770
+ action: /* @__PURE__ */ B("button", {
759
771
  type: "button",
760
- onClick: () => G(!0),
772
+ onClick: () => K(!0),
761
773
  className: "inline-flex items-center gap-1.5 rounded-lg border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken",
762
774
  children: [
763
- /* @__PURE__ */ R(M, { className: "h-3.5 w-3.5" }),
775
+ /* @__PURE__ */ z(N, { className: "h-3.5 w-3.5" }),
764
776
  " ",
765
777
  Z("providers.detail.addPlan", "Add plan")
766
778
  ]
767
779
  }),
768
- children: !Q.plans || Q.plans.length === 0 ? /* @__PURE__ */ R(i, {
780
+ children: !Q.plans || Q.plans.length === 0 ? /* @__PURE__ */ z(i, {
769
781
  illustration: "empty-data",
770
782
  title: Z("providers.detail.noPlansTitle", "No published plans"),
771
783
  description: Z("providers.detail.noPlansDescription", "When this provider publishes plans, they'll appear here."),
772
- action: /* @__PURE__ */ R("button", {
784
+ action: /* @__PURE__ */ z("button", {
773
785
  type: "button",
774
- onClick: () => G(!0),
786
+ onClick: () => K(!0),
775
787
  className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90",
776
788
  children: Z("providers.detail.addPlan", "Add plan")
777
789
  })
778
- }) : /* @__PURE__ */ R("div", {
790
+ }) : /* @__PURE__ */ z("div", {
779
791
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
780
792
  children: Q.plans.map((e) => {
781
- let n = e.id === ie && Q.plans.length > 1;
782
- return /* @__PURE__ */ z(B, {
793
+ let n = e.id === ae && Q.plans.length > 1;
794
+ return /* @__PURE__ */ B(V, {
783
795
  treatment: n ? "insight" : "metric",
784
796
  glow: n,
785
797
  className: "flex flex-col p-5",
786
798
  children: [
787
- /* @__PURE__ */ z("div", {
799
+ /* @__PURE__ */ B("div", {
788
800
  className: "flex items-start justify-between gap-2",
789
- children: [/* @__PURE__ */ R("p", {
801
+ children: [/* @__PURE__ */ z("p", {
790
802
  className: "text-sm font-semibold text-text-primary",
791
803
  children: e.name
792
- }), n ? /* @__PURE__ */ z("span", {
804
+ }), n ? /* @__PURE__ */ B("span", {
793
805
  className: "inline-flex items-center gap-1 rounded-full bg-status-success-bg-subtle px-2 py-0.5 text-[11px] font-medium text-status-success-text",
794
806
  children: [
795
- /* @__PURE__ */ R(P, { className: "h-3 w-3" }),
807
+ /* @__PURE__ */ z(F, { className: "h-3 w-3" }),
796
808
  " ",
797
809
  Z("providers.detail.bestValue", "Best value")
798
810
  ]
799
- }) : /* @__PURE__ */ R(r, { status: e.isActive ? "ACTIVE" : "DISABLED" })]
811
+ }) : /* @__PURE__ */ z(r, { status: e.isActive ? "ACTIVE" : "DISABLED" })]
800
812
  }),
801
- /* @__PURE__ */ z("p", {
813
+ /* @__PURE__ */ B("p", {
802
814
  className: "mt-3 text-2xl font-bold tabular-nums text-text-primary",
803
- children: [t(e.amount, e.currency), /* @__PURE__ */ R("span", {
815
+ children: [t(e.amount, e.currency), /* @__PURE__ */ z("span", {
804
816
  className: "text-sm font-normal text-text-secondary",
805
- children: p(e.interval)
817
+ children: h(e.interval)
806
818
  })]
807
819
  }),
808
- e.description && /* @__PURE__ */ R("p", {
820
+ e.description && /* @__PURE__ */ z("p", {
809
821
  className: "mt-2 text-xs leading-relaxed text-text-secondary",
810
822
  children: e.description
811
823
  }),
812
- e.features.length > 0 && /* @__PURE__ */ z("ul", {
824
+ e.features.length > 0 && /* @__PURE__ */ B("ul", {
813
825
  className: "mt-4 space-y-2 border-t border-border-subtle pt-4",
814
- children: [e.features.slice(0, 6).map((e) => /* @__PURE__ */ z("li", {
826
+ children: [e.features.slice(0, 6).map((e) => /* @__PURE__ */ B("li", {
815
827
  className: "flex items-start gap-2 text-xs text-text-secondary",
816
- children: [/* @__PURE__ */ R(D, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-status-success-text" }), /* @__PURE__ */ R("span", { children: e })]
817
- }, e)), e.features.length > 6 && /* @__PURE__ */ R("li", {
828
+ children: [/* @__PURE__ */ z(O, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-status-success-text" }), /* @__PURE__ */ z("span", { children: e })]
829
+ }, e)), e.features.length > 6 && /* @__PURE__ */ z("li", {
818
830
  className: "ps-6 text-[11px] text-text-secondary",
819
831
  children: Z("providers.detail.moreFeatures", "+{{count}} more", { count: e.features.length - 6 })
820
832
  })]
@@ -824,34 +836,34 @@ function X() {
824
836
  })
825
837
  })
826
838
  }),
827
- /* @__PURE__ */ R(u, { providerId: Q.id }),
828
- /* @__PURE__ */ R(l, { providerId: Q.id })
839
+ /* @__PURE__ */ z(u, { providerId: Q.id }),
840
+ /* @__PURE__ */ z(l, { providerId: Q.id })
829
841
  ]
830
- }), /* @__PURE__ */ z("div", {
842
+ }), /* @__PURE__ */ B("div", {
831
843
  className: "space-y-4",
832
844
  children: [
833
- /* @__PURE__ */ z(B, {
845
+ /* @__PURE__ */ B(V, {
834
846
  treatment: "metric",
835
847
  className: "p-5",
836
- children: [/* @__PURE__ */ z("div", {
848
+ children: [/* @__PURE__ */ B("div", {
837
849
  className: "flex items-center justify-between",
838
- children: [/* @__PURE__ */ z("span", {
850
+ children: [/* @__PURE__ */ B("span", {
839
851
  className: "inline-flex items-center gap-2 text-sm font-medium text-text-primary",
840
852
  children: [
841
- /* @__PURE__ */ R(N, { className: "h-4 w-4 text-text-secondary" }),
853
+ /* @__PURE__ */ z(P, { className: "h-4 w-4 text-text-secondary" }),
842
854
  " ",
843
855
  Z("providers.detail.vendorHealth", "Vendor health")
844
856
  ]
845
- }), Q.vendorHealthScore != null && /* @__PURE__ */ R("span", {
846
- className: x("rounded-full px-2 py-0.5 text-[11px] font-medium", q(Q.vendorHealthScore, Z).cls),
847
- children: q(Q.vendorHealthScore, Z).label
857
+ }), Q.vendorHealthScore != null && /* @__PURE__ */ z("span", {
858
+ className: S("rounded-full px-2 py-0.5 text-[11px] font-medium", J(Q.vendorHealthScore, Z).cls),
859
+ children: J(Q.vendorHealthScore, Z).label
848
860
  })]
849
- }), Q.vendorHealthScore == null ? /* @__PURE__ */ R("p", {
861
+ }), Q.vendorHealthScore == null ? /* @__PURE__ */ z("p", {
850
862
  className: "mt-4 text-sm text-text-secondary",
851
863
  children: Z("providers.detail.noHealthScore", "No health score yet.")
852
- }) : /* @__PURE__ */ R("div", {
864
+ }) : /* @__PURE__ */ z("div", {
853
865
  className: "mt-2 flex flex-col items-center",
854
- children: /* @__PURE__ */ R(d, {
866
+ children: /* @__PURE__ */ z(p, {
855
867
  value: Q.vendorHealthScore,
856
868
  max: 100,
857
869
  size: 168,
@@ -859,101 +871,101 @@ function X() {
859
871
  })
860
872
  })]
861
873
  }),
862
- /* @__PURE__ */ z(B, {
874
+ /* @__PURE__ */ B(V, {
863
875
  treatment: "metric",
864
876
  className: "p-5",
865
- children: [/* @__PURE__ */ z("div", {
877
+ children: [/* @__PURE__ */ B("div", {
866
878
  className: "flex items-center justify-between",
867
- children: [/* @__PURE__ */ z("span", {
879
+ children: [/* @__PURE__ */ B("span", {
868
880
  className: "inline-flex items-center gap-2 text-sm font-medium text-text-primary",
869
881
  children: [
870
- /* @__PURE__ */ R(I, { className: "h-4 w-4 text-text-secondary" }),
882
+ /* @__PURE__ */ z(L, { className: "h-4 w-4 text-text-secondary" }),
871
883
  " ",
872
884
  Z("providers.detail.churnRisk", "Churn risk")
873
885
  ]
874
- }), Q.churnRiskScore != null && /* @__PURE__ */ R("span", {
875
- className: x("rounded-full px-2 py-0.5 text-[11px] font-medium", J(Q.churnRiskScore, Z).chip),
876
- children: J(Q.churnRiskScore, Z).label
886
+ }), Q.churnRiskScore != null && /* @__PURE__ */ z("span", {
887
+ className: S("rounded-full px-2 py-0.5 text-[11px] font-medium", Y(Q.churnRiskScore, Z).chip),
888
+ children: Y(Q.churnRiskScore, Z).label
877
889
  })]
878
- }), Q.churnRiskScore == null ? /* @__PURE__ */ R("p", {
890
+ }), Q.churnRiskScore == null ? /* @__PURE__ */ z("p", {
879
891
  className: "mt-4 text-sm text-text-secondary",
880
892
  children: Z("providers.detail.noChurnSignal", "No churn signal yet.")
881
- }) : /* @__PURE__ */ z(L, { children: [/* @__PURE__ */ z("div", {
893
+ }) : /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ B("div", {
882
894
  className: "mt-3 flex items-baseline justify-between",
883
- children: [/* @__PURE__ */ R("span", {
895
+ children: [/* @__PURE__ */ z("span", {
884
896
  className: "text-2xl font-bold tabular-nums text-text-primary",
885
897
  children: Q.churnRiskScore
886
- }), /* @__PURE__ */ R("span", {
898
+ }), /* @__PURE__ */ z("span", {
887
899
  className: "text-xs text-text-secondary",
888
900
  children: "/ 100"
889
901
  })]
890
- }), /* @__PURE__ */ R(f, {
902
+ }), /* @__PURE__ */ z(m, {
891
903
  label: Z("common.healthScore", "Health score"),
892
904
  value: Q.churnRiskScore,
893
- tone: J(Q.churnRiskScore, Z).tone,
905
+ tone: Y(Q.churnRiskScore, Z).tone,
894
906
  className: "mt-2"
895
907
  })] })]
896
908
  }),
897
- /* @__PURE__ */ R(re, { slug: Q.slug }),
898
- /* @__PURE__ */ z(B, {
909
+ /* @__PURE__ */ z(ie, { slug: Q.slug }),
910
+ /* @__PURE__ */ B(V, {
899
911
  treatment: "metric",
900
912
  className: "p-5",
901
- children: [/* @__PURE__ */ z("span", {
913
+ children: [/* @__PURE__ */ B("span", {
902
914
  className: "inline-flex items-center gap-2 text-sm font-medium text-text-primary",
903
915
  children: [
904
- /* @__PURE__ */ R(k, { className: "h-4 w-4 text-text-secondary" }),
916
+ /* @__PURE__ */ z(A, { className: "h-4 w-4 text-text-secondary" }),
905
917
  " ",
906
918
  Z("providers.detail.atAGlance", "At a glance")
907
919
  ]
908
- }), /* @__PURE__ */ z("dl", {
920
+ }), /* @__PURE__ */ B("dl", {
909
921
  className: "mt-3 space-y-2.5 text-sm",
910
922
  children: [
911
- /* @__PURE__ */ z("div", {
923
+ /* @__PURE__ */ B("div", {
912
924
  className: "flex items-center justify-between gap-2",
913
- children: [/* @__PURE__ */ R("dt", {
925
+ children: [/* @__PURE__ */ z("dt", {
914
926
  className: "text-text-secondary",
915
927
  children: Z("providers.detail.category", "Category")
916
- }), /* @__PURE__ */ R("dd", {
928
+ }), /* @__PURE__ */ z("dd", {
917
929
  className: "font-medium text-text-primary",
918
- children: Z(W[Q.category], a(Q.category))
930
+ children: Z(G[Q.category], a(Q.category))
919
931
  })]
920
932
  }),
921
- /* @__PURE__ */ z("div", {
933
+ /* @__PURE__ */ B("div", {
922
934
  className: "flex items-center justify-between gap-2",
923
- children: [/* @__PURE__ */ R("dt", {
935
+ children: [/* @__PURE__ */ z("dt", {
924
936
  className: "text-text-secondary",
925
937
  children: Z("providers.detail.industry", "Industry")
926
- }), /* @__PURE__ */ R("dd", {
938
+ }), /* @__PURE__ */ z("dd", {
927
939
  className: "font-medium text-text-primary",
928
940
  children: Q.industry ?? "—"
929
941
  })]
930
942
  }),
931
- /* @__PURE__ */ z("div", {
943
+ /* @__PURE__ */ B("div", {
932
944
  className: "flex items-center justify-between gap-2",
933
- children: [/* @__PURE__ */ R("dt", {
945
+ children: [/* @__PURE__ */ z("dt", {
934
946
  className: "text-text-secondary",
935
947
  children: Z("providers.detail.region", "Region")
936
- }), /* @__PURE__ */ R("dd", {
948
+ }), /* @__PURE__ */ z("dd", {
937
949
  className: "font-medium text-text-primary",
938
950
  children: Q.region ?? "—"
939
951
  })]
940
952
  }),
941
- /* @__PURE__ */ z("div", {
953
+ /* @__PURE__ */ B("div", {
942
954
  className: "flex items-center justify-between gap-2",
943
- children: [/* @__PURE__ */ R("dt", {
955
+ children: [/* @__PURE__ */ z("dt", {
944
956
  className: "text-text-secondary",
945
957
  children: Z("providers.detail.language", "Language")
946
- }), /* @__PURE__ */ R("dd", {
958
+ }), /* @__PURE__ */ z("dd", {
947
959
  className: "font-medium text-text-primary",
948
960
  children: Q.language ?? "—"
949
961
  })]
950
962
  }),
951
- /* @__PURE__ */ z("div", {
963
+ /* @__PURE__ */ B("div", {
952
964
  className: "flex items-center justify-between gap-2",
953
- children: [/* @__PURE__ */ R("dt", {
965
+ children: [/* @__PURE__ */ z("dt", {
954
966
  className: "text-text-secondary",
955
967
  children: Z("providers.detail.publishedPlans", "Published plans")
956
- }), /* @__PURE__ */ R("dd", {
968
+ }), /* @__PURE__ */ z("dd", {
957
969
  className: "font-medium tabular-nums text-text-primary",
958
970
  children: Q.plans?.length ?? 0
959
971
  })]
@@ -964,15 +976,15 @@ function X() {
964
976
  ]
965
977
  })]
966
978
  }),
967
- V && /* @__PURE__ */ R(Y, {
979
+ H && /* @__PURE__ */ z(te, {
968
980
  provider: Q,
969
- onClose: () => H(!1)
981
+ onClose: () => U(!1)
970
982
  }),
971
- U && /* @__PURE__ */ R(te, {
983
+ W && /* @__PURE__ */ z(ne, {
972
984
  providerId: Q.id,
973
- onClose: () => G(!1)
985
+ onClose: () => K(!1)
974
986
  }),
975
- K && /* @__PURE__ */ R(ne, {
987
+ q && /* @__PURE__ */ z(re, {
976
988
  provider: Q,
977
989
  onClose: () => X(!1)
978
990
  })