@carlonicora/nextjs-jsonapi 4.0.4 → 4.0.6

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 (67) hide show
  1. package/dist/{BlockNoteEditor-FGVQP35E.mjs → BlockNoteEditor-6CTF5DEV.mjs} +5 -5
  2. package/dist/{BlockNoteEditor-BXMTGKDV.js → BlockNoteEditor-JJ3S5COJ.js} +20 -20
  3. package/dist/{BlockNoteEditor-BXMTGKDV.js.map → BlockNoteEditor-JJ3S5COJ.js.map} +1 -1
  4. package/dist/{BlockNoteViewer-DQYT6IJW.mjs → BlockNoteViewer-4THJHQMK.mjs} +3 -3
  5. package/dist/{BlockNoteViewer-YH7G66PS.js → BlockNoteViewer-TEC7DN2N.js} +4 -4
  6. package/dist/{BlockNoteViewer-YH7G66PS.js.map → BlockNoteViewer-TEC7DN2N.js.map} +1 -1
  7. package/dist/{JsonApiRequest-MEP6AXDT.mjs → JsonApiRequest-A66XK5WT.mjs} +2 -2
  8. package/dist/JsonApiRequest-FZGPLNUF.js +26 -0
  9. package/dist/{JsonApiRequest-OB6WL4LA.js.map → JsonApiRequest-FZGPLNUF.js.map} +1 -1
  10. package/dist/billing/index.js +400 -400
  11. package/dist/billing/index.mjs +4 -4
  12. package/dist/{chunk-6OFANJTE.js → chunk-5PNDDYGL.js} +32 -32
  13. package/dist/{chunk-6OFANJTE.js.map → chunk-5PNDDYGL.js.map} +1 -1
  14. package/dist/{chunk-5W5MN7JP.js → chunk-7ZRQOLSV.js} +13 -13
  15. package/dist/{chunk-5W5MN7JP.js.map → chunk-7ZRQOLSV.js.map} +1 -1
  16. package/dist/{chunk-TWBZ2GSX.js → chunk-C2WQXUL5.js} +3 -3
  17. package/dist/{chunk-TWBZ2GSX.js.map → chunk-C2WQXUL5.js.map} +1 -1
  18. package/dist/{chunk-JEQ34Z5E.js → chunk-DYTKNSHY.js} +15 -15
  19. package/dist/{chunk-JEQ34Z5E.js.map → chunk-DYTKNSHY.js.map} +1 -1
  20. package/dist/{chunk-WGVNJXZO.js → chunk-GHE4VT2R.js} +12 -12
  21. package/dist/{chunk-WGVNJXZO.js.map → chunk-GHE4VT2R.js.map} +1 -1
  22. package/dist/{chunk-3CZ2GK5R.mjs → chunk-IOG22OAO.mjs} +3 -3
  23. package/dist/{chunk-R6ZYB4VN.mjs → chunk-RDI62FAT.mjs} +2 -2
  24. package/dist/{chunk-7SCREMTX.mjs → chunk-V5MI7RNB.mjs} +2 -2
  25. package/dist/chunk-V5MI7RNB.mjs.map +1 -0
  26. package/dist/{chunk-ADZSH3MG.mjs → chunk-XTOEN5GN.mjs} +3 -3
  27. package/dist/{chunk-NFCXUAE6.js → chunk-XUUHPYMM.js} +849 -847
  28. package/dist/chunk-XUUHPYMM.js.map +1 -0
  29. package/dist/{chunk-WJC4SYRL.mjs → chunk-Y2AWOWWH.mjs} +20 -18
  30. package/dist/chunk-Y2AWOWWH.mjs.map +1 -0
  31. package/dist/{chunk-AQZ3T4BR.mjs → chunk-Z3226FM6.mjs} +5 -5
  32. package/dist/client/index.js +5 -5
  33. package/dist/client/index.mjs +4 -4
  34. package/dist/components/index.js +5 -5
  35. package/dist/components/index.mjs +4 -4
  36. package/dist/contexts/index.js +5 -5
  37. package/dist/contexts/index.mjs +4 -4
  38. package/dist/core/index.js +3 -3
  39. package/dist/core/index.mjs +2 -2
  40. package/dist/features/analytics/index.js +123 -123
  41. package/dist/features/analytics/index.mjs +5 -5
  42. package/dist/features/analytics/server.js +5 -5
  43. package/dist/features/analytics/server.mjs +3 -3
  44. package/dist/features/help/index.js +38 -38
  45. package/dist/features/help/index.mjs +4 -4
  46. package/dist/features/tokenusage/index.js +126 -126
  47. package/dist/features/tokenusage/index.mjs +5 -5
  48. package/dist/index.js +4 -4
  49. package/dist/index.mjs +3 -3
  50. package/dist/server/index.js +4 -4
  51. package/dist/server/index.mjs +3 -3
  52. package/package.json +1 -1
  53. package/src/core/utils/__tests__/translateResponse.test.ts +17 -0
  54. package/src/core/utils/translateResponse.ts +7 -3
  55. package/src/shadcnui/ui/__tests__/sidebar.session.test.tsx +136 -0
  56. package/src/shadcnui/ui/sidebar.tsx +21 -13
  57. package/dist/JsonApiRequest-OB6WL4LA.js +0 -26
  58. package/dist/chunk-7SCREMTX.mjs.map +0 -1
  59. package/dist/chunk-NFCXUAE6.js.map +0 -1
  60. package/dist/chunk-WJC4SYRL.mjs.map +0 -1
  61. /package/dist/{BlockNoteEditor-FGVQP35E.mjs.map → BlockNoteEditor-6CTF5DEV.mjs.map} +0 -0
  62. /package/dist/{BlockNoteViewer-DQYT6IJW.mjs.map → BlockNoteViewer-4THJHQMK.mjs.map} +0 -0
  63. /package/dist/{JsonApiRequest-MEP6AXDT.mjs.map → JsonApiRequest-A66XK5WT.mjs.map} +0 -0
  64. /package/dist/{chunk-3CZ2GK5R.mjs.map → chunk-IOG22OAO.mjs.map} +0 -0
  65. /package/dist/{chunk-R6ZYB4VN.mjs.map → chunk-RDI62FAT.mjs.map} +0 -0
  66. /package/dist/{chunk-ADZSH3MG.mjs.map → chunk-XTOEN5GN.mjs.map} +0 -0
  67. /package/dist/{chunk-AQZ3T4BR.mjs.map → chunk-Z3226FM6.mjs.map} +0 -0
@@ -62,10 +62,10 @@
62
62
 
63
63
 
64
64
 
65
- var _chunkNFCXUAE6js = require('../chunk-NFCXUAE6.js');
65
+ var _chunkXUUHPYMMjs = require('../chunk-XUUHPYMM.js');
66
66
 
67
67
 
68
- var _chunk5W5MN7JPjs = require('../chunk-5W5MN7JP.js');
68
+ var _chunk7ZRQOLSVjs = require('../chunk-7ZRQOLSV.js');
69
69
 
70
70
 
71
71
  var _chunkG4JR3SFVjs = require('../chunk-G4JR3SFV.js');
@@ -83,10 +83,10 @@ var _chunkG4JR3SFVjs = require('../chunk-G4JR3SFV.js');
83
83
 
84
84
 
85
85
 
86
- var _chunk6OFANJTEjs = require('../chunk-6OFANJTE.js');
86
+ var _chunk5PNDDYGLjs = require('../chunk-5PNDDYGL.js');
87
87
  require('../chunk-LXKSUWAV.js');
88
88
  require('../chunk-JTPRJNT2.js');
89
- require('../chunk-WGVNJXZO.js');
89
+ require('../chunk-GHE4VT2R.js');
90
90
  require('../chunk-3EPNHTMH.js');
91
91
 
92
92
 
@@ -134,41 +134,41 @@ function SubscriptionSummaryCard({
134
134
  onManageClick
135
135
  }) {
136
136
  if (loading) {
137
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Card, { children: [
138
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
139
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardTitle, { children: "Subscriptions" }),
137
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.Card, { children: [
138
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
139
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.CardTitle, { children: "Subscriptions" }),
140
140
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-4 w-4 text-muted-foreground" })
141
141
  ] }),
142
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardContent, { children: [
143
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Skeleton, { className: "h-6 w-32 mb-2" }),
144
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Skeleton, { className: "h-4 w-24 mb-1" }),
145
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Skeleton, { className: "h-4 w-40" })
142
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.CardContent, { children: [
143
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Skeleton, { className: "h-6 w-32 mb-2" }),
144
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Skeleton, { className: "h-4 w-24 mb-1" }),
145
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Skeleton, { className: "h-4 w-40" })
146
146
  ] })
147
147
  ] });
148
148
  }
149
149
  if (error) {
150
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Card, { children: [
151
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
152
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardTitle, { children: "Subscriptions" }),
150
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.Card, { children: [
151
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
152
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.CardTitle, { children: "Subscriptions" }),
153
153
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-4 w-4 text-muted-foreground" })
154
154
  ] }),
155
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
155
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
156
156
  ] });
157
157
  }
158
158
  const activeSubscriptions = subscriptions.filter(
159
159
  (sub) => sub.status === "active" /* ACTIVE */ || sub.status === "trialing" /* TRIALING */
160
160
  );
161
161
  const primarySubscription = activeSubscriptions[0];
162
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onManageClick, children: [
163
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
164
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardTitle, { children: "Subscriptions" }),
162
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onManageClick, children: [
163
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
164
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.CardTitle, { children: "Subscriptions" }),
165
165
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-4 w-4 text-muted-foreground" })
166
166
  ] }),
167
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardContent, { children: subscriptions.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
167
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.CardContent, { children: subscriptions.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
168
168
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold text-muted-foreground", children: "No active plan" }),
169
169
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground", children: "Subscribe to get started" }),
170
170
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
171
- _chunkNFCXUAE6js.Button,
171
+ _chunkXUUHPYMMjs.Button,
172
172
  {
173
173
  variant: "outline",
174
174
  size: "sm",
@@ -187,7 +187,7 @@ function SubscriptionSummaryCard({
187
187
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
188
188
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold", children: formatPlanName(primarySubscription) }),
189
189
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
190
- _chunkNFCXUAE6js.Badge,
190
+ _chunkXUUHPYMMjs.Badge,
191
191
  {
192
192
  variant: primarySubscription.cancelAtPeriodEnd ? "secondary" : getStatusBadgeVariant(primarySubscription.status),
193
193
  children: primarySubscription.cancelAtPeriodEnd ? "Canceling" : primarySubscription.status
@@ -229,37 +229,37 @@ function PaymentMethodSummaryCard({
229
229
  onManageClick
230
230
  }) {
231
231
  if (loading) {
232
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Card, { children: [
233
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
234
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardTitle, { children: "Payment Method" }),
232
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.Card, { children: [
233
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
234
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.CardTitle, { children: "Payment Method" }),
235
235
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Wallet, { className: "h-4 w-4 text-muted-foreground" })
236
236
  ] }),
237
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardContent, { children: [
238
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Skeleton, { className: "h-6 w-32 mb-2" }),
239
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Skeleton, { className: "h-4 w-24" })
237
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.CardContent, { children: [
238
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Skeleton, { className: "h-6 w-32 mb-2" }),
239
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Skeleton, { className: "h-4 w-24" })
240
240
  ] })
241
241
  ] });
242
242
  }
243
243
  if (error) {
244
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Card, { children: [
245
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
246
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardTitle, { children: "Payment Method" }),
244
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.Card, { children: [
245
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
246
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.CardTitle, { children: "Payment Method" }),
247
247
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Wallet, { className: "h-4 w-4 text-muted-foreground" })
248
248
  ] }),
249
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
249
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
250
250
  ] });
251
251
  }
252
252
  const defaultMethod = paymentMethods.find((pm) => pm.id === defaultPaymentMethodId) || paymentMethods[0];
253
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onManageClick, children: [
254
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
255
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardTitle, { children: "Payment Method" }),
253
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onManageClick, children: [
254
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
255
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.CardTitle, { children: "Payment Method" }),
256
256
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Wallet, { className: "h-4 w-4 text-muted-foreground" })
257
257
  ] }),
258
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardContent, { children: paymentMethods.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
258
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.CardContent, { children: paymentMethods.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
259
259
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold text-muted-foreground", children: "No payment method" }),
260
260
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground", children: "Add a card to enable subscriptions" }),
261
261
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
262
- _chunkNFCXUAE6js.Button,
262
+ _chunkXUUHPYMMjs.Button,
263
263
  {
264
264
  variant: "outline",
265
265
  size: "sm",
@@ -323,7 +323,7 @@ function CustomerInfoCard({ customer, loading, error }) {
323
323
  e.stopPropagation();
324
324
  setPortalLoading(true);
325
325
  try {
326
- const { url } = await _chunk6OFANJTEjs.StripeCustomerService.createPortalSession();
326
+ const { url } = await _chunk5PNDDYGLjs.StripeCustomerService.createPortalSession();
327
327
  window.open(url, "_blank");
328
328
  } catch (err) {
329
329
  console.error("[CustomerInfoCard] Failed to create portal session:", err);
@@ -332,52 +332,52 @@ function CustomerInfoCard({ customer, loading, error }) {
332
332
  }
333
333
  }, "handlePortalClick");
334
334
  if (loading) {
335
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Card, { children: [
336
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
337
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardTitle, { children: "Billing Account" }),
335
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.Card, { children: [
336
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
337
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.CardTitle, { children: "Billing Account" }),
338
338
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.User, { className: "h-4 w-4 text-muted-foreground" })
339
339
  ] }),
340
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardContent, { children: [
341
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Skeleton, { className: "h-6 w-32 mb-2" }),
342
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Skeleton, { className: "h-4 w-48 mb-1" }),
343
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Skeleton, { className: "h-4 w-24" })
340
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.CardContent, { children: [
341
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Skeleton, { className: "h-6 w-32 mb-2" }),
342
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Skeleton, { className: "h-4 w-48 mb-1" }),
343
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Skeleton, { className: "h-4 w-24" })
344
344
  ] })
345
345
  ] });
346
346
  }
347
347
  if (error) {
348
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Card, { children: [
349
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
350
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardTitle, { children: "Billing Account" }),
348
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.Card, { children: [
349
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
350
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.CardTitle, { children: "Billing Account" }),
351
351
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.User, { className: "h-4 w-4 text-muted-foreground" })
352
352
  ] }),
353
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
353
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
354
354
  ] });
355
355
  }
356
356
  if (!customer) {
357
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Card, { children: [
358
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
359
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardTitle, { children: "Billing Account" }),
357
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.Card, { children: [
358
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
359
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.CardTitle, { children: "Billing Account" }),
360
360
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.User, { className: "h-4 w-4 text-muted-foreground" })
361
361
  ] }),
362
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardContent, { children: [
362
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.CardContent, { children: [
363
363
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold text-muted-foreground", children: "Not set up" }),
364
364
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground", children: "Billing account will be created when you subscribe" })
365
365
  ] })
366
366
  ] });
367
367
  }
368
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Card, { children: [
369
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
370
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardTitle, { children: "Billing Account" }),
368
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.Card, { children: [
369
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
370
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.CardTitle, { children: "Billing Account" }),
371
371
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.User, { className: "h-4 w-4 text-muted-foreground" })
372
372
  ] }),
373
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
373
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
374
374
  customer.name && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold", children: customer.name }),
375
375
  customer.email && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: customer.email }),
376
376
  customer.balance !== void 0 && customer.balance !== 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: "text-sm", children: [
377
377
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground", children: "Credit Balance: " }),
378
378
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: customer.balance < 0 ? "text-success" : "text-destructive", children: formatBalance(customer.balance, customer.currency) })
379
379
  ] }),
380
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Button, { variant: "outline", size: "sm", className: "mt-2", onClick: handlePortalClick, disabled: portalLoading, children: [
380
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.Button, { variant: "outline", size: "sm", className: "mt-2", onClick: handlePortalClick, disabled: portalLoading, children: [
381
381
  portalLoading ? "Loading..." : "Manage in Stripe Portal",
382
382
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ExternalLink, { className: "h-4 w-4 ms-1" })
383
383
  ] })
@@ -421,42 +421,42 @@ function formatAmount(amount, currency) {
421
421
  _chunk7QVYU63Ejs.__name.call(void 0, formatAmount, "formatAmount");
422
422
  function InvoicesSummaryCard({ invoices, loading, error, onViewAllClick }) {
423
423
  if (loading) {
424
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Card, { children: [
425
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
426
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardTitle, { children: "Recent Invoices" }),
424
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.Card, { children: [
425
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
426
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.CardTitle, { children: "Recent Invoices" }),
427
427
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ReceiptIcon, { className: "h-4 w-4 text-muted-foreground" })
428
428
  ] }),
429
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardContent, { children: [
430
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Skeleton, { className: "h-6 w-24 mb-2" }),
431
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Skeleton, { className: "h-4 w-32 mb-1" }),
432
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Skeleton, { className: "h-4 w-20" })
429
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.CardContent, { children: [
430
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Skeleton, { className: "h-6 w-24 mb-2" }),
431
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Skeleton, { className: "h-4 w-32 mb-1" }),
432
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Skeleton, { className: "h-4 w-20" })
433
433
  ] })
434
434
  ] });
435
435
  }
436
436
  if (error) {
437
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Card, { children: [
438
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
439
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardTitle, { children: "Recent Invoices" }),
437
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.Card, { children: [
438
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
439
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.CardTitle, { children: "Recent Invoices" }),
440
440
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ReceiptIcon, { className: "h-4 w-4 text-muted-foreground" })
441
441
  ] }),
442
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
442
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
443
443
  ] });
444
444
  }
445
445
  const latestInvoice = invoices[0];
446
446
  const paidInvoices = invoices.filter((inv) => inv.status === "paid" /* PAID */);
447
447
  const openInvoices = invoices.filter((inv) => inv.status === "open" /* OPEN */);
448
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onViewAllClick, children: [
449
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
450
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardTitle, { children: "Recent Invoices" }),
448
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onViewAllClick, children: [
449
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
450
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.CardTitle, { children: "Recent Invoices" }),
451
451
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ReceiptIcon, { className: "h-4 w-4 text-muted-foreground" })
452
452
  ] }),
453
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardContent, { children: invoices.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
453
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.CardContent, { children: invoices.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
454
454
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold text-muted-foreground", children: "No invoices yet" }),
455
455
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground", children: "Invoices will appear after your first billing cycle" })
456
456
  ] }) : latestInvoice ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
457
457
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
458
458
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold", children: formatAmount(latestInvoice.total, latestInvoice.currency) }),
459
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Badge, { variant: getStatusBadgeVariant2(latestInvoice.status), children: latestInvoice.status })
459
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Badge, { variant: getStatusBadgeVariant2(latestInvoice.status), children: latestInvoice.status })
460
460
  ] }),
461
461
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: latestInvoice.stripeInvoiceNumber || `Invoice from ${formatDate2(latestInvoice.periodStart)}` }),
462
462
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-4 text-xs text-muted-foreground", children: [
@@ -496,24 +496,24 @@ function BillingUsageSummaryCard({
496
496
  onViewDetailsClick
497
497
  }) {
498
498
  if (loading) {
499
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Card, { children: [
500
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
501
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardTitle, { children: "Usage This Month" }),
499
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.Card, { children: [
500
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
501
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.CardTitle, { children: "Usage This Month" }),
502
502
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Activity, { className: "h-4 w-4 text-muted-foreground" })
503
503
  ] }),
504
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardContent, { children: [
505
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Skeleton, { className: "h-6 w-24 mb-2" }),
506
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Skeleton, { className: "h-4 w-32" })
504
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.CardContent, { children: [
505
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Skeleton, { className: "h-6 w-24 mb-2" }),
506
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Skeleton, { className: "h-4 w-32" })
507
507
  ] })
508
508
  ] });
509
509
  }
510
510
  if (error) {
511
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Card, { children: [
512
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
513
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardTitle, { children: "Usage This Month" }),
511
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.Card, { children: [
512
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
513
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.CardTitle, { children: "Usage This Month" }),
514
514
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Activity, { className: "h-4 w-4 text-muted-foreground" })
515
515
  ] }),
516
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
516
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
517
517
  ] });
518
518
  }
519
519
  const totalUsage = Object.values(summaries).reduce((acc, summary) => {
@@ -521,12 +521,12 @@ function BillingUsageSummaryCard({
521
521
  }, 0);
522
522
  const primaryMeter = meters.find((m) => _optionalChain([summaries, 'access', _17 => _17[m.id], 'optionalAccess', _18 => _18.aggregatedValue]));
523
523
  const primarySummary = primaryMeter ? summaries[primaryMeter.id] : null;
524
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onViewDetailsClick, children: [
525
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
526
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardTitle, { children: "Usage This Month" }),
524
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onViewDetailsClick, children: [
525
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
526
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.CardTitle, { children: "Usage This Month" }),
527
527
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Activity, { className: "h-4 w-4 text-muted-foreground" })
528
528
  ] }),
529
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardContent, { children: meters.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
529
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.CardContent, { children: meters.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
530
530
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold text-muted-foreground", children: "No meters" }),
531
531
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground", children: "No usage meters are configured" })
532
532
  ] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
@@ -578,7 +578,7 @@ function PaymentMethodForm({ onSuccess, onCancel, isLoading = false }) {
578
578
  const fetchSetupIntent = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
579
579
  setLoading(true);
580
580
  try {
581
- const intent = await _chunk6OFANJTEjs.StripeCustomerService.createSetupIntent();
581
+ const intent = await _chunk5PNDDYGLjs.StripeCustomerService.createSetupIntent();
582
582
  setSetupIntent(intent);
583
583
  } catch (err) {
584
584
  console.error("[PaymentMethodForm] Failed to create setup intent:", err);
@@ -616,7 +616,7 @@ function PaymentMethodForm({ onSuccess, onCancel, isLoading = false }) {
616
616
  return;
617
617
  }
618
618
  if (setAsDefault && _optionalChain([confirmedSetupIntent, 'optionalAccess', _19 => _19.payment_method])) {
619
- await _chunk6OFANJTEjs.StripeCustomerService.setDefaultPaymentMethod({
619
+ await _chunk5PNDDYGLjs.StripeCustomerService.setDefaultPaymentMethod({
620
620
  paymentMethodId: typeof confirmedSetupIntent.payment_method === "string" ? confirmedSetupIntent.payment_method : confirmedSetupIntent.payment_method.id
621
621
  });
622
622
  }
@@ -632,7 +632,7 @@ function PaymentMethodForm({ onSuccess, onCancel, isLoading = false }) {
632
632
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex items-center justify-center py-8", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground", children: "Loading payment form..." }) });
633
633
  }
634
634
  if (!setupIntent && error) {
635
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Alert, { variant: "destructive", className: "bg-red-50 border-red-200", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.AlertDescription, { children: error }) });
635
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Alert, { variant: "destructive", className: "bg-red-50 border-red-200", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.AlertDescription, { children: error }) });
636
636
  }
637
637
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: handleSubmit, className: "flex flex-col gap-y-4", children: [
638
638
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rounded-md border border-gray-300 p-3", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -655,13 +655,13 @@ function PaymentMethodForm({ onSuccess, onCancel, isLoading = false }) {
655
655
  }
656
656
  ) }),
657
657
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-2", children: [
658
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Checkbox, { id: "setAsDefault", checked: setAsDefault, onCheckedChange: (checked) => setSetAsDefault(!!checked) }),
659
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Label, { htmlFor: "setAsDefault", className: "cursor-pointer font-normal", children: "Set as default payment method" })
658
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Checkbox, { id: "setAsDefault", checked: setAsDefault, onCheckedChange: (checked) => setSetAsDefault(!!checked) }),
659
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Label, { htmlFor: "setAsDefault", className: "cursor-pointer font-normal", children: "Set as default payment method" })
660
660
  ] }),
661
- error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Alert, { variant: "destructive", className: "bg-red-50 border-red-200", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.AlertDescription, { children: error }) }),
661
+ error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Alert, { variant: "destructive", className: "bg-red-50 border-red-200", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.AlertDescription, { children: error }) }),
662
662
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-end gap-x-2", children: [
663
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Button, { type: "button", variant: "outline", onClick: onCancel, disabled: isSubmitting || isLoading, children: "Cancel" }),
664
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Button, { type: "submit", disabled: !stripe || isSubmitting || isLoading, children: isSubmitting ? "Processing..." : "Add Card" })
663
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Button, { type: "button", variant: "outline", onClick: onCancel, disabled: isSubmitting || isLoading, children: "Cancel" }),
664
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Button, { type: "submit", disabled: !stripe || isSubmitting || isLoading, children: isSubmitting ? "Processing..." : "Add Card" })
665
665
  ] })
666
666
  ] });
667
667
  }
@@ -677,10 +677,10 @@ function PaymentMethodEditor({ open, onOpenChange, onSuccess }) {
677
677
  const handleCancel = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
678
678
  onOpenChange(false);
679
679
  }, "handleCancel");
680
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.DialogContent, { className: "max-w-md", children: [
681
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.DialogHeader, { children: [
682
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.DialogTitle, { children: "Add Payment Method" }),
683
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.DialogDescription, { children: "Add a new payment method to your account. Your card information is securely processed by Stripe." })
680
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.DialogContent, { className: "max-w-md", children: [
681
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.DialogHeader, { children: [
682
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.DialogTitle, { children: "Add Payment Method" }),
683
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.DialogDescription, { children: "Add a new payment method to your account. Your card information is securely processed by Stripe." })
684
684
  ] }),
685
685
  open && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PaymentMethodForm, { onSuccess: handleSuccess, onCancel: handleCancel })
686
686
  ] }) });
@@ -704,7 +704,7 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
704
704
  _react.useEffect.call(void 0, () => {
705
705
  const loadCustomer = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
706
706
  try {
707
- const fetchedCustomer = await _chunk6OFANJTEjs.StripeCustomerService.getCustomer();
707
+ const fetchedCustomer = await _chunk5PNDDYGLjs.StripeCustomerService.getCustomer();
708
708
  setCustomer(fetchedCustomer);
709
709
  } catch (error) {
710
710
  console.error("[PaymentMethodCard] Failed to load customer:", error);
@@ -721,7 +721,7 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
721
721
  const handleSetDefault = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
722
722
  setLoading(true);
723
723
  try {
724
- await _chunk6OFANJTEjs.StripeCustomerService.setDefaultPaymentMethod({ paymentMethodId: paymentMethod.id });
724
+ await _chunk5PNDDYGLjs.StripeCustomerService.setDefaultPaymentMethod({ paymentMethodId: paymentMethod.id });
725
725
  onUpdate();
726
726
  } catch (error) {
727
727
  console.error("[PaymentMethodCard] Failed to set as default:", error);
@@ -732,7 +732,7 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
732
732
  const handleRemove = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
733
733
  setLoading(true);
734
734
  try {
735
- await _chunk6OFANJTEjs.StripeCustomerService.removePaymentMethod({ paymentMethodId: paymentMethod.id });
735
+ await _chunk5PNDDYGLjs.StripeCustomerService.removePaymentMethod({ paymentMethodId: paymentMethod.id });
736
736
  setShowRemoveDialog(false);
737
737
  onUpdate();
738
738
  } catch (error) {
@@ -741,16 +741,16 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
741
741
  }
742
742
  }, "handleRemove");
743
743
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
744
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Card, { className: "relative", children: [
745
- isDefault && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Badge, { variant: "softGreen", className: "absolute end-2 top-2", children: "Default" }),
746
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardHeader, { className: "flex flex-row items-center justify-between pb-2", children: [
744
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.Card, { className: "relative", children: [
745
+ isDefault && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Badge, { variant: "softGreen", className: "absolute end-2 top-2", children: "Default" }),
746
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.CardHeader, { className: "flex flex-row items-center justify-between pb-2", children: [
747
747
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-2", children: [
748
748
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-2xl", children: brandIcon }),
749
749
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm font-medium capitalize", children: brand })
750
750
  ] }),
751
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.DropdownMenu, { children: [
752
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.DropdownMenuTrigger, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
753
- _chunkNFCXUAE6js.Button,
751
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.DropdownMenu, { children: [
752
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.DropdownMenuTrigger, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
753
+ _chunkXUUHPYMMjs.Button,
754
754
  {
755
755
  render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", {}),
756
756
  nativeButton: false,
@@ -761,10 +761,10 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
761
761
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.MoreVertical, { className: "h-4 w-4" })
762
762
  }
763
763
  ) }),
764
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.DropdownMenuContent, { align: "end", children: [
765
- !isDefault && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.DropdownMenuItem, { onClick: handleSetDefault, disabled: loading, children: "Set as Default" }),
764
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.DropdownMenuContent, { align: "end", children: [
765
+ !isDefault && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.DropdownMenuItem, { onClick: handleSetDefault, disabled: loading, children: "Set as Default" }),
766
766
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
767
- _chunkNFCXUAE6js.DropdownMenuItem,
767
+ _chunkXUUHPYMMjs.DropdownMenuItem,
768
768
  {
769
769
  onClick: () => setShowRemoveDialog(true),
770
770
  disabled: loading,
@@ -775,7 +775,7 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
775
775
  ] })
776
776
  ] })
777
777
  ] }),
778
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-1", children: [
778
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-1", children: [
779
779
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: "text-lg font-semibold", children: [
780
780
  "\u2022\u2022\u2022\u2022 ",
781
781
  last4
@@ -788,17 +788,17 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
788
788
  ] })
789
789
  ] }) })
790
790
  ] }),
791
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.AlertDialog, { open: showRemoveDialog, onOpenChange: setShowRemoveDialog, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.AlertDialogContent, { children: [
792
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.AlertDialogHeader, { children: [
793
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.AlertDialogTitle, { children: "Remove Payment Method" }),
794
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.AlertDialogDescription, { children: [
791
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.AlertDialog, { open: showRemoveDialog, onOpenChange: setShowRemoveDialog, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.AlertDialogContent, { children: [
792
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.AlertDialogHeader, { children: [
793
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.AlertDialogTitle, { children: "Remove Payment Method" }),
794
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.AlertDialogDescription, { children: [
795
795
  "Are you sure you want to remove this payment method? This action cannot be undone.",
796
796
  isDefault && " This is your default payment method."
797
797
  ] })
798
798
  ] }),
799
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.AlertDialogFooter, { children: [
800
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.AlertDialogCancel, { disabled: loading, children: "Cancel" }),
801
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.AlertDialogAction, { onClick: handleRemove, disabled: loading, className: "bg-red-600 hover:bg-red-700", children: loading ? "Removing..." : "Remove" })
799
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.AlertDialogFooter, { children: [
800
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.AlertDialogCancel, { disabled: loading, children: "Cancel" }),
801
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.AlertDialogAction, { onClick: handleRemove, disabled: loading, className: "bg-red-600 hover:bg-red-700", children: loading ? "Removing..." : "Remove" })
802
802
  ] })
803
803
  ] }) })
804
804
  ] });
@@ -821,7 +821,7 @@ function PaymentMethodsContainer() {
821
821
  const loadPaymentMethods = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
822
822
  setLoading(true);
823
823
  try {
824
- const fetchedPaymentMethods = await _chunk6OFANJTEjs.StripeCustomerService.listPaymentMethods();
824
+ const fetchedPaymentMethods = await _chunk5PNDDYGLjs.StripeCustomerService.listPaymentMethods();
825
825
  setPaymentMethods(fetchedPaymentMethods);
826
826
  } catch (error) {
827
827
  console.error("[PaymentMethodsContainer] Failed to load payment methods:", error);
@@ -841,14 +841,14 @@ function PaymentMethodsContainer() {
841
841
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-8 w-8" }),
842
842
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h1", { className: "text-primary text-3xl font-semibold", children: "Payment Methods" })
843
843
  ] }),
844
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Button, { onClick: () => setShowAddPaymentMethod(true), children: "Add Payment Method" })
844
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Button, { onClick: () => setShowAddPaymentMethod(true), children: "Add Payment Method" })
845
845
  ] }),
846
846
  paymentMethods.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col items-center justify-center gap-y-4 rounded-lg border-2 border-dashed border-gray-300 bg-muted/50 p-12", children: [
847
847
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-16 w-16 text-muted-foreground" }),
848
848
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-center", children: [
849
849
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "mb-2 text-sm font-medium", children: "No payment methods" }),
850
850
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "mb-4 text-muted-foreground", children: "Add a payment method to enable subscriptions and secure checkout." }),
851
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Button, { onClick: () => setShowAddPaymentMethod(true), children: "Add Your First Card" })
851
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Button, { onClick: () => setShowAddPaymentMethod(true), children: "Add Your First Card" })
852
852
  ] })
853
853
  ] }),
854
854
  paymentMethods.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PaymentMethodsList, { paymentMethods, onUpdate: loadPaymentMethods }),
@@ -916,7 +916,7 @@ var statusConfig = {
916
916
  };
917
917
  function InvoiceStatusBadge({ status }) {
918
918
  const config = statusConfig[status] || statusConfig["draft" /* DRAFT */];
919
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Badge, { variant: config.variant, children: config.label });
919
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Badge, { variant: config.variant, children: config.label });
920
920
  }
921
921
  _chunk7QVYU63Ejs.__name.call(void 0, InvoiceStatusBadge, "InvoiceStatusBadge");
922
922
 
@@ -947,13 +947,13 @@ function InvoiceDetails({
947
947
  return invoice.stripeInvoiceId.slice(-8);
948
948
  }, "getInvoiceNumber");
949
949
  const productName = _optionalChain([invoice, 'access', _29 => _29.subscription, 'optionalAccess', _30 => _30.price, 'optionalAccess', _31 => _31.product, 'optionalAccess', _32 => _32.name]) || "Subscription";
950
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.DialogContent, { className: "max-w-2xl", children: [
951
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.DialogHeader, { children: [
952
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.DialogTitle, { children: [
950
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.DialogContent, { className: "max-w-2xl", children: [
951
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.DialogHeader, { children: [
952
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.DialogTitle, { children: [
953
953
  "Invoice ",
954
954
  getInvoiceNumber()
955
955
  ] }),
956
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.DialogDescription, { children: formatDate3(invoice.periodStart) })
956
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.DialogDescription, { children: formatDate3(invoice.periodStart) })
957
957
  ] }),
958
958
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-6", children: [
959
959
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-3", children: [
@@ -991,42 +991,42 @@ function InvoiceDetails({
991
991
  ] }) }),
992
992
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tbody", { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "tr", { className: "border-t", children: [
993
993
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "p-3", children: productName }),
994
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "p-3 text-end", children: _chunkNFCXUAE6js.formatCurrency.call(void 0, invoice.subtotal, invoice.currency) })
994
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "p-3 text-end", children: _chunkXUUHPYMMjs.formatCurrency.call(void 0, invoice.subtotal, invoice.currency) })
995
995
  ] }) })
996
996
  ] }) })
997
997
  ] }),
998
998
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2 border-t pt-4", children: [
999
999
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between", children: [
1000
1000
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: "Subtotal:" }),
1001
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm", children: _chunkNFCXUAE6js.formatCurrency.call(void 0, invoice.subtotal, invoice.currency) })
1001
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm", children: _chunkXUUHPYMMjs.formatCurrency.call(void 0, invoice.subtotal, invoice.currency) })
1002
1002
  ] }),
1003
1003
  invoice.tax !== void 0 && invoice.tax > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between", children: [
1004
1004
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: "Tax:" }),
1005
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm", children: _chunkNFCXUAE6js.formatCurrency.call(void 0, invoice.tax, invoice.currency) })
1005
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm", children: _chunkXUUHPYMMjs.formatCurrency.call(void 0, invoice.tax, invoice.currency) })
1006
1006
  ] }),
1007
1007
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between text-lg font-semibold border-t pt-2", children: [
1008
1008
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Total:" }),
1009
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _chunkNFCXUAE6js.formatCurrency.call(void 0, invoice.total, invoice.currency) })
1009
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _chunkXUUHPYMMjs.formatCurrency.call(void 0, invoice.total, invoice.currency) })
1010
1010
  ] }),
1011
1011
  invoice.amountPaid > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between", children: [
1012
1012
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: "Amount Paid:" }),
1013
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm text-success", children: _chunkNFCXUAE6js.formatCurrency.call(void 0, invoice.amountPaid, invoice.currency) })
1013
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm text-success", children: _chunkXUUHPYMMjs.formatCurrency.call(void 0, invoice.amountPaid, invoice.currency) })
1014
1014
  ] }),
1015
1015
  invoice.amountRemaining > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between", children: [
1016
1016
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: "Amount Due:" }),
1017
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm text-destructive", children: _chunkNFCXUAE6js.formatCurrency.call(void 0, invoice.amountRemaining, invoice.currency) })
1017
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm text-destructive", children: _chunkXUUHPYMMjs.formatCurrency.call(void 0, invoice.amountRemaining, invoice.currency) })
1018
1018
  ] })
1019
1019
  ] }),
1020
1020
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-wrap gap-2 pt-4 border-t", children: [
1021
- invoice.stripePdfUrl && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Button, { variant: "outline", onClick: handleDownloadPDF, children: [
1021
+ invoice.stripePdfUrl && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.Button, { variant: "outline", onClick: handleDownloadPDF, children: [
1022
1022
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Download, { className: "me-2 h-4 w-4" }),
1023
1023
  "Download PDF"
1024
1024
  ] }),
1025
- invoice.status === "open" /* OPEN */ && invoice.attempted && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Button, { variant: "default", onClick: handleRetryPayment, children: [
1025
+ invoice.status === "open" /* OPEN */ && invoice.attempted && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.Button, { variant: "default", onClick: handleRetryPayment, children: [
1026
1026
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.RefreshCw, { className: "me-2 h-4 w-4" }),
1027
1027
  "Retry Payment"
1028
1028
  ] }),
1029
- invoice.stripeHostedInvoiceUrl && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Button, { variant: "outline", onClick: handleViewInStripe, children: [
1029
+ invoice.stripeHostedInvoiceUrl && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.Button, { variant: "outline", onClick: handleViewInStripe, children: [
1030
1030
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ExternalLink, { className: "me-2 h-4 w-4" }),
1031
1031
  "View in Stripe"
1032
1032
  ] })
@@ -1050,30 +1050,30 @@ function InvoicesList({ invoices, onInvoicesChange }) {
1050
1050
  return invoice.stripeInvoiceId.slice(-8);
1051
1051
  }, "getInvoiceNumber");
1052
1052
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1053
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border rounded-lg overflow-clip", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Table, { children: [
1054
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.TableRow, { children: [
1055
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableHead, { children: "Invoice #" }),
1056
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableHead, { children: "Date" }),
1057
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableHead, { children: "Status" }),
1058
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableHead, { className: "text-end", children: "Amount" }),
1059
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableHead, { children: "Period" })
1053
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border rounded-lg overflow-clip", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.Table, { children: [
1054
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.TableRow, { children: [
1055
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.TableHead, { children: "Invoice #" }),
1056
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.TableHead, { children: "Date" }),
1057
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.TableHead, { children: "Status" }),
1058
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.TableHead, { className: "text-end", children: "Amount" }),
1059
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.TableHead, { children: "Period" })
1060
1060
  ] }) }),
1061
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableBody, { children: invoices.map((invoice) => {
1061
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.TableBody, { children: invoices.map((invoice) => {
1062
1062
  const invoiceNumber = getInvoiceNumber(invoice);
1063
1063
  const date = formatDate3(invoice.periodStart);
1064
- const amount = _chunkNFCXUAE6js.formatCurrency.call(void 0, invoice.total, invoice.currency);
1064
+ const amount = _chunkXUUHPYMMjs.formatCurrency.call(void 0, invoice.total, invoice.currency);
1065
1065
  const period = `${formatDate3(invoice.periodStart)} - ${formatDate3(invoice.periodEnd)}`;
1066
1066
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1067
- _chunkNFCXUAE6js.TableRow,
1067
+ _chunkXUUHPYMMjs.TableRow,
1068
1068
  {
1069
1069
  onClick: () => handleRowClick(invoice),
1070
1070
  className: "cursor-pointer hover:bg-muted/50",
1071
1071
  children: [
1072
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableCell, { className: "font-medium", children: invoiceNumber }),
1073
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableCell, { className: "text-muted-foreground text-xs", children: date }),
1074
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableCell, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, InvoiceStatusBadge, { status: invoice.status }) }),
1075
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableCell, { className: "text-end font-medium", children: amount }),
1076
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableCell, { className: "text-muted-foreground text-xs", children: period })
1072
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.TableCell, { className: "font-medium", children: invoiceNumber }),
1073
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.TableCell, { className: "text-muted-foreground text-xs", children: date }),
1074
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.TableCell, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, InvoiceStatusBadge, { status: invoice.status }) }),
1075
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.TableCell, { className: "text-end font-medium", children: amount }),
1076
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.TableCell, { className: "text-muted-foreground text-xs", children: period })
1077
1077
  ]
1078
1078
  },
1079
1079
  invoice.id
@@ -1106,7 +1106,7 @@ function InvoicesContainer() {
1106
1106
  setLoading(true);
1107
1107
  try {
1108
1108
  const params = statusFilter !== "all" ? { status: statusFilter } : void 0;
1109
- const data = await _chunk6OFANJTEjs.StripeInvoiceService.listInvoices(params);
1109
+ const data = await _chunk5PNDDYGLjs.StripeInvoiceService.listInvoices(params);
1110
1110
  setInvoices(data);
1111
1111
  } catch (error) {
1112
1112
  console.error("[InvoicesContainer] Failed to load invoices:", error);
@@ -1122,12 +1122,12 @@ function InvoicesContainer() {
1122
1122
  setStatusFilter(value);
1123
1123
  }, "handleFilterChange");
1124
1124
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-4", children: [
1125
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Tabs, { value: statusFilter, onValueChange: handleFilterChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.TabsList, { children: [
1126
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TabsTrigger, { value: "all", children: "All" }),
1127
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TabsTrigger, { value: "paid" /* PAID */, children: "Paid" }),
1128
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TabsTrigger, { value: "open" /* OPEN */, children: "Open" }),
1129
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TabsTrigger, { value: "void" /* VOID */, children: "Void" }),
1130
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TabsTrigger, { value: "uncollectible" /* UNCOLLECTIBLE */, children: "Uncollectible" })
1125
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Tabs, { value: statusFilter, onValueChange: handleFilterChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.TabsList, { children: [
1126
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.TabsTrigger, { value: "all", children: "All" }),
1127
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.TabsTrigger, { value: "paid" /* PAID */, children: "Paid" }),
1128
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.TabsTrigger, { value: "open" /* OPEN */, children: "Open" }),
1129
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.TabsTrigger, { value: "void" /* VOID */, children: "Void" }),
1130
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.TabsTrigger, { value: "uncollectible" /* UNCOLLECTIBLE */, children: "Uncollectible" })
1131
1131
  ] }) }),
1132
1132
  loading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-center py-8 text-muted-foreground", children: "Loading invoices..." }),
1133
1133
  !loading && invoices.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "border border-dashed border-gray-300 rounded-lg p-8 text-center", children: [
@@ -1174,7 +1174,7 @@ function CancelSubscriptionDialog({
1174
1174
  const onSubmit = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (_values) => {
1175
1175
  setIsSubmitting(true);
1176
1176
  try {
1177
- await _chunk6OFANJTEjs.StripeSubscriptionService.cancelSubscription({
1177
+ await _chunk5PNDDYGLjs.StripeSubscriptionService.cancelSubscription({
1178
1178
  id: subscription.id,
1179
1179
  cancelImmediately: false
1180
1180
  });
@@ -1187,19 +1187,19 @@ function CancelSubscriptionDialog({
1187
1187
  }
1188
1188
  }, "onSubmit");
1189
1189
  const periodEndDate = formatDate3(subscription.currentPeriodEnd);
1190
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.DialogContent, { className: "max-w-md", children: [
1191
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.DialogHeader, { children: [
1192
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.DialogTitle, { children: "Cancel Subscription" }),
1193
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.DialogDescription, { children: "Are you sure you want to cancel this subscription? This action cannot be undone." })
1190
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.DialogContent, { className: "max-w-md", children: [
1191
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.DialogHeader, { children: [
1192
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.DialogTitle, { children: "Cancel Subscription" }),
1193
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.DialogDescription, { children: "Are you sure you want to cancel this subscription? This action cannot be undone." })
1194
1194
  ] }),
1195
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Form, { ...form, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: form.handleSubmit(onSubmit), className: "flex flex-col gap-y-4", children: [
1195
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Form, { ...form, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: form.handleSubmit(onSubmit), className: "flex flex-col gap-y-4", children: [
1196
1196
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "bg-primary/10 border-primary/30 text-foreground rounded-lg border p-3 text-sm", children: [
1197
1197
  "Your subscription will remain active until ",
1198
1198
  periodEndDate,
1199
1199
  ". You can continue using the service until then."
1200
1200
  ] }),
1201
1201
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1202
- _chunkNFCXUAE6js.FormTextarea,
1202
+ _chunkXUUHPYMMjs.FormTextarea,
1203
1203
  {
1204
1204
  form,
1205
1205
  id: "reason",
@@ -1209,8 +1209,8 @@ function CancelSubscriptionDialog({
1209
1209
  }
1210
1210
  ),
1211
1211
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex gap-x-2 justify-end pt-2", children: [
1212
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Button, { type: "button", variant: "outline", onClick: () => onOpenChange(false), disabled: isSubmitting, children: "Keep Subscription" }),
1213
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Button, { type: "submit", variant: "destructive", disabled: isSubmitting, children: isSubmitting ? "Canceling..." : "Confirm Cancellation" })
1212
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Button, { type: "button", variant: "outline", onClick: () => onOpenChange(false), disabled: isSubmitting, children: "Keep Subscription" }),
1213
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Button, { type: "submit", variant: "destructive", disabled: isSubmitting, children: isSubmitting ? "Canceling..." : "Confirm Cancellation" })
1214
1214
  ] })
1215
1215
  ] }) })
1216
1216
  ] }) });
@@ -1259,7 +1259,7 @@ var cancelingConfig = {
1259
1259
  };
1260
1260
  function SubscriptionStatusBadge({ status, cancelAtPeriodEnd }) {
1261
1261
  const config = cancelAtPeriodEnd ? cancelingConfig : statusConfig2[status] || statusConfig2["canceled" /* CANCELED */];
1262
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Badge, { variant: config.variant, children: config.label });
1262
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Badge, { variant: config.variant, children: config.label });
1263
1263
  }
1264
1264
  _chunk7QVYU63Ejs.__name.call(void 0, SubscriptionStatusBadge, "SubscriptionStatusBadge");
1265
1265
 
@@ -1286,7 +1286,7 @@ function formatPlanName2(price) {
1286
1286
  _chunk7QVYU63Ejs.__name.call(void 0, formatPlanName2, "formatPlanName");
1287
1287
  function formatBillingAmount(price) {
1288
1288
  if (!_optionalChain([price, 'optionalAccess', _37 => _37.unitAmount])) return "N/A";
1289
- return _chunkNFCXUAE6js.formatCurrency.call(void 0, price.unitAmount, price.currency);
1289
+ return _chunkXUUHPYMMjs.formatCurrency.call(void 0, price.unitAmount, price.currency);
1290
1290
  }
1291
1291
  _chunk7QVYU63Ejs.__name.call(void 0, formatBillingAmount, "formatBillingAmount");
1292
1292
  function SubscriptionDetails({
@@ -1301,7 +1301,7 @@ function SubscriptionDetails({
1301
1301
  const handlePause = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
1302
1302
  setIsProcessing(true);
1303
1303
  try {
1304
- await _chunk6OFANJTEjs.StripeSubscriptionService.pauseSubscription({ subscriptionId: subscription.id });
1304
+ await _chunk5PNDDYGLjs.StripeSubscriptionService.pauseSubscription({ subscriptionId: subscription.id });
1305
1305
  onSubscriptionChange();
1306
1306
  } catch (error) {
1307
1307
  console.error("[SubscriptionDetails] Failed to pause subscription:", error);
@@ -1312,7 +1312,7 @@ function SubscriptionDetails({
1312
1312
  const handleResume = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
1313
1313
  setIsProcessing(true);
1314
1314
  try {
1315
- await _chunk6OFANJTEjs.StripeSubscriptionService.resumeSubscription({ subscriptionId: subscription.id });
1315
+ await _chunk5PNDDYGLjs.StripeSubscriptionService.resumeSubscription({ subscriptionId: subscription.id });
1316
1316
  onSubscriptionChange();
1317
1317
  } catch (error) {
1318
1318
  console.error("[SubscriptionDetails] Failed to resume subscription:", error);
@@ -1322,7 +1322,7 @@ function SubscriptionDetails({
1322
1322
  }, "handleResume");
1323
1323
  const handleManageViaPortal = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
1324
1324
  try {
1325
- const { url } = await _chunk6OFANJTEjs.StripeCustomerService.createPortalSession();
1325
+ const { url } = await _chunk5PNDDYGLjs.StripeCustomerService.createPortalSession();
1326
1326
  window.open(url, "_blank");
1327
1327
  } catch (error) {
1328
1328
  console.error("[SubscriptionDetails] Failed to create portal session:", error);
@@ -1332,10 +1332,10 @@ function SubscriptionDetails({
1332
1332
  const canResume = subscription.status === "paused" /* PAUSED */;
1333
1333
  const canCancel = subscription.status === "active" /* ACTIVE */ || subscription.status === "trialing" /* TRIALING */ || subscription.status === "paused" /* PAUSED */;
1334
1334
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1335
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.DialogContent, { className: "max-w-2xl", children: [
1336
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.DialogHeader, { children: [
1337
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.DialogTitle, { children: "Subscription Details" }),
1338
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.DialogDescription, { children: "View and manage your subscription" })
1335
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.DialogContent, { className: "max-w-2xl", children: [
1336
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.DialogHeader, { children: [
1337
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.DialogTitle, { children: "Subscription Details" }),
1338
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.DialogDescription, { children: "View and manage your subscription" })
1339
1339
  ] }),
1340
1340
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-6", children: [
1341
1341
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-3", children: [
@@ -1377,11 +1377,11 @@ function SubscriptionDetails({
1377
1377
  "."
1378
1378
  ] }) }),
1379
1379
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-wrap gap-2 pt-4 border-t", children: [
1380
- onChangePlan && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Button, { variant: "default", onClick: () => onChangePlan(subscription), children: "Change Plan" }),
1381
- canPause && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Button, { variant: "outline", onClick: handlePause, disabled: isProcessing, children: isProcessing ? "Pausing..." : "Pause" }),
1382
- canResume && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Button, { variant: "outline", onClick: handleResume, disabled: isProcessing, children: isProcessing ? "Resuming..." : "Resume" }),
1383
- canCancel && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Button, { variant: "destructive", onClick: () => setShowCancel(true), children: "Cancel" }),
1384
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Button, { variant: "outline", onClick: handleManageViaPortal, children: "Manage via Portal" })
1380
+ onChangePlan && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Button, { variant: "default", onClick: () => onChangePlan(subscription), children: "Change Plan" }),
1381
+ canPause && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Button, { variant: "outline", onClick: handlePause, disabled: isProcessing, children: isProcessing ? "Pausing..." : "Pause" }),
1382
+ canResume && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Button, { variant: "outline", onClick: handleResume, disabled: isProcessing, children: isProcessing ? "Resuming..." : "Resume" }),
1383
+ canCancel && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Button, { variant: "destructive", onClick: () => setShowCancel(true), children: "Cancel" }),
1384
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Button, { variant: "outline", onClick: handleManageViaPortal, children: "Manage via Portal" })
1385
1385
  ] })
1386
1386
  ] })
1387
1387
  ] }) }),
@@ -1428,36 +1428,36 @@ function SubscriptionsList({ subscriptions, onSubscriptionsChange, onChangePlan
1428
1428
  setSelectedSub(subscription);
1429
1429
  }, "handleRowClick");
1430
1430
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1431
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border rounded-lg overflow-clip", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Table, { children: [
1432
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.TableRow, { children: [
1433
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableHead, { children: "Status" }),
1434
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableHead, { children: "Plan" }),
1435
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableHead, { children: "Period" }),
1436
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableHead, { className: "text-end", children: "Amount" }),
1437
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableHead, { className: "text-end", children: "Actions" })
1431
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border rounded-lg overflow-clip", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.Table, { children: [
1432
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.TableRow, { children: [
1433
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.TableHead, { children: "Status" }),
1434
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.TableHead, { children: "Plan" }),
1435
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.TableHead, { children: "Period" }),
1436
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.TableHead, { className: "text-end", children: "Amount" }),
1437
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.TableHead, { className: "text-end", children: "Actions" })
1438
1438
  ] }) }),
1439
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableBody, { children: subscriptions.map((subscription) => {
1439
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.TableBody, { children: subscriptions.map((subscription) => {
1440
1440
  const price = subscription.price;
1441
- const amount = _optionalChain([price, 'optionalAccess', _42 => _42.unitAmount]) ? _chunkNFCXUAE6js.formatCurrency.call(void 0, price.unitAmount, price.currency) : "0";
1441
+ const amount = _optionalChain([price, 'optionalAccess', _42 => _42.unitAmount]) ? _chunkXUUHPYMMjs.formatCurrency.call(void 0, price.unitAmount, price.currency) : "0";
1442
1442
  const period = `${formatDate3(subscription.currentPeriodStart)} - ${formatDate3(subscription.currentPeriodEnd)}`;
1443
1443
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1444
- _chunkNFCXUAE6js.TableRow,
1444
+ _chunkXUUHPYMMjs.TableRow,
1445
1445
  {
1446
1446
  onClick: () => handleRowClick(subscription),
1447
1447
  className: "cursor-pointer hover:bg-muted/50",
1448
1448
  children: [
1449
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableCell, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1449
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.TableCell, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1450
1450
  SubscriptionStatusBadge,
1451
1451
  {
1452
1452
  status: subscription.status,
1453
1453
  cancelAtPeriodEnd: subscription.cancelAtPeriodEnd
1454
1454
  }
1455
1455
  ) }),
1456
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableCell, { className: "font-medium", children: formatPlanName3(price) }),
1457
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableCell, { className: "text-muted-foreground text-sm", children: period }),
1458
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableCell, { className: "text-end font-medium", children: amount }),
1459
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableCell, { className: "text-end", children: (subscription.status === "active" /* ACTIVE */ || subscription.status === "trialing" /* TRIALING */) && onChangePlan && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1460
- _chunkNFCXUAE6js.Button,
1456
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.TableCell, { className: "font-medium", children: formatPlanName3(price) }),
1457
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.TableCell, { className: "text-muted-foreground text-sm", children: period }),
1458
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.TableCell, { className: "text-end font-medium", children: amount }),
1459
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.TableCell, { className: "text-end", children: (subscription.status === "active" /* ACTIVE */ || subscription.status === "trialing" /* TRIALING */) && onChangePlan && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1460
+ _chunkXUUHPYMMjs.Button,
1461
1461
  {
1462
1462
  size: "sm",
1463
1463
  variant: "outline",
@@ -1502,7 +1502,7 @@ function SubscriptionsContainer({ onOpenWizard, hasActiveRecurringSubscription }
1502
1502
  const loadSubscriptions = _react.useCallback.call(void 0, async () => {
1503
1503
  setLoading(true);
1504
1504
  try {
1505
- const fetchedSubscriptions = await _chunk6OFANJTEjs.StripeSubscriptionService.listSubscriptions();
1505
+ const fetchedSubscriptions = await _chunk5PNDDYGLjs.StripeSubscriptionService.listSubscriptions();
1506
1506
  setSubscriptions(fetchedSubscriptions);
1507
1507
  } catch (error) {
1508
1508
  console.error("[SubscriptionsContainer] Failed to load subscriptions:", error);
@@ -1525,7 +1525,7 @@ function SubscriptionsContainer({ onOpenWizard, hasActiveRecurringSubscription }
1525
1525
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-8 w-8" }),
1526
1526
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h1", { className: "text-primary text-3xl font-semibold", children: "Subscriptions" })
1527
1527
  ] }),
1528
- subscriptions.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Button, { onClick: () => _optionalChain([onOpenWizard, 'optionalCall', _43 => _43()]), children: hasActiveRecurringSubscription ? "Purchase Add-ons" : "Subscribe to a Plan" })
1528
+ subscriptions.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Button, { onClick: () => _optionalChain([onOpenWizard, 'optionalCall', _43 => _43()]), children: hasActiveRecurringSubscription ? "Purchase Add-ons" : "Subscribe to a Plan" })
1529
1529
  ] }),
1530
1530
  criticalSubscriptions.map((subscription) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BillingAlertBanner, { subscription }, subscription.id)),
1531
1531
  subscriptions.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col items-center justify-center py-12 space-y-4", children: [
@@ -1533,7 +1533,7 @@ function SubscriptionsContainer({ onOpenWizard, hasActiveRecurringSubscription }
1533
1533
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-center", children: [
1534
1534
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "text-sm font-medium mb-2", children: "No Active Subscriptions" }),
1535
1535
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground mb-6", children: "Choose a subscription plan to get started with our services." }),
1536
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Button, { onClick: () => _optionalChain([onOpenWizard, 'optionalCall', _44 => _44()]), children: "Subscribe to a Plan" })
1536
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Button, { onClick: () => _optionalChain([onOpenWizard, 'optionalCall', _44 => _44()]), children: "Subscribe to a Plan" })
1537
1537
  ] })
1538
1538
  ] }),
1539
1539
  subscriptions.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -1554,9 +1554,9 @@ function IntervalToggle({ value, onChange, hasMonthly, hasYearly }) {
1554
1554
  if (!hasMonthly || !hasYearly) {
1555
1555
  return null;
1556
1556
  }
1557
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Tabs, { value, onValueChange: (v) => onChange(v), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.TabsList, { children: [
1558
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TabsTrigger, { value: "month", children: "Monthly" }),
1559
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TabsTrigger, { value: "year", children: "Yearly" })
1557
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Tabs, { value, onValueChange: (v) => onChange(v), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.TabsList, { children: [
1558
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.TabsTrigger, { value: "month", children: "Monthly" }),
1559
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.TabsTrigger, { value: "year", children: "Yearly" })
1560
1560
  ] }) });
1561
1561
  }
1562
1562
  _chunk7QVYU63Ejs.__name.call(void 0, IntervalToggle, "IntervalToggle");
@@ -1574,8 +1574,8 @@ function PricingCard({
1574
1574
  }) {
1575
1575
  const description = price.description || price.nickname || "Standard";
1576
1576
  const features = price.features || [];
1577
- const formattedPrice = _chunkNFCXUAE6js.formatCurrency.call(void 0, price.unitAmount, price.currency);
1578
- const interval = _chunkNFCXUAE6js.formatInterval.call(void 0, price);
1577
+ const formattedPrice = _chunkXUUHPYMMjs.formatCurrency.call(void 0, price.unitAmount, price.currency);
1578
+ const interval = _chunkXUUHPYMMjs.formatInterval.call(void 0, price);
1579
1579
  const handleKeyDown = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (e) => {
1580
1580
  if ((e.key === "Enter" || e.key === " ") && !isDisabled && !isCurrentPlan) {
1581
1581
  e.preventDefault();
@@ -1588,7 +1588,7 @@ function PricingCard({
1588
1588
  }
1589
1589
  }, "handleClick");
1590
1590
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1591
- _chunkNFCXUAE6js.Card,
1591
+ _chunkXUUHPYMMjs.Card,
1592
1592
  {
1593
1593
  role: "radio",
1594
1594
  "aria-checked": isSelected,
@@ -1596,7 +1596,7 @@ function PricingCard({
1596
1596
  tabIndex: isDisabled ? -1 : 0,
1597
1597
  onKeyDown: handleKeyDown,
1598
1598
  onClick: handleClick,
1599
- className: _chunk6OFANJTEjs.cn.call(void 0,
1599
+ className: _chunk5PNDDYGLjs.cn.call(void 0,
1600
1600
  "relative cursor-pointer transition-all duration-200 flex flex-col h-full",
1601
1601
  "focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
1602
1602
  isCurrentPlan && "bg-muted/30",
@@ -1606,9 +1606,9 @@ function PricingCard({
1606
1606
  isLoading && "pointer-events-none"
1607
1607
  ),
1608
1608
  children: [
1609
- isCurrentPlan && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Badge, { variant: "secondary", className: "absolute top-2 end-2", children: "Current" }),
1610
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardHeader, { className: "pb-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "text-sm font-medium", children: description }) }),
1611
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardContent, { className: "pb-4 grow", children: [
1609
+ isCurrentPlan && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Badge, { variant: "secondary", className: "absolute top-2 end-2", children: "Current" }),
1610
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.CardHeader, { className: "pb-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "text-sm font-medium", children: description }) }),
1611
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.CardContent, { className: "pb-4 grow", children: [
1612
1612
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mb-4", children: [
1613
1613
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-3xl font-bold", children: formattedPrice }),
1614
1614
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground ms-1", children: interval })
@@ -1618,8 +1618,8 @@ function PricingCard({
1618
1618
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm text-muted-foreground", children: feature })
1619
1619
  ] }, index)) })
1620
1620
  ] }),
1621
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardFooter, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1622
- _chunkNFCXUAE6js.Button,
1621
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.CardFooter, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1622
+ _chunkXUUHPYMMjs.Button,
1623
1623
  {
1624
1624
  variant: isCurrentPlan ? "secondary" : isSelected ? "default" : "outline",
1625
1625
  className: "w-full",
@@ -1647,7 +1647,7 @@ function ProductPricingRow({
1647
1647
  return null;
1648
1648
  }
1649
1649
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-3", children: [
1650
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.SectionHeader, { children: product.name }),
1650
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.SectionHeader, { children: product.name }),
1651
1651
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1652
1652
  "div",
1653
1653
  {
@@ -1747,15 +1747,15 @@ function ProductPricingList({
1747
1747
  _chunk7QVYU63Ejs.__name.call(void 0, ProductPricingList, "ProductPricingList");
1748
1748
  function ProductPricingListSkeleton() {
1749
1749
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-6", children: [1, 2].map((rowIndex) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-3", children: [
1750
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Skeleton, { className: "h-6 w-32" }),
1750
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Skeleton, { className: "h-6 w-32" }),
1751
1751
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4", children: [1, 2, 3].map((cardIndex) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "p-4 rounded-lg border animate-pulse space-y-3", children: [
1752
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Skeleton, { className: "h-6 w-24" }),
1753
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Skeleton, { className: "h-8 w-32" }),
1752
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Skeleton, { className: "h-6 w-24" }),
1753
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Skeleton, { className: "h-8 w-32" }),
1754
1754
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
1755
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Skeleton, { className: "h-4 w-full" }),
1756
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Skeleton, { className: "h-4 w-3/4" })
1755
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Skeleton, { className: "h-4 w-full" }),
1756
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Skeleton, { className: "h-4 w-3/4" })
1757
1757
  ] }),
1758
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Skeleton, { className: "h-10 w-full" })
1758
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Skeleton, { className: "h-10 w-full" })
1759
1759
  ] }, cardIndex)) })
1760
1760
  ] }, rowIndex)) });
1761
1761
  }
@@ -1769,18 +1769,18 @@ function ProrationPreview({ preview }) {
1769
1769
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
1770
1770
  preview.lineItems.map((item, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between text-sm", children: [
1771
1771
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground", children: item.description }),
1772
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: `font-medium ${item.amount < 0 ? "text-success" : "text-foreground"}`, children: _chunkNFCXUAE6js.formatCurrency.call(void 0, item.amount, preview.currency) })
1772
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: `font-medium ${item.amount < 0 ? "text-success" : "text-foreground"}`, children: _chunkXUUHPYMMjs.formatCurrency.call(void 0, item.amount, preview.currency) })
1773
1773
  ] }, index)),
1774
1774
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border-primary/30 mt-2 border-t pt-2", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between font-semibold", children: [
1775
1775
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-foreground", children: "Net Due Today" }),
1776
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-foreground", children: _chunkNFCXUAE6js.formatCurrency.call(void 0, preview.immediateCharge, preview.currency) })
1776
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-foreground", children: _chunkXUUHPYMMjs.formatCurrency.call(void 0, preview.immediateCharge, preview.currency) })
1777
1777
  ] }) }),
1778
1778
  preview.lineItems.length > 0 && preview.lineItems[0].period && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-muted-foreground mt-2 text-xs", children: [
1779
1779
  "Next invoice on ",
1780
1780
  formatDate3(preview.lineItems[0].period.end),
1781
1781
  " for",
1782
1782
  " ",
1783
- _chunkNFCXUAE6js.formatCurrency.call(void 0, preview.amountDue, preview.currency)
1783
+ _chunkXUUHPYMMjs.formatCurrency.call(void 0, preview.amountDue, preview.currency)
1784
1784
  ] })
1785
1785
  ] })
1786
1786
  ] });
@@ -1802,16 +1802,16 @@ function SubscriptionConfirmation({ price, isLoading, onConfirm, onCancel }) {
1802
1802
  productDescription && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-sm text-muted-foreground", children: productDescription })
1803
1803
  ] }),
1804
1804
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-lg font-semibold", children: [
1805
- _chunkNFCXUAE6js.formatCurrency.call(void 0, price.unitAmount, price.currency),
1806
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm font-normal text-muted-foreground", children: _chunkNFCXUAE6js.formatInterval.call(void 0, price) })
1805
+ _chunkXUUHPYMMjs.formatCurrency.call(void 0, price.unitAmount, price.currency),
1806
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm font-normal text-muted-foreground", children: _chunkXUUHPYMMjs.formatInterval.call(void 0, price) })
1807
1807
  ] }),
1808
1808
  features.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-1", children: features.map((feature, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 text-sm ", children: [
1809
1809
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Check, { className: "h-4 w-4 text-primary" }),
1810
1810
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: feature })
1811
1811
  ] }, index)) }),
1812
1812
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-end gap-3 pt-2 border-t border-accent/30", children: [
1813
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Button, { variant: "outline", onClick: onCancel, disabled: isLoading, children: "Cancel" }),
1814
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Button, { onClick: onConfirm, disabled: isLoading, children: isLoading ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1813
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Button, { variant: "outline", onClick: onCancel, disabled: isLoading, children: "Cancel" }),
1814
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Button, { onClick: onConfirm, disabled: isLoading, children: isLoading ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1815
1815
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Loader2, { className: "h-4 w-4 animate-spin me-2" }),
1816
1816
  "Processing..."
1817
1817
  ] }) : "Subscribe" })
@@ -1882,7 +1882,7 @@ function useSubscriptionWizard({ subscription, onSuccess, onClose }) {
1882
1882
  onCloseRef.current = onClose;
1883
1883
  const checkPaymentMethod = _react.useCallback.call(void 0, async () => {
1884
1884
  try {
1885
- const methods = await _chunk6OFANJTEjs.StripeCustomerService.listPaymentMethods();
1885
+ const methods = await _chunk5PNDDYGLjs.StripeCustomerService.listPaymentMethods();
1886
1886
  dispatch({ type: "SET_HAS_PAYMENT_METHOD", hasMethod: methods.length > 0 });
1887
1887
  } catch (error) {
1888
1888
  console.error("[useSubscriptionWizard] Failed to check payment methods:", error);
@@ -1906,7 +1906,7 @@ function useSubscriptionWizard({ subscription, onSuccess, onClose }) {
1906
1906
  const isTrialUpgrade = _optionalChain([subscription, 'optionalAccess', _55 => _55.status]) === "trialing" /* TRIALING */;
1907
1907
  dispatch({ type: "SET_IS_TRIAL_SUBSCRIPTION", isTrial: isTrialUpgrade });
1908
1908
  if (isTrialUpgrade && !state.hasPaymentMethod) {
1909
- const methods = await _chunk6OFANJTEjs.StripeCustomerService.listPaymentMethods();
1909
+ const methods = await _chunk5PNDDYGLjs.StripeCustomerService.listPaymentMethods();
1910
1910
  if (methods.length === 0) {
1911
1911
  dispatch({ type: "SET_STEP", step: "payment-method" });
1912
1912
  dispatch({
@@ -1917,7 +1917,7 @@ function useSubscriptionWizard({ subscription, onSuccess, onClose }) {
1917
1917
  }
1918
1918
  }
1919
1919
  if (subscription && state.selectedPrice.id !== _optionalChain([subscription, 'access', _56 => _56.price, 'optionalAccess', _57 => _57.id])) {
1920
- const preview = await _chunk6OFANJTEjs.StripeSubscriptionService.getProrationPreview({
1920
+ const preview = await _chunk5PNDDYGLjs.StripeSubscriptionService.getProrationPreview({
1921
1921
  subscriptionId: subscription.id,
1922
1922
  newPriceId: state.selectedPrice.id
1923
1923
  });
@@ -1942,14 +1942,14 @@ function useSubscriptionWizard({ subscription, onSuccess, onClose }) {
1942
1942
  newPriceId: state.selectedPrice.id,
1943
1943
  promotionCode: _optionalChain([state, 'access', _59 => _59.promotionCode, 'optionalAccess', _60 => _60.promotionCodeId])
1944
1944
  };
1945
- await _chunk6OFANJTEjs.StripeSubscriptionService.changePlan(changePlanParams);
1945
+ await _chunk5PNDDYGLjs.StripeSubscriptionService.changePlan(changePlanParams);
1946
1946
  } else {
1947
1947
  const createParams = {
1948
1948
  id: _uuid.v4.call(void 0, ),
1949
1949
  priceId: state.selectedPrice.id,
1950
1950
  promotionCode: _optionalChain([state, 'access', _61 => _61.promotionCode, 'optionalAccess', _62 => _62.promotionCodeId])
1951
1951
  };
1952
- await _chunk6OFANJTEjs.StripeSubscriptionService.createSubscription(createParams);
1952
+ await _chunk5PNDDYGLjs.StripeSubscriptionService.createSubscription(createParams);
1953
1953
  }
1954
1954
  onSuccessRef.current();
1955
1955
  onCloseRef.current();
@@ -1983,7 +1983,7 @@ function useSubscriptionWizard({ subscription, onSuccess, onClose }) {
1983
1983
  dispatch({ type: "SET_VALIDATING_PROMO_CODE", isValidating: true });
1984
1984
  dispatch({ type: "SET_PROMO_CODE_ERROR", error: null });
1985
1985
  try {
1986
- const result = await _chunk6OFANJTEjs.StripePromotionCodeService.validatePromotionCode({
1986
+ const result = await _chunk5PNDDYGLjs.StripePromotionCodeService.validatePromotionCode({
1987
1987
  code,
1988
1988
  stripePriceId: _optionalChain([state, 'access', _70 => _70.selectedPrice, 'optionalAccess', _71 => _71.id])
1989
1989
  });
@@ -2090,7 +2090,7 @@ function WizardStepPlanSelection({
2090
2090
  _react.useEffect.call(void 0, () => {
2091
2091
  const loadProducts = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
2092
2092
  try {
2093
- const fetchedProducts = await _chunk6OFANJTEjs.StripeProductService.listProducts({ active: true });
2093
+ const fetchedProducts = await _chunk5PNDDYGLjs.StripeProductService.listProducts({ active: true });
2094
2094
  setProducts(fetchedProducts);
2095
2095
  } catch (error) {
2096
2096
  console.error("[WizardStepPlanSelection] Failed to load products:", error);
@@ -2141,7 +2141,7 @@ function WizardStepPlanSelection({
2141
2141
  onSelectPrice: handleSelectPrice
2142
2142
  }
2143
2143
  ),
2144
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex justify-end pt-4 border-t", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Button, { onClick: onNext, disabled: !selectedPrice || isProcessing, children: isProcessing ? "Loading..." : "Next: Review" }) })
2144
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex justify-end pt-4 border-t", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Button, { onClick: onNext, disabled: !selectedPrice || isProcessing, children: isProcessing ? "Loading..." : "Next: Review" }) })
2145
2145
  ] });
2146
2146
  }
2147
2147
  _chunk7QVYU63Ejs.__name.call(void 0, WizardStepPlanSelection, "WizardStepPlanSelection");
@@ -2202,7 +2202,7 @@ function PromoCodeInput({
2202
2202
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-success text-sm", children: formatDiscount(appliedCode) })
2203
2203
  ] }),
2204
2204
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2205
- _chunkNFCXUAE6js.Button,
2205
+ _chunkXUUHPYMMjs.Button,
2206
2206
  {
2207
2207
  variant: "ghost",
2208
2208
  size: "sm",
@@ -2219,7 +2219,7 @@ function PromoCodeInput({
2219
2219
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
2220
2220
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex gap-2", children: [
2221
2221
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2222
- _chunkNFCXUAE6js.Input,
2222
+ _chunkXUUHPYMMjs.Input,
2223
2223
  {
2224
2224
  placeholder: "Enter promo code",
2225
2225
  value: code,
@@ -2229,7 +2229,7 @@ function PromoCodeInput({
2229
2229
  className: "flex-1"
2230
2230
  }
2231
2231
  ),
2232
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Button, { variant: "outline", onClick: handleApply, disabled: disabled || isValidating || !code.trim(), children: isValidating ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Loader2, { className: "h-4 w-4 animate-spin" }) : "Apply" })
2232
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Button, { variant: "outline", onClick: handleApply, disabled: disabled || isValidating || !code.trim(), children: isValidating ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Loader2, { className: "h-4 w-4 animate-spin" }) : "Apply" })
2233
2233
  ] }),
2234
2234
  error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error })
2235
2235
  ] });
@@ -2294,14 +2294,14 @@ function WizardStepReview({
2294
2294
  return `${promotionCode.discountValue}% off`;
2295
2295
  }
2296
2296
  if (promotionCode.discountType === "amount_off" && promotionCode.discountValue) {
2297
- return `${_chunkNFCXUAE6js.formatCurrency.call(void 0, promotionCode.discountValue, promotionCode.currency || selectedPrice.currency)} off`;
2297
+ return `${_chunkXUUHPYMMjs.formatCurrency.call(void 0, promotionCode.discountValue, promotionCode.currency || selectedPrice.currency)} off`;
2298
2298
  }
2299
2299
  return null;
2300
2300
  }, "getDiscountDescription");
2301
2301
  const discountDescription = getDiscountDescription();
2302
2302
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-6", children: [
2303
2303
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "bg-muted/50 rounded-lg p-4 space-y-3", children: [
2304
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.SectionHeader, { children: "Selected Plan" }),
2304
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.SectionHeader, { children: "Selected Plan" }),
2305
2305
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between items-center", children: [
2306
2306
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
2307
2307
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "font-medium", children: _optionalChain([selectedPrice, 'access', _92 => _92.product, 'optionalAccess', _93 => _93.name]) }),
@@ -2309,10 +2309,10 @@ function WizardStepReview({
2309
2309
  ] }),
2310
2310
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-end", children: [
2311
2311
  discountedPrice !== null ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
2312
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground line-through", children: _chunkNFCXUAE6js.formatCurrency.call(void 0, selectedPrice.unitAmount || 0, selectedPrice.currency) }),
2313
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-success text-lg font-semibold", children: _chunkNFCXUAE6js.formatCurrency.call(void 0, discountedPrice, selectedPrice.currency) }),
2314
- discountDescription && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Badge, { variant: "softGreen", children: discountDescription })
2315
- ] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "font-semibold text-lg", children: _chunkNFCXUAE6js.formatCurrency.call(void 0, selectedPrice.unitAmount || 0, selectedPrice.currency) }),
2312
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground line-through", children: _chunkXUUHPYMMjs.formatCurrency.call(void 0, selectedPrice.unitAmount || 0, selectedPrice.currency) }),
2313
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-success text-lg font-semibold", children: _chunkXUUHPYMMjs.formatCurrency.call(void 0, discountedPrice, selectedPrice.currency) }),
2314
+ discountDescription && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Badge, { variant: "softGreen", children: discountDescription })
2315
+ ] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "font-semibold text-lg", children: _chunkXUUHPYMMjs.formatCurrency.call(void 0, selectedPrice.unitAmount || 0, selectedPrice.currency) }),
2316
2316
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: formatInterval2(selectedPrice) })
2317
2317
  ] })
2318
2318
  ] })
@@ -2327,9 +2327,9 @@ function WizardStepReview({
2327
2327
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between text-sm", children: [
2328
2328
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: `${isTrialUpgrade ? "text-warning" : "text-muted-foreground"}`, children: isTrialUpgrade ? "Amount to charge now:" : "Amount due now:" }),
2329
2329
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: `font-medium ${isTrialUpgrade ? "text-warning" : "text-foreground"}`, children: discountedImmediateCharge !== null ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
2330
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "line-through text-muted-foreground me-2", children: _chunkNFCXUAE6js.formatCurrency.call(void 0, prorationPreview.immediateCharge, prorationPreview.currency) }),
2331
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-success", children: _chunkNFCXUAE6js.formatCurrency.call(void 0, discountedImmediateCharge, prorationPreview.currency) })
2332
- ] }) : _chunkNFCXUAE6js.formatCurrency.call(void 0, prorationPreview.immediateCharge, prorationPreview.currency) })
2330
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "line-through text-muted-foreground me-2", children: _chunkXUUHPYMMjs.formatCurrency.call(void 0, prorationPreview.immediateCharge, prorationPreview.currency) }),
2331
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-success", children: _chunkXUUHPYMMjs.formatCurrency.call(void 0, discountedImmediateCharge, prorationPreview.currency) })
2332
+ ] }) : _chunkXUUHPYMMjs.formatCurrency.call(void 0, prorationPreview.immediateCharge, prorationPreview.currency) })
2333
2333
  ] })
2334
2334
  ]
2335
2335
  }
@@ -2353,15 +2353,15 @@ function WizardStepReview({
2353
2353
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h4", { className: "font-medium", children: "Payment Method" }),
2354
2354
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: hasPaymentMethod ? "A payment method is on file" : "No payment method on file" })
2355
2355
  ] }),
2356
- !hasPaymentMethod && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Button, { variant: "outline", onClick: onAddPaymentMethod, children: "Add Payment Method" })
2356
+ !hasPaymentMethod && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Button, { variant: "outline", onClick: onAddPaymentMethod, children: "Add Payment Method" })
2357
2357
  ] }) }),
2358
- error && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Alert, { variant: "destructive", children: [
2358
+ error && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.Alert, { variant: "destructive", children: [
2359
2359
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.AlertCircle, { className: "h-4 w-4" }),
2360
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.AlertDescription, { children: error })
2360
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.AlertDescription, { children: error })
2361
2361
  ] }),
2362
2362
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between pt-4 border-t", children: [
2363
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Button, { variant: "outline", onClick: onBack, disabled: isProcessing, children: "Back" }),
2364
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Button, { onClick: hasPaymentMethod ? onConfirm : onAddPaymentMethod, disabled: isProcessing, children: isProcessing ? "Processing..." : hasPaymentMethod ? isChangingPlan ? "Confirm Plan Change" : "Subscribe Now" : "Add Payment Method" })
2363
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Button, { variant: "outline", onClick: onBack, disabled: isProcessing, children: "Back" }),
2364
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Button, { onClick: hasPaymentMethod ? onConfirm : onAddPaymentMethod, disabled: isProcessing, children: isProcessing ? "Processing..." : hasPaymentMethod ? isChangingPlan ? "Confirm Plan Change" : "Subscribe Now" : "Add Payment Method" })
2365
2365
  ] })
2366
2366
  ] });
2367
2367
  }
@@ -2372,7 +2372,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, WizardStepReview, "WizardStepReview");
2372
2372
  function WizardStepPaymentMethod({ onBack, onSuccess, isProcessing }) {
2373
2373
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-6", children: [
2374
2374
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-center", children: [
2375
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.SectionHeader, { children: "Add Payment Method" }),
2375
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.SectionHeader, { children: "Add Payment Method" }),
2376
2376
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: "Enter your card details to complete your subscription" })
2377
2377
  ] }),
2378
2378
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PaymentMethodForm, { onSuccess, onCancel: onBack, isLoading: isProcessing })
@@ -2414,10 +2414,10 @@ function SubscriptionWizard({
2414
2414
  const isChangePlanMode = !!subscription;
2415
2415
  const dialogTitle = subscription ? "Change Subscription Plan" : isPurchasingAddons ? "Purchase Add-ons" : "Subscribe to a Plan";
2416
2416
  const dialogDescription = subscription ? "Select a new plan for your subscription" : isPurchasingAddons ? "Select one-time products to purchase" : "Choose a subscription plan to get started";
2417
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.DialogContent, { className: "max-w-2xl", children: [
2418
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.DialogHeader, { children: [
2419
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.DialogTitle, { children: dialogTitle }),
2420
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.DialogDescription, { children: dialogDescription })
2417
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.DialogContent, { className: "max-w-2xl", children: [
2418
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.DialogHeader, { children: [
2419
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.DialogTitle, { children: dialogTitle }),
2420
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.DialogDescription, { children: dialogDescription })
2421
2421
  ] }),
2422
2422
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WizardProgressIndicator, { currentStep: state.step }),
2423
2423
  state.step === "plan-selection" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -2500,15 +2500,15 @@ function UsageSummaryCard({ meter, summary }) {
2500
2500
  const progressWidth = percentage !== null ? Math.min(percentage, 100) : 0;
2501
2501
  const displayName = meter.displayName || meter.eventName;
2502
2502
  const hasLimit = limit !== null && limit !== void 0;
2503
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Card, { children: [
2504
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardHeader, { className: "flex flex-row items-center gap-x-3 pb-3", children: [
2503
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.Card, { children: [
2504
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.CardHeader, { className: "flex flex-row items-center gap-x-3 pb-3", children: [
2505
2505
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex h-10 w-10 items-center justify-center rounded-lg bg-blue-100 text-blue-600", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Activity, { className: "h-5 w-5" }) }),
2506
2506
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col", children: [
2507
2507
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "text-sm font-medium", children: displayName }),
2508
2508
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-xs", children: meter.id })
2509
2509
  ] })
2510
2510
  ] }),
2511
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardContent, { className: "flex flex-col gap-y-4", children: [
2511
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.CardContent, { className: "flex flex-col gap-y-4", children: [
2512
2512
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
2513
2513
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-3xl font-bold", children: currentUsage.toLocaleString() }),
2514
2514
  hasLimit && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: "text-muted-foreground text-sm", children: [
@@ -2555,14 +2555,14 @@ function UsageContainer() {
2555
2555
  const loadUsageData = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
2556
2556
  setLoading(true);
2557
2557
  try {
2558
- const fetchedSubscriptions = await _chunk6OFANJTEjs.StripeSubscriptionService.listSubscriptions();
2558
+ const fetchedSubscriptions = await _chunk5PNDDYGLjs.StripeSubscriptionService.listSubscriptions();
2559
2559
  setSubscriptions(fetchedSubscriptions);
2560
2560
  const hasMeteredSubscriptions2 = fetchedSubscriptions.some((sub) => _optionalChain([sub, 'access', _99 => _99.price, 'optionalAccess', _100 => _100.recurring, 'optionalAccess', _101 => _101.usageType]) === "metered");
2561
2561
  if (!hasMeteredSubscriptions2) {
2562
2562
  setLoading(false);
2563
2563
  return;
2564
2564
  }
2565
- const fetchedMeters = await _chunk6OFANJTEjs.StripeUsageService.listMeters();
2565
+ const fetchedMeters = await _chunk5PNDDYGLjs.StripeUsageService.listMeters();
2566
2566
  setMeters(fetchedMeters);
2567
2567
  const summariesMap = {};
2568
2568
  const now = /* @__PURE__ */ new Date();
@@ -2570,7 +2570,7 @@ function UsageContainer() {
2570
2570
  const endOfMonth = new Date(now.getFullYear(), now.getMonth() + 1, 0, 23, 59, 59, 999);
2571
2571
  for (const meter of fetchedMeters) {
2572
2572
  try {
2573
- const meterSummaries = await _chunk6OFANJTEjs.StripeUsageService.getMeterSummaries({
2573
+ const meterSummaries = await _chunk5PNDDYGLjs.StripeUsageService.getMeterSummaries({
2574
2574
  meterId: meter.id,
2575
2575
  startTime: startOfMonth,
2576
2576
  endTime: endOfMonth
@@ -2635,22 +2635,22 @@ function UsageHistoryTable({ usageRecords }) {
2635
2635
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rounded-lg border p-8 text-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground", children: "No usage history available." }) });
2636
2636
  }
2637
2637
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
2638
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.SectionHeader, { level: 2, children: "Usage History" }),
2639
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "overflow-clip rounded-lg border", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Table, { children: [
2640
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.TableRow, { children: [
2641
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableHead, { children: "Date & Time" }),
2642
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableHead, { children: "Meter Event" }),
2643
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableHead, { className: "text-end", children: "Quantity" }),
2644
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableHead, { children: "Event ID" })
2638
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.SectionHeader, { level: 2, children: "Usage History" }),
2639
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "overflow-clip rounded-lg border", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.Table, { children: [
2640
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.TableRow, { children: [
2641
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.TableHead, { children: "Date & Time" }),
2642
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.TableHead, { children: "Meter Event" }),
2643
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.TableHead, { className: "text-end", children: "Quantity" }),
2644
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.TableHead, { children: "Event ID" })
2645
2645
  ] }) }),
2646
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableBody, { children: usageRecords.map((record) => {
2646
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.TableBody, { children: usageRecords.map((record) => {
2647
2647
  const dateTime = formatDateTime(record.timestamp);
2648
2648
  const quantity = record.quantity.toLocaleString();
2649
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.TableRow, { children: [
2650
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableCell, { className: "font-medium", children: dateTime }),
2651
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableCell, { className: "text-muted-foreground", children: record.meterEventName }),
2652
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableCell, { className: "text-end font-medium", children: quantity }),
2653
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.TableCell, { className: "text-muted-foreground text-sm tabular-nums", children: record.stripeEventId })
2649
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.TableRow, { children: [
2650
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.TableCell, { className: "font-medium", children: dateTime }),
2651
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.TableCell, { className: "text-muted-foreground", children: record.meterEventName }),
2652
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.TableCell, { className: "text-end font-medium", children: quantity }),
2653
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.TableCell, { className: "text-muted-foreground text-sm tabular-nums", children: record.stripeEventId })
2654
2654
  ] }, record.id);
2655
2655
  }) })
2656
2656
  ] }) })
@@ -2661,8 +2661,8 @@ _chunk7QVYU63Ejs.__name.call(void 0, UsageHistoryTable, "UsageHistoryTable");
2661
2661
  // src/features/billing/components/modals/BillingDetailModal.tsx
2662
2662
 
2663
2663
  function BillingDetailModal({ open, onOpenChange, title, children, className }) {
2664
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.DialogContent, { className: _nullishCoalesce(className, () => ( "max-w-4xl max-h-[90vh] overflow-y-auto")), children: [
2665
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.DialogHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.DialogTitle, { children: title }) }),
2664
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.DialogContent, { className: _nullishCoalesce(className, () => ( "max-w-4xl max-h-[90vh] overflow-y-auto")), children: [
2665
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.DialogHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.DialogTitle, { children: title }) }),
2666
2666
  children
2667
2667
  ] }) });
2668
2668
  }
@@ -2679,7 +2679,7 @@ function BillingAlertBanner({ subscription, onUpdatePayment, onAddPayment }) {
2679
2679
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "text-destructive text-sm font-medium", children: "Payment Failed" }),
2680
2680
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive mt-1 text-sm", children: "Your last payment failed. Please update your payment method to avoid service interruption." })
2681
2681
  ] }),
2682
- onUpdatePayment && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Button, { variant: "outline", size: "sm", onClick: onUpdatePayment, className: "text-destructive border-red-300", children: "Update Payment Method" })
2682
+ onUpdatePayment && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Button, { variant: "outline", size: "sm", onClick: onUpdatePayment, className: "text-destructive border-red-300", children: "Update Payment Method" })
2683
2683
  ] });
2684
2684
  }
2685
2685
  if (subscription.status === "trialing" /* TRIALING */ && subscription.trialEnd) {
@@ -2699,7 +2699,7 @@ function BillingAlertBanner({ subscription, onUpdatePayment, onAddPayment }) {
2699
2699
  ". Add a payment method to continue your subscription."
2700
2700
  ] })
2701
2701
  ] }),
2702
- onAddPayment && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Button, { variant: "outline", size: "sm", onClick: onAddPayment, className: "text-warning border-yellow-300", children: "Add Payment Method" })
2702
+ onAddPayment && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Button, { variant: "outline", size: "sm", onClick: onAddPayment, className: "text-warning border-yellow-300", children: "Add Payment Method" })
2703
2703
  ] });
2704
2704
  }
2705
2705
  }
@@ -2750,7 +2750,7 @@ function BillingDashboardContainer() {
2750
2750
  setNoCustomerExists(false);
2751
2751
  let customer = null;
2752
2752
  try {
2753
- customer = await _chunk6OFANJTEjs.StripeCustomerService.getCustomer();
2753
+ customer = await _chunk5PNDDYGLjs.StripeCustomerService.getCustomer();
2754
2754
  setData((prev) => ({ ...prev, customer }));
2755
2755
  setErrors((prev) => ({ ...prev, customer: null }));
2756
2756
  setNoCustomerExists(false);
@@ -2776,7 +2776,7 @@ function BillingDashboardContainer() {
2776
2776
  }
2777
2777
  const fetchSubscriptions = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
2778
2778
  try {
2779
- const subscriptions2 = await _chunk6OFANJTEjs.StripeSubscriptionService.listSubscriptions();
2779
+ const subscriptions2 = await _chunk5PNDDYGLjs.StripeSubscriptionService.listSubscriptions();
2780
2780
  setData((prev) => ({ ...prev, subscriptions: subscriptions2 }));
2781
2781
  setErrors((prev) => ({ ...prev, subscriptions: null }));
2782
2782
  return subscriptions2;
@@ -2790,7 +2790,7 @@ function BillingDashboardContainer() {
2790
2790
  }, "fetchSubscriptions");
2791
2791
  const fetchPaymentMethods = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
2792
2792
  try {
2793
- const paymentMethods = await _chunk6OFANJTEjs.StripeCustomerService.listPaymentMethods();
2793
+ const paymentMethods = await _chunk5PNDDYGLjs.StripeCustomerService.listPaymentMethods();
2794
2794
  setData((prev) => ({ ...prev, paymentMethods }));
2795
2795
  setErrors((prev) => ({ ...prev, paymentMethods: null }));
2796
2796
  } catch (error) {
@@ -2802,7 +2802,7 @@ function BillingDashboardContainer() {
2802
2802
  }, "fetchPaymentMethods");
2803
2803
  const fetchInvoices = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
2804
2804
  try {
2805
- const invoices = await _chunk6OFANJTEjs.StripeInvoiceService.listInvoices();
2805
+ const invoices = await _chunk5PNDDYGLjs.StripeInvoiceService.listInvoices();
2806
2806
  setData((prev) => ({ ...prev, invoices }));
2807
2807
  setErrors((prev) => ({ ...prev, invoices: null }));
2808
2808
  } catch (error) {
@@ -2825,7 +2825,7 @@ function BillingDashboardContainer() {
2825
2825
  const handleCreateCustomer = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
2826
2826
  setCreatingCustomer(true);
2827
2827
  try {
2828
- await _chunk6OFANJTEjs.StripeCustomerService.createCustomer();
2828
+ await _chunk5PNDDYGLjs.StripeCustomerService.createCustomer();
2829
2829
  setNoCustomerExists(false);
2830
2830
  await fetchAllData();
2831
2831
  } catch (error) {
@@ -2837,7 +2837,7 @@ function BillingDashboardContainer() {
2837
2837
  }, "handleCreateCustomer");
2838
2838
  const fetchUsageData = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
2839
2839
  try {
2840
- const meters = await _chunk6OFANJTEjs.StripeUsageService.listMeters();
2840
+ const meters = await _chunk5PNDDYGLjs.StripeUsageService.listMeters();
2841
2841
  setData((prev) => ({ ...prev, meters }));
2842
2842
  const summariesMap = {};
2843
2843
  const now = /* @__PURE__ */ new Date();
@@ -2845,7 +2845,7 @@ function BillingDashboardContainer() {
2845
2845
  const endOfMonth = new Date(now.getFullYear(), now.getMonth() + 1, 0, 23, 59, 59, 999);
2846
2846
  for (const meter of meters) {
2847
2847
  try {
2848
- const meterSummaries = await _chunk6OFANJTEjs.StripeUsageService.getMeterSummaries({
2848
+ const meterSummaries = await _chunk5PNDDYGLjs.StripeUsageService.getMeterSummaries({
2849
2849
  meterId: meter.id,
2850
2850
  startTime: startOfMonth,
2851
2851
  endTime: endOfMonth
@@ -2923,18 +2923,18 @@ function BillingDashboardContainer() {
2923
2923
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Wallet, { className: "h-8 w-8" }),
2924
2924
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h1", { className: "text-primary text-3xl font-semibold", children: "Billing" })
2925
2925
  ] }),
2926
- isInitialLoading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardContent, { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Loader2, { className: "h-8 w-8 animate-spin text-muted-foreground" }) }) }),
2927
- noCustomerExists && !isInitialLoading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Card, { children: [
2928
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.CardHeader, { className: "text-center", children: [
2926
+ isInitialLoading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.CardContent, { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Loader2, { className: "h-8 w-8 animate-spin text-muted-foreground" }) }) }),
2927
+ noCustomerExists && !isInitialLoading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.Card, { children: [
2928
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.CardHeader, { className: "text-center", children: [
2929
2929
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-primary/10", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-8 w-8 text-primary" }) }),
2930
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardTitle, { children: "Set Up Billing" }),
2931
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardDescription, { children: "Your company doesn't have a billing account yet. Set one up to manage subscriptions, payment methods, and view invoices." })
2930
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.CardTitle, { children: "Set Up Billing" }),
2931
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.CardDescription, { children: "Your company doesn't have a billing account yet. Set one up to manage subscriptions, payment methods, and view invoices." })
2932
2932
  ] }),
2933
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardContent, { className: "flex justify-center pb-8", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Button, { onClick: handleCreateCustomer, disabled: creatingCustomer, size: "lg", children: creatingCustomer ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
2933
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.CardContent, { className: "flex justify-center pb-8", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Button, { onClick: handleCreateCustomer, disabled: creatingCustomer, size: "lg", children: creatingCustomer ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
2934
2934
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Loader2, { className: "me-2 h-4 w-4 animate-spin" }),
2935
2935
  "Setting up..."
2936
2936
  ] }) : "Set Up Billing Account" }) }),
2937
- errors.customer && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.CardContent, { className: "pt-0", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-center text-destructive text-xs/relaxed", children: errors.customer }) })
2937
+ errors.customer && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.CardContent, { className: "pt-0", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-center text-destructive text-xs/relaxed", children: errors.customer }) })
2938
2938
  ] }),
2939
2939
  !noCustomerExists && !isInitialLoading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
2940
2940
  criticalSubscriptions.map((subscription) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -3076,7 +3076,7 @@ function getStripePromise(publishableKey) {
3076
3076
  }
3077
3077
  _chunk7QVYU63Ejs.__name.call(void 0, getStripePromise, "getStripePromise");
3078
3078
  function StripeProvider({ children }) {
3079
- const publishableKey = _chunk5W5MN7JPjs.getStripePublishableKey.call(void 0, );
3079
+ const publishableKey = _chunk7ZRQOLSVjs.getStripePublishableKey.call(void 0, );
3080
3080
  const stripePromise = _react.useMemo.call(void 0, () => getStripePromise(publishableKey), [publishableKey]);
3081
3081
  const options = _react.useMemo.call(void 0, () => ({}), []);
3082
3082
  if (!publishableKey) {
@@ -3086,7 +3086,7 @@ function StripeProvider({ children }) {
3086
3086
  }
3087
3087
  _chunk7QVYU63Ejs.__name.call(void 0, StripeProvider, "StripeProvider");
3088
3088
  function isStripeConfigured() {
3089
- return !!_chunk5W5MN7JPjs.getStripePublishableKey.call(void 0, );
3089
+ return !!_chunk7ZRQOLSVjs.getStripePublishableKey.call(void 0, );
3090
3090
  }
3091
3091
  _chunk7QVYU63Ejs.__name.call(void 0, isStripeConfigured, "isStripeConfigured");
3092
3092
 
@@ -3106,12 +3106,12 @@ function PriceArchiver({ price }) {
3106
3106
  const isArchived = !price.active;
3107
3107
  const scope = isArchived ? "restore" : "archive";
3108
3108
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
3109
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Button, { variant: "outline", size: "sm", onClick: () => setOpen(true), children: [
3109
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.Button, { variant: "outline", size: "sm", onClick: () => setOpen(true), children: [
3110
3110
  isArchived ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.RotateCcwIcon, {}) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ArchiveIcon, {}),
3111
3111
  t(`billing.admin.prices.${scope}.confirm`)
3112
3112
  ] }),
3113
3113
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3114
- _chunkNFCXUAE6js.ConfirmDialog,
3114
+ _chunkXUUHPYMMjs.ConfirmDialog,
3115
3115
  {
3116
3116
  open,
3117
3117
  onOpenChange: setOpen,
@@ -3125,7 +3125,7 @@ function PriceArchiver({ price }) {
3125
3125
  if (isArchived) await restorePrice(price.id);
3126
3126
  else await archivePrice(price.id);
3127
3127
  } catch (error) {
3128
- _chunkNFCXUAE6js.errorToast.call(void 0, { title: t(`billing.admin.prices.${scope}.title`), error });
3128
+ _chunkXUUHPYMMjs.errorToast.call(void 0, { title: t(`billing.admin.prices.${scope}.title`), error });
3129
3129
  throw error;
3130
3130
  }
3131
3131
  }
@@ -3157,14 +3157,14 @@ function PriceEditorInternal({
3157
3157
  onDialogOpenChange
3158
3158
  }) {
3159
3159
  const t = _nextintl.useTranslations.call(void 0, );
3160
- const router = _chunk6OFANJTEjs.useI18nRouter.call(void 0, );
3160
+ const router = _chunk5PNDDYGLjs.useI18nRouter.call(void 0, );
3161
3161
  const { createPrice, updatePrice, productId: contextProductId } = usePriceContext();
3162
3162
  const [allFeatures, setAllFeatures] = _react.useState.call(void 0, []);
3163
3163
  const isEdit = !!price;
3164
3164
  const targetProductId = _nullishCoalesce(_nullishCoalesce(productId, () => ( _optionalChain([price, 'optionalAccess', _117 => _117.product, 'optionalAccess', _118 => _118.id]))), () => ( contextProductId));
3165
3165
  _react.useEffect.call(void 0, () => {
3166
3166
  const fetchFeatures = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
3167
- setAllFeatures(await _chunk6OFANJTEjs.FeatureService.findMany({}));
3167
+ setAllFeatures(await _chunk5PNDDYGLjs.FeatureService.findMany({}));
3168
3168
  }, "fetchFeatures");
3169
3169
  void fetchFeatures();
3170
3170
  }, []);
@@ -3277,7 +3277,7 @@ function PriceEditorInternal({
3277
3277
  warnedUnknownFor.current = fingerprint;
3278
3278
  const { unknown } = resolvePlatformFeatures(seed.platformFeatures);
3279
3279
  if (unknown.length > 0)
3280
- _chunk6OFANJTEjs.showToast.call(void 0, t("billing.admin.prices.import.warnings.unknownFeatures", { features: unknown.join(", ") }));
3280
+ _chunk5PNDDYGLjs.showToast.call(void 0, t("billing.admin.prices.import.warnings.unknownFeatures", { features: unknown.join(", ") }));
3281
3281
  }, [seed, isEdit, allFeatures, resolvePlatformFeatures, t]);
3282
3282
  const watchInterval = form.watch("interval");
3283
3283
  const isRecurring = watchInterval !== "one_time";
@@ -3298,13 +3298,13 @@ function PriceEditorInternal({
3298
3298
  { id: "metered", text: t("billing.admin.prices.usage.metered") }
3299
3299
  ];
3300
3300
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3301
- _chunkNFCXUAE6js.EditorSheet,
3301
+ _chunkXUUHPYMMjs.EditorSheet,
3302
3302
  {
3303
3303
  form,
3304
3304
  entityType: t("billing.admin.prices.entity"),
3305
3305
  entityName: price ? priceLabel(price) : void 0,
3306
3306
  isEdit,
3307
- module: _chunk6OFANJTEjs.Modules.StripePrice,
3307
+ module: _chunk5PNDDYGLjs.Modules.StripePrice,
3308
3308
  size: "lg",
3309
3309
  propagateChanges,
3310
3310
  onSuccess,
@@ -3353,13 +3353,13 @@ function PriceEditorInternal({
3353
3353
  dialogOpen,
3354
3354
  onDialogOpenChange,
3355
3355
  children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
3356
- isEdit && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Alert, { children: [
3357
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.AlertTitle, { children: t("billing.admin.prices.immutability.title") }),
3358
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.AlertDescription, { children: t("billing.admin.prices.immutability.description") })
3356
+ isEdit && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.Alert, { children: [
3357
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.AlertTitle, { children: t("billing.admin.prices.immutability.title") }),
3358
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.AlertDescription, { children: t("billing.admin.prices.immutability.description") })
3359
3359
  ] }),
3360
3360
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-2 gap-x-4", children: [
3361
3361
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3362
- _chunkNFCXUAE6js.FormInput,
3362
+ _chunkXUUHPYMMjs.FormInput,
3363
3363
  {
3364
3364
  form,
3365
3365
  id: "unitAmount",
@@ -3371,7 +3371,7 @@ function PriceEditorInternal({
3371
3371
  }
3372
3372
  ),
3373
3373
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3374
- _chunkNFCXUAE6js.FormSelect,
3374
+ _chunkXUUHPYMMjs.FormSelect,
3375
3375
  {
3376
3376
  form,
3377
3377
  id: "currency",
@@ -3382,7 +3382,7 @@ function PriceEditorInternal({
3382
3382
  )
3383
3383
  ] }),
3384
3384
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3385
- _chunkNFCXUAE6js.FormSelect,
3385
+ _chunkXUUHPYMMjs.FormSelect,
3386
3386
  {
3387
3387
  form,
3388
3388
  id: "interval",
@@ -3393,7 +3393,7 @@ function PriceEditorInternal({
3393
3393
  ),
3394
3394
  isRecurring && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-2 gap-x-4", children: [
3395
3395
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3396
- _chunkNFCXUAE6js.FormInput,
3396
+ _chunkXUUHPYMMjs.FormInput,
3397
3397
  {
3398
3398
  form,
3399
3399
  id: "intervalCount",
@@ -3404,7 +3404,7 @@ function PriceEditorInternal({
3404
3404
  }
3405
3405
  ),
3406
3406
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3407
- _chunkNFCXUAE6js.FormSelect,
3407
+ _chunkXUUHPYMMjs.FormSelect,
3408
3408
  {
3409
3409
  form,
3410
3410
  id: "usageType",
@@ -3415,7 +3415,7 @@ function PriceEditorInternal({
3415
3415
  )
3416
3416
  ] }),
3417
3417
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3418
- _chunkNFCXUAE6js.FormInput,
3418
+ _chunkXUUHPYMMjs.FormInput,
3419
3419
  {
3420
3420
  form,
3421
3421
  id: "nickname",
@@ -3424,7 +3424,7 @@ function PriceEditorInternal({
3424
3424
  }
3425
3425
  ),
3426
3426
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3427
- _chunkNFCXUAE6js.FormTextarea,
3427
+ _chunkXUUHPYMMjs.FormTextarea,
3428
3428
  {
3429
3429
  form,
3430
3430
  id: "description",
@@ -3434,7 +3434,7 @@ function PriceEditorInternal({
3434
3434
  }
3435
3435
  ),
3436
3436
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3437
- _chunkNFCXUAE6js.FormInput,
3437
+ _chunkXUUHPYMMjs.FormInput,
3438
3438
  {
3439
3439
  form,
3440
3440
  id: "token",
@@ -3444,10 +3444,10 @@ function PriceEditorInternal({
3444
3444
  }
3445
3445
  ),
3446
3446
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-2", children: [
3447
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.FieldLabel, { children: t("billing.admin.prices.fields.features") }),
3447
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.FieldLabel, { children: t("billing.admin.prices.fields.features") }),
3448
3448
  form.watch("features").map((_, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex gap-2", children: [
3449
3449
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3450
- _chunkNFCXUAE6js.Input,
3450
+ _chunkXUUHPYMMjs.Input,
3451
3451
  {
3452
3452
  ...form.register(`features.${index}`),
3453
3453
  placeholder: t("billing.admin.prices.placeholders.feature", { index: index + 1 }),
@@ -3455,7 +3455,7 @@ function PriceEditorInternal({
3455
3455
  }
3456
3456
  ),
3457
3457
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3458
- _chunkNFCXUAE6js.Button,
3458
+ _chunkXUUHPYMMjs.Button,
3459
3459
  {
3460
3460
  type: "button",
3461
3461
  variant: "outline",
@@ -3470,7 +3470,7 @@ function PriceEditorInternal({
3470
3470
  )
3471
3471
  ] }, index)),
3472
3472
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
3473
- _chunkNFCXUAE6js.Button,
3473
+ _chunkXUUHPYMMjs.Button,
3474
3474
  {
3475
3475
  type: "button",
3476
3476
  variant: "outline",
@@ -3485,12 +3485,12 @@ function PriceEditorInternal({
3485
3485
  )
3486
3486
  ] }),
3487
3487
  isRecurring && allFeatures.length > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-2", children: [
3488
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.FieldLabel, { children: t("billing.admin.prices.fields.platformFeatures") }),
3488
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.FieldLabel, { children: t("billing.admin.prices.fields.platformFeatures") }),
3489
3489
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex max-h-48 flex-col gap-y-2 overflow-y-auto rounded-md border p-4", children: allFeatures.map((feature) => {
3490
3490
  const isChecked = form.watch("featureIds").includes(feature.id);
3491
3491
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-2", children: [
3492
3492
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3493
- _chunkNFCXUAE6js.Checkbox,
3493
+ _chunkXUUHPYMMjs.Checkbox,
3494
3494
  {
3495
3495
  id: `feature-${feature.id}`,
3496
3496
  checked: isChecked,
@@ -3506,13 +3506,13 @@ function PriceEditorInternal({
3506
3506
  }
3507
3507
  }
3508
3508
  ),
3509
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.FieldLabel, { htmlFor: `feature-${feature.id}`, children: feature.name }),
3509
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.FieldLabel, { htmlFor: `feature-${feature.id}`, children: feature.name }),
3510
3510
  feature.isCore && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: t("billing.admin.prices.help.core") })
3511
3511
  ] }, feature.id);
3512
3512
  }) })
3513
3513
  ] }),
3514
3514
  isRecurring && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3515
- _chunkNFCXUAE6js.FormCheckbox,
3515
+ _chunkXUUHPYMMjs.FormCheckbox,
3516
3516
  {
3517
3517
  form,
3518
3518
  id: "isTrial",
@@ -3555,7 +3555,7 @@ var defaultContextValue = {
3555
3555
  productId: void 0
3556
3556
  };
3557
3557
  function priceLabel(price) {
3558
- return _nullishCoalesce(price.nickname, () => ( `${_chunkNFCXUAE6js.formatCurrency.call(void 0, price.unitAmount, price.currency)} ${_chunkNFCXUAE6js.formatInterval.call(void 0, price)}`.trim()));
3558
+ return _nullishCoalesce(price.nickname, () => ( `${_chunkXUUHPYMMjs.formatCurrency.call(void 0, price.unitAmount, price.currency)} ${_chunkXUUHPYMMjs.formatInterval.call(void 0, price)}`.trim()));
3559
3559
  }
3560
3560
  _chunk7QVYU63Ejs.__name.call(void 0, priceLabel, "priceLabel");
3561
3561
  var PriceProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({
@@ -3565,21 +3565,21 @@ var PriceProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({
3565
3565
  productId: productIdProp
3566
3566
  }) => {
3567
3567
  const t = _nextintl.useTranslations.call(void 0, );
3568
- const generateUrl = _chunkNFCXUAE6js.usePageUrlGenerator.call(void 0, );
3569
- const { hasRole } = _chunkNFCXUAE6js.useCurrentUserContext.call(void 0, );
3568
+ const generateUrl = _chunkXUUHPYMMjs.usePageUrlGenerator.call(void 0, );
3569
+ const { hasRole } = _chunkXUUHPYMMjs.useCurrentUserContext.call(void 0, );
3570
3570
  const [price, setPrice] = _react.useState.call(void 0,
3571
- dehydratedPrice ? _chunk6OFANJTEjs.rehydrate.call(void 0, _chunk6OFANJTEjs.Modules.StripePrice, dehydratedPrice) : void 0
3571
+ dehydratedPrice ? _chunk5PNDDYGLjs.rehydrate.call(void 0, _chunk5PNDDYGLjs.Modules.StripePrice, dehydratedPrice) : void 0
3572
3572
  );
3573
3573
  const [priceVersion, setPriceVersion] = _react.useState.call(void 0, 0);
3574
3574
  const refreshPrices = _react.useCallback.call(void 0, () => setPriceVersion((value2) => value2 + 1), []);
3575
3575
  const productId = _nullishCoalesce(productIdProp, () => ( _optionalChain([price, 'optionalAccess', _141 => _141.product, 'optionalAccess', _142 => _142.id])));
3576
3576
  const reloadPrice = _react.useCallback.call(void 0, async () => {
3577
3577
  if (!_optionalChain([price, 'optionalAccess', _143 => _143.id])) return;
3578
- setPrice(await _chunk6OFANJTEjs.StripePriceService.getPrice({ id: price.id }));
3578
+ setPrice(await _chunk5PNDDYGLjs.StripePriceService.getPrice({ id: price.id }));
3579
3579
  }, [_optionalChain([price, 'optionalAccess', _144 => _144.id])]);
3580
3580
  const createPrice = _react.useCallback.call(void 0,
3581
3581
  async (input) => {
3582
- const saved = await _chunk6OFANJTEjs.StripePriceService.createPrice(input);
3582
+ const saved = await _chunk5PNDDYGLjs.StripePriceService.createPrice(input);
3583
3583
  refreshPrices();
3584
3584
  return saved;
3585
3585
  },
@@ -3587,7 +3587,7 @@ var PriceProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({
3587
3587
  );
3588
3588
  const updatePrice = _react.useCallback.call(void 0,
3589
3589
  async (input) => {
3590
- const saved = await _chunk6OFANJTEjs.StripePriceService.updatePrice(input);
3590
+ const saved = await _chunk5PNDDYGLjs.StripePriceService.updatePrice(input);
3591
3591
  setPrice(saved);
3592
3592
  refreshPrices();
3593
3593
  return saved;
@@ -3598,7 +3598,7 @@ var PriceProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({
3598
3598
  async (id) => {
3599
3599
  const target = _nullishCoalesce(id, () => ( _optionalChain([price, 'optionalAccess', _145 => _145.id])));
3600
3600
  if (!target) return;
3601
- await _chunk6OFANJTEjs.StripePriceService.archivePrice({ id: target });
3601
+ await _chunk5PNDDYGLjs.StripePriceService.archivePrice({ id: target });
3602
3602
  await reloadPrice();
3603
3603
  refreshPrices();
3604
3604
  },
@@ -3608,7 +3608,7 @@ var PriceProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({
3608
3608
  async (id) => {
3609
3609
  const target = _nullishCoalesce(id, () => ( _optionalChain([price, 'optionalAccess', _147 => _147.id])));
3610
3610
  if (!target) return;
3611
- await _chunk6OFANJTEjs.StripePriceService.reactivatePrice({ id: target });
3611
+ await _chunk5PNDDYGLjs.StripePriceService.reactivatePrice({ id: target });
3612
3612
  await reloadPrice();
3613
3613
  refreshPrices();
3614
3614
  },
@@ -3632,12 +3632,12 @@ var PriceProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({
3632
3632
  if (!publishChrome) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PriceContext.Provider, { value, children });
3633
3633
  const breadcrumb = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
3634
3634
  const items = [
3635
- { name: t("billing.admin.products.title"), href: generateUrl({ page: _chunk6OFANJTEjs.Modules.StripeProduct }) }
3635
+ { name: t("billing.admin.products.title"), href: generateUrl({ page: _chunk5PNDDYGLjs.Modules.StripeProduct }) }
3636
3636
  ];
3637
3637
  if (_optionalChain([price, 'optionalAccess', _149 => _149.product]))
3638
3638
  items.push({
3639
3639
  name: price.product.name,
3640
- href: generateUrl({ page: _chunk6OFANJTEjs.Modules.StripeProduct, id: price.product.id })
3640
+ href: generateUrl({ page: _chunk5PNDDYGLjs.Modules.StripeProduct, id: price.product.id })
3641
3641
  });
3642
3642
  if (price) items.push({ name: priceLabel(price) });
3643
3643
  return items;
@@ -3654,7 +3654,7 @@ var PriceProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({
3654
3654
  }
3655
3655
  return response;
3656
3656
  }, "title");
3657
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PriceContext.Provider, { value, children }) });
3657
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PriceContext.Provider, { value, children }) });
3658
3658
  }, "PriceProvider");
3659
3659
  var usePriceContext = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => _nullishCoalesce(_react.useContext.call(void 0, PriceContext), () => ( defaultContextValue)), "usePriceContext");
3660
3660
 
@@ -3674,12 +3674,12 @@ function ProductArchiver({ product }) {
3674
3674
  const isArchived = !product.active;
3675
3675
  const scope = isArchived ? "restore" : "archive";
3676
3676
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
3677
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Button, { variant: "outline", size: "sm", onClick: () => setOpen(true), children: [
3677
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.Button, { variant: "outline", size: "sm", onClick: () => setOpen(true), children: [
3678
3678
  isArchived ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.RotateCcwIcon, {}) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ArchiveIcon, {}),
3679
3679
  t(`billing.admin.products.${scope}.confirm`)
3680
3680
  ] }),
3681
3681
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3682
- _chunkNFCXUAE6js.ConfirmDialog,
3682
+ _chunkXUUHPYMMjs.ConfirmDialog,
3683
3683
  {
3684
3684
  open,
3685
3685
  onOpenChange: setOpen,
@@ -3693,7 +3693,7 @@ function ProductArchiver({ product }) {
3693
3693
  if (isArchived) await restoreProduct(product.id);
3694
3694
  else await archiveProduct(product.id);
3695
3695
  } catch (error) {
3696
- _chunkNFCXUAE6js.errorToast.call(void 0, { title: t(`billing.admin.products.${scope}.title`), error });
3696
+ _chunkXUUHPYMMjs.errorToast.call(void 0, { title: t(`billing.admin.products.${scope}.title`), error });
3697
3697
  throw error;
3698
3698
  }
3699
3699
  }
@@ -3722,7 +3722,7 @@ function ProductEditorInternal({
3722
3722
  onDialogOpenChange
3723
3723
  }) {
3724
3724
  const t = _nextintl.useTranslations.call(void 0, );
3725
- const router = _chunk6OFANJTEjs.useI18nRouter.call(void 0, );
3725
+ const router = _chunk5PNDDYGLjs.useI18nRouter.call(void 0, );
3726
3726
  const { createProduct, updateProduct } = useProductContext();
3727
3727
  const isEdit = !!product;
3728
3728
  const formSchema2 = _react.useMemo.call(void 0,
@@ -3746,13 +3746,13 @@ function ProductEditorInternal({
3746
3746
  defaultValues: getDefaultValues()
3747
3747
  });
3748
3748
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3749
- _chunkNFCXUAE6js.EditorSheet,
3749
+ _chunkXUUHPYMMjs.EditorSheet,
3750
3750
  {
3751
3751
  form,
3752
3752
  entityType: t("billing.admin.products.entity"),
3753
3753
  entityName: _optionalChain([product, 'optionalAccess', _153 => _153.name]),
3754
3754
  isEdit,
3755
- module: _chunk6OFANJTEjs.Modules.StripeProduct,
3755
+ module: _chunk5PNDDYGLjs.Modules.StripeProduct,
3756
3756
  size: "md",
3757
3757
  propagateChanges,
3758
3758
  onSuccess,
@@ -3769,7 +3769,7 @@ function ProductEditorInternal({
3769
3769
  onDialogOpenChange,
3770
3770
  children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
3771
3771
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3772
- _chunkNFCXUAE6js.FormInput,
3772
+ _chunkXUUHPYMMjs.FormInput,
3773
3773
  {
3774
3774
  form,
3775
3775
  id: "name",
@@ -3779,7 +3779,7 @@ function ProductEditorInternal({
3779
3779
  }
3780
3780
  ),
3781
3781
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3782
- _chunkNFCXUAE6js.FormTextarea,
3782
+ _chunkXUUHPYMMjs.FormTextarea,
3783
3783
  {
3784
3784
  form,
3785
3785
  id: "description",
@@ -3823,20 +3823,20 @@ var defaultContextValue2 = {
3823
3823
  };
3824
3824
  var ProductProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ children, dehydratedProduct, publishChrome = true }) => {
3825
3825
  const t = _nextintl.useTranslations.call(void 0, );
3826
- const generateUrl = _chunkNFCXUAE6js.usePageUrlGenerator.call(void 0, );
3827
- const { hasRole } = _chunkNFCXUAE6js.useCurrentUserContext.call(void 0, );
3826
+ const generateUrl = _chunkXUUHPYMMjs.usePageUrlGenerator.call(void 0, );
3827
+ const { hasRole } = _chunkXUUHPYMMjs.useCurrentUserContext.call(void 0, );
3828
3828
  const [product, setProduct] = _react.useState.call(void 0,
3829
- dehydratedProduct ? _chunk6OFANJTEjs.rehydrate.call(void 0, _chunk6OFANJTEjs.Modules.StripeProduct, dehydratedProduct) : void 0
3829
+ dehydratedProduct ? _chunk5PNDDYGLjs.rehydrate.call(void 0, _chunk5PNDDYGLjs.Modules.StripeProduct, dehydratedProduct) : void 0
3830
3830
  );
3831
3831
  const [catalogueVersion, setCatalogueVersion] = _react.useState.call(void 0, 0);
3832
3832
  const refreshCatalogue = _react.useCallback.call(void 0, () => setCatalogueVersion((value2) => value2 + 1), []);
3833
3833
  const reloadProduct = _react.useCallback.call(void 0, async () => {
3834
3834
  if (!_optionalChain([product, 'optionalAccess', _154 => _154.id])) return;
3835
- setProduct(await _chunk6OFANJTEjs.StripeProductService.getProduct({ id: product.id }));
3835
+ setProduct(await _chunk5PNDDYGLjs.StripeProductService.getProduct({ id: product.id }));
3836
3836
  }, [_optionalChain([product, 'optionalAccess', _155 => _155.id])]);
3837
3837
  const createProduct = _react.useCallback.call(void 0,
3838
3838
  async (input) => {
3839
- const saved = await _chunk6OFANJTEjs.StripeProductService.createProduct(input);
3839
+ const saved = await _chunk5PNDDYGLjs.StripeProductService.createProduct(input);
3840
3840
  refreshCatalogue();
3841
3841
  return saved;
3842
3842
  },
@@ -3844,7 +3844,7 @@ var ProductProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ ch
3844
3844
  );
3845
3845
  const updateProduct = _react.useCallback.call(void 0,
3846
3846
  async (input) => {
3847
- const saved = await _chunk6OFANJTEjs.StripeProductService.updateProduct(input);
3847
+ const saved = await _chunk5PNDDYGLjs.StripeProductService.updateProduct(input);
3848
3848
  setProduct(saved);
3849
3849
  refreshCatalogue();
3850
3850
  return saved;
@@ -3855,7 +3855,7 @@ var ProductProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ ch
3855
3855
  async (id) => {
3856
3856
  const target = _nullishCoalesce(id, () => ( _optionalChain([product, 'optionalAccess', _156 => _156.id])));
3857
3857
  if (!target) return;
3858
- await _chunk6OFANJTEjs.StripeProductService.archiveProduct({ id: target });
3858
+ await _chunk5PNDDYGLjs.StripeProductService.archiveProduct({ id: target });
3859
3859
  await reloadProduct();
3860
3860
  refreshCatalogue();
3861
3861
  },
@@ -3865,7 +3865,7 @@ var ProductProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ ch
3865
3865
  async (id) => {
3866
3866
  const target = _nullishCoalesce(id, () => ( _optionalChain([product, 'optionalAccess', _158 => _158.id])));
3867
3867
  if (!target) return;
3868
- await _chunk6OFANJTEjs.StripeProductService.reactivateProduct({ id: target });
3868
+ await _chunk5PNDDYGLjs.StripeProductService.reactivateProduct({ id: target });
3869
3869
  await reloadProduct();
3870
3870
  refreshCatalogue();
3871
3871
  },
@@ -3900,7 +3900,7 @@ var ProductProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ ch
3900
3900
  {
3901
3901
  name: t("billing.admin.products.title"),
3902
3902
  // Linked only when it is NOT the current page.
3903
- ...product ? { href: generateUrl({ page: _chunk6OFANJTEjs.Modules.StripeProduct }) } : {}
3903
+ ...product ? { href: generateUrl({ page: _chunk5PNDDYGLjs.Modules.StripeProduct }) } : {}
3904
3904
  }
3905
3905
  ];
3906
3906
  if (product) items.push({ name: product.name });
@@ -3918,7 +3918,7 @@ var ProductProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ ch
3918
3918
  }
3919
3919
  return response;
3920
3920
  }, "title");
3921
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProductContext.Provider, { value, children }) });
3921
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProductContext.Provider, { value, children }) });
3922
3922
  }, "ProductProvider");
3923
3923
  var useProductContext = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => _nullishCoalesce(_react.useContext.call(void 0, ProductContext), () => ( defaultContextValue2)), "useProductContext");
3924
3924
 
@@ -3927,56 +3927,56 @@ var useProductContext = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ()
3927
3927
 
3928
3928
  function PriceDetails() {
3929
3929
  const t = _nextintl.useTranslations.call(void 0, );
3930
- const generateUrl = _chunkNFCXUAE6js.usePageUrlGenerator.call(void 0, );
3930
+ const generateUrl = _chunkXUUHPYMMjs.usePageUrlGenerator.call(void 0, );
3931
3931
  const { price } = usePriceContext();
3932
3932
  if (!price) return null;
3933
3933
  const isRecurring = price.priceType === "recurring";
3934
3934
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-8", children: [
3935
3935
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
3936
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.SectionHeader, { children: t("billing.admin.prices.title") }),
3936
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.SectionHeader, { children: t("billing.admin.prices.title") }),
3937
3937
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: [
3938
3938
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3939
- _chunkNFCXUAE6js.DetailField,
3939
+ _chunkXUUHPYMMjs.DetailField,
3940
3940
  {
3941
3941
  label: t("billing.admin.prices.fields.product"),
3942
- value: price.product ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Link, { href: generateUrl({ page: _chunk6OFANJTEjs.Modules.StripeProduct, id: price.product.id }), children: price.product.name }) : "\u2014"
3942
+ value: price.product ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Link, { href: generateUrl({ page: _chunk5PNDDYGLjs.Modules.StripeProduct, id: price.product.id }), children: price.product.name }) : "\u2014"
3943
3943
  }
3944
3944
  ),
3945
3945
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3946
- _chunkNFCXUAE6js.DetailField,
3946
+ _chunkXUUHPYMMjs.DetailField,
3947
3947
  {
3948
3948
  label: t("billing.admin.prices.fields.status"),
3949
3949
  value: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex flex-wrap items-center gap-1", children: [
3950
- price.active ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Badge, { variant: "softGreen", children: t("billing.admin.prices.status.active") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Badge, { variant: "softGray", children: t("billing.admin.prices.status.archived") }),
3951
- price.isTrial && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Badge, { variant: "softBlue", children: t("billing.admin.prices.badge.trial") })
3950
+ price.active ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Badge, { variant: "softGreen", children: t("billing.admin.prices.status.active") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Badge, { variant: "softGray", children: t("billing.admin.prices.status.archived") }),
3951
+ price.isTrial && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Badge, { variant: "softBlue", children: t("billing.admin.prices.badge.trial") })
3952
3952
  ] })
3953
3953
  }
3954
3954
  ),
3955
3955
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3956
- _chunkNFCXUAE6js.DetailField,
3956
+ _chunkXUUHPYMMjs.DetailField,
3957
3957
  {
3958
3958
  label: t("billing.admin.prices.fields.amount"),
3959
- value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: _chunkNFCXUAE6js.formatCurrency.call(void 0, price.unitAmount, price.currency) })
3959
+ value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: _chunkXUUHPYMMjs.formatCurrency.call(void 0, price.unitAmount, price.currency) })
3960
3960
  }
3961
3961
  ),
3962
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.DetailField, { label: t("billing.admin.prices.fields.currency"), value: price.currency.toUpperCase() }),
3962
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.DetailField, { label: t("billing.admin.prices.fields.currency"), value: price.currency.toUpperCase() }),
3963
3963
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3964
- _chunkNFCXUAE6js.DetailField,
3964
+ _chunkXUUHPYMMjs.DetailField,
3965
3965
  {
3966
3966
  label: t("billing.admin.prices.fields.type"),
3967
3967
  value: isRecurring ? t("billing.admin.prices.type.recurring") : t("billing.admin.prices.type.oneTime")
3968
3968
  }
3969
3969
  ),
3970
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.DetailField, { label: t("billing.admin.prices.fields.billing"), value: _chunkNFCXUAE6js.formatInterval.call(void 0, price) }),
3970
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.DetailField, { label: t("billing.admin.prices.fields.billing"), value: _chunkXUUHPYMMjs.formatInterval.call(void 0, price) }),
3971
3971
  isRecurring && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3972
- _chunkNFCXUAE6js.DetailField,
3972
+ _chunkXUUHPYMMjs.DetailField,
3973
3973
  {
3974
3974
  label: t("billing.admin.prices.fields.intervalCount"),
3975
3975
  value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: _nullishCoalesce(_optionalChain([price, 'access', _160 => _160.recurring, 'optionalAccess', _161 => _161.intervalCount]), () => ( 1)) })
3976
3976
  }
3977
3977
  ),
3978
3978
  isRecurring && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3979
- _chunkNFCXUAE6js.DetailField,
3979
+ _chunkXUUHPYMMjs.DetailField,
3980
3980
  {
3981
3981
  label: t("billing.admin.prices.fields.usageType"),
3982
3982
  value: _optionalChain([price, 'access', _162 => _162.recurring, 'optionalAccess', _163 => _163.usageType]) === "metered" ? t("billing.admin.prices.usage.metered") : t("billing.admin.prices.usage.licensed")
@@ -3985,24 +3985,24 @@ function PriceDetails() {
3985
3985
  ] })
3986
3986
  ] }),
3987
3987
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
3988
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.SectionHeader, { children: t("billing.admin.prices.fields.platformFeatures") }),
3988
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.SectionHeader, { children: t("billing.admin.prices.fields.platformFeatures") }),
3989
3989
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: [
3990
3990
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3991
- _chunkNFCXUAE6js.DetailField,
3991
+ _chunkXUUHPYMMjs.DetailField,
3992
3992
  {
3993
3993
  label: t("billing.admin.prices.fields.token"),
3994
3994
  value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: _nullishCoalesce(price.token, () => ( "\u2014")) })
3995
3995
  }
3996
3996
  ),
3997
3997
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3998
- _chunkNFCXUAE6js.DetailField,
3998
+ _chunkXUUHPYMMjs.DetailField,
3999
3999
  {
4000
4000
  label: t("billing.admin.prices.fields.stripeId"),
4001
4001
  value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: price.stripePriceId })
4002
4002
  }
4003
4003
  ),
4004
4004
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4005
- _chunkNFCXUAE6js.DetailField,
4005
+ _chunkXUUHPYMMjs.DetailField,
4006
4006
  {
4007
4007
  label: t("billing.admin.prices.fields.description"),
4008
4008
  value: _nullishCoalesce(price.description, () => ( "\u2014")),
@@ -4010,7 +4010,7 @@ function PriceDetails() {
4010
4010
  }
4011
4011
  ),
4012
4012
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4013
- _chunkNFCXUAE6js.DetailField,
4013
+ _chunkXUUHPYMMjs.DetailField,
4014
4014
  {
4015
4015
  label: t("billing.admin.prices.fields.features"),
4016
4016
  className: "md:col-span-2",
@@ -4018,11 +4018,11 @@ function PriceDetails() {
4018
4018
  }
4019
4019
  ),
4020
4020
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4021
- _chunkNFCXUAE6js.DetailField,
4021
+ _chunkXUUHPYMMjs.DetailField,
4022
4022
  {
4023
4023
  label: t("billing.admin.prices.fields.platformFeatures"),
4024
4024
  className: "md:col-span-2",
4025
- value: price.priceFeatures.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "flex flex-wrap items-center gap-1", children: price.priceFeatures.map((feature) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Badge, { variant: "softGray", children: feature.name }, feature.id)) }) : "\u2014"
4025
+ value: price.priceFeatures.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "flex flex-wrap items-center gap-1", children: price.priceFeatures.map((feature) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Badge, { variant: "softGray", children: feature.name }, feature.id)) }) : "\u2014"
4026
4026
  }
4027
4027
  )
4028
4028
  ] })
@@ -4036,7 +4036,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, PriceDetails, "PriceDetails");
4036
4036
  function PriceContainer() {
4037
4037
  const { price } = usePriceContext();
4038
4038
  if (!price) return null;
4039
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.RoundPageContainer, { module: _chunk6OFANJTEjs.Modules.StripePrice, id: price.id, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PriceDetails, {}) });
4039
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.RoundPageContainer, { module: _chunk5PNDDYGLjs.Modules.StripePrice, id: price.id, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PriceDetails, {}) });
4040
4040
  }
4041
4041
  _chunk7QVYU63Ejs.__name.call(void 0, PriceContainer, "PriceContainer");
4042
4042
 
@@ -4161,10 +4161,10 @@ function PricesList({ productId, fullWidth }) {
4161
4161
  const importInputRef = _react.useRef.call(void 0, null);
4162
4162
  const [seed, setSeed] = _react.useState.call(void 0, void 0);
4163
4163
  const [seedNonce, setSeedNonce] = _react.useState.call(void 0, 0);
4164
- const data = _chunkNFCXUAE6js.useDataListRetriever.call(void 0, {
4165
- retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunk6OFANJTEjs.StripePriceService.listPrices({ ...params, productId }), "retriever"),
4164
+ const data = _chunkXUUHPYMMjs.useDataListRetriever.call(void 0, {
4165
+ retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunk5PNDDYGLjs.StripePriceService.listPrices({ ...params, productId }), "retriever"),
4166
4166
  retrieverParams: {},
4167
- module: _chunk6OFANJTEjs.Modules.StripePrice
4167
+ module: _chunk5PNDDYGLjs.Modules.StripePrice
4168
4168
  });
4169
4169
  _react.useEffect.call(void 0, () => {
4170
4170
  if (priceVersion > 0) void data.refresh();
@@ -4199,7 +4199,7 @@ function PricesList({ productId, fullWidth }) {
4199
4199
  openSeededEditor(transfer.price);
4200
4200
  } catch (error) {
4201
4201
  console.error("[PricesList] price import failed", error);
4202
- _chunkNFCXUAE6js.errorToast.call(void 0, {
4202
+ _chunkXUUHPYMMjs.errorToast.call(void 0, {
4203
4203
  title: t("billing.admin.prices.import.errors.title"),
4204
4204
  error: t("billing.admin.prices.import.errors.invalid")
4205
4205
  });
@@ -4218,7 +4218,7 @@ function PricesList({ productId, fullWidth }) {
4218
4218
  "create-price"
4219
4219
  ),
4220
4220
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _react.Fragment, { children: [
4221
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNFCXUAE6js.Button, { variant: "outline", size: "sm", type: "button", onClick: () => _optionalChain([importInputRef, 'access', _178 => _178.current, 'optionalAccess', _179 => _179.click, 'call', _180 => _180()]), children: [
4221
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXUUHPYMMjs.Button, { variant: "outline", size: "sm", type: "button", onClick: () => _optionalChain([importInputRef, 'access', _178 => _178.current, 'optionalAccess', _179 => _179.click, 'call', _180 => _180()]), children: [
4222
4222
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.UploadIcon, {}),
4223
4223
  t("billing.admin.prices.actions.import")
4224
4224
  ] }),
@@ -4236,7 +4236,7 @@ function PricesList({ productId, fullWidth }) {
4236
4236
  ];
4237
4237
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
4238
4238
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4239
- _chunkNFCXUAE6js.ContentListTable,
4239
+ _chunkXUUHPYMMjs.ContentListTable,
4240
4240
  {
4241
4241
  data,
4242
4242
  fields: [
@@ -4247,13 +4247,13 @@ function PricesList({ productId, fullWidth }) {
4247
4247
  "status" /* status */,
4248
4248
  "actions" /* actions */
4249
4249
  ],
4250
- tableGeneratorType: _chunk6OFANJTEjs.Modules.StripePrice,
4250
+ tableGeneratorType: _chunk5PNDDYGLjs.Modules.StripePrice,
4251
4251
  functions,
4252
4252
  context: tableContext,
4253
4253
  fullWidth,
4254
4254
  title: t("billing.admin.prices.title"),
4255
4255
  emptyState: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4256
- _chunkNFCXUAE6js.EmptyState,
4256
+ _chunkXUUHPYMMjs.EmptyState,
4257
4257
  {
4258
4258
  icon: _lucidereact.DollarSignIcon,
4259
4259
  title: t("billing.admin.prices.empty.title"),
@@ -4293,18 +4293,18 @@ function ProductDetails() {
4293
4293
  const { product } = useProductContext();
4294
4294
  if (!product) return null;
4295
4295
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
4296
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.SectionHeader, { children: t("billing.admin.products.tabs.details") }),
4296
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.SectionHeader, { children: t("billing.admin.products.tabs.details") }),
4297
4297
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: [
4298
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.DetailField, { label: t("billing.admin.products.fields.name"), value: product.name }),
4298
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.DetailField, { label: t("billing.admin.products.fields.name"), value: product.name }),
4299
4299
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4300
- _chunkNFCXUAE6js.DetailField,
4300
+ _chunkXUUHPYMMjs.DetailField,
4301
4301
  {
4302
4302
  label: t("billing.admin.products.fields.status"),
4303
- value: product.active ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Badge, { variant: "softGreen", children: t("billing.admin.products.status.active") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.Badge, { variant: "softGray", children: t("billing.admin.products.status.archived") })
4303
+ value: product.active ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Badge, { variant: "softGreen", children: t("billing.admin.products.status.active") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.Badge, { variant: "softGray", children: t("billing.admin.products.status.archived") })
4304
4304
  }
4305
4305
  ),
4306
4306
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4307
- _chunkNFCXUAE6js.DetailField,
4307
+ _chunkXUUHPYMMjs.DetailField,
4308
4308
  {
4309
4309
  label: t("billing.admin.products.fields.description"),
4310
4310
  value: _nullishCoalesce(product.description, () => ( "\u2014")),
@@ -4312,14 +4312,14 @@ function ProductDetails() {
4312
4312
  }
4313
4313
  ),
4314
4314
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4315
- _chunkNFCXUAE6js.DetailField,
4315
+ _chunkXUUHPYMMjs.DetailField,
4316
4316
  {
4317
4317
  label: t("billing.admin.products.fields.prices"),
4318
4318
  value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: product.stripePrices.length })
4319
4319
  }
4320
4320
  ),
4321
4321
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4322
- _chunkNFCXUAE6js.DetailField,
4322
+ _chunkXUUHPYMMjs.DetailField,
4323
4323
  {
4324
4324
  label: t("billing.admin.products.fields.stripeId"),
4325
4325
  value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: product.stripeProductId })
@@ -4337,9 +4337,9 @@ function ProductContainer() {
4337
4337
  const { product } = useProductContext();
4338
4338
  if (!product) return null;
4339
4339
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4340
- _chunkNFCXUAE6js.RoundPageContainer,
4340
+ _chunkXUUHPYMMjs.RoundPageContainer,
4341
4341
  {
4342
- module: _chunk6OFANJTEjs.Modules.StripeProduct,
4342
+ module: _chunk5PNDDYGLjs.Modules.StripeProduct,
4343
4343
  id: product.id,
4344
4344
  tabs: [
4345
4345
  {
@@ -4348,7 +4348,7 @@ function ProductContainer() {
4348
4348
  content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProductDetails, {})
4349
4349
  },
4350
4350
  {
4351
- key: _chunk6OFANJTEjs.Modules.StripePrice,
4351
+ key: _chunk5PNDDYGLjs.Modules.StripePrice,
4352
4352
  label: t("billing.admin.prices.title"),
4353
4353
  // publishChrome={false}: SharedProvider REPLACES its value for the
4354
4354
  // subtree (SharedContext.tsx:35-37), so a nested provider publishing
@@ -4372,26 +4372,26 @@ _chunk7QVYU63Ejs.__name.call(void 0, ProductContainer, "ProductContainer");
4372
4372
  function ProductsList({ fullWidth } = {}) {
4373
4373
  const t = _nextintl.useTranslations.call(void 0, );
4374
4374
  const { catalogueVersion } = useProductContext();
4375
- const data = _chunkNFCXUAE6js.useDataListRetriever.call(void 0, {
4376
- retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunk6OFANJTEjs.StripeProductService.listProducts(params), "retriever"),
4375
+ const data = _chunkXUUHPYMMjs.useDataListRetriever.call(void 0, {
4376
+ retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunk5PNDDYGLjs.StripeProductService.listProducts(params), "retriever"),
4377
4377
  retrieverParams: {},
4378
- module: _chunk6OFANJTEjs.Modules.StripeProduct
4378
+ module: _chunk5PNDDYGLjs.Modules.StripeProduct
4379
4379
  });
4380
4380
  _react.useEffect.call(void 0, () => {
4381
4381
  if (catalogueVersion > 0) void data.refresh();
4382
4382
  }, [catalogueVersion]);
4383
4383
  const functions = [/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProductEditor, {}, "create-product")];
4384
4384
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4385
- _chunkNFCXUAE6js.ContentListTable,
4385
+ _chunkXUUHPYMMjs.ContentListTable,
4386
4386
  {
4387
4387
  data,
4388
4388
  fields: ["name" /* name */, "status" /* status */, "prices" /* prices */],
4389
- tableGeneratorType: _chunk6OFANJTEjs.Modules.StripeProduct,
4389
+ tableGeneratorType: _chunk5PNDDYGLjs.Modules.StripeProduct,
4390
4390
  functions,
4391
4391
  fullWidth,
4392
4392
  title: t("billing.admin.products.title"),
4393
4393
  emptyState: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4394
- _chunkNFCXUAE6js.EmptyState,
4394
+ _chunkXUUHPYMMjs.EmptyState,
4395
4395
  {
4396
4396
  icon: _lucidereact.PackageIcon,
4397
4397
  title: t("billing.admin.products.empty.title"),
@@ -4406,7 +4406,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, ProductsList, "ProductsList");
4406
4406
  // src/features/billing/stripe-product/components/containers/ProductsListContainer.tsx
4407
4407
 
4408
4408
  function ProductsListContainer() {
4409
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProductProvider, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNFCXUAE6js.RoundPageContainer, { module: _chunk6OFANJTEjs.Modules.StripeProduct, fullWidth: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProductsList, { fullWidth: true }) }) });
4409
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProductProvider, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXUUHPYMMjs.RoundPageContainer, { module: _chunk5PNDDYGLjs.Modules.StripeProduct, fullWidth: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProductsList, { fullWidth: true }) }) });
4410
4410
  }
4411
4411
  _chunk7QVYU63Ejs.__name.call(void 0, ProductsListContainer, "ProductsListContainer");
4412
4412
 
@@ -4469,5 +4469,5 @@ _chunk7QVYU63Ejs.__name.call(void 0, ProductsListContainer, "ProductsListContain
4469
4469
 
4470
4470
 
4471
4471
 
4472
- exports.BillingAlertBanner = BillingAlertBanner; exports.BillingDashboardContainer = BillingDashboardContainer; exports.BillingDetailModal = BillingDetailModal; exports.BillingUsageSummaryCard = BillingUsageSummaryCard; exports.CancelSubscriptionDialog = CancelSubscriptionDialog; exports.CustomerInfoCard = CustomerInfoCard; exports.IntervalToggle = IntervalToggle; exports.InvoiceDetails = InvoiceDetails; exports.InvoiceStatusBadge = InvoiceStatusBadge; exports.InvoicesContainer = InvoicesContainer; exports.InvoicesList = InvoicesList; exports.InvoicesSummaryCard = InvoicesSummaryCard; exports.PaymentMethodCard = PaymentMethodCard; exports.PaymentMethodEditor = PaymentMethodEditor; exports.PaymentMethodForm = PaymentMethodForm; exports.PaymentMethodSummaryCard = PaymentMethodSummaryCard; exports.PaymentMethodsContainer = PaymentMethodsContainer; exports.PaymentMethodsList = PaymentMethodsList; exports.PriceArchiver = PriceArchiver; exports.PriceContainer = PriceContainer; exports.PriceDetails = PriceDetails; exports.PriceEditor = PriceEditor; exports.PriceProvider = PriceProvider; exports.PricesList = PricesList; exports.PricingCard = PricingCard; exports.ProductArchiver = ProductArchiver; exports.ProductContainer = ProductContainer; exports.ProductDetails = ProductDetails; exports.ProductEditor = ProductEditor; exports.ProductPricingList = ProductPricingList; exports.ProductPricingRow = ProductPricingRow; exports.ProductProvider = ProductProvider; exports.ProductsList = ProductsList; exports.ProductsListContainer = ProductsListContainer; exports.PromoCodeInput = PromoCodeInput; exports.ProrationPreview = ProrationPreview; exports.StripeProvider = StripeProvider; exports.SubscriptionConfirmation = SubscriptionConfirmation; exports.SubscriptionDetails = SubscriptionDetails; exports.SubscriptionStatusBadge = SubscriptionStatusBadge; exports.SubscriptionSummaryCard = SubscriptionSummaryCard; exports.SubscriptionWizard = SubscriptionWizard; exports.SubscriptionsContainer = SubscriptionsContainer; exports.SubscriptionsList = SubscriptionsList; exports.UsageContainer = UsageContainer; exports.UsageHistoryTable = UsageHistoryTable; exports.UsageSummaryCard = UsageSummaryCard; exports.UsageSummaryCards = UsageSummaryCards; exports.WizardProgressIndicator = WizardProgressIndicator; exports.WizardStepPaymentMethod = WizardStepPaymentMethod; exports.WizardStepPlanSelection = WizardStepPlanSelection; exports.WizardStepReview = WizardStepReview; exports.formatCurrency = _chunkNFCXUAE6js.formatCurrency; exports.formatDate = formatDate3; exports.formatInterval = _chunkNFCXUAE6js.formatInterval; exports.isStripeConfigured = isStripeConfigured; exports.priceLabel = priceLabel; exports.usePriceContext = usePriceContext; exports.useProductContext = useProductContext;
4472
+ exports.BillingAlertBanner = BillingAlertBanner; exports.BillingDashboardContainer = BillingDashboardContainer; exports.BillingDetailModal = BillingDetailModal; exports.BillingUsageSummaryCard = BillingUsageSummaryCard; exports.CancelSubscriptionDialog = CancelSubscriptionDialog; exports.CustomerInfoCard = CustomerInfoCard; exports.IntervalToggle = IntervalToggle; exports.InvoiceDetails = InvoiceDetails; exports.InvoiceStatusBadge = InvoiceStatusBadge; exports.InvoicesContainer = InvoicesContainer; exports.InvoicesList = InvoicesList; exports.InvoicesSummaryCard = InvoicesSummaryCard; exports.PaymentMethodCard = PaymentMethodCard; exports.PaymentMethodEditor = PaymentMethodEditor; exports.PaymentMethodForm = PaymentMethodForm; exports.PaymentMethodSummaryCard = PaymentMethodSummaryCard; exports.PaymentMethodsContainer = PaymentMethodsContainer; exports.PaymentMethodsList = PaymentMethodsList; exports.PriceArchiver = PriceArchiver; exports.PriceContainer = PriceContainer; exports.PriceDetails = PriceDetails; exports.PriceEditor = PriceEditor; exports.PriceProvider = PriceProvider; exports.PricesList = PricesList; exports.PricingCard = PricingCard; exports.ProductArchiver = ProductArchiver; exports.ProductContainer = ProductContainer; exports.ProductDetails = ProductDetails; exports.ProductEditor = ProductEditor; exports.ProductPricingList = ProductPricingList; exports.ProductPricingRow = ProductPricingRow; exports.ProductProvider = ProductProvider; exports.ProductsList = ProductsList; exports.ProductsListContainer = ProductsListContainer; exports.PromoCodeInput = PromoCodeInput; exports.ProrationPreview = ProrationPreview; exports.StripeProvider = StripeProvider; exports.SubscriptionConfirmation = SubscriptionConfirmation; exports.SubscriptionDetails = SubscriptionDetails; exports.SubscriptionStatusBadge = SubscriptionStatusBadge; exports.SubscriptionSummaryCard = SubscriptionSummaryCard; exports.SubscriptionWizard = SubscriptionWizard; exports.SubscriptionsContainer = SubscriptionsContainer; exports.SubscriptionsList = SubscriptionsList; exports.UsageContainer = UsageContainer; exports.UsageHistoryTable = UsageHistoryTable; exports.UsageSummaryCard = UsageSummaryCard; exports.UsageSummaryCards = UsageSummaryCards; exports.WizardProgressIndicator = WizardProgressIndicator; exports.WizardStepPaymentMethod = WizardStepPaymentMethod; exports.WizardStepPlanSelection = WizardStepPlanSelection; exports.WizardStepReview = WizardStepReview; exports.formatCurrency = _chunkXUUHPYMMjs.formatCurrency; exports.formatDate = formatDate3; exports.formatInterval = _chunkXUUHPYMMjs.formatInterval; exports.isStripeConfigured = isStripeConfigured; exports.priceLabel = priceLabel; exports.usePriceContext = usePriceContext; exports.useProductContext = useProductContext;
4473
4473
  //# sourceMappingURL=index.js.map