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