@burdenoff/microfe-billing 2026.1113.2 → 2026.1113.3

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 (105) hide show
  1. package/dist/billing/BillingRoot.js +83 -77
  2. package/dist/billing/BillingRoot.js.map +1 -1
  3. package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js +78 -78
  4. package/dist/billing/modules/addons/pages/AddonCreatePage.js +70 -70
  5. package/dist/billing/modules/addons/pages/AddonDetailPage.js +72 -72
  6. package/dist/billing/modules/addons/pages/AddonEditPage.js +79 -79
  7. package/dist/billing/modules/addons/pages/AddonsBrowsePage.js +224 -224
  8. package/dist/billing/modules/addons/pages/AddonsListPage.js +186 -186
  9. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js +168 -168
  10. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js.map +1 -1
  11. package/dist/billing/modules/analytics/pages/AnalyticsPage.js +88 -88
  12. package/dist/billing/modules/billing/hooks/index.js +5 -5
  13. package/dist/billing/modules/billing/hooks/useInvoices.js +39 -20
  14. package/dist/billing/modules/billing/hooks/useInvoices.js.map +1 -1
  15. package/dist/billing/modules/billing/index.js +14 -14
  16. package/dist/billing/modules/billing/pages/BillingWebhookLogsPage.js +92 -92
  17. package/dist/billing/modules/billing/pages/InvoiceDetailPage.js +160 -160
  18. package/dist/billing/modules/billing/pages/InvoiceDetailPage.js.map +1 -1
  19. package/dist/billing/modules/billing/pages/InvoicesListPage.js +100 -100
  20. package/dist/billing/modules/billing/pages/OrderCallbackLogsPage.js +105 -105
  21. package/dist/billing/modules/billing/pages/PaymentMethodsPage.js +37 -37
  22. package/dist/billing/modules/billing/pages/RefundIssueLogsPage.js +41 -41
  23. package/dist/billing/modules/billing/pages/RefundsPage.js +334 -334
  24. package/dist/billing/modules/billing/pages/RefundsPage.js.map +1 -1
  25. package/dist/billing/modules/billing/pages/TransactionsPage.js +174 -174
  26. package/dist/billing/modules/billing/pages/TransactionsPage.js.map +1 -1
  27. package/dist/billing/modules/billing/pages/UserRefundsPage.js +24 -24
  28. package/dist/billing/modules/billing/pages/UserRefundsPage.js.map +1 -1
  29. package/dist/billing/modules/checkout/components/OrderSummary.js +71 -71
  30. package/dist/billing/modules/checkout/pages/CheckoutPage.js +646 -625
  31. package/dist/billing/modules/checkout/pages/CheckoutPage.js.map +1 -1
  32. package/dist/billing/modules/checkout/utils/checkoutOptions.d.ts +23 -0
  33. package/dist/billing/modules/checkout/utils/checkoutOptions.js +8 -0
  34. package/dist/billing/modules/checkout/utils/checkoutOptions.js.map +1 -0
  35. package/dist/billing/modules/coupons/pages/CouponDetailPage.js +112 -112
  36. package/dist/billing/modules/coupons/pages/CouponsListPage.js +118 -118
  37. package/dist/billing/modules/coupons/pages/CouponsListPage.js.map +1 -1
  38. package/dist/billing/modules/coupons/pages/CreateCouponPage.js +119 -119
  39. package/dist/billing/modules/coupons/pages/EditCouponPage.js +82 -82
  40. package/dist/billing/modules/credits/pages/AdminCreditsPage.js +30 -30
  41. package/dist/billing/modules/credits/pages/CreditTransactionsPage.js +77 -77
  42. package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js +144 -144
  43. package/dist/billing/modules/credits/pages/CreditsPage.js +67 -67
  44. package/dist/billing/modules/dashboard/pages/OverviewPage.js +594 -442
  45. package/dist/billing/modules/dashboard/pages/OverviewPage.js.map +1 -1
  46. package/dist/billing/modules/dashboard/utils/overviewSummary.d.ts +46 -0
  47. package/dist/billing/modules/dashboard/utils/overviewSummary.js +37 -0
  48. package/dist/billing/modules/dashboard/utils/overviewSummary.js.map +1 -0
  49. package/dist/billing/modules/discounts/pages/DiscountsListPage.js +199 -199
  50. package/dist/billing/modules/discounts/pages/DiscountsListPage.js.map +1 -1
  51. package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.js +64 -64
  52. package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.js +122 -122
  53. package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.js.map +1 -1
  54. package/dist/billing/modules/earnings/pages/EarningsPage.js +102 -102
  55. package/dist/billing/modules/earnings/pages/EarningsPage.js.map +1 -1
  56. package/dist/billing/modules/earnings/pages/PayoutAdminPage.js +178 -178
  57. package/dist/billing/modules/earnings/pages/PayoutAdminPage.js.map +1 -1
  58. package/dist/billing/modules/earnings/pages/PayoutsPage.js +107 -107
  59. package/dist/billing/modules/earnings/pages/PayoutsPage.js.map +1 -1
  60. package/dist/billing/modules/plans/pages/PlanAssignFreePage.js +54 -54
  61. package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js +94 -94
  62. package/dist/billing/modules/plans/pages/PlanCreatePage.js +73 -73
  63. package/dist/billing/modules/plans/pages/PlanDetailPage.js +96 -96
  64. package/dist/billing/modules/plans/pages/PlanEditPage.js +16 -16
  65. package/dist/billing/modules/plans/pages/PlanEditPage.js.map +1 -1
  66. package/dist/billing/modules/plans/pages/PlansBrowsePage.js +100 -100
  67. package/dist/billing/modules/plans/pages/PlansListPage.js +88 -88
  68. package/dist/billing/modules/promotions/pages/CreatePromotionPage.js +60 -60
  69. package/dist/billing/modules/promotions/pages/PromotionsListPage.js +37 -37
  70. package/dist/billing/modules/quota/pages/QuotaAssignFreePage.js +62 -62
  71. package/dist/billing/modules/quota/pages/QuotaPage.js +1 -1
  72. package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js +69 -69
  73. package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js +76 -76
  74. package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js +80 -80
  75. package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js +95 -95
  76. package/dist/billing/modules/settings/pages/SettingsPage.js +134 -134
  77. package/dist/billing/modules/settings/pages/SettingsPage.js.map +1 -1
  78. package/dist/billing/modules/settings/pages/TeamPermissionsPage.js +62 -62
  79. package/dist/billing/modules/settings/pages/TeamPermissionsPage.js.map +1 -1
  80. package/dist/billing/modules/subscriptions/components/ManageSeatsModal.js +36 -36
  81. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js +534 -410
  82. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js.map +1 -1
  83. package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js +111 -111
  84. package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js +166 -160
  85. package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js.map +1 -1
  86. package/dist/billing/modules/subscriptions/utils/subscriptionDetailView.d.ts +30 -0
  87. package/dist/billing/modules/subscriptions/utils/subscriptionDetailView.js +20 -0
  88. package/dist/billing/modules/subscriptions/utils/subscriptionDetailView.js.map +1 -0
  89. package/dist/billing/modules/subscriptions/utils/upgradeAccess.d.ts +10 -0
  90. package/dist/billing/modules/subscriptions/utils/upgradeAccess.js +7 -0
  91. package/dist/billing/modules/subscriptions/utils/upgradeAccess.js.map +1 -0
  92. package/dist/billing/modules/usage/pages/UsagePage.js +722 -591
  93. package/dist/billing/modules/usage/pages/UsagePage.js.map +1 -1
  94. package/dist/billing/modules/usage/utils/usageHealth.d.ts +63 -0
  95. package/dist/billing/modules/usage/utils/usageHealth.js +43 -0
  96. package/dist/billing/modules/usage/utils/usageHealth.js.map +1 -0
  97. package/dist/billing/shared/components/EmptyState.js +3 -3
  98. package/dist/billing/shared/components/MoneyActionDialog.js +12 -12
  99. package/dist/billing/shared/ui/MetricCard.js +13 -13
  100. package/dist/billing/shared/utils/format.js +16 -4
  101. package/dist/billing/shared/utils/format.js.map +1 -1
  102. package/dist/billing/shared/utils/index.js +8 -8
  103. package/dist/generated/global-operations.js +294 -286
  104. package/dist/generated/global-operations.js.map +1 -1
  105. package/package.json +2 -2
@@ -8,10 +8,10 @@ import { useAddonPurchaseEligibility as a } from "../hooks/useAddonPurchaseEligi
8
8
  import { formatCurrency as o, formatPlanDuration as s, formatPlanDurationLabel as c } from "../../../shared/utils/format.js";
9
9
  import { getPlanFeatureQuantity as l } from "../../../shared/utils/planFeatureQuantity.js";
10
10
  import { useMemo as u, useState as d } from "react";
11
- import { Lock as f, Minus as p, Package as m, Plus as h, ShoppingCart as g, Trash2 as _, X as v } from "lucide-react";
12
- import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
13
- import { useI18n as S } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
14
- import { IllustratedEmptyState as C, PagePurpose as w } from "@burdenoff/fe-libs/ui";
11
+ import { IllustratedEmptyState as f, PagePurpose as p } from "@burdenoff/fe-libs/ui";
12
+ import { Lock as m, Minus as h, Package as g, Plus as _, ShoppingCart as v, Trash2 as y, X as b } from "lucide-react";
13
+ import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
14
+ import { useI18n as w } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
15
15
  import { createPortal as T } from "react-dom";
16
16
  import { ASSISTANT_BOTTOM_CHROME_CLEARANCE as E } from "@burdenoff/fe-libs/shared/assistant";
17
17
  // src/billing/modules/addons/pages/AddonsBrowsePage.tsx
@@ -59,142 +59,142 @@ function k(e, t = "USD") {
59
59
  };
60
60
  }
61
61
  var A = () => {
62
- let { t: o } = S(), s = (e, t) => {
62
+ let { t: o } = w(), s = (e, t) => {
63
63
  let n = o(e);
64
64
  return n === e ? t : n;
65
- }, c = t(), { productId: l } = n(), { addons: p, isLoading: m, error: h, refetch: g } = i({
65
+ }, c = t(), { productId: l } = n(), { addons: h, isLoading: g, error: _, refetch: v } = i({
66
66
  includeFree: !1,
67
67
  productId: l ?? void 0
68
- }), { addToCart: _, removeFromCart: v, updateQuantity: y, isInCart: T, getCartItem: E } = r(), [O, k] = d("grid"), [A, F] = d("all"), I = e(), L = p.filter((e) => !(!e.isActive || A !== "all" && e.duration !== A)), R = u(() => D(L), [L]), z = u(() => L.map((e) => e.id), [L]), { blocked: B, isBlocked: V } = a(z), H = s("billing.addons.paidPlanRequiredShort", "Add-ons need a paid plan. Upgrade first.");
69
- return m && p.length === 0 ? /* @__PURE__ */ x("div", {
68
+ }), { addToCart: y, removeFromCart: b, updateQuantity: x, isInCart: T, getCartItem: E } = r(), [O, k] = d("grid"), [A, F] = d("all"), I = e(), L = h.filter((e) => !(!e.isActive || A !== "all" && e.duration !== A)), R = u(() => D(L), [L]), z = u(() => L.map((e) => e.id), [L]), { blocked: B, isBlocked: V } = a(z), H = s("billing.addons.paidPlanRequiredShort", "Add-ons need a paid plan. Upgrade first.");
69
+ return g && h.length === 0 ? /* @__PURE__ */ C("div", {
70
70
  className: "space-y-6 p-6",
71
- children: [/* @__PURE__ */ b("div", { className: "h-8 w-48 bg-bg-sunken animate-pulse rounded" }), /* @__PURE__ */ b("div", {
71
+ children: [/* @__PURE__ */ S("div", { className: "h-8 w-48 bg-bg-sunken animate-pulse rounded" }), /* @__PURE__ */ S("div", {
72
72
  className: "grid grid-cols-1 md:grid-cols-3 gap-6",
73
73
  children: [
74
74
  1,
75
75
  2,
76
76
  3
77
- ].map((e) => /* @__PURE__ */ x("div", {
77
+ ].map((e) => /* @__PURE__ */ C("div", {
78
78
  className: "border border-border-subtle rounded-lg p-6 space-y-4",
79
79
  children: [
80
- /* @__PURE__ */ b("div", { className: "h-6 w-24 bg-bg-sunken animate-pulse rounded" }),
81
- /* @__PURE__ */ b("div", { className: "h-8 w-32 bg-bg-sunken animate-pulse rounded" }),
82
- /* @__PURE__ */ b("div", {
80
+ /* @__PURE__ */ S("div", { className: "h-6 w-24 bg-bg-sunken animate-pulse rounded" }),
81
+ /* @__PURE__ */ S("div", { className: "h-8 w-32 bg-bg-sunken animate-pulse rounded" }),
82
+ /* @__PURE__ */ S("div", {
83
83
  className: "space-y-2",
84
84
  children: [
85
85
  1,
86
86
  2,
87
87
  3
88
- ].map((e) => /* @__PURE__ */ b("div", { className: "h-4 w-full bg-bg-sunken animate-pulse rounded" }, e))
88
+ ].map((e) => /* @__PURE__ */ S("div", { className: "h-4 w-full bg-bg-sunken animate-pulse rounded" }, e))
89
89
  })
90
90
  ]
91
91
  }, e))
92
92
  })]
93
- }) : h ? /* @__PURE__ */ b("div", {
93
+ }) : _ ? /* @__PURE__ */ S("div", {
94
94
  className: "flex items-center justify-center h-full min-h-[400px]",
95
- children: /* @__PURE__ */ x("div", {
95
+ children: /* @__PURE__ */ C("div", {
96
96
  className: "text-center space-y-4",
97
97
  children: [
98
- /* @__PURE__ */ b("h2", {
98
+ /* @__PURE__ */ S("h2", {
99
99
  className: "text-lg font-semibold text-text-primary",
100
100
  children: s("billing.addons.failedToLoad", "Failed to load addons")
101
101
  }),
102
- /* @__PURE__ */ b("p", {
102
+ /* @__PURE__ */ S("p", {
103
103
  className: "text-sm text-text-secondary",
104
- children: h.message
104
+ children: _.message
105
105
  }),
106
- /* @__PURE__ */ b("button", {
106
+ /* @__PURE__ */ S("button", {
107
107
  type: "button",
108
- onClick: () => g(),
108
+ onClick: () => v(),
109
109
  className: "px-4 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg/90 transition-colors",
110
110
  children: "Try Again"
111
111
  })
112
112
  ]
113
113
  })
114
- }) : /* @__PURE__ */ x("div", {
114
+ }) : /* @__PURE__ */ C("div", {
115
115
  className: "space-y-6 p-6",
116
116
  children: [
117
- /* @__PURE__ */ x("div", { children: [
118
- /* @__PURE__ */ b("h1", {
117
+ /* @__PURE__ */ C("div", { children: [
118
+ /* @__PURE__ */ S("h1", {
119
119
  className: "text-2xl font-bold text-text-primary",
120
120
  children: s("billing.addons.title", "Addons")
121
121
  }),
122
- /* @__PURE__ */ b("p", {
122
+ /* @__PURE__ */ S("p", {
123
123
  className: "text-sm text-text-secondary mt-1",
124
124
  children: s("billing.addons.subtitle", "Enhance your subscription with additional features")
125
125
  }),
126
- /* @__PURE__ */ b(w, {
126
+ /* @__PURE__ */ S(p, {
127
127
  className: "mt-3",
128
128
  children: s("billing.addons.browsePurpose", "Add extra capacity or capabilities on top of your current plan — like more seats, storage or usage credits — without upgrading your whole subscription. Add the add-ons you want to your cart and check out when ready.")
129
129
  })
130
130
  ] }),
131
- B.size > 0 && /* @__PURE__ */ x("div", {
131
+ B.size > 0 && /* @__PURE__ */ C("div", {
132
132
  role: "status",
133
133
  "data-testid": "addons-paid-plan-required",
134
134
  className: "flex flex-col gap-3 rounded-lg border border-status-warning-border bg-status-warning-bg-subtle p-4 sm:flex-row sm:items-center sm:justify-between",
135
- children: [/* @__PURE__ */ x("div", {
135
+ children: [/* @__PURE__ */ C("div", {
136
136
  className: "flex items-start gap-3",
137
- children: [/* @__PURE__ */ b(f, {
137
+ children: [/* @__PURE__ */ S(m, {
138
138
  className: "mt-0.5 size-4 shrink-0 text-status-warning-text",
139
139
  "aria-hidden": "true"
140
- }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
140
+ }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
141
141
  className: "text-sm font-medium text-text-primary",
142
142
  children: s("billing.addons.paidPlanRequiredTitle", "Add-ons need a paid plan")
143
- }), /* @__PURE__ */ b("p", {
143
+ }), /* @__PURE__ */ S("p", {
144
144
  className: "mt-1 text-sm text-text-secondary",
145
145
  children: s("billing.addons.paidPlanRequiredBody", "Add-ons extend a paid subscription. You are on the Free plan for this product, so upgrade to a paid plan first, then come back to add extra capacity.")
146
146
  })] })]
147
- }), /* @__PURE__ */ b("button", {
147
+ }), /* @__PURE__ */ S("button", {
148
148
  type: "button",
149
149
  onClick: () => c("/plans"),
150
150
  className: "shrink-0 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg/90",
151
151
  children: s("billing.addons.viewPlans", "View plans")
152
152
  })]
153
153
  }),
154
- /* @__PURE__ */ x("div", {
154
+ /* @__PURE__ */ C("div", {
155
155
  className: "flex flex-wrap items-center gap-4 pb-4 border-b border-border-subtle",
156
- children: [/* @__PURE__ */ b("div", {
156
+ children: [/* @__PURE__ */ S("div", {
157
157
  className: "inline-flex rounded-lg border border-border-subtle p-1 bg-bg-sunken/50",
158
158
  children: [
159
159
  "all",
160
160
  "monthly",
161
161
  "yearly"
162
- ].map((e) => /* @__PURE__ */ b("button", {
162
+ ].map((e) => /* @__PURE__ */ S("button", {
163
163
  type: "button",
164
164
  onClick: () => F(e),
165
165
  className: `px-3 py-1.5 text-sm font-medium rounded-md transition-colors ${A === e ? "bg-bg-surface text-text-primary shadow-sm" : "text-text-secondary hover:text-text-primary"}`,
166
166
  children: e === "all" ? "All" : e === "monthly" ? "Monthly" : "Yearly"
167
167
  }, e))
168
- }), /* @__PURE__ */ x("div", {
168
+ }), /* @__PURE__ */ C("div", {
169
169
  className: "ml-auto inline-flex rounded-lg border border-border-subtle p-1 bg-bg-sunken/50",
170
- children: [/* @__PURE__ */ b("button", {
170
+ children: [/* @__PURE__ */ S("button", {
171
171
  type: "button",
172
172
  onClick: () => k("grid"),
173
173
  className: `p-1.5 rounded-md transition-colors ${O === "grid" ? "bg-bg-surface text-text-primary shadow-sm" : "text-text-secondary hover:text-text-primary"}`,
174
174
  title: "Grid view",
175
- children: /* @__PURE__ */ b("svg", {
175
+ children: /* @__PURE__ */ S("svg", {
176
176
  className: "size-4",
177
177
  fill: "none",
178
178
  viewBox: "0 0 24 24",
179
179
  stroke: "currentColor",
180
- children: /* @__PURE__ */ b("path", {
180
+ children: /* @__PURE__ */ S("path", {
181
181
  strokeLinecap: "round",
182
182
  strokeLinejoin: "round",
183
183
  strokeWidth: 2,
184
184
  d: "M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z"
185
185
  })
186
186
  })
187
- }), /* @__PURE__ */ b("button", {
187
+ }), /* @__PURE__ */ S("button", {
188
188
  type: "button",
189
189
  onClick: () => k("list"),
190
190
  className: `p-1.5 rounded-md transition-colors ${O === "list" ? "bg-bg-surface text-text-primary shadow-sm" : "text-text-secondary hover:text-text-primary"}`,
191
191
  title: "List view",
192
- children: /* @__PURE__ */ b("svg", {
192
+ children: /* @__PURE__ */ S("svg", {
193
193
  className: "size-4",
194
194
  fill: "none",
195
195
  viewBox: "0 0 24 24",
196
196
  stroke: "currentColor",
197
- children: /* @__PURE__ */ b("path", {
197
+ children: /* @__PURE__ */ S("path", {
198
198
  strokeLinecap: "round",
199
199
  strokeLinejoin: "round",
200
200
  strokeWidth: 2,
@@ -204,60 +204,60 @@ var A = () => {
204
204
  })]
205
205
  })]
206
206
  }),
207
- L.length === 0 ? /* @__PURE__ */ b(C, {
207
+ L.length === 0 ? /* @__PURE__ */ S(f, {
208
208
  illustration: "empty-data",
209
209
  title: s("billing.addons.noAddonsAvailable", "No addons available"),
210
210
  description: s("billing.addons.checkBackLater", "Check back later for new addons.")
211
- }) : /* @__PURE__ */ b("div", {
211
+ }) : /* @__PURE__ */ S("div", {
212
212
  className: "space-y-8",
213
213
  children: R.map((e) => {
214
- if (e.type === "group") return /* @__PURE__ */ b(j, {
214
+ if (e.type === "group") return /* @__PURE__ */ S(j, {
215
215
  groupName: e.name,
216
216
  addons: e.addons,
217
217
  viewMode: O,
218
218
  getCartItem: E,
219
219
  isInCart: T,
220
- addToCart: _,
221
- updateQuantity: y,
222
- removeFromCart: v,
220
+ addToCart: y,
221
+ updateQuantity: x,
222
+ removeFromCart: b,
223
223
  displayCurrency: I,
224
224
  navigateTo: c,
225
225
  isBlocked: V,
226
226
  blockedLabel: H
227
227
  }, e.name);
228
228
  let t = e.addon, n = E(t.id);
229
- return b(O === "grid" ? M : N, {
229
+ return S(O === "grid" ? M : N, {
230
230
  addon: t,
231
231
  onView: () => c(`/addons/${t.id}`),
232
232
  isInCart: T(t.id),
233
233
  cartQuantity: n?.quantity || 0,
234
- onAddToCart: _,
235
- onUpdateQuantity: y,
236
- onRemoveFromCart: v,
234
+ onAddToCart: y,
235
+ onUpdateQuantity: x,
236
+ onRemoveFromCart: b,
237
237
  displayCurrency: I,
238
238
  purchaseBlocked: V(t.id),
239
239
  blockedLabel: H
240
240
  }, t.id);
241
241
  })
242
242
  }),
243
- /* @__PURE__ */ b(P, { displayCurrency: I })
243
+ /* @__PURE__ */ S(P, { displayCurrency: I })
244
244
  ]
245
245
  });
246
- }, j = ({ groupName: e, addons: t, viewMode: n, getCartItem: r, isInCart: i, addToCart: a, updateQuantity: l, removeFromCart: u, displayCurrency: d, navigateTo: f, isBlocked: v, blockedLabel: y }) => {
247
- let S = t.filter((e) => i(e.id)).length;
248
- return /* @__PURE__ */ x("div", {
246
+ }, j = ({ groupName: e, addons: t, viewMode: n, getCartItem: r, isInCart: i, addToCart: a, updateQuantity: l, removeFromCart: u, displayCurrency: d, navigateTo: f, isBlocked: p, blockedLabel: m }) => {
247
+ let b = t.filter((e) => i(e.id)).length;
248
+ return /* @__PURE__ */ C("div", {
249
249
  className: "border border-border-subtle rounded-xl overflow-hidden",
250
- children: [/* @__PURE__ */ x("div", {
250
+ children: [/* @__PURE__ */ C("div", {
251
251
  className: "flex items-center justify-between px-5 py-3 bg-bg-sunken/40 border-b border-border-subtle",
252
- children: [/* @__PURE__ */ x("div", {
252
+ children: [/* @__PURE__ */ C("div", {
253
253
  className: "flex items-center gap-2",
254
254
  children: [
255
- /* @__PURE__ */ b(m, { className: "size-4 text-text-secondary" }),
256
- /* @__PURE__ */ b("h2", {
255
+ /* @__PURE__ */ S(g, { className: "size-4 text-text-secondary" }),
256
+ /* @__PURE__ */ S("h2", {
257
257
  className: "font-semibold text-text-primary",
258
258
  children: e
259
259
  }),
260
- /* @__PURE__ */ x("span", {
260
+ /* @__PURE__ */ C("span", {
261
261
  className: "text-xs text-text-secondary",
262
262
  children: [
263
263
  t.length,
@@ -266,14 +266,14 @@ var A = () => {
266
266
  ]
267
267
  })
268
268
  ]
269
- }), S > 0 && /* @__PURE__ */ x("span", {
269
+ }), b > 0 && /* @__PURE__ */ C("span", {
270
270
  className: "text-xs font-medium px-2 py-0.5 bg-action-primary-bg text-action-primary-text rounded-full",
271
- children: [S, " in cart"]
271
+ children: [b, " in cart"]
272
272
  })]
273
- }), n === "grid" ? /* @__PURE__ */ b("div", {
273
+ }), n === "grid" ? /* @__PURE__ */ S("div", {
274
274
  className: "p-4 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",
275
275
  children: t.map((e) => {
276
- let t = r(e.id), n = e.name.includes(" — ") ? e.name.slice(e.name.indexOf(" — ") + 3).trim() : e.name, m = i(e.id), S = t?.quantity ?? 0, { price: C, currency: w } = (() => {
276
+ let t = r(e.id), n = e.name.includes(" — ") ? e.name.slice(e.name.indexOf(" — ") + 3).trim() : e.name, g = i(e.id), b = t?.quantity ?? 0, { price: x, currency: w } = (() => {
277
277
  if (e.currencyPrices && typeof e.currencyPrices == "object") {
278
278
  let t = e.currencyPrices;
279
279
  if (t[d] != null) return {
@@ -286,64 +286,64 @@ var A = () => {
286
286
  currency: e.currency || "USD"
287
287
  };
288
288
  })();
289
- return /* @__PURE__ */ x("div", {
290
- className: `relative flex flex-col rounded-lg border p-4 transition-all ${m ? "border-primary bg-action-primary-bg/5" : "border-border-subtle bg-bg-surface hover:border-primary/40 hover:shadow-sm"}`,
289
+ return /* @__PURE__ */ C("div", {
290
+ className: `relative flex flex-col rounded-lg border p-4 transition-all ${g ? "border-primary bg-action-primary-bg/5" : "border-border-subtle bg-bg-surface hover:border-primary/40 hover:shadow-sm"}`,
291
291
  children: [
292
- m && /* @__PURE__ */ x("span", {
292
+ g && /* @__PURE__ */ C("span", {
293
293
  className: "absolute top-2 right-2 text-xs font-medium bg-action-primary-bg text-action-primary-text px-1.5 py-0.5 rounded",
294
- children: ["×", S]
294
+ children: ["×", b]
295
295
  }),
296
- /* @__PURE__ */ b("p", {
296
+ /* @__PURE__ */ S("p", {
297
297
  className: "font-semibold text-text-primary text-sm mb-1",
298
298
  children: n
299
299
  }),
300
- /* @__PURE__ */ b("p", {
300
+ /* @__PURE__ */ S("p", {
301
301
  className: "text-xs text-text-secondary mb-3",
302
302
  children: c(e.duration)
303
303
  }),
304
- /* @__PURE__ */ x("p", {
304
+ /* @__PURE__ */ C("p", {
305
305
  className: "text-lg font-bold text-text-primary mb-3",
306
- children: [o(C, w), /* @__PURE__ */ x("span", {
306
+ children: [o(x, w), /* @__PURE__ */ C("span", {
307
307
  className: "text-xs font-normal text-text-secondary ml-1",
308
308
  children: ["/ ", s(e.duration)]
309
309
  })]
310
310
  }),
311
- /* @__PURE__ */ x("div", {
311
+ /* @__PURE__ */ C("div", {
312
312
  className: "mt-auto flex flex-col gap-2",
313
- children: [m ? /* @__PURE__ */ x("div", {
313
+ children: [g ? /* @__PURE__ */ C("div", {
314
314
  className: "flex items-center gap-1",
315
315
  children: [
316
- /* @__PURE__ */ b("button", {
316
+ /* @__PURE__ */ S("button", {
317
317
  type: "button",
318
- onClick: () => l(e.id, S - 1),
318
+ onClick: () => l(e.id, b - 1),
319
319
  className: "p-1 rounded border border-border-subtle hover:bg-bg-sunken transition-colors",
320
- children: /* @__PURE__ */ b(p, { className: "size-3" })
320
+ children: /* @__PURE__ */ S(h, { className: "size-3" })
321
321
  }),
322
- /* @__PURE__ */ b("span", {
322
+ /* @__PURE__ */ S("span", {
323
323
  className: "flex-1 text-center text-sm font-medium",
324
- children: S
324
+ children: b
325
325
  }),
326
- /* @__PURE__ */ b("button", {
326
+ /* @__PURE__ */ S("button", {
327
327
  type: "button",
328
- onClick: () => l(e.id, S + 1),
328
+ onClick: () => l(e.id, b + 1),
329
329
  className: "p-1 rounded border border-border-subtle hover:bg-bg-sunken transition-colors",
330
- children: /* @__PURE__ */ b(h, { className: "size-3" })
330
+ children: /* @__PURE__ */ S(_, { className: "size-3" })
331
331
  }),
332
- /* @__PURE__ */ b("button", {
332
+ /* @__PURE__ */ S("button", {
333
333
  type: "button",
334
334
  onClick: () => u(e.id),
335
335
  className: "p-1 rounded text-status-error-text hover:bg-status-error-bg/10 transition-colors",
336
- children: /* @__PURE__ */ b(_, { className: "size-3" })
336
+ children: /* @__PURE__ */ S(y, { className: "size-3" })
337
337
  })
338
338
  ]
339
- }) : /* @__PURE__ */ x("button", {
339
+ }) : /* @__PURE__ */ C("button", {
340
340
  type: "button",
341
341
  onClick: () => a(e),
342
- disabled: v(e.id),
343
- title: v(e.id) ? y : void 0,
342
+ disabled: p(e.id),
343
+ title: p(e.id) ? m : void 0,
344
344
  className: "w-full py-1.5 text-xs font-medium bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg/90 transition-colors flex items-center justify-center gap-1 disabled:cursor-not-allowed disabled:opacity-50",
345
- children: [/* @__PURE__ */ b(g, { className: "size-3" }), "Add to Cart"]
346
- }), /* @__PURE__ */ b("button", {
345
+ children: [/* @__PURE__ */ S(v, { className: "size-3" }), "Add to Cart"]
346
+ }), /* @__PURE__ */ S("button", {
347
347
  type: "button",
348
348
  onClick: () => f(`/addons/${e.id}`),
349
349
  className: "w-full py-1.5 text-xs font-medium border border-border-subtle text-text-primary rounded-md hover:bg-bg-sunken transition-colors",
@@ -353,10 +353,10 @@ var A = () => {
353
353
  ]
354
354
  }, e.id);
355
355
  })
356
- }) : /* @__PURE__ */ b("div", {
356
+ }) : /* @__PURE__ */ S("div", {
357
357
  className: "divide-y divide-border",
358
358
  children: t.map((e) => {
359
- let t = r(e.id), n = e.name.includes(" — ") ? e.name.slice(e.name.indexOf(" — ") + 3).trim() : e.name, m = i(e.id), S = t?.quantity ?? 0, { price: C, currency: w } = (() => {
359
+ let t = r(e.id), n = e.name.includes(" — ") ? e.name.slice(e.name.indexOf(" — ") + 3).trim() : e.name, g = i(e.id), b = t?.quantity ?? 0, { price: x, currency: w } = (() => {
360
360
  if (e.currencyPrices && typeof e.currencyPrices == "object") {
361
361
  let t = e.currencyPrices;
362
362
  if (t[d] != null) return {
@@ -369,61 +369,61 @@ var A = () => {
369
369
  currency: e.currency || "USD"
370
370
  };
371
371
  })();
372
- return /* @__PURE__ */ x("div", {
373
- className: `flex items-center gap-4 px-5 py-3 transition-colors ${m ? "bg-action-primary-bg/5" : "hover:bg-bg-sunken/30"}`,
372
+ return /* @__PURE__ */ C("div", {
373
+ className: `flex items-center gap-4 px-5 py-3 transition-colors ${g ? "bg-action-primary-bg/5" : "hover:bg-bg-sunken/30"}`,
374
374
  children: [
375
- /* @__PURE__ */ x("div", {
375
+ /* @__PURE__ */ C("div", {
376
376
  className: "flex-1 min-w-0",
377
- children: [/* @__PURE__ */ b("p", {
377
+ children: [/* @__PURE__ */ S("p", {
378
378
  className: "font-medium text-text-primary text-sm",
379
379
  children: n
380
- }), /* @__PURE__ */ b("p", {
380
+ }), /* @__PURE__ */ S("p", {
381
381
  className: "text-xs text-text-secondary",
382
382
  children: c(e.duration)
383
383
  })]
384
384
  }),
385
- /* @__PURE__ */ x("p", {
385
+ /* @__PURE__ */ C("p", {
386
386
  className: "font-semibold text-text-primary text-sm whitespace-nowrap",
387
- children: [o(C, w), /* @__PURE__ */ x("span", {
387
+ children: [o(x, w), /* @__PURE__ */ C("span", {
388
388
  className: "text-xs font-normal text-text-secondary ml-1",
389
389
  children: ["/ ", s(e.duration)]
390
390
  })]
391
391
  }),
392
- m ? /* @__PURE__ */ x("div", {
392
+ g ? /* @__PURE__ */ C("div", {
393
393
  className: "flex items-center gap-1",
394
394
  children: [
395
- /* @__PURE__ */ b("button", {
395
+ /* @__PURE__ */ S("button", {
396
396
  type: "button",
397
- onClick: () => l(e.id, S - 1),
397
+ onClick: () => l(e.id, b - 1),
398
398
  className: "p-1 rounded border border-border-subtle hover:bg-bg-sunken transition-colors",
399
- children: /* @__PURE__ */ b(p, { className: "size-3" })
399
+ children: /* @__PURE__ */ S(h, { className: "size-3" })
400
400
  }),
401
- /* @__PURE__ */ b("span", {
401
+ /* @__PURE__ */ S("span", {
402
402
  className: "w-6 text-center text-sm font-medium",
403
- children: S
403
+ children: b
404
404
  }),
405
- /* @__PURE__ */ b("button", {
405
+ /* @__PURE__ */ S("button", {
406
406
  type: "button",
407
- onClick: () => l(e.id, S + 1),
407
+ onClick: () => l(e.id, b + 1),
408
408
  className: "p-1 rounded border border-border-subtle hover:bg-bg-sunken transition-colors",
409
- children: /* @__PURE__ */ b(h, { className: "size-3" })
409
+ children: /* @__PURE__ */ S(_, { className: "size-3" })
410
410
  }),
411
- /* @__PURE__ */ b("button", {
411
+ /* @__PURE__ */ S("button", {
412
412
  type: "button",
413
413
  onClick: () => u(e.id),
414
414
  className: "p-1 rounded text-status-error-text hover:bg-status-error-bg/10 transition-colors",
415
- children: /* @__PURE__ */ b(_, { className: "size-3" })
415
+ children: /* @__PURE__ */ S(y, { className: "size-3" })
416
416
  })
417
417
  ]
418
- }) : /* @__PURE__ */ x("button", {
418
+ }) : /* @__PURE__ */ C("button", {
419
419
  type: "button",
420
420
  onClick: () => a(e),
421
- disabled: v(e.id),
422
- title: v(e.id) ? y : void 0,
421
+ disabled: p(e.id),
422
+ title: p(e.id) ? m : void 0,
423
423
  className: "px-2 py-1 text-xs font-medium bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg/90 transition-colors flex items-center gap-1 disabled:cursor-not-allowed disabled:opacity-50",
424
- children: [/* @__PURE__ */ b(g, { className: "size-3" }), "Add"]
424
+ children: [/* @__PURE__ */ S(v, { className: "size-3" }), "Add"]
425
425
  }),
426
- /* @__PURE__ */ b("button", {
426
+ /* @__PURE__ */ S("button", {
427
427
  type: "button",
428
428
  onClick: () => f(`/addons/${e.id}`),
429
429
  className: "px-2 py-1 text-xs font-medium border border-border-subtle text-text-primary rounded-md hover:bg-bg-sunken transition-colors",
@@ -434,12 +434,12 @@ var A = () => {
434
434
  })
435
435
  })]
436
436
  });
437
- }, M = ({ addon: e, onView: t, isInCart: n, cartQuantity: r, onAddToCart: i, onUpdateQuantity: a, onRemoveFromCart: l, displayCurrency: d, purchaseBlocked: m, blockedLabel: v }) => {
438
- let y = u(() => O(e.features || []), [e.features]);
439
- return /* @__PURE__ */ x("div", {
437
+ }, M = ({ addon: e, onView: t, isInCart: n, cartQuantity: r, onAddToCart: i, onUpdateQuantity: a, onRemoveFromCart: l, displayCurrency: d, purchaseBlocked: f, blockedLabel: p }) => {
438
+ let g = u(() => O(e.features || []), [e.features]);
439
+ return /* @__PURE__ */ C("div", {
440
440
  className: `relative border rounded-lg p-6 transition-all hover:shadow-md flex flex-col h-full ${n ? "border-primary bg-action-primary-bg/5" : "border-border-subtle bg-bg-surface"}`,
441
441
  children: [
442
- n && /* @__PURE__ */ x("span", {
442
+ n && /* @__PURE__ */ C("span", {
443
443
  className: "absolute top-4 right-4 px-2 py-1 text-xs font-medium bg-action-primary-bg text-action-primary-text rounded",
444
444
  children: [
445
445
  "In Cart (",
@@ -447,14 +447,14 @@ var A = () => {
447
447
  ")"
448
448
  ]
449
449
  }),
450
- /* @__PURE__ */ b("div", {
450
+ /* @__PURE__ */ S("div", {
451
451
  className: "size-10 rounded-lg bg-action-primary-bg/10 flex items-center justify-center mb-4",
452
- children: /* @__PURE__ */ b("svg", {
452
+ children: /* @__PURE__ */ S("svg", {
453
453
  className: "size-5 text-primary",
454
454
  fill: "none",
455
455
  viewBox: "0 0 24 24",
456
456
  stroke: "currentColor",
457
- children: /* @__PURE__ */ b("path", {
457
+ children: /* @__PURE__ */ S("path", {
458
458
  strokeLinecap: "round",
459
459
  strokeLinejoin: "round",
460
460
  strokeWidth: 2,
@@ -462,102 +462,102 @@ var A = () => {
462
462
  })
463
463
  })
464
464
  }),
465
- /* @__PURE__ */ x("div", {
465
+ /* @__PURE__ */ C("div", {
466
466
  className: "mb-4",
467
- children: [/* @__PURE__ */ b("h3", {
467
+ children: [/* @__PURE__ */ S("h3", {
468
468
  className: "text-lg font-bold text-text-primary",
469
469
  children: e.name
470
- }), /* @__PURE__ */ b("span", {
470
+ }), /* @__PURE__ */ S("span", {
471
471
  className: "text-sm text-text-secondary",
472
472
  children: c(e.duration)
473
473
  })]
474
474
  }),
475
- /* @__PURE__ */ x("div", {
475
+ /* @__PURE__ */ C("div", {
476
476
  className: "flex items-baseline gap-1 mb-4",
477
- children: [/* @__PURE__ */ b("span", {
477
+ children: [/* @__PURE__ */ S("span", {
478
478
  className: "text-2xl font-bold text-text-primary",
479
479
  children: (() => {
480
480
  let { price: t, currency: n } = k(e, d);
481
481
  return o(t, n);
482
482
  })()
483
- }), /* @__PURE__ */ x("span", {
483
+ }), /* @__PURE__ */ C("span", {
484
484
  className: "text-text-secondary text-sm",
485
485
  children: ["/ ", s(e.duration)]
486
486
  })]
487
487
  }),
488
- y.length > 0 && /* @__PURE__ */ x("ul", {
488
+ g.length > 0 && /* @__PURE__ */ C("ul", {
489
489
  className: "space-y-2 mb-4",
490
- children: [y.slice(0, 4).map((e) => /* @__PURE__ */ x("li", {
490
+ children: [g.slice(0, 4).map((e) => /* @__PURE__ */ C("li", {
491
491
  className: "flex items-center justify-between text-sm",
492
- children: [/* @__PURE__ */ x("div", {
492
+ children: [/* @__PURE__ */ C("div", {
493
493
  className: "flex items-center gap-2",
494
- children: [/* @__PURE__ */ b("svg", {
494
+ children: [/* @__PURE__ */ S("svg", {
495
495
  className: "size-4 text-status-success-text shrink-0",
496
496
  fill: "none",
497
497
  viewBox: "0 0 24 24",
498
498
  stroke: "currentColor",
499
- children: /* @__PURE__ */ b("path", {
499
+ children: /* @__PURE__ */ S("path", {
500
500
  strokeLinecap: "round",
501
501
  strokeLinejoin: "round",
502
502
  strokeWidth: 2,
503
503
  d: "M5 13l4 4L19 7"
504
504
  })
505
- }), /* @__PURE__ */ b("span", {
505
+ }), /* @__PURE__ */ S("span", {
506
506
  className: "text-text-primary",
507
507
  children: e.name
508
508
  })]
509
- }), /* @__PURE__ */ b("span", {
509
+ }), /* @__PURE__ */ S("span", {
510
510
  className: "font-medium text-text-primary",
511
511
  children: e.totalValue.toLocaleString()
512
512
  })]
513
- }, e.quotaId)), y.length > 4 && /* @__PURE__ */ x("li", {
513
+ }, e.quotaId)), g.length > 4 && /* @__PURE__ */ C("li", {
514
514
  className: "text-sm text-text-secondary pl-6",
515
515
  children: [
516
516
  "+",
517
- y.length - 4,
517
+ g.length - 4,
518
518
  " more quotas"
519
519
  ]
520
520
  })]
521
521
  }),
522
- /* @__PURE__ */ x("div", {
522
+ /* @__PURE__ */ C("div", {
523
523
  className: "space-y-2 pt-4 border-t border-border-subtle mt-auto",
524
- children: [n ? /* @__PURE__ */ x("div", {
524
+ children: [n ? /* @__PURE__ */ C("div", {
525
525
  className: "flex items-center justify-between gap-2",
526
- children: [/* @__PURE__ */ x("div", {
526
+ children: [/* @__PURE__ */ C("div", {
527
527
  className: "flex items-center gap-1",
528
528
  children: [
529
- /* @__PURE__ */ b("button", {
529
+ /* @__PURE__ */ S("button", {
530
530
  type: "button",
531
531
  onClick: () => a(e.id, r - 1),
532
532
  className: "p-1.5 rounded border border-border-subtle hover:bg-bg-sunken transition-colors",
533
- children: /* @__PURE__ */ b(p, { className: "size-4" })
533
+ children: /* @__PURE__ */ S(h, { className: "size-4" })
534
534
  }),
535
- /* @__PURE__ */ b("span", {
535
+ /* @__PURE__ */ S("span", {
536
536
  className: "w-10 text-center font-medium",
537
537
  children: r
538
538
  }),
539
- /* @__PURE__ */ b("button", {
539
+ /* @__PURE__ */ S("button", {
540
540
  type: "button",
541
541
  onClick: () => a(e.id, r + 1),
542
542
  className: "p-1.5 rounded border border-border-subtle hover:bg-bg-sunken transition-colors",
543
- children: /* @__PURE__ */ b(h, { className: "size-4" })
543
+ children: /* @__PURE__ */ S(_, { className: "size-4" })
544
544
  })
545
545
  ]
546
- }), /* @__PURE__ */ b("button", {
546
+ }), /* @__PURE__ */ S("button", {
547
547
  type: "button",
548
548
  onClick: () => l(e.id),
549
549
  className: "p-1.5 rounded text-status-error-text hover:bg-status-error-bg/10 transition-colors",
550
550
  title: "Remove from cart",
551
- children: /* @__PURE__ */ b(_, { className: "size-4" })
551
+ children: /* @__PURE__ */ S(y, { className: "size-4" })
552
552
  })]
553
- }) : /* @__PURE__ */ x("button", {
553
+ }) : /* @__PURE__ */ C("button", {
554
554
  type: "button",
555
555
  onClick: () => i(e),
556
- disabled: m,
557
- title: m ? v : void 0,
556
+ disabled: f,
557
+ title: f ? p : void 0,
558
558
  className: "w-full px-4 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg/90 transition-colors flex items-center justify-center gap-2 disabled:cursor-not-allowed disabled:opacity-50",
559
- children: [b(m ? f : g, { className: "size-4" }), "Add to Cart"]
560
- }), /* @__PURE__ */ b("button", {
559
+ children: [S(f ? m : v, { className: "size-4" }), "Add to Cart"]
560
+ }), /* @__PURE__ */ S("button", {
561
561
  type: "button",
562
562
  onClick: t,
563
563
  className: "w-full px-4 py-2 text-sm font-medium border border-border-subtle text-text-primary rounded-md hover:bg-bg-sunken transition-colors",
@@ -566,19 +566,19 @@ var A = () => {
566
566
  })
567
567
  ]
568
568
  });
569
- }, N = ({ addon: e, onView: t, isInCart: n, cartQuantity: r, onAddToCart: i, onUpdateQuantity: a, onRemoveFromCart: c, displayCurrency: l, purchaseBlocked: d, blockedLabel: m }) => {
570
- let v = u(() => O(e.features || []), [e.features]);
571
- return /* @__PURE__ */ x("div", {
569
+ }, N = ({ addon: e, onView: t, isInCart: n, cartQuantity: r, onAddToCart: i, onUpdateQuantity: a, onRemoveFromCart: c, displayCurrency: l, purchaseBlocked: d, blockedLabel: f }) => {
570
+ let p = u(() => O(e.features || []), [e.features]);
571
+ return /* @__PURE__ */ C("div", {
572
572
  className: `flex items-center gap-4 p-4 border rounded-lg transition-all hover:shadow-sm ${n ? "border-primary bg-action-primary-bg/5" : "border-border-subtle bg-bg-surface"}`,
573
573
  children: [
574
- /* @__PURE__ */ b("div", {
574
+ /* @__PURE__ */ S("div", {
575
575
  className: "size-10 rounded-lg bg-action-primary-bg/10 flex items-center justify-center shrink-0",
576
- children: /* @__PURE__ */ b("svg", {
576
+ children: /* @__PURE__ */ S("svg", {
577
577
  className: "size-5 text-primary",
578
578
  fill: "none",
579
579
  viewBox: "0 0 24 24",
580
580
  stroke: "currentColor",
581
- children: /* @__PURE__ */ b("path", {
581
+ children: /* @__PURE__ */ S("path", {
582
582
  strokeLinecap: "round",
583
583
  strokeLinejoin: "round",
584
584
  strokeWidth: 2,
@@ -586,14 +586,14 @@ var A = () => {
586
586
  })
587
587
  })
588
588
  }),
589
- /* @__PURE__ */ x("div", {
589
+ /* @__PURE__ */ C("div", {
590
590
  className: "flex-1 min-w-0",
591
- children: [/* @__PURE__ */ x("div", {
591
+ children: [/* @__PURE__ */ C("div", {
592
592
  className: "flex items-center gap-2",
593
- children: [/* @__PURE__ */ b("h3", {
593
+ children: [/* @__PURE__ */ S("h3", {
594
594
  className: "font-semibold text-text-primary truncate",
595
595
  children: e.name
596
- }), n && /* @__PURE__ */ x("span", {
596
+ }), n && /* @__PURE__ */ C("span", {
597
597
  className: "px-2 py-0.5 text-xs font-medium bg-action-primary-bg text-action-primary-text rounded",
598
598
  children: [
599
599
  "In Cart (",
@@ -601,64 +601,64 @@ var A = () => {
601
601
  ")"
602
602
  ]
603
603
  })]
604
- }), /* @__PURE__ */ x("p", {
604
+ }), /* @__PURE__ */ C("p", {
605
605
  className: "text-sm text-text-secondary",
606
606
  children: [
607
- v.length,
607
+ p.length,
608
608
  " quota",
609
- v.length === 1 ? "" : "s"
609
+ p.length === 1 ? "" : "s"
610
610
  ]
611
611
  })]
612
612
  }),
613
- /* @__PURE__ */ x("div", {
613
+ /* @__PURE__ */ C("div", {
614
614
  className: "text-right",
615
- children: [/* @__PURE__ */ b("div", {
615
+ children: [/* @__PURE__ */ S("div", {
616
616
  className: "font-semibold text-text-primary",
617
617
  children: (() => {
618
618
  let { price: t, currency: n } = k(e, l);
619
619
  return o(t, n);
620
620
  })()
621
- }), /* @__PURE__ */ x("div", {
621
+ }), /* @__PURE__ */ C("div", {
622
622
  className: "text-sm text-text-secondary",
623
623
  children: ["per ", s(e.duration)]
624
624
  })]
625
625
  }),
626
- n ? /* @__PURE__ */ x("div", {
626
+ n ? /* @__PURE__ */ C("div", {
627
627
  className: "flex items-center gap-1",
628
628
  children: [
629
- /* @__PURE__ */ b("button", {
629
+ /* @__PURE__ */ S("button", {
630
630
  type: "button",
631
631
  onClick: () => a(e.id, r - 1),
632
632
  className: "p-1.5 rounded border border-border-subtle hover:bg-bg-sunken transition-colors",
633
- children: /* @__PURE__ */ b(p, { className: "size-4" })
633
+ children: /* @__PURE__ */ S(h, { className: "size-4" })
634
634
  }),
635
- /* @__PURE__ */ b("span", {
635
+ /* @__PURE__ */ S("span", {
636
636
  className: "w-8 text-center font-medium",
637
637
  children: r
638
638
  }),
639
- /* @__PURE__ */ b("button", {
639
+ /* @__PURE__ */ S("button", {
640
640
  type: "button",
641
641
  onClick: () => a(e.id, r + 1),
642
642
  className: "p-1.5 rounded border border-border-subtle hover:bg-bg-sunken transition-colors",
643
- children: /* @__PURE__ */ b(h, { className: "size-4" })
643
+ children: /* @__PURE__ */ S(_, { className: "size-4" })
644
644
  }),
645
- /* @__PURE__ */ b("button", {
645
+ /* @__PURE__ */ S("button", {
646
646
  type: "button",
647
647
  onClick: () => c(e.id),
648
648
  className: "p-1.5 rounded text-status-error-text hover:bg-status-error-bg/10 transition-colors ml-1",
649
649
  title: "Remove from cart",
650
- children: /* @__PURE__ */ b(_, { className: "size-4" })
650
+ children: /* @__PURE__ */ S(y, { className: "size-4" })
651
651
  })
652
652
  ]
653
- }) : /* @__PURE__ */ x("button", {
653
+ }) : /* @__PURE__ */ C("button", {
654
654
  type: "button",
655
655
  onClick: () => i(e),
656
656
  disabled: d,
657
- title: d ? m : void 0,
657
+ title: d ? f : void 0,
658
658
  className: "px-3 py-1.5 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg/90 transition-colors flex items-center gap-1.5 disabled:cursor-not-allowed disabled:opacity-50",
659
- children: [b(d ? f : g, { className: "size-4" }), "Add"]
659
+ children: [S(d ? m : v, { className: "size-4" }), "Add"]
660
660
  }),
661
- /* @__PURE__ */ b("button", {
661
+ /* @__PURE__ */ S("button", {
662
662
  type: "button",
663
663
  onClick: t,
664
664
  className: "px-3 py-1.5 text-sm font-medium border border-border-subtle text-text-primary rounded-md hover:bg-bg-sunken transition-colors",
@@ -667,26 +667,26 @@ var A = () => {
667
667
  ]
668
668
  });
669
669
  }, P = ({ displayCurrency: e }) => {
670
- let { t: n } = S(), i = (e, t) => {
670
+ let { t: n } = w(), i = (e, t) => {
671
671
  let r = n(e);
672
672
  return r === e ? t : r;
673
- }, a = t(), { items: c, isCartOpen: l, toggleCart: u, closeCart: d, removeFromCart: f, updateQuantity: m, clearCart: C } = r(), w = c.reduce((e, t) => e + t.quantity, 0);
674
- return c.length === 0 && !l ? null : /* @__PURE__ */ x(y, { children: [!l && c.length > 0 && T(/* @__PURE__ */ x("button", {
673
+ }, a = t(), { items: c, isCartOpen: l, toggleCart: u, closeCart: d, removeFromCart: f, updateQuantity: p, clearCart: m } = r(), g = c.reduce((e, t) => e + t.quantity, 0);
674
+ return c.length === 0 && !l ? null : /* @__PURE__ */ C(x, { children: [!l && c.length > 0 && T(/* @__PURE__ */ C("button", {
675
675
  type: "button",
676
676
  onClick: u,
677
677
  style: { bottom: `calc(1.5rem + ${E})` },
678
678
  className: "fixed left-6 sm:left-auto sm:right-6 z-50 flex items-center gap-2 px-4 py-3 bg-action-primary-bg text-action-primary-text rounded-full shadow-lg hover:bg-action-primary-bg/90 transition-all",
679
679
  children: [
680
- /* @__PURE__ */ b(g, { className: "size-5" }),
681
- /* @__PURE__ */ x("span", {
680
+ /* @__PURE__ */ S(v, { className: "size-5" }),
681
+ /* @__PURE__ */ C("span", {
682
682
  className: "font-medium",
683
683
  children: [
684
- w,
684
+ g,
685
685
  " item",
686
- w === 1 ? "" : "s"
686
+ g === 1 ? "" : "s"
687
687
  ]
688
688
  }),
689
- /* @__PURE__ */ b("span", {
689
+ /* @__PURE__ */ S("span", {
690
690
  className: "px-2 py-0.5 bg-primary-foreground/20 rounded-full text-sm",
691
691
  children: (() => {
692
692
  let t = c.reduce((t, { addon: n, quantity: r }) => {
@@ -697,51 +697,51 @@ var A = () => {
697
697
  })()
698
698
  })
699
699
  ]
700
- }), document.body), l && /* @__PURE__ */ x("div", {
700
+ }), document.body), l && /* @__PURE__ */ C("div", {
701
701
  className: "fixed inset-0 z-50 flex items-end sm:items-center justify-center",
702
- children: [/* @__PURE__ */ b("div", {
702
+ children: [/* @__PURE__ */ S("div", {
703
703
  className: "absolute inset-0 bg-overlay-scrim",
704
704
  onClick: d
705
- }), /* @__PURE__ */ x("div", {
705
+ }), /* @__PURE__ */ C("div", {
706
706
  className: "relative w-full max-w-md max-h-[80vh] bg-bg-surface border border-border-subtle rounded-t-xl sm:rounded-xl shadow-xl overflow-hidden",
707
707
  children: [
708
- /* @__PURE__ */ x("div", {
708
+ /* @__PURE__ */ C("div", {
709
709
  className: "flex items-center justify-between px-4 py-3 border-b border-border-subtle bg-bg-sunken/30",
710
- children: [/* @__PURE__ */ x("div", {
710
+ children: [/* @__PURE__ */ C("div", {
711
711
  className: "flex items-center gap-2",
712
712
  children: [
713
- /* @__PURE__ */ b(g, { className: "size-5 text-text-primary" }),
714
- /* @__PURE__ */ b("h3", {
713
+ /* @__PURE__ */ S(v, { className: "size-5 text-text-primary" }),
714
+ /* @__PURE__ */ S("h3", {
715
715
  className: "font-semibold text-text-primary",
716
716
  children: i("billing.addons.yourCart", "Your Cart")
717
717
  }),
718
- /* @__PURE__ */ x("span", {
718
+ /* @__PURE__ */ C("span", {
719
719
  className: "px-2 py-0.5 text-xs bg-action-primary-bg text-action-primary-text rounded-full",
720
720
  children: [
721
- w,
721
+ g,
722
722
  " item",
723
- w === 1 ? "" : "s"
723
+ g === 1 ? "" : "s"
724
724
  ]
725
725
  })
726
726
  ]
727
- }), /* @__PURE__ */ b("button", {
727
+ }), /* @__PURE__ */ S("button", {
728
728
  type: "button",
729
729
  onClick: d,
730
730
  className: "p-1.5 rounded hover:bg-bg-sunken transition-colors",
731
- children: /* @__PURE__ */ b(v, { className: "size-5" })
731
+ children: /* @__PURE__ */ S(b, { className: "size-5" })
732
732
  })]
733
733
  }),
734
- /* @__PURE__ */ b("div", {
734
+ /* @__PURE__ */ S("div", {
735
735
  className: "overflow-y-auto max-h-[50vh] divide-y divide-border",
736
- children: c.map(({ addon: t, quantity: n }) => /* @__PURE__ */ x("div", {
736
+ children: c.map(({ addon: t, quantity: n }) => /* @__PURE__ */ C("div", {
737
737
  className: "p-4 flex items-center gap-3",
738
738
  children: [
739
- /* @__PURE__ */ x("div", {
739
+ /* @__PURE__ */ C("div", {
740
740
  className: "flex-1 min-w-0",
741
- children: [/* @__PURE__ */ b("h4", {
741
+ children: [/* @__PURE__ */ S("h4", {
742
742
  className: "font-medium text-text-primary truncate",
743
743
  children: t.name
744
- }), /* @__PURE__ */ x("p", {
744
+ }), /* @__PURE__ */ C("p", {
745
745
  className: "text-sm text-text-secondary",
746
746
  children: [
747
747
  (() => {
@@ -754,51 +754,51 @@ var A = () => {
754
754
  ]
755
755
  })]
756
756
  }),
757
- /* @__PURE__ */ x("div", {
757
+ /* @__PURE__ */ C("div", {
758
758
  className: "flex items-center gap-1",
759
759
  children: [
760
- /* @__PURE__ */ b("button", {
760
+ /* @__PURE__ */ S("button", {
761
761
  type: "button",
762
- onClick: () => m(t.id, n - 1),
762
+ onClick: () => p(t.id, n - 1),
763
763
  className: "p-1 rounded border border-border-subtle hover:bg-bg-sunken transition-colors",
764
- children: /* @__PURE__ */ b(p, { className: "size-3" })
764
+ children: /* @__PURE__ */ S(h, { className: "size-3" })
765
765
  }),
766
- /* @__PURE__ */ b("span", {
766
+ /* @__PURE__ */ S("span", {
767
767
  className: "w-6 text-center text-sm font-medium",
768
768
  children: n
769
769
  }),
770
- /* @__PURE__ */ b("button", {
770
+ /* @__PURE__ */ S("button", {
771
771
  type: "button",
772
- onClick: () => m(t.id, n + 1),
772
+ onClick: () => p(t.id, n + 1),
773
773
  className: "p-1 rounded border border-border-subtle hover:bg-bg-sunken transition-colors",
774
- children: /* @__PURE__ */ b(h, { className: "size-3" })
774
+ children: /* @__PURE__ */ S(_, { className: "size-3" })
775
775
  })
776
776
  ]
777
777
  }),
778
- /* @__PURE__ */ b("p", {
778
+ /* @__PURE__ */ S("p", {
779
779
  className: "font-medium text-text-primary",
780
780
  children: (() => {
781
781
  let { price: r, currency: i } = k(t, e);
782
782
  return o(r * n, i);
783
783
  })()
784
784
  }),
785
- /* @__PURE__ */ b("button", {
785
+ /* @__PURE__ */ S("button", {
786
786
  type: "button",
787
787
  onClick: () => f(t.id),
788
788
  className: "p-1.5 rounded text-status-error-text hover:bg-status-error-bg/10 transition-colors",
789
- children: /* @__PURE__ */ b(_, { className: "size-4" })
789
+ children: /* @__PURE__ */ S(y, { className: "size-4" })
790
790
  })
791
791
  ]
792
792
  }, t.id))
793
793
  }),
794
- /* @__PURE__ */ x("div", {
794
+ /* @__PURE__ */ C("div", {
795
795
  className: "border-t border-border-subtle p-4 space-y-3 bg-bg-sunken/20",
796
- children: [/* @__PURE__ */ x("div", {
796
+ children: [/* @__PURE__ */ C("div", {
797
797
  className: "flex items-center justify-between text-lg font-semibold",
798
- children: [/* @__PURE__ */ b("span", {
798
+ children: [/* @__PURE__ */ S("span", {
799
799
  className: "text-text-primary",
800
800
  children: i("billing.addons.total", "Total")
801
- }), /* @__PURE__ */ b("span", {
801
+ }), /* @__PURE__ */ S("span", {
802
802
  className: "text-text-primary",
803
803
  children: (() => {
804
804
  let t = c.reduce((t, { addon: n, quantity: r }) => {
@@ -808,14 +808,14 @@ var A = () => {
808
808
  return o(t, e);
809
809
  })()
810
810
  })]
811
- }), /* @__PURE__ */ x("div", {
811
+ }), /* @__PURE__ */ C("div", {
812
812
  className: "flex gap-2",
813
- children: [/* @__PURE__ */ b("button", {
813
+ children: [/* @__PURE__ */ S("button", {
814
814
  type: "button",
815
- onClick: C,
815
+ onClick: m,
816
816
  className: "flex-1 px-4 py-2.5 text-sm font-medium border border-border-subtle text-text-primary rounded-md hover:bg-bg-sunken transition-colors",
817
817
  children: "Clear Cart"
818
- }), /* @__PURE__ */ b("button", {
818
+ }), /* @__PURE__ */ S("button", {
819
819
  type: "button",
820
820
  onClick: () => {
821
821
  d(), a("/checkout/addons");