@burdenoff/microfe-billing 2026.1108.1 → 2026.1109.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (773) hide show
  1. package/dist/billing/BillingAdminRoutes.d.ts +1 -2
  2. package/dist/billing/BillingAdminRoutes.js +11 -12
  3. package/dist/billing/BillingAdminRoutes.js.map +1 -1
  4. package/dist/billing/BillingRoot.d.ts +0 -1
  5. package/dist/billing/BillingRoot.js +10 -9
  6. package/dist/billing/BillingRoot.js.map +1 -1
  7. package/dist/billing/BillingUserRoutes.d.ts +1 -2
  8. package/dist/billing/BillingUserRoutes.js +13 -14
  9. package/dist/billing/BillingUserRoutes.js.map +1 -1
  10. package/dist/billing/hooks/useBillingAccountSelection.d.ts +0 -1
  11. package/dist/billing/hooks/useBillingAccountSelection.js +7 -5
  12. package/dist/billing/hooks/useBillingAccountSelection.js.map +1 -1
  13. package/dist/billing/hooks/useBillingEventEmitter.d.ts +0 -1
  14. package/dist/billing/hooks/useBillingEventEmitter.js +1 -2
  15. package/dist/billing/hooks/useBillingEventEmitter.js.map +1 -1
  16. package/dist/billing/hooks/useBillingNavigate.d.ts +0 -1
  17. package/dist/billing/hooks/useBillingNavigate.js +1 -2
  18. package/dist/billing/hooks/useBillingNavigate.js.map +1 -1
  19. package/dist/billing/hooks/useBillingPermissions.d.ts +0 -1
  20. package/dist/billing/hooks/useBillingPermissions.js +2 -3
  21. package/dist/billing/hooks/useBillingPermissions.js.map +1 -1
  22. package/dist/billing/hooks/useDefaultBillingCurrency.d.ts +0 -1
  23. package/dist/billing/hooks/useDefaultBillingCurrency.js +1 -2
  24. package/dist/billing/hooks/useDefaultBillingCurrency.js.map +1 -1
  25. package/dist/billing/hooks/useProducts.d.ts +0 -1
  26. package/dist/billing/hooks/useProducts.js +1 -2
  27. package/dist/billing/hooks/useProducts.js.map +1 -1
  28. package/dist/billing/index.d.ts +0 -1
  29. package/dist/billing/lib/native-purchases.d.ts +0 -1
  30. package/dist/billing/lib/native-purchases.js +1 -2
  31. package/dist/billing/lib/native-purchases.js.map +1 -1
  32. package/dist/billing/modules/addons/components/FloatingCartDrawer.d.ts +0 -1
  33. package/dist/billing/modules/addons/components/FloatingCartDrawer.js +4 -5
  34. package/dist/billing/modules/addons/components/FloatingCartDrawer.js.map +1 -1
  35. package/dist/billing/modules/addons/hooks/index.d.ts +0 -1
  36. package/dist/billing/modules/addons/hooks/index.js +3 -2
  37. package/dist/billing/modules/addons/hooks/useAddonPurchaseEligibility.d.ts +0 -1
  38. package/dist/billing/modules/addons/hooks/useAddonPurchaseEligibility.js +1 -2
  39. package/dist/billing/modules/addons/hooks/useAddonPurchaseEligibility.js.map +1 -1
  40. package/dist/billing/modules/addons/hooks/useAddons.d.ts +0 -1
  41. package/dist/billing/modules/addons/hooks/useAddons.js +1 -2
  42. package/dist/billing/modules/addons/hooks/useAddons.js.map +1 -1
  43. package/dist/billing/modules/addons/index.d.ts +0 -1
  44. package/dist/billing/modules/addons/index.js +10 -10
  45. package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.d.ts +0 -1
  46. package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js +15 -16
  47. package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js.map +1 -1
  48. package/dist/billing/modules/addons/pages/AddonCreatePage.d.ts +0 -1
  49. package/dist/billing/modules/addons/pages/AddonCreatePage.js +11 -12
  50. package/dist/billing/modules/addons/pages/AddonCreatePage.js.map +1 -1
  51. package/dist/billing/modules/addons/pages/AddonDetailPage.d.ts +0 -1
  52. package/dist/billing/modules/addons/pages/AddonDetailPage.js +16 -17
  53. package/dist/billing/modules/addons/pages/AddonDetailPage.js.map +1 -1
  54. package/dist/billing/modules/addons/pages/AddonEditPage.d.ts +0 -1
  55. package/dist/billing/modules/addons/pages/AddonEditPage.js +16 -17
  56. package/dist/billing/modules/addons/pages/AddonEditPage.js.map +1 -1
  57. package/dist/billing/modules/addons/pages/AddonsBrowsePage.d.ts +0 -1
  58. package/dist/billing/modules/addons/pages/AddonsBrowsePage.js +111 -106
  59. package/dist/billing/modules/addons/pages/AddonsBrowsePage.js.map +1 -1
  60. package/dist/billing/modules/addons/pages/AddonsListPage.d.ts +0 -1
  61. package/dist/billing/modules/addons/pages/AddonsListPage.js +105 -100
  62. package/dist/billing/modules/addons/pages/AddonsListPage.js.map +1 -1
  63. package/dist/billing/modules/addons/pages/index.d.ts +0 -1
  64. package/dist/billing/modules/addons/pages/index.js +7 -6
  65. package/dist/billing/modules/addons/store/addonCartStore.d.ts +0 -1
  66. package/dist/billing/modules/addons/store/addonCartStore.js +2 -7
  67. package/dist/billing/modules/addons/store/addonCartStore.js.map +1 -1
  68. package/dist/billing/modules/affiliate/api.d.ts +0 -1
  69. package/dist/billing/modules/affiliate/api.js +1 -2
  70. package/dist/billing/modules/affiliate/api.js.map +1 -1
  71. package/dist/billing/modules/affiliate/index.d.ts +0 -1
  72. package/dist/billing/modules/affiliate/index.js +1 -2
  73. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.d.ts +0 -1
  74. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js +29 -28
  75. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js.map +1 -1
  76. package/dist/billing/modules/analytics/index.d.ts +0 -1
  77. package/dist/billing/modules/analytics/index.js +1 -2
  78. package/dist/billing/modules/analytics/pages/AnalyticsPage.d.ts +0 -1
  79. package/dist/billing/modules/analytics/pages/AnalyticsPage.js +8 -9
  80. package/dist/billing/modules/analytics/pages/AnalyticsPage.js.map +1 -1
  81. package/dist/billing/modules/analytics/pages/index.d.ts +0 -1
  82. package/dist/billing/modules/analytics/pages/index.js +1 -1
  83. package/dist/billing/modules/billing/hooks/index.d.ts +0 -1
  84. package/dist/billing/modules/billing/hooks/index.js +5 -4
  85. package/dist/billing/modules/billing/hooks/useInvoices.d.ts +0 -1
  86. package/dist/billing/modules/billing/hooks/useInvoices.js +1 -2
  87. package/dist/billing/modules/billing/hooks/useInvoices.js.map +1 -1
  88. package/dist/billing/modules/billing/hooks/useOrderCallbacks.d.ts +0 -1
  89. package/dist/billing/modules/billing/hooks/useOrderCallbacks.js +1 -2
  90. package/dist/billing/modules/billing/hooks/useOrderCallbacks.js.map +1 -1
  91. package/dist/billing/modules/billing/hooks/usePayments.d.ts +0 -1
  92. package/dist/billing/modules/billing/hooks/useRefunds.d.ts +0 -1
  93. package/dist/billing/modules/billing/hooks/useRefunds.js +1 -2
  94. package/dist/billing/modules/billing/hooks/useRefunds.js.map +1 -1
  95. package/dist/billing/modules/billing/hooks/useTransactions.d.ts +0 -1
  96. package/dist/billing/modules/billing/hooks/useTransactions.js +30 -31
  97. package/dist/billing/modules/billing/hooks/useTransactions.js.map +1 -1
  98. package/dist/billing/modules/billing/index.d.ts +0 -1
  99. package/dist/billing/modules/billing/index.js +15 -15
  100. package/dist/billing/modules/billing/pages/BillingWebhookLogsPage.d.ts +0 -1
  101. package/dist/billing/modules/billing/pages/BillingWebhookLogsPage.js +11 -12
  102. package/dist/billing/modules/billing/pages/BillingWebhookLogsPage.js.map +1 -1
  103. package/dist/billing/modules/billing/pages/InvoiceDetailPage.d.ts +0 -1
  104. package/dist/billing/modules/billing/pages/InvoiceDetailPage.js +53 -59
  105. package/dist/billing/modules/billing/pages/InvoiceDetailPage.js.map +1 -1
  106. package/dist/billing/modules/billing/pages/InvoicesListPage.d.ts +0 -1
  107. package/dist/billing/modules/billing/pages/InvoicesListPage.js +81 -87
  108. package/dist/billing/modules/billing/pages/InvoicesListPage.js.map +1 -1
  109. package/dist/billing/modules/billing/pages/OrderCallbackLogsPage.d.ts +0 -1
  110. package/dist/billing/modules/billing/pages/OrderCallbackLogsPage.js +11 -12
  111. package/dist/billing/modules/billing/pages/OrderCallbackLogsPage.js.map +1 -1
  112. package/dist/billing/modules/billing/pages/PaymentMethodsPage.d.ts +0 -1
  113. package/dist/billing/modules/billing/pages/PaymentMethodsPage.js +51 -54
  114. package/dist/billing/modules/billing/pages/PaymentMethodsPage.js.map +1 -1
  115. package/dist/billing/modules/billing/pages/RefundIssueLogsPage.d.ts +0 -1
  116. package/dist/billing/modules/billing/pages/RefundIssueLogsPage.js +33 -34
  117. package/dist/billing/modules/billing/pages/RefundIssueLogsPage.js.map +1 -1
  118. package/dist/billing/modules/billing/pages/RefundsPage.d.ts +0 -1
  119. package/dist/billing/modules/billing/pages/RefundsPage.js +92 -93
  120. package/dist/billing/modules/billing/pages/RefundsPage.js.map +1 -1
  121. package/dist/billing/modules/billing/pages/TransactionsPage.d.ts +0 -1
  122. package/dist/billing/modules/billing/pages/TransactionsPage.js +38 -39
  123. package/dist/billing/modules/billing/pages/TransactionsPage.js.map +1 -1
  124. package/dist/billing/modules/billing/pages/UserRefundsPage.d.ts +0 -1
  125. package/dist/billing/modules/billing/pages/UserRefundsPage.js +24 -30
  126. package/dist/billing/modules/billing/pages/UserRefundsPage.js.map +1 -1
  127. package/dist/billing/modules/billing/pages/index.d.ts +0 -1
  128. package/dist/billing/modules/billing/pages/index.js +10 -9
  129. package/dist/billing/modules/checkout/components/AutoPayToggle.d.ts +0 -1
  130. package/dist/billing/modules/checkout/components/BillingAccountSelector.d.ts +0 -1
  131. package/dist/billing/modules/checkout/components/BillingAccountSelector.js +1 -2
  132. package/dist/billing/modules/checkout/components/BillingAccountSelector.js.map +1 -1
  133. package/dist/billing/modules/checkout/components/CompactAutoPayToggle.d.ts +0 -1
  134. package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.d.ts +0 -1
  135. package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.js +1 -2
  136. package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.js.map +1 -1
  137. package/dist/billing/modules/checkout/components/CreditsAmountInput.d.ts +0 -1
  138. package/dist/billing/modules/checkout/components/CreditsAmountInput.js +1 -2
  139. package/dist/billing/modules/checkout/components/CreditsAmountInput.js.map +1 -1
  140. package/dist/billing/modules/checkout/components/CreditsPaymentOption.d.ts +0 -1
  141. package/dist/billing/modules/checkout/components/CurrencySelector.d.ts +0 -1
  142. package/dist/billing/modules/checkout/components/NativeCheckoutView.d.ts +0 -1
  143. package/dist/billing/modules/checkout/components/NativeCheckoutView.js +1 -2
  144. package/dist/billing/modules/checkout/components/NativeCheckoutView.js.map +1 -1
  145. package/dist/billing/modules/checkout/components/OrderSummary.d.ts +0 -1
  146. package/dist/billing/modules/checkout/components/OrderSummary.js +35 -32
  147. package/dist/billing/modules/checkout/components/OrderSummary.js.map +1 -1
  148. package/dist/billing/modules/checkout/components/PaymentProviderSelector.d.ts +0 -1
  149. package/dist/billing/modules/checkout/components/PromoCodeInput.d.ts +0 -1
  150. package/dist/billing/modules/checkout/components/PromoCodeInput.js +1 -2
  151. package/dist/billing/modules/checkout/components/PromoCodeInput.js.map +1 -1
  152. package/dist/billing/modules/checkout/components/RazorpayPaymentButton.d.ts +0 -1
  153. package/dist/billing/modules/checkout/components/RazorpayPaymentButton.js +1 -2
  154. package/dist/billing/modules/checkout/components/RazorpayPaymentButton.js.map +1 -1
  155. package/dist/billing/modules/checkout/components/SavedCardSelector.d.ts +0 -1
  156. package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.d.ts +0 -1
  157. package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.js +1 -2
  158. package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.js.map +1 -1
  159. package/dist/billing/modules/checkout/components/StoreShippingSection.d.ts +0 -1
  160. package/dist/billing/modules/checkout/components/StoreShippingSection.js +5 -3
  161. package/dist/billing/modules/checkout/components/StoreShippingSection.js.map +1 -1
  162. package/dist/billing/modules/checkout/components/StripePaymentForm.d.ts +0 -1
  163. package/dist/billing/modules/checkout/components/StripePaymentForm.js +35 -41
  164. package/dist/billing/modules/checkout/components/StripePaymentForm.js.map +1 -1
  165. package/dist/billing/modules/checkout/components/SubscriptionSelector.d.ts +0 -1
  166. package/dist/billing/modules/checkout/components/SubscriptionSelector.js +1 -2
  167. package/dist/billing/modules/checkout/components/SubscriptionSelector.js.map +1 -1
  168. package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.d.ts +0 -1
  169. package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.js +1 -2
  170. package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.js.map +1 -1
  171. package/dist/billing/modules/checkout/components/WebCheckoutRedirectView.d.ts +0 -1
  172. package/dist/billing/modules/checkout/components/WebCheckoutRedirectView.js +5 -6
  173. package/dist/billing/modules/checkout/components/WebCheckoutRedirectView.js.map +1 -1
  174. package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.d.ts +0 -1
  175. package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.js +7 -8
  176. package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.js.map +1 -1
  177. package/dist/billing/modules/checkout/components/index.d.ts +0 -1
  178. package/dist/billing/modules/checkout/components/index.js +12 -11
  179. package/dist/billing/modules/checkout/hooks/index.d.ts +0 -1
  180. package/dist/billing/modules/checkout/hooks/index.js +5 -4
  181. package/dist/billing/modules/checkout/hooks/useCheckout.d.ts +0 -1
  182. package/dist/billing/modules/checkout/hooks/useCheckout.js +182 -195
  183. package/dist/billing/modules/checkout/hooks/useCheckout.js.map +1 -1
  184. package/dist/billing/modules/checkout/hooks/useNativeCheckout.d.ts +0 -1
  185. package/dist/billing/modules/checkout/hooks/useNativeCheckout.js +33 -32
  186. package/dist/billing/modules/checkout/hooks/useNativeCheckout.js.map +1 -1
  187. package/dist/billing/modules/checkout/hooks/usePaymentProviders.d.ts +0 -1
  188. package/dist/billing/modules/checkout/hooks/usePaymentProviders.js +1 -2
  189. package/dist/billing/modules/checkout/hooks/usePaymentProviders.js.map +1 -1
  190. package/dist/billing/modules/checkout/hooks/usePaymentStatusPolling.d.ts +0 -1
  191. package/dist/billing/modules/checkout/hooks/usePaymentStatusPolling.js +1 -2
  192. package/dist/billing/modules/checkout/hooks/usePaymentStatusPolling.js.map +1 -1
  193. package/dist/billing/modules/checkout/hooks/useStoreShipping.d.ts +4 -8
  194. package/dist/billing/modules/checkout/hooks/useStoreShipping.js +1 -2
  195. package/dist/billing/modules/checkout/hooks/useStoreShipping.js.map +1 -1
  196. package/dist/billing/modules/checkout/index.d.ts +0 -1
  197. package/dist/billing/modules/checkout/index.js +19 -19
  198. package/dist/billing/modules/checkout/pages/CheckoutPage.d.ts +0 -1
  199. package/dist/billing/modules/checkout/pages/CheckoutPage.js +730 -732
  200. package/dist/billing/modules/checkout/pages/CheckoutPage.js.map +1 -1
  201. package/dist/billing/modules/checkout/pages/index.d.ts +0 -1
  202. package/dist/billing/modules/checkout/pages/index.js +1 -1
  203. package/dist/billing/modules/checkout/types/index.d.ts +0 -1
  204. package/dist/billing/modules/checkout/utils/storeOrder.d.ts +0 -1
  205. package/dist/billing/modules/checkout/utils/storeOrder.js +0 -1
  206. package/dist/billing/modules/checkout/utils/storeOrder.js.map +1 -1
  207. package/dist/billing/modules/coupons/index.d.ts +0 -1
  208. package/dist/billing/modules/coupons/pages/CouponDetailPage.d.ts +0 -1
  209. package/dist/billing/modules/coupons/pages/CouponDetailPage.js +5 -6
  210. package/dist/billing/modules/coupons/pages/CouponDetailPage.js.map +1 -1
  211. package/dist/billing/modules/coupons/pages/CouponsListPage.d.ts +0 -1
  212. package/dist/billing/modules/coupons/pages/CouponsListPage.js +15 -13
  213. package/dist/billing/modules/coupons/pages/CouponsListPage.js.map +1 -1
  214. package/dist/billing/modules/coupons/pages/CreateCouponPage.d.ts +0 -1
  215. package/dist/billing/modules/coupons/pages/CreateCouponPage.js +12 -10
  216. package/dist/billing/modules/coupons/pages/CreateCouponPage.js.map +1 -1
  217. package/dist/billing/modules/coupons/pages/EditCouponPage.d.ts +0 -1
  218. package/dist/billing/modules/coupons/pages/EditCouponPage.js +7 -11
  219. package/dist/billing/modules/coupons/pages/EditCouponPage.js.map +1 -1
  220. package/dist/billing/modules/coupons/pages/index.d.ts +0 -1
  221. package/dist/billing/modules/coupons/pages/index.js +5 -4
  222. package/dist/billing/modules/credits/hooks/index.d.ts +0 -1
  223. package/dist/billing/modules/credits/hooks/useCredits.d.ts +0 -1
  224. package/dist/billing/modules/credits/hooks/useCredits.js +20 -21
  225. package/dist/billing/modules/credits/hooks/useCredits.js.map +1 -1
  226. package/dist/billing/modules/credits/index.d.ts +0 -1
  227. package/dist/billing/modules/credits/pages/AdminCreditsPage.d.ts +0 -1
  228. package/dist/billing/modules/credits/pages/AdminCreditsPage.js +19 -24
  229. package/dist/billing/modules/credits/pages/AdminCreditsPage.js.map +1 -1
  230. package/dist/billing/modules/credits/pages/CreditTransactionsPage.d.ts +0 -1
  231. package/dist/billing/modules/credits/pages/CreditTransactionsPage.js +26 -27
  232. package/dist/billing/modules/credits/pages/CreditTransactionsPage.js.map +1 -1
  233. package/dist/billing/modules/credits/pages/CreditWithdrawalPage.d.ts +0 -1
  234. package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js +54 -52
  235. package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js.map +1 -1
  236. package/dist/billing/modules/credits/pages/CreditsPage.d.ts +0 -1
  237. package/dist/billing/modules/credits/pages/CreditsPage.js +37 -38
  238. package/dist/billing/modules/credits/pages/CreditsPage.js.map +1 -1
  239. package/dist/billing/modules/credits/pages/index.d.ts +0 -1
  240. package/dist/billing/modules/credits/pages/index.js +5 -4
  241. package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.d.ts +0 -1
  242. package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.js +2 -3
  243. package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.js.map +1 -1
  244. package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.d.ts +0 -1
  245. package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.js +35 -43
  246. package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.js.map +1 -1
  247. package/dist/billing/modules/dashboard/components/BillingAccountCard.d.ts +0 -1
  248. package/dist/billing/modules/dashboard/components/BillingAccountCard.js +1 -2
  249. package/dist/billing/modules/dashboard/components/BillingAccountCard.js.map +1 -1
  250. package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.d.ts +0 -1
  251. package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.js +1 -2
  252. package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.js.map +1 -1
  253. package/dist/billing/modules/dashboard/components/PaymentMethodsSection.d.ts +0 -1
  254. package/dist/billing/modules/dashboard/components/PaymentMethodsSection.js +2 -5
  255. package/dist/billing/modules/dashboard/components/PaymentMethodsSection.js.map +1 -1
  256. package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.d.ts +0 -1
  257. package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.js +1 -2
  258. package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.js.map +1 -1
  259. package/dist/billing/modules/dashboard/components/index.d.ts +0 -1
  260. package/dist/billing/modules/dashboard/components/index.js +7 -6
  261. package/dist/billing/modules/dashboard/hooks/index.d.ts +0 -1
  262. package/dist/billing/modules/dashboard/hooks/index.js +3 -2
  263. package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.d.ts +0 -1
  264. package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.js +2 -3
  265. package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.js.map +1 -1
  266. package/dist/billing/modules/dashboard/hooks/useDashboard.d.ts +0 -1
  267. package/dist/billing/modules/dashboard/hooks/useDashboard.js +2 -3
  268. package/dist/billing/modules/dashboard/hooks/useDashboard.js.map +1 -1
  269. package/dist/billing/modules/dashboard/index.d.ts +0 -1
  270. package/dist/billing/modules/dashboard/index.js +11 -10
  271. package/dist/billing/modules/dashboard/pages/OverviewPage.d.ts +0 -1
  272. package/dist/billing/modules/dashboard/pages/OverviewPage.js +266 -264
  273. package/dist/billing/modules/dashboard/pages/OverviewPage.js.map +1 -1
  274. package/dist/billing/modules/dashboard/pages/index.d.ts +0 -1
  275. package/dist/billing/modules/dashboard/pages/index.js +1 -1
  276. package/dist/billing/modules/discounts/index.d.ts +0 -1
  277. package/dist/billing/modules/discounts/index.js +1 -2
  278. package/dist/billing/modules/discounts/pages/DiscountsListPage.d.ts +0 -1
  279. package/dist/billing/modules/discounts/pages/DiscountsListPage.js +169 -176
  280. package/dist/billing/modules/discounts/pages/DiscountsListPage.js.map +1 -1
  281. package/dist/billing/modules/discounts/pages/index.d.ts +0 -1
  282. package/dist/billing/modules/discounts/pages/index.js +1 -1
  283. package/dist/billing/modules/earnings/api.d.ts +0 -1
  284. package/dist/billing/modules/earnings/api.js +66 -67
  285. package/dist/billing/modules/earnings/api.js.map +1 -1
  286. package/dist/billing/modules/earnings/index.d.ts +0 -1
  287. package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.d.ts +0 -1
  288. package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.js +17 -17
  289. package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.js.map +1 -1
  290. package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.d.ts +0 -1
  291. package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.js +188 -189
  292. package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.js.map +1 -1
  293. package/dist/billing/modules/earnings/pages/EarningsPage.d.ts +0 -1
  294. package/dist/billing/modules/earnings/pages/EarningsPage.js +111 -111
  295. package/dist/billing/modules/earnings/pages/EarningsPage.js.map +1 -1
  296. package/dist/billing/modules/earnings/pages/PayoutAdminPage.d.ts +0 -1
  297. package/dist/billing/modules/earnings/pages/PayoutAdminPage.js +29 -30
  298. package/dist/billing/modules/earnings/pages/PayoutAdminPage.js.map +1 -1
  299. package/dist/billing/modules/earnings/pages/PayoutsPage.d.ts +0 -1
  300. package/dist/billing/modules/earnings/pages/PayoutsPage.js +103 -104
  301. package/dist/billing/modules/earnings/pages/PayoutsPage.js.map +1 -1
  302. package/dist/billing/modules/earnings/payoutAccountStatus.d.ts +0 -1
  303. package/dist/billing/modules/earnings/payoutAccountStatus.js +1 -2
  304. package/dist/billing/modules/earnings/payoutAccountStatus.js.map +1 -1
  305. package/dist/billing/modules/plans/constants/enterprise.d.ts +0 -1
  306. package/dist/billing/modules/plans/constants/enterprise.js +1 -2
  307. package/dist/billing/modules/plans/constants/enterprise.js.map +1 -1
  308. package/dist/billing/modules/plans/constants/featuredQuotas.d.ts +0 -1
  309. package/dist/billing/modules/plans/constants/featuredQuotas.js +1 -2
  310. package/dist/billing/modules/plans/constants/featuredQuotas.js.map +1 -1
  311. package/dist/billing/modules/plans/hooks/index.d.ts +0 -1
  312. package/dist/billing/modules/plans/hooks/index.js +3 -2
  313. package/dist/billing/modules/plans/hooks/usePlans.d.ts +0 -1
  314. package/dist/billing/modules/plans/hooks/usePlans.js +1 -2
  315. package/dist/billing/modules/plans/hooks/usePlans.js.map +1 -1
  316. package/dist/billing/modules/plans/hooks/useQuotas.d.ts +0 -1
  317. package/dist/billing/modules/plans/hooks/useQuotas.js +1 -2
  318. package/dist/billing/modules/plans/hooks/useQuotas.js.map +1 -1
  319. package/dist/billing/modules/plans/index.d.ts +0 -1
  320. package/dist/billing/modules/plans/index.js +11 -11
  321. package/dist/billing/modules/plans/pages/PlanAssignFreePage.d.ts +0 -1
  322. package/dist/billing/modules/plans/pages/PlanAssignFreePage.js +12 -15
  323. package/dist/billing/modules/plans/pages/PlanAssignFreePage.js.map +1 -1
  324. package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.d.ts +0 -1
  325. package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js +38 -39
  326. package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js.map +1 -1
  327. package/dist/billing/modules/plans/pages/PlanCreatePage.d.ts +0 -1
  328. package/dist/billing/modules/plans/pages/PlanCreatePage.js +10 -11
  329. package/dist/billing/modules/plans/pages/PlanCreatePage.js.map +1 -1
  330. package/dist/billing/modules/plans/pages/PlanDetailPage.d.ts +0 -1
  331. package/dist/billing/modules/plans/pages/PlanDetailPage.js +40 -41
  332. package/dist/billing/modules/plans/pages/PlanDetailPage.js.map +1 -1
  333. package/dist/billing/modules/plans/pages/PlanEditPage.d.ts +0 -1
  334. package/dist/billing/modules/plans/pages/PlanEditPage.js +15 -16
  335. package/dist/billing/modules/plans/pages/PlanEditPage.js.map +1 -1
  336. package/dist/billing/modules/plans/pages/PlansBrowsePage.d.ts +0 -1
  337. package/dist/billing/modules/plans/pages/PlansBrowsePage.js +18 -19
  338. package/dist/billing/modules/plans/pages/PlansBrowsePage.js.map +1 -1
  339. package/dist/billing/modules/plans/pages/PlansListPage.d.ts +0 -1
  340. package/dist/billing/modules/plans/pages/PlansListPage.js +100 -101
  341. package/dist/billing/modules/plans/pages/PlansListPage.js.map +1 -1
  342. package/dist/billing/modules/plans/pages/index.d.ts +0 -1
  343. package/dist/billing/modules/plans/pages/index.js +8 -7
  344. package/dist/billing/modules/plans/utils/currencyPriceOverrides.d.ts +0 -1
  345. package/dist/billing/modules/plans/utils/currencyPriceOverrides.js +1 -2
  346. package/dist/billing/modules/plans/utils/currencyPriceOverrides.js.map +1 -1
  347. package/dist/billing/modules/plans/utils/planSelector.d.ts +0 -1
  348. package/dist/billing/modules/plans/utils/planSelector.js +1 -2
  349. package/dist/billing/modules/plans/utils/planSelector.js.map +1 -1
  350. package/dist/billing/modules/promotions/index.d.ts +0 -1
  351. package/dist/billing/modules/promotions/pages/CreatePromotionPage.d.ts +0 -1
  352. package/dist/billing/modules/promotions/pages/CreatePromotionPage.js +5 -6
  353. package/dist/billing/modules/promotions/pages/CreatePromotionPage.js.map +1 -1
  354. package/dist/billing/modules/promotions/pages/PromotionsListPage.d.ts +0 -1
  355. package/dist/billing/modules/promotions/pages/PromotionsListPage.js +5 -6
  356. package/dist/billing/modules/promotions/pages/PromotionsListPage.js.map +1 -1
  357. package/dist/billing/modules/promotions/pages/index.d.ts +0 -1
  358. package/dist/billing/modules/promotions/pages/index.js +3 -2
  359. package/dist/billing/modules/quota/hooks/index.d.ts +0 -1
  360. package/dist/billing/modules/quota/hooks/index.js +1 -1
  361. package/dist/billing/modules/quota/hooks/useQuota.d.ts +0 -1
  362. package/dist/billing/modules/quota/hooks/useQuotaTemplates.d.ts +0 -1
  363. package/dist/billing/modules/quota/hooks/useQuotaTemplates.js +1 -2
  364. package/dist/billing/modules/quota/hooks/useQuotaTemplates.js.map +1 -1
  365. package/dist/billing/modules/quota/index.d.ts +0 -1
  366. package/dist/billing/modules/quota/index.js +8 -8
  367. package/dist/billing/modules/quota/pages/QuotaAssignFreePage.d.ts +0 -1
  368. package/dist/billing/modules/quota/pages/QuotaAssignFreePage.js +12 -15
  369. package/dist/billing/modules/quota/pages/QuotaAssignFreePage.js.map +1 -1
  370. package/dist/billing/modules/quota/pages/QuotaPage.d.ts +0 -1
  371. package/dist/billing/modules/quota/pages/QuotaPage.js +3 -3
  372. package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.d.ts +0 -1
  373. package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js +13 -14
  374. package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js.map +1 -1
  375. package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.d.ts +0 -1
  376. package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js +9 -10
  377. package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js.map +1 -1
  378. package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.d.ts +0 -1
  379. package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js +12 -13
  380. package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js.map +1 -1
  381. package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.d.ts +0 -1
  382. package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js +16 -17
  383. package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js.map +1 -1
  384. package/dist/billing/modules/quota/pages/index.d.ts +0 -1
  385. package/dist/billing/modules/quota/pages/index.js +6 -5
  386. package/dist/billing/modules/quota/utils/quotaSelector.d.ts +0 -1
  387. package/dist/billing/modules/quota/utils/quotaSelector.js +1 -2
  388. package/dist/billing/modules/quota/utils/quotaSelector.js.map +1 -1
  389. package/dist/billing/modules/settings/index.d.ts +0 -1
  390. package/dist/billing/modules/settings/pages/SettingsPage.d.ts +0 -1
  391. package/dist/billing/modules/settings/pages/SettingsPage.js +12 -13
  392. package/dist/billing/modules/settings/pages/SettingsPage.js.map +1 -1
  393. package/dist/billing/modules/settings/pages/TeamPermissionsPage.d.ts +0 -1
  394. package/dist/billing/modules/settings/pages/TeamPermissionsPage.js +32 -32
  395. package/dist/billing/modules/settings/pages/TeamPermissionsPage.js.map +1 -1
  396. package/dist/billing/modules/settings/pages/index.d.ts +0 -1
  397. package/dist/billing/modules/settings/pages/index.js +3 -2
  398. package/dist/billing/modules/store/graphql/index.d.ts +0 -1
  399. package/dist/billing/modules/store/index.d.ts +0 -1
  400. package/dist/billing/modules/store/index.js +1 -2
  401. package/dist/billing/modules/store/pages/StoreCheckoutPage.d.ts +0 -1
  402. package/dist/billing/modules/store/pages/StoreCheckoutPage.js +1 -2
  403. package/dist/billing/modules/store/pages/StoreCheckoutPage.js.map +1 -1
  404. package/dist/billing/modules/subscriptions/components/ManageSeatsModal.d.ts +0 -1
  405. package/dist/billing/modules/subscriptions/components/ManageSeatsModal.js +9 -11
  406. package/dist/billing/modules/subscriptions/components/ManageSeatsModal.js.map +1 -1
  407. package/dist/billing/modules/subscriptions/hooks/index.d.ts +0 -1
  408. package/dist/billing/modules/subscriptions/hooks/index.js +1 -1
  409. package/dist/billing/modules/subscriptions/hooks/useSubscriptions.d.ts +0 -1
  410. package/dist/billing/modules/subscriptions/hooks/useSubscriptions.js +1 -2
  411. package/dist/billing/modules/subscriptions/hooks/useSubscriptions.js.map +1 -1
  412. package/dist/billing/modules/subscriptions/index.d.ts +0 -1
  413. package/dist/billing/modules/subscriptions/index.js +6 -6
  414. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.d.ts +0 -1
  415. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js +311 -312
  416. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js.map +1 -1
  417. package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.d.ts +0 -1
  418. package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js +61 -62
  419. package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js.map +1 -1
  420. package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.d.ts +0 -1
  421. package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js +30 -31
  422. package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js.map +1 -1
  423. package/dist/billing/modules/subscriptions/pages/index.d.ts +0 -1
  424. package/dist/billing/modules/subscriptions/pages/index.js +4 -3
  425. package/dist/billing/modules/usage/components/WorkspaceAiSpendPanel.d.ts +0 -1
  426. package/dist/billing/modules/usage/components/WorkspaceAiSpendPanel.js +17 -18
  427. package/dist/billing/modules/usage/components/WorkspaceAiSpendPanel.js.map +1 -1
  428. package/dist/billing/modules/usage/hooks/index.d.ts +0 -1
  429. package/dist/billing/modules/usage/hooks/useUsage.d.ts +0 -1
  430. package/dist/billing/modules/usage/hooks/useUsage.js +72 -73
  431. package/dist/billing/modules/usage/hooks/useUsage.js.map +1 -1
  432. package/dist/billing/modules/usage/hooks/useWorkspaceAiSpend.d.ts +0 -1
  433. package/dist/billing/modules/usage/hooks/useWorkspaceAiSpend.js +12 -13
  434. package/dist/billing/modules/usage/hooks/useWorkspaceAiSpend.js.map +1 -1
  435. package/dist/billing/modules/usage/index.d.ts +0 -1
  436. package/dist/billing/modules/usage/index.js +1 -2
  437. package/dist/billing/modules/usage/pages/UsagePage.d.ts +0 -1
  438. package/dist/billing/modules/usage/pages/UsagePage.js +229 -227
  439. package/dist/billing/modules/usage/pages/UsagePage.js.map +1 -1
  440. package/dist/billing/modules/usage/pages/index.d.ts +0 -1
  441. package/dist/billing/modules/usage/pages/index.js +1 -1
  442. package/dist/billing/modules/usage/utils/aiSpend.d.ts +0 -1
  443. package/dist/billing/modules/usage/utils/aiSpend.js +2 -3
  444. package/dist/billing/modules/usage/utils/aiSpend.js.map +1 -1
  445. package/dist/billing/providers/BillingProvider.d.ts +0 -1
  446. package/dist/billing/providers/BillingProvider.js +3 -4
  447. package/dist/billing/providers/BillingProvider.js.map +1 -1
  448. package/dist/billing/shared/components/AccessDenied.d.ts +0 -1
  449. package/dist/billing/shared/components/AccessDenied.js +1 -2
  450. package/dist/billing/shared/components/AccessDenied.js.map +1 -1
  451. package/dist/billing/shared/components/ActorIdentity.d.ts +0 -1
  452. package/dist/billing/shared/components/ActorIdentity.js +2 -3
  453. package/dist/billing/shared/components/ActorIdentity.js.map +1 -1
  454. package/dist/billing/shared/components/CurrencyPriceOverridesEditor.d.ts +0 -1
  455. package/dist/billing/shared/components/CurrencyPriceOverridesEditor.js +1 -2
  456. package/dist/billing/shared/components/CurrencyPriceOverridesEditor.js.map +1 -1
  457. package/dist/billing/shared/components/EmptyState.d.ts +0 -1
  458. package/dist/billing/shared/components/EmptyState.js +1 -2
  459. package/dist/billing/shared/components/EmptyState.js.map +1 -1
  460. package/dist/billing/shared/components/GeoPricingOverridesEditor.d.ts +0 -1
  461. package/dist/billing/shared/components/PageHeader.d.ts +0 -1
  462. package/dist/billing/shared/components/PageHeader.js +1 -2
  463. package/dist/billing/shared/components/PageHeader.js.map +1 -1
  464. package/dist/billing/shared/components/PushPermissionNudge.d.ts +0 -1
  465. package/dist/billing/shared/components/PushPermissionNudge.js +2 -3
  466. package/dist/billing/shared/components/PushPermissionNudge.js.map +1 -1
  467. package/dist/billing/shared/components/ServerError.d.ts +0 -1
  468. package/dist/billing/shared/components/ServerError.js +1 -2
  469. package/dist/billing/shared/components/ServerError.js.map +1 -1
  470. package/dist/billing/shared/components/StatCard.d.ts +0 -1
  471. package/dist/billing/shared/components/StatCard.js +1 -2
  472. package/dist/billing/shared/components/StatCard.js.map +1 -1
  473. package/dist/billing/shared/components/index.d.ts +0 -1
  474. package/dist/billing/shared/components/index.js +8 -7
  475. package/dist/billing/shared/hooks/index.d.ts +0 -1
  476. package/dist/billing/shared/hooks/index.js +1 -1
  477. package/dist/billing/shared/hooks/useActorProfiles.d.ts +0 -1
  478. package/dist/billing/shared/hooks/useActorProfiles.js +4 -8
  479. package/dist/billing/shared/hooks/useActorProfiles.js.map +1 -1
  480. package/dist/billing/shared/hooks/useTr.d.ts +0 -1
  481. package/dist/billing/shared/hooks/useTr.js +1 -2
  482. package/dist/billing/shared/hooks/useTr.js.map +1 -1
  483. package/dist/billing/shared/index.d.ts +0 -1
  484. package/dist/billing/shared/types/graphql.d.ts +0 -1
  485. package/dist/billing/shared/types/graphql.js +1 -2
  486. package/dist/billing/shared/types/graphql.js.map +1 -1
  487. package/dist/billing/shared/types/index.d.ts +0 -1
  488. package/dist/billing/shared/ui/Card.d.ts +1 -2
  489. package/dist/billing/shared/ui/Card.js +1 -2
  490. package/dist/billing/shared/ui/Card.js.map +1 -1
  491. package/dist/billing/shared/ui/MetricCard.d.ts +1 -2
  492. package/dist/billing/shared/ui/MetricCard.js +1 -2
  493. package/dist/billing/shared/ui/MetricCard.js.map +1 -1
  494. package/dist/billing/shared/ui/ProgressBar.d.ts +1 -2
  495. package/dist/billing/shared/ui/ProgressBar.js +1 -2
  496. package/dist/billing/shared/ui/ProgressBar.js.map +1 -1
  497. package/dist/billing/shared/ui/SectionHeader.d.ts +1 -2
  498. package/dist/billing/shared/ui/StatusPill.d.ts +1 -2
  499. package/dist/billing/shared/ui/StatusPill.js +1 -2
  500. package/dist/billing/shared/ui/StatusPill.js.map +1 -1
  501. package/dist/billing/shared/ui/index.d.ts +0 -1
  502. package/dist/billing/shared/ui/index.js +5 -4
  503. package/dist/billing/shared/utils/directActivityGraphql.d.ts +2 -1
  504. package/dist/billing/shared/utils/directActivityGraphql.js +1 -1
  505. package/dist/billing/shared/utils/directBillingGraphql.d.ts +2 -1
  506. package/dist/billing/shared/utils/directBillingGraphql.js +3 -3
  507. package/dist/billing/shared/utils/directBillingGraphql.js.map +1 -1
  508. package/dist/billing/shared/utils/error.d.ts +0 -1
  509. package/dist/billing/shared/utils/error.js +1 -2
  510. package/dist/billing/shared/utils/error.js.map +1 -1
  511. package/dist/billing/shared/utils/format.d.ts +0 -1
  512. package/dist/billing/shared/utils/format.js +1 -2
  513. package/dist/billing/shared/utils/format.js.map +1 -1
  514. package/dist/billing/shared/utils/gatewayGraphql.d.ts +2 -1
  515. package/dist/billing/shared/utils/gatewayGraphql.js +4 -4
  516. package/dist/billing/shared/utils/gatewayGraphql.js.map +1 -1
  517. package/dist/billing/shared/utils/index.d.ts +0 -1
  518. package/dist/billing/shared/utils/index.js +9 -8
  519. package/dist/billing/shared/utils/navigation.d.ts +0 -1
  520. package/dist/billing/shared/utils/navigation.js +1 -2
  521. package/dist/billing/shared/utils/navigation.js.map +1 -1
  522. package/dist/billing/shared/utils/paymentTheme.d.ts +0 -1
  523. package/dist/billing/shared/utils/paymentTheme.js +2 -3
  524. package/dist/billing/shared/utils/paymentTheme.js.map +1 -1
  525. package/dist/billing/shared/utils/pinnedRequest.d.ts +48 -0
  526. package/dist/billing/shared/utils/pinnedRequest.js +63 -0
  527. package/dist/billing/shared/utils/pinnedRequest.js.map +1 -0
  528. package/dist/billing/shared/utils/planFeatureQuantity.d.ts +0 -1
  529. package/dist/billing/shared/utils/planFeatureQuantity.js +2 -3
  530. package/dist/billing/shared/utils/planFeatureQuantity.js.map +1 -1
  531. package/dist/billing/shared/utils/status.d.ts +0 -1
  532. package/dist/billing/shared/utils/status.js +24 -25
  533. package/dist/billing/shared/utils/status.js.map +1 -1
  534. package/dist/billing/shared/utils/tokens.d.ts +0 -1
  535. package/dist/billing/shared/utils/tokens.js +1 -2
  536. package/dist/billing/shared/utils/tokens.js.map +1 -1
  537. package/dist/billing/translations/en.d.ts +0 -1
  538. package/dist/billing/types/index.d.ts +0 -1
  539. package/dist/dev/main.d.ts +0 -1
  540. package/dist/generated/global-operations.d.ts +3252 -3206
  541. package/dist/generated/global-operations.js +445 -422
  542. package/dist/generated/global-operations.js.map +1 -1
  543. package/dist/generated/global-types.d.ts +2 -22
  544. package/dist/generated/global-types.js +1 -2
  545. package/dist/generated/global-types.js.map +1 -1
  546. package/dist/generated/wspace-operations.d.ts +76 -47
  547. package/dist/generated/wspace-operations.js +2 -3
  548. package/dist/generated/wspace-operations.js.map +1 -1
  549. package/dist/generated/wspace-types.d.ts +4 -24
  550. package/dist/index.d.ts +0 -1
  551. package/dist/index.js +1 -2
  552. package/dist/node_modules/@capacitor/core/dist/index.js +12 -14
  553. package/dist/node_modules/@capacitor/core/dist/index.js.map +1 -1
  554. package/dist/node_modules/sonner/dist/index.js +75 -69
  555. package/dist/node_modules/sonner/dist/index.js.map +1 -1
  556. package/dist/utils/nativeBridge.d.ts +0 -1
  557. package/dist/utils/nativeBridge.js +1 -2
  558. package/package.json +66 -55
  559. package/dist/billing/BillingAdminRoutes.d.ts.map +0 -1
  560. package/dist/billing/BillingRoot.d.ts.map +0 -1
  561. package/dist/billing/BillingUserRoutes.d.ts.map +0 -1
  562. package/dist/billing/hooks/useBillingAccountSelection.d.ts.map +0 -1
  563. package/dist/billing/hooks/useBillingEventEmitter.d.ts.map +0 -1
  564. package/dist/billing/hooks/useBillingNavigate.d.ts.map +0 -1
  565. package/dist/billing/hooks/useBillingPermissions.d.ts.map +0 -1
  566. package/dist/billing/hooks/useDefaultBillingCurrency.d.ts.map +0 -1
  567. package/dist/billing/hooks/useProducts.d.ts.map +0 -1
  568. package/dist/billing/index.d.ts.map +0 -1
  569. package/dist/billing/lib/native-purchases.d.ts.map +0 -1
  570. package/dist/billing/modules/addons/components/FloatingCartDrawer.d.ts.map +0 -1
  571. package/dist/billing/modules/addons/hooks/index.d.ts.map +0 -1
  572. package/dist/billing/modules/addons/hooks/useAddonPurchaseEligibility.d.ts.map +0 -1
  573. package/dist/billing/modules/addons/hooks/useAddons.d.ts.map +0 -1
  574. package/dist/billing/modules/addons/index.d.ts.map +0 -1
  575. package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.d.ts.map +0 -1
  576. package/dist/billing/modules/addons/pages/AddonCreatePage.d.ts.map +0 -1
  577. package/dist/billing/modules/addons/pages/AddonDetailPage.d.ts.map +0 -1
  578. package/dist/billing/modules/addons/pages/AddonEditPage.d.ts.map +0 -1
  579. package/dist/billing/modules/addons/pages/AddonsBrowsePage.d.ts.map +0 -1
  580. package/dist/billing/modules/addons/pages/AddonsListPage.d.ts.map +0 -1
  581. package/dist/billing/modules/addons/pages/index.d.ts.map +0 -1
  582. package/dist/billing/modules/addons/store/addonCartStore.d.ts.map +0 -1
  583. package/dist/billing/modules/affiliate/api.d.ts.map +0 -1
  584. package/dist/billing/modules/affiliate/index.d.ts.map +0 -1
  585. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.d.ts.map +0 -1
  586. package/dist/billing/modules/analytics/index.d.ts.map +0 -1
  587. package/dist/billing/modules/analytics/pages/AnalyticsPage.d.ts.map +0 -1
  588. package/dist/billing/modules/analytics/pages/index.d.ts.map +0 -1
  589. package/dist/billing/modules/billing/hooks/index.d.ts.map +0 -1
  590. package/dist/billing/modules/billing/hooks/useInvoices.d.ts.map +0 -1
  591. package/dist/billing/modules/billing/hooks/useOrderCallbacks.d.ts.map +0 -1
  592. package/dist/billing/modules/billing/hooks/usePayments.d.ts.map +0 -1
  593. package/dist/billing/modules/billing/hooks/useRefunds.d.ts.map +0 -1
  594. package/dist/billing/modules/billing/hooks/useTransactions.d.ts.map +0 -1
  595. package/dist/billing/modules/billing/index.d.ts.map +0 -1
  596. package/dist/billing/modules/billing/pages/BillingWebhookLogsPage.d.ts.map +0 -1
  597. package/dist/billing/modules/billing/pages/InvoiceDetailPage.d.ts.map +0 -1
  598. package/dist/billing/modules/billing/pages/InvoicesListPage.d.ts.map +0 -1
  599. package/dist/billing/modules/billing/pages/OrderCallbackLogsPage.d.ts.map +0 -1
  600. package/dist/billing/modules/billing/pages/PaymentMethodsPage.d.ts.map +0 -1
  601. package/dist/billing/modules/billing/pages/RefundIssueLogsPage.d.ts.map +0 -1
  602. package/dist/billing/modules/billing/pages/RefundsPage.d.ts.map +0 -1
  603. package/dist/billing/modules/billing/pages/TransactionsPage.d.ts.map +0 -1
  604. package/dist/billing/modules/billing/pages/UserRefundsPage.d.ts.map +0 -1
  605. package/dist/billing/modules/billing/pages/index.d.ts.map +0 -1
  606. package/dist/billing/modules/checkout/components/AutoPayToggle.d.ts.map +0 -1
  607. package/dist/billing/modules/checkout/components/BillingAccountSelector.d.ts.map +0 -1
  608. package/dist/billing/modules/checkout/components/CompactAutoPayToggle.d.ts.map +0 -1
  609. package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.d.ts.map +0 -1
  610. package/dist/billing/modules/checkout/components/CreditsAmountInput.d.ts.map +0 -1
  611. package/dist/billing/modules/checkout/components/CreditsPaymentOption.d.ts.map +0 -1
  612. package/dist/billing/modules/checkout/components/CurrencySelector.d.ts.map +0 -1
  613. package/dist/billing/modules/checkout/components/NativeCheckoutView.d.ts.map +0 -1
  614. package/dist/billing/modules/checkout/components/OrderSummary.d.ts.map +0 -1
  615. package/dist/billing/modules/checkout/components/PaymentProviderSelector.d.ts.map +0 -1
  616. package/dist/billing/modules/checkout/components/PromoCodeInput.d.ts.map +0 -1
  617. package/dist/billing/modules/checkout/components/RazorpayPaymentButton.d.ts.map +0 -1
  618. package/dist/billing/modules/checkout/components/SavedCardSelector.d.ts.map +0 -1
  619. package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.d.ts.map +0 -1
  620. package/dist/billing/modules/checkout/components/StoreShippingSection.d.ts.map +0 -1
  621. package/dist/billing/modules/checkout/components/StripePaymentForm.d.ts.map +0 -1
  622. package/dist/billing/modules/checkout/components/SubscriptionSelector.d.ts.map +0 -1
  623. package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.d.ts.map +0 -1
  624. package/dist/billing/modules/checkout/components/WebCheckoutRedirectView.d.ts.map +0 -1
  625. package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.d.ts.map +0 -1
  626. package/dist/billing/modules/checkout/components/index.d.ts.map +0 -1
  627. package/dist/billing/modules/checkout/hooks/index.d.ts.map +0 -1
  628. package/dist/billing/modules/checkout/hooks/useCheckout.d.ts.map +0 -1
  629. package/dist/billing/modules/checkout/hooks/useNativeCheckout.d.ts.map +0 -1
  630. package/dist/billing/modules/checkout/hooks/usePaymentProviders.d.ts.map +0 -1
  631. package/dist/billing/modules/checkout/hooks/usePaymentStatusPolling.d.ts.map +0 -1
  632. package/dist/billing/modules/checkout/hooks/useStoreShipping.d.ts.map +0 -1
  633. package/dist/billing/modules/checkout/index.d.ts.map +0 -1
  634. package/dist/billing/modules/checkout/pages/CheckoutPage.d.ts.map +0 -1
  635. package/dist/billing/modules/checkout/pages/index.d.ts.map +0 -1
  636. package/dist/billing/modules/checkout/types/index.d.ts.map +0 -1
  637. package/dist/billing/modules/checkout/utils/storeOrder.d.ts.map +0 -1
  638. package/dist/billing/modules/coupons/index.d.ts.map +0 -1
  639. package/dist/billing/modules/coupons/pages/CouponDetailPage.d.ts.map +0 -1
  640. package/dist/billing/modules/coupons/pages/CouponsListPage.d.ts.map +0 -1
  641. package/dist/billing/modules/coupons/pages/CreateCouponPage.d.ts.map +0 -1
  642. package/dist/billing/modules/coupons/pages/EditCouponPage.d.ts.map +0 -1
  643. package/dist/billing/modules/coupons/pages/index.d.ts.map +0 -1
  644. package/dist/billing/modules/credits/hooks/index.d.ts.map +0 -1
  645. package/dist/billing/modules/credits/hooks/useCredits.d.ts.map +0 -1
  646. package/dist/billing/modules/credits/index.d.ts.map +0 -1
  647. package/dist/billing/modules/credits/pages/AdminCreditsPage.d.ts.map +0 -1
  648. package/dist/billing/modules/credits/pages/CreditTransactionsPage.d.ts.map +0 -1
  649. package/dist/billing/modules/credits/pages/CreditWithdrawalPage.d.ts.map +0 -1
  650. package/dist/billing/modules/credits/pages/CreditsPage.d.ts.map +0 -1
  651. package/dist/billing/modules/credits/pages/index.d.ts.map +0 -1
  652. package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.d.ts.map +0 -1
  653. package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.d.ts.map +0 -1
  654. package/dist/billing/modules/dashboard/components/BillingAccountCard.d.ts.map +0 -1
  655. package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.d.ts.map +0 -1
  656. package/dist/billing/modules/dashboard/components/PaymentMethodsSection.d.ts.map +0 -1
  657. package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.d.ts.map +0 -1
  658. package/dist/billing/modules/dashboard/components/index.d.ts.map +0 -1
  659. package/dist/billing/modules/dashboard/hooks/index.d.ts.map +0 -1
  660. package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.d.ts.map +0 -1
  661. package/dist/billing/modules/dashboard/hooks/useDashboard.d.ts.map +0 -1
  662. package/dist/billing/modules/dashboard/index.d.ts.map +0 -1
  663. package/dist/billing/modules/dashboard/pages/OverviewPage.d.ts.map +0 -1
  664. package/dist/billing/modules/dashboard/pages/index.d.ts.map +0 -1
  665. package/dist/billing/modules/discounts/index.d.ts.map +0 -1
  666. package/dist/billing/modules/discounts/pages/DiscountsListPage.d.ts.map +0 -1
  667. package/dist/billing/modules/discounts/pages/index.d.ts.map +0 -1
  668. package/dist/billing/modules/earnings/api.d.ts.map +0 -1
  669. package/dist/billing/modules/earnings/index.d.ts.map +0 -1
  670. package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.d.ts.map +0 -1
  671. package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.d.ts.map +0 -1
  672. package/dist/billing/modules/earnings/pages/EarningsPage.d.ts.map +0 -1
  673. package/dist/billing/modules/earnings/pages/PayoutAdminPage.d.ts.map +0 -1
  674. package/dist/billing/modules/earnings/pages/PayoutsPage.d.ts.map +0 -1
  675. package/dist/billing/modules/earnings/payoutAccountStatus.d.ts.map +0 -1
  676. package/dist/billing/modules/plans/constants/enterprise.d.ts.map +0 -1
  677. package/dist/billing/modules/plans/constants/featuredQuotas.d.ts.map +0 -1
  678. package/dist/billing/modules/plans/hooks/index.d.ts.map +0 -1
  679. package/dist/billing/modules/plans/hooks/usePlans.d.ts.map +0 -1
  680. package/dist/billing/modules/plans/hooks/useQuotas.d.ts.map +0 -1
  681. package/dist/billing/modules/plans/index.d.ts.map +0 -1
  682. package/dist/billing/modules/plans/pages/PlanAssignFreePage.d.ts.map +0 -1
  683. package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.d.ts.map +0 -1
  684. package/dist/billing/modules/plans/pages/PlanCreatePage.d.ts.map +0 -1
  685. package/dist/billing/modules/plans/pages/PlanDetailPage.d.ts.map +0 -1
  686. package/dist/billing/modules/plans/pages/PlanEditPage.d.ts.map +0 -1
  687. package/dist/billing/modules/plans/pages/PlansBrowsePage.d.ts.map +0 -1
  688. package/dist/billing/modules/plans/pages/PlansListPage.d.ts.map +0 -1
  689. package/dist/billing/modules/plans/pages/index.d.ts.map +0 -1
  690. package/dist/billing/modules/plans/utils/currencyPriceOverrides.d.ts.map +0 -1
  691. package/dist/billing/modules/plans/utils/planSelector.d.ts.map +0 -1
  692. package/dist/billing/modules/promotions/index.d.ts.map +0 -1
  693. package/dist/billing/modules/promotions/pages/CreatePromotionPage.d.ts.map +0 -1
  694. package/dist/billing/modules/promotions/pages/PromotionsListPage.d.ts.map +0 -1
  695. package/dist/billing/modules/promotions/pages/index.d.ts.map +0 -1
  696. package/dist/billing/modules/quota/hooks/index.d.ts.map +0 -1
  697. package/dist/billing/modules/quota/hooks/useQuota.d.ts.map +0 -1
  698. package/dist/billing/modules/quota/hooks/useQuotaTemplates.d.ts.map +0 -1
  699. package/dist/billing/modules/quota/index.d.ts.map +0 -1
  700. package/dist/billing/modules/quota/pages/QuotaAssignFreePage.d.ts.map +0 -1
  701. package/dist/billing/modules/quota/pages/QuotaPage.d.ts.map +0 -1
  702. package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.d.ts.map +0 -1
  703. package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.d.ts.map +0 -1
  704. package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.d.ts.map +0 -1
  705. package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.d.ts.map +0 -1
  706. package/dist/billing/modules/quota/pages/index.d.ts.map +0 -1
  707. package/dist/billing/modules/quota/utils/quotaSelector.d.ts.map +0 -1
  708. package/dist/billing/modules/settings/index.d.ts.map +0 -1
  709. package/dist/billing/modules/settings/pages/SettingsPage.d.ts.map +0 -1
  710. package/dist/billing/modules/settings/pages/TeamPermissionsPage.d.ts.map +0 -1
  711. package/dist/billing/modules/settings/pages/index.d.ts.map +0 -1
  712. package/dist/billing/modules/store/graphql/index.d.ts.map +0 -1
  713. package/dist/billing/modules/store/index.d.ts.map +0 -1
  714. package/dist/billing/modules/store/pages/StoreCheckoutPage.d.ts.map +0 -1
  715. package/dist/billing/modules/subscriptions/components/ManageSeatsModal.d.ts.map +0 -1
  716. package/dist/billing/modules/subscriptions/hooks/index.d.ts.map +0 -1
  717. package/dist/billing/modules/subscriptions/hooks/useSubscriptions.d.ts.map +0 -1
  718. package/dist/billing/modules/subscriptions/index.d.ts.map +0 -1
  719. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.d.ts.map +0 -1
  720. package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.d.ts.map +0 -1
  721. package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.d.ts.map +0 -1
  722. package/dist/billing/modules/subscriptions/pages/index.d.ts.map +0 -1
  723. package/dist/billing/modules/usage/components/WorkspaceAiSpendPanel.d.ts.map +0 -1
  724. package/dist/billing/modules/usage/hooks/index.d.ts.map +0 -1
  725. package/dist/billing/modules/usage/hooks/useUsage.d.ts.map +0 -1
  726. package/dist/billing/modules/usage/hooks/useWorkspaceAiSpend.d.ts.map +0 -1
  727. package/dist/billing/modules/usage/index.d.ts.map +0 -1
  728. package/dist/billing/modules/usage/pages/UsagePage.d.ts.map +0 -1
  729. package/dist/billing/modules/usage/pages/index.d.ts.map +0 -1
  730. package/dist/billing/modules/usage/utils/aiSpend.d.ts.map +0 -1
  731. package/dist/billing/providers/BillingProvider.d.ts.map +0 -1
  732. package/dist/billing/shared/components/AccessDenied.d.ts.map +0 -1
  733. package/dist/billing/shared/components/ActorIdentity.d.ts.map +0 -1
  734. package/dist/billing/shared/components/CurrencyPriceOverridesEditor.d.ts.map +0 -1
  735. package/dist/billing/shared/components/EmptyState.d.ts.map +0 -1
  736. package/dist/billing/shared/components/GeoPricingOverridesEditor.d.ts.map +0 -1
  737. package/dist/billing/shared/components/PageHeader.d.ts.map +0 -1
  738. package/dist/billing/shared/components/PushPermissionNudge.d.ts.map +0 -1
  739. package/dist/billing/shared/components/ServerError.d.ts.map +0 -1
  740. package/dist/billing/shared/components/StatCard.d.ts.map +0 -1
  741. package/dist/billing/shared/components/index.d.ts.map +0 -1
  742. package/dist/billing/shared/hooks/index.d.ts.map +0 -1
  743. package/dist/billing/shared/hooks/useActorProfiles.d.ts.map +0 -1
  744. package/dist/billing/shared/hooks/useTr.d.ts.map +0 -1
  745. package/dist/billing/shared/index.d.ts.map +0 -1
  746. package/dist/billing/shared/types/graphql.d.ts.map +0 -1
  747. package/dist/billing/shared/types/index.d.ts.map +0 -1
  748. package/dist/billing/shared/ui/Card.d.ts.map +0 -1
  749. package/dist/billing/shared/ui/MetricCard.d.ts.map +0 -1
  750. package/dist/billing/shared/ui/ProgressBar.d.ts.map +0 -1
  751. package/dist/billing/shared/ui/SectionHeader.d.ts.map +0 -1
  752. package/dist/billing/shared/ui/StatusPill.d.ts.map +0 -1
  753. package/dist/billing/shared/ui/index.d.ts.map +0 -1
  754. package/dist/billing/shared/utils/directActivityGraphql.d.ts.map +0 -1
  755. package/dist/billing/shared/utils/directBillingGraphql.d.ts.map +0 -1
  756. package/dist/billing/shared/utils/error.d.ts.map +0 -1
  757. package/dist/billing/shared/utils/format.d.ts.map +0 -1
  758. package/dist/billing/shared/utils/gatewayGraphql.d.ts.map +0 -1
  759. package/dist/billing/shared/utils/index.d.ts.map +0 -1
  760. package/dist/billing/shared/utils/navigation.d.ts.map +0 -1
  761. package/dist/billing/shared/utils/paymentTheme.d.ts.map +0 -1
  762. package/dist/billing/shared/utils/planFeatureQuantity.d.ts.map +0 -1
  763. package/dist/billing/shared/utils/status.d.ts.map +0 -1
  764. package/dist/billing/shared/utils/tokens.d.ts.map +0 -1
  765. package/dist/billing/translations/en.d.ts.map +0 -1
  766. package/dist/billing/types/index.d.ts.map +0 -1
  767. package/dist/dev/main.d.ts.map +0 -1
  768. package/dist/generated/global-operations.d.ts.map +0 -1
  769. package/dist/generated/global-types.d.ts.map +0 -1
  770. package/dist/generated/wspace-operations.d.ts.map +0 -1
  771. package/dist/generated/wspace-types.d.ts.map +0 -1
  772. package/dist/index.d.ts.map +0 -1
  773. package/dist/utils/nativeBridge.d.ts.map +0 -1
@@ -1,48 +1,48 @@
1
- import { isNativeIAPAvailable as e } from "../../../lib/native-purchases.js";
2
- import { useBilling as t } from "../../../providers/BillingProvider.js";
1
+ import { useBillingNavigate as e } from "../../../hooks/useBillingNavigate.js";
2
+ import { useBillingEventEmitter as t } from "../../../hooks/useBillingEventEmitter.js";
3
3
  import { AccessDenied as n } from "../../../shared/components/AccessDenied.js";
4
4
  import { PageHeader as r } from "../../../shared/components/PageHeader.js";
5
+ import { useBillingPermissions as i } from "../../../hooks/useBillingPermissions.js";
6
+ import { useBilling as a } from "../../../providers/BillingProvider.js";
5
7
  import "../../../shared/components/index.js";
6
- import { useBillingEventEmitter as i } from "../../../hooks/useBillingEventEmitter.js";
7
- import { getStoredBillingAccountId as a } from "../../../hooks/useBillingAccountSelection.js";
8
- import { useBillingPermissions as o } from "../../../hooks/useBillingPermissions.js";
9
- import { useGetActiveSubscriptionsCheckoutQuery as ee, useGetBillingAccountsCheckoutQuery as te, useGetCostOfCreditsCheckoutQuery as ne, useGetPaymentMethodsCheckoutQuery as re, useGetPlanCheckoutQuery as ie, useGetSelectedAddonCheckoutQuery as ae, useGetStoreOrderCheckoutQuery as oe } from "../../../../generated/global-operations.js";
10
- import { useAddonCartStore as se } from "../../addons/store/addonCartStore.js";
11
- import { useBillingNavigate as ce } from "../../../hooks/useBillingNavigate.js";
12
- import { recordAffiliateEvent as le } from "../../affiliate/api.js";
13
- import { useMyWorkspaces as ue } from "../../usage/hooks/useUsage.js";
14
- import { STORE_SHIPPING_ITEM_ID as de, useSetStoreOrderShipping as fe } from "../hooks/useStoreShipping.js";
15
- import { useCheckout as pe } from "../hooks/useCheckout.js";
16
- import { useNativeCheckout as me } from "../hooks/useNativeCheckout.js";
17
- import { usePaymentProviders as he } from "../hooks/usePaymentProviders.js";
18
- import { usePaymentStatusPolling as ge } from "../hooks/usePaymentStatusPolling.js";
8
+ import { useAddonCartStore as o } from "../../addons/store/addonCartStore.js";
9
+ import { useMyWorkspaces as ee } from "../../usage/hooks/useUsage.js";
19
10
  import "../hooks/index.js";
20
- import { NativeCheckoutView as _e } from "../components/NativeCheckoutView.js";
21
- import { WebCheckoutRedirectView as ve } from "../components/WebCheckoutRedirectView.js";
22
- import { BillingAccountSelector as ye } from "../components/BillingAccountSelector.js";
23
- import { OrderSummary as be } from "../components/OrderSummary.js";
24
- import { PromoCodeInput as xe } from "../components/PromoCodeInput.js";
25
- import { CreditsAmountInput as Se } from "../components/CreditsAmountInput.js";
26
- import { StripePaymentForm as Ce } from "../components/StripePaymentForm.js";
27
- import { RazorpayPaymentButton as we } from "../components/RazorpayPaymentButton.js";
28
- import { SubscriptionSelector as Te } from "../components/SubscriptionSelector.js";
29
- import { SimpleAutoPayToggle as Ee } from "../components/SimpleAutoPayToggle.js";
30
- import { UnifiedPaymentMethodSelector as De } from "../components/UnifiedPaymentMethodSelector.js";
31
- import { CompleteBillingAccountModal as Oe, isBillingAccountComplete as ke } from "../components/CompleteBillingAccountModal.js";
32
- import { StoreShippingSection as Ae } from "../components/StoreShippingSection.js";
33
- import { WorkspaceQuotaAssignmentModal as je, isWorkspaceScopedQuota as Me } from "../components/WorkspaceQuotaAssignmentModal.js";
11
+ import { isNativeIAPAvailable as s } from "../../../lib/native-purchases.js";
12
+ import { NativeCheckoutView as c } from "../components/NativeCheckoutView.js";
13
+ import { WebCheckoutRedirectView as te } from "../components/WebCheckoutRedirectView.js";
14
+ import { getStoredBillingAccountId as ne } from "../../../hooks/useBillingAccountSelection.js";
15
+ import { useCheckout as re } from "../hooks/useCheckout.js";
16
+ import { useNativeCheckout as ie } from "../hooks/useNativeCheckout.js";
17
+ import { usePaymentProviders as ae } from "../hooks/usePaymentProviders.js";
18
+ import { usePaymentStatusPolling as oe } from "../hooks/usePaymentStatusPolling.js";
19
+ import { useGetActiveSubscriptionsCheckoutQuery as se, useGetBillingAccountsCheckoutQuery as ce, useGetCostOfCreditsCheckoutQuery as le, useGetPaymentMethodsCheckoutQuery as ue, useGetPlanCheckoutQuery as de, useGetSelectedAddonCheckoutQuery as fe, useGetStoreOrderCheckoutQuery as pe } from "../../../../generated/global-operations.js";
34
20
  import "../components/index.js";
35
- import { buildStoreOrderCheckoutItems as Ne, normalizeStoreOrderCurrency as Pe } from "../utils/storeOrder.js";
36
- import { useCallback as s, useEffect as c, useMemo as l, useRef as Fe, useState as u } from "react";
37
- import { ArrowLeft as Ie, ArrowRight as Le, Blocks as Re, CheckCircle as ze, Coins as Be, CreditCard as Ve, Loader2 as d, Package as He, Receipt as Ue, RefreshCw as We, ShoppingCart as Ge, Wallet as Ke, XCircle as qe } from "lucide-react";
38
- import { useLocation as Je, useParams as Ye } from "react-router";
39
- import { useAppShell as Xe } from "@burdenoff/fe-libs/shared/providers/shell";
40
- import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
41
- import { useI18n as Ze } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
42
- import { getProfileScopedKey as Qe } from "@burdenoff/fe-libs/shared/utils";
43
- import { PagePurpose as $e } from "@burdenoff/fe-libs/ui";
44
- //#region src/billing/modules/checkout/pages/CheckoutPage.tsx
45
- function et(e) {
21
+ import { WorkspaceQuotaAssignmentModal as me, isWorkspaceScopedQuota as he } from "../components/WorkspaceQuotaAssignmentModal.js";
22
+ import { BillingAccountSelector as ge } from "../components/BillingAccountSelector.js";
23
+ import { OrderSummary as _e } from "../components/OrderSummary.js";
24
+ import { PromoCodeInput as ve } from "../components/PromoCodeInput.js";
25
+ import { CreditsAmountInput as ye } from "../components/CreditsAmountInput.js";
26
+ import { StripePaymentForm as be } from "../components/StripePaymentForm.js";
27
+ import { RazorpayPaymentButton as xe } from "../components/RazorpayPaymentButton.js";
28
+ import { SubscriptionSelector as Se } from "../components/SubscriptionSelector.js";
29
+ import { SimpleAutoPayToggle as Ce } from "../components/SimpleAutoPayToggle.js";
30
+ import { UnifiedPaymentMethodSelector as we } from "../components/UnifiedPaymentMethodSelector.js";
31
+ import { CompleteBillingAccountModal as Te, isBillingAccountComplete as Ee } from "../components/CompleteBillingAccountModal.js";
32
+ import { StoreShippingSection as De } from "../components/StoreShippingSection.js";
33
+ import { buildStoreOrderCheckoutItems as Oe, normalizeStoreOrderCurrency as ke } from "../utils/storeOrder.js";
34
+ import { STORE_SHIPPING_ITEM_ID as Ae, useSetStoreOrderShipping as je } from "../hooks/useStoreShipping.js";
35
+ import { recordAffiliateEvent as Me } from "../../affiliate/api.js";
36
+ import { useCallback as l, useEffect as u, useMemo as d, useRef as Ne, useState as f } from "react";
37
+ import { ArrowLeft as Pe, ArrowRight as Fe, Blocks as Ie, CheckCircle as Le, Coins as Re, CreditCard as ze, Loader2 as p, Package as Be, Receipt as Ve, RefreshCw as He, ShoppingCart as Ue, Wallet as We, XCircle as Ge } from "lucide-react";
38
+ import { useLocation as Ke, useParams as qe } from "react-router";
39
+ import { useAppShell as Je } from "@burdenoff/fe-libs/shared/providers/shell";
40
+ import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
41
+ import { useI18n as Ye } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
42
+ import { getProfileScopedKey as Xe } from "@burdenoff/fe-libs/shared/utils";
43
+ import { PagePurpose as Ze } from "@burdenoff/fe-libs/ui";
44
+ // src/billing/modules/checkout/pages/CheckoutPage.tsx
45
+ function Qe(e) {
46
46
  return typeof e.id != "string" || typeof e.name != "string" || typeof e.email != "string" || typeof e.currency != "string" || typeof e.creditAmount != "number" || typeof e.isActive != "boolean" ? null : {
47
47
  ...e,
48
48
  id: e.id,
@@ -54,17 +54,17 @@ function et(e) {
54
54
  billingAddresses: e.billingAddresses === null ? null : e.billingAddresses?.flatMap((e) => e ? [{ ...e }] : [])
55
55
  };
56
56
  }
57
- var tt = () => {
58
- let { t: tt } = Ze(), h = (e, t) => {
59
- let n = tt(e);
57
+ var $e = () => {
58
+ let { t: $e } = Ye(), _ = (e, t) => {
59
+ let n = $e(e);
60
60
  return n === e ? t : n;
61
- }, { planId: nt, addonId: rt, storeOrderId: g } = Ye(), _ = ce(), v = Je(), y = v.state, it = o(), { emit: b } = i(), { orgId: x, stripePublishableKey: at, razorpayKey: ot, apiGatewayUrl: st, authToken: ct, currentUser: lt, workspaceId: S } = t(), { productSlug: ut } = Xe(), dt = Fe(null), { workspaces: ft } = ue(), pt = ft.length > 0 ? ft : S ? [{
62
- id: S,
61
+ }, { planId: et, addonId: tt, storeOrderId: v } = qe(), y = e(), b = Ke(), x = b.state, nt = i(), { emit: S } = t(), { orgId: C, stripePublishableKey: rt, razorpayKey: it, apiGatewayUrl: at, authToken: ot, currentUser: st, workspaceId: w } = a(), { productSlug: ct } = Je(), lt = Ne(null), { workspaces: ut } = ee(), dt = ut.length > 0 ? ut : w ? [{
62
+ id: w,
63
63
  name: "Current workspace"
64
- }] : [], { items: C, clearCart: mt, _hasHydrated: w } = se(), T = v.pathname.includes("/checkout/addons") && !rt, E = v.pathname.includes("/checkout/store") && !!g, D = T ? "ADDON" : E ? "ORDER" : y?.purchaseType ?? (nt ? "PLAN" : rt ? "ADDON" : "CREDITS"), O = y?.itemId ?? nt ?? rt ?? g, [ht, gt] = u(!1), _t = Fe(!1), [vt, yt] = u(!1), [bt, xt] = u([]), [St, Ct] = u(null), [k, A] = u("select"), [j, wt] = u(null), [Tt, M] = u(null), [N, Et] = u(null), [Dt, Ot] = u("card");
65
- c(() => {
66
- if (k !== "success" || !N) return;
67
- let e = typeof window < "u" ? window.localStorage.getItem(Qe("boff-referral-attribution")) : null;
64
+ }] : [], { items: T, clearCart: ft, _hasHydrated: E } = o(), D = b.pathname.includes("/checkout/addons") && !tt, O = b.pathname.includes("/checkout/store") && !!v, k = D ? "ADDON" : O ? "ORDER" : x?.purchaseType ?? (et ? "PLAN" : tt ? "ADDON" : "CREDITS"), A = x?.itemId ?? et ?? tt ?? v, [pt, mt] = f(!1), ht = Ne(!1), [gt, _t] = f(!1), [vt, yt] = f([]), [bt, xt] = f(null), [j, M] = f("select"), [N, St] = f(null), [Ct, P] = f(null), [F, wt] = f(null), [Tt, Et] = f("card");
65
+ u(() => {
66
+ if (j !== "success" || !F) return;
67
+ let e = typeof window < "u" ? window.localStorage.getItem(Xe("boff-referral-attribution")) : null;
68
68
  if (!e) return;
69
69
  let t;
70
70
  try {
@@ -73,191 +73,190 @@ var tt = () => {
73
73
  return;
74
74
  }
75
75
  if (!t.journeyId && !t.codeId) return;
76
- let n = N.transactionId || j?.paymentId || j?.orderId || g || O || D, r = `${t.journeyId ?? "journey"}:${n}`;
77
- dt.current !== r && (dt.current = r, le({
76
+ let n = F.transactionId || N?.paymentId || N?.orderId || v || A || k, r = `${t.journeyId ?? "journey"}:${n}`;
77
+ lt.current !== r && (lt.current = r, Me({
78
78
  journeyId: t.journeyId,
79
79
  codeId: t.codeId,
80
- eventType: D === "ORDER" ? "STORE_PURCHASE" : "PAID_CONVERSION",
81
- productSlug: ut,
82
- actorUserId: lt?.id,
83
- orderId: N.transactionId || j?.paymentId || j?.orderId,
84
- billingAccountId: N.billingAccountId,
85
- storeOrderId: D === "ORDER" ? g : void 0,
86
- valueAmount: N.total,
87
- currency: N.currency,
80
+ eventType: k === "ORDER" ? "STORE_PURCHASE" : "PAID_CONVERSION",
81
+ productSlug: ct,
82
+ actorUserId: st?.id,
83
+ orderId: F.transactionId || N?.paymentId || N?.orderId,
84
+ billingAccountId: F.billingAccountId,
85
+ storeOrderId: k === "ORDER" ? v : void 0,
86
+ valueAmount: F.total,
87
+ currency: F.currency,
88
88
  mode: "billing-checkout",
89
89
  metadata: {
90
- purchaseType: D,
91
- billingAccountName: N.billingAccountName
90
+ purchaseType: k,
91
+ billingAccountName: F.billingAccountName
92
92
  }
93
93
  }, {
94
- apiGatewayUrl: st,
95
- authToken: ct,
96
- orgId: x
94
+ apiGatewayUrl: at,
95
+ authToken: ot,
96
+ orgId: C
97
97
  }).catch(() => {
98
- dt.current = null;
98
+ lt.current = null;
99
99
  }));
100
100
  }, [
101
- st,
101
+ at,
102
+ ot,
103
+ st?.id,
104
+ A,
105
+ j,
106
+ C,
107
+ N?.orderId,
108
+ N?.paymentId,
102
109
  ct,
103
- lt?.id,
104
- O,
110
+ F,
105
111
  k,
106
- x,
107
- j?.orderId,
108
- j?.paymentId,
109
- ut,
110
- N,
111
- D,
112
- g
112
+ v
113
113
  ]);
114
- let [P, kt] = u(1), F = pe({
114
+ let [I, L] = f(1), R = re({
115
115
  defaultCurrency: "USD",
116
- upgradeFromSubscriptionId: y?.upgradeFromSubscriptionId,
117
- downgradeFromSubscriptionId: y?.downgradeFromSubscriptionId
118
- }), { config: At, stripeEnabled: jt, razorpayEnabled: Mt } = he(), { elapsedTime: Nt, error: Pt } = ge({
119
- paymentId: k === "processing" ? j?.paymentId ?? null : null,
120
- billingAccountId: F.billingAccount?.id ?? N?.billingAccountId ?? null,
121
- paymentType: Dt,
116
+ upgradeFromSubscriptionId: x?.upgradeFromSubscriptionId,
117
+ downgradeFromSubscriptionId: x?.downgradeFromSubscriptionId
118
+ }), { config: Dt, stripeEnabled: Ot, razorpayEnabled: kt } = ae(), { elapsedTime: At, error: jt } = oe({
119
+ paymentId: j === "processing" ? N?.paymentId ?? null : null,
120
+ billingAccountId: R.billingAccount?.id ?? F?.billingAccountId ?? null,
121
+ paymentType: Tt,
122
122
  pollingInterval: 5e3,
123
123
  maxPollingTime: 3e5,
124
124
  onSuccess: (e) => {
125
- if (e.transactionId && Et((t) => t && {
125
+ if (e.transactionId && wt((t) => t && {
126
126
  ...t,
127
127
  transactionId: e.transactionId
128
- }), A("success"), T && mt(), (D === "PLAN" || D === "ADDON") && S) {
129
- let e = (I?.getPlan?.features ?? []).filter((e) => e != null).filter((e) => e.quota?.name && Me(e.quota.name)).map((e) => {
128
+ }), M("success"), D && ft(), (k === "PLAN" || k === "ADDON") && w) {
129
+ let e = (z?.getPlan?.features ?? []).filter((e) => e != null).filter((e) => e.quota?.name && he(e.quota.name)).map((e) => {
130
130
  let t = e.quota?.limits, n = t && "type" in t ? String(t.type) : "number", r = e.context && "quantity" in e.context ? Number(e.context.quantity) : null, i = t && "value" in t ? Number(t.value) : null, a = r ?? i;
131
131
  return {
132
132
  quotaName: e.quota.name,
133
- productId: I?.getPlan?.context?.productId ?? "platform",
133
+ productId: z?.getPlan?.context?.productId ?? "platform",
134
134
  limit: n === "number" ? a : null,
135
135
  noLimit: n !== "number",
136
136
  resetPeriod: "NEVER",
137
137
  quotaMode: "dedicated"
138
138
  };
139
139
  });
140
- e.length > 0 && (xt(e), Jt().then((e) => {
141
- let t = e.data?.getActiveSubscriptions?.find((e) => e.planId === O);
142
- t && Ct(t.id);
143
- }), pt.length > 1 && yt(!0));
140
+ e.length > 0 && (yt(e), Gt().then((e) => {
141
+ let t = e.data?.getActiveSubscriptions?.find((e) => e.planId === A);
142
+ t && xt(t.id);
143
+ }), dt.length > 1 && _t(!0));
144
144
  }
145
145
  },
146
146
  onFailure: (e) => {
147
- M(e.failureReason || "Payment failed"), A("error");
147
+ P(e.failureReason || "Payment failed"), M("error");
148
148
  },
149
149
  onTimeout: () => {
150
- M("Payment verification timed out. Please check your billing history for the payment status."), A("error");
150
+ P("Payment verification timed out. Please check your billing history for the payment status."), M("error");
151
151
  }
152
- }), { data: Ft, loading: It, refetch: Lt } = te({}), { data: I, loading: Rt } = ie({
153
- variables: { id: O },
154
- skip: D !== "PLAN" || !O
155
- }), { data: L, loading: zt } = ae({
156
- variables: { addonIDs: O ? [O] : [] },
157
- skip: D !== "ADDON" || !O || E
158
- }), { data: R } = oe({
159
- variables: { id: g },
160
- skip: !E || !g
161
- }), z = D === "PLAN" ? I?.getPlan?.nativeProductId ?? O : D === "ADDON" && !T ? L?.getSelectedAddons?.[0]?.nativeProductId ?? O : void 0, Bt = l(() => {
162
- let e = R?.getStoreOrder?.lineItems;
152
+ }), { data: Mt, loading: Nt, refetch: Pt } = ce({}), { data: z, loading: Ft } = de({
153
+ variables: { id: A },
154
+ skip: k !== "PLAN" || !A
155
+ }), { data: B, loading: It } = fe({
156
+ variables: { addonIDs: A ? [A] : [] },
157
+ skip: k !== "ADDON" || !A || O
158
+ }), { data: V } = pe({
159
+ variables: { id: v },
160
+ skip: !O || !v
161
+ }), H = k === "PLAN" ? z?.getPlan?.nativeProductId ?? A : k === "ADDON" && !D ? B?.getSelectedAddons?.[0]?.nativeProductId ?? A : void 0, Lt = d(() => {
162
+ let e = V?.getStoreOrder?.lineItems;
163
163
  return Array.isArray(e) ? e : [];
164
- }, [R]), B = E && Bt.some((e) => String(e.itemType).toUpperCase() === "PHYSICAL"), Vt = Pe(R?.getStoreOrder?.currency), [V, Ht] = u({
164
+ }, [V]), U = O && Lt.some((e) => String(e.itemType).toUpperCase() === "PHYSICAL"), Rt = ke(V?.getStoreOrder?.currency), [W, zt] = f({
165
165
  shippingAddressId: null,
166
166
  shippingMethodId: null,
167
167
  shippingCost: 0,
168
168
  destinationCountry: null
169
- }), [Ut] = fe(), { data: Wt, loading: Gt } = re({
170
- variables: { billingAccountId: F.billingAccount?.id },
171
- skip: !F.billingAccount?.id
172
- }), { data: Kt, loading: qt, refetch: Jt } = ee({
173
- variables: { billingAccountId: F.billingAccount?.id },
174
- skip: !F.billingAccount?.id || D !== "ADDON" && D !== "PLAN" || E
175
- }), H = l(() => Kt?.getActiveSubscriptions ?? [], [Kt]), U = l(() => !F.selectedSubscriptionId || H.length === 0 ? null : H.find((e) => e.id === F.selectedSubscriptionId) ?? null, [F.selectedSubscriptionId, H]), W = F.items[0]?.type === "CREDITS" ? F.items[0].quantity : 100, { data: Yt, loading: Xt } = ne({
169
+ }), [Bt] = je(), { data: Vt, loading: Ht } = ue({
170
+ variables: { billingAccountId: R.billingAccount?.id ?? "" },
171
+ skip: !R.billingAccount?.id
172
+ }), { data: Ut, loading: Wt, refetch: Gt } = se({
173
+ variables: { billingAccountId: R.billingAccount?.id ?? "" },
174
+ skip: !R.billingAccount?.id || k !== "ADDON" && k !== "PLAN" || O
175
+ }), G = d(() => Ut?.getActiveSubscriptions ?? [], [Ut]), K = d(() => !R.selectedSubscriptionId || G.length === 0 ? null : G.find((e) => e.id === R.selectedSubscriptionId) ?? null, [R.selectedSubscriptionId, G]), q = R.items[0]?.type === "CREDITS" ? R.items[0].quantity : 100, { data: Kt, loading: qt } = le({
176
176
  variables: {
177
- creditAmount: W,
178
- currency: F.selectedCurrency || "USD"
177
+ creditAmount: q,
178
+ currency: R.selectedCurrency || "USD"
179
179
  },
180
- skip: D !== "CREDITS"
181
- }), G = l(() => Yt?.getCostOfCredits?.amount && W > 0 ? Yt.getCostOfCredits.amount / W : .01, [Yt, W]), K = l(() => Wt?.getPaymentMethods ?? [], [Wt]), q = l(() => Ft?.myBillingAccounts ?? [], [Ft]), J = l(() => {
182
- if (!F.billingAccount) return;
183
- let e = q.find((e) => e.id === F.billingAccount?.id)?.billingAddresses;
180
+ skip: k !== "CREDITS"
181
+ }), J = d(() => Kt?.getCostOfCredits?.amount && q > 0 ? Kt.getCostOfCredits.amount / q : .01, [Kt, q]), Y = d(() => Vt?.getPaymentMethods ?? [], [Vt]), X = d(() => Mt?.myBillingAccounts ?? [], [Mt]), Z = d(() => {
182
+ if (!R.billingAccount) return;
183
+ let e = X.find((e) => e.id === R.billingAccount?.id)?.billingAddresses;
184
184
  if (e && e.length > 0) return e[0]?.country || void 0;
185
- }, [F.billingAccount, q]), [Zt, Qt] = u(null);
186
- c(() => {
187
- if (J) if (J === "IN") F.selectedCurrency !== "INR" && F.setCurrency("INR"), Mt && Zt !== J && F.selectedProvider !== "CREDITS" && (F.setPaymentProvider("RAZORPAY"), Qt(J));
188
- else {
189
- if (F.selectedCurrency === "INR") {
190
- let e = F.billingAccount?.currency, t = e && e !== "INR" ? e : "USD";
191
- F.setCurrency(t);
185
+ }, [R.billingAccount, X]), [Jt, Yt] = f(null);
186
+ u(() => {
187
+ if (Z) {
188
+ if (Z === "IN") R.selectedCurrency !== "INR" && R.setCurrency("INR"), kt && Jt !== Z && R.selectedProvider !== "CREDITS" && (R.setPaymentProvider("RAZORPAY"), Yt(Z));
189
+ else {
190
+ if (R.selectedCurrency === "INR") {
191
+ let e = R.billingAccount?.currency, t = e && e !== "INR" ? e : "USD";
192
+ R.setCurrency(t);
193
+ }
194
+ R.selectedProvider === "RAZORPAY" && (R.setPaymentProvider("STRIPE"), Yt(Z));
192
195
  }
193
- F.selectedProvider === "RAZORPAY" && (F.setPaymentProvider("STRIPE"), Qt(J));
194
196
  }
195
197
  }, [
196
- J,
197
- F.selectedCurrency,
198
- F.selectedProvider,
199
- F.setCurrency,
200
- F.setPaymentProvider,
201
- F.billingAccount?.currency,
202
- Mt,
203
- Zt
198
+ Z,
199
+ R.selectedCurrency,
200
+ R.selectedProvider,
201
+ R.setCurrency,
202
+ R.setPaymentProvider,
203
+ R.billingAccount?.currency,
204
+ kt,
205
+ Jt
204
206
  ]);
205
- let { billingAccount: $t, canPayWithCredits: en, hasEnoughCredits: tn, selectedCurrency: Y, selectedPaymentMethodId: nn, selectedProvider: rn, setCurrency: X, setPaymentProvider: Z, setSelectedPaymentMethodId: an } = F;
206
- c(() => {
207
- if (!$t?.currency || J === "IN") return;
208
- let e = $t.currency;
209
- e !== "INR" && Y !== e && X(e);
207
+ let { billingAccount: Xt, canPayWithCredits: Zt, hasEnoughCredits: Qt, selectedCurrency: $t, selectedPaymentMethodId: en, selectedProvider: tn, setCurrency: nn, setPaymentProvider: rn, setSelectedPaymentMethodId: an } = R;
208
+ u(() => {
209
+ if (!Xt?.currency || Z === "IN") return;
210
+ let e = Xt.currency;
211
+ e !== "INR" && $t !== e && nn(e);
210
212
  }, [
211
- J,
213
+ Z,
214
+ Xt,
212
215
  $t,
213
- Y,
214
- X
215
- ]), c(() => {
216
- if (!(rn !== "AUTO" && rn !== null)) {
217
- if (en && tn) {
218
- Z("CREDITS"), an(null);
219
- return;
220
- }
221
- if (K.length > 0 && !nn) {
222
- let e = K.find((e) => e.isDefault && e.isVerified), t = K.find((e) => e.isVerified), n = e || t;
216
+ nn
217
+ ]), u(() => {
218
+ if (tn === "AUTO" || tn === null) {
219
+ if (Zt && Qt) rn("CREDITS"), an(null);
220
+ else if (Y.length > 0 && !en) {
221
+ let e = Y.find((e) => e.isDefault && e.isVerified), t = Y.find((e) => e.isVerified), n = e || t;
223
222
  if (n) {
224
- an(n.id), n.razorpayPaymentMethodId ? Z("RAZORPAY") : n.stripePaymentMethodId && Z("STRIPE");
223
+ an(n.id), n.razorpayPaymentMethodId ? rn("RAZORPAY") : n.stripePaymentMethodId && rn("STRIPE");
225
224
  return;
226
225
  }
227
226
  }
228
227
  }
229
228
  }, [
229
+ Zt,
230
+ Qt,
231
+ Y,
230
232
  en,
231
233
  tn,
232
- K,
233
- nn,
234
234
  rn,
235
- Z,
236
235
  an
237
236
  ]);
238
- let [Q, $] = u(!1);
239
- c(() => {
240
- if (!E || Q || !R?.getStoreOrder) return;
241
- let e = Pe(R.getStoreOrder.currency);
242
- Y !== e && X(e);
237
+ let [Q, $] = f(!1);
238
+ u(() => {
239
+ if (!O || Q || !V?.getStoreOrder) return;
240
+ let e = ke(V.getStoreOrder.currency);
241
+ $t !== e && nn(e);
243
242
  }, [
244
- E,
243
+ O,
245
244
  Q,
246
- Y,
247
- X,
248
- R
249
- ]), c(() => {
250
- if (D === "PLAN" && I?.getPlan?.pricingModel === "PER_SEAT") {
251
- let e = I.getPlan.minSeats ?? 1;
252
- kt((t) => t < e ? e : t);
245
+ $t,
246
+ nn,
247
+ V
248
+ ]), u(() => {
249
+ if (k === "PLAN" && z?.getPlan?.pricingModel === "PER_SEAT") {
250
+ let e = z.getPlan.minSeats ?? 1;
251
+ L((t) => t < e ? e : t);
253
252
  }
254
- }, [I, D]), c(() => {
255
- D === "PLAN" && I?.getPlan?.pricingModel === "PER_SEAT" && Q && $(!1);
256
- }, [P]), c(() => {
253
+ }, [z, k]), u(() => {
254
+ k === "PLAN" && z?.getPlan?.pricingModel === "PER_SEAT" && Q && $(!1);
255
+ }, [I]), u(() => {
257
256
  if (!Q) {
258
- if (T && w && C.length > 0) {
259
- F.clearItems();
260
- for (let e of C) {
257
+ if (D && E && T.length > 0) {
258
+ R.clearItems();
259
+ for (let e of T) {
261
260
  let t = e.addon, n = t.features?.map((e) => {
262
261
  let t = e.quota?.limits, n = e.context && "quantity" in e.context ? Number(e.context.quantity) : void 0;
263
262
  return {
@@ -268,7 +267,7 @@ var tt = () => {
268
267
  value: n
269
268
  } : t
270
269
  };
271
- }) || [], r = F.selectedCurrency || "USD", i = t.currencyPrices, a = i?.[r] ?? t.price, o = i?.USD ?? t.price, ee = {
270
+ }) || [], r = R.selectedCurrency || "USD", i = t.currencyPrices, a = i?.[r] ?? t.price, o = i?.USD ?? t.price, ee = {
272
271
  id: t.id,
273
272
  type: "ADDON",
274
273
  name: t.name,
@@ -280,13 +279,11 @@ var tt = () => {
280
279
  features: n,
281
280
  metadata: { addonId: t.id }
282
281
  };
283
- F.addItem(ee);
282
+ R.addItem(ee);
284
283
  }
285
284
  $(!0);
286
- return;
287
- }
288
- if (D === "PLAN" && I?.getPlan) {
289
- let e = I.getPlan, t = e.features?.map((e) => {
285
+ } else if (k === "PLAN" && z?.getPlan) {
286
+ let e = z.getPlan, t = e.features?.map((e) => {
290
287
  let t = e.quota?.limits, n = e.context && "quantity" in e.context ? Number(e.context.quantity) : void 0;
291
288
  return {
292
289
  id: e.quota?.id || e.id,
@@ -296,33 +293,33 @@ var tt = () => {
296
293
  value: n
297
294
  } : t
298
295
  };
299
- }) || [], n = F.selectedCurrency || "USD", r = e.currencyPrices, i = e.pricingModel === "PER_SEAT", a;
296
+ }) || [], n = R.selectedCurrency || "USD", r = e.currencyPrices, i = e.pricingModel === "PER_SEAT", a;
300
297
  if (i && e.pricePerSeat) {
301
298
  let t = r?.[n];
302
- a = (typeof t == "object" && t?.perSeat ? t.perSeat : e.pricePerSeat) * P;
299
+ a = (typeof t == "object" && t?.perSeat ? t.perSeat : e.pricePerSeat) * I;
303
300
  } else {
304
301
  let t = r?.[n];
305
302
  a = typeof t == "number" ? t : e.price;
306
303
  }
307
- let o = r?.USD, ee = typeof o == "number" ? o : e.price, te = typeof o == "object" && o?.perSeat ? o.perSeat : e.pricePerSeat, ne = i ? P : 1, re = {
304
+ let o = r?.USD, ee = typeof o == "number" ? o : e.price, s = typeof o == "object" && o?.perSeat ? o.perSeat : e.pricePerSeat, c = i ? I : 1, te = {
308
305
  id: e.id,
309
306
  type: "PLAN",
310
307
  name: e.name,
311
308
  description: typeof e.context == "object" && e.context !== null ? e.context.description : typeof e.context == "string" ? e.context : void 0,
312
309
  price: a,
313
- priceUSD: i && e.pricePerSeat ? (te ?? e.pricePerSeat) * ne : ee,
310
+ priceUSD: i && e.pricePerSeat ? (s ?? e.pricePerSeat) * c : ee,
314
311
  currency: n,
315
- quantity: ne,
312
+ quantity: c,
316
313
  features: t,
317
314
  metadata: {
318
315
  planId: e.id,
319
316
  duration: e.duration,
320
- seatCount: i ? ne : void 0
317
+ seatCount: i ? c : void 0
321
318
  }
322
319
  };
323
- F.addItem(re), $(!0);
324
- } else if (D === "ADDON" && !T && L?.getSelectedAddons?.[0]) {
325
- let e = L.getSelectedAddons[0], t = e.features?.map((e) => {
320
+ R.addItem(te), $(!0);
321
+ } else if (k === "ADDON" && !D && B?.getSelectedAddons?.[0]) {
322
+ let e = B.getSelectedAddons[0], t = e.features?.map((e) => {
326
323
  let t = e.quota?.limits, n = e.context && "quantity" in e.context ? Number(e.context.quantity) : void 0;
327
324
  return {
328
325
  id: e.quota?.id || e.id,
@@ -332,7 +329,7 @@ var tt = () => {
332
329
  value: n
333
330
  } : t
334
331
  };
335
- }) || [], n = F.selectedCurrency || "USD", r = e.currencyPrices, i = r?.[n] ?? e.price, a = r?.USD ?? e.price, o = {
332
+ }) || [], n = R.selectedCurrency || "USD", r = e.currencyPrices, i = r?.[n] ?? e.price, a = r?.USD ?? e.price, o = {
336
333
  id: e.id,
337
334
  type: "ADDON",
338
335
  name: e.name,
@@ -340,232 +337,234 @@ var tt = () => {
340
337
  price: i,
341
338
  priceUSD: a,
342
339
  currency: n,
343
- quantity: y?.quantity ?? 1,
340
+ quantity: x?.quantity ?? 1,
344
341
  features: t,
345
342
  metadata: { addonId: e.id }
346
343
  };
347
- F.addItem(o), $(!0);
348
- } else if (E && R?.getStoreOrder) {
349
- F.clearItems();
350
- let e = R.getStoreOrder, t = Ne(e);
351
- for (let e of t) F.addItem(e);
344
+ R.addItem(o), $(!0);
345
+ } else if (O && V?.getStoreOrder) {
346
+ R.clearItems();
347
+ let e = V.getStoreOrder, t = Oe(e);
348
+ for (let e of t) R.addItem(e);
352
349
  $(!0);
353
- } else if (D === "CREDITS") {
354
- let e = {
350
+ } else if (k === "CREDITS") {
351
+ let e = R.selectedCurrency || "USD", t = {
355
352
  id: "credits-purchase",
356
353
  type: "CREDITS",
357
354
  name: "Credits",
358
355
  description: "Purchase credits for your account",
359
- price: G,
360
- currency: F.selectedCurrency || "USD",
356
+ price: J,
357
+ currency: e,
361
358
  quantity: 100
362
359
  };
363
- F.addItem(e), $(!0);
360
+ R.addItem(t), $(!0);
364
361
  }
365
362
  }
366
363
  }, [
367
- D,
368
- I,
369
- L,
370
- R,
371
- F.addItem,
372
- F.clearItems,
373
- y?.quantity,
364
+ k,
365
+ z,
366
+ B,
367
+ V,
368
+ R.addItem,
369
+ R.clearItems,
370
+ x?.quantity,
374
371
  Q,
372
+ D,
373
+ O,
375
374
  T,
376
375
  E,
377
- C,
378
- w,
379
- G,
380
- F.selectedCurrency
381
- ]), c(() => {
382
- if (!(!E || !Q || F.convertedAmount === null)) {
383
- for (let e of F.items) if (e.type === "ORDER" && e.currency !== F.selectedCurrency) {
384
- let t = e.price * F.conversionRate;
385
- F.updateItemPrice(e.id, t, F.selectedCurrency);
376
+ J,
377
+ R.selectedCurrency
378
+ ]), u(() => {
379
+ if (O && Q && R.convertedAmount !== null) {
380
+ for (let e of R.items) if (e.type === "ORDER" && e.currency !== R.selectedCurrency) {
381
+ let t = e.price * R.conversionRate;
382
+ R.updateItemPrice(e.id, t, R.selectedCurrency);
386
383
  }
387
384
  }
388
385
  }, [
389
- E,
386
+ O,
390
387
  Q,
391
- F.convertedAmount,
392
- F.conversionRate,
393
- F.selectedCurrency,
394
- F.updateItemPrice
388
+ R.convertedAmount,
389
+ R.conversionRate,
390
+ R.selectedCurrency,
391
+ R.updateItemPrice
395
392
  ]);
396
- let on = Fe(null);
397
- c(() => {
398
- if (B) if (V.shippingCost > 0) {
399
- let e = F.selectedCurrency, t = Vt !== e && F.convertedAmount !== null ? V.shippingCost * F.conversionRate : V.shippingCost, n = on.current;
400
- if (n && n.price === t && n.currency === e) return;
401
- n === null ? F.addItem({
402
- id: de,
403
- type: "ORDER",
404
- name: "Shipping",
405
- price: t,
406
- currency: e,
407
- quantity: 1,
408
- metadata: {
409
- storeOrderId: g,
410
- isShipping: !0
411
- }
412
- }) : F.updateItemPrice(de, t, e), on.current = {
413
- price: t,
414
- currency: e
415
- };
416
- } else on.current !== null && (on.current = null, F.removeItem(de));
393
+ let on = Ne(null);
394
+ u(() => {
395
+ if (U) {
396
+ if (W.shippingCost > 0) {
397
+ let e = R.selectedCurrency, t = Rt !== e && R.convertedAmount !== null ? W.shippingCost * R.conversionRate : W.shippingCost, n = on.current;
398
+ if (n && n.price === t && n.currency === e) return;
399
+ n === null ? R.addItem({
400
+ id: Ae,
401
+ type: "ORDER",
402
+ name: "Shipping",
403
+ price: t,
404
+ currency: e,
405
+ quantity: 1,
406
+ metadata: {
407
+ storeOrderId: v,
408
+ isShipping: !0
409
+ }
410
+ }) : R.updateItemPrice(Ae, t, e), on.current = {
411
+ price: t,
412
+ currency: e
413
+ };
414
+ } else on.current !== null && (on.current = null, R.removeItem(Ae));
415
+ }
417
416
  }, [
418
- B,
419
- V.shippingCost,
420
- Vt,
421
- F.selectedCurrency,
422
- F.conversionRate,
423
- F.convertedAmount,
424
- g,
425
- F.addItem,
426
- F.updateItemPrice,
427
- F.removeItem
428
- ]), c(() => {
429
- if (D === "CREDITS" && Q && G > 0) {
430
- let e = F.items.find((e) => e.id === "credits-purchase");
431
- e && e.price !== G && F.updateItemPrice("credits-purchase", G);
417
+ U,
418
+ W.shippingCost,
419
+ Rt,
420
+ R.selectedCurrency,
421
+ R.conversionRate,
422
+ R.convertedAmount,
423
+ v,
424
+ R.addItem,
425
+ R.updateItemPrice,
426
+ R.removeItem
427
+ ]), u(() => {
428
+ if (k === "CREDITS" && Q && J > 0) {
429
+ let e = R.items.find((e) => e.id === "credits-purchase");
430
+ e && e.price !== J && R.updateItemPrice("credits-purchase", J);
432
431
  }
433
432
  }, [
434
- D,
433
+ k,
435
434
  Q,
436
- G,
437
- F.items,
438
- F.updateItemPrice
439
- ]), c(() => {
440
- if (!Q || F.items.length === 0) return;
441
- let e = F.selectedCurrency || "USD";
442
- for (let t of F.items) if (t.type === "PLAN" && I?.getPlan) {
443
- let n = I.getPlan.currencyPrices?.[e] ?? I.getPlan.price;
444
- (t.price !== n || t.currency !== e) && F.updateItemPrice(t.id, n, e);
435
+ J,
436
+ R.items,
437
+ R.updateItemPrice
438
+ ]), u(() => {
439
+ if (!Q || R.items.length === 0) return;
440
+ let e = R.selectedCurrency || "USD";
441
+ for (let t of R.items) if (t.type === "PLAN" && z?.getPlan) {
442
+ let n = z.getPlan.currencyPrices?.[e] ?? z.getPlan.price;
443
+ (t.price !== n || t.currency !== e) && R.updateItemPrice(t.id, n, e);
445
444
  } else if (t.type === "ADDON") {
446
- if (!T && L?.getSelectedAddons?.[0]) {
447
- let n = L.getSelectedAddons[0], r = n.currencyPrices?.[e] ?? n.price;
448
- (t.price !== r || t.currency !== e) && F.updateItemPrice(t.id, r, e);
445
+ if (!D && B?.getSelectedAddons?.[0]) {
446
+ let n = B.getSelectedAddons[0], r = n.currencyPrices?.[e] ?? n.price;
447
+ (t.price !== r || t.currency !== e) && R.updateItemPrice(t.id, r, e);
449
448
  }
450
- if (T) {
451
- let n = C.find((e) => e.addon.id === t.id);
449
+ if (D) {
450
+ let n = T.find((e) => e.addon.id === t.id);
452
451
  if (n) {
453
452
  let r = n.addon.currencyPrices?.[e] ?? n.addon.price;
454
- (t.price !== r || t.currency !== e) && F.updateItemPrice(t.id, r, e);
453
+ (t.price !== r || t.currency !== e) && R.updateItemPrice(t.id, r, e);
455
454
  }
456
455
  }
457
456
  }
458
457
  }, [
459
- F.selectedCurrency,
458
+ R.selectedCurrency,
460
459
  Q,
461
- F.items,
462
- F.updateItemPrice,
463
- I,
464
- L,
465
- C,
466
- T
467
- ]), c(() => {
468
- if (q.length > 0 && !F.billingAccount) {
469
- if (y?.billingAccountId) {
470
- let e = q.find((e) => e.id === y.billingAccountId);
460
+ R.items,
461
+ R.updateItemPrice,
462
+ z,
463
+ B,
464
+ T,
465
+ D
466
+ ]), u(() => {
467
+ if (X.length > 0 && !R.billingAccount) {
468
+ if (x?.billingAccountId) {
469
+ let e = X.find((e) => e.id === x.billingAccountId);
471
470
  if (e) {
472
- F.setBillingAccount(e);
471
+ R.setBillingAccount(e);
473
472
  return;
474
473
  }
475
474
  }
476
- if (x) {
477
- let e = a(x);
475
+ if (C) {
476
+ let e = ne(C);
478
477
  if (e) {
479
- let t = q.find((t) => t.id === e);
478
+ let t = X.find((t) => t.id === e);
480
479
  if (t) {
481
- F.setBillingAccount(t);
480
+ R.setBillingAccount(t);
482
481
  return;
483
482
  }
484
483
  }
485
484
  }
486
- F.setBillingAccount(q[0]);
485
+ R.setBillingAccount(X[0]);
487
486
  }
488
487
  }, [
489
- q,
490
- F.billingAccount,
491
- F.setBillingAccount,
492
- y?.billingAccountId,
493
- x
488
+ X,
489
+ R.billingAccount,
490
+ R.setBillingAccount,
491
+ x?.billingAccountId,
492
+ C
494
493
  ]);
495
- let sn = !!(y?.upgradeFromSubscriptionId || y?.downgradeFromSubscriptionId);
496
- c(() => {
497
- T && w && C.length === 0 && !Q && _("/addons", { replace: !0 });
494
+ let sn = !!(x?.upgradeFromSubscriptionId || x?.downgradeFromSubscriptionId);
495
+ u(() => {
496
+ D && E && T.length === 0 && !Q && y("/addons", { replace: !0 });
498
497
  }, [
499
- w,
500
- C.length,
501
- T,
498
+ E,
499
+ T.length,
500
+ D,
502
501
  Q,
503
- _
502
+ y
504
503
  ]);
505
- let cn = me({
506
- billingAccountId: F.billingAccount?.id,
507
- purchaseType: D,
508
- productId: z
509
- }), ln = s(async () => {
510
- if (!F.billingAccount) return;
511
- let e = _t.current;
512
- if (_t.current = !1, !e && !ke(F.billingAccount)) {
513
- gt(!0);
504
+ let cn = ie({
505
+ billingAccountId: R.billingAccount?.id,
506
+ purchaseType: k,
507
+ productId: H
508
+ }), ln = l(async () => {
509
+ if (!R.billingAccount) return;
510
+ let e = ht.current;
511
+ if (ht.current = !1, !e && !Ee(R.billingAccount)) {
512
+ mt(!0);
514
513
  return;
515
514
  }
516
- if (M(null), B) try {
517
- let e = (await Ut({ variables: { input: {
518
- orderId: g,
519
- shippingMethodId: V.shippingMethodId,
520
- ...V.shippingAddressId ? { shippingAddressId: V.shippingAddressId } : {}
515
+ if (P(null), U) try {
516
+ let e = (await Bt({ variables: { input: {
517
+ orderId: v,
518
+ shippingMethodId: W.shippingMethodId,
519
+ ...W.shippingAddressId ? { shippingAddressId: W.shippingAddressId } : {}
521
520
  } } })).data?.setStoreOrderShipping?.shippingCost;
522
- typeof e == "number" && e !== V.shippingCost && Ht((t) => ({
521
+ typeof e == "number" && e !== W.shippingCost && zt((t) => ({
523
522
  ...t,
524
523
  shippingCost: e
525
524
  }));
526
525
  } catch (e) {
527
- M(e instanceof Error && e.message ? e.message : "Could not save your shipping details. Please review your delivery address and try again."), A("error");
526
+ P(e instanceof Error && e.message ? e.message : "Could not save your shipping details. Please review your delivery address and try again."), M("error");
528
527
  return;
529
528
  }
530
- let t = F.billingAccount.creditAmount ?? 0, n = [...F.items], r = F.total, i = F.creditsRequired, a = await F.initiatePayment();
529
+ let t = R.billingAccount.creditAmount ?? 0, n = [...R.items], r = R.total, i = R.creditsRequired, a = await R.initiatePayment();
531
530
  if (a.success) {
532
- if (b("billing.checkout.initiated", {
531
+ if (S("billing.checkout.initiated", {
533
532
  route: "/billing/checkout",
534
533
  entityId: a.paymentId ?? a.orderId,
535
534
  source: "checkout",
536
535
  amount: a.total || r,
537
- currency: a.currency || F.selectedCurrency
538
- }), F.selectedProvider === "CREDITS") {
539
- b("billing.credits.spent", {
536
+ currency: a.currency || R.selectedCurrency
537
+ }), R.selectedProvider === "CREDITS") {
538
+ S("billing.credits.spent", {
540
539
  route: "/billing/checkout",
541
540
  entityId: a.orderId,
542
541
  source: "checkout",
543
542
  amount: i,
544
543
  currency: "CREDITS"
545
- }), Et({
544
+ }), wt({
546
545
  items: n,
547
546
  total: i,
548
- billingAccountName: F.billingAccount.name,
549
- billingAccountId: F.billingAccount.id,
547
+ billingAccountName: R.billingAccount.name,
548
+ billingAccountId: R.billingAccount.id,
550
549
  previousBalance: t,
551
550
  newBalance: t - i,
552
551
  paymentMethod: "credits",
553
552
  currency: "Credits",
554
553
  transactionId: a.orderId
555
- }), Ot("credits"), wt({ paymentId: a.orderId }), A("processing");
554
+ }), Et("credits"), St({ paymentId: a.orderId }), M("processing");
556
555
  return;
557
556
  }
558
- Et({
557
+ wt({
559
558
  items: n,
560
559
  total: a.total || r,
561
- billingAccountName: F.billingAccount.name,
562
- billingAccountId: F.billingAccount.id,
560
+ billingAccountName: R.billingAccount.name,
561
+ billingAccountId: R.billingAccount.id,
563
562
  previousBalance: t,
564
563
  newBalance: t,
565
564
  paymentMethod: "card",
566
- currency: a.currency || F.selectedCurrency,
565
+ currency: a.currency || R.selectedCurrency,
567
566
  transactionId: a.paymentId
568
- }), Ot("card"), wt({
567
+ }), Et("card"), St({
569
568
  clientSecret: a.clientSecret,
570
569
  orderId: a.orderId,
571
570
  razorpayKeyId: a.razorpayKeyId,
@@ -577,471 +576,471 @@ var tt = () => {
577
576
  prefillContact: a.prefillContact,
578
577
  total: a.total,
579
578
  currency: a.currency
580
- }), a.paymentComplete ? A("processing") : A("payment");
581
- } else b("billing.checkout.failed", {
579
+ }), a.paymentComplete ? M("processing") : M("payment");
580
+ } else S("billing.checkout.failed", {
582
581
  route: "/billing/checkout",
583
582
  source: "checkout",
584
583
  reason: a.error || "Payment initiation failed"
585
- }), M(a.error || "Payment initiation failed"), A("error");
584
+ }), P(a.error || "Payment initiation failed"), M("error");
586
585
  }, [
587
- F,
588
- b,
589
- B,
590
- V,
591
- g,
592
- Vt,
593
- Ut
594
- ]), un = s((e) => {
595
- b("billing.payment.succeeded", {
586
+ R,
587
+ S,
588
+ U,
589
+ W,
590
+ v,
591
+ Rt,
592
+ Bt
593
+ ]), un = l((e) => {
594
+ S("billing.payment.succeeded", {
596
595
  route: "/billing/checkout",
597
- entityId: j?.paymentId ?? j?.orderId,
596
+ entityId: N?.paymentId ?? N?.orderId,
598
597
  source: "checkout"
599
- }), wt((e) => e), A("processing");
598
+ }), St((e) => e), M("processing");
600
599
  }, [
601
- b,
602
- j?.orderId,
603
- j?.paymentId
604
- ]), dn = s((e) => {
605
- b("billing.payment.failed", {
600
+ S,
601
+ N?.orderId,
602
+ N?.paymentId
603
+ ]), dn = l((e) => {
604
+ S("billing.payment.failed", {
606
605
  route: "/billing/checkout",
607
- entityId: j?.paymentId ?? j?.orderId,
606
+ entityId: N?.paymentId ?? N?.orderId,
608
607
  source: "checkout",
609
608
  reason: e
610
- }), M(e), A("error");
609
+ }), P(e), M("error");
611
610
  }, [
612
- b,
613
- j?.orderId,
614
- j?.paymentId
615
- ]), fn = s((e) => {
616
- F.updateItemQuantity("credits-purchase", e);
617
- }, [F]);
618
- if (!it.canProcessPayment) return /* @__PURE__ */ p(n, { message: "You don't have permission to make purchases." });
619
- if (e() && D === "PLAN" && (Rt || It)) return /* @__PURE__ */ p("div", {
611
+ S,
612
+ N?.orderId,
613
+ N?.paymentId
614
+ ]), fn = l((e) => {
615
+ R.updateItemQuantity("credits-purchase", e);
616
+ }, [R]);
617
+ if (!nt.canProcessPayment) return /* @__PURE__ */ h(n, { message: "You don't have permission to make purchases." });
618
+ if (s() && k === "PLAN" && (Ft || Nt)) return /* @__PURE__ */ h("div", {
620
619
  className: "flex min-h-[240px] items-center justify-center",
621
- children: /* @__PURE__ */ p(d, {
620
+ children: /* @__PURE__ */ h(p, {
622
621
  className: "size-6 animate-spin text-[--color-primary]",
623
622
  "aria-label": "Loading"
624
623
  })
625
624
  });
626
- if (e() && D !== "PLAN") return /* @__PURE__ */ p(ve, {
627
- purchaseType: D,
628
- path: v.pathname + v.search,
629
- billingAccountId: F.billingAccount?.id,
630
- onBack: () => _("dashboard")
625
+ if (s() && k !== "PLAN") return /* @__PURE__ */ h(te, {
626
+ purchaseType: k,
627
+ path: b.pathname + b.search,
628
+ billingAccountId: R.billingAccount?.id,
629
+ onBack: () => y("dashboard")
631
630
  });
632
- if (e() && D === "PLAN" && z) return /* @__PURE__ */ p(_e, {
633
- purchaseType: D,
634
- productId: z,
635
- billingAccountId: F.billingAccount?.id,
631
+ if (s() && k === "PLAN" && H) return /* @__PURE__ */ h(c, {
632
+ purchaseType: k,
633
+ productId: H,
634
+ billingAccountId: R.billingAccount?.id,
636
635
  nativeCheckout: cn,
637
- onBack: () => _("dashboard")
636
+ onBack: () => y("dashboard")
638
637
  });
639
- if (e() && D === "PLAN" && !z) return /* @__PURE__ */ p(ve, {
640
- purchaseType: D,
641
- path: v.pathname + v.search,
642
- billingAccountId: F.billingAccount?.id,
643
- onBack: () => _("dashboard")
638
+ if (s() && k === "PLAN" && !H) return /* @__PURE__ */ h(te, {
639
+ purchaseType: k,
640
+ path: b.pathname + b.search,
641
+ billingAccountId: R.billingAccount?.id,
642
+ onBack: () => y("dashboard")
644
643
  });
645
- let pn = It || Rt && D === "PLAN" || zt && D === "ADDON" && !T || T && !w;
646
- if (T && w && C.length === 0 && !Q) return null;
644
+ let pn = Nt || Ft && k === "PLAN" || It && k === "ADDON" && !D || D && !E;
645
+ if (D && E && T.length === 0 && !Q) return null;
647
646
  let mn = () => {
648
- if (T) {
649
- let e = F.items.length;
647
+ if (D) {
648
+ let e = R.items.length;
650
649
  return `Purchase ${e} Add-on${e === 1 ? "" : "s"}`;
651
650
  }
652
- switch (D) {
651
+ switch (k) {
653
652
  case "CREDITS": return "Buy Credits";
654
653
  case "PLAN": return "Subscribe to Plan";
655
654
  case "ADDON": return "Purchase Add-on";
656
655
  default: return "Checkout";
657
656
  }
658
657
  }, hn = () => {
659
- switch (D) {
660
- case "CREDITS": return /* @__PURE__ */ p(Be, { className: "size-6" });
661
- case "PLAN": return /* @__PURE__ */ p(He, { className: "size-6" });
662
- case "ADDON": return /* @__PURE__ */ p(Re, { className: "size-6" });
663
- default: return /* @__PURE__ */ p(Ge, { className: "size-6" });
658
+ switch (k) {
659
+ case "CREDITS": return /* @__PURE__ */ h(Re, { className: "size-6" });
660
+ case "PLAN": return /* @__PURE__ */ h(Be, { className: "size-6" });
661
+ case "ADDON": return /* @__PURE__ */ h(Ie, { className: "size-6" });
662
+ default: return /* @__PURE__ */ h(Ue, { className: "size-6" });
664
663
  }
665
664
  };
666
- if (pn) return /* @__PURE__ */ p("div", {
665
+ if (pn) return /* @__PURE__ */ h("div", {
667
666
  className: "flex items-center justify-center min-h-[400px]",
668
- children: /* @__PURE__ */ m("div", {
667
+ children: /* @__PURE__ */ g("div", {
669
668
  className: "text-center space-y-4",
670
- children: [/* @__PURE__ */ p(d, { className: "size-8 animate-spin mx-auto text-text-link" }), /* @__PURE__ */ p("p", {
669
+ children: [/* @__PURE__ */ h(p, { className: "size-8 animate-spin mx-auto text-text-link" }), /* @__PURE__ */ h("p", {
671
670
  className: "text-text-secondary",
672
- children: h("billing.checkout.loadingCheckout", "Loading checkout...")
671
+ children: _("billing.checkout.loadingCheckout", "Loading checkout...")
673
672
  })]
674
673
  })
675
674
  });
676
- if (k === "success") {
675
+ if (j === "success") {
677
676
  let e = (e) => {
678
- if (!N) return `${e.toFixed(2)}`;
679
- let t = N.currency;
677
+ if (!F) return `${e.toFixed(2)}`;
678
+ let t = F.currency;
680
679
  return t === "Credits" ? `${e.toFixed(2)} Credits` : `${{
681
680
  INR: "₹",
682
681
  USD: "$",
683
682
  EUR: "€",
684
683
  GBP: "£"
685
684
  }[t] || t + " "}${e.toFixed(2)}`;
686
- }, t = (e) => `${e.toFixed(2)} Credits`, n = N ? N.items.reduce((e, t) => e + t.price * t.quantity, 0) : 0, r = (e) => {
687
- if (!N || n <= 0) return 0;
685
+ }, t = (e) => `${e.toFixed(2)} Credits`, n = F ? F.items.reduce((e, t) => e + t.price * t.quantity, 0) : 0, r = (e) => {
686
+ if (!F || n <= 0) return 0;
688
687
  let t = e.price * e.quantity;
689
- return N.total * (t / n);
688
+ return F.total * (t / n);
690
689
  };
691
- return /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ m("div", {
690
+ return /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ g("div", {
692
691
  className: "max-w-2xl mx-auto p-6 space-y-6",
693
692
  children: [
694
- /* @__PURE__ */ m("div", {
693
+ /* @__PURE__ */ g("div", {
695
694
  className: "text-center space-y-4",
696
- children: [/* @__PURE__ */ p("div", {
695
+ children: [/* @__PURE__ */ h("div", {
697
696
  className: "inline-flex p-4 rounded-full bg-status-success-bg-subtle text-status-success-text",
698
- children: /* @__PURE__ */ p(ze, { className: "size-12" })
699
- }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("h1", {
697
+ children: /* @__PURE__ */ h(Le, { className: "size-12" })
698
+ }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("h1", {
700
699
  className: "text-2xl font-bold text-text-primary",
701
- children: h("billing.checkout.paymentSuccessful", "Payment Successful!")
702
- }), /* @__PURE__ */ p("p", {
700
+ children: _("billing.checkout.paymentSuccessful", "Payment Successful!")
701
+ }), /* @__PURE__ */ h("p", {
703
702
  className: "text-text-secondary mt-2",
704
- children: h("billing.checkout.purchaseCompleted", "Your purchase has been completed successfully.")
703
+ children: _("billing.checkout.purchaseCompleted", "Your purchase has been completed successfully.")
705
704
  })] })]
706
705
  }),
707
- N && /* @__PURE__ */ m("div", {
706
+ F && /* @__PURE__ */ g("div", {
708
707
  className: "bg-bg-surface border border-border-subtle rounded-lg overflow-hidden",
709
708
  children: [
710
- /* @__PURE__ */ m("div", {
709
+ /* @__PURE__ */ g("div", {
711
710
  className: "p-4 border-b border-border-subtle",
712
- children: [/* @__PURE__ */ m("h3", {
711
+ children: [/* @__PURE__ */ g("h3", {
713
712
  className: "font-semibold text-text-primary mb-3 flex items-center gap-2",
714
- children: [/* @__PURE__ */ p(Ue, { className: "size-4" }), h("billing.checkout.itemsPurchased", "Items Purchased")]
715
- }), /* @__PURE__ */ p("div", {
713
+ children: [/* @__PURE__ */ h(Ve, { className: "size-4" }), _("billing.checkout.itemsPurchased", "Items Purchased")]
714
+ }), /* @__PURE__ */ h("div", {
716
715
  className: "space-y-2",
717
- children: N.items.map((t) => /* @__PURE__ */ m("div", {
716
+ children: F.items.map((t) => /* @__PURE__ */ g("div", {
718
717
  className: "flex items-center justify-between",
719
- children: [/* @__PURE__ */ m("div", {
718
+ children: [/* @__PURE__ */ g("div", {
720
719
  className: "flex items-center gap-2",
721
720
  children: [
722
- t.type === "PLAN" && /* @__PURE__ */ p(He, { className: "size-4 text-accent-blue" }),
723
- t.type === "ADDON" && /* @__PURE__ */ p(Re, { className: "size-4 text-accent-purple" }),
724
- t.type === "CREDITS" && /* @__PURE__ */ p(Be, { className: "size-4 text-status-warning-text" }),
725
- t.type === "ORDER" && /* @__PURE__ */ p(Ge, { className: "size-4 text-status-success-text" }),
726
- /* @__PURE__ */ p("span", {
721
+ t.type === "PLAN" && /* @__PURE__ */ h(Be, { className: "size-4 text-accent-blue" }),
722
+ t.type === "ADDON" && /* @__PURE__ */ h(Ie, { className: "size-4 text-accent-purple" }),
723
+ t.type === "CREDITS" && /* @__PURE__ */ h(Re, { className: "size-4 text-status-warning-text" }),
724
+ t.type === "ORDER" && /* @__PURE__ */ h(Ue, { className: "size-4 text-status-success-text" }),
725
+ /* @__PURE__ */ h("span", {
727
726
  className: "text-text-primary",
728
727
  children: t.name
729
728
  }),
730
- t.quantity > 1 && /* @__PURE__ */ m("span", {
729
+ t.quantity > 1 && /* @__PURE__ */ g("span", {
731
730
  className: "text-xs text-text-secondary",
732
731
  children: ["x", t.quantity]
733
732
  })
734
733
  ]
735
- }), /* @__PURE__ */ p("span", {
734
+ }), /* @__PURE__ */ h("span", {
736
735
  className: "text-text-secondary",
737
- children: e(N.paymentMethod === "credits" ? r(t) : t.price * t.quantity)
736
+ children: e(F.paymentMethod === "credits" ? r(t) : t.price * t.quantity)
738
737
  })]
739
738
  }, t.id))
740
739
  })]
741
740
  }),
742
- /* @__PURE__ */ p("div", {
741
+ /* @__PURE__ */ h("div", {
743
742
  className: "p-4 border-b border-border-subtle bg-bg-sunken",
744
- children: /* @__PURE__ */ m("div", {
743
+ children: /* @__PURE__ */ g("div", {
745
744
  className: "grid grid-cols-2 gap-4",
746
- children: [/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
745
+ children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("p", {
747
746
  className: "text-xs text-text-secondary mb-1",
748
- children: h("billing.checkout.paymentMethod", "Payment Method")
749
- }), /* @__PURE__ */ p("div", {
747
+ children: _("billing.checkout.paymentMethod", "Payment Method")
748
+ }), /* @__PURE__ */ h("div", {
750
749
  className: "flex items-center gap-2",
751
- children: N.paymentMethod === "credits" ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(Ke, { className: "size-4 text-status-warning-text" }), /* @__PURE__ */ p("span", {
750
+ children: F.paymentMethod === "credits" ? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(We, { className: "size-4 text-status-warning-text" }), /* @__PURE__ */ h("span", {
752
751
  className: "font-medium text-text-primary",
753
- children: h("billing.checkout.credits", "Credits")
754
- })] }) : /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(Ve, { className: "size-4 text-accent-blue" }), /* @__PURE__ */ p("span", {
752
+ children: _("billing.checkout.credits", "Credits")
753
+ })] }) : /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(ze, { className: "size-4 text-accent-blue" }), /* @__PURE__ */ h("span", {
755
754
  className: "font-medium text-text-primary",
756
- children: h("billing.checkout.card", "Card")
755
+ children: _("billing.checkout.card", "Card")
757
756
  })] })
758
- })] }), /* @__PURE__ */ m("div", {
757
+ })] }), /* @__PURE__ */ g("div", {
759
758
  className: "text-right",
760
- children: [/* @__PURE__ */ p("p", {
759
+ children: [/* @__PURE__ */ h("p", {
761
760
  className: "text-xs text-text-secondary mb-1",
762
- children: h("billing.checkout.totalPaid", "Total Paid")
763
- }), /* @__PURE__ */ p("p", {
761
+ children: _("billing.checkout.totalPaid", "Total Paid")
762
+ }), /* @__PURE__ */ h("p", {
764
763
  className: "font-bold text-lg text-text-primary",
765
- children: e(N.total)
764
+ children: e(F.total)
766
765
  })]
767
766
  })]
768
767
  })
769
768
  }),
770
- N.paymentMethod === "credits" && /* @__PURE__ */ m("div", {
769
+ F.paymentMethod === "credits" && /* @__PURE__ */ g("div", {
771
770
  className: "p-4 border-b border-border-subtle",
772
- children: [/* @__PURE__ */ m("h3", {
771
+ children: [/* @__PURE__ */ g("h3", {
773
772
  className: "font-semibold text-text-primary mb-3 flex items-center gap-2",
774
- children: [/* @__PURE__ */ p(Ke, { className: "size-4" }), h("billing.checkout.creditBalance", "Credit Balance")]
775
- }), /* @__PURE__ */ m("div", {
773
+ children: [/* @__PURE__ */ h(We, { className: "size-4" }), _("billing.checkout.creditBalance", "Credit Balance")]
774
+ }), /* @__PURE__ */ g("div", {
776
775
  className: "flex items-center gap-4",
777
776
  children: [
778
- /* @__PURE__ */ m("div", {
777
+ /* @__PURE__ */ g("div", {
779
778
  className: "flex-1 text-center p-3 rounded-lg bg-bg-sunken",
780
- children: [/* @__PURE__ */ p("p", {
779
+ children: [/* @__PURE__ */ h("p", {
781
780
  className: "text-xs text-text-secondary mb-1",
782
- children: h("billing.checkout.previousBalance", "Previous Balance")
783
- }), /* @__PURE__ */ p("p", {
781
+ children: _("billing.checkout.previousBalance", "Previous Balance")
782
+ }), /* @__PURE__ */ h("p", {
784
783
  className: "font-semibold text-text-primary",
785
- children: t(N.previousBalance)
784
+ children: t(F.previousBalance)
786
785
  })]
787
786
  }),
788
- /* @__PURE__ */ p(Le, { className: "size-5 text-text-secondary shrink-0" }),
789
- /* @__PURE__ */ m("div", {
787
+ /* @__PURE__ */ h(Fe, { className: "size-5 text-text-secondary shrink-0" }),
788
+ /* @__PURE__ */ g("div", {
790
789
  className: "flex-1 text-center p-3 rounded-lg bg-status-success-bg-subtle",
791
- children: [/* @__PURE__ */ p("p", {
790
+ children: [/* @__PURE__ */ h("p", {
792
791
  className: "text-xs text-text-secondary mb-1",
793
- children: h("billing.checkout.newBalance", "New Balance")
794
- }), /* @__PURE__ */ p("p", {
792
+ children: _("billing.checkout.newBalance", "New Balance")
793
+ }), /* @__PURE__ */ h("p", {
795
794
  className: "font-semibold text-status-success-text",
796
- children: t(N.newBalance)
795
+ children: t(F.newBalance)
797
796
  })]
798
797
  })
799
798
  ]
800
799
  })]
801
800
  }),
802
- /* @__PURE__ */ p("div", {
801
+ /* @__PURE__ */ h("div", {
803
802
  className: "p-4 bg-bg-sunken",
804
- children: /* @__PURE__ */ m("div", {
803
+ children: /* @__PURE__ */ g("div", {
805
804
  className: "flex items-center justify-between",
806
- children: [/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
805
+ children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("p", {
807
806
  className: "text-xs text-text-secondary mb-1",
808
- children: h("billing.checkout.billingAccount", "Billing Account")
809
- }), /* @__PURE__ */ p("p", {
807
+ children: _("billing.checkout.billingAccount", "Billing Account")
808
+ }), /* @__PURE__ */ h("p", {
810
809
  className: "font-medium text-text-primary",
811
- children: N.billingAccountName
812
- })] }), N.transactionId && /* @__PURE__ */ m("div", {
810
+ children: F.billingAccountName
811
+ })] }), F.transactionId && /* @__PURE__ */ g("div", {
813
812
  className: "text-right",
814
- children: [/* @__PURE__ */ p("p", {
813
+ children: [/* @__PURE__ */ h("p", {
815
814
  className: "text-xs text-text-secondary mb-1",
816
- children: h("billing.checkout.transactionId", "Transaction ID")
817
- }), /* @__PURE__ */ m("p", {
815
+ children: _("billing.checkout.transactionId", "Transaction ID")
816
+ }), /* @__PURE__ */ g("p", {
818
817
  className: "font-mono text-xs text-text-secondary",
819
- children: [N.transactionId.slice(0, 8), "..."]
818
+ children: [F.transactionId.slice(0, 8), "..."]
820
819
  })]
821
820
  })]
822
821
  })
823
822
  })
824
823
  ]
825
824
  }),
826
- /* @__PURE__ */ m("div", {
825
+ /* @__PURE__ */ g("div", {
827
826
  className: "flex flex-col sm:flex-row gap-3 justify-center pt-2",
828
- children: [/* @__PURE__ */ p("button", {
827
+ children: [/* @__PURE__ */ h("button", {
829
828
  type: "button",
830
- onClick: () => _("/overview"),
829
+ onClick: () => y("/overview"),
831
830
  className: "px-6 py-3 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-lg hover:bg-action-primary-bgHover transition-colors",
832
- children: h("billing.checkout.backToOverview", "Back to Overview")
833
- }), /* @__PURE__ */ p("button", {
831
+ children: _("billing.checkout.backToOverview", "Back to Overview")
832
+ }), /* @__PURE__ */ h("button", {
834
833
  type: "button",
835
- onClick: () => _("/subscriptions"),
834
+ onClick: () => y("/subscriptions"),
836
835
  className: "px-6 py-3 text-sm font-medium border border-border-subtle text-text-primary rounded-lg hover:bg-bg-sunken transition-colors",
837
- children: h("billing.checkout.viewSubscriptions", "View Subscriptions")
836
+ children: _("billing.checkout.viewSubscriptions", "View Subscriptions")
838
837
  })]
839
838
  })
840
839
  ]
841
- }), vt && bt.length > 0 && S && St && /* @__PURE__ */ p(je, {
842
- billingAccountId: N?.billingAccountId ?? "",
843
- subscriptionId: St,
844
- quotas: bt,
845
- workspaces: pt,
846
- currentWorkspaceId: S,
847
- onAssigned: () => yt(!1),
848
- onSkip: () => yt(!1)
840
+ }), gt && vt.length > 0 && w && bt && /* @__PURE__ */ h(me, {
841
+ billingAccountId: F?.billingAccountId ?? "",
842
+ subscriptionId: bt,
843
+ quotas: vt,
844
+ workspaces: dt,
845
+ currentWorkspaceId: w,
846
+ onAssigned: () => _t(!1),
847
+ onSkip: () => _t(!1)
849
848
  })] });
850
849
  }
851
- if (k === "error") return /* @__PURE__ */ p("div", {
850
+ if (j === "error") return /* @__PURE__ */ h("div", {
852
851
  className: "max-w-lg mx-auto p-6",
853
- children: /* @__PURE__ */ m("div", {
852
+ children: /* @__PURE__ */ g("div", {
854
853
  className: "text-center space-y-6",
855
854
  children: [
856
- /* @__PURE__ */ p("div", {
855
+ /* @__PURE__ */ h("div", {
857
856
  className: "inline-flex p-4 rounded-full bg-status-error-bg-subtle text-status-error-text",
858
- children: /* @__PURE__ */ p(qe, { className: "size-12" })
857
+ children: /* @__PURE__ */ h(Ge, { className: "size-12" })
859
858
  }),
860
- /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("h1", {
859
+ /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("h1", {
861
860
  className: "text-2xl font-bold text-text-primary",
862
- children: h("billing.checkout.paymentFailed", "Payment Failed")
863
- }), /* @__PURE__ */ p("p", {
861
+ children: _("billing.checkout.paymentFailed", "Payment Failed")
862
+ }), /* @__PURE__ */ h("p", {
864
863
  className: "text-text-secondary mt-2",
865
- children: Tt || Pt || F.error || h("billing.checkout.genericError", "Something went wrong. Please try again.")
864
+ children: Ct || jt || R.error || _("billing.checkout.genericError", "Something went wrong. Please try again.")
866
865
  })] }),
867
- /* @__PURE__ */ m("div", {
866
+ /* @__PURE__ */ g("div", {
868
867
  className: "flex gap-3 justify-center",
869
- children: [/* @__PURE__ */ p("button", {
868
+ children: [/* @__PURE__ */ h("button", {
870
869
  type: "button",
871
- onClick: () => _(-1),
870
+ onClick: () => y(-1),
872
871
  className: "px-4 py-2 rounded-lg border border-border-subtle hover:bg-bg-sunken",
873
- children: h("billing.checkout.goBack", "Go Back")
874
- }), /* @__PURE__ */ p("button", {
872
+ children: _("billing.checkout.goBack", "Go Back")
873
+ }), /* @__PURE__ */ h("button", {
875
874
  type: "button",
876
875
  onClick: () => {
877
- A("select"), M(null), F.reset();
876
+ M("select"), P(null), R.reset();
878
877
  },
879
878
  className: "px-4 py-2 rounded-lg bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bgHover",
880
- children: h("billing.checkout.tryAgain", "Try Again")
879
+ children: _("billing.checkout.tryAgain", "Try Again")
881
880
  })]
882
881
  })
883
882
  ]
884
883
  })
885
884
  });
886
- if (k === "processing") return /* @__PURE__ */ p("div", {
885
+ if (j === "processing") return /* @__PURE__ */ h("div", {
887
886
  className: "max-w-lg mx-auto p-6",
888
- children: /* @__PURE__ */ m("div", {
887
+ children: /* @__PURE__ */ g("div", {
889
888
  className: "text-center space-y-6",
890
889
  children: [
891
- /* @__PURE__ */ p("div", {
890
+ /* @__PURE__ */ h("div", {
892
891
  className: "inline-flex p-4 rounded-full bg-[var(--color-accent-soft)] text-text-link",
893
- children: /* @__PURE__ */ p(d, { className: "size-12 animate-spin" })
892
+ children: /* @__PURE__ */ h(p, { className: "size-12 animate-spin" })
894
893
  }),
895
- /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("h1", {
894
+ /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("h1", {
896
895
  className: "text-2xl font-bold text-text-primary",
897
- children: h("billing.checkout.verifyingPayment", "Verifying Payment")
898
- }), /* @__PURE__ */ p("p", {
896
+ children: _("billing.checkout.verifyingPayment", "Verifying Payment")
897
+ }), /* @__PURE__ */ h("p", {
899
898
  className: "text-text-secondary mt-2",
900
- children: h("billing.checkout.verifyingPaymentDescription", "Please wait while we confirm your payment...")
899
+ children: _("billing.checkout.verifyingPaymentDescription", "Please wait while we confirm your payment...")
901
900
  })] }),
902
- /* @__PURE__ */ m("div", {
901
+ /* @__PURE__ */ g("div", {
903
902
  className: "bg-bg-sunken rounded-lg p-4",
904
- children: [/* @__PURE__ */ m("p", {
903
+ children: [/* @__PURE__ */ g("p", {
905
904
  className: "text-sm text-text-secondary",
906
905
  children: [
907
- h("billing.checkout.timeElapsed", "Time elapsed:"),
906
+ _("billing.checkout.timeElapsed", "Time elapsed:"),
908
907
  " ",
909
- /* @__PURE__ */ p("span", {
908
+ /* @__PURE__ */ h("span", {
910
909
  className: "font-mono font-medium text-text-primary",
911
910
  children: ((e) => {
912
911
  let t = Math.floor(e / 1e3);
913
912
  return `${Math.floor(t / 60)}:${(t % 60).toString().padStart(2, "0")}`;
914
- })(Nt)
913
+ })(At)
915
914
  })
916
915
  ]
917
- }), /* @__PURE__ */ p("p", {
916
+ }), /* @__PURE__ */ h("p", {
918
917
  className: "text-xs text-text-secondary mt-1",
919
- children: h("billing.checkout.keepPageOpen", "This may take a few moments. Please don't close this page.")
918
+ children: _("billing.checkout.keepPageOpen", "This may take a few moments. Please don't close this page.")
920
919
  })]
921
920
  }),
922
- /* @__PURE__ */ p("div", {
921
+ /* @__PURE__ */ h("div", {
923
922
  className: "w-full bg-bg-sunken rounded-full h-2 overflow-hidden",
924
- children: /* @__PURE__ */ p("div", {
923
+ children: /* @__PURE__ */ h("div", {
925
924
  className: "bg-action-primary-bg h-2 rounded-full transition-all duration-1000",
926
- style: { width: `${Math.min(Nt / 3e5 * 100, 100)}%` }
925
+ style: { width: `${Math.min(At / 3e5 * 100, 100)}%` }
927
926
  })
928
927
  }),
929
- Nt > 3e4 && /* @__PURE__ */ p("button", {
928
+ At > 3e4 && /* @__PURE__ */ h("button", {
930
929
  type: "button",
931
930
  onClick: () => {
932
- A("error"), M("Payment verification was cancelled. Please check your billing history.");
931
+ M("error"), P("Payment verification was cancelled. Please check your billing history.");
933
932
  },
934
933
  className: "text-sm text-text-secondary hover:text-text-primary underline",
935
- children: h("billing.checkout.cancelAndCheckHistory", "Cancel and check billing history")
934
+ children: _("billing.checkout.cancelAndCheckHistory", "Cancel and check billing history")
936
935
  })
937
936
  ]
938
937
  })
939
938
  });
940
- if (k === "payment" && j) {
939
+ if (j === "payment" && N) {
941
940
  let e = (e, t) => `${{
942
941
  INR: "₹",
943
942
  USD: "$",
944
943
  EUR: "€",
945
944
  GBP: "£"
946
- }[t] || t + " "}${e.toFixed(2)}`, t = j.currency || F.selectedCurrency, n = j.total ?? F.total;
947
- return /* @__PURE__ */ m("div", {
945
+ }[t] || t + " "}${e.toFixed(2)}`, t = N.currency || R.selectedCurrency, n = N.total ?? R.total;
946
+ return /* @__PURE__ */ g("div", {
948
947
  className: "max-w-2xl mx-auto p-4 sm:p-6 space-y-6",
949
948
  children: [
950
- /* @__PURE__ */ m("button", {
949
+ /* @__PURE__ */ g("button", {
951
950
  type: "button",
952
- onClick: () => A("select"),
951
+ onClick: () => M("select"),
953
952
  className: "flex items-center gap-2 text-sm text-text-secondary hover:text-text-primary",
954
- children: [/* @__PURE__ */ p(Ie, { className: "size-4" }), h("billing.checkout.backToCheckout", "Back to checkout")]
953
+ children: [/* @__PURE__ */ h(Pe, { className: "size-4" }), _("billing.checkout.backToCheckout", "Back to checkout")]
955
954
  }),
956
- /* @__PURE__ */ p(r, {
957
- title: h("billing.checkout.completePayment", "Complete Payment"),
958
- description: h("billing.checkout.completePaymentDescription", "Enter your payment details to complete the purchase")
955
+ /* @__PURE__ */ h(r, {
956
+ title: _("billing.checkout.completePayment", "Complete Payment"),
957
+ description: _("billing.checkout.completePaymentDescription", "Enter your payment details to complete the purchase")
959
958
  }),
960
- /* @__PURE__ */ m("div", {
959
+ /* @__PURE__ */ g("div", {
961
960
  className: "rounded-lg border border-border-subtle bg-bg-surface p-4 space-y-4",
962
961
  children: [
963
- /* @__PURE__ */ m("h3", {
962
+ /* @__PURE__ */ g("h3", {
964
963
  className: "font-semibold text-text-primary flex items-center gap-2",
965
- children: [/* @__PURE__ */ p(Ue, { className: "size-4" }), h("billing.checkout.paymentSummary", "Payment Summary")]
964
+ children: [/* @__PURE__ */ h(Ve, { className: "size-4" }), _("billing.checkout.paymentSummary", "Payment Summary")]
966
965
  }),
967
- F.billingAccount && /* @__PURE__ */ m("div", {
966
+ R.billingAccount && /* @__PURE__ */ g("div", {
968
967
  className: "p-3 bg-bg-sunken rounded-lg space-y-1",
969
968
  children: [
970
- /* @__PURE__ */ p("div", {
969
+ /* @__PURE__ */ h("div", {
971
970
  className: "text-xs text-text-secondary uppercase tracking-wide",
972
- children: h("billing.checkout.billingAccount", "Billing Account")
971
+ children: _("billing.checkout.billingAccount", "Billing Account")
973
972
  }),
974
- /* @__PURE__ */ p("div", {
973
+ /* @__PURE__ */ h("div", {
975
974
  className: "font-medium text-text-primary",
976
- children: F.billingAccount.name
975
+ children: R.billingAccount.name
977
976
  }),
978
- /* @__PURE__ */ p("div", {
977
+ /* @__PURE__ */ h("div", {
979
978
  className: "text-sm text-text-secondary",
980
- children: F.billingAccount.email
979
+ children: R.billingAccount.email
981
980
  })
982
981
  ]
983
982
  }),
984
- D === "ADDON" && F.selectedSubscriptionId && U && /* @__PURE__ */ m("div", {
983
+ k === "ADDON" && R.selectedSubscriptionId && K && /* @__PURE__ */ g("div", {
985
984
  className: "p-3 bg-bg-sunken rounded-lg space-y-1",
986
985
  children: [
987
- /* @__PURE__ */ p("div", {
986
+ /* @__PURE__ */ h("div", {
988
987
  className: "text-xs text-text-secondary uppercase tracking-wide",
989
- children: h("billing.checkout.addingToSubscription", "Adding to Subscription")
988
+ children: _("billing.checkout.addingToSubscription", "Adding to Subscription")
990
989
  }),
991
- /* @__PURE__ */ p("div", {
990
+ /* @__PURE__ */ h("div", {
992
991
  className: "font-medium text-text-primary",
993
- children: U.plan?.name || h("billing.checkout.subscription", "Subscription")
992
+ children: K.plan?.name || _("billing.checkout.subscription", "Subscription")
994
993
  }),
995
- U.plan?.product?.name && /* @__PURE__ */ p("div", {
994
+ K.plan?.product?.name && /* @__PURE__ */ h("div", {
996
995
  className: "text-sm text-text-secondary",
997
- children: U.plan.product.name
996
+ children: K.plan.product.name
998
997
  })
999
998
  ]
1000
999
  }),
1001
- /* @__PURE__ */ m("div", {
1000
+ /* @__PURE__ */ g("div", {
1002
1001
  className: "space-y-2 text-sm",
1003
1002
  children: [
1004
1003
  (() => {
1005
- let r = F.taxRate, i = r > 0 ? n / (1 + r) : n, a = r > 0 ? n - i : 0;
1006
- return /* @__PURE__ */ m(f, { children: [
1007
- /* @__PURE__ */ m("div", {
1004
+ let r = R.taxRate, i = r > 0 ? n / (1 + r) : n, a = r > 0 ? n - i : 0;
1005
+ return /* @__PURE__ */ g(m, { children: [
1006
+ /* @__PURE__ */ g("div", {
1008
1007
  className: "flex justify-between",
1009
- children: [/* @__PURE__ */ p("span", {
1008
+ children: [/* @__PURE__ */ h("span", {
1010
1009
  className: "text-text-secondary",
1011
- children: h("billing.checkout.subtotal", "Subtotal")
1012
- }), /* @__PURE__ */ p("span", {
1010
+ children: _("billing.checkout.subtotal", "Subtotal")
1011
+ }), /* @__PURE__ */ h("span", {
1013
1012
  className: "text-text-primary",
1014
1013
  children: e(i, t)
1015
1014
  })]
1016
1015
  }),
1017
- F.discountAmount > 0 && /* @__PURE__ */ m("div", {
1016
+ R.discountAmount > 0 && /* @__PURE__ */ g("div", {
1018
1017
  className: "flex justify-between text-status-success-text",
1019
- children: [/* @__PURE__ */ p("span", { children: h("billing.checkout.discount", "Discount") }), /* @__PURE__ */ m("span", { children: ["-", e(F.discountAmount, t)] })]
1018
+ children: [/* @__PURE__ */ h("span", { children: _("billing.checkout.discount", "Discount") }), /* @__PURE__ */ g("span", { children: ["-", e(R.discountAmount, t)] })]
1020
1019
  }),
1021
- a > 0 && /* @__PURE__ */ m("div", {
1020
+ a > 0 && /* @__PURE__ */ g("div", {
1022
1021
  className: "flex justify-between",
1023
- children: [/* @__PURE__ */ m("span", {
1022
+ children: [/* @__PURE__ */ g("span", {
1024
1023
  className: "text-text-secondary",
1025
1024
  children: [
1026
- F.taxType || h("billing.checkout.tax", "Tax"),
1025
+ R.taxType || _("billing.checkout.tax", "Tax"),
1027
1026
  " (",
1028
1027
  (r * 100).toFixed(0),
1029
1028
  "%)"
1030
1029
  ]
1031
- }), /* @__PURE__ */ p("span", {
1030
+ }), /* @__PURE__ */ h("span", {
1032
1031
  className: "text-text-primary",
1033
1032
  children: e(a, t)
1034
1033
  })]
1035
1034
  })
1036
1035
  ] });
1037
1036
  })(),
1038
- /* @__PURE__ */ p("div", { className: "border-t border-border-subtle my-2" }),
1039
- /* @__PURE__ */ m("div", {
1037
+ /* @__PURE__ */ h("div", { className: "border-t border-border-subtle my-2" }),
1038
+ /* @__PURE__ */ g("div", {
1040
1039
  className: "flex justify-between font-semibold",
1041
- children: [/* @__PURE__ */ p("span", {
1040
+ children: [/* @__PURE__ */ h("span", {
1042
1041
  className: "text-text-primary",
1043
- children: h("billing.checkout.total", "Total")
1044
- }), /* @__PURE__ */ p("span", {
1042
+ children: _("billing.checkout.total", "Total")
1043
+ }), /* @__PURE__ */ h("span", {
1045
1044
  className: "text-lg text-text-primary",
1046
1045
  children: e(n, t)
1047
1046
  })]
@@ -1050,287 +1049,287 @@ var tt = () => {
1050
1049
  })
1051
1050
  ]
1052
1051
  }),
1053
- F.selectedProvider === "STRIPE" && j.clientSecret && /* @__PURE__ */ p("div", {
1052
+ R.selectedProvider === "STRIPE" && N.clientSecret && /* @__PURE__ */ h("div", {
1054
1053
  className: "rounded-lg border border-border-subtle bg-bg-surface overflow-hidden",
1055
- children: /* @__PURE__ */ p("div", {
1054
+ children: /* @__PURE__ */ h("div", {
1056
1055
  className: "p-4 space-y-4",
1057
- children: /* @__PURE__ */ p(Ce, {
1058
- clientSecret: j.clientSecret,
1059
- publishableKey: at || At?.stripePublishableKey || "",
1060
- amount: Math.round((j.total ?? F.total) * 100),
1061
- currency: j.currency || F.selectedCurrency,
1056
+ children: /* @__PURE__ */ h(be, {
1057
+ clientSecret: N.clientSecret,
1058
+ publishableKey: rt || Dt?.stripePublishableKey || "",
1059
+ amount: Math.round((N.total ?? R.total) * 100),
1060
+ currency: N.currency || R.selectedCurrency,
1062
1061
  onSuccess: un,
1063
1062
  onError: dn,
1064
- onCancel: () => A("select"),
1065
- isCompletingExistingPayment: !!F.selectedPaymentMethodId
1063
+ onCancel: () => M("select"),
1064
+ isCompletingExistingPayment: !!R.selectedPaymentMethodId
1066
1065
  })
1067
1066
  })
1068
1067
  }),
1069
- F.selectedProvider === "RAZORPAY" && j.orderId && /* @__PURE__ */ p("div", {
1068
+ R.selectedProvider === "RAZORPAY" && N.orderId && /* @__PURE__ */ h("div", {
1070
1069
  className: "rounded-lg border border-border-subtle bg-bg-surface overflow-hidden",
1071
- children: /* @__PURE__ */ m("div", {
1070
+ children: /* @__PURE__ */ g("div", {
1072
1071
  className: "p-4 space-y-4",
1073
- children: [/* @__PURE__ */ m("label", {
1072
+ children: [/* @__PURE__ */ g("label", {
1074
1073
  className: "flex items-center gap-2 cursor-pointer",
1075
- children: [/* @__PURE__ */ p("input", {
1074
+ children: [/* @__PURE__ */ h("input", {
1076
1075
  type: "checkbox",
1077
- checked: F.saveCard,
1078
- onChange: (e) => F.setSaveCard(e.target.checked),
1076
+ checked: R.saveCard,
1077
+ onChange: (e) => R.setSaveCard(e.target.checked),
1079
1078
  className: "size-4 rounded border-border-subtle text-text-link focus:ring-[var(--color-focus-ring)]"
1080
- }), /* @__PURE__ */ p("span", {
1079
+ }), /* @__PURE__ */ h("span", {
1081
1080
  className: "text-sm text-text-secondary",
1082
1081
  children: "Save card for future purchases"
1083
1082
  })]
1084
- }), /* @__PURE__ */ p(we, {
1085
- orderId: j.orderId,
1086
- keyId: j.razorpayKeyId || ot || "",
1087
- amount: Math.round((j.total ?? F.total) * 100),
1088
- currency: j.currency || "INR",
1089
- customerId: j.razorpayCustomerId,
1083
+ }), /* @__PURE__ */ h(xe, {
1084
+ orderId: N.orderId,
1085
+ keyId: N.razorpayKeyId || it || "",
1086
+ amount: Math.round((N.total ?? R.total) * 100),
1087
+ currency: N.currency || "INR",
1088
+ customerId: N.razorpayCustomerId,
1090
1089
  prefill: {
1091
- name: j.prefillName,
1092
- email: j.prefillEmail,
1093
- contact: j.prefillContact
1090
+ name: N.prefillName,
1091
+ email: N.prefillEmail,
1092
+ contact: N.prefillContact
1094
1093
  },
1095
1094
  onSuccess: (e) => un(e.razorpay_payment_id),
1096
1095
  onError: dn,
1097
- onCancel: () => A("select")
1096
+ onCancel: () => M("select")
1098
1097
  })]
1099
1098
  })
1100
1099
  })
1101
1100
  ]
1102
1101
  });
1103
1102
  }
1104
- return /* @__PURE__ */ m("div", {
1103
+ return /* @__PURE__ */ g("div", {
1105
1104
  className: "max-w-6xl mx-auto p-4 sm:p-6",
1106
1105
  children: [
1107
- /* @__PURE__ */ m("button", {
1106
+ /* @__PURE__ */ g("button", {
1108
1107
  type: "button",
1109
- onClick: () => _(-1),
1108
+ onClick: () => y(-1),
1110
1109
  className: "flex items-center gap-2 text-sm text-text-secondary hover:text-text-primary mb-4",
1111
- children: [/* @__PURE__ */ p(Ie, { className: "size-4" }), "Back"]
1110
+ children: [/* @__PURE__ */ h(Pe, { className: "size-4" }), "Back"]
1112
1111
  }),
1113
- /* @__PURE__ */ m("div", {
1112
+ /* @__PURE__ */ g("div", {
1114
1113
  className: "flex items-center gap-3 mb-6",
1115
- children: [/* @__PURE__ */ p("div", {
1114
+ children: [/* @__PURE__ */ h("div", {
1116
1115
  className: "p-2 rounded-lg bg-[var(--color-accent-soft)] text-text-link",
1117
1116
  children: hn()
1118
- }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("h1", {
1117
+ }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("h1", {
1119
1118
  className: "text-2xl font-bold text-text-primary",
1120
1119
  children: mn()
1121
- }), /* @__PURE__ */ p("p", {
1120
+ }), /* @__PURE__ */ h("p", {
1122
1121
  className: "text-sm text-text-secondary",
1123
1122
  children: "Complete your purchase securely"
1124
1123
  })] })]
1125
1124
  }),
1126
- /* @__PURE__ */ p($e, {
1125
+ /* @__PURE__ */ h(Ze, {
1127
1126
  className: "mb-6",
1128
- children: h("billing.checkout.purpose", "Review what you are buying — plan, add-ons or credits — pick the billing account and payment method, apply any discount code, and pay. Taxes and the final total are shown before you confirm.")
1127
+ children: _("billing.checkout.purpose", "Review what you are buying — plan, add-ons or credits — pick the billing account and payment method, apply any discount code, and pay. Taxes and the final total are shown before you confirm.")
1129
1128
  }),
1130
- y?.upgradeFromSubscriptionId && y?.currentPlanName && /* @__PURE__ */ p("div", {
1129
+ x?.upgradeFromSubscriptionId && x?.currentPlanName && /* @__PURE__ */ h("div", {
1131
1130
  className: "mb-6 p-4 rounded-lg border border-border-subtle bg-status-info-bg-subtle",
1132
- children: /* @__PURE__ */ m("div", {
1131
+ children: /* @__PURE__ */ g("div", {
1133
1132
  className: "flex items-center gap-3",
1134
- children: [/* @__PURE__ */ p("div", {
1133
+ children: [/* @__PURE__ */ h("div", {
1135
1134
  className: "p-2 rounded-full bg-status-info-bg-subtle",
1136
- children: /* @__PURE__ */ p(We, { className: "size-4 text-accent-blue" })
1137
- }), /* @__PURE__ */ m("div", {
1135
+ children: /* @__PURE__ */ h(He, { className: "size-4 text-accent-blue" })
1136
+ }), /* @__PURE__ */ g("div", {
1138
1137
  className: "flex-1",
1139
- children: [/* @__PURE__ */ m("p", {
1138
+ children: [/* @__PURE__ */ g("p", {
1140
1139
  className: "text-sm font-medium text-status-info-text",
1141
1140
  children: [
1142
1141
  "Upgrading from:",
1143
1142
  " ",
1144
- /* @__PURE__ */ p("span", {
1143
+ /* @__PURE__ */ h("span", {
1145
1144
  className: "font-semibold",
1146
- children: y.currentPlanName
1145
+ children: x.currentPlanName
1147
1146
  })
1148
1147
  ]
1149
- }), /* @__PURE__ */ p("p", {
1148
+ }), /* @__PURE__ */ h("p", {
1150
1149
  className: "text-xs text-status-info-text mt-0.5",
1151
1150
  children: "Your current subscription will be marked as upgraded and quotas will transfer to the new plan."
1152
1151
  })]
1153
1152
  })]
1154
1153
  })
1155
1154
  }),
1156
- y?.downgradeFromSubscriptionId && y?.currentPlanName && /* @__PURE__ */ p("div", {
1155
+ x?.downgradeFromSubscriptionId && x?.currentPlanName && /* @__PURE__ */ h("div", {
1157
1156
  className: "mb-6 p-4 rounded-lg border border-status-warning-border bg-status-warning-bg-subtle",
1158
- children: /* @__PURE__ */ m("div", {
1157
+ children: /* @__PURE__ */ g("div", {
1159
1158
  className: "flex items-center gap-3",
1160
- children: [/* @__PURE__ */ p("div", {
1159
+ children: [/* @__PURE__ */ h("div", {
1161
1160
  className: "p-2 rounded-full bg-status-warning-bg-subtle",
1162
- children: /* @__PURE__ */ p(We, { className: "size-4 text-status-warning-text" })
1163
- }), /* @__PURE__ */ m("div", {
1161
+ children: /* @__PURE__ */ h(He, { className: "size-4 text-status-warning-text" })
1162
+ }), /* @__PURE__ */ g("div", {
1164
1163
  className: "flex-1",
1165
- children: [/* @__PURE__ */ m("p", {
1164
+ children: [/* @__PURE__ */ g("p", {
1166
1165
  className: "text-sm font-medium text-status-warning-text",
1167
1166
  children: [
1168
1167
  "Downgrading from:",
1169
1168
  " ",
1170
- /* @__PURE__ */ p("span", {
1169
+ /* @__PURE__ */ h("span", {
1171
1170
  className: "font-semibold",
1172
- children: y.currentPlanName
1171
+ children: x.currentPlanName
1173
1172
  })
1174
1173
  ]
1175
- }), /* @__PURE__ */ p("p", {
1174
+ }), /* @__PURE__ */ h("p", {
1176
1175
  className: "text-xs text-status-warning-text mt-0.5",
1177
1176
  children: "Your current plan stays active until it expires, you keep all its features until then. After expiry, only the new plan applies."
1178
1177
  })]
1179
1178
  })]
1180
1179
  })
1181
1180
  }),
1182
- /* @__PURE__ */ m("div", {
1181
+ /* @__PURE__ */ g("div", {
1183
1182
  className: "grid gap-6 lg:grid-cols-5",
1184
- children: [/* @__PURE__ */ m("div", {
1183
+ children: [/* @__PURE__ */ g("div", {
1185
1184
  className: "lg:col-span-3 space-y-6 order-2 lg:order-1",
1186
1185
  children: [
1187
- D === "CREDITS" && F.items[0] && /* @__PURE__ */ p("div", {
1186
+ k === "CREDITS" && R.items[0] && /* @__PURE__ */ h("div", {
1188
1187
  className: "rounded-lg border border-border-subtle bg-bg-surface p-4 sm:p-6",
1189
- children: /* @__PURE__ */ p(Se, {
1190
- value: F.items[0].quantity,
1188
+ children: /* @__PURE__ */ h(ye, {
1189
+ value: R.items[0].quantity,
1191
1190
  onChange: fn,
1192
- costPerCredit: G,
1193
- currency: F.selectedCurrency,
1194
- disabled: Xt
1191
+ costPerCredit: J,
1192
+ currency: R.selectedCurrency,
1193
+ disabled: qt
1195
1194
  })
1196
1195
  }),
1197
- /* @__PURE__ */ m("div", {
1196
+ /* @__PURE__ */ g("div", {
1198
1197
  className: "rounded-lg border border-border-subtle bg-bg-surface p-4 sm:p-6 space-y-4",
1199
- children: [/* @__PURE__ */ p(ye, {
1200
- accounts: q,
1201
- selectedAccountId: F.billingAccount?.id ?? null,
1202
- onSelect: F.setBillingAccount,
1203
- isLoading: It,
1198
+ children: [/* @__PURE__ */ h(ge, {
1199
+ accounts: X,
1200
+ selectedAccountId: R.billingAccount?.id ?? null,
1201
+ onSelect: R.setBillingAccount,
1202
+ isLoading: Nt,
1204
1203
  disabled: sn,
1205
1204
  disabledMessage: sn ? "Billing account is locked for plan changes" : void 0
1206
- }), D === "ADDON" && !E && F.billingAccount && /* @__PURE__ */ p(Te, {
1207
- subscriptions: H,
1208
- selectedSubscriptionId: F.selectedSubscriptionId,
1209
- onSelect: F.setSelectedSubscriptionId,
1210
- isLoading: qt
1205
+ }), k === "ADDON" && !O && R.billingAccount && /* @__PURE__ */ h(Se, {
1206
+ subscriptions: G,
1207
+ selectedSubscriptionId: R.selectedSubscriptionId,
1208
+ onSelect: R.setSelectedSubscriptionId,
1209
+ isLoading: Wt
1211
1210
  })]
1212
1211
  }),
1213
- B && /* @__PURE__ */ p(Ae, {
1214
- storeOrderId: g,
1215
- currency: F.selectedCurrency,
1216
- onChange: Ht
1212
+ U && /* @__PURE__ */ h(De, {
1213
+ storeOrderId: v,
1214
+ currency: R.selectedCurrency,
1215
+ onChange: zt
1217
1216
  }),
1218
- /* @__PURE__ */ m("div", {
1217
+ /* @__PURE__ */ g("div", {
1219
1218
  className: "rounded-lg border border-border-subtle bg-bg-surface p-4 sm:p-6 space-y-4",
1220
1219
  children: [
1221
- /* @__PURE__ */ p(De, {
1222
- savedPaymentMethods: K,
1223
- selectedPaymentMethodId: F.selectedPaymentMethodId,
1224
- onSelectSavedCard: F.setSelectedPaymentMethodId,
1225
- selectedProvider: F.selectedProvider,
1226
- onSelectProvider: F.setPaymentProvider,
1227
- stripeEnabled: jt,
1228
- razorpayEnabled: Mt,
1229
- canPayWithCredits: F.canPayWithCredits,
1230
- availableCredits: F.availableCredits,
1231
- creditsRequired: F.creditsRequired,
1232
- billingCountry: J,
1233
- saveCard: F.saveCard,
1234
- onSaveCardChange: F.setSaveCard,
1235
- autoRenewEnabled: D === "PLAN" && F.autoRenew,
1236
- isLoading: Gt
1220
+ /* @__PURE__ */ h(we, {
1221
+ savedPaymentMethods: Y,
1222
+ selectedPaymentMethodId: R.selectedPaymentMethodId,
1223
+ onSelectSavedCard: R.setSelectedPaymentMethodId,
1224
+ selectedProvider: R.selectedProvider,
1225
+ onSelectProvider: R.setPaymentProvider,
1226
+ stripeEnabled: Ot,
1227
+ razorpayEnabled: kt,
1228
+ canPayWithCredits: R.canPayWithCredits,
1229
+ availableCredits: R.availableCredits,
1230
+ creditsRequired: R.creditsRequired,
1231
+ billingCountry: Z,
1232
+ saveCard: R.saveCard,
1233
+ onSaveCardChange: R.setSaveCard,
1234
+ autoRenewEnabled: k === "PLAN" && R.autoRenew,
1235
+ isLoading: Ht
1237
1236
  }),
1238
- F.selectedProvider !== "CREDITS" && F.selectedProvider !== "AUTO" && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("div", { className: "border-t border-border-subtle" }), /* @__PURE__ */ p("div", {
1237
+ R.selectedProvider !== "CREDITS" && R.selectedProvider !== "AUTO" && /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("div", { className: "border-t border-border-subtle" }), /* @__PURE__ */ h("div", {
1239
1238
  className: "bg-bg-sunken p-4 rounded-button",
1240
- children: /* @__PURE__ */ m("div", {
1239
+ children: /* @__PURE__ */ g("div", {
1241
1240
  className: "flex items-start gap-3",
1242
- children: [/* @__PURE__ */ p("svg", {
1241
+ children: [/* @__PURE__ */ h("svg", {
1243
1242
  className: "size-5 text-text-secondary mt-0.5",
1244
1243
  fill: "none",
1245
1244
  stroke: "currentColor",
1246
1245
  viewBox: "0 0 24 24",
1247
- children: /* @__PURE__ */ p("path", {
1246
+ children: /* @__PURE__ */ h("path", {
1248
1247
  strokeLinecap: "round",
1249
1248
  strokeLinejoin: "round",
1250
1249
  strokeWidth: 2,
1251
1250
  d: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
1252
1251
  })
1253
- }), /* @__PURE__ */ m("div", {
1252
+ }), /* @__PURE__ */ g("div", {
1254
1253
  className: "flex-1 text-sm",
1255
- children: [/* @__PURE__ */ m("p", {
1254
+ children: [/* @__PURE__ */ g("p", {
1256
1255
  className: "font-medium text-text-primary mb-1",
1257
- children: ["Currency: ", F.selectedCurrency]
1258
- }), /* @__PURE__ */ m("p", {
1256
+ children: ["Currency: ", R.selectedCurrency]
1257
+ }), /* @__PURE__ */ g("p", {
1259
1258
  className: "text-text-secondary text-xs",
1260
1259
  children: [
1261
1260
  "All prices are shown in",
1262
1261
  " ",
1263
- /* @__PURE__ */ p("strong", {
1262
+ /* @__PURE__ */ h("strong", {
1264
1263
  className: "text-text-primary",
1265
- children: F.selectedCurrency
1264
+ children: R.selectedCurrency
1266
1265
  }),
1267
1266
  " ",
1268
1267
  "based on your billing account settings.",
1269
- F.selectedCurrency === "INR" && " GST will be applied at checkout."
1268
+ R.selectedCurrency === "INR" && " GST will be applied at checkout."
1270
1269
  ]
1271
1270
  })]
1272
1271
  })]
1273
1272
  })
1274
1273
  })] }),
1275
- D === "PLAN" && I?.getPlan?.pricingModel === "PER_SEAT" && /* @__PURE__ */ p("div", {
1274
+ k === "PLAN" && z?.getPlan?.pricingModel === "PER_SEAT" && /* @__PURE__ */ h("div", {
1276
1275
  className: "border-t border-border-subtle pt-4",
1277
- children: /* @__PURE__ */ m("div", {
1276
+ children: /* @__PURE__ */ g("div", {
1278
1277
  className: "space-y-3",
1279
- children: [/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
1278
+ children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
1280
1279
  className: "text-sm font-medium text-text-primary",
1281
1280
  children: "Number of seats"
1282
- }), I.getPlan.minSeats && /* @__PURE__ */ m("p", {
1281
+ }), z.getPlan.minSeats && /* @__PURE__ */ g("p", {
1283
1282
  className: "text-xs text-text-secondary mt-0.5",
1284
1283
  children: [
1285
1284
  "Minimum ",
1286
- I.getPlan.minSeats,
1285
+ z.getPlan.minSeats,
1287
1286
  " seat",
1288
- I.getPlan.minSeats === 1 ? "" : "s",
1287
+ z.getPlan.minSeats === 1 ? "" : "s",
1289
1288
  " required"
1290
1289
  ]
1291
- })] }), /* @__PURE__ */ m("div", {
1290
+ })] }), /* @__PURE__ */ g("div", {
1292
1291
  className: "flex items-center gap-3",
1293
1292
  children: [
1294
- /* @__PURE__ */ p("button", {
1293
+ /* @__PURE__ */ h("button", {
1295
1294
  type: "button",
1296
- onClick: () => kt((e) => Math.max(I.getPlan?.minSeats ?? 1, e - 1)),
1297
- disabled: P <= (I.getPlan.minSeats ?? 1),
1295
+ onClick: () => L((e) => Math.max(z.getPlan?.minSeats ?? 1, e - 1)),
1296
+ disabled: I <= (z.getPlan.minSeats ?? 1),
1298
1297
  className: "size-9 rounded-button border border-border-subtle flex items-center justify-center hover:bg-action-ghost-bgHover disabled:opacity-40 disabled:cursor-not-allowed transition-colors text-text-primary",
1299
1298
  children: "−"
1300
1299
  }),
1301
- /* @__PURE__ */ p("input", {
1300
+ /* @__PURE__ */ h("input", {
1302
1301
  type: "number",
1303
- value: P,
1304
- min: I.getPlan.minSeats ?? 1,
1305
- max: I.getPlan.maxSeats ?? 999,
1302
+ value: I,
1303
+ min: z.getPlan.minSeats ?? 1,
1304
+ max: z.getPlan.maxSeats ?? 999,
1306
1305
  onChange: (e) => {
1307
1306
  let t = parseInt(e.target.value, 10);
1308
- isNaN(t) || kt(Math.max(I.getPlan?.minSeats ?? 1, t));
1307
+ isNaN(t) || L(Math.max(z.getPlan?.minSeats ?? 1, t));
1309
1308
  },
1310
1309
  className: "w-20 h-9 text-center border border-border-subtle rounded-button bg-bg-surface text-text-primary text-sm focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
1311
1310
  }),
1312
- /* @__PURE__ */ p("button", {
1311
+ /* @__PURE__ */ h("button", {
1313
1312
  type: "button",
1314
- onClick: () => kt((e) => Math.min(I.getPlan?.maxSeats ?? 999, e + 1)),
1315
- disabled: P >= (I.getPlan.maxSeats ?? 999),
1313
+ onClick: () => L((e) => Math.min(z.getPlan?.maxSeats ?? 999, e + 1)),
1314
+ disabled: I >= (z.getPlan.maxSeats ?? 999),
1316
1315
  className: "size-9 rounded-button border border-border-subtle flex items-center justify-center hover:bg-action-ghost-bgHover disabled:opacity-40 disabled:cursor-not-allowed transition-colors text-text-primary",
1317
1316
  children: "+"
1318
1317
  }),
1319
- I.getPlan.pricePerSeat && /* @__PURE__ */ m("span", {
1318
+ z.getPlan.pricePerSeat && /* @__PURE__ */ g("span", {
1320
1319
  className: "text-sm text-text-secondary",
1321
1320
  children: [
1322
1321
  "×",
1323
1322
  " ",
1324
- I.getPlan.pricePerSeat.toLocaleString("en", {
1323
+ z.getPlan.pricePerSeat.toLocaleString("en", {
1325
1324
  style: "currency",
1326
- currency: I.getPlan.currency ?? "USD"
1325
+ currency: z.getPlan.currency ?? "USD"
1327
1326
  }),
1328
1327
  " ",
1329
1328
  "=",
1330
1329
  " ",
1331
- (I.getPlan.pricePerSeat * P).toLocaleString("en", {
1330
+ (z.getPlan.pricePerSeat * I).toLocaleString("en", {
1332
1331
  style: "currency",
1333
- currency: I.getPlan.currency ?? "USD"
1332
+ currency: z.getPlan.currency ?? "USD"
1334
1333
  }),
1335
1334
  "/mo"
1336
1335
  ]
@@ -1342,58 +1341,58 @@ var tt = () => {
1342
1341
  ]
1343
1342
  })
1344
1343
  ]
1345
- }), /* @__PURE__ */ p("div", {
1344
+ }), /* @__PURE__ */ h("div", {
1346
1345
  className: "lg:col-span-2 order-1 lg:order-2",
1347
- children: /* @__PURE__ */ m("div", {
1346
+ children: /* @__PURE__ */ g("div", {
1348
1347
  className: "lg:sticky lg:top-6 space-y-4",
1349
1348
  children: [
1350
- /* @__PURE__ */ m("div", {
1349
+ /* @__PURE__ */ g("div", {
1351
1350
  className: "rounded-lg border border-border-subtle bg-bg-surface",
1352
1351
  children: [
1353
- /* @__PURE__ */ p("div", {
1352
+ /* @__PURE__ */ h("div", {
1354
1353
  className: "p-4",
1355
- children: /* @__PURE__ */ p(be, {
1356
- items: F.items,
1357
- subtotal: F.subtotal,
1358
- discountAmount: F.discountAmount,
1359
- taxAmount: F.taxAmount,
1360
- taxRate: F.taxRate,
1361
- taxType: F.taxType,
1362
- total: F.total,
1363
- currency: F.selectedCurrency,
1364
- isCalculatingTax: F.isCalculatingTax,
1365
- showInCredits: F.selectedProvider === "CREDITS",
1366
- creditsRequired: F.creditsRequired,
1367
- onUpdateQuantity: D !== "PLAN" && D !== "ORDER" ? F.updateItemQuantity : void 0,
1368
- onRemoveItem: F.removeItem,
1369
- isEditable: D !== "PLAN" && D !== "ORDER"
1354
+ children: /* @__PURE__ */ h(_e, {
1355
+ items: R.items,
1356
+ subtotal: R.subtotal,
1357
+ discountAmount: R.discountAmount,
1358
+ taxAmount: R.taxAmount,
1359
+ taxRate: R.taxRate,
1360
+ taxType: R.taxType,
1361
+ total: R.total,
1362
+ currency: R.selectedCurrency,
1363
+ isCalculatingTax: R.isCalculatingTax,
1364
+ showInCredits: R.selectedProvider === "CREDITS",
1365
+ creditsRequired: R.creditsRequired,
1366
+ onUpdateQuantity: k !== "PLAN" && k !== "ORDER" ? R.updateItemQuantity : void 0,
1367
+ onRemoveItem: R.removeItem,
1368
+ isEditable: k !== "PLAN" && k !== "ORDER"
1370
1369
  })
1371
1370
  }),
1372
- F.selectedProvider !== "CREDITS" && /* @__PURE__ */ p("div", {
1371
+ R.selectedProvider !== "CREDITS" && /* @__PURE__ */ h("div", {
1373
1372
  className: "px-4 pb-4 border-t border-border-subtle pt-4",
1374
- children: /* @__PURE__ */ p(xe, {
1375
- value: F.promoCode,
1376
- onChange: F.setPromoCode,
1377
- onValidate: async () => await F.validatePromoCode(),
1378
- onClear: F.clearPromoCode,
1379
- isApplied: F.promoDiscount > 0,
1380
- discountValue: F.promoDiscount,
1381
- discountType: F.promoDiscountType,
1382
- isValidating: F.isProcessing
1373
+ children: /* @__PURE__ */ h(ve, {
1374
+ value: R.promoCode,
1375
+ onChange: R.setPromoCode,
1376
+ onValidate: async () => await R.validatePromoCode(),
1377
+ onClear: R.clearPromoCode,
1378
+ isApplied: R.promoDiscount > 0,
1379
+ discountValue: R.promoDiscount,
1380
+ discountType: R.promoDiscountType,
1381
+ isValidating: R.isProcessing
1383
1382
  })
1384
1383
  }),
1385
- D === "PLAN" && F.selectedProvider !== "CREDITS" && F.selectedProvider !== "AUTO" && (() => {
1384
+ k === "PLAN" && R.selectedProvider !== "CREDITS" && R.selectedProvider !== "AUTO" && (() => {
1386
1385
  let e = "", t = !1, n = !1;
1387
- if (F.selectedPaymentMethodId) {
1388
- let r = K.find((e) => e.id === F.selectedPaymentMethodId);
1386
+ if (R.selectedPaymentMethodId) {
1387
+ let r = Y.find((e) => e.id === R.selectedPaymentMethodId);
1389
1388
  r && (e = `${r.type === "CREDIT_CARD" || r.type === "DEBIT_CARD" ? "Card" : r.type}${r.last4 ? ` •••• ${r.last4}` : ""}`, t = !0, n = !1);
1390
- } else (F.selectedProvider === "RAZORPAY" || F.selectedProvider === "STRIPE") && (e = F.selectedProvider === "RAZORPAY" ? "new card (Razorpay)" : "new card (Stripe)", t = !0, n = !0);
1391
- return /* @__PURE__ */ p("div", {
1389
+ } else (R.selectedProvider === "RAZORPAY" || R.selectedProvider === "STRIPE") && (e = R.selectedProvider === "RAZORPAY" ? "new card (Razorpay)" : "new card (Stripe)", t = !0, n = !0);
1390
+ return /* @__PURE__ */ h("div", {
1392
1391
  className: "px-4 pb-4",
1393
- children: /* @__PURE__ */ p(Ee, {
1394
- enabled: F.autoRenew,
1392
+ children: /* @__PURE__ */ h(Ce, {
1393
+ enabled: R.autoRenew,
1395
1394
  onToggle: (e) => {
1396
- F.setAutoRenew(e), e && F.selectedPaymentMethodId && F.setAutoRenewPaymentMethodId(F.selectedPaymentMethodId);
1395
+ R.setAutoRenew(e), e && R.selectedPaymentMethodId && R.setAutoRenewPaymentMethodId(R.selectedPaymentMethodId);
1397
1396
  },
1398
1397
  hasPaymentMethodSelected: t,
1399
1398
  selectedPaymentMethodDisplay: e,
@@ -1403,14 +1402,14 @@ var tt = () => {
1403
1402
  })()
1404
1403
  ]
1405
1404
  }),
1406
- /* @__PURE__ */ p("button", {
1405
+ /* @__PURE__ */ h("button", {
1407
1406
  type: "button",
1408
1407
  onClick: ln,
1409
- disabled: F.isProcessing || !F.billingAccount || F.items.length === 0 || F.selectedProvider === "CREDITS" && !tn || D === "ADDON" && !E && qt || D === "ADDON" && !E && H.length === 0 || D === "ADDON" && !E && !F.selectedSubscriptionId || B && (!V.shippingAddressId || !V.shippingMethodId),
1408
+ disabled: R.isProcessing || !R.billingAccount || R.items.length === 0 || R.selectedProvider === "CREDITS" && !Qt || k === "ADDON" && !O && Wt || k === "ADDON" && !O && G.length === 0 || k === "ADDON" && !O && !R.selectedSubscriptionId || U && (!W.shippingAddressId || !W.shippingMethodId),
1410
1409
  className: "w-full px-6 py-4 rounded-lg bg-action-primary-bg text-action-primary-text font-semibold\n hover:bg-action-primary-bgHover disabled:opacity-50 disabled:cursor-not-allowed\n transition-colors flex items-center justify-center gap-2",
1411
- children: F.isProcessing ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(d, { className: "size-5 animate-spin" }), "Processing…"] }) : F.selectedProvider === "CREDITS" ? "Pay with Credits" : "Proceed to Payment"
1410
+ children: R.isProcessing ? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(p, { className: "size-5 animate-spin" }), "Processing…"] }) : R.selectedProvider === "CREDITS" ? "Pay with Credits" : "Proceed to Payment"
1412
1411
  }),
1413
- /* @__PURE__ */ p("p", {
1412
+ /* @__PURE__ */ h("p", {
1414
1413
  className: "text-center text-xs text-text-secondary",
1415
1414
  children: "🔒 Secure checkout with 256-bit SSL encryption"
1416
1415
  })
@@ -1418,22 +1417,21 @@ var tt = () => {
1418
1417
  })
1419
1418
  })]
1420
1419
  }),
1421
- ht && F.billingAccount && /* @__PURE__ */ p(Oe, {
1422
- billingAccountId: F.billingAccount.id,
1423
- hasPhone: !!F.billingAccount.contactNumber?.trim(),
1424
- hasAddress: !!(F.billingAccount.billingAddresses?.[0]?.line1?.trim() && F.billingAccount.billingAddresses?.[0]?.postalCode?.trim()),
1420
+ pt && R.billingAccount && /* @__PURE__ */ h(Te, {
1421
+ billingAccountId: R.billingAccount.id,
1422
+ hasPhone: !!R.billingAccount.contactNumber?.trim(),
1423
+ hasAddress: !!(R.billingAccount.billingAddresses?.[0]?.line1?.trim() && R.billingAccount.billingAddresses?.[0]?.postalCode?.trim()),
1425
1424
  onCompleted: () => {
1426
- _t.current = !0, gt(!1), ln(), Lt().then((e) => {
1427
- let t = (e.data?.myBillingAccounts ?? []).map(et).find((e) => e?.id === F.billingAccount?.id);
1428
- t && F.setBillingAccount(t);
1425
+ ht.current = !0, mt(!1), ln(), Pt().then((e) => {
1426
+ let t = (e.data?.myBillingAccounts ?? []).map(Qe).find((e) => e?.id === R.billingAccount?.id);
1427
+ t && R.setBillingAccount(t);
1429
1428
  });
1430
1429
  },
1431
- onCancel: () => gt(!1)
1430
+ onCancel: () => mt(!1)
1432
1431
  })
1433
1432
  ]
1434
1433
  });
1435
1434
  };
1436
- //#endregion
1437
- export { tt as CheckoutPage };
1435
+ export { $e as CheckoutPage };
1438
1436
 
1439
1437
  //# sourceMappingURL=CheckoutPage.js.map