@burdenoff/microfe-billing 2026.1112.4 → 2026.1113.2

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.
@@ -7,21 +7,21 @@ import { isServerError as o } from "../../../shared/utils/error.js";
7
7
  import { getPlanFeatureQuantity as s } from "../../../shared/utils/planFeatureQuantity.js";
8
8
  import { useDefaultBillingAccount as c } from "../../subscriptions/hooks/useSubscriptions.js";
9
9
  import { useIsFluidgridsVariant as l } from "../../../hooks/useBillingVariant.js";
10
- import { resolvePlanAction as u } from "../utils/planAction.js";
10
+ import { activeProductSubscriptions as u, resolvePlanAction as d } from "../utils/planAction.js";
11
11
  import "../../../shared/components/index.js";
12
- import { usePlans as d } from "../hooks/usePlans.js";
12
+ import { usePlans as f } from "../hooks/usePlans.js";
13
13
  import "../../../shared/utils/index.js";
14
- import { PlanDuration as f } from "../../../shared/types/graphql.js";
15
- import { getDisplayPrice as p, useDefaultBillingCurrency as m } from "../../../hooks/useDefaultBillingCurrency.js";
16
- import { FEATURED_QUOTA_LABELS as h, FEATURED_QUOTA_NAMES as g, formatFeaturedQuotaValue as _ } from "../constants/featuredQuotas.js";
17
- import { enterpriseMailto as v, getEnterpriseOffer as y } from "../constants/enterprise.js";
18
- import { useState as b } from "react";
19
- import { ArrowRight as x, Check as S, Sparkles as C } from "lucide-react";
20
- import { jsx as w, jsxs as T } from "react/jsx-runtime";
21
- import { useI18n as E } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
22
- import { IllustratedEmptyState as D, PagePurpose as O } from "@burdenoff/fe-libs/ui";
14
+ import { PlanDuration as p } from "../../../shared/types/graphql.js";
15
+ import { getDisplayPrice as m, useDefaultBillingCurrency as h } from "../../../hooks/useDefaultBillingCurrency.js";
16
+ import { FEATURED_QUOTA_LABELS as g, FEATURED_QUOTA_NAMES as _, formatFeaturedQuotaValue as v } from "../constants/featuredQuotas.js";
17
+ import { enterpriseMailto as y, getEnterpriseOffer as b } from "../constants/enterprise.js";
18
+ import { useState as x } from "react";
19
+ import { ArrowRight as S, Check as C, Sparkles as w } from "lucide-react";
20
+ import { jsx as T, jsxs as E } from "react/jsx-runtime";
21
+ import { useI18n as D } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
22
+ import { IllustratedEmptyState as O, PagePurpose as k } from "@burdenoff/fe-libs/ui";
23
23
  // src/billing/modules/plans/pages/PlansBrowsePage.tsx
24
- function k(e) {
24
+ function A(e) {
25
25
  let t = /* @__PURE__ */ new Map();
26
26
  for (let n of e) {
27
27
  if (!n.quota) continue;
@@ -34,115 +34,115 @@ function k(e) {
34
34
  }
35
35
  return Array.from(t.values());
36
36
  }
37
- function A(e) {
38
- let t = k(e), n = new Map(t.map((e) => [e.name, e]));
39
- return g.flatMap((e) => {
37
+ function j(e) {
38
+ let t = A(e), n = new Map(t.map((e) => [e.name, e]));
39
+ return _.flatMap((e) => {
40
40
  let t = n.get(e);
41
41
  return t ? [t] : [];
42
42
  });
43
43
  }
44
- var j = () => {
45
- let { t: r } = E(), i = (e, t) => {
44
+ var M = () => {
45
+ let { t: r } = D(), i = (e, t) => {
46
46
  let n = r(e);
47
47
  return n === e ? t : n;
48
- }, a = e(), s = l(), { subscriptions: p } = c(), m = p.filter((e) => String(e.status).toLowerCase() === "active"), h = (e) => s ? u(e, m) : null, g = (e) => {
49
- let t = h(e);
50
- t?.kind === "change" ? a(`/subscriptions/${t.subscriptionId}/upgrade`) : a(`/checkout/${e}`);
51
- }, { productId: _, plansDocsUrl: v } = n(), x = y(_), { plans: S, isLoading: C, error: k, refetch: A } = d({
48
+ }, a = e(), { productId: s, plansDocsUrl: m } = n(), h = b(s), { plans: g, isLoading: _, error: v, refetch: y } = f({
52
49
  includeFree: !1,
53
- productId: _ ?? void 0
54
- }), [j, P] = b("grid"), [L, R] = b(f.MONTHLY), z = S.filter((e) => e.isActive && e.isPurchasable !== !1 && e.duration === L), B = z.length >= 2 ? 1 : -1;
55
- return C && S.length === 0 ? /* @__PURE__ */ T("div", {
50
+ productId: s ?? void 0
51
+ }), S = l(), { subscriptions: C } = c(), w = u(C, new Set(g.map((e) => e.id))), A = (e) => S ? d(e, w) : null, j = (e) => {
52
+ let t = A(e);
53
+ t?.kind === "change" ? a(`/subscriptions/${t.subscriptionId}/upgrade`) : a(`/checkout/${e}`);
54
+ }, [M, F] = x("grid"), [R, z] = x(p.MONTHLY), B = g.filter((e) => e.isActive && e.isPurchasable !== !1 && e.duration === R), V = B.length >= 2 ? 1 : -1;
55
+ return _ && g.length === 0 ? /* @__PURE__ */ E("div", {
56
56
  className: "space-y-6 px-6 lg:px-8 py-6",
57
- children: [/* @__PURE__ */ w("div", { className: "h-8 w-48 bg-bg-sunken animate-pulse rounded-card" }), /* @__PURE__ */ w("div", {
57
+ children: [/* @__PURE__ */ T("div", { className: "h-8 w-48 bg-bg-sunken animate-pulse rounded-card" }), /* @__PURE__ */ T("div", {
58
58
  className: "grid grid-cols-1 md:grid-cols-3 gap-6",
59
59
  children: [
60
60
  1,
61
61
  2,
62
62
  3
63
- ].map((e) => /* @__PURE__ */ T("div", {
63
+ ].map((e) => /* @__PURE__ */ E("div", {
64
64
  className: "border border-border-seam rounded-card bg-bg-surface shadow-elevation-1 p-5 space-y-4",
65
65
  children: [
66
- /* @__PURE__ */ w("div", { className: "h-6 w-24 bg-bg-sunken animate-pulse rounded" }),
67
- /* @__PURE__ */ w("div", { className: "h-8 w-32 bg-bg-sunken animate-pulse rounded" }),
68
- /* @__PURE__ */ w("div", {
66
+ /* @__PURE__ */ T("div", { className: "h-6 w-24 bg-bg-sunken animate-pulse rounded" }),
67
+ /* @__PURE__ */ T("div", { className: "h-8 w-32 bg-bg-sunken animate-pulse rounded" }),
68
+ /* @__PURE__ */ T("div", {
69
69
  className: "space-y-2",
70
70
  children: [
71
71
  1,
72
72
  2,
73
73
  3
74
- ].map((e) => /* @__PURE__ */ w("div", { className: "h-4 w-full bg-bg-sunken animate-pulse rounded" }, e))
74
+ ].map((e) => /* @__PURE__ */ T("div", { className: "h-4 w-full bg-bg-sunken animate-pulse rounded" }, e))
75
75
  })
76
76
  ]
77
77
  }, e))
78
78
  })]
79
- }) : k && o(k) ? /* @__PURE__ */ w("div", {
79
+ }) : v && o(v) ? /* @__PURE__ */ T("div", {
80
80
  className: "p-6",
81
- children: /* @__PURE__ */ w(t, {
81
+ children: /* @__PURE__ */ T(t, {
82
82
  title: i("billing.plans.serverUnavailable", "Server Unavailable"),
83
83
  message: i("billing.plans.unableToLoadPlans", "Unable to load plans."),
84
- onRetry: () => A(),
84
+ onRetry: () => y(),
85
85
  showRetry: !0
86
86
  })
87
- }) : /* @__PURE__ */ T("div", {
87
+ }) : /* @__PURE__ */ E("div", {
88
88
  className: "space-y-6 px-6 lg:px-8 py-6",
89
89
  children: [
90
- /* @__PURE__ */ T("div", { children: [
91
- /* @__PURE__ */ w("h1", {
90
+ /* @__PURE__ */ E("div", { children: [
91
+ /* @__PURE__ */ T("h1", {
92
92
  className: "text-2xl md:text-3xl font-semibold tracking-tight text-text-primary",
93
93
  children: i("billing.plans.browsePlansTitle", "Plans")
94
94
  }),
95
- /* @__PURE__ */ w("p", {
95
+ /* @__PURE__ */ T("p", {
96
96
  className: "text-sm text-text-secondary mt-1",
97
97
  children: i("billing.plans.browsePlansSubtitle", "Choose a plan that fits your needs")
98
98
  }),
99
- /* @__PURE__ */ w(O, {
99
+ /* @__PURE__ */ T(k, {
100
100
  className: "mt-3",
101
- learnMoreHref: v,
101
+ learnMoreHref: m,
102
102
  learnMoreLabel: i("billing.plans.learnMore", "Learn more"),
103
103
  children: i("billing.plans.browsePurpose", "Compare what each plan includes — quotas, features and price — and subscribe to the one that fits your team. Switch between monthly and yearly billing to see the difference, or contact us for a custom Enterprise contract.")
104
104
  })
105
105
  ] }),
106
- /* @__PURE__ */ T("div", {
106
+ /* @__PURE__ */ E("div", {
107
107
  className: "flex flex-wrap items-center gap-4 pb-4 border-b border-border-subtle",
108
- children: [/* @__PURE__ */ w("div", {
108
+ children: [/* @__PURE__ */ T("div", {
109
109
  className: "inline-flex rounded-lg border border-border-subtle p-1 bg-bg-sunken",
110
- children: [f.MONTHLY, f.YEARLY].map((e) => /* @__PURE__ */ w("button", {
110
+ children: [p.MONTHLY, p.YEARLY].map((e) => /* @__PURE__ */ T("button", {
111
111
  type: "button",
112
- onClick: () => R(e),
113
- className: `px-3 py-1.5 text-sm font-medium rounded-button transition-colors ${L === e ? "bg-bg-surface text-text-primary shadow-sm" : "text-text-secondary hover:text-text-primary"}`,
114
- children: e === f.MONTHLY ? "Monthly" : "Yearly"
112
+ onClick: () => z(e),
113
+ className: `px-3 py-1.5 text-sm font-medium rounded-button transition-colors ${R === e ? "bg-bg-surface text-text-primary shadow-sm" : "text-text-secondary hover:text-text-primary"}`,
114
+ children: e === p.MONTHLY ? "Monthly" : "Yearly"
115
115
  }, e))
116
- }), /* @__PURE__ */ T("div", {
116
+ }), /* @__PURE__ */ E("div", {
117
117
  className: "ml-auto inline-flex rounded-lg border border-border-subtle p-1 bg-bg-sunken",
118
- children: [/* @__PURE__ */ w("button", {
118
+ children: [/* @__PURE__ */ T("button", {
119
119
  type: "button",
120
- onClick: () => P("grid"),
121
- className: `p-1.5 rounded-button transition-colors ${j === "grid" ? "bg-bg-surface text-text-primary shadow-sm" : "text-text-secondary hover:text-text-primary"}`,
120
+ onClick: () => F("grid"),
121
+ className: `p-1.5 rounded-button transition-colors ${M === "grid" ? "bg-bg-surface text-text-primary shadow-sm" : "text-text-secondary hover:text-text-primary"}`,
122
122
  title: "Grid view",
123
- children: /* @__PURE__ */ w("svg", {
123
+ children: /* @__PURE__ */ T("svg", {
124
124
  className: "size-4",
125
125
  fill: "none",
126
126
  viewBox: "0 0 24 24",
127
127
  stroke: "currentColor",
128
- children: /* @__PURE__ */ w("path", {
128
+ children: /* @__PURE__ */ T("path", {
129
129
  strokeLinecap: "round",
130
130
  strokeLinejoin: "round",
131
131
  strokeWidth: 2,
132
132
  d: "M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z"
133
133
  })
134
134
  })
135
- }), /* @__PURE__ */ w("button", {
135
+ }), /* @__PURE__ */ T("button", {
136
136
  type: "button",
137
- onClick: () => P("list"),
138
- className: `p-1.5 rounded-button transition-colors ${j === "list" ? "bg-bg-surface text-text-primary shadow-sm" : "text-text-secondary hover:text-text-primary"}`,
137
+ onClick: () => F("list"),
138
+ className: `p-1.5 rounded-button transition-colors ${M === "list" ? "bg-bg-surface text-text-primary shadow-sm" : "text-text-secondary hover:text-text-primary"}`,
139
139
  title: "List view",
140
- children: /* @__PURE__ */ w("svg", {
140
+ children: /* @__PURE__ */ T("svg", {
141
141
  className: "size-4",
142
142
  fill: "none",
143
143
  viewBox: "0 0 24 24",
144
144
  stroke: "currentColor",
145
- children: /* @__PURE__ */ w("path", {
145
+ children: /* @__PURE__ */ T("path", {
146
146
  strokeLinecap: "round",
147
147
  strokeLinejoin: "round",
148
148
  strokeWidth: 2,
@@ -152,97 +152,97 @@ var j = () => {
152
152
  })]
153
153
  })]
154
154
  }),
155
- z.length === 0 ? /* @__PURE__ */ w(D, {
155
+ B.length === 0 ? /* @__PURE__ */ T(O, {
156
156
  illustration: "empty-data",
157
157
  title: i("billing.plans.noPlansAvailable", "No plans available"),
158
158
  description: i("billing.plans.checkBackLater", "Check back later for new plans.")
159
- }) : j === "grid" ? /* @__PURE__ */ T("div", {
159
+ }) : M === "grid" ? /* @__PURE__ */ E("div", {
160
160
  className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 items-stretch",
161
- children: [z.map((e, t) => /* @__PURE__ */ w(F, {
161
+ children: [B.map((e, t) => /* @__PURE__ */ T(I, {
162
162
  plan: e,
163
- highlighted: t === B,
163
+ highlighted: t === V,
164
164
  onView: () => a(`/plans/${e.id}`),
165
- onSubscribe: () => g(e.id),
166
- action: h(e.id)
167
- }, e.id)), /* @__PURE__ */ w(M, { offer: x })]
168
- }) : /* @__PURE__ */ T("div", {
165
+ onSubscribe: () => j(e.id),
166
+ action: A(e.id)
167
+ }, e.id)), /* @__PURE__ */ T(N, { offer: h })]
168
+ }) : /* @__PURE__ */ E("div", {
169
169
  className: "space-y-3",
170
- children: [z.map((e) => /* @__PURE__ */ w(I, {
170
+ children: [B.map((e) => /* @__PURE__ */ T(L, {
171
171
  plan: e,
172
172
  onView: () => a(`/plans/${e.id}`),
173
- onSubscribe: () => g(e.id),
174
- action: h(e.id)
175
- }, e.id)), /* @__PURE__ */ w(N, { offer: x })]
173
+ onSubscribe: () => j(e.id),
174
+ action: A(e.id)
175
+ }, e.id)), /* @__PURE__ */ T(P, { offer: h })]
176
176
  })
177
177
  ]
178
178
  });
179
- }, M = ({ offer: e }) => /* @__PURE__ */ T("div", {
179
+ }, N = ({ offer: e }) => /* @__PURE__ */ E("div", {
180
180
  className: "border border-border-strong bg-[var(--color-accent-soft)] rounded-card shadow-elevation-1 p-5 flex flex-col h-full",
181
181
  children: [
182
- /* @__PURE__ */ T("div", {
182
+ /* @__PURE__ */ E("div", {
183
183
  className: "mb-4",
184
- children: [/* @__PURE__ */ T("div", {
184
+ children: [/* @__PURE__ */ E("div", {
185
185
  className: "flex items-center gap-2",
186
- children: [/* @__PURE__ */ w("h3", {
186
+ children: [/* @__PURE__ */ T("h3", {
187
187
  className: "text-lg font-semibold text-text-primary",
188
188
  children: "Enterprise"
189
- }), /* @__PURE__ */ w("span", {
189
+ }), /* @__PURE__ */ T("span", {
190
190
  className: "text-xs font-medium px-2 py-0.5 rounded-full bg-bg-surface text-text-link",
191
191
  children: "Contact Us"
192
192
  })]
193
- }), /* @__PURE__ */ w("span", {
193
+ }), /* @__PURE__ */ T("span", {
194
194
  className: "text-sm text-text-secondary",
195
195
  children: "Custom contract"
196
196
  })]
197
197
  }),
198
- /* @__PURE__ */ w("div", {
198
+ /* @__PURE__ */ T("div", {
199
199
  className: "flex items-baseline gap-1 mb-4",
200
- children: /* @__PURE__ */ w("span", {
200
+ children: /* @__PURE__ */ T("span", {
201
201
  className: "text-2xl font-semibold text-text-primary",
202
202
  children: "Custom pricing"
203
203
  })
204
204
  }),
205
- /* @__PURE__ */ w("ul", {
205
+ /* @__PURE__ */ T("ul", {
206
206
  className: "space-y-2 mb-4 flex-1",
207
- children: e.highlights.map((e) => /* @__PURE__ */ T("li", {
207
+ children: e.highlights.map((e) => /* @__PURE__ */ E("li", {
208
208
  className: "flex items-center gap-2 text-sm",
209
- children: [/* @__PURE__ */ w("svg", {
209
+ children: [/* @__PURE__ */ T("svg", {
210
210
  className: "size-4 text-status-success-text shrink-0",
211
211
  fill: "none",
212
212
  viewBox: "0 0 24 24",
213
213
  stroke: "currentColor",
214
- children: /* @__PURE__ */ w("path", {
214
+ children: /* @__PURE__ */ T("path", {
215
215
  strokeLinecap: "round",
216
216
  strokeLinejoin: "round",
217
217
  strokeWidth: 2,
218
218
  d: "M5 13l4 4L19 7"
219
219
  })
220
- }), /* @__PURE__ */ w("span", {
220
+ }), /* @__PURE__ */ T("span", {
221
221
  className: "text-text-primary",
222
222
  children: e
223
223
  })]
224
224
  }, e))
225
225
  }),
226
- /* @__PURE__ */ w("div", {
226
+ /* @__PURE__ */ T("div", {
227
227
  className: "space-y-2 pt-4 border-t border-border-subtle mt-auto",
228
- children: /* @__PURE__ */ w("a", {
229
- href: v(e),
228
+ children: /* @__PURE__ */ T("a", {
229
+ href: y(e),
230
230
  className: "block w-full px-4 py-2 text-sm font-medium text-center bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors duration-200",
231
231
  children: "Contact Us"
232
232
  })
233
233
  })
234
234
  ]
235
- }), N = ({ offer: e }) => /* @__PURE__ */ T("div", {
235
+ }), P = ({ offer: e }) => /* @__PURE__ */ E("div", {
236
236
  className: "flex items-center gap-4 p-5 border border-border-strong rounded-card bg-[var(--color-accent-soft)] shadow-elevation-1 transition-all duration-200 hover:shadow-elevation-2",
237
237
  children: [
238
- /* @__PURE__ */ w("div", {
238
+ /* @__PURE__ */ T("div", {
239
239
  className: "size-10 rounded-lg bg-bg-surface flex items-center justify-center shrink-0 shadow-elevation-1",
240
- children: /* @__PURE__ */ w("svg", {
240
+ children: /* @__PURE__ */ T("svg", {
241
241
  className: "size-5 text-text-link",
242
242
  fill: "none",
243
243
  viewBox: "0 0 24 24",
244
244
  stroke: "currentColor",
245
- children: /* @__PURE__ */ w("path", {
245
+ children: /* @__PURE__ */ T("path", {
246
246
  strokeLinecap: "round",
247
247
  strokeLinejoin: "round",
248
248
  strokeWidth: 2,
@@ -250,99 +250,99 @@ var j = () => {
250
250
  })
251
251
  })
252
252
  }),
253
- /* @__PURE__ */ T("div", {
253
+ /* @__PURE__ */ E("div", {
254
254
  className: "flex-1 min-w-0",
255
- children: [/* @__PURE__ */ T("div", {
255
+ children: [/* @__PURE__ */ E("div", {
256
256
  className: "flex items-center gap-2",
257
- children: [/* @__PURE__ */ w("h3", {
257
+ children: [/* @__PURE__ */ T("h3", {
258
258
  className: "font-semibold text-text-primary",
259
259
  children: "Enterprise"
260
- }), /* @__PURE__ */ w("span", {
260
+ }), /* @__PURE__ */ T("span", {
261
261
  className: "text-xs font-medium px-2 py-0.5 rounded-full bg-bg-surface text-text-link shrink-0",
262
262
  children: "Contact Us"
263
263
  })]
264
- }), /* @__PURE__ */ w("p", {
264
+ }), /* @__PURE__ */ T("p", {
265
265
  className: "text-sm text-text-secondary",
266
266
  children: e.summary
267
267
  })]
268
268
  }),
269
- /* @__PURE__ */ T("div", {
269
+ /* @__PURE__ */ E("div", {
270
270
  className: "text-right",
271
- children: [/* @__PURE__ */ w("div", {
271
+ children: [/* @__PURE__ */ T("div", {
272
272
  className: "font-semibold text-text-primary",
273
273
  children: "Custom pricing"
274
- }), /* @__PURE__ */ w("div", {
274
+ }), /* @__PURE__ */ T("div", {
275
275
  className: "text-sm text-text-secondary",
276
276
  children: "contract-based"
277
277
  })]
278
278
  }),
279
- /* @__PURE__ */ w("a", {
280
- href: v(e),
279
+ /* @__PURE__ */ T("a", {
280
+ href: y(e),
281
281
  className: "px-3 py-1.5 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors duration-200 shrink-0",
282
282
  children: "Contact Us"
283
283
  })
284
284
  ]
285
285
  });
286
- function P(e) {
286
+ function F(e) {
287
287
  return e?.kind === "current" ? "Current plan" : e?.kind === "change" ? "Change to this plan" : "Subscribe";
288
288
  }
289
- var F = ({ plan: e, highlighted: t = !1, onView: n, onSubscribe: o, action: s }) => {
290
- let c = A(e.features || []), l = k(e.features || []).length - c.length, u = m(), { price: d, currency: f } = p(e.price, e.currency, e.currencyPrices, u);
291
- return /* @__PURE__ */ T("div", {
289
+ var I = ({ plan: e, highlighted: t = !1, onView: n, onSubscribe: o, action: s }) => {
290
+ let c = j(e.features || []), l = A(e.features || []).length - c.length, u = h(), { price: d, currency: f } = m(e.price, e.currency, e.currencyPrices, u);
291
+ return /* @__PURE__ */ E("div", {
292
292
  className: `relative flex flex-col h-full rounded-card bg-bg-surface p-6 transition-[border-color,box-shadow] duration-200 ${t ? "border-2 border-action-primary-bg shadow-[var(--shadow-glow)]" : "border border-border-subtle shadow-elevation-1 hover:border-border-strong hover:shadow-elevation-2"}`,
293
293
  children: [
294
- s?.kind === "current" && /* @__PURE__ */ w("span", {
294
+ s?.kind === "current" && /* @__PURE__ */ T("span", {
295
295
  className: "absolute -top-3 right-4 inline-flex items-center rounded-full bg-bg-sunken px-3 py-1 text-xs font-semibold text-text-primary border border-border-subtle",
296
296
  children: "Current plan"
297
297
  }),
298
- t && /* @__PURE__ */ T("span", {
298
+ t && /* @__PURE__ */ E("span", {
299
299
  className: "absolute -top-3 left-1/2 -translate-x-1/2 inline-flex items-center gap-1 rounded-full bg-action-primary-bg px-3 py-1 text-xs font-semibold text-action-primary-text shadow-elevation-2",
300
- children: [/* @__PURE__ */ w(C, {
300
+ children: [/* @__PURE__ */ T(w, {
301
301
  className: "size-3.5",
302
302
  "aria-hidden": "true"
303
303
  }), "Most popular"]
304
304
  }),
305
- /* @__PURE__ */ T("div", {
305
+ /* @__PURE__ */ E("div", {
306
306
  className: "mb-4",
307
- children: [/* @__PURE__ */ w("h3", {
307
+ children: [/* @__PURE__ */ T("h3", {
308
308
  className: "text-lg font-semibold text-text-primary",
309
309
  children: e.name
310
- }), /* @__PURE__ */ w("span", {
310
+ }), /* @__PURE__ */ T("span", {
311
311
  className: "text-sm text-text-secondary",
312
312
  children: a(e.duration)
313
313
  })]
314
314
  }),
315
- /* @__PURE__ */ T("div", {
315
+ /* @__PURE__ */ E("div", {
316
316
  className: "flex items-baseline gap-1.5 mb-5",
317
- children: [/* @__PURE__ */ w("span", {
317
+ children: [/* @__PURE__ */ T("span", {
318
318
  className: "text-4xl font-bold tabular-nums tracking-tight text-text-primary",
319
319
  children: r(d, f)
320
- }), /* @__PURE__ */ T("span", {
320
+ }), /* @__PURE__ */ E("span", {
321
321
  className: "text-text-secondary text-sm",
322
322
  children: ["/ ", i(e.duration)]
323
323
  })]
324
324
  }),
325
- c.length > 0 && /* @__PURE__ */ T("ul", {
325
+ c.length > 0 && /* @__PURE__ */ E("ul", {
326
326
  className: "space-y-2.5 mb-5 flex-1",
327
- children: [c.map((e) => /* @__PURE__ */ T("li", {
327
+ children: [c.map((e) => /* @__PURE__ */ E("li", {
328
328
  className: "flex items-center justify-between gap-2 text-sm",
329
- children: [/* @__PURE__ */ T("span", {
329
+ children: [/* @__PURE__ */ E("span", {
330
330
  className: "flex items-center gap-2 min-w-0",
331
- children: [/* @__PURE__ */ w("span", {
331
+ children: [/* @__PURE__ */ T("span", {
332
332
  className: "flex size-5 shrink-0 items-center justify-center rounded-full bg-[var(--color-accent-soft)]",
333
- children: /* @__PURE__ */ w(S, {
333
+ children: /* @__PURE__ */ T(C, {
334
334
  className: "size-3 text-action-primary-bg",
335
335
  "aria-hidden": "true"
336
336
  })
337
- }), /* @__PURE__ */ w("span", {
337
+ }), /* @__PURE__ */ T("span", {
338
338
  className: "truncate text-text-primary",
339
- children: h[e.name] ?? e.name
339
+ children: g[e.name] ?? e.name
340
340
  })]
341
- }), /* @__PURE__ */ w("span", {
341
+ }), /* @__PURE__ */ T("span", {
342
342
  className: "font-semibold text-text-primary tabular-nums shrink-0",
343
- children: _(e.name, e.totalValue)
343
+ children: v(e.name, e.totalValue)
344
344
  })]
345
- }, e.quotaId)), l > 0 && /* @__PURE__ */ T("li", {
345
+ }, e.quotaId)), l > 0 && /* @__PURE__ */ E("li", {
346
346
  className: "text-sm text-text-secondary pl-7",
347
347
  children: [
348
348
  "+",
@@ -351,19 +351,19 @@ var F = ({ plan: e, highlighted: t = !1, onView: n, onSubscribe: o, action: s })
351
351
  ]
352
352
  })]
353
353
  }),
354
- /* @__PURE__ */ T("div", {
354
+ /* @__PURE__ */ E("div", {
355
355
  className: "space-y-2 pt-4 border-t border-border-subtle mt-auto",
356
- children: [/* @__PURE__ */ T("button", {
356
+ children: [/* @__PURE__ */ E("button", {
357
357
  type: "button",
358
358
  onClick: o,
359
359
  disabled: s?.kind === "current",
360
360
  "aria-disabled": s?.kind === "current",
361
361
  className: "group disabled:cursor-not-allowed disabled:opacity-60 inline-flex w-full items-center justify-center gap-2 rounded-button bg-action-primary-bg px-4 py-2.5 text-sm font-semibold text-action-primary-text shadow-elevation-1 transition-colors duration-200 hover:bg-action-primary-bgHover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
362
- children: [P(s), /* @__PURE__ */ w(x, {
362
+ children: [F(s), /* @__PURE__ */ T(S, {
363
363
  className: "size-4 transition-transform duration-200",
364
364
  "aria-hidden": "true"
365
365
  })]
366
- }), /* @__PURE__ */ w("button", {
366
+ }), /* @__PURE__ */ T("button", {
367
367
  type: "button",
368
368
  onClick: n,
369
369
  className: "w-full px-4 py-2 text-sm font-medium border border-border-subtle text-text-secondary rounded-button hover:bg-bg-sunken hover:text-text-primary hover:border-border-strong transition-colors duration-200",
@@ -372,19 +372,19 @@ var F = ({ plan: e, highlighted: t = !1, onView: n, onSubscribe: o, action: s })
372
372
  })
373
373
  ]
374
374
  });
375
- }, I = ({ plan: e, onView: t, onSubscribe: n, action: a }) => {
376
- let o = A(e.features || []), s = m();
377
- return /* @__PURE__ */ T("div", {
375
+ }, L = ({ plan: e, onView: t, onSubscribe: n, action: a }) => {
376
+ let o = j(e.features || []), s = h();
377
+ return /* @__PURE__ */ E("div", {
378
378
  className: "flex items-center gap-4 p-5 border border-border-seam rounded-card bg-bg-surface shadow-elevation-1 transition-all duration-200 hover:border-border-strong hover:shadow-elevation-2",
379
379
  children: [
380
- /* @__PURE__ */ w("div", {
380
+ /* @__PURE__ */ T("div", {
381
381
  className: "size-10 rounded-lg bg-[var(--color-accent-soft)] flex items-center justify-center shrink-0",
382
- children: /* @__PURE__ */ w("svg", {
382
+ children: /* @__PURE__ */ T("svg", {
383
383
  className: "size-5 text-text-link",
384
384
  fill: "none",
385
385
  viewBox: "0 0 24 24",
386
386
  stroke: "currentColor",
387
- children: /* @__PURE__ */ w("path", {
387
+ children: /* @__PURE__ */ T("path", {
388
388
  strokeLinecap: "round",
389
389
  strokeLinejoin: "round",
390
390
  strokeWidth: 2,
@@ -392,12 +392,12 @@ var F = ({ plan: e, highlighted: t = !1, onView: n, onSubscribe: o, action: s })
392
392
  })
393
393
  })
394
394
  }),
395
- /* @__PURE__ */ T("div", {
395
+ /* @__PURE__ */ E("div", {
396
396
  className: "flex-1 min-w-0",
397
- children: [/* @__PURE__ */ w("h3", {
397
+ children: [/* @__PURE__ */ T("h3", {
398
398
  className: "font-semibold text-text-primary truncate",
399
399
  children: e.name
400
- }), /* @__PURE__ */ T("p", {
400
+ }), /* @__PURE__ */ E("p", {
401
401
  className: "text-sm text-text-secondary",
402
402
  children: [
403
403
  o.length,
@@ -407,28 +407,28 @@ var F = ({ plan: e, highlighted: t = !1, onView: n, onSubscribe: o, action: s })
407
407
  ]
408
408
  })]
409
409
  }),
410
- /* @__PURE__ */ T("div", {
410
+ /* @__PURE__ */ E("div", {
411
411
  className: "text-right",
412
- children: [/* @__PURE__ */ w("div", {
412
+ children: [/* @__PURE__ */ T("div", {
413
413
  className: "font-semibold text-text-primary",
414
414
  children: (() => {
415
- let { price: t, currency: n } = p(e.price, e.currency, e.currencyPrices, s);
415
+ let { price: t, currency: n } = m(e.price, e.currency, e.currencyPrices, s);
416
416
  return r(t, n);
417
417
  })()
418
- }), /* @__PURE__ */ T("div", {
418
+ }), /* @__PURE__ */ E("div", {
419
419
  className: "text-sm text-text-secondary",
420
420
  children: ["per ", i(e.duration)]
421
421
  })]
422
422
  }),
423
- /* @__PURE__ */ T("div", {
423
+ /* @__PURE__ */ E("div", {
424
424
  className: "flex items-center gap-2",
425
- children: [/* @__PURE__ */ w("button", {
425
+ children: [/* @__PURE__ */ T("button", {
426
426
  type: "button",
427
427
  onClick: n,
428
428
  disabled: a?.kind === "current",
429
429
  className: "disabled:cursor-not-allowed disabled:opacity-60 px-3 py-1.5 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors duration-200",
430
- children: P(a)
431
- }), /* @__PURE__ */ w("button", {
430
+ children: F(a)
431
+ }), /* @__PURE__ */ T("button", {
432
432
  type: "button",
433
433
  onClick: t,
434
434
  className: "px-3 py-1.5 text-sm font-medium border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken hover:border-border-strong transition-all duration-200",
@@ -438,6 +438,6 @@ var F = ({ plan: e, highlighted: t = !1, onView: n, onSubscribe: o, action: s })
438
438
  ]
439
439
  });
440
440
  };
441
- export { j as PlansBrowsePage };
441
+ export { M as PlansBrowsePage };
442
442
 
443
443
  //# sourceMappingURL=PlansBrowsePage.js.map