@carlonicora/nextjs-jsonapi 3.0.0 → 3.1.0

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 (90) hide show
  1. package/dist/AbstractApiData-DtitRWPz.d.ts +47 -0
  2. package/dist/AbstractApiData-XLhBP5Tl.d.mts +47 -0
  3. package/dist/{BlockNoteEditor-CDTU6DRN.js → BlockNoteEditor-4KBDD2TM.js} +20 -20
  4. package/dist/{BlockNoteEditor-CDTU6DRN.js.map → BlockNoteEditor-4KBDD2TM.js.map} +1 -1
  5. package/dist/{BlockNoteEditor-VVAY73V2.mjs → BlockNoteEditor-LJ2KA44Z.mjs} +5 -5
  6. package/dist/{JsonApiRequest-3UWVIIFL.mjs → JsonApiRequest-2OQCZAK6.mjs} +2 -2
  7. package/dist/JsonApiRequest-6TYNBVUL.js +26 -0
  8. package/dist/{JsonApiRequest-QRU3IPIU.js.map → JsonApiRequest-6TYNBVUL.js.map} +1 -1
  9. package/dist/ai-connection.module-28f-hux0.d.mts +255 -0
  10. package/dist/ai-connection.module-Bqwh_DnR.d.ts +255 -0
  11. package/dist/billing/index.js +399 -399
  12. package/dist/billing/index.mjs +4 -4
  13. package/dist/{chunk-TWXKAY34.mjs → chunk-CGJW7ZZM.mjs} +310 -5
  14. package/dist/chunk-CGJW7ZZM.mjs.map +1 -0
  15. package/dist/{chunk-E5YA5Z5X.mjs → chunk-CMGXH5SA.mjs} +2 -1
  16. package/dist/chunk-CMGXH5SA.mjs.map +1 -0
  17. package/dist/{chunk-JKGEJGSD.js → chunk-H7DOSB7W.js} +9 -9
  18. package/dist/{chunk-JKGEJGSD.js.map → chunk-H7DOSB7W.js.map} +1 -1
  19. package/dist/{chunk-FPO4DLZN.js → chunk-PFAZPP54.js} +2 -1
  20. package/dist/chunk-PFAZPP54.js.map +1 -0
  21. package/dist/{chunk-UGNLKDI6.js → chunk-UYOQG5IW.js} +1628 -959
  22. package/dist/chunk-UYOQG5IW.js.map +1 -0
  23. package/dist/{chunk-J54546YC.mjs → chunk-WCRZEBX4.mjs} +1750 -1081
  24. package/dist/chunk-WCRZEBX4.mjs.map +1 -0
  25. package/dist/{chunk-53B6NPGA.js → chunk-YUXCJ35V.js} +377 -72
  26. package/dist/chunk-YUXCJ35V.js.map +1 -0
  27. package/dist/{chunk-PHEFWL6L.mjs → chunk-ZMYZFQN3.mjs} +3 -3
  28. package/dist/client/index.js +5 -5
  29. package/dist/client/index.mjs +4 -4
  30. package/dist/components/index.d.mts +122 -4
  31. package/dist/components/index.d.ts +122 -4
  32. package/dist/components/index.js +31 -5
  33. package/dist/components/index.js.map +1 -1
  34. package/dist/components/index.mjs +30 -4
  35. package/dist/{config-BIjrg5wd.d.ts → config-B6UB7j69.d.ts} +1 -46
  36. package/dist/{config-BRUjtCd1.d.mts → config-n-ZpPmOL.d.mts} +1 -46
  37. package/dist/contexts/index.js +5 -5
  38. package/dist/contexts/index.mjs +4 -4
  39. package/dist/core/index.d.mts +5 -4
  40. package/dist/core/index.d.ts +5 -4
  41. package/dist/core/index.js +11 -3
  42. package/dist/core/index.js.map +1 -1
  43. package/dist/core/index.mjs +10 -2
  44. package/dist/features/help/index.js +38 -38
  45. package/dist/features/help/index.mjs +4 -4
  46. package/dist/features/tokenusage/index.d.mts +2 -2
  47. package/dist/features/tokenusage/index.d.ts +2 -2
  48. package/dist/features/tokenusage/index.js +102 -102
  49. package/dist/features/tokenusage/index.mjs +4 -4
  50. package/dist/index.d.mts +3 -3
  51. package/dist/index.d.ts +3 -3
  52. package/dist/index.js +12 -4
  53. package/dist/index.js.map +1 -1
  54. package/dist/index.mjs +11 -3
  55. package/dist/server/index.js +12 -12
  56. package/dist/server/index.mjs +2 -2
  57. package/package.json +1 -1
  58. package/src/components/index.ts +1 -0
  59. package/src/core/index.ts +5 -0
  60. package/src/core/registry/ModuleRegistry.ts +2 -0
  61. package/src/core/utils/translateResponse.ts +6 -0
  62. package/src/features/administration/components/AdminIndexContainer.tsx +9 -2
  63. package/src/features/ai-connection/ai-connection.module.ts +14 -0
  64. package/src/features/ai-connection/components/containers/AiConnectionsContainer.tsx +109 -0
  65. package/src/features/ai-connection/components/forms/AiConnectionDeleter.tsx +58 -0
  66. package/src/features/ai-connection/components/forms/AiConnectionEditor.tsx +329 -0
  67. package/src/features/ai-connection/components/lists/AiConnectionTypeCard.tsx +223 -0
  68. package/src/features/ai-connection/contexts/AiConnectionsContext.tsx +111 -0
  69. package/src/features/ai-connection/data/__tests__/ai-connection.test.ts +202 -0
  70. package/src/features/ai-connection/data/ai-connection.fields.ts +6 -0
  71. package/src/features/ai-connection/data/ai-connection.interface.ts +87 -0
  72. package/src/features/ai-connection/data/ai-connection.service.ts +90 -0
  73. package/src/features/ai-connection/data/ai-connection.ts +244 -0
  74. package/src/features/ai-connection/data/index.ts +4 -0
  75. package/src/features/ai-connection/i18n-keys.ts +66 -0
  76. package/src/features/ai-connection/index.ts +11 -0
  77. package/src/features/index.ts +1 -0
  78. package/src/features/user/components/forms/UserEditor.tsx +11 -2
  79. package/dist/AuthComponent-Cik96ElA.d.mts +0 -56
  80. package/dist/AuthComponent-DTTKu3VK.d.ts +0 -56
  81. package/dist/JsonApiRequest-QRU3IPIU.js +0 -26
  82. package/dist/chunk-53B6NPGA.js.map +0 -1
  83. package/dist/chunk-E5YA5Z5X.mjs.map +0 -1
  84. package/dist/chunk-FPO4DLZN.js.map +0 -1
  85. package/dist/chunk-J54546YC.mjs.map +0 -1
  86. package/dist/chunk-TWXKAY34.mjs.map +0 -1
  87. package/dist/chunk-UGNLKDI6.js.map +0 -1
  88. /package/dist/{BlockNoteEditor-VVAY73V2.mjs.map → BlockNoteEditor-LJ2KA44Z.mjs.map} +0 -0
  89. /package/dist/{JsonApiRequest-3UWVIIFL.mjs.map → JsonApiRequest-2OQCZAK6.mjs.map} +0 -0
  90. /package/dist/{chunk-PHEFWL6L.mjs.map → chunk-ZMYZFQN3.mjs.map} +0 -0
@@ -62,12 +62,12 @@
62
62
 
63
63
 
64
64
 
65
- var _chunkUGNLKDI6js = require('../chunk-UGNLKDI6.js');
65
+ var _chunkUYOQG5IWjs = require('../chunk-UYOQG5IW.js');
66
66
 
67
67
 
68
68
 
69
69
 
70
- var _chunkJKGEJGSDjs = require('../chunk-JKGEJGSD.js');
70
+ var _chunkH7DOSB7Wjs = require('../chunk-H7DOSB7W.js');
71
71
 
72
72
 
73
73
 
@@ -80,10 +80,10 @@ var _chunkJKGEJGSDjs = require('../chunk-JKGEJGSD.js');
80
80
 
81
81
 
82
82
 
83
- var _chunk53B6NPGAjs = require('../chunk-53B6NPGA.js');
83
+ var _chunkYUXCJ35Vjs = require('../chunk-YUXCJ35V.js');
84
84
  require('../chunk-LXKSUWAV.js');
85
85
  require('../chunk-IBS6NI7D.js');
86
- require('../chunk-FPO4DLZN.js');
86
+ require('../chunk-PFAZPP54.js');
87
87
  require('../chunk-3EPNHTMH.js');
88
88
 
89
89
 
@@ -131,41 +131,41 @@ function SubscriptionSummaryCard({
131
131
  onManageClick
132
132
  }) {
133
133
  if (loading) {
134
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.Card, { children: [
135
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
136
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardTitle, { children: "Subscriptions" }),
134
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.Card, { children: [
135
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
136
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardTitle, { children: "Subscriptions" }),
137
137
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-4 w-4 text-muted-foreground" })
138
138
  ] }),
139
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.CardContent, { children: [
140
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Skeleton, { className: "h-6 w-32 mb-2" }),
141
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Skeleton, { className: "h-4 w-24 mb-1" }),
142
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Skeleton, { className: "h-4 w-40" })
139
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.CardContent, { children: [
140
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Skeleton, { className: "h-6 w-32 mb-2" }),
141
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Skeleton, { className: "h-4 w-24 mb-1" }),
142
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Skeleton, { className: "h-4 w-40" })
143
143
  ] })
144
144
  ] });
145
145
  }
146
146
  if (error) {
147
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.Card, { children: [
148
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
149
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardTitle, { children: "Subscriptions" }),
147
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.Card, { children: [
148
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
149
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardTitle, { children: "Subscriptions" }),
150
150
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-4 w-4 text-muted-foreground" })
151
151
  ] }),
152
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
152
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
153
153
  ] });
154
154
  }
155
155
  const activeSubscriptions = subscriptions.filter(
156
156
  (sub) => sub.status === "active" /* ACTIVE */ || sub.status === "trialing" /* TRIALING */
157
157
  );
158
158
  const primarySubscription = activeSubscriptions[0];
159
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onManageClick, children: [
160
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
161
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardTitle, { children: "Subscriptions" }),
159
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onManageClick, children: [
160
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
161
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardTitle, { children: "Subscriptions" }),
162
162
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-4 w-4 text-muted-foreground" })
163
163
  ] }),
164
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardContent, { children: subscriptions.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
164
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardContent, { children: subscriptions.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
165
165
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold text-muted-foreground", children: "No active plan" }),
166
166
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground", children: "Subscribe to get started" }),
167
167
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
168
- _chunkUGNLKDI6js.Button,
168
+ _chunkUYOQG5IWjs.Button,
169
169
  {
170
170
  variant: "outline",
171
171
  size: "sm",
@@ -184,7 +184,7 @@ function SubscriptionSummaryCard({
184
184
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
185
185
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold", children: formatPlanName(primarySubscription) }),
186
186
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
187
- _chunkUGNLKDI6js.Badge,
187
+ _chunkUYOQG5IWjs.Badge,
188
188
  {
189
189
  variant: primarySubscription.cancelAtPeriodEnd ? "secondary" : getStatusBadgeVariant(primarySubscription.status),
190
190
  children: primarySubscription.cancelAtPeriodEnd ? "Canceling" : primarySubscription.status
@@ -226,37 +226,37 @@ function PaymentMethodSummaryCard({
226
226
  onManageClick
227
227
  }) {
228
228
  if (loading) {
229
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.Card, { children: [
230
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
231
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardTitle, { children: "Payment Method" }),
229
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.Card, { children: [
230
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
231
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardTitle, { children: "Payment Method" }),
232
232
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Wallet, { className: "h-4 w-4 text-muted-foreground" })
233
233
  ] }),
234
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.CardContent, { children: [
235
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Skeleton, { className: "h-6 w-32 mb-2" }),
236
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Skeleton, { className: "h-4 w-24" })
234
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.CardContent, { children: [
235
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Skeleton, { className: "h-6 w-32 mb-2" }),
236
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Skeleton, { className: "h-4 w-24" })
237
237
  ] })
238
238
  ] });
239
239
  }
240
240
  if (error) {
241
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.Card, { children: [
242
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
243
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardTitle, { children: "Payment Method" }),
241
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.Card, { children: [
242
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
243
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardTitle, { children: "Payment Method" }),
244
244
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Wallet, { className: "h-4 w-4 text-muted-foreground" })
245
245
  ] }),
246
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
246
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
247
247
  ] });
248
248
  }
249
249
  const defaultMethod = paymentMethods.find((pm) => pm.id === defaultPaymentMethodId) || paymentMethods[0];
250
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onManageClick, children: [
251
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
252
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardTitle, { children: "Payment Method" }),
250
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onManageClick, children: [
251
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
252
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardTitle, { children: "Payment Method" }),
253
253
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Wallet, { className: "h-4 w-4 text-muted-foreground" })
254
254
  ] }),
255
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardContent, { children: paymentMethods.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
255
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardContent, { children: paymentMethods.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
256
256
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold text-muted-foreground", children: "No payment method" }),
257
257
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground", children: "Add a card to enable subscriptions" }),
258
258
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
259
- _chunkUGNLKDI6js.Button,
259
+ _chunkUYOQG5IWjs.Button,
260
260
  {
261
261
  variant: "outline",
262
262
  size: "sm",
@@ -320,7 +320,7 @@ function CustomerInfoCard({ customer, loading, error }) {
320
320
  e.stopPropagation();
321
321
  setPortalLoading(true);
322
322
  try {
323
- const { url } = await _chunk53B6NPGAjs.StripeCustomerService.createPortalSession();
323
+ const { url } = await _chunkYUXCJ35Vjs.StripeCustomerService.createPortalSession();
324
324
  window.open(url, "_blank");
325
325
  } catch (err) {
326
326
  console.error("[CustomerInfoCard] Failed to create portal session:", err);
@@ -329,52 +329,52 @@ function CustomerInfoCard({ customer, loading, error }) {
329
329
  }
330
330
  }, "handlePortalClick");
331
331
  if (loading) {
332
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.Card, { children: [
333
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
334
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardTitle, { children: "Billing Account" }),
332
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.Card, { children: [
333
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
334
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardTitle, { children: "Billing Account" }),
335
335
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.User, { className: "h-4 w-4 text-muted-foreground" })
336
336
  ] }),
337
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.CardContent, { children: [
338
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Skeleton, { className: "h-6 w-32 mb-2" }),
339
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Skeleton, { className: "h-4 w-48 mb-1" }),
340
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Skeleton, { className: "h-4 w-24" })
337
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.CardContent, { children: [
338
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Skeleton, { className: "h-6 w-32 mb-2" }),
339
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Skeleton, { className: "h-4 w-48 mb-1" }),
340
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Skeleton, { className: "h-4 w-24" })
341
341
  ] })
342
342
  ] });
343
343
  }
344
344
  if (error) {
345
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.Card, { children: [
346
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
347
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardTitle, { children: "Billing Account" }),
345
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.Card, { children: [
346
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
347
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardTitle, { children: "Billing Account" }),
348
348
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.User, { className: "h-4 w-4 text-muted-foreground" })
349
349
  ] }),
350
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
350
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
351
351
  ] });
352
352
  }
353
353
  if (!customer) {
354
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.Card, { children: [
355
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
356
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardTitle, { children: "Billing Account" }),
354
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.Card, { children: [
355
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
356
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardTitle, { children: "Billing Account" }),
357
357
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.User, { className: "h-4 w-4 text-muted-foreground" })
358
358
  ] }),
359
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.CardContent, { children: [
359
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.CardContent, { children: [
360
360
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold text-muted-foreground", children: "Not set up" }),
361
361
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground", children: "Billing account will be created when you subscribe" })
362
362
  ] })
363
363
  ] });
364
364
  }
365
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.Card, { children: [
366
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
367
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardTitle, { children: "Billing Account" }),
365
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.Card, { children: [
366
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
367
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardTitle, { children: "Billing Account" }),
368
368
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.User, { className: "h-4 w-4 text-muted-foreground" })
369
369
  ] }),
370
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
370
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
371
371
  customer.name && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold", children: customer.name }),
372
372
  customer.email && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: customer.email }),
373
373
  customer.balance !== void 0 && customer.balance !== 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: "text-sm", children: [
374
374
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground", children: "Credit Balance: " }),
375
375
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: customer.balance < 0 ? "text-success" : "text-destructive", children: formatBalance(customer.balance, customer.currency) })
376
376
  ] }),
377
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.Button, { variant: "outline", size: "sm", className: "mt-2", onClick: handlePortalClick, disabled: portalLoading, children: [
377
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.Button, { variant: "outline", size: "sm", className: "mt-2", onClick: handlePortalClick, disabled: portalLoading, children: [
378
378
  portalLoading ? "Loading..." : "Manage in Stripe Portal",
379
379
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ExternalLink, { className: "h-4 w-4 ml-1" })
380
380
  ] })
@@ -418,42 +418,42 @@ function formatAmount(amount, currency) {
418
418
  _chunk7QVYU63Ejs.__name.call(void 0, formatAmount, "formatAmount");
419
419
  function InvoicesSummaryCard({ invoices, loading, error, onViewAllClick }) {
420
420
  if (loading) {
421
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.Card, { children: [
422
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
423
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardTitle, { children: "Recent Invoices" }),
421
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.Card, { children: [
422
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
423
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardTitle, { children: "Recent Invoices" }),
424
424
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ReceiptIcon, { className: "h-4 w-4 text-muted-foreground" })
425
425
  ] }),
426
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.CardContent, { children: [
427
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Skeleton, { className: "h-6 w-24 mb-2" }),
428
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Skeleton, { className: "h-4 w-32 mb-1" }),
429
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Skeleton, { className: "h-4 w-20" })
426
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.CardContent, { children: [
427
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Skeleton, { className: "h-6 w-24 mb-2" }),
428
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Skeleton, { className: "h-4 w-32 mb-1" }),
429
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Skeleton, { className: "h-4 w-20" })
430
430
  ] })
431
431
  ] });
432
432
  }
433
433
  if (error) {
434
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.Card, { children: [
435
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
436
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardTitle, { children: "Recent Invoices" }),
434
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.Card, { children: [
435
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
436
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardTitle, { children: "Recent Invoices" }),
437
437
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ReceiptIcon, { className: "h-4 w-4 text-muted-foreground" })
438
438
  ] }),
439
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
439
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
440
440
  ] });
441
441
  }
442
442
  const latestInvoice = invoices[0];
443
443
  const paidInvoices = invoices.filter((inv) => inv.status === "paid" /* PAID */);
444
444
  const openInvoices = invoices.filter((inv) => inv.status === "open" /* OPEN */);
445
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onViewAllClick, children: [
446
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
447
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardTitle, { children: "Recent Invoices" }),
445
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onViewAllClick, children: [
446
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
447
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardTitle, { children: "Recent Invoices" }),
448
448
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ReceiptIcon, { className: "h-4 w-4 text-muted-foreground" })
449
449
  ] }),
450
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardContent, { children: invoices.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
450
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardContent, { children: invoices.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
451
451
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold text-muted-foreground", children: "No invoices yet" }),
452
452
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground", children: "Invoices will appear after your first billing cycle" })
453
453
  ] }) : latestInvoice ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
454
454
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
455
455
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold", children: formatAmount(latestInvoice.total, latestInvoice.currency) }),
456
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Badge, { variant: getStatusBadgeVariant2(latestInvoice.status), children: latestInvoice.status })
456
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Badge, { variant: getStatusBadgeVariant2(latestInvoice.status), children: latestInvoice.status })
457
457
  ] }),
458
458
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: latestInvoice.stripeInvoiceNumber || `Invoice from ${formatDate2(latestInvoice.periodStart)}` }),
459
459
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-4 text-xs text-muted-foreground", children: [
@@ -493,24 +493,24 @@ function BillingUsageSummaryCard({
493
493
  onViewDetailsClick
494
494
  }) {
495
495
  if (loading) {
496
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.Card, { children: [
497
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
498
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardTitle, { children: "Usage This Month" }),
496
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.Card, { children: [
497
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
498
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardTitle, { children: "Usage This Month" }),
499
499
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Activity, { className: "h-4 w-4 text-muted-foreground" })
500
500
  ] }),
501
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.CardContent, { children: [
502
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Skeleton, { className: "h-6 w-24 mb-2" }),
503
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Skeleton, { className: "h-4 w-32" })
501
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.CardContent, { children: [
502
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Skeleton, { className: "h-6 w-24 mb-2" }),
503
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Skeleton, { className: "h-4 w-32" })
504
504
  ] })
505
505
  ] });
506
506
  }
507
507
  if (error) {
508
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.Card, { children: [
509
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
510
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardTitle, { children: "Usage This Month" }),
508
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.Card, { children: [
509
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
510
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardTitle, { children: "Usage This Month" }),
511
511
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Activity, { className: "h-4 w-4 text-muted-foreground" })
512
512
  ] }),
513
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
513
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
514
514
  ] });
515
515
  }
516
516
  const totalUsage = Object.values(summaries).reduce((acc, summary) => {
@@ -518,12 +518,12 @@ function BillingUsageSummaryCard({
518
518
  }, 0);
519
519
  const primaryMeter = meters.find((m) => _optionalChain([summaries, 'access', _17 => _17[m.id], 'optionalAccess', _18 => _18.aggregatedValue]));
520
520
  const primarySummary = primaryMeter ? summaries[primaryMeter.id] : null;
521
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onViewDetailsClick, children: [
522
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
523
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardTitle, { children: "Usage This Month" }),
521
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onViewDetailsClick, children: [
522
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
523
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardTitle, { children: "Usage This Month" }),
524
524
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Activity, { className: "h-4 w-4 text-muted-foreground" })
525
525
  ] }),
526
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardContent, { children: meters.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
526
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardContent, { children: meters.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
527
527
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold text-muted-foreground", children: "No meters" }),
528
528
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground", children: "No usage meters are configured" })
529
529
  ] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
@@ -575,7 +575,7 @@ function PaymentMethodForm({ onSuccess, onCancel, isLoading = false }) {
575
575
  const fetchSetupIntent = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
576
576
  setLoading(true);
577
577
  try {
578
- const intent = await _chunk53B6NPGAjs.StripeCustomerService.createSetupIntent();
578
+ const intent = await _chunkYUXCJ35Vjs.StripeCustomerService.createSetupIntent();
579
579
  setSetupIntent(intent);
580
580
  } catch (err) {
581
581
  console.error("[PaymentMethodForm] Failed to create setup intent:", err);
@@ -613,7 +613,7 @@ function PaymentMethodForm({ onSuccess, onCancel, isLoading = false }) {
613
613
  return;
614
614
  }
615
615
  if (setAsDefault && _optionalChain([confirmedSetupIntent, 'optionalAccess', _19 => _19.payment_method])) {
616
- await _chunk53B6NPGAjs.StripeCustomerService.setDefaultPaymentMethod({
616
+ await _chunkYUXCJ35Vjs.StripeCustomerService.setDefaultPaymentMethod({
617
617
  paymentMethodId: typeof confirmedSetupIntent.payment_method === "string" ? confirmedSetupIntent.payment_method : confirmedSetupIntent.payment_method.id
618
618
  });
619
619
  }
@@ -629,7 +629,7 @@ function PaymentMethodForm({ onSuccess, onCancel, isLoading = false }) {
629
629
  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..." }) });
630
630
  }
631
631
  if (!setupIntent && error) {
632
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Alert, { variant: "destructive", className: "bg-red-50 border-red-200", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.AlertDescription, { children: error }) });
632
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Alert, { variant: "destructive", className: "bg-red-50 border-red-200", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.AlertDescription, { children: error }) });
633
633
  }
634
634
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: handleSubmit, className: "flex flex-col gap-y-4", children: [
635
635
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rounded-md border border-gray-300 p-3", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -652,13 +652,13 @@ function PaymentMethodForm({ onSuccess, onCancel, isLoading = false }) {
652
652
  }
653
653
  ) }),
654
654
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-2", children: [
655
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Checkbox, { id: "setAsDefault", checked: setAsDefault, onCheckedChange: (checked) => setSetAsDefault(!!checked) }),
656
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Label, { htmlFor: "setAsDefault", className: "cursor-pointer font-normal", children: "Set as default payment method" })
655
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Checkbox, { id: "setAsDefault", checked: setAsDefault, onCheckedChange: (checked) => setSetAsDefault(!!checked) }),
656
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Label, { htmlFor: "setAsDefault", className: "cursor-pointer font-normal", children: "Set as default payment method" })
657
657
  ] }),
658
- error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Alert, { variant: "destructive", className: "bg-red-50 border-red-200", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.AlertDescription, { children: error }) }),
658
+ error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Alert, { variant: "destructive", className: "bg-red-50 border-red-200", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.AlertDescription, { children: error }) }),
659
659
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-end gap-x-2", children: [
660
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Button, { type: "button", variant: "outline", onClick: onCancel, disabled: isSubmitting || isLoading, children: "Cancel" }),
661
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Button, { type: "submit", disabled: !stripe || isSubmitting || isLoading, children: isSubmitting ? "Processing..." : "Add Card" })
660
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Button, { type: "button", variant: "outline", onClick: onCancel, disabled: isSubmitting || isLoading, children: "Cancel" }),
661
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Button, { type: "submit", disabled: !stripe || isSubmitting || isLoading, children: isSubmitting ? "Processing..." : "Add Card" })
662
662
  ] })
663
663
  ] });
664
664
  }
@@ -674,10 +674,10 @@ function PaymentMethodEditor({ open, onOpenChange, onSuccess }) {
674
674
  const handleCancel = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
675
675
  onOpenChange(false);
676
676
  }, "handleCancel");
677
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.DialogContent, { className: "max-w-md", children: [
678
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.DialogHeader, { children: [
679
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.DialogTitle, { children: "Add Payment Method" }),
680
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.DialogDescription, { children: "Add a new payment method to your account. Your card information is securely processed by Stripe." })
677
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.DialogContent, { className: "max-w-md", children: [
678
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.DialogHeader, { children: [
679
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.DialogTitle, { children: "Add Payment Method" }),
680
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.DialogDescription, { children: "Add a new payment method to your account. Your card information is securely processed by Stripe." })
681
681
  ] }),
682
682
  open && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PaymentMethodForm, { onSuccess: handleSuccess, onCancel: handleCancel })
683
683
  ] }) });
@@ -701,7 +701,7 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
701
701
  _react.useEffect.call(void 0, () => {
702
702
  const loadCustomer = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
703
703
  try {
704
- const fetchedCustomer = await _chunk53B6NPGAjs.StripeCustomerService.getCustomer();
704
+ const fetchedCustomer = await _chunkYUXCJ35Vjs.StripeCustomerService.getCustomer();
705
705
  setCustomer(fetchedCustomer);
706
706
  } catch (error) {
707
707
  console.error("[PaymentMethodCard] Failed to load customer:", error);
@@ -718,7 +718,7 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
718
718
  const handleSetDefault = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
719
719
  setLoading(true);
720
720
  try {
721
- await _chunk53B6NPGAjs.StripeCustomerService.setDefaultPaymentMethod({ paymentMethodId: paymentMethod.id });
721
+ await _chunkYUXCJ35Vjs.StripeCustomerService.setDefaultPaymentMethod({ paymentMethodId: paymentMethod.id });
722
722
  onUpdate();
723
723
  } catch (error) {
724
724
  console.error("[PaymentMethodCard] Failed to set as default:", error);
@@ -729,7 +729,7 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
729
729
  const handleRemove = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
730
730
  setLoading(true);
731
731
  try {
732
- await _chunk53B6NPGAjs.StripeCustomerService.removePaymentMethod({ paymentMethodId: paymentMethod.id });
732
+ await _chunkYUXCJ35Vjs.StripeCustomerService.removePaymentMethod({ paymentMethodId: paymentMethod.id });
733
733
  setShowRemoveDialog(false);
734
734
  onUpdate();
735
735
  } catch (error) {
@@ -738,16 +738,16 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
738
738
  }
739
739
  }, "handleRemove");
740
740
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
741
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.Card, { className: "relative", children: [
742
- isDefault && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Badge, { variant: "softGreen", className: "absolute right-2 top-2", children: "Default" }),
743
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.CardHeader, { className: "flex flex-row items-center justify-between pb-2", children: [
741
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.Card, { className: "relative", children: [
742
+ isDefault && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Badge, { variant: "softGreen", className: "absolute right-2 top-2", children: "Default" }),
743
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.CardHeader, { className: "flex flex-row items-center justify-between pb-2", children: [
744
744
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-2", children: [
745
745
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-2xl", children: brandIcon }),
746
746
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm font-medium capitalize", children: brand })
747
747
  ] }),
748
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.DropdownMenu, { children: [
749
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.DropdownMenuTrigger, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
750
- _chunkUGNLKDI6js.Button,
748
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.DropdownMenu, { children: [
749
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.DropdownMenuTrigger, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
750
+ _chunkUYOQG5IWjs.Button,
751
751
  {
752
752
  render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", {}),
753
753
  nativeButton: false,
@@ -758,10 +758,10 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
758
758
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.MoreVertical, { className: "h-4 w-4" })
759
759
  }
760
760
  ) }),
761
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.DropdownMenuContent, { align: "end", children: [
762
- !isDefault && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.DropdownMenuItem, { onClick: handleSetDefault, disabled: loading, children: "Set as Default" }),
761
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.DropdownMenuContent, { align: "end", children: [
762
+ !isDefault && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.DropdownMenuItem, { onClick: handleSetDefault, disabled: loading, children: "Set as Default" }),
763
763
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
764
- _chunkUGNLKDI6js.DropdownMenuItem,
764
+ _chunkUYOQG5IWjs.DropdownMenuItem,
765
765
  {
766
766
  onClick: () => setShowRemoveDialog(true),
767
767
  disabled: loading,
@@ -772,7 +772,7 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
772
772
  ] })
773
773
  ] })
774
774
  ] }),
775
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-1", children: [
775
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-1", children: [
776
776
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: "text-lg font-semibold", children: [
777
777
  "\u2022\u2022\u2022\u2022 ",
778
778
  last4
@@ -785,17 +785,17 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
785
785
  ] })
786
786
  ] }) })
787
787
  ] }),
788
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.AlertDialog, { open: showRemoveDialog, onOpenChange: setShowRemoveDialog, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.AlertDialogContent, { children: [
789
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.AlertDialogHeader, { children: [
790
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.AlertDialogTitle, { children: "Remove Payment Method" }),
791
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.AlertDialogDescription, { children: [
788
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.AlertDialog, { open: showRemoveDialog, onOpenChange: setShowRemoveDialog, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.AlertDialogContent, { children: [
789
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.AlertDialogHeader, { children: [
790
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.AlertDialogTitle, { children: "Remove Payment Method" }),
791
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.AlertDialogDescription, { children: [
792
792
  "Are you sure you want to remove this payment method? This action cannot be undone.",
793
793
  isDefault && " This is your default payment method."
794
794
  ] })
795
795
  ] }),
796
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.AlertDialogFooter, { children: [
797
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.AlertDialogCancel, { disabled: loading, children: "Cancel" }),
798
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.AlertDialogAction, { onClick: handleRemove, disabled: loading, className: "bg-red-600 hover:bg-red-700", children: loading ? "Removing..." : "Remove" })
796
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.AlertDialogFooter, { children: [
797
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.AlertDialogCancel, { disabled: loading, children: "Cancel" }),
798
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.AlertDialogAction, { onClick: handleRemove, disabled: loading, className: "bg-red-600 hover:bg-red-700", children: loading ? "Removing..." : "Remove" })
799
799
  ] })
800
800
  ] }) })
801
801
  ] });
@@ -818,7 +818,7 @@ function PaymentMethodsContainer() {
818
818
  const loadPaymentMethods = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
819
819
  setLoading(true);
820
820
  try {
821
- const fetchedPaymentMethods = await _chunk53B6NPGAjs.StripeCustomerService.listPaymentMethods();
821
+ const fetchedPaymentMethods = await _chunkYUXCJ35Vjs.StripeCustomerService.listPaymentMethods();
822
822
  setPaymentMethods(fetchedPaymentMethods);
823
823
  } catch (error) {
824
824
  console.error("[PaymentMethodsContainer] Failed to load payment methods:", error);
@@ -838,14 +838,14 @@ function PaymentMethodsContainer() {
838
838
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-8 w-8" }),
839
839
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h1", { className: "text-primary text-3xl font-semibold", children: "Payment Methods" })
840
840
  ] }),
841
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Button, { onClick: () => setShowAddPaymentMethod(true), children: "Add Payment Method" })
841
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Button, { onClick: () => setShowAddPaymentMethod(true), children: "Add Payment Method" })
842
842
  ] }),
843
843
  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: [
844
844
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-16 w-16 text-muted-foreground" }),
845
845
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-center", children: [
846
846
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "mb-2 text-sm font-medium", children: "No payment methods" }),
847
847
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "mb-4 text-muted-foreground", children: "Add a payment method to enable subscriptions and secure checkout." }),
848
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Button, { onClick: () => setShowAddPaymentMethod(true), children: "Add Your First Card" })
848
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Button, { onClick: () => setShowAddPaymentMethod(true), children: "Add Your First Card" })
849
849
  ] })
850
850
  ] }),
851
851
  paymentMethods.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PaymentMethodsList, { paymentMethods, onUpdate: loadPaymentMethods }),
@@ -913,7 +913,7 @@ var statusConfig = {
913
913
  };
914
914
  function InvoiceStatusBadge({ status }) {
915
915
  const config = statusConfig[status] || statusConfig["draft" /* DRAFT */];
916
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Badge, { variant: config.variant, children: config.label });
916
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Badge, { variant: config.variant, children: config.label });
917
917
  }
918
918
  _chunk7QVYU63Ejs.__name.call(void 0, InvoiceStatusBadge, "InvoiceStatusBadge");
919
919
 
@@ -944,13 +944,13 @@ function InvoiceDetails({
944
944
  return invoice.stripeInvoiceId.slice(-8);
945
945
  }, "getInvoiceNumber");
946
946
  const productName = _optionalChain([invoice, 'access', _29 => _29.subscription, 'optionalAccess', _30 => _30.price, 'optionalAccess', _31 => _31.product, 'optionalAccess', _32 => _32.name]) || "Subscription";
947
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.DialogContent, { className: "max-w-2xl", children: [
948
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.DialogHeader, { children: [
949
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.DialogTitle, { children: [
947
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.DialogContent, { className: "max-w-2xl", children: [
948
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.DialogHeader, { children: [
949
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.DialogTitle, { children: [
950
950
  "Invoice ",
951
951
  getInvoiceNumber()
952
952
  ] }),
953
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.DialogDescription, { children: formatDate3(invoice.periodStart) })
953
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.DialogDescription, { children: formatDate3(invoice.periodStart) })
954
954
  ] }),
955
955
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-6", children: [
956
956
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-3", children: [
@@ -988,42 +988,42 @@ function InvoiceDetails({
988
988
  ] }) }),
989
989
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tbody", { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "tr", { className: "border-t", children: [
990
990
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "p-3", children: productName }),
991
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "p-3 text-right", children: _chunkUGNLKDI6js.formatCurrency.call(void 0, invoice.subtotal, invoice.currency) })
991
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "p-3 text-right", children: _chunkUYOQG5IWjs.formatCurrency.call(void 0, invoice.subtotal, invoice.currency) })
992
992
  ] }) })
993
993
  ] }) })
994
994
  ] }),
995
995
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2 border-t pt-4", children: [
996
996
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between", children: [
997
997
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: "Subtotal:" }),
998
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm", children: _chunkUGNLKDI6js.formatCurrency.call(void 0, invoice.subtotal, invoice.currency) })
998
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm", children: _chunkUYOQG5IWjs.formatCurrency.call(void 0, invoice.subtotal, invoice.currency) })
999
999
  ] }),
1000
1000
  invoice.tax !== void 0 && invoice.tax > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between", children: [
1001
1001
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: "Tax:" }),
1002
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm", children: _chunkUGNLKDI6js.formatCurrency.call(void 0, invoice.tax, invoice.currency) })
1002
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm", children: _chunkUYOQG5IWjs.formatCurrency.call(void 0, invoice.tax, invoice.currency) })
1003
1003
  ] }),
1004
1004
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between text-lg font-semibold border-t pt-2", children: [
1005
1005
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Total:" }),
1006
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _chunkUGNLKDI6js.formatCurrency.call(void 0, invoice.total, invoice.currency) })
1006
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _chunkUYOQG5IWjs.formatCurrency.call(void 0, invoice.total, invoice.currency) })
1007
1007
  ] }),
1008
1008
  invoice.amountPaid > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between", children: [
1009
1009
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: "Amount Paid:" }),
1010
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm text-success", children: _chunkUGNLKDI6js.formatCurrency.call(void 0, invoice.amountPaid, invoice.currency) })
1010
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm text-success", children: _chunkUYOQG5IWjs.formatCurrency.call(void 0, invoice.amountPaid, invoice.currency) })
1011
1011
  ] }),
1012
1012
  invoice.amountRemaining > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between", children: [
1013
1013
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: "Amount Due:" }),
1014
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm text-destructive", children: _chunkUGNLKDI6js.formatCurrency.call(void 0, invoice.amountRemaining, invoice.currency) })
1014
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm text-destructive", children: _chunkUYOQG5IWjs.formatCurrency.call(void 0, invoice.amountRemaining, invoice.currency) })
1015
1015
  ] })
1016
1016
  ] }),
1017
1017
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-wrap gap-2 pt-4 border-t", children: [
1018
- invoice.stripePdfUrl && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.Button, { variant: "outline", onClick: handleDownloadPDF, children: [
1018
+ invoice.stripePdfUrl && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.Button, { variant: "outline", onClick: handleDownloadPDF, children: [
1019
1019
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Download, { className: "mr-2 h-4 w-4" }),
1020
1020
  "Download PDF"
1021
1021
  ] }),
1022
- invoice.status === "open" /* OPEN */ && invoice.attempted && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.Button, { variant: "default", onClick: handleRetryPayment, children: [
1022
+ invoice.status === "open" /* OPEN */ && invoice.attempted && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.Button, { variant: "default", onClick: handleRetryPayment, children: [
1023
1023
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.RefreshCw, { className: "mr-2 h-4 w-4" }),
1024
1024
  "Retry Payment"
1025
1025
  ] }),
1026
- invoice.stripeHostedInvoiceUrl && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.Button, { variant: "outline", onClick: handleViewInStripe, children: [
1026
+ invoice.stripeHostedInvoiceUrl && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.Button, { variant: "outline", onClick: handleViewInStripe, children: [
1027
1027
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ExternalLink, { className: "mr-2 h-4 w-4" }),
1028
1028
  "View in Stripe"
1029
1029
  ] })
@@ -1047,30 +1047,30 @@ function InvoicesList({ invoices, onInvoicesChange }) {
1047
1047
  return invoice.stripeInvoiceId.slice(-8);
1048
1048
  }, "getInvoiceNumber");
1049
1049
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1050
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border rounded-lg overflow-clip", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.Table, { children: [
1051
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.TableRow, { children: [
1052
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableHead, { children: "Invoice #" }),
1053
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableHead, { children: "Date" }),
1054
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableHead, { children: "Status" }),
1055
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableHead, { className: "text-right", children: "Amount" }),
1056
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableHead, { children: "Period" })
1050
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border rounded-lg overflow-clip", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.Table, { children: [
1051
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.TableRow, { children: [
1052
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableHead, { children: "Invoice #" }),
1053
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableHead, { children: "Date" }),
1054
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableHead, { children: "Status" }),
1055
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableHead, { className: "text-right", children: "Amount" }),
1056
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableHead, { children: "Period" })
1057
1057
  ] }) }),
1058
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableBody, { children: invoices.map((invoice) => {
1058
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableBody, { children: invoices.map((invoice) => {
1059
1059
  const invoiceNumber = getInvoiceNumber(invoice);
1060
1060
  const date = formatDate3(invoice.periodStart);
1061
- const amount = _chunkUGNLKDI6js.formatCurrency.call(void 0, invoice.total, invoice.currency);
1061
+ const amount = _chunkUYOQG5IWjs.formatCurrency.call(void 0, invoice.total, invoice.currency);
1062
1062
  const period = `${formatDate3(invoice.periodStart)} - ${formatDate3(invoice.periodEnd)}`;
1063
1063
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1064
- _chunkUGNLKDI6js.TableRow,
1064
+ _chunkUYOQG5IWjs.TableRow,
1065
1065
  {
1066
1066
  onClick: () => handleRowClick(invoice),
1067
1067
  className: "cursor-pointer hover:bg-muted/50",
1068
1068
  children: [
1069
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableCell, { className: "font-medium", children: invoiceNumber }),
1070
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableCell, { className: "text-muted-foreground text-xs", children: date }),
1071
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableCell, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, InvoiceStatusBadge, { status: invoice.status }) }),
1072
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableCell, { className: "text-right font-medium", children: amount }),
1073
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableCell, { className: "text-muted-foreground text-xs", children: period })
1069
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableCell, { className: "font-medium", children: invoiceNumber }),
1070
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableCell, { className: "text-muted-foreground text-xs", children: date }),
1071
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableCell, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, InvoiceStatusBadge, { status: invoice.status }) }),
1072
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableCell, { className: "text-right font-medium", children: amount }),
1073
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableCell, { className: "text-muted-foreground text-xs", children: period })
1074
1074
  ]
1075
1075
  },
1076
1076
  invoice.id
@@ -1103,7 +1103,7 @@ function InvoicesContainer() {
1103
1103
  setLoading(true);
1104
1104
  try {
1105
1105
  const params = statusFilter !== "all" ? { status: statusFilter } : void 0;
1106
- const data = await _chunk53B6NPGAjs.StripeInvoiceService.listInvoices(params);
1106
+ const data = await _chunkYUXCJ35Vjs.StripeInvoiceService.listInvoices(params);
1107
1107
  setInvoices(data);
1108
1108
  } catch (error) {
1109
1109
  console.error("[InvoicesContainer] Failed to load invoices:", error);
@@ -1119,12 +1119,12 @@ function InvoicesContainer() {
1119
1119
  setStatusFilter(value);
1120
1120
  }, "handleFilterChange");
1121
1121
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-4", children: [
1122
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Tabs, { value: statusFilter, onValueChange: handleFilterChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.TabsList, { children: [
1123
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TabsTrigger, { value: "all", children: "All" }),
1124
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TabsTrigger, { value: "paid" /* PAID */, children: "Paid" }),
1125
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TabsTrigger, { value: "open" /* OPEN */, children: "Open" }),
1126
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TabsTrigger, { value: "void" /* VOID */, children: "Void" }),
1127
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TabsTrigger, { value: "uncollectible" /* UNCOLLECTIBLE */, children: "Uncollectible" })
1122
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Tabs, { value: statusFilter, onValueChange: handleFilterChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.TabsList, { children: [
1123
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TabsTrigger, { value: "all", children: "All" }),
1124
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TabsTrigger, { value: "paid" /* PAID */, children: "Paid" }),
1125
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TabsTrigger, { value: "open" /* OPEN */, children: "Open" }),
1126
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TabsTrigger, { value: "void" /* VOID */, children: "Void" }),
1127
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TabsTrigger, { value: "uncollectible" /* UNCOLLECTIBLE */, children: "Uncollectible" })
1128
1128
  ] }) }),
1129
1129
  loading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-center py-8 text-muted-foreground", children: "Loading invoices..." }),
1130
1130
  !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: [
@@ -1171,7 +1171,7 @@ function CancelSubscriptionDialog({
1171
1171
  const onSubmit = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (_values) => {
1172
1172
  setIsSubmitting(true);
1173
1173
  try {
1174
- await _chunk53B6NPGAjs.StripeSubscriptionService.cancelSubscription({
1174
+ await _chunkYUXCJ35Vjs.StripeSubscriptionService.cancelSubscription({
1175
1175
  id: subscription.id,
1176
1176
  cancelImmediately: false
1177
1177
  });
@@ -1184,19 +1184,19 @@ function CancelSubscriptionDialog({
1184
1184
  }
1185
1185
  }, "onSubmit");
1186
1186
  const periodEndDate = formatDate3(subscription.currentPeriodEnd);
1187
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.DialogContent, { className: "max-w-md", children: [
1188
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.DialogHeader, { children: [
1189
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.DialogTitle, { children: "Cancel Subscription" }),
1190
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.DialogDescription, { children: "Are you sure you want to cancel this subscription? This action cannot be undone." })
1187
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.DialogContent, { className: "max-w-md", children: [
1188
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.DialogHeader, { children: [
1189
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.DialogTitle, { children: "Cancel Subscription" }),
1190
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.DialogDescription, { children: "Are you sure you want to cancel this subscription? This action cannot be undone." })
1191
1191
  ] }),
1192
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Form, { ...form, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: form.handleSubmit(onSubmit), className: "flex flex-col gap-y-4", children: [
1192
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Form, { ...form, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: form.handleSubmit(onSubmit), className: "flex flex-col gap-y-4", children: [
1193
1193
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "bg-primary/10 border-primary/30 text-foreground rounded-lg border p-3 text-sm", children: [
1194
1194
  "Your subscription will remain active until ",
1195
1195
  periodEndDate,
1196
1196
  ". You can continue using the service until then."
1197
1197
  ] }),
1198
1198
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1199
- _chunkUGNLKDI6js.FormTextarea,
1199
+ _chunkUYOQG5IWjs.FormTextarea,
1200
1200
  {
1201
1201
  form,
1202
1202
  id: "reason",
@@ -1206,8 +1206,8 @@ function CancelSubscriptionDialog({
1206
1206
  }
1207
1207
  ),
1208
1208
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex gap-x-2 justify-end pt-2", children: [
1209
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Button, { type: "button", variant: "outline", onClick: () => onOpenChange(false), disabled: isSubmitting, children: "Keep Subscription" }),
1210
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Button, { type: "submit", variant: "destructive", disabled: isSubmitting, children: isSubmitting ? "Canceling..." : "Confirm Cancellation" })
1209
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Button, { type: "button", variant: "outline", onClick: () => onOpenChange(false), disabled: isSubmitting, children: "Keep Subscription" }),
1210
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Button, { type: "submit", variant: "destructive", disabled: isSubmitting, children: isSubmitting ? "Canceling..." : "Confirm Cancellation" })
1211
1211
  ] })
1212
1212
  ] }) })
1213
1213
  ] }) });
@@ -1256,7 +1256,7 @@ var cancelingConfig = {
1256
1256
  };
1257
1257
  function SubscriptionStatusBadge({ status, cancelAtPeriodEnd }) {
1258
1258
  const config = cancelAtPeriodEnd ? cancelingConfig : statusConfig2[status] || statusConfig2["canceled" /* CANCELED */];
1259
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Badge, { variant: config.variant, children: config.label });
1259
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Badge, { variant: config.variant, children: config.label });
1260
1260
  }
1261
1261
  _chunk7QVYU63Ejs.__name.call(void 0, SubscriptionStatusBadge, "SubscriptionStatusBadge");
1262
1262
 
@@ -1283,7 +1283,7 @@ function formatPlanName2(price) {
1283
1283
  _chunk7QVYU63Ejs.__name.call(void 0, formatPlanName2, "formatPlanName");
1284
1284
  function formatBillingAmount(price) {
1285
1285
  if (!_optionalChain([price, 'optionalAccess', _37 => _37.unitAmount])) return "N/A";
1286
- return _chunkUGNLKDI6js.formatCurrency.call(void 0, price.unitAmount, price.currency);
1286
+ return _chunkUYOQG5IWjs.formatCurrency.call(void 0, price.unitAmount, price.currency);
1287
1287
  }
1288
1288
  _chunk7QVYU63Ejs.__name.call(void 0, formatBillingAmount, "formatBillingAmount");
1289
1289
  function SubscriptionDetails({
@@ -1298,7 +1298,7 @@ function SubscriptionDetails({
1298
1298
  const handlePause = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
1299
1299
  setIsProcessing(true);
1300
1300
  try {
1301
- await _chunk53B6NPGAjs.StripeSubscriptionService.pauseSubscription({ subscriptionId: subscription.id });
1301
+ await _chunkYUXCJ35Vjs.StripeSubscriptionService.pauseSubscription({ subscriptionId: subscription.id });
1302
1302
  onSubscriptionChange();
1303
1303
  } catch (error) {
1304
1304
  console.error("[SubscriptionDetails] Failed to pause subscription:", error);
@@ -1309,7 +1309,7 @@ function SubscriptionDetails({
1309
1309
  const handleResume = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
1310
1310
  setIsProcessing(true);
1311
1311
  try {
1312
- await _chunk53B6NPGAjs.StripeSubscriptionService.resumeSubscription({ subscriptionId: subscription.id });
1312
+ await _chunkYUXCJ35Vjs.StripeSubscriptionService.resumeSubscription({ subscriptionId: subscription.id });
1313
1313
  onSubscriptionChange();
1314
1314
  } catch (error) {
1315
1315
  console.error("[SubscriptionDetails] Failed to resume subscription:", error);
@@ -1319,7 +1319,7 @@ function SubscriptionDetails({
1319
1319
  }, "handleResume");
1320
1320
  const handleManageViaPortal = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
1321
1321
  try {
1322
- const { url } = await _chunk53B6NPGAjs.StripeCustomerService.createPortalSession();
1322
+ const { url } = await _chunkYUXCJ35Vjs.StripeCustomerService.createPortalSession();
1323
1323
  window.open(url, "_blank");
1324
1324
  } catch (error) {
1325
1325
  console.error("[SubscriptionDetails] Failed to create portal session:", error);
@@ -1329,10 +1329,10 @@ function SubscriptionDetails({
1329
1329
  const canResume = subscription.status === "paused" /* PAUSED */;
1330
1330
  const canCancel = subscription.status === "active" /* ACTIVE */ || subscription.status === "trialing" /* TRIALING */ || subscription.status === "paused" /* PAUSED */;
1331
1331
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1332
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.DialogContent, { className: "max-w-2xl", children: [
1333
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.DialogHeader, { children: [
1334
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.DialogTitle, { children: "Subscription Details" }),
1335
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.DialogDescription, { children: "View and manage your subscription" })
1332
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.DialogContent, { className: "max-w-2xl", children: [
1333
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.DialogHeader, { children: [
1334
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.DialogTitle, { children: "Subscription Details" }),
1335
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.DialogDescription, { children: "View and manage your subscription" })
1336
1336
  ] }),
1337
1337
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-6", children: [
1338
1338
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-3", children: [
@@ -1374,11 +1374,11 @@ function SubscriptionDetails({
1374
1374
  "."
1375
1375
  ] }) }),
1376
1376
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-wrap gap-2 pt-4 border-t", children: [
1377
- onChangePlan && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Button, { variant: "default", onClick: () => onChangePlan(subscription), children: "Change Plan" }),
1378
- canPause && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Button, { variant: "outline", onClick: handlePause, disabled: isProcessing, children: isProcessing ? "Pausing..." : "Pause" }),
1379
- canResume && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Button, { variant: "outline", onClick: handleResume, disabled: isProcessing, children: isProcessing ? "Resuming..." : "Resume" }),
1380
- canCancel && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Button, { variant: "destructive", onClick: () => setShowCancel(true), children: "Cancel" }),
1381
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Button, { variant: "outline", onClick: handleManageViaPortal, children: "Manage via Portal" })
1377
+ onChangePlan && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Button, { variant: "default", onClick: () => onChangePlan(subscription), children: "Change Plan" }),
1378
+ canPause && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Button, { variant: "outline", onClick: handlePause, disabled: isProcessing, children: isProcessing ? "Pausing..." : "Pause" }),
1379
+ canResume && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Button, { variant: "outline", onClick: handleResume, disabled: isProcessing, children: isProcessing ? "Resuming..." : "Resume" }),
1380
+ canCancel && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Button, { variant: "destructive", onClick: () => setShowCancel(true), children: "Cancel" }),
1381
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Button, { variant: "outline", onClick: handleManageViaPortal, children: "Manage via Portal" })
1382
1382
  ] })
1383
1383
  ] })
1384
1384
  ] }) }),
@@ -1425,36 +1425,36 @@ function SubscriptionsList({ subscriptions, onSubscriptionsChange, onChangePlan
1425
1425
  setSelectedSub(subscription);
1426
1426
  }, "handleRowClick");
1427
1427
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1428
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border rounded-lg overflow-clip", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.Table, { children: [
1429
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.TableRow, { children: [
1430
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableHead, { children: "Status" }),
1431
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableHead, { children: "Plan" }),
1432
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableHead, { children: "Period" }),
1433
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableHead, { className: "text-right", children: "Amount" }),
1434
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableHead, { className: "text-right", children: "Actions" })
1428
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border rounded-lg overflow-clip", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.Table, { children: [
1429
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.TableRow, { children: [
1430
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableHead, { children: "Status" }),
1431
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableHead, { children: "Plan" }),
1432
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableHead, { children: "Period" }),
1433
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableHead, { className: "text-right", children: "Amount" }),
1434
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableHead, { className: "text-right", children: "Actions" })
1435
1435
  ] }) }),
1436
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableBody, { children: subscriptions.map((subscription) => {
1436
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableBody, { children: subscriptions.map((subscription) => {
1437
1437
  const price = subscription.price;
1438
- const amount = _optionalChain([price, 'optionalAccess', _42 => _42.unitAmount]) ? _chunkUGNLKDI6js.formatCurrency.call(void 0, price.unitAmount, price.currency) : "0";
1438
+ const amount = _optionalChain([price, 'optionalAccess', _42 => _42.unitAmount]) ? _chunkUYOQG5IWjs.formatCurrency.call(void 0, price.unitAmount, price.currency) : "0";
1439
1439
  const period = `${formatDate3(subscription.currentPeriodStart)} - ${formatDate3(subscription.currentPeriodEnd)}`;
1440
1440
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1441
- _chunkUGNLKDI6js.TableRow,
1441
+ _chunkUYOQG5IWjs.TableRow,
1442
1442
  {
1443
1443
  onClick: () => handleRowClick(subscription),
1444
1444
  className: "cursor-pointer hover:bg-muted/50",
1445
1445
  children: [
1446
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableCell, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1446
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableCell, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1447
1447
  SubscriptionStatusBadge,
1448
1448
  {
1449
1449
  status: subscription.status,
1450
1450
  cancelAtPeriodEnd: subscription.cancelAtPeriodEnd
1451
1451
  }
1452
1452
  ) }),
1453
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableCell, { className: "font-medium", children: formatPlanName3(price) }),
1454
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableCell, { className: "text-muted-foreground text-sm", children: period }),
1455
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableCell, { className: "text-right font-medium", children: amount }),
1456
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableCell, { className: "text-right", children: (subscription.status === "active" /* ACTIVE */ || subscription.status === "trialing" /* TRIALING */) && onChangePlan && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1457
- _chunkUGNLKDI6js.Button,
1453
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableCell, { className: "font-medium", children: formatPlanName3(price) }),
1454
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableCell, { className: "text-muted-foreground text-sm", children: period }),
1455
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableCell, { className: "text-right font-medium", children: amount }),
1456
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableCell, { className: "text-right", children: (subscription.status === "active" /* ACTIVE */ || subscription.status === "trialing" /* TRIALING */) && onChangePlan && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1457
+ _chunkUYOQG5IWjs.Button,
1458
1458
  {
1459
1459
  size: "sm",
1460
1460
  variant: "outline",
@@ -1499,7 +1499,7 @@ function SubscriptionsContainer({ onOpenWizard, hasActiveRecurringSubscription }
1499
1499
  const loadSubscriptions = _react.useCallback.call(void 0, async () => {
1500
1500
  setLoading(true);
1501
1501
  try {
1502
- const fetchedSubscriptions = await _chunk53B6NPGAjs.StripeSubscriptionService.listSubscriptions();
1502
+ const fetchedSubscriptions = await _chunkYUXCJ35Vjs.StripeSubscriptionService.listSubscriptions();
1503
1503
  setSubscriptions(fetchedSubscriptions);
1504
1504
  } catch (error) {
1505
1505
  console.error("[SubscriptionsContainer] Failed to load subscriptions:", error);
@@ -1522,7 +1522,7 @@ function SubscriptionsContainer({ onOpenWizard, hasActiveRecurringSubscription }
1522
1522
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-8 w-8" }),
1523
1523
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h1", { className: "text-primary text-3xl font-semibold", children: "Subscriptions" })
1524
1524
  ] }),
1525
- subscriptions.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Button, { onClick: () => _optionalChain([onOpenWizard, 'optionalCall', _43 => _43()]), children: hasActiveRecurringSubscription ? "Purchase Add-ons" : "Subscribe to a Plan" })
1525
+ subscriptions.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Button, { onClick: () => _optionalChain([onOpenWizard, 'optionalCall', _43 => _43()]), children: hasActiveRecurringSubscription ? "Purchase Add-ons" : "Subscribe to a Plan" })
1526
1526
  ] }),
1527
1527
  criticalSubscriptions.map((subscription) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BillingAlertBanner, { subscription }, subscription.id)),
1528
1528
  subscriptions.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col items-center justify-center py-12 space-y-4", children: [
@@ -1530,7 +1530,7 @@ function SubscriptionsContainer({ onOpenWizard, hasActiveRecurringSubscription }
1530
1530
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-center", children: [
1531
1531
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "text-sm font-medium mb-2", children: "No Active Subscriptions" }),
1532
1532
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground mb-6", children: "Choose a subscription plan to get started with our services." }),
1533
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Button, { onClick: () => _optionalChain([onOpenWizard, 'optionalCall', _44 => _44()]), children: "Subscribe to a Plan" })
1533
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Button, { onClick: () => _optionalChain([onOpenWizard, 'optionalCall', _44 => _44()]), children: "Subscribe to a Plan" })
1534
1534
  ] })
1535
1535
  ] }),
1536
1536
  subscriptions.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -1551,9 +1551,9 @@ function IntervalToggle({ value, onChange, hasMonthly, hasYearly }) {
1551
1551
  if (!hasMonthly || !hasYearly) {
1552
1552
  return null;
1553
1553
  }
1554
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Tabs, { value, onValueChange: (v) => onChange(v), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.TabsList, { children: [
1555
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TabsTrigger, { value: "month", children: "Monthly" }),
1556
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TabsTrigger, { value: "year", children: "Yearly" })
1554
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Tabs, { value, onValueChange: (v) => onChange(v), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.TabsList, { children: [
1555
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TabsTrigger, { value: "month", children: "Monthly" }),
1556
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TabsTrigger, { value: "year", children: "Yearly" })
1557
1557
  ] }) });
1558
1558
  }
1559
1559
  _chunk7QVYU63Ejs.__name.call(void 0, IntervalToggle, "IntervalToggle");
@@ -1571,8 +1571,8 @@ function PricingCard({
1571
1571
  }) {
1572
1572
  const description = price.description || price.nickname || "Standard";
1573
1573
  const features = price.features || [];
1574
- const formattedPrice = _chunkUGNLKDI6js.formatCurrency.call(void 0, price.unitAmount, price.currency);
1575
- const interval = _chunkUGNLKDI6js.formatInterval.call(void 0, price);
1574
+ const formattedPrice = _chunkUYOQG5IWjs.formatCurrency.call(void 0, price.unitAmount, price.currency);
1575
+ const interval = _chunkUYOQG5IWjs.formatInterval.call(void 0, price);
1576
1576
  const handleKeyDown = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (e) => {
1577
1577
  if ((e.key === "Enter" || e.key === " ") && !isDisabled && !isCurrentPlan) {
1578
1578
  e.preventDefault();
@@ -1585,7 +1585,7 @@ function PricingCard({
1585
1585
  }
1586
1586
  }, "handleClick");
1587
1587
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1588
- _chunkUGNLKDI6js.Card,
1588
+ _chunkUYOQG5IWjs.Card,
1589
1589
  {
1590
1590
  role: "radio",
1591
1591
  "aria-checked": isSelected,
@@ -1593,7 +1593,7 @@ function PricingCard({
1593
1593
  tabIndex: isDisabled ? -1 : 0,
1594
1594
  onKeyDown: handleKeyDown,
1595
1595
  onClick: handleClick,
1596
- className: _chunk53B6NPGAjs.cn.call(void 0,
1596
+ className: _chunkYUXCJ35Vjs.cn.call(void 0,
1597
1597
  "relative cursor-pointer transition-all duration-200 flex flex-col h-full",
1598
1598
  "focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
1599
1599
  isCurrentPlan && "bg-muted/30",
@@ -1603,9 +1603,9 @@ function PricingCard({
1603
1603
  isLoading && "pointer-events-none"
1604
1604
  ),
1605
1605
  children: [
1606
- isCurrentPlan && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Badge, { variant: "secondary", className: "absolute top-2 right-2", children: "Current" }),
1607
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardHeader, { className: "pb-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "text-sm font-medium", children: description }) }),
1608
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.CardContent, { className: "pb-4 grow", children: [
1606
+ isCurrentPlan && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Badge, { variant: "secondary", className: "absolute top-2 right-2", children: "Current" }),
1607
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardHeader, { className: "pb-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "text-sm font-medium", children: description }) }),
1608
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.CardContent, { className: "pb-4 grow", children: [
1609
1609
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mb-4", children: [
1610
1610
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-3xl font-bold", children: formattedPrice }),
1611
1611
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground ml-1", children: interval })
@@ -1615,8 +1615,8 @@ function PricingCard({
1615
1615
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm text-muted-foreground", children: feature })
1616
1616
  ] }, index)) })
1617
1617
  ] }),
1618
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardFooter, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1619
- _chunkUGNLKDI6js.Button,
1618
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardFooter, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1619
+ _chunkUYOQG5IWjs.Button,
1620
1620
  {
1621
1621
  variant: isCurrentPlan ? "secondary" : isSelected ? "default" : "outline",
1622
1622
  className: "w-full",
@@ -1644,7 +1644,7 @@ function ProductPricingRow({
1644
1644
  return null;
1645
1645
  }
1646
1646
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-3", children: [
1647
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.SectionHeader, { children: product.name }),
1647
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.SectionHeader, { children: product.name }),
1648
1648
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1649
1649
  "div",
1650
1650
  {
@@ -1744,15 +1744,15 @@ function ProductPricingList({
1744
1744
  _chunk7QVYU63Ejs.__name.call(void 0, ProductPricingList, "ProductPricingList");
1745
1745
  function ProductPricingListSkeleton() {
1746
1746
  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: [
1747
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Skeleton, { className: "h-6 w-32" }),
1747
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Skeleton, { className: "h-6 w-32" }),
1748
1748
  /* @__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: [
1749
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Skeleton, { className: "h-6 w-24" }),
1750
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Skeleton, { className: "h-8 w-32" }),
1749
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Skeleton, { className: "h-6 w-24" }),
1750
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Skeleton, { className: "h-8 w-32" }),
1751
1751
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
1752
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Skeleton, { className: "h-4 w-full" }),
1753
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Skeleton, { className: "h-4 w-3/4" })
1752
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Skeleton, { className: "h-4 w-full" }),
1753
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Skeleton, { className: "h-4 w-3/4" })
1754
1754
  ] }),
1755
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Skeleton, { className: "h-10 w-full" })
1755
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Skeleton, { className: "h-10 w-full" })
1756
1756
  ] }, cardIndex)) })
1757
1757
  ] }, rowIndex)) });
1758
1758
  }
@@ -1766,18 +1766,18 @@ function ProrationPreview({ preview }) {
1766
1766
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
1767
1767
  preview.lineItems.map((item, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between text-sm", children: [
1768
1768
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground", children: item.description }),
1769
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: `font-medium ${item.amount < 0 ? "text-success" : "text-foreground"}`, children: _chunkUGNLKDI6js.formatCurrency.call(void 0, item.amount, preview.currency) })
1769
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: `font-medium ${item.amount < 0 ? "text-success" : "text-foreground"}`, children: _chunkUYOQG5IWjs.formatCurrency.call(void 0, item.amount, preview.currency) })
1770
1770
  ] }, index)),
1771
1771
  /* @__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: [
1772
1772
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-foreground", children: "Net Due Today" }),
1773
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-foreground", children: _chunkUGNLKDI6js.formatCurrency.call(void 0, preview.immediateCharge, preview.currency) })
1773
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-foreground", children: _chunkUYOQG5IWjs.formatCurrency.call(void 0, preview.immediateCharge, preview.currency) })
1774
1774
  ] }) }),
1775
1775
  preview.lineItems.length > 0 && preview.lineItems[0].period && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-muted-foreground mt-2 text-xs", children: [
1776
1776
  "Next invoice on ",
1777
1777
  formatDate3(preview.lineItems[0].period.end),
1778
1778
  " for",
1779
1779
  " ",
1780
- _chunkUGNLKDI6js.formatCurrency.call(void 0, preview.amountDue, preview.currency)
1780
+ _chunkUYOQG5IWjs.formatCurrency.call(void 0, preview.amountDue, preview.currency)
1781
1781
  ] })
1782
1782
  ] })
1783
1783
  ] });
@@ -1799,16 +1799,16 @@ function SubscriptionConfirmation({ price, isLoading, onConfirm, onCancel }) {
1799
1799
  productDescription && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-sm text-muted-foreground", children: productDescription })
1800
1800
  ] }),
1801
1801
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-lg font-semibold", children: [
1802
- _chunkUGNLKDI6js.formatCurrency.call(void 0, price.unitAmount, price.currency),
1803
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm font-normal text-muted-foreground", children: _chunkUGNLKDI6js.formatInterval.call(void 0, price) })
1802
+ _chunkUYOQG5IWjs.formatCurrency.call(void 0, price.unitAmount, price.currency),
1803
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm font-normal text-muted-foreground", children: _chunkUYOQG5IWjs.formatInterval.call(void 0, price) })
1804
1804
  ] }),
1805
1805
  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: [
1806
1806
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Check, { className: "h-4 w-4 text-primary" }),
1807
1807
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: feature })
1808
1808
  ] }, index)) }),
1809
1809
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-end gap-3 pt-2 border-t border-accent/30", children: [
1810
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Button, { variant: "outline", onClick: onCancel, disabled: isLoading, children: "Cancel" }),
1811
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Button, { onClick: onConfirm, disabled: isLoading, children: isLoading ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1810
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Button, { variant: "outline", onClick: onCancel, disabled: isLoading, children: "Cancel" }),
1811
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Button, { onClick: onConfirm, disabled: isLoading, children: isLoading ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1812
1812
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Loader2, { className: "h-4 w-4 animate-spin mr-2" }),
1813
1813
  "Processing..."
1814
1814
  ] }) : "Subscribe" })
@@ -1879,7 +1879,7 @@ function useSubscriptionWizard({ subscription, onSuccess, onClose }) {
1879
1879
  onCloseRef.current = onClose;
1880
1880
  const checkPaymentMethod = _react.useCallback.call(void 0, async () => {
1881
1881
  try {
1882
- const methods = await _chunk53B6NPGAjs.StripeCustomerService.listPaymentMethods();
1882
+ const methods = await _chunkYUXCJ35Vjs.StripeCustomerService.listPaymentMethods();
1883
1883
  dispatch({ type: "SET_HAS_PAYMENT_METHOD", hasMethod: methods.length > 0 });
1884
1884
  } catch (error) {
1885
1885
  console.error("[useSubscriptionWizard] Failed to check payment methods:", error);
@@ -1903,7 +1903,7 @@ function useSubscriptionWizard({ subscription, onSuccess, onClose }) {
1903
1903
  const isTrialUpgrade = _optionalChain([subscription, 'optionalAccess', _55 => _55.status]) === "trialing" /* TRIALING */;
1904
1904
  dispatch({ type: "SET_IS_TRIAL_SUBSCRIPTION", isTrial: isTrialUpgrade });
1905
1905
  if (isTrialUpgrade && !state.hasPaymentMethod) {
1906
- const methods = await _chunk53B6NPGAjs.StripeCustomerService.listPaymentMethods();
1906
+ const methods = await _chunkYUXCJ35Vjs.StripeCustomerService.listPaymentMethods();
1907
1907
  if (methods.length === 0) {
1908
1908
  dispatch({ type: "SET_STEP", step: "payment-method" });
1909
1909
  dispatch({
@@ -1914,7 +1914,7 @@ function useSubscriptionWizard({ subscription, onSuccess, onClose }) {
1914
1914
  }
1915
1915
  }
1916
1916
  if (subscription && state.selectedPrice.id !== _optionalChain([subscription, 'access', _56 => _56.price, 'optionalAccess', _57 => _57.id])) {
1917
- const preview = await _chunk53B6NPGAjs.StripeSubscriptionService.getProrationPreview({
1917
+ const preview = await _chunkYUXCJ35Vjs.StripeSubscriptionService.getProrationPreview({
1918
1918
  subscriptionId: subscription.id,
1919
1919
  newPriceId: state.selectedPrice.id
1920
1920
  });
@@ -1939,14 +1939,14 @@ function useSubscriptionWizard({ subscription, onSuccess, onClose }) {
1939
1939
  newPriceId: state.selectedPrice.id,
1940
1940
  promotionCode: _optionalChain([state, 'access', _59 => _59.promotionCode, 'optionalAccess', _60 => _60.promotionCodeId])
1941
1941
  };
1942
- await _chunk53B6NPGAjs.StripeSubscriptionService.changePlan(changePlanParams);
1942
+ await _chunkYUXCJ35Vjs.StripeSubscriptionService.changePlan(changePlanParams);
1943
1943
  } else {
1944
1944
  const createParams = {
1945
1945
  id: _uuid.v4.call(void 0, ),
1946
1946
  priceId: state.selectedPrice.id,
1947
1947
  promotionCode: _optionalChain([state, 'access', _61 => _61.promotionCode, 'optionalAccess', _62 => _62.promotionCodeId])
1948
1948
  };
1949
- await _chunk53B6NPGAjs.StripeSubscriptionService.createSubscription(createParams);
1949
+ await _chunkYUXCJ35Vjs.StripeSubscriptionService.createSubscription(createParams);
1950
1950
  }
1951
1951
  onSuccessRef.current();
1952
1952
  onCloseRef.current();
@@ -1980,7 +1980,7 @@ function useSubscriptionWizard({ subscription, onSuccess, onClose }) {
1980
1980
  dispatch({ type: "SET_VALIDATING_PROMO_CODE", isValidating: true });
1981
1981
  dispatch({ type: "SET_PROMO_CODE_ERROR", error: null });
1982
1982
  try {
1983
- const result = await _chunk53B6NPGAjs.StripePromotionCodeService.validatePromotionCode({
1983
+ const result = await _chunkYUXCJ35Vjs.StripePromotionCodeService.validatePromotionCode({
1984
1984
  code,
1985
1985
  stripePriceId: _optionalChain([state, 'access', _70 => _70.selectedPrice, 'optionalAccess', _71 => _71.id])
1986
1986
  });
@@ -2087,7 +2087,7 @@ function WizardStepPlanSelection({
2087
2087
  _react.useEffect.call(void 0, () => {
2088
2088
  const loadProducts = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
2089
2089
  try {
2090
- const fetchedProducts = await _chunk53B6NPGAjs.StripeProductService.listProducts({ active: true });
2090
+ const fetchedProducts = await _chunkYUXCJ35Vjs.StripeProductService.listProducts({ active: true });
2091
2091
  setProducts(fetchedProducts);
2092
2092
  } catch (error) {
2093
2093
  console.error("[WizardStepPlanSelection] Failed to load products:", error);
@@ -2138,7 +2138,7 @@ function WizardStepPlanSelection({
2138
2138
  onSelectPrice: handleSelectPrice
2139
2139
  }
2140
2140
  ),
2141
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex justify-end pt-4 border-t", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Button, { onClick: onNext, disabled: !selectedPrice || isProcessing, children: isProcessing ? "Loading..." : "Next: Review" }) })
2141
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex justify-end pt-4 border-t", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Button, { onClick: onNext, disabled: !selectedPrice || isProcessing, children: isProcessing ? "Loading..." : "Next: Review" }) })
2142
2142
  ] });
2143
2143
  }
2144
2144
  _chunk7QVYU63Ejs.__name.call(void 0, WizardStepPlanSelection, "WizardStepPlanSelection");
@@ -2199,7 +2199,7 @@ function PromoCodeInput({
2199
2199
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-success text-sm", children: formatDiscount(appliedCode) })
2200
2200
  ] }),
2201
2201
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2202
- _chunkUGNLKDI6js.Button,
2202
+ _chunkUYOQG5IWjs.Button,
2203
2203
  {
2204
2204
  variant: "ghost",
2205
2205
  size: "sm",
@@ -2216,7 +2216,7 @@ function PromoCodeInput({
2216
2216
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
2217
2217
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex gap-2", children: [
2218
2218
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2219
- _chunkUGNLKDI6js.Input,
2219
+ _chunkUYOQG5IWjs.Input,
2220
2220
  {
2221
2221
  placeholder: "Enter promo code",
2222
2222
  value: code,
@@ -2226,7 +2226,7 @@ function PromoCodeInput({
2226
2226
  className: "flex-1"
2227
2227
  }
2228
2228
  ),
2229
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.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" })
2229
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.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" })
2230
2230
  ] }),
2231
2231
  error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error })
2232
2232
  ] });
@@ -2291,14 +2291,14 @@ function WizardStepReview({
2291
2291
  return `${promotionCode.discountValue}% off`;
2292
2292
  }
2293
2293
  if (promotionCode.discountType === "amount_off" && promotionCode.discountValue) {
2294
- return `${_chunkUGNLKDI6js.formatCurrency.call(void 0, promotionCode.discountValue, promotionCode.currency || selectedPrice.currency)} off`;
2294
+ return `${_chunkUYOQG5IWjs.formatCurrency.call(void 0, promotionCode.discountValue, promotionCode.currency || selectedPrice.currency)} off`;
2295
2295
  }
2296
2296
  return null;
2297
2297
  }, "getDiscountDescription");
2298
2298
  const discountDescription = getDiscountDescription();
2299
2299
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-6", children: [
2300
2300
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "bg-muted/50 rounded-lg p-4 space-y-3", children: [
2301
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.SectionHeader, { children: "Selected Plan" }),
2301
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.SectionHeader, { children: "Selected Plan" }),
2302
2302
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between items-center", children: [
2303
2303
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
2304
2304
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "font-medium", children: _optionalChain([selectedPrice, 'access', _92 => _92.product, 'optionalAccess', _93 => _93.name]) }),
@@ -2306,10 +2306,10 @@ function WizardStepReview({
2306
2306
  ] }),
2307
2307
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-right", children: [
2308
2308
  discountedPrice !== null ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
2309
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground line-through", children: _chunkUGNLKDI6js.formatCurrency.call(void 0, selectedPrice.unitAmount || 0, selectedPrice.currency) }),
2310
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-success text-lg font-semibold", children: _chunkUGNLKDI6js.formatCurrency.call(void 0, discountedPrice, selectedPrice.currency) }),
2311
- discountDescription && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Badge, { variant: "softGreen", children: discountDescription })
2312
- ] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "font-semibold text-lg", children: _chunkUGNLKDI6js.formatCurrency.call(void 0, selectedPrice.unitAmount || 0, selectedPrice.currency) }),
2309
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground line-through", children: _chunkUYOQG5IWjs.formatCurrency.call(void 0, selectedPrice.unitAmount || 0, selectedPrice.currency) }),
2310
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-success text-lg font-semibold", children: _chunkUYOQG5IWjs.formatCurrency.call(void 0, discountedPrice, selectedPrice.currency) }),
2311
+ discountDescription && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Badge, { variant: "softGreen", children: discountDescription })
2312
+ ] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "font-semibold text-lg", children: _chunkUYOQG5IWjs.formatCurrency.call(void 0, selectedPrice.unitAmount || 0, selectedPrice.currency) }),
2313
2313
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: formatInterval2(selectedPrice) })
2314
2314
  ] })
2315
2315
  ] })
@@ -2324,9 +2324,9 @@ function WizardStepReview({
2324
2324
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between text-sm", children: [
2325
2325
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: `${isTrialUpgrade ? "text-warning" : "text-muted-foreground"}`, children: isTrialUpgrade ? "Amount to charge now:" : "Amount due now:" }),
2326
2326
  /* @__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: [
2327
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "line-through text-muted-foreground mr-2", children: _chunkUGNLKDI6js.formatCurrency.call(void 0, prorationPreview.immediateCharge, prorationPreview.currency) }),
2328
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-success", children: _chunkUGNLKDI6js.formatCurrency.call(void 0, discountedImmediateCharge, prorationPreview.currency) })
2329
- ] }) : _chunkUGNLKDI6js.formatCurrency.call(void 0, prorationPreview.immediateCharge, prorationPreview.currency) })
2327
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "line-through text-muted-foreground mr-2", children: _chunkUYOQG5IWjs.formatCurrency.call(void 0, prorationPreview.immediateCharge, prorationPreview.currency) }),
2328
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-success", children: _chunkUYOQG5IWjs.formatCurrency.call(void 0, discountedImmediateCharge, prorationPreview.currency) })
2329
+ ] }) : _chunkUYOQG5IWjs.formatCurrency.call(void 0, prorationPreview.immediateCharge, prorationPreview.currency) })
2330
2330
  ] })
2331
2331
  ]
2332
2332
  }
@@ -2350,15 +2350,15 @@ function WizardStepReview({
2350
2350
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h4", { className: "font-medium", children: "Payment Method" }),
2351
2351
  /* @__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" })
2352
2352
  ] }),
2353
- !hasPaymentMethod && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Button, { variant: "outline", onClick: onAddPaymentMethod, children: "Add Payment Method" })
2353
+ !hasPaymentMethod && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Button, { variant: "outline", onClick: onAddPaymentMethod, children: "Add Payment Method" })
2354
2354
  ] }) }),
2355
- error && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.Alert, { variant: "destructive", children: [
2355
+ error && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.Alert, { variant: "destructive", children: [
2356
2356
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.AlertCircle, { className: "h-4 w-4" }),
2357
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.AlertDescription, { children: error })
2357
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.AlertDescription, { children: error })
2358
2358
  ] }),
2359
2359
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between pt-4 border-t", children: [
2360
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Button, { variant: "outline", onClick: onBack, disabled: isProcessing, children: "Back" }),
2361
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Button, { onClick: hasPaymentMethod ? onConfirm : onAddPaymentMethod, disabled: isProcessing, children: isProcessing ? "Processing..." : hasPaymentMethod ? isChangingPlan ? "Confirm Plan Change" : "Subscribe Now" : "Add Payment Method" })
2360
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Button, { variant: "outline", onClick: onBack, disabled: isProcessing, children: "Back" }),
2361
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Button, { onClick: hasPaymentMethod ? onConfirm : onAddPaymentMethod, disabled: isProcessing, children: isProcessing ? "Processing..." : hasPaymentMethod ? isChangingPlan ? "Confirm Plan Change" : "Subscribe Now" : "Add Payment Method" })
2362
2362
  ] })
2363
2363
  ] });
2364
2364
  }
@@ -2369,7 +2369,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, WizardStepReview, "WizardStepReview");
2369
2369
  function WizardStepPaymentMethod({ onBack, onSuccess, isProcessing }) {
2370
2370
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-6", children: [
2371
2371
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-center", children: [
2372
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.SectionHeader, { children: "Add Payment Method" }),
2372
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.SectionHeader, { children: "Add Payment Method" }),
2373
2373
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: "Enter your card details to complete your subscription" })
2374
2374
  ] }),
2375
2375
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PaymentMethodForm, { onSuccess, onCancel: onBack, isLoading: isProcessing })
@@ -2411,10 +2411,10 @@ function SubscriptionWizard({
2411
2411
  const isChangePlanMode = !!subscription;
2412
2412
  const dialogTitle = subscription ? "Change Subscription Plan" : isPurchasingAddons ? "Purchase Add-ons" : "Subscribe to a Plan";
2413
2413
  const dialogDescription = subscription ? "Select a new plan for your subscription" : isPurchasingAddons ? "Select one-time products to purchase" : "Choose a subscription plan to get started";
2414
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.DialogContent, { className: "max-w-2xl", children: [
2415
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.DialogHeader, { children: [
2416
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.DialogTitle, { children: dialogTitle }),
2417
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.DialogDescription, { children: dialogDescription })
2414
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.DialogContent, { className: "max-w-2xl", children: [
2415
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.DialogHeader, { children: [
2416
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.DialogTitle, { children: dialogTitle }),
2417
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.DialogDescription, { children: dialogDescription })
2418
2418
  ] }),
2419
2419
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WizardProgressIndicator, { currentStep: state.step }),
2420
2420
  state.step === "plan-selection" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -2497,15 +2497,15 @@ function UsageSummaryCard({ meter, summary }) {
2497
2497
  const progressWidth = percentage !== null ? Math.min(percentage, 100) : 0;
2498
2498
  const displayName = meter.displayName || meter.eventName;
2499
2499
  const hasLimit = limit !== null && limit !== void 0;
2500
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.Card, { children: [
2501
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.CardHeader, { className: "flex flex-row items-center gap-x-3 pb-3", children: [
2500
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.Card, { children: [
2501
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.CardHeader, { className: "flex flex-row items-center gap-x-3 pb-3", children: [
2502
2502
  /* @__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" }) }),
2503
2503
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col", children: [
2504
2504
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "text-sm font-medium", children: displayName }),
2505
2505
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-xs", children: meter.id })
2506
2506
  ] })
2507
2507
  ] }),
2508
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.CardContent, { className: "flex flex-col gap-y-4", children: [
2508
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.CardContent, { className: "flex flex-col gap-y-4", children: [
2509
2509
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
2510
2510
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-3xl font-bold", children: currentUsage.toLocaleString() }),
2511
2511
  hasLimit && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: "text-muted-foreground text-sm", children: [
@@ -2552,14 +2552,14 @@ function UsageContainer() {
2552
2552
  const loadUsageData = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
2553
2553
  setLoading(true);
2554
2554
  try {
2555
- const fetchedSubscriptions = await _chunk53B6NPGAjs.StripeSubscriptionService.listSubscriptions();
2555
+ const fetchedSubscriptions = await _chunkYUXCJ35Vjs.StripeSubscriptionService.listSubscriptions();
2556
2556
  setSubscriptions(fetchedSubscriptions);
2557
2557
  const hasMeteredSubscriptions2 = fetchedSubscriptions.some((sub) => _optionalChain([sub, 'access', _99 => _99.price, 'optionalAccess', _100 => _100.recurring, 'optionalAccess', _101 => _101.usageType]) === "metered");
2558
2558
  if (!hasMeteredSubscriptions2) {
2559
2559
  setLoading(false);
2560
2560
  return;
2561
2561
  }
2562
- const fetchedMeters = await _chunk53B6NPGAjs.StripeUsageService.listMeters();
2562
+ const fetchedMeters = await _chunkYUXCJ35Vjs.StripeUsageService.listMeters();
2563
2563
  setMeters(fetchedMeters);
2564
2564
  const summariesMap = {};
2565
2565
  const now = /* @__PURE__ */ new Date();
@@ -2567,7 +2567,7 @@ function UsageContainer() {
2567
2567
  const endOfMonth = new Date(now.getFullYear(), now.getMonth() + 1, 0, 23, 59, 59, 999);
2568
2568
  for (const meter of fetchedMeters) {
2569
2569
  try {
2570
- const meterSummaries = await _chunk53B6NPGAjs.StripeUsageService.getMeterSummaries({
2570
+ const meterSummaries = await _chunkYUXCJ35Vjs.StripeUsageService.getMeterSummaries({
2571
2571
  meterId: meter.id,
2572
2572
  startTime: startOfMonth,
2573
2573
  endTime: endOfMonth
@@ -2632,22 +2632,22 @@ function UsageHistoryTable({ usageRecords }) {
2632
2632
  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." }) });
2633
2633
  }
2634
2634
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
2635
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.SectionHeader, { level: 2, children: "Usage History" }),
2636
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "overflow-clip rounded-lg border", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.Table, { children: [
2637
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.TableRow, { children: [
2638
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableHead, { children: "Date & Time" }),
2639
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableHead, { children: "Meter Event" }),
2640
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableHead, { className: "text-right", children: "Quantity" }),
2641
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableHead, { children: "Event ID" })
2635
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.SectionHeader, { level: 2, children: "Usage History" }),
2636
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "overflow-clip rounded-lg border", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.Table, { children: [
2637
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.TableRow, { children: [
2638
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableHead, { children: "Date & Time" }),
2639
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableHead, { children: "Meter Event" }),
2640
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableHead, { className: "text-right", children: "Quantity" }),
2641
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableHead, { children: "Event ID" })
2642
2642
  ] }) }),
2643
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableBody, { children: usageRecords.map((record) => {
2643
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableBody, { children: usageRecords.map((record) => {
2644
2644
  const dateTime = formatDateTime(record.timestamp);
2645
2645
  const quantity = record.quantity.toLocaleString();
2646
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.TableRow, { children: [
2647
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableCell, { className: "font-medium", children: dateTime }),
2648
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableCell, { className: "text-muted-foreground", children: record.meterEventName }),
2649
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableCell, { className: "text-right font-medium", children: quantity }),
2650
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableCell, { className: "text-muted-foreground text-sm tabular-nums", children: record.stripeEventId })
2646
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.TableRow, { children: [
2647
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableCell, { className: "font-medium", children: dateTime }),
2648
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableCell, { className: "text-muted-foreground", children: record.meterEventName }),
2649
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableCell, { className: "text-right font-medium", children: quantity }),
2650
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableCell, { className: "text-muted-foreground text-sm tabular-nums", children: record.stripeEventId })
2651
2651
  ] }, record.id);
2652
2652
  }) })
2653
2653
  ] }) })
@@ -2658,8 +2658,8 @@ _chunk7QVYU63Ejs.__name.call(void 0, UsageHistoryTable, "UsageHistoryTable");
2658
2658
  // src/features/billing/components/modals/BillingDetailModal.tsx
2659
2659
 
2660
2660
  function BillingDetailModal({ open, onOpenChange, title, children, className }) {
2661
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.DialogContent, { className: _nullishCoalesce(className, () => ( "max-w-4xl max-h-[90vh] overflow-y-auto")), children: [
2662
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.DialogHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.DialogTitle, { children: title }) }),
2661
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.DialogContent, { className: _nullishCoalesce(className, () => ( "max-w-4xl max-h-[90vh] overflow-y-auto")), children: [
2662
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.DialogHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.DialogTitle, { children: title }) }),
2663
2663
  children
2664
2664
  ] }) });
2665
2665
  }
@@ -2676,7 +2676,7 @@ function BillingAlertBanner({ subscription, onUpdatePayment, onAddPayment }) {
2676
2676
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "text-destructive text-sm font-medium", children: "Payment Failed" }),
2677
2677
  /* @__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." })
2678
2678
  ] }),
2679
- onUpdatePayment && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Button, { variant: "outline", size: "sm", onClick: onUpdatePayment, className: "text-destructive border-red-300", children: "Update Payment Method" })
2679
+ onUpdatePayment && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Button, { variant: "outline", size: "sm", onClick: onUpdatePayment, className: "text-destructive border-red-300", children: "Update Payment Method" })
2680
2680
  ] });
2681
2681
  }
2682
2682
  if (subscription.status === "trialing" /* TRIALING */ && subscription.trialEnd) {
@@ -2696,7 +2696,7 @@ function BillingAlertBanner({ subscription, onUpdatePayment, onAddPayment }) {
2696
2696
  ". Add a payment method to continue your subscription."
2697
2697
  ] })
2698
2698
  ] }),
2699
- onAddPayment && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Button, { variant: "outline", size: "sm", onClick: onAddPayment, className: "text-warning border-yellow-300", children: "Add Payment Method" })
2699
+ onAddPayment && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Button, { variant: "outline", size: "sm", onClick: onAddPayment, className: "text-warning border-yellow-300", children: "Add Payment Method" })
2700
2700
  ] });
2701
2701
  }
2702
2702
  }
@@ -2747,7 +2747,7 @@ function BillingDashboardContainer() {
2747
2747
  setNoCustomerExists(false);
2748
2748
  let customer = null;
2749
2749
  try {
2750
- customer = await _chunk53B6NPGAjs.StripeCustomerService.getCustomer();
2750
+ customer = await _chunkYUXCJ35Vjs.StripeCustomerService.getCustomer();
2751
2751
  setData((prev) => ({ ...prev, customer }));
2752
2752
  setErrors((prev) => ({ ...prev, customer: null }));
2753
2753
  setNoCustomerExists(false);
@@ -2773,7 +2773,7 @@ function BillingDashboardContainer() {
2773
2773
  }
2774
2774
  const fetchSubscriptions = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
2775
2775
  try {
2776
- const subscriptions2 = await _chunk53B6NPGAjs.StripeSubscriptionService.listSubscriptions();
2776
+ const subscriptions2 = await _chunkYUXCJ35Vjs.StripeSubscriptionService.listSubscriptions();
2777
2777
  setData((prev) => ({ ...prev, subscriptions: subscriptions2 }));
2778
2778
  setErrors((prev) => ({ ...prev, subscriptions: null }));
2779
2779
  return subscriptions2;
@@ -2787,7 +2787,7 @@ function BillingDashboardContainer() {
2787
2787
  }, "fetchSubscriptions");
2788
2788
  const fetchPaymentMethods = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
2789
2789
  try {
2790
- const paymentMethods = await _chunk53B6NPGAjs.StripeCustomerService.listPaymentMethods();
2790
+ const paymentMethods = await _chunkYUXCJ35Vjs.StripeCustomerService.listPaymentMethods();
2791
2791
  setData((prev) => ({ ...prev, paymentMethods }));
2792
2792
  setErrors((prev) => ({ ...prev, paymentMethods: null }));
2793
2793
  } catch (error) {
@@ -2799,7 +2799,7 @@ function BillingDashboardContainer() {
2799
2799
  }, "fetchPaymentMethods");
2800
2800
  const fetchInvoices = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
2801
2801
  try {
2802
- const invoices = await _chunk53B6NPGAjs.StripeInvoiceService.listInvoices();
2802
+ const invoices = await _chunkYUXCJ35Vjs.StripeInvoiceService.listInvoices();
2803
2803
  setData((prev) => ({ ...prev, invoices }));
2804
2804
  setErrors((prev) => ({ ...prev, invoices: null }));
2805
2805
  } catch (error) {
@@ -2822,7 +2822,7 @@ function BillingDashboardContainer() {
2822
2822
  const handleCreateCustomer = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
2823
2823
  setCreatingCustomer(true);
2824
2824
  try {
2825
- await _chunk53B6NPGAjs.StripeCustomerService.createCustomer();
2825
+ await _chunkYUXCJ35Vjs.StripeCustomerService.createCustomer();
2826
2826
  setNoCustomerExists(false);
2827
2827
  await fetchAllData();
2828
2828
  } catch (error) {
@@ -2834,7 +2834,7 @@ function BillingDashboardContainer() {
2834
2834
  }, "handleCreateCustomer");
2835
2835
  const fetchUsageData = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
2836
2836
  try {
2837
- const meters = await _chunk53B6NPGAjs.StripeUsageService.listMeters();
2837
+ const meters = await _chunkYUXCJ35Vjs.StripeUsageService.listMeters();
2838
2838
  setData((prev) => ({ ...prev, meters }));
2839
2839
  const summariesMap = {};
2840
2840
  const now = /* @__PURE__ */ new Date();
@@ -2842,7 +2842,7 @@ function BillingDashboardContainer() {
2842
2842
  const endOfMonth = new Date(now.getFullYear(), now.getMonth() + 1, 0, 23, 59, 59, 999);
2843
2843
  for (const meter of meters) {
2844
2844
  try {
2845
- const meterSummaries = await _chunk53B6NPGAjs.StripeUsageService.getMeterSummaries({
2845
+ const meterSummaries = await _chunkYUXCJ35Vjs.StripeUsageService.getMeterSummaries({
2846
2846
  meterId: meter.id,
2847
2847
  startTime: startOfMonth,
2848
2848
  endTime: endOfMonth
@@ -2920,18 +2920,18 @@ function BillingDashboardContainer() {
2920
2920
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Wallet, { className: "h-8 w-8" }),
2921
2921
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h1", { className: "text-primary text-3xl font-semibold", children: "Billing" })
2922
2922
  ] }),
2923
- isInitialLoading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.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" }) }) }),
2924
- noCustomerExists && !isInitialLoading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.Card, { children: [
2925
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.CardHeader, { className: "text-center", children: [
2923
+ isInitialLoading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.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" }) }) }),
2924
+ noCustomerExists && !isInitialLoading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.Card, { children: [
2925
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.CardHeader, { className: "text-center", children: [
2926
2926
  /* @__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" }) }),
2927
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardTitle, { children: "Set Up Billing" }),
2928
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardDescription, { children: "Your company doesn't have a billing account yet. Set one up to manage subscriptions, payment methods, and view invoices." })
2927
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardTitle, { children: "Set Up Billing" }),
2928
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardDescription, { children: "Your company doesn't have a billing account yet. Set one up to manage subscriptions, payment methods, and view invoices." })
2929
2929
  ] }),
2930
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardContent, { className: "flex justify-center pb-8", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Button, { onClick: handleCreateCustomer, disabled: creatingCustomer, size: "lg", children: creatingCustomer ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
2930
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardContent, { className: "flex justify-center pb-8", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Button, { onClick: handleCreateCustomer, disabled: creatingCustomer, size: "lg", children: creatingCustomer ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
2931
2931
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Loader2, { className: "mr-2 h-4 w-4 animate-spin" }),
2932
2932
  "Setting up..."
2933
2933
  ] }) : "Set Up Billing Account" }) }),
2934
- errors.customer && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardContent, { className: "pt-0", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-center text-destructive text-xs/relaxed", children: errors.customer }) })
2934
+ errors.customer && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardContent, { className: "pt-0", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-center text-destructive text-xs/relaxed", children: errors.customer }) })
2935
2935
  ] }),
2936
2936
  !noCustomerExists && !isInitialLoading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
2937
2937
  criticalSubscriptions.map((subscription) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -3073,7 +3073,7 @@ function getStripePromise(publishableKey) {
3073
3073
  }
3074
3074
  _chunk7QVYU63Ejs.__name.call(void 0, getStripePromise, "getStripePromise");
3075
3075
  function StripeProvider({ children }) {
3076
- const publishableKey = _chunkJKGEJGSDjs.getStripePublishableKey.call(void 0, );
3076
+ const publishableKey = _chunkH7DOSB7Wjs.getStripePublishableKey.call(void 0, );
3077
3077
  const stripePromise = _react.useMemo.call(void 0, () => getStripePromise(publishableKey), [publishableKey]);
3078
3078
  const options = _react.useMemo.call(void 0, () => ({}), []);
3079
3079
  if (!publishableKey) {
@@ -3083,7 +3083,7 @@ function StripeProvider({ children }) {
3083
3083
  }
3084
3084
  _chunk7QVYU63Ejs.__name.call(void 0, StripeProvider, "StripeProvider");
3085
3085
  function isStripeConfigured() {
3086
- return !!_chunkJKGEJGSDjs.getStripePublishableKey.call(void 0, );
3086
+ return !!_chunkH7DOSB7Wjs.getStripePublishableKey.call(void 0, );
3087
3087
  }
3088
3088
  _chunk7QVYU63Ejs.__name.call(void 0, isStripeConfigured, "isStripeConfigured");
3089
3089
 
@@ -3103,12 +3103,12 @@ function PriceArchiver({ price }) {
3103
3103
  const isArchived = !price.active;
3104
3104
  const scope = isArchived ? "restore" : "archive";
3105
3105
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
3106
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.Button, { variant: "outline", size: "sm", onClick: () => setOpen(true), children: [
3106
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.Button, { variant: "outline", size: "sm", onClick: () => setOpen(true), children: [
3107
3107
  isArchived ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.RotateCcwIcon, {}) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ArchiveIcon, {}),
3108
3108
  t(`billing.admin.prices.${scope}.confirm`)
3109
3109
  ] }),
3110
3110
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3111
- _chunkUGNLKDI6js.ConfirmDialog,
3111
+ _chunkUYOQG5IWjs.ConfirmDialog,
3112
3112
  {
3113
3113
  open,
3114
3114
  onOpenChange: setOpen,
@@ -3122,7 +3122,7 @@ function PriceArchiver({ price }) {
3122
3122
  if (isArchived) await restorePrice(price.id);
3123
3123
  else await archivePrice(price.id);
3124
3124
  } catch (error) {
3125
- _chunkUGNLKDI6js.errorToast.call(void 0, { title: t(`billing.admin.prices.${scope}.title`), error });
3125
+ _chunkUYOQG5IWjs.errorToast.call(void 0, { title: t(`billing.admin.prices.${scope}.title`), error });
3126
3126
  throw error;
3127
3127
  }
3128
3128
  }
@@ -3153,14 +3153,14 @@ function PriceEditorInternal({
3153
3153
  onDialogOpenChange
3154
3154
  }) {
3155
3155
  const t = _nextintl.useTranslations.call(void 0, );
3156
- const router = _chunkJKGEJGSDjs.useI18nRouter.call(void 0, );
3156
+ const router = _chunkH7DOSB7Wjs.useI18nRouter.call(void 0, );
3157
3157
  const { createPrice, updatePrice, productId: contextProductId } = usePriceContext();
3158
3158
  const [allFeatures, setAllFeatures] = _react.useState.call(void 0, []);
3159
3159
  const isEdit = !!price;
3160
3160
  const targetProductId = _nullishCoalesce(_nullishCoalesce(productId, () => ( _optionalChain([price, 'optionalAccess', _117 => _117.product, 'optionalAccess', _118 => _118.id]))), () => ( contextProductId));
3161
3161
  _react.useEffect.call(void 0, () => {
3162
3162
  const fetchFeatures = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
3163
- setAllFeatures(await _chunk53B6NPGAjs.FeatureService.findMany({}));
3163
+ setAllFeatures(await _chunkYUXCJ35Vjs.FeatureService.findMany({}));
3164
3164
  }, "fetchFeatures");
3165
3165
  void fetchFeatures();
3166
3166
  }, []);
@@ -3225,13 +3225,13 @@ function PriceEditorInternal({
3225
3225
  { id: "metered", text: t("billing.admin.prices.usage.metered") }
3226
3226
  ];
3227
3227
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3228
- _chunkUGNLKDI6js.EditorSheet,
3228
+ _chunkUYOQG5IWjs.EditorSheet,
3229
3229
  {
3230
3230
  form,
3231
3231
  entityType: t("billing.admin.prices.entity"),
3232
3232
  entityName: price ? priceLabel(price) : void 0,
3233
3233
  isEdit,
3234
- module: _chunk53B6NPGAjs.Modules.StripePrice,
3234
+ module: _chunkYUXCJ35Vjs.Modules.StripePrice,
3235
3235
  size: "lg",
3236
3236
  propagateChanges,
3237
3237
  onSuccess,
@@ -3280,13 +3280,13 @@ function PriceEditorInternal({
3280
3280
  dialogOpen,
3281
3281
  onDialogOpenChange,
3282
3282
  children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
3283
- isEdit && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.Alert, { children: [
3284
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.AlertTitle, { children: t("billing.admin.prices.immutability.title") }),
3285
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.AlertDescription, { children: t("billing.admin.prices.immutability.description") })
3283
+ isEdit && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.Alert, { children: [
3284
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.AlertTitle, { children: t("billing.admin.prices.immutability.title") }),
3285
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.AlertDescription, { children: t("billing.admin.prices.immutability.description") })
3286
3286
  ] }),
3287
3287
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-2 gap-x-4", children: [
3288
3288
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3289
- _chunkUGNLKDI6js.FormInput,
3289
+ _chunkUYOQG5IWjs.FormInput,
3290
3290
  {
3291
3291
  form,
3292
3292
  id: "unitAmount",
@@ -3298,7 +3298,7 @@ function PriceEditorInternal({
3298
3298
  }
3299
3299
  ),
3300
3300
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3301
- _chunkUGNLKDI6js.FormSelect,
3301
+ _chunkUYOQG5IWjs.FormSelect,
3302
3302
  {
3303
3303
  form,
3304
3304
  id: "currency",
@@ -3309,7 +3309,7 @@ function PriceEditorInternal({
3309
3309
  )
3310
3310
  ] }),
3311
3311
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3312
- _chunkUGNLKDI6js.FormSelect,
3312
+ _chunkUYOQG5IWjs.FormSelect,
3313
3313
  {
3314
3314
  form,
3315
3315
  id: "interval",
@@ -3320,7 +3320,7 @@ function PriceEditorInternal({
3320
3320
  ),
3321
3321
  isRecurring && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-2 gap-x-4", children: [
3322
3322
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3323
- _chunkUGNLKDI6js.FormInput,
3323
+ _chunkUYOQG5IWjs.FormInput,
3324
3324
  {
3325
3325
  form,
3326
3326
  id: "intervalCount",
@@ -3331,7 +3331,7 @@ function PriceEditorInternal({
3331
3331
  }
3332
3332
  ),
3333
3333
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3334
- _chunkUGNLKDI6js.FormSelect,
3334
+ _chunkUYOQG5IWjs.FormSelect,
3335
3335
  {
3336
3336
  form,
3337
3337
  id: "usageType",
@@ -3342,7 +3342,7 @@ function PriceEditorInternal({
3342
3342
  )
3343
3343
  ] }),
3344
3344
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3345
- _chunkUGNLKDI6js.FormInput,
3345
+ _chunkUYOQG5IWjs.FormInput,
3346
3346
  {
3347
3347
  form,
3348
3348
  id: "nickname",
@@ -3351,7 +3351,7 @@ function PriceEditorInternal({
3351
3351
  }
3352
3352
  ),
3353
3353
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3354
- _chunkUGNLKDI6js.FormTextarea,
3354
+ _chunkUYOQG5IWjs.FormTextarea,
3355
3355
  {
3356
3356
  form,
3357
3357
  id: "description",
@@ -3361,7 +3361,7 @@ function PriceEditorInternal({
3361
3361
  }
3362
3362
  ),
3363
3363
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3364
- _chunkUGNLKDI6js.FormInput,
3364
+ _chunkUYOQG5IWjs.FormInput,
3365
3365
  {
3366
3366
  form,
3367
3367
  id: "token",
@@ -3371,10 +3371,10 @@ function PriceEditorInternal({
3371
3371
  }
3372
3372
  ),
3373
3373
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-2", children: [
3374
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.FieldLabel, { children: t("billing.admin.prices.fields.features") }),
3374
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.FieldLabel, { children: t("billing.admin.prices.fields.features") }),
3375
3375
  form.watch("features").map((_, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex gap-2", children: [
3376
3376
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3377
- _chunkUGNLKDI6js.Input,
3377
+ _chunkUYOQG5IWjs.Input,
3378
3378
  {
3379
3379
  ...form.register(`features.${index}`),
3380
3380
  placeholder: t("billing.admin.prices.placeholders.feature", { index: index + 1 }),
@@ -3382,7 +3382,7 @@ function PriceEditorInternal({
3382
3382
  }
3383
3383
  ),
3384
3384
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3385
- _chunkUGNLKDI6js.Button,
3385
+ _chunkUYOQG5IWjs.Button,
3386
3386
  {
3387
3387
  type: "button",
3388
3388
  variant: "outline",
@@ -3397,7 +3397,7 @@ function PriceEditorInternal({
3397
3397
  )
3398
3398
  ] }, index)),
3399
3399
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
3400
- _chunkUGNLKDI6js.Button,
3400
+ _chunkUYOQG5IWjs.Button,
3401
3401
  {
3402
3402
  type: "button",
3403
3403
  variant: "outline",
@@ -3412,12 +3412,12 @@ function PriceEditorInternal({
3412
3412
  )
3413
3413
  ] }),
3414
3414
  isRecurring && allFeatures.length > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-2", children: [
3415
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.FieldLabel, { children: t("billing.admin.prices.fields.platformFeatures") }),
3415
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.FieldLabel, { children: t("billing.admin.prices.fields.platformFeatures") }),
3416
3416
  /* @__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) => {
3417
3417
  const isChecked = form.watch("featureIds").includes(feature.id);
3418
3418
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-2", children: [
3419
3419
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3420
- _chunkUGNLKDI6js.Checkbox,
3420
+ _chunkUYOQG5IWjs.Checkbox,
3421
3421
  {
3422
3422
  id: `feature-${feature.id}`,
3423
3423
  checked: isChecked,
@@ -3433,13 +3433,13 @@ function PriceEditorInternal({
3433
3433
  }
3434
3434
  }
3435
3435
  ),
3436
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.FieldLabel, { htmlFor: `feature-${feature.id}`, children: feature.name }),
3436
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.FieldLabel, { htmlFor: `feature-${feature.id}`, children: feature.name }),
3437
3437
  feature.isCore && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: t("billing.admin.prices.help.core") })
3438
3438
  ] }, feature.id);
3439
3439
  }) })
3440
3440
  ] }),
3441
3441
  isRecurring && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3442
- _chunkUGNLKDI6js.FormCheckbox,
3442
+ _chunkUYOQG5IWjs.FormCheckbox,
3443
3443
  {
3444
3444
  form,
3445
3445
  id: "isTrial",
@@ -3482,7 +3482,7 @@ var defaultContextValue = {
3482
3482
  productId: void 0
3483
3483
  };
3484
3484
  function priceLabel(price) {
3485
- return _nullishCoalesce(price.nickname, () => ( `${_chunkUGNLKDI6js.formatCurrency.call(void 0, price.unitAmount, price.currency)} ${_chunkUGNLKDI6js.formatInterval.call(void 0, price)}`.trim()));
3485
+ return _nullishCoalesce(price.nickname, () => ( `${_chunkUYOQG5IWjs.formatCurrency.call(void 0, price.unitAmount, price.currency)} ${_chunkUYOQG5IWjs.formatInterval.call(void 0, price)}`.trim()));
3486
3486
  }
3487
3487
  _chunk7QVYU63Ejs.__name.call(void 0, priceLabel, "priceLabel");
3488
3488
  var PriceProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({
@@ -3492,21 +3492,21 @@ var PriceProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({
3492
3492
  productId: productIdProp
3493
3493
  }) => {
3494
3494
  const t = _nextintl.useTranslations.call(void 0, );
3495
- const generateUrl = _chunkUGNLKDI6js.usePageUrlGenerator.call(void 0, );
3496
- const { hasRole } = _chunkUGNLKDI6js.useCurrentUserContext.call(void 0, );
3495
+ const generateUrl = _chunkUYOQG5IWjs.usePageUrlGenerator.call(void 0, );
3496
+ const { hasRole } = _chunkUYOQG5IWjs.useCurrentUserContext.call(void 0, );
3497
3497
  const [price, setPrice] = _react.useState.call(void 0,
3498
- dehydratedPrice ? _chunk53B6NPGAjs.rehydrate.call(void 0, _chunk53B6NPGAjs.Modules.StripePrice, dehydratedPrice) : void 0
3498
+ dehydratedPrice ? _chunkYUXCJ35Vjs.rehydrate.call(void 0, _chunkYUXCJ35Vjs.Modules.StripePrice, dehydratedPrice) : void 0
3499
3499
  );
3500
3500
  const [priceVersion, setPriceVersion] = _react.useState.call(void 0, 0);
3501
3501
  const refreshPrices = _react.useCallback.call(void 0, () => setPriceVersion((value2) => value2 + 1), []);
3502
3502
  const productId = _nullishCoalesce(productIdProp, () => ( _optionalChain([price, 'optionalAccess', _138 => _138.product, 'optionalAccess', _139 => _139.id])));
3503
3503
  const reloadPrice = _react.useCallback.call(void 0, async () => {
3504
3504
  if (!_optionalChain([price, 'optionalAccess', _140 => _140.id])) return;
3505
- setPrice(await _chunk53B6NPGAjs.StripePriceService.getPrice({ id: price.id }));
3505
+ setPrice(await _chunkYUXCJ35Vjs.StripePriceService.getPrice({ id: price.id }));
3506
3506
  }, [_optionalChain([price, 'optionalAccess', _141 => _141.id])]);
3507
3507
  const createPrice = _react.useCallback.call(void 0,
3508
3508
  async (input) => {
3509
- const saved = await _chunk53B6NPGAjs.StripePriceService.createPrice(input);
3509
+ const saved = await _chunkYUXCJ35Vjs.StripePriceService.createPrice(input);
3510
3510
  refreshPrices();
3511
3511
  return saved;
3512
3512
  },
@@ -3514,7 +3514,7 @@ var PriceProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({
3514
3514
  );
3515
3515
  const updatePrice = _react.useCallback.call(void 0,
3516
3516
  async (input) => {
3517
- const saved = await _chunk53B6NPGAjs.StripePriceService.updatePrice(input);
3517
+ const saved = await _chunkYUXCJ35Vjs.StripePriceService.updatePrice(input);
3518
3518
  setPrice(saved);
3519
3519
  refreshPrices();
3520
3520
  return saved;
@@ -3525,7 +3525,7 @@ var PriceProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({
3525
3525
  async (id) => {
3526
3526
  const target = _nullishCoalesce(id, () => ( _optionalChain([price, 'optionalAccess', _142 => _142.id])));
3527
3527
  if (!target) return;
3528
- await _chunk53B6NPGAjs.StripePriceService.archivePrice({ id: target });
3528
+ await _chunkYUXCJ35Vjs.StripePriceService.archivePrice({ id: target });
3529
3529
  await reloadPrice();
3530
3530
  refreshPrices();
3531
3531
  },
@@ -3535,7 +3535,7 @@ var PriceProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({
3535
3535
  async (id) => {
3536
3536
  const target = _nullishCoalesce(id, () => ( _optionalChain([price, 'optionalAccess', _144 => _144.id])));
3537
3537
  if (!target) return;
3538
- await _chunk53B6NPGAjs.StripePriceService.reactivatePrice({ id: target });
3538
+ await _chunkYUXCJ35Vjs.StripePriceService.reactivatePrice({ id: target });
3539
3539
  await reloadPrice();
3540
3540
  refreshPrices();
3541
3541
  },
@@ -3559,12 +3559,12 @@ var PriceProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({
3559
3559
  if (!publishChrome) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PriceContext.Provider, { value, children });
3560
3560
  const breadcrumb = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
3561
3561
  const items = [
3562
- { name: t("billing.admin.products.title"), href: generateUrl({ page: _chunk53B6NPGAjs.Modules.StripeProduct }) }
3562
+ { name: t("billing.admin.products.title"), href: generateUrl({ page: _chunkYUXCJ35Vjs.Modules.StripeProduct }) }
3563
3563
  ];
3564
3564
  if (_optionalChain([price, 'optionalAccess', _146 => _146.product]))
3565
3565
  items.push({
3566
3566
  name: price.product.name,
3567
- href: generateUrl({ page: _chunk53B6NPGAjs.Modules.StripeProduct, id: price.product.id })
3567
+ href: generateUrl({ page: _chunkYUXCJ35Vjs.Modules.StripeProduct, id: price.product.id })
3568
3568
  });
3569
3569
  if (price) items.push({ name: priceLabel(price) });
3570
3570
  return items;
@@ -3573,7 +3573,7 @@ var PriceProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({
3573
3573
  const response = { type: t("billing.admin.prices.title") };
3574
3574
  if (!price) return response;
3575
3575
  response.element = priceLabel(price);
3576
- if (hasRole(_chunkJKGEJGSDjs.getRoleId.call(void 0, ).Administrator)) {
3576
+ if (hasRole(_chunkH7DOSB7Wjs.getRoleId.call(void 0, ).Administrator)) {
3577
3577
  response.functions = [
3578
3578
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PriceArchiver, { price }, "priceArchiver"),
3579
3579
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PriceEditor, { price, propagateChanges: setPrice }, "priceEditor")
@@ -3581,7 +3581,7 @@ var PriceProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({
3581
3581
  }
3582
3582
  return response;
3583
3583
  }, "title");
3584
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PriceContext.Provider, { value, children }) });
3584
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PriceContext.Provider, { value, children }) });
3585
3585
  }, "PriceProvider");
3586
3586
  var usePriceContext = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => _nullishCoalesce(_react.useContext.call(void 0, PriceContext), () => ( defaultContextValue)), "usePriceContext");
3587
3587
 
@@ -3601,12 +3601,12 @@ function ProductArchiver({ product }) {
3601
3601
  const isArchived = !product.active;
3602
3602
  const scope = isArchived ? "restore" : "archive";
3603
3603
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
3604
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.Button, { variant: "outline", size: "sm", onClick: () => setOpen(true), children: [
3604
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.Button, { variant: "outline", size: "sm", onClick: () => setOpen(true), children: [
3605
3605
  isArchived ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.RotateCcwIcon, {}) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ArchiveIcon, {}),
3606
3606
  t(`billing.admin.products.${scope}.confirm`)
3607
3607
  ] }),
3608
3608
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3609
- _chunkUGNLKDI6js.ConfirmDialog,
3609
+ _chunkUYOQG5IWjs.ConfirmDialog,
3610
3610
  {
3611
3611
  open,
3612
3612
  onOpenChange: setOpen,
@@ -3620,7 +3620,7 @@ function ProductArchiver({ product }) {
3620
3620
  if (isArchived) await restoreProduct(product.id);
3621
3621
  else await archiveProduct(product.id);
3622
3622
  } catch (error) {
3623
- _chunkUGNLKDI6js.errorToast.call(void 0, { title: t(`billing.admin.products.${scope}.title`), error });
3623
+ _chunkUYOQG5IWjs.errorToast.call(void 0, { title: t(`billing.admin.products.${scope}.title`), error });
3624
3624
  throw error;
3625
3625
  }
3626
3626
  }
@@ -3649,7 +3649,7 @@ function ProductEditorInternal({
3649
3649
  onDialogOpenChange
3650
3650
  }) {
3651
3651
  const t = _nextintl.useTranslations.call(void 0, );
3652
- const router = _chunkJKGEJGSDjs.useI18nRouter.call(void 0, );
3652
+ const router = _chunkH7DOSB7Wjs.useI18nRouter.call(void 0, );
3653
3653
  const { createProduct, updateProduct } = useProductContext();
3654
3654
  const isEdit = !!product;
3655
3655
  const formSchema2 = _react.useMemo.call(void 0,
@@ -3673,13 +3673,13 @@ function ProductEditorInternal({
3673
3673
  defaultValues: getDefaultValues()
3674
3674
  });
3675
3675
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3676
- _chunkUGNLKDI6js.EditorSheet,
3676
+ _chunkUYOQG5IWjs.EditorSheet,
3677
3677
  {
3678
3678
  form,
3679
3679
  entityType: t("billing.admin.products.entity"),
3680
3680
  entityName: _optionalChain([product, 'optionalAccess', _150 => _150.name]),
3681
3681
  isEdit,
3682
- module: _chunk53B6NPGAjs.Modules.StripeProduct,
3682
+ module: _chunkYUXCJ35Vjs.Modules.StripeProduct,
3683
3683
  size: "md",
3684
3684
  propagateChanges,
3685
3685
  onSuccess,
@@ -3696,7 +3696,7 @@ function ProductEditorInternal({
3696
3696
  onDialogOpenChange,
3697
3697
  children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
3698
3698
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3699
- _chunkUGNLKDI6js.FormInput,
3699
+ _chunkUYOQG5IWjs.FormInput,
3700
3700
  {
3701
3701
  form,
3702
3702
  id: "name",
@@ -3706,7 +3706,7 @@ function ProductEditorInternal({
3706
3706
  }
3707
3707
  ),
3708
3708
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3709
- _chunkUGNLKDI6js.FormTextarea,
3709
+ _chunkUYOQG5IWjs.FormTextarea,
3710
3710
  {
3711
3711
  form,
3712
3712
  id: "description",
@@ -3750,20 +3750,20 @@ var defaultContextValue2 = {
3750
3750
  };
3751
3751
  var ProductProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ children, dehydratedProduct, publishChrome = true }) => {
3752
3752
  const t = _nextintl.useTranslations.call(void 0, );
3753
- const generateUrl = _chunkUGNLKDI6js.usePageUrlGenerator.call(void 0, );
3754
- const { hasRole } = _chunkUGNLKDI6js.useCurrentUserContext.call(void 0, );
3753
+ const generateUrl = _chunkUYOQG5IWjs.usePageUrlGenerator.call(void 0, );
3754
+ const { hasRole } = _chunkUYOQG5IWjs.useCurrentUserContext.call(void 0, );
3755
3755
  const [product, setProduct] = _react.useState.call(void 0,
3756
- dehydratedProduct ? _chunk53B6NPGAjs.rehydrate.call(void 0, _chunk53B6NPGAjs.Modules.StripeProduct, dehydratedProduct) : void 0
3756
+ dehydratedProduct ? _chunkYUXCJ35Vjs.rehydrate.call(void 0, _chunkYUXCJ35Vjs.Modules.StripeProduct, dehydratedProduct) : void 0
3757
3757
  );
3758
3758
  const [catalogueVersion, setCatalogueVersion] = _react.useState.call(void 0, 0);
3759
3759
  const refreshCatalogue = _react.useCallback.call(void 0, () => setCatalogueVersion((value2) => value2 + 1), []);
3760
3760
  const reloadProduct = _react.useCallback.call(void 0, async () => {
3761
3761
  if (!_optionalChain([product, 'optionalAccess', _151 => _151.id])) return;
3762
- setProduct(await _chunk53B6NPGAjs.StripeProductService.getProduct({ id: product.id }));
3762
+ setProduct(await _chunkYUXCJ35Vjs.StripeProductService.getProduct({ id: product.id }));
3763
3763
  }, [_optionalChain([product, 'optionalAccess', _152 => _152.id])]);
3764
3764
  const createProduct = _react.useCallback.call(void 0,
3765
3765
  async (input) => {
3766
- const saved = await _chunk53B6NPGAjs.StripeProductService.createProduct(input);
3766
+ const saved = await _chunkYUXCJ35Vjs.StripeProductService.createProduct(input);
3767
3767
  refreshCatalogue();
3768
3768
  return saved;
3769
3769
  },
@@ -3771,7 +3771,7 @@ var ProductProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ ch
3771
3771
  );
3772
3772
  const updateProduct = _react.useCallback.call(void 0,
3773
3773
  async (input) => {
3774
- const saved = await _chunk53B6NPGAjs.StripeProductService.updateProduct(input);
3774
+ const saved = await _chunkYUXCJ35Vjs.StripeProductService.updateProduct(input);
3775
3775
  setProduct(saved);
3776
3776
  refreshCatalogue();
3777
3777
  return saved;
@@ -3782,7 +3782,7 @@ var ProductProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ ch
3782
3782
  async (id) => {
3783
3783
  const target = _nullishCoalesce(id, () => ( _optionalChain([product, 'optionalAccess', _153 => _153.id])));
3784
3784
  if (!target) return;
3785
- await _chunk53B6NPGAjs.StripeProductService.archiveProduct({ id: target });
3785
+ await _chunkYUXCJ35Vjs.StripeProductService.archiveProduct({ id: target });
3786
3786
  await reloadProduct();
3787
3787
  refreshCatalogue();
3788
3788
  },
@@ -3792,7 +3792,7 @@ var ProductProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ ch
3792
3792
  async (id) => {
3793
3793
  const target = _nullishCoalesce(id, () => ( _optionalChain([product, 'optionalAccess', _155 => _155.id])));
3794
3794
  if (!target) return;
3795
- await _chunk53B6NPGAjs.StripeProductService.reactivateProduct({ id: target });
3795
+ await _chunkYUXCJ35Vjs.StripeProductService.reactivateProduct({ id: target });
3796
3796
  await reloadProduct();
3797
3797
  refreshCatalogue();
3798
3798
  },
@@ -3827,7 +3827,7 @@ var ProductProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ ch
3827
3827
  {
3828
3828
  name: t("billing.admin.products.title"),
3829
3829
  // Linked only when it is NOT the current page.
3830
- ...product ? { href: generateUrl({ page: _chunk53B6NPGAjs.Modules.StripeProduct }) } : {}
3830
+ ...product ? { href: generateUrl({ page: _chunkYUXCJ35Vjs.Modules.StripeProduct }) } : {}
3831
3831
  }
3832
3832
  ];
3833
3833
  if (product) items.push({ name: product.name });
@@ -3837,7 +3837,7 @@ var ProductProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ ch
3837
3837
  const response = { type: t("billing.admin.products.title") };
3838
3838
  if (!product) return response;
3839
3839
  response.element = product.name;
3840
- if (hasRole(_chunkJKGEJGSDjs.getRoleId.call(void 0, ).Administrator)) {
3840
+ if (hasRole(_chunkH7DOSB7Wjs.getRoleId.call(void 0, ).Administrator)) {
3841
3841
  response.functions = [
3842
3842
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProductArchiver, { product }, "productArchiver"),
3843
3843
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProductEditor, { product, propagateChanges: setProduct }, "productEditor")
@@ -3845,7 +3845,7 @@ var ProductProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ ch
3845
3845
  }
3846
3846
  return response;
3847
3847
  }, "title");
3848
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProductContext.Provider, { value, children }) });
3848
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProductContext.Provider, { value, children }) });
3849
3849
  }, "ProductProvider");
3850
3850
  var useProductContext = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => _nullishCoalesce(_react.useContext.call(void 0, ProductContext), () => ( defaultContextValue2)), "useProductContext");
3851
3851
 
@@ -3854,56 +3854,56 @@ var useProductContext = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ()
3854
3854
 
3855
3855
  function PriceDetails() {
3856
3856
  const t = _nextintl.useTranslations.call(void 0, );
3857
- const generateUrl = _chunkUGNLKDI6js.usePageUrlGenerator.call(void 0, );
3857
+ const generateUrl = _chunkUYOQG5IWjs.usePageUrlGenerator.call(void 0, );
3858
3858
  const { price } = usePriceContext();
3859
3859
  if (!price) return null;
3860
3860
  const isRecurring = price.priceType === "recurring";
3861
3861
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-8", children: [
3862
3862
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
3863
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.SectionHeader, { children: t("billing.admin.prices.title") }),
3863
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.SectionHeader, { children: t("billing.admin.prices.title") }),
3864
3864
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: [
3865
3865
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3866
- _chunkUGNLKDI6js.DetailField,
3866
+ _chunkUYOQG5IWjs.DetailField,
3867
3867
  {
3868
3868
  label: t("billing.admin.prices.fields.product"),
3869
- value: price.product ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Link, { href: generateUrl({ page: _chunk53B6NPGAjs.Modules.StripeProduct, id: price.product.id }), children: price.product.name }) : "\u2014"
3869
+ value: price.product ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Link, { href: generateUrl({ page: _chunkYUXCJ35Vjs.Modules.StripeProduct, id: price.product.id }), children: price.product.name }) : "\u2014"
3870
3870
  }
3871
3871
  ),
3872
3872
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3873
- _chunkUGNLKDI6js.DetailField,
3873
+ _chunkUYOQG5IWjs.DetailField,
3874
3874
  {
3875
3875
  label: t("billing.admin.prices.fields.status"),
3876
3876
  value: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex flex-wrap items-center gap-1", children: [
3877
- price.active ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Badge, { variant: "softGreen", children: t("billing.admin.prices.status.active") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Badge, { variant: "softGray", children: t("billing.admin.prices.status.archived") }),
3878
- price.isTrial && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Badge, { variant: "softBlue", children: t("billing.admin.prices.badge.trial") })
3877
+ price.active ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Badge, { variant: "softGreen", children: t("billing.admin.prices.status.active") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Badge, { variant: "softGray", children: t("billing.admin.prices.status.archived") }),
3878
+ price.isTrial && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Badge, { variant: "softBlue", children: t("billing.admin.prices.badge.trial") })
3879
3879
  ] })
3880
3880
  }
3881
3881
  ),
3882
3882
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3883
- _chunkUGNLKDI6js.DetailField,
3883
+ _chunkUYOQG5IWjs.DetailField,
3884
3884
  {
3885
3885
  label: t("billing.admin.prices.fields.amount"),
3886
- value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: _chunkUGNLKDI6js.formatCurrency.call(void 0, price.unitAmount, price.currency) })
3886
+ value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: _chunkUYOQG5IWjs.formatCurrency.call(void 0, price.unitAmount, price.currency) })
3887
3887
  }
3888
3888
  ),
3889
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.DetailField, { label: t("billing.admin.prices.fields.currency"), value: price.currency.toUpperCase() }),
3889
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.DetailField, { label: t("billing.admin.prices.fields.currency"), value: price.currency.toUpperCase() }),
3890
3890
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3891
- _chunkUGNLKDI6js.DetailField,
3891
+ _chunkUYOQG5IWjs.DetailField,
3892
3892
  {
3893
3893
  label: t("billing.admin.prices.fields.type"),
3894
3894
  value: isRecurring ? t("billing.admin.prices.type.recurring") : t("billing.admin.prices.type.oneTime")
3895
3895
  }
3896
3896
  ),
3897
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.DetailField, { label: t("billing.admin.prices.fields.billing"), value: _chunkUGNLKDI6js.formatInterval.call(void 0, price) }),
3897
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.DetailField, { label: t("billing.admin.prices.fields.billing"), value: _chunkUYOQG5IWjs.formatInterval.call(void 0, price) }),
3898
3898
  isRecurring && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3899
- _chunkUGNLKDI6js.DetailField,
3899
+ _chunkUYOQG5IWjs.DetailField,
3900
3900
  {
3901
3901
  label: t("billing.admin.prices.fields.intervalCount"),
3902
3902
  value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: _nullishCoalesce(_optionalChain([price, 'access', _157 => _157.recurring, 'optionalAccess', _158 => _158.intervalCount]), () => ( 1)) })
3903
3903
  }
3904
3904
  ),
3905
3905
  isRecurring && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3906
- _chunkUGNLKDI6js.DetailField,
3906
+ _chunkUYOQG5IWjs.DetailField,
3907
3907
  {
3908
3908
  label: t("billing.admin.prices.fields.usageType"),
3909
3909
  value: _optionalChain([price, 'access', _159 => _159.recurring, 'optionalAccess', _160 => _160.usageType]) === "metered" ? t("billing.admin.prices.usage.metered") : t("billing.admin.prices.usage.licensed")
@@ -3912,24 +3912,24 @@ function PriceDetails() {
3912
3912
  ] })
3913
3913
  ] }),
3914
3914
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
3915
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.SectionHeader, { children: t("billing.admin.prices.fields.platformFeatures") }),
3915
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.SectionHeader, { children: t("billing.admin.prices.fields.platformFeatures") }),
3916
3916
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: [
3917
3917
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3918
- _chunkUGNLKDI6js.DetailField,
3918
+ _chunkUYOQG5IWjs.DetailField,
3919
3919
  {
3920
3920
  label: t("billing.admin.prices.fields.token"),
3921
3921
  value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: _nullishCoalesce(price.token, () => ( "\u2014")) })
3922
3922
  }
3923
3923
  ),
3924
3924
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3925
- _chunkUGNLKDI6js.DetailField,
3925
+ _chunkUYOQG5IWjs.DetailField,
3926
3926
  {
3927
3927
  label: t("billing.admin.prices.fields.stripeId"),
3928
3928
  value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: price.stripePriceId })
3929
3929
  }
3930
3930
  ),
3931
3931
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3932
- _chunkUGNLKDI6js.DetailField,
3932
+ _chunkUYOQG5IWjs.DetailField,
3933
3933
  {
3934
3934
  label: t("billing.admin.prices.fields.description"),
3935
3935
  value: _nullishCoalesce(price.description, () => ( "\u2014")),
@@ -3937,7 +3937,7 @@ function PriceDetails() {
3937
3937
  }
3938
3938
  ),
3939
3939
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3940
- _chunkUGNLKDI6js.DetailField,
3940
+ _chunkUYOQG5IWjs.DetailField,
3941
3941
  {
3942
3942
  label: t("billing.admin.prices.fields.features"),
3943
3943
  className: "md:col-span-2",
@@ -3945,11 +3945,11 @@ function PriceDetails() {
3945
3945
  }
3946
3946
  ),
3947
3947
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3948
- _chunkUGNLKDI6js.DetailField,
3948
+ _chunkUYOQG5IWjs.DetailField,
3949
3949
  {
3950
3950
  label: t("billing.admin.prices.fields.platformFeatures"),
3951
3951
  className: "md:col-span-2",
3952
- 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, _chunkUGNLKDI6js.Badge, { variant: "softGray", children: feature.name }, feature.id)) }) : "\u2014"
3952
+ 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, _chunkUYOQG5IWjs.Badge, { variant: "softGray", children: feature.name }, feature.id)) }) : "\u2014"
3953
3953
  }
3954
3954
  )
3955
3955
  ] })
@@ -3963,7 +3963,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, PriceDetails, "PriceDetails");
3963
3963
  function PriceContainer() {
3964
3964
  const { price } = usePriceContext();
3965
3965
  if (!price) return null;
3966
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.RoundPageContainer, { module: _chunk53B6NPGAjs.Modules.StripePrice, id: price.id, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PriceDetails, {}) });
3966
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.RoundPageContainer, { module: _chunkYUXCJ35Vjs.Modules.StripePrice, id: price.id, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PriceDetails, {}) });
3967
3967
  }
3968
3968
  _chunk7QVYU63Ejs.__name.call(void 0, PriceContainer, "PriceContainer");
3969
3969
 
@@ -3975,17 +3975,17 @@ _chunk7QVYU63Ejs.__name.call(void 0, PriceContainer, "PriceContainer");
3975
3975
  function PricesList({ productId, fullWidth }) {
3976
3976
  const t = _nextintl.useTranslations.call(void 0, );
3977
3977
  const { priceVersion } = usePriceContext();
3978
- const data = _chunkUGNLKDI6js.useDataListRetriever.call(void 0, {
3979
- retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunk53B6NPGAjs.StripePriceService.listPrices({ ...params, productId }), "retriever"),
3978
+ const data = _chunkUYOQG5IWjs.useDataListRetriever.call(void 0, {
3979
+ retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkYUXCJ35Vjs.StripePriceService.listPrices({ ...params, productId }), "retriever"),
3980
3980
  retrieverParams: {},
3981
- module: _chunk53B6NPGAjs.Modules.StripePrice
3981
+ module: _chunkYUXCJ35Vjs.Modules.StripePrice
3982
3982
  });
3983
3983
  _react.useEffect.call(void 0, () => {
3984
3984
  if (priceVersion > 0) void data.refresh();
3985
3985
  }, [priceVersion]);
3986
3986
  const functions = [/* @__PURE__ */ _jsxruntime.jsx.call(void 0, PriceEditor, { productId }, "create-price")];
3987
3987
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3988
- _chunkUGNLKDI6js.ContentListTable,
3988
+ _chunkUYOQG5IWjs.ContentListTable,
3989
3989
  {
3990
3990
  data,
3991
3991
  fields: [
@@ -3995,12 +3995,12 @@ function PricesList({ productId, fullWidth }) {
3995
3995
  "token" /* token */,
3996
3996
  "status" /* status */
3997
3997
  ],
3998
- tableGeneratorType: _chunk53B6NPGAjs.Modules.StripePrice,
3998
+ tableGeneratorType: _chunkYUXCJ35Vjs.Modules.StripePrice,
3999
3999
  functions,
4000
4000
  fullWidth,
4001
4001
  title: t("billing.admin.prices.title"),
4002
4002
  emptyState: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4003
- _chunkUGNLKDI6js.EmptyState,
4003
+ _chunkUYOQG5IWjs.EmptyState,
4004
4004
  {
4005
4005
  icon: _lucidereact.DollarSignIcon,
4006
4006
  title: t("billing.admin.prices.empty.title"),
@@ -4023,18 +4023,18 @@ function ProductDetails() {
4023
4023
  const { product } = useProductContext();
4024
4024
  if (!product) return null;
4025
4025
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
4026
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.SectionHeader, { children: t("billing.admin.products.tabs.details") }),
4026
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.SectionHeader, { children: t("billing.admin.products.tabs.details") }),
4027
4027
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: [
4028
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.DetailField, { label: t("billing.admin.products.fields.name"), value: product.name }),
4028
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.DetailField, { label: t("billing.admin.products.fields.name"), value: product.name }),
4029
4029
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4030
- _chunkUGNLKDI6js.DetailField,
4030
+ _chunkUYOQG5IWjs.DetailField,
4031
4031
  {
4032
4032
  label: t("billing.admin.products.fields.status"),
4033
- value: product.active ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Badge, { variant: "softGreen", children: t("billing.admin.products.status.active") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Badge, { variant: "softGray", children: t("billing.admin.products.status.archived") })
4033
+ value: product.active ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Badge, { variant: "softGreen", children: t("billing.admin.products.status.active") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Badge, { variant: "softGray", children: t("billing.admin.products.status.archived") })
4034
4034
  }
4035
4035
  ),
4036
4036
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4037
- _chunkUGNLKDI6js.DetailField,
4037
+ _chunkUYOQG5IWjs.DetailField,
4038
4038
  {
4039
4039
  label: t("billing.admin.products.fields.description"),
4040
4040
  value: _nullishCoalesce(product.description, () => ( "\u2014")),
@@ -4042,14 +4042,14 @@ function ProductDetails() {
4042
4042
  }
4043
4043
  ),
4044
4044
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4045
- _chunkUGNLKDI6js.DetailField,
4045
+ _chunkUYOQG5IWjs.DetailField,
4046
4046
  {
4047
4047
  label: t("billing.admin.products.fields.prices"),
4048
4048
  value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: product.stripePrices.length })
4049
4049
  }
4050
4050
  ),
4051
4051
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4052
- _chunkUGNLKDI6js.DetailField,
4052
+ _chunkUYOQG5IWjs.DetailField,
4053
4053
  {
4054
4054
  label: t("billing.admin.products.fields.stripeId"),
4055
4055
  value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: product.stripeProductId })
@@ -4067,9 +4067,9 @@ function ProductContainer() {
4067
4067
  const { product } = useProductContext();
4068
4068
  if (!product) return null;
4069
4069
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4070
- _chunkUGNLKDI6js.RoundPageContainer,
4070
+ _chunkUYOQG5IWjs.RoundPageContainer,
4071
4071
  {
4072
- module: _chunk53B6NPGAjs.Modules.StripeProduct,
4072
+ module: _chunkYUXCJ35Vjs.Modules.StripeProduct,
4073
4073
  id: product.id,
4074
4074
  tabs: [
4075
4075
  {
@@ -4078,7 +4078,7 @@ function ProductContainer() {
4078
4078
  content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProductDetails, {})
4079
4079
  },
4080
4080
  {
4081
- key: _chunk53B6NPGAjs.Modules.StripePrice,
4081
+ key: _chunkYUXCJ35Vjs.Modules.StripePrice,
4082
4082
  label: t("billing.admin.prices.title"),
4083
4083
  // publishChrome={false}: SharedProvider REPLACES its value for the
4084
4084
  // subtree (SharedContext.tsx:35-37), so a nested provider publishing
@@ -4102,26 +4102,26 @@ _chunk7QVYU63Ejs.__name.call(void 0, ProductContainer, "ProductContainer");
4102
4102
  function ProductsList({ fullWidth } = {}) {
4103
4103
  const t = _nextintl.useTranslations.call(void 0, );
4104
4104
  const { catalogueVersion } = useProductContext();
4105
- const data = _chunkUGNLKDI6js.useDataListRetriever.call(void 0, {
4106
- retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunk53B6NPGAjs.StripeProductService.listProducts(params), "retriever"),
4105
+ const data = _chunkUYOQG5IWjs.useDataListRetriever.call(void 0, {
4106
+ retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkYUXCJ35Vjs.StripeProductService.listProducts(params), "retriever"),
4107
4107
  retrieverParams: {},
4108
- module: _chunk53B6NPGAjs.Modules.StripeProduct
4108
+ module: _chunkYUXCJ35Vjs.Modules.StripeProduct
4109
4109
  });
4110
4110
  _react.useEffect.call(void 0, () => {
4111
4111
  if (catalogueVersion > 0) void data.refresh();
4112
4112
  }, [catalogueVersion]);
4113
4113
  const functions = [/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProductEditor, {}, "create-product")];
4114
4114
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4115
- _chunkUGNLKDI6js.ContentListTable,
4115
+ _chunkUYOQG5IWjs.ContentListTable,
4116
4116
  {
4117
4117
  data,
4118
4118
  fields: ["name" /* name */, "status" /* status */, "prices" /* prices */],
4119
- tableGeneratorType: _chunk53B6NPGAjs.Modules.StripeProduct,
4119
+ tableGeneratorType: _chunkYUXCJ35Vjs.Modules.StripeProduct,
4120
4120
  functions,
4121
4121
  fullWidth,
4122
4122
  title: t("billing.admin.products.title"),
4123
4123
  emptyState: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4124
- _chunkUGNLKDI6js.EmptyState,
4124
+ _chunkUYOQG5IWjs.EmptyState,
4125
4125
  {
4126
4126
  icon: _lucidereact.PackageIcon,
4127
4127
  title: t("billing.admin.products.empty.title"),
@@ -4136,7 +4136,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, ProductsList, "ProductsList");
4136
4136
  // src/features/billing/stripe-product/components/containers/ProductsListContainer.tsx
4137
4137
 
4138
4138
  function ProductsListContainer() {
4139
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProductProvider, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.RoundPageContainer, { module: _chunk53B6NPGAjs.Modules.StripeProduct, fullWidth: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProductsList, { fullWidth: true }) }) });
4139
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProductProvider, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.RoundPageContainer, { module: _chunkYUXCJ35Vjs.Modules.StripeProduct, fullWidth: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProductsList, { fullWidth: true }) }) });
4140
4140
  }
4141
4141
  _chunk7QVYU63Ejs.__name.call(void 0, ProductsListContainer, "ProductsListContainer");
4142
4142
 
@@ -4194,5 +4194,5 @@ _chunk7QVYU63Ejs.__name.call(void 0, ProductsListContainer, "ProductsListContain
4194
4194
 
4195
4195
 
4196
4196
 
4197
- 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.SubscriptionsContainer = SubscriptionsContainer; exports.SubscriptionsList = SubscriptionsList; exports.UsageContainer = UsageContainer; exports.UsageHistoryTable = UsageHistoryTable; exports.UsageSummaryCard = UsageSummaryCard; exports.UsageSummaryCards = UsageSummaryCards; exports.formatCurrency = _chunkUGNLKDI6js.formatCurrency; exports.formatDate = formatDate3; exports.formatInterval = _chunkUGNLKDI6js.formatInterval; exports.isStripeConfigured = isStripeConfigured; exports.priceLabel = priceLabel; exports.usePriceContext = usePriceContext; exports.useProductContext = useProductContext;
4197
+ 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.SubscriptionsContainer = SubscriptionsContainer; exports.SubscriptionsList = SubscriptionsList; exports.UsageContainer = UsageContainer; exports.UsageHistoryTable = UsageHistoryTable; exports.UsageSummaryCard = UsageSummaryCard; exports.UsageSummaryCards = UsageSummaryCards; exports.formatCurrency = _chunkUYOQG5IWjs.formatCurrency; exports.formatDate = formatDate3; exports.formatInterval = _chunkUYOQG5IWjs.formatInterval; exports.isStripeConfigured = isStripeConfigured; exports.priceLabel = priceLabel; exports.usePriceContext = usePriceContext; exports.useProductContext = useProductContext;
4198
4198
  //# sourceMappingURL=index.js.map